@gofynd/fdk-client-javascript 3.4.0 → 3.4.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.
Files changed (24) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +111 -43
  4. package/sdk/partner/Logistics/LogisticsPartnerModel.js +65 -33
  5. package/sdk/platform/Cart/CartPlatformModel.d.ts +262 -12
  6. package/sdk/platform/Cart/CartPlatformModel.js +334 -10
  7. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1 -1
  8. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +4 -1
  9. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +9 -0
  10. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +4 -0
  11. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +2 -0
  12. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +2 -0
  13. package/sdk/platform/Content/ContentPlatformModel.d.ts +14 -19
  14. package/sdk/platform/Content/ContentPlatformModel.js +6 -20
  15. package/sdk/platform/Order/OrderPlatformModel.d.ts +218 -17
  16. package/sdk/platform/Order/OrderPlatformModel.js +366 -14
  17. package/sdk/platform/Order/OrderPlatformValidator.d.ts +15 -15
  18. package/sdk/platform/Order/OrderPlatformValidator.js +9 -9
  19. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +7 -5
  20. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +4 -3
  21. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +97 -1
  22. package/sdk/platform/Payment/PaymentPlatformModel.js +273 -0
  23. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +50 -4
  24. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +22 -2
@@ -296,6 +296,43 @@ const Joi = require("joi");
296
296
  * modifications applied to the order.
297
297
  */
298
298
 
299
+ /**
300
+ * @typedef SellerQCDetailsSchema
301
+ * @property {number} line_number - Line_number of the product/bag.
302
+ * @property {number} good_quantity - The number of units marked as good during
303
+ * the seller QC process for the given line_number/bag item.
304
+ * @property {number} bad_quantity - The number of units marked as bad during
305
+ * the seller QC process for the given line_number/bag item.
306
+ */
307
+
308
+ /**
309
+ * @typedef EntityStatusDataSchema
310
+ * @property {SellerQCDetailsSchema[]} [seller_qc_details] - An array of QC
311
+ * results provided by the seller to indicate the condition of returned items
312
+ * (e.g., good vs. bad quantity) for each line item. Pass this field such that
313
+ * if inventory-related data is included, it will be updated accordingly
314
+ * during the transition.
315
+ */
316
+
317
+ /**
318
+ * @typedef DataUpdatesFiltersSchema
319
+ * @property {number} [line_number] - Line number of the product/bag.
320
+ * @property {number} [quantity] - Quantity of the line number item.
321
+ * @property {string} [identifier] - Seller identifier of the product/bag.
322
+ */
323
+
324
+ /**
325
+ * @typedef EntityStatusDataUpdates
326
+ * @property {DataUpdatesFiltersSchema[]} [filters] - A list of filters used to
327
+ * specify the target for this update. For shipment level or shipment-status
328
+ * level updates, this should be an empty array ([]) as no filters are
329
+ * required during shipment/shipment_status transitions. But is still
330
+ * mandatory due to schema requirements. For product-level updates,
331
+ * appropriate filters must be provided as per the schema to accurately target
332
+ * specific items.
333
+ * @property {EntityStatusDataSchema} [data]
334
+ */
335
+
299
336
  /**
300
337
  * @typedef DataUpdates
301
338
  * @property {OrderItemDataUpdates[]} [order_item_status] - A list of updates
@@ -305,6 +342,10 @@ const Joi = require("joi");
305
342
  * @property {EntitiesDataUpdates[]} [entities] - A list of updates related to
306
343
  * the properties of any relevant entities.
307
344
  * @property {OrderDataUpdates[]} [order]
345
+ * @property {EntityStatusDataUpdates[]} [entity_status] - A list of updates to
346
+ * entity_status properties associated with specific shipment status
347
+ * transitions (e.g., bag_confirmed, return_accepted). These updates are
348
+ * optional. Update e.g., inventory-affecting data (like QC data) to be updated.
308
349
  */
309
350
 
