@gofynd/fdk-client-javascript 1.4.8-beta.2 → 1.4.8
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 +26 -1
- package/package.json +2 -2
- package/sdk/application/ApplicationClient.d.ts +8 -0
- package/sdk/application/ApplicationClient.js +14 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +20 -20
- package/sdk/application/Cart/CartApplicationClient.js +20 -20
- package/sdk/application/Cart/CartApplicationModel.d.ts +2446 -664
- package/sdk/application/Cart/CartApplicationModel.js +783 -552
- package/sdk/application/Cart/CartApplicationValidator.d.ts +268 -194
- package/sdk/application/Cart/CartApplicationValidator.js +100 -114
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +53 -53
- package/sdk/application/Catalog/CatalogApplicationClient.js +53 -53
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2012 -503
- package/sdk/application/Catalog/CatalogApplicationModel.js +603 -453
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +64 -64
- package/sdk/application/Catalog/CatalogApplicationValidator.js +32 -32
- package/sdk/application/Common/CommonApplicationClient.d.ts +2 -2
- package/sdk/application/Common/CommonApplicationClient.js +2 -2
- package/sdk/application/Common/CommonApplicationModel.d.ts +170 -90
- package/sdk/application/Common/CommonApplicationModel.js +59 -58
- package/sdk/application/Common/CommonApplicationValidator.d.ts +8 -5
- package/sdk/application/Common/CommonApplicationValidator.js +3 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +2 -2
- package/sdk/application/Communication/CommunicationApplicationClient.js +2 -2
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +170 -35
- package/sdk/application/Communication/CommunicationApplicationModel.js +54 -33
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +15 -15
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +15 -15
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +624 -443
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +259 -248
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +32 -24
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +14 -13
- package/sdk/application/Content/ContentApplicationClient.d.ts +16 -16
- package/sdk/application/Content/ContentApplicationClient.js +16 -16
- package/sdk/application/Content/ContentApplicationModel.d.ts +1206 -281
- package/sdk/application/Content/ContentApplicationModel.js +342 -276
- package/sdk/application/Content/ContentApplicationValidator.d.ts +28 -17
- package/sdk/application/Content/ContentApplicationValidator.js +11 -10
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +3 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +3 -3
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +146 -37
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +38 -36
- package/sdk/application/Lead/LeadApplicationClient.d.ts +3 -3
- package/sdk/application/Lead/LeadApplicationClient.js +3 -3
- package/sdk/application/Lead/LeadApplicationModel.d.ts +195 -134
- package/sdk/application/Lead/LeadApplicationModel.js +110 -67
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +8 -8
- package/sdk/application/Lead/LeadApplicationValidator.js +4 -4
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +10 -10
- package/sdk/application/Logistic/LogisticApplicationClient.js +10 -10
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +1039 -221
- package/sdk/application/Logistic/LogisticApplicationModel.js +342 -199
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +76 -82
- package/sdk/application/Logistic/LogisticApplicationValidator.js +38 -41
- package/sdk/application/Order/OrderApplicationClient.d.ts +10 -10
- package/sdk/application/Order/OrderApplicationClient.js +10 -10
- package/sdk/application/Order/OrderApplicationModel.d.ts +1401 -324
- package/sdk/application/Order/OrderApplicationModel.js +392 -316
- package/sdk/application/Order/OrderApplicationValidator.d.ts +32 -30
- package/sdk/application/Order/OrderApplicationValidator.js +15 -14
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +43 -43
- package/sdk/application/Payment/PaymentApplicationClient.js +43 -43
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +1111 -1022
- package/sdk/application/Payment/PaymentApplicationModel.js +537 -521
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +82 -49
- package/sdk/application/Payment/PaymentApplicationValidator.js +30 -30
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +28 -7
- package/sdk/application/Rewards/RewardsApplicationModel.js +7 -7
- package/sdk/application/Share/ShareApplicationModel.d.ts +178 -38
- package/sdk/application/Share/ShareApplicationModel.js +53 -37
- package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -2
- package/sdk/application/Share/ShareApplicationValidator.js +2 -1
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +4 -4
- package/sdk/application/Theme/ThemeApplicationClient.js +14 -8
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +528 -287
- package/sdk/application/Theme/ThemeApplicationModel.js +208 -172
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +17 -12
- package/sdk/application/Theme/ThemeApplicationValidator.js +8 -6
- package/sdk/application/User/UserApplicationClient.d.ts +36 -36
- package/sdk/application/User/UserApplicationClient.js +36 -36
- package/sdk/application/User/UserApplicationModel.d.ts +1062 -255
- package/sdk/application/User/UserApplicationModel.js +298 -244
- package/sdk/application/User/UserApplicationValidator.d.ts +80 -80
- package/sdk/application/User/UserApplicationValidator.js +40 -40
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +1 -1
- package/sdk/application/Webhook/WebhookApplicationClient.js +1 -1
- package/sdk/application/Webhook/WebhookApplicationModel.d.ts +20 -5
- package/sdk/application/Webhook/WebhookApplicationModel.js +5 -5
- package/sdk/common/Clickstream.js +95 -15
- package/sdk/common/Constant.d.ts +9 -0
- package/sdk/common/Constant.js +11 -0
- package/sdk/common/Utility.js +19 -0
- package/sdk/common/utils.js +8 -1
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +28 -7
- package/sdk/partner/Lead/LeadPartnerModel.js +7 -7
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +75 -8
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +59 -7
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +2 -2
- package/sdk/partner/PartnerClient.d.ts +8 -0
- package/sdk/partner/PartnerClient.js +14 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +20 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +158 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +45 -6
- package/sdk/partner/Theme/ThemePartnerModel.js +33 -4
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +2 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +14 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +28 -7
- package/sdk/partner/Webhook/WebhookPartnerModel.js +7 -7
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +28 -7
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +7 -7
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +21 -10
- package/sdk/platform/Billing/BillingPlatformClient.js +167 -83
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +2849 -565
- package/sdk/platform/Billing/BillingPlatformModel.js +935 -556
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +30 -14
- package/sdk/platform/Billing/BillingPlatformValidator.js +31 -16
- package/sdk/platform/Cart/CartPlatformModel.d.ts +28 -7
- package/sdk/platform/Cart/CartPlatformModel.js +8 -8
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +20 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +37 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +16 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +12 -2
- package/sdk/platform/Catalog/CatalogPlatformClient.js +41 -1
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +46 -12
- package/sdk/platform/Catalog/CatalogPlatformModel.js +14 -11
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +40 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +17 -0
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +28 -7
- package/sdk/platform/Communication/CommunicationPlatformModel.js +7 -7
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +28 -7
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +7 -7
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +0 -97
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +77 -782
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +24 -701
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +7 -539
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +1 -183
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +0 -134
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -10
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +0 -79
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -15
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -13
- package/sdk/platform/Content/ContentPlatformModel.d.ts +60 -17
- package/sdk/platform/Content/ContentPlatformModel.js +30 -15
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +28 -7
- package/sdk/platform/Discount/DiscountPlatformModel.js +7 -7
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +127 -25
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +37 -25
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +30 -30
- package/sdk/platform/Finance/FinancePlatformClient.js +30 -30
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +1601 -348
- package/sdk/platform/Finance/FinancePlatformModel.js +488 -352
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +28 -7
- package/sdk/platform/Lead/LeadPlatformModel.js +7 -7
- package/sdk/platform/Order/OrderPlatformClient.d.ts +22 -0
- package/sdk/platform/Order/OrderPlatformClient.js +165 -0
- package/sdk/platform/Order/OrderPlatformModel.d.ts +631 -39
- package/sdk/platform/Order/OrderPlatformModel.js +367 -41
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -1
- package/sdk/platform/Order/OrderPlatformValidator.js +28 -0
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +30 -9
- package/sdk/platform/Payment/PaymentPlatformModel.js +9 -9
- package/sdk/platform/PlatformClient.d.ts +8 -0
- package/sdk/platform/PlatformClient.js +14 -0
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +28 -7
- package/sdk/platform/Rewards/RewardsPlatformModel.js +7 -7
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +12 -9
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +12 -9
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +1 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +4 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +139 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +98 -21
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +4 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +4 -4
- package/sdk/platform/Share/SharePlatformModel.d.ts +28 -7
- package/sdk/platform/Share/SharePlatformModel.js +7 -7
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +18 -5
- package/sdk/platform/Theme/ThemePlatformModel.js +7 -4
- package/sdk/platform/User/UserPlatformModel.d.ts +18 -20
- package/sdk/platform/User/UserPlatformModel.js +9 -11
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +54 -33
- package/sdk/platform/Webhook/WebhookPlatformModel.js +33 -33
- package/sdk/public/Billing/BillingPublicClient.d.ts +11 -0
- package/sdk/public/Billing/BillingPublicClient.js +80 -0
- package/sdk/public/Billing/BillingPublicModel.d.ts +584 -99
- package/sdk/public/Billing/BillingPublicModel.js +252 -87
- package/sdk/public/Billing/BillingPublicValidator.d.ts +10 -1
- package/sdk/public/Billing/BillingPublicValidator.js +12 -0
- package/sdk/public/PublicClient.d.ts +0 -2
- package/sdk/public/PublicClient.js +0 -4
- package/sdk/public/index.d.ts +0 -1
- package/sdk/public/index.js +0 -2
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +0 -87
- package/sdk/public/Inventory/InventoryPublicClient.js +0 -529
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +0 -393
- package/sdk/public/Inventory/InventoryPublicModel.js +0 -448
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +0 -91
- package/sdk/public/Inventory/InventoryPublicValidator.js +0 -85
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
export = Inventory;
|
|
2
|
-
declare class Inventory {
|
|
3
|
-
constructor(_conf: any);
|
|
4
|
-
_conf: any;
|
|
5
|
-
_relativeUrls: {
|
|
6
|
-
getApiKey: string;
|
|
7
|
-
getConfigByApiKey: string;
|
|
8
|
-
getJobByCode: string;
|
|
9
|
-
getJobCodesMetrics: string;
|
|
10
|
-
getJobConfigByIntegrationType: string;
|
|
11
|
-
saveJobCodesMetrics: string;
|
|
12
|
-
};
|
|
13
|
-
_urls: {};
|
|
14
|
-
updateUrls(urls: any): void;
|
|
15
|
-
/**
|
|
16
|
-
* @param {InventoryPublicValidator.GetApiKeyParam} arg - Arg object.
|
|
17
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
18
|
-
* @param {import("../PublicAPIClient").Options} - Options
|
|
19
|
-
* @returns {Promise<InventoryPublicModel.ResponseEnvelopeApikeyModel>} -
|
|
20
|
-
* Success response
|
|
21
|
-
* @name getApiKey
|
|
22
|
-
* @summary: Get apikey for Company to call other Slingshot Configuration APIs
|
|
23
|
-
* @description: REST Endpoint that returns apikey by username by password - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/inventory/getApiKey/).
|
|
24
|
-
*/
|
|
25
|
-
getApiKey({ userName, password, requestHeaders }?: InventoryPublicValidator.GetApiKeyParam, { responseHeaders }?: object): Promise<InventoryPublicModel.ResponseEnvelopeApikeyModel>;
|
|
26
|
-
/**
|
|
27
|
-
* @param {InventoryPublicValidator.GetConfigByApiKeyParam} arg - Arg object.
|
|
28
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
29
|
-
* @param {import("../PublicAPIClient").Options} - Options
|
|
30
|
-
* @returns {Promise<InventoryPublicModel.ResponseEnvelopeSlingshotConfigurationDetail>}
|
|
31
|
-
* - Success response
|
|
32
|
-
*
|
|
33
|
-
* @name getConfigByApiKey
|
|
34
|
-
* @summary: Get Slingshot Configuration Of A Company using API key
|
|
35
|
-
* @description: REST Endpoint that returns all configuration detail of a company - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/inventory/getConfigByApiKey/).
|
|
36
|
-
*/
|
|
37
|
-
getConfigByApiKey({ apikey, requestHeaders }?: InventoryPublicValidator.GetConfigByApiKeyParam, { responseHeaders }?: object): Promise<InventoryPublicModel.ResponseEnvelopeSlingshotConfigurationDetail>;
|
|
38
|
-
/**
|
|
39
|
-
* @param {InventoryPublicValidator.GetJobByCodeParam} arg - Arg object.
|
|
40
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
41
|
-
* @param {import("../PublicAPIClient").Options} - Options
|
|
42
|
-
* @returns {Promise<InventoryPublicModel.ResponseEnvelopeJobConfigDTO>} -
|
|
43
|
-
* Success response
|
|
44
|
-
* @name getJobByCode
|
|
45
|
-
* @summary: Get Job Config By Code
|
|
46
|
-
* @description: REST Endpoint that returns job config by code - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/inventory/getJobByCode/).
|
|
47
|
-
*/
|
|
48
|
-
getJobByCode({ code, requestHeaders }?: InventoryPublicValidator.GetJobByCodeParam, { responseHeaders }?: object): Promise<InventoryPublicModel.ResponseEnvelopeJobConfigDTO>;
|
|
49
|
-
/**
|
|
50
|
-
* @param {InventoryPublicValidator.GetJobCodesMetricsParam} arg - Arg object.
|
|
51
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
52
|
-
* @param {import("../PublicAPIClient").Options} - Options
|
|
53
|
-
* @returns {Promise<InventoryPublicModel.ResponseEnvelopeObject>} - Success response
|
|
54
|
-
* @name getJobCodesMetrics
|
|
55
|
-
* @summary: Find all the JobCodes from Metrics Collection based on the field Values
|
|
56
|
-
* @description: Endpoint to return all JobCodes present in Metrics Collection - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/inventory/getJobCodesMetrics/).
|
|
57
|
-
*/
|
|
58
|
-
getJobCodesMetrics({ dailyJob, jobCode, requestHeaders }?: InventoryPublicValidator.GetJobCodesMetricsParam, { responseHeaders }?: object): Promise<InventoryPublicModel.ResponseEnvelopeObject>;
|
|
59
|
-
/**
|
|
60
|
-
* @param {InventoryPublicValidator.GetJobConfigByIntegrationTypeParam} arg
|
|
61
|
-
* - Arg object.
|
|
62
|
-
*
|
|
63
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
64
|
-
* @param {import("../PublicAPIClient").Options} - Options
|
|
65
|
-
* @returns {Promise<InventoryPublicModel.ResponseEnvelopeListJobConfigDTO>}
|
|
66
|
-
* - Success response
|
|
67
|
-
*
|
|
68
|
-
* @name getJobConfigByIntegrationType
|
|
69
|
-
* @summary: Get Job Configs By Integration Type
|
|
70
|
-
* @description: REST Endpoint that returns all job Configs by Integration Type - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/inventory/getJobConfigByIntegrationType/).
|
|
71
|
-
*/
|
|
72
|
-
getJobConfigByIntegrationType({ integrationType, disable, requestHeaders }?: InventoryPublicValidator.GetJobConfigByIntegrationTypeParam, { responseHeaders }?: object): Promise<InventoryPublicModel.ResponseEnvelopeListJobConfigDTO>;
|
|
73
|
-
/**
|
|
74
|
-
* @param {InventoryPublicValidator.SaveJobCodesMetricsParam} arg - Arg object.
|
|
75
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
76
|
-
* @param {import("../PublicAPIClient").Options} - Options
|
|
77
|
-
* @returns {Promise<InventoryPublicModel.ResponseEnvelopeEmailJobMetrics>}
|
|
78
|
-
* - Success response
|
|
79
|
-
*
|
|
80
|
-
* @name saveJobCodesMetrics
|
|
81
|
-
* @summary: Save JobCode Metrics
|
|
82
|
-
* @description: Endpoint to save JobCode Metrics - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/inventory/saveJobCodesMetrics/).
|
|
83
|
-
*/
|
|
84
|
-
saveJobCodesMetrics({ body, requestHeaders }?: InventoryPublicValidator.SaveJobCodesMetricsParam, { responseHeaders }?: object): Promise<InventoryPublicModel.ResponseEnvelopeEmailJobMetrics>;
|
|
85
|
-
}
|
|
86
|
-
import InventoryPublicValidator = require("./InventoryPublicValidator");
|
|
87
|
-
import InventoryPublicModel = require("./InventoryPublicModel");
|
|
@@ -1,529 +0,0 @@
|
|
|
1
|
-
const PublicAPIClient = require("../PublicAPIClient");
|
|
2
|
-
const {
|
|
3
|
-
FDKClientValidationError,
|
|
4
|
-
FDKResponseValidationError,
|
|
5
|
-
} = require("../../common/FDKError");
|
|
6
|
-
const constructUrl = require("../constructUrl");
|
|
7
|
-
const Paginator = require("../../common/Paginator");
|
|
8
|
-
const InventoryPublicValidator = require("./InventoryPublicValidator");
|
|
9
|
-
const InventoryPublicModel = require("./InventoryPublicModel");
|
|
10
|
-
const { Logger } = require("./../../common/Logger");
|
|
11
|
-
const Joi = require("joi");
|
|
12
|
-
|
|
13
|
-
class Inventory {
|
|
14
|
-
constructor(_conf) {
|
|
15
|
-
this._conf = _conf;
|
|
16
|
-
this._relativeUrls = {
|
|
17
|
-
getApiKey: "/service/common/inventory/v1.0/company/slingshot/apikey",
|
|
18
|
-
getConfigByApiKey: "/service/common/inventory/v1.0/company/slingshot",
|
|
19
|
-
getJobByCode: "/service/common/inventory/v1.0/company/jobs/code/{code}",
|
|
20
|
-
getJobCodesMetrics:
|
|
21
|
-
"/service/common/inventory/v1.0/company/email/jobCode",
|
|
22
|
-
getJobConfigByIntegrationType:
|
|
23
|
-
"/service/common/inventory/v1.0/company/job/config",
|
|
24
|
-
saveJobCodesMetrics:
|
|
25
|
-
"/service/common/inventory/v1.0/company/email/jobCode",
|
|
26
|
-
};
|
|
27
|
-
this._urls = Object.entries(this._relativeUrls).reduce(
|
|
28
|
-
(urls, [method, relativeUrl]) => {
|
|
29
|
-
urls[method] = `${_conf.domain}${relativeUrl}`;
|
|
30
|
-
return urls;
|
|
31
|
-
},
|
|
32
|
-
{}
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
updateUrls(urls) {
|
|
37
|
-
this._urls = {
|
|
38
|
-
...this._urls,
|
|
39
|
-
...urls,
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* @param {InventoryPublicValidator.GetApiKeyParam} arg - Arg object.
|
|
45
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
46
|
-
* @param {import("../PublicAPIClient").Options} - Options
|
|
47
|
-
* @returns {Promise<InventoryPublicModel.ResponseEnvelopeApikeyModel>} -
|
|
48
|
-
* Success response
|
|
49
|
-
* @name getApiKey
|
|
50
|
-
* @summary: Get apikey for Company to call other Slingshot Configuration APIs
|
|
51
|
-
* @description: REST Endpoint that returns apikey by username by password - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/inventory/getApiKey/).
|
|
52
|
-
*/
|
|
53
|
-
async getApiKey(
|
|
54
|
-
{ userName, password, requestHeaders } = { requestHeaders: {} },
|
|
55
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
56
|
-
) {
|
|
57
|
-
const { error } = InventoryPublicValidator.getApiKey().validate(
|
|
58
|
-
{ userName, password },
|
|
59
|
-
{ abortEarly: false, allowUnknown: true }
|
|
60
|
-
);
|
|
61
|
-
if (error) {
|
|
62
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// Showing warrnings if extra unknown parameters are found
|
|
66
|
-
const { error: warrning } = InventoryPublicValidator.getApiKey().validate(
|
|
67
|
-
{ userName, password },
|
|
68
|
-
{ abortEarly: false, allowUnknown: false }
|
|
69
|
-
);
|
|
70
|
-
if (warrning) {
|
|
71
|
-
Logger({
|
|
72
|
-
level: "WARN",
|
|
73
|
-
message: `Parameter Validation warrnings for public > Inventory > getApiKey \n ${warrning}`,
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
const query_params = {};
|
|
78
|
-
query_params["user_name"] = userName;
|
|
79
|
-
query_params["password"] = password;
|
|
80
|
-
|
|
81
|
-
const xHeaders = {};
|
|
82
|
-
|
|
83
|
-
const response = await PublicAPIClient.execute(
|
|
84
|
-
this._conf,
|
|
85
|
-
"get",
|
|
86
|
-
constructUrl({
|
|
87
|
-
url: this._urls["getApiKey"],
|
|
88
|
-
params: {},
|
|
89
|
-
}),
|
|
90
|
-
query_params,
|
|
91
|
-
undefined,
|
|
92
|
-
{ ...xHeaders, ...requestHeaders },
|
|
93
|
-
{ responseHeaders }
|
|
94
|
-
);
|
|
95
|
-
|
|
96
|
-
let responseData = response;
|
|
97
|
-
if (responseHeaders) {
|
|
98
|
-
responseData = response[0];
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
const {
|
|
102
|
-
error: res_error,
|
|
103
|
-
} = InventoryPublicModel.ResponseEnvelopeApikeyModel().validate(
|
|
104
|
-
responseData,
|
|
105
|
-
{ abortEarly: false, allowUnknown: true }
|
|
106
|
-
);
|
|
107
|
-
|
|
108
|
-
if (res_error) {
|
|
109
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
110
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
111
|
-
} else {
|
|
112
|
-
Logger({
|
|
113
|
-
level: "WARN",
|
|
114
|
-
message: `Response Validation Warnings for public > Inventory > getApiKey \n ${res_error}`,
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
return response;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* @param {InventoryPublicValidator.GetConfigByApiKeyParam} arg - Arg object.
|
|
124
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
125
|
-
* @param {import("../PublicAPIClient").Options} - Options
|
|
126
|
-
* @returns {Promise<InventoryPublicModel.ResponseEnvelopeSlingshotConfigurationDetail>}
|
|
127
|
-
* - Success response
|
|
128
|
-
*
|
|
129
|
-
* @name getConfigByApiKey
|
|
130
|
-
* @summary: Get Slingshot Configuration Of A Company using API key
|
|
131
|
-
* @description: REST Endpoint that returns all configuration detail of a company - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/inventory/getConfigByApiKey/).
|
|
132
|
-
*/
|
|
133
|
-
async getConfigByApiKey(
|
|
134
|
-
{ apikey, requestHeaders } = { requestHeaders: {} },
|
|
135
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
136
|
-
) {
|
|
137
|
-
const { error } = InventoryPublicValidator.getConfigByApiKey().validate(
|
|
138
|
-
{ apikey },
|
|
139
|
-
{ abortEarly: false, allowUnknown: true }
|
|
140
|
-
);
|
|
141
|
-
if (error) {
|
|
142
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// Showing warrnings if extra unknown parameters are found
|
|
146
|
-
const {
|
|
147
|
-
error: warrning,
|
|
148
|
-
} = InventoryPublicValidator.getConfigByApiKey().validate(
|
|
149
|
-
{ apikey },
|
|
150
|
-
{ abortEarly: false, allowUnknown: false }
|
|
151
|
-
);
|
|
152
|
-
if (warrning) {
|
|
153
|
-
Logger({
|
|
154
|
-
level: "WARN",
|
|
155
|
-
message: `Parameter Validation warrnings for public > Inventory > getConfigByApiKey \n ${warrning}`,
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
const query_params = {};
|
|
160
|
-
query_params["apikey"] = apikey;
|
|
161
|
-
|
|
162
|
-
const xHeaders = {};
|
|
163
|
-
|
|
164
|
-
const response = await PublicAPIClient.execute(
|
|
165
|
-
this._conf,
|
|
166
|
-
"get",
|
|
167
|
-
constructUrl({
|
|
168
|
-
url: this._urls["getConfigByApiKey"],
|
|
169
|
-
params: {},
|
|
170
|
-
}),
|
|
171
|
-
query_params,
|
|
172
|
-
undefined,
|
|
173
|
-
{ ...xHeaders, ...requestHeaders },
|
|
174
|
-
{ responseHeaders }
|
|
175
|
-
);
|
|
176
|
-
|
|
177
|
-
let responseData = response;
|
|
178
|
-
if (responseHeaders) {
|
|
179
|
-
responseData = response[0];
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
const {
|
|
183
|
-
error: res_error,
|
|
184
|
-
} = InventoryPublicModel.ResponseEnvelopeSlingshotConfigurationDetail().validate(
|
|
185
|
-
responseData,
|
|
186
|
-
{ abortEarly: false, allowUnknown: true }
|
|
187
|
-
);
|
|
188
|
-
|
|
189
|
-
if (res_error) {
|
|
190
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
191
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
192
|
-
} else {
|
|
193
|
-
Logger({
|
|
194
|
-
level: "WARN",
|
|
195
|
-
message: `Response Validation Warnings for public > Inventory > getConfigByApiKey \n ${res_error}`,
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
return response;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* @param {InventoryPublicValidator.GetJobByCodeParam} arg - Arg object.
|
|
205
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
206
|
-
* @param {import("../PublicAPIClient").Options} - Options
|
|
207
|
-
* @returns {Promise<InventoryPublicModel.ResponseEnvelopeJobConfigDTO>} -
|
|
208
|
-
* Success response
|
|
209
|
-
* @name getJobByCode
|
|
210
|
-
* @summary: Get Job Config By Code
|
|
211
|
-
* @description: REST Endpoint that returns job config by code - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/inventory/getJobByCode/).
|
|
212
|
-
*/
|
|
213
|
-
async getJobByCode(
|
|
214
|
-
{ code, requestHeaders } = { requestHeaders: {} },
|
|
215
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
216
|
-
) {
|
|
217
|
-
const { error } = InventoryPublicValidator.getJobByCode().validate(
|
|
218
|
-
{ code },
|
|
219
|
-
{ abortEarly: false, allowUnknown: true }
|
|
220
|
-
);
|
|
221
|
-
if (error) {
|
|
222
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
// Showing warrnings if extra unknown parameters are found
|
|
226
|
-
const {
|
|
227
|
-
error: warrning,
|
|
228
|
-
} = InventoryPublicValidator.getJobByCode().validate(
|
|
229
|
-
{ code },
|
|
230
|
-
{ abortEarly: false, allowUnknown: false }
|
|
231
|
-
);
|
|
232
|
-
if (warrning) {
|
|
233
|
-
Logger({
|
|
234
|
-
level: "WARN",
|
|
235
|
-
message: `Parameter Validation warrnings for public > Inventory > getJobByCode \n ${warrning}`,
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
const query_params = {};
|
|
240
|
-
|
|
241
|
-
const xHeaders = {};
|
|
242
|
-
|
|
243
|
-
const response = await PublicAPIClient.execute(
|
|
244
|
-
this._conf,
|
|
245
|
-
"get",
|
|
246
|
-
constructUrl({
|
|
247
|
-
url: this._urls["getJobByCode"],
|
|
248
|
-
params: { code },
|
|
249
|
-
}),
|
|
250
|
-
query_params,
|
|
251
|
-
undefined,
|
|
252
|
-
{ ...xHeaders, ...requestHeaders },
|
|
253
|
-
{ responseHeaders }
|
|
254
|
-
);
|
|
255
|
-
|
|
256
|
-
let responseData = response;
|
|
257
|
-
if (responseHeaders) {
|
|
258
|
-
responseData = response[0];
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
const {
|
|
262
|
-
error: res_error,
|
|
263
|
-
} = InventoryPublicModel.ResponseEnvelopeJobConfigDTO().validate(
|
|
264
|
-
responseData,
|
|
265
|
-
{ abortEarly: false, allowUnknown: true }
|
|
266
|
-
);
|
|
267
|
-
|
|
268
|
-
if (res_error) {
|
|
269
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
270
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
271
|
-
} else {
|
|
272
|
-
Logger({
|
|
273
|
-
level: "WARN",
|
|
274
|
-
message: `Response Validation Warnings for public > Inventory > getJobByCode \n ${res_error}`,
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
return response;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* @param {InventoryPublicValidator.GetJobCodesMetricsParam} arg - Arg object.
|
|
284
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
285
|
-
* @param {import("../PublicAPIClient").Options} - Options
|
|
286
|
-
* @returns {Promise<InventoryPublicModel.ResponseEnvelopeObject>} - Success response
|
|
287
|
-
* @name getJobCodesMetrics
|
|
288
|
-
* @summary: Find all the JobCodes from Metrics Collection based on the field Values
|
|
289
|
-
* @description: Endpoint to return all JobCodes present in Metrics Collection - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/inventory/getJobCodesMetrics/).
|
|
290
|
-
*/
|
|
291
|
-
async getJobCodesMetrics(
|
|
292
|
-
{ dailyJob, jobCode, requestHeaders } = { requestHeaders: {} },
|
|
293
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
294
|
-
) {
|
|
295
|
-
const { error } = InventoryPublicValidator.getJobCodesMetrics().validate(
|
|
296
|
-
{ dailyJob, jobCode },
|
|
297
|
-
{ abortEarly: false, allowUnknown: true }
|
|
298
|
-
);
|
|
299
|
-
if (error) {
|
|
300
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
// Showing warrnings if extra unknown parameters are found
|
|
304
|
-
const {
|
|
305
|
-
error: warrning,
|
|
306
|
-
} = InventoryPublicValidator.getJobCodesMetrics().validate(
|
|
307
|
-
{ dailyJob, jobCode },
|
|
308
|
-
{ abortEarly: false, allowUnknown: false }
|
|
309
|
-
);
|
|
310
|
-
if (warrning) {
|
|
311
|
-
Logger({
|
|
312
|
-
level: "WARN",
|
|
313
|
-
message: `Parameter Validation warrnings for public > Inventory > getJobCodesMetrics \n ${warrning}`,
|
|
314
|
-
});
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
const query_params = {};
|
|
318
|
-
query_params["daily_job"] = dailyJob;
|
|
319
|
-
query_params["job_code"] = jobCode;
|
|
320
|
-
|
|
321
|
-
const xHeaders = {};
|
|
322
|
-
|
|
323
|
-
const response = await PublicAPIClient.execute(
|
|
324
|
-
this._conf,
|
|
325
|
-
"get",
|
|
326
|
-
constructUrl({
|
|
327
|
-
url: this._urls["getJobCodesMetrics"],
|
|
328
|
-
params: {},
|
|
329
|
-
}),
|
|
330
|
-
query_params,
|
|
331
|
-
undefined,
|
|
332
|
-
{ ...xHeaders, ...requestHeaders },
|
|
333
|
-
{ responseHeaders }
|
|
334
|
-
);
|
|
335
|
-
|
|
336
|
-
let responseData = response;
|
|
337
|
-
if (responseHeaders) {
|
|
338
|
-
responseData = response[0];
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
const {
|
|
342
|
-
error: res_error,
|
|
343
|
-
} = InventoryPublicModel.ResponseEnvelopeObject().validate(responseData, {
|
|
344
|
-
abortEarly: false,
|
|
345
|
-
allowUnknown: true,
|
|
346
|
-
});
|
|
347
|
-
|
|
348
|
-
if (res_error) {
|
|
349
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
350
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
351
|
-
} else {
|
|
352
|
-
Logger({
|
|
353
|
-
level: "WARN",
|
|
354
|
-
message: `Response Validation Warnings for public > Inventory > getJobCodesMetrics \n ${res_error}`,
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
return response;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
/**
|
|
363
|
-
* @param {InventoryPublicValidator.GetJobConfigByIntegrationTypeParam} arg
|
|
364
|
-
* - Arg object.
|
|
365
|
-
*
|
|
366
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
367
|
-
* @param {import("../PublicAPIClient").Options} - Options
|
|
368
|
-
* @returns {Promise<InventoryPublicModel.ResponseEnvelopeListJobConfigDTO>}
|
|
369
|
-
* - Success response
|
|
370
|
-
*
|
|
371
|
-
* @name getJobConfigByIntegrationType
|
|
372
|
-
* @summary: Get Job Configs By Integration Type
|
|
373
|
-
* @description: REST Endpoint that returns all job Configs by Integration Type - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/inventory/getJobConfigByIntegrationType/).
|
|
374
|
-
*/
|
|
375
|
-
async getJobConfigByIntegrationType(
|
|
376
|
-
{ integrationType, disable, requestHeaders } = { requestHeaders: {} },
|
|
377
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
378
|
-
) {
|
|
379
|
-
const {
|
|
380
|
-
error,
|
|
381
|
-
} = InventoryPublicValidator.getJobConfigByIntegrationType().validate(
|
|
382
|
-
{ integrationType, disable },
|
|
383
|
-
{ abortEarly: false, allowUnknown: true }
|
|
384
|
-
);
|
|
385
|
-
if (error) {
|
|
386
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
// Showing warrnings if extra unknown parameters are found
|
|
390
|
-
const {
|
|
391
|
-
error: warrning,
|
|
392
|
-
} = InventoryPublicValidator.getJobConfigByIntegrationType().validate(
|
|
393
|
-
{ integrationType, disable },
|
|
394
|
-
{ abortEarly: false, allowUnknown: false }
|
|
395
|
-
);
|
|
396
|
-
if (warrning) {
|
|
397
|
-
Logger({
|
|
398
|
-
level: "WARN",
|
|
399
|
-
message: `Parameter Validation warrnings for public > Inventory > getJobConfigByIntegrationType \n ${warrning}`,
|
|
400
|
-
});
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
const query_params = {};
|
|
404
|
-
query_params["integration_type"] = integrationType;
|
|
405
|
-
query_params["disable"] = disable;
|
|
406
|
-
|
|
407
|
-
const xHeaders = {};
|
|
408
|
-
|
|
409
|
-
const response = await PublicAPIClient.execute(
|
|
410
|
-
this._conf,
|
|
411
|
-
"get",
|
|
412
|
-
constructUrl({
|
|
413
|
-
url: this._urls["getJobConfigByIntegrationType"],
|
|
414
|
-
params: {},
|
|
415
|
-
}),
|
|
416
|
-
query_params,
|
|
417
|
-
undefined,
|
|
418
|
-
{ ...xHeaders, ...requestHeaders },
|
|
419
|
-
{ responseHeaders }
|
|
420
|
-
);
|
|
421
|
-
|
|
422
|
-
let responseData = response;
|
|
423
|
-
if (responseHeaders) {
|
|
424
|
-
responseData = response[0];
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
const {
|
|
428
|
-
error: res_error,
|
|
429
|
-
} = InventoryPublicModel.ResponseEnvelopeListJobConfigDTO().validate(
|
|
430
|
-
responseData,
|
|
431
|
-
{ abortEarly: false, allowUnknown: true }
|
|
432
|
-
);
|
|
433
|
-
|
|
434
|
-
if (res_error) {
|
|
435
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
436
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
437
|
-
} else {
|
|
438
|
-
Logger({
|
|
439
|
-
level: "WARN",
|
|
440
|
-
message: `Response Validation Warnings for public > Inventory > getJobConfigByIntegrationType \n ${res_error}`,
|
|
441
|
-
});
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
return response;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
/**
|
|
449
|
-
* @param {InventoryPublicValidator.SaveJobCodesMetricsParam} arg - Arg object.
|
|
450
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
451
|
-
* @param {import("../PublicAPIClient").Options} - Options
|
|
452
|
-
* @returns {Promise<InventoryPublicModel.ResponseEnvelopeEmailJobMetrics>}
|
|
453
|
-
* - Success response
|
|
454
|
-
*
|
|
455
|
-
* @name saveJobCodesMetrics
|
|
456
|
-
* @summary: Save JobCode Metrics
|
|
457
|
-
* @description: Endpoint to save JobCode Metrics - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/inventory/saveJobCodesMetrics/).
|
|
458
|
-
*/
|
|
459
|
-
async saveJobCodesMetrics(
|
|
460
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
461
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
462
|
-
) {
|
|
463
|
-
const { error } = InventoryPublicValidator.saveJobCodesMetrics().validate(
|
|
464
|
-
{ body },
|
|
465
|
-
{ abortEarly: false, allowUnknown: true }
|
|
466
|
-
);
|
|
467
|
-
if (error) {
|
|
468
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
// Showing warrnings if extra unknown parameters are found
|
|
472
|
-
const {
|
|
473
|
-
error: warrning,
|
|
474
|
-
} = InventoryPublicValidator.saveJobCodesMetrics().validate(
|
|
475
|
-
{ body },
|
|
476
|
-
{ abortEarly: false, allowUnknown: false }
|
|
477
|
-
);
|
|
478
|
-
if (warrning) {
|
|
479
|
-
Logger({
|
|
480
|
-
level: "WARN",
|
|
481
|
-
message: `Parameter Validation warrnings for public > Inventory > saveJobCodesMetrics \n ${warrning}`,
|
|
482
|
-
});
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
const query_params = {};
|
|
486
|
-
|
|
487
|
-
const xHeaders = {};
|
|
488
|
-
|
|
489
|
-
const response = await PublicAPIClient.execute(
|
|
490
|
-
this._conf,
|
|
491
|
-
"post",
|
|
492
|
-
constructUrl({
|
|
493
|
-
url: this._urls["saveJobCodesMetrics"],
|
|
494
|
-
params: {},
|
|
495
|
-
}),
|
|
496
|
-
query_params,
|
|
497
|
-
body,
|
|
498
|
-
{ ...xHeaders, ...requestHeaders },
|
|
499
|
-
{ responseHeaders }
|
|
500
|
-
);
|
|
501
|
-
|
|
502
|
-
let responseData = response;
|
|
503
|
-
if (responseHeaders) {
|
|
504
|
-
responseData = response[0];
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
const {
|
|
508
|
-
error: res_error,
|
|
509
|
-
} = InventoryPublicModel.ResponseEnvelopeEmailJobMetrics().validate(
|
|
510
|
-
responseData,
|
|
511
|
-
{ abortEarly: false, allowUnknown: true }
|
|
512
|
-
);
|
|
513
|
-
|
|
514
|
-
if (res_error) {
|
|
515
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
516
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
517
|
-
} else {
|
|
518
|
-
Logger({
|
|
519
|
-
level: "WARN",
|
|
520
|
-
message: `Response Validation Warnings for public > Inventory > saveJobCodesMetrics \n ${res_error}`,
|
|
521
|
-
});
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
return response;
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
module.exports = Inventory;
|