@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,35 +1,36 @@
|
|
|
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 ConfigurationValidator = require("./ConfigurationApplicationValidator");
|
|
6
6
|
const ConfigurationModel = require("./ConfigurationApplicationModel");
|
|
7
7
|
const { Logger } = require("./../../common/Logger");
|
|
8
|
+
const Joi = require("joi");
|
|
8
9
|
|
|
9
10
|
class Configuration {
|
|
10
11
|
constructor(_conf) {
|
|
11
12
|
this._conf = _conf;
|
|
12
13
|
this._relativeUrls = {
|
|
14
|
+
getAppCurrencies: "/service/application/configuration/v1.0/currency",
|
|
15
|
+
getAppStaffList: "/service/application/configuration/v1.0/staff/list",
|
|
16
|
+
getAppStaffs: "/service/application/configuration/v1.0/staff",
|
|
13
17
|
getApplication: "/service/application/configuration/v1.0/application",
|
|
14
|
-
getOwnerInfo: "/service/application/configuration/v1.0/about",
|
|
15
18
|
getBasicDetails: "/service/application/configuration/v1.0/detail",
|
|
16
|
-
getIntegrationTokens: "/service/application/configuration/v1.0/token",
|
|
17
|
-
getOrderingStores:
|
|
18
|
-
"/service/application/configuration/v1.0/ordering-store/stores",
|
|
19
|
-
getStoreDetailById:
|
|
20
|
-
"/service/application/configuration/v1.0/ordering-store/stores/{store_id}",
|
|
21
|
-
getFeatures: "/service/application/configuration/v1.0/feature",
|
|
22
19
|
getContactInfo: "/service/application/configuration/v1.0/information",
|
|
23
20
|
getCurrencies: "/service/application/configuration/v1.0/currencies",
|
|
24
21
|
getCurrencyById: "/service/application/configuration/v1.0/currency/{id}",
|
|
25
|
-
|
|
22
|
+
getFeatures: "/service/application/configuration/v1.0/feature",
|
|
23
|
+
getIntegrationTokens: "/service/application/configuration/v1.0/token",
|
|
26
24
|
getLanguages: "/service/application/configuration/v1.0/languages",
|
|
27
25
|
getOrderingStoreCookie:
|
|
28
26
|
"/service/application/configuration/v1.0/ordering-store/select",
|
|
27
|
+
getOrderingStores:
|
|
28
|
+
"/service/application/configuration/v1.0/ordering-store/stores",
|
|
29
|
+
getOwnerInfo: "/service/application/configuration/v1.0/about",
|
|
30
|
+
getStoreDetailById:
|
|
31
|
+
"/service/application/configuration/v1.0/ordering-store/stores/{store_id}",
|
|
29
32
|
removeOrderingStoreCookie:
|
|
30
33
|
"/service/application/configuration/v1.0/ordering-store/select",
|
|
31
|
-
getAppStaffList: "/service/application/configuration/v1.0/staff/list",
|
|
32
|
-
getAppStaffs: "/service/application/configuration/v1.0/staff",
|
|
33
34
|
};
|
|
34
35
|
this._urls = Object.entries(this._relativeUrls).reduce(
|
|
35
36
|
(urls, [method, relativeUrl]) => {
|
|
@@ -49,12 +50,12 @@ class Configuration {
|
|
|
49
50
|
|
|
50
51
|
/**
|
|
51
52
|
* @param {Object} arg - Arg object.
|
|
52
|
-
* @returns {Promise<
|
|
53
|
-
* @summary: Get
|
|
54
|
-
* @description: Use this API to get
|
|
53
|
+
* @returns {Promise<AppCurrencyResponse>} - Success response
|
|
54
|
+
* @summary: Get currencies enabled in the application
|
|
55
|
+
* @description: Use this API to get a list of currencies allowed in the current application. Moreover, get the name, code, symbol, and the decimal digits of the currencies.
|
|
55
56
|
*/
|
|
56
|
-
async
|
|
57
|
-
const { error } = ConfigurationValidator.
|
|
57
|
+
async getAppCurrencies({} = {}) {
|
|
58
|
+
const { error } = ConfigurationValidator.getAppCurrencies().validate(
|
|
58
59
|
{},
|
|
59
60
|
{ abortEarly: false, allowUnknown: true }
|
|
60
61
|
);
|
|
@@ -65,14 +66,14 @@ class Configuration {
|
|
|
65
66
|
// Showing warrnings if extra unknown parameters are found
|
|
66
67
|
const {
|
|
67
68
|
error: warrning,
|
|
68
|
-
} = ConfigurationValidator.
|
|
69
|
+
} = ConfigurationValidator.getAppCurrencies().validate(
|
|
69
70
|
{},
|
|
70
71
|
{ abortEarly: false, allowUnknown: false }
|
|
71
72
|
);
|
|
72
73
|
if (warrning) {
|
|
73
74
|
Logger({
|
|
74
75
|
level: "WARN",
|
|
75
|
-
message: "Parameter Validation warrnings for
|
|
76
|
+
message: "Parameter Validation warrnings for getAppCurrencies",
|
|
76
77
|
});
|
|
77
78
|
Logger({ level: "WARN", message: warrning });
|
|
78
79
|
}
|
|
@@ -81,11 +82,11 @@ class Configuration {
|
|
|
81
82
|
|
|
82
83
|
const xHeaders = {};
|
|
83
84
|
|
|
84
|
-
const response = await
|
|
85
|
+
const response = await ApplicationAPIClient.execute(
|
|
85
86
|
this._conf,
|
|
86
87
|
"get",
|
|
87
88
|
constructUrl({
|
|
88
|
-
url: this._urls["
|
|
89
|
+
url: this._urls["getAppCurrencies"],
|
|
89
90
|
params: {},
|
|
90
91
|
}),
|
|
91
92
|
query_params,
|
|
@@ -95,7 +96,7 @@ class Configuration {
|
|
|
95
96
|
|
|
96
97
|
const {
|
|
97
98
|
error: res_error,
|
|
98
|
-
} = ConfigurationModel.
|
|
99
|
+
} = ConfigurationModel.AppCurrencyResponse().validate(response, {
|
|
99
100
|
abortEarly: false,
|
|
100
101
|
allowUnknown: false,
|
|
101
102
|
});
|
|
@@ -103,7 +104,7 @@ class Configuration {
|
|
|
103
104
|
if (res_error) {
|
|
104
105
|
Logger({
|
|
105
106
|
level: "WARN",
|
|
106
|
-
message: "Response Validation Warnnings for
|
|
107
|
+
message: "Response Validation Warnnings for getAppCurrencies",
|
|
107
108
|
});
|
|
108
109
|
Logger({ level: "WARN", message: res_error });
|
|
109
110
|
}
|
|
@@ -113,13 +114,27 @@ class Configuration {
|
|
|
113
114
|
|
|
114
115
|
/**
|
|
115
116
|
* @param {Object} arg - Arg object.
|
|
116
|
-
* @
|
|
117
|
-
* @
|
|
118
|
-
* @
|
|
117
|
+
* @param {number} [arg.pageNo] -
|
|
118
|
+
* @param {number} [arg.pageSize] -
|
|
119
|
+
* @param {boolean} [arg.orderIncent] - This is a boolean value. Select
|
|
120
|
+
* `true` to retrieve the staff members eligible for getting incentives on orders.
|
|
121
|
+
* @param {number} [arg.orderingStore] - ID of the ordering store. Helps in
|
|
122
|
+
* retrieving staff members working at a particular ordering store.
|
|
123
|
+
* @param {string} [arg.user] - Mongo ID of the staff. Helps in retrieving
|
|
124
|
+
* the details of a particular staff member.
|
|
125
|
+
* @returns {Promise<AppStaffListResponse>} - Success response
|
|
126
|
+
* @summary: Get a list of staff.
|
|
127
|
+
* @description: Use this API to get a list of staff including the names, employee code, incentive status, assigned ordering stores, and title of each staff added to the application.
|
|
119
128
|
*/
|
|
120
|
-
async
|
|
121
|
-
|
|
122
|
-
|
|
129
|
+
async getAppStaffList({
|
|
130
|
+
pageNo,
|
|
131
|
+
pageSize,
|
|
132
|
+
orderIncent,
|
|
133
|
+
orderingStore,
|
|
134
|
+
user,
|
|
135
|
+
} = {}) {
|
|
136
|
+
const { error } = ConfigurationValidator.getAppStaffList().validate(
|
|
137
|
+
{ pageNo, pageSize, orderIncent, orderingStore, user },
|
|
123
138
|
{ abortEarly: false, allowUnknown: true }
|
|
124
139
|
);
|
|
125
140
|
if (error) {
|
|
@@ -127,27 +142,34 @@ class Configuration {
|
|
|
127
142
|
}
|
|
128
143
|
|
|
129
144
|
// Showing warrnings if extra unknown parameters are found
|
|
130
|
-
const {
|
|
131
|
-
|
|
145
|
+
const {
|
|
146
|
+
error: warrning,
|
|
147
|
+
} = ConfigurationValidator.getAppStaffList().validate(
|
|
148
|
+
{ pageNo, pageSize, orderIncent, orderingStore, user },
|
|
132
149
|
{ abortEarly: false, allowUnknown: false }
|
|
133
150
|
);
|
|
134
151
|
if (warrning) {
|
|
135
152
|
Logger({
|
|
136
153
|
level: "WARN",
|
|
137
|
-
message: "Parameter Validation warrnings for
|
|
154
|
+
message: "Parameter Validation warrnings for getAppStaffList",
|
|
138
155
|
});
|
|
139
156
|
Logger({ level: "WARN", message: warrning });
|
|
140
157
|
}
|
|
141
158
|
|
|
142
159
|
const query_params = {};
|
|
160
|
+
query_params["page_no"] = pageNo;
|
|
161
|
+
query_params["page_size"] = pageSize;
|
|
162
|
+
query_params["order_incent"] = orderIncent;
|
|
163
|
+
query_params["ordering_store"] = orderingStore;
|
|
164
|
+
query_params["user"] = user;
|
|
143
165
|
|
|
144
166
|
const xHeaders = {};
|
|
145
167
|
|
|
146
|
-
const response = await
|
|
168
|
+
const response = await ApplicationAPIClient.execute(
|
|
147
169
|
this._conf,
|
|
148
170
|
"get",
|
|
149
171
|
constructUrl({
|
|
150
|
-
url: this._urls["
|
|
172
|
+
url: this._urls["getAppStaffList"],
|
|
151
173
|
params: {},
|
|
152
174
|
}),
|
|
153
175
|
query_params,
|
|
@@ -157,7 +179,7 @@ class Configuration {
|
|
|
157
179
|
|
|
158
180
|
const {
|
|
159
181
|
error: res_error,
|
|
160
|
-
} = ConfigurationModel.
|
|
182
|
+
} = ConfigurationModel.AppStaffListResponse().validate(response, {
|
|
161
183
|
abortEarly: false,
|
|
162
184
|
allowUnknown: false,
|
|
163
185
|
});
|
|
@@ -165,7 +187,7 @@ class Configuration {
|
|
|
165
187
|
if (res_error) {
|
|
166
188
|
Logger({
|
|
167
189
|
level: "WARN",
|
|
168
|
-
message: "Response Validation Warnnings for
|
|
190
|
+
message: "Response Validation Warnnings for getAppStaffList",
|
|
169
191
|
});
|
|
170
192
|
Logger({ level: "WARN", message: res_error });
|
|
171
193
|
}
|
|
@@ -175,77 +197,59 @@ class Configuration {
|
|
|
175
197
|
|
|
176
198
|
/**
|
|
177
199
|
* @param {Object} arg - Arg object.
|
|
178
|
-
* @
|
|
179
|
-
* @
|
|
180
|
-
*
|
|
200
|
+
* @param {number} [arg.pageSize] -
|
|
201
|
+
* @param {boolean} [arg.orderIncent] - This is a boolean value. Select
|
|
202
|
+
* `true` to retrieve the staff members eligible for getting incentives on orders.
|
|
203
|
+
* @param {number} [arg.orderingStore] - ID of the ordering store. Helps in
|
|
204
|
+
* retrieving staff members working at a particular ordering store.
|
|
205
|
+
* @param {string} [arg.user] - Mongo ID of the staff. Helps in retrieving
|
|
206
|
+
* the details of a particular staff member.
|
|
207
|
+
* @summary: Get a list of staff.
|
|
208
|
+
* @description: Use this API to get a list of staff including the names, employee code, incentive status, assigned ordering stores, and title of each staff added to the application.
|
|
181
209
|
*/
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
Logger({
|
|
200
|
-
level: "WARN",
|
|
201
|
-
message: "Parameter Validation warrnings for getBasicDetails",
|
|
210
|
+
getAppStaffListPaginator({
|
|
211
|
+
pageSize,
|
|
212
|
+
orderIncent,
|
|
213
|
+
orderingStore,
|
|
214
|
+
user,
|
|
215
|
+
} = {}) {
|
|
216
|
+
const paginator = new Paginator();
|
|
217
|
+
const callback = async () => {
|
|
218
|
+
const pageId = paginator.nextId;
|
|
219
|
+
const pageNo = paginator.pageNo;
|
|
220
|
+
const pageType = "number";
|
|
221
|
+
const data = await this.getAppStaffList({
|
|
222
|
+
pageNo: pageNo,
|
|
223
|
+
pageSize: pageSize,
|
|
224
|
+
orderIncent: orderIncent,
|
|
225
|
+
orderingStore: orderingStore,
|
|
226
|
+
user: user,
|
|
202
227
|
});
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
const query_params = {};
|
|
207
|
-
|
|
208
|
-
const xHeaders = {};
|
|
209
|
-
|
|
210
|
-
const response = await APIClient.execute(
|
|
211
|
-
this._conf,
|
|
212
|
-
"get",
|
|
213
|
-
constructUrl({
|
|
214
|
-
url: this._urls["getBasicDetails"],
|
|
215
|
-
params: {},
|
|
216
|
-
}),
|
|
217
|
-
query_params,
|
|
218
|
-
undefined,
|
|
219
|
-
xHeaders
|
|
220
|
-
);
|
|
221
|
-
|
|
222
|
-
const {
|
|
223
|
-
error: res_error,
|
|
224
|
-
} = ConfigurationModel.ApplicationDetail().validate(response, {
|
|
225
|
-
abortEarly: false,
|
|
226
|
-
allowUnknown: false,
|
|
227
|
-
});
|
|
228
|
-
|
|
229
|
-
if (res_error) {
|
|
230
|
-
Logger({
|
|
231
|
-
level: "WARN",
|
|
232
|
-
message: "Response Validation Warnnings for getBasicDetails",
|
|
228
|
+
paginator.setPaginator({
|
|
229
|
+
hasNext: data.page.has_next ? true : false,
|
|
230
|
+
nextId: data.page.next_id,
|
|
233
231
|
});
|
|
234
|
-
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
return
|
|
232
|
+
return data;
|
|
233
|
+
};
|
|
234
|
+
paginator.setCallback(callback.bind(this));
|
|
235
|
+
return paginator;
|
|
238
236
|
}
|
|
239
237
|
|
|
240
238
|
/**
|
|
241
239
|
* @param {Object} arg - Arg object.
|
|
242
|
-
* @
|
|
243
|
-
*
|
|
244
|
-
* @
|
|
240
|
+
* @param {boolean} [arg.orderIncent] - This is a boolean value. Select
|
|
241
|
+
* `true` to retrieve the staff members eligible for getting incentives on orders.
|
|
242
|
+
* @param {number} [arg.orderingStore] - ID of the ordering store. Helps in
|
|
243
|
+
* retrieving staff members working at a particular ordering store.
|
|
244
|
+
* @param {string} [arg.user] - Mongo ID of the staff. Helps in retrieving
|
|
245
|
+
* the details of a particular staff member.
|
|
246
|
+
* @returns {Promise<AppStaffResponse>} - Success response
|
|
247
|
+
* @summary: Get a list of staff.
|
|
248
|
+
* @description: Use this API to get a list of staff including the names, employee code, incentive status, assigned ordering stores, and title of each staff added to the application.
|
|
245
249
|
*/
|
|
246
|
-
async
|
|
247
|
-
const { error } = ConfigurationValidator.
|
|
248
|
-
{},
|
|
250
|
+
async getAppStaffs({ orderIncent, orderingStore, user } = {}) {
|
|
251
|
+
const { error } = ConfigurationValidator.getAppStaffs().validate(
|
|
252
|
+
{ orderIncent, orderingStore, user },
|
|
249
253
|
{ abortEarly: false, allowUnknown: true }
|
|
250
254
|
);
|
|
251
255
|
if (error) {
|
|
@@ -253,29 +257,30 @@ class Configuration {
|
|
|
253
257
|
}
|
|
254
258
|
|
|
255
259
|
// Showing warrnings if extra unknown parameters are found
|
|
256
|
-
const {
|
|
257
|
-
|
|
258
|
-
} = ConfigurationValidator.getIntegrationTokens().validate(
|
|
259
|
-
{},
|
|
260
|
+
const { error: warrning } = ConfigurationValidator.getAppStaffs().validate(
|
|
261
|
+
{ orderIncent, orderingStore, user },
|
|
260
262
|
{ abortEarly: false, allowUnknown: false }
|
|
261
263
|
);
|
|
262
264
|
if (warrning) {
|
|
263
265
|
Logger({
|
|
264
266
|
level: "WARN",
|
|
265
|
-
message: "Parameter Validation warrnings for
|
|
267
|
+
message: "Parameter Validation warrnings for getAppStaffs",
|
|
266
268
|
});
|
|
267
269
|
Logger({ level: "WARN", message: warrning });
|
|
268
270
|
}
|
|
269
271
|
|
|
270
272
|
const query_params = {};
|
|
273
|
+
query_params["order_incent"] = orderIncent;
|
|
274
|
+
query_params["ordering_store"] = orderingStore;
|
|
275
|
+
query_params["user"] = user;
|
|
271
276
|
|
|
272
277
|
const xHeaders = {};
|
|
273
278
|
|
|
274
|
-
const response = await
|
|
279
|
+
const response = await ApplicationAPIClient.execute(
|
|
275
280
|
this._conf,
|
|
276
281
|
"get",
|
|
277
282
|
constructUrl({
|
|
278
|
-
url: this._urls["
|
|
283
|
+
url: this._urls["getAppStaffs"],
|
|
279
284
|
params: {},
|
|
280
285
|
}),
|
|
281
286
|
query_params,
|
|
@@ -285,7 +290,7 @@ class Configuration {
|
|
|
285
290
|
|
|
286
291
|
const {
|
|
287
292
|
error: res_error,
|
|
288
|
-
} = ConfigurationModel.
|
|
293
|
+
} = ConfigurationModel.AppStaffResponse().validate(response, {
|
|
289
294
|
abortEarly: false,
|
|
290
295
|
allowUnknown: false,
|
|
291
296
|
});
|
|
@@ -293,7 +298,7 @@ class Configuration {
|
|
|
293
298
|
if (res_error) {
|
|
294
299
|
Logger({
|
|
295
300
|
level: "WARN",
|
|
296
|
-
message: "Response Validation Warnnings for
|
|
301
|
+
message: "Response Validation Warnnings for getAppStaffs",
|
|
297
302
|
});
|
|
298
303
|
Logger({ level: "WARN", message: res_error });
|
|
299
304
|
}
|
|
@@ -303,18 +308,13 @@ class Configuration {
|
|
|
303
308
|
|
|
304
309
|
/**
|
|
305
310
|
* @param {Object} arg - Arg object.
|
|
306
|
-
* @
|
|
307
|
-
*
|
|
308
|
-
* @
|
|
309
|
-
* page. Default value is 10.
|
|
310
|
-
* @param {string} [arg.q] - Store code or name of the ordering store.
|
|
311
|
-
* @returns {Promise<OrderingStores>} - Success response
|
|
312
|
-
* @summary: Get deployment stores
|
|
313
|
-
* @description: Use this API to retrieve the details of all the deployment stores (the selling locations where the application will be utilized for placing orders).
|
|
311
|
+
* @returns {Promise<Application>} - Success response
|
|
312
|
+
* @summary: Get current application details
|
|
313
|
+
* @description: Use this API to get the current application details which includes configurations that indicate the status of the website, domain, ID, tokens, images, etc.
|
|
314
314
|
*/
|
|
315
|
-
async
|
|
316
|
-
const { error } = ConfigurationValidator.
|
|
317
|
-
{
|
|
315
|
+
async getApplication({} = {}) {
|
|
316
|
+
const { error } = ConfigurationValidator.getApplication().validate(
|
|
317
|
+
{},
|
|
318
318
|
{ abortEarly: false, allowUnknown: true }
|
|
319
319
|
);
|
|
320
320
|
if (error) {
|
|
@@ -324,30 +324,27 @@ class Configuration {
|
|
|
324
324
|
// Showing warrnings if extra unknown parameters are found
|
|
325
325
|
const {
|
|
326
326
|
error: warrning,
|
|
327
|
-
} = ConfigurationValidator.
|
|
328
|
-
{
|
|
327
|
+
} = ConfigurationValidator.getApplication().validate(
|
|
328
|
+
{},
|
|
329
329
|
{ abortEarly: false, allowUnknown: false }
|
|
330
330
|
);
|
|
331
331
|
if (warrning) {
|
|
332
332
|
Logger({
|
|
333
333
|
level: "WARN",
|
|
334
|
-
message: "Parameter Validation warrnings for
|
|
334
|
+
message: "Parameter Validation warrnings for getApplication",
|
|
335
335
|
});
|
|
336
336
|
Logger({ level: "WARN", message: warrning });
|
|
337
337
|
}
|
|
338
338
|
|
|
339
339
|
const query_params = {};
|
|
340
|
-
query_params["page_no"] = pageNo;
|
|
341
|
-
query_params["page_size"] = pageSize;
|
|
342
|
-
query_params["q"] = q;
|
|
343
340
|
|
|
344
341
|
const xHeaders = {};
|
|
345
342
|
|
|
346
|
-
const response = await
|
|
343
|
+
const response = await ApplicationAPIClient.execute(
|
|
347
344
|
this._conf,
|
|
348
345
|
"get",
|
|
349
346
|
constructUrl({
|
|
350
|
-
url: this._urls["
|
|
347
|
+
url: this._urls["getApplication"],
|
|
351
348
|
params: {},
|
|
352
349
|
}),
|
|
353
350
|
query_params,
|
|
@@ -357,7 +354,7 @@ class Configuration {
|
|
|
357
354
|
|
|
358
355
|
const {
|
|
359
356
|
error: res_error,
|
|
360
|
-
} = ConfigurationModel.
|
|
357
|
+
} = ConfigurationModel.Application().validate(response, {
|
|
361
358
|
abortEarly: false,
|
|
362
359
|
allowUnknown: false,
|
|
363
360
|
});
|
|
@@ -365,7 +362,7 @@ class Configuration {
|
|
|
365
362
|
if (res_error) {
|
|
366
363
|
Logger({
|
|
367
364
|
level: "WARN",
|
|
368
|
-
message: "Response Validation Warnnings for
|
|
365
|
+
message: "Response Validation Warnnings for getApplication",
|
|
369
366
|
});
|
|
370
367
|
Logger({ level: "WARN", message: res_error });
|
|
371
368
|
}
|
|
@@ -375,43 +372,13 @@ class Configuration {
|
|
|
375
372
|
|
|
376
373
|
/**
|
|
377
374
|
* @param {Object} arg - Arg object.
|
|
378
|
-
* @
|
|
379
|
-
*
|
|
380
|
-
* @
|
|
381
|
-
* @summary: Get deployment stores
|
|
382
|
-
* @description: Use this API to retrieve the details of all the deployment stores (the selling locations where the application will be utilized for placing orders).
|
|
383
|
-
*/
|
|
384
|
-
getOrderingStoresPaginator({ pageSize, q } = {}) {
|
|
385
|
-
const paginator = new Paginator();
|
|
386
|
-
const callback = async () => {
|
|
387
|
-
const pageId = paginator.nextId;
|
|
388
|
-
const pageNo = paginator.pageNo;
|
|
389
|
-
const pageType = "number";
|
|
390
|
-
const data = await this.getOrderingStores({
|
|
391
|
-
pageNo: pageNo,
|
|
392
|
-
pageSize: pageSize,
|
|
393
|
-
q: q,
|
|
394
|
-
});
|
|
395
|
-
paginator.setPaginator({
|
|
396
|
-
hasNext: data.page.has_next ? true : false,
|
|
397
|
-
nextId: data.page.next_id,
|
|
398
|
-
});
|
|
399
|
-
return data;
|
|
400
|
-
};
|
|
401
|
-
paginator.setCallback(callback);
|
|
402
|
-
return paginator;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
/**
|
|
406
|
-
* @param {Object} arg - Arg object.
|
|
407
|
-
* @param {number} arg.storeId - Store uid
|
|
408
|
-
* @returns {Promise<OrderingStore>} - Success response
|
|
409
|
-
* @summary: Get ordering store details
|
|
410
|
-
* @description: Use this API to retrieve the details of given stores uid (the selling locations where the application will be utilized for placing orders).
|
|
375
|
+
* @returns {Promise<ApplicationDetail>} - Success response
|
|
376
|
+
* @summary: Get basic application details
|
|
377
|
+
* @description: Use this API to retrieve only the basic details of the application which includes channel name, description, banner, logo, favicon, domain details, etc.
|
|
411
378
|
*/
|
|
412
|
-
async
|
|
413
|
-
const { error } = ConfigurationValidator.
|
|
414
|
-
{
|
|
379
|
+
async getBasicDetails({} = {}) {
|
|
380
|
+
const { error } = ConfigurationValidator.getBasicDetails().validate(
|
|
381
|
+
{},
|
|
415
382
|
{ abortEarly: false, allowUnknown: true }
|
|
416
383
|
);
|
|
417
384
|
if (error) {
|
|
@@ -421,14 +388,14 @@ class Configuration {
|
|
|
421
388
|
// Showing warrnings if extra unknown parameters are found
|
|
422
389
|
const {
|
|
423
390
|
error: warrning,
|
|
424
|
-
} = ConfigurationValidator.
|
|
425
|
-
{
|
|
391
|
+
} = ConfigurationValidator.getBasicDetails().validate(
|
|
392
|
+
{},
|
|
426
393
|
{ abortEarly: false, allowUnknown: false }
|
|
427
394
|
);
|
|
428
395
|
if (warrning) {
|
|
429
396
|
Logger({
|
|
430
397
|
level: "WARN",
|
|
431
|
-
message: "Parameter Validation warrnings for
|
|
398
|
+
message: "Parameter Validation warrnings for getBasicDetails",
|
|
432
399
|
});
|
|
433
400
|
Logger({ level: "WARN", message: warrning });
|
|
434
401
|
}
|
|
@@ -437,12 +404,12 @@ class Configuration {
|
|
|
437
404
|
|
|
438
405
|
const xHeaders = {};
|
|
439
406
|
|
|
440
|
-
const response = await
|
|
407
|
+
const response = await ApplicationAPIClient.execute(
|
|
441
408
|
this._conf,
|
|
442
409
|
"get",
|
|
443
410
|
constructUrl({
|
|
444
|
-
url: this._urls["
|
|
445
|
-
params: {
|
|
411
|
+
url: this._urls["getBasicDetails"],
|
|
412
|
+
params: {},
|
|
446
413
|
}),
|
|
447
414
|
query_params,
|
|
448
415
|
undefined,
|
|
@@ -451,7 +418,7 @@ class Configuration {
|
|
|
451
418
|
|
|
452
419
|
const {
|
|
453
420
|
error: res_error,
|
|
454
|
-
} = ConfigurationModel.
|
|
421
|
+
} = ConfigurationModel.ApplicationDetail().validate(response, {
|
|
455
422
|
abortEarly: false,
|
|
456
423
|
allowUnknown: false,
|
|
457
424
|
});
|
|
@@ -459,7 +426,7 @@ class Configuration {
|
|
|
459
426
|
if (res_error) {
|
|
460
427
|
Logger({
|
|
461
428
|
level: "WARN",
|
|
462
|
-
message: "Response Validation Warnnings for
|
|
429
|
+
message: "Response Validation Warnnings for getBasicDetails",
|
|
463
430
|
});
|
|
464
431
|
Logger({ level: "WARN", message: res_error });
|
|
465
432
|
}
|
|
@@ -469,12 +436,12 @@ class Configuration {
|
|
|
469
436
|
|
|
470
437
|
/**
|
|
471
438
|
* @param {Object} arg - Arg object.
|
|
472
|
-
* @returns {Promise<
|
|
473
|
-
* @summary: Get
|
|
474
|
-
* @description: Use this API to retrieve
|
|
439
|
+
* @returns {Promise<ApplicationInformation>} - Success response
|
|
440
|
+
* @summary: Get application information
|
|
441
|
+
* @description: Use this API to retrieve information about the social links, address and contact information of the company/seller/brand operating the application.
|
|
475
442
|
*/
|
|
476
|
-
async
|
|
477
|
-
const { error } = ConfigurationValidator.
|
|
443
|
+
async getContactInfo({} = {}) {
|
|
444
|
+
const { error } = ConfigurationValidator.getContactInfo().validate(
|
|
478
445
|
{},
|
|
479
446
|
{ abortEarly: false, allowUnknown: true }
|
|
480
447
|
);
|
|
@@ -483,14 +450,16 @@ class Configuration {
|
|
|
483
450
|
}
|
|
484
451
|
|
|
485
452
|
// Showing warrnings if extra unknown parameters are found
|
|
486
|
-
const {
|
|
453
|
+
const {
|
|
454
|
+
error: warrning,
|
|
455
|
+
} = ConfigurationValidator.getContactInfo().validate(
|
|
487
456
|
{},
|
|
488
457
|
{ abortEarly: false, allowUnknown: false }
|
|
489
458
|
);
|
|
490
459
|
if (warrning) {
|
|
491
460
|
Logger({
|
|
492
461
|
level: "WARN",
|
|
493
|
-
message: "Parameter Validation warrnings for
|
|
462
|
+
message: "Parameter Validation warrnings for getContactInfo",
|
|
494
463
|
});
|
|
495
464
|
Logger({ level: "WARN", message: warrning });
|
|
496
465
|
}
|
|
@@ -499,11 +468,11 @@ class Configuration {
|
|
|
499
468
|
|
|
500
469
|
const xHeaders = {};
|
|
501
470
|
|
|
502
|
-
const response = await
|
|
471
|
+
const response = await ApplicationAPIClient.execute(
|
|
503
472
|
this._conf,
|
|
504
473
|
"get",
|
|
505
474
|
constructUrl({
|
|
506
|
-
url: this._urls["
|
|
475
|
+
url: this._urls["getContactInfo"],
|
|
507
476
|
params: {},
|
|
508
477
|
}),
|
|
509
478
|
query_params,
|
|
@@ -513,7 +482,7 @@ class Configuration {
|
|
|
513
482
|
|
|
514
483
|
const {
|
|
515
484
|
error: res_error,
|
|
516
|
-
} = ConfigurationModel.
|
|
485
|
+
} = ConfigurationModel.ApplicationInformation().validate(response, {
|
|
517
486
|
abortEarly: false,
|
|
518
487
|
allowUnknown: false,
|
|
519
488
|
});
|
|
@@ -521,7 +490,7 @@ class Configuration {
|
|
|
521
490
|
if (res_error) {
|
|
522
491
|
Logger({
|
|
523
492
|
level: "WARN",
|
|
524
|
-
message: "Response Validation Warnnings for
|
|
493
|
+
message: "Response Validation Warnnings for getContactInfo",
|
|
525
494
|
});
|
|
526
495
|
Logger({ level: "WARN", message: res_error });
|
|
527
496
|
}
|
|
@@ -531,12 +500,12 @@ class Configuration {
|
|
|
531
500
|
|
|
532
501
|
/**
|
|
533
502
|
* @param {Object} arg - Arg object.
|
|
534
|
-
* @returns {Promise<
|
|
535
|
-
* @summary: Get
|
|
536
|
-
* @description: Use this API to
|
|
503
|
+
* @returns {Promise<CurrenciesResponse>} - Success response
|
|
504
|
+
* @summary: Get all currencies list
|
|
505
|
+
* @description: Use this API to get a list of currencies available. Moreover, get the name, code, symbol, and the decimal digits of the currencies.
|
|
537
506
|
*/
|
|
538
|
-
async
|
|
539
|
-
const { error } = ConfigurationValidator.
|
|
507
|
+
async getCurrencies({} = {}) {
|
|
508
|
+
const { error } = ConfigurationValidator.getCurrencies().validate(
|
|
540
509
|
{},
|
|
541
510
|
{ abortEarly: false, allowUnknown: true }
|
|
542
511
|
);
|
|
@@ -545,16 +514,14 @@ class Configuration {
|
|
|
545
514
|
}
|
|
546
515
|
|
|
547
516
|
// Showing warrnings if extra unknown parameters are found
|
|
548
|
-
const {
|
|
549
|
-
error: warrning,
|
|
550
|
-
} = ConfigurationValidator.getContactInfo().validate(
|
|
517
|
+
const { error: warrning } = ConfigurationValidator.getCurrencies().validate(
|
|
551
518
|
{},
|
|
552
519
|
{ abortEarly: false, allowUnknown: false }
|
|
553
520
|
);
|
|
554
521
|
if (warrning) {
|
|
555
522
|
Logger({
|
|
556
523
|
level: "WARN",
|
|
557
|
-
message: "Parameter Validation warrnings for
|
|
524
|
+
message: "Parameter Validation warrnings for getCurrencies",
|
|
558
525
|
});
|
|
559
526
|
Logger({ level: "WARN", message: warrning });
|
|
560
527
|
}
|
|
@@ -563,11 +530,11 @@ class Configuration {
|
|
|
563
530
|
|
|
564
531
|
const xHeaders = {};
|
|
565
532
|
|
|
566
|
-
const response = await
|
|
533
|
+
const response = await ApplicationAPIClient.execute(
|
|
567
534
|
this._conf,
|
|
568
535
|
"get",
|
|
569
536
|
constructUrl({
|
|
570
|
-
url: this._urls["
|
|
537
|
+
url: this._urls["getCurrencies"],
|
|
571
538
|
params: {},
|
|
572
539
|
}),
|
|
573
540
|
query_params,
|
|
@@ -577,7 +544,7 @@ class Configuration {
|
|
|
577
544
|
|
|
578
545
|
const {
|
|
579
546
|
error: res_error,
|
|
580
|
-
} = ConfigurationModel.
|
|
547
|
+
} = ConfigurationModel.CurrenciesResponse().validate(response, {
|
|
581
548
|
abortEarly: false,
|
|
582
549
|
allowUnknown: false,
|
|
583
550
|
});
|
|
@@ -585,7 +552,7 @@ class Configuration {
|
|
|
585
552
|
if (res_error) {
|
|
586
553
|
Logger({
|
|
587
554
|
level: "WARN",
|
|
588
|
-
message: "Response Validation Warnnings for
|
|
555
|
+
message: "Response Validation Warnnings for getCurrencies",
|
|
589
556
|
});
|
|
590
557
|
Logger({ level: "WARN", message: res_error });
|
|
591
558
|
}
|
|
@@ -595,13 +562,14 @@ class Configuration {
|
|
|
595
562
|
|
|
596
563
|
/**
|
|
597
564
|
* @param {Object} arg - Arg object.
|
|
598
|
-
* @
|
|
599
|
-
* @
|
|
600
|
-
* @
|
|
565
|
+
* @param {string} arg.id - Object ID assigned to the currency
|
|
566
|
+
* @returns {Promise<Currency>} - Success response
|
|
567
|
+
* @summary: Get currency by its ID
|
|
568
|
+
* @description: Use this API to retrieve a currency using its ID.
|
|
601
569
|
*/
|
|
602
|
-
async
|
|
603
|
-
const { error } = ConfigurationValidator.
|
|
604
|
-
{},
|
|
570
|
+
async getCurrencyById({ id } = {}) {
|
|
571
|
+
const { error } = ConfigurationValidator.getCurrencyById().validate(
|
|
572
|
+
{ id },
|
|
605
573
|
{ abortEarly: false, allowUnknown: true }
|
|
606
574
|
);
|
|
607
575
|
if (error) {
|
|
@@ -609,14 +577,16 @@ class Configuration {
|
|
|
609
577
|
}
|
|
610
578
|
|
|
611
579
|
// Showing warrnings if extra unknown parameters are found
|
|
612
|
-
const {
|
|
613
|
-
|
|
580
|
+
const {
|
|
581
|
+
error: warrning,
|
|
582
|
+
} = ConfigurationValidator.getCurrencyById().validate(
|
|
583
|
+
{ id },
|
|
614
584
|
{ abortEarly: false, allowUnknown: false }
|
|
615
585
|
);
|
|
616
586
|
if (warrning) {
|
|
617
587
|
Logger({
|
|
618
588
|
level: "WARN",
|
|
619
|
-
message: "Parameter Validation warrnings for
|
|
589
|
+
message: "Parameter Validation warrnings for getCurrencyById",
|
|
620
590
|
});
|
|
621
591
|
Logger({ level: "WARN", message: warrning });
|
|
622
592
|
}
|
|
@@ -625,12 +595,12 @@ class Configuration {
|
|
|
625
595
|
|
|
626
596
|
const xHeaders = {};
|
|
627
597
|
|
|
628
|
-
const response = await
|
|
598
|
+
const response = await ApplicationAPIClient.execute(
|
|
629
599
|
this._conf,
|
|
630
600
|
"get",
|
|
631
601
|
constructUrl({
|
|
632
|
-
url: this._urls["
|
|
633
|
-
params: {},
|
|
602
|
+
url: this._urls["getCurrencyById"],
|
|
603
|
+
params: { id },
|
|
634
604
|
}),
|
|
635
605
|
query_params,
|
|
636
606
|
undefined,
|
|
@@ -639,7 +609,7 @@ class Configuration {
|
|
|
639
609
|
|
|
640
610
|
const {
|
|
641
611
|
error: res_error,
|
|
642
|
-
} = ConfigurationModel.
|
|
612
|
+
} = ConfigurationModel.Currency().validate(response, {
|
|
643
613
|
abortEarly: false,
|
|
644
614
|
allowUnknown: false,
|
|
645
615
|
});
|
|
@@ -647,7 +617,7 @@ class Configuration {
|
|
|
647
617
|
if (res_error) {
|
|
648
618
|
Logger({
|
|
649
619
|
level: "WARN",
|
|
650
|
-
message: "Response Validation Warnnings for
|
|
620
|
+
message: "Response Validation Warnnings for getCurrencyById",
|
|
651
621
|
});
|
|
652
622
|
Logger({ level: "WARN", message: res_error });
|
|
653
623
|
}
|
|
@@ -657,14 +627,13 @@ class Configuration {
|
|
|
657
627
|
|
|
658
628
|
/**
|
|
659
629
|
* @param {Object} arg - Arg object.
|
|
660
|
-
* @
|
|
661
|
-
* @
|
|
662
|
-
* @
|
|
663
|
-
* @description: Use this API to retrieve a currency using its ID.
|
|
630
|
+
* @returns {Promise<AppFeatureResponse>} - Success response
|
|
631
|
+
* @summary: Get features of application
|
|
632
|
+
* @description: Use this API to retrieve the configuration of features such as product detail, landing page, options in the login/registration screen, communication opt-in, cart options and many more.
|
|
664
633
|
*/
|
|
665
|
-
async
|
|
666
|
-
const { error } = ConfigurationValidator.
|
|
667
|
-
{
|
|
634
|
+
async getFeatures({} = {}) {
|
|
635
|
+
const { error } = ConfigurationValidator.getFeatures().validate(
|
|
636
|
+
{},
|
|
668
637
|
{ abortEarly: false, allowUnknown: true }
|
|
669
638
|
);
|
|
670
639
|
if (error) {
|
|
@@ -672,16 +641,14 @@ class Configuration {
|
|
|
672
641
|
}
|
|
673
642
|
|
|
674
643
|
// Showing warrnings if extra unknown parameters are found
|
|
675
|
-
const {
|
|
676
|
-
|
|
677
|
-
} = ConfigurationValidator.getCurrencyById().validate(
|
|
678
|
-
{ id },
|
|
644
|
+
const { error: warrning } = ConfigurationValidator.getFeatures().validate(
|
|
645
|
+
{},
|
|
679
646
|
{ abortEarly: false, allowUnknown: false }
|
|
680
647
|
);
|
|
681
648
|
if (warrning) {
|
|
682
649
|
Logger({
|
|
683
650
|
level: "WARN",
|
|
684
|
-
message: "Parameter Validation warrnings for
|
|
651
|
+
message: "Parameter Validation warrnings for getFeatures",
|
|
685
652
|
});
|
|
686
653
|
Logger({ level: "WARN", message: warrning });
|
|
687
654
|
}
|
|
@@ -690,12 +657,12 @@ class Configuration {
|
|
|
690
657
|
|
|
691
658
|
const xHeaders = {};
|
|
692
659
|
|
|
693
|
-
const response = await
|
|
660
|
+
const response = await ApplicationAPIClient.execute(
|
|
694
661
|
this._conf,
|
|
695
662
|
"get",
|
|
696
663
|
constructUrl({
|
|
697
|
-
url: this._urls["
|
|
698
|
-
params: {
|
|
664
|
+
url: this._urls["getFeatures"],
|
|
665
|
+
params: {},
|
|
699
666
|
}),
|
|
700
667
|
query_params,
|
|
701
668
|
undefined,
|
|
@@ -704,7 +671,7 @@ class Configuration {
|
|
|
704
671
|
|
|
705
672
|
const {
|
|
706
673
|
error: res_error,
|
|
707
|
-
} = ConfigurationModel.
|
|
674
|
+
} = ConfigurationModel.AppFeatureResponse().validate(response, {
|
|
708
675
|
abortEarly: false,
|
|
709
676
|
allowUnknown: false,
|
|
710
677
|
});
|
|
@@ -712,7 +679,7 @@ class Configuration {
|
|
|
712
679
|
if (res_error) {
|
|
713
680
|
Logger({
|
|
714
681
|
level: "WARN",
|
|
715
|
-
message: "Response Validation Warnnings for
|
|
682
|
+
message: "Response Validation Warnnings for getFeatures",
|
|
716
683
|
});
|
|
717
684
|
Logger({ level: "WARN", message: res_error });
|
|
718
685
|
}
|
|
@@ -720,14 +687,14 @@ class Configuration {
|
|
|
720
687
|
return response;
|
|
721
688
|
}
|
|
722
689
|
|
|
723
|
-
/**
|
|
724
|
-
* @param {Object} arg - Arg object.
|
|
725
|
-
* @returns {Promise<
|
|
726
|
-
* @summary: Get
|
|
727
|
-
* @description: Use this API to
|
|
690
|
+
/**
|
|
691
|
+
* @param {Object} arg - Arg object.
|
|
692
|
+
* @returns {Promise<AppTokenResponse>} - Success response
|
|
693
|
+
* @summary: Get integration tokens
|
|
694
|
+
* @description: Use this API to retrieve the tokens used while integrating Firebase, MoEngage, Segment, GTM, Freshchat, Safetynet, Google Map and Facebook. **Note** - Token values are encrypted with AES encryption using a secret key. Kindly reach out to the developers for obtaining the secret key.
|
|
728
695
|
*/
|
|
729
|
-
async
|
|
730
|
-
const { error } = ConfigurationValidator.
|
|
696
|
+
async getIntegrationTokens({} = {}) {
|
|
697
|
+
const { error } = ConfigurationValidator.getIntegrationTokens().validate(
|
|
731
698
|
{},
|
|
732
699
|
{ abortEarly: false, allowUnknown: true }
|
|
733
700
|
);
|
|
@@ -738,14 +705,14 @@ class Configuration {
|
|
|
738
705
|
// Showing warrnings if extra unknown parameters are found
|
|
739
706
|
const {
|
|
740
707
|
error: warrning,
|
|
741
|
-
} = ConfigurationValidator.
|
|
708
|
+
} = ConfigurationValidator.getIntegrationTokens().validate(
|
|
742
709
|
{},
|
|
743
710
|
{ abortEarly: false, allowUnknown: false }
|
|
744
711
|
);
|
|
745
712
|
if (warrning) {
|
|
746
713
|
Logger({
|
|
747
714
|
level: "WARN",
|
|
748
|
-
message: "Parameter Validation warrnings for
|
|
715
|
+
message: "Parameter Validation warrnings for getIntegrationTokens",
|
|
749
716
|
});
|
|
750
717
|
Logger({ level: "WARN", message: warrning });
|
|
751
718
|
}
|
|
@@ -754,11 +721,11 @@ class Configuration {
|
|
|
754
721
|
|
|
755
722
|
const xHeaders = {};
|
|
756
723
|
|
|
757
|
-
const response = await
|
|
724
|
+
const response = await ApplicationAPIClient.execute(
|
|
758
725
|
this._conf,
|
|
759
726
|
"get",
|
|
760
727
|
constructUrl({
|
|
761
|
-
url: this._urls["
|
|
728
|
+
url: this._urls["getIntegrationTokens"],
|
|
762
729
|
params: {},
|
|
763
730
|
}),
|
|
764
731
|
query_params,
|
|
@@ -768,7 +735,7 @@ class Configuration {
|
|
|
768
735
|
|
|
769
736
|
const {
|
|
770
737
|
error: res_error,
|
|
771
|
-
} = ConfigurationModel.
|
|
738
|
+
} = ConfigurationModel.AppTokenResponse().validate(response, {
|
|
772
739
|
abortEarly: false,
|
|
773
740
|
allowUnknown: false,
|
|
774
741
|
});
|
|
@@ -776,7 +743,7 @@ class Configuration {
|
|
|
776
743
|
if (res_error) {
|
|
777
744
|
Logger({
|
|
778
745
|
level: "WARN",
|
|
779
|
-
message: "Response Validation Warnnings for
|
|
746
|
+
message: "Response Validation Warnnings for getIntegrationTokens",
|
|
780
747
|
});
|
|
781
748
|
Logger({ level: "WARN", message: res_error });
|
|
782
749
|
}
|
|
@@ -816,7 +783,7 @@ class Configuration {
|
|
|
816
783
|
|
|
817
784
|
const xHeaders = {};
|
|
818
785
|
|
|
819
|
-
const response = await
|
|
786
|
+
const response = await ApplicationAPIClient.execute(
|
|
820
787
|
this._conf,
|
|
821
788
|
"get",
|
|
822
789
|
constructUrl({
|
|
@@ -881,7 +848,7 @@ class Configuration {
|
|
|
881
848
|
|
|
882
849
|
const xHeaders = {};
|
|
883
850
|
|
|
884
|
-
const response = await
|
|
851
|
+
const response = await ApplicationAPIClient.execute(
|
|
885
852
|
this._conf,
|
|
886
853
|
"post",
|
|
887
854
|
constructUrl({
|
|
@@ -913,15 +880,18 @@ class Configuration {
|
|
|
913
880
|
|
|
914
881
|
/**
|
|
915
882
|
* @param {Object} arg - Arg object.
|
|
916
|
-
* @
|
|
917
|
-
*
|
|
918
|
-
* @
|
|
883
|
+
* @param {number} [arg.pageNo] - The page number to navigate through the
|
|
884
|
+
* given set of results. Default value is 1.
|
|
885
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
886
|
+
* page. Default value is 10.
|
|
887
|
+
* @param {string} [arg.q] - Store code or name of the ordering store.
|
|
888
|
+
* @returns {Promise<OrderingStores>} - Success response
|
|
889
|
+
* @summary: Get deployment stores
|
|
890
|
+
* @description: Use this API to retrieve the details of all the deployment stores (the selling locations where the application will be utilized for placing orders).
|
|
919
891
|
*/
|
|
920
|
-
async
|
|
921
|
-
const {
|
|
922
|
-
|
|
923
|
-
} = ConfigurationValidator.removeOrderingStoreCookie().validate(
|
|
924
|
-
{},
|
|
892
|
+
async getOrderingStores({ pageNo, pageSize, q } = {}) {
|
|
893
|
+
const { error } = ConfigurationValidator.getOrderingStores().validate(
|
|
894
|
+
{ pageNo, pageSize, q },
|
|
925
895
|
{ abortEarly: false, allowUnknown: true }
|
|
926
896
|
);
|
|
927
897
|
if (error) {
|
|
@@ -931,27 +901,30 @@ class Configuration {
|
|
|
931
901
|
// Showing warrnings if extra unknown parameters are found
|
|
932
902
|
const {
|
|
933
903
|
error: warrning,
|
|
934
|
-
} = ConfigurationValidator.
|
|
935
|
-
{},
|
|
904
|
+
} = ConfigurationValidator.getOrderingStores().validate(
|
|
905
|
+
{ pageNo, pageSize, q },
|
|
936
906
|
{ abortEarly: false, allowUnknown: false }
|
|
937
907
|
);
|
|
938
908
|
if (warrning) {
|
|
939
909
|
Logger({
|
|
940
910
|
level: "WARN",
|
|
941
|
-
message: "Parameter Validation warrnings for
|
|
911
|
+
message: "Parameter Validation warrnings for getOrderingStores",
|
|
942
912
|
});
|
|
943
913
|
Logger({ level: "WARN", message: warrning });
|
|
944
914
|
}
|
|
945
915
|
|
|
946
916
|
const query_params = {};
|
|
917
|
+
query_params["page_no"] = pageNo;
|
|
918
|
+
query_params["page_size"] = pageSize;
|
|
919
|
+
query_params["q"] = q;
|
|
947
920
|
|
|
948
921
|
const xHeaders = {};
|
|
949
922
|
|
|
950
|
-
const response = await
|
|
923
|
+
const response = await ApplicationAPIClient.execute(
|
|
951
924
|
this._conf,
|
|
952
|
-
"
|
|
925
|
+
"get",
|
|
953
926
|
constructUrl({
|
|
954
|
-
url: this._urls["
|
|
927
|
+
url: this._urls["getOrderingStores"],
|
|
955
928
|
params: {},
|
|
956
929
|
}),
|
|
957
930
|
query_params,
|
|
@@ -961,7 +934,7 @@ class Configuration {
|
|
|
961
934
|
|
|
962
935
|
const {
|
|
963
936
|
error: res_error,
|
|
964
|
-
} = ConfigurationModel.
|
|
937
|
+
} = ConfigurationModel.OrderingStores().validate(response, {
|
|
965
938
|
abortEarly: false,
|
|
966
939
|
allowUnknown: false,
|
|
967
940
|
});
|
|
@@ -969,7 +942,7 @@ class Configuration {
|
|
|
969
942
|
if (res_error) {
|
|
970
943
|
Logger({
|
|
971
944
|
level: "WARN",
|
|
972
|
-
message: "Response Validation Warnnings for
|
|
945
|
+
message: "Response Validation Warnnings for getOrderingStores",
|
|
973
946
|
});
|
|
974
947
|
Logger({ level: "WARN", message: res_error });
|
|
975
948
|
}
|
|
@@ -979,27 +952,42 @@ class Configuration {
|
|
|
979
952
|
|
|
980
953
|
/**
|
|
981
954
|
* @param {Object} arg - Arg object.
|
|
982
|
-
* @param {number} [arg.
|
|
983
|
-
*
|
|
984
|
-
* @param {
|
|
985
|
-
*
|
|
986
|
-
* @
|
|
987
|
-
* retrieving staff members working at a particular ordering store.
|
|
988
|
-
* @param {string} [arg.user] - Mongo ID of the staff. Helps in retrieving
|
|
989
|
-
* the details of a particular staff member.
|
|
990
|
-
* @returns {Promise<AppStaffListResponse>} - Success response
|
|
991
|
-
* @summary: Get a list of staff.
|
|
992
|
-
* @description: Use this API to get a list of staff including the names, employee code, incentive status, assigned ordering stores, and title of each staff added to the application.
|
|
955
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
956
|
+
* page. Default value is 10.
|
|
957
|
+
* @param {string} [arg.q] - Store code or name of the ordering store.
|
|
958
|
+
* @summary: Get deployment stores
|
|
959
|
+
* @description: Use this API to retrieve the details of all the deployment stores (the selling locations where the application will be utilized for placing orders).
|
|
993
960
|
*/
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
961
|
+
getOrderingStoresPaginator({ pageSize, q } = {}) {
|
|
962
|
+
const paginator = new Paginator();
|
|
963
|
+
const callback = async () => {
|
|
964
|
+
const pageId = paginator.nextId;
|
|
965
|
+
const pageNo = paginator.pageNo;
|
|
966
|
+
const pageType = "number";
|
|
967
|
+
const data = await this.getOrderingStores({
|
|
968
|
+
pageNo: pageNo,
|
|
969
|
+
pageSize: pageSize,
|
|
970
|
+
q: q,
|
|
971
|
+
});
|
|
972
|
+
paginator.setPaginator({
|
|
973
|
+
hasNext: data.page.has_next ? true : false,
|
|
974
|
+
nextId: data.page.next_id,
|
|
975
|
+
});
|
|
976
|
+
return data;
|
|
977
|
+
};
|
|
978
|
+
paginator.setCallback(callback.bind(this));
|
|
979
|
+
return paginator;
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
/**
|
|
983
|
+
* @param {Object} arg - Arg object.
|
|
984
|
+
* @returns {Promise<ApplicationAboutResponse>} - Success response
|
|
985
|
+
* @summary: Get application, owner and seller information
|
|
986
|
+
* @description: Use this API to get the current application details which includes channel name, description, banner, logo, favicon, domain details, etc. This API also retrieves the seller and owner information such as address, email address, and phone number.
|
|
987
|
+
*/
|
|
988
|
+
async getOwnerInfo({} = {}) {
|
|
989
|
+
const { error } = ConfigurationValidator.getOwnerInfo().validate(
|
|
990
|
+
{},
|
|
1003
991
|
{ abortEarly: false, allowUnknown: true }
|
|
1004
992
|
);
|
|
1005
993
|
if (error) {
|
|
@@ -1007,34 +995,27 @@ class Configuration {
|
|
|
1007
995
|
}
|
|
1008
996
|
|
|
1009
997
|
// Showing warrnings if extra unknown parameters are found
|
|
1010
|
-
const {
|
|
1011
|
-
|
|
1012
|
-
} = ConfigurationValidator.getAppStaffList().validate(
|
|
1013
|
-
{ pageNo, pageSize, orderIncent, orderingStore, user },
|
|
998
|
+
const { error: warrning } = ConfigurationValidator.getOwnerInfo().validate(
|
|
999
|
+
{},
|
|
1014
1000
|
{ abortEarly: false, allowUnknown: false }
|
|
1015
1001
|
);
|
|
1016
1002
|
if (warrning) {
|
|
1017
1003
|
Logger({
|
|
1018
1004
|
level: "WARN",
|
|
1019
|
-
message: "Parameter Validation warrnings for
|
|
1005
|
+
message: "Parameter Validation warrnings for getOwnerInfo",
|
|
1020
1006
|
});
|
|
1021
1007
|
Logger({ level: "WARN", message: warrning });
|
|
1022
1008
|
}
|
|
1023
1009
|
|
|
1024
1010
|
const query_params = {};
|
|
1025
|
-
query_params["page_no"] = pageNo;
|
|
1026
|
-
query_params["page_size"] = pageSize;
|
|
1027
|
-
query_params["order_incent"] = orderIncent;
|
|
1028
|
-
query_params["ordering_store"] = orderingStore;
|
|
1029
|
-
query_params["user"] = user;
|
|
1030
1011
|
|
|
1031
1012
|
const xHeaders = {};
|
|
1032
1013
|
|
|
1033
|
-
const response = await
|
|
1014
|
+
const response = await ApplicationAPIClient.execute(
|
|
1034
1015
|
this._conf,
|
|
1035
1016
|
"get",
|
|
1036
1017
|
constructUrl({
|
|
1037
|
-
url: this._urls["
|
|
1018
|
+
url: this._urls["getOwnerInfo"],
|
|
1038
1019
|
params: {},
|
|
1039
1020
|
}),
|
|
1040
1021
|
query_params,
|
|
@@ -1044,7 +1025,7 @@ class Configuration {
|
|
|
1044
1025
|
|
|
1045
1026
|
const {
|
|
1046
1027
|
error: res_error,
|
|
1047
|
-
} = ConfigurationModel.
|
|
1028
|
+
} = ConfigurationModel.ApplicationAboutResponse().validate(response, {
|
|
1048
1029
|
abortEarly: false,
|
|
1049
1030
|
allowUnknown: false,
|
|
1050
1031
|
});
|
|
@@ -1052,7 +1033,7 @@ class Configuration {
|
|
|
1052
1033
|
if (res_error) {
|
|
1053
1034
|
Logger({
|
|
1054
1035
|
level: "WARN",
|
|
1055
|
-
message: "Response Validation Warnnings for
|
|
1036
|
+
message: "Response Validation Warnnings for getOwnerInfo",
|
|
1056
1037
|
});
|
|
1057
1038
|
Logger({ level: "WARN", message: res_error });
|
|
1058
1039
|
}
|
|
@@ -1062,59 +1043,80 @@ class Configuration {
|
|
|
1062
1043
|
|
|
1063
1044
|
/**
|
|
1064
1045
|
* @param {Object} arg - Arg object.
|
|
1065
|
-
* @param {number}
|
|
1066
|
-
* @
|
|
1067
|
-
*
|
|
1068
|
-
* @
|
|
1069
|
-
* retrieving staff members working at a particular ordering store.
|
|
1070
|
-
* @param {string} [arg.user] - Mongo ID of the staff. Helps in retrieving
|
|
1071
|
-
* the details of a particular staff member.
|
|
1072
|
-
* @summary: Get a list of staff.
|
|
1073
|
-
* @description: Use this API to get a list of staff including the names, employee code, incentive status, assigned ordering stores, and title of each staff added to the application.
|
|
1046
|
+
* @param {number} arg.storeId - Store uid
|
|
1047
|
+
* @returns {Promise<OrderingStore>} - Success response
|
|
1048
|
+
* @summary: Get ordering store details
|
|
1049
|
+
* @description: Use this API to retrieve the details of given stores uid (the selling locations where the application will be utilized for placing orders).
|
|
1074
1050
|
*/
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1051
|
+
async getStoreDetailById({ storeId } = {}) {
|
|
1052
|
+
const { error } = ConfigurationValidator.getStoreDetailById().validate(
|
|
1053
|
+
{ storeId },
|
|
1054
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1055
|
+
);
|
|
1056
|
+
if (error) {
|
|
1057
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1061
|
+
const {
|
|
1062
|
+
error: warrning,
|
|
1063
|
+
} = ConfigurationValidator.getStoreDetailById().validate(
|
|
1064
|
+
{ storeId },
|
|
1065
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1066
|
+
);
|
|
1067
|
+
if (warrning) {
|
|
1068
|
+
Logger({
|
|
1069
|
+
level: "WARN",
|
|
1070
|
+
message: "Parameter Validation warrnings for getStoreDetailById",
|
|
1092
1071
|
});
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1072
|
+
Logger({ level: "WARN", message: warrning });
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
const query_params = {};
|
|
1076
|
+
|
|
1077
|
+
const xHeaders = {};
|
|
1078
|
+
|
|
1079
|
+
const response = await ApplicationAPIClient.execute(
|
|
1080
|
+
this._conf,
|
|
1081
|
+
"get",
|
|
1082
|
+
constructUrl({
|
|
1083
|
+
url: this._urls["getStoreDetailById"],
|
|
1084
|
+
params: { storeId },
|
|
1085
|
+
}),
|
|
1086
|
+
query_params,
|
|
1087
|
+
undefined,
|
|
1088
|
+
xHeaders
|
|
1089
|
+
);
|
|
1090
|
+
|
|
1091
|
+
const {
|
|
1092
|
+
error: res_error,
|
|
1093
|
+
} = ConfigurationModel.OrderingStore().validate(response, {
|
|
1094
|
+
abortEarly: false,
|
|
1095
|
+
allowUnknown: false,
|
|
1096
|
+
});
|
|
1097
|
+
|
|
1098
|
+
if (res_error) {
|
|
1099
|
+
Logger({
|
|
1100
|
+
level: "WARN",
|
|
1101
|
+
message: "Response Validation Warnnings for getStoreDetailById",
|
|
1096
1102
|
});
|
|
1097
|
-
|
|
1098
|
-
}
|
|
1099
|
-
|
|
1100
|
-
return
|
|
1103
|
+
Logger({ level: "WARN", message: res_error });
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
return response;
|
|
1101
1107
|
}
|
|
1102
1108
|
|
|
1103
1109
|
/**
|
|
1104
1110
|
* @param {Object} arg - Arg object.
|
|
1105
|
-
* @
|
|
1106
|
-
*
|
|
1107
|
-
* @
|
|
1108
|
-
* retrieving staff members working at a particular ordering store.
|
|
1109
|
-
* @param {string} [arg.user] - Mongo ID of the staff. Helps in retrieving
|
|
1110
|
-
* the details of a particular staff member.
|
|
1111
|
-
* @returns {Promise<AppStaffResponse>} - Success response
|
|
1112
|
-
* @summary: Get a list of staff.
|
|
1113
|
-
* @description: Use this API to get a list of staff including the names, employee code, incentive status, assigned ordering stores, and title of each staff added to the application.
|
|
1111
|
+
* @returns {Promise<SuccessMessageResponse>} - Success response
|
|
1112
|
+
* @summary: Unset the Ordering Store signed cookie.
|
|
1113
|
+
* @description: Use this API to unset the Ordering Store cookie upon changing the sales channel, by its domain URL, in the Universal Fynd Store app.
|
|
1114
1114
|
*/
|
|
1115
|
-
async
|
|
1116
|
-
const {
|
|
1117
|
-
|
|
1115
|
+
async removeOrderingStoreCookie({} = {}) {
|
|
1116
|
+
const {
|
|
1117
|
+
error,
|
|
1118
|
+
} = ConfigurationValidator.removeOrderingStoreCookie().validate(
|
|
1119
|
+
{},
|
|
1118
1120
|
{ abortEarly: false, allowUnknown: true }
|
|
1119
1121
|
);
|
|
1120
1122
|
if (error) {
|
|
@@ -1122,30 +1124,29 @@ class Configuration {
|
|
|
1122
1124
|
}
|
|
1123
1125
|
|
|
1124
1126
|
// Showing warrnings if extra unknown parameters are found
|
|
1125
|
-
const {
|
|
1126
|
-
|
|
1127
|
+
const {
|
|
1128
|
+
error: warrning,
|
|
1129
|
+
} = ConfigurationValidator.removeOrderingStoreCookie().validate(
|
|
1130
|
+
{},
|
|
1127
1131
|
{ abortEarly: false, allowUnknown: false }
|
|
1128
1132
|
);
|
|
1129
1133
|
if (warrning) {
|
|
1130
1134
|
Logger({
|
|
1131
1135
|
level: "WARN",
|
|
1132
|
-
message: "Parameter Validation warrnings for
|
|
1136
|
+
message: "Parameter Validation warrnings for removeOrderingStoreCookie",
|
|
1133
1137
|
});
|
|
1134
1138
|
Logger({ level: "WARN", message: warrning });
|
|
1135
1139
|
}
|
|
1136
1140
|
|
|
1137
1141
|
const query_params = {};
|
|
1138
|
-
query_params["order_incent"] = orderIncent;
|
|
1139
|
-
query_params["ordering_store"] = orderingStore;
|
|
1140
|
-
query_params["user"] = user;
|
|
1141
1142
|
|
|
1142
1143
|
const xHeaders = {};
|
|
1143
1144
|
|
|
1144
|
-
const response = await
|
|
1145
|
+
const response = await ApplicationAPIClient.execute(
|
|
1145
1146
|
this._conf,
|
|
1146
|
-
"
|
|
1147
|
+
"delete",
|
|
1147
1148
|
constructUrl({
|
|
1148
|
-
url: this._urls["
|
|
1149
|
+
url: this._urls["removeOrderingStoreCookie"],
|
|
1149
1150
|
params: {},
|
|
1150
1151
|
}),
|
|
1151
1152
|
query_params,
|
|
@@ -1155,7 +1156,7 @@ class Configuration {
|
|
|
1155
1156
|
|
|
1156
1157
|
const {
|
|
1157
1158
|
error: res_error,
|
|
1158
|
-
} = ConfigurationModel.
|
|
1159
|
+
} = ConfigurationModel.SuccessMessageResponse().validate(response, {
|
|
1159
1160
|
abortEarly: false,
|
|
1160
1161
|
allowUnknown: false,
|
|
1161
1162
|
});
|
|
@@ -1163,7 +1164,7 @@ class Configuration {
|
|
|
1163
1164
|
if (res_error) {
|
|
1164
1165
|
Logger({
|
|
1165
1166
|
level: "WARN",
|
|
1166
|
-
message: "Response Validation Warnnings for
|
|
1167
|
+
message: "Response Validation Warnnings for removeOrderingStoreCookie",
|
|
1167
1168
|
});
|
|
1168
1169
|
Logger({ level: "WARN", message: res_error });
|
|
1169
1170
|
}
|