@gofynd/fdk-client-javascript 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/index.d.ts +4 -7
- package/index.js +5 -12
- package/package.json +1 -1
- package/sdk/application/ApplicationClient.d.ts +20 -20
- package/sdk/application/ApplicationClient.js +26 -26
- package/sdk/application/Cart/CartApplicationClient.d.ts +45 -4
- package/sdk/application/Cart/CartApplicationClient.js +169 -9
- package/sdk/application/Cart/CartApplicationModel.d.ts +15 -0
- package/sdk/application/Cart/CartApplicationModel.js +177 -1
- package/sdk/application/Cart/CartApplicationValidator.d.ts +2 -0
- package/sdk/application/Cart/CartApplicationValidator.js +20 -0
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +14 -4
- package/sdk/application/Catalog/CatalogApplicationClient.js +18 -6
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1 -0
- package/sdk/application/Catalog/CatalogApplicationModel.js +13 -0
- package/sdk/application/Catalog/CatalogApplicationValidator.js +2 -0
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +14 -10
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +16 -10
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1 -0
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +1 -0
- package/sdk/application/Content/ContentApplicationModel.js +4 -1
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +8 -2
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +8 -2
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +2 -2
- package/sdk/application/Logistic/LogisticApplicationModel.js +3 -2
- package/sdk/application/Order/OrderApplicationClient.d.ts +17 -2
- package/sdk/application/Order/OrderApplicationClient.js +70 -2
- package/sdk/application/Order/OrderApplicationModel.d.ts +17 -0
- package/sdk/application/Order/OrderApplicationModel.js +129 -8
- package/sdk/application/Order/OrderApplicationValidator.d.ts +1 -0
- package/sdk/application/Order/OrderApplicationValidator.js +7 -0
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +35 -0
- package/sdk/application/Payment/PaymentApplicationClient.js +200 -0
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +4 -0
- package/sdk/application/Payment/PaymentApplicationModel.js +58 -7
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +3 -0
- package/sdk/application/Payment/PaymentApplicationValidator.js +19 -0
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +16 -3
- package/sdk/application/PosCart/PosCartApplicationClient.js +39 -6
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +10 -0
- package/sdk/application/PosCart/PosCartApplicationModel.js +113 -1
- package/sdk/application/PosCart/PosCartApplicationValidator.js +6 -0
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +8 -8
- package/sdk/application/Rewards/RewardsApplicationClient.js +8 -8
- package/sdk/application/index.d.ts +10 -10
- package/sdk/application/index.js +13 -13
- package/sdk/common/AxiosHelper.js +1 -1
- package/sdk/common/Constant.d.ts +5 -0
- package/sdk/common/Constant.js +5 -0
- package/sdk/platform/Billing/BillingPlatformModel.js +6 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +479 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +2574 -307
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +31 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +263 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +61 -0
- package/sdk/platform/Cart/CartPlatformModel.js +697 -2
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +8 -2
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +10 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +1 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.js +2 -2
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.js +41 -29
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1 -0
- package/sdk/platform/Communication/CommunicationPlatformModel.js +9 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +2 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +2 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +5 -4
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +99 -78
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +99 -78
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +87 -71
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +87 -71
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +2 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +26 -0
- package/sdk/platform/Content/ContentPlatformModel.js +4 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +10 -4
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +15 -9
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -2
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -2
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +2 -2
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +135 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +853 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +51 -0
- package/sdk/platform/Finance/FinancePlatformModel.js +342 -0
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +16 -0
- package/sdk/platform/Finance/FinancePlatformValidator.js +84 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +11 -1
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +66 -2
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -0
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +161 -81
- package/sdk/platform/Order/OrderPlatformClient.js +546 -119
- package/sdk/platform/Order/OrderPlatformModel.d.ts +42 -6
- package/sdk/platform/Order/OrderPlatformModel.js +570 -158
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +6 -0
- package/sdk/platform/Order/OrderPlatformValidator.js +52 -10
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +22 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +127 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +2 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +13 -0
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +145 -0
- package/sdk/platform/Partner/PartnerPlatformClient.js +799 -0
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +39 -0
- package/sdk/platform/Partner/PartnerPlatformModel.js +367 -0
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +14 -0
- package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +221 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1476 -190
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +20 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +126 -0
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +44 -0
- package/sdk/platform/Payment/PaymentPlatformModel.js +410 -0
- package/sdk/platform/PlatformApplicationClient.d.ts +1149 -930
- package/sdk/platform/PlatformApplicationClient.js +1260 -1027
- package/sdk/platform/PlatformClient.d.ts +10360 -8660
- package/sdk/platform/PlatformClient.js +11126 -9093
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +14 -26
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +14 -74
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -1
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -7
- package/sdk/platform/index.d.ts +15 -14
- package/sdk/platform/index.js +20 -18
- package/sdk/public/PublicClient.d.ts +2 -2
- package/sdk/public/PublicClient.js +4 -4
- package/sdk/public/index.d.ts +1 -1
- package/sdk/public/index.js +2 -2
- package/partner.d.ts +0 -4
- package/partner.js +0 -7
- package/sdk/partner/OAuthClient.d.ts +0 -14
- package/sdk/partner/OAuthClient.js +0 -112
- package/sdk/partner/PartnerAPIClient.d.ts +0 -12
- package/sdk/partner/PartnerAPIClient.js +0 -42
- package/sdk/partner/PartnerClient.d.ts +0 -6
- package/sdk/partner/PartnerClient.js +0 -17
- package/sdk/partner/PartnerConfig.d.ts +0 -30
- package/sdk/partner/PartnerConfig.js +0 -39
- package/sdk/partner/index.d.ts +0 -3
- package/sdk/partner/index.js +0 -5
|
@@ -11,7 +11,12 @@ declare class OrderModel {
|
|
|
11
11
|
static BreakupValues(): any;
|
|
12
12
|
static CurrentStatus(): any;
|
|
13
13
|
static CustomerDetailsResponse(): any;
|
|
14
|
+
static DataUpdates(): any;
|
|
14
15
|
static DeliveryAddress(): any;
|
|
16
|
+
static EntitiesDataUpdates(): any;
|
|
17
|
+
static EntitiesReasons(): any;
|
|
18
|
+
static EntityReasonData(): any;
|
|
19
|
+
static ErrorResponse(): any;
|
|
15
20
|
static FinancialBreakup(): any;
|
|
16
21
|
static FulfillingCompany(): any;
|
|
17
22
|
static FulfillingStore(): any;
|
|
@@ -27,23 +32,35 @@ declare class OrderModel {
|
|
|
27
32
|
static OrderSchema(): any;
|
|
28
33
|
static OrderStatuses(): any;
|
|
29
34
|
static Prices(): any;
|
|
35
|
+
static Products(): any;
|
|
36
|
+
static ProductsDataUpdates(): any;
|
|
37
|
+
static ProductsDataUpdatesFilters(): any;
|
|
38
|
+
static ProductsReasons(): any;
|
|
39
|
+
static ProductsReasonsData(): any;
|
|
40
|
+
static ProductsReasonsFilters(): any;
|
|
30
41
|
static Promise(): any;
|
|
31
42
|
static QuestionSet(): any;
|
|
43
|
+
static ReasonsData(): any;
|
|
32
44
|
static ResponseGetInvoiceShipment(): any;
|
|
33
45
|
static SendOtpToCustomerResponse(): any;
|
|
46
|
+
static ShipmentApplicationStatusResponse(): any;
|
|
34
47
|
static ShipmentBagReasons(): any;
|
|
35
48
|
static ShipmentById(): any;
|
|
36
49
|
static ShipmentPayment(): any;
|
|
37
50
|
static ShipmentReason(): any;
|
|
38
51
|
static ShipmentReasons(): any;
|
|
39
52
|
static Shipments(): any;
|
|
53
|
+
static ShipmentsRequest(): any;
|
|
40
54
|
static ShipmentStatus(): any;
|
|
41
55
|
static ShipmentTotalDetails(): any;
|
|
42
56
|
static ShipmentTrack(): any;
|
|
43
57
|
static ShipmentUserInfo(): any;
|
|
58
|
+
static StatuesRequest(): any;
|
|
59
|
+
static StatusesBodyResponse(): any;
|
|
44
60
|
static TimeStampData(): any;
|
|
45
61
|
static Track(): any;
|
|
46
62
|
static TrackingDetails(): any;
|
|
63
|
+
static UpdateShipmentStatusRequest(): any;
|
|
47
64
|
static UserInfo(): any;
|
|
48
65
|
static VerifyOtp(): any;
|
|
49
66
|
static VerifyOtpResponse(): any;
|
|
@@ -51,15 +51,16 @@ class OrderModel {
|
|
|
51
51
|
currency_code: Joi.string().allow(""),
|
|
52
52
|
currency_symbol: Joi.string().allow(""),
|
|
53
53
|
current_status: OrderModel.CurrentStatus(),
|
|
54
|
-
delivery_date: Joi.string().allow(""),
|
|
54
|
+
delivery_date: Joi.string().allow("").allow(null),
|
|
55
55
|
financial_breakup: Joi.array().items(OrderModel.FinancialBreakup()),
|
|
56
56
|
id: Joi.number(),
|
|
57
57
|
item: OrderModel.Item(),
|
|
58
58
|
line_number: Joi.number(),
|
|
59
|
+
meta: Joi.any(),
|
|
59
60
|
parent_promo_bags: Joi.any(),
|
|
60
61
|
prices: OrderModel.Prices(),
|
|
61
62
|
quantity: Joi.number(),
|
|
62
|
-
returnable_date: Joi.string().allow(""),
|
|
63
|
+
returnable_date: Joi.string().allow("").allow(null),
|
|
63
64
|
seller_identifier: Joi.string().allow(""),
|
|
64
65
|
});
|
|
65
66
|
}
|
|
@@ -90,7 +91,7 @@ class OrderModel {
|
|
|
90
91
|
}
|
|
91
92
|
static CurrentStatus() {
|
|
92
93
|
return Joi.object({
|
|
93
|
-
journey_type: Joi.string().allow(""),
|
|
94
|
+
journey_type: Joi.string().allow("").allow(null),
|
|
94
95
|
name: Joi.string().allow(""),
|
|
95
96
|
status: Joi.string().allow(""),
|
|
96
97
|
updated_at: Joi.string().allow(""),
|
|
@@ -105,6 +106,12 @@ class OrderModel {
|
|
|
105
106
|
shipment_id: Joi.string().allow(""),
|
|
106
107
|
});
|
|
107
108
|
}
|
|
109
|
+
static DataUpdates() {
|
|
110
|
+
return Joi.object({
|
|
111
|
+
entities: Joi.array().items(OrderModel.EntitiesDataUpdates()),
|
|
112
|
+
products: Joi.array().items(OrderModel.ProductsDataUpdates()),
|
|
113
|
+
});
|
|
114
|
+
}
|
|
108
115
|
static DeliveryAddress() {
|
|
109
116
|
return Joi.object({
|
|
110
117
|
address: Joi.string().allow(""),
|
|
@@ -121,8 +128,8 @@ class OrderModel {
|
|
|
121
128
|
created_at: Joi.string().allow(""),
|
|
122
129
|
email: Joi.string().allow(""),
|
|
123
130
|
landmark: Joi.string().allow(""),
|
|
124
|
-
latitude: Joi.number(),
|
|
125
|
-
longitude: Joi.number(),
|
|
131
|
+
latitude: Joi.number().allow(null),
|
|
132
|
+
longitude: Joi.number().allow(null),
|
|
126
133
|
name: Joi.string().allow(""),
|
|
127
134
|
phone: Joi.string().allow(""),
|
|
128
135
|
pincode: Joi.string().allow(""),
|
|
@@ -131,6 +138,33 @@ class OrderModel {
|
|
|
131
138
|
version: Joi.string().allow(""),
|
|
132
139
|
});
|
|
133
140
|
}
|
|
141
|
+
static EntitiesDataUpdates() {
|
|
142
|
+
return Joi.object({
|
|
143
|
+
data: Joi.any(),
|
|
144
|
+
filters: Joi.array().items(Joi.any()),
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
static EntitiesReasons() {
|
|
148
|
+
return Joi.object({
|
|
149
|
+
data: OrderModel.EntityReasonData(),
|
|
150
|
+
filters: Joi.array().items(Joi.any()),
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
static EntityReasonData() {
|
|
154
|
+
return Joi.object({
|
|
155
|
+
reason_id: Joi.number(),
|
|
156
|
+
reason_text: Joi.string().allow(""),
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
static ErrorResponse() {
|
|
160
|
+
return Joi.object({
|
|
161
|
+
code: Joi.string().allow("").allow(null),
|
|
162
|
+
exception: Joi.string().allow("").allow(null),
|
|
163
|
+
message: Joi.string().allow("").allow(null),
|
|
164
|
+
stack_trace: Joi.string().allow("").allow(null),
|
|
165
|
+
status: Joi.number(),
|
|
166
|
+
});
|
|
167
|
+
}
|
|
134
168
|
static FinancialBreakup() {
|
|
135
169
|
return Joi.object({
|
|
136
170
|
added_to_fynd_cash: Joi.boolean(),
|
|
@@ -196,6 +230,9 @@ class OrderModel {
|
|
|
196
230
|
code: Joi.string().allow(""),
|
|
197
231
|
id: Joi.number(),
|
|
198
232
|
image: Joi.array().items(Joi.string().allow("")),
|
|
233
|
+
l1_categories: Joi.array().items(Joi.string().allow("")),
|
|
234
|
+
l2_categories: Joi.array().items(Joi.string().allow("")),
|
|
235
|
+
l3_category_name: Joi.string().allow(""),
|
|
199
236
|
name: Joi.string().allow(""),
|
|
200
237
|
seller_identifier: Joi.string().allow(""),
|
|
201
238
|
size: Joi.string().allow(""),
|
|
@@ -286,6 +323,44 @@ class OrderModel {
|
|
|
286
323
|
value_of_good: Joi.number(),
|
|
287
324
|
});
|
|
288
325
|
}
|
|
326
|
+
static Products() {
|
|
327
|
+
return Joi.object({
|
|
328
|
+
identifier: Joi.string().allow(""),
|
|
329
|
+
line_number: Joi.number(),
|
|
330
|
+
quantity: Joi.number(),
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
static ProductsDataUpdates() {
|
|
334
|
+
return Joi.object({
|
|
335
|
+
data: Joi.any(),
|
|
336
|
+
filters: Joi.array().items(OrderModel.ProductsDataUpdatesFilters()),
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
static ProductsDataUpdatesFilters() {
|
|
340
|
+
return Joi.object({
|
|
341
|
+
identifier: Joi.string().allow(""),
|
|
342
|
+
line_number: Joi.number(),
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
static ProductsReasons() {
|
|
346
|
+
return Joi.object({
|
|
347
|
+
data: OrderModel.ProductsReasonsData(),
|
|
348
|
+
filters: Joi.array().items(OrderModel.ProductsReasonsFilters()),
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
static ProductsReasonsData() {
|
|
352
|
+
return Joi.object({
|
|
353
|
+
reason_id: Joi.number(),
|
|
354
|
+
reason_text: Joi.string().allow(""),
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
static ProductsReasonsFilters() {
|
|
358
|
+
return Joi.object({
|
|
359
|
+
identifier: Joi.string().allow(""),
|
|
360
|
+
line_number: Joi.number(),
|
|
361
|
+
quantity: Joi.number(),
|
|
362
|
+
});
|
|
363
|
+
}
|
|
289
364
|
static Promise() {
|
|
290
365
|
return Joi.object({
|
|
291
366
|
show_promise: Joi.boolean(),
|
|
@@ -298,6 +373,12 @@ class OrderModel {
|
|
|
298
373
|
id: Joi.number(),
|
|
299
374
|
});
|
|
300
375
|
}
|
|
376
|
+
static ReasonsData() {
|
|
377
|
+
return Joi.object({
|
|
378
|
+
entities: Joi.array().items(OrderModel.EntitiesReasons()),
|
|
379
|
+
products: Joi.array().items(OrderModel.ProductsReasons()),
|
|
380
|
+
});
|
|
381
|
+
}
|
|
301
382
|
static ResponseGetInvoiceShipment() {
|
|
302
383
|
return Joi.object({
|
|
303
384
|
presigned_type: Joi.string().allow("").required(),
|
|
@@ -314,6 +395,11 @@ class OrderModel {
|
|
|
314
395
|
success: Joi.boolean(),
|
|
315
396
|
});
|
|
316
397
|
}
|
|
398
|
+
static ShipmentApplicationStatusResponse() {
|
|
399
|
+
return Joi.object({
|
|
400
|
+
statuses: Joi.array().items(OrderModel.StatusesBodyResponse()),
|
|
401
|
+
});
|
|
402
|
+
}
|
|
317
403
|
static ShipmentBagReasons() {
|
|
318
404
|
return Joi.object({
|
|
319
405
|
reasons: Joi.array().items(OrderModel.BagReasons()),
|
|
@@ -362,20 +448,20 @@ class OrderModel {
|
|
|
362
448
|
comment: Joi.string().allow(""),
|
|
363
449
|
custom_meta: Joi.array().items(Joi.any()),
|
|
364
450
|
delivery_address: OrderModel.DeliveryAddress(),
|
|
365
|
-
delivery_date: Joi.string().allow(""),
|
|
451
|
+
delivery_date: Joi.string().allow("").allow(null),
|
|
366
452
|
dp_name: Joi.string().allow(""),
|
|
367
453
|
fulfilling_company: OrderModel.FulfillingCompany(),
|
|
368
454
|
fulfilling_store: OrderModel.FulfillingStore(),
|
|
369
455
|
invoice: OrderModel.Invoice(),
|
|
370
456
|
need_help_url: Joi.string().allow(""),
|
|
371
457
|
order_id: Joi.string().allow(""),
|
|
372
|
-
order_type: Joi.string().allow(""),
|
|
458
|
+
order_type: Joi.string().allow("").allow(null),
|
|
373
459
|
payment: OrderModel.ShipmentPayment(),
|
|
374
460
|
prices: OrderModel.Prices(),
|
|
375
461
|
promise: OrderModel.Promise(),
|
|
376
462
|
refund_details: Joi.any(),
|
|
377
463
|
return_meta: Joi.any(),
|
|
378
|
-
returnable_date: Joi.string().allow(""),
|
|
464
|
+
returnable_date: Joi.string().allow("").allow(null),
|
|
379
465
|
shipment_created_at: Joi.string().allow(""),
|
|
380
466
|
shipment_id: Joi.string().allow(""),
|
|
381
467
|
shipment_status: OrderModel.ShipmentStatus(),
|
|
@@ -390,10 +476,19 @@ class OrderModel {
|
|
|
390
476
|
user_info: OrderModel.ShipmentUserInfo(),
|
|
391
477
|
});
|
|
392
478
|
}
|
|
479
|
+
static ShipmentsRequest() {
|
|
480
|
+
return Joi.object({
|
|
481
|
+
data_updates: OrderModel.DataUpdates(),
|
|
482
|
+
identifier: Joi.string().allow("").required(),
|
|
483
|
+
products: Joi.array().items(OrderModel.Products()),
|
|
484
|
+
reasons: OrderModel.ReasonsData(),
|
|
485
|
+
});
|
|
486
|
+
}
|
|
393
487
|
static ShipmentStatus() {
|
|
394
488
|
return Joi.object({
|
|
395
489
|
hex_code: Joi.string().allow(""),
|
|
396
490
|
title: Joi.string().allow(""),
|
|
491
|
+
value: Joi.string().allow("").allow(null),
|
|
397
492
|
});
|
|
398
493
|
}
|
|
399
494
|
static ShipmentTotalDetails() {
|
|
@@ -410,10 +505,24 @@ class OrderModel {
|
|
|
410
505
|
}
|
|
411
506
|
static ShipmentUserInfo() {
|
|
412
507
|
return Joi.object({
|
|
508
|
+
email: Joi.string().allow(""),
|
|
413
509
|
first_name: Joi.string().allow(""),
|
|
414
510
|
gender: Joi.string().allow(""),
|
|
415
511
|
last_name: Joi.string().allow(""),
|
|
416
512
|
mobile: Joi.string().allow(""),
|
|
513
|
+
name: Joi.string().allow(""),
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
static StatuesRequest() {
|
|
517
|
+
return Joi.object({
|
|
518
|
+
exclude_bags_next_state: Joi.string().allow(""),
|
|
519
|
+
shipments: Joi.array().items(OrderModel.ShipmentsRequest()),
|
|
520
|
+
status: Joi.string().allow(""),
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
static StatusesBodyResponse() {
|
|
524
|
+
return Joi.object({
|
|
525
|
+
shipments: Joi.array().items(Joi.any()),
|
|
417
526
|
});
|
|
418
527
|
}
|
|
419
528
|
static TimeStampData() {
|
|
@@ -441,12 +550,24 @@ class OrderModel {
|
|
|
441
550
|
status: Joi.string().allow(""),
|
|
442
551
|
time: Joi.string().allow(""),
|
|
443
552
|
tracking_details: Joi.array().items(OrderModel.NestedTrackingDetails()),
|
|
553
|
+
value: Joi.string().allow("").allow(null),
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
static UpdateShipmentStatusRequest() {
|
|
557
|
+
return Joi.object({
|
|
558
|
+
force_transition: Joi.boolean(),
|
|
559
|
+
lock_after_transition: Joi.boolean(),
|
|
560
|
+
statuses: Joi.array().items(OrderModel.StatuesRequest()),
|
|
561
|
+
task: Joi.boolean(),
|
|
562
|
+
unlock_before_transition: Joi.boolean(),
|
|
444
563
|
});
|
|
445
564
|
}
|
|
446
565
|
static UserInfo() {
|
|
447
566
|
return Joi.object({
|
|
448
567
|
email: Joi.string().allow(""),
|
|
568
|
+
first_name: Joi.string().allow(""),
|
|
449
569
|
gender: Joi.string().allow(""),
|
|
570
|
+
last_name: Joi.string().allow(""),
|
|
450
571
|
mobile: Joi.string().allow(""),
|
|
451
572
|
name: Joi.string().allow(""),
|
|
452
573
|
});
|
|
@@ -70,6 +70,13 @@ class OrderValidator {
|
|
|
70
70
|
}).required();
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
static updateShipmentStatus() {
|
|
74
|
+
return Joi.object({
|
|
75
|
+
shipmentId: Joi.string().allow("").required(),
|
|
76
|
+
body: OrderModel.UpdateShipmentStatusRequest().required(),
|
|
77
|
+
}).required();
|
|
78
|
+
}
|
|
79
|
+
|
|
73
80
|
static verifyOtpShipmentCustomer() {
|
|
74
81
|
return Joi.object({
|
|
75
82
|
orderId: Joi.string().allow("").required(),
|
|
@@ -7,6 +7,7 @@ declare class Payment {
|
|
|
7
7
|
addRefundBankAccountUsingOTP: string;
|
|
8
8
|
attachCardToCustomer: string;
|
|
9
9
|
cancelPaymentLink: string;
|
|
10
|
+
cardDetails: string;
|
|
10
11
|
checkAndUpdatePaymentStatus: string;
|
|
11
12
|
checkAndUpdatePaymentStatusPaymentLink: string;
|
|
12
13
|
checkCredit: string;
|
|
@@ -30,6 +31,8 @@ declare class Payment {
|
|
|
30
31
|
getUserBeneficiariesDetail: string;
|
|
31
32
|
initialisePayment: string;
|
|
32
33
|
initialisePaymentPaymentLink: string;
|
|
34
|
+
outstandingOrderDetails: string;
|
|
35
|
+
paidOrderDetails: string;
|
|
33
36
|
pollingPaymentLink: string;
|
|
34
37
|
redirectToAggregator: string;
|
|
35
38
|
renderHTML: string;
|
|
@@ -85,6 +88,18 @@ declare class Payment {
|
|
|
85
88
|
cancelPaymentLink({ body }?: {
|
|
86
89
|
body: CancelOrResendPaymentLinkRequest;
|
|
87
90
|
}): Promise<CancelPaymentLinkResponse>;
|
|
91
|
+
/**
|
|
92
|
+
* @param {Object} arg - Arg object.
|
|
93
|
+
* @param {string} arg.cardInfo - Card first 6 digit IIN(prefix) number.
|
|
94
|
+
* @param {string} [arg.aggregator] -
|
|
95
|
+
* @returns {Promise<CardDetailsResponse>} - Success response
|
|
96
|
+
* @summary: API to get Card info from PG
|
|
97
|
+
* @description: API to get Card info from PG
|
|
98
|
+
*/
|
|
99
|
+
cardDetails({ cardInfo, aggregator }?: {
|
|
100
|
+
cardInfo: string;
|
|
101
|
+
aggregator?: string;
|
|
102
|
+
}): Promise<CardDetailsResponse>;
|
|
88
103
|
/**
|
|
89
104
|
* @param {Object} arg - Arg object.
|
|
90
105
|
* @param {PaymentStatusUpdateRequest} arg.body
|
|
@@ -348,6 +363,26 @@ declare class Payment {
|
|
|
348
363
|
initialisePaymentPaymentLink({ body }?: {
|
|
349
364
|
body: PaymentInitializationRequest;
|
|
350
365
|
}): Promise<PaymentInitializationResponse>;
|
|
366
|
+
/**
|
|
367
|
+
* @param {Object} arg - Arg object.
|
|
368
|
+
* @param {string} [arg.aggregator] -
|
|
369
|
+
* @returns {Promise<OutstandingOrderDetailsResponse>} - Success response
|
|
370
|
+
* @summary: API to fetch the outstanding order details
|
|
371
|
+
* @description: Use this API to fetch the outstanding order details.
|
|
372
|
+
*/
|
|
373
|
+
outstandingOrderDetails({ aggregator }?: {
|
|
374
|
+
aggregator?: string;
|
|
375
|
+
}): Promise<OutstandingOrderDetailsResponse>;
|
|
376
|
+
/**
|
|
377
|
+
* @param {Object} arg - Arg object.
|
|
378
|
+
* @param {string} [arg.aggregator] -
|
|
379
|
+
* @returns {Promise<PaidOrderDetailsResponse>} - Success response
|
|
380
|
+
* @summary: API to fetch the paid order details
|
|
381
|
+
* @description: Use this API to fetch the paid order details.
|
|
382
|
+
*/
|
|
383
|
+
paidOrderDetails({ aggregator }?: {
|
|
384
|
+
aggregator?: string;
|
|
385
|
+
}): Promise<PaidOrderDetailsResponse>;
|
|
351
386
|
/**
|
|
352
387
|
* @param {Object} arg - Arg object.
|
|
353
388
|
* @param {string} [arg.paymentLinkId] -
|
|
@@ -17,6 +17,7 @@ class Payment {
|
|
|
17
17
|
attachCardToCustomer: "/service/application/payment/v1.0/card/attach",
|
|
18
18
|
cancelPaymentLink:
|
|
19
19
|
"/service/application/payment/v1.0/cancel-payment-link/",
|
|
20
|
+
cardDetails: "/service/application/payment/v1.0/cards/info/{card_info}",
|
|
20
21
|
checkAndUpdatePaymentStatus:
|
|
21
22
|
"/service/application/payment/v1.0/payment/confirm/polling",
|
|
22
23
|
checkAndUpdatePaymentStatusPaymentLink:
|
|
@@ -55,6 +56,10 @@ class Payment {
|
|
|
55
56
|
initialisePayment: "/service/application/payment/v1.0/payment/request",
|
|
56
57
|
initialisePaymentPaymentLink:
|
|
57
58
|
"/service/application/payment/v1.0/payment/request/link/",
|
|
59
|
+
outstandingOrderDetails:
|
|
60
|
+
"/service/application/payment/v1.0/payment/outstanding-orders/",
|
|
61
|
+
paidOrderDetails:
|
|
62
|
+
"/service/application/payment/v1.0/payment/paid-orders/",
|
|
58
63
|
pollingPaymentLink:
|
|
59
64
|
"/service/application/payment/v1.0/polling-payment-link/",
|
|
60
65
|
redirectToAggregator:
|
|
@@ -353,6 +358,71 @@ class Payment {
|
|
|
353
358
|
return response;
|
|
354
359
|
}
|
|
355
360
|
|
|
361
|
+
/**
|
|
362
|
+
* @param {Object} arg - Arg object.
|
|
363
|
+
* @param {string} arg.cardInfo - Card first 6 digit IIN(prefix) number.
|
|
364
|
+
* @param {string} [arg.aggregator] -
|
|
365
|
+
* @returns {Promise<CardDetailsResponse>} - Success response
|
|
366
|
+
* @summary: API to get Card info from PG
|
|
367
|
+
* @description: API to get Card info from PG
|
|
368
|
+
*/
|
|
369
|
+
async cardDetails({ cardInfo, aggregator } = {}) {
|
|
370
|
+
const { error } = PaymentValidator.cardDetails().validate(
|
|
371
|
+
{ cardInfo, aggregator },
|
|
372
|
+
{ abortEarly: false, allowUnknown: true }
|
|
373
|
+
);
|
|
374
|
+
if (error) {
|
|
375
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
// Showing warrnings if extra unknown parameters are found
|
|
379
|
+
const { error: warrning } = PaymentValidator.cardDetails().validate(
|
|
380
|
+
{ cardInfo, aggregator },
|
|
381
|
+
{ abortEarly: false, allowUnknown: false }
|
|
382
|
+
);
|
|
383
|
+
if (warrning) {
|
|
384
|
+
Logger({
|
|
385
|
+
level: "WARN",
|
|
386
|
+
message: "Parameter Validation warrnings for cardDetails",
|
|
387
|
+
});
|
|
388
|
+
Logger({ level: "WARN", message: warrning });
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
const query_params = {};
|
|
392
|
+
query_params["aggregator"] = aggregator;
|
|
393
|
+
|
|
394
|
+
const xHeaders = {};
|
|
395
|
+
|
|
396
|
+
const response = await ApplicationAPIClient.execute(
|
|
397
|
+
this._conf,
|
|
398
|
+
"get",
|
|
399
|
+
constructUrl({
|
|
400
|
+
url: this._urls["cardDetails"],
|
|
401
|
+
params: { cardInfo },
|
|
402
|
+
}),
|
|
403
|
+
query_params,
|
|
404
|
+
undefined,
|
|
405
|
+
xHeaders
|
|
406
|
+
);
|
|
407
|
+
|
|
408
|
+
const {
|
|
409
|
+
error: res_error,
|
|
410
|
+
} = PaymentModel.CardDetailsResponse().validate(response, {
|
|
411
|
+
abortEarly: false,
|
|
412
|
+
allowUnknown: false,
|
|
413
|
+
});
|
|
414
|
+
|
|
415
|
+
if (res_error) {
|
|
416
|
+
Logger({
|
|
417
|
+
level: "WARN",
|
|
418
|
+
message: "Response Validation Warnnings for cardDetails",
|
|
419
|
+
});
|
|
420
|
+
Logger({ level: "WARN", message: res_error });
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
return response;
|
|
424
|
+
}
|
|
425
|
+
|
|
356
426
|
/**
|
|
357
427
|
* @param {Object} arg - Arg object.
|
|
358
428
|
* @param {PaymentStatusUpdateRequest} arg.body
|
|
@@ -1958,6 +2028,136 @@ class Payment {
|
|
|
1958
2028
|
return response;
|
|
1959
2029
|
}
|
|
1960
2030
|
|
|
2031
|
+
/**
|
|
2032
|
+
* @param {Object} arg - Arg object.
|
|
2033
|
+
* @param {string} [arg.aggregator] -
|
|
2034
|
+
* @returns {Promise<OutstandingOrderDetailsResponse>} - Success response
|
|
2035
|
+
* @summary: API to fetch the outstanding order details
|
|
2036
|
+
* @description: Use this API to fetch the outstanding order details.
|
|
2037
|
+
*/
|
|
2038
|
+
async outstandingOrderDetails({ aggregator } = {}) {
|
|
2039
|
+
const { error } = PaymentValidator.outstandingOrderDetails().validate(
|
|
2040
|
+
{ aggregator },
|
|
2041
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2042
|
+
);
|
|
2043
|
+
if (error) {
|
|
2044
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2048
|
+
const {
|
|
2049
|
+
error: warrning,
|
|
2050
|
+
} = PaymentValidator.outstandingOrderDetails().validate(
|
|
2051
|
+
{ aggregator },
|
|
2052
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2053
|
+
);
|
|
2054
|
+
if (warrning) {
|
|
2055
|
+
Logger({
|
|
2056
|
+
level: "WARN",
|
|
2057
|
+
message: "Parameter Validation warrnings for outstandingOrderDetails",
|
|
2058
|
+
});
|
|
2059
|
+
Logger({ level: "WARN", message: warrning });
|
|
2060
|
+
}
|
|
2061
|
+
|
|
2062
|
+
const query_params = {};
|
|
2063
|
+
query_params["aggregator"] = aggregator;
|
|
2064
|
+
|
|
2065
|
+
const xHeaders = {};
|
|
2066
|
+
|
|
2067
|
+
const response = await ApplicationAPIClient.execute(
|
|
2068
|
+
this._conf,
|
|
2069
|
+
"get",
|
|
2070
|
+
constructUrl({
|
|
2071
|
+
url: this._urls["outstandingOrderDetails"],
|
|
2072
|
+
params: {},
|
|
2073
|
+
}),
|
|
2074
|
+
query_params,
|
|
2075
|
+
undefined,
|
|
2076
|
+
xHeaders
|
|
2077
|
+
);
|
|
2078
|
+
|
|
2079
|
+
const {
|
|
2080
|
+
error: res_error,
|
|
2081
|
+
} = PaymentModel.OutstandingOrderDetailsResponse().validate(response, {
|
|
2082
|
+
abortEarly: false,
|
|
2083
|
+
allowUnknown: false,
|
|
2084
|
+
});
|
|
2085
|
+
|
|
2086
|
+
if (res_error) {
|
|
2087
|
+
Logger({
|
|
2088
|
+
level: "WARN",
|
|
2089
|
+
message: "Response Validation Warnnings for outstandingOrderDetails",
|
|
2090
|
+
});
|
|
2091
|
+
Logger({ level: "WARN", message: res_error });
|
|
2092
|
+
}
|
|
2093
|
+
|
|
2094
|
+
return response;
|
|
2095
|
+
}
|
|
2096
|
+
|
|
2097
|
+
/**
|
|
2098
|
+
* @param {Object} arg - Arg object.
|
|
2099
|
+
* @param {string} [arg.aggregator] -
|
|
2100
|
+
* @returns {Promise<PaidOrderDetailsResponse>} - Success response
|
|
2101
|
+
* @summary: API to fetch the paid order details
|
|
2102
|
+
* @description: Use this API to fetch the paid order details.
|
|
2103
|
+
*/
|
|
2104
|
+
async paidOrderDetails({ aggregator } = {}) {
|
|
2105
|
+
const { error } = PaymentValidator.paidOrderDetails().validate(
|
|
2106
|
+
{ aggregator },
|
|
2107
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2108
|
+
);
|
|
2109
|
+
if (error) {
|
|
2110
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2111
|
+
}
|
|
2112
|
+
|
|
2113
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2114
|
+
const { error: warrning } = PaymentValidator.paidOrderDetails().validate(
|
|
2115
|
+
{ aggregator },
|
|
2116
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2117
|
+
);
|
|
2118
|
+
if (warrning) {
|
|
2119
|
+
Logger({
|
|
2120
|
+
level: "WARN",
|
|
2121
|
+
message: "Parameter Validation warrnings for paidOrderDetails",
|
|
2122
|
+
});
|
|
2123
|
+
Logger({ level: "WARN", message: warrning });
|
|
2124
|
+
}
|
|
2125
|
+
|
|
2126
|
+
const query_params = {};
|
|
2127
|
+
query_params["aggregator"] = aggregator;
|
|
2128
|
+
|
|
2129
|
+
const xHeaders = {};
|
|
2130
|
+
|
|
2131
|
+
const response = await ApplicationAPIClient.execute(
|
|
2132
|
+
this._conf,
|
|
2133
|
+
"get",
|
|
2134
|
+
constructUrl({
|
|
2135
|
+
url: this._urls["paidOrderDetails"],
|
|
2136
|
+
params: {},
|
|
2137
|
+
}),
|
|
2138
|
+
query_params,
|
|
2139
|
+
undefined,
|
|
2140
|
+
xHeaders
|
|
2141
|
+
);
|
|
2142
|
+
|
|
2143
|
+
const {
|
|
2144
|
+
error: res_error,
|
|
2145
|
+
} = PaymentModel.PaidOrderDetailsResponse().validate(response, {
|
|
2146
|
+
abortEarly: false,
|
|
2147
|
+
allowUnknown: false,
|
|
2148
|
+
});
|
|
2149
|
+
|
|
2150
|
+
if (res_error) {
|
|
2151
|
+
Logger({
|
|
2152
|
+
level: "WARN",
|
|
2153
|
+
message: "Response Validation Warnnings for paidOrderDetails",
|
|
2154
|
+
});
|
|
2155
|
+
Logger({ level: "WARN", message: res_error });
|
|
2156
|
+
}
|
|
2157
|
+
|
|
2158
|
+
return response;
|
|
2159
|
+
}
|
|
2160
|
+
|
|
1961
2161
|
/**
|
|
1962
2162
|
* @param {Object} arg - Arg object.
|
|
1963
2163
|
* @param {string} [arg.paymentLinkId] -
|
|
@@ -17,6 +17,8 @@ declare class PaymentModel {
|
|
|
17
17
|
static CancelOrResendPaymentLinkRequest(): any;
|
|
18
18
|
static CancelPaymentLinkResponse(): any;
|
|
19
19
|
static Card(): any;
|
|
20
|
+
static CardDetails(): any;
|
|
21
|
+
static CardDetailsResponse(): any;
|
|
20
22
|
static CardPaymentGateway(): any;
|
|
21
23
|
static ChargeCustomerRequest(): any;
|
|
22
24
|
static ChargeCustomerResponse(): any;
|
|
@@ -55,6 +57,8 @@ declare class PaymentModel {
|
|
|
55
57
|
static OnboardSummary(): any;
|
|
56
58
|
static OrderBeneficiaryDetails(): any;
|
|
57
59
|
static OrderBeneficiaryResponse(): any;
|
|
60
|
+
static OutstandingOrderDetailsResponse(): any;
|
|
61
|
+
static PaidOrderDetailsResponse(): any;
|
|
58
62
|
static PaymentFlow(): any;
|
|
59
63
|
static PaymentInitializationRequest(): any;
|
|
60
64
|
static PaymentInitializationResponse(): any;
|