@gofynd/fdk-client-javascript 1.1.2 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/index.d.ts +7 -7
- package/index.js +12 -12
- package/package.json +1 -1
- package/sdk/application/ApplicationClient.d.ts +20 -20
- package/sdk/application/ApplicationClient.js +26 -26
- package/sdk/application/Cart/CartApplicationClient.d.ts +36 -6
- package/sdk/application/Cart/CartApplicationClient.js +105 -10
- package/sdk/application/Cart/CartApplicationModel.d.ts +9 -0
- package/sdk/application/Cart/CartApplicationModel.js +105 -1
- package/sdk/application/Cart/CartApplicationValidator.d.ts +1 -0
- package/sdk/application/Cart/CartApplicationValidator.js +15 -1
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1 -0
- package/sdk/application/Catalog/CatalogApplicationModel.js +13 -0
- package/sdk/application/Common/CommonApplicationModel.js +4 -0
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +14 -10
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +16 -10
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +6 -5
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +1 -0
- package/sdk/application/Content/ContentApplicationModel.js +3 -1
- package/sdk/application/Lead/LeadApplicationModel.js +4 -1
- package/sdk/application/Logistic/LogisticApplicationModel.js +3 -2
- package/sdk/application/Order/OrderApplicationClient.d.ts +2 -2
- package/sdk/application/Order/OrderApplicationClient.js +2 -2
- package/sdk/application/Order/OrderApplicationModel.js +18 -8
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +35 -0
- package/sdk/application/Payment/PaymentApplicationClient.js +200 -0
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +4 -0
- package/sdk/application/Payment/PaymentApplicationModel.js +58 -7
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +3 -0
- package/sdk/application/Payment/PaymentApplicationValidator.js +19 -0
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +16 -3
- package/sdk/application/PosCart/PosCartApplicationClient.js +39 -6
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +6 -0
- package/sdk/application/PosCart/PosCartApplicationModel.js +63 -1
- package/sdk/application/PosCart/PosCartApplicationValidator.js +6 -0
- package/sdk/application/index.d.ts +10 -10
- package/sdk/application/index.js +13 -13
- package/sdk/common/Constant.d.ts +5 -0
- package/sdk/common/Constant.js +5 -0
- package/sdk/partner/OAuthClient.js +1 -1
- package/sdk/platform/Billing/BillingPlatformModel.js +6 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +491 -2
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +2661 -337
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +32 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +269 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +58 -0
- package/sdk/platform/Cart/CartPlatformModel.js +652 -3
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +8 -2
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +10 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +1 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.js +2 -2
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.js +43 -31
- package/sdk/platform/Common/CommonPlatformModel.js +4 -0
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1 -0
- package/sdk/platform/Communication/CommunicationPlatformModel.js +9 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +2 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +2 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +5 -4
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +99 -78
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +99 -78
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +87 -71
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +87 -71
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +2 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +34 -7
- package/sdk/platform/Content/ContentPlatformModel.js +3 -1
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +135 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +853 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +51 -0
- package/sdk/platform/Finance/FinancePlatformModel.js +342 -0
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +16 -0
- package/sdk/platform/Finance/FinancePlatformValidator.js +84 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +11 -1
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +66 -2
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -0
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +161 -79
- package/sdk/platform/Order/OrderPlatformClient.js +546 -114
- package/sdk/platform/Order/OrderPlatformModel.d.ts +42 -6
- package/sdk/platform/Order/OrderPlatformModel.js +569 -159
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +6 -0
- package/sdk/platform/Order/OrderPlatformValidator.js +52 -9
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +22 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +127 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +2 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +13 -0
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +145 -0
- package/sdk/platform/Partner/PartnerPlatformClient.js +799 -0
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +39 -0
- package/sdk/platform/Partner/PartnerPlatformModel.js +367 -0
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +14 -0
- package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +221 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1476 -190
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +20 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +126 -0
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +48 -0
- package/sdk/platform/Payment/PaymentPlatformModel.js +452 -7
- package/sdk/platform/PlatformApplicationClient.d.ts +1249 -937
- package/sdk/platform/PlatformApplicationClient.js +1366 -1033
- package/sdk/platform/PlatformClient.d.ts +10979 -8771
- package/sdk/platform/PlatformClient.js +11874 -9197
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +134 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +852 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +16 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +81 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +223 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +1296 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +97 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +778 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +21 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +130 -0
- package/sdk/platform/index.d.ts +16 -14
- package/sdk/platform/index.js +22 -18
- package/sdk/public/Configuration/ConfigurationPublicModel.js +5 -0
- package/sdk/public/PublicClient.d.ts +2 -2
- package/sdk/public/PublicClient.js +4 -4
- package/sdk/public/index.d.ts +1 -1
- package/sdk/public/index.js +2 -2
|
@@ -311,6 +311,8 @@ declare class Catalog {
|
|
|
311
311
|
* **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts**
|
|
312
312
|
* @param {boolean} [arg.filters] - Pass `filters` parameter to fetch the
|
|
313
313
|
* filter details. This flag is used to fetch all filters
|
|
314
|
+
* @param {boolean} [arg.isDependent] - This query parameter is used to get
|
|
315
|
+
* the dependent products in the listing.
|
|
314
316
|
* @param {string} [arg.sortOn] - The order to sort the list of products on.
|
|
315
317
|
* The supported sort parameters are popularity, price, redemption and
|
|
316
318
|
* discount in either ascending or descending order. See the supported
|
|
@@ -328,11 +330,12 @@ declare class Catalog {
|
|
|
328
330
|
* @summary: List the products
|
|
329
331
|
* @description: List all the products associated with a brand, collection or category in a requested sort order. The API additionally supports arbitrary search queries that may refer the name of any product, brand, category or collection. If successful, returns a paginated list of products specified in `ApplicationProductListingResponse`
|
|
330
332
|
*/
|
|
331
|
-
getAppicationProducts({ q, f, c, filters, sortOn, pageId, pageSize, pageNo, pageType, itemIds, }?: {
|
|
333
|
+
getAppicationProducts({ q, f, c, filters, isDependent, sortOn, pageId, pageSize, pageNo, pageType, itemIds, }?: {
|
|
332
334
|
q?: string;
|
|
333
335
|
f?: string;
|
|
334
336
|
c?: string;
|
|
335
337
|
filters?: boolean;
|
|
338
|
+
isDependent?: boolean;
|
|
336
339
|
sortOn?: string;
|
|
337
340
|
pageId?: string;
|
|
338
341
|
pageSize?: number;
|
|
@@ -357,6 +360,8 @@ declare class Catalog {
|
|
|
357
360
|
* **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts**
|
|
358
361
|
* @param {boolean} [arg.filters] - Pass `filters` parameter to fetch the
|
|
359
362
|
* filter details. This flag is used to fetch all filters
|
|
363
|
+
* @param {boolean} [arg.isDependent] - This query parameter is used to get
|
|
364
|
+
* the dependent products in the listing.
|
|
360
365
|
* @param {string} [arg.sortOn] - The order to sort the list of products on.
|
|
361
366
|
* The supported sort parameters are popularity, price, redemption and
|
|
362
367
|
* discount in either ascending or descending order. See the supported
|
|
@@ -367,13 +372,14 @@ declare class Catalog {
|
|
|
367
372
|
* @summary: List the products
|
|
368
373
|
* @description: List all the products associated with a brand, collection or category in a requested sort order. The API additionally supports arbitrary search queries that may refer the name of any product, brand, category or collection. If successful, returns a paginated list of products specified in `ApplicationProductListingResponse`
|
|
369
374
|
*/
|
|
370
|
-
getAppicationProductsPaginator({ companyId, applicationId, q, f, c, filters, sortOn, pageSize, itemIds, }?: {
|
|
375
|
+
getAppicationProductsPaginator({ companyId, applicationId, q, f, c, filters, isDependent, sortOn, pageSize, itemIds, }?: {
|
|
371
376
|
companyId: string;
|
|
372
377
|
applicationId: string;
|
|
373
378
|
q?: string;
|
|
374
379
|
f?: string;
|
|
375
380
|
c?: string;
|
|
376
381
|
filters?: boolean;
|
|
382
|
+
isDependent?: boolean;
|
|
377
383
|
sortOn?: string;
|
|
378
384
|
pageSize?: number;
|
|
379
385
|
itemIds?: number[];
|
|
@@ -1421,6 +1421,8 @@ class Catalog {
|
|
|
1421
1421
|
* **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts**
|
|
1422
1422
|
* @param {boolean} [arg.filters] - Pass `filters` parameter to fetch the
|
|
1423
1423
|
* filter details. This flag is used to fetch all filters
|
|
1424
|
+
* @param {boolean} [arg.isDependent] - This query parameter is used to get
|
|
1425
|
+
* the dependent products in the listing.
|
|
1424
1426
|
* @param {string} [arg.sortOn] - The order to sort the list of products on.
|
|
1425
1427
|
* The supported sort parameters are popularity, price, redemption and
|
|
1426
1428
|
* discount in either ascending or descending order. See the supported
|
|
@@ -1443,6 +1445,7 @@ class Catalog {
|
|
|
1443
1445
|
f,
|
|
1444
1446
|
c,
|
|
1445
1447
|
filters,
|
|
1448
|
+
isDependent,
|
|
1446
1449
|
sortOn,
|
|
1447
1450
|
pageId,
|
|
1448
1451
|
pageSize,
|
|
@@ -1456,6 +1459,7 @@ class Catalog {
|
|
|
1456
1459
|
f,
|
|
1457
1460
|
c,
|
|
1458
1461
|
filters,
|
|
1462
|
+
isDependent,
|
|
1459
1463
|
sortOn,
|
|
1460
1464
|
pageId,
|
|
1461
1465
|
pageSize,
|
|
@@ -1478,6 +1482,7 @@ class Catalog {
|
|
|
1478
1482
|
f,
|
|
1479
1483
|
c,
|
|
1480
1484
|
filters,
|
|
1485
|
+
isDependent,
|
|
1481
1486
|
sortOn,
|
|
1482
1487
|
pageId,
|
|
1483
1488
|
pageSize,
|
|
@@ -1500,6 +1505,7 @@ class Catalog {
|
|
|
1500
1505
|
query_params["f"] = f;
|
|
1501
1506
|
query_params["c"] = c;
|
|
1502
1507
|
query_params["filters"] = filters;
|
|
1508
|
+
query_params["is_dependent"] = isDependent;
|
|
1503
1509
|
query_params["sort_on"] = sortOn;
|
|
1504
1510
|
query_params["page_id"] = pageId;
|
|
1505
1511
|
query_params["page_size"] = pageSize;
|
|
@@ -1550,6 +1556,8 @@ class Catalog {
|
|
|
1550
1556
|
* **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts**
|
|
1551
1557
|
* @param {boolean} [arg.filters] - Pass `filters` parameter to fetch the
|
|
1552
1558
|
* filter details. This flag is used to fetch all filters
|
|
1559
|
+
* @param {boolean} [arg.isDependent] - This query parameter is used to get
|
|
1560
|
+
* the dependent products in the listing.
|
|
1553
1561
|
* @param {string} [arg.sortOn] - The order to sort the list of products on.
|
|
1554
1562
|
* The supported sort parameters are popularity, price, redemption and
|
|
1555
1563
|
* discount in either ascending or descending order. See the supported
|
|
@@ -1567,6 +1575,7 @@ class Catalog {
|
|
|
1567
1575
|
f,
|
|
1568
1576
|
c,
|
|
1569
1577
|
filters,
|
|
1578
|
+
isDependent,
|
|
1570
1579
|
sortOn,
|
|
1571
1580
|
pageSize,
|
|
1572
1581
|
itemIds,
|
|
@@ -1583,6 +1592,7 @@ class Catalog {
|
|
|
1583
1592
|
f: f,
|
|
1584
1593
|
c: c,
|
|
1585
1594
|
filters: filters,
|
|
1595
|
+
isDependent: isDependent,
|
|
1586
1596
|
sortOn: sortOn,
|
|
1587
1597
|
pageId: pageId,
|
|
1588
1598
|
pageSize: pageSize,
|
|
@@ -1443,7 +1443,7 @@ class Catalog {
|
|
|
1443
1443
|
const response = await PlatformAPIClient.execute(
|
|
1444
1444
|
this.config,
|
|
1445
1445
|
"delete",
|
|
1446
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/inventory/${sellerIdentifier}
|
|
1446
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/inventory/${sellerIdentifier}`,
|
|
1447
1447
|
query_params,
|
|
1448
1448
|
body,
|
|
1449
1449
|
xHeaders
|
|
@@ -5128,7 +5128,7 @@ class Catalog {
|
|
|
5128
5128
|
const response = await PlatformAPIClient.execute(
|
|
5129
5129
|
this.config,
|
|
5130
5130
|
"post",
|
|
5131
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/inventory/${sellerIdentifier}
|
|
5131
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/inventory/${sellerIdentifier}`,
|
|
5132
5132
|
query_params,
|
|
5133
5133
|
body,
|
|
5134
5134
|
xHeaders
|
|
@@ -33,6 +33,7 @@ declare class CatalogModel {
|
|
|
33
33
|
static AttributeMasterSerializer(): any;
|
|
34
34
|
static AttributeSchemaRange(): any;
|
|
35
35
|
static AutocompleteAction(): any;
|
|
36
|
+
static AutoCompleteMedia(): any;
|
|
36
37
|
static AutocompletePageAction(): any;
|
|
37
38
|
static AutocompleteResult(): any;
|
|
38
39
|
static BannerImage(): any;
|
|
@@ -262,6 +262,7 @@ class CatalogModel {
|
|
|
262
262
|
description: Joi.string().allow(""),
|
|
263
263
|
details: CatalogModel.AttributeMasterDetails().required(),
|
|
264
264
|
enabled_for_end_consumer: Joi.boolean(),
|
|
265
|
+
example: Joi.string().allow(""),
|
|
265
266
|
filters: CatalogModel.AttributeMasterFilter().required(),
|
|
266
267
|
is_nested: Joi.boolean(),
|
|
267
268
|
logo: Joi.string().allow(""),
|
|
@@ -290,6 +291,13 @@ class CatalogModel {
|
|
|
290
291
|
type: Joi.string().allow(""),
|
|
291
292
|
});
|
|
292
293
|
}
|
|
294
|
+
static AutoCompleteMedia() {
|
|
295
|
+
return Joi.object({
|
|
296
|
+
aspect_ratio: Joi.string().allow(""),
|
|
297
|
+
type: Joi.string().allow(""),
|
|
298
|
+
url: Joi.string().allow(""),
|
|
299
|
+
});
|
|
300
|
+
}
|
|
293
301
|
static AutocompletePageAction() {
|
|
294
302
|
return Joi.object({
|
|
295
303
|
params: Joi.any(),
|
|
@@ -303,7 +311,7 @@ class CatalogModel {
|
|
|
303
311
|
_custom_json: Joi.any(),
|
|
304
312
|
action: CatalogModel.AutocompleteAction(),
|
|
305
313
|
display: Joi.string().allow(""),
|
|
306
|
-
logo: CatalogModel.
|
|
314
|
+
logo: CatalogModel.AutoCompleteMedia(),
|
|
307
315
|
});
|
|
308
316
|
}
|
|
309
317
|
static BannerImage() {
|
|
@@ -326,7 +334,7 @@ class CatalogModel {
|
|
|
326
334
|
banners: CatalogModel.ImageUrls(),
|
|
327
335
|
departments: Joi.array().items(Joi.string().allow("")),
|
|
328
336
|
discount: Joi.string().allow(""),
|
|
329
|
-
logo: CatalogModel.
|
|
337
|
+
logo: CatalogModel.Media2(),
|
|
330
338
|
name: Joi.string().allow(""),
|
|
331
339
|
slug: Joi.string().allow(""),
|
|
332
340
|
uid: Joi.number(),
|
|
@@ -472,7 +480,7 @@ class CatalogModel {
|
|
|
472
480
|
is_active: Joi.boolean().required(),
|
|
473
481
|
level: Joi.number().required(),
|
|
474
482
|
marketplaces: CatalogModel.CategoryMapping(),
|
|
475
|
-
media: CatalogModel.
|
|
483
|
+
media: CatalogModel.Media1(),
|
|
476
484
|
modified_by: Joi.any(),
|
|
477
485
|
modified_on: Joi.string().allow(""),
|
|
478
486
|
name: Joi.string().allow("").required(),
|
|
@@ -525,7 +533,7 @@ class CatalogModel {
|
|
|
525
533
|
is_active: Joi.boolean().required(),
|
|
526
534
|
level: Joi.number().required(),
|
|
527
535
|
marketplaces: CatalogModel.CategoryMapping(),
|
|
528
|
-
media: CatalogModel.
|
|
536
|
+
media: CatalogModel.Media1(),
|
|
529
537
|
name: Joi.string().allow("").required(),
|
|
530
538
|
priority: Joi.number(),
|
|
531
539
|
slug: Joi.string().allow(""),
|
|
@@ -602,7 +610,7 @@ class CatalogModel {
|
|
|
602
610
|
cron: Joi.any(),
|
|
603
611
|
description: Joi.string().allow(""),
|
|
604
612
|
is_active: Joi.boolean(),
|
|
605
|
-
logo: CatalogModel.
|
|
613
|
+
logo: CatalogModel.Media(),
|
|
606
614
|
meta: Joi.any(),
|
|
607
615
|
name: Joi.string().allow(""),
|
|
608
616
|
priority: Joi.number(),
|
|
@@ -756,6 +764,7 @@ class CatalogModel {
|
|
|
756
764
|
condition: Joi.string().allow(""),
|
|
757
765
|
map: Joi.any(),
|
|
758
766
|
map_values: Joi.array().items(Joi.any()),
|
|
767
|
+
priority: Joi.array().items(Joi.string().allow("")),
|
|
759
768
|
sort: Joi.string().allow(""),
|
|
760
769
|
value: Joi.string().allow(""),
|
|
761
770
|
});
|
|
@@ -909,7 +918,7 @@ class CatalogModel {
|
|
|
909
918
|
}
|
|
910
919
|
static Department() {
|
|
911
920
|
return Joi.object({
|
|
912
|
-
logo: CatalogModel.
|
|
921
|
+
logo: CatalogModel.Media2(),
|
|
913
922
|
name: Joi.string().allow(""),
|
|
914
923
|
priority_order: Joi.number(),
|
|
915
924
|
slug: Joi.string().allow(""),
|
|
@@ -1140,7 +1149,7 @@ class CatalogModel {
|
|
|
1140
1149
|
cron: Joi.any(),
|
|
1141
1150
|
description: Joi.string().allow(""),
|
|
1142
1151
|
is_active: Joi.boolean(),
|
|
1143
|
-
logo: CatalogModel.
|
|
1152
|
+
logo: CatalogModel.Media(),
|
|
1144
1153
|
meta: Joi.any(),
|
|
1145
1154
|
name: Joi.string().allow(""),
|
|
1146
1155
|
priority: Joi.number(),
|
|
@@ -1179,15 +1188,15 @@ class CatalogModel {
|
|
|
1179
1188
|
addresses: Joi.array().items(CatalogModel.GetAddressSerializer()),
|
|
1180
1189
|
business_type: Joi.string().allow(""),
|
|
1181
1190
|
company_type: Joi.string().allow(""),
|
|
1182
|
-
created_by: CatalogModel.
|
|
1191
|
+
created_by: CatalogModel.UserSerializer1(),
|
|
1183
1192
|
created_on: Joi.string().allow(""),
|
|
1184
|
-
modified_by: CatalogModel.
|
|
1193
|
+
modified_by: CatalogModel.UserSerializer1(),
|
|
1185
1194
|
modified_on: Joi.string().allow(""),
|
|
1186
1195
|
name: Joi.string().allow(""),
|
|
1187
1196
|
reject_reason: Joi.string().allow(""),
|
|
1188
1197
|
stage: Joi.string().allow(""),
|
|
1189
1198
|
uid: Joi.number(),
|
|
1190
|
-
verified_by: CatalogModel.
|
|
1199
|
+
verified_by: CatalogModel.UserSerializer1(),
|
|
1191
1200
|
verified_on: Joi.string().allow(""),
|
|
1192
1201
|
});
|
|
1193
1202
|
}
|
|
@@ -1270,14 +1279,14 @@ class CatalogModel {
|
|
|
1270
1279
|
code: Joi.string().allow("").required(),
|
|
1271
1280
|
company: CatalogModel.GetCompanySerializer(),
|
|
1272
1281
|
contact_numbers: Joi.array().items(CatalogModel.SellerPhoneNumber()),
|
|
1273
|
-
created_by: CatalogModel.
|
|
1282
|
+
created_by: CatalogModel.UserSerializer2(),
|
|
1274
1283
|
created_on: Joi.string().allow(""),
|
|
1275
1284
|
display_name: Joi.string().allow("").required(),
|
|
1276
1285
|
documents: Joi.array().items(CatalogModel.Document()),
|
|
1277
1286
|
gst_credentials: CatalogModel.InvoiceDetailsSerializer(),
|
|
1278
1287
|
integration_type: CatalogModel.LocationIntegrationType(),
|
|
1279
1288
|
manager: CatalogModel.LocationManagerSerializer(),
|
|
1280
|
-
modified_by: CatalogModel.
|
|
1289
|
+
modified_by: CatalogModel.UserSerializer2(),
|
|
1281
1290
|
modified_on: Joi.string().allow(""),
|
|
1282
1291
|
name: Joi.string().allow("").required(),
|
|
1283
1292
|
notification_emails: Joi.array().items(Joi.string().allow("")),
|
|
@@ -1287,7 +1296,7 @@ class CatalogModel {
|
|
|
1287
1296
|
store_type: Joi.string().allow(""),
|
|
1288
1297
|
timing: Joi.array().items(CatalogModel.LocationDayWiseSerializer()),
|
|
1289
1298
|
uid: Joi.number(),
|
|
1290
|
-
verified_by: CatalogModel.
|
|
1299
|
+
verified_by: CatalogModel.UserSerializer2(),
|
|
1291
1300
|
verified_on: Joi.string().allow(""),
|
|
1292
1301
|
warnings: Joi.any(),
|
|
1293
1302
|
});
|
|
@@ -1892,26 +1901,26 @@ class CatalogModel {
|
|
|
1892
1901
|
});
|
|
1893
1902
|
}
|
|
1894
1903
|
static Media() {
|
|
1895
|
-
return Joi.object({
|
|
1896
|
-
aspect_ratio: Joi.string().allow(""),
|
|
1897
|
-
type: Joi.string().allow(""),
|
|
1898
|
-
url: Joi.string().allow(""),
|
|
1899
|
-
});
|
|
1900
|
-
}
|
|
1901
|
-
static Media1() {
|
|
1902
1904
|
return Joi.object({
|
|
1903
1905
|
meta: Joi.any(),
|
|
1904
1906
|
type: Joi.string().allow(""),
|
|
1905
1907
|
url: Joi.string().allow("").required(),
|
|
1906
1908
|
});
|
|
1907
1909
|
}
|
|
1908
|
-
static
|
|
1910
|
+
static Media1() {
|
|
1909
1911
|
return Joi.object({
|
|
1910
1912
|
landscape: Joi.string().allow("").required(),
|
|
1911
1913
|
logo: Joi.string().allow("").required(),
|
|
1912
1914
|
portrait: Joi.string().allow("").required(),
|
|
1913
1915
|
});
|
|
1914
1916
|
}
|
|
1917
|
+
static Media2() {
|
|
1918
|
+
return Joi.object({
|
|
1919
|
+
aspect_ratio: Joi.string().allow(""),
|
|
1920
|
+
type: Joi.string().allow(""),
|
|
1921
|
+
url: Joi.string().allow(""),
|
|
1922
|
+
});
|
|
1923
|
+
}
|
|
1915
1924
|
static Meta() {
|
|
1916
1925
|
return Joi.object({
|
|
1917
1926
|
headers: Joi.any(),
|
|
@@ -1964,7 +1973,7 @@ class CatalogModel {
|
|
|
1964
1973
|
}
|
|
1965
1974
|
static NetQuantity() {
|
|
1966
1975
|
return Joi.object({
|
|
1967
|
-
unit: Joi.
|
|
1976
|
+
unit: Joi.string().allow(""),
|
|
1968
1977
|
value: Joi.number(),
|
|
1969
1978
|
});
|
|
1970
1979
|
}
|
|
@@ -2131,7 +2140,7 @@ class CatalogModel {
|
|
|
2131
2140
|
item_code: Joi.string().allow(""),
|
|
2132
2141
|
item_type: Joi.string().allow(""),
|
|
2133
2142
|
l3_mapping: Joi.array().items(Joi.string().allow("")),
|
|
2134
|
-
media: Joi.array().items(CatalogModel.
|
|
2143
|
+
media: Joi.array().items(CatalogModel.Media()),
|
|
2135
2144
|
modified_by: Joi.any(),
|
|
2136
2145
|
modified_on: Joi.string().allow(""),
|
|
2137
2146
|
moq: Joi.any(),
|
|
@@ -2172,13 +2181,14 @@ class CatalogModel {
|
|
|
2172
2181
|
static ProductBrand() {
|
|
2173
2182
|
return Joi.object({
|
|
2174
2183
|
action: CatalogModel.Action(),
|
|
2175
|
-
logo: CatalogModel.
|
|
2184
|
+
logo: CatalogModel.Media(),
|
|
2176
2185
|
name: Joi.string().allow(""),
|
|
2177
2186
|
uid: Joi.number(),
|
|
2178
2187
|
});
|
|
2179
2188
|
}
|
|
2180
2189
|
static ProductBulkAssets() {
|
|
2181
2190
|
return Joi.object({
|
|
2191
|
+
batch_id: Joi.string().allow(""),
|
|
2182
2192
|
company_id: Joi.number(),
|
|
2183
2193
|
url: Joi.string().allow("").required(),
|
|
2184
2194
|
user: Joi.any().required(),
|
|
@@ -2282,7 +2292,7 @@ class CatalogModel {
|
|
|
2282
2292
|
is_set: Joi.boolean(),
|
|
2283
2293
|
item_code: Joi.string().allow("").required(),
|
|
2284
2294
|
item_type: Joi.string().allow("").required(),
|
|
2285
|
-
media: Joi.array().items(CatalogModel.
|
|
2295
|
+
media: Joi.array().items(CatalogModel.Media()),
|
|
2286
2296
|
multi_size: Joi.boolean(),
|
|
2287
2297
|
name: Joi.string().allow("").required(),
|
|
2288
2298
|
net_quantity: CatalogModel.NetQuantity(),
|
|
@@ -2320,7 +2330,7 @@ class CatalogModel {
|
|
|
2320
2330
|
image_nature: Joi.string().allow(""),
|
|
2321
2331
|
item_code: Joi.string().allow(""),
|
|
2322
2332
|
item_type: Joi.string().allow(""),
|
|
2323
|
-
medias: Joi.array().items(CatalogModel.
|
|
2333
|
+
medias: Joi.array().items(CatalogModel.Media()),
|
|
2324
2334
|
name: Joi.string().allow(""),
|
|
2325
2335
|
product_online_date: Joi.string().allow(""),
|
|
2326
2336
|
promo_meta: Joi.any(),
|
|
@@ -2399,7 +2409,7 @@ class CatalogModel {
|
|
|
2399
2409
|
image_nature: Joi.string().allow(""),
|
|
2400
2410
|
item_code: Joi.string().allow(""),
|
|
2401
2411
|
item_type: Joi.string().allow(""),
|
|
2402
|
-
medias: Joi.array().items(CatalogModel.
|
|
2412
|
+
medias: Joi.array().items(CatalogModel.Media()),
|
|
2403
2413
|
name: Joi.string().allow(""),
|
|
2404
2414
|
price: CatalogModel.ProductListingPrice(),
|
|
2405
2415
|
product_online_date: Joi.string().allow(""),
|
|
@@ -2493,7 +2503,7 @@ class CatalogModel {
|
|
|
2493
2503
|
item_code: Joi.string().allow(""),
|
|
2494
2504
|
item_type: Joi.string().allow(""),
|
|
2495
2505
|
l3_mapping: Joi.array().items(Joi.string().allow("")),
|
|
2496
|
-
media: Joi.array().items(CatalogModel.
|
|
2506
|
+
media: Joi.array().items(CatalogModel.Media()),
|
|
2497
2507
|
modified_by: Joi.any(),
|
|
2498
2508
|
modified_on: Joi.string().allow(""),
|
|
2499
2509
|
moq: Joi.any(),
|
|
@@ -2610,7 +2620,7 @@ class CatalogModel {
|
|
|
2610
2620
|
brand_uid: Joi.number(),
|
|
2611
2621
|
category_uid: Joi.number(),
|
|
2612
2622
|
item_code: Joi.string().allow(""),
|
|
2613
|
-
media: Joi.array().items(CatalogModel.
|
|
2623
|
+
media: Joi.array().items(CatalogModel.Media()),
|
|
2614
2624
|
name: Joi.string().allow(""),
|
|
2615
2625
|
uid: Joi.number(),
|
|
2616
2626
|
});
|
|
@@ -2923,7 +2933,7 @@ class CatalogModel {
|
|
|
2923
2933
|
static Trader() {
|
|
2924
2934
|
return Joi.object({
|
|
2925
2935
|
address: Joi.array().items(Joi.string().allow("")),
|
|
2926
|
-
name: Joi.
|
|
2936
|
+
name: Joi.string().allow("").required(),
|
|
2927
2937
|
type: Joi.string().allow(""),
|
|
2928
2938
|
});
|
|
2929
2939
|
}
|
|
@@ -3180,7 +3190,9 @@ class CatalogModel {
|
|
|
3180
3190
|
|
|
3181
3191
|
"shipping-policy",
|
|
3182
3192
|
|
|
3183
|
-
"return-policy"
|
|
3193
|
+
"return-policy",
|
|
3194
|
+
|
|
3195
|
+
"order-status"
|
|
3184
3196
|
);
|
|
3185
3197
|
}
|
|
3186
3198
|
}
|
|
@@ -96,14 +96,18 @@ class CommonModel {
|
|
|
96
96
|
__v: Joi.number(),
|
|
97
97
|
_id: Joi.string().allow(""),
|
|
98
98
|
capital: Joi.string().allow(""),
|
|
99
|
+
country_code: Joi.string().allow(""),
|
|
99
100
|
currency: Joi.string().allow(""),
|
|
100
101
|
default_currency: CommonModel.LocationDefaultCurrency(),
|
|
101
102
|
default_language: CommonModel.LocationDefaultLanguage(),
|
|
102
103
|
iso2: Joi.string().allow(""),
|
|
103
104
|
iso3: Joi.string().allow(""),
|
|
105
|
+
latitude: Joi.string().allow(""),
|
|
106
|
+
longitude: Joi.string().allow(""),
|
|
104
107
|
name: Joi.string().allow(""),
|
|
105
108
|
parent: Joi.string().allow(""),
|
|
106
109
|
phone_code: Joi.string().allow(""),
|
|
110
|
+
state_code: Joi.string().allow(""),
|
|
107
111
|
type: Joi.string().allow(""),
|
|
108
112
|
uid: Joi.number(),
|
|
109
113
|
});
|
|
@@ -66,6 +66,7 @@ declare class CommunicationModel {
|
|
|
66
66
|
static SendOtpCommsRes(): any;
|
|
67
67
|
static SendOtpCommsResEmail(): any;
|
|
68
68
|
static SendOtpCommsResSms(): any;
|
|
69
|
+
static SendOtpEmailCommsProvider(): any;
|
|
69
70
|
static SendOtpEmailCommsTemplate(): any;
|
|
70
71
|
static SendOtpSmsCommsProvider(): any;
|
|
71
72
|
static SendOtpSmsCommsTemplate(): any;
|
|
@@ -375,6 +375,7 @@ class CommunicationModel {
|
|
|
375
375
|
return Joi.object({
|
|
376
376
|
_id: Joi.string().allow(""),
|
|
377
377
|
application: Joi.string().allow(""),
|
|
378
|
+
channel_type: Joi.string().allow(""),
|
|
378
379
|
created_at: Joi.string().allow(""),
|
|
379
380
|
data: Joi.any(),
|
|
380
381
|
email: CommunicationModel.LogEmail(),
|
|
@@ -382,6 +383,7 @@ class CommunicationModel {
|
|
|
382
383
|
meta: CommunicationModel.LogMeta(),
|
|
383
384
|
pushnotification: CommunicationModel.LogPushnotification(),
|
|
384
385
|
service: Joi.string().allow(""),
|
|
386
|
+
source: Joi.string().allow(""),
|
|
385
387
|
status: Joi.string().allow(""),
|
|
386
388
|
step: Joi.string().allow(""),
|
|
387
389
|
});
|
|
@@ -535,6 +537,7 @@ class CommunicationModel {
|
|
|
535
537
|
return Joi.object({
|
|
536
538
|
expiry: Joi.number(),
|
|
537
539
|
otp_length: Joi.number(),
|
|
540
|
+
provider: CommunicationModel.SendOtpEmailCommsProvider(),
|
|
538
541
|
template: CommunicationModel.SendOtpEmailCommsTemplate(),
|
|
539
542
|
});
|
|
540
543
|
}
|
|
@@ -571,6 +574,12 @@ class CommunicationModel {
|
|
|
571
574
|
success: Joi.boolean(),
|
|
572
575
|
});
|
|
573
576
|
}
|
|
577
|
+
static SendOtpEmailCommsProvider() {
|
|
578
|
+
return Joi.object({
|
|
579
|
+
_id: Joi.string().allow(""),
|
|
580
|
+
slug: Joi.string().allow(""),
|
|
581
|
+
});
|
|
582
|
+
}
|
|
574
583
|
static SendOtpEmailCommsTemplate() {
|
|
575
584
|
return Joi.object({
|
|
576
585
|
key: Joi.string().allow(""),
|
|
@@ -65,8 +65,8 @@ declare class CompanyProfile {
|
|
|
65
65
|
* @param {Object} arg - Arg object.
|
|
66
66
|
* @param {string} arg.brandId - Id of the brand to be viewed.
|
|
67
67
|
* @returns {Promise<GetBrandResponseSerializer>} - Success response
|
|
68
|
-
* @summary: Get a single brand.
|
|
69
|
-
* @description: This API helps to get data associated to a particular brand.
|
|
68
|
+
* @summary: Get a single company brand.
|
|
69
|
+
* @description: This API helps to get data associated to a particular company brand.
|
|
70
70
|
*/
|
|
71
71
|
getBrand({ brandId }?: {
|
|
72
72
|
brandId: string;
|
|
@@ -407,8 +407,8 @@ class CompanyProfile {
|
|
|
407
407
|
* @param {Object} arg - Arg object.
|
|
408
408
|
* @param {string} arg.brandId - Id of the brand to be viewed.
|
|
409
409
|
* @returns {Promise<GetBrandResponseSerializer>} - Success response
|
|
410
|
-
* @summary: Get a single brand.
|
|
411
|
-
* @description: This API helps to get data associated to a particular brand.
|
|
410
|
+
* @summary: Get a single company brand.
|
|
411
|
+
* @description: This API helps to get data associated to a particular company brand.
|
|
412
412
|
*/
|
|
413
413
|
async getBrand({ brandId } = {}) {
|
|
414
414
|
const { error } = CompanyProfileValidator.getBrand().validate(
|
|
@@ -18,8 +18,8 @@ class CompanyProfileModel {
|
|
|
18
18
|
}
|
|
19
19
|
static BrandBannerSerializer() {
|
|
20
20
|
return Joi.object({
|
|
21
|
-
landscape: Joi.string().allow(""),
|
|
22
|
-
portrait: Joi.string().allow(""),
|
|
21
|
+
landscape: Joi.string().allow("").required(),
|
|
22
|
+
portrait: Joi.string().allow("").required(),
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
static BulkLocationSerializer() {
|
|
@@ -140,7 +140,7 @@ class CompanyProfileModel {
|
|
|
140
140
|
return Joi.object({
|
|
141
141
|
_custom_json: Joi.any(),
|
|
142
142
|
_locale_language: Joi.any(),
|
|
143
|
-
banner: CompanyProfileModel.BrandBannerSerializer(),
|
|
143
|
+
banner: CompanyProfileModel.BrandBannerSerializer().required(),
|
|
144
144
|
brand_tier: Joi.string().allow(""),
|
|
145
145
|
company_id: Joi.number(),
|
|
146
146
|
description: Joi.string().allow(""),
|
|
@@ -218,7 +218,7 @@ class CompanyProfileModel {
|
|
|
218
218
|
business_country_info: CompanyProfileModel.BusinessCountryInfo(),
|
|
219
219
|
business_details: CompanyProfileModel.BusinessDetails(),
|
|
220
220
|
business_info: Joi.string().allow(""),
|
|
221
|
-
business_type: Joi.string().allow("")
|
|
221
|
+
business_type: Joi.string().allow(""),
|
|
222
222
|
company_type: Joi.string().allow("").required(),
|
|
223
223
|
contact_details: CompanyProfileModel.ContactDetails(),
|
|
224
224
|
created_by: CompanyProfileModel.UserSerializer(),
|
|
@@ -401,6 +401,7 @@ class CompanyProfileModel {
|
|
|
401
401
|
}
|
|
402
402
|
static ProfileSuccessResponse() {
|
|
403
403
|
return Joi.object({
|
|
404
|
+
message: Joi.string().allow(""),
|
|
404
405
|
success: Joi.boolean(),
|
|
405
406
|
uid: Joi.number(),
|
|
406
407
|
});
|