@gofynd/fdk-client-javascript 1.4.6 → 1.4.7

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 (66) hide show
  1. package/README.md +1 -1
  2. package/package.json +2 -2
  3. package/sdk/application/ApplicationClient.d.ts +2 -0
  4. package/sdk/application/ApplicationClient.js +2 -0
  5. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +6 -0
  6. package/sdk/application/Catalog/CatalogApplicationModel.js +6 -0
  7. package/sdk/application/Content/ContentApplicationModel.d.ts +2 -0
  8. package/sdk/application/Content/ContentApplicationModel.js +2 -0
  9. package/sdk/application/Order/OrderApplicationModel.d.ts +70 -9
  10. package/sdk/application/Order/OrderApplicationModel.js +43 -7
  11. package/sdk/application/Payment/PaymentApplicationModel.d.ts +18 -18
  12. package/sdk/application/Payment/PaymentApplicationModel.js +18 -18
  13. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +22 -0
  14. package/sdk/application/Webhook/WebhookApplicationClient.js +115 -0
  15. package/sdk/application/Webhook/WebhookApplicationModel.d.ts +37 -0
  16. package/sdk/application/Webhook/WebhookApplicationModel.js +46 -0
  17. package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +16 -0
  18. package/sdk/application/Webhook/WebhookApplicationValidator.js +19 -0
  19. package/sdk/application/index.d.ts +1 -0
  20. package/sdk/application/index.js +2 -0
  21. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +2 -2
  22. package/sdk/partner/Webhook/WebhookPartnerClient.js +2 -2
  23. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +23 -19
  24. package/sdk/partner/Webhook/WebhookPartnerModel.js +19 -22
  25. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +43 -0
  26. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +257 -0
  27. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +39 -0
  28. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +45 -0
  29. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +60 -0
  30. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +57 -0
  31. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +10 -0
  32. package/sdk/platform/Cart/CartPlatformApplicationClient.js +80 -0
  33. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +13 -1
  34. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +12 -0
  35. package/sdk/platform/Cart/CartPlatformModel.d.ts +2 -0
  36. package/sdk/platform/Cart/CartPlatformModel.js +2 -0
  37. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +9 -5
  38. package/sdk/platform/Catalog/CatalogPlatformClient.js +19 -12
  39. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +118 -17
  40. package/sdk/platform/Catalog/CatalogPlatformModel.js +137 -15
  41. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +12 -7
  42. package/sdk/platform/Catalog/CatalogPlatformValidator.js +7 -5
  43. package/sdk/platform/Content/ContentPlatformModel.d.ts +2 -0
  44. package/sdk/platform/Content/ContentPlatformModel.js +2 -0
  45. package/sdk/platform/Order/OrderPlatformClient.d.ts +11 -1
  46. package/sdk/platform/Order/OrderPlatformClient.js +82 -5
  47. package/sdk/platform/Order/OrderPlatformModel.d.ts +163 -15
  48. package/sdk/platform/Order/OrderPlatformModel.js +92 -14
  49. package/sdk/platform/Order/OrderPlatformValidator.d.ts +58 -17
  50. package/sdk/platform/Order/OrderPlatformValidator.js +28 -16
  51. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2 -2
  52. package/sdk/platform/Payment/PaymentPlatformModel.js +2 -2
  53. package/sdk/platform/PlatformApplicationClient.d.ts +2 -0
  54. package/sdk/platform/PlatformApplicationClient.js +4 -0
  55. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +24 -0
  56. package/sdk/platform/Webhook/WebhookPlatformClient.js +164 -0
  57. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +71 -18
  58. package/sdk/platform/Webhook/WebhookPlatformModel.js +75 -22
  59. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +19 -1
  60. package/sdk/platform/Webhook/WebhookPlatformValidator.js +24 -0
  61. package/sdk/platform/index.d.ts +1 -0
  62. package/sdk/platform/index.js +2 -0
  63. package/sdk/public/Webhook/WebhookPublicClient.d.ts +2 -2
  64. package/sdk/public/Webhook/WebhookPublicClient.js +2 -2
  65. package/sdk/public/Webhook/WebhookPublicModel.d.ts +2 -0
  66. package/sdk/public/Webhook/WebhookPublicModel.js +2 -0
