@gofynd/fdk-client-javascript 3.4.1 → 3.4.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 +23 -26
- package/package.json +1 -1
- package/sdk/application/ApplicationClient.d.ts +3 -2
- package/sdk/application/ApplicationClient.js +25 -19
- package/sdk/common/utils.js +6 -3
- package/sdk/partner/PartnerClient.d.ts +5 -2
- package/sdk/partner/PartnerClient.js +21 -7
- package/sdk/platform/Cart/CartPlatformModel.d.ts +2 -81
- package/sdk/platform/Cart/CartPlatformModel.js +2 -239
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +39 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +256 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +59 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +45 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +31 -3
- package/sdk/platform/Catalog/CatalogPlatformModel.js +29 -2
- package/sdk/platform/Order/OrderPlatformModel.d.ts +7 -0
- package/sdk/platform/Order/OrderPlatformModel.js +3 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +0 -64
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +0 -487
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -68
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +3 -76
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +1 -420
- package/sdk/platform/Payment/PaymentPlatformModel.js +0 -494
- package/sdk/platform/PlatformClient.d.ts +5 -2
- package/sdk/platform/PlatformClient.js +32 -18
- package/sdk/public/PublicClient.d.ts +3 -2
- package/sdk/public/PublicClient.js +13 -7
|
@@ -532,106 +532,6 @@ const Joi = require("joi");
|
|
|
532
532
|
* @property {boolean} success - Response is successful or not
|
|
533
533
|
*/
|
|
534
534
|
|
|
535
|
-
/**
|
|
536
|
-
* @typedef EdcModelData
|
|
537
|
-
* @property {string} aggregator - Name of aggregator
|
|
538
|
-
* @property {number} aggregator_id - ID of aggregator
|
|
539
|
-
* @property {string[]} models - List of string of edc models
|
|
540
|
-
*/
|
|
541
|
-
|
|
542
|
-
/**
|
|
543
|
-
* @typedef EdcAggregatorAndModelListDetails
|
|
544
|
-
* @property {EdcModelData[]} data - List of aggregators and their edc models
|
|
545
|
-
* @property {boolean} success - Response is successful or not
|
|
546
|
-
*/
|
|
547
|
-
|
|
548
|
-
/**
|
|
549
|
-
* @typedef StatisticsData
|
|
550
|
-
* @property {number} inactive_device_count - No of inactive devices
|
|
551
|
-
* @property {number} active_device_count - No of active devices
|
|
552
|
-
*/
|
|
553
|
-
|
|
554
|
-
/**
|
|
555
|
-
* @typedef EdcDeviceStatsDetails
|
|
556
|
-
* @property {StatisticsData} statistics
|
|
557
|
-
* @property {boolean} success - Response is successful or not
|
|
558
|
-
*/
|
|
559
|
-
|
|
560
|
-
/**
|
|
561
|
-
* @typedef EdcAddCreation
|
|
562
|
-
* @property {string} edc_model - Model of the edc machine
|
|
563
|
-
* @property {number} store_id - Store at which devices is to used
|
|
564
|
-
* @property {number} aggregator_id - Aggregator which will accept payment
|
|
565
|
-
* @property {string} edc_device_serial_no - Serial number or imei of EDC device
|
|
566
|
-
* @property {string} terminal_serial_no - Device serial number of
|
|
567
|
-
* terminal(android tablet)
|
|
568
|
-
* @property {string} [device_tag] - Device tag of edc device to identify it
|
|
569
|
-
*/
|
|
570
|
-
|
|
571
|
-
/**
|
|
572
|
-
* @typedef EdcDevice
|
|
573
|
-
* @property {string} [edc_model] - Name of the model
|
|
574
|
-
* @property {number} store_id - Store at which devices is to used
|
|
575
|
-
* @property {number} aggregator_id - Aggregator which will accept payment
|
|
576
|
-
* @property {string} terminal_unique_identifier - Genearated unique value for edc device
|
|
577
|
-
* @property {string} edc_device_serial_no - Serial number of EDC device
|
|
578
|
-
* @property {boolean} is_active - State whether device is active or inactive
|
|
579
|
-
* @property {string} [aggregator_name] - Name of the corresponding aggregator
|
|
580
|
-
* @property {string} terminal_serial_no - Device serial number of
|
|
581
|
-
* terminal(android tablet)
|
|
582
|
-
* @property {string} [merchant_store_pos_code] - This is provided by pinelabs
|
|
583
|
-
* @property {string} device_tag - Device tag of edc device to identify it
|
|
584
|
-
* @property {string} application_id - Application ID
|
|
585
|
-
*/
|
|
586
|
-
|
|
587
|
-
/**
|
|
588
|
-
* @typedef EdcDeviceAddDetails
|
|
589
|
-
* @property {EdcDevice} data
|
|
590
|
-
* @property {boolean} success - Response is successful or not
|
|
591
|
-
*/
|
|
592
|
-
|
|
593
|
-
/**
|
|
594
|
-
* @typedef EdcDeviceDetails
|
|
595
|
-
* @property {EdcDevice} data
|
|
596
|
-
* @property {boolean} success - Response is successful or not
|
|
597
|
-
*/
|
|
598
|
-
|
|
599
|
-
/**
|
|
600
|
-
* @typedef EdcUpdate
|
|
601
|
-
* @property {string} [edc_model] - Model of the edc machine
|
|
602
|
-
* @property {number} [store_id] - Store at which devices is to used
|
|
603
|
-
* @property {number} [aggregator_id] - Aggregator which will accept payment
|
|
604
|
-
* @property {string} [edc_device_serial_no] - Serial number or imei of EDC device
|
|
605
|
-
* @property {boolean} [is_active] - State whether device is active or inactive
|
|
606
|
-
* @property {string} [merchant_store_pos_code] - This is provided by pinelabs
|
|
607
|
-
* @property {string} [device_tag] - Device tag of edc device to identify it
|
|
608
|
-
*/
|
|
609
|
-
|
|
610
|
-
/**
|
|
611
|
-
* @typedef EdcDeviceUpdateDetails
|
|
612
|
-
* @property {boolean} success - Response is successful or not
|
|
613
|
-
*/
|
|
614
|
-
|
|
615
|
-
/**
|
|
616
|
-
* @typedef Page
|
|
617
|
-
* @property {number} [item_total] - The total number of all items across all pages.
|
|
618
|
-
* @property {string} [next_id] - The identifier for the next page.
|
|
619
|
-
* @property {boolean} [has_previous] - Indicates whether there is a previous page.
|
|
620
|
-
* @property {boolean} [has_next] - Indicates whether there is a next page.
|
|
621
|
-
* @property {number} [current] - The current page number.
|
|
622
|
-
* @property {string} type - The type of the page, such as 'PageType'.
|
|
623
|
-
* @property {number} [size] - The number of items per page.
|
|
624
|
-
* @property {number} [page_size] - The number of items per page.
|
|
625
|
-
*/
|
|
626
|
-
|
|
627
|
-
/**
|
|
628
|
-
* @typedef EdcDeviceListDetails
|
|
629
|
-
* @property {EdcDevice[]} items - List of all edc mapped to the application
|
|
630
|
-
* options with their Details.
|
|
631
|
-
* @property {Page} page
|
|
632
|
-
* @property {boolean} success - Response is successful or not
|
|
633
|
-
*/
|
|
634
|
-
|
|
635
535
|
/**
|
|
636
536
|
* @typedef PaymentInitializationCreation
|
|
637
537
|
* @property {string} [razorpay_payment_id] - Payment gateway payment id
|
|
@@ -1441,96 +1341,6 @@ const Joi = require("joi");
|
|
|
1441
1341
|
* @property {CreditAccountSummary} [account]
|
|
1442
1342
|
*/
|
|
1443
1343
|
|
|
1444
|
-
/**
|
|
1445
|
-
* @typedef {| "storefront"
|
|
1446
|
-
* | "store_os_pos"
|
|
1447
|
-
* | "kiosk"
|
|
1448
|
-
* | "scan_go"
|
|
1449
|
-
* | "smart_trolley"
|
|
1450
|
-
* | "gofynd"
|
|
1451
|
-
* | "uniket"
|
|
1452
|
-
* | "marketplace"
|
|
1453
|
-
* | "social_commerce"
|
|
1454
|
-
* | "ondc"
|
|
1455
|
-
* | "nexus"
|
|
1456
|
-
* | "nykaa_fashion"
|
|
1457
|
-
* | "etsy"
|
|
1458
|
-
* | "vuivui"
|
|
1459
|
-
* | "zilingo"
|
|
1460
|
-
* | "firstcry"
|
|
1461
|
-
* | "bukalapak"
|
|
1462
|
-
* | "myntra_ppmp"
|
|
1463
|
-
* | "lazada"
|
|
1464
|
-
* | "tiktok"
|
|
1465
|
-
* | "sfcc"
|
|
1466
|
-
* | "debenhams"
|
|
1467
|
-
* | "prestomall"
|
|
1468
|
-
* | "meesho"
|
|
1469
|
-
* | "amazon_vdf"
|
|
1470
|
-
* | "bigcommerce"
|
|
1471
|
-
* | "sendo"
|
|
1472
|
-
* | "storehippo"
|
|
1473
|
-
* | "cdiscount"
|
|
1474
|
-
* | "nykaa"
|
|
1475
|
-
* | "trendyol"
|
|
1476
|
-
* | "weloveshopping"
|
|
1477
|
-
* | "jollee"
|
|
1478
|
-
* | "wish"
|
|
1479
|
-
* | "tiki"
|
|
1480
|
-
* | "central_online"
|
|
1481
|
-
* | "q10"
|
|
1482
|
-
* | "cred"
|
|
1483
|
-
* | "walmart"
|
|
1484
|
-
* | "snapdeal"
|
|
1485
|
-
* | "flipkart"
|
|
1486
|
-
* | "blibli"
|
|
1487
|
-
* | "ajio_jit"
|
|
1488
|
-
* | "pharmeasy"
|
|
1489
|
-
* | "ezmall"
|
|
1490
|
-
* | "adobe_commerce"
|
|
1491
|
-
* | "kartmax"
|
|
1492
|
-
* | "shopee"
|
|
1493
|
-
* | "zalora"
|
|
1494
|
-
* | "prestashop"
|
|
1495
|
-
* | "smytten"
|
|
1496
|
-
* | "amazon_sc"
|
|
1497
|
-
* | "urbanpiper"
|
|
1498
|
-
* | "flipkart_quick"
|
|
1499
|
-
* | "woocommerce"
|
|
1500
|
-
* | "zivame"
|
|
1501
|
-
* | "lelong"
|
|
1502
|
-
* | "facebook"
|
|
1503
|
-
* | "jiomart"
|
|
1504
|
-
* | "gmc"
|
|
1505
|
-
* | "robins"
|
|
1506
|
-
* | "akulaku"
|
|
1507
|
-
* | "noon"
|
|
1508
|
-
* | "tatacliq"
|
|
1509
|
-
* | "kartrocket"
|
|
1510
|
-
* | "inorbit"
|
|
1511
|
-
* | "ajio_business"
|
|
1512
|
-
* | "swiggy"
|
|
1513
|
-
* | "asos"
|
|
1514
|
-
* | "tokopedia"
|
|
1515
|
-
* | "limeroad"
|
|
1516
|
-
* | "myntra_omni"
|
|
1517
|
-
* | "spoyl"
|
|
1518
|
-
* | "amazon_mlf"
|
|
1519
|
-
* | "fulfilled_by_lazada"
|
|
1520
|
-
* | "ebay"
|
|
1521
|
-
* | "jd"
|
|
1522
|
-
* | "amazon_pharmacy"
|
|
1523
|
-
* | "ajio_vms"
|
|
1524
|
-
* | "daraz"
|
|
1525
|
-
* | "oker"
|
|
1526
|
-
* | "flipkart_b2b"
|
|
1527
|
-
* | "amazon_mlf_ss"
|
|
1528
|
-
* | "woovly"
|
|
1529
|
-
* | "tata1mg"
|
|
1530
|
-
* | "zomato"
|
|
1531
|
-
* | "shopify"} OrderingSource
|
|
1532
|
-
*/
|
|
1533
|
-
|
|
1534
1344
|
class PaymentPlatformModel {
|
|
1535
1345
|
/** @returns {PaymentGatewayConfigDetails} */
|
|
1536
1346
|
static PaymentGatewayConfigDetails() {
|
|
@@ -2194,127 +2004,6 @@ class PaymentPlatformModel {
|
|
|
2194
2004
|
});
|
|
2195
2005
|
}
|
|
2196
2006
|
|
|
2197
|
-
/** @returns {EdcModelData} */
|
|
2198
|
-
static EdcModelData() {
|
|
2199
|
-
return Joi.object({
|
|
2200
|
-
aggregator: Joi.string().allow("").required(),
|
|
2201
|
-
aggregator_id: Joi.number().required(),
|
|
2202
|
-
models: Joi.array().items(Joi.string().allow("")).required(),
|
|
2203
|
-
});
|
|
2204
|
-
}
|
|
2205
|
-
|
|
2206
|
-
/** @returns {EdcAggregatorAndModelListDetails} */
|
|
2207
|
-
static EdcAggregatorAndModelListDetails() {
|
|
2208
|
-
return Joi.object({
|
|
2209
|
-
data: Joi.array().items(PaymentPlatformModel.EdcModelData()).required(),
|
|
2210
|
-
success: Joi.boolean().required(),
|
|
2211
|
-
});
|
|
2212
|
-
}
|
|
2213
|
-
|
|
2214
|
-
/** @returns {StatisticsData} */
|
|
2215
|
-
static StatisticsData() {
|
|
2216
|
-
return Joi.object({
|
|
2217
|
-
inactive_device_count: Joi.number().required(),
|
|
2218
|
-
active_device_count: Joi.number().required(),
|
|
2219
|
-
});
|
|
2220
|
-
}
|
|
2221
|
-
|
|
2222
|
-
/** @returns {EdcDeviceStatsDetails} */
|
|
2223
|
-
static EdcDeviceStatsDetails() {
|
|
2224
|
-
return Joi.object({
|
|
2225
|
-
statistics: PaymentPlatformModel.StatisticsData().required(),
|
|
2226
|
-
success: Joi.boolean().required(),
|
|
2227
|
-
});
|
|
2228
|
-
}
|
|
2229
|
-
|
|
2230
|
-
/** @returns {EdcAddCreation} */
|
|
2231
|
-
static EdcAddCreation() {
|
|
2232
|
-
return Joi.object({
|
|
2233
|
-
edc_model: Joi.string().allow("").required(),
|
|
2234
|
-
store_id: Joi.number().required(),
|
|
2235
|
-
aggregator_id: Joi.number().required(),
|
|
2236
|
-
edc_device_serial_no: Joi.string().allow("").required(),
|
|
2237
|
-
terminal_serial_no: Joi.string().allow("").required(),
|
|
2238
|
-
device_tag: Joi.string().allow("").allow(null),
|
|
2239
|
-
});
|
|
2240
|
-
}
|
|
2241
|
-
|
|
2242
|
-
/** @returns {EdcDevice} */
|
|
2243
|
-
static EdcDevice() {
|
|
2244
|
-
return Joi.object({
|
|
2245
|
-
edc_model: Joi.string().allow(""),
|
|
2246
|
-
store_id: Joi.number().required(),
|
|
2247
|
-
aggregator_id: Joi.number().required(),
|
|
2248
|
-
terminal_unique_identifier: Joi.string().allow("").required(),
|
|
2249
|
-
edc_device_serial_no: Joi.string().allow("").required(),
|
|
2250
|
-
is_active: Joi.boolean().required(),
|
|
2251
|
-
aggregator_name: Joi.string().allow(""),
|
|
2252
|
-
terminal_serial_no: Joi.string().allow("").required(),
|
|
2253
|
-
merchant_store_pos_code: Joi.string().allow("").allow(null),
|
|
2254
|
-
device_tag: Joi.string().allow("").required(),
|
|
2255
|
-
application_id: Joi.string().allow("").required(),
|
|
2256
|
-
});
|
|
2257
|
-
}
|
|
2258
|
-
|
|
2259
|
-
/** @returns {EdcDeviceAddDetails} */
|
|
2260
|
-
static EdcDeviceAddDetails() {
|
|
2261
|
-
return Joi.object({
|
|
2262
|
-
data: PaymentPlatformModel.EdcDevice().required(),
|
|
2263
|
-
success: Joi.boolean().required(),
|
|
2264
|
-
});
|
|
2265
|
-
}
|
|
2266
|
-
|
|
2267
|
-
/** @returns {EdcDeviceDetails} */
|
|
2268
|
-
static EdcDeviceDetails() {
|
|
2269
|
-
return Joi.object({
|
|
2270
|
-
data: PaymentPlatformModel.EdcDevice().required(),
|
|
2271
|
-
success: Joi.boolean().required(),
|
|
2272
|
-
});
|
|
2273
|
-
}
|
|
2274
|
-
|
|
2275
|
-
/** @returns {EdcUpdate} */
|
|
2276
|
-
static EdcUpdate() {
|
|
2277
|
-
return Joi.object({
|
|
2278
|
-
edc_model: Joi.string().allow(""),
|
|
2279
|
-
store_id: Joi.number(),
|
|
2280
|
-
aggregator_id: Joi.number(),
|
|
2281
|
-
edc_device_serial_no: Joi.string().allow(""),
|
|
2282
|
-
is_active: Joi.boolean(),
|
|
2283
|
-
merchant_store_pos_code: Joi.string().allow(""),
|
|
2284
|
-
device_tag: Joi.string().allow("").allow(null),
|
|
2285
|
-
});
|
|
2286
|
-
}
|
|
2287
|
-
|
|
2288
|
-
/** @returns {EdcDeviceUpdateDetails} */
|
|
2289
|
-
static EdcDeviceUpdateDetails() {
|
|
2290
|
-
return Joi.object({
|
|
2291
|
-
success: Joi.boolean().required(),
|
|
2292
|
-
});
|
|
2293
|
-
}
|
|
2294
|
-
|
|
2295
|
-
/** @returns {Page} */
|
|
2296
|
-
static Page() {
|
|
2297
|
-
return Joi.object({
|
|
2298
|
-
item_total: Joi.number(),
|
|
2299
|
-
next_id: Joi.string().allow(""),
|
|
2300
|
-
has_previous: Joi.boolean(),
|
|
2301
|
-
has_next: Joi.boolean(),
|
|
2302
|
-
current: Joi.number(),
|
|
2303
|
-
type: Joi.string().allow("").required(),
|
|
2304
|
-
size: Joi.number(),
|
|
2305
|
-
page_size: Joi.number(),
|
|
2306
|
-
});
|
|
2307
|
-
}
|
|
2308
|
-
|
|
2309
|
-
/** @returns {EdcDeviceListDetails} */
|
|
2310
|
-
static EdcDeviceListDetails() {
|
|
2311
|
-
return Joi.object({
|
|
2312
|
-
items: Joi.array().items(PaymentPlatformModel.EdcDevice()).required(),
|
|
2313
|
-
page: PaymentPlatformModel.Page().required(),
|
|
2314
|
-
success: Joi.boolean().required(),
|
|
2315
|
-
});
|
|
2316
|
-
}
|
|
2317
|
-
|
|
2318
2007
|
/** @returns {PaymentInitializationCreation} */
|
|
2319
2008
|
static PaymentInitializationCreation() {
|
|
2320
2009
|
return Joi.object({
|
|
@@ -3250,188 +2939,5 @@ class PaymentPlatformModel {
|
|
|
3250
2939
|
account: PaymentPlatformModel.CreditAccountSummary(),
|
|
3251
2940
|
});
|
|
3252
2941
|
}
|
|
3253
|
-
|
|
3254
|
-
/**
|
|
3255
|
-
* Enum: OrderingSource Used By: Payment
|
|
3256
|
-
*
|
|
3257
|
-
* @returns {OrderingSource}
|
|
3258
|
-
*/
|
|
3259
|
-
static OrderingSource() {
|
|
3260
|
-
return Joi.string().valid(
|
|
3261
|
-
"storefront",
|
|
3262
|
-
|
|
3263
|
-
"store_os_pos",
|
|
3264
|
-
|
|
3265
|
-
"kiosk",
|
|
3266
|
-
|
|
3267
|
-
"scan_go",
|
|
3268
|
-
|
|
3269
|
-
"smart_trolley",
|
|
3270
|
-
|
|
3271
|
-
"gofynd",
|
|
3272
|
-
|
|
3273
|
-
"uniket",
|
|
3274
|
-
|
|
3275
|
-
"marketplace",
|
|
3276
|
-
|
|
3277
|
-
"social_commerce",
|
|
3278
|
-
|
|
3279
|
-
"ondc",
|
|
3280
|
-
|
|
3281
|
-
"nexus",
|
|
3282
|
-
|
|
3283
|
-
"nykaa_fashion",
|
|
3284
|
-
|
|
3285
|
-
"etsy",
|
|
3286
|
-
|
|
3287
|
-
"vuivui",
|
|
3288
|
-
|
|
3289
|
-
"zilingo",
|
|
3290
|
-
|
|
3291
|
-
"firstcry",
|
|
3292
|
-
|
|
3293
|
-
"bukalapak",
|
|
3294
|
-
|
|
3295
|
-
"myntra_ppmp",
|
|
3296
|
-
|
|
3297
|
-
"lazada",
|
|
3298
|
-
|
|
3299
|
-
"tiktok",
|
|
3300
|
-
|
|
3301
|
-
"sfcc",
|
|
3302
|
-
|
|
3303
|
-
"debenhams",
|
|
3304
|
-
|
|
3305
|
-
"prestomall",
|
|
3306
|
-
|
|
3307
|
-
"meesho",
|
|
3308
|
-
|
|
3309
|
-
"amazon_vdf",
|
|
3310
|
-
|
|
3311
|
-
"bigcommerce",
|
|
3312
|
-
|
|
3313
|
-
"sendo",
|
|
3314
|
-
|
|
3315
|
-
"storehippo",
|
|
3316
|
-
|
|
3317
|
-
"cdiscount",
|
|
3318
|
-
|
|
3319
|
-
"nykaa",
|
|
3320
|
-
|
|
3321
|
-
"trendyol",
|
|
3322
|
-
|
|
3323
|
-
"weloveshopping",
|
|
3324
|
-
|
|
3325
|
-
"jollee",
|
|
3326
|
-
|
|
3327
|
-
"wish",
|
|
3328
|
-
|
|
3329
|
-
"tiki",
|
|
3330
|
-
|
|
3331
|
-
"central_online",
|
|
3332
|
-
|
|
3333
|
-
"q10",
|
|
3334
|
-
|
|
3335
|
-
"cred",
|
|
3336
|
-
|
|
3337
|
-
"walmart",
|
|
3338
|
-
|
|
3339
|
-
"snapdeal",
|
|
3340
|
-
|
|
3341
|
-
"flipkart",
|
|
3342
|
-
|
|
3343
|
-
"blibli",
|
|
3344
|
-
|
|
3345
|
-
"ajio_jit",
|
|
3346
|
-
|
|
3347
|
-
"pharmeasy",
|
|
3348
|
-
|
|
3349
|
-
"ezmall",
|
|
3350
|
-
|
|
3351
|
-
"adobe_commerce",
|
|
3352
|
-
|
|
3353
|
-
"kartmax",
|
|
3354
|
-
|
|
3355
|
-
"shopee",
|
|
3356
|
-
|
|
3357
|
-
"zalora",
|
|
3358
|
-
|
|
3359
|
-
"prestashop",
|
|
3360
|
-
|
|
3361
|
-
"smytten",
|
|
3362
|
-
|
|
3363
|
-
"amazon_sc",
|
|
3364
|
-
|
|
3365
|
-
"urbanpiper",
|
|
3366
|
-
|
|
3367
|
-
"flipkart_quick",
|
|
3368
|
-
|
|
3369
|
-
"woocommerce",
|
|
3370
|
-
|
|
3371
|
-
"zivame",
|
|
3372
|
-
|
|
3373
|
-
"lelong",
|
|
3374
|
-
|
|
3375
|
-
"facebook",
|
|
3376
|
-
|
|
3377
|
-
"jiomart",
|
|
3378
|
-
|
|
3379
|
-
"gmc",
|
|
3380
|
-
|
|
3381
|
-
"robins",
|
|
3382
|
-
|
|
3383
|
-
"akulaku",
|
|
3384
|
-
|
|
3385
|
-
"noon",
|
|
3386
|
-
|
|
3387
|
-
"tatacliq",
|
|
3388
|
-
|
|
3389
|
-
"kartrocket",
|
|
3390
|
-
|
|
3391
|
-
"inorbit",
|
|
3392
|
-
|
|
3393
|
-
"ajio_business",
|
|
3394
|
-
|
|
3395
|
-
"swiggy",
|
|
3396
|
-
|
|
3397
|
-
"asos",
|
|
3398
|
-
|
|
3399
|
-
"tokopedia",
|
|
3400
|
-
|
|
3401
|
-
"limeroad",
|
|
3402
|
-
|
|
3403
|
-
"myntra_omni",
|
|
3404
|
-
|
|
3405
|
-
"spoyl",
|
|
3406
|
-
|
|
3407
|
-
"amazon_mlf",
|
|
3408
|
-
|
|
3409
|
-
"fulfilled_by_lazada",
|
|
3410
|
-
|
|
3411
|
-
"ebay",
|
|
3412
|
-
|
|
3413
|
-
"jd",
|
|
3414
|
-
|
|
3415
|
-
"amazon_pharmacy",
|
|
3416
|
-
|
|
3417
|
-
"ajio_vms",
|
|
3418
|
-
|
|
3419
|
-
"daraz",
|
|
3420
|
-
|
|
3421
|
-
"oker",
|
|
3422
|
-
|
|
3423
|
-
"flipkart_b2b",
|
|
3424
|
-
|
|
3425
|
-
"amazon_mlf_ss",
|
|
3426
|
-
|
|
3427
|
-
"woovly",
|
|
3428
|
-
|
|
3429
|
-
"tata1mg",
|
|
3430
|
-
|
|
3431
|
-
"zomato",
|
|
3432
|
-
|
|
3433
|
-
"shopify"
|
|
3434
|
-
);
|
|
3435
|
-
}
|
|
3436
2942
|
}
|
|
3437
2943
|
module.exports = PaymentPlatformModel;
|
|
@@ -10,8 +10,8 @@ declare class PlatformClient {
|
|
|
10
10
|
*
|
|
11
11
|
* @param {import("./PlatformConfig")} config - The application configuration.
|
|
12
12
|
*/
|
|
13
|
-
constructor(config: import("./PlatformConfig"));
|
|
14
|
-
config:
|
|
13
|
+
constructor(config: import("./PlatformConfig"), options: any);
|
|
14
|
+
config: PlatformConfig;
|
|
15
15
|
auditTrail: AuditTrail;
|
|
16
16
|
billing: Billing;
|
|
17
17
|
catalog: Catalog;
|
|
@@ -53,7 +53,10 @@ declare class PlatformClient {
|
|
|
53
53
|
headers: any;
|
|
54
54
|
responseHeaders?: boolean;
|
|
55
55
|
}): Promise<import("axios").AxiosResponse<any, any>>;
|
|
56
|
+
getAccesstokenObj(options: any): Promise<import("axios").AxiosResponse<any, any>>;
|
|
57
|
+
setToken(token: any): void;
|
|
56
58
|
}
|
|
59
|
+
import PlatformConfig = require("./PlatformConfig");
|
|
57
60
|
import AuditTrail = require("./AuditTrail/AuditTrailPlatformClient");
|
|
58
61
|
import Billing = require("./Billing/BillingPlatformClient");
|
|
59
62
|
import Catalog = require("./Catalog/CatalogPlatformClient");
|
|
@@ -33,6 +33,7 @@ const Webhook = require("./Webhook/WebhookPlatformClient");
|
|
|
33
33
|
const PlatformApplicationClient = require("./PlatformApplicationClient");
|
|
34
34
|
const { FDKClientValidationError } = require("../common/FDKError");
|
|
35
35
|
const { execute } = require("./PlatformAPIClient");
|
|
36
|
+
const PlatformConfig = require("./PlatformConfig");
|
|
36
37
|
|
|
37
38
|
/**
|
|
38
39
|
* Represents the client for the platform.
|
|
@@ -45,40 +46,45 @@ class PlatformClient {
|
|
|
45
46
|
*
|
|
46
47
|
* @param {import("./PlatformConfig")} config - The application configuration.
|
|
47
48
|
*/
|
|
48
|
-
constructor(config) {
|
|
49
|
-
|
|
49
|
+
constructor(config, options) {
|
|
50
|
+
if (config instanceof PlatformConfig) {
|
|
51
|
+
this.config = config;
|
|
52
|
+
} else {
|
|
53
|
+
let platformConfig = new PlatformConfig(config, options);
|
|
54
|
+
this.config = platformConfig;
|
|
55
|
+
}
|
|
50
56
|
|
|
51
|
-
this.auditTrail = new AuditTrail(config);
|
|
57
|
+
this.auditTrail = new AuditTrail(this.config);
|
|
52
58
|
|
|
53
|
-
this.billing = new Billing(config);
|
|
59
|
+
this.billing = new Billing(this.config);
|
|
54
60
|
|
|
55
|
-
this.catalog = new Catalog(config);
|
|
61
|
+
this.catalog = new Catalog(this.config);
|
|
56
62
|
|
|
57
|
-
this.common = new Common(config);
|
|
63
|
+
this.common = new Common(this.config);
|
|
58
64
|
|
|
59
|
-
this.communication = new Communication(config);
|
|
65
|
+
this.communication = new Communication(this.config);
|
|
60
66
|
|
|
61
|
-
this.companyProfile = new CompanyProfile(config);
|
|
67
|
+
this.companyProfile = new CompanyProfile(this.config);
|
|
62
68
|
|
|
63
|
-
this.configuration = new Configuration(config);
|
|
69
|
+
this.configuration = new Configuration(this.config);
|
|
64
70
|
|
|
65
|
-
this.content = new Content(config);
|
|
71
|
+
this.content = new Content(this.config);
|
|
66
72
|
|
|
67
|
-
this.discount = new Discount(config);
|
|
73
|
+
this.discount = new Discount(this.config);
|
|
68
74
|
|
|
69
|
-
this.fileStorage = new FileStorage(config);
|
|
75
|
+
this.fileStorage = new FileStorage(this.config);
|
|
70
76
|
|
|
71
|
-
this.lead = new Lead(config);
|
|
77
|
+
this.lead = new Lead(this.config);
|
|
72
78
|
|
|
73
|
-
this.serviceability = new Serviceability(config);
|
|
79
|
+
this.serviceability = new Serviceability(this.config);
|
|
74
80
|
|
|
75
|
-
this.order = new Order(config);
|
|
81
|
+
this.order = new Order(this.config);
|
|
76
82
|
|
|
77
|
-
this.payment = new Payment(config);
|
|
83
|
+
this.payment = new Payment(this.config);
|
|
78
84
|
|
|
79
|
-
this.theme = new Theme(config);
|
|
85
|
+
this.theme = new Theme(this.config);
|
|
80
86
|
|
|
81
|
-
this.webhook = new Webhook(config);
|
|
87
|
+
this.webhook = new Webhook(this.config);
|
|
82
88
|
}
|
|
83
89
|
|
|
84
90
|
/**
|
|
@@ -125,6 +131,14 @@ class PlatformClient {
|
|
|
125
131
|
responseHeaders,
|
|
126
132
|
});
|
|
127
133
|
}
|
|
134
|
+
|
|
135
|
+
getAccesstokenObj(options) {
|
|
136
|
+
return this.config.oauthClient.getAccesstokenObj(options);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
setToken(token) {
|
|
140
|
+
this.config.oauthClient.setToken(token);
|
|
141
|
+
}
|
|
128
142
|
}
|
|
129
143
|
|
|
130
144
|
module.exports = PlatformClient;
|
|
@@ -10,8 +10,8 @@ declare class PublicClient {
|
|
|
10
10
|
*
|
|
11
11
|
* @param {import("./PublicConfig")} config - The configuration for the public client.
|
|
12
12
|
*/
|
|
13
|
-
constructor(config: import("./PublicConfig"));
|
|
14
|
-
config:
|
|
13
|
+
constructor(config: import("./PublicConfig"), options: any);
|
|
14
|
+
config: PublicConfig;
|
|
15
15
|
catalog: Catalog;
|
|
16
16
|
configuration: Configuration;
|
|
17
17
|
content: Content;
|
|
@@ -25,6 +25,7 @@ declare class PublicClient {
|
|
|
25
25
|
*/
|
|
26
26
|
setExtraHeaders(header: object): void;
|
|
27
27
|
}
|
|
28
|
+
import PublicConfig = require("./PublicConfig");
|
|
28
29
|
import Catalog = require("./Catalog/CatalogPublicClient");
|
|
29
30
|
import Configuration = require("./Configuration/ConfigurationPublicClient");
|
|
30
31
|
import Content = require("./Content/ContentPublicClient");
|
|
@@ -9,6 +9,7 @@ const Partner = require("./Partner/PartnerPublicClient");
|
|
|
9
9
|
const Webhook = require("./Webhook/WebhookPublicClient");
|
|
10
10
|
|
|
11
11
|
const { FDKClientValidationError } = require("../common/FDKError");
|
|
12
|
+
const PublicConfig = require("./PublicConfig");
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* Represents the client for the public APIs.
|
|
@@ -21,18 +22,23 @@ class PublicClient {
|
|
|
21
22
|
*
|
|
22
23
|
* @param {import("./PublicConfig")} config - The configuration for the public client.
|
|
23
24
|
*/
|
|
24
|
-
constructor(config) {
|
|
25
|
-
|
|
25
|
+
constructor(config, options) {
|
|
26
|
+
if (config instanceof PublicConfig) {
|
|
27
|
+
this.config = config;
|
|
28
|
+
} else {
|
|
29
|
+
let publicConfig = new PublicConfig(config, options);
|
|
30
|
+
this.config = publicConfig;
|
|
31
|
+
}
|
|
26
32
|
|
|
27
|
-
this.catalog = new Catalog(config);
|
|
33
|
+
this.catalog = new Catalog(this.config);
|
|
28
34
|
|
|
29
|
-
this.configuration = new Configuration(config);
|
|
35
|
+
this.configuration = new Configuration(this.config);
|
|
30
36
|
|
|
31
|
-
this.content = new Content(config);
|
|
37
|
+
this.content = new Content(this.config);
|
|
32
38
|
|
|
33
|
-
this.partner = new Partner(config);
|
|
39
|
+
this.partner = new Partner(this.config);
|
|
34
40
|
|
|
35
|
-
this.webhook = new Webhook(config);
|
|
41
|
+
this.webhook = new Webhook(this.config);
|
|
36
42
|
}
|
|
37
43
|
|
|
38
44
|
/**
|