@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 CompanyProfileValidator = require("./CompanyProfilePlatformValidator");
|
|
5
|
+
const CompanyProfileModel = require("./CompanyProfilePlatformModel");
|
|
6
|
+
const { Logger } = require("./../../common/Logger");
|
|
7
|
+
|
|
5
8
|
class CompanyProfile {
|
|
6
9
|
constructor(config) {
|
|
7
10
|
this.config = config;
|
|
@@ -9,10 +12,11 @@ class CompanyProfile {
|
|
|
9
12
|
|
|
10
13
|
/**
|
|
11
14
|
* @param {Object} arg - Arg object.
|
|
15
|
+
* @returns {Promise<GetCompanyProfileSerializerResponse>} - Success response
|
|
12
16
|
* @summary: Get company profile
|
|
13
17
|
* @description: This API allows to view the company profile of the seller account.
|
|
14
18
|
*/
|
|
15
|
-
cbsOnboardGet({} = {}) {
|
|
19
|
+
async cbsOnboardGet({} = {}) {
|
|
16
20
|
const { error } = CompanyProfileValidator.cbsOnboardGet().validate(
|
|
17
21
|
{},
|
|
18
22
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -29,15 +33,18 @@ class CompanyProfile {
|
|
|
29
33
|
{ abortEarly: false, allowUnknown: false }
|
|
30
34
|
);
|
|
31
35
|
if (warrning) {
|
|
32
|
-
|
|
33
|
-
|
|
36
|
+
Logger({
|
|
37
|
+
level: "WARN",
|
|
38
|
+
message: "Parameter Validation warrnings for cbsOnboardGet",
|
|
39
|
+
});
|
|
40
|
+
Logger({ level: "WARN", message: warrning });
|
|
34
41
|
}
|
|
35
42
|
|
|
36
43
|
const query_params = {};
|
|
37
44
|
|
|
38
45
|
const xHeaders = {};
|
|
39
46
|
|
|
40
|
-
|
|
47
|
+
const response = await PlatformAPIClient.execute(
|
|
41
48
|
this.config,
|
|
42
49
|
"get",
|
|
43
50
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}`,
|
|
@@ -45,16 +52,100 @@ class CompanyProfile {
|
|
|
45
52
|
undefined,
|
|
46
53
|
xHeaders
|
|
47
54
|
);
|
|
55
|
+
|
|
56
|
+
const {
|
|
57
|
+
error: res_error,
|
|
58
|
+
} = CompanyProfileModel.GetCompanyProfileSerializerResponse().validate(
|
|
59
|
+
response,
|
|
60
|
+
{ abortEarly: false, allowUnknown: false }
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
if (res_error) {
|
|
64
|
+
Logger({
|
|
65
|
+
level: "WARN",
|
|
66
|
+
message: "Response Validation Warnnings for cbsOnboardGet",
|
|
67
|
+
});
|
|
68
|
+
Logger({ level: "WARN", message: res_error });
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return response;
|
|
48
72
|
}
|
|
49
73
|
|
|
50
74
|
/**
|
|
51
75
|
* @param {Object} arg - Arg object.
|
|
52
|
-
* @param {
|
|
53
|
-
* @
|
|
54
|
-
* @
|
|
76
|
+
* @param {CreateUpdateBrandRequestSerializer} arg.body
|
|
77
|
+
* @returns {Promise<ProfileSuccessResponse>} - Success response
|
|
78
|
+
* @summary: Create a Brand.
|
|
79
|
+
* @description: This API allows to create a brand associated to a company.
|
|
55
80
|
*/
|
|
56
|
-
|
|
57
|
-
const { error } = CompanyProfileValidator.
|
|
81
|
+
async createBrand({ body } = {}) {
|
|
82
|
+
const { error } = CompanyProfileValidator.createBrand().validate(
|
|
83
|
+
{
|
|
84
|
+
body,
|
|
85
|
+
},
|
|
86
|
+
{ abortEarly: false, allowUnknown: true }
|
|
87
|
+
);
|
|
88
|
+
if (error) {
|
|
89
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Showing warrnings if extra unknown parameters are found
|
|
93
|
+
const { error: warrning } = CompanyProfileValidator.createBrand().validate(
|
|
94
|
+
{
|
|
95
|
+
body,
|
|
96
|
+
},
|
|
97
|
+
{ abortEarly: false, allowUnknown: false }
|
|
98
|
+
);
|
|
99
|
+
if (warrning) {
|
|
100
|
+
Logger({
|
|
101
|
+
level: "WARN",
|
|
102
|
+
message: "Parameter Validation warrnings for createBrand",
|
|
103
|
+
});
|
|
104
|
+
Logger({ level: "WARN", message: warrning });
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const query_params = {};
|
|
108
|
+
|
|
109
|
+
const xHeaders = {};
|
|
110
|
+
|
|
111
|
+
const response = await PlatformAPIClient.execute(
|
|
112
|
+
this.config,
|
|
113
|
+
"post",
|
|
114
|
+
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/brand/`,
|
|
115
|
+
query_params,
|
|
116
|
+
body,
|
|
117
|
+
xHeaders
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
const {
|
|
121
|
+
error: res_error,
|
|
122
|
+
} = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
|
|
123
|
+
abortEarly: false,
|
|
124
|
+
allowUnknown: false,
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
if (res_error) {
|
|
128
|
+
Logger({
|
|
129
|
+
level: "WARN",
|
|
130
|
+
message: "Response Validation Warnnings for createBrand",
|
|
131
|
+
});
|
|
132
|
+
Logger({ level: "WARN", message: res_error });
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
return response;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* @param {Object} arg - Arg object.
|
|
140
|
+
* @param {CompanyBrandPostRequestSerializer} arg.body
|
|
141
|
+
* @returns {Promise<ProfileSuccessResponse>} - Success response
|
|
142
|
+
* @summary: Create a company brand mapping.
|
|
143
|
+
* @description: This API allows to create a company brand mapping, for a already existing brand in the system.
|
|
144
|
+
*/
|
|
145
|
+
async createCompanyBrandMapping({ body } = {}) {
|
|
146
|
+
const {
|
|
147
|
+
error,
|
|
148
|
+
} = CompanyProfileValidator.createCompanyBrandMapping().validate(
|
|
58
149
|
{
|
|
59
150
|
body,
|
|
60
151
|
},
|
|
@@ -67,39 +158,63 @@ class CompanyProfile {
|
|
|
67
158
|
// Showing warrnings if extra unknown parameters are found
|
|
68
159
|
const {
|
|
69
160
|
error: warrning,
|
|
70
|
-
} = CompanyProfileValidator.
|
|
161
|
+
} = CompanyProfileValidator.createCompanyBrandMapping().validate(
|
|
71
162
|
{
|
|
72
163
|
body,
|
|
73
164
|
},
|
|
74
165
|
{ abortEarly: false, allowUnknown: false }
|
|
75
166
|
);
|
|
76
167
|
if (warrning) {
|
|
77
|
-
|
|
78
|
-
|
|
168
|
+
Logger({
|
|
169
|
+
level: "WARN",
|
|
170
|
+
message: "Parameter Validation warrnings for createCompanyBrandMapping",
|
|
171
|
+
});
|
|
172
|
+
Logger({ level: "WARN", message: warrning });
|
|
79
173
|
}
|
|
80
174
|
|
|
81
175
|
const query_params = {};
|
|
82
176
|
|
|
83
177
|
const xHeaders = {};
|
|
84
178
|
|
|
85
|
-
|
|
179
|
+
const response = await PlatformAPIClient.execute(
|
|
86
180
|
this.config,
|
|
87
|
-
"
|
|
88
|
-
`/service/platform/company-profile/v1.0/company/${this.config.companyId}`,
|
|
181
|
+
"post",
|
|
182
|
+
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/company-brand`,
|
|
89
183
|
query_params,
|
|
90
184
|
body,
|
|
91
185
|
xHeaders
|
|
92
186
|
);
|
|
187
|
+
|
|
188
|
+
const {
|
|
189
|
+
error: res_error,
|
|
190
|
+
} = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
|
|
191
|
+
abortEarly: false,
|
|
192
|
+
allowUnknown: false,
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
if (res_error) {
|
|
196
|
+
Logger({
|
|
197
|
+
level: "WARN",
|
|
198
|
+
message: "Response Validation Warnnings for createCompanyBrandMapping",
|
|
199
|
+
});
|
|
200
|
+
Logger({ level: "WARN", message: res_error });
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
return response;
|
|
93
204
|
}
|
|
94
205
|
|
|
95
206
|
/**
|
|
96
207
|
* @param {Object} arg - Arg object.
|
|
97
|
-
* @
|
|
98
|
-
* @
|
|
208
|
+
* @param {LocationSerializer} arg.body
|
|
209
|
+
* @returns {Promise<ProfileSuccessResponse>} - Success response
|
|
210
|
+
* @summary: Create a location associated to a company.
|
|
211
|
+
* @description: This API allows to edit a location associated to a company.
|
|
99
212
|
*/
|
|
100
|
-
|
|
101
|
-
const { error } = CompanyProfileValidator.
|
|
102
|
-
{
|
|
213
|
+
async createLocation({ body } = {}) {
|
|
214
|
+
const { error } = CompanyProfileValidator.createLocation().validate(
|
|
215
|
+
{
|
|
216
|
+
body,
|
|
217
|
+
},
|
|
103
218
|
{ abortEarly: false, allowUnknown: true }
|
|
104
219
|
);
|
|
105
220
|
if (error) {
|
|
@@ -109,39 +224,62 @@ class CompanyProfile {
|
|
|
109
224
|
// Showing warrnings if extra unknown parameters are found
|
|
110
225
|
const {
|
|
111
226
|
error: warrning,
|
|
112
|
-
} = CompanyProfileValidator.
|
|
113
|
-
{
|
|
227
|
+
} = CompanyProfileValidator.createLocation().validate(
|
|
228
|
+
{
|
|
229
|
+
body,
|
|
230
|
+
},
|
|
114
231
|
{ abortEarly: false, allowUnknown: false }
|
|
115
232
|
);
|
|
116
233
|
if (warrning) {
|
|
117
|
-
|
|
118
|
-
|
|
234
|
+
Logger({
|
|
235
|
+
level: "WARN",
|
|
236
|
+
message: "Parameter Validation warrnings for createLocation",
|
|
237
|
+
});
|
|
238
|
+
Logger({ level: "WARN", message: warrning });
|
|
119
239
|
}
|
|
120
240
|
|
|
121
241
|
const query_params = {};
|
|
122
242
|
|
|
123
243
|
const xHeaders = {};
|
|
124
244
|
|
|
125
|
-
|
|
245
|
+
const response = await PlatformAPIClient.execute(
|
|
126
246
|
this.config,
|
|
127
|
-
"
|
|
128
|
-
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/
|
|
247
|
+
"post",
|
|
248
|
+
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/location`,
|
|
129
249
|
query_params,
|
|
130
|
-
|
|
250
|
+
body,
|
|
131
251
|
xHeaders
|
|
132
252
|
);
|
|
253
|
+
|
|
254
|
+
const {
|
|
255
|
+
error: res_error,
|
|
256
|
+
} = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
|
|
257
|
+
abortEarly: false,
|
|
258
|
+
allowUnknown: false,
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
if (res_error) {
|
|
262
|
+
Logger({
|
|
263
|
+
level: "WARN",
|
|
264
|
+
message: "Response Validation Warnnings for createLocation",
|
|
265
|
+
});
|
|
266
|
+
Logger({ level: "WARN", message: res_error });
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
return response;
|
|
133
270
|
}
|
|
134
271
|
|
|
135
272
|
/**
|
|
136
273
|
* @param {Object} arg - Arg object.
|
|
137
|
-
* @param {
|
|
138
|
-
* @
|
|
139
|
-
* @
|
|
274
|
+
* @param {BulkLocationSerializer} arg.body
|
|
275
|
+
* @returns {Promise<ProfileSuccessResponse>} - Success response
|
|
276
|
+
* @summary: Create a location asscoiated to a company in bulk.
|
|
277
|
+
* @description: This API allows to create a location associated to a company.
|
|
140
278
|
*/
|
|
141
|
-
|
|
142
|
-
const { error } = CompanyProfileValidator.
|
|
279
|
+
async createLocationBulk({ body } = {}) {
|
|
280
|
+
const { error } = CompanyProfileValidator.createLocationBulk().validate(
|
|
143
281
|
{
|
|
144
|
-
|
|
282
|
+
body,
|
|
145
283
|
},
|
|
146
284
|
{ abortEarly: false, allowUnknown: true }
|
|
147
285
|
);
|
|
@@ -150,39 +288,62 @@ class CompanyProfile {
|
|
|
150
288
|
}
|
|
151
289
|
|
|
152
290
|
// Showing warrnings if extra unknown parameters are found
|
|
153
|
-
const {
|
|
291
|
+
const {
|
|
292
|
+
error: warrning,
|
|
293
|
+
} = CompanyProfileValidator.createLocationBulk().validate(
|
|
154
294
|
{
|
|
155
|
-
|
|
295
|
+
body,
|
|
156
296
|
},
|
|
157
297
|
{ abortEarly: false, allowUnknown: false }
|
|
158
298
|
);
|
|
159
299
|
if (warrning) {
|
|
160
|
-
|
|
161
|
-
|
|
300
|
+
Logger({
|
|
301
|
+
level: "WARN",
|
|
302
|
+
message: "Parameter Validation warrnings for createLocationBulk",
|
|
303
|
+
});
|
|
304
|
+
Logger({ level: "WARN", message: warrning });
|
|
162
305
|
}
|
|
163
306
|
|
|
164
307
|
const query_params = {};
|
|
165
308
|
|
|
166
309
|
const xHeaders = {};
|
|
167
310
|
|
|
168
|
-
|
|
311
|
+
const response = await PlatformAPIClient.execute(
|
|
169
312
|
this.config,
|
|
170
|
-
"
|
|
171
|
-
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/
|
|
313
|
+
"post",
|
|
314
|
+
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/bulk`,
|
|
172
315
|
query_params,
|
|
173
|
-
|
|
316
|
+
body,
|
|
174
317
|
xHeaders
|
|
175
318
|
);
|
|
319
|
+
|
|
320
|
+
const {
|
|
321
|
+
error: res_error,
|
|
322
|
+
} = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
|
|
323
|
+
abortEarly: false,
|
|
324
|
+
allowUnknown: false,
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
if (res_error) {
|
|
328
|
+
Logger({
|
|
329
|
+
level: "WARN",
|
|
330
|
+
message: "Response Validation Warnnings for createLocationBulk",
|
|
331
|
+
});
|
|
332
|
+
Logger({ level: "WARN", message: res_error });
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
return response;
|
|
176
336
|
}
|
|
177
337
|
|
|
178
338
|
/**
|
|
179
339
|
* @param {Object} arg - Arg object.
|
|
180
340
|
* @param {string} arg.brandId - Id of the brand to be viewed.
|
|
181
341
|
* @param {CreateUpdateBrandRequestSerializer} arg.body
|
|
342
|
+
* @returns {Promise<ProfileSuccessResponse>} - Success response
|
|
182
343
|
* @summary: Edit a brand.
|
|
183
344
|
* @description: This API allows to edit meta of a brand.
|
|
184
345
|
*/
|
|
185
|
-
editBrand({ brandId, body } = {}) {
|
|
346
|
+
async editBrand({ brandId, body } = {}) {
|
|
186
347
|
const { error } = CompanyProfileValidator.editBrand().validate(
|
|
187
348
|
{
|
|
188
349
|
brandId,
|
|
@@ -203,15 +364,18 @@ class CompanyProfile {
|
|
|
203
364
|
{ abortEarly: false, allowUnknown: false }
|
|
204
365
|
);
|
|
205
366
|
if (warrning) {
|
|
206
|
-
|
|
207
|
-
|
|
367
|
+
Logger({
|
|
368
|
+
level: "WARN",
|
|
369
|
+
message: "Parameter Validation warrnings for editBrand",
|
|
370
|
+
});
|
|
371
|
+
Logger({ level: "WARN", message: warrning });
|
|
208
372
|
}
|
|
209
373
|
|
|
210
374
|
const query_params = {};
|
|
211
375
|
|
|
212
376
|
const xHeaders = {};
|
|
213
377
|
|
|
214
|
-
|
|
378
|
+
const response = await PlatformAPIClient.execute(
|
|
215
379
|
this.config,
|
|
216
380
|
"put",
|
|
217
381
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/brand/${brandId}`,
|
|
@@ -219,18 +383,36 @@ class CompanyProfile {
|
|
|
219
383
|
body,
|
|
220
384
|
xHeaders
|
|
221
385
|
);
|
|
386
|
+
|
|
387
|
+
const {
|
|
388
|
+
error: res_error,
|
|
389
|
+
} = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
|
|
390
|
+
abortEarly: false,
|
|
391
|
+
allowUnknown: false,
|
|
392
|
+
});
|
|
393
|
+
|
|
394
|
+
if (res_error) {
|
|
395
|
+
Logger({
|
|
396
|
+
level: "WARN",
|
|
397
|
+
message: "Response Validation Warnnings for editBrand",
|
|
398
|
+
});
|
|
399
|
+
Logger({ level: "WARN", message: res_error });
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
return response;
|
|
222
403
|
}
|
|
223
404
|
|
|
224
405
|
/**
|
|
225
406
|
* @param {Object} arg - Arg object.
|
|
226
|
-
* @param {
|
|
227
|
-
* @
|
|
228
|
-
* @
|
|
407
|
+
* @param {string} arg.brandId - Id of the brand to be viewed.
|
|
408
|
+
* @returns {Promise<GetBrandResponseSerializer>} - Success response
|
|
409
|
+
* @summary: Get a single brand.
|
|
410
|
+
* @description: This API helps to get data associated to a particular brand.
|
|
229
411
|
*/
|
|
230
|
-
|
|
231
|
-
const { error } = CompanyProfileValidator.
|
|
412
|
+
async getBrand({ brandId } = {}) {
|
|
413
|
+
const { error } = CompanyProfileValidator.getBrand().validate(
|
|
232
414
|
{
|
|
233
|
-
|
|
415
|
+
brandId,
|
|
234
416
|
},
|
|
235
417
|
{ abortEarly: false, allowUnknown: true }
|
|
236
418
|
);
|
|
@@ -239,29 +421,49 @@ class CompanyProfile {
|
|
|
239
421
|
}
|
|
240
422
|
|
|
241
423
|
// Showing warrnings if extra unknown parameters are found
|
|
242
|
-
const { error: warrning } = CompanyProfileValidator.
|
|
424
|
+
const { error: warrning } = CompanyProfileValidator.getBrand().validate(
|
|
243
425
|
{
|
|
244
|
-
|
|
426
|
+
brandId,
|
|
245
427
|
},
|
|
246
428
|
{ abortEarly: false, allowUnknown: false }
|
|
247
429
|
);
|
|
248
430
|
if (warrning) {
|
|
249
|
-
|
|
250
|
-
|
|
431
|
+
Logger({
|
|
432
|
+
level: "WARN",
|
|
433
|
+
message: "Parameter Validation warrnings for getBrand",
|
|
434
|
+
});
|
|
435
|
+
Logger({ level: "WARN", message: warrning });
|
|
251
436
|
}
|
|
252
437
|
|
|
253
438
|
const query_params = {};
|
|
254
439
|
|
|
255
440
|
const xHeaders = {};
|
|
256
441
|
|
|
257
|
-
|
|
442
|
+
const response = await PlatformAPIClient.execute(
|
|
258
443
|
this.config,
|
|
259
|
-
"
|
|
260
|
-
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/brand
|
|
444
|
+
"get",
|
|
445
|
+
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/brand/${brandId}`,
|
|
261
446
|
query_params,
|
|
262
|
-
|
|
447
|
+
undefined,
|
|
263
448
|
xHeaders
|
|
264
449
|
);
|
|
450
|
+
|
|
451
|
+
const {
|
|
452
|
+
error: res_error,
|
|
453
|
+
} = CompanyProfileModel.GetBrandResponseSerializer().validate(response, {
|
|
454
|
+
abortEarly: false,
|
|
455
|
+
allowUnknown: false,
|
|
456
|
+
});
|
|
457
|
+
|
|
458
|
+
if (res_error) {
|
|
459
|
+
Logger({
|
|
460
|
+
level: "WARN",
|
|
461
|
+
message: "Response Validation Warnnings for getBrand",
|
|
462
|
+
});
|
|
463
|
+
Logger({ level: "WARN", message: res_error });
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
return response;
|
|
265
467
|
}
|
|
266
468
|
|
|
267
469
|
/**
|
|
@@ -271,10 +473,11 @@ class CompanyProfile {
|
|
|
271
473
|
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
272
474
|
* page. Default is 10.
|
|
273
475
|
* @param {string} [arg.q] - Search term for name.
|
|
476
|
+
* @returns {Promise<CompanyBrandListSerializer>} - Success response
|
|
274
477
|
* @summary: Get brands associated to a company
|
|
275
478
|
* @description: This API helps to get view brands associated to a particular company.
|
|
276
479
|
*/
|
|
277
|
-
getBrands({ pageNo, pageSize, q } = {}) {
|
|
480
|
+
async getBrands({ pageNo, pageSize, q } = {}) {
|
|
278
481
|
const { error } = CompanyProfileValidator.getBrands().validate(
|
|
279
482
|
{
|
|
280
483
|
pageNo,
|
|
@@ -297,8 +500,11 @@ class CompanyProfile {
|
|
|
297
500
|
{ abortEarly: false, allowUnknown: false }
|
|
298
501
|
);
|
|
299
502
|
if (warrning) {
|
|
300
|
-
|
|
301
|
-
|
|
503
|
+
Logger({
|
|
504
|
+
level: "WARN",
|
|
505
|
+
message: "Parameter Validation warrnings for getBrands",
|
|
506
|
+
});
|
|
507
|
+
Logger({ level: "WARN", message: warrning });
|
|
302
508
|
}
|
|
303
509
|
|
|
304
510
|
const query_params = {};
|
|
@@ -308,7 +514,7 @@ class CompanyProfile {
|
|
|
308
514
|
|
|
309
515
|
const xHeaders = {};
|
|
310
516
|
|
|
311
|
-
|
|
517
|
+
const response = await PlatformAPIClient.execute(
|
|
312
518
|
this.config,
|
|
313
519
|
"get",
|
|
314
520
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/company-brand`,
|
|
@@ -316,6 +522,23 @@ class CompanyProfile {
|
|
|
316
522
|
undefined,
|
|
317
523
|
xHeaders
|
|
318
524
|
);
|
|
525
|
+
|
|
526
|
+
const {
|
|
527
|
+
error: res_error,
|
|
528
|
+
} = CompanyProfileModel.CompanyBrandListSerializer().validate(response, {
|
|
529
|
+
abortEarly: false,
|
|
530
|
+
allowUnknown: false,
|
|
531
|
+
});
|
|
532
|
+
|
|
533
|
+
if (res_error) {
|
|
534
|
+
Logger({
|
|
535
|
+
level: "WARN",
|
|
536
|
+
message: "Response Validation Warnnings for getBrands",
|
|
537
|
+
});
|
|
538
|
+
Logger({ level: "WARN", message: res_error });
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
return response;
|
|
319
542
|
}
|
|
320
543
|
|
|
321
544
|
/**
|
|
@@ -349,16 +572,76 @@ class CompanyProfile {
|
|
|
349
572
|
|
|
350
573
|
/**
|
|
351
574
|
* @param {Object} arg - Arg object.
|
|
352
|
-
* @
|
|
353
|
-
* @summary:
|
|
354
|
-
* @description: This API allows to
|
|
575
|
+
* @returns {Promise<MetricsSerializer>} - Success response
|
|
576
|
+
* @summary: Get company metrics
|
|
577
|
+
* @description: This API allows to view the company metrics, i.e. the status of its brand and stores. Also its allows to view the number of products, company documents & store documents which are verified and unverified.
|
|
355
578
|
*/
|
|
356
|
-
|
|
579
|
+
async getCompanyMetrics({} = {}) {
|
|
580
|
+
const { error } = CompanyProfileValidator.getCompanyMetrics().validate(
|
|
581
|
+
{},
|
|
582
|
+
{ abortEarly: false, allowUnknown: true }
|
|
583
|
+
);
|
|
584
|
+
if (error) {
|
|
585
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
// Showing warrnings if extra unknown parameters are found
|
|
357
589
|
const {
|
|
358
|
-
error,
|
|
359
|
-
} = CompanyProfileValidator.
|
|
590
|
+
error: warrning,
|
|
591
|
+
} = CompanyProfileValidator.getCompanyMetrics().validate(
|
|
592
|
+
{},
|
|
593
|
+
{ abortEarly: false, allowUnknown: false }
|
|
594
|
+
);
|
|
595
|
+
if (warrning) {
|
|
596
|
+
Logger({
|
|
597
|
+
level: "WARN",
|
|
598
|
+
message: "Parameter Validation warrnings for getCompanyMetrics",
|
|
599
|
+
});
|
|
600
|
+
Logger({ level: "WARN", message: warrning });
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
const query_params = {};
|
|
604
|
+
|
|
605
|
+
const xHeaders = {};
|
|
606
|
+
|
|
607
|
+
const response = await PlatformAPIClient.execute(
|
|
608
|
+
this.config,
|
|
609
|
+
"get",
|
|
610
|
+
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/metrics`,
|
|
611
|
+
query_params,
|
|
612
|
+
undefined,
|
|
613
|
+
xHeaders
|
|
614
|
+
);
|
|
615
|
+
|
|
616
|
+
const {
|
|
617
|
+
error: res_error,
|
|
618
|
+
} = CompanyProfileModel.MetricsSerializer().validate(response, {
|
|
619
|
+
abortEarly: false,
|
|
620
|
+
allowUnknown: false,
|
|
621
|
+
});
|
|
622
|
+
|
|
623
|
+
if (res_error) {
|
|
624
|
+
Logger({
|
|
625
|
+
level: "WARN",
|
|
626
|
+
message: "Response Validation Warnnings for getCompanyMetrics",
|
|
627
|
+
});
|
|
628
|
+
Logger({ level: "WARN", message: res_error });
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
return response;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* @param {Object} arg - Arg object.
|
|
636
|
+
* @param {string} arg.locationId - Id of the location which you want to view.
|
|
637
|
+
* @returns {Promise<GetLocationSerializer>} - Success response
|
|
638
|
+
* @summary: Get details of a specific location.
|
|
639
|
+
* @description: This API helps to get data associated to a specific location.
|
|
640
|
+
*/
|
|
641
|
+
async getLocationDetail({ locationId } = {}) {
|
|
642
|
+
const { error } = CompanyProfileValidator.getLocationDetail().validate(
|
|
360
643
|
{
|
|
361
|
-
|
|
644
|
+
locationId,
|
|
362
645
|
},
|
|
363
646
|
{ abortEarly: false, allowUnknown: true }
|
|
364
647
|
);
|
|
@@ -369,31 +652,49 @@ class CompanyProfile {
|
|
|
369
652
|
// Showing warrnings if extra unknown parameters are found
|
|
370
653
|
const {
|
|
371
654
|
error: warrning,
|
|
372
|
-
} = CompanyProfileValidator.
|
|
655
|
+
} = CompanyProfileValidator.getLocationDetail().validate(
|
|
373
656
|
{
|
|
374
|
-
|
|
657
|
+
locationId,
|
|
375
658
|
},
|
|
376
659
|
{ abortEarly: false, allowUnknown: false }
|
|
377
660
|
);
|
|
378
661
|
if (warrning) {
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
662
|
+
Logger({
|
|
663
|
+
level: "WARN",
|
|
664
|
+
message: "Parameter Validation warrnings for getLocationDetail",
|
|
665
|
+
});
|
|
666
|
+
Logger({ level: "WARN", message: warrning });
|
|
383
667
|
}
|
|
384
668
|
|
|
385
669
|
const query_params = {};
|
|
386
670
|
|
|
387
671
|
const xHeaders = {};
|
|
388
672
|
|
|
389
|
-
|
|
673
|
+
const response = await PlatformAPIClient.execute(
|
|
390
674
|
this.config,
|
|
391
|
-
"
|
|
392
|
-
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/
|
|
675
|
+
"get",
|
|
676
|
+
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/${locationId}`,
|
|
393
677
|
query_params,
|
|
394
|
-
|
|
678
|
+
undefined,
|
|
395
679
|
xHeaders
|
|
396
680
|
);
|
|
681
|
+
|
|
682
|
+
const {
|
|
683
|
+
error: res_error,
|
|
684
|
+
} = CompanyProfileModel.GetLocationSerializer().validate(response, {
|
|
685
|
+
abortEarly: false,
|
|
686
|
+
allowUnknown: false,
|
|
687
|
+
});
|
|
688
|
+
|
|
689
|
+
if (res_error) {
|
|
690
|
+
Logger({
|
|
691
|
+
level: "WARN",
|
|
692
|
+
message: "Response Validation Warnnings for getLocationDetail",
|
|
693
|
+
});
|
|
694
|
+
Logger({ level: "WARN", message: res_error });
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
return response;
|
|
397
698
|
}
|
|
398
699
|
|
|
399
700
|
/**
|
|
@@ -408,10 +709,18 @@ class CompanyProfile {
|
|
|
408
709
|
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
409
710
|
* page. Default is 10.
|
|
410
711
|
* @param {number[]} [arg.locationIds] - Helps to filter stores on the basis of uids.
|
|
712
|
+
* @returns {Promise<LocationListSerializer>} - Success response
|
|
411
713
|
* @summary: Get list of locations
|
|
412
714
|
* @description: This API allows to view all the locations associated to a company.
|
|
413
715
|
*/
|
|
414
|
-
getLocations({
|
|
716
|
+
async getLocations({
|
|
717
|
+
storeType,
|
|
718
|
+
q,
|
|
719
|
+
stage,
|
|
720
|
+
pageNo,
|
|
721
|
+
pageSize,
|
|
722
|
+
locationIds,
|
|
723
|
+
} = {}) {
|
|
415
724
|
const { error } = CompanyProfileValidator.getLocations().validate(
|
|
416
725
|
{
|
|
417
726
|
storeType,
|
|
@@ -440,8 +749,11 @@ class CompanyProfile {
|
|
|
440
749
|
{ abortEarly: false, allowUnknown: false }
|
|
441
750
|
);
|
|
442
751
|
if (warrning) {
|
|
443
|
-
|
|
444
|
-
|
|
752
|
+
Logger({
|
|
753
|
+
level: "WARN",
|
|
754
|
+
message: "Parameter Validation warrnings for getLocations",
|
|
755
|
+
});
|
|
756
|
+
Logger({ level: "WARN", message: warrning });
|
|
445
757
|
}
|
|
446
758
|
|
|
447
759
|
const query_params = {};
|
|
@@ -454,7 +766,7 @@ class CompanyProfile {
|
|
|
454
766
|
|
|
455
767
|
const xHeaders = {};
|
|
456
768
|
|
|
457
|
-
|
|
769
|
+
const response = await PlatformAPIClient.execute(
|
|
458
770
|
this.config,
|
|
459
771
|
"get",
|
|
460
772
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/location`,
|
|
@@ -462,6 +774,23 @@ class CompanyProfile {
|
|
|
462
774
|
undefined,
|
|
463
775
|
xHeaders
|
|
464
776
|
);
|
|
777
|
+
|
|
778
|
+
const {
|
|
779
|
+
error: res_error,
|
|
780
|
+
} = CompanyProfileModel.LocationListSerializer().validate(response, {
|
|
781
|
+
abortEarly: false,
|
|
782
|
+
allowUnknown: false,
|
|
783
|
+
});
|
|
784
|
+
|
|
785
|
+
if (res_error) {
|
|
786
|
+
Logger({
|
|
787
|
+
level: "WARN",
|
|
788
|
+
message: "Response Validation Warnnings for getLocations",
|
|
789
|
+
});
|
|
790
|
+
Logger({ level: "WARN", message: res_error });
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
return response;
|
|
465
794
|
}
|
|
466
795
|
|
|
467
796
|
/**
|
|
@@ -503,12 +832,13 @@ class CompanyProfile {
|
|
|
503
832
|
|
|
504
833
|
/**
|
|
505
834
|
* @param {Object} arg - Arg object.
|
|
506
|
-
* @param {
|
|
507
|
-
* @
|
|
508
|
-
* @
|
|
835
|
+
* @param {UpdateCompany} arg.body
|
|
836
|
+
* @returns {Promise<ProfileSuccessResponse>} - Success response
|
|
837
|
+
* @summary: Edit company profile
|
|
838
|
+
* @description: This API allows to edit the company profile of the seller account.
|
|
509
839
|
*/
|
|
510
|
-
|
|
511
|
-
const { error } = CompanyProfileValidator.
|
|
840
|
+
async updateCompany({ body } = {}) {
|
|
841
|
+
const { error } = CompanyProfileValidator.updateCompany().validate(
|
|
512
842
|
{
|
|
513
843
|
body,
|
|
514
844
|
},
|
|
@@ -521,84 +851,60 @@ class CompanyProfile {
|
|
|
521
851
|
// Showing warrnings if extra unknown parameters are found
|
|
522
852
|
const {
|
|
523
853
|
error: warrning,
|
|
524
|
-
} = CompanyProfileValidator.
|
|
854
|
+
} = CompanyProfileValidator.updateCompany().validate(
|
|
525
855
|
{
|
|
526
856
|
body,
|
|
527
857
|
},
|
|
528
858
|
{ abortEarly: false, allowUnknown: false }
|
|
529
859
|
);
|
|
530
860
|
if (warrning) {
|
|
531
|
-
|
|
532
|
-
|
|
861
|
+
Logger({
|
|
862
|
+
level: "WARN",
|
|
863
|
+
message: "Parameter Validation warrnings for updateCompany",
|
|
864
|
+
});
|
|
865
|
+
Logger({ level: "WARN", message: warrning });
|
|
533
866
|
}
|
|
534
867
|
|
|
535
868
|
const query_params = {};
|
|
536
869
|
|
|
537
870
|
const xHeaders = {};
|
|
538
871
|
|
|
539
|
-
|
|
872
|
+
const response = await PlatformAPIClient.execute(
|
|
540
873
|
this.config,
|
|
541
|
-
"
|
|
542
|
-
`/service/platform/company-profile/v1.0/company/${this.config.companyId}
|
|
874
|
+
"patch",
|
|
875
|
+
`/service/platform/company-profile/v1.0/company/${this.config.companyId}`,
|
|
543
876
|
query_params,
|
|
544
877
|
body,
|
|
545
878
|
xHeaders
|
|
546
879
|
);
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
/**
|
|
550
|
-
* @param {Object} arg - Arg object.
|
|
551
|
-
* @param {string} arg.locationId - Id of the location which you want to view.
|
|
552
|
-
* @summary: Get details of a specific location.
|
|
553
|
-
* @description: This API helps to get data associated to a specific location.
|
|
554
|
-
*/
|
|
555
|
-
getLocationDetail({ locationId } = {}) {
|
|
556
|
-
const { error } = CompanyProfileValidator.getLocationDetail().validate(
|
|
557
|
-
{
|
|
558
|
-
locationId,
|
|
559
|
-
},
|
|
560
|
-
{ abortEarly: false, allowUnknown: true }
|
|
561
|
-
);
|
|
562
|
-
if (error) {
|
|
563
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
564
|
-
}
|
|
565
880
|
|
|
566
|
-
// Showing warrnings if extra unknown parameters are found
|
|
567
881
|
const {
|
|
568
|
-
error:
|
|
569
|
-
} =
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
)
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
882
|
+
error: res_error,
|
|
883
|
+
} = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
|
|
884
|
+
abortEarly: false,
|
|
885
|
+
allowUnknown: false,
|
|
886
|
+
});
|
|
887
|
+
|
|
888
|
+
if (res_error) {
|
|
889
|
+
Logger({
|
|
890
|
+
level: "WARN",
|
|
891
|
+
message: "Response Validation Warnnings for updateCompany",
|
|
892
|
+
});
|
|
893
|
+
Logger({ level: "WARN", message: res_error });
|
|
578
894
|
}
|
|
579
895
|
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
const xHeaders = {};
|
|
583
|
-
|
|
584
|
-
return PlatformAPIClient.execute(
|
|
585
|
-
this.config,
|
|
586
|
-
"get",
|
|
587
|
-
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/${locationId}`,
|
|
588
|
-
query_params,
|
|
589
|
-
undefined,
|
|
590
|
-
xHeaders
|
|
591
|
-
);
|
|
896
|
+
return response;
|
|
592
897
|
}
|
|
593
898
|
|
|
594
899
|
/**
|
|
595
900
|
* @param {Object} arg - Arg object.
|
|
596
901
|
* @param {string} arg.locationId - Id of the location which you want to edit.
|
|
597
902
|
* @param {LocationSerializer} arg.body
|
|
903
|
+
* @returns {Promise<ProfileSuccessResponse>} - Success response
|
|
598
904
|
* @summary: Edit a location asscoiated to a company.
|
|
599
905
|
* @description: This API allows to edit a location associated to a company.
|
|
600
906
|
*/
|
|
601
|
-
updateLocation({ locationId, body } = {}) {
|
|
907
|
+
async updateLocation({ locationId, body } = {}) {
|
|
602
908
|
const { error } = CompanyProfileValidator.updateLocation().validate(
|
|
603
909
|
{
|
|
604
910
|
locationId,
|
|
@@ -621,15 +927,18 @@ class CompanyProfile {
|
|
|
621
927
|
{ abortEarly: false, allowUnknown: false }
|
|
622
928
|
);
|
|
623
929
|
if (warrning) {
|
|
624
|
-
|
|
625
|
-
|
|
930
|
+
Logger({
|
|
931
|
+
level: "WARN",
|
|
932
|
+
message: "Parameter Validation warrnings for updateLocation",
|
|
933
|
+
});
|
|
934
|
+
Logger({ level: "WARN", message: warrning });
|
|
626
935
|
}
|
|
627
936
|
|
|
628
937
|
const query_params = {};
|
|
629
938
|
|
|
630
939
|
const xHeaders = {};
|
|
631
940
|
|
|
632
|
-
|
|
941
|
+
const response = await PlatformAPIClient.execute(
|
|
633
942
|
this.config,
|
|
634
943
|
"put",
|
|
635
944
|
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/${locationId}`,
|
|
@@ -637,51 +946,23 @@ class CompanyProfile {
|
|
|
637
946
|
body,
|
|
638
947
|
xHeaders
|
|
639
948
|
);
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
/**
|
|
643
|
-
* @param {Object} arg - Arg object.
|
|
644
|
-
* @param {BulkLocationSerializer} arg.body
|
|
645
|
-
* @summary: Create a location asscoiated to a company in bulk.
|
|
646
|
-
* @description: This API allows to create a location associated to a company.
|
|
647
|
-
*/
|
|
648
|
-
createLocationBulk({ body } = {}) {
|
|
649
|
-
const { error } = CompanyProfileValidator.createLocationBulk().validate(
|
|
650
|
-
{
|
|
651
|
-
body,
|
|
652
|
-
},
|
|
653
|
-
{ abortEarly: false, allowUnknown: true }
|
|
654
|
-
);
|
|
655
|
-
if (error) {
|
|
656
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
657
|
-
}
|
|
658
949
|
|
|
659
|
-
// Showing warrnings if extra unknown parameters are found
|
|
660
950
|
const {
|
|
661
|
-
error:
|
|
662
|
-
} =
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
)
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
951
|
+
error: res_error,
|
|
952
|
+
} = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
|
|
953
|
+
abortEarly: false,
|
|
954
|
+
allowUnknown: false,
|
|
955
|
+
});
|
|
956
|
+
|
|
957
|
+
if (res_error) {
|
|
958
|
+
Logger({
|
|
959
|
+
level: "WARN",
|
|
960
|
+
message: "Response Validation Warnnings for updateLocation",
|
|
961
|
+
});
|
|
962
|
+
Logger({ level: "WARN", message: res_error });
|
|
671
963
|
}
|
|
672
964
|
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
const xHeaders = {};
|
|
676
|
-
|
|
677
|
-
return PlatformAPIClient.execute(
|
|
678
|
-
this.config,
|
|
679
|
-
"post",
|
|
680
|
-
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/bulk`,
|
|
681
|
-
query_params,
|
|
682
|
-
body,
|
|
683
|
-
xHeaders
|
|
684
|
-
);
|
|
965
|
+
return response;
|
|
685
966
|
}
|
|
686
967
|
}
|
|
687
968
|
|