@@ -107,6 +107,14 @@ export = WebhookPlatformModel;
107
107
  * @property {string} [message] - An optional message related to the ping.
108
108
  * @property {number} [code] - The HTTP status code of the ping response (e.g., 200).
109
109
  */
110
+ /**
111
+ * @typedef SubscriberEventMapping
112
+ * @property {number} [id]
113
+ * @property {number} [event_id]
114
+ * @property {number} [subscriber_id]
115
+ * @property {string} [topic]
116
+ * @property {string} [created_on]
117
+ */
110
118
  /**
111
119
  * @typedef EventConfig
112
120
  * @property {number} [id]
@@ -115,6 +123,7 @@ export = WebhookPlatformModel;
115
123
  * @property {string} [event_category]
116
124
  * @property {SubscriberEventMapping} [subscriber_event_mapping]
117
125
  * @property {Object} [event_schema]
126
+ * @property {string} [group]
118
127
  * @property {string} [version]
119
128
  * @property {string} [display_name]
120
129
  * @property {string} [description]
@@ -150,6 +159,8 @@ export = WebhookPlatformModel;
150
159
  * @property {string} [start_date] - The start date and time of the history report.
151
160
  * @property {number[]} [subscribers] - An array of subscriber IDs associated
152
161
  * with the history report.
162
+ * @property {string[]} [webhook_type] - An array of webhook type to identify
163
+ * thetype of subscriber i.e (KAFKA or REST).
153
164
  */
154
165
  /**
155
166
  * @typedef Url
@@ -204,18 +215,12 @@ export = WebhookPlatformModel;
204
215
  * @property {string} [type]
205
216
  * @property {string} [secret]
206
217
  */
207
- /**
208
- * @typedef SubscriberEventMapping
209
- * @property {number} [id]
210
- * @property {number} [event_id]
211
- * @property {number} [subscriber_id]
212
- * @property {string} [created_on]
213
- */
214
218
  /**
215
219
  * @typedef SubscriberResponse
216
220
  * @property {number} [id]
217
221
  * @property {string} [modified_by]
218
222
  * @property {string} [name]
223
+ * @property {string} [provider]
219
224
  * @property {string} [webhook_url]
220
225
  * @property {Association} [association]
221
226
  * @property {Object} [custom_headers]
@@ -227,6 +232,24 @@ export = WebhookPlatformModel;
227
232
  * @property {AuthMeta} [auth_meta]
228
233
  * @property {EventConfig[]} [event_configs]
229
234
  */
235
+ /**
236
+ * @typedef Events
237
+ * @property {string} [slug]
238
+ * @property {string} [topic]
239
+ */
240
+ /**
241
+ * @typedef SubscriberConfigRequestV2
242
+ * @property {number} [id]
243
+ * @property {string} [name]
244
+ * @property {string} [webhook_url]
245
+ * @property {string} [provider]
246
+ * @property {Association} [association]
247
+ * @property {Object} [custom_headers]
248
+ * @property {SubscriberStatus} [status]
249
+ * @property {string} [email_id]
250
+ * @property {AuthMeta} [auth_meta]
251
+ * @property {Events[]} [events]
252
+ */
230
253
  /**
231
254
  * @typedef SubscriberConfig
232
255
  * @property {number} [id]
@@ -245,6 +268,7 @@ export = WebhookPlatformModel;
245
268
  * @property {string} [modified_by]
246
269
  * @property {string} [name]
247
270
  * @property {string} [webhook_url]
271
+ * @property {string} [provider]
248
272
  * @property {Association} [association]
249
273
  * @property {Object} [custom_headers]
250
274
  * @property {SubscriberStatus} [status]
@@ -260,11 +284,11 @@ export = WebhookPlatformModel;
260
284
  * @property {SubscriberResponse[]} [items]
261
285
  * @property {Page} [page]
262
286
  */
263
- /** @typedef {"active" | "inactive" | "blocked"} SubscriberStatus */
287
+ /** @typedef {"active" | "inactive"} SubscriberStatus */
264
288
  declare class WebhookPlatformModel {
265
289
  }
