@gofynd/fdk-client-javascript 3.17.2 → 3.19.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.
@@ -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;
@@ -662,8 +662,6 @@ export = CommunicationPlatformModel;
662
662
  * @property {SendOtpCommsReqData} [data]
663
663
  * @property {SendOtpCommsReqSms} [sms]
664
664
  * @property {SendOtpCommsReqEmail} [email]
665
- * @property {Object} [additional_variables] - Additional data in key-value
666
- * format where values can be of any type
667
665
  */
668
666
  /**
669
667
  * @typedef SendOtpCommsRes
@@ -1710,11 +1708,6 @@ type SendOtpCommsReq = {
1710
1708
  data?: SendOtpCommsReqData;
1711
1709
  sms?: SendOtpCommsReqSms;
1712
1710
  email?: SendOtpCommsReqEmail;
1713
- /**
1714
- * - Additional data in key-value
1715
- * format where values can be of any type
1716
- */
1717
- additional_variables?: any;
1718
1711
  };
1719
1712
  /** @returns {SendOtpCommsRes} */
1720
1713
  declare function SendOtpCommsRes(): SendOtpCommsRes;
@@ -757,8 +757,6 @@ const Joi = require("joi");
757
757
  * @property {SendOtpCommsReqData} [data]
758
758
  * @property {SendOtpCommsReqSms} [sms]
759
759
  * @property {SendOtpCommsReqEmail} [email]
760
- * @property {Object} [additional_variables] - Additional data in key-value
761
- * format where values can be of any type
762
760
  */
763
761
 
764
762
  /**
@@ -1994,7 +1992,6 @@ class CommunicationPlatformModel {
1994
1992
  data: CommunicationPlatformModel.SendOtpCommsReqData(),
1995
1993
  sms: CommunicationPlatformModel.SendOtpCommsReqSms(),
1996
1994
  email: CommunicationPlatformModel.SendOtpCommsReqEmail(),
1997
- additional_variables: Joi.object().pattern(/\S/, Joi.any()),
1998
1995
  });
1999
1996
  }
2000
1997
 
@@ -85,7 +85,7 @@ declare class Order {
85
85
  * @returns {Promise<Object>} - Success response
86
86
  * @name createOrder
87
87
  * @summary: Create Order
88
- * @description: Creates an order in the OMS. Use the (<a href='https://docs.fynd.com/partners/commerce/sdk/latest/platform/application/serviceability#createShipments'>createShipments API</a>) to determine shipments before creating an order. Click <a href='https://docs.fynd.com/partners/commerce/miscellaneous/createOrder-useCases'>here</a> to get the use case details. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/createOrder/).
88
+ * @description: Creates an order in the OMS. Note: Use the Serviceability API (<a href='/commerce/sdk/latest/platform/company/serviceability#createShipments'>createShipments</a>) to determine shipments before creating an order. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/createOrder/).
89
89
  */
90
90
  createOrder({ xOrderingSource, body, xApplicationId, xExtensionId, requestHeaders }?: OrderPlatformValidator.CreateOrderParam, { responseHeaders }?: object): Promise<any>;
91
91
  /**
@@ -604,7 +604,7 @@ class Order {
604
604
  * @returns {Promise<Object>} - Success response
605
605
  * @name createOrder
606
606
  * @summary: Create Order
607
- * @description: Creates an order in the OMS. Use the (<a href='https://docs.fynd.com/partners/commerce/sdk/latest/platform/application/serviceability#createShipments'>createShipments API</a>) to determine shipments before creating an order. Click <a href='https://docs.fynd.com/partners/commerce/miscellaneous/createOrder-useCases'>here</a> to get the use case details. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/createOrder/).
607
+ * @description: Creates an order in the OMS. Note: Use the Serviceability API (<a href='/commerce/sdk/latest/platform/company/serviceability#createShipments'>createShipments</a>) to determine shipments before creating an order. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/createOrder/).
608
608
  */
