@gofynd/fdk-client-javascript 1.1.1 → 1.1.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/README.md +1 -2
- package/index.d.ts +4 -7
- package/index.js +5 -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 +45 -4
- package/sdk/application/Cart/CartApplicationClient.js +169 -9
- package/sdk/application/Cart/CartApplicationModel.d.ts +15 -0
- package/sdk/application/Cart/CartApplicationModel.js +177 -1
- package/sdk/application/Cart/CartApplicationValidator.d.ts +2 -0
- package/sdk/application/Cart/CartApplicationValidator.js +20 -0
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +14 -4
- package/sdk/application/Catalog/CatalogApplicationClient.js +18 -6
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1 -0
- package/sdk/application/Catalog/CatalogApplicationModel.js +13 -0
- package/sdk/application/Catalog/CatalogApplicationValidator.js +2 -0
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +14 -10
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +16 -10
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1 -0
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +1 -0
- package/sdk/application/Content/ContentApplicationModel.js +4 -1
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +8 -2
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +8 -2
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +2 -2
- package/sdk/application/Logistic/LogisticApplicationModel.js +3 -2
- package/sdk/application/Order/OrderApplicationClient.d.ts +17 -2
- package/sdk/application/Order/OrderApplicationClient.js +70 -2
- package/sdk/application/Order/OrderApplicationModel.d.ts +17 -0
- package/sdk/application/Order/OrderApplicationModel.js +129 -8
- package/sdk/application/Order/OrderApplicationValidator.d.ts +1 -0
- package/sdk/application/Order/OrderApplicationValidator.js +7 -0
- 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 +10 -0
- package/sdk/application/PosCart/PosCartApplicationModel.js +113 -1
- package/sdk/application/PosCart/PosCartApplicationValidator.js +6 -0
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +8 -8
- package/sdk/application/Rewards/RewardsApplicationClient.js +8 -8
- package/sdk/application/index.d.ts +10 -10
- package/sdk/application/index.js +13 -13
- package/sdk/common/AxiosHelper.js +1 -1
- package/sdk/common/Constant.d.ts +5 -0
- package/sdk/common/Constant.js +5 -0
- package/sdk/platform/Billing/BillingPlatformModel.js +6 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +479 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +2574 -307
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +31 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +263 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +61 -0
- package/sdk/platform/Cart/CartPlatformModel.js +697 -2
- 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 +41 -29
- 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 +26 -0
- package/sdk/platform/Content/ContentPlatformModel.js +4 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +10 -4
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +15 -9
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -2
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -2
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +2 -2
- 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 -81
- package/sdk/platform/Order/OrderPlatformClient.js +546 -119
- package/sdk/platform/Order/OrderPlatformModel.d.ts +42 -6
- package/sdk/platform/Order/OrderPlatformModel.js +570 -158
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +6 -0
- package/sdk/platform/Order/OrderPlatformValidator.js +52 -10
- 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 +44 -0
- package/sdk/platform/Payment/PaymentPlatformModel.js +410 -0
- package/sdk/platform/PlatformApplicationClient.d.ts +1149 -930
- package/sdk/platform/PlatformApplicationClient.js +1260 -1027
- package/sdk/platform/PlatformClient.d.ts +10360 -8660
- package/sdk/platform/PlatformClient.js +11126 -9093
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +14 -26
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +14 -74
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -1
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -7
- package/sdk/platform/index.d.ts +15 -14
- package/sdk/platform/index.js +20 -18
- 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
- package/partner.d.ts +0 -4
- package/partner.js +0 -7
- package/sdk/partner/OAuthClient.d.ts +0 -14
- package/sdk/partner/OAuthClient.js +0 -112
- package/sdk/partner/PartnerAPIClient.d.ts +0 -12
- package/sdk/partner/PartnerAPIClient.js +0 -42
- package/sdk/partner/PartnerClient.d.ts +0 -6
- package/sdk/partner/PartnerClient.js +0 -17
- package/sdk/partner/PartnerConfig.d.ts +0 -30
- package/sdk/partner/PartnerConfig.js +0 -39
- package/sdk/partner/index.d.ts +0 -3
- package/sdk/partner/index.js +0 -5
|
@@ -523,6 +523,8 @@ class Catalog {
|
|
|
523
523
|
* will be passed in f parameter as shown in the example below. Double
|
|
524
524
|
* Pipe (||) denotes the OR condition, whereas Triple-colon (:::)
|
|
525
525
|
* indicates a new filter paramater applied as an AND condition.
|
|
526
|
+
* @param {string} [arg.q] - The search query for entering partial or full
|
|
527
|
+
* name of product, brand, category, or collection.
|
|
526
528
|
* @param {boolean} [arg.filters] - This is a boolean value, True for
|
|
527
529
|
* fetching all filter parameters and False for disabling the filter parameters.
|
|
528
530
|
* @param {string} [arg.sortOn] - The order in which the list of products
|
|
@@ -540,6 +542,7 @@ class Catalog {
|
|
|
540
542
|
async getCollectionItemsBySlug({
|
|
541
543
|
slug,
|
|
542
544
|
f,
|
|
545
|
+
q,
|
|
543
546
|
filters,
|
|
544
547
|
sortOn,
|
|
545
548
|
pageId,
|
|
@@ -548,7 +551,7 @@ class Catalog {
|
|
|
548
551
|
pageType,
|
|
549
552
|
} = {}) {
|
|
550
553
|
const { error } = CatalogValidator.getCollectionItemsBySlug().validate(
|
|
551
|
-
{ slug, f, filters, sortOn, pageId, pageSize, pageNo, pageType },
|
|
554
|
+
{ slug, f, q, filters, sortOn, pageId, pageSize, pageNo, pageType },
|
|
552
555
|
{ abortEarly: false, allowUnknown: true }
|
|
553
556
|
);
|
|
554
557
|
if (error) {
|
|
@@ -559,7 +562,7 @@ class Catalog {
|
|
|
559
562
|
const {
|
|
560
563
|
error: warrning,
|
|
561
564
|
} = CatalogValidator.getCollectionItemsBySlug().validate(
|
|
562
|
-
{ slug, f, filters, sortOn, pageId, pageSize, pageNo, pageType },
|
|
565
|
+
{ slug, f, q, filters, sortOn, pageId, pageSize, pageNo, pageType },
|
|
563
566
|
{ abortEarly: false, allowUnknown: false }
|
|
564
567
|
);
|
|
565
568
|
if (warrning) {
|
|
@@ -572,6 +575,7 @@ class Catalog {
|
|
|
572
575
|
|
|
573
576
|
const query_params = {};
|
|
574
577
|
query_params["f"] = f;
|
|
578
|
+
query_params["q"] = q;
|
|
575
579
|
query_params["filters"] = filters;
|
|
576
580
|
query_params["sort_on"] = sortOn;
|
|
577
581
|
query_params["page_id"] = pageId;
|
|
@@ -620,6 +624,8 @@ class Catalog {
|
|
|
620
624
|
* will be passed in f parameter as shown in the example below. Double
|
|
621
625
|
* Pipe (||) denotes the OR condition, whereas Triple-colon (:::)
|
|
622
626
|
* indicates a new filter paramater applied as an AND condition.
|
|
627
|
+
* @param {string} [arg.q] - The search query for entering partial or full
|
|
628
|
+
* name of product, brand, category, or collection.
|
|
623
629
|
* @param {boolean} [arg.filters] - This is a boolean value, True for
|
|
624
630
|
* fetching all filter parameters and False for disabling the filter parameters.
|
|
625
631
|
* @param {string} [arg.sortOn] - The order in which the list of products
|
|
@@ -632,6 +638,7 @@ class Catalog {
|
|
|
632
638
|
getCollectionItemsBySlugPaginator({
|
|
633
639
|
slug,
|
|
634
640
|
f,
|
|
641
|
+
q,
|
|
635
642
|
filters,
|
|
636
643
|
sortOn,
|
|
637
644
|
pageSize,
|
|
@@ -644,6 +651,7 @@ class Catalog {
|
|
|
644
651
|
const data = await this.getCollectionItemsBySlug({
|
|
645
652
|
slug: slug,
|
|
646
653
|
f: f,
|
|
654
|
+
q: q,
|
|
647
655
|
filters: filters,
|
|
648
656
|
sortOn: sortOn,
|
|
649
657
|
pageId: pageId,
|
|
@@ -667,13 +675,14 @@ class Catalog {
|
|
|
667
675
|
* given set of results.
|
|
668
676
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
669
677
|
* @param {string[]} [arg.tag] - List of tags to filter collections
|
|
678
|
+
* @param {string} [arg.q] - Name of the collection to filter collection
|
|
670
679
|
* @returns {Promise<GetCollectionListingResponse>} - Success response
|
|
671
680
|
* @summary: List all the collections
|
|
672
681
|
* @description: Collections are a great way to organize your products and can improve the ability for customers to find items quickly and efficiently.
|
|
673
682
|
*/
|
|
674
|
-
async getCollections({ pageNo, pageSize, tag } = {}) {
|
|
683
|
+
async getCollections({ pageNo, pageSize, tag, q } = {}) {
|
|
675
684
|
const { error } = CatalogValidator.getCollections().validate(
|
|
676
|
-
{ pageNo, pageSize, tag },
|
|
685
|
+
{ pageNo, pageSize, tag, q },
|
|
677
686
|
{ abortEarly: false, allowUnknown: true }
|
|
678
687
|
);
|
|
679
688
|
if (error) {
|
|
@@ -682,7 +691,7 @@ class Catalog {
|
|
|
682
691
|
|
|
683
692
|
// Showing warrnings if extra unknown parameters are found
|
|
684
693
|
const { error: warrning } = CatalogValidator.getCollections().validate(
|
|
685
|
-
{ pageNo, pageSize, tag },
|
|
694
|
+
{ pageNo, pageSize, tag, q },
|
|
686
695
|
{ abortEarly: false, allowUnknown: false }
|
|
687
696
|
);
|
|
688
697
|
if (warrning) {
|
|
@@ -697,6 +706,7 @@ class Catalog {
|
|
|
697
706
|
query_params["page_no"] = pageNo;
|
|
698
707
|
query_params["page_size"] = pageSize;
|
|
699
708
|
query_params["tag"] = tag;
|
|
709
|
+
query_params["q"] = q;
|
|
700
710
|
|
|
701
711
|
const xHeaders = {};
|
|
702
712
|
|
|
@@ -734,10 +744,11 @@ class Catalog {
|
|
|
734
744
|
* @param {Object} arg - Arg object.
|
|
735
745
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
736
746
|
* @param {string[]} [arg.tag] - List of tags to filter collections
|
|
747
|
+
* @param {string} [arg.q] - Name of the collection to filter collection
|
|
737
748
|
* @summary: List all the collections
|
|
738
749
|
* @description: Collections are a great way to organize your products and can improve the ability for customers to find items quickly and efficiently.
|
|
739
750
|
*/
|
|
740
|
-
getCollectionsPaginator({ pageSize, tag } = {}) {
|
|
751
|
+
getCollectionsPaginator({ pageSize, tag, q } = {}) {
|
|
741
752
|
const paginator = new Paginator();
|
|
742
753
|
const callback = async () => {
|
|
743
754
|
const pageId = paginator.nextId;
|
|
@@ -747,6 +758,7 @@ class Catalog {
|
|
|
747
758
|
pageNo: pageNo,
|
|
748
759
|
pageSize: pageSize,
|
|
749
760
|
tag: tag,
|
|
761
|
+
q: q,
|
|
750
762
|
});
|
|
751
763
|
paginator.setPaginator({
|
|
752
764
|
hasNext: data.page.has_next ? true : false,
|
|
@@ -56,6 +56,7 @@ declare class CatalogModel {
|
|
|
56
56
|
static ProductCompareResponse(): any;
|
|
57
57
|
static ProductDetail(): any;
|
|
58
58
|
static ProductDetailAttribute(): any;
|
|
59
|
+
static ProductDetailCustomOrder(): any;
|
|
59
60
|
static ProductDetailGroupedAttribute(): any;
|
|
60
61
|
static ProductDetails(): any;
|
|
61
62
|
static ProductFilters(): any;
|
|
@@ -436,6 +436,7 @@ class CatalogModel {
|
|
|
436
436
|
categories: Joi.array().items(CatalogModel.ProductBrand()),
|
|
437
437
|
category_map: CatalogModel.ProductCategoryMap(),
|
|
438
438
|
color: Joi.string().allow(""),
|
|
439
|
+
custom_order: CatalogModel.ProductDetailCustomOrder(),
|
|
439
440
|
description: Joi.string().allow(""),
|
|
440
441
|
discount: Joi.string().allow(""),
|
|
441
442
|
grouped_attributes: Joi.array().items(
|
|
@@ -452,6 +453,7 @@ class CatalogModel {
|
|
|
452
453
|
name: Joi.string().allow(""),
|
|
453
454
|
net_quantity: CatalogModel.NetQuantity(),
|
|
454
455
|
price: CatalogModel.ProductListingPrice(),
|
|
456
|
+
product_group_tag: Joi.array().items(Joi.string().allow("")),
|
|
455
457
|
product_online_date: Joi.string().allow(""),
|
|
456
458
|
rating: Joi.number(),
|
|
457
459
|
rating_count: Joi.number(),
|
|
@@ -473,6 +475,13 @@ class CatalogModel {
|
|
|
473
475
|
value: Joi.string().allow(""),
|
|
474
476
|
});
|
|
475
477
|
}
|
|
478
|
+
static ProductDetailCustomOrder() {
|
|
479
|
+
return Joi.object({
|
|
480
|
+
is_custom_order: Joi.boolean(),
|
|
481
|
+
manufacturing_time: Joi.number(),
|
|
482
|
+
manufacturing_time_unit: Joi.string().allow(""),
|
|
483
|
+
});
|
|
484
|
+
}
|
|
476
485
|
static ProductDetailGroupedAttribute() {
|
|
477
486
|
return Joi.object({
|
|
478
487
|
details: Joi.array().items(CatalogModel.ProductDetailAttribute()),
|
|
@@ -605,6 +614,7 @@ class CatalogModel {
|
|
|
605
614
|
categories: Joi.array().items(CatalogModel.ProductBrand()),
|
|
606
615
|
category_map: CatalogModel.ProductCategoryMap(),
|
|
607
616
|
color: Joi.string().allow(""),
|
|
617
|
+
custom_order: CatalogModel.ProductDetailCustomOrder(),
|
|
608
618
|
description: Joi.string().allow(""),
|
|
609
619
|
discount: Joi.string().allow(""),
|
|
610
620
|
grouped_attributes: Joi.array().items(
|
|
@@ -622,6 +632,7 @@ class CatalogModel {
|
|
|
622
632
|
name: Joi.string().allow(""),
|
|
623
633
|
net_quantity: CatalogModel.NetQuantity(),
|
|
624
634
|
price: CatalogModel.ProductListingPrice(),
|
|
635
|
+
product_group_tag: Joi.array().items(Joi.string().allow("")),
|
|
625
636
|
product_online_date: Joi.string().allow(""),
|
|
626
637
|
rating: Joi.number(),
|
|
627
638
|
rating_count: Joi.number(),
|
|
@@ -752,7 +763,9 @@ class CatalogModel {
|
|
|
752
763
|
}
|
|
753
764
|
static ProductSortOn() {
|
|
754
765
|
return Joi.object({
|
|
766
|
+
display: Joi.string().allow(""),
|
|
755
767
|
is_selected: Joi.boolean(),
|
|
768
|
+
logo: Joi.string().allow(""),
|
|
756
769
|
name: Joi.string().allow(""),
|
|
757
770
|
value: Joi.string().allow(""),
|
|
758
771
|
});
|
|
@@ -45,6 +45,7 @@ class CatalogValidator {
|
|
|
45
45
|
return Joi.object({
|
|
46
46
|
slug: Joi.string().allow("").required(),
|
|
47
47
|
f: Joi.string().allow(""),
|
|
48
|
+
q: Joi.string().allow(""),
|
|
48
49
|
filters: Joi.boolean(),
|
|
49
50
|
sortOn: Joi.string().allow(""),
|
|
50
51
|
pageId: Joi.string().allow(""),
|
|
@@ -59,6 +60,7 @@ class CatalogValidator {
|
|
|
59
60
|
pageNo: Joi.number(),
|
|
60
61
|
pageSize: Joi.number(),
|
|
61
62
|
tag: Joi.array().items(Joi.string().allow("")),
|
|
63
|
+
q: Joi.string().allow(""),
|
|
62
64
|
});
|
|
63
65
|
}
|
|
64
66
|
|
|
@@ -39,16 +39,18 @@ declare class Configuration {
|
|
|
39
39
|
* retrieving staff members working at a particular ordering store.
|
|
40
40
|
* @param {string} [arg.user] - Mongo ID of the staff. Helps in retrieving
|
|
41
41
|
* the details of a particular staff member.
|
|
42
|
+
* @param {string} [arg.userName] - User name of the member
|
|
42
43
|
* @returns {Promise<AppStaffListResponse>} - Success response
|
|
43
44
|
* @summary: Get a list of staff.
|
|
44
45
|
* @description: Use this API to get a list of staff including the names, employee code, incentive status, assigned ordering stores, and title of each staff added to the application.
|
|
45
46
|
*/
|
|
46
|
-
getAppStaffList({ pageNo, pageSize, orderIncent, orderingStore, user, }?: {
|
|
47
|
+
getAppStaffList({ pageNo, pageSize, orderIncent, orderingStore, user, userName, }?: {
|
|
47
48
|
pageNo?: number;
|
|
48
49
|
pageSize?: number;
|
|
49
50
|
orderIncent?: boolean;
|
|
50
51
|
orderingStore?: number;
|
|
51
52
|
user?: string;
|
|
53
|
+
userName?: string;
|
|
52
54
|
}): Promise<AppStaffListResponse>;
|
|
53
55
|
/**
|
|
54
56
|
* @param {Object} arg - Arg object.
|
|
@@ -59,14 +61,16 @@ declare class Configuration {
|
|
|
59
61
|
* retrieving staff members working at a particular ordering store.
|
|
60
62
|
* @param {string} [arg.user] - Mongo ID of the staff. Helps in retrieving
|
|
61
63
|
* the details of a particular staff member.
|
|
64
|
+
* @param {string} [arg.userName] - User name of the member
|
|
62
65
|
* @summary: Get a list of staff.
|
|
63
66
|
* @description: Use this API to get a list of staff including the names, employee code, incentive status, assigned ordering stores, and title of each staff added to the application.
|
|
64
67
|
*/
|
|
65
|
-
getAppStaffListPaginator({ pageSize, orderIncent, orderingStore, user, }?: {
|
|
68
|
+
getAppStaffListPaginator({ pageSize, orderIncent, orderingStore, user, userName, }?: {
|
|
66
69
|
pageSize?: number;
|
|
67
70
|
orderIncent?: boolean;
|
|
68
71
|
orderingStore?: number;
|
|
69
72
|
user?: string;
|
|
73
|
+
userName?: string;
|
|
70
74
|
}): Paginator;
|
|
71
75
|
/**
|
|
72
76
|
* @param {Object} arg - Arg object.
|
|
@@ -88,14 +92,14 @@ declare class Configuration {
|
|
|
88
92
|
/**
|
|
89
93
|
* @param {Object} arg - Arg object.
|
|
90
94
|
* @returns {Promise<Application>} - Success response
|
|
91
|
-
* @summary: Get current
|
|
92
|
-
* @description: Use this API to get the current
|
|
95
|
+
* @summary: Get current sales channel details
|
|
96
|
+
* @description: Use this API to get the current sales channel details which includes configurations that indicate the status of the website, domain, ID, tokens, images, etc.
|
|
93
97
|
*/
|
|
94
98
|
getApplication({}?: any): Promise<Application>;
|
|
95
99
|
/**
|
|
96
100
|
* @param {Object} arg - Arg object.
|
|
97
101
|
* @returns {Promise<ApplicationDetail>} - Success response
|
|
98
|
-
* @summary: Get basic application
|
|
102
|
+
* @summary: Get basic details of the application
|
|
99
103
|
* @description: Use this API to retrieve only the basic details of the application which includes channel name, description, banner, logo, favicon, domain details, etc.
|
|
100
104
|
*/
|
|
101
105
|
getBasicDetails({}?: any): Promise<ApplicationDetail>;
|
|
@@ -141,7 +145,7 @@ declare class Configuration {
|
|
|
141
145
|
* @param {Object} arg - Arg object.
|
|
142
146
|
* @returns {Promise<LanguageResponse>} - Success response
|
|
143
147
|
* @summary: Get list of languages
|
|
144
|
-
* @description: Use this API to get a list of languages supported in the application
|
|
148
|
+
* @description: Use this API to get a list of languages supported in the application
|
|
145
149
|
*/
|
|
146
150
|
getLanguages({}?: any): Promise<LanguageResponse>;
|
|
147
151
|
/**
|
|
@@ -162,7 +166,7 @@ declare class Configuration {
|
|
|
162
166
|
* page. Default value is 10.
|
|
163
167
|
* @param {string} [arg.q] - Store code or name of the ordering store.
|
|
164
168
|
* @returns {Promise<OrderingStores>} - Success response
|
|
165
|
-
* @summary: Get deployment stores
|
|
169
|
+
* @summary: Get all deployment stores
|
|
166
170
|
* @description: Use this API to retrieve the details of all the deployment stores (the selling locations where the application will be utilized for placing orders).
|
|
167
171
|
*/
|
|
168
172
|
getOrderingStores({ pageNo, pageSize, q }?: {
|
|
@@ -175,7 +179,7 @@ declare class Configuration {
|
|
|
175
179
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
176
180
|
* page. Default value is 10.
|
|
177
181
|
* @param {string} [arg.q] - Store code or name of the ordering store.
|
|
178
|
-
* @summary: Get deployment stores
|
|
182
|
+
* @summary: Get all deployment stores
|
|
179
183
|
* @description: Use this API to retrieve the details of all the deployment stores (the selling locations where the application will be utilized for placing orders).
|
|
180
184
|
*/
|
|
181
185
|
getOrderingStoresPaginator({ pageSize, q }?: {
|
|
@@ -185,8 +189,8 @@ declare class Configuration {
|
|
|
185
189
|
/**
|
|
186
190
|
* @param {Object} arg - Arg object.
|
|
187
191
|
* @returns {Promise<ApplicationAboutResponse>} - Success response
|
|
188
|
-
* @summary: Get
|
|
189
|
-
* @description: Use this API to get the current
|
|
192
|
+
* @summary: Get sales channel, owner and seller information
|
|
193
|
+
* @description: Use this API to get the current sales channel details which includes channel name, description, banner, logo, favicon, domain details, etc. This API also retrieves the seller and owner information such as address, email address, and phone number.
|
|
190
194
|
*/
|
|
191
195
|
getOwnerInfo({}?: any): Promise<ApplicationAboutResponse>;
|
|
192
196
|
/**
|
|
@@ -122,6 +122,7 @@ class Configuration {
|
|
|
122
122
|
* retrieving staff members working at a particular ordering store.
|
|
123
123
|
* @param {string} [arg.user] - Mongo ID of the staff. Helps in retrieving
|
|
124
124
|
* the details of a particular staff member.
|
|
125
|
+
* @param {string} [arg.userName] - User name of the member
|
|
125
126
|
* @returns {Promise<AppStaffListResponse>} - Success response
|
|
126
127
|
* @summary: Get a list of staff.
|
|
127
128
|
* @description: Use this API to get a list of staff including the names, employee code, incentive status, assigned ordering stores, and title of each staff added to the application.
|
|
@@ -132,9 +133,10 @@ class Configuration {
|
|
|
132
133
|
orderIncent,
|
|
133
134
|
orderingStore,
|
|
134
135
|
user,
|
|
136
|
+
userName,
|
|
135
137
|
} = {}) {
|
|
136
138
|
const { error } = ConfigurationValidator.getAppStaffList().validate(
|
|
137
|
-
{ pageNo, pageSize, orderIncent, orderingStore, user },
|
|
139
|
+
{ pageNo, pageSize, orderIncent, orderingStore, user, userName },
|
|
138
140
|
{ abortEarly: false, allowUnknown: true }
|
|
139
141
|
);
|
|
140
142
|
if (error) {
|
|
@@ -145,7 +147,7 @@ class Configuration {
|
|
|
145
147
|
const {
|
|
146
148
|
error: warrning,
|
|
147
149
|
} = ConfigurationValidator.getAppStaffList().validate(
|
|
148
|
-
{ pageNo, pageSize, orderIncent, orderingStore, user },
|
|
150
|
+
{ pageNo, pageSize, orderIncent, orderingStore, user, userName },
|
|
149
151
|
{ abortEarly: false, allowUnknown: false }
|
|
150
152
|
);
|
|
151
153
|
if (warrning) {
|
|
@@ -162,6 +164,7 @@ class Configuration {
|
|
|
162
164
|
query_params["order_incent"] = orderIncent;
|
|
163
165
|
query_params["ordering_store"] = orderingStore;
|
|
164
166
|
query_params["user"] = user;
|
|
167
|
+
query_params["user_name"] = userName;
|
|
165
168
|
|
|
166
169
|
const xHeaders = {};
|
|
167
170
|
|
|
@@ -204,6 +207,7 @@ class Configuration {
|
|
|
204
207
|
* retrieving staff members working at a particular ordering store.
|
|
205
208
|
* @param {string} [arg.user] - Mongo ID of the staff. Helps in retrieving
|
|
206
209
|
* the details of a particular staff member.
|
|
210
|
+
* @param {string} [arg.userName] - User name of the member
|
|
207
211
|
* @summary: Get a list of staff.
|
|
208
212
|
* @description: Use this API to get a list of staff including the names, employee code, incentive status, assigned ordering stores, and title of each staff added to the application.
|
|
209
213
|
*/
|
|
@@ -212,6 +216,7 @@ class Configuration {
|
|
|
212
216
|
orderIncent,
|
|
213
217
|
orderingStore,
|
|
214
218
|
user,
|
|
219
|
+
userName,
|
|
215
220
|
} = {}) {
|
|
216
221
|
const paginator = new Paginator();
|
|
217
222
|
const callback = async () => {
|
|
@@ -224,6 +229,7 @@ class Configuration {
|
|
|
224
229
|
orderIncent: orderIncent,
|
|
225
230
|
orderingStore: orderingStore,
|
|
226
231
|
user: user,
|
|
232
|
+
userName: userName,
|
|
227
233
|
});
|
|
228
234
|
paginator.setPaginator({
|
|
229
235
|
hasNext: data.page.has_next ? true : false,
|
|
@@ -309,8 +315,8 @@ class Configuration {
|
|
|
309
315
|
/**
|
|
310
316
|
* @param {Object} arg - Arg object.
|
|
311
317
|
* @returns {Promise<Application>} - Success response
|
|
312
|
-
* @summary: Get current
|
|
313
|
-
* @description: Use this API to get the current
|
|
318
|
+
* @summary: Get current sales channel details
|
|
319
|
+
* @description: Use this API to get the current sales channel details which includes configurations that indicate the status of the website, domain, ID, tokens, images, etc.
|
|
314
320
|
*/
|
|
315
321
|
async getApplication({} = {}) {
|
|
316
322
|
const { error } = ConfigurationValidator.getApplication().validate(
|
|
@@ -373,7 +379,7 @@ class Configuration {
|
|
|
373
379
|
/**
|
|
374
380
|
* @param {Object} arg - Arg object.
|
|
375
381
|
* @returns {Promise<ApplicationDetail>} - Success response
|
|
376
|
-
* @summary: Get basic application
|
|
382
|
+
* @summary: Get basic details of the application
|
|
377
383
|
* @description: Use this API to retrieve only the basic details of the application which includes channel name, description, banner, logo, favicon, domain details, etc.
|
|
378
384
|
*/
|
|
379
385
|
async getBasicDetails({} = {}) {
|
|
@@ -755,7 +761,7 @@ class Configuration {
|
|
|
755
761
|
* @param {Object} arg - Arg object.
|
|
756
762
|
* @returns {Promise<LanguageResponse>} - Success response
|
|
757
763
|
* @summary: Get list of languages
|
|
758
|
-
* @description: Use this API to get a list of languages supported in the application
|
|
764
|
+
* @description: Use this API to get a list of languages supported in the application
|
|
759
765
|
*/
|
|
760
766
|
async getLanguages({} = {}) {
|
|
761
767
|
const { error } = ConfigurationValidator.getLanguages().validate(
|
|
@@ -886,7 +892,7 @@ class Configuration {
|
|
|
886
892
|
* page. Default value is 10.
|
|
887
893
|
* @param {string} [arg.q] - Store code or name of the ordering store.
|
|
888
894
|
* @returns {Promise<OrderingStores>} - Success response
|
|
889
|
-
* @summary: Get deployment stores
|
|
895
|
+
* @summary: Get all deployment stores
|
|
890
896
|
* @description: Use this API to retrieve the details of all the deployment stores (the selling locations where the application will be utilized for placing orders).
|
|
891
897
|
*/
|
|
892
898
|
async getOrderingStores({ pageNo, pageSize, q } = {}) {
|
|
@@ -955,7 +961,7 @@ class Configuration {
|
|
|
955
961
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
956
962
|
* page. Default value is 10.
|
|
957
963
|
* @param {string} [arg.q] - Store code or name of the ordering store.
|
|
958
|
-
* @summary: Get deployment stores
|
|
964
|
+
* @summary: Get all deployment stores
|
|
959
965
|
* @description: Use this API to retrieve the details of all the deployment stores (the selling locations where the application will be utilized for placing orders).
|
|
960
966
|
*/
|
|
961
967
|
getOrderingStoresPaginator({ pageSize, q } = {}) {
|
|
@@ -982,8 +988,8 @@ class Configuration {
|
|
|
982
988
|
/**
|
|
983
989
|
* @param {Object} arg - Arg object.
|
|
984
990
|
* @returns {Promise<ApplicationAboutResponse>} - Success response
|
|
985
|
-
* @summary: Get
|
|
986
|
-
* @description: Use this API to get the current
|
|
991
|
+
* @summary: Get sales channel, owner and seller information
|
|
992
|
+
* @description: Use this API to get the current sales channel details which includes channel name, description, banner, logo, favicon, domain details, etc. This API also retrieves the seller and owner information such as address, email address, and phone number.
|
|
987
993
|
*/
|
|
988
994
|
async getOwnerInfo({} = {}) {
|
|
989
995
|
const { error } = ConfigurationValidator.getOwnerInfo().validate(
|
|
@@ -347,6 +347,7 @@ class ContentModel {
|
|
|
347
347
|
static Detail() {
|
|
348
348
|
return Joi.object({
|
|
349
349
|
description: Joi.string().allow(""),
|
|
350
|
+
image_url: Joi.string().allow(""),
|
|
350
351
|
title: Joi.string().allow(""),
|
|
351
352
|
});
|
|
352
353
|
}
|
|
@@ -931,7 +932,9 @@ class ContentModel {
|
|
|
931
932
|
|
|
932
933
|
"shipping-policy",
|
|
933
934
|
|
|
934
|
-
"return-policy"
|
|
935
|
+
"return-policy",
|
|
936
|
+
|
|
937
|
+
"order-status"
|
|
935
938
|
);
|
|
936
939
|
}
|
|
937
940
|
}
|
|
@@ -11,7 +11,10 @@ declare class FileStorage {
|
|
|
11
11
|
updateUrls(urls: any): void;
|
|
12
12
|
/**
|
|
13
13
|
* @param {Object} arg - Arg object.
|
|
14
|
-
* @param {string} arg.namespace -
|
|
14
|
+
* @param {string} arg.namespace - Segregation of different types of
|
|
15
|
+
* files(products, orders, logistics etc), Required for validating the
|
|
16
|
+
* data of the file being uploaded, decides where exactly the file will be
|
|
17
|
+
* stored inside the storage bucket.
|
|
15
18
|
* @param {StartResponse} arg.body
|
|
16
19
|
* @returns {Promise<CompleteResponse>} - Success response
|
|
17
20
|
* @summary: Completes the upload process. After successfully uploading a file, call this API to finish the upload process.
|
|
@@ -50,7 +53,10 @@ declare class FileStorage {
|
|
|
50
53
|
}): Promise<SignUrlResponse>;
|
|
51
54
|
/**
|
|
52
55
|
* @param {Object} arg - Arg object.
|
|
53
|
-
* @param {string} arg.namespace -
|
|
56
|
+
* @param {string} arg.namespace - Segregation of different types of
|
|
57
|
+
* files(products, orders, logistics etc), Required for validating the
|
|
58
|
+
* data of the file being uploaded, decides where exactly the file will be
|
|
59
|
+
* stored inside the storage bucket.
|
|
54
60
|
* @param {StartRequest} arg.body
|
|
55
61
|
* @returns {Promise<StartResponse>} - Success response
|
|
56
62
|
* @summary: Initiates an upload and returns a storage link that is valid for 30 minutes. You can use the storage link to make subsequent upload request with file buffer or blob.
|
|
@@ -36,7 +36,10 @@ class FileStorage {
|
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* @param {Object} arg - Arg object.
|
|
39
|
-
* @param {string} arg.namespace -
|
|
39
|
+
* @param {string} arg.namespace - Segregation of different types of
|
|
40
|
+
* files(products, orders, logistics etc), Required for validating the
|
|
41
|
+
* data of the file being uploaded, decides where exactly the file will be
|
|
42
|
+
* stored inside the storage bucket.
|
|
40
43
|
* @param {StartResponse} arg.body
|
|
41
44
|
* @returns {Promise<CompleteResponse>} - Success response
|
|
42
45
|
* @summary: Completes the upload process. After successfully uploading a file, call this API to finish the upload process.
|
|
@@ -180,7 +183,10 @@ class FileStorage {
|
|
|
180
183
|
|
|
181
184
|
/**
|
|
182
185
|
* @param {Object} arg - Arg object.
|
|
183
|
-
* @param {string} arg.namespace -
|
|
186
|
+
* @param {string} arg.namespace - Segregation of different types of
|
|
187
|
+
* files(products, orders, logistics etc), Required for validating the
|
|
188
|
+
* data of the file being uploaded, decides where exactly the file will be
|
|
189
|
+
* stored inside the storage bucket.
|
|
184
190
|
* @param {StartRequest} arg.body
|
|
185
191
|
* @returns {Promise<StartResponse>} - Success response
|
|
186
192
|
* @summary: Initiates an upload and returns a storage link that is valid for 30 minutes. You can use the storage link to make subsequent upload request with file buffer or blob.
|
|
@@ -22,8 +22,8 @@ class FileStorageModel {
|
|
|
22
22
|
}
|
|
23
23
|
static CDN() {
|
|
24
24
|
return Joi.object({
|
|
25
|
-
absolute_url: Joi.string().allow(""),
|
|
26
|
-
relative_url: Joi.string().allow(""),
|
|
25
|
+
absolute_url: Joi.string().allow("").required(),
|
|
26
|
+
relative_url: Joi.string().allow("").required(),
|
|
27
27
|
url: Joi.string().allow("").required(),
|
|
28
28
|
});
|
|
29
29
|
}
|
|
@@ -108,14 +108,15 @@ class LogisticModel {
|
|
|
108
108
|
articles: Joi.array().items(Joi.any()).required(),
|
|
109
109
|
configuration: Joi.any().required(),
|
|
110
110
|
identifier: Joi.string().allow("").required(),
|
|
111
|
-
ignored_locations: Joi.array().items(Joi.
|
|
111
|
+
ignored_locations: Joi.array().items(Joi.number()).required(),
|
|
112
112
|
to_pincode: Joi.string().allow("").required(),
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
115
|
static ReAssignStoreResponse() {
|
|
116
116
|
return Joi.object({
|
|
117
|
-
|
|
117
|
+
assigned_stores: Joi.array().items(Joi.any()),
|
|
118
118
|
error: Joi.any().required(),
|
|
119
|
+
pystormbreaker_uuid: Joi.string().allow("").required(),
|
|
119
120
|
success: Joi.boolean().required(),
|
|
120
121
|
to_pincode: Joi.string().allow("").required(),
|
|
121
122
|
});
|
|
@@ -13,6 +13,7 @@ declare class Order {
|
|
|
13
13
|
getShipmentReasons: string;
|
|
14
14
|
sendOtpToShipmentCustomer: string;
|
|
15
15
|
trackShipment: string;
|
|
16
|
+
updateShipmentStatus: string;
|
|
16
17
|
verifyOtpShipmentCustomer: string;
|
|
17
18
|
};
|
|
18
19
|
_urls: {};
|
|
@@ -82,13 +83,13 @@ declare class Order {
|
|
|
82
83
|
* @param {Object} arg - Arg object.
|
|
83
84
|
* @param {string} arg.orderId - A unique number used for identifying and
|
|
84
85
|
* tracking your orders.
|
|
85
|
-
* @returns {Promise<
|
|
86
|
+
* @returns {Promise<OrderById>} - Success response
|
|
86
87
|
* @summary: Get POS Order
|
|
87
88
|
* @description: Use this API to retrieve a POS order and all its details such as tracking details, shipment, store information using Fynd Order ID.
|
|
88
89
|
*/
|
|
89
90
|
getPosOrderById({ orderId }?: {
|
|
90
91
|
orderId: string;
|
|
91
|
-
}): Promise<
|
|
92
|
+
}): Promise<OrderById>;
|
|
92
93
|
/**
|
|
93
94
|
* @param {Object} arg - Arg object.
|
|
94
95
|
* @param {string} arg.shipmentId - ID of the bag. An order may contain
|
|
@@ -155,6 +156,20 @@ declare class Order {
|
|
|
155
156
|
trackShipment({ shipmentId }?: {
|
|
156
157
|
shipmentId: string;
|
|
157
158
|
}): Promise<ShipmentTrack>;
|
|
159
|
+
/**
|
|
160
|
+
* @param {Object} arg - Arg object.
|
|
161
|
+
* @param {string} arg.shipmentId - ID of the shipment. An order may contain
|
|
162
|
+
* multiple items and may get divided into one or more shipment, each
|
|
163
|
+
* having its own ID.
|
|
164
|
+
* @param {UpdateShipmentStatusRequest} arg.body
|
|
165
|
+
* @returns {Promise<ShipmentApplicationStatusResponse>} - Success response
|
|
166
|
+
* @summary: Update the shipment status
|
|
167
|
+
* @description: Use this API to update the status of a shipment using its shipment ID.
|
|
168
|
+
*/
|
|
169
|
+
updateShipmentStatus({ shipmentId, body }?: {
|
|
170
|
+
shipmentId: string;
|
|
171
|
+
body: UpdateShipmentStatusRequest;
|
|
172
|
+
}): Promise<ShipmentApplicationStatusResponse>;
|
|
158
173
|
/**
|
|
159
174
|
* @param {Object} arg - Arg object.
|
|
160
175
|
* @param {string} arg.orderId - A unique number used for identifying and
|
|
@@ -29,6 +29,8 @@ class Order {
|
|
|
29
29
|
"/service/application/order/v1.0/orders/{order_id}/shipments/{shipment_id}/otp/send/",
|
|
30
30
|
trackShipment:
|
|
31
31
|
"/service/application/order/v1.0/orders/shipments/{shipment_id}/track",
|
|
32
|
+
updateShipmentStatus:
|
|
33
|
+
"/service/application/order/v1.0/orders/shipments/{shipment_id}/status",
|
|
32
34
|
verifyOtpShipmentCustomer:
|
|
33
35
|
"/service/application/order/v1.0/orders/{order_id}/shipments/{shipment_id}/otp/verify/",
|
|
34
36
|
};
|
|
@@ -334,7 +336,7 @@ class Order {
|
|
|
334
336
|
* @param {Object} arg - Arg object.
|
|
335
337
|
* @param {string} arg.orderId - A unique number used for identifying and
|
|
336
338
|
* tracking your orders.
|
|
337
|
-
* @returns {Promise<
|
|
339
|
+
* @returns {Promise<OrderById>} - Success response
|
|
338
340
|
* @summary: Get POS Order
|
|
339
341
|
* @description: Use this API to retrieve a POS order and all its details such as tracking details, shipment, store information using Fynd Order ID.
|
|
340
342
|
*/
|
|
@@ -376,7 +378,7 @@ class Order {
|
|
|
376
378
|
xHeaders
|
|
377
379
|
);
|
|
378
380
|
|
|
379
|
-
const { error: res_error } = OrderModel.
|
|
381
|
+
const { error: res_error } = OrderModel.OrderById().validate(response, {
|
|
380
382
|
abortEarly: false,
|
|
381
383
|
allowUnknown: false,
|
|
382
384
|
});
|
|
@@ -717,6 +719,72 @@ class Order {
|
|
|
717
719
|
return response;
|
|
718
720
|
}
|
|
719
721
|
|
|
722
|
+
/**
|
|
723
|
+
* @param {Object} arg - Arg object.
|
|
724
|
+
* @param {string} arg.shipmentId - ID of the shipment. An order may contain
|
|
725
|
+
* multiple items and may get divided into one or more shipment, each
|
|
726
|
+
* having its own ID.
|
|
727
|
+
* @param {UpdateShipmentStatusRequest} arg.body
|
|
728
|
+
* @returns {Promise<ShipmentApplicationStatusResponse>} - Success response
|
|
729
|
+
* @summary: Update the shipment status
|
|
730
|
+
* @description: Use this API to update the status of a shipment using its shipment ID.
|
|
731
|
+
*/
|
|
732
|
+
async updateShipmentStatus({ shipmentId, body } = {}) {
|
|
733
|
+
const { error } = OrderValidator.updateShipmentStatus().validate(
|
|
734
|
+
{ shipmentId, body },
|
|
735
|
+
{ abortEarly: false, allowUnknown: true }
|
|
736
|
+
);
|
|
737
|
+
if (error) {
|
|
738
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
// Showing warrnings if extra unknown parameters are found
|
|
742
|
+
const { error: warrning } = OrderValidator.updateShipmentStatus().validate(
|
|
743
|
+
{ shipmentId, body },
|
|
744
|
+
{ abortEarly: false, allowUnknown: false }
|
|
745
|
+
);
|
|
746
|
+
if (warrning) {
|
|
747
|
+
Logger({
|
|
748
|
+
level: "WARN",
|
|
749
|
+
message: "Parameter Validation warrnings for updateShipmentStatus",
|
|
750
|
+
});
|
|
751
|
+
Logger({ level: "WARN", message: warrning });
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
const query_params = {};
|
|
755
|
+
|
|
756
|
+
const xHeaders = {};
|
|
757
|
+
|
|
758
|
+
const response = await ApplicationAPIClient.execute(
|
|
759
|
+
this._conf,
|
|
760
|
+
"put",
|
|
761
|
+
constructUrl({
|
|
762
|
+
url: this._urls["updateShipmentStatus"],
|
|
763
|
+
params: { shipmentId },
|
|
764
|
+
}),
|
|
765
|
+
query_params,
|
|
766
|
+
body,
|
|
767
|
+
xHeaders
|
|
768
|
+
);
|
|
769
|
+
|
|
770
|
+
const {
|
|
771
|
+
error: res_error,
|
|
772
|
+
} = OrderModel.ShipmentApplicationStatusResponse().validate(response, {
|
|
773
|
+
abortEarly: false,
|
|
774
|
+
allowUnknown: false,
|
|
775
|
+
});
|
|
776
|
+
|
|
777
|
+
if (res_error) {
|
|
778
|
+
Logger({
|
|
779
|
+
level: "WARN",
|
|
780
|
+
message: "Response Validation Warnnings for updateShipmentStatus",
|
|
781
|
+
});
|
|
782
|
+
Logger({ level: "WARN", message: res_error });
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
return response;
|
|
786
|
+
}
|
|
787
|
+
|
|
720
788
|
/**
|
|
721
789
|
* @param {Object} arg - Arg object.
|
|
722
790
|
* @param {string} arg.orderId - A unique number used for identifying and
|