266
290
  declare namespace WebhookPlatformModel {
267
- export { Error, Event, RetryEventRequest, Item, RetryCountResponse, RetrySuccessResponse, Err, RetryFailureResponse, RetryStatusResponse, EventProcessRequest, DownloadReportResponse, EventProcessReports, EventProcessReportObject, Page, PingWebhook, PingWebhookResponse, EventConfig, EventConfigResponse, ReportFiltersPayload, ReportFilterResponse, HistoryPayload, HistoryFilters, Url, CdnObject, UploadServiceObject, HistoryAssociation, HistoryItems, HistoryResponse, CancelResponse, Association, AuthMeta, SubscriberEventMapping, SubscriberResponse, SubscriberConfig, SubscriberConfigResponse, SubscriberConfigList, SubscriberStatus };
291
+ export { Error, Event, RetryEventRequest, Item, RetryCountResponse, RetrySuccessResponse, Err, RetryFailureResponse, RetryStatusResponse, EventProcessRequest, DownloadReportResponse, EventProcessReports, EventProcessReportObject, Page, PingWebhook, PingWebhookResponse, SubscriberEventMapping, EventConfig, EventConfigResponse, ReportFiltersPayload, ReportFilterResponse, HistoryPayload, HistoryFilters, Url, CdnObject, UploadServiceObject, HistoryAssociation, HistoryItems, HistoryResponse, CancelResponse, Association, AuthMeta, SubscriberResponse, Events, SubscriberConfigRequestV2, SubscriberConfig, SubscriberConfigResponse, SubscriberConfigList, SubscriberStatus };
268
292
  }
269
293
  /** @returns {Error} */
270
294
  declare function Error(): Error;
@@ -453,6 +477,15 @@ type PingWebhookResponse = {
453
477
  */
454
478
  code?: number;
455
479
  };
480
+ /** @returns {SubscriberEventMapping} */
481
+ declare function SubscriberEventMapping(): SubscriberEventMapping;
482
+ type SubscriberEventMapping = {
483
+ id?: number;
484
+ event_id?: number;
485
+ subscriber_id?: number;
486
+ topic?: string;
487
+ created_on?: string;
488
+ };
456
489
  /** @returns {EventConfig} */
457
490
  declare function EventConfig(): EventConfig;
