@gofynd/fdk-client-javascript 1.4.16-beta.1 → 1.4.16-beta.2
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 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +5 -5
- package/sdk/application/Cart/CartApplicationClient.js +26 -268
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +16 -16
- package/sdk/application/Catalog/CatalogApplicationClient.js +90 -339
- package/sdk/application/Common/CommonApplicationClient.js +1 -16
- package/sdk/application/Communication/CommunicationApplicationClient.js +1 -24
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +2 -2
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +11 -134
- package/sdk/application/Content/ContentApplicationClient.d.ts +40 -8
- package/sdk/application/Content/ContentApplicationClient.js +174 -211
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +11 -30
- package/sdk/application/Finance/FinanceApplicationClient.js +1 -16
- package/sdk/application/Lead/LeadApplicationClient.d.ts +4 -4
- package/sdk/application/Lead/LeadApplicationClient.js +21 -52
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +6 -6
- package/sdk/application/Logistic/LogisticApplicationClient.js +40 -153
- package/sdk/application/Order/OrderApplicationClient.d.ts +11 -11
- package/sdk/application/Order/OrderApplicationClient.js +68 -153
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +1 -1
- package/sdk/application/Payment/PaymentApplicationClient.js +6 -437
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +1 -1
- package/sdk/application/Rewards/RewardsApplicationClient.js +6 -59
- package/sdk/application/Share/ShareApplicationClient.d.ts +4 -4
- package/sdk/application/Share/ShareApplicationClient.js +21 -75
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +3 -3
- package/sdk/application/Theme/ThemeApplicationClient.js +19 -47
- package/sdk/application/User/UserApplicationClient.js +1 -407
- package/sdk/application/Webhook/WebhookApplicationClient.js +1 -8
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +4 -4
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +35 -0
- package/sdk/platform/Cart/CartPlatformModel.js +16 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +4 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +80 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +571 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +75 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +88 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +131 -5
- package/sdk/platform/Content/ContentPlatformModel.js +110 -4
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +0 -10
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +0 -92
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
- package/sdk/platform/Order/OrderPlatformClient.d.ts +10 -0
- package/sdk/platform/Order/OrderPlatformClient.js +99 -0
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +33 -1
- package/sdk/platform/Order/OrderPlatformValidator.js +20 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +0 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +0 -118
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +1 -53
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +0 -29
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +10 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +119 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +58 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +30 -0
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/Share/SharePlatformApplicationClient.js +7 -7
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +3 -6
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +2 -2
- package/sdk/platform/Share/SharePlatformModel.d.ts +10 -2
- package/sdk/platform/Share/SharePlatformModel.js +4 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.js +1 -16
- package/sdk/public/Content/ContentPublicClient.d.ts +3 -3
- package/sdk/public/Content/ContentPublicClient.js +16 -104
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +6 -11
- package/sdk/public/Webhook/WebhookPublicClient.js +1 -40
|
@@ -6,6 +6,7 @@ const {
|
|
|
6
6
|
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
7
7
|
const constructUrl = require("../constructUrl");
|
|
8
8
|
const Paginator = require("../../common/Paginator");
|
|
9
|
+
const { validateRequiredParams } = require("../../common/Validator");
|
|
9
10
|
|
|
10
11
|
class Finance {
|
|
11
12
|
constructor(_conf) {
|
|
@@ -44,14 +45,6 @@ class Finance {
|
|
|
44
45
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
45
46
|
{ responseHeaders } = { responseHeaders: false }
|
|
46
47
|
) {
|
|
47
|
-
let invalidInput = [];
|
|
48
|
-
if (invalidInput.length) {
|
|
49
|
-
const error = new Error();
|
|
50
|
-
error.message = "Missing required field";
|
|
51
|
-
error.details = invalidInput;
|
|
52
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
53
|
-
}
|
|
54
|
-
|
|
55
48
|
const query_params = {};
|
|
56
49
|
|
|
57
50
|
const xHeaders = {};
|
|
@@ -89,14 +82,6 @@ class Finance {
|
|
|
89
82
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
90
83
|
{ responseHeaders } = { responseHeaders: false }
|
|
91
84
|
) {
|
|
92
|
-
let invalidInput = [];
|
|
93
|
-
if (invalidInput.length) {
|
|
94
|
-
const error = new Error();
|
|
95
|
-
error.message = "Missing required field";
|
|
96
|
-
error.details = invalidInput;
|
|
97
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
98
|
-
}
|
|
99
|
-
|
|
100
85
|
const query_params = {};
|
|
101
86
|
|
|
102
87
|
const xHeaders = {};
|
|
@@ -19,7 +19,7 @@ declare class Lead {
|
|
|
19
19
|
* @summary: Log ticket history
|
|
20
20
|
* @description: Create a history entry for a specific support ticket. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/createHistory/).
|
|
21
21
|
*/
|
|
22
|
-
createHistory({ id, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<TicketHistory>;
|
|
22
|
+
createHistory({ id, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<TicketHistory>;
|
|
23
23
|
/**
|
|
24
24
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
25
25
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -37,7 +37,7 @@ declare class Lead {
|
|
|
37
37
|
* @summary: Get custom form
|
|
38
38
|
* @description: Get a customizable form template for data collection. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/getCustomForm/).
|
|
39
39
|
*/
|
|
40
|
-
getCustomForm({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CustomForm>;
|
|
40
|
+
getCustomForm({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<CustomForm>;
|
|
41
41
|
/**
|
|
42
42
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
43
43
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -46,7 +46,7 @@ declare class Lead {
|
|
|
46
46
|
* @summary: Get a support ticket
|
|
47
47
|
* @description: Get details of a specific customer support ticket. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/getTicket/).
|
|
48
48
|
*/
|
|
49
|
-
getTicket({ id, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<Ticket>;
|
|
49
|
+
getTicket({ id, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<Ticket>;
|
|
50
50
|
/**
|
|
51
51
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
52
52
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -55,5 +55,5 @@ declare class Lead {
|
|
|
55
55
|
* @summary: Submits form data
|
|
56
56
|
* @description: Create user-entered data from a custom form for processing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/submitCustomForm/).
|
|
57
57
|
*/
|
|
58
|
-
submitCustomForm({ slug, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<SubmitCustomFormDetails>;
|
|
58
|
+
submitCustomForm({ slug, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<SubmitCustomFormDetails>;
|
|
59
59
|
}
|
|
@@ -6,6 +6,7 @@ const {
|
|
|
6
6
|
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
7
7
|
const constructUrl = require("../constructUrl");
|
|
8
8
|
const Paginator = require("../../common/Paginator");
|
|
9
|
+
const { validateRequiredParams } = require("../../common/Validator");
|
|
9
10
|
|
|
10
11
|
class Lead {
|
|
11
12
|
constructor(_conf) {
|
|
@@ -45,18 +46,12 @@ class Lead {
|
|
|
45
46
|
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
46
47
|
{ responseHeaders } = { responseHeaders: false }
|
|
47
48
|
) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
path: ["id"],
|
|
49
|
+
const errors = validateRequiredParams(arguments[0], ["id"]);
|
|
50
|
+
if (errors.length > 0) {
|
|
51
|
+
const error = new FDKClientValidationError({
|
|
52
|
+
message: "Missing required field",
|
|
53
|
+
details: errors,
|
|
54
54
|
});
|
|
55
|
-
}
|
|
56
|
-
if (invalidInput.length) {
|
|
57
|
-
const error = new Error();
|
|
58
|
-
error.message = "Missing required field";
|
|
59
|
-
error.details = invalidInput;
|
|
60
55
|
return Promise.reject(new FDKClientValidationError(error));
|
|
61
56
|
}
|
|
62
57
|
|
|
@@ -97,14 +92,6 @@ class Lead {
|
|
|
97
92
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
98
93
|
{ responseHeaders } = { responseHeaders: false }
|
|
99
94
|
) {
|
|
100
|
-
let invalidInput = [];
|
|
101
|
-
if (invalidInput.length) {
|
|
102
|
-
const error = new Error();
|
|
103
|
-
error.message = "Missing required field";
|
|
104
|
-
error.details = invalidInput;
|
|
105
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
106
|
-
}
|
|
107
|
-
|
|
108
95
|
const query_params = {};
|
|
109
96
|
|
|
110
97
|
const xHeaders = {};
|
|
@@ -142,18 +129,12 @@ class Lead {
|
|
|
142
129
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
143
130
|
{ responseHeaders } = { responseHeaders: false }
|
|
144
131
|
) {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
path: ["slug"],
|
|
132
|
+
const errors = validateRequiredParams(arguments[0], ["slug"]);
|
|
133
|
+
if (errors.length > 0) {
|
|
134
|
+
const error = new FDKClientValidationError({
|
|
135
|
+
message: "Missing required field",
|
|
136
|
+
details: errors,
|
|
151
137
|
});
|
|
152
|
-
}
|
|
153
|
-
if (invalidInput.length) {
|
|
154
|
-
const error = new Error();
|
|
155
|
-
error.message = "Missing required field";
|
|
156
|
-
error.details = invalidInput;
|
|
157
138
|
return Promise.reject(new FDKClientValidationError(error));
|
|
158
139
|
}
|
|
159
140
|
|
|
@@ -194,18 +175,12 @@ class Lead {
|
|
|
194
175
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
195
176
|
{ responseHeaders } = { responseHeaders: false }
|
|
196
177
|
) {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
path: ["id"],
|
|
178
|
+
const errors = validateRequiredParams(arguments[0], ["id"]);
|
|
179
|
+
if (errors.length > 0) {
|
|
180
|
+
const error = new FDKClientValidationError({
|
|
181
|
+
message: "Missing required field",
|
|
182
|
+
details: errors,
|
|
203
183
|
});
|
|
204
|
-
}
|
|
205
|
-
if (invalidInput.length) {
|
|
206
|
-
const error = new Error();
|
|
207
|
-
error.message = "Missing required field";
|
|
208
|
-
error.details = invalidInput;
|
|
209
184
|
return Promise.reject(new FDKClientValidationError(error));
|
|
210
185
|
}
|
|
211
186
|
|
|
@@ -246,18 +221,12 @@ class Lead {
|
|
|
246
221
|
{ slug, body, requestHeaders } = { requestHeaders: {} },
|
|
247
222
|
{ responseHeaders } = { responseHeaders: false }
|
|
248
223
|
) {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
path: ["slug"],
|
|
224
|
+
const errors = validateRequiredParams(arguments[0], ["slug"]);
|
|
225
|
+
if (errors.length > 0) {
|
|
226
|
+
const error = new FDKClientValidationError({
|
|
227
|
+
message: "Missing required field",
|
|
228
|
+
details: errors,
|
|
255
229
|
});
|
|
256
|
-
}
|
|
257
|
-
if (invalidInput.length) {
|
|
258
|
-
const error = new Error();
|
|
259
|
-
error.message = "Missing required field";
|
|
260
|
-
error.details = invalidInput;
|
|
261
230
|
return Promise.reject(new FDKClientValidationError(error));
|
|
262
231
|
}
|
|
263
232
|
|
|
@@ -45,7 +45,7 @@ declare class Logistic {
|
|
|
45
45
|
* @summary: Get country details
|
|
46
46
|
* @description: Get details about a particular country and its address format customized for different business scenarios. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCountry/).
|
|
47
47
|
*/
|
|
48
|
-
getCountry({ countryIsoCode, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<GetCountry>;
|
|
48
|
+
getCountry({ countryIsoCode, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<GetCountry>;
|
|
49
49
|
/**
|
|
50
50
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
51
51
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -54,7 +54,7 @@ declare class Logistic {
|
|
|
54
54
|
* @summary: Serviceable Courier Partners.
|
|
55
55
|
* @description: Get all the serviceable courier partners of a destination and the shipments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCourierPartners/).
|
|
56
56
|
*/
|
|
57
|
-
getCourierPartners({ companyId, applicationId, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<ShipmentCourierPartnerResult>;
|
|
57
|
+
getCourierPartners({ companyId, applicationId, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<ShipmentCourierPartnerResult>;
|
|
58
58
|
/**
|
|
59
59
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
60
60
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -72,7 +72,7 @@ declare class Logistic {
|
|
|
72
72
|
* @summary: Get localities
|
|
73
73
|
* @description: Get geographical data for a specific type of locality based on the provided filters. For instance, obtain a list of cities for a given country and state. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocalities/).
|
|
74
74
|
*/
|
|
75
|
-
getLocalities({ localityType, country, state, city, pageNo, pageSize, q, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<GetLocalities>;
|
|
75
|
+
getLocalities({ localityType, country, state, city, pageNo, pageSize, q, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<GetLocalities>;
|
|
76
76
|
/**
|
|
77
77
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
78
78
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -81,7 +81,7 @@ declare class Logistic {
|
|
|
81
81
|
* @summary: Get locality detail
|
|
82
82
|
* @description: Get detailed geographical data for a specific locality, such as a pincode. For example, for a pincode value of 400603, the service returns its parent locations, including city, state, and country details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocality/).
|
|
83
83
|
*/
|
|
84
|
-
getLocality({ localityType, localityValue, country, state, city, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<GetLocality>;
|
|
84
|
+
getLocality({ localityType, localityValue, country, state, city, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<GetLocality>;
|
|
85
85
|
/**
|
|
86
86
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
87
87
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -108,7 +108,7 @@ declare class Logistic {
|
|
|
108
108
|
* @summary: Get pincode details
|
|
109
109
|
* @description: Get details of a specific pincode, such as obtaining its city and state information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getPincodeCity/).
|
|
110
110
|
*/
|
|
111
|
-
getPincodeCity({ pincode, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<PincodeDetails>;
|
|
111
|
+
getPincodeCity({ pincode, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<PincodeDetails>;
|
|
112
112
|
/**
|
|
113
113
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
114
114
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -135,5 +135,5 @@ declare class Logistic {
|
|
|
135
135
|
* @summary: Validate address
|
|
136
136
|
* @description: Validate addresses using specific templates customized for each country and tailored to various business scenarios. This validation ensures that the data conforms to the information currently stored in the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/validateAddress/).
|
|
137
137
|
*/
|
|
138
|
-
validateAddress({ countryIsoCode, templateName, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<ValidateAddressDetails>;
|
|
138
|
+
validateAddress({ countryIsoCode, templateName, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<ValidateAddressDetails>;
|
|
139
139
|
}
|
|
@@ -6,6 +6,7 @@ const {
|
|
|
6
6
|
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
7
7
|
const constructUrl = require("../constructUrl");
|
|
8
8
|
const Paginator = require("../../common/Paginator");
|
|
9
|
+
const { validateRequiredParams } = require("../../common/Validator");
|
|
9
10
|
|
|
10
11
|
class Logistic {
|
|
11
12
|
constructor(_conf) {
|
|
@@ -60,14 +61,6 @@ class Logistic {
|
|
|
60
61
|
{ requestHeaders } = { requestHeaders: {} },
|
|
61
62
|
{ responseHeaders } = { responseHeaders: false }
|
|
62
63
|
) {
|
|
63
|
-
let invalidInput = [];
|
|
64
|
-
if (invalidInput.length) {
|
|
65
|
-
const error = new Error();
|
|
66
|
-
error.message = "Missing required field";
|
|
67
|
-
error.details = invalidInput;
|
|
68
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
69
|
-
}
|
|
70
|
-
|
|
71
64
|
const query_params = {};
|
|
72
65
|
|
|
73
66
|
const xHeaders = {};
|
|
@@ -107,14 +100,6 @@ class Logistic {
|
|
|
107
100
|
},
|
|
108
101
|
{ responseHeaders } = { responseHeaders: false }
|
|
109
102
|
) {
|
|
110
|
-
let invalidInput = [];
|
|
111
|
-
if (invalidInput.length) {
|
|
112
|
-
const error = new Error();
|
|
113
|
-
error.message = "Missing required field";
|
|
114
|
-
error.details = invalidInput;
|
|
115
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
116
|
-
}
|
|
117
|
-
|
|
118
103
|
const query_params = {};
|
|
119
104
|
query_params["onboarding"] = onboarding;
|
|
120
105
|
query_params["page_no"] = pageNo;
|
|
@@ -157,18 +142,12 @@ class Logistic {
|
|
|
157
142
|
{ countryIsoCode, requestHeaders } = { requestHeaders: {} },
|
|
158
143
|
{ responseHeaders } = { responseHeaders: false }
|
|
159
144
|
) {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
path: ["countryIsoCode"],
|
|
145
|
+
const errors = validateRequiredParams(arguments[0], ["countryIsoCode"]);
|
|
146
|
+
if (errors.length > 0) {
|
|
147
|
+
const error = new FDKClientValidationError({
|
|
148
|
+
message: "Missing required field",
|
|
149
|
+
details: errors,
|
|
166
150
|
});
|
|
167
|
-
}
|
|
168
|
-
if (invalidInput.length) {
|
|
169
|
-
const error = new Error();
|
|
170
|
-
error.message = "Missing required field";
|
|
171
|
-
error.details = invalidInput;
|
|
172
151
|
return Promise.reject(new FDKClientValidationError(error));
|
|
173
152
|
}
|
|
174
153
|
|
|
@@ -209,24 +188,15 @@ class Logistic {
|
|
|
209
188
|
{ companyId, applicationId, body, requestHeaders } = { requestHeaders: {} },
|
|
210
189
|
{ responseHeaders } = { responseHeaders: false }
|
|
211
190
|
) {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
if (!applicationId) {
|
|
221
|
-
invalidInput.push({
|
|
222
|
-
message: `The 'applicationId' field is required.`,
|
|
223
|
-
path: ["applicationId"],
|
|
191
|
+
const errors = validateRequiredParams(arguments[0], [
|
|
192
|
+
"companyId",
|
|
193
|
+
"applicationId",
|
|
194
|
+
]);
|
|
195
|
+
if (errors.length > 0) {
|
|
196
|
+
const error = new FDKClientValidationError({
|
|
197
|
+
message: "Missing required field",
|
|
198
|
+
details: errors,
|
|
224
199
|
});
|
|
225
|
-
}
|
|
226
|
-
if (invalidInput.length) {
|
|
227
|
-
const error = new Error();
|
|
228
|
-
error.message = "Missing required field";
|
|
229
|
-
error.details = invalidInput;
|
|
230
200
|
return Promise.reject(new FDKClientValidationError(error));
|
|
231
201
|
}
|
|
232
202
|
|
|
@@ -267,14 +237,6 @@ class Logistic {
|
|
|
267
237
|
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
268
238
|
{ responseHeaders } = { responseHeaders: false }
|
|
269
239
|
) {
|
|
270
|
-
let invalidInput = [];
|
|
271
|
-
if (invalidInput.length) {
|
|
272
|
-
const error = new Error();
|
|
273
|
-
error.message = "Missing required field";
|
|
274
|
-
error.details = invalidInput;
|
|
275
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
276
|
-
}
|
|
277
|
-
|
|
278
240
|
const query_params = {};
|
|
279
241
|
query_params["page_no"] = pageNo;
|
|
280
242
|
query_params["page_size"] = pageSize;
|
|
@@ -323,18 +285,12 @@ class Logistic {
|
|
|
323
285
|
} = { requestHeaders: {} },
|
|
324
286
|
{ responseHeaders } = { responseHeaders: false }
|
|
325
287
|
) {
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
path: ["localityType"],
|
|
288
|
+
const errors = validateRequiredParams(arguments[0], ["localityType"]);
|
|
289
|
+
if (errors.length > 0) {
|
|
290
|
+
const error = new FDKClientValidationError({
|
|
291
|
+
message: "Missing required field",
|
|
292
|
+
details: errors,
|
|
332
293
|
});
|
|
333
|
-
}
|
|
334
|
-
if (invalidInput.length) {
|
|
335
|
-
const error = new Error();
|
|
336
|
-
error.message = "Missing required field";
|
|
337
|
-
error.details = invalidInput;
|
|
338
294
|
return Promise.reject(new FDKClientValidationError(error));
|
|
339
295
|
}
|
|
340
296
|
|
|
@@ -383,24 +339,15 @@ class Logistic {
|
|
|
383
339
|
},
|
|
384
340
|
{ responseHeaders } = { responseHeaders: false }
|
|
385
341
|
) {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
if (!localityValue) {
|
|
395
|
-
invalidInput.push({
|
|
396
|
-
message: `The 'localityValue' field is required.`,
|
|
397
|
-
path: ["localityValue"],
|
|
342
|
+
const errors = validateRequiredParams(arguments[0], [
|
|
343
|
+
"localityType",
|
|
344
|
+
"localityValue",
|
|
345
|
+
]);
|
|
346
|
+
if (errors.length > 0) {
|
|
347
|
+
const error = new FDKClientValidationError({
|
|
348
|
+
message: "Missing required field",
|
|
349
|
+
details: errors,
|
|
398
350
|
});
|
|
399
|
-
}
|
|
400
|
-
if (invalidInput.length) {
|
|
401
|
-
const error = new Error();
|
|
402
|
-
error.message = "Missing required field";
|
|
403
|
-
error.details = invalidInput;
|
|
404
351
|
return Promise.reject(new FDKClientValidationError(error));
|
|
405
352
|
}
|
|
406
353
|
|
|
@@ -455,27 +402,6 @@ class Logistic {
|
|
|
455
402
|
} = { requestHeaders: {} },
|
|
456
403
|
{ responseHeaders } = { responseHeaders: false }
|
|
457
404
|
) {
|
|
458
|
-
let invalidInput = [];
|
|
459
|
-
|
|
460
|
-
if (!xApplicationId) {
|
|
461
|
-
invalidInput.push({
|
|
462
|
-
message: `The 'xApplicationId' field is required.`,
|
|
463
|
-
path: ["xApplicationId"],
|
|
464
|
-
});
|
|
465
|
-
}
|
|
466
|
-
if (!xApplicationData) {
|
|
467
|
-
invalidInput.push({
|
|
468
|
-
message: `The 'xApplicationData' field is required.`,
|
|
469
|
-
path: ["xApplicationData"],
|
|
470
|
-
});
|
|
471
|
-
}
|
|
472
|
-
if (invalidInput.length) {
|
|
473
|
-
const error = new Error();
|
|
474
|
-
error.message = "Missing required field";
|
|
475
|
-
error.details = invalidInput;
|
|
476
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
477
|
-
}
|
|
478
|
-
|
|
479
405
|
const query_params = {};
|
|
480
406
|
query_params["x-application-id"] = xApplicationId;
|
|
481
407
|
query_params["x-application-data"] = xApplicationData;
|
|
@@ -522,14 +448,6 @@ class Logistic {
|
|
|
522
448
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
523
449
|
{ responseHeaders } = { responseHeaders: false }
|
|
524
450
|
) {
|
|
525
|
-
let invalidInput = [];
|
|
526
|
-
if (invalidInput.length) {
|
|
527
|
-
const error = new Error();
|
|
528
|
-
error.message = "Missing required field";
|
|
529
|
-
error.details = invalidInput;
|
|
530
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
531
|
-
}
|
|
532
|
-
|
|
533
451
|
const query_params = {};
|
|
534
452
|
|
|
535
453
|
const xHeaders = {};
|
|
@@ -567,18 +485,12 @@ class Logistic {
|
|
|
567
485
|
{ pincode, requestHeaders } = { requestHeaders: {} },
|
|
568
486
|
{ responseHeaders } = { responseHeaders: false }
|
|
569
487
|
) {
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
path: ["pincode"],
|
|
488
|
+
const errors = validateRequiredParams(arguments[0], ["pincode"]);
|
|
489
|
+
if (errors.length > 0) {
|
|
490
|
+
const error = new FDKClientValidationError({
|
|
491
|
+
message: "Missing required field",
|
|
492
|
+
details: errors,
|
|
576
493
|
});
|
|
577
|
-
}
|
|
578
|
-
if (invalidInput.length) {
|
|
579
|
-
const error = new Error();
|
|
580
|
-
error.message = "Missing required field";
|
|
581
|
-
error.details = invalidInput;
|
|
582
494
|
return Promise.reject(new FDKClientValidationError(error));
|
|
583
495
|
}
|
|
584
496
|
|
|
@@ -619,14 +531,6 @@ class Logistic {
|
|
|
619
531
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
620
532
|
{ responseHeaders } = { responseHeaders: false }
|
|
621
533
|
) {
|
|
622
|
-
let invalidInput = [];
|
|
623
|
-
if (invalidInput.length) {
|
|
624
|
-
const error = new Error();
|
|
625
|
-
error.message = "Missing required field";
|
|
626
|
-
error.details = invalidInput;
|
|
627
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
628
|
-
}
|
|
629
|
-
|
|
630
534
|
const query_params = {};
|
|
631
535
|
|
|
632
536
|
const xHeaders = {};
|
|
@@ -664,14 +568,6 @@ class Logistic {
|
|
|
664
568
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
665
569
|
{ responseHeaders } = { responseHeaders: false }
|
|
666
570
|
) {
|
|
667
|
-
let invalidInput = [];
|
|
668
|
-
if (invalidInput.length) {
|
|
669
|
-
const error = new Error();
|
|
670
|
-
error.message = "Missing required field";
|
|
671
|
-
error.details = invalidInput;
|
|
672
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
673
|
-
}
|
|
674
|
-
|
|
675
571
|
const query_params = {};
|
|
676
572
|
|
|
677
573
|
const xHeaders = {};
|
|
@@ -711,24 +607,15 @@ class Logistic {
|
|
|
711
607
|
},
|
|
712
608
|
{ responseHeaders } = { responseHeaders: false }
|
|
713
609
|
) {
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
610
|
+
const errors = validateRequiredParams(arguments[0], [
|
|
611
|
+
"countryIsoCode",
|
|
612
|
+
"templateName",
|
|
613
|
+
]);
|
|
614
|
+
if (errors.length > 0) {
|
|
615
|
+
const error = new FDKClientValidationError({
|
|
616
|
+
message: "Missing required field",
|
|
617
|
+
details: errors,
|
|
720
618
|
});
|
|
721
|
-
}
|
|
722
|
-
if (!templateName) {
|
|
723
|
-
invalidInput.push({
|
|
724
|
-
message: `The 'templateName' field is required.`,
|
|
725
|
-
path: ["templateName"],
|
|
726
|
-
});
|
|
727
|
-
}
|
|
728
|
-
if (invalidInput.length) {
|
|
729
|
-
const error = new Error();
|
|
730
|
-
error.message = "Missing required field";
|
|
731
|
-
error.details = invalidInput;
|
|
732
619
|
return Promise.reject(new FDKClientValidationError(error));
|
|
733
620
|
}
|
|
734
621
|
|
|
@@ -26,7 +26,7 @@ declare class Order {
|
|
|
26
26
|
* @summary: Get shipment's customer
|
|
27
27
|
* @description: Get customer details such as mobile number using Shipment ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getCustomerDetailsByShipmentId/).
|
|
28
28
|
*/
|
|
29
|
-
getCustomerDetailsByShipmentId({ orderId, shipmentId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CustomerDetailsResponseSchema>;
|
|
29
|
+
getCustomerDetailsByShipmentId({ orderId, shipmentId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<CustomerDetailsResponseSchema>;
|
|
30
30
|
/**
|
|
31
31
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
32
32
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -35,7 +35,7 @@ declare class Order {
|
|
|
35
35
|
* @summary: Retrieves invoice for shipment
|
|
36
36
|
* @description: Get invoice corresponding to a specific shipment ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getInvoiceByShipmentId/).
|
|
37
37
|
*/
|
|
38
|
-
getInvoiceByShipmentId({ shipmentId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<ResponseGetInvoiceShipment>;
|
|
38
|
+
getInvoiceByShipmentId({ shipmentId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<ResponseGetInvoiceShipment>;
|
|
39
39
|
/**
|
|
40
40
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
41
41
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -44,7 +44,7 @@ declare class Order {
|
|
|
44
44
|
* @summary: Get an order
|
|
45
45
|
* @description: Get order details such as tracking details, shipment, store information using Fynd Order ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getOrderById/).
|
|
46
46
|
*/
|
|
47
|
-
getOrderById({ orderId, allowInactive, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<OrderById>;
|
|
47
|
+
getOrderById({ orderId, allowInactive, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<OrderById>;
|
|
48
48
|
/**
|
|
49
49
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
50
50
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -62,7 +62,7 @@ declare class Order {
|
|
|
62
62
|
* @summary: Retrieves POS order details
|
|
63
63
|
* @description: Retrieve a POS order and all its details such as tracking details, shipment, store information using Fynd Order ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getPosOrderById/).
|
|
64
64
|
*/
|
|
65
|
-
getPosOrderById({ orderId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<OrderById>;
|
|
65
|
+
getPosOrderById({ orderId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<OrderById>;
|
|
66
66
|
/**
|
|
67
67
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
68
68
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -71,7 +71,7 @@ declare class Order {
|
|
|
71
71
|
* @summary: Retrieve Reasons for Cancellation and Return journey
|
|
72
72
|
* @description: Allows users to retrieve a comprehensive list of reasons for cancellation or returning a shipment. It provides both cancellation and return reasons, with an emphasis on Quality Control (QC) evaluations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getShipmentBagReasons/).
|
|
73
73
|
*/
|
|
74
|
-
getShipmentBagReasons({ shipmentId, bagId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<ShipmentBagReasons>;
|
|
74
|
+
getShipmentBagReasons({ shipmentId, bagId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<ShipmentBagReasons>;
|
|
75
75
|
/**
|
|
76
76
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
77
77
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -80,7 +80,7 @@ declare class Order {
|
|
|
80
80
|
* @summary: Get a Shipment
|
|
81
81
|
* @description: Get shipment details such as price breakup, tracking details, store information, etc. using Shipment ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getShipmentById/).
|
|
82
82
|
*/
|
|
83
|
-
getShipmentById({ shipmentId, allowInactive, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<ShipmentById>;
|
|
83
|
+
getShipmentById({ shipmentId, allowInactive, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<ShipmentById>;
|
|
84
84
|
/**
|
|
85
85
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
86
86
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -89,7 +89,7 @@ declare class Order {
|
|
|
89
89
|
* @summary: List shipment cancellation reasons
|
|
90
90
|
* @description: Get reasons to perform full or partial cancellation of a shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getShipmentReasons/).
|
|
91
91
|
*/
|
|
92
|
-
getShipmentReasons({ shipmentId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<ShipmentReasons>;
|
|
92
|
+
getShipmentReasons({ shipmentId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<ShipmentReasons>;
|
|
93
93
|
/**
|
|
94
94
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
95
95
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -98,7 +98,7 @@ declare class Order {
|
|
|
98
98
|
* @summary: Send OTP to customer
|
|
99
99
|
* @description: Send OTP to the customer for shipment verification. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/sendOtpToShipmentCustomer/).
|
|
100
100
|
*/
|
|
101
|
-
sendOtpToShipmentCustomer({ orderId, shipmentId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<SendOtpToCustomerResponseSchema>;
|
|
101
|
+
sendOtpToShipmentCustomer({ orderId, shipmentId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<SendOtpToCustomerResponseSchema>;
|
|
102
102
|
/**
|
|
103
103
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
104
104
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -107,7 +107,7 @@ declare class Order {
|
|
|
107
107
|
* @summary: Track shipment status
|
|
108
108
|
* @description: Track Shipment by shipment id, for application based on application Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/trackShipment/).
|
|
109
109
|
*/
|
|
110
|
-
trackShipment({ shipmentId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<ShipmentTrack>;
|
|
110
|
+
trackShipment({ shipmentId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<ShipmentTrack>;
|
|
111
111
|
/**
|
|
112
112
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
113
113
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -116,7 +116,7 @@ declare class Order {
|
|
|
116
116
|
* @summary: Updates shipment status
|
|
117
117
|
* @description: This operation allows for updating the status and properties of a shipment. For example, it allows users to initiate a return by providing reasons and uploading quality check images. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/updateShipmentStatus/).
|
|
118
118
|
*/
|
|
119
|
-
updateShipmentStatus({ shipmentId, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<ShipmentApplicationStatusResponseSchema>;
|
|
119
|
+
updateShipmentStatus({ shipmentId, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<ShipmentApplicationStatusResponseSchema>;
|
|
120
120
|
/**
|
|
121
121
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
122
122
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -125,5 +125,5 @@ declare class Order {
|
|
|
125
125
|
* @summary: Verifies OTP
|
|
126
126
|
* @description: Verify OTP for getting shipment details - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/verifyOtpShipmentCustomer/).
|
|
127
127
|
*/
|
|
128
|
-
verifyOtpShipmentCustomer({ orderId, shipmentId, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<VerifyOtpResponseSchema>;
|
|
128
|
+
verifyOtpShipmentCustomer({ orderId, shipmentId, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<VerifyOtpResponseSchema>;
|
|
129
129
|
}
|