310
351
  /**
@@ -920,7 +961,7 @@ const Joi = require("joi");
920
961
  * your order was placed. This field will be phased out after version 2.4.0.
921
962
  * Please use ordering_source instead to ensure accurate order tracking and processing.
922
963
  * @property {string} [ordering_source] - To uniquely identify the source
923
- * through which order has been placed.
964
+ * through which order has been placed (e.g, marketplace, gofynd).
924
965
  * @property {Object} [meta] - Meta data of the order data contains additional,
925
966
  * potentially dynamic information about the order data.
926
967
  * @property {number} [cod_charges]
@@ -2550,7 +2591,7 @@ const Joi = require("joi");
2550
2591
  * your order was placed. This field will be phased out after version 2.4.0.
2551
2592
  * Please use ordering_source instead to ensure accurate order tracking and processing.
2552
2593
  * @property {string} [ordering_source] - To uniquely identify the source
2553
- * through which order has been placed.
2594
+ * through which order has been placed (e.g, marketplace, gofynd).
2554
2595
  * @property {string} entity - The type of entity that the configuration pertains to.
2555
2596
  */
2556
2597
 
@@ -2945,7 +2986,7 @@ const Joi = require("joi");
2945
2986
  * for the address.
2946
2987
  * @property {string} [country_phone_code] - The country-specific phone code for
2947
2988
  * formatting phone numbers.
2948
- * @property {string} [delivery_address_id] - A unique identifier for the
2989
+ * @property {number} [delivery_address_id] - A unique identifier for the
2949
2990
  * delivery address.
2950
2991
  * @property {Object} [geo_location] - An object containing additional
2951
2992
  * geographical information related to the address.
@@ -3628,13 +3669,13 @@ const Joi = require("joi");
3628
3669
  * @property {string} [order_date] - Denotes the date and time when an order was
3629
3670
  * placed by the customer. This timestamp is crucial for tracking the order'
3630
3671
  * @property {string} [order_created_ts] - The timestamp indicating when the
3631
- * order was created.
3672
+ * order was created in UTC format.
3632
3673
  * @property {ShipmentStatus} [shipment_status]
3633
3674
  * @property {UserDataInfo} [user]
3634
3675
  * @property {string} [estimated_sla_time] - The estimated Service Level
3635
3676
  * Agreement (SLA) time for the shipment.
3636
3677
  * @property {string} [estimated_sla_ts] - The timestamp for the estimated SLA,
3637
- * providing a specific time for expected delivery.
3678
+ * providing a specific time for expected delivery in UTC format.
3638
3679
  * @property {Address} [delivery_address]
3639
3680
  * @property {Address} [billing_address]
3640
3681
  * @property {AffiliateDetails} [affiliate_details]
@@ -3686,7 +3727,7 @@ const Joi = require("joi");
3686
3727
  * your order was placed. This field will be phased out after version 2.4.0.
3687
3728
  * Please use ordering_source instead to ensure accurate order tracking and processing.
3688
3729
  * @property {string} [ordering_source] - To uniquely identify the source
3689
- * through which order has been placed.
3730
+ * through which order has been placed (e.g, marketplace, gofynd).
3690
3731
  * @property {string} [shipment_id] - The unique identifier for the shipment itself.
3691
3732
  * @property {string} [customer_note] - Any special notes or instructions
3692
3733
  * provided by the customer related to the shipment.
@@ -3790,7 +3831,7 @@ const Joi = require("joi");
3790
3831
  * your order was placed. This field will be phased out after version 2.4.0.
3791
3832
  * Please use ordering_source instead to ensure accurate order tracking and processing.
3792
3833
  * @property {string} [ordering_source] - To uniquely identify the source
3793
- * through which order has been placed.
3834
+ * through which order has been placed (e.g, marketplace, gofynd).
3794
3835
  * @property {Object} [meta] - Meta data of the order contains additional,
3795
3836
  * potentially dynamic information about the order.
3796
3837
  */
