@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
|
@@ -5,20 +5,21 @@ const Paginator = require("../../common/Paginator");
|
|
|
5
5
|
const InventoryValidator = require("./InventoryPublicValidator");
|
|
6
6
|
const InventoryModel = require("./InventoryPublicModel");
|
|
7
7
|
const { Logger } = require("./../../common/Logger");
|
|
8
|
+
const Joi = require("joi");
|
|
8
9
|
|
|
9
10
|
class Inventory {
|
|
10
11
|
constructor(_conf) {
|
|
11
12
|
this._conf = _conf;
|
|
12
13
|
this._relativeUrls = {
|
|
13
|
-
getJobCodesMetrics:
|
|
14
|
-
"/service/common/inventory/v1.0/company/email/jobCode",
|
|
15
|
-
saveJobCodesMetrics:
|
|
16
|
-
"/service/common/inventory/v1.0/company/email/jobCode",
|
|
17
|
-
getConfigByApiKey: "/service/common/inventory/v1.0/company/slingshot",
|
|
18
14
|
getApiKey: "/service/common/inventory/v1.0/company/slingshot/apikey",
|
|
15
|
+
getConfigByApiKey: "/service/common/inventory/v1.0/company/slingshot",
|
|
19
16
|
getJobByCode: "/service/common/inventory/v1.0/company/jobs/code/{code}",
|
|
17
|
+
getJobCodesMetrics:
|
|
18
|
+
"/service/common/inventory/v1.0/company/email/jobCode",
|
|
20
19
|
getJobConfigByIntegrationType:
|
|
21
20
|
"/service/common/inventory/v1.0/company/job/config",
|
|
21
|
+
saveJobCodesMetrics:
|
|
22
|
+
"/service/common/inventory/v1.0/company/email/jobCode",
|
|
22
23
|
};
|
|
23
24
|
this._urls = Object.entries(this._relativeUrls).reduce(
|
|
24
25
|
(urls, [method, relativeUrl]) => {
|
|
@@ -38,15 +39,15 @@ class Inventory {
|
|
|
38
39
|
|
|
39
40
|
/**
|
|
40
41
|
* @param {Object} arg - Arg object.
|
|
41
|
-
* @param {
|
|
42
|
-
* @param {string}
|
|
43
|
-
* @returns {Promise<
|
|
44
|
-
* @summary:
|
|
45
|
-
* @description: Endpoint
|
|
42
|
+
* @param {string} arg.userName - Integration id
|
|
43
|
+
* @param {string} arg.password - Company/store token
|
|
44
|
+
* @returns {Promise<ResponseEnvelopeApikeyModel>} - Success response
|
|
45
|
+
* @summary: Get apikey for Company to call other Slingshot Configuration APIs
|
|
46
|
+
* @description: REST Endpoint that returns apikey by username by password
|
|
46
47
|
*/
|
|
47
|
-
async
|
|
48
|
-
const { error } = InventoryValidator.
|
|
49
|
-
{
|
|
48
|
+
async getApiKey({ userName, password } = {}) {
|
|
49
|
+
const { error } = InventoryValidator.getApiKey().validate(
|
|
50
|
+
{ userName, password },
|
|
50
51
|
{ abortEarly: false, allowUnknown: true }
|
|
51
52
|
);
|
|
52
53
|
if (error) {
|
|
@@ -54,23 +55,21 @@ class Inventory {
|
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
// Showing warrnings if extra unknown parameters are found
|
|
57
|
-
const {
|
|
58
|
-
|
|
59
|
-
} = InventoryValidator.getJobCodesMetrics().validate(
|
|
60
|
-
{ dailyJob, jobCode },
|
|
58
|
+
const { error: warrning } = InventoryValidator.getApiKey().validate(
|
|
59
|
+
{ userName, password },
|
|
61
60
|
{ abortEarly: false, allowUnknown: false }
|
|
62
61
|
);
|
|
63
62
|
if (warrning) {
|
|
64
63
|
Logger({
|
|
65
64
|
level: "WARN",
|
|
66
|
-
message: "Parameter Validation warrnings for
|
|
65
|
+
message: "Parameter Validation warrnings for getApiKey",
|
|
67
66
|
});
|
|
68
67
|
Logger({ level: "WARN", message: warrning });
|
|
69
68
|
}
|
|
70
69
|
|
|
71
70
|
const query_params = {};
|
|
72
|
-
query_params["
|
|
73
|
-
query_params["
|
|
71
|
+
query_params["user_name"] = userName;
|
|
72
|
+
query_params["password"] = password;
|
|
74
73
|
|
|
75
74
|
const xHeaders = {};
|
|
76
75
|
|
|
@@ -78,7 +77,7 @@ class Inventory {
|
|
|
78
77
|
this._conf,
|
|
79
78
|
"get",
|
|
80
79
|
constructUrl({
|
|
81
|
-
url: this._urls["
|
|
80
|
+
url: this._urls["getApiKey"],
|
|
82
81
|
params: {},
|
|
83
82
|
}),
|
|
84
83
|
query_params,
|
|
@@ -88,7 +87,7 @@ class Inventory {
|
|
|
88
87
|
|
|
89
88
|
const {
|
|
90
89
|
error: res_error,
|
|
91
|
-
} = InventoryModel.
|
|
90
|
+
} = InventoryModel.ResponseEnvelopeApikeyModel().validate(response, {
|
|
92
91
|
abortEarly: false,
|
|
93
92
|
allowUnknown: false,
|
|
94
93
|
});
|
|
@@ -96,7 +95,7 @@ class Inventory {
|
|
|
96
95
|
if (res_error) {
|
|
97
96
|
Logger({
|
|
98
97
|
level: "WARN",
|
|
99
|
-
message: "Response Validation Warnnings for
|
|
98
|
+
message: "Response Validation Warnnings for getApiKey",
|
|
100
99
|
});
|
|
101
100
|
Logger({ level: "WARN", message: res_error });
|
|
102
101
|
}
|
|
@@ -106,14 +105,14 @@ class Inventory {
|
|
|
106
105
|
|
|
107
106
|
/**
|
|
108
107
|
* @param {Object} arg - Arg object.
|
|
109
|
-
* @param {
|
|
110
|
-
* @returns {Promise<
|
|
111
|
-
* @summary:
|
|
112
|
-
* @description: Endpoint
|
|
108
|
+
* @param {string} arg.apikey - Api key
|
|
109
|
+
* @returns {Promise<ResponseEnvelopeSlingshotConfigurationDetail>} - Success response
|
|
110
|
+
* @summary: Get Slingshot Configuration Of A Company using API key
|
|
111
|
+
* @description: REST Endpoint that returns all configuration detail of a company
|
|
113
112
|
*/
|
|
114
|
-
async
|
|
115
|
-
const { error } = InventoryValidator.
|
|
116
|
-
{
|
|
113
|
+
async getConfigByApiKey({ apikey } = {}) {
|
|
114
|
+
const { error } = InventoryValidator.getConfigByApiKey().validate(
|
|
115
|
+
{ apikey },
|
|
117
116
|
{ abortEarly: false, allowUnknown: true }
|
|
118
117
|
);
|
|
119
118
|
if (error) {
|
|
@@ -121,47 +120,46 @@ class Inventory {
|
|
|
121
120
|
}
|
|
122
121
|
|
|
123
122
|
// Showing warrnings if extra unknown parameters are found
|
|
124
|
-
const {
|
|
125
|
-
|
|
126
|
-
} = InventoryValidator.saveJobCodesMetrics().validate(
|
|
127
|
-
{ body },
|
|
123
|
+
const { error: warrning } = InventoryValidator.getConfigByApiKey().validate(
|
|
124
|
+
{ apikey },
|
|
128
125
|
{ abortEarly: false, allowUnknown: false }
|
|
129
126
|
);
|
|
130
127
|
if (warrning) {
|
|
131
128
|
Logger({
|
|
132
129
|
level: "WARN",
|
|
133
|
-
message: "Parameter Validation warrnings for
|
|
130
|
+
message: "Parameter Validation warrnings for getConfigByApiKey",
|
|
134
131
|
});
|
|
135
132
|
Logger({ level: "WARN", message: warrning });
|
|
136
133
|
}
|
|
137
134
|
|
|
138
135
|
const query_params = {};
|
|
136
|
+
query_params["apikey"] = apikey;
|
|
139
137
|
|
|
140
138
|
const xHeaders = {};
|
|
141
139
|
|
|
142
140
|
const response = await PublicAPIClient.execute(
|
|
143
141
|
this._conf,
|
|
144
|
-
"
|
|
142
|
+
"get",
|
|
145
143
|
constructUrl({
|
|
146
|
-
url: this._urls["
|
|
144
|
+
url: this._urls["getConfigByApiKey"],
|
|
147
145
|
params: {},
|
|
148
146
|
}),
|
|
149
147
|
query_params,
|
|
150
|
-
|
|
148
|
+
undefined,
|
|
151
149
|
xHeaders
|
|
152
150
|
);
|
|
153
151
|
|
|
154
152
|
const {
|
|
155
153
|
error: res_error,
|
|
156
|
-
} = InventoryModel.
|
|
157
|
-
|
|
158
|
-
allowUnknown: false
|
|
159
|
-
|
|
154
|
+
} = InventoryModel.ResponseEnvelopeSlingshotConfigurationDetail().validate(
|
|
155
|
+
response,
|
|
156
|
+
{ abortEarly: false, allowUnknown: false }
|
|
157
|
+
);
|
|
160
158
|
|
|
161
159
|
if (res_error) {
|
|
162
160
|
Logger({
|
|
163
161
|
level: "WARN",
|
|
164
|
-
message: "Response Validation Warnnings for
|
|
162
|
+
message: "Response Validation Warnnings for getConfigByApiKey",
|
|
165
163
|
});
|
|
166
164
|
Logger({ level: "WARN", message: res_error });
|
|
167
165
|
}
|
|
@@ -171,14 +169,14 @@ class Inventory {
|
|
|
171
169
|
|
|
172
170
|
/**
|
|
173
171
|
* @param {Object} arg - Arg object.
|
|
174
|
-
* @param {string} arg.
|
|
175
|
-
* @returns {Promise<
|
|
176
|
-
* @summary: Get
|
|
177
|
-
* @description: REST Endpoint that returns
|
|
172
|
+
* @param {string} arg.code - Job Code
|
|
173
|
+
* @returns {Promise<ResponseEnvelopeJobConfigDTO>} - Success response
|
|
174
|
+
* @summary: Get Job Config By Code
|
|
175
|
+
* @description: REST Endpoint that returns job config by code
|
|
178
176
|
*/
|
|
179
|
-
async
|
|
180
|
-
const { error } = InventoryValidator.
|
|
181
|
-
{
|
|
177
|
+
async getJobByCode({ code } = {}) {
|
|
178
|
+
const { error } = InventoryValidator.getJobByCode().validate(
|
|
179
|
+
{ code },
|
|
182
180
|
{ abortEarly: false, allowUnknown: true }
|
|
183
181
|
);
|
|
184
182
|
if (error) {
|
|
@@ -186,20 +184,19 @@ class Inventory {
|
|
|
186
184
|
}
|
|
187
185
|
|
|
188
186
|
// Showing warrnings if extra unknown parameters are found
|
|
189
|
-
const { error: warrning } = InventoryValidator.
|
|
190
|
-
{
|
|
187
|
+
const { error: warrning } = InventoryValidator.getJobByCode().validate(
|
|
188
|
+
{ code },
|
|
191
189
|
{ abortEarly: false, allowUnknown: false }
|
|
192
190
|
);
|
|
193
191
|
if (warrning) {
|
|
194
192
|
Logger({
|
|
195
193
|
level: "WARN",
|
|
196
|
-
message: "Parameter Validation warrnings for
|
|
194
|
+
message: "Parameter Validation warrnings for getJobByCode",
|
|
197
195
|
});
|
|
198
196
|
Logger({ level: "WARN", message: warrning });
|
|
199
197
|
}
|
|
200
198
|
|
|
201
199
|
const query_params = {};
|
|
202
|
-
query_params["apikey"] = apikey;
|
|
203
200
|
|
|
204
201
|
const xHeaders = {};
|
|
205
202
|
|
|
@@ -207,8 +204,8 @@ class Inventory {
|
|
|
207
204
|
this._conf,
|
|
208
205
|
"get",
|
|
209
206
|
constructUrl({
|
|
210
|
-
url: this._urls["
|
|
211
|
-
params: {},
|
|
207
|
+
url: this._urls["getJobByCode"],
|
|
208
|
+
params: { code },
|
|
212
209
|
}),
|
|
213
210
|
query_params,
|
|
214
211
|
undefined,
|
|
@@ -217,15 +214,15 @@ class Inventory {
|
|
|
217
214
|
|
|
218
215
|
const {
|
|
219
216
|
error: res_error,
|
|
220
|
-
} = InventoryModel.
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
);
|
|
217
|
+
} = InventoryModel.ResponseEnvelopeJobConfigDTO().validate(response, {
|
|
218
|
+
abortEarly: false,
|
|
219
|
+
allowUnknown: false,
|
|
220
|
+
});
|
|
224
221
|
|
|
225
222
|
if (res_error) {
|
|
226
223
|
Logger({
|
|
227
224
|
level: "WARN",
|
|
228
|
-
message: "Response Validation Warnnings for
|
|
225
|
+
message: "Response Validation Warnnings for getJobByCode",
|
|
229
226
|
});
|
|
230
227
|
Logger({ level: "WARN", message: res_error });
|
|
231
228
|
}
|
|
@@ -235,15 +232,15 @@ class Inventory {
|
|
|
235
232
|
|
|
236
233
|
/**
|
|
237
234
|
* @param {Object} arg - Arg object.
|
|
238
|
-
* @param {
|
|
239
|
-
* @param {string} arg.
|
|
240
|
-
* @returns {Promise<
|
|
241
|
-
* @summary:
|
|
242
|
-
* @description:
|
|
235
|
+
* @param {boolean} [arg.dailyJob] - Daily Job Flag
|
|
236
|
+
* @param {string} [arg.jobCode] - Email Job Code
|
|
237
|
+
* @returns {Promise<ResponseEnvelopeObject>} - Success response
|
|
238
|
+
* @summary: Find all the JobCodes from Metrics Collection based on the field Values
|
|
239
|
+
* @description: Endpoint to return all JobCodes present in Metrics Collection
|
|
243
240
|
*/
|
|
244
|
-
async
|
|
245
|
-
const { error } = InventoryValidator.
|
|
246
|
-
{
|
|
241
|
+
async getJobCodesMetrics({ dailyJob, jobCode } = {}) {
|
|
242
|
+
const { error } = InventoryValidator.getJobCodesMetrics().validate(
|
|
243
|
+
{ dailyJob, jobCode },
|
|
247
244
|
{ abortEarly: false, allowUnknown: true }
|
|
248
245
|
);
|
|
249
246
|
if (error) {
|
|
@@ -251,21 +248,23 @@ class Inventory {
|
|
|
251
248
|
}
|
|
252
249
|
|
|
253
250
|
// Showing warrnings if extra unknown parameters are found
|
|
254
|
-
const {
|
|
255
|
-
|
|
251
|
+
const {
|
|
252
|
+
error: warrning,
|
|
253
|
+
} = InventoryValidator.getJobCodesMetrics().validate(
|
|
254
|
+
{ dailyJob, jobCode },
|
|
256
255
|
{ abortEarly: false, allowUnknown: false }
|
|
257
256
|
);
|
|
258
257
|
if (warrning) {
|
|
259
258
|
Logger({
|
|
260
259
|
level: "WARN",
|
|
261
|
-
message: "Parameter Validation warrnings for
|
|
260
|
+
message: "Parameter Validation warrnings for getJobCodesMetrics",
|
|
262
261
|
});
|
|
263
262
|
Logger({ level: "WARN", message: warrning });
|
|
264
263
|
}
|
|
265
264
|
|
|
266
265
|
const query_params = {};
|
|
267
|
-
query_params["
|
|
268
|
-
query_params["
|
|
266
|
+
query_params["daily_job"] = dailyJob;
|
|
267
|
+
query_params["job_code"] = jobCode;
|
|
269
268
|
|
|
270
269
|
const xHeaders = {};
|
|
271
270
|
|
|
@@ -273,7 +272,7 @@ class Inventory {
|
|
|
273
272
|
this._conf,
|
|
274
273
|
"get",
|
|
275
274
|
constructUrl({
|
|
276
|
-
url: this._urls["
|
|
275
|
+
url: this._urls["getJobCodesMetrics"],
|
|
277
276
|
params: {},
|
|
278
277
|
}),
|
|
279
278
|
query_params,
|
|
@@ -283,7 +282,7 @@ class Inventory {
|
|
|
283
282
|
|
|
284
283
|
const {
|
|
285
284
|
error: res_error,
|
|
286
|
-
} = InventoryModel.
|
|
285
|
+
} = InventoryModel.ResponseEnvelopeObject().validate(response, {
|
|
287
286
|
abortEarly: false,
|
|
288
287
|
allowUnknown: false,
|
|
289
288
|
});
|
|
@@ -291,7 +290,7 @@ class Inventory {
|
|
|
291
290
|
if (res_error) {
|
|
292
291
|
Logger({
|
|
293
292
|
level: "WARN",
|
|
294
|
-
message: "Response Validation Warnnings for
|
|
293
|
+
message: "Response Validation Warnnings for getJobCodesMetrics",
|
|
295
294
|
});
|
|
296
295
|
Logger({ level: "WARN", message: res_error });
|
|
297
296
|
}
|
|
@@ -301,14 +300,17 @@ class Inventory {
|
|
|
301
300
|
|
|
302
301
|
/**
|
|
303
302
|
* @param {Object} arg - Arg object.
|
|
304
|
-
* @param {string} arg.
|
|
305
|
-
* @
|
|
306
|
-
* @
|
|
307
|
-
* @
|
|
303
|
+
* @param {string} arg.integrationType - Integration Type
|
|
304
|
+
* @param {boolean} [arg.disable] - JobConfig current state
|
|
305
|
+
* @returns {Promise<ResponseEnvelopeListJobConfigDTO>} - Success response
|
|
306
|
+
* @summary: Get Job Configs By Integration Type
|
|
307
|
+
* @description: REST Endpoint that returns all job Configs by Integration Type
|
|
308
308
|
*/
|
|
309
|
-
async
|
|
310
|
-
const {
|
|
311
|
-
|
|
309
|
+
async getJobConfigByIntegrationType({ integrationType, disable } = {}) {
|
|
310
|
+
const {
|
|
311
|
+
error,
|
|
312
|
+
} = InventoryValidator.getJobConfigByIntegrationType().validate(
|
|
313
|
+
{ integrationType, disable },
|
|
312
314
|
{ abortEarly: false, allowUnknown: true }
|
|
313
315
|
);
|
|
314
316
|
if (error) {
|
|
@@ -316,19 +318,24 @@ class Inventory {
|
|
|
316
318
|
}
|
|
317
319
|
|
|
318
320
|
// Showing warrnings if extra unknown parameters are found
|
|
319
|
-
const {
|
|
320
|
-
|
|
321
|
+
const {
|
|
322
|
+
error: warrning,
|
|
323
|
+
} = InventoryValidator.getJobConfigByIntegrationType().validate(
|
|
324
|
+
{ integrationType, disable },
|
|
321
325
|
{ abortEarly: false, allowUnknown: false }
|
|
322
326
|
);
|
|
323
327
|
if (warrning) {
|
|
324
328
|
Logger({
|
|
325
329
|
level: "WARN",
|
|
326
|
-
message:
|
|
330
|
+
message:
|
|
331
|
+
"Parameter Validation warrnings for getJobConfigByIntegrationType",
|
|
327
332
|
});
|
|
328
333
|
Logger({ level: "WARN", message: warrning });
|
|
329
334
|
}
|
|
330
335
|
|
|
331
336
|
const query_params = {};
|
|
337
|
+
query_params["integration_type"] = integrationType;
|
|
338
|
+
query_params["disable"] = disable;
|
|
332
339
|
|
|
333
340
|
const xHeaders = {};
|
|
334
341
|
|
|
@@ -336,8 +343,8 @@ class Inventory {
|
|
|
336
343
|
this._conf,
|
|
337
344
|
"get",
|
|
338
345
|
constructUrl({
|
|
339
|
-
url: this._urls["
|
|
340
|
-
params: {
|
|
346
|
+
url: this._urls["getJobConfigByIntegrationType"],
|
|
347
|
+
params: {},
|
|
341
348
|
}),
|
|
342
349
|
query_params,
|
|
343
350
|
undefined,
|
|
@@ -346,7 +353,7 @@ class Inventory {
|
|
|
346
353
|
|
|
347
354
|
const {
|
|
348
355
|
error: res_error,
|
|
349
|
-
} = InventoryModel.
|
|
356
|
+
} = InventoryModel.ResponseEnvelopeListJobConfigDTO().validate(response, {
|
|
350
357
|
abortEarly: false,
|
|
351
358
|
allowUnknown: false,
|
|
352
359
|
});
|
|
@@ -354,7 +361,8 @@ class Inventory {
|
|
|
354
361
|
if (res_error) {
|
|
355
362
|
Logger({
|
|
356
363
|
level: "WARN",
|
|
357
|
-
message:
|
|
364
|
+
message:
|
|
365
|
+
"Response Validation Warnnings for getJobConfigByIntegrationType",
|
|
358
366
|
});
|
|
359
367
|
Logger({ level: "WARN", message: res_error });
|
|
360
368
|
}
|
|
@@ -364,17 +372,14 @@ class Inventory {
|
|
|
364
372
|
|
|
365
373
|
/**
|
|
366
374
|
* @param {Object} arg - Arg object.
|
|
367
|
-
* @param {
|
|
368
|
-
* @
|
|
369
|
-
* @
|
|
370
|
-
* @
|
|
371
|
-
* @description: REST Endpoint that returns all job Configs by Integration Type
|
|
375
|
+
* @param {EmailJobMetrics} arg.body
|
|
376
|
+
* @returns {Promise<ResponseEnvelopeEmailJobMetrics>} - Success response
|
|
377
|
+
* @summary: Save JobCode Metrics
|
|
378
|
+
* @description: Endpoint to save JobCode Metrics
|
|
372
379
|
*/
|
|
373
|
-
async
|
|
374
|
-
const {
|
|
375
|
-
|
|
376
|
-
} = InventoryValidator.getJobConfigByIntegrationType().validate(
|
|
377
|
-
{ integrationType, disable },
|
|
380
|
+
async saveJobCodesMetrics({ body } = {}) {
|
|
381
|
+
const { error } = InventoryValidator.saveJobCodesMetrics().validate(
|
|
382
|
+
{ body },
|
|
378
383
|
{ abortEarly: false, allowUnknown: true }
|
|
379
384
|
);
|
|
380
385
|
if (error) {
|
|
@@ -384,40 +389,37 @@ class Inventory {
|
|
|
384
389
|
// Showing warrnings if extra unknown parameters are found
|
|
385
390
|
const {
|
|
386
391
|
error: warrning,
|
|
387
|
-
} = InventoryValidator.
|
|
388
|
-
{
|
|
392
|
+
} = InventoryValidator.saveJobCodesMetrics().validate(
|
|
393
|
+
{ body },
|
|
389
394
|
{ abortEarly: false, allowUnknown: false }
|
|
390
395
|
);
|
|
391
396
|
if (warrning) {
|
|
392
397
|
Logger({
|
|
393
398
|
level: "WARN",
|
|
394
|
-
message:
|
|
395
|
-
"Parameter Validation warrnings for getJobConfigByIntegrationType",
|
|
399
|
+
message: "Parameter Validation warrnings for saveJobCodesMetrics",
|
|
396
400
|
});
|
|
397
401
|
Logger({ level: "WARN", message: warrning });
|
|
398
402
|
}
|
|
399
403
|
|
|
400
404
|
const query_params = {};
|
|
401
|
-
query_params["integration_type"] = integrationType;
|
|
402
|
-
query_params["disable"] = disable;
|
|
403
405
|
|
|
404
406
|
const xHeaders = {};
|
|
405
407
|
|
|
406
408
|
const response = await PublicAPIClient.execute(
|
|
407
409
|
this._conf,
|
|
408
|
-
"
|
|
410
|
+
"post",
|
|
409
411
|
constructUrl({
|
|
410
|
-
url: this._urls["
|
|
412
|
+
url: this._urls["saveJobCodesMetrics"],
|
|
411
413
|
params: {},
|
|
412
414
|
}),
|
|
413
415
|
query_params,
|
|
414
|
-
|
|
416
|
+
body,
|
|
415
417
|
xHeaders
|
|
416
418
|
);
|
|
417
419
|
|
|
418
420
|
const {
|
|
419
421
|
error: res_error,
|
|
420
|
-
} = InventoryModel.
|
|
422
|
+
} = InventoryModel.ResponseEnvelopeEmailJobMetrics().validate(response, {
|
|
421
423
|
abortEarly: false,
|
|
422
424
|
allowUnknown: false,
|
|
423
425
|
});
|
|
@@ -425,8 +427,7 @@ class Inventory {
|
|
|
425
427
|
if (res_error) {
|
|
426
428
|
Logger({
|
|
427
429
|
level: "WARN",
|
|
428
|
-
message:
|
|
429
|
-
"Response Validation Warnnings for getJobConfigByIntegrationType",
|
|
430
|
+
message: "Response Validation Warnnings for saveJobCodesMetrics",
|
|
430
431
|
});
|
|
431
432
|
Logger({ level: "WARN", message: res_error });
|
|
432
433
|
}
|
|
@@ -434,4 +435,5 @@ class Inventory {
|
|
|
434
435
|
return response;
|
|
435
436
|
}
|
|
436
437
|
}
|
|
438
|
+
|
|
437
439
|
module.exports = Inventory;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
export = InventoryModel;
|
|
2
2
|
declare class InventoryModel {
|
|
3
|
+
static ApikeyModel(): any;
|
|
4
|
+
static DataTresholdDTO(): any;
|
|
3
5
|
static EmailJobMetrics(): any;
|
|
4
|
-
static Page(): any;
|
|
5
|
-
static ResponseEnvelopeEmailJobMetrics(): any;
|
|
6
6
|
static GCompany(): any;
|
|
7
|
+
static GenericDTO(): any;
|
|
7
8
|
static GStore(): any;
|
|
9
|
+
static JobConfigDTO(): any;
|
|
8
10
|
static Metum(): any;
|
|
11
|
+
static Page(): any;
|
|
12
|
+
static ResponseEnvelopeApikeyModel(): any;
|
|
13
|
+
static ResponseEnvelopeEmailJobMetrics(): any;
|
|
14
|
+
static ResponseEnvelopeJobConfigDTO(): any;
|
|
15
|
+
static ResponseEnvelopeListJobConfigDTO(): any;
|
|
16
|
+
static ResponseEnvelopeObject(): any;
|
|
9
17
|
static ResponseEnvelopeSlingshotConfigurationDetail(): any;
|
|
10
18
|
static SlingshotConfigurationDetail(): any;
|
|
11
19
|
static SlingshotIntegration(): any;
|
|
12
20
|
static StoreData(): any;
|
|
13
|
-
static ApikeyModel(): any;
|
|
14
|
-
static ResponseEnvelopeApikeyModel(): any;
|
|
15
|
-
static DataTresholdDTO(): any;
|
|
16
|
-
static GenericDTO(): any;
|
|
17
|
-
static JobConfigDTO(): any;
|
|
18
|
-
static ResponseEnvelopeJobConfigDTO(): any;
|
|
19
21
|
static TaskDTO(): any;
|
|
20
|
-
static ResponseEnvelopeListJobConfigDTO(): any;
|
|
21
|
-
static ResponseEnvelopeObject(): any;
|
|
22
22
|
}
|