458
491
  type EventConfig = {
@@ -462,6 +495,7 @@ type EventConfig = {
462
495
  event_category?: string;
463
496
  subscriber_event_mapping?: SubscriberEventMapping;
464
497
  event_schema?: any;
498
+ group?: string;
465
499
  version?: string;
466
500
  display_name?: string;
467
501
  description?: string;
@@ -529,6 +563,11 @@ type HistoryFilters = {
529
563
  * with the history report.
530
564
  */
531
565
  subscribers?: number[];
566
+ /**
567
+ * - An array of webhook type to identify
568
+ * thetype of subscriber i.e (KAFKA or REST).
569
+ */
570
+ webhook_type?: string[];
532
571
  };
533
572
  /** @returns {Url} */
534
573
  declare function Url(): Url;
@@ -619,20 +658,13 @@ type AuthMeta = {
619
658
  type?: string;
620
659
  secret?: string;
621
660
  };
622
- /** @returns {SubscriberEventMapping} */
623
- declare function SubscriberEventMapping(): SubscriberEventMapping;
624
- type SubscriberEventMapping = {
625
- id?: number;
626
- event_id?: number;
627
- subscriber_id?: number;
628
- created_on?: string;
629
- };
630
661
  /** @returns {SubscriberResponse} */
631
662
  declare function SubscriberResponse(): SubscriberResponse;
632
663
  type SubscriberResponse = {
633
664
  id?: number;
634
665
  modified_by?: string;
635
666
  name?: string;
667
+ provider?: string;
636
668
  webhook_url?: string;
637
669
  association?: Association;
638
670
  custom_headers?: any;
@@ -644,6 +676,26 @@ type SubscriberResponse = {
644
676
  auth_meta?: AuthMeta;
645
677
  event_configs?: EventConfig[];
646
678
  };
679
+ /** @returns {Events} */
680
+ declare function Events(): Events;
681
+ type Events = {
682
+ slug?: string;
683
+ topic?: string;
684
+ };
685
+ /** @returns {SubscriberConfigRequestV2} */
686
+ declare function SubscriberConfigRequestV2(): SubscriberConfigRequestV2;
687
+ type SubscriberConfigRequestV2 = {
688
+ id?: number;
689
+ name?: string;
690
+ webhook_url?: string;
691
+ provider?: string;
692
+ association?: Association;
693
+ custom_headers?: any;
694
+ status?: SubscriberStatus;
695
+ email_id?: string;
696
+ auth_meta?: AuthMeta;
697
+ events?: Events[];
698
+ };
647
699
  /** @returns {SubscriberConfig} */
648
700
  declare function SubscriberConfig(): SubscriberConfig;
649
701
  type SubscriberConfig = {
@@ -664,6 +716,7 @@ type SubscriberConfigResponse = {
664
716
  modified_by?: string;
665
717
  name?: string;
666
718
  webhook_url?: string;
719
+ provider?: string;
667
720
  association?: Association;
668
721
  custom_headers?: any;
669
722
  status?: SubscriberStatus;
@@ -686,4 +739,4 @@ type SubscriberConfigList = {
686
739
  * @returns {SubscriberStatus}
687
740
  */
688
741
  declare function SubscriberStatus(): SubscriberStatus;
689
- type SubscriberStatus = "active" | "inactive" | "blocked";
742
+ type SubscriberStatus = "active" | "inactive";
@@ -124,6 +124,15 @@ const Joi = require("joi");
124
124
  * @property {number} [code] - The HTTP status code of the ping response (e.g., 200).
125
125
  */
126
126
 
127
+ /**
128
+ * @typedef SubscriberEventMapping
129
+ * @property {number} [id]
130
+ * @property {number} [event_id]
131
+ * @property {number} [subscriber_id]
132
+ * @property {string} [topic]
133
+ * @property {string} [created_on]
134
+ */
135
+
127
136
  /**
128
137
  * @typedef EventConfig
129
138
  * @property {number} [id]
@@ -132,6 +141,7 @@ const Joi = require("joi");
132
141
  * @property {string} [event_category]
133
142
  * @property {SubscriberEventMapping} [subscriber_event_mapping]
134
143
  * @property {Object} [event_schema]
144
+ * @property {string} [group]
135
145
  * @property {string} [version]
136
146
  * @property {string} [display_name]
137
147
  * @property {string} [description]
@@ -172,6 +182,8 @@ const Joi = require("joi");
172
182
  * @property {string} [start_date] - The start date and time of the history report.
173
183
  * @property {number[]} [subscribers] - An array of subscriber IDs associated
174
184
  * with the history report.
185
+ * @property {string[]} [webhook_type] - An array of webhook type to identify
186
+ * thetype of subscriber i.e (KAFKA or REST).
175
187
  */
176
188
 
177
189
  /**
@@ -236,19 +248,12 @@ const Joi = require("joi");
236
248
  * @property {string} [secret]
237
249
  */
238
250
 
239
- /**
240
- * @typedef SubscriberEventMapping
241
- * @property {number} [id]
242
- * @property {number} [event_id]
243
- * @property {number} [subscriber_id]
244
- * @property {string} [created_on]
245
- */
246
-
247
251
  /**
248
252
  * @typedef SubscriberResponse
249
253
  * @property {number} [id]
250
254
  * @property {string} [modified_by]
251
255
  * @property {string} [name]
256
+ * @property {string} [provider]
252
257
  * @property {string} [webhook_url]
253
258
  * @property {Association} [association]
254
259
  * @property {Object} [custom_headers]
@@ -261,6 +266,26 @@ const Joi = require("joi");
261
266
  * @property {EventConfig[]} [event_configs]
262
267
  */
263
268
 
269
+ /**
270
+ * @typedef Events
271
+ * @property {string} [slug]
272
+ * @property {string} [topic]
273
+ */
274
+
275
+ /**
276
+ * @typedef SubscriberConfigRequestV2
277
+ * @property {number} [id]
278
+ * @property {string} [name]
279
+ * @property {string} [webhook_url]
280
+ * @property {string} [provider]
281
+ * @property {Association} [association]
282
+ * @property {Object} [custom_headers]
283
+ * @property {SubscriberStatus} [status]
284
+ * @property {string} [email_id]
285
+ * @property {AuthMeta} [auth_meta]
286
+ * @property {Events[]} [events]
287
+ */
288
+
264
289
  /**
265
290
  * @typedef SubscriberConfig
266
291
  * @property {number} [id]
@@ -280,6 +305,7 @@ const Joi = require("joi");
280
305
  * @property {string} [modified_by]
281
306
  * @property {string} [name]
282
307
  * @property {string} [webhook_url]
308
+ * @property {string} [provider]
283
309
  * @property {Association} [association]
284
310
  * @property {Object} [custom_headers]
285
311
  * @property {SubscriberStatus} [status]
@@ -297,7 +323,7 @@ const Joi = require("joi");
297
323
  * @property {Page} [page]
298
324
  */
299
325
 
300
- /** @typedef {"active" | "inactive" | "blocked"} SubscriberStatus */
326
+ /** @typedef {"active" | "inactive"} SubscriberStatus */
301
327
 
302
328
  class WebhookPlatformModel {
303
329
  /** @returns {Error} */
@@ -454,6 +480,17 @@ class WebhookPlatformModel {
454
480
  });
455
481
  }
456
482
 
483
+ /** @returns {SubscriberEventMapping} */
484
+ static SubscriberEventMapping() {
485
+ return Joi.object({
486
+ id: Joi.number(),
487
+ event_id: Joi.number(),
488
+ subscriber_id: Joi.number(),
489
+ topic: Joi.string().allow("").allow(null),
490
+ created_on: Joi.string().allow(""),
491
+ });
492
+ }
493
+
457
494
  /** @returns {EventConfig} */
458
495
  static EventConfig() {
459
496
  return Joi.object({
@@ -463,6 +500,7 @@ class WebhookPlatformModel {
463
500
  event_category: Joi.string().allow(""),
464
501
  subscriber_event_mapping: WebhookPlatformModel.SubscriberEventMapping(),
465
502
  event_schema: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
503
+ group: Joi.string().allow("").allow(null),
466
504
  version: Joi.string().allow(""),
467
505
  display_name: Joi.string().allow(""),
468
506
  description: Joi.string().allow("").allow(null),
@@ -511,6 +549,7 @@ class WebhookPlatformModel {
511
549
  end_date: Joi.string().allow(""),
512
550
  start_date: Joi.string().allow(""),
513
551
  subscribers: Joi.array().items(Joi.number()),
552
+ webhook_type: Joi.array().items(Joi.string().allow("")),
514
553
  });
515
554
  }
516
555
 
@@ -592,22 +631,13 @@ class WebhookPlatformModel {
592
631
  });
593
632
  }
594
633
 
595
- /** @returns {SubscriberEventMapping} */
596
- static SubscriberEventMapping() {
597
- return Joi.object({
598
- id: Joi.number(),
599
- event_id: Joi.number(),
600
- subscriber_id: Joi.number(),
601
- created_on: Joi.string().allow(""),
602
- });
603
- }
604
-
605
634
  /** @returns {SubscriberResponse} */
606
635
  static SubscriberResponse() {
607
636
  return Joi.object({
608
637
  id: Joi.number(),
609
638
  modified_by: Joi.string().allow(""),
610
639
  name: Joi.string().allow(""),
640
+ provider: Joi.string().allow(""),
611
641
  webhook_url: Joi.string().allow(""),
612
642
  association: WebhookPlatformModel.Association(),
613
643
  custom_headers: Joi.any(),
@@ -621,6 +651,30 @@ class WebhookPlatformModel {
621
651
  });
622
652
  }
623
653
 
654
+ /** @returns {Events} */
655
+ static Events() {
656
+ return Joi.object({
657
+ slug: Joi.string().allow(""),
658
+ topic: Joi.string().allow(""),
659
+ });
660
+ }
661
+
662
+ /** @returns {SubscriberConfigRequestV2} */
663
+ static SubscriberConfigRequestV2() {
664
+ return Joi.object({
665
+ id: Joi.number(),
666
+ name: Joi.string().allow(""),
667
+ webhook_url: Joi.string().allow(""),
668
+ provider: Joi.string().allow(""),
669
+ association: WebhookPlatformModel.Association(),
670
+ custom_headers: Joi.any(),
671
+ status: WebhookPlatformModel.SubscriberStatus(),
672
+ email_id: Joi.string().allow(""),
673
+ auth_meta: WebhookPlatformModel.AuthMeta(),
674
+ events: Joi.array().items(WebhookPlatformModel.Events()),
675
+ });
676
+ }
677
+
624
678
  /** @returns {SubscriberConfig} */
625
679
  static SubscriberConfig() {
626
680
  return Joi.object({
@@ -643,6 +697,7 @@ class WebhookPlatformModel {
643
697
  modified_by: Joi.string().allow(""),
644
698
  name: Joi.string().allow(""),
645
699
  webhook_url: Joi.string().allow(""),
700
+ provider: Joi.string().allow(""),
646
701
  association: WebhookPlatformModel.Association(),
647
702
  custom_headers: Joi.any(),
648
703
  status: WebhookPlatformModel.SubscriberStatus(),
@@ -672,9 +727,7 @@ class WebhookPlatformModel {
672
727
  return Joi.string().valid(
673
728
  "active",
674
729
 
675
- "inactive",
676
-
677
- "blocked"
730
+ "inactive"
678
731
  );
679
732
  }
680
733
  }
@@ -54,10 +54,18 @@ export = WebhookPlatformValidator;
54
54
  * @typedef RegisterSubscriberToEventParam
55
55
  * @property {WebhookPlatformModel.SubscriberConfig} body
56
56
  */
57
+ /**
58
+ * @typedef RegisterSubscriberToEventV2Param
59
+ * @property {WebhookPlatformModel.SubscriberConfigRequestV2} body
60
+ */
57
61
  /**
58
62
  * @typedef UpdateSubscriberConfigParam
59
63
  * @property {WebhookPlatformModel.SubscriberConfig} body
60
64
  */
65
+ /**
66
+ * @typedef UpdateSubscriberV2Param
67
+ * @property {WebhookPlatformModel.SubscriberConfigRequestV2} body
68
+ */
61
69
  declare class WebhookPlatformValidator {
62
70
  /** @returns {CancelJobByNameParam} */
63
71
  static cancelJobByName(): CancelJobByNameParam;
@@ -89,11 +97,15 @@ declare class WebhookPlatformValidator {
89
97
  static pingWebhook(): PingWebhookParam;
90
98
  /** @returns {RegisterSubscriberToEventParam} */
91
99
  static registerSubscriberToEvent(): RegisterSubscriberToEventParam;
100
+ /** @returns {RegisterSubscriberToEventV2Param} */
101
+ static registerSubscriberToEventV2(): RegisterSubscriberToEventV2Param;
92
102
  /** @returns {UpdateSubscriberConfigParam} */
93
103
  static updateSubscriberConfig(): UpdateSubscriberConfigParam;
104
+ /** @returns {UpdateSubscriberV2Param} */
105
+ static updateSubscriberV2(): UpdateSubscriberV2Param;
94
106
  }
95
107
  declare namespace WebhookPlatformValidator {
96
- export { CancelJobByNameParam, DownloadDeliveryReportParam, FetchAllEventConfigurationsParam, GetDeliveryReportsParam, GetEventCountsParam, GetHistoricalReportsParam, GetManualRetryStatusParam, GetReportFiltersParam, GetSubscriberByIdParam, GetSubscribersByCompanyParam, GetSubscribersByExtensionIdParam, ManualRetryCancelParam, ManualRetryOfFailedEventParam, PingWebhookParam, RegisterSubscriberToEventParam, UpdateSubscriberConfigParam };
108
+ export { CancelJobByNameParam, DownloadDeliveryReportParam, FetchAllEventConfigurationsParam, GetDeliveryReportsParam, GetEventCountsParam, GetHistoricalReportsParam, GetManualRetryStatusParam, GetReportFiltersParam, GetSubscriberByIdParam, GetSubscribersByCompanyParam, GetSubscribersByExtensionIdParam, ManualRetryCancelParam, ManualRetryOfFailedEventParam, PingWebhookParam, RegisterSubscriberToEventParam, RegisterSubscriberToEventV2Param, UpdateSubscriberConfigParam, UpdateSubscriberV2Param };
97
109
  }
98
110
  type CancelJobByNameParam = {
99
111
  filename: string;
@@ -156,9 +168,15 @@ type PingWebhookParam = {
156
168
  type RegisterSubscriberToEventParam = {
157
169
  body: WebhookPlatformModel.SubscriberConfig;
158
170
  };
171
+ type RegisterSubscriberToEventV2Param = {
172
+ body: WebhookPlatformModel.SubscriberConfigRequestV2;
173
+ };
159
174
  type UpdateSubscriberConfigParam = {
160
175
  body: WebhookPlatformModel.SubscriberConfig;
161
176
  };
177
+ type UpdateSubscriberV2Param = {
178
+ body: WebhookPlatformModel.SubscriberConfigRequestV2;
179
+ };
162
180
  type FetchAllEventConfigurationsParam = any;
163
181
  type GetManualRetryStatusParam = any;
164
182
  type ManualRetryCancelParam = any;
@@ -72,11 +72,21 @@ const WebhookPlatformModel = require("./WebhookPlatformModel");
72
72
  * @property {WebhookPlatformModel.SubscriberConfig} body
73
73
  */
74
74
 
75
+ /**
76
+ * @typedef RegisterSubscriberToEventV2Param
77
+ * @property {WebhookPlatformModel.SubscriberConfigRequestV2} body
78
+ */
79
+
75
80
  /**
76
81
  * @typedef UpdateSubscriberConfigParam
77
82
  * @property {WebhookPlatformModel.SubscriberConfig} body
78
83
  */
79
84
 
85
+ /**
86
+ * @typedef UpdateSubscriberV2Param
87
+ * @property {WebhookPlatformModel.SubscriberConfigRequestV2} body
88
+ */
89
+
80
90
  class WebhookPlatformValidator {
81
91
  /** @returns {CancelJobByNameParam} */
82
92
  static cancelJobByName() {
@@ -181,12 +191,26 @@ class WebhookPlatformValidator {
181
191
  }).required();
182
192
  }
183
193
 
194
+ /** @returns {RegisterSubscriberToEventV2Param} */
195
+ static registerSubscriberToEventV2() {
196
+ return Joi.object({
197
+ body: WebhookPlatformModel.SubscriberConfigRequestV2().required(),
198
+ }).required();
199
+ }
200
+
184
201
  /** @returns {UpdateSubscriberConfigParam} */
185
202
  static updateSubscriberConfig() {
186
203
  return Joi.object({
187
204
  body: WebhookPlatformModel.SubscriberConfig().required(),
188
205
  }).required();
189
206
  }
207
+
208
+ /** @returns {UpdateSubscriberV2Param} */
209
+ static updateSubscriberV2() {
210
+ return Joi.object({
211
+ body: WebhookPlatformModel.SubscriberConfigRequestV2().required(),
212
+ }).required();
213
+ }
190
214
  }
191
215
 
192
216
  module.exports = WebhookPlatformValidator;
@@ -1,6 +1,7 @@
1
1
  export const PlatformConfig: typeof import("./PlatformConfig");
2
2
  export const PlatformClient: typeof import("./PlatformClient");
3
3
  export namespace PlatformModel {
4
+ const AnalyticsPlatformModel: typeof import("./Analytics/AnalyticsPlatformModel");
4
5
  const AuditTrailPlatformModel: typeof import("./AuditTrail/AuditTrailPlatformModel");
5
6
  const BillingPlatformModel: typeof import("./Billing/BillingPlatformModel");
6
7
  const CartPlatformModel: typeof import("./Cart/CartPlatformModel");
@@ -2,6 +2,8 @@ module.exports = {
2
2
  PlatformConfig: require("./PlatformConfig"),
3
3
  PlatformClient: require("./PlatformClient"),
4
4
  PlatformModel: {
5
+ AnalyticsPlatformModel: require("./Analytics/AnalyticsPlatformModel"),
6
+
5
7
  AuditTrailPlatformModel: require("./AuditTrail/AuditTrailPlatformModel"),
6
8
 
7
9
  BillingPlatformModel: require("./Billing/BillingPlatformModel"),
@@ -17,7 +17,7 @@ declare class Webhook {
17
17
  * @param {import("../PublicAPIClient").Options} - Options
18
18
  * @returns {Promise<WebhookPublicModel.EventConfigResponse>} - Success response
19
19
  * @name fetchAllWebhookEvents
20
- * @summary: Fetch all webhook events
20
+ * @summary: Fetch all webhook events.
21
21
  * @description: Retrieve a list of all webhook events in the public server setup. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/fetchAllWebhookEvents/).
22
22
  */
23
23
  fetchAllWebhookEvents({ requestHeaders }?: any, { responseHeaders }?: object): Promise<WebhookPublicModel.EventConfigResponse>;
@@ -37,7 +37,7 @@ declare class Webhook {
37
37
  * @param {import("../PublicAPIClient").Options} - Options
38
38
  * @returns {Promise<WebhookPublicModel.EventConfigResponse>} - Success response
39
39
  * @name queryWebhookEventDetails
40
- * @summary: Query webhook event details
40
+ * @summary: Query webhook event details.
41
41
  * @description: Query and obtain detailed information about webhook events in the public server configurations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/queryWebhookEventDetails/).
42
42
  */
43
43
  queryWebhookEventDetails({ body, requestHeaders }?: WebhookPublicValidator.QueryWebhookEventDetailsParam, { responseHeaders }?: object): Promise<WebhookPublicModel.EventConfigResponse>;
@@ -46,7 +46,7 @@ class Webhook {
46
46
  * @param {import("../PublicAPIClient").Options} - Options
47
47
  * @returns {Promise<WebhookPublicModel.EventConfigResponse>} - Success response
48
48
  * @name fetchAllWebhookEvents
49
- * @summary: Fetch all webhook events
49
+ * @summary: Fetch all webhook events.
50
50
  * @description: Retrieve a list of all webhook events in the public server setup. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/fetchAllWebhookEvents/).
51
51
  */
52
52
  async fetchAllWebhookEvents(
@@ -202,7 +202,7 @@ class Webhook {
202
202
  * @param {import("../PublicAPIClient").Options} - Options
203
203
  * @returns {Promise<WebhookPublicModel.EventConfigResponse>} - Success response
204
204
  * @name queryWebhookEventDetails
205
- * @summary: Query webhook event details
205
+ * @summary: Query webhook event details.
206
206
  * @description: Query and obtain detailed information about webhook events in the public server configurations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/queryWebhookEventDetails/).
207
207
  */
208
208
  async queryWebhookEventDetails(
@@ -11,6 +11,7 @@ export = WebhookPublicModel;
11
11
  * @property {string} [description]
12
12
  * @property {string} [created_on]
13
13
  * @property {string} [updated_on]
14
+ * @property {string} [group]
14
15
  */
15
16
  /**
16
17
  * @typedef EventConfigResponse
@@ -107,6 +108,7 @@ type EventConfig = {
107
108
  description?: string;
108
109
  created_on?: string;
109
110
  updated_on?: string;
111
+ group?: string;
110
112
  };
111
113
  /** @returns {EventConfigResponse} */
112
114
  declare function EventConfigResponse(): EventConfigResponse;
@@ -12,6 +12,7 @@ const Joi = require("joi");
12
12
  * @property {string} [description]
13
13
  * @property {string} [created_on]
14
14
  * @property {string} [updated_on]
15
+ * @property {string} [group]
15
16
  */
16
17
 
17
18
  /**
@@ -117,6 +118,7 @@ class WebhookPublicModel {
117
118
  description: Joi.string().allow("").allow(null),
118
119
  created_on: Joi.string().allow(""),
119
120
  updated_on: Joi.string().allow(""),
121
+ group: Joi.string().allow("").allow(null),
120
122
  });
121
123
  }
122
124