@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
|
@@ -2,6 +2,23 @@ export = Webhook;
|
|
|
2
2
|
declare class Webhook {
|
|
3
3
|
constructor(config: any);
|
|
4
4
|
config: any;
|
|
5
|
+
/**
|
|
6
|
+
* @param {Object} arg - Arg object.
|
|
7
|
+
* @returns {Promise<EventConfigResponse>} - Success response
|
|
8
|
+
* @summary:
|
|
9
|
+
* @description: Get All Webhook Events
|
|
10
|
+
*/
|
|
11
|
+
fetchAllEventConfigurations({}?: any): Promise<EventConfigResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* @param {Object} arg - Arg object.
|
|
14
|
+
* @param {number} arg.subscriberId - Subscriber ID
|
|
15
|
+
* @returns {Promise<SubscriberResponse>} - Success response
|
|
16
|
+
* @summary: Get Subscriber By Subscriber ID
|
|
17
|
+
* @description: Get Subscriber By Subscriber ID
|
|
18
|
+
*/
|
|
19
|
+
getSubscriberById({ subscriberId }?: {
|
|
20
|
+
subscriberId: number;
|
|
21
|
+
}): Promise<SubscriberResponse>;
|
|
5
22
|
/**
|
|
6
23
|
* @param {Object} arg - Arg object.
|
|
7
24
|
* @param {number} [arg.pageNo] - Page Number
|
|
@@ -16,26 +33,6 @@ declare class Webhook {
|
|
|
16
33
|
pageSize?: number;
|
|
17
34
|
extensionId?: string;
|
|
18
35
|
}): Promise<SubscriberResponse>;
|
|
19
|
-
/**
|
|
20
|
-
* @param {Object} arg - Arg object.
|
|
21
|
-
* @param {SubscriberConfig} arg.body
|
|
22
|
-
* @returns {Promise<SubscriberConfig>} - Success response
|
|
23
|
-
* @summary: Register Subscriber
|
|
24
|
-
* @description: Register Subscriber
|
|
25
|
-
*/
|
|
26
|
-
registerSubscriberToEvent({ body }?: {
|
|
27
|
-
body: SubscriberConfig;
|
|
28
|
-
}): Promise<SubscriberConfig>;
|
|
29
|
-
/**
|
|
30
|
-
* @param {Object} arg - Arg object.
|
|
31
|
-
* @param {SubscriberConfig} arg.body
|
|
32
|
-
* @returns {Promise<SubscriberConfig>} - Success response
|
|
33
|
-
* @summary: Update Subscriber
|
|
34
|
-
* @description: Update Subscriber
|
|
35
|
-
*/
|
|
36
|
-
updateSubscriberConfig({ body }?: {
|
|
37
|
-
body: SubscriberConfig;
|
|
38
|
-
}): Promise<SubscriberConfig>;
|
|
39
36
|
/**
|
|
40
37
|
* @param {Object} arg - Arg object.
|
|
41
38
|
* @param {number} [arg.pageNo] - Page Number
|
|
@@ -52,19 +49,22 @@ declare class Webhook {
|
|
|
52
49
|
}): Promise<SubscriberConfigList>;
|
|
53
50
|
/**
|
|
54
51
|
* @param {Object} arg - Arg object.
|
|
55
|
-
* @param {
|
|
56
|
-
* @returns {Promise<
|
|
57
|
-
* @summary:
|
|
58
|
-
* @description:
|
|
52
|
+
* @param {SubscriberConfig} arg.body
|
|
53
|
+
* @returns {Promise<SubscriberConfig>} - Success response
|
|
54
|
+
* @summary: Register Subscriber
|
|
55
|
+
* @description: Register Subscriber
|
|
59
56
|
*/
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}): Promise<
|
|
57
|
+
registerSubscriberToEvent({ body }?: {
|
|
58
|
+
body: SubscriberConfig;
|
|
59
|
+
}): Promise<SubscriberConfig>;
|
|
63
60
|
/**
|
|
64
61
|
* @param {Object} arg - Arg object.
|
|
65
|
-
* @
|
|
66
|
-
* @
|
|
67
|
-
* @
|
|
62
|
+
* @param {SubscriberConfig} arg.body
|
|
63
|
+
* @returns {Promise<SubscriberConfig>} - Success response
|
|
64
|
+
* @summary: Update Subscriber
|
|
65
|
+
* @description: Update Subscriber
|
|
68
66
|
*/
|
|
69
|
-
|
|
67
|
+
updateSubscriberConfig({ body }?: {
|
|
68
|
+
body: SubscriberConfig;
|
|
69
|
+
}): Promise<SubscriberConfig>;
|
|
70
70
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
const Paginator = require("../../common/Paginator");
|
|
2
|
-
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
3
1
|
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
2
|
+
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
3
|
+
const Paginator = require("../../common/Paginator");
|
|
4
4
|
const WebhookValidator = require("./WebhookPlatformValidator");
|
|
5
5
|
const WebhookModel = require("./WebhookPlatformModel");
|
|
6
6
|
const { Logger } = require("./../../common/Logger");
|
|
7
|
+
const Joi = require("joi");
|
|
7
8
|
|
|
8
9
|
class Webhook {
|
|
9
10
|
constructor(config) {
|
|
@@ -12,20 +13,13 @@ class Webhook {
|
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* @param {Object} arg - Arg object.
|
|
15
|
-
* @
|
|
16
|
-
* @
|
|
17
|
-
* @
|
|
18
|
-
* @returns {Promise<SubscriberResponse>} - Success response
|
|
19
|
-
* @summary: Get Subscribers By Company ID
|
|
20
|
-
* @description: Get Subscribers By CompanyId
|
|
16
|
+
* @returns {Promise<EventConfigResponse>} - Success response
|
|
17
|
+
* @summary:
|
|
18
|
+
* @description: Get All Webhook Events
|
|
21
19
|
*/
|
|
22
|
-
async
|
|
23
|
-
const { error } = WebhookValidator.
|
|
24
|
-
{
|
|
25
|
-
pageNo,
|
|
26
|
-
pageSize,
|
|
27
|
-
extensionId,
|
|
28
|
-
},
|
|
20
|
+
async fetchAllEventConfigurations({} = {}) {
|
|
21
|
+
const { error } = WebhookValidator.fetchAllEventConfigurations().validate(
|
|
22
|
+
{},
|
|
29
23
|
{ abortEarly: false, allowUnknown: true }
|
|
30
24
|
);
|
|
31
25
|
if (error) {
|
|
@@ -35,33 +29,27 @@ class Webhook {
|
|
|
35
29
|
// Showing warrnings if extra unknown parameters are found
|
|
36
30
|
const {
|
|
37
31
|
error: warrning,
|
|
38
|
-
} = WebhookValidator.
|
|
39
|
-
{
|
|
40
|
-
pageNo,
|
|
41
|
-
pageSize,
|
|
42
|
-
extensionId,
|
|
43
|
-
},
|
|
32
|
+
} = WebhookValidator.fetchAllEventConfigurations().validate(
|
|
33
|
+
{},
|
|
44
34
|
{ abortEarly: false, allowUnknown: false }
|
|
45
35
|
);
|
|
46
36
|
if (warrning) {
|
|
47
37
|
Logger({
|
|
48
38
|
level: "WARN",
|
|
49
|
-
message:
|
|
39
|
+
message:
|
|
40
|
+
"Parameter Validation warrnings for fetchAllEventConfigurations",
|
|
50
41
|
});
|
|
51
42
|
Logger({ level: "WARN", message: warrning });
|
|
52
43
|
}
|
|
53
44
|
|
|
54
45
|
const query_params = {};
|
|
55
|
-
query_params["page_no"] = pageNo;
|
|
56
|
-
query_params["page_size"] = pageSize;
|
|
57
|
-
query_params["extension_id"] = extensionId;
|
|
58
46
|
|
|
59
47
|
const xHeaders = {};
|
|
60
48
|
|
|
61
49
|
const response = await PlatformAPIClient.execute(
|
|
62
50
|
this.config,
|
|
63
51
|
"get",
|
|
64
|
-
`/service/platform/webhook/v1.0/company/${this.config.companyId}/
|
|
52
|
+
`/service/platform/webhook/v1.0/company/${this.config.companyId}/events`,
|
|
65
53
|
query_params,
|
|
66
54
|
undefined,
|
|
67
55
|
xHeaders
|
|
@@ -69,7 +57,7 @@ class Webhook {
|
|
|
69
57
|
|
|
70
58
|
const {
|
|
71
59
|
error: res_error,
|
|
72
|
-
} = WebhookModel.
|
|
60
|
+
} = WebhookModel.EventConfigResponse().validate(response, {
|
|
73
61
|
abortEarly: false,
|
|
74
62
|
allowUnknown: false,
|
|
75
63
|
});
|
|
@@ -77,7 +65,8 @@ class Webhook {
|
|
|
77
65
|
if (res_error) {
|
|
78
66
|
Logger({
|
|
79
67
|
level: "WARN",
|
|
80
|
-
message:
|
|
68
|
+
message:
|
|
69
|
+
"Response Validation Warnnings for fetchAllEventConfigurations",
|
|
81
70
|
});
|
|
82
71
|
Logger({ level: "WARN", message: res_error });
|
|
83
72
|
}
|
|
@@ -87,15 +76,15 @@ class Webhook {
|
|
|
87
76
|
|
|
88
77
|
/**
|
|
89
78
|
* @param {Object} arg - Arg object.
|
|
90
|
-
* @param {
|
|
91
|
-
* @returns {Promise<
|
|
92
|
-
* @summary:
|
|
93
|
-
* @description:
|
|
79
|
+
* @param {number} arg.subscriberId - Subscriber ID
|
|
80
|
+
* @returns {Promise<SubscriberResponse>} - Success response
|
|
81
|
+
* @summary: Get Subscriber By Subscriber ID
|
|
82
|
+
* @description: Get Subscriber By Subscriber ID
|
|
94
83
|
*/
|
|
95
|
-
async
|
|
96
|
-
const { error } = WebhookValidator.
|
|
84
|
+
async getSubscriberById({ subscriberId } = {}) {
|
|
85
|
+
const { error } = WebhookValidator.getSubscriberById().validate(
|
|
97
86
|
{
|
|
98
|
-
|
|
87
|
+
subscriberId,
|
|
99
88
|
},
|
|
100
89
|
{ abortEarly: false, allowUnknown: true }
|
|
101
90
|
);
|
|
@@ -104,18 +93,16 @@ class Webhook {
|
|
|
104
93
|
}
|
|
105
94
|
|
|
106
95
|
// Showing warrnings if extra unknown parameters are found
|
|
107
|
-
const {
|
|
108
|
-
error: warrning,
|
|
109
|
-
} = WebhookValidator.registerSubscriberToEvent().validate(
|
|
96
|
+
const { error: warrning } = WebhookValidator.getSubscriberById().validate(
|
|
110
97
|
{
|
|
111
|
-
|
|
98
|
+
subscriberId,
|
|
112
99
|
},
|
|
113
100
|
{ abortEarly: false, allowUnknown: false }
|
|
114
101
|
);
|
|
115
102
|
if (warrning) {
|
|
116
103
|
Logger({
|
|
117
104
|
level: "WARN",
|
|
118
|
-
message: "Parameter Validation warrnings for
|
|
105
|
+
message: "Parameter Validation warrnings for getSubscriberById",
|
|
119
106
|
});
|
|
120
107
|
Logger({ level: "WARN", message: warrning });
|
|
121
108
|
}
|
|
@@ -126,16 +113,16 @@ class Webhook {
|
|
|
126
113
|
|
|
127
114
|
const response = await PlatformAPIClient.execute(
|
|
128
115
|
this.config,
|
|
129
|
-
"
|
|
130
|
-
`/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber`,
|
|
116
|
+
"get",
|
|
117
|
+
`/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber/${subscriberId}`,
|
|
131
118
|
query_params,
|
|
132
|
-
|
|
119
|
+
undefined,
|
|
133
120
|
xHeaders
|
|
134
121
|
);
|
|
135
122
|
|
|
136
123
|
const {
|
|
137
124
|
error: res_error,
|
|
138
|
-
} = WebhookModel.
|
|
125
|
+
} = WebhookModel.SubscriberResponse().validate(response, {
|
|
139
126
|
abortEarly: false,
|
|
140
127
|
allowUnknown: false,
|
|
141
128
|
});
|
|
@@ -143,7 +130,7 @@ class Webhook {
|
|
|
143
130
|
if (res_error) {
|
|
144
131
|
Logger({
|
|
145
132
|
level: "WARN",
|
|
146
|
-
message: "Response Validation Warnnings for
|
|
133
|
+
message: "Response Validation Warnnings for getSubscriberById",
|
|
147
134
|
});
|
|
148
135
|
Logger({ level: "WARN", message: res_error });
|
|
149
136
|
}
|
|
@@ -153,15 +140,19 @@ class Webhook {
|
|
|
153
140
|
|
|
154
141
|
/**
|
|
155
142
|
* @param {Object} arg - Arg object.
|
|
156
|
-
* @param {
|
|
157
|
-
* @
|
|
158
|
-
* @
|
|
159
|
-
* @
|
|
143
|
+
* @param {number} [arg.pageNo] - Page Number
|
|
144
|
+
* @param {number} [arg.pageSize] - Page Size
|
|
145
|
+
* @param {string} [arg.extensionId] - Extension ID
|
|
146
|
+
* @returns {Promise<SubscriberResponse>} - Success response
|
|
147
|
+
* @summary: Get Subscribers By Company ID
|
|
148
|
+
* @description: Get Subscribers By CompanyId
|
|
160
149
|
*/
|
|
161
|
-
async
|
|
162
|
-
const { error } = WebhookValidator.
|
|
150
|
+
async getSubscribersByCompany({ pageNo, pageSize, extensionId } = {}) {
|
|
151
|
+
const { error } = WebhookValidator.getSubscribersByCompany().validate(
|
|
163
152
|
{
|
|
164
|
-
|
|
153
|
+
pageNo,
|
|
154
|
+
pageSize,
|
|
155
|
+
extensionId,
|
|
165
156
|
},
|
|
166
157
|
{ abortEarly: false, allowUnknown: true }
|
|
167
158
|
);
|
|
@@ -172,36 +163,41 @@ class Webhook {
|
|
|
172
163
|
// Showing warrnings if extra unknown parameters are found
|
|
173
164
|
const {
|
|
174
165
|
error: warrning,
|
|
175
|
-
} = WebhookValidator.
|
|
166
|
+
} = WebhookValidator.getSubscribersByCompany().validate(
|
|
176
167
|
{
|
|
177
|
-
|
|
168
|
+
pageNo,
|
|
169
|
+
pageSize,
|
|
170
|
+
extensionId,
|
|
178
171
|
},
|
|
179
172
|
{ abortEarly: false, allowUnknown: false }
|
|
180
173
|
);
|
|
181
174
|
if (warrning) {
|
|
182
175
|
Logger({
|
|
183
176
|
level: "WARN",
|
|
184
|
-
message: "Parameter Validation warrnings for
|
|
177
|
+
message: "Parameter Validation warrnings for getSubscribersByCompany",
|
|
185
178
|
});
|
|
186
179
|
Logger({ level: "WARN", message: warrning });
|
|
187
180
|
}
|
|
188
181
|
|
|
189
182
|
const query_params = {};
|
|
183
|
+
query_params["page_no"] = pageNo;
|
|
184
|
+
query_params["page_size"] = pageSize;
|
|
185
|
+
query_params["extension_id"] = extensionId;
|
|
190
186
|
|
|
191
187
|
const xHeaders = {};
|
|
192
188
|
|
|
193
189
|
const response = await PlatformAPIClient.execute(
|
|
194
190
|
this.config,
|
|
195
|
-
"
|
|
191
|
+
"get",
|
|
196
192
|
`/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber`,
|
|
197
193
|
query_params,
|
|
198
|
-
|
|
194
|
+
undefined,
|
|
199
195
|
xHeaders
|
|
200
196
|
);
|
|
201
197
|
|
|
202
198
|
const {
|
|
203
199
|
error: res_error,
|
|
204
|
-
} = WebhookModel.
|
|
200
|
+
} = WebhookModel.SubscriberResponse().validate(response, {
|
|
205
201
|
abortEarly: false,
|
|
206
202
|
allowUnknown: false,
|
|
207
203
|
});
|
|
@@ -209,7 +205,7 @@ class Webhook {
|
|
|
209
205
|
if (res_error) {
|
|
210
206
|
Logger({
|
|
211
207
|
level: "WARN",
|
|
212
|
-
message: "Response Validation Warnnings for
|
|
208
|
+
message: "Response Validation Warnnings for getSubscribersByCompany",
|
|
213
209
|
});
|
|
214
210
|
Logger({ level: "WARN", message: res_error });
|
|
215
211
|
}
|
|
@@ -295,15 +291,15 @@ class Webhook {
|
|
|
295
291
|
|
|
296
292
|
/**
|
|
297
293
|
* @param {Object} arg - Arg object.
|
|
298
|
-
* @param {
|
|
299
|
-
* @returns {Promise<
|
|
300
|
-
* @summary:
|
|
301
|
-
* @description:
|
|
294
|
+
* @param {SubscriberConfig} arg.body
|
|
295
|
+
* @returns {Promise<SubscriberConfig>} - Success response
|
|
296
|
+
* @summary: Register Subscriber
|
|
297
|
+
* @description: Register Subscriber
|
|
302
298
|
*/
|
|
303
|
-
async
|
|
304
|
-
const { error } = WebhookValidator.
|
|
299
|
+
async registerSubscriberToEvent({ body } = {}) {
|
|
300
|
+
const { error } = WebhookValidator.registerSubscriberToEvent().validate(
|
|
305
301
|
{
|
|
306
|
-
|
|
302
|
+
body,
|
|
307
303
|
},
|
|
308
304
|
{ abortEarly: false, allowUnknown: true }
|
|
309
305
|
);
|
|
@@ -312,16 +308,18 @@ class Webhook {
|
|
|
312
308
|
}
|
|
313
309
|
|
|
314
310
|
// Showing warrnings if extra unknown parameters are found
|
|
315
|
-
const {
|
|
311
|
+
const {
|
|
312
|
+
error: warrning,
|
|
313
|
+
} = WebhookValidator.registerSubscriberToEvent().validate(
|
|
316
314
|
{
|
|
317
|
-
|
|
315
|
+
body,
|
|
318
316
|
},
|
|
319
317
|
{ abortEarly: false, allowUnknown: false }
|
|
320
318
|
);
|
|
321
319
|
if (warrning) {
|
|
322
320
|
Logger({
|
|
323
321
|
level: "WARN",
|
|
324
|
-
message: "Parameter Validation warrnings for
|
|
322
|
+
message: "Parameter Validation warrnings for registerSubscriberToEvent",
|
|
325
323
|
});
|
|
326
324
|
Logger({ level: "WARN", message: warrning });
|
|
327
325
|
}
|
|
@@ -332,16 +330,16 @@ class Webhook {
|
|
|
332
330
|
|
|
333
331
|
const response = await PlatformAPIClient.execute(
|
|
334
332
|
this.config,
|
|
335
|
-
"
|
|
336
|
-
`/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber
|
|
333
|
+
"post",
|
|
334
|
+
`/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber`,
|
|
337
335
|
query_params,
|
|
338
|
-
|
|
336
|
+
body,
|
|
339
337
|
xHeaders
|
|
340
338
|
);
|
|
341
339
|
|
|
342
340
|
const {
|
|
343
341
|
error: res_error,
|
|
344
|
-
} = WebhookModel.
|
|
342
|
+
} = WebhookModel.SubscriberConfig().validate(response, {
|
|
345
343
|
abortEarly: false,
|
|
346
344
|
allowUnknown: false,
|
|
347
345
|
});
|
|
@@ -349,7 +347,7 @@ class Webhook {
|
|
|
349
347
|
if (res_error) {
|
|
350
348
|
Logger({
|
|
351
349
|
level: "WARN",
|
|
352
|
-
message: "Response Validation Warnnings for
|
|
350
|
+
message: "Response Validation Warnnings for registerSubscriberToEvent",
|
|
353
351
|
});
|
|
354
352
|
Logger({ level: "WARN", message: res_error });
|
|
355
353
|
}
|
|
@@ -359,13 +357,16 @@ class Webhook {
|
|
|
359
357
|
|
|
360
358
|
/**
|
|
361
359
|
* @param {Object} arg - Arg object.
|
|
362
|
-
* @
|
|
363
|
-
* @
|
|
364
|
-
* @
|
|
360
|
+
* @param {SubscriberConfig} arg.body
|
|
361
|
+
* @returns {Promise<SubscriberConfig>} - Success response
|
|
362
|
+
* @summary: Update Subscriber
|
|
363
|
+
* @description: Update Subscriber
|
|
365
364
|
*/
|
|
366
|
-
async
|
|
367
|
-
const { error } = WebhookValidator.
|
|
368
|
-
{
|
|
365
|
+
async updateSubscriberConfig({ body } = {}) {
|
|
366
|
+
const { error } = WebhookValidator.updateSubscriberConfig().validate(
|
|
367
|
+
{
|
|
368
|
+
body,
|
|
369
|
+
},
|
|
369
370
|
{ abortEarly: false, allowUnknown: true }
|
|
370
371
|
);
|
|
371
372
|
if (error) {
|
|
@@ -375,15 +376,16 @@ class Webhook {
|
|
|
375
376
|
// Showing warrnings if extra unknown parameters are found
|
|
376
377
|
const {
|
|
377
378
|
error: warrning,
|
|
378
|
-
} = WebhookValidator.
|
|
379
|
-
{
|
|
379
|
+
} = WebhookValidator.updateSubscriberConfig().validate(
|
|
380
|
+
{
|
|
381
|
+
body,
|
|
382
|
+
},
|
|
380
383
|
{ abortEarly: false, allowUnknown: false }
|
|
381
384
|
);
|
|
382
385
|
if (warrning) {
|
|
383
386
|
Logger({
|
|
384
387
|
level: "WARN",
|
|
385
|
-
message:
|
|
386
|
-
"Parameter Validation warrnings for fetchAllEventConfigurations",
|
|
388
|
+
message: "Parameter Validation warrnings for updateSubscriberConfig",
|
|
387
389
|
});
|
|
388
390
|
Logger({ level: "WARN", message: warrning });
|
|
389
391
|
}
|
|
@@ -394,16 +396,16 @@ class Webhook {
|
|
|
394
396
|
|
|
395
397
|
const response = await PlatformAPIClient.execute(
|
|
396
398
|
this.config,
|
|
397
|
-
"
|
|
398
|
-
`/service/platform/webhook/v1.0/company/${this.config.companyId}/
|
|
399
|
+
"put",
|
|
400
|
+
`/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber`,
|
|
399
401
|
query_params,
|
|
400
|
-
|
|
402
|
+
body,
|
|
401
403
|
xHeaders
|
|
402
404
|
);
|
|
403
405
|
|
|
404
406
|
const {
|
|
405
407
|
error: res_error,
|
|
406
|
-
} = WebhookModel.
|
|
408
|
+
} = WebhookModel.SubscriberConfig().validate(response, {
|
|
407
409
|
abortEarly: false,
|
|
408
410
|
allowUnknown: false,
|
|
409
411
|
});
|
|
@@ -411,8 +413,7 @@ class Webhook {
|
|
|
411
413
|
if (res_error) {
|
|
412
414
|
Logger({
|
|
413
415
|
level: "WARN",
|
|
414
|
-
message:
|
|
415
|
-
"Response Validation Warnnings for fetchAllEventConfigurations",
|
|
416
|
+
message: "Response Validation Warnnings for updateSubscriberConfig",
|
|
416
417
|
});
|
|
417
418
|
Logger({ level: "WARN", message: res_error });
|
|
418
419
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export = WebhookModel;
|
|
2
2
|
declare class WebhookModel {
|
|
3
|
+
static Association(): any;
|
|
4
|
+
static AuthMeta(): any;
|
|
3
5
|
static EventConfig(): any;
|
|
6
|
+
static EventConfigBase(): any;
|
|
4
7
|
static EventConfigList(): any;
|
|
5
8
|
static EventConfigResponse(): any;
|
|
6
|
-
static SubscriberConfigList(): any;
|
|
7
|
-
static Page(): any;
|
|
8
|
-
static EventProcessedStatus(): any;
|
|
9
9
|
static EventPayload(): any;
|
|
10
|
+
static EventProcessedStatus(): any;
|
|
11
|
+
static Page(): any;
|
|
10
12
|
static SubscriberConfig(): any;
|
|
11
|
-
static
|
|
13
|
+
static SubscriberConfigList(): any;
|
|
12
14
|
static SubscriberEvent(): any;
|
|
13
|
-
static
|
|
14
|
-
static Association(): any;
|
|
15
|
-
static EventConfigBase(): any;
|
|
15
|
+
static SubscriberResponse(): any;
|
|
16
16
|
static SubscriberStatus(): any;
|
|
17
17
|
}
|