@gofynd/fdk-client-javascript 3.0.0-beta.1 → 3.0.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 +1 -1
- package/sdk/application/ApplicationClient.d.ts +2 -0
- package/sdk/application/ApplicationClient.js +2 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +93 -113
- package/sdk/application/Cart/CartApplicationClient.js +157 -530
- 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 +65 -55
- package/sdk/application/Content/ContentApplicationClient.js +211 -341
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -6
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +14 -33
- 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 +32 -87
- package/sdk/application/Logistic/LogisticApplicationClient.js +126 -383
- 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 +18 -62
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +40 -372
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +99 -33
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +84 -25
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -5
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +7 -38
- 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 +15 -406
- package/sdk/platform/Billing/BillingPlatformClient.js +76 -3214
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +459 -3798
- package/sdk/platform/Billing/BillingPlatformModel.js +338 -2573
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +24 -465
- package/sdk/platform/Billing/BillingPlatformValidator.js +14 -490
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +205 -284
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +554 -672
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +165 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +132 -108
- package/sdk/platform/Cart/CartPlatformModel.d.ts +4865 -3148
- package/sdk/platform/Cart/CartPlatformModel.js +2071 -2854
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +419 -1015
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2004 -6444
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +226 -1117
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +127 -919
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +574 -372
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1315 -1238
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9334 -7634
- package/sdk/platform/Catalog/CatalogPlatformModel.js +6980 -9652
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +239 -294
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +186 -246
- 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 +236 -376
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +579 -868
- 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 +314 -422
- package/sdk/platform/Communication/CommunicationPlatformModel.js +382 -538
- 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 -68
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +88 -84
- 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 -20
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -20
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +118 -333
- 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 +565 -1282
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +369 -1034
- 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 -246
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1297 -776
- 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 +2374 -877
- package/sdk/platform/Content/ContentPlatformModel.js +1304 -930
- 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 +421 -418
- package/sdk/platform/Order/OrderPlatformClient.js +1194 -1350
- package/sdk/platform/Order/OrderPlatformModel.d.ts +9145 -4107
- package/sdk/platform/Order/OrderPlatformModel.js +4257 -3197
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +641 -442
- package/sdk/platform/Order/OrderPlatformValidator.js +341 -311
- 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 +934 -2452
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +93 -306
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +70 -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 +1327 -3529
- package/sdk/platform/Payment/PaymentPlatformModel.js +1397 -3693
- 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 -513
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +75 -103
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +50 -99
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +162 -127
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +775 -435
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +6250 -3861
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3178 -3798
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +295 -199
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +205 -133
- 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 -4
- package/sdk/platform/Share/SharePlatformModel.js +45 -3
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +4 -26
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +10 -157
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +10 -21
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +6 -23
- 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 -2
- package/sdk/public/PublicClient.js +2 -2
- 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 -1
- package/sdk/public/index.js +1 -1
- 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
- package/sdk/public/Billing/BillingPublicClient.d.ts +0 -56
- package/sdk/public/Billing/BillingPublicClient.js +0 -397
- package/sdk/public/Billing/BillingPublicModel.d.ts +0 -919
- package/sdk/public/Billing/BillingPublicModel.js +0 -560
- package/sdk/public/Billing/BillingPublicValidator.d.ts +0 -43
- package/sdk/public/Billing/BillingPublicValidator.js +0 -50
|
@@ -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
|
|
|
@@ -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 {Object} [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,14 +505,35 @@ 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]
|
|
616
512
|
* @property {number} [__v]
|
|
617
513
|
*/
|
|
618
514
|
|
|
515
|
+
/**
|
|
516
|
+
* @typedef EventSubscriptionEvents
|
|
517
|
+
* @property {string} [category]
|
|
518
|
+
* @property {string} [event_name]
|
|
519
|
+
* @property {string} [group]
|
|
520
|
+
* @property {string} [slug]
|
|
521
|
+
* @property {EventTemplate} [template]
|
|
522
|
+
*/
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* @typedef EventTemplate
|
|
526
|
+
* @property {EventProviderTemplates} [email]
|
|
527
|
+
* @property {EventProviderTemplates} [pushnotification]
|
|
528
|
+
* @property {EventProviderTemplates} [sms]
|
|
529
|
+
*/
|
|
530
|
+
|
|
531
|
+
/**
|
|
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
|
|
535
|
+
*/
|
|
536
|
+
|
|
619
537
|
/**
|
|
620
538
|
* @typedef EventSubscriptions
|
|
621
539
|
* @property {EventSubscription[]} [items]
|
|
@@ -623,23 +541,23 @@ const Joi = require("joi");
|
|
|
623
541
|
*/
|
|
624
542
|
|
|
625
543
|
/**
|
|
626
|
-
* @typedef
|
|
544
|
+
* @typedef TriggerJobResult
|
|
627
545
|
* @property {number} [status]
|
|
628
546
|
*/
|
|
629
547
|
|
|
630
548
|
/**
|
|
631
|
-
* @typedef
|
|
549
|
+
* @typedef TriggerJobPayload
|
|
632
550
|
* @property {string} [job_id]
|
|
633
551
|
*/
|
|
634
552
|
|
|
635
553
|
/**
|
|
636
|
-
* @typedef
|
|
554
|
+
* @typedef GetGlobalVariablesResult
|
|
637
555
|
* @property {Object} [read_only]
|
|
638
556
|
* @property {Object} [editable]
|
|
639
557
|
*/
|
|
640
558
|
|
|
641
559
|
/**
|
|
642
|
-
* @typedef
|
|
560
|
+
* @typedef CreateGlobalVariablesResult
|
|
643
561
|
* @property {string} [_id]
|
|
644
562
|
* @property {string} [category]
|
|
645
563
|
* @property {string} [application]
|
|
@@ -708,16 +626,6 @@ const Joi = require("joi");
|
|
|
708
626
|
/**
|
|
709
627
|
* @typedef LogEmail
|
|
710
628
|
* @property {string} [template]
|
|
711
|
-
* @property {string} [provider]
|
|
712
|
-
* @property {string} [to]
|
|
713
|
-
*/
|
|
714
|
-
|
|
715
|
-
/**
|
|
716
|
-
* @typedef LogSms
|
|
717
|
-
* @property {string} [template]
|
|
718
|
-
* @property {string} [provider]
|
|
719
|
-
* @property {string} [phone_number]
|
|
720
|
-
* @property {string} [country_code]
|
|
721
629
|
*/
|
|
722
630
|
|
|
723
631
|
/**
|
|
@@ -727,10 +635,8 @@ const Joi = require("joi");
|
|
|
727
635
|
|
|
728
636
|
/**
|
|
729
637
|
* @typedef LogMeta
|
|
730
|
-
* @property {string} [identifier]
|
|
731
638
|
* @property {string} [type]
|
|
732
|
-
* @property {string} [
|
|
733
|
-
* @property {string} [campaign]
|
|
639
|
+
* @property {string} [identifier]
|
|
734
640
|
* @property {string} [key]
|
|
735
641
|
* @property {string} [offset]
|
|
736
642
|
* @property {string} [partition]
|
|
@@ -740,18 +646,16 @@ const Joi = require("joi");
|
|
|
740
646
|
/**
|
|
741
647
|
* @typedef Log
|
|
742
648
|
* @property {LogEmail} [email]
|
|
743
|
-
* @property {LogSms} [sms]
|
|
744
649
|
* @property {LogPushnotification} [pushnotification]
|
|
650
|
+
* @property {LogMeta} [meta]
|
|
745
651
|
* @property {string} [_id]
|
|
746
|
-
* @property {string} [
|
|
652
|
+
* @property {string} [application]
|
|
747
653
|
* @property {string} [service]
|
|
748
654
|
* @property {string} [step]
|
|
749
|
-
* @property {string} [source]
|
|
750
655
|
* @property {string} [status]
|
|
656
|
+
* @property {Object} [data]
|
|
751
657
|
* @property {string} [expire_at]
|
|
752
658
|
* @property {string} [created_at]
|
|
753
|
-
* @property {LogMeta} [meta]
|
|
754
|
-
* @property {string} [application]
|
|
755
659
|
*/
|
|
756
660
|
|
|
757
661
|
/**
|
|
@@ -855,9 +759,16 @@ const Joi = require("joi");
|
|
|
855
759
|
* @property {string} [email]
|
|
856
760
|
*/
|
|
857
761
|
|
|
762
|
+
/**
|
|
763
|
+
* @typedef VerifyOtpCommsErrorRes
|
|
764
|
+
* @property {boolean} [success]
|
|
765
|
+
* @property {string} [message]
|
|
766
|
+
*/
|
|
767
|
+
|
|
858
768
|
/**
|
|
859
769
|
* @typedef SmsProviderReq
|
|
860
770
|
* @property {string} [name]
|
|
771
|
+
* @property {string} [token]
|
|
861
772
|
* @property {string} [description]
|
|
862
773
|
* @property {string} [sender]
|
|
863
774
|
* @property {string} [username]
|
|
@@ -876,10 +787,16 @@ const Joi = require("joi");
|
|
|
876
787
|
* @property {number} [version_id] - The version ID for the test.
|
|
877
788
|
* @property {string} [sender_id] - The sender ID for the test.
|
|
878
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.
|
|
879
792
|
*/
|
|
880
793
|
|
|
881
794
|
/**
|
|
882
795
|
* @typedef SmsProvider
|
|
796
|
+
* @property {string} [token]
|
|
797
|
+
* @property {string} [sender_id]
|
|
798
|
+
* @property {string} [api_key]
|
|
799
|
+
* @property {number} [expiry_date]
|
|
883
800
|
* @property {number} [rpt]
|
|
884
801
|
* @property {string} [type]
|
|
885
802
|
* @property {string} [provider]
|
|
@@ -889,7 +806,6 @@ const Joi = require("joi");
|
|
|
889
806
|
* @property {string} [sender]
|
|
890
807
|
* @property {string} [username]
|
|
891
808
|
* @property {string} [authkey]
|
|
892
|
-
* @property {string} [entity_id]
|
|
893
809
|
* @property {string} [application]
|
|
894
810
|
* @property {string} [created_at]
|
|
895
811
|
* @property {string} [updated_at]
|
|
@@ -947,6 +863,11 @@ const Joi = require("joi");
|
|
|
947
863
|
|
|
948
864
|
/**
|
|
949
865
|
* @typedef SystemSmsTemplates
|
|
866
|
+
* @property {SystemSmsTemplate[]} [items] - An array of system SMS templates
|
|
867
|
+
*/
|
|
868
|
+
|
|
869
|
+
/**
|
|
870
|
+
* @typedef SystemSmsTemplate
|
|
950
871
|
* @property {EnabledObj} [url_shorten]
|
|
951
872
|
* @property {string} [_id]
|
|
952
873
|
* @property {boolean} [is_system]
|
|
@@ -1014,252 +935,73 @@ const Joi = require("joi");
|
|
|
1014
935
|
/**
|
|
1015
936
|
* @typedef SystemNotifications
|
|
1016
937
|
* @property {SystemNotification[]} [items]
|
|
1017
|
-
* @property {number} [last_read_anchor]
|
|
1018
|
-
* @property {Page} [page]
|
|
1019
|
-
*/
|
|
1020
|
-
|
|
1021
|
-
/**
|
|
1022
|
-
* @typedef Page
|
|
1023
|
-
* @property {number} [item_total] - The total number of items on the page.
|
|
1024
|
-
* @property {string} [next_id] - The identifier for the next page.
|
|
1025
|
-
* @property {boolean} [has_previous] - Indicates whether there is a previous page.
|
|
1026
|
-
* @property {boolean} [has_next] - Indicates whether there is a next page.
|
|
1027
|
-
* @property {number} [current] - The current page number.
|
|
1028
|
-
* @property {string} type - The type of the page, such as 'PageType'.
|
|
1029
|
-
* @property {number} [size] - The number of items per page.
|
|
1030
|
-
* @property {number} [total] - Total number of items.
|
|
1031
|
-
*/
|
|
1032
|
-
|
|
1033
|
-
/**
|
|
1034
|
-
* @typedef BasicDelete
|
|
1035
|
-
* @property {boolean} [acknowledged]
|
|
1036
|
-
* @property {number} [deleted_count]
|
|
1037
|
-
*/
|
|
1038
|
-
|
|
1039
|
-
/**
|
|
1040
|
-
* @typedef EnabledObj
|
|
1041
|
-
* @property {boolean} [enabled]
|
|
1042
|
-
*/
|
|
1043
|
-
|
|
1044
|
-
/**
|
|
1045
|
-
* @typedef OtpConfigurationExpiryDuration
|
|
1046
|
-
* @property {number} time
|
|
1047
|
-
* @property {string} denomination
|
|
1048
|
-
*/
|
|
1049
|
-
|
|
1050
|
-
/**
|
|
1051
|
-
* @typedef OtpConfigurationExpiry
|
|
1052
|
-
* @property {OtpConfigurationExpiryDuration} duration
|
|
1053
|
-
* @property {string} type
|
|
1054
|
-
*/
|
|
1055
|
-
|
|
1056
|
-
/**
|
|
1057
|
-
* @typedef OtpConfigRateLimit
|
|
1058
|
-
* @property {number} [duration]
|
|
1059
|
-
* @property {number} [limit]
|
|
1060
|
-
*/
|
|
1061
|
-
|
|
1062
|
-
/**
|
|
1063
|
-
* @typedef OtpConfiguration
|
|
1064
|
-
* @property {number} otp_length
|
|
1065
|
-
* @property {string} type
|
|
1066
|
-
* @property {OtpConfigurationExpiry} expiry
|
|
1067
|
-
* @property {OtpConfigRateLimit} rate_limit
|
|
1068
|
-
* @property {string} [application_id]
|
|
1069
|
-
* @property {string} [company_id]
|
|
1070
|
-
*/
|
|
1071
|
-
|
|
1072
|
-
class CommunicationPlatformModel {
|
|
1073
|
-
/** @returns {AppProvidersGlobalProviderRequestObjProvider} */
|
|
1074
|
-
static AppProvidersGlobalProviderRequestObjProvider() {
|
|
1075
|
-
return Joi.object({
|
|
1076
|
-
provider: Joi.string().allow(""),
|
|
1077
|
-
});
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
|
-
/** @returns {AppProvidersGlobalProviderRequestObj} */
|
|
1081
|
-
static AppProvidersGlobalProviderRequestObj() {
|
|
1082
|
-
return Joi.object({
|
|
1083
|
-
transaction: CommunicationPlatformModel.AppProvidersGlobalProviderRequestObjProvider(),
|
|
1084
|
-
otp: CommunicationPlatformModel.AppProvidersGlobalProviderRequestObjProvider(),
|
|
1085
|
-
});
|
|
1086
|
-
}
|
|
1087
|
-
|
|
1088
|
-
/** @returns {AppProvidersGlobalProviderRequest} */
|
|
1089
|
-
static AppProvidersGlobalProviderRequest() {
|
|
1090
|
-
return Joi.object({
|
|
1091
|
-
email: CommunicationPlatformModel.AppProvidersGlobalProviderRequestObj(),
|
|
1092
|
-
sms: CommunicationPlatformModel.AppProvidersGlobalProviderRequestObj(),
|
|
1093
|
-
});
|
|
1094
|
-
}
|
|
1095
|
-
|
|
1096
|
-
/** @returns {UpdateAppProvidersGlobalProviderResponseEmailSmsObj} */
|
|
1097
|
-
static UpdateAppProvidersGlobalProviderResponseEmailSmsObj() {
|
|
1098
|
-
return Joi.object({
|
|
1099
|
-
default_provider: Joi.string().allow("").allow(null),
|
|
1100
|
-
otp_provider: Joi.string().allow("").allow(null),
|
|
1101
|
-
});
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1104
|
-
/** @returns {UpdateAppProvidersGlobalProviderResponse} */
|
|
1105
|
-
static UpdateAppProvidersGlobalProviderResponse() {
|
|
1106
|
-
return Joi.object({
|
|
1107
|
-
email: CommunicationPlatformModel.UpdateAppProvidersGlobalProviderResponseEmailSmsObj(),
|
|
1108
|
-
sms: CommunicationPlatformModel.UpdateAppProvidersGlobalProviderResponseEmailSmsObj(),
|
|
1109
|
-
_id: Joi.string().allow(""),
|
|
1110
|
-
slug: Joi.string().allow(""),
|
|
1111
|
-
});
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
/** @returns {DefaultEmailProvidersFromAddresses} */
|
|
1115
|
-
static DefaultEmailProvidersFromAddresses() {
|
|
1116
|
-
return Joi.object({
|
|
1117
|
-
name: Joi.string().allow(""),
|
|
1118
|
-
email: Joi.string().allow(""),
|
|
1119
|
-
is_default: Joi.boolean(),
|
|
1120
|
-
});
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
/** @returns {DefaultEmailProviders} */
|
|
1124
|
-
static DefaultEmailProviders() {
|
|
1125
|
-
return Joi.object({
|
|
1126
|
-
_id: Joi.string().allow(""),
|
|
1127
|
-
from_address: Joi.array().items(
|
|
1128
|
-
CommunicationPlatformModel.DefaultEmailProvidersFromAddresses()
|
|
1129
|
-
),
|
|
1130
|
-
name: Joi.string().allow(""),
|
|
1131
|
-
is_default: Joi.boolean(),
|
|
1132
|
-
});
|
|
1133
|
-
}
|
|
1134
|
-
|
|
1135
|
-
/** @returns {PushtokenReq} */
|
|
1136
|
-
static PushtokenReq() {
|
|
1137
|
-
return Joi.object({
|
|
1138
|
-
action: Joi.string().allow(""),
|
|
1139
|
-
bundle_identifier: Joi.string().allow(""),
|
|
1140
|
-
push_token: Joi.string().allow(""),
|
|
1141
|
-
unique_device_id: Joi.string().allow(""),
|
|
1142
|
-
type: Joi.string().allow(""),
|
|
1143
|
-
});
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
/** @returns {PushtokenRes} */
|
|
1147
|
-
static PushtokenRes() {
|
|
1148
|
-
return Joi.object({
|
|
1149
|
-
_id: Joi.string().allow(""),
|
|
1150
|
-
bundle_identifier: Joi.string().allow(""),
|
|
1151
|
-
push_token: Joi.string().allow(""),
|
|
1152
|
-
unique_device_id: Joi.string().allow(""),
|
|
1153
|
-
type: Joi.string().allow(""),
|
|
1154
|
-
platform: Joi.string().allow(""),
|
|
1155
|
-
application_id: Joi.string().allow(""),
|
|
1156
|
-
user_id: Joi.string().allow(""),
|
|
1157
|
-
created_at: Joi.string().allow(""),
|
|
1158
|
-
updated_at: Joi.string().allow(""),
|
|
1159
|
-
expired_at: Joi.string().allow(""),
|
|
1160
|
-
});
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
/** @returns {SendInstantResponse} */
|
|
1164
|
-
static SendInstantResponse() {
|
|
1165
|
-
return Joi.object({
|
|
1166
|
-
success: Joi.boolean(),
|
|
1167
|
-
provider: Joi.string().allow("").allow(null),
|
|
1168
|
-
response: Joi.boolean().allow(null),
|
|
1169
|
-
});
|
|
1170
|
-
}
|
|
1171
|
-
|
|
1172
|
-
/** @returns {MetaStructure} */
|
|
1173
|
-
static MetaStructure() {
|
|
1174
|
-
return Joi.object({
|
|
1175
|
-
job_type: Joi.string().allow(""),
|
|
1176
|
-
action: Joi.string().allow(""),
|
|
1177
|
-
trace: Joi.string().allow(""),
|
|
1178
|
-
timestamp: Joi.string().allow(""),
|
|
1179
|
-
});
|
|
1180
|
-
}
|
|
1181
|
-
|
|
1182
|
-
/** @returns {PayloadSmsTemplateStructure} */
|
|
1183
|
-
static PayloadSmsTemplateStructure() {
|
|
1184
|
-
return Joi.object({
|
|
1185
|
-
key: Joi.string().allow(""),
|
|
1186
|
-
value: Joi.any(),
|
|
1187
|
-
});
|
|
1188
|
-
}
|
|
1189
|
-
|
|
1190
|
-
/** @returns {PayloadSmsProviderStructure} */
|
|
1191
|
-
static PayloadSmsProviderStructure() {
|
|
1192
|
-
return Joi.object({
|
|
1193
|
-
slug: Joi.string().allow(""),
|
|
1194
|
-
});
|
|
1195
|
-
}
|
|
1196
|
-
|
|
1197
|
-
/** @returns {PayloadEmailTemplateStructure} */
|
|
1198
|
-
static PayloadEmailTemplateStructure() {
|
|
1199
|
-
return Joi.object({
|
|
1200
|
-
key: Joi.string().allow(""),
|
|
1201
|
-
value: Joi.any(),
|
|
1202
|
-
});
|
|
1203
|
-
}
|
|
938
|
+
* @property {number} [last_read_anchor]
|
|
939
|
+
* @property {Page} [page]
|
|
940
|
+
*/
|
|
1204
941
|
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
942
|
+
/**
|
|
943
|
+
* @typedef Page
|
|
944
|
+
* @property {number} [item_total] - The total number of items on the page.
|
|
945
|
+
* @property {string} [next_id] - The identifier for the next page.
|
|
946
|
+
* @property {boolean} [has_previous] - Indicates whether there is a previous page.
|
|
947
|
+
* @property {boolean} [has_next] - Indicates whether there is a next page.
|
|
948
|
+
* @property {number} [current] - The current page number.
|
|
949
|
+
* @property {string} type - The type of the page, such as 'PageType'.
|
|
950
|
+
* @property {number} [size] - The number of items per page.
|
|
951
|
+
* @property {number} [page_size] - The number of items per page.
|
|
952
|
+
*/
|
|
1211
953
|
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
});
|
|
1218
|
-
}
|
|
954
|
+
/**
|
|
955
|
+
* @typedef GenericError
|
|
956
|
+
* @property {Message} [message]
|
|
957
|
+
* @property {string} [sentry]
|
|
958
|
+
*/
|
|
1219
959
|
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
960
|
+
/**
|
|
961
|
+
* @typedef GenericDelete
|
|
962
|
+
* @property {string} [message]
|
|
963
|
+
* @property {boolean} [acknowledged]
|
|
964
|
+
* @property {number} [affected]
|
|
965
|
+
* @property {string} [operation]
|
|
966
|
+
*/
|
|
1227
967
|
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
}
|
|
968
|
+
/**
|
|
969
|
+
* @typedef Message
|
|
970
|
+
* @property {string} [message]
|
|
971
|
+
* @property {boolean} [success]
|
|
972
|
+
* @property {string} [info]
|
|
973
|
+
* @property {string} [operation]
|
|
974
|
+
*/
|
|
1236
975
|
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
email: CommunicationPlatformModel.PayloadEmailStructure(),
|
|
1242
|
-
sms: CommunicationPlatformModel.PayloadSmsStructure(),
|
|
1243
|
-
});
|
|
1244
|
-
}
|
|
976
|
+
/**
|
|
977
|
+
* @typedef EnabledObj
|
|
978
|
+
* @property {boolean} [enabled]
|
|
979
|
+
*/
|
|
1245
980
|
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
});
|
|
1252
|
-
}
|
|
981
|
+
/**
|
|
982
|
+
* @typedef OtpConfigurationExpiryDuration
|
|
983
|
+
* @property {number} time
|
|
984
|
+
* @property {string} denomination
|
|
985
|
+
*/
|
|
1253
986
|
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
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
|
+
*/
|
|
1260
1001
|
|
|
1261
|
-
|
|
1262
|
-
|
|
1002
|
+
class CommunicationPlatformModel {
|
|
1003
|
+
/** @returns {EventSubscriptionsBulkUpdatePayload} */
|
|
1004
|
+
static EventSubscriptionsBulkUpdatePayload() {
|
|
1263
1005
|
return Joi.object({
|
|
1264
1006
|
subscriptions: Joi.array().items(
|
|
1265
1007
|
CommunicationPlatformModel.SubscriptionsObject()
|
|
@@ -1267,8 +1009,8 @@ class CommunicationPlatformModel {
|
|
|
1267
1009
|
});
|
|
1268
1010
|
}
|
|
1269
1011
|
|
|
1270
|
-
/** @returns {
|
|
1271
|
-
static
|
|
1012
|
+
/** @returns {EventSubscriptionsBulkUpdateResult} */
|
|
1013
|
+
static EventSubscriptionsBulkUpdateResult() {
|
|
1272
1014
|
return Joi.object({
|
|
1273
1015
|
template: CommunicationPlatformModel.EventSubscriptionTemplate(),
|
|
1274
1016
|
_id: Joi.string().allow(""),
|
|
@@ -1282,21 +1024,10 @@ class CommunicationPlatformModel {
|
|
|
1282
1024
|
});
|
|
1283
1025
|
}
|
|
1284
1026
|
|
|
1285
|
-
/** @returns {SubscriptionsObjectRequest} */
|
|
1286
|
-
static SubscriptionsObjectRequest() {
|
|
1287
|
-
return Joi.object({
|
|
1288
|
-
event: Joi.string().allow(""),
|
|
1289
|
-
slug: Joi.string().allow(""),
|
|
1290
|
-
template: CommunicationPlatformModel.TemplateObject(),
|
|
1291
|
-
});
|
|
1292
|
-
}
|
|
1293
|
-
|
|
1294
1027
|
/** @returns {SubscriptionsObject} */
|
|
1295
1028
|
static SubscriptionsObject() {
|
|
1296
1029
|
return Joi.object({
|
|
1297
1030
|
_id: Joi.string().allow(""),
|
|
1298
|
-
event: Joi.string().allow(""),
|
|
1299
|
-
slug: Joi.string().allow(""),
|
|
1300
1031
|
template: CommunicationPlatformModel.TemplateObject(),
|
|
1301
1032
|
});
|
|
1302
1033
|
}
|
|
@@ -1440,9 +1171,6 @@ class CommunicationPlatformModel {
|
|
|
1440
1171
|
/** @returns {CampaignReq} */
|
|
1441
1172
|
static CampaignReq() {
|
|
1442
1173
|
return Joi.object({
|
|
1443
|
-
recipient_headers: CommunicationPlatformModel.RecipientHeaders(),
|
|
1444
|
-
email: CommunicationPlatformModel.CampaignEmail(),
|
|
1445
|
-
datasource: Joi.string().allow(""),
|
|
1446
1174
|
description: Joi.string().allow(""),
|
|
1447
1175
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
1448
1176
|
headers: Joi.array().items(Joi.string().allow("")),
|
|
@@ -1493,7 +1221,7 @@ class CommunicationPlatformModel {
|
|
|
1493
1221
|
recipient_headers: CommunicationPlatformModel.RecipientHeaders(),
|
|
1494
1222
|
email: CommunicationPlatformModel.CampaignEmail(),
|
|
1495
1223
|
description: Joi.string().allow(""),
|
|
1496
|
-
tags: Joi.array().items(Joi.
|
|
1224
|
+
tags: Joi.array().items(Joi.any()),
|
|
1497
1225
|
is_active: Joi.boolean(),
|
|
1498
1226
|
_id: Joi.string().allow(""),
|
|
1499
1227
|
datasource: Joi.string().allow(""),
|
|
@@ -1515,6 +1243,21 @@ class CommunicationPlatformModel {
|
|
|
1515
1243
|
});
|
|
1516
1244
|
}
|
|
1517
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
|
+
|
|
1518
1261
|
/** @returns {AudienceReq} */
|
|
1519
1262
|
static AudienceReq() {
|
|
1520
1263
|
return Joi.object({
|
|
@@ -1688,7 +1431,7 @@ class CommunicationPlatformModel {
|
|
|
1688
1431
|
reply_to: Joi.string().allow(""),
|
|
1689
1432
|
priority: Joi.string().allow(""),
|
|
1690
1433
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
1691
|
-
template_variables: Joi.any(),
|
|
1434
|
+
template_variables: Joi.object().pattern(/\S/, Joi.any()),
|
|
1692
1435
|
published: Joi.boolean(),
|
|
1693
1436
|
subject: CommunicationPlatformModel.TemplateAndType(),
|
|
1694
1437
|
html: CommunicationPlatformModel.TemplateAndType(),
|
|
@@ -1711,15 +1454,6 @@ class CommunicationPlatformModel {
|
|
|
1711
1454
|
});
|
|
1712
1455
|
}
|
|
1713
1456
|
|
|
1714
|
-
/** @returns {TemplateKeys} */
|
|
1715
|
-
static TemplateKeys() {
|
|
1716
|
-
return Joi.object({
|
|
1717
|
-
to: Joi.string().allow(""),
|
|
1718
|
-
cc: Joi.string().allow(""),
|
|
1719
|
-
bcc: Joi.string().allow(""),
|
|
1720
|
-
});
|
|
1721
|
-
}
|
|
1722
|
-
|
|
1723
1457
|
/** @returns {EmailTemplate} */
|
|
1724
1458
|
static EmailTemplate() {
|
|
1725
1459
|
return Joi.object({
|
|
@@ -1736,11 +1470,10 @@ class CommunicationPlatformModel {
|
|
|
1736
1470
|
reply_to: Joi.string().allow(""),
|
|
1737
1471
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
1738
1472
|
subject: CommunicationPlatformModel.TemplateAndType(),
|
|
1739
|
-
keys: CommunicationPlatformModel.TemplateKeys(),
|
|
1740
1473
|
html: CommunicationPlatformModel.TemplateAndType(),
|
|
1741
1474
|
url_shorten: CommunicationPlatformModel.EnabledObj(),
|
|
1742
1475
|
priority: Joi.string().allow(""),
|
|
1743
|
-
template_variables: Joi.any(),
|
|
1476
|
+
template_variables: Joi.object().pattern(/\S/, Joi.any()),
|
|
1744
1477
|
published: Joi.boolean(),
|
|
1745
1478
|
category: Joi.string().allow(""),
|
|
1746
1479
|
_id: Joi.string().allow(""),
|
|
@@ -1772,7 +1505,7 @@ class CommunicationPlatformModel {
|
|
|
1772
1505
|
html: CommunicationPlatformModel.TemplateAndType(),
|
|
1773
1506
|
url_shorten: CommunicationPlatformModel.EnabledObj(),
|
|
1774
1507
|
priority: Joi.string().allow(""),
|
|
1775
|
-
template_variables: Joi.any(),
|
|
1508
|
+
template_variables: Joi.object().pattern(/\S/, Joi.any()),
|
|
1776
1509
|
published: Joi.boolean(),
|
|
1777
1510
|
category: Joi.string().allow(""),
|
|
1778
1511
|
_id: Joi.string().allow(""),
|
|
@@ -1796,40 +1529,109 @@ class CommunicationPlatformModel {
|
|
|
1796
1529
|
});
|
|
1797
1530
|
}
|
|
1798
1531
|
|
|
1799
|
-
/** @returns {
|
|
1800
|
-
static
|
|
1532
|
+
/** @returns {SystemEmailTemplates} */
|
|
1533
|
+
static SystemEmailTemplates() {
|
|
1801
1534
|
return Joi.object({
|
|
1802
|
-
items: Joi.array().items(
|
|
1535
|
+
items: Joi.array().items(
|
|
1536
|
+
CommunicationPlatformModel.SystemEmailTemplate()
|
|
1537
|
+
),
|
|
1803
1538
|
});
|
|
1804
1539
|
}
|
|
1805
1540
|
|
|
1806
|
-
/** @returns {
|
|
1807
|
-
static
|
|
1541
|
+
/** @returns {PayloadEmailTemplateStructure} */
|
|
1542
|
+
static PayloadEmailTemplateStructure() {
|
|
1808
1543
|
return Joi.object({
|
|
1809
|
-
|
|
1544
|
+
key: Joi.string().allow(""),
|
|
1545
|
+
value: Joi.any(),
|
|
1810
1546
|
});
|
|
1811
1547
|
}
|
|
1812
1548
|
|
|
1813
|
-
/** @returns {
|
|
1814
|
-
static
|
|
1549
|
+
/** @returns {PayloadEmailProviderStructure} */
|
|
1550
|
+
static PayloadEmailProviderStructure() {
|
|
1815
1551
|
return Joi.object({
|
|
1816
|
-
|
|
1817
|
-
template: Joi.any(),
|
|
1552
|
+
_id: Joi.string().allow(""),
|
|
1818
1553
|
});
|
|
1819
1554
|
}
|
|
1820
1555
|
|
|
1821
|
-
/** @returns {
|
|
1822
|
-
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() {
|
|
1823
1624
|
return Joi.object({
|
|
1824
1625
|
subscribed: Joi.boolean(),
|
|
1825
|
-
template:
|
|
1626
|
+
template: CommunicationPlatformModel.SmsTemplate(),
|
|
1826
1627
|
});
|
|
1827
1628
|
}
|
|
1828
1629
|
|
|
1829
|
-
/** @returns {
|
|
1830
|
-
static
|
|
1630
|
+
/** @returns {EventSubscriptionTemplateEmail} */
|
|
1631
|
+
static EventSubscriptionTemplateEmail() {
|
|
1831
1632
|
return Joi.object({
|
|
1832
1633
|
subscribed: Joi.boolean(),
|
|
1634
|
+
template: CommunicationPlatformModel.EmailTemplate(),
|
|
1833
1635
|
});
|
|
1834
1636
|
}
|
|
1835
1637
|
|
|
@@ -1838,7 +1640,6 @@ class CommunicationPlatformModel {
|
|
|
1838
1640
|
return Joi.object({
|
|
1839
1641
|
sms: CommunicationPlatformModel.EventSubscriptionTemplateSms(),
|
|
1840
1642
|
email: CommunicationPlatformModel.EventSubscriptionTemplateEmail(),
|
|
1841
|
-
pushnotification: CommunicationPlatformModel.EventSubscriptionTemplatePushnotification(),
|
|
1842
1643
|
});
|
|
1843
1644
|
}
|
|
1844
1645
|
|
|
@@ -1849,8 +1650,7 @@ class CommunicationPlatformModel {
|
|
|
1849
1650
|
is_default: Joi.boolean(),
|
|
1850
1651
|
_id: Joi.string().allow(""),
|
|
1851
1652
|
application: Joi.string().allow(""),
|
|
1852
|
-
|
|
1853
|
-
event: Joi.any(),
|
|
1653
|
+
event: CommunicationPlatformModel.EventSubscriptionEvents(),
|
|
1854
1654
|
slug: Joi.string().allow(""),
|
|
1855
1655
|
created_at: Joi.string().allow(""),
|
|
1856
1656
|
updated_at: Joi.string().allow(""),
|
|
@@ -1858,6 +1658,34 @@ class CommunicationPlatformModel {
|
|
|
1858
1658
|
});
|
|
1859
1659
|
}
|
|
1860
1660
|
|
|
1661
|
+
/** @returns {EventSubscriptionEvents} */
|
|
1662
|
+
static EventSubscriptionEvents() {
|
|
1663
|
+
return Joi.object({
|
|
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(),
|
|
1669
|
+
});
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1672
|
+
/** @returns {EventTemplate} */
|
|
1673
|
+
static EventTemplate() {
|
|
1674
|
+
return Joi.object({
|
|
1675
|
+
email: CommunicationPlatformModel.EventProviderTemplates(),
|
|
1676
|
+
pushnotification: CommunicationPlatformModel.EventProviderTemplates(),
|
|
1677
|
+
sms: CommunicationPlatformModel.EventProviderTemplates(),
|
|
1678
|
+
});
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
/** @returns {EventProviderTemplates} */
|
|
1682
|
+
static EventProviderTemplates() {
|
|
1683
|
+
return Joi.object({
|
|
1684
|
+
provider_type: Joi.string().allow("").allow(null),
|
|
1685
|
+
template: Joi.string().allow("").allow(null),
|
|
1686
|
+
});
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1861
1689
|
/** @returns {EventSubscriptions} */
|
|
1862
1690
|
static EventSubscriptions() {
|
|
1863
1691
|
return Joi.object({
|
|
@@ -1866,35 +1694,35 @@ class CommunicationPlatformModel {
|
|
|
1866
1694
|
});
|
|
1867
1695
|
}
|
|
1868
1696
|
|
|
1869
|
-
/** @returns {
|
|
1870
|
-
static
|
|
1697
|
+
/** @returns {TriggerJobResult} */
|
|
1698
|
+
static TriggerJobResult() {
|
|
1871
1699
|
return Joi.object({
|
|
1872
1700
|
status: Joi.number(),
|
|
1873
1701
|
});
|
|
1874
1702
|
}
|
|
1875
1703
|
|
|
1876
|
-
/** @returns {
|
|
1877
|
-
static
|
|
1704
|
+
/** @returns {TriggerJobPayload} */
|
|
1705
|
+
static TriggerJobPayload() {
|
|
1878
1706
|
return Joi.object({
|
|
1879
1707
|
job_id: Joi.string().allow(""),
|
|
1880
1708
|
});
|
|
1881
1709
|
}
|
|
1882
1710
|
|
|
1883
|
-
/** @returns {
|
|
1884
|
-
static
|
|
1711
|
+
/** @returns {GetGlobalVariablesResult} */
|
|
1712
|
+
static GetGlobalVariablesResult() {
|
|
1885
1713
|
return Joi.object({
|
|
1886
|
-
read_only: Joi.any(),
|
|
1887
|
-
editable: Joi.any(),
|
|
1714
|
+
read_only: Joi.object().pattern(/\S/, Joi.any()),
|
|
1715
|
+
editable: Joi.object().pattern(/\S/, Joi.any()),
|
|
1888
1716
|
});
|
|
1889
1717
|
}
|
|
1890
1718
|
|
|
1891
|
-
/** @returns {
|
|
1892
|
-
static
|
|
1719
|
+
/** @returns {CreateGlobalVariablesResult} */
|
|
1720
|
+
static CreateGlobalVariablesResult() {
|
|
1893
1721
|
return Joi.object({
|
|
1894
1722
|
_id: Joi.string().allow(""),
|
|
1895
1723
|
category: Joi.string().allow(""),
|
|
1896
1724
|
application: Joi.string().allow(""),
|
|
1897
|
-
global_variables: Joi.any(),
|
|
1725
|
+
global_variables: Joi.object().pattern(/\S/, Joi.any()),
|
|
1898
1726
|
created_at: Joi.string().allow(""),
|
|
1899
1727
|
});
|
|
1900
1728
|
}
|
|
@@ -1902,7 +1730,7 @@ class CommunicationPlatformModel {
|
|
|
1902
1730
|
/** @returns {GlobalVariablesReq} */
|
|
1903
1731
|
static GlobalVariablesReq() {
|
|
1904
1732
|
return Joi.object({
|
|
1905
|
-
global_variables: Joi.any(),
|
|
1733
|
+
global_variables: Joi.object().pattern(/\S/, Joi.any()),
|
|
1906
1734
|
});
|
|
1907
1735
|
}
|
|
1908
1736
|
|
|
@@ -1975,18 +1803,6 @@ class CommunicationPlatformModel {
|
|
|
1975
1803
|
static LogEmail() {
|
|
1976
1804
|
return Joi.object({
|
|
1977
1805
|
template: Joi.string().allow(""),
|
|
1978
|
-
provider: Joi.string().allow(""),
|
|
1979
|
-
to: Joi.string().allow(""),
|
|
1980
|
-
});
|
|
1981
|
-
}
|
|
1982
|
-
|
|
1983
|
-
/** @returns {LogSms} */
|
|
1984
|
-
static LogSms() {
|
|
1985
|
-
return Joi.object({
|
|
1986
|
-
template: Joi.string().allow(""),
|
|
1987
|
-
provider: Joi.string().allow(""),
|
|
1988
|
-
phone_number: Joi.string().allow(""),
|
|
1989
|
-
country_code: Joi.string().allow(""),
|
|
1990
1806
|
});
|
|
1991
1807
|
}
|
|
1992
1808
|
|
|
@@ -2000,10 +1816,8 @@ class CommunicationPlatformModel {
|
|
|
2000
1816
|
/** @returns {LogMeta} */
|
|
2001
1817
|
static LogMeta() {
|
|
2002
1818
|
return Joi.object({
|
|
2003
|
-
identifier: Joi.string().allow(""),
|
|
2004
1819
|
type: Joi.string().allow(""),
|
|
2005
|
-
|
|
2006
|
-
campaign: Joi.string().allow(""),
|
|
1820
|
+
identifier: Joi.string().allow(""),
|
|
2007
1821
|
key: Joi.string().allow(""),
|
|
2008
1822
|
offset: Joi.string().allow(""),
|
|
2009
1823
|
partition: Joi.string().allow(""),
|
|
@@ -2015,18 +1829,16 @@ class CommunicationPlatformModel {
|
|
|
2015
1829
|
static Log() {
|
|
2016
1830
|
return Joi.object({
|
|
2017
1831
|
email: CommunicationPlatformModel.LogEmail(),
|
|
2018
|
-
sms: CommunicationPlatformModel.LogSms(),
|
|
2019
1832
|
pushnotification: CommunicationPlatformModel.LogPushnotification(),
|
|
1833
|
+
meta: CommunicationPlatformModel.LogMeta(),
|
|
2020
1834
|
_id: Joi.string().allow(""),
|
|
2021
|
-
|
|
1835
|
+
application: Joi.string().allow(""),
|
|
2022
1836
|
service: Joi.string().allow(""),
|
|
2023
1837
|
step: Joi.string().allow(""),
|
|
2024
|
-
source: Joi.string().allow(""),
|
|
2025
1838
|
status: Joi.string().allow(""),
|
|
1839
|
+
data: Joi.any(),
|
|
2026
1840
|
expire_at: Joi.string().allow(""),
|
|
2027
1841
|
created_at: Joi.string().allow(""),
|
|
2028
|
-
meta: CommunicationPlatformModel.LogMeta(),
|
|
2029
|
-
application: Joi.string().allow(""),
|
|
2030
1842
|
});
|
|
2031
1843
|
}
|
|
2032
1844
|
|
|
@@ -2159,10 +1971,19 @@ class CommunicationPlatformModel {
|
|
|
2159
1971
|
});
|
|
2160
1972
|
}
|
|
2161
1973
|
|
|
1974
|
+
/** @returns {VerifyOtpCommsErrorRes} */
|
|
1975
|
+
static VerifyOtpCommsErrorRes() {
|
|
1976
|
+
return Joi.object({
|
|
1977
|
+
success: Joi.boolean(),
|
|
1978
|
+
message: Joi.string().allow(""),
|
|
1979
|
+
});
|
|
1980
|
+
}
|
|
1981
|
+
|
|
2162
1982
|
/** @returns {SmsProviderReq} */
|
|
2163
1983
|
static SmsProviderReq() {
|
|
2164
1984
|
return Joi.object({
|
|
2165
1985
|
name: Joi.string().allow(""),
|
|
1986
|
+
token: Joi.string().allow(""),
|
|
2166
1987
|
description: Joi.string().allow(""),
|
|
2167
1988
|
sender: Joi.string().allow(""),
|
|
2168
1989
|
username: Joi.string().allow(""),
|
|
@@ -2181,12 +2002,18 @@ class CommunicationPlatformModel {
|
|
|
2181
2002
|
version_id: Joi.number(),
|
|
2182
2003
|
sender_id: Joi.string().allow(""),
|
|
2183
2004
|
api_key: Joi.string().allow(""),
|
|
2005
|
+
tenant_name_1: Joi.string().allow(""),
|
|
2006
|
+
tenant_name_2: Joi.string().allow(""),
|
|
2184
2007
|
});
|
|
2185
2008
|
}
|
|
2186
2009
|
|
|
2187
2010
|
/** @returns {SmsProvider} */
|
|
2188
2011
|
static SmsProvider() {
|
|
2189
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(),
|
|
2190
2017
|
rpt: Joi.number(),
|
|
2191
2018
|
type: Joi.string().allow(""),
|
|
2192
2019
|
provider: Joi.string().allow(""),
|
|
@@ -2196,7 +2023,6 @@ class CommunicationPlatformModel {
|
|
|
2196
2023
|
sender: Joi.string().allow(""),
|
|
2197
2024
|
username: Joi.string().allow(""),
|
|
2198
2025
|
authkey: Joi.string().allow(""),
|
|
2199
|
-
entity_id: Joi.string().allow(""),
|
|
2200
2026
|
application: Joi.string().allow(""),
|
|
2201
2027
|
created_at: Joi.string().allow(""),
|
|
2202
2028
|
updated_at: Joi.string().allow(""),
|
|
@@ -2252,7 +2078,7 @@ class CommunicationPlatformModel {
|
|
|
2252
2078
|
message: CommunicationPlatformModel.SmsTemplateMessage(),
|
|
2253
2079
|
priority: Joi.string().allow(""),
|
|
2254
2080
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
2255
|
-
template_variables: Joi.any(),
|
|
2081
|
+
template_variables: Joi.object().pattern(/\S/, Joi.any()),
|
|
2256
2082
|
template_id: Joi.string().allow(""),
|
|
2257
2083
|
published: Joi.boolean(),
|
|
2258
2084
|
category: Joi.string().allow(""),
|
|
@@ -2265,6 +2091,13 @@ class CommunicationPlatformModel {
|
|
|
2265
2091
|
|
|
2266
2092
|
/** @returns {SystemSmsTemplates} */
|
|
2267
2093
|
static SystemSmsTemplates() {
|
|
2094
|
+
return Joi.object({
|
|
2095
|
+
items: Joi.array().items(CommunicationPlatformModel.SystemSmsTemplate()),
|
|
2096
|
+
});
|
|
2097
|
+
}
|
|
2098
|
+
|
|
2099
|
+
/** @returns {SystemSmsTemplate} */
|
|
2100
|
+
static SystemSmsTemplate() {
|
|
2268
2101
|
return Joi.object({
|
|
2269
2102
|
url_shorten: CommunicationPlatformModel.EnabledObj(),
|
|
2270
2103
|
_id: Joi.string().allow(""),
|
|
@@ -2275,7 +2108,7 @@ class CommunicationPlatformModel {
|
|
|
2275
2108
|
message: CommunicationPlatformModel.SmsTemplateMessage(),
|
|
2276
2109
|
priority: Joi.string().allow(""),
|
|
2277
2110
|
tags: Joi.array().items(Joi.string().allow("")),
|
|
2278
|
-
template_variables: Joi.any(),
|
|
2111
|
+
template_variables: Joi.object().pattern(/\S/, Joi.any()),
|
|
2279
2112
|
template_id: Joi.string().allow(""),
|
|
2280
2113
|
published: Joi.boolean(),
|
|
2281
2114
|
category: Joi.string().allow(""),
|
|
@@ -2303,7 +2136,7 @@ class CommunicationPlatformModel {
|
|
|
2303
2136
|
priority: Joi.string().allow(""),
|
|
2304
2137
|
template_id: Joi.string().allow(""),
|
|
2305
2138
|
meta: CommunicationPlatformModel.metaObj(),
|
|
2306
|
-
template_variables: Joi.any(),
|
|
2139
|
+
template_variables: Joi.object().pattern(/\S/, Joi.any()),
|
|
2307
2140
|
published: Joi.boolean(),
|
|
2308
2141
|
message: CommunicationPlatformModel.SmsTemplateMessage(),
|
|
2309
2142
|
});
|
|
@@ -2360,15 +2193,35 @@ class CommunicationPlatformModel {
|
|
|
2360
2193
|
current: Joi.number(),
|
|
2361
2194
|
type: Joi.string().allow("").required(),
|
|
2362
2195
|
size: Joi.number(),
|
|
2363
|
-
|
|
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(""),
|
|
2364
2205
|
});
|
|
2365
2206
|
}
|
|
2366
2207
|
|
|
2367
|
-
/** @returns {
|
|
2368
|
-
static
|
|
2208
|
+
/** @returns {GenericDelete} */
|
|
2209
|
+
static GenericDelete() {
|
|
2369
2210
|
return Joi.object({
|
|
2211
|
+
message: Joi.string().allow(""),
|
|
2370
2212
|
acknowledged: Joi.boolean(),
|
|
2371
|
-
|
|
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(""),
|
|
2372
2225
|
});
|
|
2373
2226
|
}
|
|
2374
2227
|
|
|
@@ -2395,21 +2248,12 @@ class CommunicationPlatformModel {
|
|
|
2395
2248
|
});
|
|
2396
2249
|
}
|
|
2397
2250
|
|
|
2398
|
-
/** @returns {OtpConfigRateLimit} */
|
|
2399
|
-
static OtpConfigRateLimit() {
|
|
2400
|
-
return Joi.object({
|
|
2401
|
-
duration: Joi.number(),
|
|
2402
|
-
limit: Joi.number(),
|
|
2403
|
-
});
|
|
2404
|
-
}
|
|
2405
|
-
|
|
2406
2251
|
/** @returns {OtpConfiguration} */
|
|
2407
2252
|
static OtpConfiguration() {
|
|
2408
2253
|
return Joi.object({
|
|
2409
2254
|
otp_length: Joi.number().required(),
|
|
2410
2255
|
type: Joi.string().allow("").required(),
|
|
2411
2256
|
expiry: CommunicationPlatformModel.OtpConfigurationExpiry().required(),
|
|
2412
|
-
rate_limit: CommunicationPlatformModel.OtpConfigRateLimit().required(),
|
|
2413
2257
|
application_id: Joi.string().allow(""),
|
|
2414
2258
|
company_id: Joi.string().allow(""),
|
|
2415
2259
|
});
|