@gofynd/fdk-client-javascript 3.1.0-beta.1 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +2 -2
- package/sdk/application/ApplicationClient.d.ts +2 -0
- package/sdk/application/ApplicationClient.js +2 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +81 -101
- package/sdk/application/Cart/CartApplicationClient.js +173 -511
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
- package/sdk/application/Catalog/CatalogApplicationClient.js +214 -447
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +4 -19
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -43
- package/sdk/application/Communication/CommunicationApplicationClient.js +4 -214
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +41 -54
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +39 -192
- package/sdk/application/Content/ContentApplicationClient.d.ts +61 -61
- package/sdk/application/Content/ContentApplicationClient.js +183 -366
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +11 -30
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +6 -6
- package/sdk/application/Lead/LeadApplicationClient.js +24 -55
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +28 -117
- package/sdk/application/Logistic/LogisticApplicationClient.js +99 -492
- package/sdk/application/Order/OrderApplicationClient.d.ts +31 -51
- package/sdk/application/Order/OrderApplicationClient.js +89 -293
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +108 -218
- package/sdk/application/Payment/PaymentApplicationClient.js +100 -1081
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +14 -14
- package/sdk/application/Rewards/RewardsApplicationClient.js +13 -66
- package/sdk/application/Share/ShareApplicationClient.d.ts +11 -11
- package/sdk/application/Share/ShareApplicationClient.js +35 -89
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +5 -25
- package/sdk/application/Theme/ThemeApplicationClient.js +24 -150
- package/sdk/application/User/UserApplicationClient.d.ts +23 -13
- package/sdk/application/User/UserApplicationClient.js +49 -407
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +4 -11
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +10 -7
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/common/utils.d.ts +0 -1
- package/sdk/common/utils.js +0 -14
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +10 -54
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +32 -364
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +54 -1
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +43 -0
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -5
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -35
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +52 -98
- package/sdk/partner/Lead/LeadPartnerModel.js +76 -100
- package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +172 -41
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1222 -85
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1921 -297
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +973 -258
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +13 -1
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +148 -16
- package/sdk/partner/PartnerClient.d.ts +0 -6
- package/sdk/partner/PartnerClient.js +0 -9
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +21 -63
- package/sdk/partner/Theme/ThemePartnerClient.js +67 -392
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +72 -104
- package/sdk/partner/Theme/ThemePartnerModel.js +75 -101
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +1 -5
- package/sdk/partner/Theme/ThemePartnerValidator.js +12 -42
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +673 -189
- package/sdk/partner/Webhook/WebhookPartnerModel.js +270 -159
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
- package/sdk/partner/index.d.ts +0 -3
- package/sdk/partner/index.js +0 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +3 -3
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
- package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
- package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +172 -251
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +577 -648
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +270 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +192 -108
- package/sdk/platform/Cart/CartPlatformModel.d.ts +4554 -3154
- package/sdk/platform/Cart/CartPlatformModel.js +1935 -2854
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +380 -976
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2004 -6464
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +161 -1082
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +80 -884
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +568 -325
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1560 -1162
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9772 -7871
- package/sdk/platform/Catalog/CatalogPlatformModel.js +6978 -9516
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +231 -240
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +180 -188
- package/sdk/platform/Common/CommonPlatformClient.d.ts +6 -5
- package/sdk/platform/Common/CommonPlatformClient.js +6 -5
- package/sdk/platform/Common/CommonPlatformModel.d.ts +19 -25
- package/sdk/platform/Common/CommonPlatformModel.js +11 -14
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +240 -376
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +589 -874
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +139 -170
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +126 -145
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +3 -56
- package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -307
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +330 -502
- package/sdk/platform/Communication/CommunicationPlatformModel.js +376 -610
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +3 -62
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +2 -48
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +72 -100
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +88 -146
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +270 -241
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +248 -226
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +20 -31
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -25
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +117 -332
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +409 -1470
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +55 -158
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +41 -163
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +65 -142
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +103 -568
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +562 -1289
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +368 -1037
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +34 -80
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +24 -79
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +302 -248
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1292 -773
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +330 -218
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +325 -208
- package/sdk/platform/Content/ContentPlatformClient.d.ts +279 -118
- package/sdk/platform/Content/ContentPlatformClient.js +1617 -492
- package/sdk/platform/Content/ContentPlatformModel.d.ts +2391 -924
- package/sdk/platform/Content/ContentPlatformModel.js +1314 -970
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +272 -134
- package/sdk/platform/Content/ContentPlatformValidator.js +295 -118
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +53 -43
- package/sdk/platform/Discount/DiscountPlatformClient.js +53 -43
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +383 -110
- package/sdk/platform/Discount/DiscountPlatformModel.js +117 -108
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +4 -163
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +4 -1078
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -141
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -177
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +30 -1123
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +24 -1135
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- 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 +24 -4
- package/sdk/platform/Lead/LeadPlatformClient.js +160 -4
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +60 -140
- package/sdk/platform/Lead/LeadPlatformModel.js +81 -162
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +29 -3
- package/sdk/platform/Lead/LeadPlatformValidator.js +28 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +19 -98
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +27 -662
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +91 -118
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +32 -127
- package/sdk/platform/Order/OrderPlatformClient.d.ts +406 -403
- package/sdk/platform/Order/OrderPlatformClient.js +1200 -1343
- package/sdk/platform/Order/OrderPlatformModel.d.ts +8665 -4505
- package/sdk/platform/Order/OrderPlatformModel.js +4088 -3601
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +666 -442
- package/sdk/platform/Order/OrderPlatformValidator.js +353 -312
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +67 -19
- package/sdk/platform/Partner/PartnerPlatformModel.js +26 -17
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +135 -382
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +937 -2452
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +100 -306
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +74 -305
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +56 -66
- package/sdk/platform/Payment/PaymentPlatformClient.js +124 -269
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +1307 -3536
- package/sdk/platform/Payment/PaymentPlatformModel.js +1389 -3692
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +35 -64
- package/sdk/platform/Payment/PaymentPlatformValidator.js +34 -60
- package/sdk/platform/PlatformClient.d.ts +0 -2
- package/sdk/platform/PlatformClient.js +0 -4
- 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 +12 -12
- package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +64 -136
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +111 -521
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +75 -117
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +50 -105
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +160 -149
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +766 -545
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +6196 -3978
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3181 -3895
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +294 -220
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +205 -149
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +16 -4
- package/sdk/platform/Share/SharePlatformApplicationClient.js +86 -8
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +23 -6
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +16 -3
- package/sdk/platform/Share/SharePlatformModel.d.ts +53 -9
- package/sdk/platform/Share/SharePlatformModel.js +45 -5
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +17 -37
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +66 -204
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +25 -26
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +20 -31
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +8 -18
- package/sdk/platform/Theme/ThemePlatformClient.js +8 -85
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +17 -425
- package/sdk/platform/Theme/ThemePlatformModel.js +23 -329
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +3 -7
- package/sdk/platform/Theme/ThemePlatformValidator.js +2 -9
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +81 -18
- package/sdk/platform/User/UserPlatformApplicationClient.js +491 -27
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +126 -10
- package/sdk/platform/User/UserPlatformApplicationValidator.js +92 -7
- package/sdk/platform/User/UserPlatformModel.d.ts +317 -218
- package/sdk/platform/User/UserPlatformModel.js +253 -210
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
- package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +813 -426
- package/sdk/platform/Webhook/WebhookPlatformModel.js +446 -395
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
- package/sdk/platform/index.d.ts +0 -1
- package/sdk/platform/index.js +0 -2
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
- package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
- package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
- package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +4 -14
- package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -113
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +46 -114
- package/sdk/public/Configuration/ConfigurationPublicModel.js +32 -117
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -11
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +0 -12
- package/sdk/public/Content/ContentPublicClient.d.ts +36 -25
- package/sdk/public/Content/ContentPublicClient.js +254 -280
- package/sdk/public/Content/ContentPublicModel.d.ts +151 -38
- package/sdk/public/Content/ContentPublicModel.js +98 -44
- package/sdk/public/Content/ContentPublicValidator.d.ts +18 -17
- package/sdk/public/Content/ContentPublicValidator.js +26 -19
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +6 -11
- package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
- package/sdk/public/Partner/PartnerPublicModel.js +81 -71
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
- package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
- package/sdk/public/PublicClient.d.ts +2 -0
- package/sdk/public/PublicClient.js +4 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +9 -48
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +215 -67
- package/sdk/public/Webhook/WebhookPublicModel.js +66 -61
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +0 -66
- package/sdk/partner/Authorization/AuthorizationPartnerClient.js +0 -431
- package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +0 -231
- package/sdk/partner/Authorization/AuthorizationPartnerModel.js +0 -152
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +0 -8
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +0 -39
- package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +0 -26
- package/sdk/partner/Catalog/CatalogPartnerClient.js +0 -173
- package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +0 -238
- package/sdk/partner/Catalog/CatalogPartnerModel.js +0 -248
- package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +0 -5
- package/sdk/partner/Catalog/CatalogPartnerValidator.js +0 -19
- package/sdk/partner/Payment/PaymentPartnerClient.d.ts +0 -116
- package/sdk/partner/Payment/PaymentPartnerClient.js +0 -857
- package/sdk/partner/Payment/PaymentPartnerModel.d.ts +0 -388
- package/sdk/partner/Payment/PaymentPartnerModel.js +0 -442
- package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +0 -14
- package/sdk/partner/Payment/PaymentPartnerValidator.js +0 -74
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2895
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2150
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
|
@@ -1,156 +1,12 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @typedef
|
|
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
|
|
4
|
+
* @typedef EventSubscriptionsBulkUpdatePayload
|
|
149
5
|
* @property {SubscriptionsObject[]} [subscriptions]
|
|
150
6
|
*/
|
|
151
7
|
|
|
152
8
|
/**
|
|
153
|
-
* @typedef
|
|
9
|
+
* @typedef EventSubscriptionsBulkUpdateResult
|
|
154
10
|
* @property {EventSubscriptionTemplate} [template]
|
|
155
11
|
* @property {string} [_id]
|
|
156
12
|
* @property {string} [application]
|
|
@@ -162,18 +18,9 @@ const Joi = require("joi");
|
|
|
162
18
|
* @property {number} [__v]
|
|
163
19
|
*/
|
|
164
20
|
|
|
165
|
-
/**
|
|
166
|
-
* @typedef SubscriptionsObjectRequest
|
|
167
|
-
* @property {string} [event]
|
|
168
|
-
* @property {string} [slug]
|
|
169
|
-
* @property {TemplateObject} [template]
|
|
170
|
-
*/
|
|
171
|
-
|
|
172
21
|
/**
|
|
173
22
|
* @typedef SubscriptionsObject
|
|
174
23
|
* @property {string} [_id] - Subscription ID
|
|
175
|
-
* @property {string} [event]
|
|
176
|
-
* @property {string} [slug]
|
|
177
24
|
* @property {TemplateObject} [template]
|
|
178
25
|
*/
|
|
179
26
|
|
|
@@ -268,8 +115,8 @@ const Joi = require("joi");
|
|
|
268
115
|
/**
|
|
269
116
|
* @typedef Stats
|
|
270
117
|
* @property {string} [_id]
|
|
271
|
-
* @property {
|
|
272
|
-
* @property {
|
|
118
|
+
* @property {Object} [imported]
|
|
119
|
+
* @property {Object} [processed]
|
|
273
120
|
*/
|
|
274
121
|
|
|
275
122
|
/**
|
|
@@ -279,9 +126,6 @@ const Joi = require("joi");
|
|
|
279
126
|
|
|
280
127
|
/**
|
|
281
128
|
* @typedef CampaignReq
|
|
282
|
-
* @property {RecipientHeaders} [recipient_headers]
|
|
283
|
-
* @property {CampaignEmail} [email]
|
|
284
|
-
* @property {string} [datasource]
|
|
285
129
|
* @property {string} [description]
|
|
286
130
|
* @property {string[]} [tags]
|
|
287
131
|
* @property {string[]} [headers]
|
|
@@ -322,7 +166,7 @@ const Joi = require("joi");
|
|
|
322
166
|
* @property {RecipientHeaders} [recipient_headers]
|
|
323
167
|
* @property {CampaignEmail} [email]
|
|
324
168
|
* @property {string} [description]
|
|
325
|
-
* @property {
|
|
169
|
+
* @property {Object[]} [tags]
|
|
326
170
|
* @property {boolean} [is_active]
|
|
327
171
|
* @property {string} [_id]
|
|
328
172
|
* @property {string} [datasource]
|
|
@@ -341,6 +185,17 @@ const Joi = require("joi");
|
|
|
341
185
|
* @property {Page} [page]
|
|
342
186
|
*/
|
|
343
187
|
|
|
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
|
+
|
|
344
199
|
/**
|
|
345
200
|
* @typedef AudienceReq
|
|
346
201
|
* @property {string} [name]
|
|
@@ -495,13 +350,6 @@ const Joi = require("joi");
|
|
|
495
350
|
* @property {string} [template]
|
|
496
351
|
*/
|
|
497
352
|
|
|
498
|
-
/**
|
|
499
|
-
* @typedef TemplateKeys
|
|
500
|
-
* @property {string} [to]
|
|
501
|
-
* @property {string} [cc]
|
|
502
|
-
* @property {string} [bcc]
|
|
503
|
-
*/
|
|
504
|
-
|
|
505
353
|
/**
|
|
506
354
|
* @typedef EmailTemplate
|
|
507
355
|
* @property {string} [application]
|
|
@@ -517,7 +365,6 @@ const Joi = require("joi");
|
|
|
517
365
|
* @property {string} [reply_to]
|
|
518
366
|
* @property {string[]} [tags]
|
|
519
367
|
* @property {TemplateAndType} [subject]
|
|
520
|
-
* @property {TemplateKeys} [keys]
|
|
521
368
|
* @property {TemplateAndType} [html]
|
|
522
369
|
* @property {EnabledObj} [url_shorten]
|
|
523
370
|
* @property {string} [priority]
|
|
@@ -569,37 +416,87 @@ const Joi = require("joi");
|
|
|
569
416
|
*/
|
|
570
417
|
|
|
571
418
|
/**
|
|
572
|
-
* @typedef
|
|
573
|
-
* @property {
|
|
419
|
+
* @typedef SystemEmailTemplates
|
|
420
|
+
* @property {SystemEmailTemplate[]} [items]
|
|
574
421
|
*/
|
|
575
422
|
|
|
576
423
|
/**
|
|
577
|
-
* @typedef
|
|
578
|
-
* @property {
|
|
424
|
+
* @typedef PayloadEmailTemplateStructure
|
|
425
|
+
* @property {string} [key]
|
|
426
|
+
* @property {Object} [value]
|
|
579
427
|
*/
|
|
580
428
|
|
|
581
429
|
/**
|
|
582
|
-
* @typedef
|
|
583
|
-
* @property {
|
|
584
|
-
* @property {string} [template]
|
|
430
|
+
* @typedef PayloadEmailProviderStructure
|
|
431
|
+
* @property {string} [_id]
|
|
585
432
|
*/
|
|
586
433
|
|
|
587
434
|
/**
|
|
588
|
-
* @typedef
|
|
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]
|
|
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
|
|
589
486
|
* @property {boolean} [subscribed]
|
|
590
|
-
* @property {
|
|
487
|
+
* @property {SmsTemplate} [template]
|
|
591
488
|
*/
|
|
592
489
|
|
|
593
490
|
/**
|
|
594
|
-
* @typedef
|
|
491
|
+
* @typedef EventSubscriptionTemplateEmail
|
|
595
492
|
* @property {boolean} [subscribed]
|
|
493
|
+
* @property {EmailTemplate} [template]
|
|
596
494
|
*/
|
|
597
495
|
|
|
598
496
|
/**
|
|
599
497
|
* @typedef EventSubscriptionTemplate
|
|
600
498
|
* @property {EventSubscriptionTemplateSms} [sms]
|
|
601
499
|
* @property {EventSubscriptionTemplateEmail} [email]
|
|
602
|
-
* @property {EventSubscriptionTemplatePushnotification} [pushnotification]
|
|
603
500
|
*/
|
|
604
501
|
|
|
605
502
|
/**
|
|
@@ -608,8 +505,7 @@ const Joi = require("joi");
|
|
|
608
505
|
* @property {boolean} [is_default]
|
|
609
506
|
* @property {string} [_id]
|
|
610
507
|
* @property {string} [application]
|
|
611
|
-
* @property {
|
|
612
|
-
* @property {Object} [event]
|
|
508
|
+
* @property {EventSubscriptionEvents} [event]
|
|
613
509
|
* @property {string} [slug]
|
|
614
510
|
* @property {string} [created_at]
|
|
615
511
|
* @property {string} [updated_at]
|
|
@@ -617,62 +513,51 @@ const Joi = require("joi");
|
|
|
617
513
|
*/
|
|
618
514
|
|
|
619
515
|
/**
|
|
620
|
-
* @typedef
|
|
621
|
-
* @property {
|
|
622
|
-
* @property {
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
* @typedef EventSubscriptionTemplateEmailObj
|
|
627
|
-
* @property {boolean} [subscribed]
|
|
628
|
-
* @property {string} [template]
|
|
516
|
+
* @typedef EventSubscriptionEvents
|
|
517
|
+
* @property {string} [category]
|
|
518
|
+
* @property {string} [event_name]
|
|
519
|
+
* @property {string} [group]
|
|
520
|
+
* @property {string} [slug]
|
|
521
|
+
* @property {EventTemplate} [template]
|
|
629
522
|
*/
|
|
630
523
|
|
|
631
524
|
/**
|
|
632
|
-
* @typedef
|
|
633
|
-
* @property {
|
|
634
|
-
* @property {
|
|
635
|
-
* @property {
|
|
525
|
+
* @typedef EventTemplate
|
|
526
|
+
* @property {EventProviderTemplates} [email]
|
|
527
|
+
* @property {EventProviderTemplates} [pushnotification]
|
|
528
|
+
* @property {EventProviderTemplates} [sms]
|
|
636
529
|
*/
|
|
637
530
|
|
|
638
531
|
/**
|
|
639
|
-
* @typedef
|
|
640
|
-
* @property {
|
|
641
|
-
* @property {
|
|
642
|
-
* @property {string} [_id]
|
|
643
|
-
* @property {string} [application]
|
|
644
|
-
* @property {string} [category]
|
|
645
|
-
* @property {Object} [event]
|
|
646
|
-
* @property {string} [slug]
|
|
647
|
-
* @property {string} [created_at]
|
|
648
|
-
* @property {string} [updated_at]
|
|
649
|
-
* @property {number} [__v]
|
|
532
|
+
* @typedef EventProviderTemplates
|
|
533
|
+
* @property {string} [provider_type] - Provider type for the event template
|
|
534
|
+
* @property {string} [template] - This is the unique id of the template
|
|
650
535
|
*/
|
|
651
536
|
|
|
652
537
|
/**
|
|
653
538
|
* @typedef EventSubscriptions
|
|
654
|
-
* @property {
|
|
539
|
+
* @property {EventSubscription[]} [items]
|
|
655
540
|
* @property {Page} [page]
|
|
656
541
|
*/
|
|
657
542
|
|
|
658
543
|
/**
|
|
659
|
-
* @typedef
|
|
544
|
+
* @typedef TriggerJobResult
|
|
660
545
|
* @property {number} [status]
|
|
661
546
|
*/
|
|
662
547
|
|
|
663
548
|
/**
|
|
664
|
-
* @typedef
|
|
549
|
+
* @typedef TriggerJobPayload
|
|
665
550
|
* @property {string} [job_id]
|
|
666
551
|
*/
|
|
667
552
|
|
|
668
553
|
/**
|
|
669
|
-
* @typedef
|
|
554
|
+
* @typedef GetGlobalVariablesResult
|
|
670
555
|
* @property {Object} [read_only]
|
|
671
556
|
* @property {Object} [editable]
|
|
672
557
|
*/
|
|
673
558
|
|
|
674
559
|
/**
|
|
675
|
-
* @typedef
|
|
560
|
+
* @typedef CreateGlobalVariablesResult
|
|
676
561
|
* @property {string} [_id]
|
|
677
562
|
* @property {string} [category]
|
|
678
563
|
* @property {string} [application]
|
|
@@ -722,8 +607,8 @@ const Joi = require("joi");
|
|
|
722
607
|
|
|
723
608
|
/**
|
|
724
609
|
* @typedef JobLog
|
|
725
|
-
* @property {
|
|
726
|
-
* @property {
|
|
610
|
+
* @property {Object} [imported]
|
|
611
|
+
* @property {Object} [processed]
|
|
727
612
|
* @property {string} [_id]
|
|
728
613
|
* @property {string} [job]
|
|
729
614
|
* @property {string} [campaign]
|
|
@@ -741,16 +626,6 @@ const Joi = require("joi");
|
|
|
741
626
|
/**
|
|
742
627
|
* @typedef LogEmail
|
|
743
628
|
* @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]
|
|
754
629
|
*/
|
|
755
630
|
|
|
756
631
|
/**
|
|
@@ -760,10 +635,8 @@ const Joi = require("joi");
|
|
|
760
635
|
|
|
761
636
|
/**
|
|
762
637
|
* @typedef LogMeta
|
|
763
|
-
* @property {string} [identifier]
|
|
764
638
|
* @property {string} [type]
|
|
765
|
-
* @property {string} [
|
|
766
|
-
* @property {string} [campaign]
|
|
639
|
+
* @property {string} [identifier]
|
|
767
640
|
* @property {string} [key]
|
|
768
641
|
* @property {string} [offset]
|
|
769
642
|
* @property {string} [partition]
|
|
@@ -773,18 +646,16 @@ const Joi = require("joi");
|
|
|
773
646
|
/**
|
|
774
647
|
* @typedef Log
|
|
775
648
|
* @property {LogEmail} [email]
|
|
776
|
-
* @property {LogSms} [sms]
|
|
777
649
|
* @property {LogPushnotification} [pushnotification]
|
|
650
|
+
* @property {LogMeta} [meta]
|
|
778
651
|
* @property {string} [_id]
|
|
779
|
-
* @property {string} [
|
|
652
|
+
* @property {string} [application]
|
|
780
653
|
* @property {string} [service]
|
|
781
654
|
* @property {string} [step]
|
|
782
|
-
* @property {string} [source]
|
|
783
655
|
* @property {string} [status]
|
|
656
|
+
* @property {Object} [data]
|
|
784
657
|
* @property {string} [expire_at]
|
|
785
658
|
* @property {string} [created_at]
|
|
786
|
-
* @property {LogMeta} [meta]
|
|
787
|
-
* @property {string} [application]
|
|
788
659
|
*/
|
|
789
660
|
|
|
790
661
|
/**
|
|
@@ -793,6 +664,12 @@ const Joi = require("joi");
|
|
|
793
664
|
* @property {Page} [page]
|
|
794
665
|
*/
|
|
795
666
|
|
|
667
|
+
/**
|
|
668
|
+
* @typedef SendOtpSmsCommsTemplate
|
|
669
|
+
* @property {string} [key]
|
|
670
|
+
* @property {Object} [value]
|
|
671
|
+
*/
|
|
672
|
+
|
|
796
673
|
/**
|
|
797
674
|
* @typedef SendOtpSmsCommsProvider
|
|
798
675
|
* @property {string} [slug]
|
|
@@ -823,7 +700,7 @@ const Joi = require("joi");
|
|
|
823
700
|
* @typedef SendOtpCommsReqSms
|
|
824
701
|
* @property {number} [otp_length]
|
|
825
702
|
* @property {number} [expiry]
|
|
826
|
-
* @property {
|
|
703
|
+
* @property {SendOtpSmsCommsTemplate} [template]
|
|
827
704
|
* @property {SendOtpSmsCommsProvider} [provider]
|
|
828
705
|
*/
|
|
829
706
|
|
|
@@ -882,9 +759,16 @@ const Joi = require("joi");
|
|
|
882
759
|
* @property {string} [email]
|
|
883
760
|
*/
|
|
884
761
|
|
|
762
|
+
/**
|
|
763
|
+
* @typedef VerifyOtpCommsErrorRes
|
|
764
|
+
* @property {boolean} [success]
|
|
765
|
+
* @property {string} [message]
|
|
766
|
+
*/
|
|
767
|
+
|
|
885
768
|
/**
|
|
886
769
|
* @typedef SmsProviderReq
|
|
887
770
|
* @property {string} [name]
|
|
771
|
+
* @property {string} [token]
|
|
888
772
|
* @property {string} [description]
|
|
889
773
|
* @property {string} [sender]
|
|
890
774
|
* @property {string} [username]
|
|
@@ -903,10 +787,16 @@ const Joi = require("joi");
|
|
|
903
787
|
* @property {number} [version_id] - The version ID for the test.
|
|
904
788
|
* @property {string} [sender_id] - The sender ID for the test.
|
|
905
789
|
* @property {string} [api_key] - The api_key for the test.
|
|
790
|
+
* @property {string} [tenant_name_1] - First part of jiocx url.
|
|
791
|
+
* @property {string} [tenant_name_2] - Second part of jiocx url.
|
|
906
792
|
*/
|
|
907
793
|
|
|
908
794
|
/**
|
|
909
795
|
* @typedef SmsProvider
|
|
796
|
+
* @property {string} [token]
|
|
797
|
+
* @property {string} [sender_id]
|
|
798
|
+
* @property {string} [api_key]
|
|
799
|
+
* @property {number} [expiry_date]
|
|
910
800
|
* @property {number} [rpt]
|
|
911
801
|
* @property {string} [type]
|
|
912
802
|
* @property {string} [provider]
|
|
@@ -916,7 +806,6 @@ const Joi = require("joi");
|
|
|
916
806
|
* @property {string} [sender]
|
|
917
807
|
* @property {string} [username]
|
|
918
808
|
* @property {string} [authkey]
|
|
919
|
-
* @property {string} [entity_id]
|
|
920
809
|
* @property {string} [application]
|
|
921
810
|
* @property {string} [created_at]
|
|
922
811
|
* @property {string} [updated_at]
|
|
@@ -974,6 +863,11 @@ const Joi = require("joi");
|
|
|
974
863
|
|
|
975
864
|
/**
|
|
976
865
|
* @typedef SystemSmsTemplates
|
|
866
|
+
* @property {SystemSmsTemplate[]} [items] - An array of system SMS templates
|
|
867
|
+
*/
|
|
868
|
+
|
|
869
|
+
/**
|
|
870
|
+
* @typedef SystemSmsTemplate
|
|
977
871
|
* @property {EnabledObj} [url_shorten]
|
|
978
872
|
* @property {string} [_id]
|
|
979
873
|
* @property {boolean} [is_system]
|
|
@@ -1022,13 +916,6 @@ const Joi = require("joi");
|
|
|
1022
916
|
* @property {string} [click_action]
|
|
1023
917
|
*/
|
|
1024
918
|
|
|
1025
|
-
/**
|
|
1026
|
-
* @typedef SystemNotificationSetting
|
|
1027
|
-
* @property {boolean} [sound]
|
|
1028
|
-
* @property {string} [priority]
|
|
1029
|
-
* @property {string} [time_to_live]
|
|
1030
|
-
*/
|
|
1031
|
-
|
|
1032
919
|
/**
|
|
1033
920
|
* @typedef SystemNotificationUser
|
|
1034
921
|
* @property {string} [type]
|
|
@@ -1039,7 +926,7 @@ const Joi = require("joi");
|
|
|
1039
926
|
* @typedef SystemNotification
|
|
1040
927
|
* @property {Notification} [notification]
|
|
1041
928
|
* @property {SystemNotificationUser} [user]
|
|
1042
|
-
* @property {
|
|
929
|
+
* @property {SystemNotificationUser} [settings]
|
|
1043
930
|
* @property {string} [_id]
|
|
1044
931
|
* @property {string} [group]
|
|
1045
932
|
* @property {string} [created_at]
|
|
@@ -1061,239 +948,60 @@ const Joi = require("joi");
|
|
|
1061
948
|
* @property {number} [current] - The current page number.
|
|
1062
949
|
* @property {string} type - The type of the page, such as 'PageType'.
|
|
1063
950
|
* @property {number} [size] - The number of items per page.
|
|
1064
|
-
* @property {number} [
|
|
1065
|
-
*/
|
|
1066
|
-
|
|
1067
|
-
/**
|
|
1068
|
-
* @typedef BasicDelete
|
|
1069
|
-
* @property {boolean} [acknowledged]
|
|
1070
|
-
* @property {number} [deleted_count]
|
|
951
|
+
* @property {number} [page_size] - The number of items per page.
|
|
1071
952
|
*/
|
|
1072
953
|
|
|
1073
|
-
/**
|
|
1074
|
-
* @typedef
|
|
1075
|
-
* @property {
|
|
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
|
-
}
|
|
1238
|
-
|
|
1239
|
-
/** @returns {PayloadEmailProviderStructure} */
|
|
1240
|
-
static PayloadEmailProviderStructure() {
|
|
1241
|
-
return Joi.object({
|
|
1242
|
-
slug: Joi.string().allow(""),
|
|
1243
|
-
});
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
|
-
/** @returns {PayloadEmailStructure} */
|
|
1247
|
-
static PayloadEmailStructure() {
|
|
1248
|
-
return Joi.object({
|
|
1249
|
-
template: CommunicationPlatformModel.PayloadEmailTemplateStructure(),
|
|
1250
|
-
provider: CommunicationPlatformModel.PayloadEmailProviderStructure(),
|
|
1251
|
-
});
|
|
1252
|
-
}
|
|
954
|
+
/**
|
|
955
|
+
* @typedef GenericError
|
|
956
|
+
* @property {Message} [message]
|
|
957
|
+
* @property {string} [sentry]
|
|
958
|
+
*/
|
|
1253
959
|
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
960
|
+
/**
|
|
961
|
+
* @typedef GenericDelete
|
|
962
|
+
* @property {string} [message]
|
|
963
|
+
* @property {boolean} [acknowledged]
|
|
964
|
+
* @property {number} [affected]
|
|
965
|
+
* @property {string} [operation]
|
|
966
|
+
*/
|
|
1261
967
|
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
}
|
|
968
|
+
/**
|
|
969
|
+
* @typedef Message
|
|
970
|
+
* @property {string} [message]
|
|
971
|
+
* @property {boolean} [success]
|
|
972
|
+
* @property {string} [info]
|
|
973
|
+
* @property {string} [operation]
|
|
974
|
+
*/
|
|
1270
975
|
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
email: CommunicationPlatformModel.PayloadEmailStructure(),
|
|
1276
|
-
sms: CommunicationPlatformModel.PayloadSmsStructure(),
|
|
1277
|
-
});
|
|
1278
|
-
}
|
|
976
|
+
/**
|
|
977
|
+
* @typedef EnabledObj
|
|
978
|
+
* @property {boolean} [enabled]
|
|
979
|
+
*/
|
|
1279
980
|
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
});
|
|
1286
|
-
}
|
|
981
|
+
/**
|
|
982
|
+
* @typedef OtpConfigurationExpiryDuration
|
|
983
|
+
* @property {number} time
|
|
984
|
+
* @property {string} denomination
|
|
985
|
+
*/
|
|
1287
986
|
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
987
|
+
/**
|
|
988
|
+
* @typedef OtpConfigurationExpiry
|
|
989
|
+
* @property {OtpConfigurationExpiryDuration} duration
|
|
990
|
+
* @property {string} type
|
|
991
|
+
*/
|
|
992
|
+
|
|
993
|
+
/**
|
|
994
|
+
* @typedef OtpConfiguration
|
|
995
|
+
* @property {number} otp_length
|
|
996
|
+
* @property {string} type
|
|
997
|
+
* @property {OtpConfigurationExpiry} expiry
|
|
998
|
+
* @property {string} [application_id]
|
|
999
|
+
* @property {string} [company_id]
|
|
1000
|
+
*/
|
|
1294
1001
|
|
|
1295
|
-
|
|
1296
|
-
|
|
1002
|
+
class CommunicationPlatformModel {
|
|
1003
|
+
/** @returns {EventSubscriptionsBulkUpdatePayload} */
|
|
1004
|
+
static EventSubscriptionsBulkUpdatePayload() {
|
|
1297
1005
|
return Joi.object({
|
|
1298
1006
|
subscriptions: Joi.array().items(
|
|
1299
1007
|
CommunicationPlatformModel.SubscriptionsObject()
|
|
@@ -1301,8 +1009,8 @@ class CommunicationPlatformModel {
|
|
|
1301
1009
|
});
|
|
1302
1010
|
}
|
|
1303
1011
|
|
|
1304
|
-
/** @returns {
|
|
1305
|
-
static
|
|
1012
|
+
/** @returns {EventSubscriptionsBulkUpdateResult} */
|
|
1013
|
+
static EventSubscriptionsBulkUpdateResult() {
|
|
1306
1014
|
return Joi.object({
|
|
1307
1015
|
template: CommunicationPlatformModel.EventSubscriptionTemplate(),
|
|
1308
1016
|
_id: Joi.string().allow(""),
|
|
@@ -1316,21 +1024,10 @@ class CommunicationPlatformModel {
|
|
|
1316
1024
|
});
|
|
1317
1025
|
}
|
|
1318
1026
|
|
|
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
|
-
|
|
1328
1027
|
/** @returns {SubscriptionsObject} */
|
|
1329
1028
|
static SubscriptionsObject() {
|
|
1330
1029
|
return Joi.object({
|
|
1331
1030
|
_id: Joi.string().allow(""),
|
|
1332
|
-
event: Joi.string().allow(""),
|
|
1333
|
-
slug: Joi.string().allow(""),
|
|
1334
1031
|
template: CommunicationPlatformModel.TemplateObject(),
|
|
1335
1032
|
});
|
|
1336
1033
|
}
|
|
@@ -1459,8 +1156,8 @@ class CommunicationPlatformModel {
|
|
|
1459
1156
|
static Stats() {
|
|
1460
1157
|
return Joi.object({
|
|
1461
1158
|
_id: Joi.string().allow(""),
|
|
1462
|
-
imported:
|
|
1463
|
-
processed:
|
|
1159
|
+
imported: Joi.any(),
|
|
1160
|
+
processed: Joi.any(),
|
|
1464
1161
|
});
|
|
1465
1162
|
}
|
|
1466
1163
|
|
|
@@ -1474,9 +1171,6 @@ class CommunicationPlatformModel {
|
|
|
1474
1171
|
/** @returns {CampaignReq} */
|
|
1475
1172
|
static CampaignReq() {
|
|
1476
1173
|
return Joi.object({
|
|
1477
|
-
recipient_headers: CommunicationPlatformModel.RecipientHeaders(),
|
|
1478
|
-
email: CommunicationPlatformModel.CampaignEmail(),
|
|
1479
|
-
datasource: Joi.string().allow(""),
|
|
1480
1174
|
description: Joi.string().allow(""),
|
|
1481
1175
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
1482
1176
|
headers: Joi.array().items(Joi.string().allow("")),
|
|
@@ -1527,7 +1221,7 @@ class CommunicationPlatformModel {
|
|
|
1527
1221
|
recipient_headers: CommunicationPlatformModel.RecipientHeaders(),
|
|
1528
1222
|
email: CommunicationPlatformModel.CampaignEmail(),
|
|
1529
1223
|
description: Joi.string().allow(""),
|
|
1530
|
-
tags: Joi.array().items(Joi.
|
|
1224
|
+
tags: Joi.array().items(Joi.any()),
|
|
1531
1225
|
is_active: Joi.boolean(),
|
|
1532
1226
|
_id: Joi.string().allow(""),
|
|
1533
1227
|
datasource: Joi.string().allow(""),
|
|
@@ -1549,6 +1243,21 @@ class CommunicationPlatformModel {
|
|
|
1549
1243
|
});
|
|
1550
1244
|
}
|
|
1551
1245
|
|
|
1246
|
+
/** @returns {BadRequestSchema} */
|
|
1247
|
+
static BadRequestSchema() {
|
|
1248
|
+
return Joi.object({
|
|
1249
|
+
status: Joi.string().allow(""),
|
|
1250
|
+
message: Joi.string().allow(""),
|
|
1251
|
+
});
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
/** @returns {NotFound} */
|
|
1255
|
+
static NotFound() {
|
|
1256
|
+
return Joi.object({
|
|
1257
|
+
message: Joi.string().allow(""),
|
|
1258
|
+
});
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1552
1261
|
/** @returns {AudienceReq} */
|
|
1553
1262
|
static AudienceReq() {
|
|
1554
1263
|
return Joi.object({
|
|
@@ -1722,7 +1431,7 @@ class CommunicationPlatformModel {
|
|
|
1722
1431
|
reply_to: Joi.string().allow(""),
|
|
1723
1432
|
priority: Joi.string().allow(""),
|
|
1724
1433
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
1725
|
-
template_variables: Joi.any(),
|
|
1434
|
+
template_variables: Joi.object().pattern(/\S/, Joi.any()),
|
|
1726
1435
|
published: Joi.boolean(),
|
|
1727
1436
|
subject: CommunicationPlatformModel.TemplateAndType(),
|
|
1728
1437
|
html: CommunicationPlatformModel.TemplateAndType(),
|
|
@@ -1745,15 +1454,6 @@ class CommunicationPlatformModel {
|
|
|
1745
1454
|
});
|
|
1746
1455
|
}
|
|
1747
1456
|
|
|
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
|
-
|
|
1757
1457
|
/** @returns {EmailTemplate} */
|
|
1758
1458
|
static EmailTemplate() {
|
|
1759
1459
|
return Joi.object({
|
|
@@ -1770,11 +1470,10 @@ class CommunicationPlatformModel {
|
|
|
1770
1470
|
reply_to: Joi.string().allow(""),
|
|
1771
1471
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
1772
1472
|
subject: CommunicationPlatformModel.TemplateAndType(),
|
|
1773
|
-
keys: CommunicationPlatformModel.TemplateKeys(),
|
|
1774
1473
|
html: CommunicationPlatformModel.TemplateAndType(),
|
|
1775
1474
|
url_shorten: CommunicationPlatformModel.EnabledObj(),
|
|
1776
1475
|
priority: Joi.string().allow(""),
|
|
1777
|
-
template_variables: Joi.any(),
|
|
1476
|
+
template_variables: Joi.object().pattern(/\S/, Joi.any()),
|
|
1778
1477
|
published: Joi.boolean(),
|
|
1779
1478
|
category: Joi.string().allow(""),
|
|
1780
1479
|
_id: Joi.string().allow(""),
|
|
@@ -1806,7 +1505,7 @@ class CommunicationPlatformModel {
|
|
|
1806
1505
|
html: CommunicationPlatformModel.TemplateAndType(),
|
|
1807
1506
|
url_shorten: CommunicationPlatformModel.EnabledObj(),
|
|
1808
1507
|
priority: Joi.string().allow(""),
|
|
1809
|
-
template_variables: Joi.any(),
|
|
1508
|
+
template_variables: Joi.object().pattern(/\S/, Joi.any()),
|
|
1810
1509
|
published: Joi.boolean(),
|
|
1811
1510
|
category: Joi.string().allow(""),
|
|
1812
1511
|
_id: Joi.string().allow(""),
|
|
@@ -1830,40 +1529,109 @@ class CommunicationPlatformModel {
|
|
|
1830
1529
|
});
|
|
1831
1530
|
}
|
|
1832
1531
|
|
|
1833
|
-
/** @returns {
|
|
1834
|
-
static
|
|
1532
|
+
/** @returns {SystemEmailTemplates} */
|
|
1533
|
+
static SystemEmailTemplates() {
|
|
1835
1534
|
return Joi.object({
|
|
1836
|
-
items: Joi.array().items(
|
|
1535
|
+
items: Joi.array().items(
|
|
1536
|
+
CommunicationPlatformModel.SystemEmailTemplate()
|
|
1537
|
+
),
|
|
1837
1538
|
});
|
|
1838
1539
|
}
|
|
1839
1540
|
|
|
1840
|
-
/** @returns {
|
|
1841
|
-
static
|
|
1541
|
+
/** @returns {PayloadEmailTemplateStructure} */
|
|
1542
|
+
static PayloadEmailTemplateStructure() {
|
|
1842
1543
|
return Joi.object({
|
|
1843
|
-
|
|
1544
|
+
key: Joi.string().allow(""),
|
|
1545
|
+
value: Joi.any(),
|
|
1844
1546
|
});
|
|
1845
1547
|
}
|
|
1846
1548
|
|
|
1847
|
-
/** @returns {
|
|
1848
|
-
static
|
|
1549
|
+
/** @returns {PayloadEmailProviderStructure} */
|
|
1550
|
+
static PayloadEmailProviderStructure() {
|
|
1849
1551
|
return Joi.object({
|
|
1850
|
-
|
|
1851
|
-
template: Joi.string().allow("").allow(null),
|
|
1552
|
+
_id: Joi.string().allow(""),
|
|
1852
1553
|
});
|
|
1853
1554
|
}
|
|
1854
1555
|
|
|
1855
|
-
/** @returns {
|
|
1856
|
-
static
|
|
1556
|
+
/** @returns {PayloadEmailStructure} */
|
|
1557
|
+
static PayloadEmailStructure() {
|
|
1558
|
+
return Joi.object({
|
|
1559
|
+
template: CommunicationPlatformModel.PayloadEmailTemplateStructure(),
|
|
1560
|
+
provider: CommunicationPlatformModel.PayloadEmailProviderStructure(),
|
|
1561
|
+
});
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1564
|
+
/** @returns {PayloadSmsTemplateStructure} */
|
|
1565
|
+
static PayloadSmsTemplateStructure() {
|
|
1566
|
+
return Joi.object({
|
|
1567
|
+
key: Joi.string().allow(""),
|
|
1568
|
+
value: Joi.any(),
|
|
1569
|
+
});
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
/** @returns {PayloadSmsProviderStructure} */
|
|
1573
|
+
static PayloadSmsProviderStructure() {
|
|
1574
|
+
return Joi.object({
|
|
1575
|
+
_id: Joi.string().allow(""),
|
|
1576
|
+
});
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1579
|
+
/** @returns {PayloadSmsStructure} */
|
|
1580
|
+
static PayloadSmsStructure() {
|
|
1581
|
+
return Joi.object({
|
|
1582
|
+
template: CommunicationPlatformModel.PayloadSmsTemplateStructure(),
|
|
1583
|
+
provider: CommunicationPlatformModel.PayloadSmsProviderStructure(),
|
|
1584
|
+
});
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
/** @returns {PayloadStructure} */
|
|
1588
|
+
static PayloadStructure() {
|
|
1589
|
+
return Joi.object({
|
|
1590
|
+
data: Joi.array().items(Joi.any()),
|
|
1591
|
+
email: CommunicationPlatformModel.PayloadEmailStructure(),
|
|
1592
|
+
sms: CommunicationPlatformModel.PayloadSmsStructure(),
|
|
1593
|
+
application: Joi.string().allow(""),
|
|
1594
|
+
});
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1597
|
+
/** @returns {MetaStructure} */
|
|
1598
|
+
static MetaStructure() {
|
|
1599
|
+
return Joi.object({
|
|
1600
|
+
job_type: Joi.string().allow(""),
|
|
1601
|
+
action: Joi.string().allow(""),
|
|
1602
|
+
trace: Joi.string().allow(""),
|
|
1603
|
+
timestamp: Joi.string().allow(""),
|
|
1604
|
+
});
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
/** @returns {EnginePayload} */
|
|
1608
|
+
static EnginePayload() {
|
|
1609
|
+
return Joi.object({
|
|
1610
|
+
payload: CommunicationPlatformModel.PayloadStructure(),
|
|
1611
|
+
meta: CommunicationPlatformModel.MetaStructure(),
|
|
1612
|
+
});
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
/** @returns {EngineResult} */
|
|
1616
|
+
static EngineResult() {
|
|
1617
|
+
return Joi.object({
|
|
1618
|
+
success: Joi.boolean(),
|
|
1619
|
+
});
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
/** @returns {EventSubscriptionTemplateSms} */
|
|
1623
|
+
static EventSubscriptionTemplateSms() {
|
|
1857
1624
|
return Joi.object({
|
|
1858
1625
|
subscribed: Joi.boolean(),
|
|
1859
|
-
template:
|
|
1626
|
+
template: CommunicationPlatformModel.SmsTemplate(),
|
|
1860
1627
|
});
|
|
1861
1628
|
}
|
|
1862
1629
|
|
|
1863
|
-
/** @returns {
|
|
1864
|
-
static
|
|
1630
|
+
/** @returns {EventSubscriptionTemplateEmail} */
|
|
1631
|
+
static EventSubscriptionTemplateEmail() {
|
|
1865
1632
|
return Joi.object({
|
|
1866
1633
|
subscribed: Joi.boolean(),
|
|
1634
|
+
template: CommunicationPlatformModel.EmailTemplate(),
|
|
1867
1635
|
});
|
|
1868
1636
|
}
|
|
1869
1637
|
|
|
@@ -1872,7 +1640,6 @@ class CommunicationPlatformModel {
|
|
|
1872
1640
|
return Joi.object({
|
|
1873
1641
|
sms: CommunicationPlatformModel.EventSubscriptionTemplateSms(),
|
|
1874
1642
|
email: CommunicationPlatformModel.EventSubscriptionTemplateEmail(),
|
|
1875
|
-
pushnotification: CommunicationPlatformModel.EventSubscriptionTemplatePushnotification(),
|
|
1876
1643
|
});
|
|
1877
1644
|
}
|
|
1878
1645
|
|
|
@@ -1883,8 +1650,7 @@ class CommunicationPlatformModel {
|
|
|
1883
1650
|
is_default: Joi.boolean(),
|
|
1884
1651
|
_id: Joi.string().allow(""),
|
|
1885
1652
|
application: Joi.string().allow(""),
|
|
1886
|
-
|
|
1887
|
-
event: Joi.any(),
|
|
1653
|
+
event: CommunicationPlatformModel.EventSubscriptionEvents(),
|
|
1888
1654
|
slug: Joi.string().allow(""),
|
|
1889
1655
|
created_at: Joi.string().allow(""),
|
|
1890
1656
|
updated_at: Joi.string().allow(""),
|
|
@@ -1892,86 +1658,71 @@ class CommunicationPlatformModel {
|
|
|
1892
1658
|
});
|
|
1893
1659
|
}
|
|
1894
1660
|
|
|
1895
|
-
/** @returns {
|
|
1896
|
-
static
|
|
1897
|
-
return Joi.object({
|
|
1898
|
-
subscribed: Joi.boolean(),
|
|
1899
|
-
template: Joi.any().allow(null),
|
|
1900
|
-
});
|
|
1901
|
-
}
|
|
1902
|
-
|
|
1903
|
-
/** @returns {EventSubscriptionTemplateEmailObj} */
|
|
1904
|
-
static EventSubscriptionTemplateEmailObj() {
|
|
1661
|
+
/** @returns {EventSubscriptionEvents} */
|
|
1662
|
+
static EventSubscriptionEvents() {
|
|
1905
1663
|
return Joi.object({
|
|
1906
|
-
|
|
1907
|
-
|
|
1664
|
+
category: Joi.string().allow(""),
|
|
1665
|
+
event_name: Joi.string().allow(""),
|
|
1666
|
+
group: Joi.string().allow(""),
|
|
1667
|
+
slug: Joi.string().allow(""),
|
|
1668
|
+
template: CommunicationPlatformModel.EventTemplate(),
|
|
1908
1669
|
});
|
|
1909
1670
|
}
|
|
1910
1671
|
|
|
1911
|
-
/** @returns {
|
|
1912
|
-
static
|
|
1672
|
+
/** @returns {EventTemplate} */
|
|
1673
|
+
static EventTemplate() {
|
|
1913
1674
|
return Joi.object({
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1675
|
+
email: CommunicationPlatformModel.EventProviderTemplates(),
|
|
1676
|
+
pushnotification: CommunicationPlatformModel.EventProviderTemplates(),
|
|
1677
|
+
sms: CommunicationPlatformModel.EventProviderTemplates(),
|
|
1917
1678
|
});
|
|
1918
1679
|
}
|
|
1919
1680
|
|
|
1920
|
-
/** @returns {
|
|
1921
|
-
static
|
|
1681
|
+
/** @returns {EventProviderTemplates} */
|
|
1682
|
+
static EventProviderTemplates() {
|
|
1922
1683
|
return Joi.object({
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
_id: Joi.string().allow(""),
|
|
1926
|
-
application: Joi.string().allow(""),
|
|
1927
|
-
category: Joi.string().allow(""),
|
|
1928
|
-
event: Joi.any(),
|
|
1929
|
-
slug: Joi.string().allow(""),
|
|
1930
|
-
created_at: Joi.string().allow(""),
|
|
1931
|
-
updated_at: Joi.string().allow(""),
|
|
1932
|
-
__v: Joi.number(),
|
|
1684
|
+
provider_type: Joi.string().allow("").allow(null),
|
|
1685
|
+
template: Joi.string().allow("").allow(null),
|
|
1933
1686
|
});
|
|
1934
1687
|
}
|
|
1935
1688
|
|
|
1936
1689
|
/** @returns {EventSubscriptions} */
|
|
1937
1690
|
static EventSubscriptions() {
|
|
1938
1691
|
return Joi.object({
|
|
1939
|
-
items: Joi.array().items(
|
|
1940
|
-
CommunicationPlatformModel.EventSubscriptionObj()
|
|
1941
|
-
),
|
|
1692
|
+
items: Joi.array().items(CommunicationPlatformModel.EventSubscription()),
|
|
1942
1693
|
page: CommunicationPlatformModel.Page(),
|
|
1943
1694
|
});
|
|
1944
1695
|
}
|
|
1945
1696
|
|
|
1946
|
-
/** @returns {
|
|
1947
|
-
static
|
|
1697
|
+
/** @returns {TriggerJobResult} */
|
|
1698
|
+
static TriggerJobResult() {
|
|
1948
1699
|
return Joi.object({
|
|
1949
1700
|
status: Joi.number(),
|
|
1950
1701
|
});
|
|
1951
1702
|
}
|
|
1952
1703
|
|
|
1953
|
-
/** @returns {
|
|
1954
|
-
static
|
|
1704
|
+
/** @returns {TriggerJobPayload} */
|
|
1705
|
+
static TriggerJobPayload() {
|
|
1955
1706
|
return Joi.object({
|
|
1956
1707
|
job_id: Joi.string().allow(""),
|
|
1957
1708
|
});
|
|
1958
1709
|
}
|
|
1959
1710
|
|
|
1960
|
-
/** @returns {
|
|
1961
|
-
static
|
|
1711
|
+
/** @returns {GetGlobalVariablesResult} */
|
|
1712
|
+
static GetGlobalVariablesResult() {
|
|
1962
1713
|
return Joi.object({
|
|
1963
|
-
read_only: Joi.any(),
|
|
1964
|
-
editable: Joi.any(),
|
|
1714
|
+
read_only: Joi.object().pattern(/\S/, Joi.any()),
|
|
1715
|
+
editable: Joi.object().pattern(/\S/, Joi.any()),
|
|
1965
1716
|
});
|
|
1966
1717
|
}
|
|
1967
1718
|
|
|
1968
|
-
/** @returns {
|
|
1969
|
-
static
|
|
1719
|
+
/** @returns {CreateGlobalVariablesResult} */
|
|
1720
|
+
static CreateGlobalVariablesResult() {
|
|
1970
1721
|
return Joi.object({
|
|
1971
1722
|
_id: Joi.string().allow(""),
|
|
1972
1723
|
category: Joi.string().allow(""),
|
|
1973
1724
|
application: Joi.string().allow(""),
|
|
1974
|
-
global_variables: Joi.any(),
|
|
1725
|
+
global_variables: Joi.object().pattern(/\S/, Joi.any()),
|
|
1975
1726
|
created_at: Joi.string().allow(""),
|
|
1976
1727
|
});
|
|
1977
1728
|
}
|
|
@@ -1979,7 +1730,7 @@ class CommunicationPlatformModel {
|
|
|
1979
1730
|
/** @returns {GlobalVariablesReq} */
|
|
1980
1731
|
static GlobalVariablesReq() {
|
|
1981
1732
|
return Joi.object({
|
|
1982
|
-
global_variables: Joi.any(),
|
|
1733
|
+
global_variables: Joi.object().pattern(/\S/, Joi.any()),
|
|
1983
1734
|
});
|
|
1984
1735
|
}
|
|
1985
1736
|
|
|
@@ -2029,8 +1780,8 @@ class CommunicationPlatformModel {
|
|
|
2029
1780
|
/** @returns {JobLog} */
|
|
2030
1781
|
static JobLog() {
|
|
2031
1782
|
return Joi.object({
|
|
2032
|
-
imported:
|
|
2033
|
-
processed:
|
|
1783
|
+
imported: Joi.any(),
|
|
1784
|
+
processed: Joi.any(),
|
|
2034
1785
|
_id: Joi.string().allow(""),
|
|
2035
1786
|
job: Joi.string().allow(""),
|
|
2036
1787
|
campaign: Joi.string().allow(""),
|
|
@@ -2052,18 +1803,6 @@ class CommunicationPlatformModel {
|
|
|
2052
1803
|
static LogEmail() {
|
|
2053
1804
|
return Joi.object({
|
|
2054
1805
|
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(""),
|
|
2067
1806
|
});
|
|
2068
1807
|
}
|
|
2069
1808
|
|
|
@@ -2077,10 +1816,8 @@ class CommunicationPlatformModel {
|
|
|
2077
1816
|
/** @returns {LogMeta} */
|
|
2078
1817
|
static LogMeta() {
|
|
2079
1818
|
return Joi.object({
|
|
2080
|
-
identifier: Joi.string().allow(""),
|
|
2081
1819
|
type: Joi.string().allow(""),
|
|
2082
|
-
|
|
2083
|
-
campaign: Joi.string().allow(""),
|
|
1820
|
+
identifier: Joi.string().allow(""),
|
|
2084
1821
|
key: Joi.string().allow(""),
|
|
2085
1822
|
offset: Joi.string().allow(""),
|
|
2086
1823
|
partition: Joi.string().allow(""),
|
|
@@ -2092,18 +1829,16 @@ class CommunicationPlatformModel {
|
|
|
2092
1829
|
static Log() {
|
|
2093
1830
|
return Joi.object({
|
|
2094
1831
|
email: CommunicationPlatformModel.LogEmail(),
|
|
2095
|
-
sms: CommunicationPlatformModel.LogSms(),
|
|
2096
1832
|
pushnotification: CommunicationPlatformModel.LogPushnotification(),
|
|
1833
|
+
meta: CommunicationPlatformModel.LogMeta(),
|
|
2097
1834
|
_id: Joi.string().allow(""),
|
|
2098
|
-
|
|
1835
|
+
application: Joi.string().allow(""),
|
|
2099
1836
|
service: Joi.string().allow(""),
|
|
2100
1837
|
step: Joi.string().allow(""),
|
|
2101
|
-
source: Joi.string().allow(""),
|
|
2102
1838
|
status: Joi.string().allow(""),
|
|
1839
|
+
data: Joi.any(),
|
|
2103
1840
|
expire_at: Joi.string().allow(""),
|
|
2104
1841
|
created_at: Joi.string().allow(""),
|
|
2105
|
-
meta: CommunicationPlatformModel.LogMeta(),
|
|
2106
|
-
application: Joi.string().allow(""),
|
|
2107
1842
|
});
|
|
2108
1843
|
}
|
|
2109
1844
|
|
|
@@ -2115,6 +1850,14 @@ class CommunicationPlatformModel {
|
|
|
2115
1850
|
});
|
|
2116
1851
|
}
|
|
2117
1852
|
|
|
1853
|
+
/** @returns {SendOtpSmsCommsTemplate} */
|
|
1854
|
+
static SendOtpSmsCommsTemplate() {
|
|
1855
|
+
return Joi.object({
|
|
1856
|
+
key: Joi.string().allow(""),
|
|
1857
|
+
value: Joi.any(),
|
|
1858
|
+
});
|
|
1859
|
+
}
|
|
1860
|
+
|
|
2118
1861
|
/** @returns {SendOtpSmsCommsProvider} */
|
|
2119
1862
|
static SendOtpSmsCommsProvider() {
|
|
2120
1863
|
return Joi.object({
|
|
@@ -2154,7 +1897,7 @@ class CommunicationPlatformModel {
|
|
|
2154
1897
|
return Joi.object({
|
|
2155
1898
|
otp_length: Joi.number(),
|
|
2156
1899
|
expiry: Joi.number(),
|
|
2157
|
-
template:
|
|
1900
|
+
template: CommunicationPlatformModel.SendOtpSmsCommsTemplate(),
|
|
2158
1901
|
provider: CommunicationPlatformModel.SendOtpSmsCommsProvider(),
|
|
2159
1902
|
});
|
|
2160
1903
|
}
|
|
@@ -2228,10 +1971,19 @@ class CommunicationPlatformModel {
|
|
|
2228
1971
|
});
|
|
2229
1972
|
}
|
|
2230
1973
|
|
|
1974
|
+
/** @returns {VerifyOtpCommsErrorRes} */
|
|
1975
|
+
static VerifyOtpCommsErrorRes() {
|
|
1976
|
+
return Joi.object({
|
|
1977
|
+
success: Joi.boolean(),
|
|
1978
|
+
message: Joi.string().allow(""),
|
|
1979
|
+
});
|
|
1980
|
+
}
|
|
1981
|
+
|
|
2231
1982
|
/** @returns {SmsProviderReq} */
|
|
2232
1983
|
static SmsProviderReq() {
|
|
2233
1984
|
return Joi.object({
|
|
2234
1985
|
name: Joi.string().allow(""),
|
|
1986
|
+
token: Joi.string().allow(""),
|
|
2235
1987
|
description: Joi.string().allow(""),
|
|
2236
1988
|
sender: Joi.string().allow(""),
|
|
2237
1989
|
username: Joi.string().allow(""),
|
|
@@ -2250,12 +2002,18 @@ class CommunicationPlatformModel {
|
|
|
2250
2002
|
version_id: Joi.number(),
|
|
2251
2003
|
sender_id: Joi.string().allow(""),
|
|
2252
2004
|
api_key: Joi.string().allow(""),
|
|
2005
|
+
tenant_name_1: Joi.string().allow(""),
|
|
2006
|
+
tenant_name_2: Joi.string().allow(""),
|
|
2253
2007
|
});
|
|
2254
2008
|
}
|
|
2255
2009
|
|
|
2256
2010
|
/** @returns {SmsProvider} */
|
|
2257
2011
|
static SmsProvider() {
|
|
2258
2012
|
return Joi.object({
|
|
2013
|
+
token: Joi.string().allow(""),
|
|
2014
|
+
sender_id: Joi.string().allow(""),
|
|
2015
|
+
api_key: Joi.string().allow(""),
|
|
2016
|
+
expiry_date: Joi.number(),
|
|
2259
2017
|
rpt: Joi.number(),
|
|
2260
2018
|
type: Joi.string().allow(""),
|
|
2261
2019
|
provider: Joi.string().allow(""),
|
|
@@ -2265,7 +2023,6 @@ class CommunicationPlatformModel {
|
|
|
2265
2023
|
sender: Joi.string().allow(""),
|
|
2266
2024
|
username: Joi.string().allow(""),
|
|
2267
2025
|
authkey: Joi.string().allow(""),
|
|
2268
|
-
entity_id: Joi.string().allow(""),
|
|
2269
2026
|
application: Joi.string().allow(""),
|
|
2270
2027
|
created_at: Joi.string().allow(""),
|
|
2271
2028
|
updated_at: Joi.string().allow(""),
|
|
@@ -2321,7 +2078,7 @@ class CommunicationPlatformModel {
|
|
|
2321
2078
|
message: CommunicationPlatformModel.SmsTemplateMessage(),
|
|
2322
2079
|
priority: Joi.string().allow(""),
|
|
2323
2080
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
2324
|
-
template_variables: Joi.any(),
|
|
2081
|
+
template_variables: Joi.object().pattern(/\S/, Joi.any()),
|
|
2325
2082
|
template_id: Joi.string().allow(""),
|
|
2326
2083
|
published: Joi.boolean(),
|
|
2327
2084
|
category: Joi.string().allow(""),
|
|
@@ -2334,6 +2091,13 @@ class CommunicationPlatformModel {
|
|
|
2334
2091
|
|
|
2335
2092
|
/** @returns {SystemSmsTemplates} */
|
|
2336
2093
|
static SystemSmsTemplates() {
|
|
2094
|
+
return Joi.object({
|
|
2095
|
+
items: Joi.array().items(CommunicationPlatformModel.SystemSmsTemplate()),
|
|
2096
|
+
});
|
|
2097
|
+
}
|
|
2098
|
+
|
|
2099
|
+
/** @returns {SystemSmsTemplate} */
|
|
2100
|
+
static SystemSmsTemplate() {
|
|
2337
2101
|
return Joi.object({
|
|
2338
2102
|
url_shorten: CommunicationPlatformModel.EnabledObj(),
|
|
2339
2103
|
_id: Joi.string().allow(""),
|
|
@@ -2344,7 +2108,7 @@ class CommunicationPlatformModel {
|
|
|
2344
2108
|
message: CommunicationPlatformModel.SmsTemplateMessage(),
|
|
2345
2109
|
priority: Joi.string().allow(""),
|
|
2346
2110
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
2347
|
-
template_variables: Joi.any(),
|
|
2111
|
+
template_variables: Joi.object().pattern(/\S/, Joi.any()),
|
|
2348
2112
|
template_id: Joi.string().allow(""),
|
|
2349
2113
|
published: Joi.boolean(),
|
|
2350
2114
|
category: Joi.string().allow(""),
|
|
@@ -2372,7 +2136,7 @@ class CommunicationPlatformModel {
|
|
|
2372
2136
|
priority: Joi.string().allow(""),
|
|
2373
2137
|
template_id: Joi.string().allow(""),
|
|
2374
2138
|
meta: CommunicationPlatformModel.metaObj(),
|
|
2375
|
-
template_variables: Joi.any(),
|
|
2139
|
+
template_variables: Joi.object().pattern(/\S/, Joi.any()),
|
|
2376
2140
|
published: Joi.boolean(),
|
|
2377
2141
|
message: CommunicationPlatformModel.SmsTemplateMessage(),
|
|
2378
2142
|
});
|
|
@@ -2390,15 +2154,6 @@ class CommunicationPlatformModel {
|
|
|
2390
2154
|
});
|
|
2391
2155
|
}
|
|
2392
2156
|
|
|
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
|
-
|
|
2402
2157
|
/** @returns {SystemNotificationUser} */
|
|
2403
2158
|
static SystemNotificationUser() {
|
|
2404
2159
|
return Joi.object({
|
|
@@ -2412,7 +2167,7 @@ class CommunicationPlatformModel {
|
|
|
2412
2167
|
return Joi.object({
|
|
2413
2168
|
notification: CommunicationPlatformModel.Notification(),
|
|
2414
2169
|
user: CommunicationPlatformModel.SystemNotificationUser(),
|
|
2415
|
-
settings: CommunicationPlatformModel.
|
|
2170
|
+
settings: CommunicationPlatformModel.SystemNotificationUser(),
|
|
2416
2171
|
_id: Joi.string().allow(""),
|
|
2417
2172
|
group: Joi.string().allow(""),
|
|
2418
2173
|
created_at: Joi.string().allow(""),
|
|
@@ -2438,15 +2193,35 @@ class CommunicationPlatformModel {
|
|
|
2438
2193
|
current: Joi.number(),
|
|
2439
2194
|
type: Joi.string().allow("").required(),
|
|
2440
2195
|
size: Joi.number(),
|
|
2441
|
-
|
|
2196
|
+
page_size: Joi.number(),
|
|
2197
|
+
});
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2200
|
+
/** @returns {GenericError} */
|
|
2201
|
+
static GenericError() {
|
|
2202
|
+
return Joi.object({
|
|
2203
|
+
message: CommunicationPlatformModel.Message(),
|
|
2204
|
+
sentry: Joi.string().allow(""),
|
|
2442
2205
|
});
|
|
2443
2206
|
}
|
|
2444
2207
|
|
|
2445
|
-
/** @returns {
|
|
2446
|
-
static
|
|
2208
|
+
/** @returns {GenericDelete} */
|
|
2209
|
+
static GenericDelete() {
|
|
2447
2210
|
return Joi.object({
|
|
2211
|
+
message: Joi.string().allow(""),
|
|
2448
2212
|
acknowledged: Joi.boolean(),
|
|
2449
|
-
|
|
2213
|
+
affected: Joi.number(),
|
|
2214
|
+
operation: Joi.string().allow(""),
|
|
2215
|
+
});
|
|
2216
|
+
}
|
|
2217
|
+
|
|
2218
|
+
/** @returns {Message} */
|
|
2219
|
+
static Message() {
|
|
2220
|
+
return Joi.object({
|
|
2221
|
+
message: Joi.string().allow(""),
|
|
2222
|
+
success: Joi.boolean(),
|
|
2223
|
+
info: Joi.string().allow(""),
|
|
2224
|
+
operation: Joi.string().allow(""),
|
|
2450
2225
|
});
|
|
2451
2226
|
}
|
|
2452
2227
|
|
|
@@ -2473,21 +2248,12 @@ class CommunicationPlatformModel {
|
|
|
2473
2248
|
});
|
|
2474
2249
|
}
|
|
2475
2250
|
|
|
2476
|
-
/** @returns {OtpConfigRateLimit} */
|
|
2477
|
-
static OtpConfigRateLimit() {
|
|
2478
|
-
return Joi.object({
|
|
2479
|
-
duration: Joi.number(),
|
|
2480
|
-
limit: Joi.number(),
|
|
2481
|
-
});
|
|
2482
|
-
}
|
|
2483
|
-
|
|
2484
2251
|
/** @returns {OtpConfiguration} */
|
|
2485
2252
|
static OtpConfiguration() {
|
|
2486
2253
|
return Joi.object({
|
|
2487
2254
|
otp_length: Joi.number().required(),
|
|
2488
2255
|
type: Joi.string().allow("").required(),
|
|
2489
2256
|
expiry: CommunicationPlatformModel.OtpConfigurationExpiry().required(),
|
|
2490
|
-
rate_limit: CommunicationPlatformModel.OtpConfigRateLimit().required(),
|
|
2491
2257
|
application_id: Joi.string().allow(""),
|
|
2492
2258
|
company_id: Joi.string().allow(""),
|
|
2493
2259
|
});
|