@gofynd/fdk-client-javascript 3.18.0 → 3.20.0

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 (47) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationClient.d.ts +2 -2
  4. package/sdk/application/Cart/CartApplicationClient.js +12 -4
  5. package/sdk/application/Order/OrderApplicationClient.d.ts +11 -0
  6. package/sdk/application/Order/OrderApplicationClient.js +49 -0
  7. package/sdk/application/Payment/PaymentApplicationClient.d.ts +1 -1
  8. package/sdk/application/Payment/PaymentApplicationClient.js +2 -0
  9. package/sdk/common/utils.d.ts +1 -1
  10. package/sdk/common/utils.js +1 -0
  11. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +1 -1
  12. package/sdk/partner/Logistics/LogisticsPartnerClient.js +11 -3
  13. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +1 -0
  14. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +46 -0
  15. package/sdk/partner/Webhook/WebhookPartnerClient.js +334 -0
  16. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +222 -1
  17. package/sdk/partner/Webhook/WebhookPartnerModel.js +165 -0
  18. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +4 -0
  19. package/sdk/partner/Webhook/WebhookPartnerValidator.js +30 -0
  20. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +5 -5
  21. package/sdk/platform/Cart/CartPlatformApplicationClient.js +50 -7
  22. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +69 -10
  23. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +30 -5
  24. package/sdk/platform/Cart/CartPlatformModel.d.ts +97 -72
  25. package/sdk/platform/Cart/CartPlatformModel.js +54 -35
  26. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1 -1
  27. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1 -1
  28. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +17 -11
  29. package/sdk/platform/Catalog/CatalogPlatformClient.js +18 -12
  30. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +353 -156
  31. package/sdk/platform/Catalog/CatalogPlatformModel.js +176 -87
  32. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +40 -38
  33. package/sdk/platform/Catalog/CatalogPlatformValidator.js +22 -21
  34. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +1 -1
  35. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1 -1
  36. package/sdk/platform/Content/ContentPlatformModel.d.ts +7 -7
  37. package/sdk/platform/Content/ContentPlatformModel.js +5 -5
  38. package/sdk/platform/Order/OrderPlatformModel.d.ts +6 -6
  39. package/sdk/platform/Order/OrderPlatformModel.js +5 -5
  40. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +1 -1
  41. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +12 -3
  42. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +5 -0
  43. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +2 -0
  44. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +4 -2
  45. package/sdk/platform/User/UserPlatformApplicationClient.js +9 -5
  46. package/sdk/platform/User/UserPlatformModel.d.ts +43 -3
  47. package/sdk/platform/User/UserPlatformModel.js +27 -3
@@ -1,4 +1,72 @@
1
1
  export = WebhookPartnerModel;
