@capillarytech/creatives-library 7.12.106 → 7.12.107
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
CHANGED
package/routes.js
CHANGED
|
@@ -13,7 +13,6 @@ import * as emailSagas from 'containers/Email/sagas';
|
|
|
13
13
|
import * as templateSagas from 'containers/Templates/sagas';
|
|
14
14
|
import * as lineSagas from 'containers/Line/Create/sagas';
|
|
15
15
|
import * as languageSaga from './v2Containers/LanguageProvider/sagas';
|
|
16
|
-
import * as templatesV2Saga from './v2Containers/TemplatesV2/sagas';
|
|
17
16
|
|
|
18
17
|
import pathConfig from './config/path';
|
|
19
18
|
|
|
@@ -39,7 +38,6 @@ export default function createRoutes(store) {
|
|
|
39
38
|
const { injectReducer, injectSagas } = getAsyncInjectors(store); // eslint-disable-line no-unused-vars
|
|
40
39
|
injectSagas(rootSaga.default);
|
|
41
40
|
injectSagas(languageSaga.default);
|
|
42
|
-
injectSagas(templatesV2Saga.default);
|
|
43
41
|
return [
|
|
44
42
|
{
|
|
45
43
|
path: '/',
|
|
@@ -3,6 +3,8 @@ import { LOCATION_CHANGE } from 'react-router-redux';
|
|
|
3
3
|
// import { schema, normalize } from 'normalizr';
|
|
4
4
|
import * as Api from '../../services/api';
|
|
5
5
|
import * as types from './constants';
|
|
6
|
+
import { saveCdnConfigs, removeAllCdnLocalStorageItems } from '../../utils/cdnTransformation';
|
|
7
|
+
import { GET_CDN_TRANSFORMATION_CONFIG_REQUEST } from '../TemplatesV2/constants';
|
|
6
8
|
|
|
7
9
|
// Individual exports for testing
|
|
8
10
|
export function* getAllTemplates(channel, queryParams) {
|
|
@@ -85,6 +87,20 @@ export function* getOrgLevelCampaignSettings() {
|
|
|
85
87
|
}
|
|
86
88
|
}
|
|
87
89
|
|
|
90
|
+
function* getCdnTransformationConfig() {
|
|
91
|
+
try {
|
|
92
|
+
const res = yield call(Api.getCdnTransformationConfig);
|
|
93
|
+
|
|
94
|
+
if (res?.success && res?.status?.code === 200) {
|
|
95
|
+
const cdnConfigs = res?.response;
|
|
96
|
+
saveCdnConfigs(cdnConfigs);
|
|
97
|
+
}
|
|
98
|
+
} catch (error) {
|
|
99
|
+
console.log("some error occured during getCdnTransformationConfig call");
|
|
100
|
+
removeAllCdnLocalStorageItems();
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
88
104
|
export function* watchGetOrgLevelCampaignSettings() {
|
|
89
105
|
const watcher = yield takeLatest(
|
|
90
106
|
types.GET_ORG_LEVEL_CAMPAIGN_SETTINGS_REQUEST,
|
|
@@ -222,6 +238,13 @@ function* watchGetSenderDetails() {
|
|
|
222
238
|
yield cancel(watcher);
|
|
223
239
|
}
|
|
224
240
|
|
|
241
|
+
function* watchGetCdnTransformationConfig() {
|
|
242
|
+
yield takeLatest(
|
|
243
|
+
GET_CDN_TRANSFORMATION_CONFIG_REQUEST,
|
|
244
|
+
getCdnTransformationConfig
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
|
|
225
248
|
// All sagas to be loaded
|
|
226
249
|
export default [
|
|
227
250
|
watchGetAllTemplates,
|
|
@@ -233,4 +256,5 @@ export default [
|
|
|
233
256
|
watchGetTemplateDetails,
|
|
234
257
|
watchGetOrgLevelCampaignSettings,
|
|
235
258
|
watchGetSenderDetails,
|
|
259
|
+
watchGetCdnTransformationConfig
|
|
236
260
|
];
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { call, takeLatest } from "redux-saga/effects";
|
|
2
|
-
import * as Api from "../../services/api";
|
|
3
|
-
import * as types from "./constants";
|
|
4
|
-
import { saveCdnConfigs, removeAllCdnLocalStorageItems } from '../../utils/cdnTransformation';
|
|
5
|
-
|
|
6
|
-
function* getCdnTransformationConfig() {
|
|
7
|
-
try {
|
|
8
|
-
const res = yield call(Api.getCdnTransformationConfig);
|
|
9
|
-
|
|
10
|
-
if (res?.success && res?.status?.code === 200) {
|
|
11
|
-
const cdnConfigs = res?.response;
|
|
12
|
-
saveCdnConfigs(cdnConfigs);
|
|
13
|
-
}
|
|
14
|
-
} catch (error) {
|
|
15
|
-
console.log("some error occured during getCdnTransformationConfig call");
|
|
16
|
-
removeAllCdnLocalStorageItems();
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function* watchGetCdnTransformationConfig() {
|
|
21
|
-
yield takeLatest(
|
|
22
|
-
types.GET_CDN_TRANSFORMATION_CONFIG_REQUEST,
|
|
23
|
-
getCdnTransformationConfig
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export default [watchGetCdnTransformationConfig];
|