@gofynd/fdk-client-javascript 1.0.0 → 1.0.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/documentation/application/CART.md +251 -251
- package/documentation/application/CATALOG.md +393 -393
- package/documentation/application/CONTENT.md +15 -1
- package/documentation/application/ORDER.md +268 -268
- package/documentation/application/PAYMENT.md +249 -249
- package/documentation/application/POSCART.md +297 -297
- package/documentation/platform/CART.md +499 -499
- package/documentation/platform/CATALOG.md +3497 -3097
- package/documentation/platform/COMPANYPROFILE.md +207 -207
- package/documentation/platform/CONTENT.md +123 -1
- package/documentation/platform/ORDER.md +1518 -1324
- package/documentation/platform/PARTNER.md +7 -7
- package/documentation/platform/PAYMENT.md +96 -96
- package/index.js +7 -1
- package/package.json +1 -1
- package/sdk/application/ApplicationConfig.js +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +865 -52
- package/sdk/application/Cart/CartApplicationModel.d.ts +7 -7
- package/sdk/application/Cart/CartApplicationModel.js +335 -335
- package/sdk/application/Cart/CartApplicationValidator.js +1 -0
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +1 -1
- package/sdk/application/Catalog/CatalogApplicationClient.js +1034 -60
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +19 -19
- package/sdk/application/Catalog/CatalogApplicationModel.js +532 -532
- package/sdk/application/Catalog/CatalogApplicationValidator.js +1 -0
- package/sdk/application/Common/CommonApplicationClient.js +66 -4
- package/sdk/application/Common/CommonApplicationValidator.js +1 -0
- package/sdk/application/Communication/CommunicationApplicationClient.js +108 -6
- package/sdk/application/Communication/CommunicationApplicationValidator.js +1 -0
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +1 -1
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +558 -32
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +1 -0
- package/sdk/application/Content/ContentApplicationClient.js +621 -38
- package/sdk/application/Content/ContentApplicationModel.d.ts +1 -0
- package/sdk/application/Content/ContentApplicationModel.js +11 -1
- package/sdk/application/Content/ContentApplicationValidator.js +1 -0
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +101 -6
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +1 -0
- package/sdk/application/Lead/LeadApplicationClient.js +229 -14
- package/sdk/application/Lead/LeadApplicationValidator.js +1 -0
- package/sdk/application/Logistic/LogisticApplicationClient.js +134 -8
- package/sdk/application/Logistic/LogisticApplicationValidator.js +1 -0
- package/sdk/application/Order/OrderApplicationClient.d.ts +1 -1
- package/sdk/application/Order/OrderApplicationClient.js +403 -24
- package/sdk/application/Order/OrderApplicationModel.d.ts +20 -20
- package/sdk/application/Order/OrderApplicationModel.js +334 -334
- package/sdk/application/Order/OrderApplicationValidator.js +1 -0
- package/sdk/application/Payment/PaymentApplicationClient.js +1381 -78
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +2 -2
- package/sdk/application/Payment/PaymentApplicationModel.js +350 -350
- package/sdk/application/Payment/PaymentApplicationValidator.js +1 -0
- package/sdk/application/PosCart/PosCartApplicationClient.js +914 -54
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +15 -15
- package/sdk/application/PosCart/PosCartApplicationModel.js +389 -389
- package/sdk/application/PosCart/PosCartApplicationValidator.js +1 -0
- package/sdk/application/Rewards/RewardsApplicationClient.js +235 -14
- package/sdk/application/Rewards/RewardsApplicationValidator.js +1 -0
- package/sdk/application/Share/ShareApplicationClient.js +226 -14
- package/sdk/application/Share/ShareApplicationValidator.js +1 -0
- package/sdk/application/Theme/ThemeApplicationClient.js +130 -8
- package/sdk/application/Theme/ThemeApplicationValidator.js +1 -0
- package/sdk/application/User/UserApplicationClient.js +1133 -70
- package/sdk/application/User/UserApplicationValidator.js +1 -0
- package/sdk/common/AxiosHelper.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +16 -8
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +287 -16
- package/sdk/platform/Analytics/AnalyticsPlatformClient.d.ts +8 -4
- package/sdk/platform/Analytics/AnalyticsPlatformClient.js +153 -8
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -4
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +141 -8
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +24 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +429 -24
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +34 -17
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +617 -34
- package/sdk/platform/Cart/CartPlatformModel.d.ts +35 -35
- package/sdk/platform/Cart/CartPlatformModel.js +617 -617
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +191 -138
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2202 -302
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +11 -11
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +45 -45
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +344 -226
- package/sdk/platform/Catalog/CatalogPlatformClient.js +3282 -488
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +110 -100
- package/sdk/platform/Catalog/CatalogPlatformModel.js +2073 -1795
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +23 -21
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +103 -84
- package/sdk/platform/Common/CommonPlatformClient.d.ts +4 -2
- package/sdk/platform/Common/CommonPlatformClient.js +73 -4
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +80 -40
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1499 -80
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +41 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +27 -14
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +486 -26
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +9 -9
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +274 -274
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +56 -28
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1022 -56
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +36 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +693 -36
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +148 -67
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +2446 -140
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +7 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +4 -0
- package/sdk/platform/Content/ContentPlatformModel.js +43 -1
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +21 -10
- package/sdk/platform/Discount/DiscountPlatformClient.js +400 -22
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +8 -4
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +148 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +12 -6
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +214 -12
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +27 -14
- package/sdk/platform/Inventory/InventoryPlatformClient.js +449 -24
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +26 -13
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +447 -26
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +22 -11
- package/sdk/platform/Lead/LeadPlatformClient.js +384 -22
- package/sdk/platform/OAuthClient.js +8 -8
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +6 -3
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +125 -6
- package/sdk/platform/Order/OrderPlatformClient.d.ts +108 -47
- package/sdk/platform/Order/OrderPlatformClient.js +1641 -100
- package/sdk/platform/Order/OrderPlatformModel.d.ts +69 -58
- package/sdk/platform/Order/OrderPlatformModel.js +1485 -1493
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +2 -1
- package/sdk/platform/Order/OrderPlatformValidator.js +15 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -2
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +74 -4
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -1
- package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +22 -11
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +418 -22
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +21 -11
- package/sdk/platform/Payment/PaymentPlatformClient.js +374 -20
- package/sdk/platform/Payment/PaymentPlatformModel.js +139 -139
- package/sdk/platform/PlatformApplicationClient.d.ts +2973 -2827
- package/sdk/platform/PlatformApplicationClient.js +3461 -3263
- package/sdk/platform/PlatformClient.d.ts +2973 -2827
- package/sdk/platform/PlatformClient.js +3461 -3263
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +26 -13
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +449 -26
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +8 -4
- package/sdk/platform/Share/SharePlatformApplicationClient.js +139 -8
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +47 -23
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +816 -48
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +24 -12
- package/sdk/platform/User/UserPlatformApplicationClient.js +417 -24
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +12 -6
- package/sdk/platform/Webhook/WebhookPlatformClient.js +229 -12
- package/sdk/public/Configuration/ConfigurationPublicClient.js +72 -4
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +3 -1
- package/sdk/public/Inventory/InventoryPublicClient.js +210 -12
- package/sdk/public/Inventory/InventoryPublicValidator.js +3 -1
- package/sdk/public/Webhook/WebhookPublicClient.js +74 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +3 -1
|
@@ -31,12 +31,13 @@ declare class OrderValidator {
|
|
|
31
31
|
static dispatchManifest(): any;
|
|
32
32
|
static getRoleBasedActions(): any;
|
|
33
33
|
static getShipmentHistory(): any;
|
|
34
|
+
static postShipmentHistory(): any;
|
|
34
35
|
static sendSmsNinja(): any;
|
|
35
36
|
static platformManualAssignDPToShipment(): any;
|
|
36
37
|
static updatePackagingDimensions(): any;
|
|
37
38
|
static createOrder(): any;
|
|
38
|
-
static createChannelConfig(): any;
|
|
39
39
|
static getChannelConfig(): any;
|
|
40
|
+
static createChannelConfig(): any;
|
|
40
41
|
static uploadConsent(): any;
|
|
41
42
|
static orderUpdate(): any;
|
|
42
43
|
static checkOrderStatus(): any;
|
|
@@ -5,6 +5,8 @@ class OrderValidator {
|
|
|
5
5
|
static getShipments() {
|
|
6
6
|
return Joi.object({
|
|
7
7
|
lane: Joi.string().allow(""),
|
|
8
|
+
bagStatus: Joi.string().allow(""),
|
|
9
|
+
statusOverrideLane: Joi.boolean(),
|
|
8
10
|
searchType: Joi.string().allow(""),
|
|
9
11
|
searchValue: Joi.string().allow(""),
|
|
10
12
|
searchId: Joi.string().allow(""),
|
|
@@ -18,11 +20,14 @@ class OrderValidator {
|
|
|
18
20
|
pageNo: Joi.number(),
|
|
19
21
|
pageSize: Joi.number(),
|
|
20
22
|
isPrioritySort: Joi.boolean(),
|
|
23
|
+
fetchActiveShipment: Joi.boolean(),
|
|
21
24
|
excludeLockedShipments: Joi.boolean(),
|
|
22
25
|
paymentMethods: Joi.string().allow(""),
|
|
23
26
|
channelShipmentId: Joi.string().allow(""),
|
|
24
27
|
channelOrderId: Joi.string().allow(""),
|
|
25
28
|
customMeta: Joi.string().allow(""),
|
|
29
|
+
orderingChannel: Joi.string().allow(""),
|
|
30
|
+
companyAffiliateTag: Joi.string().allow(""),
|
|
26
31
|
}).required();
|
|
27
32
|
}
|
|
28
33
|
|
|
@@ -290,6 +295,12 @@ class OrderValidator {
|
|
|
290
295
|
}).required();
|
|
291
296
|
}
|
|
292
297
|
|
|
298
|
+
static postShipmentHistory() {
|
|
299
|
+
return Joi.object({
|
|
300
|
+
body: OrderModel.PostShipmentHistory().required(),
|
|
301
|
+
}).required();
|
|
302
|
+
}
|
|
303
|
+
|
|
293
304
|
static sendSmsNinja() {
|
|
294
305
|
return Joi.object({
|
|
295
306
|
body: OrderModel.SendSmsPayload().required(),
|
|
@@ -314,16 +325,16 @@ class OrderValidator {
|
|
|
314
325
|
}).required();
|
|
315
326
|
}
|
|
316
327
|
|
|
328
|
+
static getChannelConfig() {
|
|
329
|
+
return Joi.object({}).required();
|
|
330
|
+
}
|
|
331
|
+
|
|
317
332
|
static createChannelConfig() {
|
|
318
333
|
return Joi.object({
|
|
319
334
|
body: OrderModel.CreateChannelConfigData().required(),
|
|
320
335
|
}).required();
|
|
321
336
|
}
|
|
322
337
|
|
|
323
|
-
static getChannelConfig() {
|
|
324
|
-
return Joi.object({}).required();
|
|
325
|
-
}
|
|
326
|
-
|
|
327
338
|
static uploadConsent() {
|
|
328
339
|
return Joi.object({
|
|
329
340
|
body: OrderModel.UploadConsent().required(),
|
|
@@ -8,23 +8,25 @@ declare class Partner {
|
|
|
8
8
|
* @param {string} arg.extensionId - Extension id for which proxy URL will
|
|
9
9
|
* be generated
|
|
10
10
|
* @param {AddProxyReq} arg.body
|
|
11
|
+
* @returns {Promise<AddProxyResponse>} - Success response
|
|
11
12
|
* @summary: Create proxy URL for the external URL
|
|
12
13
|
* @description: Use this API to generate proxy URL for the external URL
|
|
13
14
|
*/
|
|
14
15
|
addProxyPath({ extensionId, body }?: {
|
|
15
16
|
extensionId: string;
|
|
16
17
|
body: AddProxyReq;
|
|
17
|
-
}): Promise<
|
|
18
|
+
}): Promise<AddProxyResponse>;
|
|
18
19
|
/**
|
|
19
20
|
* @param {Object} arg - Arg object.
|
|
20
21
|
* @param {string} arg.extensionId - Extension id for which proxy URL needs
|
|
21
22
|
* to be removed
|
|
22
23
|
* @param {string} arg.attachedPath - Attachaed path slug
|
|
24
|
+
* @returns {Promise<RemoveProxyResponse>} - Success response
|
|
23
25
|
* @summary: Remove proxy URL for the external URL
|
|
24
26
|
* @description: Use this API to remove the proxy URL which is already generated for the external URL
|
|
25
27
|
*/
|
|
26
28
|
removeProxyPath({ extensionId, attachedPath }?: {
|
|
27
29
|
extensionId: string;
|
|
28
30
|
attachedPath: string;
|
|
29
|
-
}): Promise<
|
|
31
|
+
}): Promise<RemoveProxyResponse>;
|
|
30
32
|
}
|
|
@@ -2,6 +2,8 @@ const Paginator = require("../../common/Paginator");
|
|
|
2
2
|
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
3
3
|
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
4
4
|
const PartnerValidator = require("./PartnerPlatformApplicationValidator");
|
|
5
|
+
const PartnerModel = require("./PartnerPlatformModel");
|
|
6
|
+
const { Logger } = require("./../../common/Logger");
|
|
5
7
|
|
|
6
8
|
class Partner {
|
|
7
9
|
constructor(config, applicationId) {
|
|
@@ -14,10 +16,11 @@ class Partner {
|
|
|
14
16
|
* @param {string} arg.extensionId - Extension id for which proxy URL will
|
|
15
17
|
* be generated
|
|
16
18
|
* @param {AddProxyReq} arg.body
|
|
19
|
+
* @returns {Promise<AddProxyResponse>} - Success response
|
|
17
20
|
* @summary: Create proxy URL for the external URL
|
|
18
21
|
* @description: Use this API to generate proxy URL for the external URL
|
|
19
22
|
*/
|
|
20
|
-
addProxyPath({ extensionId, body } = {}) {
|
|
23
|
+
async addProxyPath({ extensionId, body } = {}) {
|
|
21
24
|
const { error } = PartnerValidator.addProxyPath().validate(
|
|
22
25
|
{
|
|
23
26
|
extensionId,
|
|
@@ -29,15 +32,48 @@ class Partner {
|
|
|
29
32
|
return Promise.reject(new FDKClientValidationError(error));
|
|
30
33
|
}
|
|
31
34
|
|
|
35
|
+
// Showing warrnings if extra unknown parameters are found
|
|
36
|
+
const { error: warrning } = PartnerValidator.addProxyPath().validate(
|
|
37
|
+
{
|
|
38
|
+
extensionId,
|
|
39
|
+
body,
|
|
40
|
+
},
|
|
41
|
+
{ abortEarly: false, allowUnknown: false }
|
|
42
|
+
);
|
|
43
|
+
if (warrning) {
|
|
44
|
+
Logger({
|
|
45
|
+
level: "WARN",
|
|
46
|
+
message: "Parameter Validation warrnings for addProxyPath",
|
|
47
|
+
});
|
|
48
|
+
Logger({ level: "WARN", message: warrning });
|
|
49
|
+
}
|
|
50
|
+
|
|
32
51
|
const query_params = {};
|
|
33
52
|
|
|
34
|
-
|
|
53
|
+
const response = await PlatformAPIClient.execute(
|
|
35
54
|
this.config,
|
|
36
55
|
"post",
|
|
37
56
|
`/service/platform/partners/v1.0/company/${this.config.companyId}/application/${this.applicationId}/proxy/${extensionId}`,
|
|
38
57
|
query_params,
|
|
39
58
|
body
|
|
40
59
|
);
|
|
60
|
+
|
|
61
|
+
const {
|
|
62
|
+
error: res_error,
|
|
63
|
+
} = PartnerModel.AddProxyResponse().validate(response, {
|
|
64
|
+
abortEarly: false,
|
|
65
|
+
allowUnknown: false,
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
if (res_error) {
|
|
69
|
+
Logger({
|
|
70
|
+
level: "WARN",
|
|
71
|
+
message: "Response Validation Warnnings for addProxyPath",
|
|
72
|
+
});
|
|
73
|
+
Logger({ level: "WARN", message: res_error });
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return response;
|
|
41
77
|
}
|
|
42
78
|
|
|
43
79
|
/**
|
|
@@ -45,10 +81,11 @@ class Partner {
|
|
|
45
81
|
* @param {string} arg.extensionId - Extension id for which proxy URL needs
|
|
46
82
|
* to be removed
|
|
47
83
|
* @param {string} arg.attachedPath - Attachaed path slug
|
|
84
|
+
* @returns {Promise<RemoveProxyResponse>} - Success response
|
|
48
85
|
* @summary: Remove proxy URL for the external URL
|
|
49
86
|
* @description: Use this API to remove the proxy URL which is already generated for the external URL
|
|
50
87
|
*/
|
|
51
|
-
removeProxyPath({ extensionId, attachedPath } = {}) {
|
|
88
|
+
async removeProxyPath({ extensionId, attachedPath } = {}) {
|
|
52
89
|
const { error } = PartnerValidator.removeProxyPath().validate(
|
|
53
90
|
{
|
|
54
91
|
extensionId,
|
|
@@ -60,15 +97,48 @@ class Partner {
|
|
|
60
97
|
return Promise.reject(new FDKClientValidationError(error));
|
|
61
98
|
}
|
|
62
99
|
|
|
100
|
+
// Showing warrnings if extra unknown parameters are found
|
|
101
|
+
const { error: warrning } = PartnerValidator.removeProxyPath().validate(
|
|
102
|
+
{
|
|
103
|
+
extensionId,
|
|
104
|
+
attachedPath,
|
|
105
|
+
},
|
|
106
|
+
{ abortEarly: false, allowUnknown: false }
|
|
107
|
+
);
|
|
108
|
+
if (warrning) {
|
|
109
|
+
Logger({
|
|
110
|
+
level: "WARN",
|
|
111
|
+
message: "Parameter Validation warrnings for removeProxyPath",
|
|
112
|
+
});
|
|
113
|
+
Logger({ level: "WARN", message: warrning });
|
|
114
|
+
}
|
|
115
|
+
|
|
63
116
|
const query_params = {};
|
|
64
117
|
|
|
65
|
-
|
|
118
|
+
const response = await PlatformAPIClient.execute(
|
|
66
119
|
this.config,
|
|
67
120
|
"delete",
|
|
68
121
|
`/service/platform/partners/v1.0/company/${this.config.companyId}/application/${this.applicationId}/proxy/${extensionId}/${attachedPath}`,
|
|
69
122
|
query_params,
|
|
70
123
|
undefined
|
|
71
124
|
);
|
|
125
|
+
|
|
126
|
+
const {
|
|
127
|
+
error: res_error,
|
|
128
|
+
} = PartnerModel.RemoveProxyResponse().validate(response, {
|
|
129
|
+
abortEarly: false,
|
|
130
|
+
allowUnknown: false,
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
if (res_error) {
|
|
134
|
+
Logger({
|
|
135
|
+
level: "WARN",
|
|
136
|
+
message: "Response Validation Warnnings for removeProxyPath",
|
|
137
|
+
});
|
|
138
|
+
Logger({ level: "WARN", message: res_error });
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return response;
|
|
72
142
|
}
|
|
73
143
|
}
|
|
74
144
|
module.exports = Partner;
|
|
@@ -29,6 +29,14 @@ class PartnerModel {
|
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
static RemoveProxyResponse() {
|
|
33
|
+
return Joi.object({
|
|
34
|
+
message: Joi.string().allow(""),
|
|
35
|
+
|
|
36
|
+
data: Joi.any(),
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
32
40
|
static APIError() {
|
|
33
41
|
return Joi.object({
|
|
34
42
|
code: Joi.string().allow(""),
|
|
@@ -42,13 +50,5 @@ class PartnerModel {
|
|
|
42
50
|
meta: Joi.any(),
|
|
43
51
|
});
|
|
44
52
|
}
|
|
45
|
-
|
|
46
|
-
static RemoveProxyResponse() {
|
|
47
|
-
return Joi.object({
|
|
48
|
-
message: Joi.string().allow(""),
|
|
49
|
-
|
|
50
|
-
data: Joi.any(),
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
53
|
}
|
|
54
54
|
module.exports = PartnerModel;
|
|
@@ -5,104 +5,115 @@ declare class Payment {
|
|
|
5
5
|
applicationId: any;
|
|
6
6
|
/**
|
|
7
7
|
* @param {Object} arg - Arg object.
|
|
8
|
+
* @returns {Promise<PaymentGatewayConfigResponse>} - Success response
|
|
8
9
|
* @summary: Get All Brand Payment Gateway Config Secret
|
|
9
10
|
* @description: Get All Brand Payment Gateway Config Secret
|
|
10
11
|
*/
|
|
11
|
-
getBrandPaymentGatewayConfig({}?: any): Promise<
|
|
12
|
+
getBrandPaymentGatewayConfig({}?: any): Promise<PaymentGatewayConfigResponse>;
|
|
12
13
|
/**
|
|
13
14
|
* @param {Object} arg - Arg object.
|
|
14
15
|
* @param {PaymentGatewayConfigRequest} arg.body
|
|
16
|
+
* @returns {Promise<PaymentGatewayToBeReviewed>} - Success response
|
|
15
17
|
* @summary: Save Config Secret For Brand Payment Gateway
|
|
16
18
|
* @description: Save Config Secret For Brand Payment Gateway
|
|
17
19
|
*/
|
|
18
20
|
saveBrandPaymentGatewayConfig({ body }?: {
|
|
19
21
|
body: PaymentGatewayConfigRequest;
|
|
20
|
-
}): Promise<
|
|
22
|
+
}): Promise<PaymentGatewayToBeReviewed>;
|
|
21
23
|
/**
|
|
22
24
|
* @param {Object} arg - Arg object.
|
|
23
25
|
* @param {PaymentGatewayConfigRequest} arg.body
|
|
26
|
+
* @returns {Promise<PaymentGatewayToBeReviewed>} - Success response
|
|
24
27
|
* @summary: Save Config Secret For Brand Payment Gateway
|
|
25
28
|
* @description: Save Config Secret For Brand Payment Gateway
|
|
26
29
|
*/
|
|
27
30
|
updateBrandPaymentGatewayConfig({ body }?: {
|
|
28
31
|
body: PaymentGatewayConfigRequest;
|
|
29
|
-
}): Promise<
|
|
32
|
+
}): Promise<PaymentGatewayToBeReviewed>;
|
|
30
33
|
/**
|
|
31
34
|
* @param {Object} arg - Arg object.
|
|
32
35
|
* @param {boolean} arg.refresh -
|
|
33
36
|
* @param {string} arg.requestType -
|
|
37
|
+
* @returns {Promise<PaymentOptionsResponse>} - Success response
|
|
34
38
|
* @summary: Get All Valid Payment Options
|
|
35
39
|
* @description: Use this API to get Get All Valid Payment Options for making payment
|
|
36
40
|
*/
|
|
37
41
|
getPaymentModeRoutes({ refresh, requestType }?: {
|
|
38
42
|
refresh: boolean;
|
|
39
43
|
requestType: string;
|
|
40
|
-
}): Promise<
|
|
44
|
+
}): Promise<PaymentOptionsResponse>;
|
|
41
45
|
/**
|
|
42
46
|
* @param {Object} arg - Arg object.
|
|
43
47
|
* @param {string} arg.orderId -
|
|
44
48
|
* @param {string} [arg.requestHash] -
|
|
49
|
+
* @returns {Promise<RefundAccountResponse>} - Success response
|
|
45
50
|
* @summary: Get bank details
|
|
46
51
|
* @description: Use this API to get saved bank details for returned/cancelled order using order id.
|
|
47
52
|
*/
|
|
48
53
|
getBankAccountDetailsOpenAPI({ orderId, requestHash }?: {
|
|
49
54
|
orderId: string;
|
|
50
55
|
requestHash?: string;
|
|
51
|
-
}): Promise<
|
|
56
|
+
}): Promise<RefundAccountResponse>;
|
|
52
57
|
/**
|
|
53
58
|
* @param {Object} arg - Arg object.
|
|
54
59
|
* @param {AddBeneficiaryDetailsOTPRequest} arg.body
|
|
60
|
+
* @returns {Promise<RefundAccountResponse>} - Success response
|
|
55
61
|
* @summary: Save bank details for cancelled/returned order
|
|
56
62
|
* @description: Use this API to save bank details for returned/cancelled order to refund amount in his account.
|
|
57
63
|
*/
|
|
58
64
|
addRefundBankAccountUsingOTP({ body }?: {
|
|
59
65
|
body: AddBeneficiaryDetailsOTPRequest;
|
|
60
|
-
}): Promise<
|
|
66
|
+
}): Promise<RefundAccountResponse>;
|
|
61
67
|
/**
|
|
62
68
|
* @param {Object} arg - Arg object.
|
|
63
69
|
* @param {string} arg.orderId -
|
|
70
|
+
* @returns {Promise<OrderBeneficiaryResponse>} - Success response
|
|
64
71
|
* @summary: List Order Beneficiary
|
|
65
72
|
* @description: Get all active beneficiary details added by the user for refund
|
|
66
73
|
*/
|
|
67
74
|
getUserOrderBeneficiaries({ orderId }?: {
|
|
68
75
|
orderId: string;
|
|
69
|
-
}): Promise<
|
|
76
|
+
}): Promise<OrderBeneficiaryResponse>;
|
|
70
77
|
/**
|
|
71
78
|
* @param {Object} arg - Arg object.
|
|
72
79
|
* @param {string} arg.orderId -
|
|
80
|
+
* @returns {Promise<OrderBeneficiaryResponse>} - Success response
|
|
73
81
|
* @summary: List User Beneficiary
|
|
74
82
|
* @description: Get all active beneficiary details added by the user for refund
|
|
75
83
|
*/
|
|
76
84
|
getUserBeneficiaries({ orderId }?: {
|
|
77
85
|
orderId: string;
|
|
78
|
-
}): Promise<
|
|
86
|
+
}): Promise<OrderBeneficiaryResponse>;
|
|
79
87
|
/**
|
|
80
88
|
* @param {Object} arg - Arg object.
|
|
81
89
|
* @param {PaymentConfirmationRequest} arg.body
|
|
90
|
+
* @returns {Promise<PaymentConfirmationResponse>} - Success response
|
|
82
91
|
* @summary: Confirm payment after successful payment from payment gateway
|
|
83
92
|
* @description: Use this API to confirm payment after payment gateway accepted payment.
|
|
84
93
|
*/
|
|
85
94
|
confirmPayment({ body }?: {
|
|
86
95
|
body: PaymentConfirmationRequest;
|
|
87
|
-
}): Promise<
|
|
96
|
+
}): Promise<PaymentConfirmationResponse>;
|
|
88
97
|
/**
|
|
89
98
|
* @param {Object} arg - Arg object.
|
|
90
99
|
* @param {string} arg.merchantUserId -
|
|
91
100
|
* @param {string} arg.mobileNo -
|
|
101
|
+
* @returns {Promise<GetUserCODLimitResponse>} - Success response
|
|
92
102
|
* @summary: Get COD limit for user
|
|
93
103
|
* @description: Use this API to get user cod limit and reamining limit for the payment
|
|
94
104
|
*/
|
|
95
105
|
getUserCODlimitRoutes({ merchantUserId, mobileNo }?: {
|
|
96
106
|
merchantUserId: string;
|
|
97
107
|
mobileNo: string;
|
|
98
|
-
}): Promise<
|
|
108
|
+
}): Promise<GetUserCODLimitResponse>;
|
|
99
109
|
/**
|
|
100
110
|
* @param {Object} arg - Arg object.
|
|
101
111
|
* @param {SetCODForUserRequest} arg.body
|
|
112
|
+
* @returns {Promise<SetCODOptionResponse>} - Success response
|
|
102
113
|
* @summary: Set COD option for user for payment
|
|
103
114
|
* @description: Use this API to set cod option as true or false for the payment
|
|
104
115
|
*/
|
|
105
116
|
setUserCODlimitRoutes({ body }?: {
|
|
106
117
|
body: SetCODForUserRequest;
|
|
107
|
-
}): Promise<
|
|
118
|
+
}): Promise<SetCODOptionResponse>;
|
|
108
119
|
}
|