@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
|
@@ -181,13 +181,18 @@ class Configuration {
|
|
|
181
181
|
|
|
182
182
|
/**
|
|
183
183
|
* @param {Object} arg - Arg object.
|
|
184
|
-
* @
|
|
185
|
-
* @
|
|
186
|
-
* @
|
|
184
|
+
* @param {number} [arg.pageNo] - Current page no
|
|
185
|
+
* @param {number} [arg.pageSize] - Current request items count
|
|
186
|
+
* @returns {Promise<GetIntegrationsOptInsResponse>} - Success response
|
|
187
|
+
* @summary: Get all available integration opt-ins
|
|
188
|
+
* @description: Get all available integration opt-ins
|
|
187
189
|
*/
|
|
188
|
-
async
|
|
189
|
-
const { error } = ConfigurationValidator.
|
|
190
|
-
{
|
|
190
|
+
async getAvailableOptIns({ pageNo, pageSize } = {}) {
|
|
191
|
+
const { error } = ConfigurationValidator.getAvailableOptIns().validate(
|
|
192
|
+
{
|
|
193
|
+
pageNo,
|
|
194
|
+
pageSize,
|
|
195
|
+
},
|
|
191
196
|
{ abortEarly: false, allowUnknown: true }
|
|
192
197
|
);
|
|
193
198
|
if (error) {
|
|
@@ -195,26 +200,33 @@ class Configuration {
|
|
|
195
200
|
}
|
|
196
201
|
|
|
197
202
|
// Showing warrnings if extra unknown parameters are found
|
|
198
|
-
const {
|
|
199
|
-
|
|
203
|
+
const {
|
|
204
|
+
error: warrning,
|
|
205
|
+
} = ConfigurationValidator.getAvailableOptIns().validate(
|
|
206
|
+
{
|
|
207
|
+
pageNo,
|
|
208
|
+
pageSize,
|
|
209
|
+
},
|
|
200
210
|
{ abortEarly: false, allowUnknown: false }
|
|
201
211
|
);
|
|
202
212
|
if (warrning) {
|
|
203
213
|
Logger({
|
|
204
214
|
level: "WARN",
|
|
205
|
-
message: "Parameter Validation warrnings for
|
|
215
|
+
message: "Parameter Validation warrnings for getAvailableOptIns",
|
|
206
216
|
});
|
|
207
217
|
Logger({ level: "WARN", message: warrning });
|
|
208
218
|
}
|
|
209
219
|
|
|
210
220
|
const query_params = {};
|
|
221
|
+
query_params["page_no"] = pageNo;
|
|
222
|
+
query_params["page_size"] = pageSize;
|
|
211
223
|
|
|
212
224
|
const xHeaders = {};
|
|
213
225
|
|
|
214
226
|
const response = await PlatformAPIClient.execute(
|
|
215
227
|
this.config,
|
|
216
228
|
"get",
|
|
217
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/
|
|
229
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/available`,
|
|
218
230
|
query_params,
|
|
219
231
|
undefined,
|
|
220
232
|
xHeaders
|
|
@@ -222,7 +234,7 @@ class Configuration {
|
|
|
222
234
|
|
|
223
235
|
const {
|
|
224
236
|
error: res_error,
|
|
225
|
-
} = ConfigurationModel.
|
|
237
|
+
} = ConfigurationModel.GetIntegrationsOptInsResponse().validate(response, {
|
|
226
238
|
abortEarly: false,
|
|
227
239
|
allowUnknown: false,
|
|
228
240
|
});
|
|
@@ -230,7 +242,7 @@ class Configuration {
|
|
|
230
242
|
if (res_error) {
|
|
231
243
|
Logger({
|
|
232
244
|
level: "WARN",
|
|
233
|
-
message: "Response Validation Warnnings for
|
|
245
|
+
message: "Response Validation Warnnings for getAvailableOptIns",
|
|
234
246
|
});
|
|
235
247
|
Logger({ level: "WARN", message: res_error });
|
|
236
248
|
}
|
|
@@ -240,15 +252,41 @@ class Configuration {
|
|
|
240
252
|
|
|
241
253
|
/**
|
|
242
254
|
* @param {Object} arg - Arg object.
|
|
243
|
-
* @param {
|
|
244
|
-
* @
|
|
245
|
-
* @
|
|
246
|
-
* @description: Check domain availibility before linking to application. Also sends domain suggestions with similar to queried domain. \ Custom domain search is currently powered by GoDaddy provider.
|
|
255
|
+
* @param {number} [arg.pageSize] - Current request items count
|
|
256
|
+
* @summary: Get all available integration opt-ins
|
|
257
|
+
* @description: Get all available integration opt-ins
|
|
247
258
|
*/
|
|
248
|
-
|
|
249
|
-
const
|
|
259
|
+
getAvailableOptInsPaginator({ pageSize } = {}) {
|
|
260
|
+
const paginator = new Paginator();
|
|
261
|
+
const callback = async () => {
|
|
262
|
+
const pageId = paginator.nextId;
|
|
263
|
+
const pageNo = paginator.pageNo;
|
|
264
|
+
const pageType = "number";
|
|
265
|
+
const data = await this.getAvailableOptIns({
|
|
266
|
+
pageNo: pageNo,
|
|
267
|
+
pageSize: pageSize,
|
|
268
|
+
});
|
|
269
|
+
paginator.setPaginator({
|
|
270
|
+
hasNext: data.page.has_next ? true : false,
|
|
271
|
+
nextId: data.page.next_id,
|
|
272
|
+
});
|
|
273
|
+
return data;
|
|
274
|
+
};
|
|
275
|
+
paginator.setCallback(callback);
|
|
276
|
+
return paginator;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* @param {Object} arg - Arg object.
|
|
281
|
+
* @param {string} [arg.q] - Search text for brand name
|
|
282
|
+
* @returns {Promise<BrandsByCompanyResponse>} - Success response
|
|
283
|
+
* @summary: Get brands by company
|
|
284
|
+
* @description: Get brands by company
|
|
285
|
+
*/
|
|
286
|
+
async getBrandsByCompany({ q } = {}) {
|
|
287
|
+
const { error } = ConfigurationValidator.getBrandsByCompany().validate(
|
|
250
288
|
{
|
|
251
|
-
|
|
289
|
+
q,
|
|
252
290
|
},
|
|
253
291
|
{ abortEarly: false, allowUnknown: true }
|
|
254
292
|
);
|
|
@@ -259,36 +297,37 @@ class Configuration {
|
|
|
259
297
|
// Showing warrnings if extra unknown parameters are found
|
|
260
298
|
const {
|
|
261
299
|
error: warrning,
|
|
262
|
-
} = ConfigurationValidator.
|
|
300
|
+
} = ConfigurationValidator.getBrandsByCompany().validate(
|
|
263
301
|
{
|
|
264
|
-
|
|
302
|
+
q,
|
|
265
303
|
},
|
|
266
304
|
{ abortEarly: false, allowUnknown: false }
|
|
267
305
|
);
|
|
268
306
|
if (warrning) {
|
|
269
307
|
Logger({
|
|
270
308
|
level: "WARN",
|
|
271
|
-
message: "Parameter Validation warrnings for
|
|
309
|
+
message: "Parameter Validation warrnings for getBrandsByCompany",
|
|
272
310
|
});
|
|
273
311
|
Logger({ level: "WARN", message: warrning });
|
|
274
312
|
}
|
|
275
313
|
|
|
276
314
|
const query_params = {};
|
|
315
|
+
query_params["q"] = q;
|
|
277
316
|
|
|
278
317
|
const xHeaders = {};
|
|
279
318
|
|
|
280
319
|
const response = await PlatformAPIClient.execute(
|
|
281
320
|
this.config,
|
|
282
|
-
"
|
|
283
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/
|
|
321
|
+
"get",
|
|
322
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/inventory/brands-by-companies`,
|
|
284
323
|
query_params,
|
|
285
|
-
|
|
324
|
+
undefined,
|
|
286
325
|
xHeaders
|
|
287
326
|
);
|
|
288
327
|
|
|
289
328
|
const {
|
|
290
329
|
error: res_error,
|
|
291
|
-
} = ConfigurationModel.
|
|
330
|
+
} = ConfigurationModel.BrandsByCompanyResponse().validate(response, {
|
|
292
331
|
abortEarly: false,
|
|
293
332
|
allowUnknown: false,
|
|
294
333
|
});
|
|
@@ -296,7 +335,7 @@ class Configuration {
|
|
|
296
335
|
if (res_error) {
|
|
297
336
|
Logger({
|
|
298
337
|
level: "WARN",
|
|
299
|
-
message: "Response Validation Warnnings for
|
|
338
|
+
message: "Response Validation Warnnings for getBrandsByCompany",
|
|
300
339
|
});
|
|
301
340
|
Logger({ level: "WARN", message: res_error });
|
|
302
341
|
}
|
|
@@ -306,15 +345,19 @@ class Configuration {
|
|
|
306
345
|
|
|
307
346
|
/**
|
|
308
347
|
* @param {Object} arg - Arg object.
|
|
309
|
-
* @param {number} arg.
|
|
310
|
-
* @
|
|
311
|
-
* @
|
|
312
|
-
* @
|
|
348
|
+
* @param {number} [arg.pageNo] - Current page no
|
|
349
|
+
* @param {number} [arg.pageSize] - Current request items count
|
|
350
|
+
* @param {CompanyByBrandsRequest} arg.body
|
|
351
|
+
* @returns {Promise<CompanyByBrandsResponse>} - Success response
|
|
352
|
+
* @summary: Get company by brand uids
|
|
353
|
+
* @description: Get company by brand uids
|
|
313
354
|
*/
|
|
314
|
-
async
|
|
315
|
-
const { error } = ConfigurationValidator.
|
|
355
|
+
async getCompanyByBrands({ body, pageNo, pageSize } = {}) {
|
|
356
|
+
const { error } = ConfigurationValidator.getCompanyByBrands().validate(
|
|
316
357
|
{
|
|
317
|
-
|
|
358
|
+
body,
|
|
359
|
+
pageNo,
|
|
360
|
+
pageSize,
|
|
318
361
|
},
|
|
319
362
|
{ abortEarly: false, allowUnknown: true }
|
|
320
363
|
);
|
|
@@ -325,36 +368,40 @@ class Configuration {
|
|
|
325
368
|
// Showing warrnings if extra unknown parameters are found
|
|
326
369
|
const {
|
|
327
370
|
error: warrning,
|
|
328
|
-
} = ConfigurationValidator.
|
|
371
|
+
} = ConfigurationValidator.getCompanyByBrands().validate(
|
|
329
372
|
{
|
|
330
|
-
|
|
373
|
+
body,
|
|
374
|
+
pageNo,
|
|
375
|
+
pageSize,
|
|
331
376
|
},
|
|
332
377
|
{ abortEarly: false, allowUnknown: false }
|
|
333
378
|
);
|
|
334
379
|
if (warrning) {
|
|
335
380
|
Logger({
|
|
336
381
|
level: "WARN",
|
|
337
|
-
message: "Parameter Validation warrnings for
|
|
382
|
+
message: "Parameter Validation warrnings for getCompanyByBrands",
|
|
338
383
|
});
|
|
339
384
|
Logger({ level: "WARN", message: warrning });
|
|
340
385
|
}
|
|
341
386
|
|
|
342
387
|
const query_params = {};
|
|
388
|
+
query_params["page_no"] = pageNo;
|
|
389
|
+
query_params["page_size"] = pageSize;
|
|
343
390
|
|
|
344
391
|
const xHeaders = {};
|
|
345
392
|
|
|
346
393
|
const response = await PlatformAPIClient.execute(
|
|
347
394
|
this.config,
|
|
348
|
-
"
|
|
349
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/
|
|
395
|
+
"post",
|
|
396
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/inventory/companies-by-brands`,
|
|
350
397
|
query_params,
|
|
351
|
-
|
|
398
|
+
body,
|
|
352
399
|
xHeaders
|
|
353
400
|
);
|
|
354
401
|
|
|
355
402
|
const {
|
|
356
403
|
error: res_error,
|
|
357
|
-
} = ConfigurationModel.
|
|
404
|
+
} = ConfigurationModel.CompanyByBrandsResponse().validate(response, {
|
|
358
405
|
abortEarly: false,
|
|
359
406
|
allowUnknown: false,
|
|
360
407
|
});
|
|
@@ -362,7 +409,7 @@ class Configuration {
|
|
|
362
409
|
if (res_error) {
|
|
363
410
|
Logger({
|
|
364
411
|
level: "WARN",
|
|
365
|
-
message: "Response Validation Warnnings for
|
|
412
|
+
message: "Response Validation Warnnings for getCompanyByBrands",
|
|
366
413
|
});
|
|
367
414
|
Logger({ level: "WARN", message: res_error });
|
|
368
415
|
}
|
|
@@ -372,18 +419,41 @@ class Configuration {
|
|
|
372
419
|
|
|
373
420
|
/**
|
|
374
421
|
* @param {Object} arg - Arg object.
|
|
375
|
-
* @param {number} [arg.pageNo] - Current page no
|
|
376
422
|
* @param {number} [arg.pageSize] - Current request items count
|
|
377
|
-
* @
|
|
378
|
-
* @summary: Get
|
|
379
|
-
* @description: Get
|
|
423
|
+
* @param {CompanyByBrandsRequest} arg.body
|
|
424
|
+
* @summary: Get company by brand uids
|
|
425
|
+
* @description: Get company by brand uids
|
|
380
426
|
*/
|
|
381
|
-
|
|
382
|
-
const
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
427
|
+
getCompanyByBrandsPaginator({ pageSize, body } = {}) {
|
|
428
|
+
const paginator = new Paginator();
|
|
429
|
+
const callback = async () => {
|
|
430
|
+
const pageId = paginator.nextId;
|
|
431
|
+
const pageNo = paginator.pageNo;
|
|
432
|
+
const pageType = "number";
|
|
433
|
+
const data = await this.getCompanyByBrands({
|
|
434
|
+
body: body,
|
|
435
|
+
pageNo: pageNo,
|
|
436
|
+
pageSize: pageSize,
|
|
437
|
+
});
|
|
438
|
+
paginator.setPaginator({
|
|
439
|
+
hasNext: data.page.has_next ? true : false,
|
|
440
|
+
nextId: data.page.next_id,
|
|
441
|
+
});
|
|
442
|
+
return data;
|
|
443
|
+
};
|
|
444
|
+
paginator.setCallback(callback);
|
|
445
|
+
return paginator;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* @param {Object} arg - Arg object.
|
|
450
|
+
* @returns {Promise<CurrenciesResponse>} - Success response
|
|
451
|
+
* @summary: Get all currencies
|
|
452
|
+
* @description: Get all currencies
|
|
453
|
+
*/
|
|
454
|
+
async getCurrencies({} = {}) {
|
|
455
|
+
const { error } = ConfigurationValidator.getCurrencies().validate(
|
|
456
|
+
{},
|
|
387
457
|
{ abortEarly: false, allowUnknown: true }
|
|
388
458
|
);
|
|
389
459
|
if (error) {
|
|
@@ -391,33 +461,26 @@ class Configuration {
|
|
|
391
461
|
}
|
|
392
462
|
|
|
393
463
|
// Showing warrnings if extra unknown parameters are found
|
|
394
|
-
const {
|
|
395
|
-
|
|
396
|
-
} = ConfigurationValidator.getAvailableOptIns().validate(
|
|
397
|
-
{
|
|
398
|
-
pageNo,
|
|
399
|
-
pageSize,
|
|
400
|
-
},
|
|
464
|
+
const { error: warrning } = ConfigurationValidator.getCurrencies().validate(
|
|
465
|
+
{},
|
|
401
466
|
{ abortEarly: false, allowUnknown: false }
|
|
402
467
|
);
|
|
403
468
|
if (warrning) {
|
|
404
469
|
Logger({
|
|
405
470
|
level: "WARN",
|
|
406
|
-
message: "Parameter Validation warrnings for
|
|
471
|
+
message: "Parameter Validation warrnings for getCurrencies",
|
|
407
472
|
});
|
|
408
473
|
Logger({ level: "WARN", message: warrning });
|
|
409
474
|
}
|
|
410
475
|
|
|
411
476
|
const query_params = {};
|
|
412
|
-
query_params["page_no"] = pageNo;
|
|
413
|
-
query_params["page_size"] = pageSize;
|
|
414
477
|
|
|
415
478
|
const xHeaders = {};
|
|
416
479
|
|
|
417
480
|
const response = await PlatformAPIClient.execute(
|
|
418
481
|
this.config,
|
|
419
482
|
"get",
|
|
420
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/
|
|
483
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/currencies`,
|
|
421
484
|
query_params,
|
|
422
485
|
undefined,
|
|
423
486
|
xHeaders
|
|
@@ -425,7 +488,7 @@ class Configuration {
|
|
|
425
488
|
|
|
426
489
|
const {
|
|
427
490
|
error: res_error,
|
|
428
|
-
} = ConfigurationModel.
|
|
491
|
+
} = ConfigurationModel.CurrenciesResponse().validate(response, {
|
|
429
492
|
abortEarly: false,
|
|
430
493
|
allowUnknown: false,
|
|
431
494
|
});
|
|
@@ -433,7 +496,7 @@ class Configuration {
|
|
|
433
496
|
if (res_error) {
|
|
434
497
|
Logger({
|
|
435
498
|
level: "WARN",
|
|
436
|
-
message: "Response Validation Warnnings for
|
|
499
|
+
message: "Response Validation Warnnings for getCurrencies",
|
|
437
500
|
});
|
|
438
501
|
Logger({ level: "WARN", message: res_error });
|
|
439
502
|
}
|
|
@@ -443,47 +506,15 @@ class Configuration {
|
|
|
443
506
|
|
|
444
507
|
/**
|
|
445
508
|
* @param {Object} arg - Arg object.
|
|
446
|
-
* @param {
|
|
447
|
-
* @
|
|
448
|
-
* @
|
|
449
|
-
|
|
450
|
-
getAvailableOptInsPaginator({ pageSize } = {}) {
|
|
451
|
-
const paginator = new Paginator();
|
|
452
|
-
const callback = async () => {
|
|
453
|
-
const pageId = paginator.nextId;
|
|
454
|
-
const pageNo = paginator.pageNo;
|
|
455
|
-
const pageType = "number";
|
|
456
|
-
const data = await this.getAvailableOptIns({
|
|
457
|
-
pageNo: pageNo,
|
|
458
|
-
pageSize: pageSize,
|
|
459
|
-
});
|
|
460
|
-
paginator.setPaginator({
|
|
461
|
-
hasNext: data.page.has_next ? true : false,
|
|
462
|
-
nextId: data.page.next_id,
|
|
463
|
-
});
|
|
464
|
-
return data;
|
|
465
|
-
};
|
|
466
|
-
paginator.setCallback(callback);
|
|
467
|
-
return paginator;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
/**
|
|
471
|
-
* @param {Object} arg - Arg object.
|
|
472
|
-
* @param {string} arg.level - Integration level
|
|
473
|
-
* @param {number} arg.uid - Integration level uid
|
|
474
|
-
* @param {number} [arg.pageNo] - Current page no
|
|
475
|
-
* @param {number} [arg.pageSize] - Current request items count
|
|
476
|
-
* @returns {Promise<GetIntegrationsOptInsResponse>} - Success response
|
|
477
|
-
* @summary: Get company/store level integration opt-ins
|
|
478
|
-
* @description: Get company/store level integration opt-ins
|
|
509
|
+
* @param {DomainSuggestionsRequest} arg.body
|
|
510
|
+
* @returns {Promise<DomainSuggestionsResponse>} - Success response
|
|
511
|
+
* @summary: Check domain availibility before linking to application
|
|
512
|
+
* @description: Check domain availibility before linking to application. Also sends domain suggestions with similar to queried domain. \ Custom domain search is currently powered by GoDaddy provider.
|
|
479
513
|
*/
|
|
480
|
-
async
|
|
481
|
-
const { error } = ConfigurationValidator.
|
|
514
|
+
async getDomainAvailibility({ body } = {}) {
|
|
515
|
+
const { error } = ConfigurationValidator.getDomainAvailibility().validate(
|
|
482
516
|
{
|
|
483
|
-
|
|
484
|
-
uid,
|
|
485
|
-
pageNo,
|
|
486
|
-
pageSize,
|
|
517
|
+
body,
|
|
487
518
|
},
|
|
488
519
|
{ abortEarly: false, allowUnknown: true }
|
|
489
520
|
);
|
|
@@ -494,41 +525,36 @@ class Configuration {
|
|
|
494
525
|
// Showing warrnings if extra unknown parameters are found
|
|
495
526
|
const {
|
|
496
527
|
error: warrning,
|
|
497
|
-
} = ConfigurationValidator.
|
|
528
|
+
} = ConfigurationValidator.getDomainAvailibility().validate(
|
|
498
529
|
{
|
|
499
|
-
|
|
500
|
-
uid,
|
|
501
|
-
pageNo,
|
|
502
|
-
pageSize,
|
|
530
|
+
body,
|
|
503
531
|
},
|
|
504
532
|
{ abortEarly: false, allowUnknown: false }
|
|
505
533
|
);
|
|
506
534
|
if (warrning) {
|
|
507
535
|
Logger({
|
|
508
536
|
level: "WARN",
|
|
509
|
-
message: "Parameter Validation warrnings for
|
|
537
|
+
message: "Parameter Validation warrnings for getDomainAvailibility",
|
|
510
538
|
});
|
|
511
539
|
Logger({ level: "WARN", message: warrning });
|
|
512
540
|
}
|
|
513
541
|
|
|
514
542
|
const query_params = {};
|
|
515
|
-
query_params["page_no"] = pageNo;
|
|
516
|
-
query_params["page_size"] = pageSize;
|
|
517
543
|
|
|
518
544
|
const xHeaders = {};
|
|
519
545
|
|
|
520
546
|
const response = await PlatformAPIClient.execute(
|
|
521
547
|
this.config,
|
|
522
|
-
"
|
|
523
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/
|
|
548
|
+
"post",
|
|
549
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/domain/suggestions`,
|
|
524
550
|
query_params,
|
|
525
|
-
|
|
551
|
+
body,
|
|
526
552
|
xHeaders
|
|
527
553
|
);
|
|
528
554
|
|
|
529
555
|
const {
|
|
530
556
|
error: res_error,
|
|
531
|
-
} = ConfigurationModel.
|
|
557
|
+
} = ConfigurationModel.DomainSuggestionsResponse().validate(response, {
|
|
532
558
|
abortEarly: false,
|
|
533
559
|
allowUnknown: false,
|
|
534
560
|
});
|
|
@@ -536,7 +562,7 @@ class Configuration {
|
|
|
536
562
|
if (res_error) {
|
|
537
563
|
Logger({
|
|
538
564
|
level: "WARN",
|
|
539
|
-
message: "Response Validation Warnnings for
|
|
565
|
+
message: "Response Validation Warnnings for getDomainAvailibility",
|
|
540
566
|
});
|
|
541
567
|
Logger({ level: "WARN", message: res_error });
|
|
542
568
|
}
|
|
@@ -546,53 +572,15 @@ class Configuration {
|
|
|
546
572
|
|
|
547
573
|
/**
|
|
548
574
|
* @param {Object} arg - Arg object.
|
|
549
|
-
* @param {
|
|
550
|
-
* @
|
|
551
|
-
* @
|
|
552
|
-
* @
|
|
553
|
-
* @description: Get company/store level integration opt-ins
|
|
554
|
-
*/
|
|
555
|
-
getSelectedOptInsPaginator({ level, uid, pageSize } = {}) {
|
|
556
|
-
const paginator = new Paginator();
|
|
557
|
-
const callback = async () => {
|
|
558
|
-
const pageId = paginator.nextId;
|
|
559
|
-
const pageNo = paginator.pageNo;
|
|
560
|
-
const pageType = "number";
|
|
561
|
-
const data = await this.getSelectedOptIns({
|
|
562
|
-
level: level,
|
|
563
|
-
uid: uid,
|
|
564
|
-
pageNo: pageNo,
|
|
565
|
-
pageSize: pageSize,
|
|
566
|
-
});
|
|
567
|
-
paginator.setPaginator({
|
|
568
|
-
hasNext: data.page.has_next ? true : false,
|
|
569
|
-
nextId: data.page.next_id,
|
|
570
|
-
});
|
|
571
|
-
return data;
|
|
572
|
-
};
|
|
573
|
-
paginator.setCallback(callback);
|
|
574
|
-
return paginator;
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
/**
|
|
578
|
-
* @param {Object} arg - Arg object.
|
|
579
|
-
* @param {string} arg.id - Integration id
|
|
580
|
-
* @param {string} arg.level - Integration level
|
|
581
|
-
* @param {boolean} [arg.opted] - Filter on opted stores
|
|
582
|
-
* @param {boolean} [arg.checkPermission] - Filter on if permissions are present
|
|
583
|
-
* @returns {Promise<IntegrationConfigResponse>} - Success response
|
|
584
|
-
* @summary: Get integration level config
|
|
585
|
-
* @description: Get integration/integration-opt-in level config
|
|
575
|
+
* @param {number} arg.id - Integration id
|
|
576
|
+
* @returns {Promise<Integration>} - Success response
|
|
577
|
+
* @summary: Get integration data
|
|
578
|
+
* @description: Get integration data
|
|
586
579
|
*/
|
|
587
|
-
async
|
|
588
|
-
const {
|
|
589
|
-
error,
|
|
590
|
-
} = ConfigurationValidator.getIntegrationLevelConfig().validate(
|
|
580
|
+
async getIntegrationById({ id } = {}) {
|
|
581
|
+
const { error } = ConfigurationValidator.getIntegrationById().validate(
|
|
591
582
|
{
|
|
592
583
|
id,
|
|
593
|
-
level,
|
|
594
|
-
opted,
|
|
595
|
-
checkPermission,
|
|
596
584
|
},
|
|
597
585
|
{ abortEarly: false, allowUnknown: true }
|
|
598
586
|
);
|
|
@@ -603,33 +591,28 @@ class Configuration {
|
|
|
603
591
|
// Showing warrnings if extra unknown parameters are found
|
|
604
592
|
const {
|
|
605
593
|
error: warrning,
|
|
606
|
-
} = ConfigurationValidator.
|
|
594
|
+
} = ConfigurationValidator.getIntegrationById().validate(
|
|
607
595
|
{
|
|
608
596
|
id,
|
|
609
|
-
level,
|
|
610
|
-
opted,
|
|
611
|
-
checkPermission,
|
|
612
597
|
},
|
|
613
598
|
{ abortEarly: false, allowUnknown: false }
|
|
614
599
|
);
|
|
615
600
|
if (warrning) {
|
|
616
601
|
Logger({
|
|
617
602
|
level: "WARN",
|
|
618
|
-
message: "Parameter Validation warrnings for
|
|
603
|
+
message: "Parameter Validation warrnings for getIntegrationById",
|
|
619
604
|
});
|
|
620
605
|
Logger({ level: "WARN", message: warrning });
|
|
621
606
|
}
|
|
622
607
|
|
|
623
608
|
const query_params = {};
|
|
624
|
-
query_params["opted"] = opted;
|
|
625
|
-
query_params["check_permission"] = checkPermission;
|
|
626
609
|
|
|
627
610
|
const xHeaders = {};
|
|
628
611
|
|
|
629
612
|
const response = await PlatformAPIClient.execute(
|
|
630
613
|
this.config,
|
|
631
614
|
"get",
|
|
632
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/integration
|
|
615
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/integration/${id}`,
|
|
633
616
|
query_params,
|
|
634
617
|
undefined,
|
|
635
618
|
xHeaders
|
|
@@ -637,7 +620,7 @@ class Configuration {
|
|
|
637
620
|
|
|
638
621
|
const {
|
|
639
622
|
error: res_error,
|
|
640
|
-
} = ConfigurationModel.
|
|
623
|
+
} = ConfigurationModel.Integration().validate(response, {
|
|
641
624
|
abortEarly: false,
|
|
642
625
|
allowUnknown: false,
|
|
643
626
|
});
|
|
@@ -645,7 +628,7 @@ class Configuration {
|
|
|
645
628
|
if (res_error) {
|
|
646
629
|
Logger({
|
|
647
630
|
level: "WARN",
|
|
648
|
-
message: "Response Validation Warnnings for
|
|
631
|
+
message: "Response Validation Warnnings for getIntegrationById",
|
|
649
632
|
});
|
|
650
633
|
Logger({ level: "WARN", message: res_error });
|
|
651
634
|
}
|
|
@@ -657,17 +640,17 @@ class Configuration {
|
|
|
657
640
|
* @param {Object} arg - Arg object.
|
|
658
641
|
* @param {string} arg.id - Integration id
|
|
659
642
|
* @param {string} arg.level - Integration level
|
|
660
|
-
* @param {
|
|
643
|
+
* @param {number} arg.uid - Integration level uid
|
|
661
644
|
* @returns {Promise<IntegrationLevel>} - Success response
|
|
662
|
-
* @summary:
|
|
663
|
-
* @description:
|
|
645
|
+
* @summary: Get level data for integration
|
|
646
|
+
* @description: Get level data for integration
|
|
664
647
|
*/
|
|
665
|
-
async
|
|
666
|
-
const { error } = ConfigurationValidator.
|
|
648
|
+
async getIntegrationByLevelId({ id, level, uid } = {}) {
|
|
649
|
+
const { error } = ConfigurationValidator.getIntegrationByLevelId().validate(
|
|
667
650
|
{
|
|
668
651
|
id,
|
|
669
652
|
level,
|
|
670
|
-
|
|
653
|
+
uid,
|
|
671
654
|
},
|
|
672
655
|
{ abortEarly: false, allowUnknown: true }
|
|
673
656
|
);
|
|
@@ -678,18 +661,18 @@ class Configuration {
|
|
|
678
661
|
// Showing warrnings if extra unknown parameters are found
|
|
679
662
|
const {
|
|
680
663
|
error: warrning,
|
|
681
|
-
} = ConfigurationValidator.
|
|
664
|
+
} = ConfigurationValidator.getIntegrationByLevelId().validate(
|
|
682
665
|
{
|
|
683
666
|
id,
|
|
684
667
|
level,
|
|
685
|
-
|
|
668
|
+
uid,
|
|
686
669
|
},
|
|
687
670
|
{ abortEarly: false, allowUnknown: false }
|
|
688
671
|
);
|
|
689
672
|
if (warrning) {
|
|
690
673
|
Logger({
|
|
691
674
|
level: "WARN",
|
|
692
|
-
message: "Parameter Validation warrnings for
|
|
675
|
+
message: "Parameter Validation warrnings for getIntegrationByLevelId",
|
|
693
676
|
});
|
|
694
677
|
Logger({ level: "WARN", message: warrning });
|
|
695
678
|
}
|
|
@@ -700,10 +683,10 @@ class Configuration {
|
|
|
700
683
|
|
|
701
684
|
const response = await PlatformAPIClient.execute(
|
|
702
685
|
this.config,
|
|
703
|
-
"
|
|
704
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}`,
|
|
686
|
+
"get",
|
|
687
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}/${uid}`,
|
|
705
688
|
query_params,
|
|
706
|
-
|
|
689
|
+
undefined,
|
|
707
690
|
xHeaders
|
|
708
691
|
);
|
|
709
692
|
|
|
@@ -717,7 +700,7 @@ class Configuration {
|
|
|
717
700
|
if (res_error) {
|
|
718
701
|
Logger({
|
|
719
702
|
level: "WARN",
|
|
720
|
-
message: "Response Validation Warnnings for
|
|
703
|
+
message: "Response Validation Warnnings for getIntegrationByLevelId",
|
|
721
704
|
});
|
|
722
705
|
Logger({ level: "WARN", message: res_error });
|
|
723
706
|
}
|
|
@@ -729,17 +712,21 @@ class Configuration {
|
|
|
729
712
|
* @param {Object} arg - Arg object.
|
|
730
713
|
* @param {string} arg.id - Integration id
|
|
731
714
|
* @param {string} arg.level - Integration level
|
|
732
|
-
* @param {
|
|
733
|
-
* @
|
|
734
|
-
* @
|
|
735
|
-
* @
|
|
715
|
+
* @param {boolean} [arg.opted] - Filter on opted stores
|
|
716
|
+
* @param {boolean} [arg.checkPermission] - Filter on if permissions are present
|
|
717
|
+
* @returns {Promise<IntegrationConfigResponse>} - Success response
|
|
718
|
+
* @summary: Get integration level config
|
|
719
|
+
* @description: Get integration/integration-opt-in level config
|
|
736
720
|
*/
|
|
737
|
-
async
|
|
738
|
-
const {
|
|
721
|
+
async getIntegrationLevelConfig({ id, level, opted, checkPermission } = {}) {
|
|
722
|
+
const {
|
|
723
|
+
error,
|
|
724
|
+
} = ConfigurationValidator.getIntegrationLevelConfig().validate(
|
|
739
725
|
{
|
|
740
726
|
id,
|
|
741
727
|
level,
|
|
742
|
-
|
|
728
|
+
opted,
|
|
729
|
+
checkPermission,
|
|
743
730
|
},
|
|
744
731
|
{ abortEarly: false, allowUnknown: true }
|
|
745
732
|
);
|
|
@@ -750,30 +737,33 @@ class Configuration {
|
|
|
750
737
|
// Showing warrnings if extra unknown parameters are found
|
|
751
738
|
const {
|
|
752
739
|
error: warrning,
|
|
753
|
-
} = ConfigurationValidator.
|
|
740
|
+
} = ConfigurationValidator.getIntegrationLevelConfig().validate(
|
|
754
741
|
{
|
|
755
742
|
id,
|
|
756
743
|
level,
|
|
757
|
-
|
|
744
|
+
opted,
|
|
745
|
+
checkPermission,
|
|
758
746
|
},
|
|
759
747
|
{ abortEarly: false, allowUnknown: false }
|
|
760
748
|
);
|
|
761
749
|
if (warrning) {
|
|
762
750
|
Logger({
|
|
763
751
|
level: "WARN",
|
|
764
|
-
message: "Parameter Validation warrnings for
|
|
752
|
+
message: "Parameter Validation warrnings for getIntegrationLevelConfig",
|
|
765
753
|
});
|
|
766
754
|
Logger({ level: "WARN", message: warrning });
|
|
767
755
|
}
|
|
768
756
|
|
|
769
757
|
const query_params = {};
|
|
758
|
+
query_params["opted"] = opted;
|
|
759
|
+
query_params["check_permission"] = checkPermission;
|
|
770
760
|
|
|
771
761
|
const xHeaders = {};
|
|
772
762
|
|
|
773
763
|
const response = await PlatformAPIClient.execute(
|
|
774
764
|
this.config,
|
|
775
765
|
"get",
|
|
776
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}
|
|
766
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}`,
|
|
777
767
|
query_params,
|
|
778
768
|
undefined,
|
|
779
769
|
xHeaders
|
|
@@ -781,7 +771,7 @@ class Configuration {
|
|
|
781
771
|
|
|
782
772
|
const {
|
|
783
773
|
error: res_error,
|
|
784
|
-
} = ConfigurationModel.
|
|
774
|
+
} = ConfigurationModel.IntegrationConfigResponse().validate(response, {
|
|
785
775
|
abortEarly: false,
|
|
786
776
|
allowUnknown: false,
|
|
787
777
|
});
|
|
@@ -789,7 +779,7 @@ class Configuration {
|
|
|
789
779
|
if (res_error) {
|
|
790
780
|
Logger({
|
|
791
781
|
level: "WARN",
|
|
792
|
-
message: "Response Validation Warnnings for
|
|
782
|
+
message: "Response Validation Warnnings for getIntegrationLevelConfig",
|
|
793
783
|
});
|
|
794
784
|
Logger({ level: "WARN", message: res_error });
|
|
795
785
|
}
|
|
@@ -802,20 +792,18 @@ class Configuration {
|
|
|
802
792
|
* @param {string} arg.id - Integration id
|
|
803
793
|
* @param {string} arg.level - Integration level
|
|
804
794
|
* @param {number} arg.uid - Integration level uid
|
|
805
|
-
* @
|
|
806
|
-
* @
|
|
807
|
-
* @
|
|
808
|
-
* @description: Update a store level opt-in for integration
|
|
795
|
+
* @returns {Promise<OptedStoreIntegration>} - Success response
|
|
796
|
+
* @summary: Check store has active integration
|
|
797
|
+
* @description: API checks if a store is already opted in any other integrations
|
|
809
798
|
*/
|
|
810
|
-
async
|
|
799
|
+
async getLevelActiveIntegrations({ id, level, uid } = {}) {
|
|
811
800
|
const {
|
|
812
801
|
error,
|
|
813
|
-
} = ConfigurationValidator.
|
|
802
|
+
} = ConfigurationValidator.getLevelActiveIntegrations().validate(
|
|
814
803
|
{
|
|
815
804
|
id,
|
|
816
805
|
level,
|
|
817
806
|
uid,
|
|
818
|
-
body,
|
|
819
807
|
},
|
|
820
808
|
{ abortEarly: false, allowUnknown: true }
|
|
821
809
|
);
|
|
@@ -826,19 +814,19 @@ class Configuration {
|
|
|
826
814
|
// Showing warrnings if extra unknown parameters are found
|
|
827
815
|
const {
|
|
828
816
|
error: warrning,
|
|
829
|
-
} = ConfigurationValidator.
|
|
817
|
+
} = ConfigurationValidator.getLevelActiveIntegrations().validate(
|
|
830
818
|
{
|
|
831
819
|
id,
|
|
832
820
|
level,
|
|
833
821
|
uid,
|
|
834
|
-
body,
|
|
835
822
|
},
|
|
836
823
|
{ abortEarly: false, allowUnknown: false }
|
|
837
824
|
);
|
|
838
825
|
if (warrning) {
|
|
839
826
|
Logger({
|
|
840
827
|
level: "WARN",
|
|
841
|
-
message:
|
|
828
|
+
message:
|
|
829
|
+
"Parameter Validation warrnings for getLevelActiveIntegrations",
|
|
842
830
|
});
|
|
843
831
|
Logger({ level: "WARN", message: warrning });
|
|
844
832
|
}
|
|
@@ -849,16 +837,16 @@ class Configuration {
|
|
|
849
837
|
|
|
850
838
|
const response = await PlatformAPIClient.execute(
|
|
851
839
|
this.config,
|
|
852
|
-
"
|
|
853
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}/${uid}`,
|
|
840
|
+
"get",
|
|
841
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/check/configuration/${id}/${level}/${uid}`,
|
|
854
842
|
query_params,
|
|
855
|
-
|
|
843
|
+
undefined,
|
|
856
844
|
xHeaders
|
|
857
845
|
);
|
|
858
846
|
|
|
859
847
|
const {
|
|
860
848
|
error: res_error,
|
|
861
|
-
} = ConfigurationModel.
|
|
849
|
+
} = ConfigurationModel.OptedStoreIntegration().validate(response, {
|
|
862
850
|
abortEarly: false,
|
|
863
851
|
allowUnknown: false,
|
|
864
852
|
});
|
|
@@ -866,7 +854,7 @@ class Configuration {
|
|
|
866
854
|
if (res_error) {
|
|
867
855
|
Logger({
|
|
868
856
|
level: "WARN",
|
|
869
|
-
message: "Response Validation Warnnings for
|
|
857
|
+
message: "Response Validation Warnnings for getLevelActiveIntegrations",
|
|
870
858
|
});
|
|
871
859
|
Logger({ level: "WARN", message: res_error });
|
|
872
860
|
}
|
|
@@ -876,21 +864,17 @@ class Configuration {
|
|
|
876
864
|
|
|
877
865
|
/**
|
|
878
866
|
* @param {Object} arg - Arg object.
|
|
879
|
-
* @param {string} arg.id -
|
|
880
|
-
* @
|
|
881
|
-
* @
|
|
882
|
-
* @
|
|
883
|
-
* @summary: Check store has active integration
|
|
884
|
-
* @description: API checks if a store is already opted in any other integrations
|
|
867
|
+
* @param {string} arg.id - Application Id
|
|
868
|
+
* @returns {Promise<OptedApplicationResponse>} - Success response
|
|
869
|
+
* @summary: Get other seller applications
|
|
870
|
+
* @description: Get other seller application
|
|
885
871
|
*/
|
|
886
|
-
async
|
|
872
|
+
async getOtherSellerApplicationById({ id } = {}) {
|
|
887
873
|
const {
|
|
888
874
|
error,
|
|
889
|
-
} = ConfigurationValidator.
|
|
875
|
+
} = ConfigurationValidator.getOtherSellerApplicationById().validate(
|
|
890
876
|
{
|
|
891
877
|
id,
|
|
892
|
-
level,
|
|
893
|
-
uid,
|
|
894
878
|
},
|
|
895
879
|
{ abortEarly: false, allowUnknown: true }
|
|
896
880
|
);
|
|
@@ -901,11 +885,9 @@ class Configuration {
|
|
|
901
885
|
// Showing warrnings if extra unknown parameters are found
|
|
902
886
|
const {
|
|
903
887
|
error: warrning,
|
|
904
|
-
} = ConfigurationValidator.
|
|
888
|
+
} = ConfigurationValidator.getOtherSellerApplicationById().validate(
|
|
905
889
|
{
|
|
906
890
|
id,
|
|
907
|
-
level,
|
|
908
|
-
uid,
|
|
909
891
|
},
|
|
910
892
|
{ abortEarly: false, allowUnknown: false }
|
|
911
893
|
);
|
|
@@ -913,7 +895,7 @@ class Configuration {
|
|
|
913
895
|
Logger({
|
|
914
896
|
level: "WARN",
|
|
915
897
|
message:
|
|
916
|
-
"Parameter Validation warrnings for
|
|
898
|
+
"Parameter Validation warrnings for getOtherSellerApplicationById",
|
|
917
899
|
});
|
|
918
900
|
Logger({ level: "WARN", message: warrning });
|
|
919
901
|
}
|
|
@@ -925,7 +907,7 @@ class Configuration {
|
|
|
925
907
|
const response = await PlatformAPIClient.execute(
|
|
926
908
|
this.config,
|
|
927
909
|
"get",
|
|
928
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/
|
|
910
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications/${id}`,
|
|
929
911
|
query_params,
|
|
930
912
|
undefined,
|
|
931
913
|
xHeaders
|
|
@@ -933,7 +915,7 @@ class Configuration {
|
|
|
933
915
|
|
|
934
916
|
const {
|
|
935
917
|
error: res_error,
|
|
936
|
-
} = ConfigurationModel.
|
|
918
|
+
} = ConfigurationModel.OptedApplicationResponse().validate(response, {
|
|
937
919
|
abortEarly: false,
|
|
938
920
|
allowUnknown: false,
|
|
939
921
|
});
|
|
@@ -941,7 +923,8 @@ class Configuration {
|
|
|
941
923
|
if (res_error) {
|
|
942
924
|
Logger({
|
|
943
925
|
level: "WARN",
|
|
944
|
-
message:
|
|
926
|
+
message:
|
|
927
|
+
"Response Validation Warnnings for getOtherSellerApplicationById",
|
|
945
928
|
});
|
|
946
929
|
Logger({ level: "WARN", message: res_error });
|
|
947
930
|
}
|
|
@@ -951,15 +934,19 @@ class Configuration {
|
|
|
951
934
|
|
|
952
935
|
/**
|
|
953
936
|
* @param {Object} arg - Arg object.
|
|
954
|
-
* @param {
|
|
955
|
-
* @
|
|
956
|
-
* @
|
|
957
|
-
* @
|
|
937
|
+
* @param {number} [arg.pageNo] - Current page no
|
|
938
|
+
* @param {number} [arg.pageSize] - Current request items count
|
|
939
|
+
* @returns {Promise<OtherSellerApplications>} - Success response
|
|
940
|
+
* @summary: Get other seller applications
|
|
941
|
+
* @description: Get other seller applications who has opted current company as inventory
|
|
958
942
|
*/
|
|
959
|
-
async
|
|
960
|
-
const {
|
|
943
|
+
async getOtherSellerApplications({ pageNo, pageSize } = {}) {
|
|
944
|
+
const {
|
|
945
|
+
error,
|
|
946
|
+
} = ConfigurationValidator.getOtherSellerApplications().validate(
|
|
961
947
|
{
|
|
962
|
-
|
|
948
|
+
pageNo,
|
|
949
|
+
pageSize,
|
|
963
950
|
},
|
|
964
951
|
{ abortEarly: false, allowUnknown: true }
|
|
965
952
|
);
|
|
@@ -970,29 +957,32 @@ class Configuration {
|
|
|
970
957
|
// Showing warrnings if extra unknown parameters are found
|
|
971
958
|
const {
|
|
972
959
|
error: warrning,
|
|
973
|
-
} = ConfigurationValidator.
|
|
960
|
+
} = ConfigurationValidator.getOtherSellerApplications().validate(
|
|
974
961
|
{
|
|
975
|
-
|
|
962
|
+
pageNo,
|
|
963
|
+
pageSize,
|
|
976
964
|
},
|
|
977
965
|
{ abortEarly: false, allowUnknown: false }
|
|
978
966
|
);
|
|
979
967
|
if (warrning) {
|
|
980
968
|
Logger({
|
|
981
969
|
level: "WARN",
|
|
982
|
-
message:
|
|
970
|
+
message:
|
|
971
|
+
"Parameter Validation warrnings for getOtherSellerApplications",
|
|
983
972
|
});
|
|
984
973
|
Logger({ level: "WARN", message: warrning });
|
|
985
974
|
}
|
|
986
975
|
|
|
987
976
|
const query_params = {};
|
|
988
|
-
query_params["
|
|
977
|
+
query_params["page_no"] = pageNo;
|
|
978
|
+
query_params["page_size"] = pageSize;
|
|
989
979
|
|
|
990
980
|
const xHeaders = {};
|
|
991
981
|
|
|
992
982
|
const response = await PlatformAPIClient.execute(
|
|
993
983
|
this.config,
|
|
994
984
|
"get",
|
|
995
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/
|
|
985
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications/`,
|
|
996
986
|
query_params,
|
|
997
987
|
undefined,
|
|
998
988
|
xHeaders
|
|
@@ -1000,7 +990,7 @@ class Configuration {
|
|
|
1000
990
|
|
|
1001
991
|
const {
|
|
1002
992
|
error: res_error,
|
|
1003
|
-
} = ConfigurationModel.
|
|
993
|
+
} = ConfigurationModel.OtherSellerApplications().validate(response, {
|
|
1004
994
|
abortEarly: false,
|
|
1005
995
|
allowUnknown: false,
|
|
1006
996
|
});
|
|
@@ -1008,7 +998,7 @@ class Configuration {
|
|
|
1008
998
|
if (res_error) {
|
|
1009
999
|
Logger({
|
|
1010
1000
|
level: "WARN",
|
|
1011
|
-
message: "Response Validation Warnnings for
|
|
1001
|
+
message: "Response Validation Warnnings for getOtherSellerApplications",
|
|
1012
1002
|
});
|
|
1013
1003
|
Logger({ level: "WARN", message: res_error });
|
|
1014
1004
|
}
|
|
@@ -1018,17 +1008,45 @@ class Configuration {
|
|
|
1018
1008
|
|
|
1019
1009
|
/**
|
|
1020
1010
|
* @param {Object} arg - Arg object.
|
|
1011
|
+
* @param {number} [arg.pageSize] - Current request items count
|
|
1012
|
+
* @summary: Get other seller applications
|
|
1013
|
+
* @description: Get other seller applications who has opted current company as inventory
|
|
1014
|
+
*/
|
|
1015
|
+
getOtherSellerApplicationsPaginator({ pageSize } = {}) {
|
|
1016
|
+
const paginator = new Paginator();
|
|
1017
|
+
const callback = async () => {
|
|
1018
|
+
const pageId = paginator.nextId;
|
|
1019
|
+
const pageNo = paginator.pageNo;
|
|
1020
|
+
const pageType = "number";
|
|
1021
|
+
const data = await this.getOtherSellerApplications({
|
|
1022
|
+
pageNo: pageNo,
|
|
1023
|
+
pageSize: pageSize,
|
|
1024
|
+
});
|
|
1025
|
+
paginator.setPaginator({
|
|
1026
|
+
hasNext: data.page.has_next ? true : false,
|
|
1027
|
+
nextId: data.page.next_id,
|
|
1028
|
+
});
|
|
1029
|
+
return data;
|
|
1030
|
+
};
|
|
1031
|
+
paginator.setCallback(callback);
|
|
1032
|
+
return paginator;
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
/**
|
|
1036
|
+
* @param {Object} arg - Arg object.
|
|
1037
|
+
* @param {string} arg.level - Integration level
|
|
1038
|
+
* @param {number} arg.uid - Integration level uid
|
|
1021
1039
|
* @param {number} [arg.pageNo] - Current page no
|
|
1022
1040
|
* @param {number} [arg.pageSize] - Current request items count
|
|
1023
|
-
* @
|
|
1024
|
-
* @
|
|
1025
|
-
* @
|
|
1026
|
-
* @description: Get company by brand uids
|
|
1041
|
+
* @returns {Promise<GetIntegrationsOptInsResponse>} - Success response
|
|
1042
|
+
* @summary: Get company/store level integration opt-ins
|
|
1043
|
+
* @description: Get company/store level integration opt-ins
|
|
1027
1044
|
*/
|
|
1028
|
-
async
|
|
1029
|
-
const { error } = ConfigurationValidator.
|
|
1045
|
+
async getSelectedOptIns({ level, uid, pageNo, pageSize } = {}) {
|
|
1046
|
+
const { error } = ConfigurationValidator.getSelectedOptIns().validate(
|
|
1030
1047
|
{
|
|
1031
|
-
|
|
1048
|
+
level,
|
|
1049
|
+
uid,
|
|
1032
1050
|
pageNo,
|
|
1033
1051
|
pageSize,
|
|
1034
1052
|
},
|
|
@@ -1041,9 +1059,10 @@ class Configuration {
|
|
|
1041
1059
|
// Showing warrnings if extra unknown parameters are found
|
|
1042
1060
|
const {
|
|
1043
1061
|
error: warrning,
|
|
1044
|
-
} = ConfigurationValidator.
|
|
1062
|
+
} = ConfigurationValidator.getSelectedOptIns().validate(
|
|
1045
1063
|
{
|
|
1046
|
-
|
|
1064
|
+
level,
|
|
1065
|
+
uid,
|
|
1047
1066
|
pageNo,
|
|
1048
1067
|
pageSize,
|
|
1049
1068
|
},
|
|
@@ -1052,7 +1071,7 @@ class Configuration {
|
|
|
1052
1071
|
if (warrning) {
|
|
1053
1072
|
Logger({
|
|
1054
1073
|
level: "WARN",
|
|
1055
|
-
message: "Parameter Validation warrnings for
|
|
1074
|
+
message: "Parameter Validation warrnings for getSelectedOptIns",
|
|
1056
1075
|
});
|
|
1057
1076
|
Logger({ level: "WARN", message: warrning });
|
|
1058
1077
|
}
|
|
@@ -1065,16 +1084,16 @@ class Configuration {
|
|
|
1065
1084
|
|
|
1066
1085
|
const response = await PlatformAPIClient.execute(
|
|
1067
1086
|
this.config,
|
|
1068
|
-
"
|
|
1069
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/
|
|
1087
|
+
"get",
|
|
1088
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/selected/${level}/${uid}`,
|
|
1070
1089
|
query_params,
|
|
1071
|
-
|
|
1090
|
+
undefined,
|
|
1072
1091
|
xHeaders
|
|
1073
1092
|
);
|
|
1074
1093
|
|
|
1075
1094
|
const {
|
|
1076
1095
|
error: res_error,
|
|
1077
|
-
} = ConfigurationModel.
|
|
1096
|
+
} = ConfigurationModel.GetIntegrationsOptInsResponse().validate(response, {
|
|
1078
1097
|
abortEarly: false,
|
|
1079
1098
|
allowUnknown: false,
|
|
1080
1099
|
});
|
|
@@ -1082,7 +1101,7 @@ class Configuration {
|
|
|
1082
1101
|
if (res_error) {
|
|
1083
1102
|
Logger({
|
|
1084
1103
|
level: "WARN",
|
|
1085
|
-
message: "Response Validation Warnnings for
|
|
1104
|
+
message: "Response Validation Warnnings for getSelectedOptIns",
|
|
1086
1105
|
});
|
|
1087
1106
|
Logger({ level: "WARN", message: res_error });
|
|
1088
1107
|
}
|
|
@@ -1092,19 +1111,21 @@ class Configuration {
|
|
|
1092
1111
|
|
|
1093
1112
|
/**
|
|
1094
1113
|
* @param {Object} arg - Arg object.
|
|
1114
|
+
* @param {string} arg.level - Integration level
|
|
1115
|
+
* @param {number} arg.uid - Integration level uid
|
|
1095
1116
|
* @param {number} [arg.pageSize] - Current request items count
|
|
1096
|
-
* @
|
|
1097
|
-
* @
|
|
1098
|
-
* @description: Get company by brand uids
|
|
1117
|
+
* @summary: Get company/store level integration opt-ins
|
|
1118
|
+
* @description: Get company/store level integration opt-ins
|
|
1099
1119
|
*/
|
|
1100
|
-
|
|
1120
|
+
getSelectedOptInsPaginator({ level, uid, pageSize } = {}) {
|
|
1101
1121
|
const paginator = new Paginator();
|
|
1102
1122
|
const callback = async () => {
|
|
1103
1123
|
const pageId = paginator.nextId;
|
|
1104
1124
|
const pageNo = paginator.pageNo;
|
|
1105
1125
|
const pageType = "number";
|
|
1106
|
-
const data = await this.
|
|
1107
|
-
|
|
1126
|
+
const data = await this.getSelectedOptIns({
|
|
1127
|
+
level: level,
|
|
1128
|
+
uid: uid,
|
|
1108
1129
|
pageNo: pageNo,
|
|
1109
1130
|
pageSize: pageSize,
|
|
1110
1131
|
});
|
|
@@ -1222,19 +1243,17 @@ class Configuration {
|
|
|
1222
1243
|
|
|
1223
1244
|
/**
|
|
1224
1245
|
* @param {Object} arg - Arg object.
|
|
1225
|
-
* @param {
|
|
1226
|
-
* @param {
|
|
1227
|
-
* @returns {Promise<
|
|
1228
|
-
* @summary:
|
|
1229
|
-
* @description:
|
|
1246
|
+
* @param {string} arg.id - Application Id
|
|
1247
|
+
* @param {OptOutInventory} arg.body
|
|
1248
|
+
* @returns {Promise<SuccessMessageResponse>} - Success response
|
|
1249
|
+
* @summary: Opt out company or store from other seller application
|
|
1250
|
+
* @description: Opt out company or store from other seller application
|
|
1230
1251
|
*/
|
|
1231
|
-
async
|
|
1232
|
-
const {
|
|
1233
|
-
error,
|
|
1234
|
-
} = ConfigurationValidator.getOtherSellerApplications().validate(
|
|
1252
|
+
async optOutFromApplication({ id, body } = {}) {
|
|
1253
|
+
const { error } = ConfigurationValidator.optOutFromApplication().validate(
|
|
1235
1254
|
{
|
|
1236
|
-
|
|
1237
|
-
|
|
1255
|
+
id,
|
|
1256
|
+
body,
|
|
1238
1257
|
},
|
|
1239
1258
|
{ abortEarly: false, allowUnknown: true }
|
|
1240
1259
|
);
|
|
@@ -1245,40 +1264,37 @@ class Configuration {
|
|
|
1245
1264
|
// Showing warrnings if extra unknown parameters are found
|
|
1246
1265
|
const {
|
|
1247
1266
|
error: warrning,
|
|
1248
|
-
} = ConfigurationValidator.
|
|
1267
|
+
} = ConfigurationValidator.optOutFromApplication().validate(
|
|
1249
1268
|
{
|
|
1250
|
-
|
|
1251
|
-
|
|
1269
|
+
id,
|
|
1270
|
+
body,
|
|
1252
1271
|
},
|
|
1253
1272
|
{ abortEarly: false, allowUnknown: false }
|
|
1254
1273
|
);
|
|
1255
1274
|
if (warrning) {
|
|
1256
1275
|
Logger({
|
|
1257
1276
|
level: "WARN",
|
|
1258
|
-
message:
|
|
1259
|
-
"Parameter Validation warrnings for getOtherSellerApplications",
|
|
1277
|
+
message: "Parameter Validation warrnings for optOutFromApplication",
|
|
1260
1278
|
});
|
|
1261
1279
|
Logger({ level: "WARN", message: warrning });
|
|
1262
1280
|
}
|
|
1263
1281
|
|
|
1264
1282
|
const query_params = {};
|
|
1265
|
-
query_params["page_no"] = pageNo;
|
|
1266
|
-
query_params["page_size"] = pageSize;
|
|
1267
1283
|
|
|
1268
1284
|
const xHeaders = {};
|
|
1269
1285
|
|
|
1270
1286
|
const response = await PlatformAPIClient.execute(
|
|
1271
1287
|
this.config,
|
|
1272
|
-
"
|
|
1273
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications
|
|
1288
|
+
"put",
|
|
1289
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/other-seller-applications/${id}/opt_out`,
|
|
1274
1290
|
query_params,
|
|
1275
|
-
|
|
1291
|
+
body,
|
|
1276
1292
|
xHeaders
|
|
1277
1293
|
);
|
|
1278
1294
|
|
|
1279
1295
|
const {
|
|
1280
1296
|
error: res_error,
|
|
1281
|
-
} = ConfigurationModel.
|
|
1297
|
+
} = ConfigurationModel.SuccessMessageResponse().validate(response, {
|
|
1282
1298
|
abortEarly: false,
|
|
1283
1299
|
allowUnknown: false,
|
|
1284
1300
|
});
|
|
@@ -1286,7 +1302,7 @@ class Configuration {
|
|
|
1286
1302
|
if (res_error) {
|
|
1287
1303
|
Logger({
|
|
1288
1304
|
level: "WARN",
|
|
1289
|
-
message: "Response Validation Warnnings for
|
|
1305
|
+
message: "Response Validation Warnnings for optOutFromApplication",
|
|
1290
1306
|
});
|
|
1291
1307
|
Logger({ level: "WARN", message: res_error });
|
|
1292
1308
|
}
|
|
@@ -1296,43 +1312,19 @@ class Configuration {
|
|
|
1296
1312
|
|
|
1297
1313
|
/**
|
|
1298
1314
|
* @param {Object} arg - Arg object.
|
|
1299
|
-
* @param {
|
|
1300
|
-
* @
|
|
1301
|
-
* @
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
const callback = async () => {
|
|
1306
|
-
const pageId = paginator.nextId;
|
|
1307
|
-
const pageNo = paginator.pageNo;
|
|
1308
|
-
const pageType = "number";
|
|
1309
|
-
const data = await this.getOtherSellerApplications({
|
|
1310
|
-
pageNo: pageNo,
|
|
1311
|
-
pageSize: pageSize,
|
|
1312
|
-
});
|
|
1313
|
-
paginator.setPaginator({
|
|
1314
|
-
hasNext: data.page.has_next ? true : false,
|
|
1315
|
-
nextId: data.page.next_id,
|
|
1316
|
-
});
|
|
1317
|
-
return data;
|
|
1318
|
-
};
|
|
1319
|
-
paginator.setCallback(callback);
|
|
1320
|
-
return paginator;
|
|
1321
|
-
}
|
|
1322
|
-
|
|
1323
|
-
/**
|
|
1324
|
-
* @param {Object} arg - Arg object.
|
|
1325
|
-
* @param {string} arg.id - Application Id
|
|
1326
|
-
* @returns {Promise<OptedApplicationResponse>} - Success response
|
|
1327
|
-
* @summary: Get other seller applications
|
|
1328
|
-
* @description: Get other seller application
|
|
1315
|
+
* @param {string} arg.id - Integration id
|
|
1316
|
+
* @param {string} arg.level - Integration level
|
|
1317
|
+
* @param {UpdateIntegrationLevelRequest} arg.body
|
|
1318
|
+
* @returns {Promise<IntegrationLevel>} - Success response
|
|
1319
|
+
* @summary: Update a store level opt-in for integration
|
|
1320
|
+
* @description: Update a store level opt-in for integration
|
|
1329
1321
|
*/
|
|
1330
|
-
async
|
|
1331
|
-
const {
|
|
1332
|
-
error,
|
|
1333
|
-
} = ConfigurationValidator.getOtherSellerApplicationById().validate(
|
|
1322
|
+
async updateLevelIntegration({ id, level, body } = {}) {
|
|
1323
|
+
const { error } = ConfigurationValidator.updateLevelIntegration().validate(
|
|
1334
1324
|
{
|
|
1335
1325
|
id,
|
|
1326
|
+
level,
|
|
1327
|
+
body,
|
|
1336
1328
|
},
|
|
1337
1329
|
{ abortEarly: false, allowUnknown: true }
|
|
1338
1330
|
);
|
|
@@ -1343,17 +1335,18 @@ class Configuration {
|
|
|
1343
1335
|
// Showing warrnings if extra unknown parameters are found
|
|
1344
1336
|
const {
|
|
1345
1337
|
error: warrning,
|
|
1346
|
-
} = ConfigurationValidator.
|
|
1338
|
+
} = ConfigurationValidator.updateLevelIntegration().validate(
|
|
1347
1339
|
{
|
|
1348
1340
|
id,
|
|
1341
|
+
level,
|
|
1342
|
+
body,
|
|
1349
1343
|
},
|
|
1350
1344
|
{ abortEarly: false, allowUnknown: false }
|
|
1351
1345
|
);
|
|
1352
1346
|
if (warrning) {
|
|
1353
1347
|
Logger({
|
|
1354
1348
|
level: "WARN",
|
|
1355
|
-
message:
|
|
1356
|
-
"Parameter Validation warrnings for getOtherSellerApplicationById",
|
|
1349
|
+
message: "Parameter Validation warrnings for updateLevelIntegration",
|
|
1357
1350
|
});
|
|
1358
1351
|
Logger({ level: "WARN", message: warrning });
|
|
1359
1352
|
}
|
|
@@ -1364,16 +1357,16 @@ class Configuration {
|
|
|
1364
1357
|
|
|
1365
1358
|
const response = await PlatformAPIClient.execute(
|
|
1366
1359
|
this.config,
|
|
1367
|
-
"
|
|
1368
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/
|
|
1360
|
+
"put",
|
|
1361
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}`,
|
|
1369
1362
|
query_params,
|
|
1370
|
-
|
|
1363
|
+
body,
|
|
1371
1364
|
xHeaders
|
|
1372
1365
|
);
|
|
1373
1366
|
|
|
1374
1367
|
const {
|
|
1375
1368
|
error: res_error,
|
|
1376
|
-
} = ConfigurationModel.
|
|
1369
|
+
} = ConfigurationModel.IntegrationLevel().validate(response, {
|
|
1377
1370
|
abortEarly: false,
|
|
1378
1371
|
allowUnknown: false,
|
|
1379
1372
|
});
|
|
@@ -1381,8 +1374,7 @@ class Configuration {
|
|
|
1381
1374
|
if (res_error) {
|
|
1382
1375
|
Logger({
|
|
1383
1376
|
level: "WARN",
|
|
1384
|
-
message:
|
|
1385
|
-
"Response Validation Warnnings for getOtherSellerApplicationById",
|
|
1377
|
+
message: "Response Validation Warnnings for updateLevelIntegration",
|
|
1386
1378
|
});
|
|
1387
1379
|
Logger({ level: "WARN", message: res_error });
|
|
1388
1380
|
}
|
|
@@ -1392,16 +1384,22 @@ class Configuration {
|
|
|
1392
1384
|
|
|
1393
1385
|
/**
|
|
1394
1386
|
* @param {Object} arg - Arg object.
|
|
1395
|
-
* @param {string} arg.id -
|
|
1396
|
-
* @param {
|
|
1397
|
-
* @
|
|
1398
|
-
* @
|
|
1399
|
-
* @
|
|
1387
|
+
* @param {string} arg.id - Integration id
|
|
1388
|
+
* @param {string} arg.level - Integration level
|
|
1389
|
+
* @param {number} arg.uid - Integration level uid
|
|
1390
|
+
* @param {IntegrationLevel} arg.body
|
|
1391
|
+
* @returns {Promise<IntegrationLevel>} - Success response
|
|
1392
|
+
* @summary: Update a store level opt-in for integration
|
|
1393
|
+
* @description: Update a store level opt-in for integration
|
|
1400
1394
|
*/
|
|
1401
|
-
async
|
|
1402
|
-
const {
|
|
1395
|
+
async updateLevelUidIntegration({ id, level, uid, body } = {}) {
|
|
1396
|
+
const {
|
|
1397
|
+
error,
|
|
1398
|
+
} = ConfigurationValidator.updateLevelUidIntegration().validate(
|
|
1403
1399
|
{
|
|
1404
1400
|
id,
|
|
1401
|
+
level,
|
|
1402
|
+
uid,
|
|
1405
1403
|
body,
|
|
1406
1404
|
},
|
|
1407
1405
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -1413,9 +1411,11 @@ class Configuration {
|
|
|
1413
1411
|
// Showing warrnings if extra unknown parameters are found
|
|
1414
1412
|
const {
|
|
1415
1413
|
error: warrning,
|
|
1416
|
-
} = ConfigurationValidator.
|
|
1414
|
+
} = ConfigurationValidator.updateLevelUidIntegration().validate(
|
|
1417
1415
|
{
|
|
1418
1416
|
id,
|
|
1417
|
+
level,
|
|
1418
|
+
uid,
|
|
1419
1419
|
body,
|
|
1420
1420
|
},
|
|
1421
1421
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -1423,7 +1423,7 @@ class Configuration {
|
|
|
1423
1423
|
if (warrning) {
|
|
1424
1424
|
Logger({
|
|
1425
1425
|
level: "WARN",
|
|
1426
|
-
message: "Parameter Validation warrnings for
|
|
1426
|
+
message: "Parameter Validation warrnings for updateLevelUidIntegration",
|
|
1427
1427
|
});
|
|
1428
1428
|
Logger({ level: "WARN", message: warrning });
|
|
1429
1429
|
}
|
|
@@ -1435,7 +1435,7 @@ class Configuration {
|
|
|
1435
1435
|
const response = await PlatformAPIClient.execute(
|
|
1436
1436
|
this.config,
|
|
1437
1437
|
"put",
|
|
1438
|
-
`/service/platform/configuration/v1.0/company/${this.config.companyId}/
|
|
1438
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/integration-opt-in/configuration/${id}/${level}/${uid}`,
|
|
1439
1439
|
query_params,
|
|
1440
1440
|
body,
|
|
1441
1441
|
xHeaders
|
|
@@ -1443,7 +1443,7 @@ class Configuration {
|
|
|
1443
1443
|
|
|
1444
1444
|
const {
|
|
1445
1445
|
error: res_error,
|
|
1446
|
-
} = ConfigurationModel.
|
|
1446
|
+
} = ConfigurationModel.IntegrationLevel().validate(response, {
|
|
1447
1447
|
abortEarly: false,
|
|
1448
1448
|
allowUnknown: false,
|
|
1449
1449
|
});
|
|
@@ -1451,7 +1451,7 @@ class Configuration {
|
|
|
1451
1451
|
if (res_error) {
|
|
1452
1452
|
Logger({
|
|
1453
1453
|
level: "WARN",
|
|
1454
|
-
message: "Response Validation Warnnings for
|
|
1454
|
+
message: "Response Validation Warnnings for updateLevelUidIntegration",
|
|
1455
1455
|
});
|
|
1456
1456
|
Logger({ level: "WARN", message: res_error });
|
|
1457
1457
|
}
|