@gofynd/fdk-client-javascript 3.4.4 → 3.6.0
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/ApplicationAPIClient.d.ts +1 -1
- package/sdk/application/ApplicationClient.d.ts +1 -1
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +50 -0
- package/sdk/application/Payment/PaymentApplicationClient.js +210 -0
- package/sdk/partner/OAuthClient.d.ts +3 -3
- package/sdk/partner/PartnerAPIClient.d.ts +1 -1
- package/sdk/partner/PartnerClient.d.ts +2 -2
- package/sdk/platform/Cart/CartPlatformModel.d.ts +11 -0
- package/sdk/platform/Cart/CartPlatformModel.js +5 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1 -4
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +0 -5
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +0 -2
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +125 -1
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1075 -95
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1017 -46
- package/sdk/platform/Catalog/CatalogPlatformModel.js +681 -5
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +200 -5
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +174 -4
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +17 -1
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +15 -0
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +9 -4
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +4 -4
- package/sdk/platform/OAuthClient.d.ts +3 -3
- package/sdk/platform/Order/OrderPlatformModel.d.ts +49 -1
- package/sdk/platform/Order/OrderPlatformModel.js +28 -0
- package/sdk/platform/PlatformAPIClient.d.ts +1 -1
- package/sdk/platform/PlatformClient.d.ts +2 -2
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +13 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +89 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +25 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +17 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +50 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +36 -4
- package/sdk/public/PublicAPIClient.d.ts +1 -1
package/README.md
CHANGED
|
@@ -234,7 +234,7 @@ console.log("Active Theme: ", response.information.name);
|
|
|
234
234
|
The above code will log the curl command in the console
|
|
235
235
|
|
|
236
236
|
```bash
|
|
237
|
-
curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 3.
|
|
237
|
+
curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 3.6.0' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
|
|
238
238
|
Active Theme: Emerge
|
|
239
239
|
```
|
|
240
240
|
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@ declare class APIClient {
|
|
|
12
12
|
* @param {object} body
|
|
13
13
|
* @param {object} xHeaders
|
|
14
14
|
*/
|
|
15
|
-
static execute(conf: object, method: string, url: string, query: object, body: object, xHeaders: object, options: any): Promise<import("axios").AxiosResponse<any, any>>;
|
|
15
|
+
static execute(conf: object, method: string, url: string, query: object, body: object, xHeaders: object, options: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
16
16
|
}
|
|
17
17
|
declare namespace APIClient {
|
|
18
18
|
export { Options };
|
|
@@ -63,7 +63,7 @@ declare class ApplicationClient {
|
|
|
63
63
|
body: any;
|
|
64
64
|
headers: any;
|
|
65
65
|
responseHeaders?: boolean;
|
|
66
|
-
}): Promise<import("axios").AxiosResponse<any, any>>;
|
|
66
|
+
}): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
67
67
|
}
|
|
68
68
|
import ApplicationConfig = require("./ApplicationConfig");
|
|
69
69
|
import Cart = require("./Cart/CartApplicationClient");
|
|
@@ -3,8 +3,10 @@ declare class Payment {
|
|
|
3
3
|
constructor(_conf: any);
|
|
4
4
|
_conf: any;
|
|
5
5
|
_relativeUrls: {
|
|
6
|
+
addBeneficiary: string;
|
|
6
7
|
addBeneficiaryDetails: string;
|
|
7
8
|
addRefundBankAccountUsingOTP: string;
|
|
9
|
+
addRefundBeneficiaryUsingOTPSession: string;
|
|
8
10
|
attachCardToCustomer: string;
|
|
9
11
|
cancelPaymentLink: string;
|
|
10
12
|
cardDetails: string;
|
|
@@ -16,6 +18,7 @@ declare class Payment {
|
|
|
16
18
|
createPaymentOrder: string;
|
|
17
19
|
customerCreditSummary: string;
|
|
18
20
|
customerOnboard: string;
|
|
21
|
+
deleteBeneficiary: string;
|
|
19
22
|
deleteUserCard: string;
|
|
20
23
|
delinkWallet: string;
|
|
21
24
|
enableOrDisableRefundTransferMode: string;
|
|
@@ -29,6 +32,8 @@ declare class Payment {
|
|
|
29
32
|
getPaymentModeRoutes: string;
|
|
30
33
|
getPaymentModeRoutesPaymentLink: string;
|
|
31
34
|
getPosPaymentModeRoutes: string;
|
|
35
|
+
getRefundBeneficiaries: string;
|
|
36
|
+
getRefundBeneficiariesUsingOTPSession: string;
|
|
32
37
|
getRupifiBannerDetails: string;
|
|
33
38
|
getUserBeneficiariesDetail: string;
|
|
34
39
|
initialisePayment: string;
|
|
@@ -52,6 +57,15 @@ declare class Payment {
|
|
|
52
57
|
};
|
|
53
58
|
_urls: {};
|
|
54
59
|
updateUrls(urls: any): void;
|
|
60
|
+
/**
|
|
61
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
62
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
63
|
+
* @returns {Promise<AddBeneficiaryResponseDetails>} - Success response
|
|
64
|
+
* @name addBeneficiary
|
|
65
|
+
* @summary: Add a beneficiary for refunds
|
|
66
|
+
* @description: Adds a bank or UPI beneficiary to the user account for processing refunds. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/payment/addBeneficiary/).
|
|
67
|
+
*/
|
|
68
|
+
addBeneficiary({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<AddBeneficiaryResponseDetails>;
|
|
55
69
|
/**
|
|
56
70
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
57
71
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -70,6 +84,15 @@ declare class Payment {
|
|
|
70
84
|
* @description: Add bank account specifically for refunds, employing OTP verification for security. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/payment/addRefundBankAccountUsingOTP/).
|
|
71
85
|
*/
|
|
72
86
|
addRefundBankAccountUsingOTP({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<RefundAccountDetails>;
|
|
87
|
+
/**
|
|
88
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
89
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
90
|
+
* @returns {Promise<AddBeneficiaryResponseDetails>} - Success response
|
|
91
|
+
* @name addRefundBeneficiaryUsingOTPSession
|
|
92
|
+
* @summary: Add a beneficiary for refunds using OTP session
|
|
93
|
+
* @description: Adds a bank or UPI beneficiary to the user account after completing an OTP verification session. The beneficiary details are securely linked with the user's refund preferences and will be used for processing refunds against specific orders and shipments. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/payment/addRefundBeneficiaryUsingOTPSession/).
|
|
94
|
+
*/
|
|
95
|
+
addRefundBeneficiaryUsingOTPSession({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<AddBeneficiaryResponseDetails>;
|
|
73
96
|
/**
|
|
74
97
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
75
98
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -169,6 +192,15 @@ declare class Payment {
|
|
|
169
192
|
* @description: Initiate the onboarding process for payment services, providing personal, business, and device information, along with marketplace details, to enable customer registration and credit availability. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/payment/customerOnboard/).
|
|
170
193
|
*/
|
|
171
194
|
customerOnboard({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CustomerOnboardingDetails>;
|
|
195
|
+
/**
|
|
196
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
197
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
198
|
+
* @returns {Promise<DeleteBeneficiaryDetails>} - Success response
|
|
199
|
+
* @name deleteBeneficiary
|
|
200
|
+
* @summary: Delete a refund beneficiary
|
|
201
|
+
* @description: This API endpoint is used to delete a refund beneficiary using their beneficiary ID. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/payment/deleteBeneficiary/).
|
|
202
|
+
*/
|
|
203
|
+
deleteBeneficiary({ id, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<DeleteBeneficiaryDetails>;
|
|
172
204
|
/**
|
|
173
205
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
174
206
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -286,6 +318,24 @@ declare class Payment {
|
|
|
286
318
|
* @description: Get available payment methods on the payment page for POS, specifying the aggregator for each option, such as 'CARD powered by Juspay' and 'QR powered by Razorpay'. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/payment/getPosPaymentModeRoutes/).
|
|
287
319
|
*/
|
|
288
320
|
getPosPaymentModeRoutes({ amount, cartId, pincode, orderType, checkoutMode, refresh, cardReference, userDetails, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<PaymentModeRouteDetails>;
|
|
321
|
+
/**
|
|
322
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
323
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
324
|
+
* @returns {Promise<RefundBeneficiaries>} - Success response
|
|
325
|
+
* @name getRefundBeneficiaries
|
|
326
|
+
* @summary: Get Refund Beneficiaries
|
|
327
|
+
* @description: Returns a list of UPI and Bank refund beneficiaries associated with a user. Both `order_id` and `shipment_id` are optional query parameters. Use the optional filter_by enum parameter to refine the response. When the value of filter_by is order, the API returns only beneficiaries associated with the order. When the value of filter_by is shipment, it returns only beneficiaries associated with the shipment. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/payment/getRefundBeneficiaries/).
|
|
328
|
+
*/
|
|
329
|
+
getRefundBeneficiaries({ orderId, shipmentId, filterBy, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<RefundBeneficiaries>;
|
|
330
|
+
/**
|
|
331
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
332
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
333
|
+
* @returns {Promise<RefundBeneficiaries>} - Success response
|
|
334
|
+
* @name getRefundBeneficiariesUsingOTPSession
|
|
335
|
+
* @summary: Get Refund Beneficiaries using OTP session
|
|
336
|
+
* @description: Returns a list of UPI and Bank refund beneficiaries associated with a user for a given order and shipment. Use the optional filter_by enum parameter to refine the response. When the value of filter_by is order, the API returns only beneficiaries associated with the order. When the value of filter_by is shipment, it returns only beneficiaries associated with the shipment. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/payment/getRefundBeneficiariesUsingOTPSession/).
|
|
337
|
+
*/
|
|
338
|
+
getRefundBeneficiariesUsingOTPSession({ orderId, shipmentId, filterBy, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<RefundBeneficiaries>;
|
|
289
339
|
/**
|
|
290
340
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
291
341
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -12,9 +12,13 @@ class Payment {
|
|
|
12
12
|
constructor(_conf) {
|
|
13
13
|
this._conf = _conf;
|
|
14
14
|
this._relativeUrls = {
|
|
15
|
+
addBeneficiary:
|
|
16
|
+
"/service/application/payment/v2.0/refund/user/beneficiary",
|
|
15
17
|
addBeneficiaryDetails: "/service/application/payment/v1.0/refund/account",
|
|
16
18
|
addRefundBankAccountUsingOTP:
|
|
17
19
|
"/service/application/payment/v1.0/refund/account/otp",
|
|
20
|
+
addRefundBeneficiaryUsingOTPSession:
|
|
21
|
+
"/service/application/payment/v2.0/refund/user/beneficiary-otp",
|
|
18
22
|
attachCardToCustomer: "/service/application/payment/v1.0/card/attach",
|
|
19
23
|
cancelPaymentLink:
|
|
20
24
|
"/service/application/payment/v1.0/cancel-payment-link/",
|
|
@@ -32,6 +36,8 @@ class Payment {
|
|
|
32
36
|
customerCreditSummary:
|
|
33
37
|
"/service/application/payment/v1.0/payment/credit-summary/",
|
|
34
38
|
customerOnboard: "/service/application/payment/v1.0/credit-onboard/",
|
|
39
|
+
deleteBeneficiary:
|
|
40
|
+
"/service/application/payment/v1.0/refund/account/{id}",
|
|
35
41
|
deleteUserCard: "/service/application/payment/v1.0/card/remove",
|
|
36
42
|
delinkWallet:
|
|
37
43
|
"/service/application/payment/v1.0/payment/options/wallet/delink",
|
|
@@ -54,6 +60,10 @@ class Payment {
|
|
|
54
60
|
"/service/application/payment/v1.0/payment/options/link/",
|
|
55
61
|
getPosPaymentModeRoutes:
|
|
56
62
|
"/service/application/payment/v1.0/payment/options/pos",
|
|
63
|
+
getRefundBeneficiaries:
|
|
64
|
+
"/service/application/payment/v2.0/refund/user/beneficiary",
|
|
65
|
+
getRefundBeneficiariesUsingOTPSession:
|
|
66
|
+
"/service/application/payment/v2.0/refund/user/beneficiary-otp",
|
|
57
67
|
getRupifiBannerDetails: "/service/application/payment/v1.0/rupifi/banner",
|
|
58
68
|
getUserBeneficiariesDetail:
|
|
59
69
|
"/service/application/payment/v1.0/refund/user/beneficiary",
|
|
@@ -106,6 +116,43 @@ class Payment {
|
|
|
106
116
|
};
|
|
107
117
|
}
|
|
108
118
|
|
|
119
|
+
/**
|
|
120
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
121
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
122
|
+
* @returns {Promise<AddBeneficiaryResponseDetails>} - Success response
|
|
123
|
+
* @name addBeneficiary
|
|
124
|
+
* @summary: Add a beneficiary for refunds
|
|
125
|
+
* @description: Adds a bank or UPI beneficiary to the user account for processing refunds. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/payment/addBeneficiary/).
|
|
126
|
+
*/
|
|
127
|
+
async addBeneficiary(
|
|
128
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
129
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
130
|
+
) {
|
|
131
|
+
const query_params = {};
|
|
132
|
+
|
|
133
|
+
const xHeaders = {};
|
|
134
|
+
|
|
135
|
+
const response = await ApplicationAPIClient.execute(
|
|
136
|
+
this._conf,
|
|
137
|
+
"post",
|
|
138
|
+
constructUrl({
|
|
139
|
+
url: this._urls["addBeneficiary"],
|
|
140
|
+
params: {},
|
|
141
|
+
}),
|
|
142
|
+
query_params,
|
|
143
|
+
body,
|
|
144
|
+
{ ...xHeaders, ...requestHeaders },
|
|
145
|
+
{ responseHeaders }
|
|
146
|
+
);
|
|
147
|
+
|
|
148
|
+
let responseData = response;
|
|
149
|
+
if (responseHeaders) {
|
|
150
|
+
responseData = response[0];
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return response;
|
|
154
|
+
}
|
|
155
|
+
|
|
109
156
|
/**
|
|
110
157
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
111
158
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -180,6 +227,43 @@ class Payment {
|
|
|
180
227
|
return response;
|
|
181
228
|
}
|
|
182
229
|
|
|
230
|
+
/**
|
|
231
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
232
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
233
|
+
* @returns {Promise<AddBeneficiaryResponseDetails>} - Success response
|
|
234
|
+
* @name addRefundBeneficiaryUsingOTPSession
|
|
235
|
+
* @summary: Add a beneficiary for refunds using OTP session
|
|
236
|
+
* @description: Adds a bank or UPI beneficiary to the user account after completing an OTP verification session. The beneficiary details are securely linked with the user's refund preferences and will be used for processing refunds against specific orders and shipments. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/payment/addRefundBeneficiaryUsingOTPSession/).
|
|
237
|
+
*/
|
|
238
|
+
async addRefundBeneficiaryUsingOTPSession(
|
|
239
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
240
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
241
|
+
) {
|
|
242
|
+
const query_params = {};
|
|
243
|
+
|
|
244
|
+
const xHeaders = {};
|
|
245
|
+
|
|
246
|
+
const response = await ApplicationAPIClient.execute(
|
|
247
|
+
this._conf,
|
|
248
|
+
"post",
|
|
249
|
+
constructUrl({
|
|
250
|
+
url: this._urls["addRefundBeneficiaryUsingOTPSession"],
|
|
251
|
+
params: {},
|
|
252
|
+
}),
|
|
253
|
+
query_params,
|
|
254
|
+
body,
|
|
255
|
+
{ ...xHeaders, ...requestHeaders },
|
|
256
|
+
{ responseHeaders }
|
|
257
|
+
);
|
|
258
|
+
|
|
259
|
+
let responseData = response;
|
|
260
|
+
if (responseHeaders) {
|
|
261
|
+
responseData = response[0];
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
return response;
|
|
265
|
+
}
|
|
266
|
+
|
|
183
267
|
/**
|
|
184
268
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
185
269
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -599,6 +683,52 @@ class Payment {
|
|
|
599
683
|
return response;
|
|
600
684
|
}
|
|
601
685
|
|
|
686
|
+
/**
|
|
687
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
688
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
689
|
+
* @returns {Promise<DeleteBeneficiaryDetails>} - Success response
|
|
690
|
+
* @name deleteBeneficiary
|
|
691
|
+
* @summary: Delete a refund beneficiary
|
|
692
|
+
* @description: This API endpoint is used to delete a refund beneficiary using their beneficiary ID. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/payment/deleteBeneficiary/).
|
|
693
|
+
*/
|
|
694
|
+
async deleteBeneficiary(
|
|
695
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
696
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
697
|
+
) {
|
|
698
|
+
const errors = validateRequiredParams(arguments[0], ["id"]);
|
|
699
|
+
if (errors.length > 0) {
|
|
700
|
+
const error = new FDKClientValidationError({
|
|
701
|
+
message: "Missing required field",
|
|
702
|
+
details: errors,
|
|
703
|
+
});
|
|
704
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
const query_params = {};
|
|
708
|
+
|
|
709
|
+
const xHeaders = {};
|
|
710
|
+
|
|
711
|
+
const response = await ApplicationAPIClient.execute(
|
|
712
|
+
this._conf,
|
|
713
|
+
"delete",
|
|
714
|
+
constructUrl({
|
|
715
|
+
url: this._urls["deleteBeneficiary"],
|
|
716
|
+
params: { id },
|
|
717
|
+
}),
|
|
718
|
+
query_params,
|
|
719
|
+
undefined,
|
|
720
|
+
{ ...xHeaders, ...requestHeaders },
|
|
721
|
+
{ responseHeaders }
|
|
722
|
+
);
|
|
723
|
+
|
|
724
|
+
let responseData = response;
|
|
725
|
+
if (responseHeaders) {
|
|
726
|
+
responseData = response[0];
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
return response;
|
|
730
|
+
}
|
|
731
|
+
|
|
602
732
|
/**
|
|
603
733
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
604
734
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -1126,6 +1256,86 @@ class Payment {
|
|
|
1126
1256
|
return response;
|
|
1127
1257
|
}
|
|
1128
1258
|
|
|
1259
|
+
/**
|
|
1260
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1261
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1262
|
+
* @returns {Promise<RefundBeneficiaries>} - Success response
|
|
1263
|
+
* @name getRefundBeneficiaries
|
|
1264
|
+
* @summary: Get Refund Beneficiaries
|
|
1265
|
+
* @description: Returns a list of UPI and Bank refund beneficiaries associated with a user. Both `order_id` and `shipment_id` are optional query parameters. Use the optional filter_by enum parameter to refine the response. When the value of filter_by is order, the API returns only beneficiaries associated with the order. When the value of filter_by is shipment, it returns only beneficiaries associated with the shipment. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/payment/getRefundBeneficiaries/).
|
|
1266
|
+
*/
|
|
1267
|
+
async getRefundBeneficiaries(
|
|
1268
|
+
{ orderId, shipmentId, filterBy, requestHeaders } = { requestHeaders: {} },
|
|
1269
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1270
|
+
) {
|
|
1271
|
+
const query_params = {};
|
|
1272
|
+
query_params["order_id"] = orderId;
|
|
1273
|
+
query_params["shipment_id"] = shipmentId;
|
|
1274
|
+
query_params["filter_by"] = filterBy;
|
|
1275
|
+
|
|
1276
|
+
const xHeaders = {};
|
|
1277
|
+
|
|
1278
|
+
const response = await ApplicationAPIClient.execute(
|
|
1279
|
+
this._conf,
|
|
1280
|
+
"get",
|
|
1281
|
+
constructUrl({
|
|
1282
|
+
url: this._urls["getRefundBeneficiaries"],
|
|
1283
|
+
params: {},
|
|
1284
|
+
}),
|
|
1285
|
+
query_params,
|
|
1286
|
+
undefined,
|
|
1287
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1288
|
+
{ responseHeaders }
|
|
1289
|
+
);
|
|
1290
|
+
|
|
1291
|
+
let responseData = response;
|
|
1292
|
+
if (responseHeaders) {
|
|
1293
|
+
responseData = response[0];
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
return response;
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
/**
|
|
1300
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1301
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1302
|
+
* @returns {Promise<RefundBeneficiaries>} - Success response
|
|
1303
|
+
* @name getRefundBeneficiariesUsingOTPSession
|
|
1304
|
+
* @summary: Get Refund Beneficiaries using OTP session
|
|
1305
|
+
* @description: Returns a list of UPI and Bank refund beneficiaries associated with a user for a given order and shipment. Use the optional filter_by enum parameter to refine the response. When the value of filter_by is order, the API returns only beneficiaries associated with the order. When the value of filter_by is shipment, it returns only beneficiaries associated with the shipment. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/payment/getRefundBeneficiariesUsingOTPSession/).
|
|
1306
|
+
*/
|
|
1307
|
+
async getRefundBeneficiariesUsingOTPSession(
|
|
1308
|
+
{ orderId, shipmentId, filterBy, requestHeaders } = { requestHeaders: {} },
|
|
1309
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1310
|
+
) {
|
|
1311
|
+
const query_params = {};
|
|
1312
|
+
query_params["order_id"] = orderId;
|
|
1313
|
+
query_params["shipment_id"] = shipmentId;
|
|
1314
|
+
query_params["filter_by"] = filterBy;
|
|
1315
|
+
|
|
1316
|
+
const xHeaders = {};
|
|
1317
|
+
|
|
1318
|
+
const response = await ApplicationAPIClient.execute(
|
|
1319
|
+
this._conf,
|
|
1320
|
+
"get",
|
|
1321
|
+
constructUrl({
|
|
1322
|
+
url: this._urls["getRefundBeneficiariesUsingOTPSession"],
|
|
1323
|
+
params: {},
|
|
1324
|
+
}),
|
|
1325
|
+
query_params,
|
|
1326
|
+
undefined,
|
|
1327
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1328
|
+
{ responseHeaders }
|
|
1329
|
+
);
|
|
1330
|
+
|
|
1331
|
+
let responseData = response;
|
|
1332
|
+
if (responseHeaders) {
|
|
1333
|
+
responseData = response[0];
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
return response;
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1129
1339
|
/**
|
|
1130
1340
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1131
1341
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -8,8 +8,8 @@ declare class OAuthClient extends BaseOAuthClient {
|
|
|
8
8
|
grant_type: any;
|
|
9
9
|
refresh_token: any;
|
|
10
10
|
code: any;
|
|
11
|
-
}): Promise<import("axios").AxiosResponse<any, any>>;
|
|
12
|
-
getOfflineAccessToken(scopes: any, code: any): Promise<import("axios").AxiosResponse<any, any>>;
|
|
13
|
-
getOfflineAccessTokenObj(scopes: any, code: any): Promise<import("axios").AxiosResponse<any, any>>;
|
|
11
|
+
}): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
12
|
+
getOfflineAccessToken(scopes: any, code: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
13
|
+
getOfflineAccessTokenObj(scopes: any, code: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
14
14
|
}
|
|
15
15
|
import BaseOAuthClient = require("../common/BaseOAuthClient");
|
|
@@ -13,7 +13,7 @@ declare class APIClient {
|
|
|
13
13
|
* @param {object} xHeaders
|
|
14
14
|
* @param {Options} options
|
|
15
15
|
*/
|
|
16
|
-
static execute(conf: object, method: string, url: string, query: object, body: object, xHeaders: object, options: Options): Promise<import("axios").AxiosResponse<any, any>>;
|
|
16
|
+
static execute(conf: object, method: string, url: string, query: object, body: object, xHeaders: object, options: Options): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
17
17
|
get(url: any, config: any): Promise<any>;
|
|
18
18
|
}
|
|
19
19
|
declare namespace APIClient {
|
|
@@ -32,8 +32,8 @@ declare class PartnerClient {
|
|
|
32
32
|
body: any;
|
|
33
33
|
headers: any;
|
|
34
34
|
responseHeaders?: boolean;
|
|
35
|
-
}): Promise<import("axios").AxiosResponse<any, any>>;
|
|
36
|
-
getAccesstokenObj(options: any): Promise<import("axios").AxiosResponse<any, any>>;
|
|
35
|
+
}): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
36
|
+
getAccesstokenObj(options: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
37
37
|
setToken(token: any): void;
|
|
38
38
|
}
|
|
39
39
|
import PartnerConfig = require("./PartnerConfig");
|
|
@@ -725,6 +725,10 @@ export = CartPlatformModel;
|
|
|
725
725
|
* @property {Object} [meta] - Meta data related to article
|
|
726
726
|
* @property {boolean} [allowed_refund] - Flag indicating whether refunds are
|
|
727
727
|
* allowed at article level
|
|
728
|
+
* @property {number} [min_price_threshold] - Minimum allowed net price for the
|
|
729
|
+
* article. If the article's price after all discounts and adjustments falls
|
|
730
|
+
* below this threshold, the price adjustment will be automatically removed.
|
|
731
|
+
* (Applicable only for price adjustment discount type)
|
|
728
732
|
*/
|
|
729
733
|
/**
|
|
730
734
|
* @typedef PriceAdjustmentRestrictions
|
|
@@ -4234,6 +4238,13 @@ type Article = {
|
|
|
4234
4238
|
* allowed at article level
|
|
4235
4239
|
*/
|
|
4236
4240
|
allowed_refund?: boolean;
|
|
4241
|
+
/**
|
|
4242
|
+
* - Minimum allowed net price for the
|
|
4243
|
+
* article. If the article's price after all discounts and adjustments falls
|
|
4244
|
+
* below this threshold, the price adjustment will be automatically removed.
|
|
4245
|
+
* (Applicable only for price adjustment discount type)
|
|
4246
|
+
*/
|
|
4247
|
+
min_price_threshold?: number;
|
|
4237
4248
|
};
|
|
4238
4249
|
/** @returns {PriceAdjustmentRestrictions} */
|
|
4239
4250
|
declare function PriceAdjustmentRestrictions(): PriceAdjustmentRestrictions;
|
|
@@ -787,6 +787,10 @@ const Joi = require("joi");
|
|
|
787
787
|
* @property {Object} [meta] - Meta data related to article
|
|
788
788
|
* @property {boolean} [allowed_refund] - Flag indicating whether refunds are
|
|
789
789
|
* allowed at article level
|
|
790
|
+
* @property {number} [min_price_threshold] - Minimum allowed net price for the
|
|
791
|
+
* article. If the article's price after all discounts and adjustments falls
|
|
792
|
+
* below this threshold, the price adjustment will be automatically removed.
|
|
793
|
+
* (Applicable only for price adjustment discount type)
|
|
790
794
|
*/
|
|
791
795
|
|
|
792
796
|
/**
|
|
@@ -3481,6 +3485,7 @@ class CartPlatformModel {
|
|
|
3481
3485
|
quantity: Joi.number(),
|
|
3482
3486
|
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
3483
3487
|
allowed_refund: Joi.boolean(),
|
|
3488
|
+
min_price_threshold: Joi.number(),
|
|
3484
3489
|
});
|
|
3485
3490
|
}
|
|
3486
3491
|
|
|
@@ -861,7 +861,7 @@ declare class Catalog {
|
|
|
861
861
|
* @description: List all product ids a user has wishlisted or is following for sales channel.
|
|
862
862
|
* - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getFollowedProducts/).
|
|
863
863
|
*/
|
|
864
|
-
getFollowedProducts({ userId, pageId,
|
|
864
|
+
getFollowedProducts({ userId, pageId, requestHeaders }?: CatalogPlatformApplicationValidator.GetFollowedProductsParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.FollowedProducts>;
|
|
865
865
|
/**
|
|
866
866
|
* @param {CatalogPlatformApplicationValidator.GetGroupConfigurationsParam} arg
|
|
867
867
|
* - Arg object
|
|
@@ -4591,7 +4591,7 @@ class Catalog {
|
|
|
4591
4591
|
* - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getFollowedProducts/).
|
|
4592
4592
|
*/
|
|
4593
4593
|
async getFollowedProducts(
|
|
4594
|
-
{ userId, pageId,
|
|
4594
|
+
{ userId, pageId, requestHeaders } = { requestHeaders: {} },
|
|
4595
4595
|
{ responseHeaders } = { responseHeaders: false }
|
|
4596
4596
|
) {
|
|
4597
4597
|
const {
|
|
@@ -4600,7 +4600,6 @@ class Catalog {
|
|
|
4600
4600
|
{
|
|
4601
4601
|
userId,
|
|
4602
4602
|
pageId,
|
|
4603
|
-
pageSize,
|
|
4604
4603
|
},
|
|
4605
4604
|
{ abortEarly: false, allowUnknown: true }
|
|
4606
4605
|
);
|
|
@@ -4615,7 +4614,6 @@ class Catalog {
|
|
|
4615
4614
|
{
|
|
4616
4615
|
userId,
|
|
4617
4616
|
pageId,
|
|
4618
|
-
pageSize,
|
|
4619
4617
|
},
|
|
4620
4618
|
{ abortEarly: false, allowUnknown: false }
|
|
4621
4619
|
);
|
|
@@ -4628,7 +4626,6 @@ class Catalog {
|
|
|
4628
4626
|
|
|
4629
4627
|
const query_params = {};
|
|
4630
4628
|
query_params["page_id"] = pageId;
|
|
4631
|
-
query_params["page_size"] = pageSize;
|
|
4632
4629
|
|
|
4633
4630
|
const response = await PlatformAPIClient.execute(
|
|
4634
4631
|
this.config,
|
|
@@ -341,7 +341,6 @@ export = CatalogPlatformApplicationValidator;
|
|
|
341
341
|
* @property {string} userId - User ID to fetch the followed list
|
|
342
342
|
* @property {string} [pageId] - The identifier used to retrieve the next set of
|
|
343
343
|
* results. This parameter follows cursor-based pagination.
|
|
344
|
-
* @property {number} [pageSize] - Number of items per page
|
|
345
344
|
*/
|
|
346
345
|
/**
|
|
347
346
|
* @typedef GetGroupConfigurationsParam
|
|
@@ -1247,10 +1246,6 @@ type GetFollowedProductsParam = {
|
|
|
1247
1246
|
* results. This parameter follows cursor-based pagination.
|
|
1248
1247
|
*/
|
|
1249
1248
|
pageId?: string;
|
|
1250
|
-
/**
|
|
1251
|
-
* - Number of items per page
|
|
1252
|
-
*/
|
|
1253
|
-
pageSize?: number;
|
|
1254
1249
|
};
|
|
1255
1250
|
type GetGroupConfigurationsParam = {
|
|
1256
1251
|
/**
|
|
@@ -390,7 +390,6 @@ const CatalogPlatformModel = require("./CatalogPlatformModel");
|
|
|
390
390
|
* @property {string} userId - User ID to fetch the followed list
|
|
391
391
|
* @property {string} [pageId] - The identifier used to retrieve the next set of
|
|
392
392
|
* results. This parameter follows cursor-based pagination.
|
|
393
|
-
* @property {number} [pageSize] - Number of items per page
|
|
394
393
|
*/
|
|
395
394
|
|
|
396
395
|
/**
|
|
@@ -936,7 +935,6 @@ class CatalogPlatformApplicationValidator {
|
|
|
936
935
|
return Joi.object({
|
|
937
936
|
userId: Joi.string().allow("").required(),
|
|
938
937
|
pageId: Joi.string().allow(""),
|
|
939
|
-
pageSize: Joi.number(),
|
|
940
938
|
}).required();
|
|
941
939
|
}
|
|
942
940
|
|