609
609
  async createOrder(
610
610
  { xOrderingSource, body, xApplicationId, xExtensionId, requestHeaders } = {
@@ -2365,14 +2365,14 @@ export = OrderPlatformModel;
2365
2365
  * @typedef PostHook
2366
2366
  * @property {string} task - Name of the hook that has to be added
2367
2367
  * @property {Object} [kwargs] - Additional parameters for the hook
2368
- * @property {Filter} [filters] - Criteria to filter which hooks are applied
2368
+ * @property {Filter} [filter] - Criteria to filter which hooks are applied
2369
2369
  * based on certain conditions.
2370
2370
  */
2371
2371
  /**
2372
2372
  * @typedef PreHook
2373
2373
  * @property {string} task - Name of the hook that has to be added
2374
2374
  * @property {Object} [kwargs] - Additional parameters for the hook
2375
- * @property {Filter} [filters] - Criteria to filter which hooks are applied
2375
+ * @property {Filter} [filter] - Criteria to filter which hooks are applied
2376
2376
  * based on certain conditions.
2377
2377
  */
2378
2378
  /**
@@ -2858,8 +2858,8 @@ export = OrderPlatformModel;
2858
2858
  * offline mode. Used to enable offline-specific processing and sync behavior.
2859
2859
  * @property {LineItemSchema[]} [line_items] - A list of items included in the shipment.
2860
2860
  * @property {OrderFulfillmentTimelineSchema} [order_fulfillment_timeline]
2861
- * @property {number} [location_id] - The location ID from which this shipment
2862
- * is being fulfilled.
2861
+ * @property {number} location_id - The location ID from which this shipment is
2862
+ * being fulfilled.
2863
2863
  * @property {string} [external_location_id] - The external location ID from
2864
2864
  * which this shipment is being fulfilled.
2865
2865
  * @property {number} [return_location_id] - Overrides the article's default
@@ -10323,7 +10323,7 @@ type PostHook = {
10323
10323
  * - Criteria to filter which hooks are applied
10324
10324
  * based on certain conditions.
10325
10325
  */
10326
- filters?: Filter;
10326
+ filter?: Filter;
10327
10327
  };
10328
10328
  /** @returns {PreHook} */
10329
10329
  declare function PreHook(): PreHook;
@@ -10340,7 +10340,7 @@ type PreHook = {
10340
10340
  * - Criteria to filter which hooks are applied
10341
10341
  * based on certain conditions.
10342
10342
  */
10343
- filters?: Filter;
10343
+ filter?: Filter;
10344
10344
  };
10345
10345
  /** @returns {Config} */
10346
10346
  declare function Config(): Config;
@@ -11344,10 +11344,10 @@ type CreateOrderShipmentSchema = {
11344
11344
  line_items?: LineItemSchema[];
11345
11345
  order_fulfillment_timeline?: OrderFulfillmentTimelineSchema;
11346
11346
  /**
11347
- * - The location ID from which this shipment
11348
- * is being fulfilled.
11347
+ * - The location ID from which this shipment is
11348
+ * being fulfilled.
11349
11349
  */
11350
- location_id?: number;
11350
+ location_id: number;
11351
11351
  /**
11352
11352
  * - The external location ID from
11353
11353
  * which this shipment is being fulfilled.
@@ -2576,7 +2576,7 @@ const Joi = require("joi");
2576
2576
  * @typedef PostHook
2577
2577
  * @property {string} task - Name of the hook that has to be added
2578
2578
  * @property {Object} [kwargs] - Additional parameters for the hook
2579
- * @property {Filter} [filters] - Criteria to filter which hooks are applied
2579
+ * @property {Filter} [filter] - Criteria to filter which hooks are applied
2580
2580
  * based on certain conditions.
2581
2581
  */
2582
2582
 
@@ -2584,7 +2584,7 @@ const Joi = require("joi");
2584
2584
  * @typedef PreHook
2585
2585
  * @property {string} task - Name of the hook that has to be added
2586
2586
  * @property {Object} [kwargs] - Additional parameters for the hook
2587
- * @property {Filter} [filters] - Criteria to filter which hooks are applied
2587
+ * @property {Filter} [filter] - Criteria to filter which hooks are applied
2588
2588
  * based on certain conditions.
2589
2589
  */
2590
2590
 
@@ -3117,8 +3117,8 @@ const Joi = require("joi");
3117
3117
  * offline mode. Used to enable offline-specific processing and sync behavior.
3118
3118
  * @property {LineItemSchema[]} [line_items] - A list of items included in the shipment.
3119
3119
  * @property {OrderFulfillmentTimelineSchema} [order_fulfillment_timeline]
3120
- * @property {number} [location_id] - The location ID from which this shipment
3121
- * is being fulfilled.
3120
+ * @property {number} location_id - The location ID from which this shipment is
3121
+ * being fulfilled.
3122
3122
  * @property {string} [external_location_id] - The external location ID from
3123
3123
  * which this shipment is being fulfilled.
3124
3124
  * @property {number} [return_location_id] - Overrides the article's default
@@ -8399,7 +8399,7 @@ class OrderPlatformModel {
8399
8399
  return Joi.object({
8400
8400
  task: Joi.string().allow("").required(),
8401
8401
  kwargs: Joi.object().pattern(/\S/, Joi.any()),
8402
- filters: OrderPlatformModel.Filter(),
8402
+ filter: OrderPlatformModel.Filter(),
8403
8403
  });
8404
8404
  }
8405
8405
 
@@ -8408,7 +8408,7 @@ class OrderPlatformModel {
8408
8408
  return Joi.object({
8409
8409
  task: Joi.string().allow("").required(),
8410
8410
  kwargs: Joi.object().pattern(/\S/, Joi.any()),
8411
- filters: OrderPlatformModel.Filter(),
8411
+ filter: OrderPlatformModel.Filter(),
8412
8412
  });
8413
8413
  }
8414
8414
 
@@ -8898,7 +8898,7 @@ class OrderPlatformModel {
8898
8898
  invoice_id: Joi.string().allow(""),
8899
8899
  line_items: Joi.array().items(OrderPlatformModel.LineItemSchema()),
8900
8900
  order_fulfillment_timeline: OrderPlatformModel.OrderFulfillmentTimelineSchema(),
8901
- location_id: Joi.number(),
8901
+ location_id: Joi.number().required(),
8902
8902
  external_location_id: Joi.string().allow(""),
8903
8903
  return_location_id: Joi.number(),
8904
8904
  courier_partner_details: OrderPlatformModel.CourierPartnerDetailsSchema(),