@gofynd/fdk-client-javascript 1.4.15 → 1.4.16-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +11 -11
- package/sdk/application/Cart/CartApplicationClient.js +343 -48
- package/sdk/application/Catalog/CatalogApplicationClient.js +408 -0
- package/sdk/application/Common/CommonApplicationClient.js +21 -0
- package/sdk/application/Communication/CommunicationApplicationClient.js +29 -0
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +147 -0
- package/sdk/application/Content/ContentApplicationClient.d.ts +20 -0
- package/sdk/application/Content/ContentApplicationClient.js +327 -0
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +43 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +21 -0
- package/sdk/application/Lead/LeadApplicationClient.js +73 -0
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +1 -1
- package/sdk/application/Logistic/LogisticApplicationClient.js +182 -2
- package/sdk/application/Order/OrderApplicationClient.js +202 -0
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +0 -10
- package/sdk/application/Payment/PaymentApplicationClient.js +445 -38
- package/sdk/application/Rewards/RewardsApplicationClient.js +68 -0
- package/sdk/application/Share/ShareApplicationClient.js +96 -0
- package/sdk/application/Theme/ThemeApplicationClient.js +64 -0
- package/sdk/application/User/UserApplicationClient.js +412 -0
- package/sdk/application/Webhook/WebhookApplicationClient.js +13 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +12 -33
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +38 -209
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +19 -399
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +11 -212
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +1 -3
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +7 -22
- package/sdk/partner/OAuthClient.js +1 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +3 -40
- package/sdk/partner/Theme/ThemePartnerModel.js +2 -24
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +1 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +12 -3
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +11 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +4 -1
- package/sdk/platform/Cart/CartPlatformModel.d.ts +14 -28
- package/sdk/platform/Cart/CartPlatformModel.js +7 -13
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +0 -24
- package/sdk/platform/Catalog/CatalogPlatformClient.js +0 -176
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +29 -80
- package/sdk/platform/Catalog/CatalogPlatformModel.js +32 -72
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1 -45
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +0 -35
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +3 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +52 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +411 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +85 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +73 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +90 -1
- package/sdk/platform/Content/ContentPlatformModel.js +104 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +2 -2
- package/sdk/platform/Order/OrderPlatformClient.js +0 -8
- package/sdk/platform/Order/OrderPlatformModel.d.ts +3 -75
- package/sdk/platform/Order/OrderPlatformModel.js +2 -43
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +0 -22
- package/sdk/platform/Order/OrderPlatformValidator.js +0 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +10 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +118 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +53 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +29 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +0 -104
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +74 -816
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +23 -598
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +20 -382
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +1 -191
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +0 -138
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +3 -40
- package/sdk/platform/Theme/ThemePlatformModel.js +2 -24
- package/sdk/public/Configuration/ConfigurationPublicClient.js +16 -0
- package/sdk/public/Content/ContentPublicClient.js +116 -0
- package/sdk/public/Partner/PartnerPublicClient.js +15 -0
- package/sdk/public/Webhook/WebhookPublicClient.js +40 -0
|
@@ -78,8 +78,6 @@ const Joi = require("joi");
|
|
|
78
78
|
* first-mile service is available or not.
|
|
79
79
|
* @property {boolean} [last_mile] - Boolean value indicating whether last-mile
|
|
80
80
|
* service is available or not.
|
|
81
|
-
* @property {boolean} [reverse_pickup] - Boolean value indicating whether a
|
|
82
|
-
* region is first-mile serviceable or not in return pickup.
|
|
83
81
|
* @property {number} [cod_limit] - Limit on the amount of cash on delivery
|
|
84
82
|
* (COD) payments allowed in the specified region.
|
|
85
83
|
* @property {boolean} [doorstep_return] - Indicates if doorstep return service
|
|
@@ -101,8 +99,6 @@ const Joi = require("joi");
|
|
|
101
99
|
* first-mile service is available or not.
|
|
102
100
|
* @property {boolean} [last_mile] - Boolean value indicating whether last-mile
|
|
103
101
|
* service is available or not.
|
|
104
|
-
* @property {boolean} [reverse_pickup] - Boolean value indicating whether a
|
|
105
|
-
* region is first-mile serviceable or not in return pickup.
|
|
106
102
|
* @property {number} [cod_limit] - Limit on the amount of cash on delivery
|
|
107
103
|
* (COD) payments allowed in the specified region.
|
|
108
104
|
* @property {boolean} [doorstep_return] - Indicates if doorstep return service
|
|
@@ -133,8 +129,6 @@ const Joi = require("joi");
|
|
|
133
129
|
* first-mile service is available or not.
|
|
134
130
|
* @property {boolean} [last_mile] - Boolean value indicating whether last-mile
|
|
135
131
|
* service is available or not.
|
|
136
|
-
* @property {boolean} [reverse_pickup] - Boolean value indicating whether a
|
|
137
|
-
* region is first-mile serviceable or not in return pickup.
|
|
138
132
|
* @property {number} [cod_limit] - Limit on the amount of cash on delivery
|
|
139
133
|
* (COD) payments allowed in the specified region.
|
|
140
134
|
* @property {boolean} [doorstep_return] - Indicates if doorstep return service
|
|
@@ -166,8 +160,6 @@ const Joi = require("joi");
|
|
|
166
160
|
* first-mile service is available or not.
|
|
167
161
|
* @property {boolean} [last_mile] - Boolean value indicating whether last-mile
|
|
168
162
|
* service is available or not.
|
|
169
|
-
* @property {boolean} [reverse_pickup] - Boolean value indicating whether a
|
|
170
|
-
* region is first-mile serviceable or not in return pickup.
|
|
171
163
|
* @property {number} [cod_limit] - Limit on the amount of cash on delivery
|
|
172
164
|
* (COD) payments allowed in the specified region.
|
|
173
165
|
* @property {boolean} [doorstep_return] - Indicates if doorstep return service
|
|
@@ -339,8 +331,8 @@ const Joi = require("joi");
|
|
|
339
331
|
* courier partner scheme.
|
|
340
332
|
* @property {string[]} payment_mode - Mode of payment associated with the
|
|
341
333
|
* courier partner scheme.
|
|
342
|
-
* @property {string} stage -
|
|
343
|
-
*
|
|
334
|
+
* @property {string} stage - Denotes whether the courier partner scheme is in
|
|
335
|
+
* enabled or disabled stage.
|
|
344
336
|
* @property {CourierPartnerSchemeFeatures} feature
|
|
345
337
|
*/
|
|
346
338
|
|
|
@@ -358,8 +350,8 @@ const Joi = require("joi");
|
|
|
358
350
|
* courier partner scheme.
|
|
359
351
|
* @property {string[]} payment_mode - Mode of payment associated with the
|
|
360
352
|
* courier partner scheme.
|
|
361
|
-
* @property {string} stage -
|
|
362
|
-
*
|
|
353
|
+
* @property {string} stage - Denotes whether the courier partner scheme is in
|
|
354
|
+
* enabled or disabled stage.
|
|
363
355
|
* @property {CourierPartnerSchemeFeatures} feature
|
|
364
356
|
*/
|
|
365
357
|
|
|
@@ -408,106 +400,6 @@ const Joi = require("joi");
|
|
|
408
400
|
* quantity of items allowed in a non-quality check shipment.
|
|
409
401
|
*/
|
|
410
402
|
|
|
411
|
-
/**
|
|
412
|
-
* @typedef CourierPartnerSchemeV2Features
|
|
413
|
-
* @property {boolean} [doorstep_qc] - Indicates if the courier partner offers
|
|
414
|
-
* doorstep quality check services.
|
|
415
|
-
* @property {boolean} [qr] - Specifies whether the courier partner supports QR
|
|
416
|
-
* code-based operations.
|
|
417
|
-
* @property {boolean} [mps] - Denotes if the courier partner supports
|
|
418
|
-
* multi-part shipment services.
|
|
419
|
-
* @property {boolean} [ndr] - Indicates if the Non-Delivery Report (NDR)
|
|
420
|
-
* feature is supported by the courier partner.
|
|
421
|
-
* @property {boolean} [dangerous_goods] - Specifies if the courier partner
|
|
422
|
-
* handles the transportation of dangerous goods.
|
|
423
|
-
* @property {boolean} [fragile_goods] - Indicates whether the courier partner
|
|
424
|
-
* manages the shipment of fragile goods.
|
|
425
|
-
* @property {boolean} [restricted_goods] - Indicates if the courier partner
|
|
426
|
-
* handles restricted goods, as per regulatory guidelines.
|
|
427
|
-
* @property {boolean} [cold_storage_goods] - Denotes if the courier partner
|
|
428
|
-
* provides cold storage facilities for goods.
|
|
429
|
-
* @property {boolean} [doorstep_exchange] - Indicates if the courier partner
|
|
430
|
-
* supports doorstep exchange services.
|
|
431
|
-
* @property {boolean} [doorstep_return] - Specifies if the courier partner
|
|
432
|
-
* offers doorstep return services.
|
|
433
|
-
* @property {boolean} [product_installation] - Indicates if the courier partner
|
|
434
|
-
* provides product installation services upon delivery.
|
|
435
|
-
* @property {boolean} [openbox_delivery] - Specifies whether the courier
|
|
436
|
-
* partner supports open-box delivery, allowing customers to inspect goods
|
|
437
|
-
* before accepting.
|
|
438
|
-
* @property {boolean} [multi_pick_single_drop] - Indicates if the courier
|
|
439
|
-
* partner supports multiple pickups to a single drop location.
|
|
440
|
-
* @property {boolean} [single_pick_multi_drop] - Indicates whether the courier
|
|
441
|
-
* partner supports single pickup to multiple drop locations.
|
|
442
|
-
* @property {boolean} [multi_pick_multi_drop] - Denotes if the courier partner
|
|
443
|
-
* offers services for multiple pickups to multiple drop locations.
|
|
444
|
-
* @property {boolean} [ewaybill] - Specifies if the courier partner requires or
|
|
445
|
-
* supports the generation of e-waybills for shipments.
|
|
446
|
-
*/
|
|
447
|
-
|
|
448
|
-
/**
|
|
449
|
-
* @typedef CourierPartnerSchemeV2DetailsModel
|
|
450
|
-
* @property {string} extension_id - Unique identifier of courier partner extension.
|
|
451
|
-
* @property {string} [scheme_id] - Unique identifier of courier partner scheme.
|
|
452
|
-
* @property {string} name - Name of the scheme.
|
|
453
|
-
* @property {ArithmeticOperations} weight
|
|
454
|
-
* @property {ArithmeticOperations} [volumetric_weight]
|
|
455
|
-
* @property {string} transport_type - Mode of transport associated with the
|
|
456
|
-
* courier partner scheme.
|
|
457
|
-
* @property {string} region - Serviceable region associated with the courier
|
|
458
|
-
* partner scheme.
|
|
459
|
-
* @property {string} delivery_type - Type of delivery associated with the
|
|
460
|
-
* courier partner scheme.
|
|
461
|
-
* @property {string[]} payment_mode - Mode of payment associated with the
|
|
462
|
-
* courier partner scheme.
|
|
463
|
-
* @property {string} stage - Indicates if the courier partner scheme is
|
|
464
|
-
* currently active or inactive.
|
|
465
|
-
* @property {string} [status_updates] - Describes the type of status updates
|
|
466
|
-
* provided by the courier partner (e.g., real-time, periodic).
|
|
467
|
-
* @property {number} [ndr_attempts] - Indicates if the Non-Delivery Report
|
|
468
|
-
* (NDR) feature is supported by the courier partner.
|
|
469
|
-
* @property {number} [qc_shipment_item_quantity] - Defines the maximum quantity
|
|
470
|
-
* of items allowed in a quality check shipment.
|
|
471
|
-
* @property {number} [non_qc_shipment_item_quantity] - Defines the maximum
|
|
472
|
-
* quantity of items allowed in a non-quality check shipment.
|
|
473
|
-
* @property {CourierPartnerSchemeV2Features} feature
|
|
474
|
-
*/
|
|
475
|
-
|
|
476
|
-
/**
|
|
477
|
-
* @typedef CourierPartnerV2SchemeModel
|
|
478
|
-
* @property {string} extension_id - Unique identifier of courier partner extension.
|
|
479
|
-
* @property {string} scheme_id - Unique identifier of courier partner scheme.
|
|
480
|
-
* @property {string} [company_id] - Unique identifier of company.
|
|
481
|
-
* @property {string} name - Name of the scheme.
|
|
482
|
-
* @property {ArithmeticOperations} weight
|
|
483
|
-
* @property {ArithmeticOperations} [volumetric_weight]
|
|
484
|
-
* @property {string} transport_type - Mode of transport associated with the
|
|
485
|
-
* courier partner scheme.
|
|
486
|
-
* @property {string} region - Serviceable region associated with the courier
|
|
487
|
-
* partner scheme.
|
|
488
|
-
* @property {string} delivery_type - Type of delivery associated with the
|
|
489
|
-
* courier partner scheme.
|
|
490
|
-
* @property {string[]} payment_mode - Mode of payment associated with the
|
|
491
|
-
* courier partner scheme.
|
|
492
|
-
* @property {string} stage - Indicates if the courier partner scheme is
|
|
493
|
-
* currently active or inactive.
|
|
494
|
-
* @property {string} [status_updates] - Describes the type of status updates
|
|
495
|
-
* provided by the courier partner (e.g., real-time, periodic).
|
|
496
|
-
* @property {number} [ndr_attempts] - Indicates if the Non-Delivery Report
|
|
497
|
-
* (NDR) feature is supported by the courier partner.
|
|
498
|
-
* @property {number} [qc_shipment_item_quantity] - Defines the maximum quantity
|
|
499
|
-
* of items allowed in a quality check shipment.
|
|
500
|
-
* @property {number} [non_qc_shipment_item_quantity] - Defines the maximum
|
|
501
|
-
* quantity of items allowed in a non-quality check shipment.
|
|
502
|
-
* @property {CourierPartnerSchemeV2Features} feature
|
|
503
|
-
*/
|
|
504
|
-
|
|
505
|
-
/**
|
|
506
|
-
* @typedef courierPartnerSchemeV2List
|
|
507
|
-
* @property {CourierPartnerV2SchemeModel[]} items - List of courier partner schemes
|
|
508
|
-
* @property {Page} page
|
|
509
|
-
*/
|
|
510
|
-
|
|
511
403
|
/**
|
|
512
404
|
* @typedef ArithmeticOperations
|
|
513
405
|
* @property {number} [lt]
|
|
@@ -517,10 +409,9 @@ const Joi = require("joi");
|
|
|
517
409
|
*/
|
|
518
410
|
|
|
519
411
|
/**
|
|
520
|
-
* @typedef
|
|
412
|
+
* @typedef CourierPartnerSchemeUpdateDetails
|
|
521
413
|
* @property {string} name - Name of the scheme.
|
|
522
414
|
* @property {ArithmeticOperations} weight
|
|
523
|
-
* @property {ArithmeticOperations} [volumetric_weight]
|
|
524
415
|
* @property {string} transport_type - Mode of transport associated with the
|
|
525
416
|
* courier partner scheme.
|
|
526
417
|
* @property {string} region - Serviceable region associated with the courier
|
|
@@ -529,17 +420,9 @@ const Joi = require("joi");
|
|
|
529
420
|
* courier partner scheme.
|
|
530
421
|
* @property {string[]} payment_mode - Mode of payment associated with the
|
|
531
422
|
* courier partner scheme.
|
|
532
|
-
* @property {string} stage -
|
|
533
|
-
*
|
|
534
|
-
* @property {
|
|
535
|
-
* provided by the courier partner (e.g., real-time, periodic).
|
|
536
|
-
* @property {number} [ndr_attempts] - Indicates if the Non-Delivery Report
|
|
537
|
-
* (NDR) feature is supported by the courier partner.
|
|
538
|
-
* @property {number} [qc_shipment_item_quantity] - Defines the maximum quantity
|
|
539
|
-
* of items allowed in a quality check shipment.
|
|
540
|
-
* @property {number} [non_qc_shipment_item_quantity] - Defines the maximum
|
|
541
|
-
* quantity of items allowed in a non-quality check shipment.
|
|
542
|
-
* @property {CourierPartnerSchemeV2Features} feature
|
|
423
|
+
* @property {string} stage - Denotes whether the courier partner scheme is in
|
|
424
|
+
* enabled or disabled stage.
|
|
425
|
+
* @property {CourierPartnerSchemeFeatures} feature
|
|
543
426
|
*/
|
|
544
427
|
|
|
545
428
|
/**
|
|
@@ -690,7 +573,6 @@ class LogisticsPartnerModel {
|
|
|
690
573
|
return Joi.object({
|
|
691
574
|
first_mile: Joi.boolean(),
|
|
692
575
|
last_mile: Joi.boolean(),
|
|
693
|
-
reverse_pickup: Joi.boolean().allow(null),
|
|
694
576
|
cod_limit: Joi.number(),
|
|
695
577
|
doorstep_return: Joi.boolean(),
|
|
696
578
|
doorstep_qc: Joi.boolean(),
|
|
@@ -705,7 +587,6 @@ class LogisticsPartnerModel {
|
|
|
705
587
|
return Joi.object({
|
|
706
588
|
first_mile: Joi.boolean(),
|
|
707
589
|
last_mile: Joi.boolean(),
|
|
708
|
-
reverse_pickup: Joi.boolean().allow(null),
|
|
709
590
|
cod_limit: Joi.number(),
|
|
710
591
|
doorstep_return: Joi.boolean(),
|
|
711
592
|
doorstep_qc: Joi.boolean(),
|
|
@@ -724,7 +605,6 @@ class LogisticsPartnerModel {
|
|
|
724
605
|
pincode: Joi.string().allow(""),
|
|
725
606
|
first_mile: Joi.boolean(),
|
|
726
607
|
last_mile: Joi.boolean(),
|
|
727
|
-
reverse_pickup: Joi.boolean().allow(null),
|
|
728
608
|
cod_limit: Joi.number(),
|
|
729
609
|
doorstep_return: Joi.boolean(),
|
|
730
610
|
doorstep_qc: Joi.boolean(),
|
|
@@ -744,7 +624,6 @@ class LogisticsPartnerModel {
|
|
|
744
624
|
pincode: Joi.string().allow(""),
|
|
745
625
|
first_mile: Joi.boolean(),
|
|
746
626
|
last_mile: Joi.boolean(),
|
|
747
|
-
reverse_pickup: Joi.boolean().allow(null),
|
|
748
627
|
cod_limit: Joi.number(),
|
|
749
628
|
doorstep_return: Joi.boolean(),
|
|
750
629
|
doorstep_qc: Joi.boolean(),
|
|
@@ -947,81 +826,6 @@ class LogisticsPartnerModel {
|
|
|
947
826
|
});
|
|
948
827
|
}
|
|
949
828
|
|
|
950
|
-
/** @returns {CourierPartnerSchemeV2Features} */
|
|
951
|
-
static CourierPartnerSchemeV2Features() {
|
|
952
|
-
return Joi.object({
|
|
953
|
-
doorstep_qc: Joi.boolean(),
|
|
954
|
-
qr: Joi.boolean(),
|
|
955
|
-
mps: Joi.boolean(),
|
|
956
|
-
ndr: Joi.boolean(),
|
|
957
|
-
dangerous_goods: Joi.boolean(),
|
|
958
|
-
fragile_goods: Joi.boolean(),
|
|
959
|
-
restricted_goods: Joi.boolean(),
|
|
960
|
-
cold_storage_goods: Joi.boolean(),
|
|
961
|
-
doorstep_exchange: Joi.boolean(),
|
|
962
|
-
doorstep_return: Joi.boolean(),
|
|
963
|
-
product_installation: Joi.boolean(),
|
|
964
|
-
openbox_delivery: Joi.boolean(),
|
|
965
|
-
multi_pick_single_drop: Joi.boolean(),
|
|
966
|
-
single_pick_multi_drop: Joi.boolean(),
|
|
967
|
-
multi_pick_multi_drop: Joi.boolean(),
|
|
968
|
-
ewaybill: Joi.boolean(),
|
|
969
|
-
});
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
/** @returns {CourierPartnerSchemeV2DetailsModel} */
|
|
973
|
-
static CourierPartnerSchemeV2DetailsModel() {
|
|
974
|
-
return Joi.object({
|
|
975
|
-
extension_id: Joi.string().allow("").required(),
|
|
976
|
-
scheme_id: Joi.string().allow(""),
|
|
977
|
-
name: Joi.string().allow("").required(),
|
|
978
|
-
weight: LogisticsPartnerModel.ArithmeticOperations().required(),
|
|
979
|
-
volumetric_weight: LogisticsPartnerModel.ArithmeticOperations(),
|
|
980
|
-
transport_type: Joi.string().allow("").required(),
|
|
981
|
-
region: Joi.string().allow("").required(),
|
|
982
|
-
delivery_type: Joi.string().allow("").required(),
|
|
983
|
-
payment_mode: Joi.array().items(Joi.string().allow("")).required(),
|
|
984
|
-
stage: Joi.string().allow("").required(),
|
|
985
|
-
status_updates: Joi.string().allow(""),
|
|
986
|
-
ndr_attempts: Joi.number(),
|
|
987
|
-
qc_shipment_item_quantity: Joi.number().allow(null),
|
|
988
|
-
non_qc_shipment_item_quantity: Joi.number().allow(null),
|
|
989
|
-
feature: LogisticsPartnerModel.CourierPartnerSchemeV2Features().required(),
|
|
990
|
-
});
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
/** @returns {CourierPartnerV2SchemeModel} */
|
|
994
|
-
static CourierPartnerV2SchemeModel() {
|
|
995
|
-
return Joi.object({
|
|
996
|
-
extension_id: Joi.string().allow("").required(),
|
|
997
|
-
scheme_id: Joi.string().allow("").required(),
|
|
998
|
-
company_id: Joi.string().allow(""),
|
|
999
|
-
name: Joi.string().allow("").required(),
|
|
1000
|
-
weight: LogisticsPartnerModel.ArithmeticOperations().required(),
|
|
1001
|
-
volumetric_weight: LogisticsPartnerModel.ArithmeticOperations(),
|
|
1002
|
-
transport_type: Joi.string().allow("").required(),
|
|
1003
|
-
region: Joi.string().allow("").required(),
|
|
1004
|
-
delivery_type: Joi.string().allow("").required(),
|
|
1005
|
-
payment_mode: Joi.array().items(Joi.string().allow("")).required(),
|
|
1006
|
-
stage: Joi.string().allow("").required(),
|
|
1007
|
-
status_updates: Joi.string().allow(""),
|
|
1008
|
-
ndr_attempts: Joi.number(),
|
|
1009
|
-
qc_shipment_item_quantity: Joi.number().allow(null),
|
|
1010
|
-
non_qc_shipment_item_quantity: Joi.number().allow(null),
|
|
1011
|
-
feature: LogisticsPartnerModel.CourierPartnerSchemeV2Features().required(),
|
|
1012
|
-
});
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
/** @returns {courierPartnerSchemeV2List} */
|
|
1016
|
-
static courierPartnerSchemeV2List() {
|
|
1017
|
-
return Joi.object({
|
|
1018
|
-
items: Joi.array()
|
|
1019
|
-
.items(LogisticsPartnerModel.CourierPartnerV2SchemeModel())
|
|
1020
|
-
.required(),
|
|
1021
|
-
page: LogisticsPartnerModel.Page().required(),
|
|
1022
|
-
});
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
829
|
/** @returns {ArithmeticOperations} */
|
|
1026
830
|
static ArithmeticOperations() {
|
|
1027
831
|
return Joi.object({
|
|
@@ -1032,22 +836,17 @@ class LogisticsPartnerModel {
|
|
|
1032
836
|
});
|
|
1033
837
|
}
|
|
1034
838
|
|
|
1035
|
-
/** @returns {
|
|
1036
|
-
static
|
|
839
|
+
/** @returns {CourierPartnerSchemeUpdateDetails} */
|
|
840
|
+
static CourierPartnerSchemeUpdateDetails() {
|
|
1037
841
|
return Joi.object({
|
|
1038
842
|
name: Joi.string().allow("").required(),
|
|
1039
843
|
weight: LogisticsPartnerModel.ArithmeticOperations().required(),
|
|
1040
|
-
volumetric_weight: LogisticsPartnerModel.ArithmeticOperations(),
|
|
1041
844
|
transport_type: Joi.string().allow("").required(),
|
|
1042
845
|
region: Joi.string().allow("").required(),
|
|
1043
846
|
delivery_type: Joi.string().allow("").required(),
|
|
1044
847
|
payment_mode: Joi.array().items(Joi.string().allow("")).required(),
|
|
1045
848
|
stage: Joi.string().allow("").required(),
|
|
1046
|
-
|
|
1047
|
-
ndr_attempts: Joi.number(),
|
|
1048
|
-
qc_shipment_item_quantity: Joi.number().allow(null),
|
|
1049
|
-
non_qc_shipment_item_quantity: Joi.number().allow(null),
|
|
1050
|
-
feature: LogisticsPartnerModel.CourierPartnerSchemeV2Features().required(),
|
|
849
|
+
feature: LogisticsPartnerModel.CourierPartnerSchemeFeatures().required(),
|
|
1051
850
|
});
|
|
1052
851
|
}
|
|
1053
852
|
|
|
@@ -20,9 +20,7 @@ declare class LogisticsValidator {
|
|
|
20
20
|
static getCourierPartnerAccounts(): any;
|
|
21
21
|
static updateCourierPartnerAccount(): any;
|
|
22
22
|
static getCourierPartnerAccount(): any;
|
|
23
|
-
static getCountries(): any;
|
|
24
23
|
static createCourierPartnerScheme(): any;
|
|
25
|
-
static getCourierPartnerSchemes(): any;
|
|
26
24
|
static updateCourierPartnerScheme(): any;
|
|
27
|
-
static
|
|
25
|
+
static getCountries(): any;
|
|
28
26
|
}
|
|
@@ -211,40 +211,25 @@ class LogisticsValidator {
|
|
|
211
211
|
}).required();
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
-
static getCountries() {
|
|
215
|
-
return Joi.object({
|
|
216
|
-
onboarding: Joi.boolean(),
|
|
217
|
-
pageNo: Joi.number(),
|
|
218
|
-
pageSize: Joi.number(),
|
|
219
|
-
q: Joi.string().allow(""),
|
|
220
|
-
}).required();
|
|
221
|
-
}
|
|
222
|
-
|
|
223
214
|
static createCourierPartnerScheme() {
|
|
224
215
|
return Joi.object({
|
|
225
|
-
body: LogisticsModel.
|
|
226
|
-
}).required();
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
static getCourierPartnerSchemes() {
|
|
230
|
-
return Joi.object({
|
|
231
|
-
schemeType: Joi.string().allow(""),
|
|
232
|
-
paymentMode: Joi.string().allow(""),
|
|
233
|
-
capabilities: Joi.array().items(Joi.string().allow("")),
|
|
234
|
-
schemeIds: Joi.array().items(Joi.string().allow("")),
|
|
216
|
+
body: LogisticsModel.CourierPartnerSchemeDetailsModel().required(),
|
|
235
217
|
}).required();
|
|
236
218
|
}
|
|
237
219
|
|
|
238
220
|
static updateCourierPartnerScheme() {
|
|
239
221
|
return Joi.object({
|
|
240
222
|
schemeId: Joi.string().allow("").required(),
|
|
241
|
-
body: LogisticsModel.
|
|
223
|
+
body: LogisticsModel.CourierPartnerSchemeUpdateDetails().required(),
|
|
242
224
|
}).required();
|
|
243
225
|
}
|
|
244
226
|
|
|
245
|
-
static
|
|
227
|
+
static getCountries() {
|
|
246
228
|
return Joi.object({
|
|
247
|
-
|
|
229
|
+
onboarding: Joi.boolean(),
|
|
230
|
+
pageNo: Joi.number(),
|
|
231
|
+
pageSize: Joi.number(),
|
|
232
|
+
q: Joi.string().allow(""),
|
|
248
233
|
}).required();
|
|
249
234
|
}
|
|
250
235
|
}
|
|
@@ -6,6 +6,7 @@ const querystring = require("query-string");
|
|
|
6
6
|
const { sign } = require("@gofynd/fp-signature");
|
|
7
7
|
const { convertStringToBase64 } = require("../common/utils");
|
|
8
8
|
|
|
9
|
+
const refreshTokenRequestCache = {};
|
|
9
10
|
class OAuthClient extends BaseOAuthClient {
|
|
10
11
|
constructor(config) {
|
|
11
12
|
super(config);
|
|
@@ -504,16 +504,7 @@ export = ThemePartnerModel;
|
|
|
504
504
|
*/
|
|
505
505
|
/**
|
|
506
506
|
* @typedef GlobalSchema
|
|
507
|
-
* @property {
|
|
508
|
-
*/
|
|
509
|
-
/**
|
|
510
|
-
* @typedef Prop
|
|
511
|
-
* @property {string} [type] - The type of the property
|
|
512
|
-
* @property {string} [category] - The category of the property
|
|
513
|
-
* @property {string} [value] - The value of the property
|
|
514
|
-
* @property {string} [id] - The ID of the property
|
|
515
|
-
* @property {string} [label] - The label of the property
|
|
516
|
-
* @property {string} [info] - Additional information about the property
|
|
507
|
+
* @property {Object[]} [props]
|
|
517
508
|
*/
|
|
518
509
|
/**
|
|
519
510
|
* @typedef Preset
|
|
@@ -678,7 +669,7 @@ export = ThemePartnerModel;
|
|
|
678
669
|
declare class ThemePartnerModel {
|
|
679
670
|
}
|
|
680
671
|
declare namespace ThemePartnerModel {
|
|
681
|
-
export { AvailablePageSchema, DraftExtensionSection, ExtensionSectionDraft, Sections, ExtensionSection, PropExtension, AssetsExtension, PublishExtensionSection, PreviewExtension, ExtensionPreview, ExtensionSectionPublish, AvailablePageSectionMetaAttributes, AvailablePageSeo, SEOMetaItem, SEOMetaItems, SEOSitemap, SEObreadcrumb, Action, AvailablePageSchemaSections, SectionSource, AvailablePageScreenPredicate, AvailablePageUserPredicate, AvailablePageRoutePredicate, AvailablePagePlatformPredicate, AvailablePageSchedulePredicate, AvailablePagePredicate, MarketplaceThemeSchema, MarketplaceTheme, PaymentInfo, ContactInfo, CatalogSize, MarketplaceThemeImages, CarouselItem, ExploreInfo, Feature, FeatureItem, Highlight, Variation, Documentation, Comments, ThemeRejectionReasons, RejectedMessages, ThemeReviewRequestMessage, AllAvailablePageSchema, PaginationSchema, BlitzkriegApiErrorSchema, BlitzkriegInternalServerErrorSchema, ThemesSchema, Font, FontVariants, FontVariant, Config, ThemeConfiguration, OverlayPopup, DividerStrokeHighlight, UserAlerts, OrderTracking, ThemeConfigListPage, ThemeConfigListPageSettingsProps, CustomConfig, CustomProps, ThemeMeta, ThemePayment, Release, Images, Assets, UMDJs, CommonJS, CSS, SectionItem, GlobalSchema,
|
|
672
|
+
export { AvailablePageSchema, DraftExtensionSection, ExtensionSectionDraft, Sections, ExtensionSection, PropExtension, AssetsExtension, PublishExtensionSection, PreviewExtension, ExtensionPreview, ExtensionSectionPublish, AvailablePageSectionMetaAttributes, AvailablePageSeo, SEOMetaItem, SEOMetaItems, SEOSitemap, SEObreadcrumb, Action, AvailablePageSchemaSections, SectionSource, AvailablePageScreenPredicate, AvailablePageUserPredicate, AvailablePageRoutePredicate, AvailablePagePlatformPredicate, AvailablePageSchedulePredicate, AvailablePagePredicate, MarketplaceThemeSchema, MarketplaceTheme, PaymentInfo, ContactInfo, CatalogSize, MarketplaceThemeImages, CarouselItem, ExploreInfo, Feature, FeatureItem, Highlight, Variation, Documentation, Comments, ThemeRejectionReasons, RejectedMessages, ThemeReviewRequestMessage, AllAvailablePageSchema, PaginationSchema, BlitzkriegApiErrorSchema, BlitzkriegInternalServerErrorSchema, ThemesSchema, Font, FontVariants, FontVariant, Config, ThemeConfiguration, OverlayPopup, DividerStrokeHighlight, UserAlerts, OrderTracking, ThemeConfigListPage, ThemeConfigListPageSettingsProps, CustomConfig, CustomProps, ThemeMeta, ThemePayment, Release, Images, Assets, UMDJs, CommonJS, CSS, SectionItem, GlobalSchema, Preset, Page, SectionProps, SectionPreset, ImagePickerProp, UrlProp, BlockProps, TextProp, CheckboxProp, RangeProp, Section, Block, Predicate, Screen, ThemeUserSchema, Route, UpdateThemeRequestBody, CreateNewTheme, ActionPage, PageType };
|
|
682
673
|
}
|
|
683
674
|
/** @returns {AvailablePageSchema} */
|
|
684
675
|
declare function AvailablePageSchema(): AvailablePageSchema;
|
|
@@ -1640,35 +1631,7 @@ type SectionItem = {
|
|
|
1640
1631
|
/** @returns {GlobalSchema} */
|
|
1641
1632
|
declare function GlobalSchema(): GlobalSchema;
|
|
1642
1633
|
type GlobalSchema = {
|
|
1643
|
-
props?:
|
|
1644
|
-
};
|
|
1645
|
-
/** @returns {Prop} */
|
|
1646
|
-
declare function Prop(): Prop;
|
|
1647
|
-
type Prop = {
|
|
1648
|
-
/**
|
|
1649
|
-
* - The type of the property
|
|
1650
|
-
*/
|
|
1651
|
-
type?: string;
|
|
1652
|
-
/**
|
|
1653
|
-
* - The category of the property
|
|
1654
|
-
*/
|
|
1655
|
-
category?: string;
|
|
1656
|
-
/**
|
|
1657
|
-
* - The value of the property
|
|
1658
|
-
*/
|
|
1659
|
-
value?: string;
|
|
1660
|
-
/**
|
|
1661
|
-
* - The ID of the property
|
|
1662
|
-
*/
|
|
1663
|
-
id?: string;
|
|
1664
|
-
/**
|
|
1665
|
-
* - The label of the property
|
|
1666
|
-
*/
|
|
1667
|
-
label?: string;
|
|
1668
|
-
/**
|
|
1669
|
-
* - Additional information about the property
|
|
1670
|
-
*/
|
|
1671
|
-
info?: string;
|
|
1634
|
+
props?: any[];
|
|
1672
1635
|
};
|
|
1673
1636
|
/** @returns {Preset} */
|
|
1674
1637
|
declare function Preset(): Preset;
|
|
@@ -575,17 +575,7 @@ const Joi = require("joi");
|
|
|
575
575
|
|
|
576
576
|
/**
|
|
577
577
|
* @typedef GlobalSchema
|
|
578
|
-
* @property {
|
|
579
|
-
*/
|
|
580
|
-
|
|
581
|
-
/**
|
|
582
|
-
* @typedef Prop
|
|
583
|
-
* @property {string} [type] - The type of the property
|
|
584
|
-
* @property {string} [category] - The category of the property
|
|
585
|
-
* @property {string} [value] - The value of the property
|
|
586
|
-
* @property {string} [id] - The ID of the property
|
|
587
|
-
* @property {string} [label] - The label of the property
|
|
588
|
-
* @property {string} [info] - Additional information about the property
|
|
578
|
+
* @property {Object[]} [props]
|
|
589
579
|
*/
|
|
590
580
|
|
|
591
581
|
/**
|
|
@@ -1482,19 +1472,7 @@ class ThemePartnerModel {
|
|
|
1482
1472
|
/** @returns {GlobalSchema} */
|
|
1483
1473
|
static GlobalSchema() {
|
|
1484
1474
|
return Joi.object({
|
|
1485
|
-
props: Joi.array().items(
|
|
1486
|
-
});
|
|
1487
|
-
}
|
|
1488
|
-
|
|
1489
|
-
/** @returns {Prop} */
|
|
1490
|
-
static Prop() {
|
|
1491
|
-
return Joi.object({
|
|
1492
|
-
type: Joi.string().allow(""),
|
|
1493
|
-
category: Joi.string().allow(""),
|
|
1494
|
-
value: Joi.string().allow(""),
|
|
1495
|
-
id: Joi.string().allow(""),
|
|
1496
|
-
label: Joi.string().allow(""),
|
|
1497
|
-
info: Joi.string().allow(""),
|
|
1475
|
+
props: Joi.array().items(Joi.any()),
|
|
1498
1476
|
});
|
|
1499
1477
|
}
|
|
1500
1478
|
|
|
@@ -83,7 +83,7 @@ class AnalyticsPlatformModel {
|
|
|
83
83
|
static JobStatus() {
|
|
84
84
|
return Joi.object({
|
|
85
85
|
start_date: Joi.string().allow(""),
|
|
86
|
-
end_date: Joi.string().allow("")
|
|
86
|
+
end_date: Joi.string().allow(""),
|
|
87
87
|
status: Joi.string().allow(""),
|
|
88
88
|
message: Joi.string().allow(""),
|
|
89
89
|
file_metadata: Joi.array().items(Joi.any()).allow(null, ""),
|
|
@@ -360,7 +360,7 @@ declare class Cart {
|
|
|
360
360
|
* @summary: List of all available promotion offers
|
|
361
361
|
* @description: Retrieve a list of all promotional offers available for the items in the cart, including details such as offer text, unique promotion ID, and validity period. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromotionOffers/).
|
|
362
362
|
*/
|
|
363
|
-
getPromotionOffers({ slug, pageSize, promotionGroup, storeId, cartType, requestHeaders }?: CartPlatformApplicationValidator.GetPromotionOffersParam, { responseHeaders }?: object): Promise<CartPlatformModel.PromotionOffersDetails>;
|
|
363
|
+
getPromotionOffers({ slug, pageSize, promotionGroup, storeId, cartType, sortBy, requestHeaders, }?: CartPlatformApplicationValidator.GetPromotionOffersParam, { responseHeaders }?: object): Promise<CartPlatformModel.PromotionOffersDetails>;
|
|
364
364
|
/**
|
|
365
365
|
* @param {CartPlatformApplicationValidator.GetPromotionPaymentOffersParam} arg
|
|
366
366
|
* - Arg object
|
|
@@ -2841,9 +2841,15 @@ class Cart {
|
|
|
2841
2841
|
* @description: Retrieve a list of all promotional offers available for the items in the cart, including details such as offer text, unique promotion ID, and validity period. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromotionOffers/).
|
|
2842
2842
|
*/
|
|
2843
2843
|
async getPromotionOffers(
|
|
2844
|
-
{
|
|
2845
|
-
|
|
2846
|
-
|
|
2844
|
+
{
|
|
2845
|
+
slug,
|
|
2846
|
+
pageSize,
|
|
2847
|
+
promotionGroup,
|
|
2848
|
+
storeId,
|
|
2849
|
+
cartType,
|
|
2850
|
+
sortBy,
|
|
2851
|
+
requestHeaders,
|
|
2852
|
+
} = { requestHeaders: {} },
|
|
2847
2853
|
{ responseHeaders } = { responseHeaders: false }
|
|
2848
2854
|
) {
|
|
2849
2855
|
const {
|
|
@@ -2855,6 +2861,7 @@ class Cart {
|
|
|
2855
2861
|
promotionGroup,
|
|
2856
2862
|
storeId,
|
|
2857
2863
|
cartType,
|
|
2864
|
+
sortBy,
|
|
2858
2865
|
},
|
|
2859
2866
|
{ abortEarly: false, allowUnknown: true }
|
|
2860
2867
|
);
|
|
@@ -2872,6 +2879,7 @@ class Cart {
|
|
|
2872
2879
|
promotionGroup,
|
|
2873
2880
|
storeId,
|
|
2874
2881
|
cartType,
|
|
2882
|
+
sortBy,
|
|
2875
2883
|
},
|
|
2876
2884
|
{ abortEarly: false, allowUnknown: false }
|
|
2877
2885
|
);
|
|
@@ -2888,6 +2896,7 @@ class Cart {
|
|
|
2888
2896
|
query_params["promotion_group"] = promotionGroup;
|
|
2889
2897
|
query_params["store_id"] = storeId;
|
|
2890
2898
|
query_params["cart_type"] = cartType;
|
|
2899
|
+
query_params["sort_by"] = sortBy;
|
|
2891
2900
|
|
|
2892
2901
|
const response = await PlatformAPIClient.execute(
|
|
2893
2902
|
this.config,
|
|
@@ -53,7 +53,7 @@ export = CartPlatformApplicationValidator;
|
|
|
53
53
|
*/
|
|
54
54
|
/**
|
|
55
55
|
* @typedef DeletePromotionParam
|
|
56
|
-
* @property {string} id
|
|
56
|
+
* @property {string} id - Promotion id for fetching single promotion data for deleting
|
|
57
57
|
*/
|
|
58
58
|
/**
|
|
59
59
|
* @typedef FetchAndvalidateCartItemsParam
|
|
@@ -197,6 +197,8 @@ export = CartPlatformApplicationValidator;
|
|
|
197
197
|
* @property {string} [promotionGroup] - Type of promotion groups
|
|
198
198
|
* @property {number} [storeId] - Unique identifier of a store
|
|
199
199
|
* @property {string} [cartType] - The type of cart
|
|
200
|
+
* @property {string} [sortBy] - Specifies the sorting criteria for the
|
|
201
|
+
* promotions. Sorts promotions in descending order by the value provided.
|
|
200
202
|
*/
|
|
201
203
|
/**
|
|
202
204
|
* @typedef GetPromotionPaymentOffersParam
|
|
@@ -578,6 +580,9 @@ type DeleteCouponParam = {
|
|
|
578
580
|
id: string;
|
|
579
581
|
};
|
|
580
582
|
type DeletePromotionParam = {
|
|
583
|
+
/**
|
|
584
|
+
* - Promotion id for fetching single promotion data for deleting
|
|
585
|
+
*/
|
|
581
586
|
id: string;
|
|
582
587
|
};
|
|
583
588
|
type FetchAndvalidateCartItemsParam = {
|
|
@@ -754,6 +759,11 @@ type GetPromotionOffersParam = {
|
|
|
754
759
|
* - The type of cart
|
|
755
760
|
*/
|
|
756
761
|
cartType?: string;
|
|
762
|
+
/**
|
|
763
|
+
* - Specifies the sorting criteria for the
|
|
764
|
+
* promotions. Sorts promotions in descending order by the value provided.
|
|
765
|
+
*/
|
|
766
|
+
sortBy?: string;
|
|
757
767
|
};
|
|
758
768
|
type GetPromotionPaymentOffersParam = {
|
|
759
769
|
/**
|
|
@@ -67,7 +67,7 @@ const CartPlatformModel = require("./CartPlatformModel");
|
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
* @typedef DeletePromotionParam
|
|
70
|
-
* @property {string} id
|
|
70
|
+
* @property {string} id - Promotion id for fetching single promotion data for deleting
|
|
71
71
|
*/
|
|
72
72
|
|
|
73
73
|
/**
|
|
@@ -233,6 +233,8 @@ const CartPlatformModel = require("./CartPlatformModel");
|
|
|
233
233
|
* @property {string} [promotionGroup] - Type of promotion groups
|
|
234
234
|
* @property {number} [storeId] - Unique identifier of a store
|
|
235
235
|
* @property {string} [cartType] - The type of cart
|
|
236
|
+
* @property {string} [sortBy] - Specifies the sorting criteria for the
|
|
237
|
+
* promotions. Sorts promotions in descending order by the value provided.
|
|
236
238
|
*/
|
|
237
239
|
|
|
238
240
|
/**
|
|
@@ -760,6 +762,7 @@ class CartPlatformApplicationValidator {
|
|
|
760
762
|
promotionGroup: Joi.string().allow(""),
|
|
761
763
|
storeId: Joi.number(),
|
|
762
764
|
cartType: Joi.string().allow(""),
|
|
765
|
+
sortBy: Joi.string().allow(""),
|
|
763
766
|
}).required();
|
|
764
767
|
}
|
|
765
768
|
|