@capillarytech/creatives-library 8.0.150 → 8.0.152

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -103,6 +103,9 @@ import Rcs from './v2Containers/Rcs';
103
103
  import rcsReducer from './v2Containers/Rcs/reducer';
104
104
  import rcsSaga from './v2Containers/Rcs/sagas';
105
105
 
106
+ //API Imports
107
+ import { updateMetaConfig } from './services/api';
108
+
106
109
  export {default as Ebill} from './v2Containers/Ebill';
107
110
  export {default as EbillReducer} from './v2Containers/Ebill/reducer';
108
111
  export {default as EbillSaga} from './v2Containers/Ebill/sagas';
@@ -181,4 +184,5 @@ export { CapContainer,
181
184
  RcsContainer,
182
185
  ZaloContainer,
183
186
  InAppContainer,
187
+ updateMetaConfig,
184
188
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "8.0.150",
4
+ "version": "8.0.152",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
package/services/api.js CHANGED
@@ -637,6 +637,11 @@ export const createCentralCommsMetaId = (payload, metaType = TRANSACTION) => {
637
637
  return request(url, getAPICallObject('POST', payload, false, false, false, true));
638
638
  };
639
639
 
640
+ export const updateMetaConfig = (payload, metaType = TRANSACTION, metaId) => {
641
+ const url = `${API_ENDPOINT}/common/central-comms/meta-id/${metaType}/${metaId}`;
642
+ return request(url, getAPICallObject('PATCH', payload, false, false, false, true));
643
+ };
644
+
640
645
  // Customer Search APIs for Email Test & Preview Feature
641
646
  export const searchCustomers = ({ query }) => {
642
647
  const url = `${MEMBERCARE_API_ENDPOINT}/customers/search?q=${encodeURIComponent(query)}&limit=10`;
@@ -23,6 +23,7 @@ import {
23
23
  getBulkCustomerDetails,
24
24
  createTestMessageMeta,
25
25
  updateTestMessageMeta,
26
+ updateMetaConfig,
26
27
  } from '../api';
27
28
  import { mockData } from './mockData';
28
29
  import getSchema from '../getSchema';
@@ -804,3 +805,20 @@ describe('updateTestMessageMeta', () => {
804
805
  });
805
806
  });
806
807
  });
808
+
809
+ describe('updateMetaConfig', () => {
810
+ it('should return correct response', async () => {
811
+ global.fetch.mockReturnValue(Promise.resolve({
812
+ status: 200,
813
+ json: () => Promise.resolve({
814
+ status: 200,
815
+ response: 'test',
816
+ }),
817
+ }));
818
+ const result = await updateMetaConfig({ query: 'test' });
819
+ expect(result).toEqual({
820
+ status: 200,
821
+ response: 'test',
822
+ });
823
+ });
824
+ });