@gofynd/fdk-client-javascript 1.6.4 → 3.1.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 +100 -80
- package/sdk/application/Cart/CartApplicationClient.js +257 -126
- 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 +61 -21
- package/sdk/application/Content/ContentApplicationClient.js +250 -36
- package/sdk/application/Lead/LeadApplicationClient.d.ts +3 -3
- package/sdk/application/Lead/LeadApplicationClient.js +3 -3
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +106 -57
- package/sdk/application/Logistic/LogisticApplicationClient.js +326 -208
- 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 +0 -10
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +0 -75
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +1 -54
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +0 -43
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +0 -1
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +0 -6
- 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 +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +388 -443
- package/sdk/platform/Billing/BillingPlatformModel.js +263 -280
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +18 -16
- package/sdk/platform/Billing/BillingPlatformValidator.js +9 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +251 -172
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +639 -521
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +165 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +108 -132
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3150 -4468
- package/sdk/platform/Cart/CartPlatformModel.js +2858 -1867
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +976 -380
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +6475 -2015
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1083 -162
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +884 -80
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +325 -568
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1162 -1562
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6008 -7688
- package/sdk/platform/Catalog/CatalogPlatformModel.js +9522 -6892
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +234 -227
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +183 -177
- 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 -238
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +876 -588
- 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 +506 -270
- package/sdk/platform/Communication/CommunicationPlatformModel.js +611 -313
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +62 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +48 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +78 -77
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +97 -91
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +238 -256
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +222 -244
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +31 -20
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +25 -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 +1206 -459
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +1011 -320
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +80 -34
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +79 -24
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +255 -140
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1095 -464
- 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 +871 -1315
- package/sdk/platform/Content/ContentPlatformModel.js +940 -599
- 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 +486 -277
- package/sdk/platform/Order/OrderPlatformClient.js +1491 -938
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4560 -8636
- package/sdk/platform/Order/OrderPlatformModel.js +3604 -4056
- 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 +3531 -1292
- package/sdk/platform/Payment/PaymentPlatformModel.js +3813 -1504
- 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 +2188 -302
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +394 -54
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +342 -37
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +150 -212
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +589 -1238
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +3581 -2960
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3730 -1779
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +230 -382
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +164 -287
- 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 +11 -50
- package/sdk/platform/Share/SharePlatformModel.js +5 -43
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +36 -16
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +201 -58
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +28 -17
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +33 -16
- 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/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 +0 -2
- package/sdk/public/PublicClient.js +0 -4
- 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 +0 -1
- package/sdk/public/index.js +0 -2
- 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
|
|
|
@@ -115,8 +268,8 @@ const Joi = require("joi");
|
|
|
115
268
|
/**
|
|
116
269
|
* @typedef Stats
|
|
117
270
|
* @property {string} [_id]
|
|
118
|
-
* @property {
|
|
119
|
-
* @property {
|
|
271
|
+
* @property {StatsImported} [imported]
|
|
272
|
+
* @property {StatsProcessed} [processed]
|
|
120
273
|
*/
|
|
121
274
|
|
|
122
275
|
/**
|
|
@@ -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,96 +569,80 @@ const Joi = require("joi");
|
|
|
416
569
|
*/
|
|
417
570
|
|
|
418
571
|
/**
|
|
419
|
-
* @typedef
|
|
420
|
-
* @property {
|
|
572
|
+
* @typedef SubscribedSmsTemplates
|
|
573
|
+
* @property {SmsTemplates[]} [items]
|
|
421
574
|
*/
|
|
422
575
|
|
|
423
576
|
/**
|
|
424
|
-
* @typedef
|
|
425
|
-
* @property {
|
|
426
|
-
* @property {Object} [value]
|
|
427
|
-
*/
|
|
428
|
-
|
|
429
|
-
/**
|
|
430
|
-
* @typedef PayloadEmailProviderStructure
|
|
431
|
-
* @property {string} [_id]
|
|
577
|
+
* @typedef SubscribedEmailTemplates
|
|
578
|
+
* @property {EmailTemplate[]} [items]
|
|
432
579
|
*/
|
|
433
580
|
|
|
434
581
|
/**
|
|
435
|
-
* @typedef
|
|
436
|
-
* @property {
|
|
437
|
-
* @property {
|
|
582
|
+
* @typedef EventSubscriptionTemplateSms
|
|
583
|
+
* @property {boolean} [subscribed]
|
|
584
|
+
* @property {string} [template]
|
|
438
585
|
*/
|
|
439
586
|
|
|
440
587
|
/**
|
|
441
|
-
* @typedef
|
|
442
|
-
* @property {
|
|
443
|
-
* @property {
|
|
588
|
+
* @typedef EventSubscriptionTemplateEmail
|
|
589
|
+
* @property {boolean} [subscribed]
|
|
590
|
+
* @property {string} [template]
|
|
444
591
|
*/
|
|
445
592
|
|
|
446
593
|
/**
|
|
447
|
-
* @typedef
|
|
448
|
-
* @property {
|
|
594
|
+
* @typedef EventSubscriptionTemplatePushnotification
|
|
595
|
+
* @property {boolean} [subscribed]
|
|
449
596
|
*/
|
|
450
597
|
|
|
451
598
|
/**
|
|
452
|
-
* @typedef
|
|
453
|
-
* @property {
|
|
454
|
-
* @property {
|
|
599
|
+
* @typedef EventSubscriptionTemplate
|
|
600
|
+
* @property {EventSubscriptionTemplateSms} [sms]
|
|
601
|
+
* @property {EventSubscriptionTemplateEmail} [email]
|
|
602
|
+
* @property {EventSubscriptionTemplatePushnotification} [pushnotification]
|
|
455
603
|
*/
|
|
456
604
|
|
|
457
605
|
/**
|
|
458
|
-
* @typedef
|
|
459
|
-
* @property {
|
|
460
|
-
* @property {
|
|
461
|
-
* @property {
|
|
606
|
+
* @typedef EventSubscription
|
|
607
|
+
* @property {EventSubscriptionTemplate} [template]
|
|
608
|
+
* @property {boolean} [is_default]
|
|
609
|
+
* @property {string} [_id]
|
|
462
610
|
* @property {string} [application]
|
|
611
|
+
* @property {string} [category]
|
|
612
|
+
* @property {Object} [event]
|
|
613
|
+
* @property {string} [slug]
|
|
614
|
+
* @property {string} [created_at]
|
|
615
|
+
* @property {string} [updated_at]
|
|
616
|
+
* @property {number} [__v]
|
|
463
617
|
*/
|
|
464
618
|
|
|
465
619
|
/**
|
|
466
|
-
* @typedef
|
|
467
|
-
* @property {string} [job_type]
|
|
468
|
-
* @property {string} [action]
|
|
469
|
-
* @property {string} [trace]
|
|
470
|
-
* @property {string} [timestamp]
|
|
471
|
-
*/
|
|
472
|
-
|
|
473
|
-
/**
|
|
474
|
-
* @typedef EnginePayload
|
|
475
|
-
* @property {PayloadStructure} [payload]
|
|
476
|
-
* @property {MetaStructure} [meta]
|
|
477
|
-
*/
|
|
478
|
-
|
|
479
|
-
/**
|
|
480
|
-
* @typedef EngineResult
|
|
481
|
-
* @property {boolean} [success]
|
|
482
|
-
*/
|
|
483
|
-
|
|
484
|
-
/**
|
|
485
|
-
* @typedef EventSubscriptionTemplateSms
|
|
620
|
+
* @typedef EventSubscriptionTemplateSmsObj
|
|
486
621
|
* @property {boolean} [subscribed]
|
|
487
|
-
* @property {
|
|
622
|
+
* @property {Object} [template]
|
|
488
623
|
*/
|
|
489
624
|
|
|
490
625
|
/**
|
|
491
|
-
* @typedef
|
|
626
|
+
* @typedef EventSubscriptionTemplateEmailObj
|
|
492
627
|
* @property {boolean} [subscribed]
|
|
493
628
|
* @property {string} [template]
|
|
494
629
|
*/
|
|
495
630
|
|
|
496
631
|
/**
|
|
497
|
-
* @typedef
|
|
498
|
-
* @property {
|
|
499
|
-
* @property {
|
|
632
|
+
* @typedef EventSubscriptionTemplateObj
|
|
633
|
+
* @property {EventSubscriptionTemplateSmsObj} [sms]
|
|
634
|
+
* @property {EventSubscriptionTemplateEmailObj} [email]
|
|
635
|
+
* @property {EventSubscriptionTemplatePushnotification} [pushnotification]
|
|
500
636
|
*/
|
|
501
637
|
|
|
502
638
|
/**
|
|
503
|
-
* @typedef
|
|
504
|
-
* @property {
|
|
639
|
+
* @typedef EventSubscriptionObj
|
|
640
|
+
* @property {EventSubscriptionTemplateObj} [template]
|
|
505
641
|
* @property {boolean} [is_default]
|
|
506
642
|
* @property {string} [_id]
|
|
507
643
|
* @property {string} [application]
|
|
508
|
-
* @property {string} [
|
|
644
|
+
* @property {string} [category]
|
|
645
|
+
* @property {Object} [event]
|
|
509
646
|
* @property {string} [slug]
|
|
510
647
|
* @property {string} [created_at]
|
|
511
648
|
* @property {string} [updated_at]
|
|
@@ -514,28 +651,28 @@ const Joi = require("joi");
|
|
|
514
651
|
|
|
515
652
|
/**
|
|
516
653
|
* @typedef EventSubscriptions
|
|
517
|
-
* @property {
|
|
654
|
+
* @property {EventSubscriptionObj[]} [items]
|
|
518
655
|
* @property {Page} [page]
|
|
519
656
|
*/
|
|
520
657
|
|
|
521
658
|
/**
|
|
522
|
-
* @typedef
|
|
659
|
+
* @typedef TriggerJobResponse
|
|
523
660
|
* @property {number} [status]
|
|
524
661
|
*/
|
|
525
662
|
|
|
526
663
|
/**
|
|
527
|
-
* @typedef
|
|
664
|
+
* @typedef TriggerJobRequest
|
|
528
665
|
* @property {string} [job_id]
|
|
529
666
|
*/
|
|
530
667
|
|
|
531
668
|
/**
|
|
532
|
-
* @typedef
|
|
669
|
+
* @typedef GlobalVariablesGetResponse
|
|
533
670
|
* @property {Object} [read_only]
|
|
534
671
|
* @property {Object} [editable]
|
|
535
672
|
*/
|
|
536
673
|
|
|
537
674
|
/**
|
|
538
|
-
* @typedef
|
|
675
|
+
* @typedef GlobalVariablesPostResponse
|
|
539
676
|
* @property {string} [_id]
|
|
540
677
|
* @property {string} [category]
|
|
541
678
|
* @property {string} [application]
|
|
@@ -585,8 +722,8 @@ const Joi = require("joi");
|
|
|
585
722
|
|
|
586
723
|
/**
|
|
587
724
|
* @typedef JobLog
|
|
588
|
-
* @property {
|
|
589
|
-
* @property {
|
|
725
|
+
* @property {StatsImported} [imported]
|
|
726
|
+
* @property {StatsProcessed} [processed]
|
|
590
727
|
* @property {string} [_id]
|
|
591
728
|
* @property {string} [job]
|
|
592
729
|
* @property {string} [campaign]
|
|
@@ -604,6 +741,16 @@ const Joi = require("joi");
|
|
|
604
741
|
/**
|
|
605
742
|
* @typedef LogEmail
|
|
606
743
|
* @property {string} [template]
|
|
744
|
+
* @property {string} [provider]
|
|
745
|
+
* @property {string} [to]
|
|
746
|
+
*/
|
|
747
|
+
|
|
748
|
+
/**
|
|
749
|
+
* @typedef LogSms
|
|
750
|
+
* @property {string} [template]
|
|
751
|
+
* @property {string} [provider]
|
|
752
|
+
* @property {string} [phone_number]
|
|
753
|
+
* @property {string} [country_code]
|
|
607
754
|
*/
|
|
608
755
|
|
|
609
756
|
/**
|
|
@@ -613,8 +760,10 @@ const Joi = require("joi");
|
|
|
613
760
|
|
|
614
761
|
/**
|
|
615
762
|
* @typedef LogMeta
|
|
616
|
-
* @property {string} [type]
|
|
617
763
|
* @property {string} [identifier]
|
|
764
|
+
* @property {string} [type]
|
|
765
|
+
* @property {string} [job]
|
|
766
|
+
* @property {string} [campaign]
|
|
618
767
|
* @property {string} [key]
|
|
619
768
|
* @property {string} [offset]
|
|
620
769
|
* @property {string} [partition]
|
|
@@ -624,16 +773,18 @@ const Joi = require("joi");
|
|
|
624
773
|
/**
|
|
625
774
|
* @typedef Log
|
|
626
775
|
* @property {LogEmail} [email]
|
|
776
|
+
* @property {LogSms} [sms]
|
|
627
777
|
* @property {LogPushnotification} [pushnotification]
|
|
628
|
-
* @property {LogMeta} [meta]
|
|
629
778
|
* @property {string} [_id]
|
|
630
|
-
* @property {string} [
|
|
779
|
+
* @property {string} [pod]
|
|
631
780
|
* @property {string} [service]
|
|
632
781
|
* @property {string} [step]
|
|
782
|
+
* @property {string} [source]
|
|
633
783
|
* @property {string} [status]
|
|
634
|
-
* @property {Object} [data]
|
|
635
784
|
* @property {string} [expire_at]
|
|
636
785
|
* @property {string} [created_at]
|
|
786
|
+
* @property {LogMeta} [meta]
|
|
787
|
+
* @property {string} [application]
|
|
637
788
|
*/
|
|
638
789
|
|
|
639
790
|
/**
|
|
@@ -642,12 +793,6 @@ const Joi = require("joi");
|
|
|
642
793
|
* @property {Page} [page]
|
|
643
794
|
*/
|
|
644
795
|
|
|
645
|
-
/**
|
|
646
|
-
* @typedef SendOtpSmsCommsTemplate
|
|
647
|
-
* @property {string} [key]
|
|
648
|
-
* @property {Object} [value]
|
|
649
|
-
*/
|
|
650
|
-
|
|
651
796
|
/**
|
|
652
797
|
* @typedef SendOtpSmsCommsProvider
|
|
653
798
|
* @property {string} [slug]
|
|
@@ -678,7 +823,7 @@ const Joi = require("joi");
|
|
|
678
823
|
* @typedef SendOtpCommsReqSms
|
|
679
824
|
* @property {number} [otp_length]
|
|
680
825
|
* @property {number} [expiry]
|
|
681
|
-
* @property {
|
|
826
|
+
* @property {Object} [template]
|
|
682
827
|
* @property {SendOtpSmsCommsProvider} [provider]
|
|
683
828
|
*/
|
|
684
829
|
|
|
@@ -737,16 +882,9 @@ const Joi = require("joi");
|
|
|
737
882
|
* @property {string} [email]
|
|
738
883
|
*/
|
|
739
884
|
|
|
740
|
-
/**
|
|
741
|
-
* @typedef VerifyOtpCommsErrorRes
|
|
742
|
-
* @property {boolean} [success]
|
|
743
|
-
* @property {string} [message]
|
|
744
|
-
*/
|
|
745
|
-
|
|
746
885
|
/**
|
|
747
886
|
* @typedef SmsProviderReq
|
|
748
887
|
* @property {string} [name]
|
|
749
|
-
* @property {string} [token]
|
|
750
888
|
* @property {string} [description]
|
|
751
889
|
* @property {string} [sender]
|
|
752
890
|
* @property {string} [username]
|
|
@@ -765,16 +903,10 @@ const Joi = require("joi");
|
|
|
765
903
|
* @property {number} [version_id] - The version ID for the test.
|
|
766
904
|
* @property {string} [sender_id] - The sender ID for the test.
|
|
767
905
|
* @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
906
|
*/
|
|
771
907
|
|
|
772
908
|
/**
|
|
773
909
|
* @typedef SmsProvider
|
|
774
|
-
* @property {string} [token]
|
|
775
|
-
* @property {string} [sender_id]
|
|
776
|
-
* @property {string} [api_key]
|
|
777
|
-
* @property {number} [expiry_date]
|
|
778
910
|
* @property {number} [rpt]
|
|
779
911
|
* @property {string} [type]
|
|
780
912
|
* @property {string} [provider]
|
|
@@ -784,6 +916,7 @@ const Joi = require("joi");
|
|
|
784
916
|
* @property {string} [sender]
|
|
785
917
|
* @property {string} [username]
|
|
786
918
|
* @property {string} [authkey]
|
|
919
|
+
* @property {string} [entity_id]
|
|
787
920
|
* @property {string} [application]
|
|
788
921
|
* @property {string} [created_at]
|
|
789
922
|
* @property {string} [updated_at]
|
|
@@ -889,6 +1022,13 @@ const Joi = require("joi");
|
|
|
889
1022
|
* @property {string} [click_action]
|
|
890
1023
|
*/
|
|
891
1024
|
|
|
1025
|
+
/**
|
|
1026
|
+
* @typedef SystemNotificationSetting
|
|
1027
|
+
* @property {boolean} [sound]
|
|
1028
|
+
* @property {string} [priority]
|
|
1029
|
+
* @property {string} [time_to_live]
|
|
1030
|
+
*/
|
|
1031
|
+
|
|
892
1032
|
/**
|
|
893
1033
|
* @typedef SystemNotificationUser
|
|
894
1034
|
* @property {string} [type]
|
|
@@ -899,7 +1039,7 @@ const Joi = require("joi");
|
|
|
899
1039
|
* @typedef SystemNotification
|
|
900
1040
|
* @property {Notification} [notification]
|
|
901
1041
|
* @property {SystemNotificationUser} [user]
|
|
902
|
-
* @property {
|
|
1042
|
+
* @property {SystemNotificationSetting} [settings]
|
|
903
1043
|
* @property {string} [_id]
|
|
904
1044
|
* @property {string} [group]
|
|
905
1045
|
* @property {string} [created_at]
|
|
@@ -921,59 +1061,239 @@ const Joi = require("joi");
|
|
|
921
1061
|
* @property {number} [current] - The current page number.
|
|
922
1062
|
* @property {string} type - The type of the page, such as 'PageType'.
|
|
923
1063
|
* @property {number} [size] - The number of items per page.
|
|
1064
|
+
* @property {number} [total] - Total number of items.
|
|
924
1065
|
*/
|
|
925
1066
|
|
|
926
|
-
/**
|
|
927
|
-
* @typedef
|
|
928
|
-
* @property {
|
|
929
|
-
* @property {
|
|
930
|
-
*/
|
|
1067
|
+
/**
|
|
1068
|
+
* @typedef BasicDelete
|
|
1069
|
+
* @property {boolean} [acknowledged]
|
|
1070
|
+
* @property {number} [deleted_count]
|
|
1071
|
+
*/
|
|
1072
|
+
|
|
1073
|
+
/**
|
|
1074
|
+
* @typedef EnabledObj
|
|
1075
|
+
* @property {boolean} [enabled]
|
|
1076
|
+
*/
|
|
1077
|
+
|
|
1078
|
+
/**
|
|
1079
|
+
* @typedef OtpConfigurationExpiryDuration
|
|
1080
|
+
* @property {number} time
|
|
1081
|
+
* @property {string} denomination
|
|
1082
|
+
*/
|
|
1083
|
+
|
|
1084
|
+
/**
|
|
1085
|
+
* @typedef OtpConfigurationExpiry
|
|
1086
|
+
* @property {OtpConfigurationExpiryDuration} duration
|
|
1087
|
+
* @property {string} type
|
|
1088
|
+
*/
|
|
1089
|
+
|
|
1090
|
+
/**
|
|
1091
|
+
* @typedef OtpConfigRateLimit
|
|
1092
|
+
* @property {number} [duration]
|
|
1093
|
+
* @property {number} [limit]
|
|
1094
|
+
*/
|
|
1095
|
+
|
|
1096
|
+
/**
|
|
1097
|
+
* @typedef OtpConfiguration
|
|
1098
|
+
* @property {number} otp_length
|
|
1099
|
+
* @property {string} type
|
|
1100
|
+
* @property {OtpConfigurationExpiry} expiry
|
|
1101
|
+
* @property {OtpConfigRateLimit} rate_limit
|
|
1102
|
+
* @property {string} [application_id]
|
|
1103
|
+
* @property {string} [company_id]
|
|
1104
|
+
*/
|
|
1105
|
+
|
|
1106
|
+
class CommunicationPlatformModel {
|
|
1107
|
+
/** @returns {AppProvidersGlobalProviderRequestObjProvider} */
|
|
1108
|
+
static AppProvidersGlobalProviderRequestObjProvider() {
|
|
1109
|
+
return Joi.object({
|
|
1110
|
+
provider: Joi.string().allow(""),
|
|
1111
|
+
});
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
/** @returns {AppProvidersGlobalProviderRequestObj} */
|
|
1115
|
+
static AppProvidersGlobalProviderRequestObj() {
|
|
1116
|
+
return Joi.object({
|
|
1117
|
+
transaction: CommunicationPlatformModel.AppProvidersGlobalProviderRequestObjProvider(),
|
|
1118
|
+
otp: CommunicationPlatformModel.AppProvidersGlobalProviderRequestObjProvider(),
|
|
1119
|
+
});
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
/** @returns {AppProvidersGlobalProviderRequest} */
|
|
1123
|
+
static AppProvidersGlobalProviderRequest() {
|
|
1124
|
+
return Joi.object({
|
|
1125
|
+
email: CommunicationPlatformModel.AppProvidersGlobalProviderRequestObj(),
|
|
1126
|
+
sms: CommunicationPlatformModel.AppProvidersGlobalProviderRequestObj(),
|
|
1127
|
+
});
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
/** @returns {UpdateAppProvidersGlobalProviderResponseEmailSmsObj} */
|
|
1131
|
+
static UpdateAppProvidersGlobalProviderResponseEmailSmsObj() {
|
|
1132
|
+
return Joi.object({
|
|
1133
|
+
default_provider: Joi.string().allow("").allow(null),
|
|
1134
|
+
otp_provider: Joi.string().allow("").allow(null),
|
|
1135
|
+
});
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
/** @returns {UpdateAppProvidersGlobalProviderResponse} */
|
|
1139
|
+
static UpdateAppProvidersGlobalProviderResponse() {
|
|
1140
|
+
return Joi.object({
|
|
1141
|
+
email: CommunicationPlatformModel.UpdateAppProvidersGlobalProviderResponseEmailSmsObj(),
|
|
1142
|
+
sms: CommunicationPlatformModel.UpdateAppProvidersGlobalProviderResponseEmailSmsObj(),
|
|
1143
|
+
_id: Joi.string().allow(""),
|
|
1144
|
+
slug: Joi.string().allow(""),
|
|
1145
|
+
});
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
/** @returns {DefaultEmailProvidersFromAddresses} */
|
|
1149
|
+
static DefaultEmailProvidersFromAddresses() {
|
|
1150
|
+
return Joi.object({
|
|
1151
|
+
name: Joi.string().allow(""),
|
|
1152
|
+
email: Joi.string().allow(""),
|
|
1153
|
+
is_default: Joi.boolean(),
|
|
1154
|
+
});
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
/** @returns {DefaultEmailProviders} */
|
|
1158
|
+
static DefaultEmailProviders() {
|
|
1159
|
+
return Joi.object({
|
|
1160
|
+
_id: Joi.string().allow(""),
|
|
1161
|
+
from_address: Joi.array().items(
|
|
1162
|
+
CommunicationPlatformModel.DefaultEmailProvidersFromAddresses()
|
|
1163
|
+
),
|
|
1164
|
+
name: Joi.string().allow(""),
|
|
1165
|
+
is_default: Joi.boolean(),
|
|
1166
|
+
});
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
/** @returns {PushtokenReq} */
|
|
1170
|
+
static PushtokenReq() {
|
|
1171
|
+
return Joi.object({
|
|
1172
|
+
action: Joi.string().allow(""),
|
|
1173
|
+
bundle_identifier: Joi.string().allow(""),
|
|
1174
|
+
push_token: Joi.string().allow(""),
|
|
1175
|
+
unique_device_id: Joi.string().allow(""),
|
|
1176
|
+
type: Joi.string().allow(""),
|
|
1177
|
+
});
|
|
1178
|
+
}
|
|
1179
|
+
|
|
1180
|
+
/** @returns {PushtokenRes} */
|
|
1181
|
+
static PushtokenRes() {
|
|
1182
|
+
return Joi.object({
|
|
1183
|
+
_id: Joi.string().allow(""),
|
|
1184
|
+
bundle_identifier: Joi.string().allow(""),
|
|
1185
|
+
push_token: Joi.string().allow(""),
|
|
1186
|
+
unique_device_id: Joi.string().allow(""),
|
|
1187
|
+
type: Joi.string().allow(""),
|
|
1188
|
+
platform: Joi.string().allow(""),
|
|
1189
|
+
application_id: Joi.string().allow(""),
|
|
1190
|
+
user_id: Joi.string().allow(""),
|
|
1191
|
+
created_at: Joi.string().allow(""),
|
|
1192
|
+
updated_at: Joi.string().allow(""),
|
|
1193
|
+
expired_at: Joi.string().allow(""),
|
|
1194
|
+
});
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
/** @returns {SendInstantResponse} */
|
|
1198
|
+
static SendInstantResponse() {
|
|
1199
|
+
return Joi.object({
|
|
1200
|
+
success: Joi.boolean(),
|
|
1201
|
+
provider: Joi.string().allow("").allow(null),
|
|
1202
|
+
response: Joi.boolean().allow(null),
|
|
1203
|
+
});
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
/** @returns {MetaStructure} */
|
|
1207
|
+
static MetaStructure() {
|
|
1208
|
+
return Joi.object({
|
|
1209
|
+
job_type: Joi.string().allow(""),
|
|
1210
|
+
action: Joi.string().allow(""),
|
|
1211
|
+
trace: Joi.string().allow(""),
|
|
1212
|
+
timestamp: Joi.string().allow(""),
|
|
1213
|
+
});
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
/** @returns {PayloadSmsTemplateStructure} */
|
|
1217
|
+
static PayloadSmsTemplateStructure() {
|
|
1218
|
+
return Joi.object({
|
|
1219
|
+
key: Joi.string().allow(""),
|
|
1220
|
+
value: Joi.any(),
|
|
1221
|
+
});
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
/** @returns {PayloadSmsProviderStructure} */
|
|
1225
|
+
static PayloadSmsProviderStructure() {
|
|
1226
|
+
return Joi.object({
|
|
1227
|
+
slug: Joi.string().allow(""),
|
|
1228
|
+
});
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
/** @returns {PayloadEmailTemplateStructure} */
|
|
1232
|
+
static PayloadEmailTemplateStructure() {
|
|
1233
|
+
return Joi.object({
|
|
1234
|
+
key: Joi.string().allow(""),
|
|
1235
|
+
value: Joi.any(),
|
|
1236
|
+
});
|
|
1237
|
+
}
|
|
931
1238
|
|
|
932
|
-
/**
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
*/
|
|
1239
|
+
/** @returns {PayloadEmailProviderStructure} */
|
|
1240
|
+
static PayloadEmailProviderStructure() {
|
|
1241
|
+
return Joi.object({
|
|
1242
|
+
slug: Joi.string().allow(""),
|
|
1243
|
+
});
|
|
1244
|
+
}
|
|
939
1245
|
|
|
940
|
-
/**
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
1246
|
+
/** @returns {PayloadEmailStructure} */
|
|
1247
|
+
static PayloadEmailStructure() {
|
|
1248
|
+
return Joi.object({
|
|
1249
|
+
template: CommunicationPlatformModel.PayloadEmailTemplateStructure(),
|
|
1250
|
+
provider: CommunicationPlatformModel.PayloadEmailProviderStructure(),
|
|
1251
|
+
});
|
|
1252
|
+
}
|
|
947
1253
|
|
|
948
|
-
/**
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
1254
|
+
/** @returns {PayloadSmsStructure} */
|
|
1255
|
+
static PayloadSmsStructure() {
|
|
1256
|
+
return Joi.object({
|
|
1257
|
+
template: CommunicationPlatformModel.PayloadSmsTemplateStructure(),
|
|
1258
|
+
provider: CommunicationPlatformModel.PayloadSmsProviderStructure(),
|
|
1259
|
+
});
|
|
1260
|
+
}
|
|
952
1261
|
|
|
953
|
-
/**
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
1262
|
+
/** @returns {SendSyncData} */
|
|
1263
|
+
static SendSyncData() {
|
|
1264
|
+
return Joi.object({
|
|
1265
|
+
phone_number: Joi.string().allow(""),
|
|
1266
|
+
country_code: Joi.string().allow(""),
|
|
1267
|
+
to: Joi.string().allow(""),
|
|
1268
|
+
});
|
|
1269
|
+
}
|
|
958
1270
|
|
|
959
|
-
/**
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
1271
|
+
/** @returns {SendSyncRequest} */
|
|
1272
|
+
static SendSyncRequest() {
|
|
1273
|
+
return Joi.object({
|
|
1274
|
+
data: Joi.array().items(CommunicationPlatformModel.SendSyncData()),
|
|
1275
|
+
email: CommunicationPlatformModel.PayloadEmailStructure(),
|
|
1276
|
+
sms: CommunicationPlatformModel.PayloadSmsStructure(),
|
|
1277
|
+
});
|
|
1278
|
+
}
|
|
964
1279
|
|
|
965
|
-
/**
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
*/
|
|
1280
|
+
/** @returns {EngineRequest} */
|
|
1281
|
+
static EngineRequest() {
|
|
1282
|
+
return Joi.object({
|
|
1283
|
+
payload: CommunicationPlatformModel.SendSyncRequest(),
|
|
1284
|
+
meta: CommunicationPlatformModel.MetaStructure(),
|
|
1285
|
+
});
|
|
1286
|
+
}
|
|
973
1287
|
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
1288
|
+
/** @returns {EngineResponse} */
|
|
1289
|
+
static EngineResponse() {
|
|
1290
|
+
return Joi.object({
|
|
1291
|
+
success: Joi.boolean(),
|
|
1292
|
+
});
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
/** @returns {EventSubscriptionsBulkUpdateRequest} */
|
|
1296
|
+
static EventSubscriptionsBulkUpdateRequest() {
|
|
977
1297
|
return Joi.object({
|
|
978
1298
|
subscriptions: Joi.array().items(
|
|
979
1299
|
CommunicationPlatformModel.SubscriptionsObject()
|
|
@@ -981,8 +1301,8 @@ class CommunicationPlatformModel {
|
|
|
981
1301
|
});
|
|
982
1302
|
}
|
|
983
1303
|
|
|
984
|
-
/** @returns {
|
|
985
|
-
static
|
|
1304
|
+
/** @returns {EventSubscriptionsBulkUpdateResponse} */
|
|
1305
|
+
static EventSubscriptionsBulkUpdateResponse() {
|
|
986
1306
|
return Joi.object({
|
|
987
1307
|
template: CommunicationPlatformModel.EventSubscriptionTemplate(),
|
|
988
1308
|
_id: Joi.string().allow(""),
|
|
@@ -996,10 +1316,21 @@ class CommunicationPlatformModel {
|
|
|
996
1316
|
});
|
|
997
1317
|
}
|
|
998
1318
|
|
|
1319
|
+
/** @returns {SubscriptionsObjectRequest} */
|
|
1320
|
+
static SubscriptionsObjectRequest() {
|
|
1321
|
+
return Joi.object({
|
|
1322
|
+
event: Joi.string().allow(""),
|
|
1323
|
+
slug: Joi.string().allow(""),
|
|
1324
|
+
template: CommunicationPlatformModel.TemplateObject(),
|
|
1325
|
+
});
|
|
1326
|
+
}
|
|
1327
|
+
|
|
999
1328
|
/** @returns {SubscriptionsObject} */
|
|
1000
1329
|
static SubscriptionsObject() {
|
|
1001
1330
|
return Joi.object({
|
|
1002
1331
|
_id: Joi.string().allow(""),
|
|
1332
|
+
event: Joi.string().allow(""),
|
|
1333
|
+
slug: Joi.string().allow(""),
|
|
1003
1334
|
template: CommunicationPlatformModel.TemplateObject(),
|
|
1004
1335
|
});
|
|
1005
1336
|
}
|
|
@@ -1128,8 +1459,8 @@ class CommunicationPlatformModel {
|
|
|
1128
1459
|
static Stats() {
|
|
1129
1460
|
return Joi.object({
|
|
1130
1461
|
_id: Joi.string().allow(""),
|
|
1131
|
-
imported:
|
|
1132
|
-
processed:
|
|
1462
|
+
imported: CommunicationPlatformModel.StatsImported(),
|
|
1463
|
+
processed: CommunicationPlatformModel.StatsProcessed(),
|
|
1133
1464
|
});
|
|
1134
1465
|
}
|
|
1135
1466
|
|
|
@@ -1143,6 +1474,9 @@ class CommunicationPlatformModel {
|
|
|
1143
1474
|
/** @returns {CampaignReq} */
|
|
1144
1475
|
static CampaignReq() {
|
|
1145
1476
|
return Joi.object({
|
|
1477
|
+
recipient_headers: CommunicationPlatformModel.RecipientHeaders(),
|
|
1478
|
+
email: CommunicationPlatformModel.CampaignEmail(),
|
|
1479
|
+
datasource: Joi.string().allow(""),
|
|
1146
1480
|
description: Joi.string().allow(""),
|
|
1147
1481
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
1148
1482
|
headers: Joi.array().items(Joi.string().allow("")),
|
|
@@ -1193,7 +1527,7 @@ class CommunicationPlatformModel {
|
|
|
1193
1527
|
recipient_headers: CommunicationPlatformModel.RecipientHeaders(),
|
|
1194
1528
|
email: CommunicationPlatformModel.CampaignEmail(),
|
|
1195
1529
|
description: Joi.string().allow(""),
|
|
1196
|
-
tags: Joi.array().items(Joi.
|
|
1530
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
1197
1531
|
is_active: Joi.boolean(),
|
|
1198
1532
|
_id: Joi.string().allow(""),
|
|
1199
1533
|
datasource: Joi.string().allow(""),
|
|
@@ -1215,21 +1549,6 @@ class CommunicationPlatformModel {
|
|
|
1215
1549
|
});
|
|
1216
1550
|
}
|
|
1217
1551
|
|
|
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
1552
|
/** @returns {AudienceReq} */
|
|
1234
1553
|
static AudienceReq() {
|
|
1235
1554
|
return Joi.object({
|
|
@@ -1403,7 +1722,7 @@ class CommunicationPlatformModel {
|
|
|
1403
1722
|
reply_to: Joi.string().allow(""),
|
|
1404
1723
|
priority: Joi.string().allow(""),
|
|
1405
1724
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
1406
|
-
template_variables: Joi.
|
|
1725
|
+
template_variables: Joi.any(),
|
|
1407
1726
|
published: Joi.boolean(),
|
|
1408
1727
|
subject: CommunicationPlatformModel.TemplateAndType(),
|
|
1409
1728
|
html: CommunicationPlatformModel.TemplateAndType(),
|
|
@@ -1426,6 +1745,15 @@ class CommunicationPlatformModel {
|
|
|
1426
1745
|
});
|
|
1427
1746
|
}
|
|
1428
1747
|
|
|
1748
|
+
/** @returns {TemplateKeys} */
|
|
1749
|
+
static TemplateKeys() {
|
|
1750
|
+
return Joi.object({
|
|
1751
|
+
to: Joi.string().allow(""),
|
|
1752
|
+
cc: Joi.string().allow(""),
|
|
1753
|
+
bcc: Joi.string().allow(""),
|
|
1754
|
+
});
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1429
1757
|
/** @returns {EmailTemplate} */
|
|
1430
1758
|
static EmailTemplate() {
|
|
1431
1759
|
return Joi.object({
|
|
@@ -1442,10 +1770,11 @@ class CommunicationPlatformModel {
|
|
|
1442
1770
|
reply_to: Joi.string().allow(""),
|
|
1443
1771
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
1444
1772
|
subject: CommunicationPlatformModel.TemplateAndType(),
|
|
1773
|
+
keys: CommunicationPlatformModel.TemplateKeys(),
|
|
1445
1774
|
html: CommunicationPlatformModel.TemplateAndType(),
|
|
1446
1775
|
url_shorten: CommunicationPlatformModel.EnabledObj(),
|
|
1447
1776
|
priority: Joi.string().allow(""),
|
|
1448
|
-
template_variables: Joi.
|
|
1777
|
+
template_variables: Joi.any(),
|
|
1449
1778
|
published: Joi.boolean(),
|
|
1450
1779
|
category: Joi.string().allow(""),
|
|
1451
1780
|
_id: Joi.string().allow(""),
|
|
@@ -1477,7 +1806,7 @@ class CommunicationPlatformModel {
|
|
|
1477
1806
|
html: CommunicationPlatformModel.TemplateAndType(),
|
|
1478
1807
|
url_shorten: CommunicationPlatformModel.EnabledObj(),
|
|
1479
1808
|
priority: Joi.string().allow(""),
|
|
1480
|
-
template_variables: Joi.
|
|
1809
|
+
template_variables: Joi.any(),
|
|
1481
1810
|
published: Joi.boolean(),
|
|
1482
1811
|
category: Joi.string().allow(""),
|
|
1483
1812
|
_id: Joi.string().allow(""),
|
|
@@ -1501,128 +1830,102 @@ class CommunicationPlatformModel {
|
|
|
1501
1830
|
});
|
|
1502
1831
|
}
|
|
1503
1832
|
|
|
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() {
|
|
1833
|
+
/** @returns {SubscribedSmsTemplates} */
|
|
1834
|
+
static SubscribedSmsTemplates() {
|
|
1515
1835
|
return Joi.object({
|
|
1516
|
-
|
|
1517
|
-
value: Joi.any(),
|
|
1836
|
+
items: Joi.array().items(CommunicationPlatformModel.SmsTemplates()),
|
|
1518
1837
|
});
|
|
1519
1838
|
}
|
|
1520
1839
|
|
|
1521
|
-
/** @returns {
|
|
1522
|
-
static
|
|
1840
|
+
/** @returns {SubscribedEmailTemplates} */
|
|
1841
|
+
static SubscribedEmailTemplates() {
|
|
1523
1842
|
return Joi.object({
|
|
1524
|
-
|
|
1843
|
+
items: Joi.array().items(CommunicationPlatformModel.EmailTemplate()),
|
|
1525
1844
|
});
|
|
1526
1845
|
}
|
|
1527
1846
|
|
|
1528
|
-
/** @returns {
|
|
1529
|
-
static
|
|
1847
|
+
/** @returns {EventSubscriptionTemplateSms} */
|
|
1848
|
+
static EventSubscriptionTemplateSms() {
|
|
1530
1849
|
return Joi.object({
|
|
1531
|
-
|
|
1532
|
-
|
|
1850
|
+
subscribed: Joi.boolean(),
|
|
1851
|
+
template: Joi.string().allow("").allow(null),
|
|
1533
1852
|
});
|
|
1534
1853
|
}
|
|
1535
1854
|
|
|
1536
|
-
/** @returns {
|
|
1537
|
-
static
|
|
1855
|
+
/** @returns {EventSubscriptionTemplateEmail} */
|
|
1856
|
+
static EventSubscriptionTemplateEmail() {
|
|
1538
1857
|
return Joi.object({
|
|
1539
|
-
|
|
1540
|
-
|
|
1858
|
+
subscribed: Joi.boolean(),
|
|
1859
|
+
template: Joi.string().allow("").allow(null),
|
|
1541
1860
|
});
|
|
1542
1861
|
}
|
|
1543
1862
|
|
|
1544
|
-
/** @returns {
|
|
1545
|
-
static
|
|
1863
|
+
/** @returns {EventSubscriptionTemplatePushnotification} */
|
|
1864
|
+
static EventSubscriptionTemplatePushnotification() {
|
|
1546
1865
|
return Joi.object({
|
|
1547
|
-
|
|
1866
|
+
subscribed: Joi.boolean(),
|
|
1548
1867
|
});
|
|
1549
1868
|
}
|
|
1550
1869
|
|
|
1551
|
-
/** @returns {
|
|
1552
|
-
static
|
|
1870
|
+
/** @returns {EventSubscriptionTemplate} */
|
|
1871
|
+
static EventSubscriptionTemplate() {
|
|
1553
1872
|
return Joi.object({
|
|
1554
|
-
|
|
1555
|
-
|
|
1873
|
+
sms: CommunicationPlatformModel.EventSubscriptionTemplateSms(),
|
|
1874
|
+
email: CommunicationPlatformModel.EventSubscriptionTemplateEmail(),
|
|
1875
|
+
pushnotification: CommunicationPlatformModel.EventSubscriptionTemplatePushnotification(),
|
|
1556
1876
|
});
|
|
1557
1877
|
}
|
|
1558
1878
|
|
|
1559
|
-
/** @returns {
|
|
1560
|
-
static
|
|
1879
|
+
/** @returns {EventSubscription} */
|
|
1880
|
+
static EventSubscription() {
|
|
1561
1881
|
return Joi.object({
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1882
|
+
template: CommunicationPlatformModel.EventSubscriptionTemplate(),
|
|
1883
|
+
is_default: Joi.boolean(),
|
|
1884
|
+
_id: Joi.string().allow(""),
|
|
1565
1885
|
application: Joi.string().allow(""),
|
|
1886
|
+
category: Joi.string().allow(""),
|
|
1887
|
+
event: Joi.any(),
|
|
1888
|
+
slug: Joi.string().allow(""),
|
|
1889
|
+
created_at: Joi.string().allow(""),
|
|
1890
|
+
updated_at: Joi.string().allow(""),
|
|
1891
|
+
__v: Joi.number(),
|
|
1566
1892
|
});
|
|
1567
1893
|
}
|
|
1568
1894
|
|
|
1569
|
-
/** @returns {
|
|
1570
|
-
static
|
|
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() {
|
|
1581
|
-
return Joi.object({
|
|
1582
|
-
payload: CommunicationPlatformModel.PayloadStructure(),
|
|
1583
|
-
meta: CommunicationPlatformModel.MetaStructure(),
|
|
1584
|
-
});
|
|
1585
|
-
}
|
|
1586
|
-
|
|
1587
|
-
/** @returns {EngineResult} */
|
|
1588
|
-
static EngineResult() {
|
|
1589
|
-
return Joi.object({
|
|
1590
|
-
success: Joi.boolean(),
|
|
1591
|
-
});
|
|
1592
|
-
}
|
|
1593
|
-
|
|
1594
|
-
/** @returns {EventSubscriptionTemplateSms} */
|
|
1595
|
-
static EventSubscriptionTemplateSms() {
|
|
1895
|
+
/** @returns {EventSubscriptionTemplateSmsObj} */
|
|
1896
|
+
static EventSubscriptionTemplateSmsObj() {
|
|
1596
1897
|
return Joi.object({
|
|
1597
1898
|
subscribed: Joi.boolean(),
|
|
1598
|
-
template: Joi.
|
|
1899
|
+
template: Joi.any().allow(null),
|
|
1599
1900
|
});
|
|
1600
1901
|
}
|
|
1601
1902
|
|
|
1602
|
-
/** @returns {
|
|
1603
|
-
static
|
|
1903
|
+
/** @returns {EventSubscriptionTemplateEmailObj} */
|
|
1904
|
+
static EventSubscriptionTemplateEmailObj() {
|
|
1604
1905
|
return Joi.object({
|
|
1605
1906
|
subscribed: Joi.boolean(),
|
|
1606
|
-
template: Joi.string().allow(""),
|
|
1907
|
+
template: Joi.string().allow("").allow(null),
|
|
1607
1908
|
});
|
|
1608
1909
|
}
|
|
1609
1910
|
|
|
1610
|
-
/** @returns {
|
|
1611
|
-
static
|
|
1911
|
+
/** @returns {EventSubscriptionTemplateObj} */
|
|
1912
|
+
static EventSubscriptionTemplateObj() {
|
|
1612
1913
|
return Joi.object({
|
|
1613
|
-
sms: CommunicationPlatformModel.
|
|
1614
|
-
email: CommunicationPlatformModel.
|
|
1914
|
+
sms: CommunicationPlatformModel.EventSubscriptionTemplateSmsObj(),
|
|
1915
|
+
email: CommunicationPlatformModel.EventSubscriptionTemplateEmailObj(),
|
|
1916
|
+
pushnotification: CommunicationPlatformModel.EventSubscriptionTemplatePushnotification(),
|
|
1615
1917
|
});
|
|
1616
1918
|
}
|
|
1617
1919
|
|
|
1618
|
-
/** @returns {
|
|
1619
|
-
static
|
|
1920
|
+
/** @returns {EventSubscriptionObj} */
|
|
1921
|
+
static EventSubscriptionObj() {
|
|
1620
1922
|
return Joi.object({
|
|
1621
|
-
template: CommunicationPlatformModel.
|
|
1923
|
+
template: CommunicationPlatformModel.EventSubscriptionTemplateObj(),
|
|
1622
1924
|
is_default: Joi.boolean(),
|
|
1623
1925
|
_id: Joi.string().allow(""),
|
|
1624
1926
|
application: Joi.string().allow(""),
|
|
1625
|
-
|
|
1927
|
+
category: Joi.string().allow(""),
|
|
1928
|
+
event: Joi.any(),
|
|
1626
1929
|
slug: Joi.string().allow(""),
|
|
1627
1930
|
created_at: Joi.string().allow(""),
|
|
1628
1931
|
updated_at: Joi.string().allow(""),
|
|
@@ -1633,40 +1936,42 @@ class CommunicationPlatformModel {
|
|
|
1633
1936
|
/** @returns {EventSubscriptions} */
|
|
1634
1937
|
static EventSubscriptions() {
|
|
1635
1938
|
return Joi.object({
|
|
1636
|
-
items: Joi.array().items(
|
|
1939
|
+
items: Joi.array().items(
|
|
1940
|
+
CommunicationPlatformModel.EventSubscriptionObj()
|
|
1941
|
+
),
|
|
1637
1942
|
page: CommunicationPlatformModel.Page(),
|
|
1638
1943
|
});
|
|
1639
1944
|
}
|
|
1640
1945
|
|
|
1641
|
-
/** @returns {
|
|
1642
|
-
static
|
|
1946
|
+
/** @returns {TriggerJobResponse} */
|
|
1947
|
+
static TriggerJobResponse() {
|
|
1643
1948
|
return Joi.object({
|
|
1644
1949
|
status: Joi.number(),
|
|
1645
1950
|
});
|
|
1646
1951
|
}
|
|
1647
1952
|
|
|
1648
|
-
/** @returns {
|
|
1649
|
-
static
|
|
1953
|
+
/** @returns {TriggerJobRequest} */
|
|
1954
|
+
static TriggerJobRequest() {
|
|
1650
1955
|
return Joi.object({
|
|
1651
1956
|
job_id: Joi.string().allow(""),
|
|
1652
1957
|
});
|
|
1653
1958
|
}
|
|
1654
1959
|
|
|
1655
|
-
/** @returns {
|
|
1656
|
-
static
|
|
1960
|
+
/** @returns {GlobalVariablesGetResponse} */
|
|
1961
|
+
static GlobalVariablesGetResponse() {
|
|
1657
1962
|
return Joi.object({
|
|
1658
|
-
read_only: Joi.
|
|
1659
|
-
editable: Joi.
|
|
1963
|
+
read_only: Joi.any(),
|
|
1964
|
+
editable: Joi.any(),
|
|
1660
1965
|
});
|
|
1661
1966
|
}
|
|
1662
1967
|
|
|
1663
|
-
/** @returns {
|
|
1664
|
-
static
|
|
1968
|
+
/** @returns {GlobalVariablesPostResponse} */
|
|
1969
|
+
static GlobalVariablesPostResponse() {
|
|
1665
1970
|
return Joi.object({
|
|
1666
1971
|
_id: Joi.string().allow(""),
|
|
1667
1972
|
category: Joi.string().allow(""),
|
|
1668
1973
|
application: Joi.string().allow(""),
|
|
1669
|
-
global_variables: Joi.
|
|
1974
|
+
global_variables: Joi.any(),
|
|
1670
1975
|
created_at: Joi.string().allow(""),
|
|
1671
1976
|
});
|
|
1672
1977
|
}
|
|
@@ -1674,7 +1979,7 @@ class CommunicationPlatformModel {
|
|
|
1674
1979
|
/** @returns {GlobalVariablesReq} */
|
|
1675
1980
|
static GlobalVariablesReq() {
|
|
1676
1981
|
return Joi.object({
|
|
1677
|
-
global_variables: Joi.
|
|
1982
|
+
global_variables: Joi.any(),
|
|
1678
1983
|
});
|
|
1679
1984
|
}
|
|
1680
1985
|
|
|
@@ -1724,8 +2029,8 @@ class CommunicationPlatformModel {
|
|
|
1724
2029
|
/** @returns {JobLog} */
|
|
1725
2030
|
static JobLog() {
|
|
1726
2031
|
return Joi.object({
|
|
1727
|
-
imported:
|
|
1728
|
-
processed:
|
|
2032
|
+
imported: CommunicationPlatformModel.StatsImported(),
|
|
2033
|
+
processed: CommunicationPlatformModel.StatsProcessed(),
|
|
1729
2034
|
_id: Joi.string().allow(""),
|
|
1730
2035
|
job: Joi.string().allow(""),
|
|
1731
2036
|
campaign: Joi.string().allow(""),
|
|
@@ -1747,6 +2052,18 @@ class CommunicationPlatformModel {
|
|
|
1747
2052
|
static LogEmail() {
|
|
1748
2053
|
return Joi.object({
|
|
1749
2054
|
template: Joi.string().allow(""),
|
|
2055
|
+
provider: Joi.string().allow(""),
|
|
2056
|
+
to: Joi.string().allow(""),
|
|
2057
|
+
});
|
|
2058
|
+
}
|
|
2059
|
+
|
|
2060
|
+
/** @returns {LogSms} */
|
|
2061
|
+
static LogSms() {
|
|
2062
|
+
return Joi.object({
|
|
2063
|
+
template: Joi.string().allow(""),
|
|
2064
|
+
provider: Joi.string().allow(""),
|
|
2065
|
+
phone_number: Joi.string().allow(""),
|
|
2066
|
+
country_code: Joi.string().allow(""),
|
|
1750
2067
|
});
|
|
1751
2068
|
}
|
|
1752
2069
|
|
|
@@ -1760,8 +2077,10 @@ class CommunicationPlatformModel {
|
|
|
1760
2077
|
/** @returns {LogMeta} */
|
|
1761
2078
|
static LogMeta() {
|
|
1762
2079
|
return Joi.object({
|
|
1763
|
-
type: Joi.string().allow(""),
|
|
1764
2080
|
identifier: Joi.string().allow(""),
|
|
2081
|
+
type: Joi.string().allow(""),
|
|
2082
|
+
job: Joi.string().allow(""),
|
|
2083
|
+
campaign: Joi.string().allow(""),
|
|
1765
2084
|
key: Joi.string().allow(""),
|
|
1766
2085
|
offset: Joi.string().allow(""),
|
|
1767
2086
|
partition: Joi.string().allow(""),
|
|
@@ -1773,16 +2092,18 @@ class CommunicationPlatformModel {
|
|
|
1773
2092
|
static Log() {
|
|
1774
2093
|
return Joi.object({
|
|
1775
2094
|
email: CommunicationPlatformModel.LogEmail(),
|
|
2095
|
+
sms: CommunicationPlatformModel.LogSms(),
|
|
1776
2096
|
pushnotification: CommunicationPlatformModel.LogPushnotification(),
|
|
1777
|
-
meta: CommunicationPlatformModel.LogMeta(),
|
|
1778
2097
|
_id: Joi.string().allow(""),
|
|
1779
|
-
|
|
2098
|
+
pod: Joi.string().allow(""),
|
|
1780
2099
|
service: Joi.string().allow(""),
|
|
1781
2100
|
step: Joi.string().allow(""),
|
|
2101
|
+
source: Joi.string().allow(""),
|
|
1782
2102
|
status: Joi.string().allow(""),
|
|
1783
|
-
data: Joi.any(),
|
|
1784
2103
|
expire_at: Joi.string().allow(""),
|
|
1785
2104
|
created_at: Joi.string().allow(""),
|
|
2105
|
+
meta: CommunicationPlatformModel.LogMeta(),
|
|
2106
|
+
application: Joi.string().allow(""),
|
|
1786
2107
|
});
|
|
1787
2108
|
}
|
|
1788
2109
|
|
|
@@ -1794,14 +2115,6 @@ class CommunicationPlatformModel {
|
|
|
1794
2115
|
});
|
|
1795
2116
|
}
|
|
1796
2117
|
|
|
1797
|
-
/** @returns {SendOtpSmsCommsTemplate} */
|
|
1798
|
-
static SendOtpSmsCommsTemplate() {
|
|
1799
|
-
return Joi.object({
|
|
1800
|
-
key: Joi.string().allow(""),
|
|
1801
|
-
value: Joi.any(),
|
|
1802
|
-
});
|
|
1803
|
-
}
|
|
1804
|
-
|
|
1805
2118
|
/** @returns {SendOtpSmsCommsProvider} */
|
|
1806
2119
|
static SendOtpSmsCommsProvider() {
|
|
1807
2120
|
return Joi.object({
|
|
@@ -1841,7 +2154,7 @@ class CommunicationPlatformModel {
|
|
|
1841
2154
|
return Joi.object({
|
|
1842
2155
|
otp_length: Joi.number(),
|
|
1843
2156
|
expiry: Joi.number(),
|
|
1844
|
-
template:
|
|
2157
|
+
template: Joi.object().pattern(/\S/, Joi.any()),
|
|
1845
2158
|
provider: CommunicationPlatformModel.SendOtpSmsCommsProvider(),
|
|
1846
2159
|
});
|
|
1847
2160
|
}
|
|
@@ -1915,19 +2228,10 @@ class CommunicationPlatformModel {
|
|
|
1915
2228
|
});
|
|
1916
2229
|
}
|
|
1917
2230
|
|
|
1918
|
-
/** @returns {VerifyOtpCommsErrorRes} */
|
|
1919
|
-
static VerifyOtpCommsErrorRes() {
|
|
1920
|
-
return Joi.object({
|
|
1921
|
-
success: Joi.boolean(),
|
|
1922
|
-
message: Joi.string().allow(""),
|
|
1923
|
-
});
|
|
1924
|
-
}
|
|
1925
|
-
|
|
1926
2231
|
/** @returns {SmsProviderReq} */
|
|
1927
2232
|
static SmsProviderReq() {
|
|
1928
2233
|
return Joi.object({
|
|
1929
2234
|
name: Joi.string().allow(""),
|
|
1930
|
-
token: Joi.string().allow(""),
|
|
1931
2235
|
description: Joi.string().allow(""),
|
|
1932
2236
|
sender: Joi.string().allow(""),
|
|
1933
2237
|
username: Joi.string().allow(""),
|
|
@@ -1946,18 +2250,12 @@ class CommunicationPlatformModel {
|
|
|
1946
2250
|
version_id: Joi.number(),
|
|
1947
2251
|
sender_id: Joi.string().allow(""),
|
|
1948
2252
|
api_key: Joi.string().allow(""),
|
|
1949
|
-
tenant_name_1: Joi.string().allow(""),
|
|
1950
|
-
tenant_name_2: Joi.string().allow(""),
|
|
1951
2253
|
});
|
|
1952
2254
|
}
|
|
1953
2255
|
|
|
1954
2256
|
/** @returns {SmsProvider} */
|
|
1955
2257
|
static SmsProvider() {
|
|
1956
2258
|
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
2259
|
rpt: Joi.number(),
|
|
1962
2260
|
type: Joi.string().allow(""),
|
|
1963
2261
|
provider: Joi.string().allow(""),
|
|
@@ -1967,6 +2265,7 @@ class CommunicationPlatformModel {
|
|
|
1967
2265
|
sender: Joi.string().allow(""),
|
|
1968
2266
|
username: Joi.string().allow(""),
|
|
1969
2267
|
authkey: Joi.string().allow(""),
|
|
2268
|
+
entity_id: Joi.string().allow(""),
|
|
1970
2269
|
application: Joi.string().allow(""),
|
|
1971
2270
|
created_at: Joi.string().allow(""),
|
|
1972
2271
|
updated_at: Joi.string().allow(""),
|
|
@@ -2022,7 +2321,7 @@ class CommunicationPlatformModel {
|
|
|
2022
2321
|
message: CommunicationPlatformModel.SmsTemplateMessage(),
|
|
2023
2322
|
priority: Joi.string().allow(""),
|
|
2024
2323
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
2025
|
-
template_variables: Joi.
|
|
2324
|
+
template_variables: Joi.any(),
|
|
2026
2325
|
template_id: Joi.string().allow(""),
|
|
2027
2326
|
published: Joi.boolean(),
|
|
2028
2327
|
category: Joi.string().allow(""),
|
|
@@ -2045,7 +2344,7 @@ class CommunicationPlatformModel {
|
|
|
2045
2344
|
message: CommunicationPlatformModel.SmsTemplateMessage(),
|
|
2046
2345
|
priority: Joi.string().allow(""),
|
|
2047
2346
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
2048
|
-
template_variables: Joi.
|
|
2347
|
+
template_variables: Joi.any(),
|
|
2049
2348
|
template_id: Joi.string().allow(""),
|
|
2050
2349
|
published: Joi.boolean(),
|
|
2051
2350
|
category: Joi.string().allow(""),
|
|
@@ -2073,7 +2372,7 @@ class CommunicationPlatformModel {
|
|
|
2073
2372
|
priority: Joi.string().allow(""),
|
|
2074
2373
|
template_id: Joi.string().allow(""),
|
|
2075
2374
|
meta: CommunicationPlatformModel.metaObj(),
|
|
2076
|
-
template_variables: Joi.
|
|
2375
|
+
template_variables: Joi.any(),
|
|
2077
2376
|
published: Joi.boolean(),
|
|
2078
2377
|
message: CommunicationPlatformModel.SmsTemplateMessage(),
|
|
2079
2378
|
});
|
|
@@ -2091,6 +2390,15 @@ class CommunicationPlatformModel {
|
|
|
2091
2390
|
});
|
|
2092
2391
|
}
|
|
2093
2392
|
|
|
2393
|
+
/** @returns {SystemNotificationSetting} */
|
|
2394
|
+
static SystemNotificationSetting() {
|
|
2395
|
+
return Joi.object({
|
|
2396
|
+
sound: Joi.boolean(),
|
|
2397
|
+
priority: Joi.string().allow(""),
|
|
2398
|
+
time_to_live: Joi.string().allow(""),
|
|
2399
|
+
});
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2094
2402
|
/** @returns {SystemNotificationUser} */
|
|
2095
2403
|
static SystemNotificationUser() {
|
|
2096
2404
|
return Joi.object({
|
|
@@ -2104,7 +2412,7 @@ class CommunicationPlatformModel {
|
|
|
2104
2412
|
return Joi.object({
|
|
2105
2413
|
notification: CommunicationPlatformModel.Notification(),
|
|
2106
2414
|
user: CommunicationPlatformModel.SystemNotificationUser(),
|
|
2107
|
-
settings: CommunicationPlatformModel.
|
|
2415
|
+
settings: CommunicationPlatformModel.SystemNotificationSetting(),
|
|
2108
2416
|
_id: Joi.string().allow(""),
|
|
2109
2417
|
group: Joi.string().allow(""),
|
|
2110
2418
|
created_at: Joi.string().allow(""),
|
|
@@ -2130,34 +2438,15 @@ class CommunicationPlatformModel {
|
|
|
2130
2438
|
current: Joi.number(),
|
|
2131
2439
|
type: Joi.string().allow("").required(),
|
|
2132
2440
|
size: Joi.number(),
|
|
2441
|
+
total: Joi.number(),
|
|
2133
2442
|
});
|
|
2134
2443
|
}
|
|
2135
2444
|
|
|
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() {
|
|
2445
|
+
/** @returns {BasicDelete} */
|
|
2446
|
+
static BasicDelete() {
|
|
2146
2447
|
return Joi.object({
|
|
2147
|
-
message: Joi.string().allow(""),
|
|
2148
2448
|
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(""),
|
|
2449
|
+
deleted_count: Joi.number(),
|
|
2161
2450
|
});
|
|
2162
2451
|
}
|
|
2163
2452
|
|
|
@@ -2184,12 +2473,21 @@ class CommunicationPlatformModel {
|
|
|
2184
2473
|
});
|
|
2185
2474
|
}
|
|
2186
2475
|
|
|
2476
|
+
/** @returns {OtpConfigRateLimit} */
|
|
2477
|
+
static OtpConfigRateLimit() {
|
|
2478
|
+
return Joi.object({
|
|
2479
|
+
duration: Joi.number(),
|
|
2480
|
+
limit: Joi.number(),
|
|
2481
|
+
});
|
|
2482
|
+
}
|
|
2483
|
+
|
|
2187
2484
|
/** @returns {OtpConfiguration} */
|
|
2188
2485
|
static OtpConfiguration() {
|
|
2189
2486
|
return Joi.object({
|
|
2190
2487
|
otp_length: Joi.number().required(),
|
|
2191
2488
|
type: Joi.string().allow("").required(),
|
|
2192
2489
|
expiry: CommunicationPlatformModel.OtpConfigurationExpiry().required(),
|
|
2490
|
+
rate_limit: CommunicationPlatformModel.OtpConfigRateLimit().required(),
|
|
2193
2491
|
application_id: Joi.string().allow(""),
|
|
2194
2492
|
company_id: Joi.string().allow(""),
|
|
2195
2493
|
});
|