@@ -4603,7 +4644,7 @@ const Joi = require("joi");
4603
4644
  * your order was placed. This field will be phased out after version 2.4.0.
4604
4645
  * Please use ordering_source instead to ensure accurate order tracking and processing.
4605
4646
  * @property {string} [ordering_source] - To uniquely identify the source
4606
- * through which order has been placed.
4647
+ * through which order has been placed (e.g, marketplace, gofynd).
4607
4648
  * @property {string} order_date - Specifies the exact date and time when the
4608
4649
  * order was placed by the customer, serving as a key timestamp for the
4609
4650
  * initiation of the order processing cycle.
@@ -5320,6 +5361,96 @@ const Joi = require("joi");
5320
5361
  * @property {string} [error]
5321
5362
  */
5322
5363
 
5364
+ /**
5365
+ * @typedef {| "storefront"
5366
+ * | "store_os_pos"
5367
+ * | "kiosk"
5368
+ * | "scan_go"
5369
+ * | "smart_trolley"
5370
+ * | "gofynd"
5371
+ * | "uniket"
5372
+ * | "marketplace"
5373
+ * | "social_commerce"
5374
+ * | "ondc"
5375
+ * | "nexus"
5376
+ * | "nykaa_fashion"
5377
+ * | "etsy"
5378
+ * | "vuivui"
5379
+ * | "zilingo"
5380
+ * | "firstcry"
5381
+ * | "bukalapak"
5382
+ * | "myntra_ppmp"
5383
+ * | "lazada"
5384
+ * | "tiktok"
5385
+ * | "sfcc"
5386
+ * | "debenhams"
5387
+ * | "prestomall"
5388
+ * | "meesho"
5389
+ * | "amazon_vdf"
5390
+ * | "bigcommerce"
5391
+ * | "sendo"
5392
+ * | "storehippo"
5393
+ * | "cdiscount"
5394
+ * | "nykaa"
5395
+ * | "trendyol"
5396
+ * | "weloveshopping"
5397
+ * | "jollee"
5398
+ * | "wish"
5399
+ * | "tiki"
5400
+ * | "central_online"
5401
+ * | "q10"
5402
+ * | "cred"
5403
+ * | "walmart"
5404
+ * | "snapdeal"
5405
+ * | "flipkart"
5406
+ * | "blibli"
5407
+ * | "ajio_jit"
5408
+ * | "pharmeasy"
5409
+ * | "ezmall"
5410
+ * | "adobe_commerce"
5411
+ * | "kartmax"
5412
+ * | "shopee"
5413
+ * | "zalora"
5414
+ * | "prestashop"
5415
+ * | "smytten"
5416
+ * | "amazon_sc"
5417
+ * | "urbanpiper"
5418
+ * | "flipkart_quick"
5419
+ * | "woocommerce"
5420
+ * | "zivame"
5421
+ * | "lelong"
5422
+ * | "facebook"
5423
+ * | "jiomart"
5424
+ * | "gmc"
5425
+ * | "robins"
5426
+ * | "akulaku"
5427
+ * | "noon"
5428
+ * | "tatacliq"
5429
+ * | "kartrocket"
5430
+ * | "inorbit"
5431
+ * | "ajio_business"
5432
+ * | "swiggy"
5433
+ * | "asos"
5434
+ * | "tokopedia"
5435
+ * | "limeroad"
5436
+ * | "myntra_omni"
5437
+ * | "spoyl"
5438
+ * | "amazon_mlf"
5439
+ * | "fulfilled_by_lazada"
5440
+ * | "ebay"
5441
+ * | "jd"
5442
+ * | "amazon_pharmacy"
5443
+ * | "ajio_vms"
5444
+ * | "daraz"
5445
+ * | "oker"
5446
+ * | "flipkart_b2b"
5447
+ * | "amazon_mlf_ss"
5448
+ * | "woovly"
5449
+ * | "tata1mg"
5450
+ * | "zomato"
5451
+ * | "shopify"} OrderingSource
5452
+ */
5453
+
5323
5454
  class OrderPlatformModel {
5324
5455
  /** @returns {InvalidateShipmentCachePayload} */
5325
5456
  static InvalidateShipmentCachePayload() {
@@ -5606,6 +5737,41 @@ class OrderPlatformModel {
5606
5737
  });
5607
5738
  }
