mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-31 19:17:48 +00:00 
			
		
		
		
	 b34c526c51
			
		
	
	b34c526c51
	
	
	
		
			
			This PR adds native integration with Shopify. No more dashboard apps. The support agents can view the orders, their status and the link to the order page on the conversation sidebar. This PR does the following: - Create an integration with Shopify (a new app is added in the integrations tab) - Option to configure it in SuperAdmin - OAuth endpoint and the callbacks. - Frontend component to render the orders. (We might need to cache it in the future) --------- Co-authored-by: iamsivin <iamsivin@gmail.com> Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
		
			
				
	
	
		
			44 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			44 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| /* global axios */
 | |
| 
 | |
| import ApiClient from './ApiClient';
 | |
| 
 | |
| class IntegrationsAPI extends ApiClient {
 | |
|   constructor() {
 | |
|     super('integrations/apps', { accountScoped: true });
 | |
|   }
 | |
| 
 | |
|   connectSlack(code) {
 | |
|     return axios.post(`${this.baseUrl()}/integrations/slack`, { code });
 | |
|   }
 | |
| 
 | |
|   updateSlack({ referenceId }) {
 | |
|     return axios.patch(`${this.baseUrl()}/integrations/slack`, {
 | |
|       reference_id: referenceId,
 | |
|     });
 | |
|   }
 | |
| 
 | |
|   listAllSlackChannels() {
 | |
|     return axios.get(`${this.baseUrl()}/integrations/slack/list_all_channels`);
 | |
|   }
 | |
| 
 | |
|   delete(integrationId) {
 | |
|     return axios.delete(`${this.baseUrl()}/integrations/${integrationId}`);
 | |
|   }
 | |
| 
 | |
|   createHook(hookData) {
 | |
|     return axios.post(`${this.baseUrl()}/integrations/hooks`, hookData);
 | |
|   }
 | |
| 
 | |
|   deleteHook(hookId) {
 | |
|     return axios.delete(`${this.baseUrl()}/integrations/hooks/${hookId}`);
 | |
|   }
 | |
| 
 | |
|   connectShopify({ shopDomain }) {
 | |
|     return axios.post(`${this.baseUrl()}/integrations/shopify/auth`, {
 | |
|       shop_domain: shopDomain,
 | |
|     });
 | |
|   }
 | |
| }
 | |
| 
 | |
| export default new IntegrationsAPI();
 |