2
+ /**
3
+ * @typedef ReportDownloadPayload
4
+ * @property {string} end_date - The end date and time for the report, in ISO 8601 format.
5
+ * @property {string} start_date - The start date and time for the report, in
6
+ * ISO 8601 format.
7
+ */
8
+ /**
9
+ * @typedef DownloadReportResult
10
+ * @property {string} [file_name] - The generated report file name.
11
+ */
12
+ /**
13
+ * @typedef FilterValidationPayload
14
+ * @property {Object} sample_data - Sample payload used to validate the filter logic.
15
+ * @property {FilterValidationSchema} filters
16
+ */
17
+ /**
18
+ * @typedef ReducerValidationPayload
19
+ * @property {Object} sample_data - Sample payload used to validate the reducer mapping.
20
+ * @property {Object} reducer - The reducer property allows users to customize
21
+ * the JSON structure of the webhook payload using JSONPath queries.
22
+ */
23
+ /**
24
+ * @typedef FilterReducerSave
25
+ * @property {FilterSaveSchema} [filter_configuration]
26
+ * @property {Object} [reducer_configuration] - The reducer property allows
27
+ * users to customize the JSON structure of the webhook payload using JSONPath queries.
28
+ * @property {string} event_slug - Event slug for which filter/reducer is being
29
+ * configured.
30
+ */
31
+ /**
32
+ * @typedef FilterValidationSchema
33
+ * @property {string} [query] - JSONPath expression to extract a value from
34
+ * sample payload.
35
+ * @property {string} [condition] - JavaScript condition function evaluated for
36
+ * the extracted value.
37
+ * @property {string} [logic] - Logical operator for combining nested filter conditions.
38
+ * @property {Object[]} [conditions] - Nested filter conditions evaluated with
39
+ * the selected logical operator.
40
+ */
41
+ /**
42
+ * @typedef FilterSaveSchema
43
+ * @property {string} [query] - JSONPath expression to extract a value from event payload.
44
+ * @property {string} [condition] - JavaScript condition function evaluated for
45
+ * the extracted value.
46
+ * @property {string} [logic] - Logical operator for combining nested filter conditions.
47
+ * @property {Object[]} [conditions] - Nested filter conditions evaluated with
48
+ * the selected logical operator.
49
+ */
50
+ /**
51
+ * @typedef FilterValidationResult
52
+ * @property {boolean} [success] - Indicates if the filter validation succeeded.
53
+ * @property {string} [message] - Additional details about filter validation result.
54
+ * @property {boolean} [filter_result] - Evaluated result of the filter condition.
55
+ */
56
+ /**
57
+ * @typedef ReducerValidationResult
58
+ * @property {boolean} [success] - Indicates if the reducer validation succeeded.
59
+ * @property {string} [message] - Additional details about reducer validation result.
60
+ * @property {Object} [reducer_result] - Result produced by applying reducer
61
+ * mapping on sample data.
62
+ */
63
+ /**
64
+ * @typedef FilterReducerSaveResult
65
+ * @property {boolean} [success] - Indicates if filter/reducer configuration was
66
+ * saved successfully.
67
+ * @property {string} [message] - Additional details about save operation result.
68
+ * @property {Object} [data] - Additional response payload returned by the save operation.
69
+ */
2
70
  /**
3
71
  * @typedef SubscriberUpdate
4
72
  * @property {string} [status] - Represents the status of the subscriber update operation.
@@ -323,8 +391,161 @@ export = WebhookPartnerModel;
323
391
  declare class WebhookPartnerModel {
324
392
  }
325
393
  declare namespace WebhookPartnerModel {
326
- export { SubscriberUpdate, SubscriberUpdateResult, Association, AuthMeta, BroadcasterConfig, SubscriberEventMapping, FilterSchema, EventConfigDetails, SubscriberConfigDetails, InvalidEventsPayload, InvalidEventsResult, HistoryFilters, Url, CdnObject, UploadServiceObject, HistoryAssociation, HistoryItems, HistoryResult, HistoryPayload, CancelDownloadResult, FilterReportResult, DeliveryTsResult, DeliveryTsSchema, DeliveryDetailsPayload, EventDeliveryDetailSchema, DeliveryDetailsResult, EventProcessReportObject, Page, DeliveryEventLevelSchema, ResponseTimeTs, AvgResponseTime, DeliverySummaryResult, DeliverySummarySchema, ItemSchema };
394
+ export { ReportDownloadPayload, DownloadReportResult, FilterValidationPayload, ReducerValidationPayload, FilterReducerSave, FilterValidationSchema, FilterSaveSchema, FilterValidationResult, ReducerValidationResult, FilterReducerSaveResult, SubscriberUpdate, SubscriberUpdateResult, Association, AuthMeta, BroadcasterConfig, SubscriberEventMapping, FilterSchema, EventConfigDetails, SubscriberConfigDetails, InvalidEventsPayload, InvalidEventsResult, HistoryFilters, Url, CdnObject, UploadServiceObject, HistoryAssociation, HistoryItems, HistoryResult, HistoryPayload, CancelDownloadResult, FilterReportResult, DeliveryTsResult, DeliveryTsSchema, DeliveryDetailsPayload, EventDeliveryDetailSchema, DeliveryDetailsResult, EventProcessReportObject, Page, DeliveryEventLevelSchema, ResponseTimeTs, AvgResponseTime, DeliverySummaryResult, DeliverySummarySchema, ItemSchema };
327
395
  }
396
+ /** @returns {ReportDownloadPayload} */
397
+ declare function ReportDownloadPayload(): ReportDownloadPayload;
398
+ type ReportDownloadPayload = {
399
+ /**
400
+ * - The end date and time for the report, in ISO 8601 format.
401
+ */
402
+ end_date: string;
403
+ /**
404
+ * - The start date and time for the report, in
405
+ * ISO 8601 format.
406
+ */
407
+ start_date: string;
408
+ };
409
+ /** @returns {DownloadReportResult} */
410
+ declare function DownloadReportResult(): DownloadReportResult;
411
+ type DownloadReportResult = {
412
+ /**
413
+ * - The generated report file name.
414
+ */
415
+ file_name?: string;
416
+ };
417
+ /** @returns {FilterValidationPayload} */
418
+ declare function FilterValidationPayload(): FilterValidationPayload;
419
+ type FilterValidationPayload = {
420
+ /**
421
+ * - Sample payload used to validate the filter logic.
422
+ */
423
+ sample_data: any;
424
+ filters: FilterValidationSchema;
425
+ };
426
+ /** @returns {ReducerValidationPayload} */
427
+ declare function ReducerValidationPayload(): ReducerValidationPayload;
428
+ type ReducerValidationPayload = {
429
+ /**
430
+ * - Sample payload used to validate the reducer mapping.
431
+ */
432
+ sample_data: any;
433
+ /**
434
+ * - The reducer property allows users to customize
435
+ * the JSON structure of the webhook payload using JSONPath queries.
436
+ */
437
+ reducer: any;
438
+ };
439
+ /** @returns {FilterReducerSave} */
440
+ declare function FilterReducerSave(): FilterReducerSave;
441
+ type FilterReducerSave = {
442
+ filter_configuration?: FilterSaveSchema;
443
+ /**
444
+ * - The reducer property allows
445
+ * users to customize the JSON structure of the webhook payload using JSONPath queries.
446
+ */
447
+ reducer_configuration?: any;
448
+ /**
449
+ * - Event slug for which filter/reducer is being
450
+ * configured.
451
+ */
452
+ event_slug: string;
453
+ };
454
+ /** @returns {FilterValidationSchema} */
455
+ declare function FilterValidationSchema(): FilterValidationSchema;
456
+ type FilterValidationSchema = {
457
+ /**
458
+ * - JSONPath expression to extract a value from
459
+ * sample payload.
460
+ */
461
+ query?: string;
462
+ /**
463
+ * - JavaScript condition function evaluated for
464
+ * the extracted value.
465
+ */
466
+ condition?: string;
467
+ /**
468
+ * - Logical operator for combining nested filter conditions.
469
+ */
470
+ logic?: string;
471
+ /**
472
+ * - Nested filter conditions evaluated with
473
+ * the selected logical operator.
474
+ */
475
+ conditions?: any[];
476
+ };
477
+ /** @returns {FilterSaveSchema} */
478
+ declare function FilterSaveSchema(): FilterSaveSchema;
479
+ type FilterSaveSchema = {
480
+ /**
481
+ * - JSONPath expression to extract a value from event payload.
482
+ */
483
+ query?: string;
484
+ /**
485
+ * - JavaScript condition function evaluated for
486
+ * the extracted value.
487
+ */
488
+ condition?: string;
489
+ /**
490
+ * - Logical operator for combining nested filter conditions.
491
+ */
492
+ logic?: string;
493
+ /**
494
+ * - Nested filter conditions evaluated with
495
+ * the selected logical operator.
496
+ */
497
+ conditions?: any[];
498
+ };
499
+ /** @returns {FilterValidationResult} */
500
+ declare function FilterValidationResult(): FilterValidationResult;
501
+ type FilterValidationResult = {
502
+ /**
503
+ * - Indicates if the filter validation succeeded.
504
+ */
505
+ success?: boolean;
506
+ /**
507
+ * - Additional details about filter validation result.
508
+ */
509
+ message?: string;
510
+ /**
511
+ * - Evaluated result of the filter condition.
512
+ */
513
+ filter_result?: boolean;
514
+ };
515
+ /** @returns {ReducerValidationResult} */
516
+ declare function ReducerValidationResult(): ReducerValidationResult;
517
+ type ReducerValidationResult = {
518
+ /**
519
+ * - Indicates if the reducer validation succeeded.
520
+ */
521
+ success?: boolean;
522
+ /**
523
+ * - Additional details about reducer validation result.
524
+ */
525
+ message?: string;
526
+ /**
527
+ * - Result produced by applying reducer
528
+ * mapping on sample data.
529
+ */
530
+ reducer_result?: any;
531
+ };
532
+ /** @returns {FilterReducerSaveResult} */
533
+ declare function FilterReducerSaveResult(): FilterReducerSaveResult;
534
+ type FilterReducerSaveResult = {
535
+ /**
536
+ * - Indicates if filter/reducer configuration was
537
+ * saved successfully.
538
+ */
539
+ success?: boolean;
540
+ /**
541
+ * - Additional details about save operation result.
542
+ */
543
+ message?: string;
544
+ /**
545
+ * - Additional response payload returned by the save operation.
546
+ */
547
+ data?: any;
548
+ };
328
549
  /** @returns {SubscriberUpdate} */
