@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,25 +1,26 @@
|
|
|
1
|
-
const
|
|
1
|
+
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
2
|
+
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
2
3
|
const constructUrl = require("../constructUrl");
|
|
3
4
|
const Paginator = require("../../common/Paginator");
|
|
4
|
-
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
5
5
|
const RewardsValidator = require("./RewardsApplicationValidator");
|
|
6
6
|
const RewardsModel = require("./RewardsApplicationModel");
|
|
7
7
|
const { Logger } = require("./../../common/Logger");
|
|
8
|
+
const Joi = require("joi");
|
|
8
9
|
|
|
9
10
|
class Rewards {
|
|
10
11
|
constructor(_conf) {
|
|
11
12
|
this._conf = _conf;
|
|
12
13
|
this._relativeUrls = {
|
|
13
|
-
getOfferByName: "/service/application/rewards/v1.0/offers/{name}/",
|
|
14
14
|
catalogueOrder:
|
|
15
15
|
"/service/application/rewards/v1.0/catalogue/offer/order/",
|
|
16
|
+
getOfferByName: "/service/application/rewards/v1.0/offers/{name}/",
|
|
17
|
+
getOrderDiscount:
|
|
18
|
+
"/service/application/rewards/v1.0/user/offer/order-discount/",
|
|
19
|
+
getUserPoints: "/service/application/rewards/v1.0/user/points/",
|
|
16
20
|
getUserPointsHistory:
|
|
17
21
|
"/service/application/rewards/v1.0/user/points/history/",
|
|
18
|
-
getUserPoints: "/service/application/rewards/v1.0/user/points/",
|
|
19
22
|
getUserReferralDetails:
|
|
20
23
|
"/service/application/rewards/v1.0/user/referral/",
|
|
21
|
-
getOrderDiscount:
|
|
22
|
-
"/service/application/rewards/v1.0/user/offer/order-discount/",
|
|
23
24
|
redeemReferralCode:
|
|
24
25
|
"/service/application/rewards/v1.0/user/referral/redeem/",
|
|
25
26
|
};
|
|
@@ -41,14 +42,14 @@ class Rewards {
|
|
|
41
42
|
|
|
42
43
|
/**
|
|
43
44
|
* @param {Object} arg - Arg object.
|
|
44
|
-
* @param {
|
|
45
|
-
* @returns {Promise<
|
|
46
|
-
* @summary: Get
|
|
47
|
-
* @description: Use this API to
|
|
45
|
+
* @param {CatalogueOrderRequest} arg.body
|
|
46
|
+
* @returns {Promise<CatalogueOrderResponse>} - Success response
|
|
47
|
+
* @summary: Get all transactions of reward points
|
|
48
|
+
* @description: Use this API to evaluate the amount of reward points that could be earned on any catalogue product.
|
|
48
49
|
*/
|
|
49
|
-
async
|
|
50
|
-
const { error } = RewardsValidator.
|
|
51
|
-
{
|
|
50
|
+
async catalogueOrder({ body } = {}) {
|
|
51
|
+
const { error } = RewardsValidator.catalogueOrder().validate(
|
|
52
|
+
{ body },
|
|
52
53
|
{ abortEarly: false, allowUnknown: true }
|
|
53
54
|
);
|
|
54
55
|
if (error) {
|
|
@@ -56,14 +57,14 @@ class Rewards {
|
|
|
56
57
|
}
|
|
57
58
|
|
|
58
59
|
// Showing warrnings if extra unknown parameters are found
|
|
59
|
-
const { error: warrning } = RewardsValidator.
|
|
60
|
-
{
|
|
60
|
+
const { error: warrning } = RewardsValidator.catalogueOrder().validate(
|
|
61
|
+
{ body },
|
|
61
62
|
{ abortEarly: false, allowUnknown: false }
|
|
62
63
|
);
|
|
63
64
|
if (warrning) {
|
|
64
65
|
Logger({
|
|
65
66
|
level: "WARN",
|
|
66
|
-
message: "Parameter Validation warrnings for
|
|
67
|
+
message: "Parameter Validation warrnings for catalogueOrder",
|
|
67
68
|
});
|
|
68
69
|
Logger({ level: "WARN", message: warrning });
|
|
69
70
|
}
|
|
@@ -72,19 +73,21 @@ class Rewards {
|
|
|
72
73
|
|
|
73
74
|
const xHeaders = {};
|
|
74
75
|
|
|
75
|
-
const response = await
|
|
76
|
+
const response = await ApplicationAPIClient.execute(
|
|
76
77
|
this._conf,
|
|
77
|
-
"
|
|
78
|
+
"post",
|
|
78
79
|
constructUrl({
|
|
79
|
-
url: this._urls["
|
|
80
|
-
params: {
|
|
80
|
+
url: this._urls["catalogueOrder"],
|
|
81
|
+
params: {},
|
|
81
82
|
}),
|
|
82
83
|
query_params,
|
|
83
|
-
|
|
84
|
+
body,
|
|
84
85
|
xHeaders
|
|
85
86
|
);
|
|
86
87
|
|
|
87
|
-
const {
|
|
88
|
+
const {
|
|
89
|
+
error: res_error,
|
|
90
|
+
} = RewardsModel.CatalogueOrderResponse().validate(response, {
|
|
88
91
|
abortEarly: false,
|
|
89
92
|
allowUnknown: false,
|
|
90
93
|
});
|
|
@@ -92,7 +95,7 @@ class Rewards {
|
|
|
92
95
|
if (res_error) {
|
|
93
96
|
Logger({
|
|
94
97
|
level: "WARN",
|
|
95
|
-
message: "Response Validation Warnnings for
|
|
98
|
+
message: "Response Validation Warnnings for catalogueOrder",
|
|
96
99
|
});
|
|
97
100
|
Logger({ level: "WARN", message: res_error });
|
|
98
101
|
}
|
|
@@ -102,14 +105,14 @@ class Rewards {
|
|
|
102
105
|
|
|
103
106
|
/**
|
|
104
107
|
* @param {Object} arg - Arg object.
|
|
105
|
-
* @param {
|
|
106
|
-
* @returns {Promise<
|
|
107
|
-
* @summary: Get
|
|
108
|
-
* @description: Use this API to
|
|
108
|
+
* @param {string} arg.name - The name given to the offer.
|
|
109
|
+
* @returns {Promise<Offer>} - Success response
|
|
110
|
+
* @summary: Get offer by name
|
|
111
|
+
* @description: Use this API to get the offer details and configuration by entering the name of the offer.
|
|
109
112
|
*/
|
|
110
|
-
async
|
|
111
|
-
const { error } = RewardsValidator.
|
|
112
|
-
{
|
|
113
|
+
async getOfferByName({ name } = {}) {
|
|
114
|
+
const { error } = RewardsValidator.getOfferByName().validate(
|
|
115
|
+
{ name },
|
|
113
116
|
{ abortEarly: false, allowUnknown: true }
|
|
114
117
|
);
|
|
115
118
|
if (error) {
|
|
@@ -117,14 +120,14 @@ class Rewards {
|
|
|
117
120
|
}
|
|
118
121
|
|
|
119
122
|
// Showing warrnings if extra unknown parameters are found
|
|
120
|
-
const { error: warrning } = RewardsValidator.
|
|
121
|
-
{
|
|
123
|
+
const { error: warrning } = RewardsValidator.getOfferByName().validate(
|
|
124
|
+
{ name },
|
|
122
125
|
{ abortEarly: false, allowUnknown: false }
|
|
123
126
|
);
|
|
124
127
|
if (warrning) {
|
|
125
128
|
Logger({
|
|
126
129
|
level: "WARN",
|
|
127
|
-
message: "Parameter Validation warrnings for
|
|
130
|
+
message: "Parameter Validation warrnings for getOfferByName",
|
|
128
131
|
});
|
|
129
132
|
Logger({ level: "WARN", message: warrning });
|
|
130
133
|
}
|
|
@@ -133,21 +136,19 @@ class Rewards {
|
|
|
133
136
|
|
|
134
137
|
const xHeaders = {};
|
|
135
138
|
|
|
136
|
-
const response = await
|
|
139
|
+
const response = await ApplicationAPIClient.execute(
|
|
137
140
|
this._conf,
|
|
138
|
-
"
|
|
141
|
+
"get",
|
|
139
142
|
constructUrl({
|
|
140
|
-
url: this._urls["
|
|
141
|
-
params: {},
|
|
143
|
+
url: this._urls["getOfferByName"],
|
|
144
|
+
params: { name },
|
|
142
145
|
}),
|
|
143
146
|
query_params,
|
|
144
|
-
|
|
147
|
+
undefined,
|
|
145
148
|
xHeaders
|
|
146
149
|
);
|
|
147
150
|
|
|
148
|
-
const {
|
|
149
|
-
error: res_error,
|
|
150
|
-
} = RewardsModel.CatalogueOrderResponse().validate(response, {
|
|
151
|
+
const { error: res_error } = RewardsModel.Offer().validate(response, {
|
|
151
152
|
abortEarly: false,
|
|
152
153
|
allowUnknown: false,
|
|
153
154
|
});
|
|
@@ -155,7 +156,7 @@ class Rewards {
|
|
|
155
156
|
if (res_error) {
|
|
156
157
|
Logger({
|
|
157
158
|
level: "WARN",
|
|
158
|
-
message: "Response Validation Warnnings for
|
|
159
|
+
message: "Response Validation Warnnings for getOfferByName",
|
|
159
160
|
});
|
|
160
161
|
Logger({ level: "WARN", message: res_error });
|
|
161
162
|
}
|
|
@@ -165,16 +166,14 @@ class Rewards {
|
|
|
165
166
|
|
|
166
167
|
/**
|
|
167
168
|
* @param {Object} arg - Arg object.
|
|
168
|
-
* @param {
|
|
169
|
-
*
|
|
170
|
-
* @
|
|
171
|
-
* @
|
|
172
|
-
* @summary: Get all transactions of reward points
|
|
173
|
-
* @description: Use this API to get a list of points transactions.
|
|
169
|
+
* @param {OrderDiscountRequest} arg.body
|
|
170
|
+
* @returns {Promise<OrderDiscountResponse>} - Success response
|
|
171
|
+
* @summary: Calculates the discount on order-amount
|
|
172
|
+
* @description: Use this API to calculate the discount on order-amount based on all the amount range configured in order_discount.
|
|
174
173
|
*/
|
|
175
|
-
async
|
|
176
|
-
const { error } = RewardsValidator.
|
|
177
|
-
{
|
|
174
|
+
async getOrderDiscount({ body } = {}) {
|
|
175
|
+
const { error } = RewardsValidator.getOrderDiscount().validate(
|
|
176
|
+
{ body },
|
|
178
177
|
{ abortEarly: false, allowUnknown: true }
|
|
179
178
|
);
|
|
180
179
|
if (error) {
|
|
@@ -182,41 +181,37 @@ class Rewards {
|
|
|
182
181
|
}
|
|
183
182
|
|
|
184
183
|
// Showing warrnings if extra unknown parameters are found
|
|
185
|
-
const {
|
|
186
|
-
|
|
187
|
-
} = RewardsValidator.getUserPointsHistory().validate(
|
|
188
|
-
{ pageId, pageSize },
|
|
184
|
+
const { error: warrning } = RewardsValidator.getOrderDiscount().validate(
|
|
185
|
+
{ body },
|
|
189
186
|
{ abortEarly: false, allowUnknown: false }
|
|
190
187
|
);
|
|
191
188
|
if (warrning) {
|
|
192
189
|
Logger({
|
|
193
190
|
level: "WARN",
|
|
194
|
-
message: "Parameter Validation warrnings for
|
|
191
|
+
message: "Parameter Validation warrnings for getOrderDiscount",
|
|
195
192
|
});
|
|
196
193
|
Logger({ level: "WARN", message: warrning });
|
|
197
194
|
}
|
|
198
195
|
|
|
199
196
|
const query_params = {};
|
|
200
|
-
query_params["page_id"] = pageId;
|
|
201
|
-
query_params["page_size"] = pageSize;
|
|
202
197
|
|
|
203
198
|
const xHeaders = {};
|
|
204
199
|
|
|
205
|
-
const response = await
|
|
200
|
+
const response = await ApplicationAPIClient.execute(
|
|
206
201
|
this._conf,
|
|
207
|
-
"
|
|
202
|
+
"post",
|
|
208
203
|
constructUrl({
|
|
209
|
-
url: this._urls["
|
|
204
|
+
url: this._urls["getOrderDiscount"],
|
|
210
205
|
params: {},
|
|
211
206
|
}),
|
|
212
207
|
query_params,
|
|
213
|
-
|
|
208
|
+
body,
|
|
214
209
|
xHeaders
|
|
215
210
|
);
|
|
216
211
|
|
|
217
212
|
const {
|
|
218
213
|
error: res_error,
|
|
219
|
-
} = RewardsModel.
|
|
214
|
+
} = RewardsModel.OrderDiscountResponse().validate(response, {
|
|
220
215
|
abortEarly: false,
|
|
221
216
|
allowUnknown: false,
|
|
222
217
|
});
|
|
@@ -224,7 +219,7 @@ class Rewards {
|
|
|
224
219
|
if (res_error) {
|
|
225
220
|
Logger({
|
|
226
221
|
level: "WARN",
|
|
227
|
-
message: "Response Validation Warnnings for
|
|
222
|
+
message: "Response Validation Warnnings for getOrderDiscount",
|
|
228
223
|
});
|
|
229
224
|
Logger({ level: "WARN", message: res_error });
|
|
230
225
|
}
|
|
@@ -232,32 +227,6 @@ class Rewards {
|
|
|
232
227
|
return response;
|
|
233
228
|
}
|
|
234
229
|
|
|
235
|
-
/**
|
|
236
|
-
* @param {Object} arg - Arg object.
|
|
237
|
-
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
238
|
-
* @summary: Get all transactions of reward points
|
|
239
|
-
* @description: Use this API to get a list of points transactions.
|
|
240
|
-
*/
|
|
241
|
-
getUserPointsHistoryPaginator({ pageSize } = {}) {
|
|
242
|
-
const paginator = new Paginator();
|
|
243
|
-
const callback = async () => {
|
|
244
|
-
const pageId = paginator.nextId;
|
|
245
|
-
const pageNo = paginator.pageNo;
|
|
246
|
-
const pageType = "cursor";
|
|
247
|
-
const data = await this.getUserPointsHistory({
|
|
248
|
-
pageId: pageId,
|
|
249
|
-
pageSize: pageSize,
|
|
250
|
-
});
|
|
251
|
-
paginator.setPaginator({
|
|
252
|
-
hasNext: data.page.has_next ? true : false,
|
|
253
|
-
nextId: data.page.next_id,
|
|
254
|
-
});
|
|
255
|
-
return data;
|
|
256
|
-
};
|
|
257
|
-
paginator.setCallback(callback);
|
|
258
|
-
return paginator;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
230
|
/**
|
|
262
231
|
* @param {Object} arg - Arg object.
|
|
263
232
|
* @returns {Promise<PointsResponse>} - Success response
|
|
@@ -290,7 +259,7 @@ class Rewards {
|
|
|
290
259
|
|
|
291
260
|
const xHeaders = {};
|
|
292
261
|
|
|
293
|
-
const response = await
|
|
262
|
+
const response = await ApplicationAPIClient.execute(
|
|
294
263
|
this._conf,
|
|
295
264
|
"get",
|
|
296
265
|
constructUrl({
|
|
@@ -322,13 +291,16 @@ class Rewards {
|
|
|
322
291
|
|
|
323
292
|
/**
|
|
324
293
|
* @param {Object} arg - Arg object.
|
|
325
|
-
* @
|
|
326
|
-
*
|
|
327
|
-
* @
|
|
294
|
+
* @param {string} [arg.pageId] - PageID is the ID of the requested page.
|
|
295
|
+
* For first request it should be kept empty.
|
|
296
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
297
|
+
* @returns {Promise<PointsHistoryResponse>} - Success response
|
|
298
|
+
* @summary: Get all transactions of reward points
|
|
299
|
+
* @description: Use this API to get a list of points transactions.
|
|
328
300
|
*/
|
|
329
|
-
async
|
|
330
|
-
const { error } = RewardsValidator.
|
|
331
|
-
{},
|
|
301
|
+
async getUserPointsHistory({ pageId, pageSize } = {}) {
|
|
302
|
+
const { error } = RewardsValidator.getUserPointsHistory().validate(
|
|
303
|
+
{ pageId, pageSize },
|
|
332
304
|
{ abortEarly: false, allowUnknown: true }
|
|
333
305
|
);
|
|
334
306
|
if (error) {
|
|
@@ -338,27 +310,29 @@ class Rewards {
|
|
|
338
310
|
// Showing warrnings if extra unknown parameters are found
|
|
339
311
|
const {
|
|
340
312
|
error: warrning,
|
|
341
|
-
} = RewardsValidator.
|
|
342
|
-
{},
|
|
313
|
+
} = RewardsValidator.getUserPointsHistory().validate(
|
|
314
|
+
{ pageId, pageSize },
|
|
343
315
|
{ abortEarly: false, allowUnknown: false }
|
|
344
316
|
);
|
|
345
317
|
if (warrning) {
|
|
346
318
|
Logger({
|
|
347
319
|
level: "WARN",
|
|
348
|
-
message: "Parameter Validation warrnings for
|
|
320
|
+
message: "Parameter Validation warrnings for getUserPointsHistory",
|
|
349
321
|
});
|
|
350
322
|
Logger({ level: "WARN", message: warrning });
|
|
351
323
|
}
|
|
352
324
|
|
|
353
325
|
const query_params = {};
|
|
326
|
+
query_params["page_id"] = pageId;
|
|
327
|
+
query_params["page_size"] = pageSize;
|
|
354
328
|
|
|
355
329
|
const xHeaders = {};
|
|
356
330
|
|
|
357
|
-
const response = await
|
|
331
|
+
const response = await ApplicationAPIClient.execute(
|
|
358
332
|
this._conf,
|
|
359
333
|
"get",
|
|
360
334
|
constructUrl({
|
|
361
|
-
url: this._urls["
|
|
335
|
+
url: this._urls["getUserPointsHistory"],
|
|
362
336
|
params: {},
|
|
363
337
|
}),
|
|
364
338
|
query_params,
|
|
@@ -368,7 +342,7 @@ class Rewards {
|
|
|
368
342
|
|
|
369
343
|
const {
|
|
370
344
|
error: res_error,
|
|
371
|
-
} = RewardsModel.
|
|
345
|
+
} = RewardsModel.PointsHistoryResponse().validate(response, {
|
|
372
346
|
abortEarly: false,
|
|
373
347
|
allowUnknown: false,
|
|
374
348
|
});
|
|
@@ -376,7 +350,7 @@ class Rewards {
|
|
|
376
350
|
if (res_error) {
|
|
377
351
|
Logger({
|
|
378
352
|
level: "WARN",
|
|
379
|
-
message: "Response Validation Warnnings for
|
|
353
|
+
message: "Response Validation Warnnings for getUserPointsHistory",
|
|
380
354
|
});
|
|
381
355
|
Logger({ level: "WARN", message: res_error });
|
|
382
356
|
}
|
|
@@ -386,14 +360,39 @@ class Rewards {
|
|
|
386
360
|
|
|
387
361
|
/**
|
|
388
362
|
* @param {Object} arg - Arg object.
|
|
389
|
-
* @param {
|
|
390
|
-
* @
|
|
391
|
-
* @
|
|
392
|
-
* @description: Use this API to calculate the discount on order-amount based on all the amount range configured in order_discount.
|
|
363
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
364
|
+
* @summary: Get all transactions of reward points
|
|
365
|
+
* @description: Use this API to get a list of points transactions.
|
|
393
366
|
*/
|
|
394
|
-
|
|
395
|
-
const
|
|
396
|
-
|
|
367
|
+
getUserPointsHistoryPaginator({ pageSize } = {}) {
|
|
368
|
+
const paginator = new Paginator();
|
|
369
|
+
const callback = async () => {
|
|
370
|
+
const pageId = paginator.nextId;
|
|
371
|
+
const pageNo = paginator.pageNo;
|
|
372
|
+
const pageType = "cursor";
|
|
373
|
+
const data = await this.getUserPointsHistory({
|
|
374
|
+
pageId: pageId,
|
|
375
|
+
pageSize: pageSize,
|
|
376
|
+
});
|
|
377
|
+
paginator.setPaginator({
|
|
378
|
+
hasNext: data.page.has_next ? true : false,
|
|
379
|
+
nextId: data.page.next_id,
|
|
380
|
+
});
|
|
381
|
+
return data;
|
|
382
|
+
};
|
|
383
|
+
paginator.setCallback(callback.bind(this));
|
|
384
|
+
return paginator;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* @param {Object} arg - Arg object.
|
|
389
|
+
* @returns {Promise<ReferralDetailsResponse>} - Success response
|
|
390
|
+
* @summary: Get referral details of a user
|
|
391
|
+
* @description: Use this API to retrieve the referral details a user has configured in the application.
|
|
392
|
+
*/
|
|
393
|
+
async getUserReferralDetails({} = {}) {
|
|
394
|
+
const { error } = RewardsValidator.getUserReferralDetails().validate(
|
|
395
|
+
{},
|
|
397
396
|
{ abortEarly: false, allowUnknown: true }
|
|
398
397
|
);
|
|
399
398
|
if (error) {
|
|
@@ -401,14 +400,16 @@ class Rewards {
|
|
|
401
400
|
}
|
|
402
401
|
|
|
403
402
|
// Showing warrnings if extra unknown parameters are found
|
|
404
|
-
const {
|
|
405
|
-
|
|
403
|
+
const {
|
|
404
|
+
error: warrning,
|
|
405
|
+
} = RewardsValidator.getUserReferralDetails().validate(
|
|
406
|
+
{},
|
|
406
407
|
{ abortEarly: false, allowUnknown: false }
|
|
407
408
|
);
|
|
408
409
|
if (warrning) {
|
|
409
410
|
Logger({
|
|
410
411
|
level: "WARN",
|
|
411
|
-
message: "Parameter Validation warrnings for
|
|
412
|
+
message: "Parameter Validation warrnings for getUserReferralDetails",
|
|
412
413
|
});
|
|
413
414
|
Logger({ level: "WARN", message: warrning });
|
|
414
415
|
}
|
|
@@ -417,21 +418,21 @@ class Rewards {
|
|
|
417
418
|
|
|
418
419
|
const xHeaders = {};
|
|
419
420
|
|
|
420
|
-
const response = await
|
|
421
|
+
const response = await ApplicationAPIClient.execute(
|
|
421
422
|
this._conf,
|
|
422
|
-
"
|
|
423
|
+
"get",
|
|
423
424
|
constructUrl({
|
|
424
|
-
url: this._urls["
|
|
425
|
+
url: this._urls["getUserReferralDetails"],
|
|
425
426
|
params: {},
|
|
426
427
|
}),
|
|
427
428
|
query_params,
|
|
428
|
-
|
|
429
|
+
undefined,
|
|
429
430
|
xHeaders
|
|
430
431
|
);
|
|
431
432
|
|
|
432
433
|
const {
|
|
433
434
|
error: res_error,
|
|
434
|
-
} = RewardsModel.
|
|
435
|
+
} = RewardsModel.ReferralDetailsResponse().validate(response, {
|
|
435
436
|
abortEarly: false,
|
|
436
437
|
allowUnknown: false,
|
|
437
438
|
});
|
|
@@ -439,7 +440,7 @@ class Rewards {
|
|
|
439
440
|
if (res_error) {
|
|
440
441
|
Logger({
|
|
441
442
|
level: "WARN",
|
|
442
|
-
message: "Response Validation Warnnings for
|
|
443
|
+
message: "Response Validation Warnnings for getUserReferralDetails",
|
|
443
444
|
});
|
|
444
445
|
Logger({ level: "WARN", message: res_error });
|
|
445
446
|
}
|
|
@@ -480,7 +481,7 @@ class Rewards {
|
|
|
480
481
|
|
|
481
482
|
const xHeaders = {};
|
|
482
483
|
|
|
483
|
-
const response = await
|
|
484
|
+
const response = await ApplicationAPIClient.execute(
|
|
484
485
|
this._conf,
|
|
485
486
|
"post",
|
|
486
487
|
constructUrl({
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
export = RewardsModel;
|
|
2
2
|
declare class RewardsModel {
|
|
3
|
-
static
|
|
4
|
-
static CatalogueOrderResponse(): any;
|
|
3
|
+
static Asset(): any;
|
|
5
4
|
static CatalogueOrderRequest(): any;
|
|
6
|
-
static
|
|
7
|
-
static
|
|
8
|
-
static Offer(): any;
|
|
9
|
-
static Schedule(): any;
|
|
5
|
+
static CatalogueOrderResponse(): any;
|
|
6
|
+
static DiscountProperties(): any;
|
|
10
7
|
static Error(): any;
|
|
11
|
-
static
|
|
12
|
-
static ShareMessages(): any;
|
|
13
|
-
static ReferralDetailsResponse(): any;
|
|
8
|
+
static Offer(): any;
|
|
14
9
|
static OrderDiscountRequest(): any;
|
|
15
|
-
static OrderDiscountRuleBucket(): any;
|
|
16
|
-
static DiscountProperties(): any;
|
|
17
10
|
static OrderDiscountResponse(): any;
|
|
11
|
+
static OrderDiscountRuleBucket(): any;
|
|
12
|
+
static Page(): any;
|
|
13
|
+
static PointsHistory(): any;
|
|
14
|
+
static PointsHistoryResponse(): any;
|
|
15
|
+
static PointsResponse(): any;
|
|
18
16
|
static RedeemReferralCodeRequest(): any;
|
|
19
17
|
static RedeemReferralCodeResponse(): any;
|
|
20
|
-
static
|
|
21
|
-
static
|
|
22
|
-
static
|
|
18
|
+
static ReferralDetailsResponse(): any;
|
|
19
|
+
static ReferralDetailsUser(): any;
|
|
20
|
+
static RewardsArticle(): any;
|
|
21
|
+
static Schedule(): any;
|
|
22
|
+
static ShareMessages(): any;
|
|
23
23
|
}
|