@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,9 +1,10 @@
|
|
|
1
|
-
const Paginator = require("../../common/Paginator");
|
|
2
1
|
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
3
2
|
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
3
|
+
const Paginator = require("../../common/Paginator");
|
|
4
4
|
const ConfigurationValidator = require("./ConfigurationPlatformApplicationValidator");
|
|
5
5
|
const ConfigurationModel = require("./ConfigurationPlatformModel");
|
|
6
6
|
const { Logger } = require("./../../common/Logger");
|
|
7
|
+
const Joi = require("joi");
|
|
7
8
|
|
|
8
9
|
class Configuration {
|
|
9
10
|
constructor(config, applicationId) {
|
|
@@ -13,15 +14,15 @@ class Configuration {
|
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* @param {Object} arg - Arg object.
|
|
16
|
-
* @param {
|
|
17
|
-
* @returns {Promise<
|
|
18
|
-
* @summary:
|
|
19
|
-
* @description:
|
|
17
|
+
* @param {DomainAddRequest} arg.body
|
|
18
|
+
* @returns {Promise<Domain>} - Success response
|
|
19
|
+
* @summary: Add new domain to application
|
|
20
|
+
* @description: Add new domain to application.
|
|
20
21
|
*/
|
|
21
|
-
async
|
|
22
|
-
const { error } = ConfigurationValidator.
|
|
22
|
+
async addDomain({ body } = {}) {
|
|
23
|
+
const { error } = ConfigurationValidator.addDomain().validate(
|
|
23
24
|
{
|
|
24
|
-
|
|
25
|
+
body,
|
|
25
26
|
},
|
|
26
27
|
{ abortEarly: false, allowUnknown: true }
|
|
27
28
|
);
|
|
@@ -30,18 +31,16 @@ class Configuration {
|
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
// Showing warrnings if extra unknown parameters are found
|
|
33
|
-
const {
|
|
34
|
-
error: warrning,
|
|
35
|
-
} = ConfigurationValidator.getBuildConfig().validate(
|
|
34
|
+
const { error: warrning } = ConfigurationValidator.addDomain().validate(
|
|
36
35
|
{
|
|
37
|
-
|
|
36
|
+
body,
|
|
38
37
|
},
|
|
39
38
|
{ abortEarly: false, allowUnknown: false }
|
|
40
39
|
);
|
|
41
40
|
if (warrning) {
|
|
42
41
|
Logger({
|
|
43
42
|
level: "WARN",
|
|
44
|
-
message: "Parameter Validation warrnings for
|
|
43
|
+
message: "Parameter Validation warrnings for addDomain",
|
|
45
44
|
});
|
|
46
45
|
Logger({ level: "WARN", message: warrning });
|
|
47
46
|
}
|
|
@@ -50,23 +49,21 @@ class Configuration {
|
|
|
50
49
|
|
|
51
50
|
const response = await PlatformAPIClient.execute(
|
|
52
51
|
this.config,
|
|
53
|
-
"
|
|
54
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
52
|
+
"post",
|
|
53
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain`,
|
|
55
54
|
query_params,
|
|
56
|
-
|
|
55
|
+
body
|
|
57
56
|
);
|
|
58
57
|
|
|
59
|
-
const {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
allowUnknown: false,
|
|
64
|
-
});
|
|
58
|
+
const { error: res_error } = ConfigurationModel.Domain().validate(
|
|
59
|
+
response,
|
|
60
|
+
{ abortEarly: false, allowUnknown: false }
|
|
61
|
+
);
|
|
65
62
|
|
|
66
63
|
if (res_error) {
|
|
67
64
|
Logger({
|
|
68
65
|
level: "WARN",
|
|
69
|
-
message: "Response Validation Warnnings for
|
|
66
|
+
message: "Response Validation Warnnings for addDomain",
|
|
70
67
|
});
|
|
71
68
|
Logger({ level: "WARN", message: res_error });
|
|
72
69
|
}
|
|
@@ -76,16 +73,14 @@ class Configuration {
|
|
|
76
73
|
|
|
77
74
|
/**
|
|
78
75
|
* @param {Object} arg - Arg object.
|
|
79
|
-
* @param {
|
|
80
|
-
* @
|
|
81
|
-
* @
|
|
82
|
-
* @
|
|
83
|
-
* @description: Update build config for next build
|
|
76
|
+
* @param {UpdateDomainTypeRequest} arg.body
|
|
77
|
+
* @returns {Promise<DomainsResponse>} - Success response
|
|
78
|
+
* @summary: Change domain type
|
|
79
|
+
* @description: Change a domain to Primary or Shortlink domain
|
|
84
80
|
*/
|
|
85
|
-
async
|
|
86
|
-
const { error } = ConfigurationValidator.
|
|
81
|
+
async changeDomainType({ body } = {}) {
|
|
82
|
+
const { error } = ConfigurationValidator.changeDomainType().validate(
|
|
87
83
|
{
|
|
88
|
-
platformType,
|
|
89
84
|
body,
|
|
90
85
|
},
|
|
91
86
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -97,9 +92,8 @@ class Configuration {
|
|
|
97
92
|
// Showing warrnings if extra unknown parameters are found
|
|
98
93
|
const {
|
|
99
94
|
error: warrning,
|
|
100
|
-
} = ConfigurationValidator.
|
|
95
|
+
} = ConfigurationValidator.changeDomainType().validate(
|
|
101
96
|
{
|
|
102
|
-
platformType,
|
|
103
97
|
body,
|
|
104
98
|
},
|
|
105
99
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -107,7 +101,7 @@ class Configuration {
|
|
|
107
101
|
if (warrning) {
|
|
108
102
|
Logger({
|
|
109
103
|
level: "WARN",
|
|
110
|
-
message: "Parameter Validation warrnings for
|
|
104
|
+
message: "Parameter Validation warrnings for changeDomainType",
|
|
111
105
|
});
|
|
112
106
|
Logger({ level: "WARN", message: warrning });
|
|
113
107
|
}
|
|
@@ -116,15 +110,15 @@ class Configuration {
|
|
|
116
110
|
|
|
117
111
|
const response = await PlatformAPIClient.execute(
|
|
118
112
|
this.config,
|
|
119
|
-
"
|
|
120
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
113
|
+
"post",
|
|
114
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain/set-domain`,
|
|
121
115
|
query_params,
|
|
122
116
|
body
|
|
123
117
|
);
|
|
124
118
|
|
|
125
119
|
const {
|
|
126
120
|
error: res_error,
|
|
127
|
-
} = ConfigurationModel.
|
|
121
|
+
} = ConfigurationModel.DomainsResponse().validate(response, {
|
|
128
122
|
abortEarly: false,
|
|
129
123
|
allowUnknown: false,
|
|
130
124
|
});
|
|
@@ -132,7 +126,7 @@ class Configuration {
|
|
|
132
126
|
if (res_error) {
|
|
133
127
|
Logger({
|
|
134
128
|
level: "WARN",
|
|
135
|
-
message: "Response Validation Warnnings for
|
|
129
|
+
message: "Response Validation Warnnings for changeDomainType",
|
|
136
130
|
});
|
|
137
131
|
Logger({ level: "WARN", message: res_error });
|
|
138
132
|
}
|
|
@@ -142,16 +136,13 @@ class Configuration {
|
|
|
142
136
|
|
|
143
137
|
/**
|
|
144
138
|
* @param {Object} arg - Arg object.
|
|
145
|
-
* @
|
|
146
|
-
* @
|
|
147
|
-
* @
|
|
148
|
-
* @description: Get previous build versions
|
|
139
|
+
* @returns {Promise<TokenResponse>} - Success response
|
|
140
|
+
* @summary: Get social tokens
|
|
141
|
+
* @description: Get social tokens.
|
|
149
142
|
*/
|
|
150
|
-
async
|
|
151
|
-
const { error } = ConfigurationValidator.
|
|
152
|
-
{
|
|
153
|
-
platformType,
|
|
154
|
-
},
|
|
143
|
+
async getAppApiTokens({} = {}) {
|
|
144
|
+
const { error } = ConfigurationValidator.getAppApiTokens().validate(
|
|
145
|
+
{},
|
|
155
146
|
{ abortEarly: false, allowUnknown: true }
|
|
156
147
|
);
|
|
157
148
|
if (error) {
|
|
@@ -161,16 +152,14 @@ class Configuration {
|
|
|
161
152
|
// Showing warrnings if extra unknown parameters are found
|
|
162
153
|
const {
|
|
163
154
|
error: warrning,
|
|
164
|
-
} = ConfigurationValidator.
|
|
165
|
-
{
|
|
166
|
-
platformType,
|
|
167
|
-
},
|
|
155
|
+
} = ConfigurationValidator.getAppApiTokens().validate(
|
|
156
|
+
{},
|
|
168
157
|
{ abortEarly: false, allowUnknown: false }
|
|
169
158
|
);
|
|
170
159
|
if (warrning) {
|
|
171
160
|
Logger({
|
|
172
161
|
level: "WARN",
|
|
173
|
-
message: "Parameter Validation warrnings for
|
|
162
|
+
message: "Parameter Validation warrnings for getAppApiTokens",
|
|
174
163
|
});
|
|
175
164
|
Logger({ level: "WARN", message: warrning });
|
|
176
165
|
}
|
|
@@ -180,14 +169,14 @@ class Configuration {
|
|
|
180
169
|
const response = await PlatformAPIClient.execute(
|
|
181
170
|
this.config,
|
|
182
171
|
"get",
|
|
183
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
172
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/token`,
|
|
184
173
|
query_params,
|
|
185
174
|
undefined
|
|
186
175
|
);
|
|
187
176
|
|
|
188
177
|
const {
|
|
189
178
|
error: res_error,
|
|
190
|
-
} = ConfigurationModel.
|
|
179
|
+
} = ConfigurationModel.TokenResponse().validate(response, {
|
|
191
180
|
abortEarly: false,
|
|
192
181
|
allowUnknown: false,
|
|
193
182
|
});
|
|
@@ -195,7 +184,7 @@ class Configuration {
|
|
|
195
184
|
if (res_error) {
|
|
196
185
|
Logger({
|
|
197
186
|
level: "WARN",
|
|
198
|
-
message: "Response Validation Warnnings for
|
|
187
|
+
message: "Response Validation Warnnings for getAppApiTokens",
|
|
199
188
|
});
|
|
200
189
|
Logger({ level: "WARN", message: res_error });
|
|
201
190
|
}
|
|
@@ -205,12 +194,12 @@ class Configuration {
|
|
|
205
194
|
|
|
206
195
|
/**
|
|
207
196
|
* @param {Object} arg - Arg object.
|
|
208
|
-
* @returns {Promise<
|
|
209
|
-
* @summary: Get
|
|
210
|
-
* @description: Get
|
|
197
|
+
* @returns {Promise<ApplicationDetail>} - Success response
|
|
198
|
+
* @summary: Get basic application details
|
|
199
|
+
* @description: Get basic application details like name
|
|
211
200
|
*/
|
|
212
|
-
async
|
|
213
|
-
const { error } = ConfigurationValidator.
|
|
201
|
+
async getAppBasicDetails({} = {}) {
|
|
202
|
+
const { error } = ConfigurationValidator.getAppBasicDetails().validate(
|
|
214
203
|
{},
|
|
215
204
|
{ abortEarly: false, allowUnknown: true }
|
|
216
205
|
);
|
|
@@ -221,14 +210,14 @@ class Configuration {
|
|
|
221
210
|
// Showing warrnings if extra unknown parameters are found
|
|
222
211
|
const {
|
|
223
212
|
error: warrning,
|
|
224
|
-
} = ConfigurationValidator.
|
|
213
|
+
} = ConfigurationValidator.getAppBasicDetails().validate(
|
|
225
214
|
{},
|
|
226
215
|
{ abortEarly: false, allowUnknown: false }
|
|
227
216
|
);
|
|
228
217
|
if (warrning) {
|
|
229
218
|
Logger({
|
|
230
219
|
level: "WARN",
|
|
231
|
-
message: "Parameter Validation warrnings for
|
|
220
|
+
message: "Parameter Validation warrnings for getAppBasicDetails",
|
|
232
221
|
});
|
|
233
222
|
Logger({ level: "WARN", message: warrning });
|
|
234
223
|
}
|
|
@@ -238,14 +227,14 @@ class Configuration {
|
|
|
238
227
|
const response = await PlatformAPIClient.execute(
|
|
239
228
|
this.config,
|
|
240
229
|
"get",
|
|
241
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
230
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/detail`,
|
|
242
231
|
query_params,
|
|
243
232
|
undefined
|
|
244
233
|
);
|
|
245
234
|
|
|
246
235
|
const {
|
|
247
236
|
error: res_error,
|
|
248
|
-
} = ConfigurationModel.
|
|
237
|
+
} = ConfigurationModel.ApplicationDetail().validate(response, {
|
|
249
238
|
abortEarly: false,
|
|
250
239
|
allowUnknown: false,
|
|
251
240
|
});
|
|
@@ -253,7 +242,7 @@ class Configuration {
|
|
|
253
242
|
if (res_error) {
|
|
254
243
|
Logger({
|
|
255
244
|
level: "WARN",
|
|
256
|
-
message: "Response Validation Warnnings for
|
|
245
|
+
message: "Response Validation Warnnings for getAppBasicDetails",
|
|
257
246
|
});
|
|
258
247
|
Logger({ level: "WARN", message: res_error });
|
|
259
248
|
}
|
|
@@ -263,15 +252,19 @@ class Configuration {
|
|
|
263
252
|
|
|
264
253
|
/**
|
|
265
254
|
* @param {Object} arg - Arg object.
|
|
266
|
-
* @param {
|
|
267
|
-
* @
|
|
268
|
-
* @
|
|
269
|
-
* @
|
|
255
|
+
* @param {number} [arg.uid] - Uid of companies to be fetched
|
|
256
|
+
* @param {number} [arg.pageNo] - Current page no
|
|
257
|
+
* @param {number} [arg.pageSize] - Current request items count
|
|
258
|
+
* @returns {Promise<CompaniesResponse>} - Success response
|
|
259
|
+
* @summary: Application inventory enabled companies
|
|
260
|
+
* @description: Application inventory enabled companies.
|
|
270
261
|
*/
|
|
271
|
-
async
|
|
272
|
-
const { error } = ConfigurationValidator.
|
|
262
|
+
async getAppCompanies({ uid, pageNo, pageSize } = {}) {
|
|
263
|
+
const { error } = ConfigurationValidator.getAppCompanies().validate(
|
|
273
264
|
{
|
|
274
|
-
|
|
265
|
+
uid,
|
|
266
|
+
pageNo,
|
|
267
|
+
pageSize,
|
|
275
268
|
},
|
|
276
269
|
{ abortEarly: false, allowUnknown: true }
|
|
277
270
|
);
|
|
@@ -282,33 +275,38 @@ class Configuration {
|
|
|
282
275
|
// Showing warrnings if extra unknown parameters are found
|
|
283
276
|
const {
|
|
284
277
|
error: warrning,
|
|
285
|
-
} = ConfigurationValidator.
|
|
278
|
+
} = ConfigurationValidator.getAppCompanies().validate(
|
|
286
279
|
{
|
|
287
|
-
|
|
280
|
+
uid,
|
|
281
|
+
pageNo,
|
|
282
|
+
pageSize,
|
|
288
283
|
},
|
|
289
284
|
{ abortEarly: false, allowUnknown: false }
|
|
290
285
|
);
|
|
291
286
|
if (warrning) {
|
|
292
287
|
Logger({
|
|
293
288
|
level: "WARN",
|
|
294
|
-
message: "Parameter Validation warrnings for
|
|
289
|
+
message: "Parameter Validation warrnings for getAppCompanies",
|
|
295
290
|
});
|
|
296
291
|
Logger({ level: "WARN", message: warrning });
|
|
297
292
|
}
|
|
298
293
|
|
|
299
294
|
const query_params = {};
|
|
295
|
+
query_params["uid"] = uid;
|
|
296
|
+
query_params["page_no"] = pageNo;
|
|
297
|
+
query_params["page_size"] = pageSize;
|
|
300
298
|
|
|
301
299
|
const response = await PlatformAPIClient.execute(
|
|
302
300
|
this.config,
|
|
303
|
-
"
|
|
304
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
301
|
+
"get",
|
|
302
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/companies`,
|
|
305
303
|
query_params,
|
|
306
|
-
|
|
304
|
+
undefined
|
|
307
305
|
);
|
|
308
306
|
|
|
309
307
|
const {
|
|
310
308
|
error: res_error,
|
|
311
|
-
} = ConfigurationModel.
|
|
309
|
+
} = ConfigurationModel.CompaniesResponse().validate(response, {
|
|
312
310
|
abortEarly: false,
|
|
313
311
|
allowUnknown: false,
|
|
314
312
|
});
|
|
@@ -316,7 +314,7 @@ class Configuration {
|
|
|
316
314
|
if (res_error) {
|
|
317
315
|
Logger({
|
|
318
316
|
level: "WARN",
|
|
319
|
-
message: "Response Validation Warnnings for
|
|
317
|
+
message: "Response Validation Warnnings for getAppCompanies",
|
|
320
318
|
});
|
|
321
319
|
Logger({ level: "WARN", message: res_error });
|
|
322
320
|
}
|
|
@@ -326,12 +324,44 @@ class Configuration {
|
|
|
326
324
|
|
|
327
325
|
/**
|
|
328
326
|
* @param {Object} arg - Arg object.
|
|
329
|
-
* @
|
|
330
|
-
* @
|
|
331
|
-
* @
|
|
327
|
+
* @param {string} arg.companyId - Current company id
|
|
328
|
+
* @param {string} arg.applicationId - Current application id
|
|
329
|
+
* @param {number} [arg.uid] - Uid of companies to be fetched
|
|
330
|
+
* @param {number} [arg.pageSize] - Current request items count
|
|
331
|
+
* @summary: Application inventory enabled companies
|
|
332
|
+
* @description: Application inventory enabled companies.
|
|
332
333
|
*/
|
|
333
|
-
|
|
334
|
-
const
|
|
334
|
+
getAppCompaniesPaginator({ companyId, applicationId, uid, pageSize } = {}) {
|
|
335
|
+
const paginator = new Paginator();
|
|
336
|
+
const callback = async () => {
|
|
337
|
+
const pageId = paginator.nextId;
|
|
338
|
+
const pageNo = paginator.pageNo;
|
|
339
|
+
const pageType = "number";
|
|
340
|
+
const data = await this.getAppCompanies({
|
|
341
|
+
companyId: companyId,
|
|
342
|
+
applicationId: applicationId,
|
|
343
|
+
uid: uid,
|
|
344
|
+
pageNo: pageNo,
|
|
345
|
+
pageSize: pageSize,
|
|
346
|
+
});
|
|
347
|
+
paginator.setPaginator({
|
|
348
|
+
hasNext: data.page.has_next ? true : false,
|
|
349
|
+
nextId: data.page.next_id,
|
|
350
|
+
});
|
|
351
|
+
return data;
|
|
352
|
+
};
|
|
353
|
+
paginator.setCallback(callback.bind(this));
|
|
354
|
+
return paginator;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* @param {Object} arg - Arg object.
|
|
359
|
+
* @returns {Promise<ApplicationInformation>} - Success response
|
|
360
|
+
* @summary: Get application information
|
|
361
|
+
* @description: Get Application Current Information. This includes information about social links, address and contact information of company/seller/brand of the application.
|
|
362
|
+
*/
|
|
363
|
+
async getAppContactInfo({} = {}) {
|
|
364
|
+
const { error } = ConfigurationValidator.getAppContactInfo().validate(
|
|
335
365
|
{},
|
|
336
366
|
{ abortEarly: false, allowUnknown: true }
|
|
337
367
|
);
|
|
@@ -342,14 +372,14 @@ class Configuration {
|
|
|
342
372
|
// Showing warrnings if extra unknown parameters are found
|
|
343
373
|
const {
|
|
344
374
|
error: warrning,
|
|
345
|
-
} = ConfigurationValidator.
|
|
375
|
+
} = ConfigurationValidator.getAppContactInfo().validate(
|
|
346
376
|
{},
|
|
347
377
|
{ abortEarly: false, allowUnknown: false }
|
|
348
378
|
);
|
|
349
379
|
if (warrning) {
|
|
350
380
|
Logger({
|
|
351
381
|
level: "WARN",
|
|
352
|
-
message: "Parameter Validation warrnings for
|
|
382
|
+
message: "Parameter Validation warrnings for getAppContactInfo",
|
|
353
383
|
});
|
|
354
384
|
Logger({ level: "WARN", message: warrning });
|
|
355
385
|
}
|
|
@@ -359,14 +389,14 @@ class Configuration {
|
|
|
359
389
|
const response = await PlatformAPIClient.execute(
|
|
360
390
|
this.config,
|
|
361
391
|
"get",
|
|
362
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
392
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/information`,
|
|
363
393
|
query_params,
|
|
364
394
|
undefined
|
|
365
395
|
);
|
|
366
396
|
|
|
367
397
|
const {
|
|
368
398
|
error: res_error,
|
|
369
|
-
} = ConfigurationModel.
|
|
399
|
+
} = ConfigurationModel.ApplicationInformation().validate(response, {
|
|
370
400
|
abortEarly: false,
|
|
371
401
|
allowUnknown: false,
|
|
372
402
|
});
|
|
@@ -374,7 +404,7 @@ class Configuration {
|
|
|
374
404
|
if (res_error) {
|
|
375
405
|
Logger({
|
|
376
406
|
level: "WARN",
|
|
377
|
-
message: "Response Validation Warnnings for
|
|
407
|
+
message: "Response Validation Warnnings for getAppContactInfo",
|
|
378
408
|
});
|
|
379
409
|
Logger({ level: "WARN", message: res_error });
|
|
380
410
|
}
|
|
@@ -384,16 +414,13 @@ class Configuration {
|
|
|
384
414
|
|
|
385
415
|
/**
|
|
386
416
|
* @param {Object} arg - Arg object.
|
|
387
|
-
* @
|
|
388
|
-
* @
|
|
389
|
-
* @
|
|
390
|
-
* @description: Add or update application's basic details
|
|
417
|
+
* @returns {Promise<AppSupportedCurrency>} - Success response
|
|
418
|
+
* @summary: Get application enabled currency list
|
|
419
|
+
* @description: Get application enabled currency list
|
|
391
420
|
*/
|
|
392
|
-
async
|
|
393
|
-
const { error } = ConfigurationValidator.
|
|
394
|
-
{
|
|
395
|
-
body,
|
|
396
|
-
},
|
|
421
|
+
async getAppCurrencyConfig({} = {}) {
|
|
422
|
+
const { error } = ConfigurationValidator.getAppCurrencyConfig().validate(
|
|
423
|
+
{},
|
|
397
424
|
{ abortEarly: false, allowUnknown: true }
|
|
398
425
|
);
|
|
399
426
|
if (error) {
|
|
@@ -403,16 +430,14 @@ class Configuration {
|
|
|
403
430
|
// Showing warrnings if extra unknown parameters are found
|
|
404
431
|
const {
|
|
405
432
|
error: warrning,
|
|
406
|
-
} = ConfigurationValidator.
|
|
407
|
-
{
|
|
408
|
-
body,
|
|
409
|
-
},
|
|
433
|
+
} = ConfigurationValidator.getAppCurrencyConfig().validate(
|
|
434
|
+
{},
|
|
410
435
|
{ abortEarly: false, allowUnknown: false }
|
|
411
436
|
);
|
|
412
437
|
if (warrning) {
|
|
413
438
|
Logger({
|
|
414
439
|
level: "WARN",
|
|
415
|
-
message: "Parameter Validation warrnings for
|
|
440
|
+
message: "Parameter Validation warrnings for getAppCurrencyConfig",
|
|
416
441
|
});
|
|
417
442
|
Logger({ level: "WARN", message: warrning });
|
|
418
443
|
}
|
|
@@ -421,15 +446,15 @@ class Configuration {
|
|
|
421
446
|
|
|
422
447
|
const response = await PlatformAPIClient.execute(
|
|
423
448
|
this.config,
|
|
424
|
-
"
|
|
425
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
449
|
+
"get",
|
|
450
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/currency`,
|
|
426
451
|
query_params,
|
|
427
|
-
|
|
452
|
+
undefined
|
|
428
453
|
);
|
|
429
454
|
|
|
430
455
|
const {
|
|
431
456
|
error: res_error,
|
|
432
|
-
} = ConfigurationModel.
|
|
457
|
+
} = ConfigurationModel.AppSupportedCurrency().validate(response, {
|
|
433
458
|
abortEarly: false,
|
|
434
459
|
allowUnknown: false,
|
|
435
460
|
});
|
|
@@ -437,7 +462,7 @@ class Configuration {
|
|
|
437
462
|
if (res_error) {
|
|
438
463
|
Logger({
|
|
439
464
|
level: "WARN",
|
|
440
|
-
message: "Response Validation Warnnings for
|
|
465
|
+
message: "Response Validation Warnnings for getAppCurrencyConfig",
|
|
441
466
|
});
|
|
442
467
|
Logger({ level: "WARN", message: res_error });
|
|
443
468
|
}
|
|
@@ -447,12 +472,12 @@ class Configuration {
|
|
|
447
472
|
|
|
448
473
|
/**
|
|
449
474
|
* @param {Object} arg - Arg object.
|
|
450
|
-
* @returns {Promise<
|
|
451
|
-
* @summary: Get application
|
|
452
|
-
* @description: Get
|
|
475
|
+
* @returns {Promise<AppFeatureResponse>} - Success response
|
|
476
|
+
* @summary: Get features of application
|
|
477
|
+
* @description: Get features of application
|
|
453
478
|
*/
|
|
454
|
-
async
|
|
455
|
-
const { error } = ConfigurationValidator.
|
|
479
|
+
async getAppFeatures({} = {}) {
|
|
480
|
+
const { error } = ConfigurationValidator.getAppFeatures().validate(
|
|
456
481
|
{},
|
|
457
482
|
{ abortEarly: false, allowUnknown: true }
|
|
458
483
|
);
|
|
@@ -463,14 +488,14 @@ class Configuration {
|
|
|
463
488
|
// Showing warrnings if extra unknown parameters are found
|
|
464
489
|
const {
|
|
465
490
|
error: warrning,
|
|
466
|
-
} = ConfigurationValidator.
|
|
491
|
+
} = ConfigurationValidator.getAppFeatures().validate(
|
|
467
492
|
{},
|
|
468
493
|
{ abortEarly: false, allowUnknown: false }
|
|
469
494
|
);
|
|
470
495
|
if (warrning) {
|
|
471
496
|
Logger({
|
|
472
497
|
level: "WARN",
|
|
473
|
-
message: "Parameter Validation warrnings for
|
|
498
|
+
message: "Parameter Validation warrnings for getAppFeatures",
|
|
474
499
|
});
|
|
475
500
|
Logger({ level: "WARN", message: warrning });
|
|
476
501
|
}
|
|
@@ -480,14 +505,14 @@ class Configuration {
|
|
|
480
505
|
const response = await PlatformAPIClient.execute(
|
|
481
506
|
this.config,
|
|
482
507
|
"get",
|
|
483
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
508
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/feature`,
|
|
484
509
|
query_params,
|
|
485
510
|
undefined
|
|
486
511
|
);
|
|
487
512
|
|
|
488
513
|
const {
|
|
489
514
|
error: res_error,
|
|
490
|
-
} = ConfigurationModel.
|
|
515
|
+
} = ConfigurationModel.AppFeatureResponse().validate(response, {
|
|
491
516
|
abortEarly: false,
|
|
492
517
|
allowUnknown: false,
|
|
493
518
|
});
|
|
@@ -495,7 +520,7 @@ class Configuration {
|
|
|
495
520
|
if (res_error) {
|
|
496
521
|
Logger({
|
|
497
522
|
level: "WARN",
|
|
498
|
-
message: "Response Validation Warnnings for
|
|
523
|
+
message: "Response Validation Warnnings for getAppFeatures",
|
|
499
524
|
});
|
|
500
525
|
Logger({ level: "WARN", message: res_error });
|
|
501
526
|
}
|
|
@@ -505,15 +530,17 @@ class Configuration {
|
|
|
505
530
|
|
|
506
531
|
/**
|
|
507
532
|
* @param {Object} arg - Arg object.
|
|
508
|
-
* @param {
|
|
509
|
-
* @
|
|
510
|
-
* @
|
|
511
|
-
* @
|
|
533
|
+
* @param {number} [arg.pageNo] - Current page no
|
|
534
|
+
* @param {number} [arg.pageSize] - Current request items count
|
|
535
|
+
* @returns {Promise<StoresResponse>} - Success response
|
|
536
|
+
* @summary: Application inventory enabled stores
|
|
537
|
+
* @description: Application inventory enabled stores.
|
|
512
538
|
*/
|
|
513
|
-
async
|
|
514
|
-
const { error } = ConfigurationValidator.
|
|
539
|
+
async getAppStores({ pageNo, pageSize } = {}) {
|
|
540
|
+
const { error } = ConfigurationValidator.getAppStores().validate(
|
|
515
541
|
{
|
|
516
|
-
|
|
542
|
+
pageNo,
|
|
543
|
+
pageSize,
|
|
517
544
|
},
|
|
518
545
|
{ abortEarly: false, allowUnknown: true }
|
|
519
546
|
);
|
|
@@ -522,35 +549,36 @@ class Configuration {
|
|
|
522
549
|
}
|
|
523
550
|
|
|
524
551
|
// Showing warrnings if extra unknown parameters are found
|
|
525
|
-
const {
|
|
526
|
-
error: warrning,
|
|
527
|
-
} = ConfigurationValidator.updateAppContactInfo().validate(
|
|
552
|
+
const { error: warrning } = ConfigurationValidator.getAppStores().validate(
|
|
528
553
|
{
|
|
529
|
-
|
|
554
|
+
pageNo,
|
|
555
|
+
pageSize,
|
|
530
556
|
},
|
|
531
557
|
{ abortEarly: false, allowUnknown: false }
|
|
532
558
|
);
|
|
533
559
|
if (warrning) {
|
|
534
560
|
Logger({
|
|
535
561
|
level: "WARN",
|
|
536
|
-
message: "Parameter Validation warrnings for
|
|
562
|
+
message: "Parameter Validation warrnings for getAppStores",
|
|
537
563
|
});
|
|
538
564
|
Logger({ level: "WARN", message: warrning });
|
|
539
565
|
}
|
|
540
566
|
|
|
541
567
|
const query_params = {};
|
|
568
|
+
query_params["page_no"] = pageNo;
|
|
569
|
+
query_params["page_size"] = pageSize;
|
|
542
570
|
|
|
543
571
|
const response = await PlatformAPIClient.execute(
|
|
544
572
|
this.config,
|
|
545
|
-
"
|
|
546
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
573
|
+
"get",
|
|
574
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/stores`,
|
|
547
575
|
query_params,
|
|
548
|
-
|
|
576
|
+
undefined
|
|
549
577
|
);
|
|
550
578
|
|
|
551
579
|
const {
|
|
552
580
|
error: res_error,
|
|
553
|
-
} = ConfigurationModel.
|
|
581
|
+
} = ConfigurationModel.StoresResponse().validate(response, {
|
|
554
582
|
abortEarly: false,
|
|
555
583
|
allowUnknown: false,
|
|
556
584
|
});
|
|
@@ -558,7 +586,7 @@ class Configuration {
|
|
|
558
586
|
if (res_error) {
|
|
559
587
|
Logger({
|
|
560
588
|
level: "WARN",
|
|
561
|
-
message: "Response Validation Warnnings for
|
|
589
|
+
message: "Response Validation Warnnings for getAppStores",
|
|
562
590
|
});
|
|
563
591
|
Logger({ level: "WARN", message: res_error });
|
|
564
592
|
}
|
|
@@ -568,12 +596,42 @@ class Configuration {
|
|
|
568
596
|
|
|
569
597
|
/**
|
|
570
598
|
* @param {Object} arg - Arg object.
|
|
571
|
-
* @
|
|
572
|
-
* @
|
|
573
|
-
* @
|
|
599
|
+
* @param {string} arg.companyId - Current company id
|
|
600
|
+
* @param {string} arg.applicationId - Current application id
|
|
601
|
+
* @param {number} [arg.pageSize] - Current request items count
|
|
602
|
+
* @summary: Application inventory enabled stores
|
|
603
|
+
* @description: Application inventory enabled stores.
|
|
574
604
|
*/
|
|
575
|
-
|
|
576
|
-
const
|
|
605
|
+
getAppStoresPaginator({ companyId, applicationId, pageSize } = {}) {
|
|
606
|
+
const paginator = new Paginator();
|
|
607
|
+
const callback = async () => {
|
|
608
|
+
const pageId = paginator.nextId;
|
|
609
|
+
const pageNo = paginator.pageNo;
|
|
610
|
+
const pageType = "number";
|
|
611
|
+
const data = await this.getAppStores({
|
|
612
|
+
companyId: companyId,
|
|
613
|
+
applicationId: applicationId,
|
|
614
|
+
pageNo: pageNo,
|
|
615
|
+
pageSize: pageSize,
|
|
616
|
+
});
|
|
617
|
+
paginator.setPaginator({
|
|
618
|
+
hasNext: data.page.has_next ? true : false,
|
|
619
|
+
nextId: data.page.next_id,
|
|
620
|
+
});
|
|
621
|
+
return data;
|
|
622
|
+
};
|
|
623
|
+
paginator.setCallback(callback.bind(this));
|
|
624
|
+
return paginator;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
/**
|
|
628
|
+
* @param {Object} arg - Arg object.
|
|
629
|
+
* @returns {Promise<AppCurrencyResponse>} - Success response
|
|
630
|
+
* @summary: Get currencies enabled in the application
|
|
631
|
+
* @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.
|
|
632
|
+
*/
|
|
633
|
+
async getAppSupportedCurrency({} = {}) {
|
|
634
|
+
const { error } = ConfigurationValidator.getAppSupportedCurrency().validate(
|
|
577
635
|
{},
|
|
578
636
|
{ abortEarly: false, allowUnknown: true }
|
|
579
637
|
);
|
|
@@ -584,14 +642,14 @@ class Configuration {
|
|
|
584
642
|
// Showing warrnings if extra unknown parameters are found
|
|
585
643
|
const {
|
|
586
644
|
error: warrning,
|
|
587
|
-
} = ConfigurationValidator.
|
|
645
|
+
} = ConfigurationValidator.getAppSupportedCurrency().validate(
|
|
588
646
|
{},
|
|
589
647
|
{ abortEarly: false, allowUnknown: false }
|
|
590
648
|
);
|
|
591
649
|
if (warrning) {
|
|
592
650
|
Logger({
|
|
593
651
|
level: "WARN",
|
|
594
|
-
message: "Parameter Validation warrnings for
|
|
652
|
+
message: "Parameter Validation warrnings for getAppSupportedCurrency",
|
|
595
653
|
});
|
|
596
654
|
Logger({ level: "WARN", message: warrning });
|
|
597
655
|
}
|
|
@@ -601,14 +659,14 @@ class Configuration {
|
|
|
601
659
|
const response = await PlatformAPIClient.execute(
|
|
602
660
|
this.config,
|
|
603
661
|
"get",
|
|
604
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
662
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/currency/supported`,
|
|
605
663
|
query_params,
|
|
606
664
|
undefined
|
|
607
665
|
);
|
|
608
666
|
|
|
609
667
|
const {
|
|
610
668
|
error: res_error,
|
|
611
|
-
} = ConfigurationModel.
|
|
669
|
+
} = ConfigurationModel.AppCurrencyResponse().validate(response, {
|
|
612
670
|
abortEarly: false,
|
|
613
671
|
allowUnknown: false,
|
|
614
672
|
});
|
|
@@ -616,7 +674,7 @@ class Configuration {
|
|
|
616
674
|
if (res_error) {
|
|
617
675
|
Logger({
|
|
618
676
|
level: "WARN",
|
|
619
|
-
message: "Response Validation Warnnings for
|
|
677
|
+
message: "Response Validation Warnnings for getAppSupportedCurrency",
|
|
620
678
|
});
|
|
621
679
|
Logger({ level: "WARN", message: res_error });
|
|
622
680
|
}
|
|
@@ -626,16 +684,13 @@ class Configuration {
|
|
|
626
684
|
|
|
627
685
|
/**
|
|
628
686
|
* @param {Object} arg - Arg object.
|
|
629
|
-
* @
|
|
630
|
-
* @
|
|
631
|
-
* @
|
|
632
|
-
* @description: Add social tokens.
|
|
687
|
+
* @returns {Promise<Application>} - Success response
|
|
688
|
+
* @summary: Get application data from id
|
|
689
|
+
* @description: Get application data from id
|
|
633
690
|
*/
|
|
634
|
-
async
|
|
635
|
-
const { error } = ConfigurationValidator.
|
|
636
|
-
{
|
|
637
|
-
body,
|
|
638
|
-
},
|
|
691
|
+
async getApplicationById({} = {}) {
|
|
692
|
+
const { error } = ConfigurationValidator.getApplicationById().validate(
|
|
693
|
+
{},
|
|
639
694
|
{ abortEarly: false, allowUnknown: true }
|
|
640
695
|
);
|
|
641
696
|
if (error) {
|
|
@@ -645,16 +700,14 @@ class Configuration {
|
|
|
645
700
|
// Showing warrnings if extra unknown parameters are found
|
|
646
701
|
const {
|
|
647
702
|
error: warrning,
|
|
648
|
-
} = ConfigurationValidator.
|
|
649
|
-
{
|
|
650
|
-
body,
|
|
651
|
-
},
|
|
703
|
+
} = ConfigurationValidator.getApplicationById().validate(
|
|
704
|
+
{},
|
|
652
705
|
{ abortEarly: false, allowUnknown: false }
|
|
653
706
|
);
|
|
654
707
|
if (warrning) {
|
|
655
708
|
Logger({
|
|
656
709
|
level: "WARN",
|
|
657
|
-
message: "Parameter Validation warrnings for
|
|
710
|
+
message: "Parameter Validation warrnings for getApplicationById",
|
|
658
711
|
});
|
|
659
712
|
Logger({ level: "WARN", message: warrning });
|
|
660
713
|
}
|
|
@@ -663,15 +716,15 @@ class Configuration {
|
|
|
663
716
|
|
|
664
717
|
const response = await PlatformAPIClient.execute(
|
|
665
718
|
this.config,
|
|
666
|
-
"
|
|
667
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}
|
|
719
|
+
"get",
|
|
720
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}`,
|
|
668
721
|
query_params,
|
|
669
|
-
|
|
722
|
+
undefined
|
|
670
723
|
);
|
|
671
724
|
|
|
672
725
|
const {
|
|
673
726
|
error: res_error,
|
|
674
|
-
} = ConfigurationModel.
|
|
727
|
+
} = ConfigurationModel.Application().validate(response, {
|
|
675
728
|
abortEarly: false,
|
|
676
729
|
allowUnknown: false,
|
|
677
730
|
});
|
|
@@ -679,7 +732,7 @@ class Configuration {
|
|
|
679
732
|
if (res_error) {
|
|
680
733
|
Logger({
|
|
681
734
|
level: "WARN",
|
|
682
|
-
message: "Response Validation Warnnings for
|
|
735
|
+
message: "Response Validation Warnnings for getApplicationById",
|
|
683
736
|
});
|
|
684
737
|
Logger({ level: "WARN", message: res_error });
|
|
685
738
|
}
|
|
@@ -689,19 +742,15 @@ class Configuration {
|
|
|
689
742
|
|
|
690
743
|
/**
|
|
691
744
|
* @param {Object} arg - Arg object.
|
|
692
|
-
* @param {
|
|
693
|
-
* @
|
|
694
|
-
* @
|
|
695
|
-
* @
|
|
696
|
-
* @summary: Application inventory enabled companies
|
|
697
|
-
* @description: Application inventory enabled companies.
|
|
745
|
+
* @param {string} arg.platformType - Current platform name
|
|
746
|
+
* @returns {Promise<MobileAppConfiguration>} - Success response
|
|
747
|
+
* @summary: Get latest build config
|
|
748
|
+
* @description: Get latest build config
|
|
698
749
|
*/
|
|
699
|
-
async
|
|
700
|
-
const { error } = ConfigurationValidator.
|
|
750
|
+
async getBuildConfig({ platformType } = {}) {
|
|
751
|
+
const { error } = ConfigurationValidator.getBuildConfig().validate(
|
|
701
752
|
{
|
|
702
|
-
|
|
703
|
-
pageNo,
|
|
704
|
-
pageSize,
|
|
753
|
+
platformType,
|
|
705
754
|
},
|
|
706
755
|
{ abortEarly: false, allowUnknown: true }
|
|
707
756
|
);
|
|
@@ -712,38 +761,33 @@ class Configuration {
|
|
|
712
761
|
// Showing warrnings if extra unknown parameters are found
|
|
713
762
|
const {
|
|
714
763
|
error: warrning,
|
|
715
|
-
} = ConfigurationValidator.
|
|
764
|
+
} = ConfigurationValidator.getBuildConfig().validate(
|
|
716
765
|
{
|
|
717
|
-
|
|
718
|
-
pageNo,
|
|
719
|
-
pageSize,
|
|
766
|
+
platformType,
|
|
720
767
|
},
|
|
721
768
|
{ abortEarly: false, allowUnknown: false }
|
|
722
769
|
);
|
|
723
770
|
if (warrning) {
|
|
724
771
|
Logger({
|
|
725
772
|
level: "WARN",
|
|
726
|
-
message: "Parameter Validation warrnings for
|
|
773
|
+
message: "Parameter Validation warrnings for getBuildConfig",
|
|
727
774
|
});
|
|
728
775
|
Logger({ level: "WARN", message: warrning });
|
|
729
776
|
}
|
|
730
777
|
|
|
731
778
|
const query_params = {};
|
|
732
|
-
query_params["uid"] = uid;
|
|
733
|
-
query_params["page_no"] = pageNo;
|
|
734
|
-
query_params["page_size"] = pageSize;
|
|
735
779
|
|
|
736
780
|
const response = await PlatformAPIClient.execute(
|
|
737
781
|
this.config,
|
|
738
782
|
"get",
|
|
739
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
783
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/build/${platformType}/configuration`,
|
|
740
784
|
query_params,
|
|
741
785
|
undefined
|
|
742
786
|
);
|
|
743
787
|
|
|
744
788
|
const {
|
|
745
789
|
error: res_error,
|
|
746
|
-
} = ConfigurationModel.
|
|
790
|
+
} = ConfigurationModel.MobileAppConfiguration().validate(response, {
|
|
747
791
|
abortEarly: false,
|
|
748
792
|
allowUnknown: false,
|
|
749
793
|
});
|
|
@@ -751,7 +795,7 @@ class Configuration {
|
|
|
751
795
|
if (res_error) {
|
|
752
796
|
Logger({
|
|
753
797
|
level: "WARN",
|
|
754
|
-
message: "Response Validation Warnnings for
|
|
798
|
+
message: "Response Validation Warnnings for getBuildConfig",
|
|
755
799
|
});
|
|
756
800
|
Logger({ level: "WARN", message: res_error });
|
|
757
801
|
}
|
|
@@ -761,49 +805,15 @@ class Configuration {
|
|
|
761
805
|
|
|
762
806
|
/**
|
|
763
807
|
* @param {Object} arg - Arg object.
|
|
764
|
-
* @param {
|
|
765
|
-
* @
|
|
766
|
-
* @
|
|
767
|
-
* @
|
|
768
|
-
* @summary: Application inventory enabled companies
|
|
769
|
-
* @description: Application inventory enabled companies.
|
|
770
|
-
*/
|
|
771
|
-
getAppCompaniesPaginator({ companyId, applicationId, uid, pageSize } = {}) {
|
|
772
|
-
const paginator = new Paginator();
|
|
773
|
-
const callback = async () => {
|
|
774
|
-
const pageId = paginator.nextId;
|
|
775
|
-
const pageNo = paginator.pageNo;
|
|
776
|
-
const pageType = "number";
|
|
777
|
-
const data = await this.getAppCompanies({
|
|
778
|
-
companyId: companyId,
|
|
779
|
-
applicationId: applicationId,
|
|
780
|
-
uid: uid,
|
|
781
|
-
pageNo: pageNo,
|
|
782
|
-
pageSize: pageSize,
|
|
783
|
-
});
|
|
784
|
-
paginator.setPaginator({
|
|
785
|
-
hasNext: data.page.has_next ? true : false,
|
|
786
|
-
nextId: data.page.next_id,
|
|
787
|
-
});
|
|
788
|
-
return data;
|
|
789
|
-
};
|
|
790
|
-
paginator.setCallback(callback.bind(this));
|
|
791
|
-
return paginator;
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
/**
|
|
795
|
-
* @param {Object} arg - Arg object.
|
|
796
|
-
* @param {number} [arg.pageNo] - Current page no
|
|
797
|
-
* @param {number} [arg.pageSize] - Current request items count
|
|
798
|
-
* @returns {Promise<StoresResponse>} - Success response
|
|
799
|
-
* @summary: Application inventory enabled stores
|
|
800
|
-
* @description: Application inventory enabled stores.
|
|
808
|
+
* @param {DomainStatusRequest} arg.body
|
|
809
|
+
* @returns {Promise<DomainStatusResponse>} - Success response
|
|
810
|
+
* @summary: Get domain connected status.
|
|
811
|
+
* @description: Get domain connected status. Check if domain is live and mapped to appropriate IP to fynd servers.
|
|
801
812
|
*/
|
|
802
|
-
async
|
|
803
|
-
const { error } = ConfigurationValidator.
|
|
813
|
+
async getDomainStatus({ body } = {}) {
|
|
814
|
+
const { error } = ConfigurationValidator.getDomainStatus().validate(
|
|
804
815
|
{
|
|
805
|
-
|
|
806
|
-
pageSize,
|
|
816
|
+
body,
|
|
807
817
|
},
|
|
808
818
|
{ abortEarly: false, allowUnknown: true }
|
|
809
819
|
);
|
|
@@ -812,36 +822,35 @@ class Configuration {
|
|
|
812
822
|
}
|
|
813
823
|
|
|
814
824
|
// Showing warrnings if extra unknown parameters are found
|
|
815
|
-
const {
|
|
825
|
+
const {
|
|
826
|
+
error: warrning,
|
|
827
|
+
} = ConfigurationValidator.getDomainStatus().validate(
|
|
816
828
|
{
|
|
817
|
-
|
|
818
|
-
pageSize,
|
|
829
|
+
body,
|
|
819
830
|
},
|
|
820
831
|
{ abortEarly: false, allowUnknown: false }
|
|
821
832
|
);
|
|
822
833
|
if (warrning) {
|
|
823
834
|
Logger({
|
|
824
835
|
level: "WARN",
|
|
825
|
-
message: "Parameter Validation warrnings for
|
|
836
|
+
message: "Parameter Validation warrnings for getDomainStatus",
|
|
826
837
|
});
|
|
827
838
|
Logger({ level: "WARN", message: warrning });
|
|
828
839
|
}
|
|
829
840
|
|
|
830
841
|
const query_params = {};
|
|
831
|
-
query_params["page_no"] = pageNo;
|
|
832
|
-
query_params["page_size"] = pageSize;
|
|
833
842
|
|
|
834
843
|
const response = await PlatformAPIClient.execute(
|
|
835
844
|
this.config,
|
|
836
|
-
"
|
|
837
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
845
|
+
"post",
|
|
846
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain/domain-status`,
|
|
838
847
|
query_params,
|
|
839
|
-
|
|
848
|
+
body
|
|
840
849
|
);
|
|
841
850
|
|
|
842
851
|
const {
|
|
843
852
|
error: res_error,
|
|
844
|
-
} = ConfigurationModel.
|
|
853
|
+
} = ConfigurationModel.DomainStatusResponse().validate(response, {
|
|
845
854
|
abortEarly: false,
|
|
846
855
|
allowUnknown: false,
|
|
847
856
|
});
|
|
@@ -849,7 +858,7 @@ class Configuration {
|
|
|
849
858
|
if (res_error) {
|
|
850
859
|
Logger({
|
|
851
860
|
level: "WARN",
|
|
852
|
-
message: "Response Validation Warnnings for
|
|
861
|
+
message: "Response Validation Warnnings for getDomainStatus",
|
|
853
862
|
});
|
|
854
863
|
Logger({ level: "WARN", message: res_error });
|
|
855
864
|
}
|
|
@@ -859,32 +868,58 @@ class Configuration {
|
|
|
859
868
|
|
|
860
869
|
/**
|
|
861
870
|
* @param {Object} arg - Arg object.
|
|
862
|
-
* @
|
|
863
|
-
* @
|
|
864
|
-
* @
|
|
865
|
-
* @summary: Application inventory enabled stores
|
|
866
|
-
* @description: Application inventory enabled stores.
|
|
871
|
+
* @returns {Promise<DomainsResponse>} - Success response
|
|
872
|
+
* @summary: Get attached domain list
|
|
873
|
+
* @description: Get attached domain list.
|
|
867
874
|
*/
|
|
868
|
-
|
|
869
|
-
const
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
875
|
+
async getDomains({} = {}) {
|
|
876
|
+
const { error } = ConfigurationValidator.getDomains().validate(
|
|
877
|
+
{},
|
|
878
|
+
{ abortEarly: false, allowUnknown: true }
|
|
879
|
+
);
|
|
880
|
+
if (error) {
|
|
881
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
// Showing warrnings if extra unknown parameters are found
|
|
885
|
+
const { error: warrning } = ConfigurationValidator.getDomains().validate(
|
|
886
|
+
{},
|
|
887
|
+
{ abortEarly: false, allowUnknown: false }
|
|
888
|
+
);
|
|
889
|
+
if (warrning) {
|
|
890
|
+
Logger({
|
|
891
|
+
level: "WARN",
|
|
892
|
+
message: "Parameter Validation warrnings for getDomains",
|
|
879
893
|
});
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
894
|
+
Logger({ level: "WARN", message: warrning });
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
const query_params = {};
|
|
898
|
+
|
|
899
|
+
const response = await PlatformAPIClient.execute(
|
|
900
|
+
this.config,
|
|
901
|
+
"get",
|
|
902
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain`,
|
|
903
|
+
query_params,
|
|
904
|
+
undefined
|
|
905
|
+
);
|
|
906
|
+
|
|
907
|
+
const {
|
|
908
|
+
error: res_error,
|
|
909
|
+
} = ConfigurationModel.DomainsResponse().validate(response, {
|
|
910
|
+
abortEarly: false,
|
|
911
|
+
allowUnknown: false,
|
|
912
|
+
});
|
|
913
|
+
|
|
914
|
+
if (res_error) {
|
|
915
|
+
Logger({
|
|
916
|
+
level: "WARN",
|
|
917
|
+
message: "Response Validation Warnnings for getDomains",
|
|
883
918
|
});
|
|
884
|
-
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
return
|
|
919
|
+
Logger({ level: "WARN", message: res_error });
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
return response;
|
|
888
923
|
}
|
|
889
924
|
|
|
890
925
|
/**
|
|
@@ -947,15 +982,21 @@ class Configuration {
|
|
|
947
982
|
|
|
948
983
|
/**
|
|
949
984
|
* @param {Object} arg - Arg object.
|
|
950
|
-
* @param {
|
|
951
|
-
* @
|
|
952
|
-
* @
|
|
953
|
-
* @
|
|
985
|
+
* @param {number} [arg.pageNo] - Current page no
|
|
986
|
+
* @param {number} [arg.pageSize] - Current request items count
|
|
987
|
+
* @param {FilterOrderingStoreRequest} arg.body
|
|
988
|
+
* @returns {Promise<OrderingStores>} - Success response
|
|
989
|
+
* @summary: Get ordering store by filter
|
|
990
|
+
* @description: Get ordering store by filter
|
|
954
991
|
*/
|
|
955
|
-
async
|
|
956
|
-
const {
|
|
992
|
+
async getOrderingStoresByFilter({ body, pageNo, pageSize } = {}) {
|
|
993
|
+
const {
|
|
994
|
+
error,
|
|
995
|
+
} = ConfigurationValidator.getOrderingStoresByFilter().validate(
|
|
957
996
|
{
|
|
958
997
|
body,
|
|
998
|
+
pageNo,
|
|
999
|
+
pageSize,
|
|
959
1000
|
},
|
|
960
1001
|
{ abortEarly: false, allowUnknown: true }
|
|
961
1002
|
);
|
|
@@ -966,33 +1007,37 @@ class Configuration {
|
|
|
966
1007
|
// Showing warrnings if extra unknown parameters are found
|
|
967
1008
|
const {
|
|
968
1009
|
error: warrning,
|
|
969
|
-
} = ConfigurationValidator.
|
|
1010
|
+
} = ConfigurationValidator.getOrderingStoresByFilter().validate(
|
|
970
1011
|
{
|
|
971
1012
|
body,
|
|
1013
|
+
pageNo,
|
|
1014
|
+
pageSize,
|
|
972
1015
|
},
|
|
973
1016
|
{ abortEarly: false, allowUnknown: false }
|
|
974
1017
|
);
|
|
975
1018
|
if (warrning) {
|
|
976
1019
|
Logger({
|
|
977
1020
|
level: "WARN",
|
|
978
|
-
message: "Parameter Validation warrnings for
|
|
1021
|
+
message: "Parameter Validation warrnings for getOrderingStoresByFilter",
|
|
979
1022
|
});
|
|
980
1023
|
Logger({ level: "WARN", message: warrning });
|
|
981
1024
|
}
|
|
982
1025
|
|
|
983
1026
|
const query_params = {};
|
|
1027
|
+
query_params["page_no"] = pageNo;
|
|
1028
|
+
query_params["page_size"] = pageSize;
|
|
984
1029
|
|
|
985
1030
|
const response = await PlatformAPIClient.execute(
|
|
986
1031
|
this.config,
|
|
987
|
-
"
|
|
988
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1032
|
+
"post",
|
|
1033
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ordering-store/stores/filter`,
|
|
989
1034
|
query_params,
|
|
990
1035
|
body
|
|
991
1036
|
);
|
|
992
1037
|
|
|
993
1038
|
const {
|
|
994
1039
|
error: res_error,
|
|
995
|
-
} = ConfigurationModel.
|
|
1040
|
+
} = ConfigurationModel.OrderingStores().validate(response, {
|
|
996
1041
|
abortEarly: false,
|
|
997
1042
|
allowUnknown: false,
|
|
998
1043
|
});
|
|
@@ -1000,7 +1045,7 @@ class Configuration {
|
|
|
1000
1045
|
if (res_error) {
|
|
1001
1046
|
Logger({
|
|
1002
1047
|
level: "WARN",
|
|
1003
|
-
message: "Response Validation Warnnings for
|
|
1048
|
+
message: "Response Validation Warnnings for getOrderingStoresByFilter",
|
|
1004
1049
|
});
|
|
1005
1050
|
Logger({ level: "WARN", message: res_error });
|
|
1006
1051
|
}
|
|
@@ -1010,17 +1055,52 @@ class Configuration {
|
|
|
1010
1055
|
|
|
1011
1056
|
/**
|
|
1012
1057
|
* @param {Object} arg - Arg object.
|
|
1013
|
-
* @param {
|
|
1014
|
-
* @
|
|
1015
|
-
* @
|
|
1016
|
-
* @
|
|
1058
|
+
* @param {string} arg.companyId - Current company id
|
|
1059
|
+
* @param {string} arg.applicationId - Current application id
|
|
1060
|
+
* @param {number} [arg.pageSize] - Current request items count
|
|
1061
|
+
* @param {FilterOrderingStoreRequest} arg.body
|
|
1062
|
+
* @summary: Get ordering store by filter
|
|
1063
|
+
* @description: Get ordering store by filter
|
|
1017
1064
|
*/
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1065
|
+
getOrderingStoresByFilterPaginator({
|
|
1066
|
+
companyId,
|
|
1067
|
+
applicationId,
|
|
1068
|
+
pageSize,
|
|
1069
|
+
body,
|
|
1070
|
+
} = {}) {
|
|
1071
|
+
const paginator = new Paginator();
|
|
1072
|
+
const callback = async () => {
|
|
1073
|
+
const pageId = paginator.nextId;
|
|
1074
|
+
const pageNo = paginator.pageNo;
|
|
1075
|
+
const pageType = "number";
|
|
1076
|
+
const data = await this.getOrderingStoresByFilter({
|
|
1077
|
+
companyId: companyId,
|
|
1078
|
+
applicationId: applicationId,
|
|
1079
|
+
body: body,
|
|
1080
|
+
pageNo: pageNo,
|
|
1081
|
+
pageSize: pageSize,
|
|
1082
|
+
});
|
|
1083
|
+
paginator.setPaginator({
|
|
1084
|
+
hasNext: data.page.has_next ? true : false,
|
|
1085
|
+
nextId: data.page.next_id,
|
|
1086
|
+
});
|
|
1087
|
+
return data;
|
|
1088
|
+
};
|
|
1089
|
+
paginator.setCallback(callback.bind(this));
|
|
1090
|
+
return paginator;
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
/**
|
|
1094
|
+
* @param {Object} arg - Arg object.
|
|
1095
|
+
* @param {string} arg.platformType - Current platform name
|
|
1096
|
+
* @returns {Promise<BuildVersionHistory>} - Success response
|
|
1097
|
+
* @summary: Get previous build versions
|
|
1098
|
+
* @description: Get previous build versions
|
|
1099
|
+
*/
|
|
1100
|
+
async getPreviousVersions({ platformType } = {}) {
|
|
1101
|
+
const { error } = ConfigurationValidator.getPreviousVersions().validate(
|
|
1022
1102
|
{
|
|
1023
|
-
|
|
1103
|
+
platformType,
|
|
1024
1104
|
},
|
|
1025
1105
|
{ abortEarly: false, allowUnknown: true }
|
|
1026
1106
|
);
|
|
@@ -1031,17 +1111,16 @@ class Configuration {
|
|
|
1031
1111
|
// Showing warrnings if extra unknown parameters are found
|
|
1032
1112
|
const {
|
|
1033
1113
|
error: warrning,
|
|
1034
|
-
} = ConfigurationValidator.
|
|
1114
|
+
} = ConfigurationValidator.getPreviousVersions().validate(
|
|
1035
1115
|
{
|
|
1036
|
-
|
|
1116
|
+
platformType,
|
|
1037
1117
|
},
|
|
1038
1118
|
{ abortEarly: false, allowUnknown: false }
|
|
1039
1119
|
);
|
|
1040
1120
|
if (warrning) {
|
|
1041
1121
|
Logger({
|
|
1042
1122
|
level: "WARN",
|
|
1043
|
-
message:
|
|
1044
|
-
"Parameter Validation warrnings for partiallyUpdateInventoryConfig",
|
|
1123
|
+
message: "Parameter Validation warrnings for getPreviousVersions",
|
|
1045
1124
|
});
|
|
1046
1125
|
Logger({ level: "WARN", message: warrning });
|
|
1047
1126
|
}
|
|
@@ -1050,15 +1129,15 @@ class Configuration {
|
|
|
1050
1129
|
|
|
1051
1130
|
const response = await PlatformAPIClient.execute(
|
|
1052
1131
|
this.config,
|
|
1053
|
-
"
|
|
1054
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1132
|
+
"get",
|
|
1133
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/build/${platformType}/versions`,
|
|
1055
1134
|
query_params,
|
|
1056
|
-
|
|
1135
|
+
undefined
|
|
1057
1136
|
);
|
|
1058
1137
|
|
|
1059
1138
|
const {
|
|
1060
1139
|
error: res_error,
|
|
1061
|
-
} = ConfigurationModel.
|
|
1140
|
+
} = ConfigurationModel.BuildVersionHistory().validate(response, {
|
|
1062
1141
|
abortEarly: false,
|
|
1063
1142
|
allowUnknown: false,
|
|
1064
1143
|
});
|
|
@@ -1066,8 +1145,7 @@ class Configuration {
|
|
|
1066
1145
|
if (res_error) {
|
|
1067
1146
|
Logger({
|
|
1068
1147
|
level: "WARN",
|
|
1069
|
-
message:
|
|
1070
|
-
"Response Validation Warnnings for partiallyUpdateInventoryConfig",
|
|
1148
|
+
message: "Response Validation Warnnings for getPreviousVersions",
|
|
1071
1149
|
});
|
|
1072
1150
|
Logger({ level: "WARN", message: res_error });
|
|
1073
1151
|
}
|
|
@@ -1077,13 +1155,22 @@ class Configuration {
|
|
|
1077
1155
|
|
|
1078
1156
|
/**
|
|
1079
1157
|
* @param {Object} arg - Arg object.
|
|
1080
|
-
* @
|
|
1081
|
-
*
|
|
1082
|
-
* @
|
|
1158
|
+
* @param {number} [arg.pageNo] - The page number to navigate through the
|
|
1159
|
+
* given set of results. Default value is 1.
|
|
1160
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
1161
|
+
* page. Default value is 10.
|
|
1162
|
+
* @param {string} [arg.q] - Store code or name of the ordering store.
|
|
1163
|
+
* @returns {Promise<OrderingStoresResponse>} - Success response
|
|
1164
|
+
* @summary: Get deployment stores
|
|
1165
|
+
* @description: Use this API to retrieve the details of all stores access given to the staff member (the selling locations where the application will be utilized for placing orders).
|
|
1083
1166
|
*/
|
|
1084
|
-
async
|
|
1085
|
-
const { error } = ConfigurationValidator.
|
|
1086
|
-
{
|
|
1167
|
+
async getStaffOrderingStores({ pageNo, pageSize, q } = {}) {
|
|
1168
|
+
const { error } = ConfigurationValidator.getStaffOrderingStores().validate(
|
|
1169
|
+
{
|
|
1170
|
+
pageNo,
|
|
1171
|
+
pageSize,
|
|
1172
|
+
q,
|
|
1173
|
+
},
|
|
1087
1174
|
{ abortEarly: false, allowUnknown: true }
|
|
1088
1175
|
);
|
|
1089
1176
|
if (error) {
|
|
@@ -1093,31 +1180,38 @@ class Configuration {
|
|
|
1093
1180
|
// Showing warrnings if extra unknown parameters are found
|
|
1094
1181
|
const {
|
|
1095
1182
|
error: warrning,
|
|
1096
|
-
} = ConfigurationValidator.
|
|
1097
|
-
{
|
|
1183
|
+
} = ConfigurationValidator.getStaffOrderingStores().validate(
|
|
1184
|
+
{
|
|
1185
|
+
pageNo,
|
|
1186
|
+
pageSize,
|
|
1187
|
+
q,
|
|
1188
|
+
},
|
|
1098
1189
|
{ abortEarly: false, allowUnknown: false }
|
|
1099
1190
|
);
|
|
1100
1191
|
if (warrning) {
|
|
1101
1192
|
Logger({
|
|
1102
1193
|
level: "WARN",
|
|
1103
|
-
message: "Parameter Validation warrnings for
|
|
1194
|
+
message: "Parameter Validation warrnings for getStaffOrderingStores",
|
|
1104
1195
|
});
|
|
1105
1196
|
Logger({ level: "WARN", message: warrning });
|
|
1106
1197
|
}
|
|
1107
1198
|
|
|
1108
1199
|
const query_params = {};
|
|
1200
|
+
query_params["page_no"] = pageNo;
|
|
1201
|
+
query_params["page_size"] = pageSize;
|
|
1202
|
+
query_params["q"] = q;
|
|
1109
1203
|
|
|
1110
1204
|
const response = await PlatformAPIClient.execute(
|
|
1111
1205
|
this.config,
|
|
1112
1206
|
"get",
|
|
1113
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1207
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ordering-store/staff-stores`,
|
|
1114
1208
|
query_params,
|
|
1115
1209
|
undefined
|
|
1116
1210
|
);
|
|
1117
1211
|
|
|
1118
1212
|
const {
|
|
1119
1213
|
error: res_error,
|
|
1120
|
-
} = ConfigurationModel.
|
|
1214
|
+
} = ConfigurationModel.OrderingStoresResponse().validate(response, {
|
|
1121
1215
|
abortEarly: false,
|
|
1122
1216
|
allowUnknown: false,
|
|
1123
1217
|
});
|
|
@@ -1125,7 +1219,7 @@ class Configuration {
|
|
|
1125
1219
|
if (res_error) {
|
|
1126
1220
|
Logger({
|
|
1127
1221
|
level: "WARN",
|
|
1128
|
-
message: "Response Validation Warnnings for
|
|
1222
|
+
message: "Response Validation Warnnings for getStaffOrderingStores",
|
|
1129
1223
|
});
|
|
1130
1224
|
Logger({ level: "WARN", message: res_error });
|
|
1131
1225
|
}
|
|
@@ -1135,13 +1229,51 @@ class Configuration {
|
|
|
1135
1229
|
|
|
1136
1230
|
/**
|
|
1137
1231
|
* @param {Object} arg - Arg object.
|
|
1138
|
-
* @param {
|
|
1139
|
-
* @
|
|
1140
|
-
* @
|
|
1141
|
-
*
|
|
1232
|
+
* @param {string} arg.companyId - Current company id
|
|
1233
|
+
* @param {string} arg.applicationId - Current application id
|
|
1234
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
1235
|
+
* page. Default value is 10.
|
|
1236
|
+
* @param {string} [arg.q] - Store code or name of the ordering store.
|
|
1237
|
+
* @summary: Get deployment stores
|
|
1238
|
+
* @description: Use this API to retrieve the details of all stores access given to the staff member (the selling locations where the application will be utilized for placing orders).
|
|
1142
1239
|
*/
|
|
1143
|
-
|
|
1144
|
-
|
|
1240
|
+
getStaffOrderingStoresPaginator({
|
|
1241
|
+
companyId,
|
|
1242
|
+
applicationId,
|
|
1243
|
+
pageSize,
|
|
1244
|
+
q,
|
|
1245
|
+
} = {}) {
|
|
1246
|
+
const paginator = new Paginator();
|
|
1247
|
+
const callback = async () => {
|
|
1248
|
+
const pageId = paginator.nextId;
|
|
1249
|
+
const pageNo = paginator.pageNo;
|
|
1250
|
+
const pageType = "number";
|
|
1251
|
+
const data = await this.getStaffOrderingStores({
|
|
1252
|
+
companyId: companyId,
|
|
1253
|
+
applicationId: applicationId,
|
|
1254
|
+
pageNo: pageNo,
|
|
1255
|
+
pageSize: pageSize,
|
|
1256
|
+
q: q,
|
|
1257
|
+
});
|
|
1258
|
+
paginator.setPaginator({
|
|
1259
|
+
hasNext: data.page.has_next ? true : false,
|
|
1260
|
+
nextId: data.page.next_id,
|
|
1261
|
+
});
|
|
1262
|
+
return data;
|
|
1263
|
+
};
|
|
1264
|
+
paginator.setCallback(callback.bind(this));
|
|
1265
|
+
return paginator;
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
/**
|
|
1269
|
+
* @param {Object} arg - Arg object.
|
|
1270
|
+
* @param {AppFeatureRequest} arg.body
|
|
1271
|
+
* @returns {Promise<AppFeature>} - Success response
|
|
1272
|
+
* @summary: Update features of application
|
|
1273
|
+
* @description: Update features of application
|
|
1274
|
+
*/
|
|
1275
|
+
async modifyAppFeatures({ body } = {}) {
|
|
1276
|
+
const { error } = ConfigurationValidator.modifyAppFeatures().validate(
|
|
1145
1277
|
{
|
|
1146
1278
|
body,
|
|
1147
1279
|
},
|
|
@@ -1154,7 +1286,7 @@ class Configuration {
|
|
|
1154
1286
|
// Showing warrnings if extra unknown parameters are found
|
|
1155
1287
|
const {
|
|
1156
1288
|
error: warrning,
|
|
1157
|
-
} = ConfigurationValidator.
|
|
1289
|
+
} = ConfigurationValidator.modifyAppFeatures().validate(
|
|
1158
1290
|
{
|
|
1159
1291
|
body,
|
|
1160
1292
|
},
|
|
@@ -1163,7 +1295,7 @@ class Configuration {
|
|
|
1163
1295
|
if (warrning) {
|
|
1164
1296
|
Logger({
|
|
1165
1297
|
level: "WARN",
|
|
1166
|
-
message: "Parameter Validation warrnings for
|
|
1298
|
+
message: "Parameter Validation warrnings for modifyAppFeatures",
|
|
1167
1299
|
});
|
|
1168
1300
|
Logger({ level: "WARN", message: warrning });
|
|
1169
1301
|
}
|
|
@@ -1172,15 +1304,15 @@ class Configuration {
|
|
|
1172
1304
|
|
|
1173
1305
|
const response = await PlatformAPIClient.execute(
|
|
1174
1306
|
this.config,
|
|
1175
|
-
"
|
|
1176
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1307
|
+
"patch",
|
|
1308
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/feature`,
|
|
1177
1309
|
query_params,
|
|
1178
1310
|
body
|
|
1179
1311
|
);
|
|
1180
1312
|
|
|
1181
1313
|
const {
|
|
1182
1314
|
error: res_error,
|
|
1183
|
-
} = ConfigurationModel.
|
|
1315
|
+
} = ConfigurationModel.AppFeature().validate(response, {
|
|
1184
1316
|
abortEarly: false,
|
|
1185
1317
|
allowUnknown: false,
|
|
1186
1318
|
});
|
|
@@ -1188,7 +1320,7 @@ class Configuration {
|
|
|
1188
1320
|
if (res_error) {
|
|
1189
1321
|
Logger({
|
|
1190
1322
|
level: "WARN",
|
|
1191
|
-
message: "Response Validation Warnnings for
|
|
1323
|
+
message: "Response Validation Warnnings for modifyAppFeatures",
|
|
1192
1324
|
});
|
|
1193
1325
|
Logger({ level: "WARN", message: res_error });
|
|
1194
1326
|
}
|
|
@@ -1198,13 +1330,18 @@ class Configuration {
|
|
|
1198
1330
|
|
|
1199
1331
|
/**
|
|
1200
1332
|
* @param {Object} arg - Arg object.
|
|
1201
|
-
* @
|
|
1202
|
-
* @
|
|
1203
|
-
* @
|
|
1333
|
+
* @param {AppInventoryPartialUpdate} arg.body
|
|
1334
|
+
* @returns {Promise<ApplicationInventory>} - Success response
|
|
1335
|
+
* @summary: Partially update application configuration
|
|
1336
|
+
* @description: Partially update application configuration for various features and data
|
|
1204
1337
|
*/
|
|
1205
|
-
async
|
|
1206
|
-
const {
|
|
1207
|
-
|
|
1338
|
+
async partiallyUpdateInventoryConfig({ body } = {}) {
|
|
1339
|
+
const {
|
|
1340
|
+
error,
|
|
1341
|
+
} = ConfigurationValidator.partiallyUpdateInventoryConfig().validate(
|
|
1342
|
+
{
|
|
1343
|
+
body,
|
|
1344
|
+
},
|
|
1208
1345
|
{ abortEarly: false, allowUnknown: true }
|
|
1209
1346
|
);
|
|
1210
1347
|
if (error) {
|
|
@@ -1214,14 +1351,17 @@ class Configuration {
|
|
|
1214
1351
|
// Showing warrnings if extra unknown parameters are found
|
|
1215
1352
|
const {
|
|
1216
1353
|
error: warrning,
|
|
1217
|
-
} = ConfigurationValidator.
|
|
1218
|
-
{
|
|
1354
|
+
} = ConfigurationValidator.partiallyUpdateInventoryConfig().validate(
|
|
1355
|
+
{
|
|
1356
|
+
body,
|
|
1357
|
+
},
|
|
1219
1358
|
{ abortEarly: false, allowUnknown: false }
|
|
1220
1359
|
);
|
|
1221
1360
|
if (warrning) {
|
|
1222
1361
|
Logger({
|
|
1223
1362
|
level: "WARN",
|
|
1224
|
-
message:
|
|
1363
|
+
message:
|
|
1364
|
+
"Parameter Validation warrnings for partiallyUpdateInventoryConfig",
|
|
1225
1365
|
});
|
|
1226
1366
|
Logger({ level: "WARN", message: warrning });
|
|
1227
1367
|
}
|
|
@@ -1230,15 +1370,15 @@ class Configuration {
|
|
|
1230
1370
|
|
|
1231
1371
|
const response = await PlatformAPIClient.execute(
|
|
1232
1372
|
this.config,
|
|
1233
|
-
"
|
|
1234
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1373
|
+
"patch",
|
|
1374
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/configuration`,
|
|
1235
1375
|
query_params,
|
|
1236
|
-
|
|
1376
|
+
body
|
|
1237
1377
|
);
|
|
1238
1378
|
|
|
1239
1379
|
const {
|
|
1240
1380
|
error: res_error,
|
|
1241
|
-
} = ConfigurationModel.
|
|
1381
|
+
} = ConfigurationModel.ApplicationInventory().validate(response, {
|
|
1242
1382
|
abortEarly: false,
|
|
1243
1383
|
allowUnknown: false,
|
|
1244
1384
|
});
|
|
@@ -1246,7 +1386,8 @@ class Configuration {
|
|
|
1246
1386
|
if (res_error) {
|
|
1247
1387
|
Logger({
|
|
1248
1388
|
level: "WARN",
|
|
1249
|
-
message:
|
|
1389
|
+
message:
|
|
1390
|
+
"Response Validation Warnnings for partiallyUpdateInventoryConfig",
|
|
1250
1391
|
});
|
|
1251
1392
|
Logger({ level: "WARN", message: res_error });
|
|
1252
1393
|
}
|
|
@@ -1256,21 +1397,15 @@ class Configuration {
|
|
|
1256
1397
|
|
|
1257
1398
|
/**
|
|
1258
1399
|
* @param {Object} arg - Arg object.
|
|
1259
|
-
* @param {
|
|
1260
|
-
* @
|
|
1261
|
-
* @
|
|
1262
|
-
* @
|
|
1263
|
-
* @summary: Get ordering store by filter
|
|
1264
|
-
* @description: Get ordering store by filter
|
|
1400
|
+
* @param {string} arg.id - Domain _id
|
|
1401
|
+
* @returns {Promise<SuccessMessageResponse>} - Success response
|
|
1402
|
+
* @summary: Remove attached domain
|
|
1403
|
+
* @description: Remove attached domain.
|
|
1265
1404
|
*/
|
|
1266
|
-
async
|
|
1267
|
-
const {
|
|
1268
|
-
error,
|
|
1269
|
-
} = ConfigurationValidator.getOrderingStoresByFilter().validate(
|
|
1405
|
+
async removeDomainById({ id } = {}) {
|
|
1406
|
+
const { error } = ConfigurationValidator.removeDomainById().validate(
|
|
1270
1407
|
{
|
|
1271
|
-
|
|
1272
|
-
pageNo,
|
|
1273
|
-
pageSize,
|
|
1408
|
+
id,
|
|
1274
1409
|
},
|
|
1275
1410
|
{ abortEarly: false, allowUnknown: true }
|
|
1276
1411
|
);
|
|
@@ -1281,37 +1416,33 @@ class Configuration {
|
|
|
1281
1416
|
// Showing warrnings if extra unknown parameters are found
|
|
1282
1417
|
const {
|
|
1283
1418
|
error: warrning,
|
|
1284
|
-
} = ConfigurationValidator.
|
|
1419
|
+
} = ConfigurationValidator.removeDomainById().validate(
|
|
1285
1420
|
{
|
|
1286
|
-
|
|
1287
|
-
pageNo,
|
|
1288
|
-
pageSize,
|
|
1421
|
+
id,
|
|
1289
1422
|
},
|
|
1290
1423
|
{ abortEarly: false, allowUnknown: false }
|
|
1291
1424
|
);
|
|
1292
1425
|
if (warrning) {
|
|
1293
1426
|
Logger({
|
|
1294
1427
|
level: "WARN",
|
|
1295
|
-
message: "Parameter Validation warrnings for
|
|
1428
|
+
message: "Parameter Validation warrnings for removeDomainById",
|
|
1296
1429
|
});
|
|
1297
1430
|
Logger({ level: "WARN", message: warrning });
|
|
1298
1431
|
}
|
|
1299
1432
|
|
|
1300
1433
|
const query_params = {};
|
|
1301
|
-
query_params["page_no"] = pageNo;
|
|
1302
|
-
query_params["page_size"] = pageSize;
|
|
1303
1434
|
|
|
1304
1435
|
const response = await PlatformAPIClient.execute(
|
|
1305
1436
|
this.config,
|
|
1306
|
-
"
|
|
1307
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1437
|
+
"delete",
|
|
1438
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain/${id}`,
|
|
1308
1439
|
query_params,
|
|
1309
|
-
|
|
1440
|
+
undefined
|
|
1310
1441
|
);
|
|
1311
1442
|
|
|
1312
1443
|
const {
|
|
1313
1444
|
error: res_error,
|
|
1314
|
-
} = ConfigurationModel.
|
|
1445
|
+
} = ConfigurationModel.SuccessMessageResponse().validate(response, {
|
|
1315
1446
|
abortEarly: false,
|
|
1316
1447
|
allowUnknown: false,
|
|
1317
1448
|
});
|
|
@@ -1319,7 +1450,7 @@ class Configuration {
|
|
|
1319
1450
|
if (res_error) {
|
|
1320
1451
|
Logger({
|
|
1321
1452
|
level: "WARN",
|
|
1322
|
-
message: "Response Validation Warnnings for
|
|
1453
|
+
message: "Response Validation Warnnings for removeDomainById",
|
|
1323
1454
|
});
|
|
1324
1455
|
Logger({ level: "WARN", message: res_error });
|
|
1325
1456
|
}
|
|
@@ -1329,52 +1460,13 @@ class Configuration {
|
|
|
1329
1460
|
|
|
1330
1461
|
/**
|
|
1331
1462
|
* @param {Object} arg - Arg object.
|
|
1332
|
-
* @param {
|
|
1333
|
-
* @
|
|
1334
|
-
* @
|
|
1335
|
-
* @
|
|
1336
|
-
* @summary: Get ordering store by filter
|
|
1337
|
-
* @description: Get ordering store by filter
|
|
1338
|
-
*/
|
|
1339
|
-
getOrderingStoresByFilterPaginator({
|
|
1340
|
-
companyId,
|
|
1341
|
-
applicationId,
|
|
1342
|
-
pageSize,
|
|
1343
|
-
body,
|
|
1344
|
-
} = {}) {
|
|
1345
|
-
const paginator = new Paginator();
|
|
1346
|
-
const callback = async () => {
|
|
1347
|
-
const pageId = paginator.nextId;
|
|
1348
|
-
const pageNo = paginator.pageNo;
|
|
1349
|
-
const pageType = "number";
|
|
1350
|
-
const data = await this.getOrderingStoresByFilter({
|
|
1351
|
-
companyId: companyId,
|
|
1352
|
-
applicationId: applicationId,
|
|
1353
|
-
body: body,
|
|
1354
|
-
pageNo: pageNo,
|
|
1355
|
-
pageSize: pageSize,
|
|
1356
|
-
});
|
|
1357
|
-
paginator.setPaginator({
|
|
1358
|
-
hasNext: data.page.has_next ? true : false,
|
|
1359
|
-
nextId: data.page.next_id,
|
|
1360
|
-
});
|
|
1361
|
-
return data;
|
|
1362
|
-
};
|
|
1363
|
-
paginator.setCallback(callback.bind(this));
|
|
1364
|
-
return paginator;
|
|
1365
|
-
}
|
|
1366
|
-
|
|
1367
|
-
/**
|
|
1368
|
-
* @param {Object} arg - Arg object.
|
|
1369
|
-
* @param {OrderingStoreConfig} arg.body
|
|
1370
|
-
* @returns {Promise<DeploymentMeta>} - Success response
|
|
1371
|
-
* @summary: Add/Update ordering store config
|
|
1372
|
-
* @description: Add/Update ordering store config.
|
|
1463
|
+
* @param {TokenResponse} arg.body
|
|
1464
|
+
* @returns {Promise<TokenResponse>} - Success response
|
|
1465
|
+
* @summary: Add social tokens
|
|
1466
|
+
* @description: Add social tokens.
|
|
1373
1467
|
*/
|
|
1374
|
-
async
|
|
1375
|
-
const {
|
|
1376
|
-
error,
|
|
1377
|
-
} = ConfigurationValidator.updateOrderingStoreConfig().validate(
|
|
1468
|
+
async updateAppApiTokens({ body } = {}) {
|
|
1469
|
+
const { error } = ConfigurationValidator.updateAppApiTokens().validate(
|
|
1378
1470
|
{
|
|
1379
1471
|
body,
|
|
1380
1472
|
},
|
|
@@ -1387,7 +1479,7 @@ class Configuration {
|
|
|
1387
1479
|
// Showing warrnings if extra unknown parameters are found
|
|
1388
1480
|
const {
|
|
1389
1481
|
error: warrning,
|
|
1390
|
-
} = ConfigurationValidator.
|
|
1482
|
+
} = ConfigurationValidator.updateAppApiTokens().validate(
|
|
1391
1483
|
{
|
|
1392
1484
|
body,
|
|
1393
1485
|
},
|
|
@@ -1396,7 +1488,7 @@ class Configuration {
|
|
|
1396
1488
|
if (warrning) {
|
|
1397
1489
|
Logger({
|
|
1398
1490
|
level: "WARN",
|
|
1399
|
-
message: "Parameter Validation warrnings for
|
|
1491
|
+
message: "Parameter Validation warrnings for updateAppApiTokens",
|
|
1400
1492
|
});
|
|
1401
1493
|
Logger({ level: "WARN", message: warrning });
|
|
1402
1494
|
}
|
|
@@ -1406,14 +1498,14 @@ class Configuration {
|
|
|
1406
1498
|
const response = await PlatformAPIClient.execute(
|
|
1407
1499
|
this.config,
|
|
1408
1500
|
"post",
|
|
1409
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1501
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/token`,
|
|
1410
1502
|
query_params,
|
|
1411
1503
|
body
|
|
1412
1504
|
);
|
|
1413
1505
|
|
|
1414
1506
|
const {
|
|
1415
1507
|
error: res_error,
|
|
1416
|
-
} = ConfigurationModel.
|
|
1508
|
+
} = ConfigurationModel.TokenResponse().validate(response, {
|
|
1417
1509
|
abortEarly: false,
|
|
1418
1510
|
allowUnknown: false,
|
|
1419
1511
|
});
|
|
@@ -1421,7 +1513,7 @@ class Configuration {
|
|
|
1421
1513
|
if (res_error) {
|
|
1422
1514
|
Logger({
|
|
1423
1515
|
level: "WARN",
|
|
1424
|
-
message: "Response Validation Warnnings for
|
|
1516
|
+
message: "Response Validation Warnnings for updateAppApiTokens",
|
|
1425
1517
|
});
|
|
1426
1518
|
Logger({ level: "WARN", message: res_error });
|
|
1427
1519
|
}
|
|
@@ -1430,22 +1522,16 @@ class Configuration {
|
|
|
1430
1522
|
}
|
|
1431
1523
|
|
|
1432
1524
|
/**
|
|
1433
|
-
* @param {Object} arg - Arg object.
|
|
1434
|
-
* @param {
|
|
1435
|
-
*
|
|
1436
|
-
* @
|
|
1437
|
-
*
|
|
1438
|
-
* @param {string} [arg.q] - Store code or name of the ordering store.
|
|
1439
|
-
* @returns {Promise<OrderingStoresResponse>} - Success response
|
|
1440
|
-
* @summary: Get deployment stores
|
|
1441
|
-
* @description: Use this API to retrieve the details of all stores access given to the staff member (the selling locations where the application will be utilized for placing orders).
|
|
1525
|
+
* @param {Object} arg - Arg object.
|
|
1526
|
+
* @param {ApplicationDetail} arg.body
|
|
1527
|
+
* @returns {Promise<ApplicationDetail>} - Success response
|
|
1528
|
+
* @summary: Add or update application's basic details
|
|
1529
|
+
* @description: Add or update application's basic details
|
|
1442
1530
|
*/
|
|
1443
|
-
async
|
|
1444
|
-
const { error } = ConfigurationValidator.
|
|
1531
|
+
async updateAppBasicDetails({ body } = {}) {
|
|
1532
|
+
const { error } = ConfigurationValidator.updateAppBasicDetails().validate(
|
|
1445
1533
|
{
|
|
1446
|
-
|
|
1447
|
-
pageSize,
|
|
1448
|
-
q,
|
|
1534
|
+
body,
|
|
1449
1535
|
},
|
|
1450
1536
|
{ abortEarly: false, allowUnknown: true }
|
|
1451
1537
|
);
|
|
@@ -1456,38 +1542,33 @@ class Configuration {
|
|
|
1456
1542
|
// Showing warrnings if extra unknown parameters are found
|
|
1457
1543
|
const {
|
|
1458
1544
|
error: warrning,
|
|
1459
|
-
} = ConfigurationValidator.
|
|
1545
|
+
} = ConfigurationValidator.updateAppBasicDetails().validate(
|
|
1460
1546
|
{
|
|
1461
|
-
|
|
1462
|
-
pageSize,
|
|
1463
|
-
q,
|
|
1547
|
+
body,
|
|
1464
1548
|
},
|
|
1465
1549
|
{ abortEarly: false, allowUnknown: false }
|
|
1466
1550
|
);
|
|
1467
1551
|
if (warrning) {
|
|
1468
1552
|
Logger({
|
|
1469
1553
|
level: "WARN",
|
|
1470
|
-
message: "Parameter Validation warrnings for
|
|
1554
|
+
message: "Parameter Validation warrnings for updateAppBasicDetails",
|
|
1471
1555
|
});
|
|
1472
1556
|
Logger({ level: "WARN", message: warrning });
|
|
1473
1557
|
}
|
|
1474
1558
|
|
|
1475
1559
|
const query_params = {};
|
|
1476
|
-
query_params["page_no"] = pageNo;
|
|
1477
|
-
query_params["page_size"] = pageSize;
|
|
1478
|
-
query_params["q"] = q;
|
|
1479
1560
|
|
|
1480
1561
|
const response = await PlatformAPIClient.execute(
|
|
1481
1562
|
this.config,
|
|
1482
|
-
"
|
|
1483
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1563
|
+
"put",
|
|
1564
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/detail`,
|
|
1484
1565
|
query_params,
|
|
1485
|
-
|
|
1566
|
+
body
|
|
1486
1567
|
);
|
|
1487
1568
|
|
|
1488
1569
|
const {
|
|
1489
1570
|
error: res_error,
|
|
1490
|
-
} = ConfigurationModel.
|
|
1571
|
+
} = ConfigurationModel.ApplicationDetail().validate(response, {
|
|
1491
1572
|
abortEarly: false,
|
|
1492
1573
|
allowUnknown: false,
|
|
1493
1574
|
});
|
|
@@ -1495,7 +1576,7 @@ class Configuration {
|
|
|
1495
1576
|
if (res_error) {
|
|
1496
1577
|
Logger({
|
|
1497
1578
|
level: "WARN",
|
|
1498
|
-
message: "Response Validation Warnnings for
|
|
1579
|
+
message: "Response Validation Warnnings for updateAppBasicDetails",
|
|
1499
1580
|
});
|
|
1500
1581
|
Logger({ level: "WARN", message: res_error });
|
|
1501
1582
|
}
|
|
@@ -1505,51 +1586,16 @@ class Configuration {
|
|
|
1505
1586
|
|
|
1506
1587
|
/**
|
|
1507
1588
|
* @param {Object} arg - Arg object.
|
|
1508
|
-
* @param {
|
|
1509
|
-
* @
|
|
1510
|
-
* @
|
|
1511
|
-
*
|
|
1512
|
-
* @param {string} [arg.q] - Store code or name of the ordering store.
|
|
1513
|
-
* @summary: Get deployment stores
|
|
1514
|
-
* @description: Use this API to retrieve the details of all stores access given to the staff member (the selling locations where the application will be utilized for placing orders).
|
|
1515
|
-
*/
|
|
1516
|
-
getStaffOrderingStoresPaginator({
|
|
1517
|
-
companyId,
|
|
1518
|
-
applicationId,
|
|
1519
|
-
pageSize,
|
|
1520
|
-
q,
|
|
1521
|
-
} = {}) {
|
|
1522
|
-
const paginator = new Paginator();
|
|
1523
|
-
const callback = async () => {
|
|
1524
|
-
const pageId = paginator.nextId;
|
|
1525
|
-
const pageNo = paginator.pageNo;
|
|
1526
|
-
const pageType = "number";
|
|
1527
|
-
const data = await this.getStaffOrderingStores({
|
|
1528
|
-
companyId: companyId,
|
|
1529
|
-
applicationId: applicationId,
|
|
1530
|
-
pageNo: pageNo,
|
|
1531
|
-
pageSize: pageSize,
|
|
1532
|
-
q: q,
|
|
1533
|
-
});
|
|
1534
|
-
paginator.setPaginator({
|
|
1535
|
-
hasNext: data.page.has_next ? true : false,
|
|
1536
|
-
nextId: data.page.next_id,
|
|
1537
|
-
});
|
|
1538
|
-
return data;
|
|
1539
|
-
};
|
|
1540
|
-
paginator.setCallback(callback.bind(this));
|
|
1541
|
-
return paginator;
|
|
1542
|
-
}
|
|
1543
|
-
|
|
1544
|
-
/**
|
|
1545
|
-
* @param {Object} arg - Arg object.
|
|
1546
|
-
* @returns {Promise<DomainsResponse>} - Success response
|
|
1547
|
-
* @summary: Get attached domain list
|
|
1548
|
-
* @description: Get attached domain list.
|
|
1589
|
+
* @param {ApplicationInformation} arg.body
|
|
1590
|
+
* @returns {Promise<ApplicationInformation>} - Success response
|
|
1591
|
+
* @summary: Get application information
|
|
1592
|
+
* @description: Save Application Current Information. This includes information about social links, address and contact information of an application.
|
|
1549
1593
|
*/
|
|
1550
|
-
async
|
|
1551
|
-
const { error } = ConfigurationValidator.
|
|
1552
|
-
{
|
|
1594
|
+
async updateAppContactInfo({ body } = {}) {
|
|
1595
|
+
const { error } = ConfigurationValidator.updateAppContactInfo().validate(
|
|
1596
|
+
{
|
|
1597
|
+
body,
|
|
1598
|
+
},
|
|
1553
1599
|
{ abortEarly: false, allowUnknown: true }
|
|
1554
1600
|
);
|
|
1555
1601
|
if (error) {
|
|
@@ -1557,14 +1603,18 @@ class Configuration {
|
|
|
1557
1603
|
}
|
|
1558
1604
|
|
|
1559
1605
|
// Showing warrnings if extra unknown parameters are found
|
|
1560
|
-
const {
|
|
1561
|
-
|
|
1606
|
+
const {
|
|
1607
|
+
error: warrning,
|
|
1608
|
+
} = ConfigurationValidator.updateAppContactInfo().validate(
|
|
1609
|
+
{
|
|
1610
|
+
body,
|
|
1611
|
+
},
|
|
1562
1612
|
{ abortEarly: false, allowUnknown: false }
|
|
1563
1613
|
);
|
|
1564
1614
|
if (warrning) {
|
|
1565
1615
|
Logger({
|
|
1566
1616
|
level: "WARN",
|
|
1567
|
-
message: "Parameter Validation warrnings for
|
|
1617
|
+
message: "Parameter Validation warrnings for updateAppContactInfo",
|
|
1568
1618
|
});
|
|
1569
1619
|
Logger({ level: "WARN", message: warrning });
|
|
1570
1620
|
}
|
|
@@ -1573,15 +1623,15 @@ class Configuration {
|
|
|
1573
1623
|
|
|
1574
1624
|
const response = await PlatformAPIClient.execute(
|
|
1575
1625
|
this.config,
|
|
1576
|
-
"
|
|
1577
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1626
|
+
"put",
|
|
1627
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/information`,
|
|
1578
1628
|
query_params,
|
|
1579
|
-
|
|
1629
|
+
body
|
|
1580
1630
|
);
|
|
1581
1631
|
|
|
1582
1632
|
const {
|
|
1583
1633
|
error: res_error,
|
|
1584
|
-
} = ConfigurationModel.
|
|
1634
|
+
} = ConfigurationModel.ApplicationInformation().validate(response, {
|
|
1585
1635
|
abortEarly: false,
|
|
1586
1636
|
allowUnknown: false,
|
|
1587
1637
|
});
|
|
@@ -1589,7 +1639,7 @@ class Configuration {
|
|
|
1589
1639
|
if (res_error) {
|
|
1590
1640
|
Logger({
|
|
1591
1641
|
level: "WARN",
|
|
1592
|
-
message: "Response Validation Warnnings for
|
|
1642
|
+
message: "Response Validation Warnnings for updateAppContactInfo",
|
|
1593
1643
|
});
|
|
1594
1644
|
Logger({ level: "WARN", message: res_error });
|
|
1595
1645
|
}
|
|
@@ -1599,13 +1649,13 @@ class Configuration {
|
|
|
1599
1649
|
|
|
1600
1650
|
/**
|
|
1601
1651
|
* @param {Object} arg - Arg object.
|
|
1602
|
-
* @param {
|
|
1603
|
-
* @returns {Promise<
|
|
1604
|
-
* @summary: Add
|
|
1605
|
-
* @description: Add
|
|
1652
|
+
* @param {AppSupportedCurrency} arg.body
|
|
1653
|
+
* @returns {Promise<AppSupportedCurrency>} - Success response
|
|
1654
|
+
* @summary: Add initial application supported currency
|
|
1655
|
+
* @description: Add initial application supported currency for various features and data. Default INR will be enabled.
|
|
1606
1656
|
*/
|
|
1607
|
-
async
|
|
1608
|
-
const { error } = ConfigurationValidator.
|
|
1657
|
+
async updateAppCurrencyConfig({ body } = {}) {
|
|
1658
|
+
const { error } = ConfigurationValidator.updateAppCurrencyConfig().validate(
|
|
1609
1659
|
{
|
|
1610
1660
|
body,
|
|
1611
1661
|
},
|
|
@@ -1616,7 +1666,9 @@ class Configuration {
|
|
|
1616
1666
|
}
|
|
1617
1667
|
|
|
1618
1668
|
// Showing warrnings if extra unknown parameters are found
|
|
1619
|
-
const {
|
|
1669
|
+
const {
|
|
1670
|
+
error: warrning,
|
|
1671
|
+
} = ConfigurationValidator.updateAppCurrencyConfig().validate(
|
|
1620
1672
|
{
|
|
1621
1673
|
body,
|
|
1622
1674
|
},
|
|
@@ -1625,7 +1677,7 @@ class Configuration {
|
|
|
1625
1677
|
if (warrning) {
|
|
1626
1678
|
Logger({
|
|
1627
1679
|
level: "WARN",
|
|
1628
|
-
message: "Parameter Validation warrnings for
|
|
1680
|
+
message: "Parameter Validation warrnings for updateAppCurrencyConfig",
|
|
1629
1681
|
});
|
|
1630
1682
|
Logger({ level: "WARN", message: warrning });
|
|
1631
1683
|
}
|
|
@@ -1635,20 +1687,22 @@ class Configuration {
|
|
|
1635
1687
|
const response = await PlatformAPIClient.execute(
|
|
1636
1688
|
this.config,
|
|
1637
1689
|
"post",
|
|
1638
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1690
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/currency`,
|
|
1639
1691
|
query_params,
|
|
1640
1692
|
body
|
|
1641
1693
|
);
|
|
1642
1694
|
|
|
1643
|
-
const {
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1695
|
+
const {
|
|
1696
|
+
error: res_error,
|
|
1697
|
+
} = ConfigurationModel.AppSupportedCurrency().validate(response, {
|
|
1698
|
+
abortEarly: false,
|
|
1699
|
+
allowUnknown: false,
|
|
1700
|
+
});
|
|
1647
1701
|
|
|
1648
1702
|
if (res_error) {
|
|
1649
1703
|
Logger({
|
|
1650
1704
|
level: "WARN",
|
|
1651
|
-
message: "Response Validation Warnnings for
|
|
1705
|
+
message: "Response Validation Warnnings for updateAppCurrencyConfig",
|
|
1652
1706
|
});
|
|
1653
1707
|
Logger({ level: "WARN", message: res_error });
|
|
1654
1708
|
}
|
|
@@ -1658,15 +1712,15 @@ class Configuration {
|
|
|
1658
1712
|
|
|
1659
1713
|
/**
|
|
1660
1714
|
* @param {Object} arg - Arg object.
|
|
1661
|
-
* @param {
|
|
1662
|
-
* @returns {Promise<
|
|
1663
|
-
* @summary:
|
|
1664
|
-
* @description:
|
|
1715
|
+
* @param {AppFeatureRequest} arg.body
|
|
1716
|
+
* @returns {Promise<AppFeature>} - Success response
|
|
1717
|
+
* @summary: Update features of application
|
|
1718
|
+
* @description: Update features of application
|
|
1665
1719
|
*/
|
|
1666
|
-
async
|
|
1667
|
-
const { error } = ConfigurationValidator.
|
|
1720
|
+
async updateAppFeatures({ body } = {}) {
|
|
1721
|
+
const { error } = ConfigurationValidator.updateAppFeatures().validate(
|
|
1668
1722
|
{
|
|
1669
|
-
|
|
1723
|
+
body,
|
|
1670
1724
|
},
|
|
1671
1725
|
{ abortEarly: false, allowUnknown: true }
|
|
1672
1726
|
);
|
|
@@ -1677,16 +1731,16 @@ class Configuration {
|
|
|
1677
1731
|
// Showing warrnings if extra unknown parameters are found
|
|
1678
1732
|
const {
|
|
1679
1733
|
error: warrning,
|
|
1680
|
-
} = ConfigurationValidator.
|
|
1734
|
+
} = ConfigurationValidator.updateAppFeatures().validate(
|
|
1681
1735
|
{
|
|
1682
|
-
|
|
1736
|
+
body,
|
|
1683
1737
|
},
|
|
1684
1738
|
{ abortEarly: false, allowUnknown: false }
|
|
1685
1739
|
);
|
|
1686
1740
|
if (warrning) {
|
|
1687
1741
|
Logger({
|
|
1688
1742
|
level: "WARN",
|
|
1689
|
-
message: "Parameter Validation warrnings for
|
|
1743
|
+
message: "Parameter Validation warrnings for updateAppFeatures",
|
|
1690
1744
|
});
|
|
1691
1745
|
Logger({ level: "WARN", message: warrning });
|
|
1692
1746
|
}
|
|
@@ -1695,15 +1749,15 @@ class Configuration {
|
|
|
1695
1749
|
|
|
1696
1750
|
const response = await PlatformAPIClient.execute(
|
|
1697
1751
|
this.config,
|
|
1698
|
-
"
|
|
1699
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1752
|
+
"post",
|
|
1753
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/feature`,
|
|
1700
1754
|
query_params,
|
|
1701
|
-
|
|
1755
|
+
body
|
|
1702
1756
|
);
|
|
1703
1757
|
|
|
1704
1758
|
const {
|
|
1705
1759
|
error: res_error,
|
|
1706
|
-
} = ConfigurationModel.
|
|
1760
|
+
} = ConfigurationModel.AppFeature().validate(response, {
|
|
1707
1761
|
abortEarly: false,
|
|
1708
1762
|
allowUnknown: false,
|
|
1709
1763
|
});
|
|
@@ -1711,7 +1765,7 @@ class Configuration {
|
|
|
1711
1765
|
if (res_error) {
|
|
1712
1766
|
Logger({
|
|
1713
1767
|
level: "WARN",
|
|
1714
|
-
message: "Response Validation Warnnings for
|
|
1768
|
+
message: "Response Validation Warnnings for updateAppFeatures",
|
|
1715
1769
|
});
|
|
1716
1770
|
Logger({ level: "WARN", message: res_error });
|
|
1717
1771
|
}
|
|
@@ -1721,14 +1775,16 @@ class Configuration {
|
|
|
1721
1775
|
|
|
1722
1776
|
/**
|
|
1723
1777
|
* @param {Object} arg - Arg object.
|
|
1724
|
-
* @param {
|
|
1725
|
-
* @
|
|
1726
|
-
* @
|
|
1727
|
-
* @
|
|
1778
|
+
* @param {string} arg.platformType - Current platform name
|
|
1779
|
+
* @param {MobileAppConfigRequest} arg.body
|
|
1780
|
+
* @returns {Promise<MobileAppConfiguration>} - Success response
|
|
1781
|
+
* @summary: Update build config for next build
|
|
1782
|
+
* @description: Update build config for next build
|
|
1728
1783
|
*/
|
|
1729
|
-
async
|
|
1730
|
-
const { error } = ConfigurationValidator.
|
|
1784
|
+
async updateBuildConfig({ platformType, body } = {}) {
|
|
1785
|
+
const { error } = ConfigurationValidator.updateBuildConfig().validate(
|
|
1731
1786
|
{
|
|
1787
|
+
platformType,
|
|
1732
1788
|
body,
|
|
1733
1789
|
},
|
|
1734
1790
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -1740,8 +1796,9 @@ class Configuration {
|
|
|
1740
1796
|
// Showing warrnings if extra unknown parameters are found
|
|
1741
1797
|
const {
|
|
1742
1798
|
error: warrning,
|
|
1743
|
-
} = ConfigurationValidator.
|
|
1799
|
+
} = ConfigurationValidator.updateBuildConfig().validate(
|
|
1744
1800
|
{
|
|
1801
|
+
platformType,
|
|
1745
1802
|
body,
|
|
1746
1803
|
},
|
|
1747
1804
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -1749,7 +1806,7 @@ class Configuration {
|
|
|
1749
1806
|
if (warrning) {
|
|
1750
1807
|
Logger({
|
|
1751
1808
|
level: "WARN",
|
|
1752
|
-
message: "Parameter Validation warrnings for
|
|
1809
|
+
message: "Parameter Validation warrnings for updateBuildConfig",
|
|
1753
1810
|
});
|
|
1754
1811
|
Logger({ level: "WARN", message: warrning });
|
|
1755
1812
|
}
|
|
@@ -1758,15 +1815,15 @@ class Configuration {
|
|
|
1758
1815
|
|
|
1759
1816
|
const response = await PlatformAPIClient.execute(
|
|
1760
1817
|
this.config,
|
|
1761
|
-
"
|
|
1762
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1818
|
+
"put",
|
|
1819
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/build/${platformType}/configuration`,
|
|
1763
1820
|
query_params,
|
|
1764
1821
|
body
|
|
1765
1822
|
);
|
|
1766
1823
|
|
|
1767
1824
|
const {
|
|
1768
1825
|
error: res_error,
|
|
1769
|
-
} = ConfigurationModel.
|
|
1826
|
+
} = ConfigurationModel.MobileAppConfiguration().validate(response, {
|
|
1770
1827
|
abortEarly: false,
|
|
1771
1828
|
allowUnknown: false,
|
|
1772
1829
|
});
|
|
@@ -1774,7 +1831,7 @@ class Configuration {
|
|
|
1774
1831
|
if (res_error) {
|
|
1775
1832
|
Logger({
|
|
1776
1833
|
level: "WARN",
|
|
1777
|
-
message: "Response Validation Warnnings for
|
|
1834
|
+
message: "Response Validation Warnnings for updateBuildConfig",
|
|
1778
1835
|
});
|
|
1779
1836
|
Logger({ level: "WARN", message: res_error });
|
|
1780
1837
|
}
|
|
@@ -1784,13 +1841,13 @@ class Configuration {
|
|
|
1784
1841
|
|
|
1785
1842
|
/**
|
|
1786
1843
|
* @param {Object} arg - Arg object.
|
|
1787
|
-
* @param {
|
|
1788
|
-
* @returns {Promise<
|
|
1789
|
-
* @summary:
|
|
1790
|
-
* @description:
|
|
1844
|
+
* @param {ApplicationInventory} arg.body
|
|
1845
|
+
* @returns {Promise<ApplicationInventory>} - Success response
|
|
1846
|
+
* @summary: Update application configuration
|
|
1847
|
+
* @description: Update application configuration for various features and data
|
|
1791
1848
|
*/
|
|
1792
|
-
async
|
|
1793
|
-
const { error } = ConfigurationValidator.
|
|
1849
|
+
async updateInventoryConfig({ body } = {}) {
|
|
1850
|
+
const { error } = ConfigurationValidator.updateInventoryConfig().validate(
|
|
1794
1851
|
{
|
|
1795
1852
|
body,
|
|
1796
1853
|
},
|
|
@@ -1803,7 +1860,7 @@ class Configuration {
|
|
|
1803
1860
|
// Showing warrnings if extra unknown parameters are found
|
|
1804
1861
|
const {
|
|
1805
1862
|
error: warrning,
|
|
1806
|
-
} = ConfigurationValidator.
|
|
1863
|
+
} = ConfigurationValidator.updateInventoryConfig().validate(
|
|
1807
1864
|
{
|
|
1808
1865
|
body,
|
|
1809
1866
|
},
|
|
@@ -1812,7 +1869,7 @@ class Configuration {
|
|
|
1812
1869
|
if (warrning) {
|
|
1813
1870
|
Logger({
|
|
1814
1871
|
level: "WARN",
|
|
1815
|
-
message: "Parameter Validation warrnings for
|
|
1872
|
+
message: "Parameter Validation warrnings for updateInventoryConfig",
|
|
1816
1873
|
});
|
|
1817
1874
|
Logger({ level: "WARN", message: warrning });
|
|
1818
1875
|
}
|
|
@@ -1821,15 +1878,15 @@ class Configuration {
|
|
|
1821
1878
|
|
|
1822
1879
|
const response = await PlatformAPIClient.execute(
|
|
1823
1880
|
this.config,
|
|
1824
|
-
"
|
|
1825
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1881
|
+
"put",
|
|
1882
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/configuration`,
|
|
1826
1883
|
query_params,
|
|
1827
1884
|
body
|
|
1828
1885
|
);
|
|
1829
1886
|
|
|
1830
1887
|
const {
|
|
1831
1888
|
error: res_error,
|
|
1832
|
-
} = ConfigurationModel.
|
|
1889
|
+
} = ConfigurationModel.ApplicationInventory().validate(response, {
|
|
1833
1890
|
abortEarly: false,
|
|
1834
1891
|
allowUnknown: false,
|
|
1835
1892
|
});
|
|
@@ -1837,7 +1894,7 @@ class Configuration {
|
|
|
1837
1894
|
if (res_error) {
|
|
1838
1895
|
Logger({
|
|
1839
1896
|
level: "WARN",
|
|
1840
|
-
message: "Response Validation Warnnings for
|
|
1897
|
+
message: "Response Validation Warnnings for updateInventoryConfig",
|
|
1841
1898
|
});
|
|
1842
1899
|
Logger({ level: "WARN", message: res_error });
|
|
1843
1900
|
}
|
|
@@ -1847,13 +1904,18 @@ class Configuration {
|
|
|
1847
1904
|
|
|
1848
1905
|
/**
|
|
1849
1906
|
* @param {Object} arg - Arg object.
|
|
1850
|
-
* @
|
|
1851
|
-
* @
|
|
1852
|
-
* @
|
|
1907
|
+
* @param {OrderingStoreConfig} arg.body
|
|
1908
|
+
* @returns {Promise<DeploymentMeta>} - Success response
|
|
1909
|
+
* @summary: Add/Update ordering store config
|
|
1910
|
+
* @description: Add/Update ordering store config.
|
|
1853
1911
|
*/
|
|
1854
|
-
async
|
|
1855
|
-
const {
|
|
1856
|
-
|
|
1912
|
+
async updateOrderingStoreConfig({ body } = {}) {
|
|
1913
|
+
const {
|
|
1914
|
+
error,
|
|
1915
|
+
} = ConfigurationValidator.updateOrderingStoreConfig().validate(
|
|
1916
|
+
{
|
|
1917
|
+
body,
|
|
1918
|
+
},
|
|
1857
1919
|
{ abortEarly: false, allowUnknown: true }
|
|
1858
1920
|
);
|
|
1859
1921
|
if (error) {
|
|
@@ -1863,14 +1925,16 @@ class Configuration {
|
|
|
1863
1925
|
// Showing warrnings if extra unknown parameters are found
|
|
1864
1926
|
const {
|
|
1865
1927
|
error: warrning,
|
|
1866
|
-
} = ConfigurationValidator.
|
|
1867
|
-
{
|
|
1928
|
+
} = ConfigurationValidator.updateOrderingStoreConfig().validate(
|
|
1929
|
+
{
|
|
1930
|
+
body,
|
|
1931
|
+
},
|
|
1868
1932
|
{ abortEarly: false, allowUnknown: false }
|
|
1869
1933
|
);
|
|
1870
1934
|
if (warrning) {
|
|
1871
1935
|
Logger({
|
|
1872
1936
|
level: "WARN",
|
|
1873
|
-
message: "Parameter Validation warrnings for
|
|
1937
|
+
message: "Parameter Validation warrnings for updateOrderingStoreConfig",
|
|
1874
1938
|
});
|
|
1875
1939
|
Logger({ level: "WARN", message: warrning });
|
|
1876
1940
|
}
|
|
@@ -1879,15 +1943,15 @@ class Configuration {
|
|
|
1879
1943
|
|
|
1880
1944
|
const response = await PlatformAPIClient.execute(
|
|
1881
1945
|
this.config,
|
|
1882
|
-
"
|
|
1883
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}`,
|
|
1946
|
+
"post",
|
|
1947
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ordering-store`,
|
|
1884
1948
|
query_params,
|
|
1885
|
-
|
|
1949
|
+
body
|
|
1886
1950
|
);
|
|
1887
1951
|
|
|
1888
1952
|
const {
|
|
1889
1953
|
error: res_error,
|
|
1890
|
-
} = ConfigurationModel.
|
|
1954
|
+
} = ConfigurationModel.DeploymentMeta().validate(response, {
|
|
1891
1955
|
abortEarly: false,
|
|
1892
1956
|
allowUnknown: false,
|
|
1893
1957
|
});
|
|
@@ -1895,7 +1959,7 @@ class Configuration {
|
|
|
1895
1959
|
if (res_error) {
|
|
1896
1960
|
Logger({
|
|
1897
1961
|
level: "WARN",
|
|
1898
|
-
message: "Response Validation Warnnings for
|
|
1962
|
+
message: "Response Validation Warnnings for updateOrderingStoreConfig",
|
|
1899
1963
|
});
|
|
1900
1964
|
Logger({ level: "WARN", message: res_error });
|
|
1901
1965
|
}
|
|
@@ -1903,4 +1967,5 @@ class Configuration {
|
|
|
1903
1967
|
return response;
|
|
1904
1968
|
}
|
|
1905
1969
|
}
|
|
1970
|
+
|
|
1906
1971
|
module.exports = Configuration;
|