329
550
  declare function SubscriberUpdate(): SubscriberUpdate;
330
551
  type SubscriberUpdate = {
@@ -1,5 +1,83 @@
1
1
  const Joi = require("joi");
2
2
 
3
+ /**
4
+ * @typedef ReportDownloadPayload
5
+ * @property {string} end_date - The end date and time for the report, in ISO 8601 format.
6
+ * @property {string} start_date - The start date and time for the report, in
7
+ * ISO 8601 format.
8
+ */
9
+
10
+ /**
11
+ * @typedef DownloadReportResult
12
+ * @property {string} [file_name] - The generated report file name.
13
+ */
14
+
15
+ /**
16
+ * @typedef FilterValidationPayload
17
+ * @property {Object} sample_data - Sample payload used to validate the filter logic.
18
+ * @property {FilterValidationSchema} filters
19
+ */
20
+
21
+ /**
22
+ * @typedef ReducerValidationPayload
23
+ * @property {Object} sample_data - Sample payload used to validate the reducer mapping.
24
+ * @property {Object} reducer - The reducer property allows users to customize
25
+ * the JSON structure of the webhook payload using JSONPath queries.
26
+ */
27
+
28
+ /**
29
+ * @typedef FilterReducerSave
30
+ * @property {FilterSaveSchema} [filter_configuration]
31
+ * @property {Object} [reducer_configuration] - The reducer property allows
32
+ * users to customize the JSON structure of the webhook payload using JSONPath queries.
33
+ * @property {string} event_slug - Event slug for which filter/reducer is being
34
+ * configured.
35
+ */
36
+
37
+ /**
38
+ * @typedef FilterValidationSchema
39
+ * @property {string} [query] - JSONPath expression to extract a value from
40
+ * sample payload.
41
+ * @property {string} [condition] - JavaScript condition function evaluated for
42
+ * the extracted value.
43
+ * @property {string} [logic] - Logical operator for combining nested filter conditions.
44
+ * @property {Object[]} [conditions] - Nested filter conditions evaluated with
45
+ * the selected logical operator.
46
+ */
47
+
48
+ /**
49
+ * @typedef FilterSaveSchema
50
+ * @property {string} [query] - JSONPath expression to extract a value from event payload.
51
+ * @property {string} [condition] - JavaScript condition function evaluated for
52
+ * the extracted value.
53
+ * @property {string} [logic] - Logical operator for combining nested filter conditions.
54
+ * @property {Object[]} [conditions] - Nested filter conditions evaluated with
55
+ * the selected logical operator.
56
+ */
57
+
58
+ /**
59
+ * @typedef FilterValidationResult
60
+ * @property {boolean} [success] - Indicates if the filter validation succeeded.
61
+ * @property {string} [message] - Additional details about filter validation result.
62
+ * @property {boolean} [filter_result] - Evaluated result of the filter condition.
63
+ */
64
+
65
+ /**
66
+ * @typedef ReducerValidationResult
67
+ * @property {boolean} [success] - Indicates if the reducer validation succeeded.
68
+ * @property {string} [message] - Additional details about reducer validation result.
69
+ * @property {Object} [reducer_result] - Result produced by applying reducer
70
+ * mapping on sample data.
71
+ */
72
+
73
+ /**
74
+ * @typedef FilterReducerSaveResult
75
+ * @property {boolean} [success] - Indicates if filter/reducer configuration was
76
+ * saved successfully.
77
+ * @property {string} [message] - Additional details about save operation result.
78
+ * @property {Object} [data] - Additional response payload returned by the save operation.
79
+ */
80
+
3
81
  /**
4
82
  * @typedef SubscriberUpdate
5
83
  * @property {string} [status] - Represents the status of the subscriber update operation.
@@ -356,6 +434,93 @@ const Joi = require("joi");
356
434
  */
357
435
 
358
436
  class WebhookPartnerModel {
437
+ /** @returns {ReportDownloadPayload} */
438
+ static ReportDownloadPayload() {
439
+ return Joi.object({
440
+ end_date: Joi.string().allow("").required(),
441
+ start_date: Joi.string().allow("").required(),
442
+ });
443
+ }
444
+
445
+ /** @returns {DownloadReportResult} */
446
+ static DownloadReportResult() {
447
+ return Joi.object({
448
+ file_name: Joi.string().allow(""),
449
+ });
450
+ }
451
+
452
+ /** @returns {FilterValidationPayload} */
453
+ static FilterValidationPayload() {
454
+ return Joi.object({
455
+ sample_data: Joi.object().pattern(/\S/, Joi.any()).required(),
456
+ filters: WebhookPartnerModel.FilterValidationSchema().required(),
457
+ });
458
+ }
459
+
460
+ /** @returns {ReducerValidationPayload} */
461
+ static ReducerValidationPayload() {
462
+ return Joi.object({
463
+ sample_data: Joi.object().pattern(/\S/, Joi.any()).required(),
464
+ reducer: Joi.object().pattern(/\S/, Joi.any()).required(),
465
+ });
466
+ }
467
+
468
+ /** @returns {FilterReducerSave} */
469
+ static FilterReducerSave() {
470
+ return Joi.object({
471
+ filter_configuration: WebhookPartnerModel.FilterSaveSchema(),
472
+ reducer_configuration: Joi.object().pattern(/\S/, Joi.any()),
473
+ event_slug: Joi.string().allow("").required(),
474
+ });
475
+ }
476
+
477
+ /** @returns {FilterValidationSchema} */
478
+ static FilterValidationSchema() {
479
+ return Joi.object({
480
+ query: Joi.string().allow(""),
481
+ condition: Joi.string().allow(""),
482
+ logic: Joi.string().allow(""),
483
+ conditions: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())),
484
+ });
485
+ }
486
+
487
+ /** @returns {FilterSaveSchema} */
488
+ static FilterSaveSchema() {
489
+ return Joi.object({
490
+ query: Joi.string().allow(""),
491
+ condition: Joi.string().allow(""),
492
+ logic: Joi.string().allow(""),
493
+ conditions: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())),
494
+ });
495
+ }
496
+
497
+ /** @returns {FilterValidationResult} */
498
+ static FilterValidationResult() {
499
+ return Joi.object({
500
+ success: Joi.boolean(),
501
+ message: Joi.string().allow(""),
502
+ filter_result: Joi.boolean(),
503
+ });
504
+ }
505
+
506
+ /** @returns {ReducerValidationResult} */
507
+ static ReducerValidationResult() {
508
+ return Joi.object({
509
+ success: Joi.boolean(),
510
+ message: Joi.string().allow(""),
511
+ reducer_result: Joi.object().pattern(/\S/, Joi.any()),
512
+ });
513
+ }
514
+
515
+ /** @returns {FilterReducerSaveResult} */
516
+ static FilterReducerSaveResult() {
517
+ return Joi.object({
518
+ success: Joi.boolean(),
519
+ message: Joi.string().allow(""),
520
+ data: Joi.object().pattern(/\S/, Joi.any()),
521
+ });
522
+ }
523
+
359
524
  /** @returns {SubscriberUpdate} */
