@capillarytech/creatives-library 8.0.340-beta.0.2 → 8.0.340-beta.0.3
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/package.json +1 -1
- package/services/api.js +0 -15
package/package.json
CHANGED
package/services/api.js
CHANGED
|
@@ -11,9 +11,6 @@ import getSchema from './getSchema';
|
|
|
11
11
|
import * as API from '../utils/ApiCaller';
|
|
12
12
|
import { addBaseToTemplate, transformCustomFieldsData } from '../utils/commonUtils';
|
|
13
13
|
import { EMAIL, SMS, TRANSACTION } from '../v2Containers/CreativesContainer/constants';
|
|
14
|
-
import localSmsLayoutResponse from '../containers/Sms/Create/localSchema';
|
|
15
|
-
import localEmailLayoutResponse from '../containers/Email/Create/localSchema';
|
|
16
|
-
import localLineLayoutResponse from '../containers/Line/Create/localSchema';
|
|
17
14
|
let API_ENDPOINT = config.development.api_endpoint;
|
|
18
15
|
let EXPORT_API_ENDPOINT = config.development.exports_api_endpoint;
|
|
19
16
|
let CAMPAIGNS_API_ENDPOINT = config.development.campaigns_api_endpoint;
|
|
@@ -440,18 +437,6 @@ export const fetchSchemaForEntity = async ({queryParams}) => {
|
|
|
440
437
|
console.error(err);
|
|
441
438
|
});
|
|
442
439
|
}
|
|
443
|
-
if (
|
|
444
|
-
queryParams.type === 'LAYOUT' &&
|
|
445
|
-
!queryParams.version &&
|
|
446
|
-
['SMS', 'EMAIL', 'LINE'].includes((queryParams.layout || '').toUpperCase())
|
|
447
|
-
) {
|
|
448
|
-
const localByChannel = {
|
|
449
|
-
SMS: localSmsLayoutResponse,
|
|
450
|
-
EMAIL: localEmailLayoutResponse,
|
|
451
|
-
LINE: localLineLayoutResponse,
|
|
452
|
-
};
|
|
453
|
-
return { response: localByChannel[queryParams.layout.toUpperCase()], status: { code: 200 } };
|
|
454
|
-
}
|
|
455
440
|
const url = `${API_ENDPOINT}/meta/${queryParams.type}?query=${JSON.stringify(queryParams)}`;
|
|
456
441
|
const result = await request(url, getAPICallObject('GET'));// request(url, getAPICallObject('GET'));
|
|
457
442
|
const customFields = get(result, 'response.metaEntities.custom', {});
|