@gofynd/fdk-client-javascript 1.0.2 → 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 +557 -1279
- 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 +14453 -17192
- 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 +3438 -4172
- 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 +3400 -5361
- 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/Cart/CartApplicationClient.d.ts +243 -243
- package/sdk/application/Cart/CartApplicationClient.js +567 -567
- 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 +1036 -1036
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
- package/sdk/application/Catalog/CatalogApplicationModel.js +677 -1243
- 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 +38 -38
- 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 +26 -26
- 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 +330 -330
- 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 +191 -191
- package/sdk/application/Content/ContentApplicationModel.d.ts +76 -76
- package/sdk/application/Content/ContentApplicationModel.js +467 -884
- package/sdk/application/Content/ContentApplicationValidator.d.ts +5 -5
- package/sdk/application/Content/ContentApplicationValidator.js +24 -24
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +25 -25
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +59 -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 +100 -100
- 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 +110 -43
- 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 +85 -85
- package/sdk/application/Order/OrderApplicationClient.js +232 -232
- package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
- package/sdk/application/Order/OrderApplicationModel.js +352 -656
- package/sdk/application/Order/OrderApplicationValidator.d.ts +7 -7
- package/sdk/application/Order/OrderApplicationValidator.js +28 -28
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +318 -318
- package/sdk/application/Payment/PaymentApplicationClient.js +739 -739
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +72 -72
- package/sdk/application/Payment/PaymentApplicationModel.js +570 -1038
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +28 -28
- package/sdk/application/Payment/PaymentApplicationValidator.js +107 -107
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +254 -254
- package/sdk/application/PosCart/PosCartApplicationClient.js +617 -617
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +64 -63
- package/sdk/application/PosCart/PosCartApplicationModel.js +475 -871
- 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 +112 -112
- 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 +84 -84
- 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 +31 -31
- 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 +581 -581
- 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 +51 -51
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +179 -179
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +20 -20
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +10 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +41 -41
- 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 +60 -60
- package/sdk/platform/Billing/BillingPlatformClient.js +181 -181
- 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 +168 -168
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +553 -553
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +11 -11
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +63 -63
- package/sdk/platform/Cart/CartPlatformModel.d.ts +84 -83
- package/sdk/platform/Cart/CartPlatformModel.js +671 -1205
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +632 -632
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1525 -1525
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +174 -174
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +682 -682
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1557 -1557
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +291 -291
- package/sdk/platform/Catalog/CatalogPlatformModel.js +2127 -3904
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -66
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +229 -229
- package/sdk/platform/Common/CommonPlatformClient.d.ts +12 -12
- package/sdk/platform/Common/CommonPlatformClient.js +41 -41
- 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 +326 -326
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +943 -943
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +87 -87
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
- package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +55 -55
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +212 -212
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +27 -27
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +279 -542
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +7 -7
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +24 -24
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +163 -153
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +615 -552
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +69 -63
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +125 -125
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +342 -342
- 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 +534 -534
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1324 -1324
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +50 -50
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +156 -156
- package/sdk/platform/Content/ContentPlatformModel.d.ts +78 -78
- package/sdk/platform/Content/ContentPlatformModel.js +484 -907
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +65 -65
- package/sdk/platform/Discount/DiscountPlatformClient.js +216 -216
- 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 +24 -24
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +58 -58
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +52 -52
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +123 -123
- 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 +63 -63
- package/sdk/platform/Inventory/InventoryPlatformClient.js +228 -228
- 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 +73 -73
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +200 -200
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +28 -28
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +80 -80
- package/sdk/platform/Lead/LeadPlatformClient.js +212 -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/Order/OrderPlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +65 -65
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -6
- package/sdk/platform/Order/OrderPlatformClient.d.ts +357 -357
- package/sdk/platform/Order/OrderPlatformClient.js +1035 -1035
- package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -196
- package/sdk/platform/Order/OrderPlatformModel.js +1574 -2861
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
- package/sdk/platform/Order/OrderPlatformValidator.js +160 -160
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -1
- package/sdk/platform/Partner/PartnerPlatformModel.js +10 -26
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +57 -57
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +167 -167
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +23 -23
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +42 -42
- package/sdk/platform/Payment/PaymentPlatformClient.js +153 -153
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +27 -27
- package/sdk/platform/Payment/PaymentPlatformModel.js +222 -410
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +4 -4
- package/sdk/platform/Payment/PaymentPlatformValidator.js +21 -21
- package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10325
- package/sdk/platform/PlatformApplicationClient.js +1584 -13899
- package/sdk/platform/PlatformClient.d.ts +7965 -7885
- package/sdk/platform/PlatformClient.js +8672 -10105
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +83 -83
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +275 -275
- 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 +10 -10
- package/sdk/platform/Share/SharePlatformApplicationClient.js +59 -59
- 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 +132 -132
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +310 -310
- 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 +136 -69
- package/sdk/platform/User/UserPlatformApplicationClient.js +505 -166
- 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 +31 -31
- package/sdk/platform/Webhook/WebhookPlatformClient.js +88 -88
- 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 +38 -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 +113 -113
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +10 -10
- package/sdk/public/Inventory/InventoryPublicModel.js +119 -245
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +3 -3
- package/sdk/public/Inventory/InventoryPublicValidator.js +15 -15
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +7 -7
- package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
- package/tests/application/catalog.spec.js +7 -0
|
@@ -73,13 +73,79 @@ class CompanyProfile {
|
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
75
|
* @param {Object} arg - Arg object.
|
|
76
|
-
* @param {
|
|
76
|
+
* @param {CreateUpdateBrandRequestSerializer} arg.body
|
|
77
77
|
* @returns {Promise<ProfileSuccessResponse>} - Success response
|
|
78
|
-
* @summary:
|
|
79
|
-
* @description: This API allows to
|
|
78
|
+
* @summary: Create a Brand.
|
|
79
|
+
* @description: This API allows to create a brand associated to a company.
|
|
80
80
|
*/
|
|
81
|
-
async
|
|
82
|
-
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(
|
|
83
149
|
{
|
|
84
150
|
body,
|
|
85
151
|
},
|
|
@@ -92,7 +158,7 @@ class CompanyProfile {
|
|
|
92
158
|
// Showing warrnings if extra unknown parameters are found
|
|
93
159
|
const {
|
|
94
160
|
error: warrning,
|
|
95
|
-
} = CompanyProfileValidator.
|
|
161
|
+
} = CompanyProfileValidator.createCompanyBrandMapping().validate(
|
|
96
162
|
{
|
|
97
163
|
body,
|
|
98
164
|
},
|
|
@@ -101,7 +167,7 @@ class CompanyProfile {
|
|
|
101
167
|
if (warrning) {
|
|
102
168
|
Logger({
|
|
103
169
|
level: "WARN",
|
|
104
|
-
message: "Parameter Validation warrnings for
|
|
170
|
+
message: "Parameter Validation warrnings for createCompanyBrandMapping",
|
|
105
171
|
});
|
|
106
172
|
Logger({ level: "WARN", message: warrning });
|
|
107
173
|
}
|
|
@@ -112,8 +178,8 @@ class CompanyProfile {
|
|
|
112
178
|
|
|
113
179
|
const response = await PlatformAPIClient.execute(
|
|
114
180
|
this.config,
|
|
115
|
-
"
|
|
116
|
-
`/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`,
|
|
117
183
|
query_params,
|
|
118
184
|
body,
|
|
119
185
|
xHeaders
|
|
@@ -129,7 +195,7 @@ class CompanyProfile {
|
|
|
129
195
|
if (res_error) {
|
|
130
196
|
Logger({
|
|
131
197
|
level: "WARN",
|
|
132
|
-
message: "Response Validation Warnnings for
|
|
198
|
+
message: "Response Validation Warnnings for createCompanyBrandMapping",
|
|
133
199
|
});
|
|
134
200
|
Logger({ level: "WARN", message: res_error });
|
|
135
201
|
}
|
|
@@ -139,13 +205,16 @@ class CompanyProfile {
|
|
|
139
205
|
|
|
140
206
|
/**
|
|
141
207
|
* @param {Object} arg - Arg object.
|
|
142
|
-
* @
|
|
143
|
-
* @
|
|
144
|
-
* @
|
|
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.
|
|
145
212
|
*/
|
|
146
|
-
async
|
|
147
|
-
const { error } = CompanyProfileValidator.
|
|
148
|
-
{
|
|
213
|
+
async createLocation({ body } = {}) {
|
|
214
|
+
const { error } = CompanyProfileValidator.createLocation().validate(
|
|
215
|
+
{
|
|
216
|
+
body,
|
|
217
|
+
},
|
|
149
218
|
{ abortEarly: false, allowUnknown: true }
|
|
150
219
|
);
|
|
151
220
|
if (error) {
|
|
@@ -155,14 +224,16 @@ class CompanyProfile {
|
|
|
155
224
|
// Showing warrnings if extra unknown parameters are found
|
|
156
225
|
const {
|
|
157
226
|
error: warrning,
|
|
158
|
-
} = CompanyProfileValidator.
|
|
159
|
-
{
|
|
227
|
+
} = CompanyProfileValidator.createLocation().validate(
|
|
228
|
+
{
|
|
229
|
+
body,
|
|
230
|
+
},
|
|
160
231
|
{ abortEarly: false, allowUnknown: false }
|
|
161
232
|
);
|
|
162
233
|
if (warrning) {
|
|
163
234
|
Logger({
|
|
164
235
|
level: "WARN",
|
|
165
|
-
message: "Parameter Validation warrnings for
|
|
236
|
+
message: "Parameter Validation warrnings for createLocation",
|
|
166
237
|
});
|
|
167
238
|
Logger({ level: "WARN", message: warrning });
|
|
168
239
|
}
|
|
@@ -173,16 +244,16 @@ class CompanyProfile {
|
|
|
173
244
|
|
|
174
245
|
const response = await PlatformAPIClient.execute(
|
|
175
246
|
this.config,
|
|
176
|
-
"
|
|
177
|
-
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/
|
|
247
|
+
"post",
|
|
248
|
+
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/location`,
|
|
178
249
|
query_params,
|
|
179
|
-
|
|
250
|
+
body,
|
|
180
251
|
xHeaders
|
|
181
252
|
);
|
|
182
253
|
|
|
183
254
|
const {
|
|
184
255
|
error: res_error,
|
|
185
|
-
} = CompanyProfileModel.
|
|
256
|
+
} = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
|
|
186
257
|
abortEarly: false,
|
|
187
258
|
allowUnknown: false,
|
|
188
259
|
});
|
|
@@ -190,7 +261,7 @@ class CompanyProfile {
|
|
|
190
261
|
if (res_error) {
|
|
191
262
|
Logger({
|
|
192
263
|
level: "WARN",
|
|
193
|
-
message: "Response Validation Warnnings for
|
|
264
|
+
message: "Response Validation Warnnings for createLocation",
|
|
194
265
|
});
|
|
195
266
|
Logger({ level: "WARN", message: res_error });
|
|
196
267
|
}
|
|
@@ -200,15 +271,15 @@ class CompanyProfile {
|
|
|
200
271
|
|
|
201
272
|
/**
|
|
202
273
|
* @param {Object} arg - Arg object.
|
|
203
|
-
* @param {
|
|
204
|
-
* @returns {Promise<
|
|
205
|
-
* @summary:
|
|
206
|
-
* @description: This API
|
|
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.
|
|
207
278
|
*/
|
|
208
|
-
async
|
|
209
|
-
const { error } = CompanyProfileValidator.
|
|
279
|
+
async createLocationBulk({ body } = {}) {
|
|
280
|
+
const { error } = CompanyProfileValidator.createLocationBulk().validate(
|
|
210
281
|
{
|
|
211
|
-
|
|
282
|
+
body,
|
|
212
283
|
},
|
|
213
284
|
{ abortEarly: false, allowUnknown: true }
|
|
214
285
|
);
|
|
@@ -217,16 +288,18 @@ class CompanyProfile {
|
|
|
217
288
|
}
|
|
218
289
|
|
|
219
290
|
// Showing warrnings if extra unknown parameters are found
|
|
220
|
-
const {
|
|
291
|
+
const {
|
|
292
|
+
error: warrning,
|
|
293
|
+
} = CompanyProfileValidator.createLocationBulk().validate(
|
|
221
294
|
{
|
|
222
|
-
|
|
295
|
+
body,
|
|
223
296
|
},
|
|
224
297
|
{ abortEarly: false, allowUnknown: false }
|
|
225
298
|
);
|
|
226
299
|
if (warrning) {
|
|
227
300
|
Logger({
|
|
228
301
|
level: "WARN",
|
|
229
|
-
message: "Parameter Validation warrnings for
|
|
302
|
+
message: "Parameter Validation warrnings for createLocationBulk",
|
|
230
303
|
});
|
|
231
304
|
Logger({ level: "WARN", message: warrning });
|
|
232
305
|
}
|
|
@@ -237,16 +310,16 @@ class CompanyProfile {
|
|
|
237
310
|
|
|
238
311
|
const response = await PlatformAPIClient.execute(
|
|
239
312
|
this.config,
|
|
240
|
-
"
|
|
241
|
-
`/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`,
|
|
242
315
|
query_params,
|
|
243
|
-
|
|
316
|
+
body,
|
|
244
317
|
xHeaders
|
|
245
318
|
);
|
|
246
319
|
|
|
247
320
|
const {
|
|
248
321
|
error: res_error,
|
|
249
|
-
} = CompanyProfileModel.
|
|
322
|
+
} = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
|
|
250
323
|
abortEarly: false,
|
|
251
324
|
allowUnknown: false,
|
|
252
325
|
});
|
|
@@ -254,7 +327,7 @@ class CompanyProfile {
|
|
|
254
327
|
if (res_error) {
|
|
255
328
|
Logger({
|
|
256
329
|
level: "WARN",
|
|
257
|
-
message: "Response Validation Warnnings for
|
|
330
|
+
message: "Response Validation Warnnings for createLocationBulk",
|
|
258
331
|
});
|
|
259
332
|
Logger({ level: "WARN", message: res_error });
|
|
260
333
|
}
|
|
@@ -331,15 +404,15 @@ class CompanyProfile {
|
|
|
331
404
|
|
|
332
405
|
/**
|
|
333
406
|
* @param {Object} arg - Arg object.
|
|
334
|
-
* @param {
|
|
335
|
-
* @returns {Promise<
|
|
336
|
-
* @summary:
|
|
337
|
-
* @description: This API
|
|
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.
|
|
338
411
|
*/
|
|
339
|
-
async
|
|
340
|
-
const { error } = CompanyProfileValidator.
|
|
412
|
+
async getBrand({ brandId } = {}) {
|
|
413
|
+
const { error } = CompanyProfileValidator.getBrand().validate(
|
|
341
414
|
{
|
|
342
|
-
|
|
415
|
+
brandId,
|
|
343
416
|
},
|
|
344
417
|
{ abortEarly: false, allowUnknown: true }
|
|
345
418
|
);
|
|
@@ -348,16 +421,16 @@ class CompanyProfile {
|
|
|
348
421
|
}
|
|
349
422
|
|
|
350
423
|
// Showing warrnings if extra unknown parameters are found
|
|
351
|
-
const { error: warrning } = CompanyProfileValidator.
|
|
424
|
+
const { error: warrning } = CompanyProfileValidator.getBrand().validate(
|
|
352
425
|
{
|
|
353
|
-
|
|
426
|
+
brandId,
|
|
354
427
|
},
|
|
355
428
|
{ abortEarly: false, allowUnknown: false }
|
|
356
429
|
);
|
|
357
430
|
if (warrning) {
|
|
358
431
|
Logger({
|
|
359
432
|
level: "WARN",
|
|
360
|
-
message: "Parameter Validation warrnings for
|
|
433
|
+
message: "Parameter Validation warrnings for getBrand",
|
|
361
434
|
});
|
|
362
435
|
Logger({ level: "WARN", message: warrning });
|
|
363
436
|
}
|
|
@@ -368,16 +441,16 @@ class CompanyProfile {
|
|
|
368
441
|
|
|
369
442
|
const response = await PlatformAPIClient.execute(
|
|
370
443
|
this.config,
|
|
371
|
-
"
|
|
372
|
-
`/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}`,
|
|
373
446
|
query_params,
|
|
374
|
-
|
|
447
|
+
undefined,
|
|
375
448
|
xHeaders
|
|
376
449
|
);
|
|
377
450
|
|
|
378
451
|
const {
|
|
379
452
|
error: res_error,
|
|
380
|
-
} = CompanyProfileModel.
|
|
453
|
+
} = CompanyProfileModel.GetBrandResponseSerializer().validate(response, {
|
|
381
454
|
abortEarly: false,
|
|
382
455
|
allowUnknown: false,
|
|
383
456
|
});
|
|
@@ -385,7 +458,7 @@ class CompanyProfile {
|
|
|
385
458
|
if (res_error) {
|
|
386
459
|
Logger({
|
|
387
460
|
level: "WARN",
|
|
388
|
-
message: "Response Validation Warnnings for
|
|
461
|
+
message: "Response Validation Warnnings for getBrand",
|
|
389
462
|
});
|
|
390
463
|
Logger({ level: "WARN", message: res_error });
|
|
391
464
|
}
|
|
@@ -499,17 +572,76 @@ class CompanyProfile {
|
|
|
499
572
|
|
|
500
573
|
/**
|
|
501
574
|
* @param {Object} arg - Arg object.
|
|
502
|
-
* @
|
|
503
|
-
* @
|
|
504
|
-
* @
|
|
505
|
-
* @description: This API allows to create a company brand mapping, for a already existing brand in the system.
|
|
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.
|
|
506
578
|
*/
|
|
507
|
-
async
|
|
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
|
|
508
589
|
const {
|
|
509
|
-
error,
|
|
510
|
-
} = 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(
|
|
511
643
|
{
|
|
512
|
-
|
|
644
|
+
locationId,
|
|
513
645
|
},
|
|
514
646
|
{ abortEarly: false, allowUnknown: true }
|
|
515
647
|
);
|
|
@@ -520,16 +652,16 @@ class CompanyProfile {
|
|
|
520
652
|
// Showing warrnings if extra unknown parameters are found
|
|
521
653
|
const {
|
|
522
654
|
error: warrning,
|
|
523
|
-
} = CompanyProfileValidator.
|
|
655
|
+
} = CompanyProfileValidator.getLocationDetail().validate(
|
|
524
656
|
{
|
|
525
|
-
|
|
657
|
+
locationId,
|
|
526
658
|
},
|
|
527
659
|
{ abortEarly: false, allowUnknown: false }
|
|
528
660
|
);
|
|
529
661
|
if (warrning) {
|
|
530
662
|
Logger({
|
|
531
663
|
level: "WARN",
|
|
532
|
-
message: "Parameter Validation warrnings for
|
|
664
|
+
message: "Parameter Validation warrnings for getLocationDetail",
|
|
533
665
|
});
|
|
534
666
|
Logger({ level: "WARN", message: warrning });
|
|
535
667
|
}
|
|
@@ -540,16 +672,16 @@ class CompanyProfile {
|
|
|
540
672
|
|
|
541
673
|
const response = await PlatformAPIClient.execute(
|
|
542
674
|
this.config,
|
|
543
|
-
"
|
|
544
|
-
`/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}`,
|
|
545
677
|
query_params,
|
|
546
|
-
|
|
678
|
+
undefined,
|
|
547
679
|
xHeaders
|
|
548
680
|
);
|
|
549
681
|
|
|
550
682
|
const {
|
|
551
683
|
error: res_error,
|
|
552
|
-
} = CompanyProfileModel.
|
|
684
|
+
} = CompanyProfileModel.GetLocationSerializer().validate(response, {
|
|
553
685
|
abortEarly: false,
|
|
554
686
|
allowUnknown: false,
|
|
555
687
|
});
|
|
@@ -557,7 +689,7 @@ class CompanyProfile {
|
|
|
557
689
|
if (res_error) {
|
|
558
690
|
Logger({
|
|
559
691
|
level: "WARN",
|
|
560
|
-
message: "Response Validation Warnnings for
|
|
692
|
+
message: "Response Validation Warnnings for getLocationDetail",
|
|
561
693
|
});
|
|
562
694
|
Logger({ level: "WARN", message: res_error });
|
|
563
695
|
}
|
|
@@ -700,13 +832,13 @@ class CompanyProfile {
|
|
|
700
832
|
|
|
701
833
|
/**
|
|
702
834
|
* @param {Object} arg - Arg object.
|
|
703
|
-
* @param {
|
|
835
|
+
* @param {UpdateCompany} arg.body
|
|
704
836
|
* @returns {Promise<ProfileSuccessResponse>} - Success response
|
|
705
|
-
* @summary:
|
|
706
|
-
* @description: This API allows to edit
|
|
837
|
+
* @summary: Edit company profile
|
|
838
|
+
* @description: This API allows to edit the company profile of the seller account.
|
|
707
839
|
*/
|
|
708
|
-
async
|
|
709
|
-
const { error } = CompanyProfileValidator.
|
|
840
|
+
async updateCompany({ body } = {}) {
|
|
841
|
+
const { error } = CompanyProfileValidator.updateCompany().validate(
|
|
710
842
|
{
|
|
711
843
|
body,
|
|
712
844
|
},
|
|
@@ -719,7 +851,7 @@ class CompanyProfile {
|
|
|
719
851
|
// Showing warrnings if extra unknown parameters are found
|
|
720
852
|
const {
|
|
721
853
|
error: warrning,
|
|
722
|
-
} = CompanyProfileValidator.
|
|
854
|
+
} = CompanyProfileValidator.updateCompany().validate(
|
|
723
855
|
{
|
|
724
856
|
body,
|
|
725
857
|
},
|
|
@@ -728,7 +860,7 @@ class CompanyProfile {
|
|
|
728
860
|
if (warrning) {
|
|
729
861
|
Logger({
|
|
730
862
|
level: "WARN",
|
|
731
|
-
message: "Parameter Validation warrnings for
|
|
863
|
+
message: "Parameter Validation warrnings for updateCompany",
|
|
732
864
|
});
|
|
733
865
|
Logger({ level: "WARN", message: warrning });
|
|
734
866
|
}
|
|
@@ -739,8 +871,8 @@ class CompanyProfile {
|
|
|
739
871
|
|
|
740
872
|
const response = await PlatformAPIClient.execute(
|
|
741
873
|
this.config,
|
|
742
|
-
"
|
|
743
|
-
`/service/platform/company-profile/v1.0/company/${this.config.companyId}
|
|
874
|
+
"patch",
|
|
875
|
+
`/service/platform/company-profile/v1.0/company/${this.config.companyId}`,
|
|
744
876
|
query_params,
|
|
745
877
|
body,
|
|
746
878
|
xHeaders
|
|
@@ -756,73 +888,7 @@ class CompanyProfile {
|
|
|
756
888
|
if (res_error) {
|
|
757
889
|
Logger({
|
|
758
890
|
level: "WARN",
|
|
759
|
-
message: "Response Validation Warnnings for
|
|
760
|
-
});
|
|
761
|
-
Logger({ level: "WARN", message: res_error });
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
return response;
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
/**
|
|
768
|
-
* @param {Object} arg - Arg object.
|
|
769
|
-
* @param {string} arg.locationId - Id of the location which you want to view.
|
|
770
|
-
* @returns {Promise<GetLocationSerializer>} - Success response
|
|
771
|
-
* @summary: Get details of a specific location.
|
|
772
|
-
* @description: This API helps to get data associated to a specific location.
|
|
773
|
-
*/
|
|
774
|
-
async getLocationDetail({ locationId } = {}) {
|
|
775
|
-
const { error } = CompanyProfileValidator.getLocationDetail().validate(
|
|
776
|
-
{
|
|
777
|
-
locationId,
|
|
778
|
-
},
|
|
779
|
-
{ abortEarly: false, allowUnknown: true }
|
|
780
|
-
);
|
|
781
|
-
if (error) {
|
|
782
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
// Showing warrnings if extra unknown parameters are found
|
|
786
|
-
const {
|
|
787
|
-
error: warrning,
|
|
788
|
-
} = CompanyProfileValidator.getLocationDetail().validate(
|
|
789
|
-
{
|
|
790
|
-
locationId,
|
|
791
|
-
},
|
|
792
|
-
{ abortEarly: false, allowUnknown: false }
|
|
793
|
-
);
|
|
794
|
-
if (warrning) {
|
|
795
|
-
Logger({
|
|
796
|
-
level: "WARN",
|
|
797
|
-
message: "Parameter Validation warrnings for getLocationDetail",
|
|
798
|
-
});
|
|
799
|
-
Logger({ level: "WARN", message: warrning });
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
const query_params = {};
|
|
803
|
-
|
|
804
|
-
const xHeaders = {};
|
|
805
|
-
|
|
806
|
-
const response = await PlatformAPIClient.execute(
|
|
807
|
-
this.config,
|
|
808
|
-
"get",
|
|
809
|
-
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/${locationId}`,
|
|
810
|
-
query_params,
|
|
811
|
-
undefined,
|
|
812
|
-
xHeaders
|
|
813
|
-
);
|
|
814
|
-
|
|
815
|
-
const {
|
|
816
|
-
error: res_error,
|
|
817
|
-
} = CompanyProfileModel.GetLocationSerializer().validate(response, {
|
|
818
|
-
abortEarly: false,
|
|
819
|
-
allowUnknown: false,
|
|
820
|
-
});
|
|
821
|
-
|
|
822
|
-
if (res_error) {
|
|
823
|
-
Logger({
|
|
824
|
-
level: "WARN",
|
|
825
|
-
message: "Response Validation Warnnings for getLocationDetail",
|
|
891
|
+
message: "Response Validation Warnnings for updateCompany",
|
|
826
892
|
});
|
|
827
893
|
Logger({ level: "WARN", message: res_error });
|
|
828
894
|
}
|
|
@@ -898,72 +964,6 @@ class CompanyProfile {
|
|
|
898
964
|
|
|
899
965
|
return response;
|
|
900
966
|
}
|
|
901
|
-
|
|
902
|
-
/**
|
|
903
|
-
* @param {Object} arg - Arg object.
|
|
904
|
-
* @param {BulkLocationSerializer} arg.body
|
|
905
|
-
* @returns {Promise<ProfileSuccessResponse>} - Success response
|
|
906
|
-
* @summary: Create a location asscoiated to a company in bulk.
|
|
907
|
-
* @description: This API allows to create a location associated to a company.
|
|
908
|
-
*/
|
|
909
|
-
async createLocationBulk({ body } = {}) {
|
|
910
|
-
const { error } = CompanyProfileValidator.createLocationBulk().validate(
|
|
911
|
-
{
|
|
912
|
-
body,
|
|
913
|
-
},
|
|
914
|
-
{ abortEarly: false, allowUnknown: true }
|
|
915
|
-
);
|
|
916
|
-
if (error) {
|
|
917
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
918
|
-
}
|
|
919
|
-
|
|
920
|
-
// Showing warrnings if extra unknown parameters are found
|
|
921
|
-
const {
|
|
922
|
-
error: warrning,
|
|
923
|
-
} = CompanyProfileValidator.createLocationBulk().validate(
|
|
924
|
-
{
|
|
925
|
-
body,
|
|
926
|
-
},
|
|
927
|
-
{ abortEarly: false, allowUnknown: false }
|
|
928
|
-
);
|
|
929
|
-
if (warrning) {
|
|
930
|
-
Logger({
|
|
931
|
-
level: "WARN",
|
|
932
|
-
message: "Parameter Validation warrnings for createLocationBulk",
|
|
933
|
-
});
|
|
934
|
-
Logger({ level: "WARN", message: warrning });
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
const query_params = {};
|
|
938
|
-
|
|
939
|
-
const xHeaders = {};
|
|
940
|
-
|
|
941
|
-
const response = await PlatformAPIClient.execute(
|
|
942
|
-
this.config,
|
|
943
|
-
"post",
|
|
944
|
-
`/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/bulk`,
|
|
945
|
-
query_params,
|
|
946
|
-
body,
|
|
947
|
-
xHeaders
|
|
948
|
-
);
|
|
949
|
-
|
|
950
|
-
const {
|
|
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 createLocationBulk",
|
|
961
|
-
});
|
|
962
|
-
Logger({ level: "WARN", message: res_error });
|
|
963
|
-
}
|
|
964
|
-
|
|
965
|
-
return response;
|
|
966
|
-
}
|
|
967
967
|
}
|
|
968
968
|
|
|
969
969
|
module.exports = CompanyProfile;
|