@gofynd/fdk-client-javascript 1.2.0 → 1.3.0
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/README.md +44 -7
- package/package.json +1 -2
- package/sdk/application/ApplicationAPIClient.d.ts +3 -3
- package/sdk/application/ApplicationAPIClient.js +6 -4
- package/sdk/application/ApplicationClient.d.ts +2 -3
- package/sdk/application/ApplicationClient.js +1 -45
- package/sdk/application/ApplicationConfig.d.ts +46 -6
- package/sdk/application/ApplicationConfig.js +15 -16
- package/sdk/application/Cart/CartApplicationClient.d.ts +61 -33
- package/sdk/application/Cart/CartApplicationClient.js +225 -134
- package/sdk/application/Cart/CartApplicationModel.d.ts +4 -4
- package/sdk/application/Cart/CartApplicationModel.js +4 -4
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +61 -30
- package/sdk/application/Catalog/CatalogApplicationClient.js +234 -146
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +115 -13
- package/sdk/application/Catalog/CatalogApplicationModel.js +77 -12
- package/sdk/application/Common/CommonApplicationClient.d.ts +5 -3
- package/sdk/application/Common/CommonApplicationClient.js +13 -11
- package/sdk/application/Common/CommonApplicationModel.d.ts +3 -83
- package/sdk/application/Common/CommonApplicationModel.js +2 -58
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +9 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +25 -13
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +1 -34
- package/sdk/application/Communication/CommunicationApplicationModel.js +0 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +46 -16
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +144 -68
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1 -219
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -226
- package/sdk/application/Content/ContentApplicationClient.d.ts +49 -21
- package/sdk/application/Content/ContentApplicationClient.js +159 -80
- package/sdk/application/Content/ContentApplicationModel.d.ts +5 -622
- package/sdk/application/Content/ContentApplicationModel.js +11 -763
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +20 -14
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +1 -152
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -180
- package/sdk/application/Lead/LeadApplicationClient.d.ts +14 -7
- package/sdk/application/Lead/LeadApplicationClient.js +50 -31
- package/sdk/application/Lead/LeadApplicationModel.d.ts +22 -741
- package/sdk/application/Lead/LeadApplicationModel.js +21 -481
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +11 -5
- package/sdk/application/Logistic/LogisticApplicationClient.js +41 -20
- package/sdk/application/Order/OrderApplicationClient.d.ts +24 -12
- package/sdk/application/Order/OrderApplicationClient.js +88 -56
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +91 -42
- package/sdk/application/Payment/PaymentApplicationClient.js +293 -194
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +36 -36
- package/sdk/application/Payment/PaymentApplicationModel.js +36 -36
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +59 -32
- package/sdk/application/PosCart/PosCartApplicationClient.js +214 -130
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +2 -2
- package/sdk/application/PosCart/PosCartApplicationModel.js +2 -2
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +16 -7
- package/sdk/application/Rewards/RewardsApplicationClient.js +56 -29
- package/sdk/application/Share/ShareApplicationClient.d.ts +15 -7
- package/sdk/application/Share/ShareApplicationClient.js +51 -31
- package/sdk/application/Share/ShareApplicationModel.d.ts +1 -33
- package/sdk/application/Share/ShareApplicationModel.js +0 -38
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +9 -4
- package/sdk/application/Theme/ThemeApplicationClient.js +35 -18
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +982 -312
- package/sdk/application/Theme/ThemeApplicationModel.js +621 -284
- package/sdk/application/User/UserApplicationClient.d.ts +74 -35
- package/sdk/application/User/UserApplicationClient.js +252 -161
- package/sdk/application/User/UserApplicationModel.d.ts +3 -401
- package/sdk/application/User/UserApplicationModel.js +2 -490
- package/sdk/common/AxiosHelper.js +1 -2
- package/sdk/common/FDKError.d.ts +3 -0
- package/sdk/common/FDKError.js +8 -0
- package/sdk/common/utils.d.ts +3 -0
- package/sdk/common/utils.js +29 -0
- package/sdk/partner/PartnerAPIClient.d.ts +5 -4
- package/sdk/partner/PartnerAPIClient.js +7 -4
- package/sdk/partner/PartnerClient.d.ts +2 -0
- package/sdk/partner/PartnerClient.js +3 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
- package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
- package/sdk/partner/index.d.ts +3 -1
- package/sdk/partner/index.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -4
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +38 -16
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +1 -13
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +0 -12
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +10 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +4 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +59 -14
- package/sdk/platform/Billing/BillingPlatformClient.js +315 -64
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +56 -196
- package/sdk/platform/Billing/BillingPlatformModel.js +63 -217
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +23 -1
- package/sdk/platform/Billing/BillingPlatformValidator.js +31 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +124 -63
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +431 -265
- package/sdk/platform/Cart/CartPlatformModel.d.ts +253 -53
- package/sdk/platform/Cart/CartPlatformModel.js +104 -54
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +120 -53
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +398 -247
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +155 -78
- package/sdk/platform/Catalog/CatalogPlatformClient.js +561 -355
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +10 -12
- package/sdk/platform/Catalog/CatalogPlatformModel.js +10 -12
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +30 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +13 -0
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -3
- package/sdk/platform/Common/CommonPlatformClient.js +13 -11
- package/sdk/platform/Common/CommonPlatformModel.d.ts +39 -64
- package/sdk/platform/Common/CommonPlatformModel.js +23 -57
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +5 -10
- package/sdk/platform/Common/CommonPlatformValidator.js +3 -4
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +370 -120
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +2328 -888
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +143 -24
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +179 -15
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +6 -5
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +386 -308
- package/sdk/platform/Communication/CommunicationPlatformModel.js +415 -355
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +38 -13
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +171 -57
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +53 -1
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +54 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +5 -1
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +96 -29
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +311 -126
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +5 -1
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +36 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +121 -86
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +13 -180
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +5 -113
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +162 -70
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +528 -309
- package/sdk/platform/Content/ContentPlatformModel.d.ts +9 -198
- package/sdk/platform/Content/ContentPlatformModel.js +8 -231
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +48 -11
- package/sdk/platform/Discount/DiscountPlatformClient.js +142 -48
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +40 -1
- package/sdk/platform/Discount/DiscountPlatformModel.js +27 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +84 -18
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +486 -53
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +71 -7
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +81 -5
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +13 -18
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +58 -65
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +198 -71
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +212 -64
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +18 -10
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -6
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +177 -40
- package/sdk/platform/Finance/FinancePlatformClient.js +1028 -132
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +670 -22
- package/sdk/platform/Finance/FinancePlatformModel.js +809 -23
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +111 -1
- package/sdk/platform/Finance/FinancePlatformValidator.js +134 -0
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +24 -12
- package/sdk/platform/Inventory/InventoryPlatformClient.js +94 -52
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +27 -13
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +101 -55
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +50 -39
- package/sdk/platform/Lead/LeadPlatformClient.js +171 -112
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +32 -390
- package/sdk/platform/Lead/LeadPlatformModel.js +31 -214
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +33 -33
- package/sdk/platform/Lead/LeadPlatformValidator.js +23 -23
- package/sdk/platform/OAuthClient.js +6 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +4 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +12 -10
- package/sdk/platform/Order/OrderPlatformClient.d.ts +165 -71
- package/sdk/platform/Order/OrderPlatformClient.js +738 -205
- package/sdk/platform/Order/OrderPlatformModel.d.ts +261 -3
- package/sdk/platform/Order/OrderPlatformModel.js +225 -2
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +104 -3
- package/sdk/platform/Order/OrderPlatformValidator.js +85 -2
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -22
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +12 -159
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +1 -30
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +0 -26
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -690
- package/sdk/platform/Partner/PartnerPlatformModel.js +0 -809
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +167 -32
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +793 -145
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +91 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +91 -0
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -10
- package/sdk/platform/Payment/PaymentPlatformClient.js +68 -47
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +549 -7
- package/sdk/platform/Payment/PaymentPlatformModel.js +305 -6
- package/sdk/platform/PlatformAPIClient.d.ts +3 -3
- package/sdk/platform/PlatformAPIClient.js +2 -2
- package/sdk/platform/PlatformClient.d.ts +2 -2
- package/sdk/platform/PlatformClient.js +4 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +28 -12
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +90 -53
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +1 -12
- package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -14
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +62 -26
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +210 -93
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +20 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +23 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +36 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +142 -78
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +12 -3
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +14 -2
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -26
- package/sdk/platform/Share/SharePlatformApplicationClient.js +36 -67
- package/sdk/platform/Share/SharePlatformModel.d.ts +4 -4
- package/sdk/platform/Share/SharePlatformModel.js +4 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +127 -57
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +564 -189
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +63 -26
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +62 -22
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
- package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1167 -261
- package/sdk/platform/Theme/ThemePlatformModel.js +801 -244
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
- package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +35 -17
- package/sdk/platform/User/UserPlatformApplicationClient.js +132 -73
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -0
- package/sdk/platform/User/UserPlatformApplicationValidator.js +3 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +1 -738
- package/sdk/platform/User/UserPlatformModel.js +3 -899
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +120 -7
- package/sdk/platform/Webhook/WebhookPlatformClient.js +799 -41
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +476 -86
- package/sdk/platform/Webhook/WebhookPlatformModel.js +388 -89
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +96 -9
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +117 -5
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -3
- package/sdk/public/Configuration/ConfigurationPublicClient.js +13 -11
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +3 -106
- package/sdk/public/Configuration/ConfigurationPublicModel.js +2 -59
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +12 -6
- package/sdk/public/Inventory/InventoryPublicClient.js +42 -27
- package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
- package/sdk/public/Partner/PartnerPublicClient.js +110 -0
- package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
- package/sdk/public/Partner/PartnerPublicModel.js +280 -0
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
- package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
- package/sdk/public/PublicAPIClient.d.ts +14 -1
- package/sdk/public/PublicAPIClient.js +7 -1
- package/sdk/public/PublicClient.d.ts +2 -0
- package/sdk/public/PublicClient.js +4 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +5 -2
- package/sdk/public/Webhook/WebhookPublicClient.js +15 -9
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +1 -191
- package/sdk/public/Webhook/WebhookPublicModel.js +0 -229
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/sdk/application/ApplicationModels.d.ts +0 -48
- package/sdk/application/ApplicationModels.js +0 -38
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -106
- package/sdk/platform/Partner/PartnerPlatformClient.js +0 -878
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -208
- package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -169
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @typedef AppProvider
|
|
5
|
+
* @property {number} [__v]
|
|
6
|
+
* @property {string} [_id]
|
|
7
|
+
* @property {string} [application]
|
|
8
|
+
* @property {string} [created_at]
|
|
9
|
+
* @property {AppProviderRes} [email]
|
|
10
|
+
* @property {AppProviderRes} [sms]
|
|
11
|
+
* @property {string} [updated_at]
|
|
12
|
+
* @property {AppProviderResVoice} [voice]
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @typedef AppProviderReq
|
|
17
|
+
* @property {AppProviderRes} [email]
|
|
18
|
+
* @property {AppProviderRes} [sms]
|
|
19
|
+
* @property {AppProviderResVoice} [voice]
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @typedef AppProviderRes
|
|
24
|
+
* @property {AppProviderResObj} [otp]
|
|
25
|
+
* @property {AppProviderResObj} [promotional]
|
|
26
|
+
* @property {AppProviderResObj} [transaction]
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @typedef AppProviderResObj
|
|
31
|
+
* @property {string} [provider]
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @typedef AppProviderResVoice
|
|
36
|
+
* @property {AppProviderResObj} [otp]
|
|
37
|
+
* @property {AppProviderResObj} [transaction]
|
|
38
|
+
*/
|
|
39
|
+
|
|
3
40
|
/**
|
|
4
41
|
* @typedef Audience
|
|
5
42
|
* @property {number} [__v]
|
|
@@ -20,11 +57,9 @@ const Joi = require("joi");
|
|
|
20
57
|
|
|
21
58
|
/**
|
|
22
59
|
* @typedef AudienceReq
|
|
23
|
-
* @property {string} [application]
|
|
24
60
|
* @property {string} [description]
|
|
25
61
|
* @property {string} [file_url]
|
|
26
62
|
* @property {string[]} [headers]
|
|
27
|
-
* @property {boolean} [is_active]
|
|
28
63
|
* @property {string} [name]
|
|
29
64
|
* @property {number} [records_count]
|
|
30
65
|
* @property {string[]} [tags]
|
|
@@ -43,23 +78,6 @@ const Joi = require("joi");
|
|
|
43
78
|
* @property {string} [status] - Response status.
|
|
44
79
|
*/
|
|
45
80
|
|
|
46
|
-
/**
|
|
47
|
-
* @typedef BigqueryHeadersReq
|
|
48
|
-
* @property {string} [query]
|
|
49
|
-
* @property {string} [type]
|
|
50
|
-
*/
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* @typedef BigqueryHeadersRes
|
|
54
|
-
* @property {BigqueryHeadersResHeaders[]} [headers]
|
|
55
|
-
*/
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* @typedef BigqueryHeadersResHeaders
|
|
59
|
-
* @property {string} [name]
|
|
60
|
-
* @property {string} [type]
|
|
61
|
-
*/
|
|
62
|
-
|
|
63
81
|
/**
|
|
64
82
|
* @typedef Campaign
|
|
65
83
|
* @property {number} [__v]
|
|
@@ -116,6 +134,30 @@ const Joi = require("joi");
|
|
|
116
134
|
* @property {string} [from_name]
|
|
117
135
|
*/
|
|
118
136
|
|
|
137
|
+
/**
|
|
138
|
+
* @typedef DefaultSmsProviders
|
|
139
|
+
* @property {string} [_id]
|
|
140
|
+
* @property {boolean} [is_default]
|
|
141
|
+
* @property {string} [name]
|
|
142
|
+
*/
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* @typedef DummyDatasources
|
|
146
|
+
* @property {number} [id]
|
|
147
|
+
* @property {string} [name]
|
|
148
|
+
*/
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* @typedef DummyDatasourcesMeta
|
|
152
|
+
* @property {DummyDatasourcesMetaObj} [data]
|
|
153
|
+
* @property {number} [id]
|
|
154
|
+
*/
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* @typedef DummyDatasourcesMetaObj
|
|
158
|
+
* @property {number} [b]
|
|
159
|
+
*/
|
|
160
|
+
|
|
119
161
|
/**
|
|
120
162
|
* @typedef EmailProvider
|
|
121
163
|
* @property {number} [__v]
|
|
@@ -159,37 +201,32 @@ const Joi = require("joi");
|
|
|
159
201
|
* @typedef EmailTemplate
|
|
160
202
|
* @property {number} [__v]
|
|
161
203
|
* @property {string} [_id]
|
|
162
|
-
* @property {
|
|
204
|
+
* @property {string} [application]
|
|
205
|
+
* @property {number[]} [attachments]
|
|
206
|
+
* @property {string} [category]
|
|
163
207
|
* @property {string} [created_at]
|
|
164
208
|
* @property {string} [description]
|
|
209
|
+
* @property {string} [editor_meta]
|
|
210
|
+
* @property {string} [editor_type]
|
|
165
211
|
* @property {string} [from_name]
|
|
166
|
-
* @property {
|
|
212
|
+
* @property {EmailTemplateHeaders[]} [headers]
|
|
167
213
|
* @property {TemplateAndType} [html]
|
|
168
214
|
* @property {boolean} [is_internal]
|
|
169
215
|
* @property {boolean} [is_system]
|
|
170
216
|
* @property {string} [name]
|
|
171
217
|
* @property {string} [priority]
|
|
172
218
|
* @property {boolean} [published]
|
|
219
|
+
* @property {string} [reply_to]
|
|
173
220
|
* @property {string} [slug]
|
|
174
|
-
* @property {
|
|
175
|
-
* @property {
|
|
176
|
-
* @property {
|
|
221
|
+
* @property {string[]} [static_bcc]
|
|
222
|
+
* @property {string[]} [static_cc]
|
|
223
|
+
* @property {string[]} [static_to]
|
|
177
224
|
* @property {TemplateAndType} [subject]
|
|
178
|
-
* @property {
|
|
225
|
+
* @property {string[]} [tags]
|
|
226
|
+
* @property {Object} [template_variables]
|
|
179
227
|
* @property {TemplateAndType} [text]
|
|
180
228
|
* @property {string} [updated_at]
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* @typedef EmailTemplateDeleteFailureRes
|
|
185
|
-
* @property {string} [message]
|
|
186
|
-
* @property {boolean} [success]
|
|
187
|
-
*/
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* @typedef EmailTemplateDeleteSuccessRes
|
|
191
|
-
* @property {string} [message]
|
|
192
|
-
* @property {boolean} [success]
|
|
229
|
+
* @property {EnabledObj} [url_shorten]
|
|
193
230
|
*/
|
|
194
231
|
|
|
195
232
|
/**
|
|
@@ -207,45 +244,25 @@ const Joi = require("joi");
|
|
|
207
244
|
|
|
208
245
|
/**
|
|
209
246
|
* @typedef EmailTemplateReq
|
|
210
|
-
* @property {
|
|
247
|
+
* @property {number[]} [attachments]
|
|
211
248
|
* @property {string} [description]
|
|
249
|
+
* @property {string} [editor_meta]
|
|
250
|
+
* @property {string} [editor_type]
|
|
251
|
+
* @property {string} [from_name]
|
|
212
252
|
* @property {EmailTemplateHeaders[]} [headers]
|
|
213
253
|
* @property {TemplateAndType} [html]
|
|
214
254
|
* @property {EmailTemplateKeys} [keys]
|
|
215
|
-
* @property {string}
|
|
216
|
-
* @property {string} [priority]
|
|
217
|
-
* @property {string} [reply_to]
|
|
218
|
-
* @property {string[]} [static_bcc]
|
|
219
|
-
* @property {string[]} [static_cc]
|
|
220
|
-
* @property {string[]} [static_to]
|
|
221
|
-
* @property {TemplateAndType} [subject]
|
|
222
|
-
* @property {TemplateAndType} [text]
|
|
223
|
-
*/
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* @typedef EmailTemplateRes
|
|
227
|
-
* @property {number} [__v]
|
|
228
|
-
* @property {string} [_id]
|
|
229
|
-
* @property {Object[]} [attachments]
|
|
230
|
-
* @property {string} [created_at]
|
|
231
|
-
* @property {string} [description]
|
|
232
|
-
* @property {EmailTemplateHeaders[]} [headers]
|
|
233
|
-
* @property {TemplateAndType} [html]
|
|
234
|
-
* @property {boolean} [is_internal]
|
|
235
|
-
* @property {boolean} [is_system]
|
|
236
|
-
* @property {EmailTemplateKeys} [keys]
|
|
237
|
-
* @property {string} [name]
|
|
255
|
+
* @property {string} name
|
|
238
256
|
* @property {string} [priority]
|
|
239
257
|
* @property {boolean} [published]
|
|
240
258
|
* @property {string} [reply_to]
|
|
241
|
-
* @property {string} [slug]
|
|
242
259
|
* @property {string[]} [static_bcc]
|
|
243
260
|
* @property {string[]} [static_cc]
|
|
244
261
|
* @property {string[]} [static_to]
|
|
245
262
|
* @property {TemplateAndType} [subject]
|
|
246
|
-
* @property {
|
|
263
|
+
* @property {string[]} [tags]
|
|
264
|
+
* @property {Object} [template_variables]
|
|
247
265
|
* @property {TemplateAndType} [text]
|
|
248
|
-
* @property {string} [updated_at]
|
|
249
266
|
*/
|
|
250
267
|
|
|
251
268
|
/**
|
|
@@ -254,6 +271,11 @@ const Joi = require("joi");
|
|
|
254
271
|
* @property {Page} [page]
|
|
255
272
|
*/
|
|
256
273
|
|
|
274
|
+
/**
|
|
275
|
+
* @typedef EnabledObj
|
|
276
|
+
* @property {boolean} [enabled]
|
|
277
|
+
*/
|
|
278
|
+
|
|
257
279
|
/**
|
|
258
280
|
* @typedef EngineRequest
|
|
259
281
|
* @property {MetaStructure} [meta]
|
|
@@ -302,6 +324,20 @@ const Joi = require("joi");
|
|
|
302
324
|
* @property {string} [template]
|
|
303
325
|
*/
|
|
304
326
|
|
|
327
|
+
/**
|
|
328
|
+
* @typedef GenericDelete
|
|
329
|
+
* @property {boolean} [acknowledged]
|
|
330
|
+
* @property {number} [affected]
|
|
331
|
+
* @property {string} [message]
|
|
332
|
+
* @property {string} [operation]
|
|
333
|
+
*/
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* @typedef GenericError
|
|
337
|
+
* @property {Message} [message]
|
|
338
|
+
* @property {string} [sentry]
|
|
339
|
+
*/
|
|
340
|
+
|
|
305
341
|
/**
|
|
306
342
|
* @typedef GetNRecordsCsvReq
|
|
307
343
|
* @property {number} [count]
|
|
@@ -328,6 +364,39 @@ const Joi = require("joi");
|
|
|
328
364
|
* @property {Stats[]} [items]
|
|
329
365
|
*/
|
|
330
366
|
|
|
367
|
+
/**
|
|
368
|
+
* @typedef GlobalProviders
|
|
369
|
+
* @property {GlobalProvidersResObj[]} [email]
|
|
370
|
+
* @property {GlobalProvidersResObj[]} [sms]
|
|
371
|
+
* @property {GlobalProvidersResObj[]} [voice]
|
|
372
|
+
*/
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* @typedef GlobalProvidersResObj
|
|
376
|
+
* @property {string} [_id]
|
|
377
|
+
* @property {string} [name]
|
|
378
|
+
*/
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* @typedef GlobalVariablesGetResponse
|
|
382
|
+
* @property {Object} [editable]
|
|
383
|
+
* @property {Object} [read_only]
|
|
384
|
+
*/
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* @typedef GlobalVariablesPostResponse
|
|
388
|
+
* @property {string} [_id]
|
|
389
|
+
* @property {string} [application]
|
|
390
|
+
* @property {string} [category]
|
|
391
|
+
* @property {string} [created_at]
|
|
392
|
+
* @property {Object} [global_variables]
|
|
393
|
+
*/
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* @typedef GlobalVariablesReq
|
|
397
|
+
* @property {Object} [global_variables]
|
|
398
|
+
*/
|
|
399
|
+
|
|
331
400
|
/**
|
|
332
401
|
* @typedef Job
|
|
333
402
|
* @property {number} [__v]
|
|
@@ -368,7 +437,6 @@ const Joi = require("joi");
|
|
|
368
437
|
* @typedef Log
|
|
369
438
|
* @property {string} [_id]
|
|
370
439
|
* @property {string} [application]
|
|
371
|
-
* @property {string} [channel_type]
|
|
372
440
|
* @property {string} [created_at]
|
|
373
441
|
* @property {Object} [data]
|
|
374
442
|
* @property {LogEmail} [email]
|
|
@@ -376,7 +444,6 @@ const Joi = require("joi");
|
|
|
376
444
|
* @property {LogMeta} [meta]
|
|
377
445
|
* @property {LogPushnotification} [pushnotification]
|
|
378
446
|
* @property {string} [service]
|
|
379
|
-
* @property {string} [source]
|
|
380
447
|
* @property {string} [status]
|
|
381
448
|
* @property {string} [step]
|
|
382
449
|
*/
|
|
@@ -407,6 +474,21 @@ const Joi = require("joi");
|
|
|
407
474
|
* @property {Page} [page]
|
|
408
475
|
*/
|
|
409
476
|
|
|
477
|
+
/**
|
|
478
|
+
* @typedef Message
|
|
479
|
+
* @property {string} [info]
|
|
480
|
+
* @property {string} [message]
|
|
481
|
+
* @property {string} [operation]
|
|
482
|
+
* @property {boolean} [success]
|
|
483
|
+
*/
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* @typedef metaObj
|
|
487
|
+
* @property {boolean} [is_system]
|
|
488
|
+
* @property {string} [template]
|
|
489
|
+
* @property {string} [type]
|
|
490
|
+
*/
|
|
491
|
+
|
|
410
492
|
/**
|
|
411
493
|
* @typedef MetaStructure
|
|
412
494
|
* @property {string} [action]
|
|
@@ -483,29 +565,6 @@ const Joi = require("joi");
|
|
|
483
565
|
* @property {PayloadSmsStructure} [sms]
|
|
484
566
|
*/
|
|
485
567
|
|
|
486
|
-
/**
|
|
487
|
-
* @typedef PushtokenReq
|
|
488
|
-
* @property {string} [action]
|
|
489
|
-
* @property {string} [bundle_identifier]
|
|
490
|
-
* @property {string} [push_token]
|
|
491
|
-
* @property {string} [unique_device_id]
|
|
492
|
-
*/
|
|
493
|
-
|
|
494
|
-
/**
|
|
495
|
-
* @typedef PushtokenRes
|
|
496
|
-
* @property {string} [_id]
|
|
497
|
-
* @property {string} [application_id]
|
|
498
|
-
* @property {string} [bundle_identifier]
|
|
499
|
-
* @property {string} [created_at]
|
|
500
|
-
* @property {string} [expired_at]
|
|
501
|
-
* @property {string} [platform]
|
|
502
|
-
* @property {string} [push_token]
|
|
503
|
-
* @property {string} [type]
|
|
504
|
-
* @property {string} [unique_device_id]
|
|
505
|
-
* @property {string} [updated_at]
|
|
506
|
-
* @property {string} [user_id]
|
|
507
|
-
*/
|
|
508
|
-
|
|
509
568
|
/**
|
|
510
569
|
* @typedef RecipientHeaders
|
|
511
570
|
* @property {string} [email]
|
|
@@ -530,7 +589,6 @@ const Joi = require("joi");
|
|
|
530
589
|
* @typedef SendOtpCommsReqEmail
|
|
531
590
|
* @property {number} [expiry]
|
|
532
591
|
* @property {number} [otp_length]
|
|
533
|
-
* @property {SendOtpEmailCommsProvider} [provider]
|
|
534
592
|
* @property {SendOtpEmailCommsTemplate} [template]
|
|
535
593
|
*/
|
|
536
594
|
|
|
@@ -567,12 +625,6 @@ const Joi = require("joi");
|
|
|
567
625
|
* @property {boolean} [success]
|
|
568
626
|
*/
|
|
569
627
|
|
|
570
|
-
/**
|
|
571
|
-
* @typedef SendOtpEmailCommsProvider
|
|
572
|
-
* @property {string} [_id]
|
|
573
|
-
* @property {string} [slug]
|
|
574
|
-
*/
|
|
575
|
-
|
|
576
628
|
/**
|
|
577
629
|
* @typedef SendOtpEmailCommsTemplate
|
|
578
630
|
* @property {string} [key]
|
|
@@ -611,13 +663,25 @@ const Joi = require("joi");
|
|
|
611
663
|
|
|
612
664
|
/**
|
|
613
665
|
* @typedef SmsProviderReq
|
|
666
|
+
* @property {string} [api_key] - The api_key for the test.
|
|
667
|
+
* @property {string} [apikey] - The apikey for the test.
|
|
614
668
|
* @property {string} [authkey]
|
|
615
669
|
* @property {string} [description]
|
|
670
|
+
* @property {string} [entity_id] - The entity ID for the test.
|
|
671
|
+
* @property {string} [entityid] - The entity ID for the test.
|
|
672
|
+
* @property {string} [feedid] - The feed ID for the test.
|
|
673
|
+
* @property {string} [host] - The host for the test.
|
|
616
674
|
* @property {string} [name]
|
|
675
|
+
* @property {boolean} [override_dnd] - Whether to override Do Not Disturb.
|
|
676
|
+
* @property {string} [password] - The password for the test.
|
|
677
|
+
* @property {number} [port] - The port for the test.
|
|
617
678
|
* @property {string} [provider]
|
|
618
679
|
* @property {string} [sender]
|
|
680
|
+
* @property {string} [sender_id] - The sender ID for the test.
|
|
681
|
+
* @property {string} [senderid] - The sender ID for the test.
|
|
619
682
|
* @property {string} [type]
|
|
620
683
|
* @property {string} [username]
|
|
684
|
+
* @property {number} [version_id] - The version ID for the test.
|
|
621
685
|
*/
|
|
622
686
|
|
|
623
687
|
/**
|
|
@@ -630,30 +694,23 @@ const Joi = require("joi");
|
|
|
630
694
|
* @typedef SmsTemplate
|
|
631
695
|
* @property {number} [__v]
|
|
632
696
|
* @property {string} [_id]
|
|
697
|
+
* @property {string} [application]
|
|
698
|
+
* @property {string} [category]
|
|
633
699
|
* @property {string} [created_at]
|
|
634
700
|
* @property {string} [description]
|
|
635
701
|
* @property {boolean} [is_internal]
|
|
636
702
|
* @property {boolean} [is_system]
|
|
637
703
|
* @property {SmsTemplateMessage} [message]
|
|
704
|
+
* @property {metaObj} [meta]
|
|
638
705
|
* @property {string} [name]
|
|
639
706
|
* @property {string} [priority]
|
|
640
707
|
* @property {boolean} [published]
|
|
641
708
|
* @property {string} [slug]
|
|
642
|
-
* @property {
|
|
709
|
+
* @property {string[]} [tags]
|
|
710
|
+
* @property {string} [template_id]
|
|
643
711
|
* @property {Object} [template_variables]
|
|
644
712
|
* @property {string} [updated_at]
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
/**
|
|
648
|
-
* @typedef SmsTemplateDeleteFailureRes
|
|
649
|
-
* @property {string} [message]
|
|
650
|
-
* @property {boolean} [success]
|
|
651
|
-
*/
|
|
652
|
-
|
|
653
|
-
/**
|
|
654
|
-
* @typedef SmsTemplateDeleteSuccessRes
|
|
655
|
-
* @property {string} [message]
|
|
656
|
-
* @property {boolean} [success]
|
|
713
|
+
* @property {EnabledObj} [url_shorten]
|
|
657
714
|
*/
|
|
658
715
|
|
|
659
716
|
/**
|
|
@@ -664,30 +721,14 @@ const Joi = require("joi");
|
|
|
664
721
|
|
|
665
722
|
/**
|
|
666
723
|
* @typedef SmsTemplateReq
|
|
667
|
-
* @property {Object[]} [attachments]
|
|
668
|
-
* @property {string} [description]
|
|
669
|
-
* @property {SmsTemplateMessage} [message]
|
|
670
|
-
* @property {string} [name]
|
|
671
|
-
* @property {string} [priority]
|
|
672
|
-
* @property {Object} [template_variables]
|
|
673
|
-
*/
|
|
674
|
-
|
|
675
|
-
/**
|
|
676
|
-
* @typedef SmsTemplateRes
|
|
677
|
-
* @property {number} [__v]
|
|
678
|
-
* @property {string} [_id]
|
|
679
|
-
* @property {string} [created_at]
|
|
680
724
|
* @property {string} [description]
|
|
681
|
-
* @property {boolean} [is_internal]
|
|
682
|
-
* @property {boolean} [is_system]
|
|
683
725
|
* @property {SmsTemplateMessage} [message]
|
|
684
|
-
* @property {
|
|
726
|
+
* @property {metaObj} [meta]
|
|
727
|
+
* @property {string} name
|
|
685
728
|
* @property {string} [priority]
|
|
686
729
|
* @property {boolean} [published]
|
|
687
|
-
* @property {string} [
|
|
688
|
-
* @property {Object[]} [tags]
|
|
730
|
+
* @property {string} [template_id]
|
|
689
731
|
* @property {Object} [template_variables]
|
|
690
|
-
* @property {string} [updated_at]
|
|
691
732
|
*/
|
|
692
733
|
|
|
693
734
|
/**
|
|
@@ -732,11 +773,11 @@ const Joi = require("joi");
|
|
|
732
773
|
* @typedef SystemEmailTemplate
|
|
733
774
|
* @property {number} [__v]
|
|
734
775
|
* @property {string} [_id]
|
|
735
|
-
* @property {
|
|
776
|
+
* @property {number[]} [attachments]
|
|
777
|
+
* @property {string} [category]
|
|
736
778
|
* @property {string} [created_at]
|
|
737
779
|
* @property {string} [description]
|
|
738
|
-
* @property {
|
|
739
|
-
* @property {Object[]} [headers]
|
|
780
|
+
* @property {EmailTemplateHeaders[]} [headers]
|
|
740
781
|
* @property {TemplateAndType} [html]
|
|
741
782
|
* @property {boolean} [is_internal]
|
|
742
783
|
* @property {boolean} [is_system]
|
|
@@ -744,19 +785,20 @@ const Joi = require("joi");
|
|
|
744
785
|
* @property {string} [priority]
|
|
745
786
|
* @property {boolean} [published]
|
|
746
787
|
* @property {string} [slug]
|
|
747
|
-
* @property {
|
|
748
|
-
* @property {
|
|
749
|
-
* @property {
|
|
788
|
+
* @property {string[]} [static_bcc]
|
|
789
|
+
* @property {string[]} [static_cc]
|
|
790
|
+
* @property {string[]} [static_to]
|
|
750
791
|
* @property {TemplateAndType} [subject]
|
|
751
|
-
* @property {
|
|
792
|
+
* @property {string[]} [tags]
|
|
793
|
+
* @property {Object} [template_variables]
|
|
752
794
|
* @property {TemplateAndType} [text]
|
|
753
795
|
* @property {string} [updated_at]
|
|
796
|
+
* @property {EnabledObj} [url_shorten]
|
|
754
797
|
*/
|
|
755
798
|
|
|
756
799
|
/**
|
|
757
800
|
* @typedef SystemEmailTemplates
|
|
758
801
|
* @property {SystemEmailTemplate[]} [items]
|
|
759
|
-
* @property {Page} [page]
|
|
760
802
|
*/
|
|
761
803
|
|
|
762
804
|
/**
|
|
@@ -776,22 +818,6 @@ const Joi = require("joi");
|
|
|
776
818
|
* @property {Page} [page]
|
|
777
819
|
*/
|
|
778
820
|
|
|
779
|
-
/**
|
|
780
|
-
* @typedef SystemNotificationSettings
|
|
781
|
-
* @property {string} [priority]
|
|
782
|
-
* @property {boolean} [sound]
|
|
783
|
-
* @property {string} [time_to_live]
|
|
784
|
-
*/
|
|
785
|
-
|
|
786
|
-
/**
|
|
787
|
-
* @typedef SystemNotificationsPage
|
|
788
|
-
* @property {number} [current]
|
|
789
|
-
* @property {boolean} [has_next]
|
|
790
|
-
* @property {number} [item_total]
|
|
791
|
-
* @property {number} [size]
|
|
792
|
-
* @property {string} [type]
|
|
793
|
-
*/
|
|
794
|
-
|
|
795
821
|
/**
|
|
796
822
|
* @typedef SystemNotificationUser
|
|
797
823
|
* @property {string} [type]
|
|
@@ -799,9 +825,10 @@ const Joi = require("joi");
|
|
|
799
825
|
*/
|
|
800
826
|
|
|
801
827
|
/**
|
|
802
|
-
* @typedef
|
|
828
|
+
* @typedef SystemSmsTemplates
|
|
803
829
|
* @property {number} [__v]
|
|
804
830
|
* @property {string} [_id]
|
|
831
|
+
* @property {string} [category]
|
|
805
832
|
* @property {string} [created_at]
|
|
806
833
|
* @property {string} [description]
|
|
807
834
|
* @property {boolean} [is_internal]
|
|
@@ -811,15 +838,11 @@ const Joi = require("joi");
|
|
|
811
838
|
* @property {string} [priority]
|
|
812
839
|
* @property {boolean} [published]
|
|
813
840
|
* @property {string} [slug]
|
|
814
|
-
* @property {
|
|
841
|
+
* @property {string[]} [tags]
|
|
842
|
+
* @property {string} [template_id]
|
|
815
843
|
* @property {Object} [template_variables]
|
|
816
844
|
* @property {string} [updated_at]
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
/**
|
|
820
|
-
* @typedef SystemSmsTemplates
|
|
821
|
-
* @property {SystemSmsTemplate[]} [items]
|
|
822
|
-
* @property {Page} [page]
|
|
845
|
+
* @property {EnabledObj} [url_shorten]
|
|
823
846
|
*/
|
|
824
847
|
|
|
825
848
|
/**
|
|
@@ -859,6 +882,53 @@ const Joi = require("joi");
|
|
|
859
882
|
*/
|
|
860
883
|
|
|
861
884
|
class CommunicationPlatformModel {
|
|
885
|
+
/** @returns {AppProvider} */
|
|
886
|
+
static AppProvider() {
|
|
887
|
+
return Joi.object({
|
|
888
|
+
__v: Joi.number(),
|
|
889
|
+
_id: Joi.string().allow(""),
|
|
890
|
+
application: Joi.string().allow(""),
|
|
891
|
+
created_at: Joi.string().allow(""),
|
|
892
|
+
email: CommunicationPlatformModel.AppProviderRes(),
|
|
893
|
+
sms: CommunicationPlatformModel.AppProviderRes(),
|
|
894
|
+
updated_at: Joi.string().allow(""),
|
|
895
|
+
voice: CommunicationPlatformModel.AppProviderResVoice(),
|
|
896
|
+
});
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
/** @returns {AppProviderReq} */
|
|
900
|
+
static AppProviderReq() {
|
|
901
|
+
return Joi.object({
|
|
902
|
+
email: CommunicationPlatformModel.AppProviderRes(),
|
|
903
|
+
sms: CommunicationPlatformModel.AppProviderRes(),
|
|
904
|
+
voice: CommunicationPlatformModel.AppProviderResVoice(),
|
|
905
|
+
});
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
/** @returns {AppProviderRes} */
|
|
909
|
+
static AppProviderRes() {
|
|
910
|
+
return Joi.object({
|
|
911
|
+
otp: CommunicationPlatformModel.AppProviderResObj(),
|
|
912
|
+
promotional: CommunicationPlatformModel.AppProviderResObj(),
|
|
913
|
+
transaction: CommunicationPlatformModel.AppProviderResObj(),
|
|
914
|
+
});
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
/** @returns {AppProviderResObj} */
|
|
918
|
+
static AppProviderResObj() {
|
|
919
|
+
return Joi.object({
|
|
920
|
+
provider: Joi.string().allow(""),
|
|
921
|
+
});
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
/** @returns {AppProviderResVoice} */
|
|
925
|
+
static AppProviderResVoice() {
|
|
926
|
+
return Joi.object({
|
|
927
|
+
otp: CommunicationPlatformModel.AppProviderResObj(),
|
|
928
|
+
transaction: CommunicationPlatformModel.AppProviderResObj(),
|
|
929
|
+
});
|
|
930
|
+
}
|
|
931
|
+
|
|
862
932
|
/** @returns {Audience} */
|
|
863
933
|
static Audience() {
|
|
864
934
|
return Joi.object({
|
|
@@ -882,11 +952,9 @@ class CommunicationPlatformModel {
|
|
|
882
952
|
/** @returns {AudienceReq} */
|
|
883
953
|
static AudienceReq() {
|
|
884
954
|
return Joi.object({
|
|
885
|
-
application: Joi.string().allow(""),
|
|
886
955
|
description: Joi.string().allow(""),
|
|
887
956
|
file_url: Joi.string().allow(""),
|
|
888
957
|
headers: Joi.array().items(Joi.string().allow("")),
|
|
889
|
-
is_active: Joi.boolean(),
|
|
890
958
|
name: Joi.string().allow(""),
|
|
891
959
|
records_count: Joi.number(),
|
|
892
960
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
@@ -910,31 +978,6 @@ class CommunicationPlatformModel {
|
|
|
910
978
|
});
|
|
911
979
|
}
|
|
912
980
|
|
|
913
|
-
/** @returns {BigqueryHeadersReq} */
|
|
914
|
-
static BigqueryHeadersReq() {
|
|
915
|
-
return Joi.object({
|
|
916
|
-
query: Joi.string().allow(""),
|
|
917
|
-
type: Joi.string().allow(""),
|
|
918
|
-
});
|
|
919
|
-
}
|
|
920
|
-
|
|
921
|
-
/** @returns {BigqueryHeadersRes} */
|
|
922
|
-
static BigqueryHeadersRes() {
|
|
923
|
-
return Joi.object({
|
|
924
|
-
headers: Joi.array().items(
|
|
925
|
-
CommunicationPlatformModel.BigqueryHeadersResHeaders()
|
|
926
|
-
),
|
|
927
|
-
});
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
/** @returns {BigqueryHeadersResHeaders} */
|
|
931
|
-
static BigqueryHeadersResHeaders() {
|
|
932
|
-
return Joi.object({
|
|
933
|
-
name: Joi.string().allow(""),
|
|
934
|
-
type: Joi.string().allow(""),
|
|
935
|
-
});
|
|
936
|
-
}
|
|
937
|
-
|
|
938
981
|
/** @returns {Campaign} */
|
|
939
982
|
static Campaign() {
|
|
940
983
|
return Joi.object({
|
|
@@ -1003,6 +1046,38 @@ class CommunicationPlatformModel {
|
|
|
1003
1046
|
});
|
|
1004
1047
|
}
|
|
1005
1048
|
|
|
1049
|
+
/** @returns {DefaultSmsProviders} */
|
|
1050
|
+
static DefaultSmsProviders() {
|
|
1051
|
+
return Joi.object({
|
|
1052
|
+
_id: Joi.string().allow(""),
|
|
1053
|
+
is_default: Joi.boolean(),
|
|
1054
|
+
name: Joi.string().allow(""),
|
|
1055
|
+
});
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
/** @returns {DummyDatasources} */
|
|
1059
|
+
static DummyDatasources() {
|
|
1060
|
+
return Joi.object({
|
|
1061
|
+
id: Joi.number(),
|
|
1062
|
+
name: Joi.string().allow(""),
|
|
1063
|
+
});
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
/** @returns {DummyDatasourcesMeta} */
|
|
1067
|
+
static DummyDatasourcesMeta() {
|
|
1068
|
+
return Joi.object({
|
|
1069
|
+
data: CommunicationPlatformModel.DummyDatasourcesMetaObj(),
|
|
1070
|
+
id: Joi.number(),
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
/** @returns {DummyDatasourcesMetaObj} */
|
|
1075
|
+
static DummyDatasourcesMetaObj() {
|
|
1076
|
+
return Joi.object({
|
|
1077
|
+
b: Joi.number(),
|
|
1078
|
+
});
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1006
1081
|
/** @returns {EmailProvider} */
|
|
1007
1082
|
static EmailProvider() {
|
|
1008
1083
|
return Joi.object({
|
|
@@ -1059,41 +1134,34 @@ class CommunicationPlatformModel {
|
|
|
1059
1134
|
return Joi.object({
|
|
1060
1135
|
__v: Joi.number(),
|
|
1061
1136
|
_id: Joi.string().allow(""),
|
|
1062
|
-
|
|
1137
|
+
application: Joi.string().allow(""),
|
|
1138
|
+
attachments: Joi.array().items(Joi.number()),
|
|
1139
|
+
category: Joi.string().allow(""),
|
|
1063
1140
|
created_at: Joi.string().allow(""),
|
|
1064
1141
|
description: Joi.string().allow(""),
|
|
1142
|
+
editor_meta: Joi.string().allow(""),
|
|
1143
|
+
editor_type: Joi.string().allow(""),
|
|
1065
1144
|
from_name: Joi.string().allow(""),
|
|
1066
|
-
headers: Joi.array().items(
|
|
1145
|
+
headers: Joi.array().items(
|
|
1146
|
+
CommunicationPlatformModel.EmailTemplateHeaders()
|
|
1147
|
+
),
|
|
1067
1148
|
html: CommunicationPlatformModel.TemplateAndType(),
|
|
1068
1149
|
is_internal: Joi.boolean(),
|
|
1069
1150
|
is_system: Joi.boolean(),
|
|
1070
1151
|
name: Joi.string().allow(""),
|
|
1071
1152
|
priority: Joi.string().allow(""),
|
|
1072
1153
|
published: Joi.boolean(),
|
|
1154
|
+
reply_to: Joi.string().allow(""),
|
|
1073
1155
|
slug: Joi.string().allow(""),
|
|
1074
|
-
static_bcc: Joi.array().items(Joi.
|
|
1075
|
-
static_cc: Joi.array().items(Joi.
|
|
1076
|
-
static_to: Joi.array().items(Joi.
|
|
1156
|
+
static_bcc: Joi.array().items(Joi.string().allow("")),
|
|
1157
|
+
static_cc: Joi.array().items(Joi.string().allow("")),
|
|
1158
|
+
static_to: Joi.array().items(Joi.string().allow("")),
|
|
1077
1159
|
subject: CommunicationPlatformModel.TemplateAndType(),
|
|
1078
|
-
tags: Joi.array().items(Joi.
|
|
1160
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
1161
|
+
template_variables: Joi.any(),
|
|
1079
1162
|
text: CommunicationPlatformModel.TemplateAndType(),
|
|
1080
1163
|
updated_at: Joi.string().allow(""),
|
|
1081
|
-
|
|
1082
|
-
}
|
|
1083
|
-
|
|
1084
|
-
/** @returns {EmailTemplateDeleteFailureRes} */
|
|
1085
|
-
static EmailTemplateDeleteFailureRes() {
|
|
1086
|
-
return Joi.object({
|
|
1087
|
-
message: Joi.string().allow(""),
|
|
1088
|
-
success: Joi.boolean(),
|
|
1089
|
-
});
|
|
1090
|
-
}
|
|
1091
|
-
|
|
1092
|
-
/** @returns {EmailTemplateDeleteSuccessRes} */
|
|
1093
|
-
static EmailTemplateDeleteSuccessRes() {
|
|
1094
|
-
return Joi.object({
|
|
1095
|
-
message: Joi.string().allow(""),
|
|
1096
|
-
success: Joi.boolean(),
|
|
1164
|
+
url_shorten: CommunicationPlatformModel.EnabledObj(),
|
|
1097
1165
|
});
|
|
1098
1166
|
}
|
|
1099
1167
|
|
|
@@ -1117,51 +1185,27 @@ class CommunicationPlatformModel {
|
|
|
1117
1185
|
/** @returns {EmailTemplateReq} */
|
|
1118
1186
|
static EmailTemplateReq() {
|
|
1119
1187
|
return Joi.object({
|
|
1120
|
-
attachments: Joi.array().items(Joi.
|
|
1121
|
-
description: Joi.string().allow(""),
|
|
1122
|
-
headers: Joi.array().items(
|
|
1123
|
-
CommunicationPlatformModel.EmailTemplateHeaders()
|
|
1124
|
-
),
|
|
1125
|
-
html: CommunicationPlatformModel.TemplateAndType(),
|
|
1126
|
-
keys: CommunicationPlatformModel.EmailTemplateKeys(),
|
|
1127
|
-
name: Joi.string().allow(""),
|
|
1128
|
-
priority: Joi.string().allow(""),
|
|
1129
|
-
reply_to: Joi.string().allow(""),
|
|
1130
|
-
static_bcc: Joi.array().items(Joi.string().allow("")),
|
|
1131
|
-
static_cc: Joi.array().items(Joi.string().allow("")),
|
|
1132
|
-
static_to: Joi.array().items(Joi.string().allow("")),
|
|
1133
|
-
subject: CommunicationPlatformModel.TemplateAndType(),
|
|
1134
|
-
text: CommunicationPlatformModel.TemplateAndType(),
|
|
1135
|
-
});
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
/** @returns {EmailTemplateRes} */
|
|
1139
|
-
static EmailTemplateRes() {
|
|
1140
|
-
return Joi.object({
|
|
1141
|
-
__v: Joi.number(),
|
|
1142
|
-
_id: Joi.string().allow(""),
|
|
1143
|
-
attachments: Joi.array().items(Joi.any()),
|
|
1144
|
-
created_at: Joi.string().allow(""),
|
|
1188
|
+
attachments: Joi.array().items(Joi.number()),
|
|
1145
1189
|
description: Joi.string().allow(""),
|
|
1190
|
+
editor_meta: Joi.string().allow(""),
|
|
1191
|
+
editor_type: Joi.string().allow(""),
|
|
1192
|
+
from_name: Joi.string().allow(""),
|
|
1146
1193
|
headers: Joi.array().items(
|
|
1147
1194
|
CommunicationPlatformModel.EmailTemplateHeaders()
|
|
1148
1195
|
),
|
|
1149
1196
|
html: CommunicationPlatformModel.TemplateAndType(),
|
|
1150
|
-
is_internal: Joi.boolean(),
|
|
1151
|
-
is_system: Joi.boolean(),
|
|
1152
1197
|
keys: CommunicationPlatformModel.EmailTemplateKeys(),
|
|
1153
|
-
name: Joi.string().allow(""),
|
|
1198
|
+
name: Joi.string().allow("").required(),
|
|
1154
1199
|
priority: Joi.string().allow(""),
|
|
1155
1200
|
published: Joi.boolean(),
|
|
1156
1201
|
reply_to: Joi.string().allow(""),
|
|
1157
|
-
slug: Joi.string().allow(""),
|
|
1158
1202
|
static_bcc: Joi.array().items(Joi.string().allow("")),
|
|
1159
1203
|
static_cc: Joi.array().items(Joi.string().allow("")),
|
|
1160
1204
|
static_to: Joi.array().items(Joi.string().allow("")),
|
|
1161
1205
|
subject: CommunicationPlatformModel.TemplateAndType(),
|
|
1162
|
-
tags: Joi.array().items(Joi.
|
|
1206
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
1207
|
+
template_variables: Joi.any(),
|
|
1163
1208
|
text: CommunicationPlatformModel.TemplateAndType(),
|
|
1164
|
-
updated_at: Joi.string().allow(""),
|
|
1165
1209
|
});
|
|
1166
1210
|
}
|
|
1167
1211
|
|
|
@@ -1173,6 +1217,13 @@ class CommunicationPlatformModel {
|
|
|
1173
1217
|
});
|
|
1174
1218
|
}
|
|
1175
1219
|
|
|
1220
|
+
/** @returns {EnabledObj} */
|
|
1221
|
+
static EnabledObj() {
|
|
1222
|
+
return Joi.object({
|
|
1223
|
+
enabled: Joi.boolean(),
|
|
1224
|
+
});
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1176
1227
|
/** @returns {EngineRequest} */
|
|
1177
1228
|
static EngineRequest() {
|
|
1178
1229
|
return Joi.object({
|
|
@@ -1235,6 +1286,24 @@ class CommunicationPlatformModel {
|
|
|
1235
1286
|
});
|
|
1236
1287
|
}
|
|
1237
1288
|
|
|
1289
|
+
/** @returns {GenericDelete} */
|
|
1290
|
+
static GenericDelete() {
|
|
1291
|
+
return Joi.object({
|
|
1292
|
+
acknowledged: Joi.boolean(),
|
|
1293
|
+
affected: Joi.number(),
|
|
1294
|
+
message: Joi.string().allow(""),
|
|
1295
|
+
operation: Joi.string().allow(""),
|
|
1296
|
+
});
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
/** @returns {GenericError} */
|
|
1300
|
+
static GenericError() {
|
|
1301
|
+
return Joi.object({
|
|
1302
|
+
message: CommunicationPlatformModel.Message(),
|
|
1303
|
+
sentry: Joi.string().allow(""),
|
|
1304
|
+
});
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1238
1307
|
/** @returns {GetNRecordsCsvReq} */
|
|
1239
1308
|
static GetNRecordsCsvReq() {
|
|
1240
1309
|
return Joi.object({
|
|
@@ -1271,6 +1340,55 @@ class CommunicationPlatformModel {
|
|
|
1271
1340
|
});
|
|
1272
1341
|
}
|
|
1273
1342
|
|
|
1343
|
+
/** @returns {GlobalProviders} */
|
|
1344
|
+
static GlobalProviders() {
|
|
1345
|
+
return Joi.object({
|
|
1346
|
+
email: Joi.array().items(
|
|
1347
|
+
CommunicationPlatformModel.GlobalProvidersResObj()
|
|
1348
|
+
),
|
|
1349
|
+
sms: Joi.array().items(
|
|
1350
|
+
CommunicationPlatformModel.GlobalProvidersResObj()
|
|
1351
|
+
),
|
|
1352
|
+
voice: Joi.array().items(
|
|
1353
|
+
CommunicationPlatformModel.GlobalProvidersResObj()
|
|
1354
|
+
),
|
|
1355
|
+
});
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
/** @returns {GlobalProvidersResObj} */
|
|
1359
|
+
static GlobalProvidersResObj() {
|
|
1360
|
+
return Joi.object({
|
|
1361
|
+
_id: Joi.string().allow(""),
|
|
1362
|
+
name: Joi.string().allow(""),
|
|
1363
|
+
});
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
/** @returns {GlobalVariablesGetResponse} */
|
|
1367
|
+
static GlobalVariablesGetResponse() {
|
|
1368
|
+
return Joi.object({
|
|
1369
|
+
editable: Joi.any(),
|
|
1370
|
+
read_only: Joi.any(),
|
|
1371
|
+
});
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
/** @returns {GlobalVariablesPostResponse} */
|
|
1375
|
+
static GlobalVariablesPostResponse() {
|
|
1376
|
+
return Joi.object({
|
|
1377
|
+
_id: Joi.string().allow(""),
|
|
1378
|
+
application: Joi.string().allow(""),
|
|
1379
|
+
category: Joi.string().allow(""),
|
|
1380
|
+
created_at: Joi.string().allow(""),
|
|
1381
|
+
global_variables: Joi.any(),
|
|
1382
|
+
});
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
/** @returns {GlobalVariablesReq} */
|
|
1386
|
+
static GlobalVariablesReq() {
|
|
1387
|
+
return Joi.object({
|
|
1388
|
+
global_variables: Joi.any(),
|
|
1389
|
+
});
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1274
1392
|
/** @returns {Job} */
|
|
1275
1393
|
static Job() {
|
|
1276
1394
|
return Joi.object({
|
|
@@ -1320,7 +1438,6 @@ class CommunicationPlatformModel {
|
|
|
1320
1438
|
return Joi.object({
|
|
1321
1439
|
_id: Joi.string().allow(""),
|
|
1322
1440
|
application: Joi.string().allow(""),
|
|
1323
|
-
channel_type: Joi.string().allow(""),
|
|
1324
1441
|
created_at: Joi.string().allow(""),
|
|
1325
1442
|
data: Joi.any(),
|
|
1326
1443
|
email: CommunicationPlatformModel.LogEmail(),
|
|
@@ -1328,7 +1445,6 @@ class CommunicationPlatformModel {
|
|
|
1328
1445
|
meta: CommunicationPlatformModel.LogMeta(),
|
|
1329
1446
|
pushnotification: CommunicationPlatformModel.LogPushnotification(),
|
|
1330
1447
|
service: Joi.string().allow(""),
|
|
1331
|
-
source: Joi.string().allow(""),
|
|
1332
1448
|
status: Joi.string().allow(""),
|
|
1333
1449
|
step: Joi.string().allow(""),
|
|
1334
1450
|
});
|
|
@@ -1368,6 +1484,25 @@ class CommunicationPlatformModel {
|
|
|
1368
1484
|
});
|
|
1369
1485
|
}
|
|
1370
1486
|
|
|
1487
|
+
/** @returns {Message} */
|
|
1488
|
+
static Message() {
|
|
1489
|
+
return Joi.object({
|
|
1490
|
+
info: Joi.string().allow(""),
|
|
1491
|
+
message: Joi.string().allow(""),
|
|
1492
|
+
operation: Joi.string().allow(""),
|
|
1493
|
+
success: Joi.boolean(),
|
|
1494
|
+
});
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
/** @returns {metaObj} */
|
|
1498
|
+
static metaObj() {
|
|
1499
|
+
return Joi.object({
|
|
1500
|
+
is_system: Joi.boolean(),
|
|
1501
|
+
template: Joi.string().allow(""),
|
|
1502
|
+
type: Joi.string().allow(""),
|
|
1503
|
+
});
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1371
1506
|
/** @returns {MetaStructure} */
|
|
1372
1507
|
static MetaStructure() {
|
|
1373
1508
|
return Joi.object({
|
|
@@ -1466,33 +1601,6 @@ class CommunicationPlatformModel {
|
|
|
1466
1601
|
});
|
|
1467
1602
|
}
|
|
1468
1603
|
|
|
1469
|
-
/** @returns {PushtokenReq} */
|
|
1470
|
-
static PushtokenReq() {
|
|
1471
|
-
return Joi.object({
|
|
1472
|
-
action: Joi.string().allow(""),
|
|
1473
|
-
bundle_identifier: Joi.string().allow(""),
|
|
1474
|
-
push_token: Joi.string().allow(""),
|
|
1475
|
-
unique_device_id: Joi.string().allow(""),
|
|
1476
|
-
});
|
|
1477
|
-
}
|
|
1478
|
-
|
|
1479
|
-
/** @returns {PushtokenRes} */
|
|
1480
|
-
static PushtokenRes() {
|
|
1481
|
-
return Joi.object({
|
|
1482
|
-
_id: Joi.string().allow(""),
|
|
1483
|
-
application_id: Joi.string().allow(""),
|
|
1484
|
-
bundle_identifier: Joi.string().allow(""),
|
|
1485
|
-
created_at: Joi.string().allow(""),
|
|
1486
|
-
expired_at: Joi.string().allow(""),
|
|
1487
|
-
platform: Joi.string().allow(""),
|
|
1488
|
-
push_token: Joi.string().allow(""),
|
|
1489
|
-
type: Joi.string().allow(""),
|
|
1490
|
-
unique_device_id: Joi.string().allow(""),
|
|
1491
|
-
updated_at: Joi.string().allow(""),
|
|
1492
|
-
user_id: Joi.string().allow(""),
|
|
1493
|
-
});
|
|
1494
|
-
}
|
|
1495
|
-
|
|
1496
1604
|
/** @returns {RecipientHeaders} */
|
|
1497
1605
|
static RecipientHeaders() {
|
|
1498
1606
|
return Joi.object({
|
|
@@ -1524,7 +1632,6 @@ class CommunicationPlatformModel {
|
|
|
1524
1632
|
return Joi.object({
|
|
1525
1633
|
expiry: Joi.number(),
|
|
1526
1634
|
otp_length: Joi.number(),
|
|
1527
|
-
provider: CommunicationPlatformModel.SendOtpEmailCommsProvider(),
|
|
1528
1635
|
template: CommunicationPlatformModel.SendOtpEmailCommsTemplate(),
|
|
1529
1636
|
});
|
|
1530
1637
|
}
|
|
@@ -1570,14 +1677,6 @@ class CommunicationPlatformModel {
|
|
|
1570
1677
|
});
|
|
1571
1678
|
}
|
|
1572
1679
|
|
|
1573
|
-
/** @returns {SendOtpEmailCommsProvider} */
|
|
1574
|
-
static SendOtpEmailCommsProvider() {
|
|
1575
|
-
return Joi.object({
|
|
1576
|
-
_id: Joi.string().allow(""),
|
|
1577
|
-
slug: Joi.string().allow(""),
|
|
1578
|
-
});
|
|
1579
|
-
}
|
|
1580
|
-
|
|
1581
1680
|
/** @returns {SendOtpEmailCommsTemplate} */
|
|
1582
1681
|
static SendOtpEmailCommsTemplate() {
|
|
1583
1682
|
return Joi.object({
|
|
@@ -1625,13 +1724,25 @@ class CommunicationPlatformModel {
|
|
|
1625
1724
|
/** @returns {SmsProviderReq} */
|
|
1626
1725
|
static SmsProviderReq() {
|
|
1627
1726
|
return Joi.object({
|
|
1727
|
+
api_key: Joi.string().allow(""),
|
|
1728
|
+
apikey: Joi.string().allow(""),
|
|
1628
1729
|
authkey: Joi.string().allow(""),
|
|
1629
1730
|
description: Joi.string().allow(""),
|
|
1731
|
+
entity_id: Joi.string().allow(""),
|
|
1732
|
+
entityid: Joi.string().allow(""),
|
|
1733
|
+
feedid: Joi.string().allow(""),
|
|
1734
|
+
host: Joi.string().allow(""),
|
|
1630
1735
|
name: Joi.string().allow(""),
|
|
1736
|
+
override_dnd: Joi.boolean(),
|
|
1737
|
+
password: Joi.string().allow(""),
|
|
1738
|
+
port: Joi.number(),
|
|
1631
1739
|
provider: Joi.string().allow(""),
|
|
1632
1740
|
sender: Joi.string().allow(""),
|
|
1741
|
+
sender_id: Joi.string().allow(""),
|
|
1742
|
+
senderid: Joi.string().allow(""),
|
|
1633
1743
|
type: Joi.string().allow(""),
|
|
1634
1744
|
username: Joi.string().allow(""),
|
|
1745
|
+
version_id: Joi.number(),
|
|
1635
1746
|
});
|
|
1636
1747
|
}
|
|
1637
1748
|
|
|
@@ -1648,34 +1759,23 @@ class CommunicationPlatformModel {
|
|
|
1648
1759
|
return Joi.object({
|
|
1649
1760
|
__v: Joi.number(),
|
|
1650
1761
|
_id: Joi.string().allow(""),
|
|
1762
|
+
application: Joi.string().allow(""),
|
|
1763
|
+
category: Joi.string().allow(""),
|
|
1651
1764
|
created_at: Joi.string().allow(""),
|
|
1652
1765
|
description: Joi.string().allow(""),
|
|
1653
1766
|
is_internal: Joi.boolean(),
|
|
1654
1767
|
is_system: Joi.boolean(),
|
|
1655
1768
|
message: CommunicationPlatformModel.SmsTemplateMessage(),
|
|
1769
|
+
meta: CommunicationPlatformModel.metaObj(),
|
|
1656
1770
|
name: Joi.string().allow(""),
|
|
1657
1771
|
priority: Joi.string().allow(""),
|
|
1658
1772
|
published: Joi.boolean(),
|
|
1659
1773
|
slug: Joi.string().allow(""),
|
|
1660
|
-
tags: Joi.array().items(Joi.
|
|
1774
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
1775
|
+
template_id: Joi.string().allow(""),
|
|
1661
1776
|
template_variables: Joi.any(),
|
|
1662
1777
|
updated_at: Joi.string().allow(""),
|
|
1663
|
-
|
|
1664
|
-
}
|
|
1665
|
-
|
|
1666
|
-
/** @returns {SmsTemplateDeleteFailureRes} */
|
|
1667
|
-
static SmsTemplateDeleteFailureRes() {
|
|
1668
|
-
return Joi.object({
|
|
1669
|
-
message: Joi.string().allow(""),
|
|
1670
|
-
success: Joi.boolean(),
|
|
1671
|
-
});
|
|
1672
|
-
}
|
|
1673
|
-
|
|
1674
|
-
/** @returns {SmsTemplateDeleteSuccessRes} */
|
|
1675
|
-
static SmsTemplateDeleteSuccessRes() {
|
|
1676
|
-
return Joi.object({
|
|
1677
|
-
message: Joi.string().allow(""),
|
|
1678
|
-
success: Joi.boolean(),
|
|
1778
|
+
url_shorten: CommunicationPlatformModel.EnabledObj(),
|
|
1679
1779
|
});
|
|
1680
1780
|
}
|
|
1681
1781
|
|
|
@@ -1690,32 +1790,14 @@ class CommunicationPlatformModel {
|
|
|
1690
1790
|
/** @returns {SmsTemplateReq} */
|
|
1691
1791
|
static SmsTemplateReq() {
|
|
1692
1792
|
return Joi.object({
|
|
1693
|
-
attachments: Joi.array().items(Joi.any()),
|
|
1694
|
-
description: Joi.string().allow(""),
|
|
1695
|
-
message: CommunicationPlatformModel.SmsTemplateMessage(),
|
|
1696
|
-
name: Joi.string().allow(""),
|
|
1697
|
-
priority: Joi.string().allow(""),
|
|
1698
|
-
template_variables: Joi.any(),
|
|
1699
|
-
});
|
|
1700
|
-
}
|
|
1701
|
-
|
|
1702
|
-
/** @returns {SmsTemplateRes} */
|
|
1703
|
-
static SmsTemplateRes() {
|
|
1704
|
-
return Joi.object({
|
|
1705
|
-
__v: Joi.number(),
|
|
1706
|
-
_id: Joi.string().allow(""),
|
|
1707
|
-
created_at: Joi.string().allow(""),
|
|
1708
1793
|
description: Joi.string().allow(""),
|
|
1709
|
-
is_internal: Joi.boolean(),
|
|
1710
|
-
is_system: Joi.boolean(),
|
|
1711
1794
|
message: CommunicationPlatformModel.SmsTemplateMessage(),
|
|
1712
|
-
|
|
1795
|
+
meta: CommunicationPlatformModel.metaObj(),
|
|
1796
|
+
name: Joi.string().allow("").required(),
|
|
1713
1797
|
priority: Joi.string().allow(""),
|
|
1714
1798
|
published: Joi.boolean(),
|
|
1715
|
-
|
|
1716
|
-
tags: Joi.array().items(Joi.any()),
|
|
1799
|
+
template_id: Joi.string().allow(""),
|
|
1717
1800
|
template_variables: Joi.any(),
|
|
1718
|
-
updated_at: Joi.string().allow(""),
|
|
1719
1801
|
});
|
|
1720
1802
|
}
|
|
1721
1803
|
|
|
@@ -1774,11 +1856,13 @@ class CommunicationPlatformModel {
|
|
|
1774
1856
|
return Joi.object({
|
|
1775
1857
|
__v: Joi.number(),
|
|
1776
1858
|
_id: Joi.string().allow(""),
|
|
1777
|
-
attachments: Joi.array().items(Joi.
|
|
1859
|
+
attachments: Joi.array().items(Joi.number()),
|
|
1860
|
+
category: Joi.string().allow(""),
|
|
1778
1861
|
created_at: Joi.string().allow(""),
|
|
1779
1862
|
description: Joi.string().allow(""),
|
|
1780
|
-
|
|
1781
|
-
|
|
1863
|
+
headers: Joi.array().items(
|
|
1864
|
+
CommunicationPlatformModel.EmailTemplateHeaders()
|
|
1865
|
+
),
|
|
1782
1866
|
html: CommunicationPlatformModel.TemplateAndType(),
|
|
1783
1867
|
is_internal: Joi.boolean(),
|
|
1784
1868
|
is_system: Joi.boolean(),
|
|
@@ -1786,13 +1870,15 @@ class CommunicationPlatformModel {
|
|
|
1786
1870
|
priority: Joi.string().allow(""),
|
|
1787
1871
|
published: Joi.boolean(),
|
|
1788
1872
|
slug: Joi.string().allow(""),
|
|
1789
|
-
static_bcc: Joi.array().items(Joi.
|
|
1790
|
-
static_cc: Joi.array().items(Joi.
|
|
1791
|
-
static_to: Joi.array().items(Joi.
|
|
1873
|
+
static_bcc: Joi.array().items(Joi.string().allow("")),
|
|
1874
|
+
static_cc: Joi.array().items(Joi.string().allow("")),
|
|
1875
|
+
static_to: Joi.array().items(Joi.string().allow("")),
|
|
1792
1876
|
subject: CommunicationPlatformModel.TemplateAndType(),
|
|
1793
|
-
tags: Joi.array().items(Joi.
|
|
1877
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
1878
|
+
template_variables: Joi.any(),
|
|
1794
1879
|
text: CommunicationPlatformModel.TemplateAndType(),
|
|
1795
1880
|
updated_at: Joi.string().allow(""),
|
|
1881
|
+
url_shorten: CommunicationPlatformModel.EnabledObj(),
|
|
1796
1882
|
});
|
|
1797
1883
|
}
|
|
1798
1884
|
|
|
@@ -1802,7 +1888,6 @@ class CommunicationPlatformModel {
|
|
|
1802
1888
|
items: Joi.array().items(
|
|
1803
1889
|
CommunicationPlatformModel.SystemEmailTemplate()
|
|
1804
1890
|
),
|
|
1805
|
-
page: CommunicationPlatformModel.Page(),
|
|
1806
1891
|
});
|
|
1807
1892
|
}
|
|
1808
1893
|
|
|
@@ -1827,26 +1912,6 @@ class CommunicationPlatformModel {
|
|
|
1827
1912
|
});
|
|
1828
1913
|
}
|
|
1829
1914
|
|
|
1830
|
-
/** @returns {SystemNotificationSettings} */
|
|
1831
|
-
static SystemNotificationSettings() {
|
|
1832
|
-
return Joi.object({
|
|
1833
|
-
priority: Joi.string().allow(""),
|
|
1834
|
-
sound: Joi.boolean(),
|
|
1835
|
-
time_to_live: Joi.string().allow(""),
|
|
1836
|
-
});
|
|
1837
|
-
}
|
|
1838
|
-
|
|
1839
|
-
/** @returns {SystemNotificationsPage} */
|
|
1840
|
-
static SystemNotificationsPage() {
|
|
1841
|
-
return Joi.object({
|
|
1842
|
-
current: Joi.number(),
|
|
1843
|
-
has_next: Joi.boolean(),
|
|
1844
|
-
item_total: Joi.number(),
|
|
1845
|
-
size: Joi.number(),
|
|
1846
|
-
type: Joi.string().allow(""),
|
|
1847
|
-
});
|
|
1848
|
-
}
|
|
1849
|
-
|
|
1850
1915
|
/** @returns {SystemNotificationUser} */
|
|
1851
1916
|
static SystemNotificationUser() {
|
|
1852
1917
|
return Joi.object({
|
|
@@ -1855,11 +1920,12 @@ class CommunicationPlatformModel {
|
|
|
1855
1920
|
});
|
|
1856
1921
|
}
|
|
1857
1922
|
|
|
1858
|
-
/** @returns {
|
|
1859
|
-
static
|
|
1923
|
+
/** @returns {SystemSmsTemplates} */
|
|
1924
|
+
static SystemSmsTemplates() {
|
|
1860
1925
|
return Joi.object({
|
|
1861
1926
|
__v: Joi.number(),
|
|
1862
1927
|
_id: Joi.string().allow(""),
|
|
1928
|
+
category: Joi.string().allow(""),
|
|
1863
1929
|
created_at: Joi.string().allow(""),
|
|
1864
1930
|
description: Joi.string().allow(""),
|
|
1865
1931
|
is_internal: Joi.boolean(),
|
|
@@ -1869,17 +1935,11 @@ class CommunicationPlatformModel {
|
|
|
1869
1935
|
priority: Joi.string().allow(""),
|
|
1870
1936
|
published: Joi.boolean(),
|
|
1871
1937
|
slug: Joi.string().allow(""),
|
|
1872
|
-
tags: Joi.array().items(Joi.
|
|
1938
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
1939
|
+
template_id: Joi.string().allow(""),
|
|
1873
1940
|
template_variables: Joi.any(),
|
|
1874
1941
|
updated_at: Joi.string().allow(""),
|
|
1875
|
-
|
|
1876
|
-
}
|
|
1877
|
-
|
|
1878
|
-
/** @returns {SystemSmsTemplates} */
|
|
1879
|
-
static SystemSmsTemplates() {
|
|
1880
|
-
return Joi.object({
|
|
1881
|
-
items: Joi.array().items(CommunicationPlatformModel.SystemSmsTemplate()),
|
|
1882
|
-
page: CommunicationPlatformModel.Page(),
|
|
1942
|
+
url_shorten: CommunicationPlatformModel.EnabledObj(),
|
|
1883
1943
|
});
|
|
1884
1944
|
}
|
|
1885
1945
|
|