@zohoim/client-sdk 1.0.0-canned12 → 1.0.0-canned13
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/es/core/utils/validateSchema.js +1 -1
- package/es/domain/entities/TemplateMessage/TemplateTags.js +1 -2
- package/es/domain/schema/cannedMessage/TranslationsSchema.js +1 -1
- package/es/infrastructure/adapters/cannedMessages/CannedMessageAdapter.js +3 -1
- package/es/infrastructure/adapters/templateMessages/TemplateTagsAdapter.js +1 -3
- package/es/infrastructure/repositories/templateMessages/TemplateMessageRepository.js +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ function validateSchemaKeys(_ref) {
|
|
|
5
5
|
entityName = ''
|
|
6
6
|
} = _ref;
|
|
7
7
|
Object.keys(schema).forEach(key => {
|
|
8
|
-
if (!(key in data)) {
|
|
8
|
+
if (!(key in data) && schema[key].required !== false) {
|
|
9
9
|
console.warn(`${entityName} - Key '${key}' is missing in the data`);
|
|
10
10
|
}
|
|
11
11
|
});
|
|
@@ -20,11 +20,13 @@ export default class CannedMessageAdapter extends IAdapter {
|
|
|
20
20
|
isActive: cannedMessageData.isActive,
|
|
21
21
|
isPrivate: cannedMessageData.isPrivate,
|
|
22
22
|
translations: cannedMessageData.translations,
|
|
23
|
+
primaryLanguage: cannedMessageData.primaryLanguage,
|
|
23
24
|
uuid: cannedMessageData.uuid,
|
|
24
25
|
meta: cannedMessageData.meta,
|
|
25
26
|
rejectedReason: cannedMessageData.rejectedReason,
|
|
26
27
|
modifiedTime: cannedMessageData.modifiedTime,
|
|
27
|
-
parameters: cannedMessageData.parameters || null
|
|
28
|
+
parameters: cannedMessageData.parameters || null,
|
|
29
|
+
wabaId: cannedMessageData.wabaId
|
|
28
30
|
}).toJSON();
|
|
29
31
|
} catch (error) {
|
|
30
32
|
throw new AdapterError(`Failed to adapt canned message: ${error.message}`);
|
|
@@ -8,9 +8,7 @@ export default class TemplateTagsAdapter extends IAdapter {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
try {
|
|
11
|
-
return new TemplateTags(
|
|
12
|
-
tags: templateTagsData.tags
|
|
13
|
-
}).toJSON();
|
|
11
|
+
return new TemplateTags(templateTagsData.data).toJSON();
|
|
14
12
|
} catch (error) {
|
|
15
13
|
throw new AdapterError(`Failed to adapt TemplateTags: ${error.message}`);
|
|
16
14
|
}
|