@gofynd/fdk-client-javascript 1.0.1 → 1.0.3
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/documentation/application/CART.md +5934 -4502
- package/documentation/application/CATALOG.md +6338 -7245
- package/documentation/application/COMMON.md +95 -222
- package/documentation/application/COMMUNICATION.md +106 -186
- package/documentation/application/CONFIGURATION.md +903 -1597
- package/documentation/application/CONTENT.md +562 -1270
- package/documentation/application/FILESTORAGE.md +84 -220
- package/documentation/application/LEAD.md +314 -660
- package/documentation/application/LOGISTIC.md +229 -305
- package/documentation/application/ORDER.md +642 -1137
- package/documentation/application/PAYMENT.md +2285 -3031
- package/documentation/application/POSCART.md +6079 -4642
- package/documentation/application/REWARDS.md +94 -248
- package/documentation/application/SHARE.md +152 -250
- package/documentation/application/THEME.md +952 -1235
- package/documentation/application/USER.md +1228 -1765
- package/documentation/platform/ANALYTICS.md +207 -349
- package/documentation/platform/AUDITTRAIL.md +121 -204
- package/documentation/platform/BILLING.md +865 -1376
- package/documentation/platform/CART.md +2814 -3662
- package/documentation/platform/CATALOG.md +15266 -17619
- package/documentation/platform/COMMON.md +95 -222
- package/documentation/platform/COMMUNICATION.md +1632 -2380
- package/documentation/platform/COMPANYPROFILE.md +572 -957
- package/documentation/platform/CONFIGURATION.md +3050 -4073
- package/documentation/platform/CONTENT.md +3509 -4121
- package/documentation/platform/DISCOUNT.md +140 -236
- package/documentation/platform/FILESTORAGE.md +187 -323
- package/documentation/platform/INVENTORY.md +268 -911
- package/documentation/platform/LEAD.md +2195 -2541
- package/documentation/platform/ORDER.md +3750 -5636
- package/documentation/platform/PARTNER.md +9 -36
- package/documentation/platform/PAYMENT.md +903 -1213
- package/documentation/platform/REWARDS.md +183 -347
- package/documentation/platform/SHARE.md +120 -213
- package/documentation/platform/THEME.md +12956 -13239
- package/documentation/platform/USER.md +975 -1120
- package/documentation/platform/WEBHOOK.md +78 -184
- package/documentation/public/CONFIGURATION.md +95 -222
- package/documentation/public/INVENTORY.md +100 -282
- package/documentation/public/WEBHOOK.md +27 -133
- package/package.json +1 -1
- package/sdk/application/ApplicationConfig.js +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +243 -243
- package/sdk/application/Cart/CartApplicationClient.js +1058 -547
- package/sdk/application/Cart/CartApplicationModel.d.ts +64 -63
- package/sdk/application/Cart/CartApplicationModel.js +489 -886
- 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 +1545 -949
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
- package/sdk/application/Catalog/CatalogApplicationModel.js +692 -1258
- 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 +76 -36
- 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 +92 -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 +638 -312
- 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 +581 -213
- package/sdk/application/Content/ContentApplicationModel.d.ts +76 -75
- package/sdk/application/Content/ContentApplicationModel.js +468 -875
- 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 +121 -59
- 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 +230 -96
- 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 +30 -19
- package/sdk/application/Logistic/LogisticApplicationClient.js +196 -47
- 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 -8
- package/sdk/application/Order/OrderApplicationClient.d.ts +86 -86
- package/sdk/application/Order/OrderApplicationClient.js +448 -215
- package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
- package/sdk/application/Order/OrderApplicationModel.js +357 -661
- 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 +1525 -750
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +72 -72
- package/sdk/application/Payment/PaymentApplicationModel.js +565 -1033
- 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 +1137 -606
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +61 -60
- package/sdk/application/PosCart/PosCartApplicationModel.js +477 -873
- 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 +253 -113
- 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 +221 -96
- 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 +115 -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 +1201 -543
- 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 +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +55 -47
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +308 -151
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +20 -20
- package/sdk/platform/Analytics/AnalyticsPlatformClient.d.ts +8 -4
- package/sdk/platform/Analytics/AnalyticsPlatformClient.js +103 -16
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +16 -12
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +131 -44
- 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 +6 -6
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +68 -56
- package/sdk/platform/Billing/BillingPlatformClient.js +416 -171
- 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 +25 -25
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +176 -159
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +837 -500
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +11 -11
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +63 -63
- package/sdk/platform/Cart/CartPlatformModel.d.ts +86 -85
- package/sdk/platform/Cart/CartPlatformModel.js +677 -1211
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +582 -529
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2642 -1533
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +175 -175
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +708 -590
- package/sdk/platform/Catalog/CatalogPlatformClient.js +3103 -1362
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +293 -284
- package/sdk/platform/Catalog/CatalogPlatformModel.js +2149 -3660
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -64
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +235 -216
- package/sdk/platform/Common/CommonPlatformClient.d.ts +14 -12
- package/sdk/platform/Common/CommonPlatformClient.js +80 -37
- 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 +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +333 -293
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1687 -855
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +87 -87
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +28 -4
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
- package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +70 -57
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +463 -182
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +28 -28
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +294 -557
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +7 -7
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +24 -24
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +175 -137
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1168 -521
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +69 -63
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +137 -119
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +691 -316
- 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 +38 -38
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +542 -461
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +2600 -1160
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +50 -49
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +159 -152
- package/sdk/platform/Content/ContentPlatformModel.d.ts +79 -75
- package/sdk/platform/Content/ContentPlatformModel.js +486 -867
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +72 -61
- package/sdk/platform/Discount/DiscountPlatformClient.js +424 -198
- 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 +29 -29
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +26 -22
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +145 -59
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +58 -52
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +240 -114
- 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 +11 -11
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +76 -63
- package/sdk/platform/Inventory/InventoryPlatformClient.js +461 -197
- 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 +28 -28
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +84 -71
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +441 -182
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +28 -28
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +86 -75
- package/sdk/platform/Lead/LeadPlatformClient.js +434 -212
- 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 +24 -24
- package/sdk/platform/OAuthClient.js +8 -8
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +14 -11
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +113 -49
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -6
- package/sdk/platform/Order/OrderPlatformClient.d.ts +367 -315
- package/sdk/platform/Order/OrderPlatformClient.js +1775 -893
- package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -192
- package/sdk/platform/Order/OrderPlatformModel.js +1591 -2822
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
- package/sdk/platform/Order/OrderPlatformValidator.js +160 -155
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -2
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -8
- package/sdk/platform/Partner/PartnerPlatformModel.js +6 -22
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +65 -54
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +395 -164
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +23 -23
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +55 -45
- package/sdk/platform/Payment/PaymentPlatformClient.js +362 -147
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +27 -27
- package/sdk/platform/Payment/PaymentPlatformModel.js +220 -408
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +4 -4
- package/sdk/platform/Payment/PaymentPlatformValidator.js +21 -21
- package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10153
- package/sdk/platform/PlatformApplicationClient.js +1584 -13691
- package/sdk/platform/PlatformClient.d.ts +7918 -7666
- package/sdk/platform/PlatformClient.js +8701 -9926
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +91 -78
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +507 -253
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +34 -34
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +15 -15
- package/sdk/platform/Rewards/RewardsPlatformModel.js +92 -194
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +16 -12
- package/sdk/platform/Share/SharePlatformApplicationClient.js +130 -52
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -6
- package/sdk/platform/Share/SharePlatformModel.d.ts +8 -8
- package/sdk/platform/Share/SharePlatformModel.js +60 -118
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +148 -124
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +770 -295
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +15 -15
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +44 -44
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +34 -34
- package/sdk/platform/Theme/ThemePlatformModel.js +190 -336
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +146 -67
- package/sdk/platform/User/UserPlatformApplicationClient.js +742 -155
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +12 -7
- package/sdk/platform/User/UserPlatformApplicationValidator.js +61 -23
- package/sdk/platform/User/UserPlatformModel.d.ts +79 -72
- package/sdk/platform/User/UserPlatformModel.js +440 -689
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +35 -29
- package/sdk/platform/Webhook/WebhookPlatformClient.js +218 -91
- 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 +14 -14
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +13 -13
- package/sdk/public/Configuration/ConfigurationPublicClient.js +81 -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 +228 -105
- 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 +51 -10
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +7 -7
- package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
- package/tests/application/catalog.spec.js +7 -0
|
@@ -2,6 +2,9 @@ const Paginator = require("../../common/Paginator");
|
|
|
2
2
|
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
3
3
|
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
4
4
|
const InventoryValidator = require("./InventoryPlatformValidator");
|
|
5
|
+
const InventoryModel = require("./InventoryPlatformModel");
|
|
6
|
+
const { Logger } = require("./../../common/Logger");
|
|
7
|
+
|
|
5
8
|
class Inventory {
|
|
6
9
|
constructor(config) {
|
|
7
10
|
this.config = config;
|
|
@@ -9,16 +12,15 @@ class Inventory {
|
|
|
9
12
|
|
|
10
13
|
/**
|
|
11
14
|
* @param {Object} arg - Arg object.
|
|
12
|
-
* @param {
|
|
13
|
-
* @
|
|
14
|
-
* @summary:
|
|
15
|
-
* @description: REST Endpoint that
|
|
15
|
+
* @param {JobConfigDTO} arg.body
|
|
16
|
+
* @returns {Promise<ResponseEnvelopeString>} - Success response
|
|
17
|
+
* @summary: Creates A New Job Config
|
|
18
|
+
* @description: REST Endpoint that creates a new job config
|
|
16
19
|
*/
|
|
17
|
-
|
|
18
|
-
const { error } = InventoryValidator.
|
|
20
|
+
async createJob({ body } = {}) {
|
|
21
|
+
const { error } = InventoryValidator.createJob().validate(
|
|
19
22
|
{
|
|
20
|
-
|
|
21
|
-
pageSize,
|
|
23
|
+
body,
|
|
22
24
|
},
|
|
23
25
|
{ abortEarly: false, allowUnknown: true }
|
|
24
26
|
);
|
|
@@ -27,44 +29,62 @@ class Inventory {
|
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
// Showing warrnings if extra unknown parameters are found
|
|
30
|
-
const { error: warrning } = InventoryValidator.
|
|
32
|
+
const { error: warrning } = InventoryValidator.createJob().validate(
|
|
31
33
|
{
|
|
32
|
-
|
|
33
|
-
pageSize,
|
|
34
|
+
body,
|
|
34
35
|
},
|
|
35
36
|
{ abortEarly: false, allowUnknown: false }
|
|
36
37
|
);
|
|
37
38
|
if (warrning) {
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
Logger({
|
|
40
|
+
level: "WARN",
|
|
41
|
+
message: "Parameter Validation warrnings for createJob",
|
|
42
|
+
});
|
|
43
|
+
Logger({ level: "WARN", message: warrning });
|
|
40
44
|
}
|
|
41
45
|
|
|
42
46
|
const query_params = {};
|
|
43
|
-
query_params["page_no"] = pageNo;
|
|
44
|
-
query_params["page_size"] = pageSize;
|
|
45
47
|
|
|
46
48
|
const xHeaders = {};
|
|
47
49
|
|
|
48
|
-
|
|
50
|
+
const response = await PlatformAPIClient.execute(
|
|
49
51
|
this.config,
|
|
50
|
-
"
|
|
52
|
+
"post",
|
|
51
53
|
`/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs`,
|
|
52
54
|
query_params,
|
|
53
|
-
|
|
55
|
+
body,
|
|
54
56
|
xHeaders
|
|
55
57
|
);
|
|
58
|
+
|
|
59
|
+
const {
|
|
60
|
+
error: res_error,
|
|
61
|
+
} = InventoryModel.ResponseEnvelopeString().validate(response, {
|
|
62
|
+
abortEarly: false,
|
|
63
|
+
allowUnknown: false,
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
if (res_error) {
|
|
67
|
+
Logger({
|
|
68
|
+
level: "WARN",
|
|
69
|
+
message: "Response Validation Warnnings for createJob",
|
|
70
|
+
});
|
|
71
|
+
Logger({ level: "WARN", message: res_error });
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return response;
|
|
56
75
|
}
|
|
57
76
|
|
|
58
77
|
/**
|
|
59
78
|
* @param {Object} arg - Arg object.
|
|
60
|
-
* @param {
|
|
61
|
-
* @
|
|
62
|
-
* @
|
|
79
|
+
* @param {string} arg.integrationId - IntegrationId
|
|
80
|
+
* @returns {Promise<ResponseEnvelopeString>} - Success response
|
|
81
|
+
* @summary: Disable Job Config
|
|
82
|
+
* @description: REST Endpoint that disables Inventory Job Config
|
|
63
83
|
*/
|
|
64
|
-
|
|
65
|
-
const { error } = InventoryValidator.
|
|
84
|
+
async disable({ integrationId } = {}) {
|
|
85
|
+
const { error } = InventoryValidator.disable().validate(
|
|
66
86
|
{
|
|
67
|
-
|
|
87
|
+
integrationId,
|
|
68
88
|
},
|
|
69
89
|
{ abortEarly: false, allowUnknown: true }
|
|
70
90
|
);
|
|
@@ -73,42 +93,61 @@ class Inventory {
|
|
|
73
93
|
}
|
|
74
94
|
|
|
75
95
|
// Showing warrnings if extra unknown parameters are found
|
|
76
|
-
const { error: warrning } = InventoryValidator.
|
|
96
|
+
const { error: warrning } = InventoryValidator.disable().validate(
|
|
77
97
|
{
|
|
78
|
-
|
|
98
|
+
integrationId,
|
|
79
99
|
},
|
|
80
100
|
{ abortEarly: false, allowUnknown: false }
|
|
81
101
|
);
|
|
82
102
|
if (warrning) {
|
|
83
|
-
|
|
84
|
-
|
|
103
|
+
Logger({
|
|
104
|
+
level: "WARN",
|
|
105
|
+
message: "Parameter Validation warrnings for disable",
|
|
106
|
+
});
|
|
107
|
+
Logger({ level: "WARN", message: warrning });
|
|
85
108
|
}
|
|
86
109
|
|
|
87
110
|
const query_params = {};
|
|
88
111
|
|
|
89
112
|
const xHeaders = {};
|
|
90
113
|
|
|
91
|
-
|
|
114
|
+
const response = await PlatformAPIClient.execute(
|
|
92
115
|
this.config,
|
|
93
|
-
"
|
|
94
|
-
`/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs`,
|
|
116
|
+
"get",
|
|
117
|
+
`/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/disable/integration/${integrationId}`,
|
|
95
118
|
query_params,
|
|
96
|
-
|
|
119
|
+
undefined,
|
|
97
120
|
xHeaders
|
|
98
121
|
);
|
|
122
|
+
|
|
123
|
+
const {
|
|
124
|
+
error: res_error,
|
|
125
|
+
} = InventoryModel.ResponseEnvelopeString().validate(response, {
|
|
126
|
+
abortEarly: false,
|
|
127
|
+
allowUnknown: false,
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
if (res_error) {
|
|
131
|
+
Logger({
|
|
132
|
+
level: "WARN",
|
|
133
|
+
message: "Response Validation Warnnings for disable",
|
|
134
|
+
});
|
|
135
|
+
Logger({ level: "WARN", message: res_error });
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return response;
|
|
99
139
|
}
|
|
100
140
|
|
|
101
141
|
/**
|
|
102
142
|
* @param {Object} arg - Arg object.
|
|
103
|
-
* @
|
|
104
|
-
*
|
|
105
|
-
* @
|
|
143
|
+
* @returns {Promise<ResponseEnvelopeListSlingshotConfigurationDetail>} -
|
|
144
|
+
* Success response
|
|
145
|
+
* @summary: Get Slingshot Configuration Of A Company
|
|
146
|
+
* @description: REST Endpoint that returns all configuration detail of a company
|
|
106
147
|
*/
|
|
107
|
-
|
|
108
|
-
const { error } = InventoryValidator.
|
|
109
|
-
{
|
|
110
|
-
body,
|
|
111
|
-
},
|
|
148
|
+
async getConfigByCompany({} = {}) {
|
|
149
|
+
const { error } = InventoryValidator.getConfigByCompany().validate(
|
|
150
|
+
{},
|
|
112
151
|
{ abortEarly: false, allowUnknown: true }
|
|
113
152
|
);
|
|
114
153
|
if (error) {
|
|
@@ -116,41 +155,62 @@ class Inventory {
|
|
|
116
155
|
}
|
|
117
156
|
|
|
118
157
|
// Showing warrnings if extra unknown parameters are found
|
|
119
|
-
const {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
},
|
|
158
|
+
const {
|
|
159
|
+
error: warrning,
|
|
160
|
+
} = InventoryValidator.getConfigByCompany().validate(
|
|
161
|
+
{},
|
|
123
162
|
{ abortEarly: false, allowUnknown: false }
|
|
124
163
|
);
|
|
125
164
|
if (warrning) {
|
|
126
|
-
|
|
127
|
-
|
|
165
|
+
Logger({
|
|
166
|
+
level: "WARN",
|
|
167
|
+
message: "Parameter Validation warrnings for getConfigByCompany",
|
|
168
|
+
});
|
|
169
|
+
Logger({ level: "WARN", message: warrning });
|
|
128
170
|
}
|
|
129
171
|
|
|
130
172
|
const query_params = {};
|
|
131
173
|
|
|
132
174
|
const xHeaders = {};
|
|
133
175
|
|
|
134
|
-
|
|
176
|
+
const response = await PlatformAPIClient.execute(
|
|
135
177
|
this.config,
|
|
136
|
-
"
|
|
137
|
-
`/service/platform/inventory/v1.0/company/${this.config.companyId}/
|
|
178
|
+
"get",
|
|
179
|
+
`/service/platform/inventory/v1.0/company/${this.config.companyId}/slingshot`,
|
|
138
180
|
query_params,
|
|
139
|
-
|
|
181
|
+
undefined,
|
|
140
182
|
xHeaders
|
|
141
183
|
);
|
|
184
|
+
|
|
185
|
+
const {
|
|
186
|
+
error: res_error,
|
|
187
|
+
} = InventoryModel.ResponseEnvelopeListSlingshotConfigurationDetail().validate(
|
|
188
|
+
response,
|
|
189
|
+
{ abortEarly: false, allowUnknown: false }
|
|
190
|
+
);
|
|
191
|
+
|
|
192
|
+
if (res_error) {
|
|
193
|
+
Logger({
|
|
194
|
+
level: "WARN",
|
|
195
|
+
message: "Response Validation Warnnings for getConfigByCompany",
|
|
196
|
+
});
|
|
197
|
+
Logger({ level: "WARN", message: res_error });
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
return response;
|
|
142
201
|
}
|
|
143
202
|
|
|
144
203
|
/**
|
|
145
204
|
* @param {Object} arg - Arg object.
|
|
146
|
-
* @param {
|
|
147
|
-
* @
|
|
148
|
-
* @
|
|
205
|
+
* @param {string} arg.code - Job Code
|
|
206
|
+
* @returns {Promise<ResponseEnvelopeJobConfigDTO>} - Success response
|
|
207
|
+
* @summary: Get Job Config By Code
|
|
208
|
+
* @description: REST Endpoint that returns job config by code
|
|
149
209
|
*/
|
|
150
|
-
|
|
151
|
-
const { error } = InventoryValidator.
|
|
210
|
+
async getJobByCode({ code } = {}) {
|
|
211
|
+
const { error } = InventoryValidator.getJobByCode().validate(
|
|
152
212
|
{
|
|
153
|
-
|
|
213
|
+
code,
|
|
154
214
|
},
|
|
155
215
|
{ abortEarly: false, allowUnknown: true }
|
|
156
216
|
);
|
|
@@ -159,39 +219,73 @@ class Inventory {
|
|
|
159
219
|
}
|
|
160
220
|
|
|
161
221
|
// Showing warrnings if extra unknown parameters are found
|
|
162
|
-
const { error: warrning } = InventoryValidator.
|
|
222
|
+
const { error: warrning } = InventoryValidator.getJobByCode().validate(
|
|
163
223
|
{
|
|
164
|
-
|
|
224
|
+
code,
|
|
165
225
|
},
|
|
166
226
|
{ abortEarly: false, allowUnknown: false }
|
|
167
227
|
);
|
|
168
228
|
if (warrning) {
|
|
169
|
-
|
|
170
|
-
|
|
229
|
+
Logger({
|
|
230
|
+
level: "WARN",
|
|
231
|
+
message: "Parameter Validation warrnings for getJobByCode",
|
|
232
|
+
});
|
|
233
|
+
Logger({ level: "WARN", message: warrning });
|
|
171
234
|
}
|
|
172
235
|
|
|
173
236
|
const query_params = {};
|
|
174
237
|
|
|
175
238
|
const xHeaders = {};
|
|
176
239
|
|
|
177
|
-
|
|
240
|
+
const response = await PlatformAPIClient.execute(
|
|
178
241
|
this.config,
|
|
179
|
-
"
|
|
180
|
-
`/service/platform/inventory/v1.0/company/${this.config.companyId}/
|
|
242
|
+
"get",
|
|
243
|
+
`/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/code/${code}`,
|
|
181
244
|
query_params,
|
|
182
|
-
|
|
245
|
+
undefined,
|
|
183
246
|
xHeaders
|
|
184
247
|
);
|
|
248
|
+
|
|
249
|
+
const {
|
|
250
|
+
error: res_error,
|
|
251
|
+
} = InventoryModel.ResponseEnvelopeJobConfigDTO().validate(response, {
|
|
252
|
+
abortEarly: false,
|
|
253
|
+
allowUnknown: false,
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
if (res_error) {
|
|
257
|
+
Logger({
|
|
258
|
+
level: "WARN",
|
|
259
|
+
message: "Response Validation Warnnings for getJobByCode",
|
|
260
|
+
});
|
|
261
|
+
Logger({ level: "WARN", message: res_error });
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
return response;
|
|
185
265
|
}
|
|
186
266
|
|
|
187
267
|
/**
|
|
188
268
|
* @param {Object} arg - Arg object.
|
|
189
|
-
* @
|
|
190
|
-
* @
|
|
269
|
+
* @param {string} arg.integrationId - Integration Id
|
|
270
|
+
* @param {number} [arg.pageNo] - Page Number
|
|
271
|
+
* @param {number} [arg.pageSize] - Page Size
|
|
272
|
+
* @returns {Promise<ResponseEnvelopeListJobConfigDTO>} - Success response
|
|
273
|
+
* @summary: Get Job Configs By Company And Integration
|
|
274
|
+
* @description: REST Endpoint that returns all job configs by company And integration
|
|
191
275
|
*/
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
276
|
+
async getJobByCompanyAndIntegration({
|
|
277
|
+
integrationId,
|
|
278
|
+
pageNo,
|
|
279
|
+
pageSize,
|
|
280
|
+
} = {}) {
|
|
281
|
+
const {
|
|
282
|
+
error,
|
|
283
|
+
} = InventoryValidator.getJobByCompanyAndIntegration().validate(
|
|
284
|
+
{
|
|
285
|
+
integrationId,
|
|
286
|
+
pageNo,
|
|
287
|
+
pageSize,
|
|
288
|
+
},
|
|
195
289
|
{ abortEarly: false, allowUnknown: true }
|
|
196
290
|
);
|
|
197
291
|
if (error) {
|
|
@@ -201,39 +295,76 @@ class Inventory {
|
|
|
201
295
|
// Showing warrnings if extra unknown parameters are found
|
|
202
296
|
const {
|
|
203
297
|
error: warrning,
|
|
204
|
-
} = InventoryValidator.
|
|
205
|
-
{
|
|
298
|
+
} = InventoryValidator.getJobByCompanyAndIntegration().validate(
|
|
299
|
+
{
|
|
300
|
+
integrationId,
|
|
301
|
+
pageNo,
|
|
302
|
+
pageSize,
|
|
303
|
+
},
|
|
206
304
|
{ abortEarly: false, allowUnknown: false }
|
|
207
305
|
);
|
|
208
306
|
if (warrning) {
|
|
209
|
-
|
|
210
|
-
|
|
307
|
+
Logger({
|
|
308
|
+
level: "WARN",
|
|
309
|
+
message:
|
|
310
|
+
"Parameter Validation warrnings for getJobByCompanyAndIntegration",
|
|
311
|
+
});
|
|
312
|
+
Logger({ level: "WARN", message: warrning });
|
|
211
313
|
}
|
|
212
314
|
|
|
213
315
|
const query_params = {};
|
|
316
|
+
query_params["page_no"] = pageNo;
|
|
317
|
+
query_params["page_size"] = pageSize;
|
|
214
318
|
|
|
215
319
|
const xHeaders = {};
|
|
216
320
|
|
|
217
|
-
|
|
321
|
+
const response = await PlatformAPIClient.execute(
|
|
218
322
|
this.config,
|
|
219
323
|
"get",
|
|
220
|
-
`/service/platform/inventory/v1.0/company/${this.config.companyId}/
|
|
324
|
+
`/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/integration/${integrationId}`,
|
|
221
325
|
query_params,
|
|
222
326
|
undefined,
|
|
223
327
|
xHeaders
|
|
224
328
|
);
|
|
329
|
+
|
|
330
|
+
const {
|
|
331
|
+
error: res_error,
|
|
332
|
+
} = InventoryModel.ResponseEnvelopeListJobConfigDTO().validate(response, {
|
|
333
|
+
abortEarly: false,
|
|
334
|
+
allowUnknown: false,
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
if (res_error) {
|
|
338
|
+
Logger({
|
|
339
|
+
level: "WARN",
|
|
340
|
+
message:
|
|
341
|
+
"Response Validation Warnnings for getJobByCompanyAndIntegration",
|
|
342
|
+
});
|
|
343
|
+
Logger({ level: "WARN", message: res_error });
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
return response;
|
|
225
347
|
}
|
|
226
348
|
|
|
227
349
|
/**
|
|
228
350
|
* @param {Object} arg - Arg object.
|
|
229
|
-
* @param {
|
|
230
|
-
* @
|
|
231
|
-
* @
|
|
351
|
+
* @param {string} arg.code - Code
|
|
352
|
+
* @param {number} [arg.pageNo] - Page Number
|
|
353
|
+
* @param {number} [arg.pageSize] - Page Size
|
|
354
|
+
* @param {string} [arg.status] - Status
|
|
355
|
+
* @param {string} [arg.date] - From Date
|
|
356
|
+
* @returns {Promise<ResponseEnvelopeJobMetricsDto>} - Success response
|
|
357
|
+
* @summary: Get Job Metrics
|
|
358
|
+
* @description: REST Endpoint that returns Inventory Run History For A Job Code
|
|
232
359
|
*/
|
|
233
|
-
|
|
234
|
-
const { error } = InventoryValidator.
|
|
360
|
+
async getJobCodeMetrics({ code, pageNo, pageSize, status, date } = {}) {
|
|
361
|
+
const { error } = InventoryValidator.getJobCodeMetrics().validate(
|
|
235
362
|
{
|
|
236
|
-
|
|
363
|
+
code,
|
|
364
|
+
pageNo,
|
|
365
|
+
pageSize,
|
|
366
|
+
status,
|
|
367
|
+
date,
|
|
237
368
|
},
|
|
238
369
|
{ abortEarly: false, allowUnknown: true }
|
|
239
370
|
);
|
|
@@ -242,29 +373,57 @@ class Inventory {
|
|
|
242
373
|
}
|
|
243
374
|
|
|
244
375
|
// Showing warrnings if extra unknown parameters are found
|
|
245
|
-
const { error: warrning } = InventoryValidator.
|
|
376
|
+
const { error: warrning } = InventoryValidator.getJobCodeMetrics().validate(
|
|
246
377
|
{
|
|
247
|
-
|
|
378
|
+
code,
|
|
379
|
+
pageNo,
|
|
380
|
+
pageSize,
|
|
381
|
+
status,
|
|
382
|
+
date,
|
|
248
383
|
},
|
|
249
384
|
{ abortEarly: false, allowUnknown: false }
|
|
250
385
|
);
|
|
251
386
|
if (warrning) {
|
|
252
|
-
|
|
253
|
-
|
|
387
|
+
Logger({
|
|
388
|
+
level: "WARN",
|
|
389
|
+
message: "Parameter Validation warrnings for getJobCodeMetrics",
|
|
390
|
+
});
|
|
391
|
+
Logger({ level: "WARN", message: warrning });
|
|
254
392
|
}
|
|
255
393
|
|
|
256
394
|
const query_params = {};
|
|
395
|
+
query_params["page_no"] = pageNo;
|
|
396
|
+
query_params["page_size"] = pageSize;
|
|
397
|
+
query_params["status"] = status;
|
|
398
|
+
query_params["date"] = date;
|
|
257
399
|
|
|
258
400
|
const xHeaders = {};
|
|
259
401
|
|
|
260
|
-
|
|
402
|
+
const response = await PlatformAPIClient.execute(
|
|
261
403
|
this.config,
|
|
262
404
|
"get",
|
|
263
|
-
`/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/
|
|
405
|
+
`/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/code/${code}/metrics`,
|
|
264
406
|
query_params,
|
|
265
407
|
undefined,
|
|
266
408
|
xHeaders
|
|
267
409
|
);
|
|
410
|
+
|
|
411
|
+
const {
|
|
412
|
+
error: res_error,
|
|
413
|
+
} = InventoryModel.ResponseEnvelopeJobMetricsDto().validate(response, {
|
|
414
|
+
abortEarly: false,
|
|
415
|
+
allowUnknown: false,
|
|
416
|
+
});
|
|
417
|
+
|
|
418
|
+
if (res_error) {
|
|
419
|
+
Logger({
|
|
420
|
+
level: "WARN",
|
|
421
|
+
message: "Response Validation Warnnings for getJobCodeMetrics",
|
|
422
|
+
});
|
|
423
|
+
Logger({ level: "WARN", message: res_error });
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
return response;
|
|
268
427
|
}
|
|
269
428
|
|
|
270
429
|
/**
|
|
@@ -272,13 +431,18 @@ class Inventory {
|
|
|
272
431
|
* @param {string} arg.integrationId - Integration Id
|
|
273
432
|
* @param {number} [arg.pageNo] - Page Number
|
|
274
433
|
* @param {number} [arg.pageSize] - Page Size
|
|
275
|
-
* @
|
|
276
|
-
* @
|
|
434
|
+
* @returns {Promise<ResponseEnvelopeListJobConfigListDTO>} - Success response
|
|
435
|
+
* @summary: Get Job Codes By Company And Integration
|
|
436
|
+
* @description: REST Endpoint that returns all job codes by company And integration
|
|
277
437
|
*/
|
|
278
|
-
|
|
438
|
+
async getJobCodesByCompanyAndIntegration({
|
|
439
|
+
integrationId,
|
|
440
|
+
pageNo,
|
|
441
|
+
pageSize,
|
|
442
|
+
} = {}) {
|
|
279
443
|
const {
|
|
280
444
|
error,
|
|
281
|
-
} = InventoryValidator.
|
|
445
|
+
} = InventoryValidator.getJobCodesByCompanyAndIntegration().validate(
|
|
282
446
|
{
|
|
283
447
|
integrationId,
|
|
284
448
|
pageNo,
|
|
@@ -293,7 +457,7 @@ class Inventory {
|
|
|
293
457
|
// Showing warrnings if extra unknown parameters are found
|
|
294
458
|
const {
|
|
295
459
|
error: warrning,
|
|
296
|
-
} = InventoryValidator.
|
|
460
|
+
} = InventoryValidator.getJobCodesByCompanyAndIntegration().validate(
|
|
297
461
|
{
|
|
298
462
|
integrationId,
|
|
299
463
|
pageNo,
|
|
@@ -302,10 +466,12 @@ class Inventory {
|
|
|
302
466
|
{ abortEarly: false, allowUnknown: false }
|
|
303
467
|
);
|
|
304
468
|
if (warrning) {
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
469
|
+
Logger({
|
|
470
|
+
level: "WARN",
|
|
471
|
+
message:
|
|
472
|
+
"Parameter Validation warrnings for getJobCodesByCompanyAndIntegration",
|
|
473
|
+
});
|
|
474
|
+
Logger({ level: "WARN", message: warrning });
|
|
309
475
|
}
|
|
310
476
|
|
|
311
477
|
const query_params = {};
|
|
@@ -314,27 +480,43 @@ class Inventory {
|
|
|
314
480
|
|
|
315
481
|
const xHeaders = {};
|
|
316
482
|
|
|
317
|
-
|
|
483
|
+
const response = await PlatformAPIClient.execute(
|
|
318
484
|
this.config,
|
|
319
485
|
"get",
|
|
320
|
-
`/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/integration/${integrationId}`,
|
|
486
|
+
`/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/code/integration/${integrationId}`,
|
|
321
487
|
query_params,
|
|
322
488
|
undefined,
|
|
323
489
|
xHeaders
|
|
324
490
|
);
|
|
491
|
+
|
|
492
|
+
const {
|
|
493
|
+
error: res_error,
|
|
494
|
+
} = InventoryModel.ResponseEnvelopeListJobConfigListDTO().validate(
|
|
495
|
+
response,
|
|
496
|
+
{ abortEarly: false, allowUnknown: false }
|
|
497
|
+
);
|
|
498
|
+
|
|
499
|
+
if (res_error) {
|
|
500
|
+
Logger({
|
|
501
|
+
level: "WARN",
|
|
502
|
+
message:
|
|
503
|
+
"Response Validation Warnnings for getJobCodesByCompanyAndIntegration",
|
|
504
|
+
});
|
|
505
|
+
Logger({ level: "WARN", message: res_error });
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
return response;
|
|
325
509
|
}
|
|
326
510
|
|
|
327
511
|
/**
|
|
328
512
|
* @param {Object} arg - Arg object.
|
|
329
|
-
* @
|
|
330
|
-
* @summary:
|
|
331
|
-
* @description: REST Endpoint that
|
|
513
|
+
* @returns {Promise<ResponseEnvelopeJobConfigDTO>} - Success response
|
|
514
|
+
* @summary: Get Job Configs Defaults
|
|
515
|
+
* @description: REST Endpoint that returns default fields job configs by company And integration
|
|
332
516
|
*/
|
|
333
|
-
|
|
334
|
-
const { error } = InventoryValidator.
|
|
335
|
-
{
|
|
336
|
-
integrationId,
|
|
337
|
-
},
|
|
517
|
+
async getJobConfigDefaults({} = {}) {
|
|
518
|
+
const { error } = InventoryValidator.getJobConfigDefaults().validate(
|
|
519
|
+
{},
|
|
338
520
|
{ abortEarly: false, allowUnknown: true }
|
|
339
521
|
);
|
|
340
522
|
if (error) {
|
|
@@ -342,39 +524,63 @@ class Inventory {
|
|
|
342
524
|
}
|
|
343
525
|
|
|
344
526
|
// Showing warrnings if extra unknown parameters are found
|
|
345
|
-
const {
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
},
|
|
527
|
+
const {
|
|
528
|
+
error: warrning,
|
|
529
|
+
} = InventoryValidator.getJobConfigDefaults().validate(
|
|
530
|
+
{},
|
|
349
531
|
{ abortEarly: false, allowUnknown: false }
|
|
350
532
|
);
|
|
351
533
|
if (warrning) {
|
|
352
|
-
|
|
353
|
-
|
|
534
|
+
Logger({
|
|
535
|
+
level: "WARN",
|
|
536
|
+
message: "Parameter Validation warrnings for getJobConfigDefaults",
|
|
537
|
+
});
|
|
538
|
+
Logger({ level: "WARN", message: warrning });
|
|
354
539
|
}
|
|
355
540
|
|
|
356
541
|
const query_params = {};
|
|
357
542
|
|
|
358
543
|
const xHeaders = {};
|
|
359
544
|
|
|
360
|
-
|
|
545
|
+
const response = await PlatformAPIClient.execute(
|
|
361
546
|
this.config,
|
|
362
547
|
"get",
|
|
363
|
-
`/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/
|
|
548
|
+
`/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/defaults`,
|
|
364
549
|
query_params,
|
|
365
550
|
undefined,
|
|
366
551
|
xHeaders
|
|
367
552
|
);
|
|
553
|
+
|
|
554
|
+
const {
|
|
555
|
+
error: res_error,
|
|
556
|
+
} = InventoryModel.ResponseEnvelopeJobConfigDTO().validate(response, {
|
|
557
|
+
abortEarly: false,
|
|
558
|
+
allowUnknown: false,
|
|
559
|
+
});
|
|
560
|
+
|
|
561
|
+
if (res_error) {
|
|
562
|
+
Logger({
|
|
563
|
+
level: "WARN",
|
|
564
|
+
message: "Response Validation Warnnings for getJobConfigDefaults",
|
|
565
|
+
});
|
|
566
|
+
Logger({ level: "WARN", message: res_error });
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
return response;
|
|
368
570
|
}
|
|
369
571
|
|
|
370
572
|
/**
|
|
371
573
|
* @param {Object} arg - Arg object.
|
|
372
|
-
* @
|
|
373
|
-
* @
|
|
574
|
+
* @param {number} arg.jobId - Job Id
|
|
575
|
+
* @returns {Promise<ResponseEnvelopeListJobStepsDTO>} - Success response
|
|
576
|
+
* @summary: Get Job Code Steps
|
|
577
|
+
* @description: REST Endpoint that returns Inventory Job Steps
|
|
374
578
|
*/
|
|
375
|
-
|
|
376
|
-
const { error } = InventoryValidator.
|
|
377
|
-
{
|
|
579
|
+
async getJobSteps({ jobId } = {}) {
|
|
580
|
+
const { error } = InventoryValidator.getJobSteps().validate(
|
|
581
|
+
{
|
|
582
|
+
jobId,
|
|
583
|
+
},
|
|
378
584
|
{ abortEarly: false, allowUnknown: true }
|
|
379
585
|
);
|
|
380
586
|
if (error) {
|
|
@@ -382,41 +588,64 @@ class Inventory {
|
|
|
382
588
|
}
|
|
383
589
|
|
|
384
590
|
// Showing warrnings if extra unknown parameters are found
|
|
385
|
-
const {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
591
|
+
const { error: warrning } = InventoryValidator.getJobSteps().validate(
|
|
592
|
+
{
|
|
593
|
+
jobId,
|
|
594
|
+
},
|
|
389
595
|
{ abortEarly: false, allowUnknown: false }
|
|
390
596
|
);
|
|
391
597
|
if (warrning) {
|
|
392
|
-
|
|
393
|
-
|
|
598
|
+
Logger({
|
|
599
|
+
level: "WARN",
|
|
600
|
+
message: "Parameter Validation warrnings for getJobSteps",
|
|
601
|
+
});
|
|
602
|
+
Logger({ level: "WARN", message: warrning });
|
|
394
603
|
}
|
|
395
604
|
|
|
396
605
|
const query_params = {};
|
|
397
606
|
|
|
398
607
|
const xHeaders = {};
|
|
399
608
|
|
|
400
|
-
|
|
609
|
+
const response = await PlatformAPIClient.execute(
|
|
401
610
|
this.config,
|
|
402
611
|
"get",
|
|
403
|
-
`/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/
|
|
612
|
+
`/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs/steps/${jobId}`,
|
|
404
613
|
query_params,
|
|
405
614
|
undefined,
|
|
406
615
|
xHeaders
|
|
407
616
|
);
|
|
617
|
+
|
|
618
|
+
const {
|
|
619
|
+
error: res_error,
|
|
620
|
+
} = InventoryModel.ResponseEnvelopeListJobStepsDTO().validate(response, {
|
|
621
|
+
abortEarly: false,
|
|
622
|
+
allowUnknown: false,
|
|
623
|
+
});
|
|
624
|
+
|
|
625
|
+
if (res_error) {
|
|
626
|
+
Logger({
|
|
627
|
+
level: "WARN",
|
|
628
|
+
message: "Response Validation Warnnings for getJobSteps",
|
|
629
|
+
});
|
|
630
|
+
Logger({ level: "WARN", message: res_error });
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
return response;
|
|
408
634
|
}
|
|
409
635
|
|
|
410
636
|
/**
|
|
411
637
|
* @param {Object} arg - Arg object.
|
|
412
|
-
* @param {
|
|
413
|
-
* @
|
|
414
|
-
* @
|
|
638
|
+
* @param {number} [arg.pageNo] - Page Number
|
|
639
|
+
* @param {number} [arg.pageSize] - Page Size
|
|
640
|
+
* @returns {Promise<ResponseEnvelopeListJobConfigRawDTO>} - Success response
|
|
641
|
+
* @summary: Get Job Configs For A Company
|
|
642
|
+
* @description: REST Endpoint that returns all job configs for a company
|
|
415
643
|
*/
|
|
416
|
-
|
|
417
|
-
const { error } = InventoryValidator.
|
|
644
|
+
async getJobsByCompany({ pageNo, pageSize } = {}) {
|
|
645
|
+
const { error } = InventoryValidator.getJobsByCompany().validate(
|
|
418
646
|
{
|
|
419
|
-
|
|
647
|
+
pageNo,
|
|
648
|
+
pageSize,
|
|
420
649
|
},
|
|
421
650
|
{ abortEarly: false, allowUnknown: true }
|
|
422
651
|
);
|
|
@@ -425,49 +654,65 @@ class Inventory {
|
|
|
425
654
|
}
|
|
426
655
|
|
|
427
656
|
// Showing warrnings if extra unknown parameters are found
|
|
428
|
-
const { error: warrning } = InventoryValidator.
|
|
657
|
+
const { error: warrning } = InventoryValidator.getJobsByCompany().validate(
|
|
429
658
|
{
|
|
430
|
-
|
|
659
|
+
pageNo,
|
|
660
|
+
pageSize,
|
|
431
661
|
},
|
|
432
662
|
{ abortEarly: false, allowUnknown: false }
|
|
433
663
|
);
|
|
434
664
|
if (warrning) {
|
|
435
|
-
|
|
436
|
-
|
|
665
|
+
Logger({
|
|
666
|
+
level: "WARN",
|
|
667
|
+
message: "Parameter Validation warrnings for getJobsByCompany",
|
|
668
|
+
});
|
|
669
|
+
Logger({ level: "WARN", message: warrning });
|
|
437
670
|
}
|
|
438
671
|
|
|
439
672
|
const query_params = {};
|
|
673
|
+
query_params["page_no"] = pageNo;
|
|
674
|
+
query_params["page_size"] = pageSize;
|
|
440
675
|
|
|
441
676
|
const xHeaders = {};
|
|
442
677
|
|
|
443
|
-
|
|
678
|
+
const response = await PlatformAPIClient.execute(
|
|
444
679
|
this.config,
|
|
445
680
|
"get",
|
|
446
|
-
`/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs
|
|
681
|
+
`/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs`,
|
|
447
682
|
query_params,
|
|
448
683
|
undefined,
|
|
449
684
|
xHeaders
|
|
450
685
|
);
|
|
686
|
+
|
|
687
|
+
const {
|
|
688
|
+
error: res_error,
|
|
689
|
+
} = InventoryModel.ResponseEnvelopeListJobConfigRawDTO().validate(
|
|
690
|
+
response,
|
|
691
|
+
{ abortEarly: false, allowUnknown: false }
|
|
692
|
+
);
|
|
693
|
+
|
|
694
|
+
if (res_error) {
|
|
695
|
+
Logger({
|
|
696
|
+
level: "WARN",
|
|
697
|
+
message: "Response Validation Warnnings for getJobsByCompany",
|
|
698
|
+
});
|
|
699
|
+
Logger({ level: "WARN", message: res_error });
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
return response;
|
|
451
703
|
}
|
|
452
704
|
|
|
453
705
|
/**
|
|
454
706
|
* @param {Object} arg - Arg object.
|
|
455
|
-
* @param {
|
|
456
|
-
* @
|
|
457
|
-
* @
|
|
458
|
-
* @
|
|
459
|
-
* @param {string} [arg.date] - From Date
|
|
460
|
-
* @summary: Get Job Metrics
|
|
461
|
-
* @description: REST Endpoint that returns Inventory Run History For A Job Code
|
|
707
|
+
* @param {SuppressStorePayload} arg.body
|
|
708
|
+
* @returns {Promise<ResponseEnvelopeKafkaResponse>} - Success response
|
|
709
|
+
* @summary: Get Slingshot Configuration Of A Company
|
|
710
|
+
* @description: REST Endpoint that returns all configuration detail of a company
|
|
462
711
|
*/
|
|
463
|
-
|
|
464
|
-
const { error } = InventoryValidator.
|
|
712
|
+
async suppressStores({ body } = {}) {
|
|
713
|
+
const { error } = InventoryValidator.suppressStores().validate(
|
|
465
714
|
{
|
|
466
|
-
|
|
467
|
-
pageNo,
|
|
468
|
-
pageSize,
|
|
469
|
-
status,
|
|
470
|
-
date,
|
|
715
|
+
body,
|
|
471
716
|
},
|
|
472
717
|
{ abortEarly: false, allowUnknown: true }
|
|
473
718
|
);
|
|
@@ -476,55 +721,62 @@ class Inventory {
|
|
|
476
721
|
}
|
|
477
722
|
|
|
478
723
|
// Showing warrnings if extra unknown parameters are found
|
|
479
|
-
const { error: warrning } = InventoryValidator.
|
|
724
|
+
const { error: warrning } = InventoryValidator.suppressStores().validate(
|
|
480
725
|
{
|
|
481
|
-
|
|
482
|
-
pageNo,
|
|
483
|
-
pageSize,
|
|
484
|
-
status,
|
|
485
|
-
date,
|
|
726
|
+
body,
|
|
486
727
|
},
|
|
487
728
|
{ abortEarly: false, allowUnknown: false }
|
|
488
729
|
);
|
|
489
730
|
if (warrning) {
|
|
490
|
-
|
|
491
|
-
|
|
731
|
+
Logger({
|
|
732
|
+
level: "WARN",
|
|
733
|
+
message: "Parameter Validation warrnings for suppressStores",
|
|
734
|
+
});
|
|
735
|
+
Logger({ level: "WARN", message: warrning });
|
|
492
736
|
}
|
|
493
737
|
|
|
494
738
|
const query_params = {};
|
|
495
|
-
query_params["page_no"] = pageNo;
|
|
496
|
-
query_params["page_size"] = pageSize;
|
|
497
|
-
query_params["status"] = status;
|
|
498
|
-
query_params["date"] = date;
|
|
499
739
|
|
|
500
740
|
const xHeaders = {};
|
|
501
741
|
|
|
502
|
-
|
|
742
|
+
const response = await PlatformAPIClient.execute(
|
|
503
743
|
this.config,
|
|
504
|
-
"
|
|
505
|
-
`/service/platform/inventory/v1.0/company/${this.config.companyId}/
|
|
744
|
+
"post",
|
|
745
|
+
`/service/platform/inventory/v1.0/company/${this.config.companyId}/kafka/suppressStore`,
|
|
506
746
|
query_params,
|
|
507
|
-
|
|
747
|
+
body,
|
|
508
748
|
xHeaders
|
|
509
749
|
);
|
|
750
|
+
|
|
751
|
+
const {
|
|
752
|
+
error: res_error,
|
|
753
|
+
} = InventoryModel.ResponseEnvelopeKafkaResponse().validate(response, {
|
|
754
|
+
abortEarly: false,
|
|
755
|
+
allowUnknown: false,
|
|
756
|
+
});
|
|
757
|
+
|
|
758
|
+
if (res_error) {
|
|
759
|
+
Logger({
|
|
760
|
+
level: "WARN",
|
|
761
|
+
message: "Response Validation Warnnings for suppressStores",
|
|
762
|
+
});
|
|
763
|
+
Logger({ level: "WARN", message: res_error });
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
return response;
|
|
510
767
|
}
|
|
511
768
|
|
|
512
769
|
/**
|
|
513
770
|
* @param {Object} arg - Arg object.
|
|
514
|
-
* @param {
|
|
515
|
-
* @
|
|
516
|
-
* @
|
|
517
|
-
* @
|
|
518
|
-
* @description: REST Endpoint that returns all job codes by company And integration
|
|
771
|
+
* @param {JobConfigDTO} arg.body
|
|
772
|
+
* @returns {Promise<ResponseEnvelopeString>} - Success response
|
|
773
|
+
* @summary: Updates An Existing Job Config
|
|
774
|
+
* @description: REST Endpoint that updates a job config
|
|
519
775
|
*/
|
|
520
|
-
|
|
521
|
-
const {
|
|
522
|
-
error,
|
|
523
|
-
} = InventoryValidator.getJobCodesByCompanyAndIntegration().validate(
|
|
776
|
+
async updateJob({ body } = {}) {
|
|
777
|
+
const { error } = InventoryValidator.updateJob().validate(
|
|
524
778
|
{
|
|
525
|
-
|
|
526
|
-
pageNo,
|
|
527
|
-
pageSize,
|
|
779
|
+
body,
|
|
528
780
|
},
|
|
529
781
|
{ abortEarly: false, allowUnknown: true }
|
|
530
782
|
);
|
|
@@ -533,37 +785,49 @@ class Inventory {
|
|
|
533
785
|
}
|
|
534
786
|
|
|
535
787
|
// Showing warrnings if extra unknown parameters are found
|
|
536
|
-
const {
|
|
537
|
-
error: warrning,
|
|
538
|
-
} = InventoryValidator.getJobCodesByCompanyAndIntegration().validate(
|
|
788
|
+
const { error: warrning } = InventoryValidator.updateJob().validate(
|
|
539
789
|
{
|
|
540
|
-
|
|
541
|
-
pageNo,
|
|
542
|
-
pageSize,
|
|
790
|
+
body,
|
|
543
791
|
},
|
|
544
792
|
{ abortEarly: false, allowUnknown: false }
|
|
545
793
|
);
|
|
546
794
|
if (warrning) {
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
795
|
+
Logger({
|
|
796
|
+
level: "WARN",
|
|
797
|
+
message: "Parameter Validation warrnings for updateJob",
|
|
798
|
+
});
|
|
799
|
+
Logger({ level: "WARN", message: warrning });
|
|
551
800
|
}
|
|
552
801
|
|
|
553
802
|
const query_params = {};
|
|
554
|
-
query_params["page_no"] = pageNo;
|
|
555
|
-
query_params["page_size"] = pageSize;
|
|
556
803
|
|
|
557
804
|
const xHeaders = {};
|
|
558
805
|
|
|
559
|
-
|
|
806
|
+
const response = await PlatformAPIClient.execute(
|
|
560
807
|
this.config,
|
|
561
|
-
"
|
|
562
|
-
`/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs
|
|
808
|
+
"put",
|
|
809
|
+
`/service/platform/inventory/v1.0/company/${this.config.companyId}/jobs`,
|
|
563
810
|
query_params,
|
|
564
|
-
|
|
811
|
+
body,
|
|
565
812
|
xHeaders
|
|
566
813
|
);
|
|
814
|
+
|
|
815
|
+
const {
|
|
816
|
+
error: res_error,
|
|
817
|
+
} = InventoryModel.ResponseEnvelopeString().validate(response, {
|
|
818
|
+
abortEarly: false,
|
|
819
|
+
allowUnknown: false,
|
|
820
|
+
});
|
|
821
|
+
|
|
822
|
+
if (res_error) {
|
|
823
|
+
Logger({
|
|
824
|
+
level: "WARN",
|
|
825
|
+
message: "Response Validation Warnnings for updateJob",
|
|
826
|
+
});
|
|
827
|
+
Logger({ level: "WARN", message: res_error });
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
return response;
|
|
567
831
|
}
|
|
568
832
|
}
|
|
569
833
|
|