@gofynd/fdk-client-javascript 1.1.0 → 1.1.1
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 +0 -1
- package/package.json +1 -1
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +6 -1
- package/sdk/application/Catalog/CatalogApplicationClient.js +11 -2
- package/sdk/application/Catalog/CatalogApplicationValidator.js +2 -0
- package/sdk/application/Content/ContentApplicationModel.js +0 -4
- package/sdk/application/Lead/LeadApplicationModel.js +1 -0
- package/sdk/application/Order/OrderApplicationClient.d.ts +0 -15
- package/sdk/application/Order/OrderApplicationClient.js +0 -68
- package/sdk/application/Order/OrderApplicationModel.d.ts +0 -17
- package/sdk/application/Order/OrderApplicationModel.js +0 -111
- package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -1
- package/sdk/application/Order/OrderApplicationValidator.js +0 -7
- package/sdk/common/AxiosHelper.js +1 -1
- package/sdk/common/Constant.d.ts +0 -18
- package/sdk/common/Constant.js +0 -22
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +29 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +181 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +3 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +17 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +4 -0
- package/sdk/platform/Cart/CartPlatformModel.js +37 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +3 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +5 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +1 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +1 -1
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1 -1
- package/sdk/platform/Catalog/CatalogPlatformModel.js +3 -7
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +0 -183
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +0 -417
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +0 -10
- package/sdk/platform/Communication/CommunicationPlatformClient.js +0 -26
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +4 -0
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +0 -22
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +0 -56
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +12 -1
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +62 -2
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +6 -0
- package/sdk/platform/Content/ContentPlatformModel.js +0 -4
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformClient.js +1 -1
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +1 -0
- package/sdk/platform/Discount/DiscountPlatformModel.js +15 -0
- package/sdk/platform/Discount/DiscountPlatformValidator.js +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +1 -1
- package/sdk/platform/Lead/LeadPlatformModel.js +1 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +1 -47
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +5 -201
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -3
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +1 -26
- package/sdk/platform/Order/OrderPlatformClient.d.ts +51 -183
- package/sdk/platform/Order/OrderPlatformClient.js +243 -931
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4 -20
- package/sdk/platform/Order/OrderPlatformModel.js +38 -182
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +3 -12
- package/sdk/platform/Order/OrderPlatformValidator.js +19 -95
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +24 -10
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +111 -44
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +2 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +13 -5
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2 -0
- package/sdk/platform/Payment/PaymentPlatformModel.js +12 -0
- package/sdk/platform/PlatformApplicationClient.d.ts +12 -41
- package/sdk/platform/PlatformApplicationClient.js +13 -45
- package/sdk/platform/PlatformClient.d.ts +90 -264
- package/sdk/platform/PlatformClient.js +110 -316
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +11 -0
- package/sdk/platform/Share/SharePlatformApplicationClient.js +61 -0
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -0
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -0
- package/sdk/platform/Share/SharePlatformModel.d.ts +2 -0
- package/sdk/platform/Share/SharePlatformModel.js +11 -0
- package/sdk/platform/index.d.ts +0 -1
- package/sdk/platform/index.js +0 -2
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +0 -109
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +0 -558
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +0 -11
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +0 -56
- package/sdk/platform/Analytics/AnalyticsPlatformClient.d.ts +0 -88
- package/sdk/platform/Analytics/AnalyticsPlatformClient.js +0 -361
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +0 -23
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +0 -169
- package/sdk/platform/Analytics/AnalyticsPlatformValidator.d.ts +0 -7
- package/sdk/platform/Analytics/AnalyticsPlatformValidator.js +0 -38
package/README.md
CHANGED
|
@@ -186,6 +186,5 @@ import { ApplicationConfig, ApplicationClient } from "fdk-client-javascript";
|
|
|
186
186
|
- [Public Front](documentation/public/README.md)
|
|
187
187
|
- [Application Front](documentation/application/README.md)
|
|
188
188
|
- [Platform Front](documentation/platform/README.md)
|
|
189
|
-
- [Admin Front](documentation/admin/README.md)
|
|
190
189
|
- [Partner Front](documentation/partner/README.md)
|
|
191
190
|
|
package/package.json
CHANGED
|
@@ -146,17 +146,22 @@ declare class Catalog {
|
|
|
146
146
|
* either ascending or descending order. See the supported values below.
|
|
147
147
|
* @param {string} [arg.pageId] - Page ID to retrieve next set of results.
|
|
148
148
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
149
|
+
* @param {number} [arg.pageNo] - Page Number to retrieve next set of results.
|
|
150
|
+
* @param {string} [arg.pageType] - Page Type to retrieve set of results can
|
|
151
|
+
* be cursor or number.
|
|
149
152
|
* @returns {Promise<ProductListingResponse>} - Success response
|
|
150
153
|
* @summary: Get the items in a collection
|
|
151
154
|
* @description: Get items in a collection specified by its `slug`.
|
|
152
155
|
*/
|
|
153
|
-
getCollectionItemsBySlug({ slug, f, filters, sortOn, pageId, pageSize, }?: {
|
|
156
|
+
getCollectionItemsBySlug({ slug, f, filters, sortOn, pageId, pageSize, pageNo, pageType, }?: {
|
|
154
157
|
slug: string;
|
|
155
158
|
f?: string;
|
|
156
159
|
filters?: boolean;
|
|
157
160
|
sortOn?: string;
|
|
158
161
|
pageId?: string;
|
|
159
162
|
pageSize?: number;
|
|
163
|
+
pageNo?: number;
|
|
164
|
+
pageType?: string;
|
|
160
165
|
}): Promise<ProductListingResponse>;
|
|
161
166
|
/**
|
|
162
167
|
* @param {Object} arg - Arg object.
|
|
@@ -530,6 +530,9 @@ class Catalog {
|
|
|
530
530
|
* either ascending or descending order. See the supported values below.
|
|
531
531
|
* @param {string} [arg.pageId] - Page ID to retrieve next set of results.
|
|
532
532
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
533
|
+
* @param {number} [arg.pageNo] - Page Number to retrieve next set of results.
|
|
534
|
+
* @param {string} [arg.pageType] - Page Type to retrieve set of results can
|
|
535
|
+
* be cursor or number.
|
|
533
536
|
* @returns {Promise<ProductListingResponse>} - Success response
|
|
534
537
|
* @summary: Get the items in a collection
|
|
535
538
|
* @description: Get items in a collection specified by its `slug`.
|
|
@@ -541,9 +544,11 @@ class Catalog {
|
|
|
541
544
|
sortOn,
|
|
542
545
|
pageId,
|
|
543
546
|
pageSize,
|
|
547
|
+
pageNo,
|
|
548
|
+
pageType,
|
|
544
549
|
} = {}) {
|
|
545
550
|
const { error } = CatalogValidator.getCollectionItemsBySlug().validate(
|
|
546
|
-
{ slug, f, filters, sortOn, pageId, pageSize },
|
|
551
|
+
{ slug, f, filters, sortOn, pageId, pageSize, pageNo, pageType },
|
|
547
552
|
{ abortEarly: false, allowUnknown: true }
|
|
548
553
|
);
|
|
549
554
|
if (error) {
|
|
@@ -554,7 +559,7 @@ class Catalog {
|
|
|
554
559
|
const {
|
|
555
560
|
error: warrning,
|
|
556
561
|
} = CatalogValidator.getCollectionItemsBySlug().validate(
|
|
557
|
-
{ slug, f, filters, sortOn, pageId, pageSize },
|
|
562
|
+
{ slug, f, filters, sortOn, pageId, pageSize, pageNo, pageType },
|
|
558
563
|
{ abortEarly: false, allowUnknown: false }
|
|
559
564
|
);
|
|
560
565
|
if (warrning) {
|
|
@@ -571,6 +576,8 @@ class Catalog {
|
|
|
571
576
|
query_params["sort_on"] = sortOn;
|
|
572
577
|
query_params["page_id"] = pageId;
|
|
573
578
|
query_params["page_size"] = pageSize;
|
|
579
|
+
query_params["page_no"] = pageNo;
|
|
580
|
+
query_params["page_type"] = pageType;
|
|
574
581
|
|
|
575
582
|
const xHeaders = {};
|
|
576
583
|
|
|
@@ -641,6 +648,8 @@ class Catalog {
|
|
|
641
648
|
sortOn: sortOn,
|
|
642
649
|
pageId: pageId,
|
|
643
650
|
pageSize: pageSize,
|
|
651
|
+
pageNo: pageNo,
|
|
652
|
+
pageType: pageType,
|
|
644
653
|
});
|
|
645
654
|
paginator.setPaginator({
|
|
646
655
|
hasNext: data.page.has_next ? true : false,
|
|
@@ -13,7 +13,6 @@ declare class Order {
|
|
|
13
13
|
getShipmentReasons: string;
|
|
14
14
|
sendOtpToShipmentCustomer: string;
|
|
15
15
|
trackShipment: string;
|
|
16
|
-
updateShipmentStatus: string;
|
|
17
16
|
verifyOtpShipmentCustomer: string;
|
|
18
17
|
};
|
|
19
18
|
_urls: {};
|
|
@@ -156,20 +155,6 @@ declare class Order {
|
|
|
156
155
|
trackShipment({ shipmentId }?: {
|
|
157
156
|
shipmentId: string;
|
|
158
157
|
}): 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>;
|
|
173
158
|
/**
|
|
174
159
|
* @param {Object} arg - Arg object.
|
|
175
160
|
* @param {string} arg.orderId - A unique number used for identifying and
|
|
@@ -29,8 +29,6 @@ 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",
|
|
34
32
|
verifyOtpShipmentCustomer:
|
|
35
33
|
"/service/application/order/v1.0/orders/{order_id}/shipments/{shipment_id}/otp/verify/",
|
|
36
34
|
};
|
|
@@ -719,72 +717,6 @@ class Order {
|
|
|
719
717
|
return response;
|
|
720
718
|
}
|
|
721
719
|
|
|
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
|
-
|
|
788
720
|
/**
|
|
789
721
|
* @param {Object} arg - Arg object.
|
|
790
722
|
* @param {string} arg.orderId - A unique number used for identifying and
|
|
@@ -11,12 +11,7 @@ declare class OrderModel {
|
|
|
11
11
|
static BreakupValues(): any;
|
|
12
12
|
static CurrentStatus(): any;
|
|
13
13
|
static CustomerDetailsResponse(): any;
|
|
14
|
-
static DataUpdates(): any;
|
|
15
14
|
static DeliveryAddress(): any;
|
|
16
|
-
static EntitiesDataUpdates(): any;
|
|
17
|
-
static EntitiesReasons(): any;
|
|
18
|
-
static EntityReasonData(): any;
|
|
19
|
-
static ErrorResponse(): any;
|
|
20
15
|
static FinancialBreakup(): any;
|
|
21
16
|
static FulfillingCompany(): any;
|
|
22
17
|
static FulfillingStore(): any;
|
|
@@ -32,35 +27,23 @@ declare class OrderModel {
|
|
|
32
27
|
static OrderSchema(): any;
|
|
33
28
|
static OrderStatuses(): any;
|
|
34
29
|
static Prices(): any;
|
|
35
|
-
static Products(): any;
|
|
36
|
-
static ProductsDataUpdates(): any;
|
|
37
|
-
static ProductsDataUpdatesFilters(): any;
|
|
38
|
-
static ProductsReasons(): any;
|
|
39
|
-
static ProductsReasonsData(): any;
|
|
40
|
-
static ProductsReasonsFilters(): any;
|
|
41
30
|
static Promise(): any;
|
|
42
31
|
static QuestionSet(): any;
|
|
43
|
-
static ReasonsData(): any;
|
|
44
32
|
static ResponseGetInvoiceShipment(): any;
|
|
45
33
|
static SendOtpToCustomerResponse(): any;
|
|
46
|
-
static ShipmentApplicationStatusResponse(): any;
|
|
47
34
|
static ShipmentBagReasons(): any;
|
|
48
35
|
static ShipmentById(): any;
|
|
49
36
|
static ShipmentPayment(): any;
|
|
50
37
|
static ShipmentReason(): any;
|
|
51
38
|
static ShipmentReasons(): any;
|
|
52
39
|
static Shipments(): any;
|
|
53
|
-
static ShipmentsRequest(): any;
|
|
54
40
|
static ShipmentStatus(): any;
|
|
55
41
|
static ShipmentTotalDetails(): any;
|
|
56
42
|
static ShipmentTrack(): any;
|
|
57
43
|
static ShipmentUserInfo(): any;
|
|
58
|
-
static StatuesRequest(): any;
|
|
59
|
-
static StatusesBodyResponse(): any;
|
|
60
44
|
static TimeStampData(): any;
|
|
61
45
|
static Track(): any;
|
|
62
46
|
static TrackingDetails(): any;
|
|
63
|
-
static UpdateShipmentStatusRequest(): any;
|
|
64
47
|
static UserInfo(): any;
|
|
65
48
|
static VerifyOtp(): any;
|
|
66
49
|
static VerifyOtpResponse(): any;
|
|
@@ -105,12 +105,6 @@ class OrderModel {
|
|
|
105
105
|
shipment_id: Joi.string().allow(""),
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
|
-
static DataUpdates() {
|
|
109
|
-
return Joi.object({
|
|
110
|
-
entities: Joi.array().items(OrderModel.EntitiesDataUpdates()),
|
|
111
|
-
products: Joi.array().items(OrderModel.ProductsDataUpdates()),
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
108
|
static DeliveryAddress() {
|
|
115
109
|
return Joi.object({
|
|
116
110
|
address: Joi.string().allow(""),
|
|
@@ -137,33 +131,6 @@ class OrderModel {
|
|
|
137
131
|
version: Joi.string().allow(""),
|
|
138
132
|
});
|
|
139
133
|
}
|
|
140
|
-
static EntitiesDataUpdates() {
|
|
141
|
-
return Joi.object({
|
|
142
|
-
data: Joi.any(),
|
|
143
|
-
filters: Joi.array().items(Joi.any()),
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
static EntitiesReasons() {
|
|
147
|
-
return Joi.object({
|
|
148
|
-
data: OrderModel.EntityReasonData(),
|
|
149
|
-
filters: Joi.array().items(Joi.any()),
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
static EntityReasonData() {
|
|
153
|
-
return Joi.object({
|
|
154
|
-
reason_id: Joi.number(),
|
|
155
|
-
reason_text: Joi.string().allow(""),
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
static ErrorResponse() {
|
|
159
|
-
return Joi.object({
|
|
160
|
-
code: Joi.string().allow("").allow(null),
|
|
161
|
-
exception: Joi.string().allow("").allow(null),
|
|
162
|
-
message: Joi.string().allow("").allow(null),
|
|
163
|
-
stack_trace: Joi.string().allow("").allow(null),
|
|
164
|
-
status: Joi.number(),
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
134
|
static FinancialBreakup() {
|
|
168
135
|
return Joi.object({
|
|
169
136
|
added_to_fynd_cash: Joi.boolean(),
|
|
@@ -319,44 +286,6 @@ class OrderModel {
|
|
|
319
286
|
value_of_good: Joi.number(),
|
|
320
287
|
});
|
|
321
288
|
}
|
|
322
|
-
static Products() {
|
|
323
|
-
return Joi.object({
|
|
324
|
-
identifier: Joi.string().allow(""),
|
|
325
|
-
line_number: Joi.number(),
|
|
326
|
-
quantity: Joi.number(),
|
|
327
|
-
});
|
|
328
|
-
}
|
|
329
|
-
static ProductsDataUpdates() {
|
|
330
|
-
return Joi.object({
|
|
331
|
-
data: Joi.any(),
|
|
332
|
-
filters: Joi.array().items(OrderModel.ProductsDataUpdatesFilters()),
|
|
333
|
-
});
|
|
334
|
-
}
|
|
335
|
-
static ProductsDataUpdatesFilters() {
|
|
336
|
-
return Joi.object({
|
|
337
|
-
identifier: Joi.string().allow(""),
|
|
338
|
-
line_number: Joi.number(),
|
|
339
|
-
});
|
|
340
|
-
}
|
|
341
|
-
static ProductsReasons() {
|
|
342
|
-
return Joi.object({
|
|
343
|
-
data: OrderModel.ProductsReasonsData(),
|
|
344
|
-
filters: Joi.array().items(OrderModel.ProductsReasonsFilters()),
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
static ProductsReasonsData() {
|
|
348
|
-
return Joi.object({
|
|
349
|
-
reason_id: Joi.number(),
|
|
350
|
-
reason_text: Joi.string().allow(""),
|
|
351
|
-
});
|
|
352
|
-
}
|
|
353
|
-
static ProductsReasonsFilters() {
|
|
354
|
-
return Joi.object({
|
|
355
|
-
identifier: Joi.string().allow(""),
|
|
356
|
-
line_number: Joi.number(),
|
|
357
|
-
quantity: Joi.number(),
|
|
358
|
-
});
|
|
359
|
-
}
|
|
360
289
|
static Promise() {
|
|
361
290
|
return Joi.object({
|
|
362
291
|
show_promise: Joi.boolean(),
|
|
@@ -369,12 +298,6 @@ class OrderModel {
|
|
|
369
298
|
id: Joi.number(),
|
|
370
299
|
});
|
|
371
300
|
}
|
|
372
|
-
static ReasonsData() {
|
|
373
|
-
return Joi.object({
|
|
374
|
-
entities: Joi.array().items(OrderModel.EntitiesReasons()),
|
|
375
|
-
products: Joi.array().items(OrderModel.ProductsReasons()),
|
|
376
|
-
});
|
|
377
|
-
}
|
|
378
301
|
static ResponseGetInvoiceShipment() {
|
|
379
302
|
return Joi.object({
|
|
380
303
|
presigned_type: Joi.string().allow("").required(),
|
|
@@ -391,11 +314,6 @@ class OrderModel {
|
|
|
391
314
|
success: Joi.boolean(),
|
|
392
315
|
});
|
|
393
316
|
}
|
|
394
|
-
static ShipmentApplicationStatusResponse() {
|
|
395
|
-
return Joi.object({
|
|
396
|
-
statuses: Joi.array().items(OrderModel.StatusesBodyResponse()),
|
|
397
|
-
});
|
|
398
|
-
}
|
|
399
317
|
static ShipmentBagReasons() {
|
|
400
318
|
return Joi.object({
|
|
401
319
|
reasons: Joi.array().items(OrderModel.BagReasons()),
|
|
@@ -472,14 +390,6 @@ class OrderModel {
|
|
|
472
390
|
user_info: OrderModel.ShipmentUserInfo(),
|
|
473
391
|
});
|
|
474
392
|
}
|
|
475
|
-
static ShipmentsRequest() {
|
|
476
|
-
return Joi.object({
|
|
477
|
-
data_updates: OrderModel.DataUpdates(),
|
|
478
|
-
identifier: Joi.string().allow("").required(),
|
|
479
|
-
products: Joi.array().items(OrderModel.Products()),
|
|
480
|
-
reasons: OrderModel.ReasonsData(),
|
|
481
|
-
});
|
|
482
|
-
}
|
|
483
393
|
static ShipmentStatus() {
|
|
484
394
|
return Joi.object({
|
|
485
395
|
hex_code: Joi.string().allow(""),
|
|
@@ -506,18 +416,6 @@ class OrderModel {
|
|
|
506
416
|
mobile: Joi.string().allow(""),
|
|
507
417
|
});
|
|
508
418
|
}
|
|
509
|
-
static StatuesRequest() {
|
|
510
|
-
return Joi.object({
|
|
511
|
-
exclude_bags_next_state: Joi.string().allow(""),
|
|
512
|
-
shipments: Joi.array().items(OrderModel.ShipmentsRequest()),
|
|
513
|
-
status: Joi.string().allow(""),
|
|
514
|
-
});
|
|
515
|
-
}
|
|
516
|
-
static StatusesBodyResponse() {
|
|
517
|
-
return Joi.object({
|
|
518
|
-
shipments: Joi.array().items(Joi.any()),
|
|
519
|
-
});
|
|
520
|
-
}
|
|
521
419
|
static TimeStampData() {
|
|
522
420
|
return Joi.object({
|
|
523
421
|
max: Joi.string().allow(""),
|
|
@@ -545,15 +443,6 @@ class OrderModel {
|
|
|
545
443
|
tracking_details: Joi.array().items(OrderModel.NestedTrackingDetails()),
|
|
546
444
|
});
|
|
547
445
|
}
|
|
548
|
-
static UpdateShipmentStatusRequest() {
|
|
549
|
-
return Joi.object({
|
|
550
|
-
force_transition: Joi.boolean(),
|
|
551
|
-
lock_after_transition: Joi.boolean(),
|
|
552
|
-
statuses: Joi.array().items(OrderModel.StatuesRequest()),
|
|
553
|
-
task: Joi.boolean(),
|
|
554
|
-
unlock_before_transition: Joi.boolean(),
|
|
555
|
-
});
|
|
556
|
-
}
|
|
557
446
|
static UserInfo() {
|
|
558
447
|
return Joi.object({
|
|
559
448
|
email: Joi.string().allow(""),
|
|
@@ -70,13 +70,6 @@ class OrderValidator {
|
|
|
70
70
|
}).required();
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
static updateShipmentStatus() {
|
|
74
|
-
return Joi.object({
|
|
75
|
-
shipmentId: Joi.string().allow("").required(),
|
|
76
|
-
body: OrderModel.UpdateShipmentStatusRequest().required(),
|
|
77
|
-
}).required();
|
|
78
|
-
}
|
|
79
|
-
|
|
80
73
|
static verifyOtpShipmentCustomer() {
|
|
81
74
|
return Joi.object({
|
|
82
75
|
orderId: Joi.string().allow("").required(),
|
|
@@ -38,7 +38,7 @@ function requestInterceptorFn() {
|
|
|
38
38
|
}
|
|
39
39
|
const { host, pathname, search } = new URL(url);
|
|
40
40
|
const { data, headers, method, params } = config;
|
|
41
|
-
headers["x-fp-sdk-version"] = "1.
|
|
41
|
+
headers["x-fp-sdk-version"] = "1.1.1";
|
|
42
42
|
let querySearchObj = querystring.parse(search);
|
|
43
43
|
querySearchObj = { ...querySearchObj, ...params };
|
|
44
44
|
let queryParam = "";
|
package/sdk/common/Constant.d.ts
CHANGED
|
@@ -20,8 +20,6 @@ export namespace AVAILABLE_PAGE_TYPE {
|
|
|
20
20
|
const PAGE: string;
|
|
21
21
|
const POLICY: string;
|
|
22
22
|
const PRODUCT: string;
|
|
23
|
-
const PRODUCT_REVIEWS: string;
|
|
24
|
-
const ADD_PRODUCT_REVIEW: string;
|
|
25
23
|
const PRODUCT_REQUEST: string;
|
|
26
24
|
const PRODUCTS: string;
|
|
27
25
|
const PROFILE: string;
|
|
@@ -168,22 +166,6 @@ export const NAVIGATORS: {
|
|
|
168
166
|
required: boolean;
|
|
169
167
|
}[];
|
|
170
168
|
};
|
|
171
|
-
"product-reviews": {
|
|
172
|
-
name: string;
|
|
173
|
-
link: string;
|
|
174
|
-
params: {
|
|
175
|
-
key: string;
|
|
176
|
-
required: boolean;
|
|
177
|
-
}[];
|
|
178
|
-
};
|
|
179
|
-
"add-product-review": {
|
|
180
|
-
name: string;
|
|
181
|
-
link: string;
|
|
182
|
-
params: {
|
|
183
|
-
key: string;
|
|
184
|
-
required: boolean;
|
|
185
|
-
}[];
|
|
186
|
-
};
|
|
187
169
|
"product-request": {
|
|
188
170
|
name: string;
|
|
189
171
|
link: string;
|
package/sdk/common/Constant.js
CHANGED
|
@@ -20,8 +20,6 @@ const AVAILABLE_PAGE_TYPE = {
|
|
|
20
20
|
PAGE: "page",
|
|
21
21
|
POLICY: "policy",
|
|
22
22
|
PRODUCT: "product",
|
|
23
|
-
PRODUCT_REVIEWS: "product-reviews",
|
|
24
|
-
ADD_PRODUCT_REVIEW: "add-product-review",
|
|
25
23
|
PRODUCT_REQUEST: "product-request",
|
|
26
24
|
PRODUCTS: "products",
|
|
27
25
|
PROFILE: "profile",
|
|
@@ -189,26 +187,6 @@ const NAVIGATORS = {
|
|
|
189
187
|
},
|
|
190
188
|
],
|
|
191
189
|
},
|
|
192
|
-
"product-reviews": {
|
|
193
|
-
name: "Product Reviews",
|
|
194
|
-
link: "/product/:slug/reviews",
|
|
195
|
-
params: [
|
|
196
|
-
{
|
|
197
|
-
key: "slug",
|
|
198
|
-
required: true,
|
|
199
|
-
},
|
|
200
|
-
],
|
|
201
|
-
},
|
|
202
|
-
"add-product-review": {
|
|
203
|
-
name: "Add Product review",
|
|
204
|
-
link: "/product/:slug/add-review",
|
|
205
|
-
params: [
|
|
206
|
-
{
|
|
207
|
-
key: "slug",
|
|
208
|
-
required: true,
|
|
209
|
-
},
|
|
210
|
-
],
|
|
211
|
-
},
|
|
212
190
|
"product-request": {
|
|
213
191
|
name: "Product Request",
|
|
214
192
|
link: "/product-request/",
|
|
@@ -37,6 +37,16 @@ declare class Cart {
|
|
|
37
37
|
checkoutCart({ body }?: {
|
|
38
38
|
body: OpenApiPlatformCheckoutReq;
|
|
39
39
|
}): Promise<OpenApiCheckoutResponse>;
|
|
40
|
+
/**
|
|
41
|
+
* @param {Object} arg - Arg object.
|
|
42
|
+
* @param {CartMetaConfigAdd} arg.body
|
|
43
|
+
* @returns {Promise<CartMetaConfigAdd>} - Success response
|
|
44
|
+
* @summary: Create new cart meta configuration
|
|
45
|
+
* @description: Create new cart meta configuration
|
|
46
|
+
*/
|
|
47
|
+
createCartMetaConfig({ body }?: {
|
|
48
|
+
body: CartMetaConfigAdd;
|
|
49
|
+
}): Promise<CartMetaConfigAdd>;
|
|
40
50
|
/**
|
|
41
51
|
* @param {Object} arg - Arg object.
|
|
42
52
|
* @param {CouponAdd} arg.body
|
|
@@ -67,6 +77,13 @@ declare class Cart {
|
|
|
67
77
|
fetchAndvalidateCartItems({ body }?: {
|
|
68
78
|
body: OpenapiCartDetailsRequest;
|
|
69
79
|
}): Promise<OpenapiCartDetailsResponse>;
|
|
80
|
+
/**
|
|
81
|
+
* @param {Object} arg - Arg object.
|
|
82
|
+
* @returns {Promise<CartMetaConfigAdd>} - Success response
|
|
83
|
+
* @summary: Fetch cart meta configuration
|
|
84
|
+
* @description: Fetch cart meta configuration
|
|
85
|
+
*/
|
|
86
|
+
fetchCartMetaConfig({}?: any): Promise<CartMetaConfigAdd>;
|
|
70
87
|
/**
|
|
71
88
|
* @param {Object} arg - Arg object.
|
|
72
89
|
* @param {number} [arg.pageNo] -
|
|
@@ -285,6 +302,18 @@ declare class Cart {
|
|
|
285
302
|
b?: boolean;
|
|
286
303
|
body: UpdateCartRequest;
|
|
287
304
|
}): Promise<UpdateCartDetailResponse>;
|
|
305
|
+
/**
|
|
306
|
+
* @param {Object} arg - Arg object.
|
|
307
|
+
* @param {string} arg.cartMetaId -
|
|
308
|
+
* @param {CartMetaConfigUpdate} arg.body
|
|
309
|
+
* @returns {Promise<CartMetaConfigUpdate>} - Success response
|
|
310
|
+
* @summary: Update cart meta configuration
|
|
311
|
+
* @description: Update cart meta configuration
|
|
312
|
+
*/
|
|
313
|
+
updateCartMetaConfig({ cartMetaId, body }?: {
|
|
314
|
+
cartMetaId: string;
|
|
315
|
+
body: CartMetaConfigUpdate;
|
|
316
|
+
}): Promise<CartMetaConfigUpdate>;
|
|
288
317
|
/**
|
|
289
318
|
* @param {Object} arg - Arg object.
|
|
290
319
|
* @param {string} arg.id -
|