@gofynd/fdk-client-javascript 1.0.2 → 1.0.4
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 +31 -2
- package/index.d.ts +4 -4
- package/index.js +9 -10
- package/package.json +14 -14
- package/sdk/APIClient.d.ts +11 -0
- package/sdk/APIClient.js +35 -0
- package/sdk/Client.d.ts +6 -0
- package/sdk/Client.js +17 -0
- package/sdk/Config.d.ts +9 -0
- package/sdk/Config.js +17 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +243 -243
- package/sdk/application/Cart/CartApplicationClient.js +595 -594
- package/sdk/application/Cart/CartApplicationModel.d.ts +64 -63
- package/sdk/application/Cart/CartApplicationModel.js +490 -885
- package/sdk/application/Cart/CartApplicationValidator.d.ts +17 -17
- package/sdk/application/Cart/CartApplicationValidator.js +98 -98
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +358 -358
- package/sdk/application/Catalog/CatalogApplicationClient.js +1079 -1078
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
- package/sdk/application/Catalog/CatalogApplicationModel.js +683 -1249
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +19 -19
- package/sdk/application/Catalog/CatalogApplicationValidator.js +110 -110
- package/sdk/application/Common/CommonApplicationClient.d.ts +13 -13
- package/sdk/application/Common/CommonApplicationClient.js +43 -42
- package/sdk/application/Common/CommonApplicationModel.d.ts +12 -12
- package/sdk/application/Common/CommonApplicationModel.js +83 -160
- package/sdk/application/Common/CommonApplicationValidator.d.ts +1 -1
- package/sdk/application/Common/CommonApplicationValidator.js +6 -6
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +11 -11
- package/sdk/application/Communication/CommunicationApplicationClient.js +32 -31
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +6 -6
- package/sdk/application/Communication/CommunicationApplicationModel.js +38 -83
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +1 -1
- package/sdk/application/Communication/CommunicationApplicationValidator.js +4 -4
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +116 -116
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +350 -349
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +85 -85
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +480 -851
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +8 -8
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +33 -33
- package/sdk/application/Content/ContentApplicationClient.d.ts +67 -67
- package/sdk/application/Content/ContentApplicationClient.js +216 -215
- package/sdk/application/Content/ContentApplicationModel.d.ts +76 -76
- package/sdk/application/Content/ContentApplicationModel.js +468 -884
- package/sdk/application/Content/ContentApplicationValidator.d.ts +5 -5
- package/sdk/application/Content/ContentApplicationValidator.js +24 -24
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +25 -25
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +65 -64
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +13 -13
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +86 -169
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +1 -1
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +7 -7
- package/sdk/application/Lead/LeadApplicationClient.d.ts +24 -24
- package/sdk/application/Lead/LeadApplicationClient.js +109 -108
- package/sdk/application/Lead/LeadApplicationModel.d.ts +35 -35
- package/sdk/application/Lead/LeadApplicationModel.js +267 -474
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +2 -2
- package/sdk/application/Lead/LeadApplicationValidator.js +11 -11
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +31 -22
- package/sdk/application/Logistic/LogisticApplicationClient.js +115 -49
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +17 -14
- package/sdk/application/Logistic/LogisticApplicationModel.js +133 -201
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +3 -2
- package/sdk/application/Logistic/LogisticApplicationValidator.js +14 -9
- package/sdk/application/Order/OrderApplicationClient.d.ts +85 -85
- package/sdk/application/Order/OrderApplicationClient.js +247 -246
- package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
- package/sdk/application/Order/OrderApplicationModel.js +361 -656
- package/sdk/application/Order/OrderApplicationValidator.d.ts +7 -7
- package/sdk/application/Order/OrderApplicationValidator.js +28 -28
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +318 -318
- package/sdk/application/Payment/PaymentApplicationClient.js +781 -780
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +72 -72
- package/sdk/application/Payment/PaymentApplicationModel.js +570 -1038
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +28 -28
- package/sdk/application/Payment/PaymentApplicationValidator.js +107 -107
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +254 -254
- package/sdk/application/PosCart/PosCartApplicationClient.js +646 -645
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +64 -63
- package/sdk/application/PosCart/PosCartApplicationModel.js +476 -870
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +18 -18
- package/sdk/application/PosCart/PosCartApplicationValidator.js +103 -103
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +27 -27
- package/sdk/application/Rewards/RewardsApplicationClient.js +122 -121
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +14 -14
- package/sdk/application/Rewards/RewardsApplicationModel.js +96 -191
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +3 -3
- package/sdk/application/Rewards/RewardsApplicationValidator.js +12 -12
- package/sdk/application/Share/ShareApplicationClient.d.ts +37 -37
- package/sdk/application/Share/ShareApplicationClient.js +94 -93
- package/sdk/application/Share/ShareApplicationModel.d.ts +8 -8
- package/sdk/application/Share/ShareApplicationModel.js +63 -123
- package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -4
- package/sdk/application/Share/ShareApplicationValidator.js +12 -12
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -8
- package/sdk/application/Theme/ThemeApplicationClient.js +38 -37
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +34 -34
- package/sdk/application/Theme/ThemeApplicationModel.js +190 -336
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +1 -1
- package/sdk/application/Theme/ThemeApplicationValidator.js +4 -4
- package/sdk/application/User/UserApplicationClient.d.ts +280 -280
- package/sdk/application/User/UserApplicationClient.js +619 -618
- package/sdk/application/User/UserApplicationModel.d.ts +79 -72
- package/sdk/application/User/UserApplicationModel.js +440 -689
- package/sdk/application/User/UserApplicationValidator.d.ts +24 -24
- package/sdk/application/User/UserApplicationValidator.js +89 -89
- package/sdk/common/AxiosHelper.js +18 -7
- package/sdk/constructUrl.d.ts +5 -0
- package/sdk/constructUrl.js +13 -0
- package/sdk/index.d.ts +3 -0
- package/sdk/index.js +5 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +51 -51
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +182 -180
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +21 -21
- package/sdk/platform/Analytics/AnalyticsPlatformClient.js +5 -4
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
- package/sdk/platform/Analytics/AnalyticsPlatformValidator.js +1 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +10 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +44 -43
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +10 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +50 -89
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +7 -6
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +60 -60
- package/sdk/platform/Billing/BillingPlatformClient.js +184 -183
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +40 -40
- package/sdk/platform/Billing/BillingPlatformModel.js +342 -668
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +8 -8
- package/sdk/platform/Billing/BillingPlatformValidator.js +26 -25
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +192 -165
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +686 -510
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +14 -11
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +77 -61
- package/sdk/platform/Cart/CartPlatformModel.d.ts +84 -83
- package/sdk/platform/Cart/CartPlatformModel.js +676 -1206
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +632 -632
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1558 -1556
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +175 -175
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +688 -688
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1556 -1559
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +291 -291
- package/sdk/platform/Catalog/CatalogPlatformModel.js +2133 -3910
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -66
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +229 -228
- package/sdk/platform/Common/CommonPlatformClient.d.ts +12 -12
- package/sdk/platform/Common/CommonPlatformClient.js +40 -51
- package/sdk/platform/Common/CommonPlatformModel.d.ts +12 -12
- package/sdk/platform/Common/CommonPlatformModel.js +83 -160
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +1 -1
- package/sdk/platform/Common/CommonPlatformValidator.js +7 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +326 -326
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +945 -943
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +88 -88
- package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -3
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
- package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +1 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +55 -55
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +217 -216
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +27 -27
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +279 -542
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +7 -7
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +25 -24
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +163 -153
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +617 -552
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +70 -64
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +125 -125
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +348 -347
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +148 -146
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +854 -1508
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +39 -38
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +524 -534
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1287 -1346
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +49 -50
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +153 -159
- package/sdk/platform/Content/ContentPlatformModel.d.ts +78 -78
- package/sdk/platform/Content/ContentPlatformModel.js +485 -907
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +65 -65
- package/sdk/platform/Discount/DiscountPlatformClient.js +219 -218
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +7 -7
- package/sdk/platform/Discount/DiscountPlatformModel.js +60 -121
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +6 -6
- package/sdk/platform/Discount/DiscountPlatformValidator.js +30 -29
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +25 -25
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +83 -61
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +9 -9
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +53 -53
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +147 -125
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +13 -13
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +86 -169
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +3 -3
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +12 -11
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +63 -63
- package/sdk/platform/Inventory/InventoryPlatformClient.js +231 -230
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +30 -30
- package/sdk/platform/Inventory/InventoryPlatformModel.js +497 -964
- package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +7 -7
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +29 -28
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +73 -73
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +203 -201
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +29 -29
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +80 -80
- package/sdk/platform/Lead/LeadPlatformClient.js +215 -214
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +35 -35
- package/sdk/platform/Lead/LeadPlatformModel.js +267 -474
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +6 -6
- package/sdk/platform/Lead/LeadPlatformValidator.js +25 -24
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +68 -66
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +7 -7
- package/sdk/platform/Order/OrderPlatformClient.d.ts +357 -357
- package/sdk/platform/Order/OrderPlatformClient.js +1046 -1033
- package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -196
- package/sdk/platform/Order/OrderPlatformModel.js +1575 -2861
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
- package/sdk/platform/Order/OrderPlatformValidator.js +161 -160
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +3 -1
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -1
- package/sdk/platform/Partner/PartnerPlatformModel.js +10 -26
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +58 -58
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +178 -178
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +24 -24
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +42 -42
- package/sdk/platform/Payment/PaymentPlatformClient.js +156 -155
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +27 -27
- package/sdk/platform/Payment/PaymentPlatformModel.js +222 -410
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +4 -4
- package/sdk/platform/Payment/PaymentPlatformValidator.js +22 -21
- package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10325
- package/sdk/platform/PlatformApplicationClient.js +1584 -13899
- package/sdk/platform/PlatformClient.d.ts +7972 -7888
- package/sdk/platform/PlatformClient.js +8678 -10107
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +85 -85
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +299 -280
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +35 -35
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +15 -15
- package/sdk/platform/Rewards/RewardsPlatformModel.js +92 -194
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Share/SharePlatformApplicationClient.js +62 -60
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +7 -7
- package/sdk/platform/Share/SharePlatformModel.d.ts +8 -8
- package/sdk/platform/Share/SharePlatformModel.js +60 -118
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +132 -132
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +314 -312
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +15 -15
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +45 -45
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +34 -34
- package/sdk/platform/Theme/ThemePlatformModel.js +190 -336
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +136 -69
- package/sdk/platform/User/UserPlatformApplicationClient.js +507 -166
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +12 -7
- package/sdk/platform/User/UserPlatformApplicationValidator.js +62 -24
- package/sdk/platform/User/UserPlatformModel.d.ts +79 -72
- package/sdk/platform/User/UserPlatformModel.js +440 -689
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +31 -31
- package/sdk/platform/Webhook/WebhookPlatformClient.js +91 -90
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +7 -7
- package/sdk/platform/Webhook/WebhookPlatformModel.js +68 -136
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +3 -3
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +15 -14
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +13 -13
- package/sdk/public/Configuration/ConfigurationPublicClient.js +40 -38
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +12 -12
- package/sdk/public/Configuration/ConfigurationPublicModel.js +85 -162
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -1
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +6 -6
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +34 -34
- package/sdk/public/Inventory/InventoryPublicClient.js +115 -113
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +10 -10
- package/sdk/public/Inventory/InventoryPublicModel.js +119 -245
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +3 -3
- package/sdk/public/Inventory/InventoryPublicValidator.js +15 -15
- package/sdk/public/Webhook/WebhookPublicClient.js +2 -0
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +7 -7
- package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
- package/.github/workflows/on_create_release.yml +0 -23
- package/.github/workflows/on_merge_main.yml +0 -38
- package/.github/workflows/on_pull_request.yml +0 -35
- package/.prettierrc +0 -5
- package/documentation/application/CART.md +0 -7339
- package/documentation/application/CATALOG.md +0 -9597
- package/documentation/application/COMMON.md +0 -452
- package/documentation/application/COMMUNICATION.md +0 -467
- package/documentation/application/CONFIGURATION.md +0 -2906
- package/documentation/application/CONTENT.md +0 -3351
- package/documentation/application/FILESTORAGE.md +0 -578
- package/documentation/application/LEAD.md +0 -1895
- package/documentation/application/LOGISTIC.md +0 -765
- package/documentation/application/ORDER.md +0 -3432
- package/documentation/application/PAYMENT.md +0 -5221
- package/documentation/application/POSCART.md +0 -7938
- package/documentation/application/README.md +0 -21
- package/documentation/application/REWARDS.md +0 -708
- package/documentation/application/SHARE.md +0 -733
- package/documentation/application/THEME.md +0 -5800
- package/documentation/application/USER.md +0 -4335
- package/documentation/platform/ANALYTICS.md +0 -1154
- package/documentation/platform/AUDITTRAIL.md +0 -576
- package/documentation/platform/BILLING.md +0 -2400
- package/documentation/platform/CART.md +0 -5559
- package/documentation/platform/CATALOG.md +0 -23261
- package/documentation/platform/COMMON.md +0 -452
- package/documentation/platform/COMMUNICATION.md +0 -5718
- package/documentation/platform/COMPANYPROFILE.md +0 -2031
- package/documentation/platform/CONFIGURATION.md +0 -7339
- package/documentation/platform/CONTENT.md +0 -9098
- package/documentation/platform/DISCOUNT.md +0 -863
- package/documentation/platform/FILESTORAGE.md +0 -1081
- package/documentation/platform/INVENTORY.md +0 -1779
- package/documentation/platform/LEAD.md +0 -4740
- package/documentation/platform/ORDER.md +0 -8486
- package/documentation/platform/PARTNER.md +0 -220
- package/documentation/platform/PAYMENT.md +0 -3448
- package/documentation/platform/README.md +0 -27
- package/documentation/platform/REWARDS.md +0 -1083
- package/documentation/platform/SHARE.md +0 -606
- package/documentation/platform/THEME.md +0 -35729
- package/documentation/platform/USER.md +0 -2319
- package/documentation/platform/WEBHOOK.md +0 -591
- package/documentation/public/CONFIGURATION.md +0 -452
- package/documentation/public/INVENTORY.md +0 -690
- package/documentation/public/WEBHOOK.md +0 -352
- package/jest.config.d.ts +0 -4
- package/jest.config.js +0 -6
- package/tests/application/catalog.spec.js +0 -47
- package/tests/common/action-url.spec.js +0 -35
- package/tests/common/schema/action-url.json +0 -178
- package/tests/common/schema/url-action.json +0 -683
- package/tests/common/url-action.spec.js +0 -48
- package/tests/helpers/cookie.helper.js +0 -31
- package/tests/helpers/oauth.helper.js +0 -43
- package/tests/platform/catalog.spec.js +0 -49
- package/tests/public/location.spec.js +0 -39
|
@@ -1,1311 +1,859 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
class CommunicationModel {
|
|
4
|
-
static
|
|
4
|
+
static Audience() {
|
|
5
5
|
return Joi.object({
|
|
6
|
-
|
|
6
|
+
__v: Joi.number(),
|
|
7
|
+
_id: Joi.string().allow(""),
|
|
8
|
+
application: Joi.string().allow(""),
|
|
9
|
+
created_at: Joi.string().allow(""),
|
|
10
|
+
description: Joi.string().allow(""),
|
|
11
|
+
file_url: Joi.string().allow(""),
|
|
12
|
+
headers: Joi.array().items(Joi.string().allow("")),
|
|
13
|
+
is_active: Joi.boolean(),
|
|
14
|
+
name: Joi.string().allow(""),
|
|
15
|
+
records_count: Joi.number(),
|
|
16
|
+
slug: Joi.string().allow(""),
|
|
17
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
18
|
+
type: Joi.string().allow(""),
|
|
19
|
+
updated_at: Joi.string().allow(""),
|
|
7
20
|
});
|
|
8
21
|
}
|
|
9
|
-
|
|
10
|
-
static StatsProcessedEmail() {
|
|
22
|
+
static AudienceReq() {
|
|
11
23
|
return Joi.object({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
24
|
+
application: Joi.string().allow(""),
|
|
25
|
+
description: Joi.string().allow(""),
|
|
26
|
+
file_url: Joi.string().allow(""),
|
|
27
|
+
headers: Joi.array().items(Joi.string().allow("")),
|
|
28
|
+
is_active: Joi.boolean(),
|
|
29
|
+
name: Joi.string().allow(""),
|
|
30
|
+
records_count: Joi.number(),
|
|
31
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
32
|
+
type: Joi.string().allow(""),
|
|
17
33
|
});
|
|
18
34
|
}
|
|
19
|
-
|
|
20
|
-
static StatsProcessedSms() {
|
|
35
|
+
static Audiences() {
|
|
21
36
|
return Joi.object({
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
failed: Joi.number(),
|
|
25
|
-
|
|
26
|
-
suppressed: Joi.number(),
|
|
37
|
+
items: Joi.array().items(CommunicationModel.Audience()),
|
|
38
|
+
page: CommunicationModel.Page(),
|
|
27
39
|
});
|
|
28
40
|
}
|
|
29
|
-
|
|
30
|
-
static StatsProcessed() {
|
|
41
|
+
static BadRequestSchema() {
|
|
31
42
|
return Joi.object({
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
sms: CommunicationModel.StatsProcessedSms(),
|
|
43
|
+
message: Joi.string().allow(""),
|
|
44
|
+
status: Joi.string().allow(""),
|
|
35
45
|
});
|
|
36
46
|
}
|
|
37
|
-
|
|
38
|
-
static Stats() {
|
|
47
|
+
static BigqueryHeadersReq() {
|
|
39
48
|
return Joi.object({
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
imported: Joi.any(),
|
|
43
|
-
|
|
44
|
-
processed: Joi.any(),
|
|
49
|
+
query: Joi.string().allow(""),
|
|
50
|
+
type: Joi.string().allow(""),
|
|
45
51
|
});
|
|
46
52
|
}
|
|
47
|
-
|
|
48
|
-
static GetStats() {
|
|
53
|
+
static BigqueryHeadersRes() {
|
|
49
54
|
return Joi.object({
|
|
50
|
-
|
|
55
|
+
headers: Joi.array().items(
|
|
56
|
+
CommunicationModel.BigqueryHeadersResHeaders()
|
|
57
|
+
),
|
|
51
58
|
});
|
|
52
59
|
}
|
|
53
|
-
|
|
54
|
-
static CampaignReq() {
|
|
60
|
+
static BigqueryHeadersResHeaders() {
|
|
55
61
|
return Joi.object({
|
|
62
|
+
name: Joi.string().allow(""),
|
|
63
|
+
type: Joi.string().allow(""),
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
static Campaign() {
|
|
67
|
+
return Joi.object({
|
|
68
|
+
__v: Joi.number(),
|
|
69
|
+
_id: Joi.string().allow(""),
|
|
70
|
+
application: Joi.string().allow(""),
|
|
71
|
+
created_at: Joi.string().allow(""),
|
|
72
|
+
datasource: Joi.string().allow(""),
|
|
56
73
|
description: Joi.string().allow(""),
|
|
57
|
-
|
|
58
|
-
tags: Joi.array().items(Joi.string().allow("")),
|
|
59
|
-
|
|
60
|
-
headers: Joi.array().items(Joi.string().allow("")),
|
|
61
|
-
|
|
74
|
+
email: CommunicationModel.CampaignEmail(),
|
|
62
75
|
is_active: Joi.boolean(),
|
|
63
|
-
|
|
64
76
|
name: Joi.string().allow(""),
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
77
|
+
recipient_headers: CommunicationModel.RecipientHeaders(),
|
|
78
|
+
slug: Joi.string().allow(""),
|
|
79
|
+
tags: Joi.array().items(Joi.any()),
|
|
68
80
|
type: Joi.string().allow(""),
|
|
69
|
-
|
|
70
|
-
records_count: Joi.number(),
|
|
71
|
-
|
|
72
|
-
application: Joi.string().allow(""),
|
|
81
|
+
updated_at: Joi.string().allow(""),
|
|
73
82
|
});
|
|
74
83
|
}
|
|
75
|
-
|
|
76
|
-
static RecipientHeaders() {
|
|
84
|
+
static CampaignEmail() {
|
|
77
85
|
return Joi.object({
|
|
78
|
-
|
|
86
|
+
provider: CommunicationModel.CampignEmailProvider(),
|
|
87
|
+
template: CommunicationModel.CampaignEmailTemplate(),
|
|
79
88
|
});
|
|
80
89
|
}
|
|
81
|
-
|
|
82
90
|
static CampaignEmailTemplate() {
|
|
83
91
|
return Joi.object({
|
|
84
92
|
key: Joi.string().allow(""),
|
|
85
|
-
|
|
86
93
|
value: Joi.string().allow(""),
|
|
87
94
|
});
|
|
88
95
|
}
|
|
89
|
-
|
|
96
|
+
static CampaignReq() {
|
|
97
|
+
return Joi.object({
|
|
98
|
+
application: Joi.string().allow(""),
|
|
99
|
+
description: Joi.string().allow(""),
|
|
100
|
+
file_url: Joi.string().allow(""),
|
|
101
|
+
headers: Joi.array().items(Joi.string().allow("")),
|
|
102
|
+
is_active: Joi.boolean(),
|
|
103
|
+
name: Joi.string().allow(""),
|
|
104
|
+
records_count: Joi.number(),
|
|
105
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
106
|
+
type: Joi.string().allow(""),
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
static Campaigns() {
|
|
110
|
+
return Joi.object({
|
|
111
|
+
items: Joi.array().items(CommunicationModel.Campaign()),
|
|
112
|
+
page: CommunicationModel.Page(),
|
|
113
|
+
});
|
|
114
|
+
}
|
|
90
115
|
static CampignEmailProvider() {
|
|
91
116
|
return Joi.object({
|
|
92
117
|
_id: Joi.string().allow(""),
|
|
93
|
-
|
|
94
|
-
from_name: Joi.string().allow(""),
|
|
95
|
-
|
|
96
118
|
from_email: Joi.string().allow(""),
|
|
119
|
+
from_name: Joi.string().allow(""),
|
|
97
120
|
});
|
|
98
121
|
}
|
|
99
|
-
|
|
100
|
-
static CampaignEmail() {
|
|
122
|
+
static EmailProvider() {
|
|
101
123
|
return Joi.object({
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
124
|
+
__v: Joi.number(),
|
|
125
|
+
_id: Joi.string().allow(""),
|
|
126
|
+
api_key: Joi.string().allow(""),
|
|
127
|
+
application: Joi.string().allow(""),
|
|
128
|
+
created_at: Joi.string().allow(""),
|
|
129
|
+
description: Joi.string().allow(""),
|
|
130
|
+
from_address: Joi.array().items(
|
|
131
|
+
CommunicationModel.EmailProviderReqFrom()
|
|
132
|
+
),
|
|
133
|
+
name: Joi.string().allow(""),
|
|
134
|
+
provider: Joi.string().allow(""),
|
|
135
|
+
slug: Joi.string().allow(""),
|
|
136
|
+
type: Joi.string().allow(""),
|
|
137
|
+
updated_at: Joi.string().allow(""),
|
|
105
138
|
});
|
|
106
139
|
}
|
|
107
|
-
|
|
108
|
-
static Campaign() {
|
|
140
|
+
static EmailProviderReq() {
|
|
109
141
|
return Joi.object({
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
email: CommunicationModel.CampaignEmail(),
|
|
113
|
-
|
|
142
|
+
api_key: Joi.string().allow(""),
|
|
114
143
|
description: Joi.string().allow(""),
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
_id: Joi.string().allow(""),
|
|
121
|
-
|
|
122
|
-
datasource: Joi.string().allow(""),
|
|
123
|
-
|
|
144
|
+
from_address: Joi.array().items(
|
|
145
|
+
CommunicationModel.EmailProviderReqFrom()
|
|
146
|
+
),
|
|
147
|
+
name: Joi.string().allow(""),
|
|
148
|
+
provider: Joi.string().allow(""),
|
|
124
149
|
type: Joi.string().allow(""),
|
|
125
|
-
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
static EmailProviderReqFrom() {
|
|
153
|
+
return Joi.object({
|
|
154
|
+
email: Joi.string().allow(""),
|
|
155
|
+
is_default: Joi.boolean(),
|
|
126
156
|
name: Joi.string().allow(""),
|
|
127
|
-
|
|
128
|
-
application: Joi.string().allow(""),
|
|
129
|
-
|
|
130
|
-
created_at: Joi.string().allow(""),
|
|
131
|
-
|
|
132
|
-
updated_at: Joi.string().allow(""),
|
|
133
|
-
|
|
134
|
-
slug: Joi.string().allow(""),
|
|
135
|
-
|
|
136
|
-
__v: Joi.number(),
|
|
137
157
|
});
|
|
138
158
|
}
|
|
139
|
-
|
|
140
|
-
static Campaigns() {
|
|
159
|
+
static EmailProviders() {
|
|
141
160
|
return Joi.object({
|
|
142
|
-
items: Joi.array().items(CommunicationModel.
|
|
143
|
-
|
|
161
|
+
items: Joi.array().items(CommunicationModel.EmailProvider()),
|
|
144
162
|
page: CommunicationModel.Page(),
|
|
145
163
|
});
|
|
146
164
|
}
|
|
147
|
-
|
|
148
|
-
static BadRequestSchema() {
|
|
165
|
+
static EmailTemplate() {
|
|
149
166
|
return Joi.object({
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
167
|
+
__v: Joi.number(),
|
|
168
|
+
_id: Joi.string().allow(""),
|
|
169
|
+
attachments: Joi.array().items(Joi.any()),
|
|
170
|
+
created_at: Joi.string().allow(""),
|
|
171
|
+
description: Joi.string().allow(""),
|
|
172
|
+
from_name: Joi.string().allow(""),
|
|
173
|
+
headers: Joi.array().items(Joi.any()),
|
|
174
|
+
html: CommunicationModel.TemplateAndType(),
|
|
175
|
+
is_internal: Joi.boolean(),
|
|
176
|
+
is_system: Joi.boolean(),
|
|
177
|
+
name: Joi.string().allow(""),
|
|
178
|
+
priority: Joi.string().allow(""),
|
|
179
|
+
published: Joi.boolean(),
|
|
180
|
+
slug: Joi.string().allow(""),
|
|
181
|
+
static_bcc: Joi.array().items(Joi.any()),
|
|
182
|
+
static_cc: Joi.array().items(Joi.any()),
|
|
183
|
+
static_to: Joi.array().items(Joi.any()),
|
|
184
|
+
subject: CommunicationModel.TemplateAndType(),
|
|
185
|
+
tags: Joi.array().items(Joi.any()),
|
|
186
|
+
text: CommunicationModel.TemplateAndType(),
|
|
187
|
+
updated_at: Joi.string().allow(""),
|
|
153
188
|
});
|
|
154
189
|
}
|
|
155
|
-
|
|
156
|
-
static NotFound() {
|
|
190
|
+
static EmailTemplateDeleteFailureRes() {
|
|
157
191
|
return Joi.object({
|
|
158
192
|
message: Joi.string().allow(""),
|
|
193
|
+
success: Joi.boolean(),
|
|
159
194
|
});
|
|
160
195
|
}
|
|
161
|
-
|
|
162
|
-
static BigqueryHeadersReq() {
|
|
196
|
+
static EmailTemplateDeleteSuccessRes() {
|
|
163
197
|
return Joi.object({
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
type: Joi.string().allow(""),
|
|
198
|
+
message: Joi.string().allow(""),
|
|
199
|
+
success: Joi.boolean(),
|
|
167
200
|
});
|
|
168
201
|
}
|
|
169
|
-
|
|
170
|
-
static BigqueryHeadersResHeaders() {
|
|
202
|
+
static EmailTemplateHeaders() {
|
|
171
203
|
return Joi.object({
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
type: Joi.string().allow(""),
|
|
204
|
+
key: Joi.string().allow(""),
|
|
205
|
+
value: Joi.string().allow(""),
|
|
175
206
|
});
|
|
176
207
|
}
|
|
177
|
-
|
|
178
|
-
static BigqueryHeadersRes() {
|
|
208
|
+
static EmailTemplateKeys() {
|
|
179
209
|
return Joi.object({
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
),
|
|
210
|
+
bcc: Joi.string().allow(""),
|
|
211
|
+
cc: Joi.string().allow(""),
|
|
212
|
+
to: Joi.string().allow(""),
|
|
183
213
|
});
|
|
184
214
|
}
|
|
185
|
-
|
|
186
|
-
static GetNRecordsCsvReq() {
|
|
187
|
-
return Joi.object({
|
|
188
|
-
url: Joi.string().allow(""),
|
|
189
|
-
|
|
190
|
-
header: Joi.boolean(),
|
|
191
|
-
|
|
192
|
-
count: Joi.number(),
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
static GetNRecordsCsvResItems() {
|
|
197
|
-
return Joi.object({
|
|
198
|
-
phone_number: Joi.string().allow(""),
|
|
199
|
-
|
|
200
|
-
email: Joi.string().allow(""),
|
|
201
|
-
|
|
202
|
-
firstname: Joi.string().allow(""),
|
|
203
|
-
|
|
204
|
-
lastname: Joi.string().allow(""),
|
|
205
|
-
|
|
206
|
-
orderid: Joi.string().allow(""),
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
static GetNRecordsCsvRes() {
|
|
211
|
-
return Joi.object({
|
|
212
|
-
items: Joi.array().items(CommunicationModel.GetNRecordsCsvResItems()),
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
static AudienceReq() {
|
|
215
|
+
static EmailTemplateReq() {
|
|
217
216
|
return Joi.object({
|
|
217
|
+
attachments: Joi.array().items(Joi.any()),
|
|
218
218
|
description: Joi.string().allow(""),
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
headers: Joi.array().items(Joi.string().allow("")),
|
|
223
|
-
|
|
224
|
-
is_active: Joi.boolean(),
|
|
225
|
-
|
|
219
|
+
headers: Joi.array().items(CommunicationModel.EmailTemplateHeaders()),
|
|
220
|
+
html: CommunicationModel.TemplateAndType(),
|
|
221
|
+
keys: CommunicationModel.EmailTemplateKeys(),
|
|
226
222
|
name: Joi.string().allow(""),
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
application: Joi.string().allow(""),
|
|
223
|
+
priority: Joi.string().allow(""),
|
|
224
|
+
reply_to: Joi.string().allow(""),
|
|
225
|
+
static_bcc: Joi.array().items(Joi.string().allow("")),
|
|
226
|
+
static_cc: Joi.array().items(Joi.string().allow("")),
|
|
227
|
+
static_to: Joi.array().items(Joi.string().allow("")),
|
|
228
|
+
subject: CommunicationModel.TemplateAndType(),
|
|
229
|
+
text: CommunicationModel.TemplateAndType(),
|
|
235
230
|
});
|
|
236
231
|
}
|
|
237
|
-
|
|
238
|
-
static Audience() {
|
|
232
|
+
static EmailTemplateRes() {
|
|
239
233
|
return Joi.object({
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
tags: Joi.array().items(Joi.string().allow("")),
|
|
243
|
-
|
|
244
|
-
headers: Joi.array().items(Joi.string().allow("")),
|
|
245
|
-
|
|
246
|
-
is_active: Joi.boolean(),
|
|
247
|
-
|
|
234
|
+
__v: Joi.number(),
|
|
248
235
|
_id: Joi.string().allow(""),
|
|
249
|
-
|
|
250
|
-
name: Joi.string().allow(""),
|
|
251
|
-
|
|
252
|
-
file_url: Joi.string().allow(""),
|
|
253
|
-
|
|
254
|
-
type: Joi.string().allow(""),
|
|
255
|
-
|
|
256
|
-
records_count: Joi.number(),
|
|
257
|
-
|
|
258
|
-
application: Joi.string().allow(""),
|
|
259
|
-
|
|
236
|
+
attachments: Joi.array().items(Joi.any()),
|
|
260
237
|
created_at: Joi.string().allow(""),
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
238
|
+
description: Joi.string().allow(""),
|
|
239
|
+
headers: Joi.array().items(CommunicationModel.EmailTemplateHeaders()),
|
|
240
|
+
html: CommunicationModel.TemplateAndType(),
|
|
241
|
+
is_internal: Joi.boolean(),
|
|
242
|
+
is_system: Joi.boolean(),
|
|
243
|
+
keys: CommunicationModel.EmailTemplateKeys(),
|
|
244
|
+
name: Joi.string().allow(""),
|
|
245
|
+
priority: Joi.string().allow(""),
|
|
246
|
+
published: Joi.boolean(),
|
|
247
|
+
reply_to: Joi.string().allow(""),
|
|
264
248
|
slug: Joi.string().allow(""),
|
|
265
|
-
|
|
266
|
-
|
|
249
|
+
static_bcc: Joi.array().items(Joi.string().allow("")),
|
|
250
|
+
static_cc: Joi.array().items(Joi.string().allow("")),
|
|
251
|
+
static_to: Joi.array().items(Joi.string().allow("")),
|
|
252
|
+
subject: CommunicationModel.TemplateAndType(),
|
|
253
|
+
tags: Joi.array().items(Joi.any()),
|
|
254
|
+
text: CommunicationModel.TemplateAndType(),
|
|
255
|
+
updated_at: Joi.string().allow(""),
|
|
267
256
|
});
|
|
268
257
|
}
|
|
269
|
-
|
|
270
|
-
static Audiences() {
|
|
258
|
+
static EmailTemplates() {
|
|
271
259
|
return Joi.object({
|
|
272
|
-
items: Joi.array().items(CommunicationModel.
|
|
273
|
-
|
|
260
|
+
items: Joi.array().items(CommunicationModel.EmailTemplate()),
|
|
274
261
|
page: CommunicationModel.Page(),
|
|
275
262
|
});
|
|
276
263
|
}
|
|
277
|
-
|
|
278
|
-
static EmailProviderReqFrom() {
|
|
264
|
+
static EngineRequest() {
|
|
279
265
|
return Joi.object({
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
email: Joi.string().allow(""),
|
|
283
|
-
|
|
284
|
-
is_default: Joi.boolean(),
|
|
266
|
+
meta: CommunicationModel.MetaStructure(),
|
|
267
|
+
payload: CommunicationModel.PayloadStructure(),
|
|
285
268
|
});
|
|
286
269
|
}
|
|
287
|
-
|
|
288
|
-
static EmailProviderReq() {
|
|
270
|
+
static EngineResponse() {
|
|
289
271
|
return Joi.object({
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
description: Joi.string().allow(""),
|
|
293
|
-
|
|
294
|
-
api_key: Joi.string().allow(""),
|
|
295
|
-
|
|
296
|
-
type: Joi.string().allow(""),
|
|
297
|
-
|
|
298
|
-
provider: Joi.string().allow(""),
|
|
299
|
-
|
|
300
|
-
from_address: Joi.array().items(
|
|
301
|
-
CommunicationModel.EmailProviderReqFrom()
|
|
302
|
-
),
|
|
272
|
+
success: Joi.boolean(),
|
|
303
273
|
});
|
|
304
274
|
}
|
|
305
|
-
|
|
306
|
-
static EmailProvider() {
|
|
275
|
+
static EventSubscription() {
|
|
307
276
|
return Joi.object({
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
provider: Joi.string().allow(""),
|
|
311
|
-
|
|
312
|
-
from_address: Joi.array().items(
|
|
313
|
-
CommunicationModel.EmailProviderReqFrom()
|
|
314
|
-
),
|
|
315
|
-
|
|
277
|
+
__v: Joi.number(),
|
|
316
278
|
_id: Joi.string().allow(""),
|
|
317
|
-
|
|
318
|
-
name: Joi.string().allow(""),
|
|
319
|
-
|
|
320
|
-
description: Joi.string().allow(""),
|
|
321
|
-
|
|
322
|
-
api_key: Joi.string().allow(""),
|
|
323
|
-
|
|
324
279
|
application: Joi.string().allow(""),
|
|
325
|
-
|
|
326
280
|
created_at: Joi.string().allow(""),
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
281
|
+
event: Joi.string().allow(""),
|
|
282
|
+
is_default: Joi.boolean(),
|
|
330
283
|
slug: Joi.string().allow(""),
|
|
331
|
-
|
|
332
|
-
|
|
284
|
+
template: CommunicationModel.EventSubscriptionTemplate(),
|
|
285
|
+
updated_at: Joi.string().allow(""),
|
|
333
286
|
});
|
|
334
287
|
}
|
|
335
|
-
|
|
336
|
-
static EmailProviders() {
|
|
288
|
+
static EventSubscriptions() {
|
|
337
289
|
return Joi.object({
|
|
338
|
-
items: Joi.array().items(CommunicationModel.
|
|
339
|
-
|
|
290
|
+
items: Joi.array().items(CommunicationModel.EventSubscription()),
|
|
340
291
|
page: CommunicationModel.Page(),
|
|
341
292
|
});
|
|
342
293
|
}
|
|
343
|
-
|
|
344
|
-
static EmailTemplateDeleteSuccessRes() {
|
|
294
|
+
static EventSubscriptionTemplate() {
|
|
345
295
|
return Joi.object({
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
message: Joi.string().allow(""),
|
|
296
|
+
email: CommunicationModel.EventSubscriptionTemplateEmail(),
|
|
297
|
+
sms: CommunicationModel.EventSubscriptionTemplateSms(),
|
|
349
298
|
});
|
|
350
299
|
}
|
|
351
|
-
|
|
352
|
-
static EmailTemplateDeleteFailureRes() {
|
|
300
|
+
static EventSubscriptionTemplateEmail() {
|
|
353
301
|
return Joi.object({
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
message: Joi.string().allow(""),
|
|
302
|
+
subscribed: Joi.boolean(),
|
|
303
|
+
template: Joi.string().allow(""),
|
|
357
304
|
});
|
|
358
305
|
}
|
|
359
|
-
|
|
360
|
-
static EmailTemplateKeys() {
|
|
306
|
+
static EventSubscriptionTemplateSms() {
|
|
361
307
|
return Joi.object({
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
cc: Joi.string().allow(""),
|
|
365
|
-
|
|
366
|
-
bcc: Joi.string().allow(""),
|
|
308
|
+
subscribed: Joi.boolean(),
|
|
309
|
+
template: Joi.string().allow(""),
|
|
367
310
|
});
|
|
368
311
|
}
|
|
369
|
-
|
|
370
|
-
static EmailTemplateHeaders() {
|
|
312
|
+
static GetNRecordsCsvReq() {
|
|
371
313
|
return Joi.object({
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
314
|
+
count: Joi.number(),
|
|
315
|
+
header: Joi.boolean(),
|
|
316
|
+
url: Joi.string().allow(""),
|
|
375
317
|
});
|
|
376
318
|
}
|
|
377
|
-
|
|
378
|
-
static EmailTemplateReq() {
|
|
319
|
+
static GetNRecordsCsvRes() {
|
|
379
320
|
return Joi.object({
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
description: Joi.string().allow(""),
|
|
383
|
-
|
|
384
|
-
keys: CommunicationModel.EmailTemplateKeys(),
|
|
385
|
-
|
|
386
|
-
static_to: Joi.array().items(Joi.string().allow("")),
|
|
387
|
-
|
|
388
|
-
static_cc: Joi.array().items(Joi.string().allow("")),
|
|
389
|
-
|
|
390
|
-
static_bcc: Joi.array().items(Joi.string().allow("")),
|
|
391
|
-
|
|
392
|
-
reply_to: Joi.string().allow(""),
|
|
393
|
-
|
|
394
|
-
headers: Joi.array().items(CommunicationModel.EmailTemplateHeaders()),
|
|
395
|
-
|
|
396
|
-
subject: CommunicationModel.TemplateAndType(),
|
|
397
|
-
|
|
398
|
-
html: CommunicationModel.TemplateAndType(),
|
|
399
|
-
|
|
400
|
-
text: CommunicationModel.TemplateAndType(),
|
|
401
|
-
|
|
402
|
-
attachments: Joi.array().items(Joi.any()),
|
|
403
|
-
|
|
404
|
-
priority: Joi.string().allow(""),
|
|
321
|
+
items: Joi.array().items(CommunicationModel.GetNRecordsCsvResItems()),
|
|
405
322
|
});
|
|
406
323
|
}
|
|
407
|
-
|
|
408
|
-
static TemplateAndType() {
|
|
324
|
+
static GetNRecordsCsvResItems() {
|
|
409
325
|
return Joi.object({
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
326
|
+
email: Joi.string().allow(""),
|
|
327
|
+
firstname: Joi.string().allow(""),
|
|
328
|
+
lastname: Joi.string().allow(""),
|
|
329
|
+
orderid: Joi.string().allow(""),
|
|
330
|
+
phone_number: Joi.string().allow(""),
|
|
413
331
|
});
|
|
414
332
|
}
|
|
415
|
-
|
|
416
|
-
static EmailTemplateRes() {
|
|
333
|
+
static GetStats() {
|
|
417
334
|
return Joi.object({
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
is_internal: Joi.boolean(),
|
|
421
|
-
|
|
422
|
-
description: Joi.string().allow(""),
|
|
423
|
-
|
|
424
|
-
static_to: Joi.array().items(Joi.string().allow("")),
|
|
425
|
-
|
|
426
|
-
static_cc: Joi.array().items(Joi.string().allow("")),
|
|
427
|
-
|
|
428
|
-
static_bcc: Joi.array().items(Joi.string().allow("")),
|
|
429
|
-
|
|
430
|
-
tags: Joi.array().items(Joi.any()),
|
|
431
|
-
|
|
432
|
-
priority: Joi.string().allow(""),
|
|
433
|
-
|
|
434
|
-
published: Joi.boolean(),
|
|
435
|
-
|
|
436
|
-
_id: Joi.string().allow(""),
|
|
437
|
-
|
|
438
|
-
name: Joi.string().allow(""),
|
|
439
|
-
|
|
440
|
-
keys: CommunicationModel.EmailTemplateKeys(),
|
|
441
|
-
|
|
442
|
-
reply_to: Joi.string().allow(""),
|
|
443
|
-
|
|
444
|
-
headers: Joi.array().items(CommunicationModel.EmailTemplateHeaders()),
|
|
445
|
-
|
|
446
|
-
subject: CommunicationModel.TemplateAndType(),
|
|
447
|
-
|
|
448
|
-
html: CommunicationModel.TemplateAndType(),
|
|
449
|
-
|
|
450
|
-
text: CommunicationModel.TemplateAndType(),
|
|
451
|
-
|
|
452
|
-
attachments: Joi.array().items(Joi.any()),
|
|
453
|
-
|
|
454
|
-
created_at: Joi.string().allow(""),
|
|
455
|
-
|
|
456
|
-
updated_at: Joi.string().allow(""),
|
|
457
|
-
|
|
458
|
-
slug: Joi.string().allow(""),
|
|
459
|
-
|
|
460
|
-
__v: Joi.number(),
|
|
335
|
+
items: Joi.array().items(CommunicationModel.Stats()),
|
|
461
336
|
});
|
|
462
337
|
}
|
|
463
|
-
|
|
464
|
-
static EmailTemplate() {
|
|
338
|
+
static Job() {
|
|
465
339
|
return Joi.object({
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
is_internal: Joi.boolean(),
|
|
469
|
-
|
|
470
|
-
description: Joi.string().allow(""),
|
|
471
|
-
|
|
472
|
-
static_to: Joi.array().items(Joi.any()),
|
|
473
|
-
|
|
474
|
-
static_cc: Joi.array().items(Joi.any()),
|
|
475
|
-
|
|
476
|
-
static_bcc: Joi.array().items(Joi.any()),
|
|
477
|
-
|
|
478
|
-
tags: Joi.array().items(Joi.any()),
|
|
479
|
-
|
|
480
|
-
priority: Joi.string().allow(""),
|
|
481
|
-
|
|
482
|
-
published: Joi.boolean(),
|
|
483
|
-
|
|
340
|
+
__v: Joi.number(),
|
|
484
341
|
_id: Joi.string().allow(""),
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
name: Joi.string().allow(""),
|
|
489
|
-
|
|
490
|
-
from_name: Joi.string().allow(""),
|
|
491
|
-
|
|
492
|
-
subject: CommunicationModel.TemplateAndType(),
|
|
493
|
-
|
|
494
|
-
html: CommunicationModel.TemplateAndType(),
|
|
495
|
-
|
|
496
|
-
text: CommunicationModel.TemplateAndType(),
|
|
497
|
-
|
|
498
|
-
headers: Joi.array().items(Joi.any()),
|
|
499
|
-
|
|
500
|
-
attachments: Joi.array().items(Joi.any()),
|
|
501
|
-
|
|
342
|
+
application: Joi.string().allow(""),
|
|
343
|
+
campaign: Joi.string().allow(""),
|
|
344
|
+
completed: Joi.boolean(),
|
|
502
345
|
created_at: Joi.string().allow(""),
|
|
503
|
-
|
|
346
|
+
is_active: Joi.boolean(),
|
|
504
347
|
updated_at: Joi.string().allow(""),
|
|
505
|
-
|
|
506
|
-
__v: Joi.number(),
|
|
507
348
|
});
|
|
508
349
|
}
|
|
509
|
-
|
|
510
|
-
static SystemEmailTemplate() {
|
|
350
|
+
static JobLog() {
|
|
511
351
|
return Joi.object({
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
is_internal: Joi.boolean(),
|
|
515
|
-
|
|
516
|
-
description: Joi.string().allow(""),
|
|
517
|
-
|
|
518
|
-
static_to: Joi.array().items(Joi.any()),
|
|
519
|
-
|
|
520
|
-
static_cc: Joi.array().items(Joi.any()),
|
|
521
|
-
|
|
522
|
-
static_bcc: Joi.array().items(Joi.any()),
|
|
523
|
-
|
|
524
|
-
tags: Joi.array().items(Joi.any()),
|
|
525
|
-
|
|
526
|
-
priority: Joi.string().allow(""),
|
|
527
|
-
|
|
528
|
-
published: Joi.boolean(),
|
|
529
|
-
|
|
352
|
+
__v: Joi.number(),
|
|
530
353
|
_id: Joi.string().allow(""),
|
|
531
|
-
|
|
532
|
-
slug: Joi.string().allow(""),
|
|
533
|
-
|
|
534
|
-
name: Joi.string().allow(""),
|
|
535
|
-
|
|
536
|
-
from_name: Joi.string().allow(""),
|
|
537
|
-
|
|
538
|
-
subject: CommunicationModel.TemplateAndType(),
|
|
539
|
-
|
|
540
|
-
html: CommunicationModel.TemplateAndType(),
|
|
541
|
-
|
|
542
|
-
text: CommunicationModel.TemplateAndType(),
|
|
543
|
-
|
|
544
|
-
headers: Joi.array().items(Joi.any()),
|
|
545
|
-
|
|
546
|
-
attachments: Joi.array().items(Joi.any()),
|
|
547
|
-
|
|
354
|
+
campaign: Joi.string().allow(""),
|
|
548
355
|
created_at: Joi.string().allow(""),
|
|
549
|
-
|
|
356
|
+
imported: Joi.any(),
|
|
357
|
+
job: Joi.string().allow(""),
|
|
358
|
+
processed: Joi.any(),
|
|
550
359
|
updated_at: Joi.string().allow(""),
|
|
551
|
-
|
|
552
|
-
__v: Joi.number(),
|
|
553
360
|
});
|
|
554
361
|
}
|
|
555
|
-
|
|
556
|
-
static EmailTemplates() {
|
|
362
|
+
static JobLogs() {
|
|
557
363
|
return Joi.object({
|
|
558
|
-
items: Joi.array().items(CommunicationModel.
|
|
559
|
-
|
|
364
|
+
items: Joi.array().items(CommunicationModel.JobLog()),
|
|
560
365
|
page: CommunicationModel.Page(),
|
|
561
366
|
});
|
|
562
367
|
}
|
|
563
|
-
|
|
564
|
-
static SystemEmailTemplates() {
|
|
368
|
+
static Jobs() {
|
|
565
369
|
return Joi.object({
|
|
566
|
-
items: Joi.array().items(CommunicationModel.
|
|
567
|
-
|
|
370
|
+
items: Joi.array().items(CommunicationModel.Job()),
|
|
568
371
|
page: CommunicationModel.Page(),
|
|
569
372
|
});
|
|
570
373
|
}
|
|
571
|
-
|
|
572
|
-
|
|
374
|
+
static Log() {
|
|
375
|
+
return Joi.object({
|
|
376
|
+
_id: Joi.string().allow(""),
|
|
377
|
+
application: Joi.string().allow(""),
|
|
378
|
+
created_at: Joi.string().allow(""),
|
|
379
|
+
data: Joi.any(),
|
|
380
|
+
email: CommunicationModel.LogEmail(),
|
|
381
|
+
expire_at: Joi.string().allow(""),
|
|
382
|
+
meta: CommunicationModel.LogMeta(),
|
|
383
|
+
pushnotification: CommunicationModel.LogPushnotification(),
|
|
384
|
+
service: Joi.string().allow(""),
|
|
385
|
+
status: Joi.string().allow(""),
|
|
386
|
+
step: Joi.string().allow(""),
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
static LogEmail() {
|
|
390
|
+
return Joi.object({
|
|
391
|
+
template: Joi.string().allow(""),
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
static LogMeta() {
|
|
573
395
|
return Joi.object({
|
|
396
|
+
identifier: Joi.string().allow(""),
|
|
574
397
|
key: Joi.string().allow(""),
|
|
575
|
-
|
|
576
|
-
|
|
398
|
+
offset: Joi.string().allow(""),
|
|
399
|
+
partition: Joi.string().allow(""),
|
|
400
|
+
topic: Joi.string().allow(""),
|
|
401
|
+
type: Joi.string().allow(""),
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
static LogPushnotification() {
|
|
405
|
+
return Joi.object({
|
|
406
|
+
pushtokens: Joi.array().items(Joi.string().allow("")),
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
static Logs() {
|
|
410
|
+
return Joi.object({
|
|
411
|
+
items: Joi.array().items(CommunicationModel.Log()),
|
|
412
|
+
page: CommunicationModel.Page(),
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
static MetaStructure() {
|
|
416
|
+
return Joi.object({
|
|
417
|
+
action: Joi.string().allow(""),
|
|
418
|
+
job_type: Joi.string().allow(""),
|
|
419
|
+
timestamp: Joi.string().allow(""),
|
|
420
|
+
trace: Joi.string().allow(""),
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
static NotFound() {
|
|
424
|
+
return Joi.object({
|
|
425
|
+
message: Joi.string().allow(""),
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
static Notification() {
|
|
429
|
+
return Joi.object({
|
|
430
|
+
body: Joi.string().allow(""),
|
|
431
|
+
click_action: Joi.string().allow(""),
|
|
432
|
+
deeplink: Joi.string().allow(""),
|
|
433
|
+
icon: Joi.string().allow(""),
|
|
434
|
+
subtitle: Joi.string().allow(""),
|
|
435
|
+
title: Joi.string().allow(""),
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
static Page() {
|
|
439
|
+
return Joi.object({
|
|
440
|
+
current: Joi.number(),
|
|
441
|
+
has_next: Joi.boolean(),
|
|
442
|
+
has_previous: Joi.boolean(),
|
|
443
|
+
item_total: Joi.number(),
|
|
444
|
+
next_id: Joi.string().allow(""),
|
|
445
|
+
size: Joi.number(),
|
|
446
|
+
type: Joi.string().allow("").required(),
|
|
577
447
|
});
|
|
578
448
|
}
|
|
579
|
-
|
|
580
449
|
static PayloadEmailProviderStructure() {
|
|
581
450
|
return Joi.object({
|
|
582
451
|
_id: Joi.string().allow(""),
|
|
583
452
|
});
|
|
584
453
|
}
|
|
585
|
-
|
|
586
454
|
static PayloadEmailStructure() {
|
|
587
455
|
return Joi.object({
|
|
588
|
-
template: CommunicationModel.PayloadEmailTemplateStructure(),
|
|
589
|
-
|
|
590
456
|
provider: CommunicationModel.PayloadEmailProviderStructure(),
|
|
457
|
+
template: CommunicationModel.PayloadEmailTemplateStructure(),
|
|
591
458
|
});
|
|
592
459
|
}
|
|
593
|
-
|
|
594
|
-
static PayloadSmsTemplateStructure() {
|
|
460
|
+
static PayloadEmailTemplateStructure() {
|
|
595
461
|
return Joi.object({
|
|
596
462
|
key: Joi.string().allow(""),
|
|
597
|
-
|
|
598
463
|
value: Joi.any(),
|
|
599
464
|
});
|
|
600
465
|
}
|
|
601
|
-
|
|
602
466
|
static PayloadSmsProviderStructure() {
|
|
603
467
|
return Joi.object({
|
|
604
468
|
_id: Joi.string().allow(""),
|
|
605
469
|
});
|
|
606
470
|
}
|
|
607
|
-
|
|
608
471
|
static PayloadSmsStructure() {
|
|
609
472
|
return Joi.object({
|
|
610
|
-
template: CommunicationModel.PayloadSmsTemplateStructure(),
|
|
611
|
-
|
|
612
473
|
provider: CommunicationModel.PayloadSmsProviderStructure(),
|
|
474
|
+
template: CommunicationModel.PayloadSmsTemplateStructure(),
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
static PayloadSmsTemplateStructure() {
|
|
478
|
+
return Joi.object({
|
|
479
|
+
key: Joi.string().allow(""),
|
|
480
|
+
value: Joi.any(),
|
|
613
481
|
});
|
|
614
482
|
}
|
|
615
|
-
|
|
616
483
|
static PayloadStructure() {
|
|
617
484
|
return Joi.object({
|
|
485
|
+
application: Joi.string().allow(""),
|
|
618
486
|
data: Joi.array().items(Joi.any()),
|
|
619
|
-
|
|
620
487
|
email: CommunicationModel.PayloadEmailStructure(),
|
|
621
|
-
|
|
622
488
|
sms: CommunicationModel.PayloadSmsStructure(),
|
|
623
|
-
|
|
624
|
-
application: Joi.string().allow(""),
|
|
625
489
|
});
|
|
626
490
|
}
|
|
627
|
-
|
|
628
|
-
static MetaStructure() {
|
|
491
|
+
static PushtokenReq() {
|
|
629
492
|
return Joi.object({
|
|
630
|
-
job_type: Joi.string().allow(""),
|
|
631
|
-
|
|
632
493
|
action: Joi.string().allow(""),
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
timestamp: Joi.string().allow(""),
|
|
494
|
+
bundle_identifier: Joi.string().allow(""),
|
|
495
|
+
push_token: Joi.string().allow(""),
|
|
496
|
+
unique_device_id: Joi.string().allow(""),
|
|
637
497
|
});
|
|
638
498
|
}
|
|
639
|
-
|
|
640
|
-
static EngineRequest() {
|
|
641
|
-
return Joi.object({
|
|
642
|
-
payload: CommunicationModel.PayloadStructure(),
|
|
643
|
-
|
|
644
|
-
meta: CommunicationModel.MetaStructure(),
|
|
645
|
-
});
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
static EngineResponse() {
|
|
649
|
-
return Joi.object({
|
|
650
|
-
success: Joi.boolean(),
|
|
651
|
-
});
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
static EventSubscriptionTemplateSms() {
|
|
655
|
-
return Joi.object({
|
|
656
|
-
subscribed: Joi.boolean(),
|
|
657
|
-
|
|
658
|
-
template: Joi.string().allow(""),
|
|
659
|
-
});
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
static EventSubscriptionTemplateEmail() {
|
|
663
|
-
return Joi.object({
|
|
664
|
-
subscribed: Joi.boolean(),
|
|
665
|
-
|
|
666
|
-
template: Joi.string().allow(""),
|
|
667
|
-
});
|
|
668
|
-
}
|
|
669
|
-
|
|
670
|
-
static EventSubscriptionTemplate() {
|
|
671
|
-
return Joi.object({
|
|
672
|
-
sms: CommunicationModel.EventSubscriptionTemplateSms(),
|
|
673
|
-
|
|
674
|
-
email: CommunicationModel.EventSubscriptionTemplateEmail(),
|
|
675
|
-
});
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
static EventSubscription() {
|
|
499
|
+
static PushtokenRes() {
|
|
679
500
|
return Joi.object({
|
|
680
|
-
template: CommunicationModel.EventSubscriptionTemplate(),
|
|
681
|
-
|
|
682
|
-
is_default: Joi.boolean(),
|
|
683
|
-
|
|
684
501
|
_id: Joi.string().allow(""),
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
event: Joi.string().allow(""),
|
|
689
|
-
|
|
690
|
-
slug: Joi.string().allow(""),
|
|
691
|
-
|
|
502
|
+
application_id: Joi.string().allow(""),
|
|
503
|
+
bundle_identifier: Joi.string().allow(""),
|
|
692
504
|
created_at: Joi.string().allow(""),
|
|
693
|
-
|
|
505
|
+
expired_at: Joi.string().allow(""),
|
|
506
|
+
platform: Joi.string().allow(""),
|
|
507
|
+
push_token: Joi.string().allow(""),
|
|
508
|
+
type: Joi.string().allow(""),
|
|
509
|
+
unique_device_id: Joi.string().allow(""),
|
|
694
510
|
updated_at: Joi.string().allow(""),
|
|
695
|
-
|
|
696
|
-
__v: Joi.number(),
|
|
697
|
-
});
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
static EventSubscriptions() {
|
|
701
|
-
return Joi.object({
|
|
702
|
-
items: Joi.array().items(CommunicationModel.EventSubscription()),
|
|
703
|
-
|
|
704
|
-
page: CommunicationModel.Page(),
|
|
511
|
+
user_id: Joi.string().allow(""),
|
|
705
512
|
});
|
|
706
513
|
}
|
|
707
|
-
|
|
708
|
-
static TriggerJobResponse() {
|
|
514
|
+
static RecipientHeaders() {
|
|
709
515
|
return Joi.object({
|
|
710
|
-
|
|
516
|
+
email: Joi.string().allow(""),
|
|
711
517
|
});
|
|
712
518
|
}
|
|
713
|
-
|
|
714
|
-
static TriggerJobRequest() {
|
|
519
|
+
static SendOtpCommsReq() {
|
|
715
520
|
return Joi.object({
|
|
716
|
-
|
|
521
|
+
data: CommunicationModel.SendOtpCommsReqData(),
|
|
522
|
+
email: CommunicationModel.SendOtpCommsReqEmail(),
|
|
523
|
+
sms: CommunicationModel.SendOtpCommsReqSms(),
|
|
717
524
|
});
|
|
718
525
|
}
|
|
719
|
-
|
|
720
|
-
static Job() {
|
|
526
|
+
static SendOtpCommsReqData() {
|
|
721
527
|
return Joi.object({
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
_id: Joi.string().allow(""),
|
|
727
|
-
|
|
728
|
-
campaign: Joi.string().allow(""),
|
|
729
|
-
|
|
730
|
-
application: Joi.string().allow(""),
|
|
731
|
-
|
|
732
|
-
created_at: Joi.string().allow(""),
|
|
733
|
-
|
|
734
|
-
updated_at: Joi.string().allow(""),
|
|
735
|
-
|
|
736
|
-
__v: Joi.number(),
|
|
528
|
+
country_code: Joi.string().allow(""),
|
|
529
|
+
mobile: Joi.string().allow(""),
|
|
530
|
+
send_same_otp_to_channel: Joi.boolean(),
|
|
531
|
+
to: Joi.string().allow(""),
|
|
737
532
|
});
|
|
738
533
|
}
|
|
739
|
-
|
|
740
|
-
static Jobs() {
|
|
534
|
+
static SendOtpCommsReqEmail() {
|
|
741
535
|
return Joi.object({
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
536
|
+
expiry: Joi.number(),
|
|
537
|
+
otp_length: Joi.number(),
|
|
538
|
+
template: CommunicationModel.SendOtpEmailCommsTemplate(),
|
|
745
539
|
});
|
|
746
540
|
}
|
|
747
|
-
|
|
748
|
-
static JobLog() {
|
|
541
|
+
static SendOtpCommsReqSms() {
|
|
749
542
|
return Joi.object({
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
_id: Joi.string().allow(""),
|
|
755
|
-
|
|
756
|
-
job: Joi.string().allow(""),
|
|
757
|
-
|
|
758
|
-
campaign: Joi.string().allow(""),
|
|
759
|
-
|
|
760
|
-
created_at: Joi.string().allow(""),
|
|
761
|
-
|
|
762
|
-
updated_at: Joi.string().allow(""),
|
|
763
|
-
|
|
764
|
-
__v: Joi.number(),
|
|
543
|
+
expiry: Joi.number(),
|
|
544
|
+
otp_length: Joi.number(),
|
|
545
|
+
provider: CommunicationModel.SendOtpSmsCommsProvider(),
|
|
546
|
+
template: CommunicationModel.SendOtpSmsCommsTemplate(),
|
|
765
547
|
});
|
|
766
548
|
}
|
|
767
|
-
|
|
768
|
-
static JobLogs() {
|
|
549
|
+
static SendOtpCommsRes() {
|
|
769
550
|
return Joi.object({
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
page: CommunicationModel.Page(),
|
|
551
|
+
email: CommunicationModel.SendOtpCommsResEmail(),
|
|
552
|
+
sms: CommunicationModel.SendOtpCommsResSms(),
|
|
773
553
|
});
|
|
774
554
|
}
|
|
775
|
-
|
|
776
|
-
static LogEmail() {
|
|
555
|
+
static SendOtpCommsResEmail() {
|
|
777
556
|
return Joi.object({
|
|
778
|
-
|
|
557
|
+
message: Joi.string().allow(""),
|
|
558
|
+
request_id: Joi.string().allow(""),
|
|
559
|
+
resend_timer: Joi.number(),
|
|
560
|
+
success: Joi.boolean(),
|
|
561
|
+
to: Joi.string().allow(""),
|
|
779
562
|
});
|
|
780
563
|
}
|
|
781
|
-
|
|
782
|
-
static LogPushnotification() {
|
|
564
|
+
static SendOtpCommsResSms() {
|
|
783
565
|
return Joi.object({
|
|
784
|
-
|
|
566
|
+
country_code: Joi.string().allow(""),
|
|
567
|
+
message: Joi.string().allow(""),
|
|
568
|
+
mobile: Joi.string().allow(""),
|
|
569
|
+
request_id: Joi.string().allow(""),
|
|
570
|
+
resend_timer: Joi.number(),
|
|
571
|
+
success: Joi.boolean(),
|
|
785
572
|
});
|
|
786
573
|
}
|
|
787
|
-
|
|
788
|
-
static LogMeta() {
|
|
574
|
+
static SendOtpEmailCommsTemplate() {
|
|
789
575
|
return Joi.object({
|
|
790
|
-
type: Joi.string().allow(""),
|
|
791
|
-
|
|
792
|
-
identifier: Joi.string().allow(""),
|
|
793
|
-
|
|
794
576
|
key: Joi.string().allow(""),
|
|
795
|
-
|
|
796
|
-
offset: Joi.string().allow(""),
|
|
797
|
-
|
|
798
|
-
partition: Joi.string().allow(""),
|
|
799
|
-
|
|
800
|
-
topic: Joi.string().allow(""),
|
|
577
|
+
value: Joi.any(),
|
|
801
578
|
});
|
|
802
579
|
}
|
|
803
|
-
|
|
804
|
-
static Log() {
|
|
580
|
+
static SendOtpSmsCommsProvider() {
|
|
805
581
|
return Joi.object({
|
|
806
|
-
email: CommunicationModel.LogEmail(),
|
|
807
|
-
|
|
808
|
-
pushnotification: CommunicationModel.LogPushnotification(),
|
|
809
|
-
|
|
810
|
-
meta: CommunicationModel.LogMeta(),
|
|
811
|
-
|
|
812
582
|
_id: Joi.string().allow(""),
|
|
813
|
-
|
|
814
|
-
application: Joi.string().allow(""),
|
|
815
|
-
|
|
816
|
-
service: Joi.string().allow(""),
|
|
817
|
-
|
|
818
|
-
step: Joi.string().allow(""),
|
|
819
|
-
|
|
820
|
-
status: Joi.string().allow(""),
|
|
821
|
-
|
|
822
|
-
data: Joi.any(),
|
|
823
|
-
|
|
824
|
-
expire_at: Joi.string().allow(""),
|
|
825
|
-
|
|
826
|
-
created_at: Joi.string().allow(""),
|
|
827
|
-
});
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
static Logs() {
|
|
831
|
-
return Joi.object({
|
|
832
|
-
items: Joi.array().items(CommunicationModel.Log()),
|
|
833
|
-
|
|
834
|
-
page: CommunicationModel.Page(),
|
|
583
|
+
slug: Joi.string().allow(""),
|
|
835
584
|
});
|
|
836
585
|
}
|
|
837
|
-
|
|
838
586
|
static SendOtpSmsCommsTemplate() {
|
|
839
587
|
return Joi.object({
|
|
840
588
|
key: Joi.string().allow(""),
|
|
841
|
-
|
|
842
589
|
value: Joi.any(),
|
|
843
590
|
});
|
|
844
591
|
}
|
|
845
|
-
|
|
846
|
-
static SendOtpSmsCommsProvider() {
|
|
592
|
+
static SmsProvider() {
|
|
847
593
|
return Joi.object({
|
|
848
|
-
|
|
849
|
-
|
|
594
|
+
__v: Joi.number(),
|
|
850
595
|
_id: Joi.string().allow(""),
|
|
596
|
+
application: Joi.string().allow(""),
|
|
597
|
+
authkey: Joi.string().allow(""),
|
|
598
|
+
created_at: Joi.string().allow(""),
|
|
599
|
+
description: Joi.string().allow(""),
|
|
600
|
+
name: Joi.string().allow(""),
|
|
601
|
+
provider: Joi.string().allow(""),
|
|
602
|
+
rpt: Joi.number(),
|
|
603
|
+
sender: Joi.string().allow(""),
|
|
604
|
+
slug: Joi.string().allow(""),
|
|
605
|
+
type: Joi.string().allow(""),
|
|
606
|
+
updated_at: Joi.string().allow(""),
|
|
607
|
+
username: Joi.string().allow(""),
|
|
851
608
|
});
|
|
852
609
|
}
|
|
853
|
-
|
|
854
|
-
static SendOtpEmailCommsTemplate() {
|
|
610
|
+
static SmsProviderReq() {
|
|
855
611
|
return Joi.object({
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
612
|
+
authkey: Joi.string().allow(""),
|
|
613
|
+
description: Joi.string().allow(""),
|
|
614
|
+
name: Joi.string().allow(""),
|
|
615
|
+
provider: Joi.string().allow(""),
|
|
616
|
+
sender: Joi.string().allow(""),
|
|
617
|
+
type: Joi.string().allow(""),
|
|
618
|
+
username: Joi.string().allow(""),
|
|
859
619
|
});
|
|
860
620
|
}
|
|
861
|
-
|
|
862
|
-
static SendOtpCommsReqData() {
|
|
621
|
+
static SmsProviders() {
|
|
863
622
|
return Joi.object({
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
mobile: Joi.string().allow(""),
|
|
867
|
-
|
|
868
|
-
country_code: Joi.string().allow(""),
|
|
869
|
-
|
|
870
|
-
to: Joi.string().allow(""),
|
|
623
|
+
items: Joi.array().items(CommunicationModel.SmsProvider()),
|
|
624
|
+
page: CommunicationModel.Page(),
|
|
871
625
|
});
|
|
872
626
|
}
|
|
873
|
-
|
|
874
|
-
static SendOtpCommsReqSms() {
|
|
627
|
+
static SmsTemplate() {
|
|
875
628
|
return Joi.object({
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
629
|
+
__v: Joi.number(),
|
|
630
|
+
_id: Joi.string().allow(""),
|
|
631
|
+
created_at: Joi.string().allow(""),
|
|
632
|
+
description: Joi.string().allow(""),
|
|
633
|
+
is_internal: Joi.boolean(),
|
|
634
|
+
is_system: Joi.boolean(),
|
|
635
|
+
message: CommunicationModel.SmsTemplateMessage(),
|
|
636
|
+
name: Joi.string().allow(""),
|
|
637
|
+
priority: Joi.string().allow(""),
|
|
638
|
+
published: Joi.boolean(),
|
|
639
|
+
slug: Joi.string().allow(""),
|
|
640
|
+
tags: Joi.array().items(Joi.any()),
|
|
641
|
+
template_variables: Joi.any(),
|
|
642
|
+
updated_at: Joi.string().allow(""),
|
|
883
643
|
});
|
|
884
644
|
}
|
|
885
|
-
|
|
886
|
-
static SendOtpCommsReqEmail() {
|
|
645
|
+
static SmsTemplateDeleteFailureRes() {
|
|
887
646
|
return Joi.object({
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
expiry: Joi.number(),
|
|
891
|
-
|
|
892
|
-
template: CommunicationModel.SendOtpEmailCommsTemplate(),
|
|
647
|
+
message: Joi.string().allow(""),
|
|
648
|
+
success: Joi.boolean(),
|
|
893
649
|
});
|
|
894
650
|
}
|
|
895
|
-
|
|
896
|
-
static SendOtpCommsResSms() {
|
|
651
|
+
static SmsTemplateDeleteSuccessRes() {
|
|
897
652
|
return Joi.object({
|
|
898
|
-
success: Joi.boolean(),
|
|
899
|
-
|
|
900
|
-
request_id: Joi.string().allow(""),
|
|
901
|
-
|
|
902
653
|
message: Joi.string().allow(""),
|
|
903
|
-
|
|
904
|
-
mobile: Joi.string().allow(""),
|
|
905
|
-
|
|
906
|
-
country_code: Joi.string().allow(""),
|
|
907
|
-
|
|
908
|
-
resend_timer: Joi.number(),
|
|
654
|
+
success: Joi.boolean(),
|
|
909
655
|
});
|
|
910
656
|
}
|
|
911
|
-
|
|
912
|
-
static SendOtpCommsResEmail() {
|
|
657
|
+
static SmsTemplateMessage() {
|
|
913
658
|
return Joi.object({
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
request_id: Joi.string().allow(""),
|
|
917
|
-
|
|
918
|
-
message: Joi.string().allow(""),
|
|
919
|
-
|
|
920
|
-
to: Joi.string().allow(""),
|
|
921
|
-
|
|
922
|
-
resend_timer: Joi.number(),
|
|
659
|
+
template: Joi.string().allow(""),
|
|
660
|
+
template_type: Joi.string().allow(""),
|
|
923
661
|
});
|
|
924
662
|
}
|
|
925
|
-
|
|
926
|
-
static SendOtpCommsReq() {
|
|
663
|
+
static SmsTemplateReq() {
|
|
927
664
|
return Joi.object({
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
665
|
+
attachments: Joi.array().items(Joi.any()),
|
|
666
|
+
description: Joi.string().allow(""),
|
|
667
|
+
message: CommunicationModel.SmsTemplateMessage(),
|
|
668
|
+
name: Joi.string().allow(""),
|
|
669
|
+
priority: Joi.string().allow(""),
|
|
670
|
+
template_variables: Joi.any(),
|
|
933
671
|
});
|
|
934
672
|
}
|
|
935
|
-
|
|
936
|
-
static SendOtpCommsRes() {
|
|
673
|
+
static SmsTemplateRes() {
|
|
937
674
|
return Joi.object({
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
675
|
+
__v: Joi.number(),
|
|
676
|
+
_id: Joi.string().allow(""),
|
|
677
|
+
created_at: Joi.string().allow(""),
|
|
678
|
+
description: Joi.string().allow(""),
|
|
679
|
+
is_internal: Joi.boolean(),
|
|
680
|
+
is_system: Joi.boolean(),
|
|
681
|
+
message: CommunicationModel.SmsTemplateMessage(),
|
|
682
|
+
name: Joi.string().allow(""),
|
|
683
|
+
priority: Joi.string().allow(""),
|
|
684
|
+
published: Joi.boolean(),
|
|
685
|
+
slug: Joi.string().allow(""),
|
|
686
|
+
tags: Joi.array().items(Joi.any()),
|
|
687
|
+
template_variables: Joi.any(),
|
|
688
|
+
updated_at: Joi.string().allow(""),
|
|
941
689
|
});
|
|
942
690
|
}
|
|
943
|
-
|
|
944
|
-
static VerifyOtpCommsReq() {
|
|
691
|
+
static SmsTemplates() {
|
|
945
692
|
return Joi.object({
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
otp: Joi.string().allow(""),
|
|
693
|
+
items: Joi.array().items(CommunicationModel.SmsTemplate()),
|
|
694
|
+
page: CommunicationModel.Page(),
|
|
949
695
|
});
|
|
950
696
|
}
|
|
951
|
-
|
|
952
|
-
static VerifyOtpCommsSuccessRes() {
|
|
697
|
+
static Stats() {
|
|
953
698
|
return Joi.object({
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
country_code: Joi.string().allow(""),
|
|
959
|
-
|
|
960
|
-
message: Joi.string().allow(""),
|
|
699
|
+
_id: Joi.string().allow(""),
|
|
700
|
+
imported: Joi.any(),
|
|
701
|
+
processed: Joi.any(),
|
|
961
702
|
});
|
|
962
703
|
}
|
|
963
|
-
|
|
964
|
-
static VerifyOtpCommsErrorRes() {
|
|
704
|
+
static StatsImported() {
|
|
965
705
|
return Joi.object({
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
message: Joi.string().allow(""),
|
|
706
|
+
count: Joi.number(),
|
|
969
707
|
});
|
|
970
708
|
}
|
|
971
|
-
|
|
972
|
-
static PushtokenReq() {
|
|
709
|
+
static StatsProcessed() {
|
|
973
710
|
return Joi.object({
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
bundle_identifier: Joi.string().allow(""),
|
|
977
|
-
|
|
978
|
-
push_token: Joi.string().allow(""),
|
|
979
|
-
|
|
980
|
-
unique_device_id: Joi.string().allow(""),
|
|
711
|
+
email: CommunicationModel.StatsProcessedEmail(),
|
|
712
|
+
sms: CommunicationModel.StatsProcessedSms(),
|
|
981
713
|
});
|
|
982
714
|
}
|
|
983
|
-
|
|
984
|
-
static PushtokenRes() {
|
|
715
|
+
static StatsProcessedEmail() {
|
|
985
716
|
return Joi.object({
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
push_token: Joi.string().allow(""),
|
|
991
|
-
|
|
992
|
-
unique_device_id: Joi.string().allow(""),
|
|
993
|
-
|
|
994
|
-
type: Joi.string().allow(""),
|
|
995
|
-
|
|
996
|
-
platform: Joi.string().allow(""),
|
|
997
|
-
|
|
998
|
-
application_id: Joi.string().allow(""),
|
|
999
|
-
|
|
1000
|
-
user_id: Joi.string().allow(""),
|
|
1001
|
-
|
|
1002
|
-
created_at: Joi.string().allow(""),
|
|
1003
|
-
|
|
1004
|
-
updated_at: Joi.string().allow(""),
|
|
1005
|
-
|
|
1006
|
-
expired_at: Joi.string().allow(""),
|
|
717
|
+
failed: Joi.number(),
|
|
718
|
+
success: Joi.number(),
|
|
719
|
+
suppressed: Joi.number(),
|
|
1007
720
|
});
|
|
1008
721
|
}
|
|
1009
|
-
|
|
1010
|
-
static SmsProviderReq() {
|
|
722
|
+
static StatsProcessedSms() {
|
|
1011
723
|
return Joi.object({
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
sender: Joi.string().allow(""),
|
|
1017
|
-
|
|
1018
|
-
username: Joi.string().allow(""),
|
|
1019
|
-
|
|
1020
|
-
authkey: Joi.string().allow(""),
|
|
1021
|
-
|
|
1022
|
-
type: Joi.string().allow(""),
|
|
1023
|
-
|
|
1024
|
-
provider: Joi.string().allow(""),
|
|
724
|
+
failed: Joi.number(),
|
|
725
|
+
success: Joi.number(),
|
|
726
|
+
suppressed: Joi.number(),
|
|
1025
727
|
});
|
|
1026
728
|
}
|
|
1027
|
-
|
|
1028
|
-
static SmsProvider() {
|
|
729
|
+
static SystemEmailTemplate() {
|
|
1029
730
|
return Joi.object({
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
type: Joi.string().allow(""),
|
|
1033
|
-
|
|
1034
|
-
provider: Joi.string().allow(""),
|
|
1035
|
-
|
|
731
|
+
__v: Joi.number(),
|
|
1036
732
|
_id: Joi.string().allow(""),
|
|
1037
|
-
|
|
1038
|
-
name: Joi.string().allow(""),
|
|
1039
|
-
|
|
1040
|
-
description: Joi.string().allow(""),
|
|
1041
|
-
|
|
1042
|
-
sender: Joi.string().allow(""),
|
|
1043
|
-
|
|
1044
|
-
username: Joi.string().allow(""),
|
|
1045
|
-
|
|
1046
|
-
authkey: Joi.string().allow(""),
|
|
1047
|
-
|
|
1048
|
-
application: Joi.string().allow(""),
|
|
1049
|
-
|
|
733
|
+
attachments: Joi.array().items(Joi.any()),
|
|
1050
734
|
created_at: Joi.string().allow(""),
|
|
1051
|
-
|
|
735
|
+
description: Joi.string().allow(""),
|
|
736
|
+
from_name: Joi.string().allow(""),
|
|
737
|
+
headers: Joi.array().items(Joi.any()),
|
|
738
|
+
html: CommunicationModel.TemplateAndType(),
|
|
739
|
+
is_internal: Joi.boolean(),
|
|
740
|
+
is_system: Joi.boolean(),
|
|
741
|
+
name: Joi.string().allow(""),
|
|
742
|
+
priority: Joi.string().allow(""),
|
|
743
|
+
published: Joi.boolean(),
|
|
744
|
+
slug: Joi.string().allow(""),
|
|
745
|
+
static_bcc: Joi.array().items(Joi.any()),
|
|
746
|
+
static_cc: Joi.array().items(Joi.any()),
|
|
747
|
+
static_to: Joi.array().items(Joi.any()),
|
|
748
|
+
subject: CommunicationModel.TemplateAndType(),
|
|
749
|
+
tags: Joi.array().items(Joi.any()),
|
|
750
|
+
text: CommunicationModel.TemplateAndType(),
|
|
1052
751
|
updated_at: Joi.string().allow(""),
|
|
1053
|
-
|
|
1054
|
-
slug: Joi.string().allow(""),
|
|
1055
|
-
|
|
1056
|
-
__v: Joi.number(),
|
|
1057
752
|
});
|
|
1058
753
|
}
|
|
1059
|
-
|
|
1060
|
-
static SmsProviders() {
|
|
754
|
+
static SystemEmailTemplates() {
|
|
1061
755
|
return Joi.object({
|
|
1062
|
-
items: Joi.array().items(CommunicationModel.
|
|
1063
|
-
|
|
756
|
+
items: Joi.array().items(CommunicationModel.SystemEmailTemplate()),
|
|
1064
757
|
page: CommunicationModel.Page(),
|
|
1065
758
|
});
|
|
1066
759
|
}
|
|
1067
|
-
|
|
1068
|
-
static SmsTemplateDeleteSuccessRes() {
|
|
1069
|
-
return Joi.object({
|
|
1070
|
-
success: Joi.boolean(),
|
|
1071
|
-
|
|
1072
|
-
message: Joi.string().allow(""),
|
|
1073
|
-
});
|
|
1074
|
-
}
|
|
1075
|
-
|
|
1076
|
-
static SmsTemplateDeleteFailureRes() {
|
|
760
|
+
static SystemNotification() {
|
|
1077
761
|
return Joi.object({
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
762
|
+
_id: Joi.string().allow(""),
|
|
763
|
+
created_at: Joi.string().allow(""),
|
|
764
|
+
group: Joi.string().allow(""),
|
|
765
|
+
notification: CommunicationModel.Notification(),
|
|
766
|
+
settings: CommunicationModel.SystemNotificationUser(),
|
|
767
|
+
user: CommunicationModel.SystemNotificationUser(),
|
|
1081
768
|
});
|
|
1082
769
|
}
|
|
1083
|
-
|
|
1084
|
-
static SmsTemplateMessage() {
|
|
770
|
+
static SystemNotifications() {
|
|
1085
771
|
return Joi.object({
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
772
|
+
items: Joi.array().items(CommunicationModel.SystemNotification()),
|
|
773
|
+
last_read_anchor: Joi.number(),
|
|
774
|
+
page: CommunicationModel.Page(),
|
|
1089
775
|
});
|
|
1090
776
|
}
|
|
1091
|
-
|
|
1092
|
-
static SmsTemplateReq() {
|
|
777
|
+
static SystemNotificationSettings() {
|
|
1093
778
|
return Joi.object({
|
|
1094
|
-
name: Joi.string().allow(""),
|
|
1095
|
-
|
|
1096
|
-
description: Joi.string().allow(""),
|
|
1097
|
-
|
|
1098
|
-
message: CommunicationModel.SmsTemplateMessage(),
|
|
1099
|
-
|
|
1100
|
-
template_variables: Joi.any(),
|
|
1101
|
-
|
|
1102
|
-
attachments: Joi.array().items(Joi.any()),
|
|
1103
|
-
|
|
1104
779
|
priority: Joi.string().allow(""),
|
|
780
|
+
sound: Joi.boolean(),
|
|
781
|
+
time_to_live: Joi.string().allow(""),
|
|
1105
782
|
});
|
|
1106
783
|
}
|
|
1107
|
-
|
|
1108
|
-
static SmsTemplateRes() {
|
|
784
|
+
static SystemNotificationsPage() {
|
|
1109
785
|
return Joi.object({
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
tags: Joi.array().items(Joi.any()),
|
|
1117
|
-
|
|
1118
|
-
priority: Joi.string().allow(""),
|
|
1119
|
-
|
|
1120
|
-
published: Joi.boolean(),
|
|
1121
|
-
|
|
1122
|
-
_id: Joi.string().allow(""),
|
|
1123
|
-
|
|
1124
|
-
name: Joi.string().allow(""),
|
|
1125
|
-
|
|
1126
|
-
message: CommunicationModel.SmsTemplateMessage(),
|
|
1127
|
-
|
|
1128
|
-
template_variables: Joi.any(),
|
|
1129
|
-
|
|
1130
|
-
created_at: Joi.string().allow(""),
|
|
1131
|
-
|
|
1132
|
-
updated_at: Joi.string().allow(""),
|
|
1133
|
-
|
|
1134
|
-
slug: Joi.string().allow(""),
|
|
1135
|
-
|
|
1136
|
-
__v: Joi.number(),
|
|
786
|
+
current: Joi.number(),
|
|
787
|
+
has_next: Joi.boolean(),
|
|
788
|
+
item_total: Joi.number(),
|
|
789
|
+
size: Joi.number(),
|
|
790
|
+
type: Joi.string().allow(""),
|
|
1137
791
|
});
|
|
1138
792
|
}
|
|
1139
|
-
|
|
1140
|
-
static SmsTemplate() {
|
|
793
|
+
static SystemNotificationUser() {
|
|
1141
794
|
return Joi.object({
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
is_internal: Joi.boolean(),
|
|
1145
|
-
|
|
1146
|
-
description: Joi.string().allow(""),
|
|
1147
|
-
|
|
1148
|
-
priority: Joi.string().allow(""),
|
|
1149
|
-
|
|
1150
|
-
tags: Joi.array().items(Joi.any()),
|
|
1151
|
-
|
|
1152
|
-
published: Joi.boolean(),
|
|
1153
|
-
|
|
1154
|
-
_id: Joi.string().allow(""),
|
|
1155
|
-
|
|
1156
|
-
slug: Joi.string().allow(""),
|
|
1157
|
-
|
|
1158
|
-
name: Joi.string().allow(""),
|
|
1159
|
-
|
|
1160
|
-
message: CommunicationModel.SmsTemplateMessage(),
|
|
1161
|
-
|
|
1162
|
-
template_variables: Joi.any(),
|
|
1163
|
-
|
|
1164
|
-
created_at: Joi.string().allow(""),
|
|
1165
|
-
|
|
1166
|
-
updated_at: Joi.string().allow(""),
|
|
1167
|
-
|
|
1168
|
-
__v: Joi.number(),
|
|
795
|
+
type: Joi.string().allow(""),
|
|
796
|
+
value: Joi.string().allow(""),
|
|
1169
797
|
});
|
|
1170
798
|
}
|
|
1171
|
-
|
|
1172
799
|
static SystemSmsTemplate() {
|
|
1173
800
|
return Joi.object({
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
801
|
+
__v: Joi.number(),
|
|
802
|
+
_id: Joi.string().allow(""),
|
|
803
|
+
created_at: Joi.string().allow(""),
|
|
1178
804
|
description: Joi.string().allow(""),
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
805
|
+
is_internal: Joi.boolean(),
|
|
806
|
+
is_system: Joi.boolean(),
|
|
807
|
+
message: CommunicationModel.SmsTemplateMessage(),
|
|
808
|
+
name: Joi.string().allow(""),
|
|
1182
809
|
priority: Joi.string().allow(""),
|
|
1183
|
-
|
|
1184
810
|
published: Joi.boolean(),
|
|
1185
|
-
|
|
1186
|
-
_id: Joi.string().allow(""),
|
|
1187
|
-
|
|
1188
811
|
slug: Joi.string().allow(""),
|
|
1189
|
-
|
|
1190
|
-
name: Joi.string().allow(""),
|
|
1191
|
-
|
|
1192
|
-
message: CommunicationModel.SmsTemplateMessage(),
|
|
1193
|
-
|
|
812
|
+
tags: Joi.array().items(Joi.any()),
|
|
1194
813
|
template_variables: Joi.any(),
|
|
1195
|
-
|
|
1196
|
-
created_at: Joi.string().allow(""),
|
|
1197
|
-
|
|
1198
814
|
updated_at: Joi.string().allow(""),
|
|
1199
|
-
|
|
1200
|
-
__v: Joi.number(),
|
|
1201
|
-
});
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1204
|
-
static SmsTemplates() {
|
|
1205
|
-
return Joi.object({
|
|
1206
|
-
items: Joi.array().items(CommunicationModel.SmsTemplate()),
|
|
1207
|
-
|
|
1208
|
-
page: CommunicationModel.Page(),
|
|
1209
815
|
});
|
|
1210
816
|
}
|
|
1211
|
-
|
|
1212
817
|
static SystemSmsTemplates() {
|
|
1213
818
|
return Joi.object({
|
|
1214
819
|
items: Joi.array().items(CommunicationModel.SystemSmsTemplate()),
|
|
1215
|
-
|
|
1216
820
|
page: CommunicationModel.Page(),
|
|
1217
821
|
});
|
|
1218
822
|
}
|
|
1219
|
-
|
|
1220
|
-
static Notification() {
|
|
1221
|
-
return Joi.object({
|
|
1222
|
-
title: Joi.string().allow(""),
|
|
1223
|
-
|
|
1224
|
-
body: Joi.string().allow(""),
|
|
1225
|
-
|
|
1226
|
-
subtitle: Joi.string().allow(""),
|
|
1227
|
-
|
|
1228
|
-
icon: Joi.string().allow(""),
|
|
1229
|
-
|
|
1230
|
-
deeplink: Joi.string().allow(""),
|
|
1231
|
-
|
|
1232
|
-
click_action: Joi.string().allow(""),
|
|
1233
|
-
});
|
|
1234
|
-
}
|
|
1235
|
-
|
|
1236
|
-
static SystemNotificationUser() {
|
|
823
|
+
static TemplateAndType() {
|
|
1237
824
|
return Joi.object({
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
value: Joi.string().allow(""),
|
|
825
|
+
template: Joi.string().allow(""),
|
|
826
|
+
template_type: Joi.string().allow(""),
|
|
1241
827
|
});
|
|
1242
828
|
}
|
|
1243
|
-
|
|
1244
|
-
static SystemNotificationSettings() {
|
|
829
|
+
static TriggerJobRequest() {
|
|
1245
830
|
return Joi.object({
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
priority: Joi.string().allow(""),
|
|
1249
|
-
|
|
1250
|
-
time_to_live: Joi.string().allow(""),
|
|
831
|
+
job_id: Joi.string().allow(""),
|
|
1251
832
|
});
|
|
1252
833
|
}
|
|
1253
|
-
|
|
1254
|
-
static SystemNotification() {
|
|
834
|
+
static TriggerJobResponse() {
|
|
1255
835
|
return Joi.object({
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
user: CommunicationModel.SystemNotificationUser(),
|
|
1259
|
-
|
|
1260
|
-
settings: CommunicationModel.SystemNotificationUser(),
|
|
1261
|
-
|
|
1262
|
-
_id: Joi.string().allow(""),
|
|
1263
|
-
|
|
1264
|
-
group: Joi.string().allow(""),
|
|
1265
|
-
|
|
1266
|
-
created_at: Joi.string().allow(""),
|
|
836
|
+
status: Joi.number(),
|
|
1267
837
|
});
|
|
1268
838
|
}
|
|
1269
|
-
|
|
1270
|
-
static SystemNotificationsPage() {
|
|
839
|
+
static VerifyOtpCommsErrorRes() {
|
|
1271
840
|
return Joi.object({
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
current: Joi.number(),
|
|
1275
|
-
|
|
1276
|
-
size: Joi.number(),
|
|
1277
|
-
|
|
1278
|
-
item_total: Joi.number(),
|
|
1279
|
-
|
|
1280
|
-
has_next: Joi.boolean(),
|
|
841
|
+
message: Joi.string().allow(""),
|
|
842
|
+
success: Joi.boolean(),
|
|
1281
843
|
});
|
|
1282
844
|
}
|
|
1283
|
-
|
|
1284
|
-
static SystemNotifications() {
|
|
845
|
+
static VerifyOtpCommsReq() {
|
|
1285
846
|
return Joi.object({
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
last_read_anchor: Joi.number(),
|
|
1289
|
-
|
|
1290
|
-
page: CommunicationModel.Page(),
|
|
847
|
+
otp: Joi.string().allow(""),
|
|
848
|
+
request_id: Joi.string().allow(""),
|
|
1291
849
|
});
|
|
1292
850
|
}
|
|
1293
|
-
|
|
1294
|
-
static Page() {
|
|
851
|
+
static VerifyOtpCommsSuccessRes() {
|
|
1295
852
|
return Joi.object({
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
has_previous: Joi.boolean(),
|
|
1301
|
-
|
|
1302
|
-
has_next: Joi.boolean(),
|
|
1303
|
-
|
|
1304
|
-
current: Joi.number(),
|
|
1305
|
-
|
|
1306
|
-
type: Joi.string().allow("").required(),
|
|
1307
|
-
|
|
1308
|
-
size: Joi.number(),
|
|
853
|
+
country_code: Joi.string().allow(""),
|
|
854
|
+
message: Joi.string().allow(""),
|
|
855
|
+
mobile: Joi.string().allow(""),
|
|
856
|
+
success: Joi.boolean(),
|
|
1309
857
|
});
|
|
1310
858
|
}
|
|
1311
859
|
}
|