360
525
  static SubscriberUpdate() {
361
526
  return Joi.object({
@@ -5,9 +5,13 @@ declare class WebhookValidator {
5
5
  static getDeliveryDetailInsights(): any;
6
6
  static fetchDeliveryTs(): any;
7
7
  static fetchReportFilters(): any;
8
+ static downloadDeliveryReport(): any;
8
9
  static cancelReportDownload(): any;
9
10
  static getHistoricalReports(): any;
10
11
  static getInvalidEventList(): any;
11
12
  static fetchSubscribers(): any;
12
13
  static updateSubscriber(): any;
14
+ static validateFilterConfiguration(): any;
15
+ static validateReducerConfiguration(): any;
16
+ static saveFilterReducerConfiguration(): any;
13
17
  }
@@ -43,6 +43,13 @@ class WebhookValidator {
43
43
  }).required();
44
44
  }
45
45
 
46
+ static downloadDeliveryReport() {
47
+ return Joi.object({
48
+ extensionId: Joi.string().allow("").required(),
49
+ body: WebhookModel.ReportDownloadPayload().required(),
50
+ }).required();
51
+ }
52
+
46
53
  static cancelReportDownload() {
47
54
  return Joi.object({
48
55
  extensionId: Joi.string().allow("").required(),
@@ -77,6 +84,29 @@ class WebhookValidator {
77
84
  body: WebhookModel.SubscriberUpdate().required(),
78
85
  }).required();
79
86
  }
87
+
88
+ static validateFilterConfiguration() {
89
+ return Joi.object({
90
+ extensionId: Joi.string().allow("").required(),
91
+ body: WebhookModel.FilterValidationPayload().required(),
92
+ }).required();
93
+ }
94
+
95
+ static validateReducerConfiguration() {
96
+ return Joi.object({
97
+ extensionId: Joi.string().allow("").required(),
98
+ body: WebhookModel.ReducerValidationPayload().required(),
99
+ }).required();
100
+ }
101
+
102
+ static saveFilterReducerConfiguration() {
103
+ return Joi.object({
104
+ extensionId: Joi.string().allow("").required(),
105
+ companyId: Joi.number().required(),
106
+ subscriberId: Joi.number().required(),
107
+ body: WebhookModel.FilterReducerSave().required(),
108
+ }).required();
109
+ }
80
110
  }
81
111
 
82
112
  module.exports = WebhookValidator;
@@ -72,10 +72,10 @@ declare class Cart {
72
72
  * @param {import("../PlatformAPIClient").Options} - Options
73
73
  * @returns {Promise<CartPlatformModel.OpenApiCheckoutResult>} - Success response
74
74
  * @name checkoutCart
75
- * @summary: Checkout cart
75
+ * @summary: Headless Checkout
76
76
  * @description: The checkout cart initiates the order creation process based on the selected address and payment method. It revalidates the cart details to ensure safe and seamless order placement. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/checkoutCart/).
77
77
  */
78
- checkoutCart({ body, xOrderingSource, xAnonymousCart, requestHeaders }?: CartPlatformApplicationValidator.CheckoutCartParam, { responseHeaders }?: object): Promise<CartPlatformModel.OpenApiCheckoutResult>;
78
+ checkoutCart({ body, xOrderingSource, xAnonymousCart, xLocationDetail, xCurrencyCode, requestHeaders, }?: CartPlatformApplicationValidator.CheckoutCartParam, { responseHeaders }?: object): Promise<CartPlatformModel.OpenApiCheckoutResult>;
79
79
  /**
80
80
  * @param {CartPlatformApplicationValidator.CreateCartMetaConfigParam} arg
81
81
  * - Arg object
@@ -169,7 +169,7 @@ declare class Cart {
169
169
  * @summary: Get and validate cart items
170
170
  * @description: Retrieve cart details for a provided list of cart items and validate its contents. This ensures accuracy and completeness in cart information, including item quantities, prices, discounts, and applicable taxes. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/fetchAndvalidateCartItems/).
171
171
  */
172
- fetchAndvalidateCartItems({ body, xOrderingSource, requestHeaders }?: CartPlatformApplicationValidator.FetchAndvalidateCartItemsParam, { responseHeaders }?: object): Promise<CartPlatformModel.OpenapiCartDetailsResult>;
172
+ fetchAndvalidateCartItems({ body, xOrderingSource, xLocationDetail, xCurrencyCode, requestHeaders, }?: CartPlatformApplicationValidator.FetchAndvalidateCartItemsParam, { responseHeaders }?: object): Promise<CartPlatformModel.OpenapiCartDetailsResult>;
173
173
  /**
174
174
  * @param {CartPlatformApplicationValidator.FetchCartMetaConfigParam} arg - Arg object
175
175
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -466,7 +466,7 @@ declare class Cart {
466
466
  * @summary: Update cart checkout
467
467
  * @description: Overrides the cart's checkout process with a new provided cart items. It provides flexibility in customizing checkout flows to meet specific business requirements, enhancing the user experience and optimizing order processing workflows. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/overrideCart/).
468
468
  */
469
- overrideCart({ body, xOrderingSource, requestHeaders }?: CartPlatformApplicationValidator.OverrideCartParam, { responseHeaders }?: object): Promise<CartPlatformModel.OverrideCheckoutResult>;
469
+ overrideCart({ body, xOrderingSource, xLocationDetail, xCurrencyCode, requestHeaders, }?: CartPlatformApplicationValidator.OverrideCartParam, { responseHeaders }?: object): Promise<CartPlatformModel.OverrideCheckoutResult>;
470
470
  /**
471
471
  * @param {CartPlatformApplicationValidator.PlatformAddItemsParam} arg - Arg object
472
472
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -500,7 +500,7 @@ declare class Cart {
500
500
  * @summary: Checkout cart
501
501
  * @description: The checkout cart initiates the order creation process based on the items in the user’s cart, their selected address, and chosen payment methods. It also supports multiple payment method options and revalidates the cart details to ensure a secure and seamless order placement. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/platformCheckoutCartV2/).
502
502
  */
503
- platformCheckoutCartV2({ body, xOrderingSource, id, requestHeaders }?: CartPlatformApplicationValidator.PlatformCheckoutCartV2Param, { responseHeaders }?: object): Promise<CartPlatformModel.CartCheckoutDetails>;
503
+ platformCheckoutCartV2({ body, xOrderingSource, xAnonymousCart, xLocationDetail, xCurrencyCode, id, requestHeaders, }?: CartPlatformApplicationValidator.PlatformCheckoutCartV2Param, { responseHeaders }?: object): Promise<CartPlatformModel.CartCheckoutDetails>;
504
504
  /**
505
505
  * @param {CartPlatformApplicationValidator.PlatformUpdateCartParam} arg - Arg object
506
506
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -544,13 +544,18 @@ class Cart {
544
544
  * @param {import("../PlatformAPIClient").Options} - Options
545
545
  * @returns {Promise<CartPlatformModel.OpenApiCheckoutResult>} - Success response
546
546
  * @name checkoutCart
547
- * @summary: Checkout cart
547
+ * @summary: Headless Checkout
548
548
  * @description: The checkout cart initiates the order creation process based on the selected address and payment method. It revalidates the cart details to ensure safe and seamless order placement. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/checkoutCart/).
549
549
  */
550
550
  async checkoutCart(
551
- { body, xOrderingSource, xAnonymousCart, requestHeaders } = {
552
- requestHeaders: {},
553
- },
551
+ {
552
+ body,
553
+ xOrderingSource,
554
+ xAnonymousCart,
555
+ xLocationDetail,
556
+ xCurrencyCode,
557
+ requestHeaders,
558
+ } = { requestHeaders: {} },
554
559
  { responseHeaders } = { responseHeaders: false }
555
560
  ) {
556
561
  const { error } = CartPlatformApplicationValidator.checkoutCart().validate(
@@ -558,6 +563,8 @@ class Cart {
558
563
  body,
559
564
  xOrderingSource,
560
565
  xAnonymousCart,
566
+ xLocationDetail,
567
+ xCurrencyCode,
561
568
  },
562
569
  { abortEarly: false, allowUnknown: true }
563
570
  );
@@ -573,6 +580,8 @@ class Cart {
573
580
  body,
574
581
  xOrderingSource,
575
582
  xAnonymousCart,
583
+ xLocationDetail,
584
+ xCurrencyCode,
576
585
  },
577
586
  { abortEarly: false, allowUnknown: false }
578
587
  );
@@ -1260,7 +1269,13 @@ class Cart {
1260
1269
  * @description: Retrieve cart details for a provided list of cart items and validate its contents. This ensures accuracy and completeness in cart information, including item quantities, prices, discounts, and applicable taxes. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/fetchAndvalidateCartItems/).
1261
1270
  */
1262
1271
  async fetchAndvalidateCartItems(
1263
- { body, xOrderingSource, requestHeaders } = { requestHeaders: {} },
1272
+ {
1273
+ body,
1274
+ xOrderingSource,
1275
+ xLocationDetail,
1276
+ xCurrencyCode,
1277
+ requestHeaders,
1278
+ } = { requestHeaders: {} },
1264
1279
  { responseHeaders } = { responseHeaders: false }
1265
1280
  ) {
1266
1281
  const {
@@ -1269,6 +1284,8 @@ class Cart {
1269
1284
  {
1270
1285
  body,
1271
1286
  xOrderingSource,
1287
+ xLocationDetail,
1288
+ xCurrencyCode,
1272
1289
  },
1273
1290
  { abortEarly: false, allowUnknown: true }
1274
1291
  );
@@ -1283,6 +1300,8 @@ class Cart {
1283
1300
  {
1284
1301
  body,
1285
1302
  xOrderingSource,
1303
+ xLocationDetail,
1304
+ xCurrencyCode,
1286
1305
  },
1287
1306
  { abortEarly: false, allowUnknown: false }
1288
1307
  );
@@ -3867,13 +3886,21 @@ class Cart {
3867
3886
  * @description: Overrides the cart's checkout process with a new provided cart items. It provides flexibility in customizing checkout flows to meet specific business requirements, enhancing the user experience and optimizing order processing workflows. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/overrideCart/).
3868
3887
  */
3869
3888
  async overrideCart(
3870
- { body, xOrderingSource, requestHeaders } = { requestHeaders: {} },
3889
+ {
3890
+ body,
3891
+ xOrderingSource,
3892
+ xLocationDetail,
3893
+ xCurrencyCode,
3894
+ requestHeaders,
3895
+ } = { requestHeaders: {} },
3871
3896
  { responseHeaders } = { responseHeaders: false }
3872
3897
  ) {
3873
3898
  const { error } = CartPlatformApplicationValidator.overrideCart().validate(
3874
3899
  {
3875
3900
  body,
3876
3901
  xOrderingSource,
3902
+ xLocationDetail,
3903
+ xCurrencyCode,
3877
3904
  },
3878
3905
  { abortEarly: false, allowUnknown: true }
3879
3906
  );
@@ -3888,6 +3915,8 @@ class Cart {
3888
3915
  {
3889
3916
  body,
3890
3917
  xOrderingSource,
3918
+ xLocationDetail,
3919
+ xCurrencyCode,
3891
3920
  },
3892
3921
  { abortEarly: false, allowUnknown: false }
3893
3922
  );
@@ -4146,7 +4175,15 @@ class Cart {
4146
4175
  * @description: The checkout cart initiates the order creation process based on the items in the user’s cart, their selected address, and chosen payment methods. It also supports multiple payment method options and revalidates the cart details to ensure a secure and seamless order placement. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/platformCheckoutCartV2/).
4147
4176
  */
4148
4177
  async platformCheckoutCartV2(
4149
- { body, xOrderingSource, id, requestHeaders } = { requestHeaders: {} },
4178
+ {
4179
+ body,
4180
+ xOrderingSource,
4181
+ xAnonymousCart,
4182
+ xLocationDetail,
4183
+ xCurrencyCode,
4184
+ id,
4185
+ requestHeaders,
4186
+ } = { requestHeaders: {} },
4150
4187
  { responseHeaders } = { responseHeaders: false }
4151
4188
  ) {
4152
4189
  const {
@@ -4155,6 +4192,9 @@ class Cart {
4155
4192
  {
4156
4193
  body,
4157
4194
  xOrderingSource,
4195
+ xAnonymousCart,
4196
+ xLocationDetail,
4197
+ xCurrencyCode,
4158
4198
  id,
4159
4199
  },
4160
4200
  { abortEarly: false, allowUnknown: true }
@@ -4170,6 +4210,9 @@ class Cart {
4170
4210
  {
4171
4211
  body,
4172
4212
  xOrderingSource,
4213
+ xAnonymousCart,
4214
+ xLocationDetail,
4215
+ xCurrencyCode,
4173
4216
  id,
4174
4217
  },
4175
4218
  { abortEarly: false, allowUnknown: false }