5608
5739
 
5740
+ /** @returns {SellerQCDetailsSchema} */
5741
+ static SellerQCDetailsSchema() {
5742
+ return Joi.object({
5743
+ line_number: Joi.number().required(),
5744
+ good_quantity: Joi.number().required(),
5745
+ bad_quantity: Joi.number().required(),
5746
+ });
5747
+ }
5748
+
5749
+ /** @returns {EntityStatusDataSchema} */
5750
+ static EntityStatusDataSchema() {
5751
+ return Joi.object({
5752
+ seller_qc_details: Joi.array().items(
5753
+ OrderPlatformModel.SellerQCDetailsSchema()
5754
+ ),
5755
+ });
5756
+ }
5757
+
5758
+ /** @returns {DataUpdatesFiltersSchema} */
5759
+ static DataUpdatesFiltersSchema() {
5760
+ return Joi.object({
5761
+ line_number: Joi.number(),
5762
+ quantity: Joi.number(),
5763
+ identifier: Joi.string().allow(""),
5764
+ });
5765
+ }
5766
+
5767
+ /** @returns {EntityStatusDataUpdates} */
5768
+ static EntityStatusDataUpdates() {
5769
+ return Joi.object({
5770
+ filters: Joi.array().items(OrderPlatformModel.DataUpdatesFiltersSchema()),
5771
+ data: OrderPlatformModel.EntityStatusDataSchema(),
5772
+ });
5773
+ }
5774
+
5609
5775
  /** @returns {DataUpdates} */
