@gofynd/fdk-client-javascript 1.6.4 → 3.0.0-beta.1
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 +1 -1
- package/package.json +1 -1
- package/sdk/application/ApplicationClient.d.ts +0 -2
- package/sdk/application/ApplicationClient.js +0 -2
- package/sdk/application/Cart/CartApplicationClient.d.ts +113 -93
- package/sdk/application/Cart/CartApplicationClient.js +270 -139
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
- package/sdk/application/Catalog/CatalogApplicationClient.js +122 -138
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +3 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +43 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +190 -3
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +71 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +103 -29
- package/sdk/application/Content/ContentApplicationClient.d.ts +51 -21
- package/sdk/application/Content/ContentApplicationClient.js +197 -36
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -6
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +3 -3
- package/sdk/application/Lead/LeadApplicationClient.d.ts +3 -3
- package/sdk/application/Lead/LeadApplicationClient.js +3 -3
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +79 -64
- package/sdk/application/Logistic/LogisticApplicationClient.js +246 -264
- package/sdk/application/Order/OrderApplicationClient.d.ts +44 -24
- package/sdk/application/Order/OrderApplicationClient.js +140 -21
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +211 -111
- package/sdk/application/Payment/PaymentApplicationClient.js +610 -109
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -13
- package/sdk/application/Rewards/RewardsApplicationClient.js +7 -7
- package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
- package/sdk/application/Share/ShareApplicationClient.js +14 -14
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +23 -3
- package/sdk/application/Theme/ThemeApplicationClient.js +103 -5
- package/sdk/application/User/UserApplicationClient.d.ts +13 -23
- package/sdk/application/User/UserApplicationClient.js +9 -57
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +3 -3
- package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +66 -0
- package/sdk/partner/Authorization/AuthorizationPartnerClient.js +431 -0
- package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +231 -0
- package/sdk/partner/Authorization/AuthorizationPartnerModel.js +152 -0
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +8 -0
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +39 -0
- package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +26 -0
- package/sdk/partner/Catalog/CatalogPartnerClient.js +173 -0
- package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +238 -0
- package/sdk/partner/Catalog/CatalogPartnerModel.js +248 -0
- package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +5 -0
- package/sdk/partner/Catalog/CatalogPartnerValidator.js +19 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -22
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +12 -87
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +33 -99
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +25 -84
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +0 -1
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -10
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +100 -49
- package/sdk/partner/Lead/LeadPartnerModel.js +100 -74
- package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +33 -160
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +66 -1180
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +288 -1685
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +226 -824
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +1 -13
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +14 -141
- package/sdk/partner/PartnerClient.d.ts +6 -0
- package/sdk/partner/PartnerClient.js +9 -0
- package/sdk/partner/Payment/PaymentPartnerClient.d.ts +116 -0
- package/sdk/partner/Payment/PaymentPartnerClient.js +857 -0
- package/sdk/partner/Payment/PaymentPartnerModel.d.ts +388 -0
- package/sdk/partner/Payment/PaymentPartnerModel.js +442 -0
- package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +14 -0
- package/sdk/partner/Payment/PaymentPartnerValidator.js +74 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +63 -21
- package/sdk/partner/Theme/ThemePartnerClient.js +396 -71
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +104 -72
- package/sdk/partner/Theme/ThemePartnerModel.js +101 -75
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +5 -1
- package/sdk/partner/Theme/ThemePartnerValidator.js +42 -12
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +191 -670
- package/sdk/partner/Webhook/WebhookPartnerModel.js +159 -268
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
- package/sdk/partner/index.d.ts +3 -0
- package/sdk/partner/index.js +6 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +1 -4
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +5 -0
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +145 -49
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +171 -20
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +406 -15
- package/sdk/platform/Billing/BillingPlatformClient.js +3214 -76
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +3798 -459
- package/sdk/platform/Billing/BillingPlatformModel.js +2577 -342
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +465 -24
- package/sdk/platform/Billing/BillingPlatformValidator.js +490 -14
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +284 -205
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +671 -553
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +165 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +108 -132
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3136 -4788
- package/sdk/platform/Cart/CartPlatformModel.js +2850 -2031
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1015 -419
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +6450 -2010
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1121 -230
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +919 -127
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +372 -574
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1238 -1317
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +8351 -9825
- package/sdk/platform/Catalog/CatalogPlatformModel.js +9662 -6881
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +288 -235
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +241 -183
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -6
- package/sdk/platform/Common/CommonPlatformClient.js +5 -6
- package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
- package/sdk/platform/Common/CommonPlatformModel.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +374 -234
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +875 -583
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +170 -139
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +145 -126
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +56 -3
- package/sdk/platform/Communication/CommunicationPlatformClient.js +307 -4
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +424 -252
- package/sdk/platform/Communication/CommunicationPlatformModel.js +540 -320
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +62 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +48 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +68 -99
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +84 -140
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +238 -256
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +222 -244
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +20 -20
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -20
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +333 -118
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1470 -409
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +158 -55
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +163 -41
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +151 -61
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +595 -101
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +1199 -462
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +1008 -321
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +80 -34
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +79 -24
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +253 -140
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1087 -458
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +221 -178
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +220 -157
- package/sdk/platform/Content/ContentPlatformClient.d.ts +124 -123
- package/sdk/platform/Content/ContentPlatformClient.js +459 -379
- package/sdk/platform/Content/ContentPlatformModel.d.ts +833 -1307
- package/sdk/platform/Content/ContentPlatformModel.js +893 -582
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +140 -150
- package/sdk/platform/Content/ContentPlatformValidator.js +131 -135
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +60 -36
- package/sdk/platform/Discount/DiscountPlatformClient.js +85 -36
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +46 -47
- package/sdk/platform/Discount/DiscountPlatformModel.js +42 -46
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +18 -15
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +24 -22
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +4 -4
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -4
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +75 -86
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +60 -74
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +2895 -0
- package/sdk/platform/Finance/FinancePlatformModel.js +2150 -0
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
- package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +17 -17
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +33 -33
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +19 -19
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +14 -14
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +4 -24
- package/sdk/platform/Lead/LeadPlatformClient.js +4 -160
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +142 -57
- package/sdk/platform/Lead/LeadPlatformModel.js +162 -79
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +3 -29
- package/sdk/platform/Lead/LeadPlatformValidator.js +2 -28
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +94 -25
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +600 -57
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +115 -115
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +120 -43
- package/sdk/platform/Order/OrderPlatformClient.d.ts +502 -293
- package/sdk/platform/Order/OrderPlatformClient.js +1466 -913
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4103 -9109
- package/sdk/platform/Order/OrderPlatformModel.js +3198 -4245
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +445 -612
- package/sdk/platform/Order/OrderPlatformValidator.js +316 -326
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
- package/sdk/platform/Partner/PartnerPlatformModel.js +7 -7
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +382 -135
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +2453 -935
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +306 -93
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +305 -70
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +66 -56
- package/sdk/platform/Payment/PaymentPlatformClient.js +269 -124
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3525 -1313
- package/sdk/platform/Payment/PaymentPlatformModel.js +3813 -1511
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +64 -35
- package/sdk/platform/Payment/PaymentPlatformValidator.js +60 -34
- package/sdk/platform/PlatformClient.d.ts +2 -0
- package/sdk/platform/PlatformClient.js +4 -0
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +14 -9
- package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +344 -56
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +2180 -302
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +380 -54
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +336 -37
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +127 -213
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +538 -1306
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +3429 -2979
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3642 -1785
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +218 -392
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +151 -290
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +4 -16
- package/sdk/platform/Share/SharePlatformApplicationClient.js +8 -86
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +6 -23
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +3 -16
- package/sdk/platform/Share/SharePlatformModel.d.ts +6 -50
- package/sdk/platform/Share/SharePlatformModel.js +3 -43
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +26 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +157 -10
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +21 -10
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +23 -6
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +18 -8
- package/sdk/platform/Theme/ThemePlatformClient.js +85 -8
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +425 -17
- package/sdk/platform/Theme/ThemePlatformModel.js +329 -23
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +7 -3
- package/sdk/platform/Theme/ThemePlatformValidator.js +9 -2
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +18 -71
- package/sdk/platform/User/UserPlatformApplicationClient.js +27 -412
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +10 -114
- package/sdk/platform/User/UserPlatformApplicationValidator.js +7 -80
- package/sdk/platform/User/UserPlatformModel.d.ts +216 -264
- package/sdk/platform/User/UserPlatformModel.js +209 -216
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
- package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +428 -810
- package/sdk/platform/Webhook/WebhookPlatformModel.js +395 -444
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
- package/sdk/platform/index.d.ts +1 -0
- package/sdk/platform/index.js +2 -0
- package/sdk/public/Billing/BillingPublicClient.d.ts +56 -0
- package/sdk/public/Billing/BillingPublicClient.js +397 -0
- package/sdk/public/Billing/BillingPublicModel.d.ts +919 -0
- package/sdk/public/Billing/BillingPublicModel.js +560 -0
- package/sdk/public/Billing/BillingPublicValidator.d.ts +43 -0
- package/sdk/public/Billing/BillingPublicValidator.js +50 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +14 -4
- package/sdk/public/Configuration/ConfigurationPublicClient.js +97 -9
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +102 -40
- package/sdk/public/Configuration/ConfigurationPublicModel.js +111 -29
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +11 -1
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +12 -0
- package/sdk/public/Content/ContentPublicClient.d.ts +22 -0
- package/sdk/public/Content/ContentPublicClient.js +183 -0
- package/sdk/public/Content/ContentPublicModel.d.ts +38 -1
- package/sdk/public/Content/ContentPublicModel.js +47 -1
- package/sdk/public/Content/ContentPublicValidator.d.ts +17 -1
- package/sdk/public/Content/ContentPublicValidator.js +19 -0
- package/sdk/public/PublicClient.d.ts +2 -2
- package/sdk/public/PublicClient.js +2 -2
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +8 -8
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +67 -215
- package/sdk/public/Webhook/WebhookPublicModel.js +61 -66
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +1 -1
- package/sdk/public/index.js +1 -1
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +0 -29
- package/sdk/application/Finance/FinanceApplicationClient.js +0 -126
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +0 -22
- package/sdk/public/Catalog/CatalogPublicClient.js +0 -138
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +0 -155
- package/sdk/public/Catalog/CatalogPublicModel.js +0 -116
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +0 -55
- package/sdk/public/Catalog/CatalogPublicValidator.js +0 -35
|
@@ -1,12 +1,156 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @typedef
|
|
4
|
+
* @typedef AppProvidersGlobalProviderRequestObjProvider
|
|
5
|
+
* @property {string} [provider]
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @typedef AppProvidersGlobalProviderRequestObj
|
|
10
|
+
* @property {AppProvidersGlobalProviderRequestObjProvider} [transaction]
|
|
11
|
+
* @property {AppProvidersGlobalProviderRequestObjProvider} [otp]
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @typedef AppProvidersGlobalProviderRequest
|
|
16
|
+
* @property {AppProvidersGlobalProviderRequestObj} [email]
|
|
17
|
+
* @property {AppProvidersGlobalProviderRequestObj} [sms]
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @typedef UpdateAppProvidersGlobalProviderResponseEmailSmsObj
|
|
22
|
+
* @property {string} [default_provider]
|
|
23
|
+
* @property {string} [otp_provider]
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @typedef UpdateAppProvidersGlobalProviderResponse
|
|
28
|
+
* @property {UpdateAppProvidersGlobalProviderResponseEmailSmsObj} [email]
|
|
29
|
+
* @property {UpdateAppProvidersGlobalProviderResponseEmailSmsObj} [sms]
|
|
30
|
+
* @property {string} [_id]
|
|
31
|
+
* @property {string} [slug]
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @typedef DefaultEmailProvidersFromAddresses
|
|
36
|
+
* @property {string} [name]
|
|
37
|
+
* @property {string} [email]
|
|
38
|
+
* @property {boolean} [is_default]
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @typedef DefaultEmailProviders
|
|
43
|
+
* @property {string} [_id]
|
|
44
|
+
* @property {DefaultEmailProvidersFromAddresses[]} [from_address]
|
|
45
|
+
* @property {string} [name]
|
|
46
|
+
* @property {boolean} [is_default]
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @typedef PushtokenReq
|
|
51
|
+
* @property {string} [action]
|
|
52
|
+
* @property {string} [bundle_identifier]
|
|
53
|
+
* @property {string} [push_token]
|
|
54
|
+
* @property {string} [unique_device_id]
|
|
55
|
+
* @property {string} [type]
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @typedef PushtokenRes
|
|
60
|
+
* @property {string} [_id]
|
|
61
|
+
* @property {string} [bundle_identifier]
|
|
62
|
+
* @property {string} [push_token]
|
|
63
|
+
* @property {string} [unique_device_id]
|
|
64
|
+
* @property {string} [type]
|
|
65
|
+
* @property {string} [platform]
|
|
66
|
+
* @property {string} [application_id]
|
|
67
|
+
* @property {string} [user_id]
|
|
68
|
+
* @property {string} [created_at]
|
|
69
|
+
* @property {string} [updated_at]
|
|
70
|
+
* @property {string} [expired_at]
|
|
71
|
+
*/
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @typedef SendInstantResponse
|
|
75
|
+
* @property {boolean} [success]
|
|
76
|
+
* @property {string} [provider]
|
|
77
|
+
* @property {boolean} [response]
|
|
78
|
+
*/
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* @typedef MetaStructure
|
|
82
|
+
* @property {string} [job_type]
|
|
83
|
+
* @property {string} [action]
|
|
84
|
+
* @property {string} [trace]
|
|
85
|
+
* @property {string} [timestamp]
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @typedef PayloadSmsTemplateStructure
|
|
90
|
+
* @property {string} [key]
|
|
91
|
+
* @property {Object} [value]
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* @typedef PayloadSmsProviderStructure
|
|
96
|
+
* @property {string} [slug]
|
|
97
|
+
*/
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @typedef PayloadEmailTemplateStructure
|
|
101
|
+
* @property {string} [key]
|
|
102
|
+
* @property {Object} [value]
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @typedef PayloadEmailProviderStructure
|
|
107
|
+
* @property {string} [slug]
|
|
108
|
+
*/
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* @typedef PayloadEmailStructure
|
|
112
|
+
* @property {PayloadEmailTemplateStructure} [template]
|
|
113
|
+
* @property {PayloadEmailProviderStructure} [provider]
|
|
114
|
+
*/
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @typedef PayloadSmsStructure
|
|
118
|
+
* @property {PayloadSmsTemplateStructure} [template]
|
|
119
|
+
* @property {PayloadSmsProviderStructure} [provider]
|
|
120
|
+
*/
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @typedef SendSyncData
|
|
124
|
+
* @property {string} [phone_number]
|
|
125
|
+
* @property {string} [country_code]
|
|
126
|
+
* @property {string} [to]
|
|
127
|
+
*/
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @typedef SendSyncRequest
|
|
131
|
+
* @property {SendSyncData[]} [data]
|
|
132
|
+
* @property {PayloadEmailStructure} [email]
|
|
133
|
+
* @property {PayloadSmsStructure} [sms]
|
|
134
|
+
*/
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @typedef EngineRequest
|
|
138
|
+
* @property {SendSyncRequest} [payload]
|
|
139
|
+
* @property {MetaStructure} [meta]
|
|
140
|
+
*/
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* @typedef EngineResponse
|
|
144
|
+
* @property {boolean} [success]
|
|
145
|
+
*/
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* @typedef EventSubscriptionsBulkUpdateRequest
|
|
5
149
|
* @property {SubscriptionsObject[]} [subscriptions]
|
|
6
150
|
*/
|
|
7
151
|
|
|
8
152
|
/**
|
|
9
|
-
* @typedef
|
|
153
|
+
* @typedef EventSubscriptionsBulkUpdateResponse
|
|
10
154
|
* @property {EventSubscriptionTemplate} [template]
|
|
11
155
|
* @property {string} [_id]
|
|
12
156
|
* @property {string} [application]
|
|
@@ -18,9 +162,18 @@ const Joi = require("joi");
|
|
|
18
162
|
* @property {number} [__v]
|
|
19
163
|
*/
|
|
20
164
|
|
|
165
|
+
/**
|
|
166
|
+
* @typedef SubscriptionsObjectRequest
|
|
167
|
+
* @property {string} [event]
|
|
168
|
+
* @property {string} [slug]
|
|
169
|
+
* @property {TemplateObject} [template]
|
|
170
|
+
*/
|
|
171
|
+
|
|
21
172
|
/**
|
|
22
173
|
* @typedef SubscriptionsObject
|
|
23
174
|
* @property {string} [_id] - Subscription ID
|
|
175
|
+
* @property {string} [event]
|
|
176
|
+
* @property {string} [slug]
|
|
24
177
|
* @property {TemplateObject} [template]
|
|
25
178
|
*/
|
|
26
179
|
|
|
@@ -126,6 +279,9 @@ const Joi = require("joi");
|
|
|
126
279
|
|
|
127
280
|
/**
|
|
128
281
|
* @typedef CampaignReq
|
|
282
|
+
* @property {RecipientHeaders} [recipient_headers]
|
|
283
|
+
* @property {CampaignEmail} [email]
|
|
284
|
+
* @property {string} [datasource]
|
|
129
285
|
* @property {string} [description]
|
|
130
286
|
* @property {string[]} [tags]
|
|
131
287
|
* @property {string[]} [headers]
|
|
@@ -166,7 +322,7 @@ const Joi = require("joi");
|
|
|
166
322
|
* @property {RecipientHeaders} [recipient_headers]
|
|
167
323
|
* @property {CampaignEmail} [email]
|
|
168
324
|
* @property {string} [description]
|
|
169
|
-
* @property {
|
|
325
|
+
* @property {string[]} [tags]
|
|
170
326
|
* @property {boolean} [is_active]
|
|
171
327
|
* @property {string} [_id]
|
|
172
328
|
* @property {string} [datasource]
|
|
@@ -185,17 +341,6 @@ const Joi = require("joi");
|
|
|
185
341
|
* @property {Page} [page]
|
|
186
342
|
*/
|
|
187
343
|
|
|
188
|
-
/**
|
|
189
|
-
* @typedef BadRequestSchema
|
|
190
|
-
* @property {string} [status] - Response status.
|
|
191
|
-
* @property {string} [message] - Failure message.
|
|
192
|
-
*/
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* @typedef NotFound
|
|
196
|
-
* @property {string} [message] - Failure message.
|
|
197
|
-
*/
|
|
198
|
-
|
|
199
344
|
/**
|
|
200
345
|
* @typedef AudienceReq
|
|
201
346
|
* @property {string} [name]
|
|
@@ -350,6 +495,13 @@ const Joi = require("joi");
|
|
|
350
495
|
* @property {string} [template]
|
|
351
496
|
*/
|
|
352
497
|
|
|
498
|
+
/**
|
|
499
|
+
* @typedef TemplateKeys
|
|
500
|
+
* @property {string} [to]
|
|
501
|
+
* @property {string} [cc]
|
|
502
|
+
* @property {string} [bcc]
|
|
503
|
+
*/
|
|
504
|
+
|
|
353
505
|
/**
|
|
354
506
|
* @typedef EmailTemplate
|
|
355
507
|
* @property {string} [application]
|
|
@@ -365,6 +517,7 @@ const Joi = require("joi");
|
|
|
365
517
|
* @property {string} [reply_to]
|
|
366
518
|
* @property {string[]} [tags]
|
|
367
519
|
* @property {TemplateAndType} [subject]
|
|
520
|
+
* @property {TemplateKeys} [keys]
|
|
368
521
|
* @property {TemplateAndType} [html]
|
|
369
522
|
* @property {EnabledObj} [url_shorten]
|
|
370
523
|
* @property {string} [priority]
|
|
@@ -416,87 +569,37 @@ const Joi = require("joi");
|
|
|
416
569
|
*/
|
|
417
570
|
|
|
418
571
|
/**
|
|
419
|
-
* @typedef
|
|
420
|
-
* @property {
|
|
421
|
-
*/
|
|
422
|
-
|
|
423
|
-
/**
|
|
424
|
-
* @typedef PayloadEmailTemplateStructure
|
|
425
|
-
* @property {string} [key]
|
|
426
|
-
* @property {Object} [value]
|
|
427
|
-
*/
|
|
428
|
-
|
|
429
|
-
/**
|
|
430
|
-
* @typedef PayloadEmailProviderStructure
|
|
431
|
-
* @property {string} [_id]
|
|
432
|
-
*/
|
|
433
|
-
|
|
434
|
-
/**
|
|
435
|
-
* @typedef PayloadEmailStructure
|
|
436
|
-
* @property {PayloadEmailTemplateStructure} [template]
|
|
437
|
-
* @property {PayloadEmailProviderStructure} [provider]
|
|
438
|
-
*/
|
|
439
|
-
|
|
440
|
-
/**
|
|
441
|
-
* @typedef PayloadSmsTemplateStructure
|
|
442
|
-
* @property {string} [key]
|
|
443
|
-
* @property {Object} [value]
|
|
444
|
-
*/
|
|
445
|
-
|
|
446
|
-
/**
|
|
447
|
-
* @typedef PayloadSmsProviderStructure
|
|
448
|
-
* @property {string} [_id]
|
|
449
|
-
*/
|
|
450
|
-
|
|
451
|
-
/**
|
|
452
|
-
* @typedef PayloadSmsStructure
|
|
453
|
-
* @property {PayloadSmsTemplateStructure} [template]
|
|
454
|
-
* @property {PayloadSmsProviderStructure} [provider]
|
|
455
|
-
*/
|
|
456
|
-
|
|
457
|
-
/**
|
|
458
|
-
* @typedef PayloadStructure
|
|
459
|
-
* @property {Object[]} [data]
|
|
460
|
-
* @property {PayloadEmailStructure} [email]
|
|
461
|
-
* @property {PayloadSmsStructure} [sms]
|
|
462
|
-
* @property {string} [application]
|
|
463
|
-
*/
|
|
464
|
-
|
|
465
|
-
/**
|
|
466
|
-
* @typedef MetaStructure
|
|
467
|
-
* @property {string} [job_type]
|
|
468
|
-
* @property {string} [action]
|
|
469
|
-
* @property {string} [trace]
|
|
470
|
-
* @property {string} [timestamp]
|
|
572
|
+
* @typedef SubscribedSmsTemplates
|
|
573
|
+
* @property {SmsTemplates[]} [items]
|
|
471
574
|
*/
|
|
472
575
|
|
|
473
576
|
/**
|
|
474
|
-
* @typedef
|
|
475
|
-
* @property {
|
|
476
|
-
* @property {MetaStructure} [meta]
|
|
577
|
+
* @typedef SubscribedEmailTemplates
|
|
578
|
+
* @property {EmailTemplate[]} [items]
|
|
477
579
|
*/
|
|
478
580
|
|
|
479
581
|
/**
|
|
480
|
-
* @typedef
|
|
481
|
-
* @property {boolean} [
|
|
582
|
+
* @typedef EventSubscriptionTemplateSms
|
|
583
|
+
* @property {boolean} [subscribed]
|
|
584
|
+
* @property {Object} [template]
|
|
482
585
|
*/
|
|
483
586
|
|
|
484
587
|
/**
|
|
485
|
-
* @typedef
|
|
588
|
+
* @typedef EventSubscriptionTemplateEmail
|
|
486
589
|
* @property {boolean} [subscribed]
|
|
487
|
-
* @property {
|
|
590
|
+
* @property {Object} [template]
|
|
488
591
|
*/
|
|
489
592
|
|
|
490
593
|
/**
|
|
491
|
-
* @typedef
|
|
594
|
+
* @typedef EventSubscriptionTemplatePushnotification
|
|
492
595
|
* @property {boolean} [subscribed]
|
|
493
|
-
* @property {string} [template]
|
|
494
596
|
*/
|
|
495
597
|
|
|
496
598
|
/**
|
|
497
599
|
* @typedef EventSubscriptionTemplate
|
|
498
600
|
* @property {EventSubscriptionTemplateSms} [sms]
|
|
499
601
|
* @property {EventSubscriptionTemplateEmail} [email]
|
|
602
|
+
* @property {EventSubscriptionTemplatePushnotification} [pushnotification]
|
|
500
603
|
*/
|
|
501
604
|
|
|
502
605
|
/**
|
|
@@ -505,7 +608,8 @@ const Joi = require("joi");
|
|
|
505
608
|
* @property {boolean} [is_default]
|
|
506
609
|
* @property {string} [_id]
|
|
507
610
|
* @property {string} [application]
|
|
508
|
-
* @property {string} [
|
|
611
|
+
* @property {string} [category]
|
|
612
|
+
* @property {Object} [event]
|
|
509
613
|
* @property {string} [slug]
|
|
510
614
|
* @property {string} [created_at]
|
|
511
615
|
* @property {string} [updated_at]
|
|
@@ -519,23 +623,23 @@ const Joi = require("joi");
|
|
|
519
623
|
*/
|
|
520
624
|
|
|
521
625
|
/**
|
|
522
|
-
* @typedef
|
|
626
|
+
* @typedef TriggerJobResponse
|
|
523
627
|
* @property {number} [status]
|
|
524
628
|
*/
|
|
525
629
|
|
|
526
630
|
/**
|
|
527
|
-
* @typedef
|
|
631
|
+
* @typedef TriggerJobRequest
|
|
528
632
|
* @property {string} [job_id]
|
|
529
633
|
*/
|
|
530
634
|
|
|
531
635
|
/**
|
|
532
|
-
* @typedef
|
|
636
|
+
* @typedef GlobalVariablesGetResponse
|
|
533
637
|
* @property {Object} [read_only]
|
|
534
638
|
* @property {Object} [editable]
|
|
535
639
|
*/
|
|
536
640
|
|
|
537
641
|
/**
|
|
538
|
-
* @typedef
|
|
642
|
+
* @typedef GlobalVariablesPostResponse
|
|
539
643
|
* @property {string} [_id]
|
|
540
644
|
* @property {string} [category]
|
|
541
645
|
* @property {string} [application]
|
|
@@ -604,6 +708,16 @@ const Joi = require("joi");
|
|
|
604
708
|
/**
|
|
605
709
|
* @typedef LogEmail
|
|
606
710
|
* @property {string} [template]
|
|
711
|
+
* @property {string} [provider]
|
|
712
|
+
* @property {string} [to]
|
|
713
|
+
*/
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* @typedef LogSms
|
|
717
|
+
* @property {string} [template]
|
|
718
|
+
* @property {string} [provider]
|
|
719
|
+
* @property {string} [phone_number]
|
|
720
|
+
* @property {string} [country_code]
|
|
607
721
|
*/
|
|
608
722
|
|
|
609
723
|
/**
|
|
@@ -613,8 +727,10 @@ const Joi = require("joi");
|
|
|
613
727
|
|
|
614
728
|
/**
|
|
615
729
|
* @typedef LogMeta
|
|
616
|
-
* @property {string} [type]
|
|
617
730
|
* @property {string} [identifier]
|
|
731
|
+
* @property {string} [type]
|
|
732
|
+
* @property {string} [job]
|
|
733
|
+
* @property {string} [campaign]
|
|
618
734
|
* @property {string} [key]
|
|
619
735
|
* @property {string} [offset]
|
|
620
736
|
* @property {string} [partition]
|
|
@@ -624,16 +740,18 @@ const Joi = require("joi");
|
|
|
624
740
|
/**
|
|
625
741
|
* @typedef Log
|
|
626
742
|
* @property {LogEmail} [email]
|
|
743
|
+
* @property {LogSms} [sms]
|
|
627
744
|
* @property {LogPushnotification} [pushnotification]
|
|
628
|
-
* @property {LogMeta} [meta]
|
|
629
745
|
* @property {string} [_id]
|
|
630
|
-
* @property {string} [
|
|
746
|
+
* @property {string} [pod]
|
|
631
747
|
* @property {string} [service]
|
|
632
748
|
* @property {string} [step]
|
|
749
|
+
* @property {string} [source]
|
|
633
750
|
* @property {string} [status]
|
|
634
|
-
* @property {Object} [data]
|
|
635
751
|
* @property {string} [expire_at]
|
|
636
752
|
* @property {string} [created_at]
|
|
753
|
+
* @property {LogMeta} [meta]
|
|
754
|
+
* @property {string} [application]
|
|
637
755
|
*/
|
|
638
756
|
|
|
639
757
|
/**
|
|
@@ -737,16 +855,9 @@ const Joi = require("joi");
|
|
|
737
855
|
* @property {string} [email]
|
|
738
856
|
*/
|
|
739
857
|
|
|
740
|
-
/**
|
|
741
|
-
* @typedef VerifyOtpCommsErrorRes
|
|
742
|
-
* @property {boolean} [success]
|
|
743
|
-
* @property {string} [message]
|
|
744
|
-
*/
|
|
745
|
-
|
|
746
858
|
/**
|
|
747
859
|
* @typedef SmsProviderReq
|
|
748
860
|
* @property {string} [name]
|
|
749
|
-
* @property {string} [token]
|
|
750
861
|
* @property {string} [description]
|
|
751
862
|
* @property {string} [sender]
|
|
752
863
|
* @property {string} [username]
|
|
@@ -765,16 +876,10 @@ const Joi = require("joi");
|
|
|
765
876
|
* @property {number} [version_id] - The version ID for the test.
|
|
766
877
|
* @property {string} [sender_id] - The sender ID for the test.
|
|
767
878
|
* @property {string} [api_key] - The api_key for the test.
|
|
768
|
-
* @property {string} [tenant_name_1] - First part of jiocx url.
|
|
769
|
-
* @property {string} [tenant_name_2] - Second part of jiocx url.
|
|
770
879
|
*/
|
|
771
880
|
|
|
772
881
|
/**
|
|
773
882
|
* @typedef SmsProvider
|
|
774
|
-
* @property {string} [token]
|
|
775
|
-
* @property {string} [sender_id]
|
|
776
|
-
* @property {string} [api_key]
|
|
777
|
-
* @property {number} [expiry_date]
|
|
778
883
|
* @property {number} [rpt]
|
|
779
884
|
* @property {string} [type]
|
|
780
885
|
* @property {string} [provider]
|
|
@@ -784,6 +889,7 @@ const Joi = require("joi");
|
|
|
784
889
|
* @property {string} [sender]
|
|
785
890
|
* @property {string} [username]
|
|
786
891
|
* @property {string} [authkey]
|
|
892
|
+
* @property {string} [entity_id]
|
|
787
893
|
* @property {string} [application]
|
|
788
894
|
* @property {string} [created_at]
|
|
789
895
|
* @property {string} [updated_at]
|
|
@@ -905,75 +1011,255 @@ const Joi = require("joi");
|
|
|
905
1011
|
* @property {string} [created_at]
|
|
906
1012
|
*/
|
|
907
1013
|
|
|
908
|
-
/**
|
|
909
|
-
* @typedef SystemNotifications
|
|
910
|
-
* @property {SystemNotification[]} [items]
|
|
911
|
-
* @property {number} [last_read_anchor]
|
|
912
|
-
* @property {Page} [page]
|
|
913
|
-
*/
|
|
1014
|
+
/**
|
|
1015
|
+
* @typedef SystemNotifications
|
|
1016
|
+
* @property {SystemNotification[]} [items]
|
|
1017
|
+
* @property {number} [last_read_anchor]
|
|
1018
|
+
* @property {Page} [page]
|
|
1019
|
+
*/
|
|
1020
|
+
|
|
1021
|
+
/**
|
|
1022
|
+
* @typedef Page
|
|
1023
|
+
* @property {number} [item_total] - The total number of items on the page.
|
|
1024
|
+
* @property {string} [next_id] - The identifier for the next page.
|
|
1025
|
+
* @property {boolean} [has_previous] - Indicates whether there is a previous page.
|
|
1026
|
+
* @property {boolean} [has_next] - Indicates whether there is a next page.
|
|
1027
|
+
* @property {number} [current] - The current page number.
|
|
1028
|
+
* @property {string} type - The type of the page, such as 'PageType'.
|
|
1029
|
+
* @property {number} [size] - The number of items per page.
|
|
1030
|
+
* @property {number} [total] - Total number of items.
|
|
1031
|
+
*/
|
|
1032
|
+
|
|
1033
|
+
/**
|
|
1034
|
+
* @typedef BasicDelete
|
|
1035
|
+
* @property {boolean} [acknowledged]
|
|
1036
|
+
* @property {number} [deleted_count]
|
|
1037
|
+
*/
|
|
1038
|
+
|
|
1039
|
+
/**
|
|
1040
|
+
* @typedef EnabledObj
|
|
1041
|
+
* @property {boolean} [enabled]
|
|
1042
|
+
*/
|
|
1043
|
+
|
|
1044
|
+
/**
|
|
1045
|
+
* @typedef OtpConfigurationExpiryDuration
|
|
1046
|
+
* @property {number} time
|
|
1047
|
+
* @property {string} denomination
|
|
1048
|
+
*/
|
|
1049
|
+
|
|
1050
|
+
/**
|
|
1051
|
+
* @typedef OtpConfigurationExpiry
|
|
1052
|
+
* @property {OtpConfigurationExpiryDuration} duration
|
|
1053
|
+
* @property {string} type
|
|
1054
|
+
*/
|
|
1055
|
+
|
|
1056
|
+
/**
|
|
1057
|
+
* @typedef OtpConfigRateLimit
|
|
1058
|
+
* @property {number} [duration]
|
|
1059
|
+
* @property {number} [limit]
|
|
1060
|
+
*/
|
|
1061
|
+
|
|
1062
|
+
/**
|
|
1063
|
+
* @typedef OtpConfiguration
|
|
1064
|
+
* @property {number} otp_length
|
|
1065
|
+
* @property {string} type
|
|
1066
|
+
* @property {OtpConfigurationExpiry} expiry
|
|
1067
|
+
* @property {OtpConfigRateLimit} rate_limit
|
|
1068
|
+
* @property {string} [application_id]
|
|
1069
|
+
* @property {string} [company_id]
|
|
1070
|
+
*/
|
|
1071
|
+
|
|
1072
|
+
class CommunicationPlatformModel {
|
|
1073
|
+
/** @returns {AppProvidersGlobalProviderRequestObjProvider} */
|
|
1074
|
+
static AppProvidersGlobalProviderRequestObjProvider() {
|
|
1075
|
+
return Joi.object({
|
|
1076
|
+
provider: Joi.string().allow(""),
|
|
1077
|
+
});
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
/** @returns {AppProvidersGlobalProviderRequestObj} */
|
|
1081
|
+
static AppProvidersGlobalProviderRequestObj() {
|
|
1082
|
+
return Joi.object({
|
|
1083
|
+
transaction: CommunicationPlatformModel.AppProvidersGlobalProviderRequestObjProvider(),
|
|
1084
|
+
otp: CommunicationPlatformModel.AppProvidersGlobalProviderRequestObjProvider(),
|
|
1085
|
+
});
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
/** @returns {AppProvidersGlobalProviderRequest} */
|
|
1089
|
+
static AppProvidersGlobalProviderRequest() {
|
|
1090
|
+
return Joi.object({
|
|
1091
|
+
email: CommunicationPlatformModel.AppProvidersGlobalProviderRequestObj(),
|
|
1092
|
+
sms: CommunicationPlatformModel.AppProvidersGlobalProviderRequestObj(),
|
|
1093
|
+
});
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
/** @returns {UpdateAppProvidersGlobalProviderResponseEmailSmsObj} */
|
|
1097
|
+
static UpdateAppProvidersGlobalProviderResponseEmailSmsObj() {
|
|
1098
|
+
return Joi.object({
|
|
1099
|
+
default_provider: Joi.string().allow("").allow(null),
|
|
1100
|
+
otp_provider: Joi.string().allow("").allow(null),
|
|
1101
|
+
});
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
/** @returns {UpdateAppProvidersGlobalProviderResponse} */
|
|
1105
|
+
static UpdateAppProvidersGlobalProviderResponse() {
|
|
1106
|
+
return Joi.object({
|
|
1107
|
+
email: CommunicationPlatformModel.UpdateAppProvidersGlobalProviderResponseEmailSmsObj(),
|
|
1108
|
+
sms: CommunicationPlatformModel.UpdateAppProvidersGlobalProviderResponseEmailSmsObj(),
|
|
1109
|
+
_id: Joi.string().allow(""),
|
|
1110
|
+
slug: Joi.string().allow(""),
|
|
1111
|
+
});
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
/** @returns {DefaultEmailProvidersFromAddresses} */
|
|
1115
|
+
static DefaultEmailProvidersFromAddresses() {
|
|
1116
|
+
return Joi.object({
|
|
1117
|
+
name: Joi.string().allow(""),
|
|
1118
|
+
email: Joi.string().allow(""),
|
|
1119
|
+
is_default: Joi.boolean(),
|
|
1120
|
+
});
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
/** @returns {DefaultEmailProviders} */
|
|
1124
|
+
static DefaultEmailProviders() {
|
|
1125
|
+
return Joi.object({
|
|
1126
|
+
_id: Joi.string().allow(""),
|
|
1127
|
+
from_address: Joi.array().items(
|
|
1128
|
+
CommunicationPlatformModel.DefaultEmailProvidersFromAddresses()
|
|
1129
|
+
),
|
|
1130
|
+
name: Joi.string().allow(""),
|
|
1131
|
+
is_default: Joi.boolean(),
|
|
1132
|
+
});
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
/** @returns {PushtokenReq} */
|
|
1136
|
+
static PushtokenReq() {
|
|
1137
|
+
return Joi.object({
|
|
1138
|
+
action: Joi.string().allow(""),
|
|
1139
|
+
bundle_identifier: Joi.string().allow(""),
|
|
1140
|
+
push_token: Joi.string().allow(""),
|
|
1141
|
+
unique_device_id: Joi.string().allow(""),
|
|
1142
|
+
type: Joi.string().allow(""),
|
|
1143
|
+
});
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
/** @returns {PushtokenRes} */
|
|
1147
|
+
static PushtokenRes() {
|
|
1148
|
+
return Joi.object({
|
|
1149
|
+
_id: Joi.string().allow(""),
|
|
1150
|
+
bundle_identifier: Joi.string().allow(""),
|
|
1151
|
+
push_token: Joi.string().allow(""),
|
|
1152
|
+
unique_device_id: Joi.string().allow(""),
|
|
1153
|
+
type: Joi.string().allow(""),
|
|
1154
|
+
platform: Joi.string().allow(""),
|
|
1155
|
+
application_id: Joi.string().allow(""),
|
|
1156
|
+
user_id: Joi.string().allow(""),
|
|
1157
|
+
created_at: Joi.string().allow(""),
|
|
1158
|
+
updated_at: Joi.string().allow(""),
|
|
1159
|
+
expired_at: Joi.string().allow(""),
|
|
1160
|
+
});
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
/** @returns {SendInstantResponse} */
|
|
1164
|
+
static SendInstantResponse() {
|
|
1165
|
+
return Joi.object({
|
|
1166
|
+
success: Joi.boolean(),
|
|
1167
|
+
provider: Joi.string().allow("").allow(null),
|
|
1168
|
+
response: Joi.boolean().allow(null),
|
|
1169
|
+
});
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
/** @returns {MetaStructure} */
|
|
1173
|
+
static MetaStructure() {
|
|
1174
|
+
return Joi.object({
|
|
1175
|
+
job_type: Joi.string().allow(""),
|
|
1176
|
+
action: Joi.string().allow(""),
|
|
1177
|
+
trace: Joi.string().allow(""),
|
|
1178
|
+
timestamp: Joi.string().allow(""),
|
|
1179
|
+
});
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
/** @returns {PayloadSmsTemplateStructure} */
|
|
1183
|
+
static PayloadSmsTemplateStructure() {
|
|
1184
|
+
return Joi.object({
|
|
1185
|
+
key: Joi.string().allow(""),
|
|
1186
|
+
value: Joi.any(),
|
|
1187
|
+
});
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
/** @returns {PayloadSmsProviderStructure} */
|
|
1191
|
+
static PayloadSmsProviderStructure() {
|
|
1192
|
+
return Joi.object({
|
|
1193
|
+
slug: Joi.string().allow(""),
|
|
1194
|
+
});
|
|
1195
|
+
}
|
|
914
1196
|
|
|
915
|
-
/**
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
* @property {string} type - The type of the page, such as 'PageType'.
|
|
923
|
-
* @property {number} [size] - The number of items per page.
|
|
924
|
-
*/
|
|
1197
|
+
/** @returns {PayloadEmailTemplateStructure} */
|
|
1198
|
+
static PayloadEmailTemplateStructure() {
|
|
1199
|
+
return Joi.object({
|
|
1200
|
+
key: Joi.string().allow(""),
|
|
1201
|
+
value: Joi.any(),
|
|
1202
|
+
});
|
|
1203
|
+
}
|
|
925
1204
|
|
|
926
|
-
/**
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
1205
|
+
/** @returns {PayloadEmailProviderStructure} */
|
|
1206
|
+
static PayloadEmailProviderStructure() {
|
|
1207
|
+
return Joi.object({
|
|
1208
|
+
slug: Joi.string().allow(""),
|
|
1209
|
+
});
|
|
1210
|
+
}
|
|
931
1211
|
|
|
932
|
-
/**
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
1212
|
+
/** @returns {PayloadEmailStructure} */
|
|
1213
|
+
static PayloadEmailStructure() {
|
|
1214
|
+
return Joi.object({
|
|
1215
|
+
template: CommunicationPlatformModel.PayloadEmailTemplateStructure(),
|
|
1216
|
+
provider: CommunicationPlatformModel.PayloadEmailProviderStructure(),
|
|
1217
|
+
});
|
|
1218
|
+
}
|
|
939
1219
|
|
|
940
|
-
/**
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
1220
|
+
/** @returns {PayloadSmsStructure} */
|
|
1221
|
+
static PayloadSmsStructure() {
|
|
1222
|
+
return Joi.object({
|
|
1223
|
+
template: CommunicationPlatformModel.PayloadSmsTemplateStructure(),
|
|
1224
|
+
provider: CommunicationPlatformModel.PayloadSmsProviderStructure(),
|
|
1225
|
+
});
|
|
1226
|
+
}
|
|
947
1227
|
|
|
948
|
-
/**
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
1228
|
+
/** @returns {SendSyncData} */
|
|
1229
|
+
static SendSyncData() {
|
|
1230
|
+
return Joi.object({
|
|
1231
|
+
phone_number: Joi.string().allow(""),
|
|
1232
|
+
country_code: Joi.string().allow(""),
|
|
1233
|
+
to: Joi.string().allow(""),
|
|
1234
|
+
});
|
|
1235
|
+
}
|
|
952
1236
|
|
|
953
|
-
/**
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
1237
|
+
/** @returns {SendSyncRequest} */
|
|
1238
|
+
static SendSyncRequest() {
|
|
1239
|
+
return Joi.object({
|
|
1240
|
+
data: Joi.array().items(CommunicationPlatformModel.SendSyncData()),
|
|
1241
|
+
email: CommunicationPlatformModel.PayloadEmailStructure(),
|
|
1242
|
+
sms: CommunicationPlatformModel.PayloadSmsStructure(),
|
|
1243
|
+
});
|
|
1244
|
+
}
|
|
958
1245
|
|
|
959
|
-
/**
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
1246
|
+
/** @returns {EngineRequest} */
|
|
1247
|
+
static EngineRequest() {
|
|
1248
|
+
return Joi.object({
|
|
1249
|
+
payload: CommunicationPlatformModel.SendSyncRequest(),
|
|
1250
|
+
meta: CommunicationPlatformModel.MetaStructure(),
|
|
1251
|
+
});
|
|
1252
|
+
}
|
|
964
1253
|
|
|
965
|
-
/**
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
* @property {string} [company_id]
|
|
972
|
-
*/
|
|
1254
|
+
/** @returns {EngineResponse} */
|
|
1255
|
+
static EngineResponse() {
|
|
1256
|
+
return Joi.object({
|
|
1257
|
+
success: Joi.boolean(),
|
|
1258
|
+
});
|
|
1259
|
+
}
|
|
973
1260
|
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
static EventSubscriptionsBulkUpdatePayload() {
|
|
1261
|
+
/** @returns {EventSubscriptionsBulkUpdateRequest} */
|
|
1262
|
+
static EventSubscriptionsBulkUpdateRequest() {
|
|
977
1263
|
return Joi.object({
|
|
978
1264
|
subscriptions: Joi.array().items(
|
|
979
1265
|
CommunicationPlatformModel.SubscriptionsObject()
|
|
@@ -981,8 +1267,8 @@ class CommunicationPlatformModel {
|
|
|
981
1267
|
});
|
|
982
1268
|
}
|
|
983
1269
|
|
|
984
|
-
/** @returns {
|
|
985
|
-
static
|
|
1270
|
+
/** @returns {EventSubscriptionsBulkUpdateResponse} */
|
|
1271
|
+
static EventSubscriptionsBulkUpdateResponse() {
|
|
986
1272
|
return Joi.object({
|
|
987
1273
|
template: CommunicationPlatformModel.EventSubscriptionTemplate(),
|
|
988
1274
|
_id: Joi.string().allow(""),
|
|
@@ -996,10 +1282,21 @@ class CommunicationPlatformModel {
|
|
|
996
1282
|
});
|
|
997
1283
|
}
|
|
998
1284
|
|
|
1285
|
+
/** @returns {SubscriptionsObjectRequest} */
|
|
1286
|
+
static SubscriptionsObjectRequest() {
|
|
1287
|
+
return Joi.object({
|
|
1288
|
+
event: Joi.string().allow(""),
|
|
1289
|
+
slug: Joi.string().allow(""),
|
|
1290
|
+
template: CommunicationPlatformModel.TemplateObject(),
|
|
1291
|
+
});
|
|
1292
|
+
}
|
|
1293
|
+
|
|
999
1294
|
/** @returns {SubscriptionsObject} */
|
|
1000
1295
|
static SubscriptionsObject() {
|
|
1001
1296
|
return Joi.object({
|
|
1002
1297
|
_id: Joi.string().allow(""),
|
|
1298
|
+
event: Joi.string().allow(""),
|
|
1299
|
+
slug: Joi.string().allow(""),
|
|
1003
1300
|
template: CommunicationPlatformModel.TemplateObject(),
|
|
1004
1301
|
});
|
|
1005
1302
|
}
|
|
@@ -1143,6 +1440,9 @@ class CommunicationPlatformModel {
|
|
|
1143
1440
|
/** @returns {CampaignReq} */
|
|
1144
1441
|
static CampaignReq() {
|
|
1145
1442
|
return Joi.object({
|
|
1443
|
+
recipient_headers: CommunicationPlatformModel.RecipientHeaders(),
|
|
1444
|
+
email: CommunicationPlatformModel.CampaignEmail(),
|
|
1445
|
+
datasource: Joi.string().allow(""),
|
|
1146
1446
|
description: Joi.string().allow(""),
|
|
1147
1447
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
1148
1448
|
headers: Joi.array().items(Joi.string().allow("")),
|
|
@@ -1193,7 +1493,7 @@ class CommunicationPlatformModel {
|
|
|
1193
1493
|
recipient_headers: CommunicationPlatformModel.RecipientHeaders(),
|
|
1194
1494
|
email: CommunicationPlatformModel.CampaignEmail(),
|
|
1195
1495
|
description: Joi.string().allow(""),
|
|
1196
|
-
tags: Joi.array().items(Joi.
|
|
1496
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
1197
1497
|
is_active: Joi.boolean(),
|
|
1198
1498
|
_id: Joi.string().allow(""),
|
|
1199
1499
|
datasource: Joi.string().allow(""),
|
|
@@ -1215,21 +1515,6 @@ class CommunicationPlatformModel {
|
|
|
1215
1515
|
});
|
|
1216
1516
|
}
|
|
1217
1517
|
|
|
1218
|
-
/** @returns {BadRequestSchema} */
|
|
1219
|
-
static BadRequestSchema() {
|
|
1220
|
-
return Joi.object({
|
|
1221
|
-
status: Joi.string().allow(""),
|
|
1222
|
-
message: Joi.string().allow(""),
|
|
1223
|
-
});
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
/** @returns {NotFound} */
|
|
1227
|
-
static NotFound() {
|
|
1228
|
-
return Joi.object({
|
|
1229
|
-
message: Joi.string().allow(""),
|
|
1230
|
-
});
|
|
1231
|
-
}
|
|
1232
|
-
|
|
1233
1518
|
/** @returns {AudienceReq} */
|
|
1234
1519
|
static AudienceReq() {
|
|
1235
1520
|
return Joi.object({
|
|
@@ -1403,7 +1688,7 @@ class CommunicationPlatformModel {
|
|
|
1403
1688
|
reply_to: Joi.string().allow(""),
|
|
1404
1689
|
priority: Joi.string().allow(""),
|
|
1405
1690
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
1406
|
-
template_variables: Joi.
|
|
1691
|
+
template_variables: Joi.any(),
|
|
1407
1692
|
published: Joi.boolean(),
|
|
1408
1693
|
subject: CommunicationPlatformModel.TemplateAndType(),
|
|
1409
1694
|
html: CommunicationPlatformModel.TemplateAndType(),
|
|
@@ -1426,6 +1711,15 @@ class CommunicationPlatformModel {
|
|
|
1426
1711
|
});
|
|
1427
1712
|
}
|
|
1428
1713
|
|
|
1714
|
+
/** @returns {TemplateKeys} */
|
|
1715
|
+
static TemplateKeys() {
|
|
1716
|
+
return Joi.object({
|
|
1717
|
+
to: Joi.string().allow(""),
|
|
1718
|
+
cc: Joi.string().allow(""),
|
|
1719
|
+
bcc: Joi.string().allow(""),
|
|
1720
|
+
});
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1429
1723
|
/** @returns {EmailTemplate} */
|
|
1430
1724
|
static EmailTemplate() {
|
|
1431
1725
|
return Joi.object({
|
|
@@ -1442,10 +1736,11 @@ class CommunicationPlatformModel {
|
|
|
1442
1736
|
reply_to: Joi.string().allow(""),
|
|
1443
1737
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
1444
1738
|
subject: CommunicationPlatformModel.TemplateAndType(),
|
|
1739
|
+
keys: CommunicationPlatformModel.TemplateKeys(),
|
|
1445
1740
|
html: CommunicationPlatformModel.TemplateAndType(),
|
|
1446
1741
|
url_shorten: CommunicationPlatformModel.EnabledObj(),
|
|
1447
1742
|
priority: Joi.string().allow(""),
|
|
1448
|
-
template_variables: Joi.
|
|
1743
|
+
template_variables: Joi.any(),
|
|
1449
1744
|
published: Joi.boolean(),
|
|
1450
1745
|
category: Joi.string().allow(""),
|
|
1451
1746
|
_id: Joi.string().allow(""),
|
|
@@ -1477,7 +1772,7 @@ class CommunicationPlatformModel {
|
|
|
1477
1772
|
html: CommunicationPlatformModel.TemplateAndType(),
|
|
1478
1773
|
url_shorten: CommunicationPlatformModel.EnabledObj(),
|
|
1479
1774
|
priority: Joi.string().allow(""),
|
|
1480
|
-
template_variables: Joi.
|
|
1775
|
+
template_variables: Joi.any(),
|
|
1481
1776
|
published: Joi.boolean(),
|
|
1482
1777
|
category: Joi.string().allow(""),
|
|
1483
1778
|
_id: Joi.string().allow(""),
|
|
@@ -1501,93 +1796,17 @@ class CommunicationPlatformModel {
|
|
|
1501
1796
|
});
|
|
1502
1797
|
}
|
|
1503
1798
|
|
|
1504
|
-
/** @returns {
|
|
1505
|
-
static
|
|
1506
|
-
return Joi.object({
|
|
1507
|
-
items: Joi.array().items(
|
|
1508
|
-
CommunicationPlatformModel.SystemEmailTemplate()
|
|
1509
|
-
),
|
|
1510
|
-
});
|
|
1511
|
-
}
|
|
1512
|
-
|
|
1513
|
-
/** @returns {PayloadEmailTemplateStructure} */
|
|
1514
|
-
static PayloadEmailTemplateStructure() {
|
|
1515
|
-
return Joi.object({
|
|
1516
|
-
key: Joi.string().allow(""),
|
|
1517
|
-
value: Joi.any(),
|
|
1518
|
-
});
|
|
1519
|
-
}
|
|
1520
|
-
|
|
1521
|
-
/** @returns {PayloadEmailProviderStructure} */
|
|
1522
|
-
static PayloadEmailProviderStructure() {
|
|
1523
|
-
return Joi.object({
|
|
1524
|
-
_id: Joi.string().allow(""),
|
|
1525
|
-
});
|
|
1526
|
-
}
|
|
1527
|
-
|
|
1528
|
-
/** @returns {PayloadEmailStructure} */
|
|
1529
|
-
static PayloadEmailStructure() {
|
|
1530
|
-
return Joi.object({
|
|
1531
|
-
template: CommunicationPlatformModel.PayloadEmailTemplateStructure(),
|
|
1532
|
-
provider: CommunicationPlatformModel.PayloadEmailProviderStructure(),
|
|
1533
|
-
});
|
|
1534
|
-
}
|
|
1535
|
-
|
|
1536
|
-
/** @returns {PayloadSmsTemplateStructure} */
|
|
1537
|
-
static PayloadSmsTemplateStructure() {
|
|
1538
|
-
return Joi.object({
|
|
1539
|
-
key: Joi.string().allow(""),
|
|
1540
|
-
value: Joi.any(),
|
|
1541
|
-
});
|
|
1542
|
-
}
|
|
1543
|
-
|
|
1544
|
-
/** @returns {PayloadSmsProviderStructure} */
|
|
1545
|
-
static PayloadSmsProviderStructure() {
|
|
1546
|
-
return Joi.object({
|
|
1547
|
-
_id: Joi.string().allow(""),
|
|
1548
|
-
});
|
|
1549
|
-
}
|
|
1550
|
-
|
|
1551
|
-
/** @returns {PayloadSmsStructure} */
|
|
1552
|
-
static PayloadSmsStructure() {
|
|
1553
|
-
return Joi.object({
|
|
1554
|
-
template: CommunicationPlatformModel.PayloadSmsTemplateStructure(),
|
|
1555
|
-
provider: CommunicationPlatformModel.PayloadSmsProviderStructure(),
|
|
1556
|
-
});
|
|
1557
|
-
}
|
|
1558
|
-
|
|
1559
|
-
/** @returns {PayloadStructure} */
|
|
1560
|
-
static PayloadStructure() {
|
|
1561
|
-
return Joi.object({
|
|
1562
|
-
data: Joi.array().items(Joi.any()),
|
|
1563
|
-
email: CommunicationPlatformModel.PayloadEmailStructure(),
|
|
1564
|
-
sms: CommunicationPlatformModel.PayloadSmsStructure(),
|
|
1565
|
-
application: Joi.string().allow(""),
|
|
1566
|
-
});
|
|
1567
|
-
}
|
|
1568
|
-
|
|
1569
|
-
/** @returns {MetaStructure} */
|
|
1570
|
-
static MetaStructure() {
|
|
1571
|
-
return Joi.object({
|
|
1572
|
-
job_type: Joi.string().allow(""),
|
|
1573
|
-
action: Joi.string().allow(""),
|
|
1574
|
-
trace: Joi.string().allow(""),
|
|
1575
|
-
timestamp: Joi.string().allow(""),
|
|
1576
|
-
});
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
|
-
/** @returns {EnginePayload} */
|
|
1580
|
-
static EnginePayload() {
|
|
1799
|
+
/** @returns {SubscribedSmsTemplates} */
|
|
1800
|
+
static SubscribedSmsTemplates() {
|
|
1581
1801
|
return Joi.object({
|
|
1582
|
-
|
|
1583
|
-
meta: CommunicationPlatformModel.MetaStructure(),
|
|
1802
|
+
items: Joi.array().items(CommunicationPlatformModel.SmsTemplates()),
|
|
1584
1803
|
});
|
|
1585
1804
|
}
|
|
1586
1805
|
|
|
1587
|
-
/** @returns {
|
|
1588
|
-
static
|
|
1806
|
+
/** @returns {SubscribedEmailTemplates} */
|
|
1807
|
+
static SubscribedEmailTemplates() {
|
|
1589
1808
|
return Joi.object({
|
|
1590
|
-
|
|
1809
|
+
items: Joi.array().items(CommunicationPlatformModel.EmailTemplate()),
|
|
1591
1810
|
});
|
|
1592
1811
|
}
|
|
1593
1812
|
|
|
@@ -1595,7 +1814,7 @@ class CommunicationPlatformModel {
|
|
|
1595
1814
|
static EventSubscriptionTemplateSms() {
|
|
1596
1815
|
return Joi.object({
|
|
1597
1816
|
subscribed: Joi.boolean(),
|
|
1598
|
-
template: Joi.
|
|
1817
|
+
template: Joi.any(),
|
|
1599
1818
|
});
|
|
1600
1819
|
}
|
|
1601
1820
|
|
|
@@ -1603,7 +1822,14 @@ class CommunicationPlatformModel {
|
|
|
1603
1822
|
static EventSubscriptionTemplateEmail() {
|
|
1604
1823
|
return Joi.object({
|
|
1605
1824
|
subscribed: Joi.boolean(),
|
|
1606
|
-
template: Joi.
|
|
1825
|
+
template: Joi.any(),
|
|
1826
|
+
});
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
/** @returns {EventSubscriptionTemplatePushnotification} */
|
|
1830
|
+
static EventSubscriptionTemplatePushnotification() {
|
|
1831
|
+
return Joi.object({
|
|
1832
|
+
subscribed: Joi.boolean(),
|
|
1607
1833
|
});
|
|
1608
1834
|
}
|
|
1609
1835
|
|
|
@@ -1612,6 +1838,7 @@ class CommunicationPlatformModel {
|
|
|
1612
1838
|
return Joi.object({
|
|
1613
1839
|
sms: CommunicationPlatformModel.EventSubscriptionTemplateSms(),
|
|
1614
1840
|
email: CommunicationPlatformModel.EventSubscriptionTemplateEmail(),
|
|
1841
|
+
pushnotification: CommunicationPlatformModel.EventSubscriptionTemplatePushnotification(),
|
|
1615
1842
|
});
|
|
1616
1843
|
}
|
|
1617
1844
|
|
|
@@ -1622,7 +1849,8 @@ class CommunicationPlatformModel {
|
|
|
1622
1849
|
is_default: Joi.boolean(),
|
|
1623
1850
|
_id: Joi.string().allow(""),
|
|
1624
1851
|
application: Joi.string().allow(""),
|
|
1625
|
-
|
|
1852
|
+
category: Joi.string().allow(""),
|
|
1853
|
+
event: Joi.any(),
|
|
1626
1854
|
slug: Joi.string().allow(""),
|
|
1627
1855
|
created_at: Joi.string().allow(""),
|
|
1628
1856
|
updated_at: Joi.string().allow(""),
|
|
@@ -1638,35 +1866,35 @@ class CommunicationPlatformModel {
|
|
|
1638
1866
|
});
|
|
1639
1867
|
}
|
|
1640
1868
|
|
|
1641
|
-
/** @returns {
|
|
1642
|
-
static
|
|
1869
|
+
/** @returns {TriggerJobResponse} */
|
|
1870
|
+
static TriggerJobResponse() {
|
|
1643
1871
|
return Joi.object({
|
|
1644
1872
|
status: Joi.number(),
|
|
1645
1873
|
});
|
|
1646
1874
|
}
|
|
1647
1875
|
|
|
1648
|
-
/** @returns {
|
|
1649
|
-
static
|
|
1876
|
+
/** @returns {TriggerJobRequest} */
|
|
1877
|
+
static TriggerJobRequest() {
|
|
1650
1878
|
return Joi.object({
|
|
1651
1879
|
job_id: Joi.string().allow(""),
|
|
1652
1880
|
});
|
|
1653
1881
|
}
|
|
1654
1882
|
|
|
1655
|
-
/** @returns {
|
|
1656
|
-
static
|
|
1883
|
+
/** @returns {GlobalVariablesGetResponse} */
|
|
1884
|
+
static GlobalVariablesGetResponse() {
|
|
1657
1885
|
return Joi.object({
|
|
1658
|
-
read_only: Joi.
|
|
1659
|
-
editable: Joi.
|
|
1886
|
+
read_only: Joi.any(),
|
|
1887
|
+
editable: Joi.any(),
|
|
1660
1888
|
});
|
|
1661
1889
|
}
|
|
1662
1890
|
|
|
1663
|
-
/** @returns {
|
|
1664
|
-
static
|
|
1891
|
+
/** @returns {GlobalVariablesPostResponse} */
|
|
1892
|
+
static GlobalVariablesPostResponse() {
|
|
1665
1893
|
return Joi.object({
|
|
1666
1894
|
_id: Joi.string().allow(""),
|
|
1667
1895
|
category: Joi.string().allow(""),
|
|
1668
1896
|
application: Joi.string().allow(""),
|
|
1669
|
-
global_variables: Joi.
|
|
1897
|
+
global_variables: Joi.any(),
|
|
1670
1898
|
created_at: Joi.string().allow(""),
|
|
1671
1899
|
});
|
|
1672
1900
|
}
|
|
@@ -1674,7 +1902,7 @@ class CommunicationPlatformModel {
|
|
|
1674
1902
|
/** @returns {GlobalVariablesReq} */
|
|
1675
1903
|
static GlobalVariablesReq() {
|
|
1676
1904
|
return Joi.object({
|
|
1677
|
-
global_variables: Joi.
|
|
1905
|
+
global_variables: Joi.any(),
|
|
1678
1906
|
});
|
|
1679
1907
|
}
|
|
1680
1908
|
|
|
@@ -1747,6 +1975,18 @@ class CommunicationPlatformModel {
|
|
|
1747
1975
|
static LogEmail() {
|
|
1748
1976
|
return Joi.object({
|
|
1749
1977
|
template: Joi.string().allow(""),
|
|
1978
|
+
provider: Joi.string().allow(""),
|
|
1979
|
+
to: Joi.string().allow(""),
|
|
1980
|
+
});
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1983
|
+
/** @returns {LogSms} */
|
|
1984
|
+
static LogSms() {
|
|
1985
|
+
return Joi.object({
|
|
1986
|
+
template: Joi.string().allow(""),
|
|
1987
|
+
provider: Joi.string().allow(""),
|
|
1988
|
+
phone_number: Joi.string().allow(""),
|
|
1989
|
+
country_code: Joi.string().allow(""),
|
|
1750
1990
|
});
|
|
1751
1991
|
}
|
|
1752
1992
|
|
|
@@ -1760,8 +2000,10 @@ class CommunicationPlatformModel {
|
|
|
1760
2000
|
/** @returns {LogMeta} */
|
|
1761
2001
|
static LogMeta() {
|
|
1762
2002
|
return Joi.object({
|
|
1763
|
-
type: Joi.string().allow(""),
|
|
1764
2003
|
identifier: Joi.string().allow(""),
|
|
2004
|
+
type: Joi.string().allow(""),
|
|
2005
|
+
job: Joi.string().allow(""),
|
|
2006
|
+
campaign: Joi.string().allow(""),
|
|
1765
2007
|
key: Joi.string().allow(""),
|
|
1766
2008
|
offset: Joi.string().allow(""),
|
|
1767
2009
|
partition: Joi.string().allow(""),
|
|
@@ -1773,16 +2015,18 @@ class CommunicationPlatformModel {
|
|
|
1773
2015
|
static Log() {
|
|
1774
2016
|
return Joi.object({
|
|
1775
2017
|
email: CommunicationPlatformModel.LogEmail(),
|
|
2018
|
+
sms: CommunicationPlatformModel.LogSms(),
|
|
1776
2019
|
pushnotification: CommunicationPlatformModel.LogPushnotification(),
|
|
1777
|
-
meta: CommunicationPlatformModel.LogMeta(),
|
|
1778
2020
|
_id: Joi.string().allow(""),
|
|
1779
|
-
|
|
2021
|
+
pod: Joi.string().allow(""),
|
|
1780
2022
|
service: Joi.string().allow(""),
|
|
1781
2023
|
step: Joi.string().allow(""),
|
|
2024
|
+
source: Joi.string().allow(""),
|
|
1782
2025
|
status: Joi.string().allow(""),
|
|
1783
|
-
data: Joi.any(),
|
|
1784
2026
|
expire_at: Joi.string().allow(""),
|
|
1785
2027
|
created_at: Joi.string().allow(""),
|
|
2028
|
+
meta: CommunicationPlatformModel.LogMeta(),
|
|
2029
|
+
application: Joi.string().allow(""),
|
|
1786
2030
|
});
|
|
1787
2031
|
}
|
|
1788
2032
|
|
|
@@ -1915,19 +2159,10 @@ class CommunicationPlatformModel {
|
|
|
1915
2159
|
});
|
|
1916
2160
|
}
|
|
1917
2161
|
|
|
1918
|
-
/** @returns {VerifyOtpCommsErrorRes} */
|
|
1919
|
-
static VerifyOtpCommsErrorRes() {
|
|
1920
|
-
return Joi.object({
|
|
1921
|
-
success: Joi.boolean(),
|
|
1922
|
-
message: Joi.string().allow(""),
|
|
1923
|
-
});
|
|
1924
|
-
}
|
|
1925
|
-
|
|
1926
2162
|
/** @returns {SmsProviderReq} */
|
|
1927
2163
|
static SmsProviderReq() {
|
|
1928
2164
|
return Joi.object({
|
|
1929
2165
|
name: Joi.string().allow(""),
|
|
1930
|
-
token: Joi.string().allow(""),
|
|
1931
2166
|
description: Joi.string().allow(""),
|
|
1932
2167
|
sender: Joi.string().allow(""),
|
|
1933
2168
|
username: Joi.string().allow(""),
|
|
@@ -1946,18 +2181,12 @@ class CommunicationPlatformModel {
|
|
|
1946
2181
|
version_id: Joi.number(),
|
|
1947
2182
|
sender_id: Joi.string().allow(""),
|
|
1948
2183
|
api_key: Joi.string().allow(""),
|
|
1949
|
-
tenant_name_1: Joi.string().allow(""),
|
|
1950
|
-
tenant_name_2: Joi.string().allow(""),
|
|
1951
2184
|
});
|
|
1952
2185
|
}
|
|
1953
2186
|
|
|
1954
2187
|
/** @returns {SmsProvider} */
|
|
1955
2188
|
static SmsProvider() {
|
|
1956
2189
|
return Joi.object({
|
|
1957
|
-
token: Joi.string().allow(""),
|
|
1958
|
-
sender_id: Joi.string().allow(""),
|
|
1959
|
-
api_key: Joi.string().allow(""),
|
|
1960
|
-
expiry_date: Joi.number(),
|
|
1961
2190
|
rpt: Joi.number(),
|
|
1962
2191
|
type: Joi.string().allow(""),
|
|
1963
2192
|
provider: Joi.string().allow(""),
|
|
@@ -1967,6 +2196,7 @@ class CommunicationPlatformModel {
|
|
|
1967
2196
|
sender: Joi.string().allow(""),
|
|
1968
2197
|
username: Joi.string().allow(""),
|
|
1969
2198
|
authkey: Joi.string().allow(""),
|
|
2199
|
+
entity_id: Joi.string().allow(""),
|
|
1970
2200
|
application: Joi.string().allow(""),
|
|
1971
2201
|
created_at: Joi.string().allow(""),
|
|
1972
2202
|
updated_at: Joi.string().allow(""),
|
|
@@ -2022,7 +2252,7 @@ class CommunicationPlatformModel {
|
|
|
2022
2252
|
message: CommunicationPlatformModel.SmsTemplateMessage(),
|
|
2023
2253
|
priority: Joi.string().allow(""),
|
|
2024
2254
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
2025
|
-
template_variables: Joi.
|
|
2255
|
+
template_variables: Joi.any(),
|
|
2026
2256
|
template_id: Joi.string().allow(""),
|
|
2027
2257
|
published: Joi.boolean(),
|
|
2028
2258
|
category: Joi.string().allow(""),
|
|
@@ -2045,7 +2275,7 @@ class CommunicationPlatformModel {
|
|
|
2045
2275
|
message: CommunicationPlatformModel.SmsTemplateMessage(),
|
|
2046
2276
|
priority: Joi.string().allow(""),
|
|
2047
2277
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
2048
|
-
template_variables: Joi.
|
|
2278
|
+
template_variables: Joi.any(),
|
|
2049
2279
|
template_id: Joi.string().allow(""),
|
|
2050
2280
|
published: Joi.boolean(),
|
|
2051
2281
|
category: Joi.string().allow(""),
|
|
@@ -2073,7 +2303,7 @@ class CommunicationPlatformModel {
|
|
|
2073
2303
|
priority: Joi.string().allow(""),
|
|
2074
2304
|
template_id: Joi.string().allow(""),
|
|
2075
2305
|
meta: CommunicationPlatformModel.metaObj(),
|
|
2076
|
-
template_variables: Joi.
|
|
2306
|
+
template_variables: Joi.any(),
|
|
2077
2307
|
published: Joi.boolean(),
|
|
2078
2308
|
message: CommunicationPlatformModel.SmsTemplateMessage(),
|
|
2079
2309
|
});
|
|
@@ -2130,34 +2360,15 @@ class CommunicationPlatformModel {
|
|
|
2130
2360
|
current: Joi.number(),
|
|
2131
2361
|
type: Joi.string().allow("").required(),
|
|
2132
2362
|
size: Joi.number(),
|
|
2363
|
+
total: Joi.number(),
|
|
2133
2364
|
});
|
|
2134
2365
|
}
|
|
2135
2366
|
|
|
2136
|
-
/** @returns {
|
|
2137
|
-
static
|
|
2138
|
-
return Joi.object({
|
|
2139
|
-
message: CommunicationPlatformModel.Message(),
|
|
2140
|
-
sentry: Joi.string().allow(""),
|
|
2141
|
-
});
|
|
2142
|
-
}
|
|
2143
|
-
|
|
2144
|
-
/** @returns {GenericDelete} */
|
|
2145
|
-
static GenericDelete() {
|
|
2367
|
+
/** @returns {BasicDelete} */
|
|
2368
|
+
static BasicDelete() {
|
|
2146
2369
|
return Joi.object({
|
|
2147
|
-
message: Joi.string().allow(""),
|
|
2148
2370
|
acknowledged: Joi.boolean(),
|
|
2149
|
-
|
|
2150
|
-
operation: Joi.string().allow(""),
|
|
2151
|
-
});
|
|
2152
|
-
}
|
|
2153
|
-
|
|
2154
|
-
/** @returns {Message} */
|
|
2155
|
-
static Message() {
|
|
2156
|
-
return Joi.object({
|
|
2157
|
-
message: Joi.string().allow(""),
|
|
2158
|
-
success: Joi.boolean(),
|
|
2159
|
-
info: Joi.string().allow(""),
|
|
2160
|
-
operation: Joi.string().allow(""),
|
|
2371
|
+
deleted_count: Joi.number(),
|
|
2161
2372
|
});
|
|
2162
2373
|
}
|
|
2163
2374
|
|
|
@@ -2184,12 +2395,21 @@ class CommunicationPlatformModel {
|
|
|
2184
2395
|
});
|
|
2185
2396
|
}
|
|
2186
2397
|
|
|
2398
|
+
/** @returns {OtpConfigRateLimit} */
|
|
2399
|
+
static OtpConfigRateLimit() {
|
|
2400
|
+
return Joi.object({
|
|
2401
|
+
duration: Joi.number(),
|
|
2402
|
+
limit: Joi.number(),
|
|
2403
|
+
});
|
|
2404
|
+
}
|
|
2405
|
+
|
|
2187
2406
|
/** @returns {OtpConfiguration} */
|
|
2188
2407
|
static OtpConfiguration() {
|
|
2189
2408
|
return Joi.object({
|
|
2190
2409
|
otp_length: Joi.number().required(),
|
|
2191
2410
|
type: Joi.string().allow("").required(),
|
|
2192
2411
|
expiry: CommunicationPlatformModel.OtpConfigurationExpiry().required(),
|
|
2412
|
+
rate_limit: CommunicationPlatformModel.OtpConfigRateLimit().required(),
|
|
2193
2413
|
application_id: Joi.string().allow(""),
|
|
2194
2414
|
company_id: Joi.string().allow(""),
|
|
2195
2415
|
});
|