5610
5776
  static DataUpdates() {
5611
5777
  return Joi.object({
@@ -5615,6 +5781,9 @@ class OrderPlatformModel {
5615
5781
  products: Joi.array().items(OrderPlatformModel.ProductsDataUpdates()),
5616
5782
  entities: Joi.array().items(OrderPlatformModel.EntitiesDataUpdates()),
5617
5783
  order: Joi.array().items(OrderPlatformModel.OrderDataUpdates()),
5784
+ entity_status: Joi.array().items(
5785
+ OrderPlatformModel.EntityStatusDataUpdates()
5786
+ ),
5618
5787
  });
5619
5788
  }
5620
5789
 
@@ -6226,7 +6395,7 @@ class OrderPlatformModel {
6226
6395
  currency: Joi.string().allow(""),
6227
6396
  total_order_value: Joi.number(),
6228
6397
  ordering_channel: Joi.string().allow(""),
6229
- ordering_source: Joi.string().allow("").allow(null),
6398
+ ordering_source: Joi.string().allow(""),
6230
6399
  meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
6231
6400
  cod_charges: Joi.number().allow(null),
6232
6401
  cashback_value: Joi.number().allow(null),
@@ -7689,7 +7858,7 @@ class OrderPlatformModel {
7689
7858
  return Joi.object({
7690
7859
  app_id: Joi.string().allow("").required(),
7691
7860
  ordering_channel: Joi.string().allow(""),
7692
- ordering_source: Joi.string().allow("").allow(null),
7861
+ ordering_source: Joi.string().allow(""),
7693
7862
  entity: Joi.string().allow("").required(),
7694
7863
  });
7695
7864
  }
@@ -8017,7 +8186,7 @@ class OrderPlatformModel {
8017
8186
  country_code: Joi.string().allow("").allow(null),
8018
8187
  country_iso_code: Joi.string().allow("").allow(null),
8019
8188
  country_phone_code: Joi.string().allow("").allow(null),
8020
- delivery_address_id: Joi.string().allow(""),
8189
+ delivery_address_id: Joi.number(),
8021
8190
  geo_location: Joi.object().pattern(/\S/, Joi.any()),
8022
8191
  name: Joi.string().allow(""),
8023
8192
  sector: Joi.string().allow(""),
@@ -8522,7 +8691,7 @@ class OrderPlatformModel {
8522
8691
  ordering_currency_prices: OrderPlatformModel.OrderingCurrencyPrices(),
8523
8692
  order_id: Joi.string().allow("").required(),
8524
8693
  ordering_channnel: Joi.string().allow("").allow(null),
8525
- ordering_source: Joi.string().allow("").allow(null),
8694
+ ordering_source: Joi.string().allow(""),
8526
8695
  shipment_id: Joi.string().allow("").allow(null),
8527
8696
  customer_note: Joi.string().allow("").allow(null),
8528
8697
  total_bags: Joi.number().required(),
@@ -8590,7 +8759,7 @@ class OrderPlatformModel {
8590
8759
  .allow(null, ""),
8591
8760
  order_value: Joi.string().allow("").allow(null),
8592
8761
  ordering_channel: Joi.string().allow("").allow(null),
8593
- ordering_source: Joi.string().allow("").allow(null),
8762
+ ordering_source: Joi.string().allow(""),
8594
8763
  meta: Joi.object().pattern(/\S/, Joi.any()),
8595
8764
  });
8596
8765
  }
@@ -9209,7 +9378,7 @@ class OrderPlatformModel {
9209
9378
  static OrderData() {
9210
9379
  return Joi.object({
9211
9380
  ordering_channel: Joi.string().allow(""),
9212
- ordering_source: Joi.string().allow("").allow(null),
9381
+ ordering_source: Joi.string().allow(""),
9213
9382
  order_date: Joi.string().allow("").required(),
9214
9383
  created_ts: Joi.string().allow(""),
9215
9384
  tax_details: OrderPlatformModel.TaxDetails(),
@@ -9880,5 +10049,188 @@ class OrderPlatformModel {
9880
10049
  error: Joi.string().allow(""),
9881
10050
  });
9882
10051
  }
10052
+
10053
+ /**
10054
+ * Enum: OrderingSource Used By: Order
10055
+ *
10056
+ * @returns {OrderingSource}
10057
+ */
10058
+ static OrderingSource() {
10059
+ return Joi.string().valid(
10060
+ "storefront",
10061
+
10062
+ "store_os_pos",
10063
+
10064
+ "kiosk",
10065
+
10066
+ "scan_go",
10067
+
10068
+ "smart_trolley",
10069
+
10070
+ "gofynd",
10071
+
10072
+ "uniket",
10073
+
10074
+ "marketplace",
10075
+
10076
+ "social_commerce",
10077
+
10078
+ "ondc",
10079
+
10080
+ "nexus",
10081
+
10082
+ "nykaa_fashion",
10083
+
10084
+ "etsy",
10085
+
10086
+ "vuivui",
10087
+
10088
+ "zilingo",
10089
+
10090
+ "firstcry",
10091
+
10092
+ "bukalapak",
10093
+
10094
+ "myntra_ppmp",
10095
+
10096
+ "lazada",
10097
+
10098
+ "tiktok",
10099
+
10100
+ "sfcc",
10101
+
10102
+ "debenhams",
10103
+
10104
+ "prestomall",
10105
+
10106
+ "meesho",
10107
+
10108
+ "amazon_vdf",
10109
+
10110
+ "bigcommerce",
10111
+
10112
+ "sendo",
10113
+
10114
+ "storehippo",
10115
+
10116
+ "cdiscount",
10117
+
10118
+ "nykaa",
10119
+
10120
+ "trendyol",
10121
+
10122
+ "weloveshopping",
10123
+
10124
+ "jollee",
10125
+
10126
+ "wish",
10127
+
10128
+ "tiki",
10129
+
10130
+ "central_online",
10131
+
10132
+ "q10",
10133
+
10134
+ "cred",
10135
+
10136
+ "walmart",
10137
+
10138
+ "snapdeal",
10139
+
10140
+ "flipkart",
10141
+
10142
+ "blibli",
10143
+
10144
+ "ajio_jit",
10145
+
10146
+ "pharmeasy",
10147
+
10148
+ "ezmall",
10149
+
10150
+ "adobe_commerce",
10151
+
10152
+ "kartmax",
10153
+
10154
+ "shopee",
10155
+
10156
+ "zalora",
10157
+
10158
+ "prestashop",
10159
+
10160
+ "smytten",
10161
+
10162
+ "amazon_sc",
10163
+
10164
+ "urbanpiper",
10165
+
10166
+ "flipkart_quick",
10167
+
10168
+ "woocommerce",
10169
+
10170
+ "zivame",
10171
+
10172
+ "lelong",
10173
+
10174
+ "facebook",
10175
+
10176
+ "jiomart",
10177
+
10178
+ "gmc",
10179
+
10180
+ "robins",
10181
+
10182
+ "akulaku",
10183
+
10184
+ "noon",
10185
+
10186
+ "tatacliq",
10187
+
10188
+ "kartrocket",
10189
+
10190
+ "inorbit",
10191
+
10192
+ "ajio_business",
10193
+
10194
+ "swiggy",
10195
+
10196
+ "asos",
10197
+
10198
+ "tokopedia",
10199
+
10200
+ "limeroad",
10201
+
10202
+ "myntra_omni",
10203
+
10204
+ "spoyl",
10205
+
10206
+ "amazon_mlf",
10207
+
10208
+ "fulfilled_by_lazada",
10209
+
10210
+ "ebay",
10211
+
10212
+ "jd",
10213
+
10214
+ "amazon_pharmacy",
10215
+
10216
+ "ajio_vms",
10217
+
10218
+ "daraz",
10219
+
10220
+ "oker",
10221
+
10222
+ "flipkart_b2b",
10223
+
10224
+ "amazon_mlf_ss",
10225
+
10226
+ "woovly",
10227
+
10228
+ "tata1mg",
10229
+
10230
+ "zomato",
10231
+
10232
+ "shopify"
10233
+ );
10234
+ }
9883
10235
  }
9884
10236
  module.exports = OrderPlatformModel;
@@ -33,8 +33,8 @@ export = OrderPlatformValidator;
33
33
  */
34
34
  /**
35
35
  * @typedef CreateOrderParam
36
- * @property {string} [xOrderingSource] - To uniquely identify the source
37
- * through which order has been placed.
36
+ * @property {OrderPlatformModel.OrderingSource} [xOrderingSource] - To uniquely
37
+ * identify the source through which order has been placed.
38
38
  * @property {OrderPlatformModel.CreateOrderAPI} body
39
39
  */
40
40
  /**
@@ -89,8 +89,8 @@ export = OrderPlatformValidator;
89
89
  * @property {string} [orderingChannel] - The specific channel through which
90
90
  * your order was placed. This field will be phased out after version 2.4.0.
91
91
  * Please use ordering_source instead to ensure accurate order tracking and processing.
92
- * @property {string} [orderingSource] - To uniquely identify the source through
93
- * which order has been placed.
92
+ * @property {OrderPlatformModel.OrderingSource} [orderingSource] - To uniquely
93
+ * identify the source through which order has been placed.
94
94
  * @property {string} status - The status key indicates the current status for
95
95
  * which the API will provide a list of possible next state transitions.
96
96
  */
@@ -384,8 +384,8 @@ export = OrderPlatformValidator;
384
384
  * @typedef GetStateManagerConfigParam
385
385
  * @property {string} [appId] - The unique identifier of the application.
386
386
  * @property {string} [orderingChannel] - The channel through which orders are placed.
387
- * @property {string} [orderingSource] - To uniquely identify the source through
388
- * which order has been placed.
387
+ * @property {OrderPlatformModel.OrderingSource} [orderingSource] - To uniquely
388
+ * identify the source through which order has been placed.
389
389
  * @property {string} [entity] - The entity for which the configuration is applied.
390
390
  */
391
391
  /** @typedef GetStateTransitionMapParam */
@@ -637,10 +637,10 @@ type CreateChannelConfigParam = {
637
637
  };
638
638
  type CreateOrderParam = {
639
639
  /**
640
- * - To uniquely identify the source
641
- * through which order has been placed.
640
+ * - To uniquely
641
+ * identify the source through which order has been placed.
642
642
  */
643
- xOrderingSource?: string;
643
+ xOrderingSource?: OrderPlatformModel.OrderingSource;
644
644
  body: OrderPlatformModel.CreateOrderAPI;
645
645
  };
646
646
  type DispatchManifestsParam = {
@@ -712,10 +712,10 @@ type GetAllowedStateTransitionParam = {
712
712
  */
713
713
  orderingChannel?: string;
714
714
  /**
715
- * - To uniquely identify the source through
716
- * which order has been placed.
715
+ * - To uniquely
716
+ * identify the source through which order has been placed.
717
717
  */
718
- orderingSource?: string;
718
+ orderingSource?: OrderPlatformModel.OrderingSource;
719
719
  /**
720
720
  * - The status key indicates the current status for
721
721
  * which the API will provide a list of possible next state transitions.
@@ -1403,10 +1403,10 @@ type GetStateManagerConfigParam = {
1403
1403
  */
1404
1404
  orderingChannel?: string;
1405
1405
  /**
1406
- * - To uniquely identify the source through
1407
- * which order has been placed.
1406
+ * - To uniquely
1407
+ * identify the source through which order has been placed.
1408
1408
  */
1409
- orderingSource?: string;
1409
+ orderingSource?: OrderPlatformModel.OrderingSource;
1410
1410
  /**
1411
1411
  * - The entity for which the configuration is applied.
1412
1412
  */
@@ -42,8 +42,8 @@ const OrderPlatformModel = require("./OrderPlatformModel");
42
42
 
43
43
  /**
44
44
  * @typedef CreateOrderParam
45
- * @property {string} [xOrderingSource] - To uniquely identify the source
46
- * through which order has been placed.
45
+ * @property {OrderPlatformModel.OrderingSource} [xOrderingSource] - To uniquely
46
+ * identify the source through which order has been placed.
47
47
  * @property {OrderPlatformModel.CreateOrderAPI} body
48
48
  */
49
49
 
@@ -109,8 +109,8 @@ const OrderPlatformModel = require("./OrderPlatformModel");
109
109
  * @property {string} [orderingChannel] - The specific channel through which
110
110
  * your order was placed. This field will be phased out after version 2.4.0.
111
111
  * Please use ordering_source instead to ensure accurate order tracking and processing.
112
- * @property {string} [orderingSource] - To uniquely identify the source through
113
- * which order has been placed.
112
+ * @property {OrderPlatformModel.OrderingSource} [orderingSource] - To uniquely
113
+ * identify the source through which order has been placed.
114
114
  * @property {string} status - The status key indicates the current status for
115
115
  * which the API will provide a list of possible next state transitions.
116
116
  */
@@ -425,8 +425,8 @@ const OrderPlatformModel = require("./OrderPlatformModel");
425
425
  * @typedef GetStateManagerConfigParam
426
426
  * @property {string} [appId] - The unique identifier of the application.
427
427
  * @property {string} [orderingChannel] - The channel through which orders are placed.
428
- * @property {string} [orderingSource] - To uniquely identify the source through
429
- * which order has been placed.
428
+ * @property {OrderPlatformModel.OrderingSource} [orderingSource] - To uniquely
429
+ * identify the source through which order has been placed.
430
430
  * @property {string} [entity] - The entity for which the configuration is applied.
431
431
  */
432
432
 
@@ -580,7 +580,7 @@ class OrderPlatformValidator {
580
580
  /** @returns {CreateOrderParam} */
581
581
  static createOrder() {
582
582
  return Joi.object({
583
- xOrderingSource: Joi.string().allow(""),
583
+ xOrderingSource: OrderPlatformModel.OrderingSource(),
584
584
  body: OrderPlatformModel.CreateOrderAPI().required(),
585
585
  }).required();
586
586
  }
@@ -666,7 +666,7 @@ class OrderPlatformValidator {
666
666
  static getAllowedStateTransition() {
667
667
  return Joi.object({
668
668
  orderingChannel: Joi.string().allow(""),
669
- orderingSource: Joi.string().allow(""),
669
+ orderingSource: OrderPlatformModel.OrderingSource(),
670
670
  status: Joi.string().allow("").required(),
671
671
  }).required();
672
672
  }
@@ -941,7 +941,7 @@ class OrderPlatformValidator {
941
941
  return Joi.object({
942
942
  appId: Joi.string().allow(""),
943
943
  orderingChannel: Joi.string().allow(""),
944
- orderingSource: Joi.string().allow(""),
944
+ orderingSource: OrderPlatformModel.OrderingSource(),
945
945
  entity: Joi.string().allow(""),
946
946
  }).required();
947
947
  }
@@ -114,8 +114,9 @@ export = PaymentPlatformApplicationValidator;
114
114
  */
115
115
  /**
116
116
  * @typedef GetPosPaymentModeRoutesParam
117
- * @property {string} [xOrderingSource] - Optional header to identify the
118
- * ordering source used to determine\ applicable payment options for business unit.
117
+ * @property {PaymentPlatformModel.OrderingSource} [xOrderingSource] - Optional
118
+ * header to identify the ordering source used to determine\ applicable
119
+ * payment options for business unit.
119
120
  * @property {number} amount - Payable amount.
120
121
  * @property {string} [cartId] - Identifier of the cart.
121
122
  * @property {string} pincode - The PIN Code of the destination address, e.g. 400059
@@ -495,10 +496,11 @@ type GetPaymentSessionParam = {
495
496
  };
496
497
  type GetPosPaymentModeRoutesParam = {
497
498
  /**
498
- * - Optional header to identify the
499
- * ordering source used to determine\ applicable payment options for business unit.
499
+ * - Optional
500
+ * header to identify the ordering source used to determine\ applicable
501
+ * payment options for business unit.
500
502
  */
501
- xOrderingSource?: string;
503
+ xOrderingSource?: PaymentPlatformModel.OrderingSource;
502
504
  /**
503
505
  * - Payable amount.
504
506
  */
@@ -142,8 +142,9 @@ const PaymentPlatformModel = require("./PaymentPlatformModel");
142
142
 
143
143
  /**
144
144
  * @typedef GetPosPaymentModeRoutesParam
145
- * @property {string} [xOrderingSource] - Optional header to identify the
146
- * ordering source used to determine\ applicable payment options for business unit.
145
+ * @property {PaymentPlatformModel.OrderingSource} [xOrderingSource] - Optional
146
+ * header to identify the ordering source used to determine\ applicable
147
+ * payment options for business unit.
147
148
  * @property {number} amount - Payable amount.
148
149
  * @property {string} [cartId] - Identifier of the cart.
149
150
  * @property {string} pincode - The PIN Code of the destination address, e.g. 400059
@@ -492,7 +493,7 @@ class PaymentPlatformApplicationValidator {
492
493
  /** @returns {GetPosPaymentModeRoutesParam} */
493
494
  static getPosPaymentModeRoutes() {
494
495
  return Joi.object({
495
- xOrderingSource: Joi.string().allow(""),
496
+ xOrderingSource: PaymentPlatformModel.OrderingSource(),
496
497
 
497
498
  amount: Joi.number().required(),
498
499
  cartId: Joi.string().allow(""),