@gofynd/fdk-client-javascript 1.4.2-beta.6 → 1.4.2-beta.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.
package/README.md CHANGED
@@ -214,7 +214,7 @@ console.log("Active Theme: ", response.information.name);
214
214
  The above code will log the curl command in the console
215
215
 
216
216
  ```bash
217
- curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.4.2-beta.6' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
217
+ curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.4.2-beta.7' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
218
218
  Active Theme: Emerge
219
219
  ```
220
220
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gofynd/fdk-client-javascript",
3
- "version": "1.4.2-beta.6",
3
+ "version": "1.4.2-beta.7",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -61,7 +61,7 @@ declare class Order {
61
61
  * @summary: Lists customer orders.
62
62
  * @description: Retrieves all orders associated with a customer account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getOrders/).
63
63
  */
64
- getOrders({ status, pageNo, pageSize, fromDate, toDate, startDate, endDate, customMeta, requestHeaders, }?: OrderApplicationValidator.GetOrdersParam, { responseHeaders }?: object): Promise<OrderApplicationModel.OrderList>;
64
+ getOrders({ status, pageNo, pageSize, fromDate, toDate, startDate, endDate, customMeta, allowInactive, requestHeaders, }?: OrderApplicationValidator.GetOrdersParam, { responseHeaders }?: object): Promise<OrderApplicationModel.OrderList>;
65
65
  /**
66
66
  * @param {OrderApplicationValidator.GetPosOrderByIdParam} arg - Arg object.
67
67
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -315,6 +315,7 @@ class Order {
315
315
  startDate,
316
316
  endDate,
317
317
  customMeta,
318
+ allowInactive,
318
319
  requestHeaders,
319
320
  } = { requestHeaders: {} },
320
321
  { responseHeaders } = { responseHeaders: false }
@@ -329,6 +330,7 @@ class Order {
329
330
  startDate,
330
331
  endDate,
331
332
  customMeta,
333
+ allowInactive,
332
334
  },
333
335
  { abortEarly: false, allowUnknown: true }
334
336
  );
@@ -347,6 +349,7 @@ class Order {
347
349
  startDate,
348
350
  endDate,
349
351
  customMeta,
352
+ allowInactive,
350
353
  },
351
354
  { abortEarly: false, allowUnknown: false }
352
355
  );
@@ -366,6 +369,7 @@ class Order {
366
369
  query_params["start_date"] = startDate;
367
370
  query_params["end_date"] = endDate;
368
371
  query_params["custom_meta"] = customMeta;
372
+ query_params["allow_inactive"] = allowInactive;
369
373
 
370
374
  const xHeaders = {};
371
375
 
@@ -31,6 +31,8 @@ export = OrderApplicationValidator;
31
31
  * @property {string} [endDate] - UTC Start Date in ISO format
32
32
  * @property {string} [customMeta] - A filter and retrieve data using special
33
33
  * fields included for special use-cases
34
+ * @property {boolean} [allowInactive] - Flag indicating whether inactive
35
+ * shipments are allowed
34
36
  */
35
37
  /**
36
38
  * @typedef GetPosOrderByIdParam
@@ -183,6 +185,11 @@ type GetOrdersParam = {
183
185
  * fields included for special use-cases
184
186
  */
185
187
  customMeta?: string;
188
+ /**
189
+ * - Flag indicating whether inactive
190
+ * shipments are allowed
191
+ */
192
+ allowInactive?: boolean;
186
193
  };
187
194
  type GetPosOrderByIdParam = {
188
195
  /**
@@ -37,6 +37,8 @@ const OrderApplicationModel = require("./OrderApplicationModel");
37
37
  * @property {string} [endDate] - UTC Start Date in ISO format
38
38
  * @property {string} [customMeta] - A filter and retrieve data using special
39
39
  * fields included for special use-cases
40
+ * @property {boolean} [allowInactive] - Flag indicating whether inactive
41
+ * shipments are allowed
40
42
  */
41
43
 
42
44
  /**
@@ -137,6 +139,7 @@ class OrderApplicationValidator {
137
139
  startDate: Joi.string().allow(""),
138
140
  endDate: Joi.string().allow(""),
139
141
  customMeta: Joi.string().allow(""),
142
+ allowInactive: Joi.boolean(),
140
143
  });
141
144
  }
142
145
 
@@ -20,24 +20,32 @@ const sg = function safeGet(fn, defaultValue = null) {
20
20
  if (typeof window != "undefined") {
21
21
  window.FPI.event.on("user.login", (eventData) => {
22
22
  Logger({ level: "DEBUG", message: eventData });
23
- Clickstream.identify(eventData["user_id"], { ...eventData }).catch(
24
- (err) => {
25
- Logger({ level: "ERROR", message: err });
26
- }
27
- );
23
+ Clickstream.identify(eventData["user_id"], {
24
+ event_type: "identity",
25
+ ...eventData,
26
+ }).catch((err) => {
27
+ Logger({ level: "ERROR", message: err });
28
+ });
28
29
  });
29
30
 
30
31
  window.FPI.event.on("user.update", (eventData) => {
31
32
  Logger({ level: "DEBUG", message: eventData });
32
- Clickstream.identify(eventData["used_id"], { ...eventData }).catch(
33
- (err) => {
34
- Logger({ level: "ERROR", message: err });
35
- }
36
- );
33
+ Clickstream.identify(eventData["used_id"], {
34
+ event_type: "identity",
35
+ ...eventData,
36
+ }).catch((err) => {
37
+ Logger({ level: "ERROR", message: err });
38
+ });
37
39
  });
38
40
 
39
41
  window.FPI.event.on("user.logout", (eventData) => {
40
42
  Logger({ level: "DEBUG", message: eventData });
43
+ Clickstream.sendEvent("user_logout", {
44
+ event_type: "identity",
45
+ ...eventData,
46
+ }).catch((err) => {
47
+ Logger({ level: "ERROR", message: err });
48
+ });
41
49
  Clickstream.reset().catch((err) => {
42
50
  Logger({ level: "ERROR", message: err });
43
51
  });
@@ -224,7 +232,7 @@ if (typeof window != "undefined") {
224
232
  window.FPI.event.on("search.products", (eventData) => {
225
233
  Logger({ level: "DEBUG", message: eventData });
226
234
  Clickstream.sendEvent("product_search", {
227
- type: "search",
235
+ event_type: "search",
228
236
  query: eventData.search_text,
229
237
  })
230
238
  .then((resp) => {
@@ -167,7 +167,7 @@ export = WebhookPartnerModel;
167
167
  * @property {string} [event_name] - The name of the processed event.
168
168
  * @property {number} [response_code] - The response code of the event.
169
169
  * @property {string} [response_message] - The response message of the event.
170
- * @property {Object} [data] - The data associated with the event.
170
+ * @property {string} [data] - The data associated with the event.
171
171
  * @property {number} [attempt] - The attempt number of the event.
172
172
  * @property {number} [last_attempted_on] - The timestamp of the last attempted event.
173
173
  * @property {string} [status] - The status of the event (e.g., "FAILED").
@@ -482,7 +482,7 @@ type EventProcessReportObject = {
482
482
  /**
483
483
  * - The data associated with the event.
484
484
  */
485
- data?: any;
485
+ data?: string;
486
486
  /**
487
487
  * - The attempt number of the event.
488
488
  */
@@ -193,7 +193,7 @@ const Joi = require("joi");
193
193
  * @property {string} [event_name] - The name of the processed event.
194
194
  * @property {number} [response_code] - The response code of the event.
195
195
  * @property {string} [response_message] - The response message of the event.
196
- * @property {Object} [data] - The data associated with the event.
196
+ * @property {string} [data] - The data associated with the event.
197
197
  * @property {number} [attempt] - The attempt number of the event.
198
198
  * @property {number} [last_attempted_on] - The timestamp of the last attempted event.
199
199
  * @property {string} [status] - The status of the event (e.g., "FAILED").
@@ -500,7 +500,7 @@ class WebhookPartnerModel {
500
500
  event_name: Joi.string().allow(""),
501
501
  response_code: Joi.number(),
502
502
  response_message: Joi.string().allow(""),
503
- data: Joi.object().pattern(/\S/, Joi.any()),
503
+ data: Joi.string().allow(""),
504
504
  attempt: Joi.number(),
505
505
  last_attempted_on: Joi.number(),
506
506
  status: Joi.string().allow(""),
@@ -332,7 +332,7 @@ declare class Order {
332
332
  * @summary: Get orders.
333
333
  * @description: Retrieve a list of available orders. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrders/).
334
334
  */
335
- getOrders({ lane, searchType, bagStatus, timeToDispatch, paymentMethods, tags, searchValue, fromDate, toDate, startDate, endDate, dpIds, stores, salesChannels, pageNo, pageSize, isPrioritySort, customMeta, myOrders, showCrossCompanyData, customerId, orderType, requestHeaders, }?: OrderPlatformValidator.GetOrdersParam, { responseHeaders }?: object): Promise<OrderPlatformModel.OrderListingResponse>;
335
+ getOrders({ lane, searchType, bagStatus, timeToDispatch, paymentMethods, tags, searchValue, fromDate, toDate, startDate, endDate, dpIds, stores, salesChannels, pageNo, pageSize, isPrioritySort, customMeta, myOrders, showCrossCompanyData, customerId, orderType, allowInactive, requestHeaders, }?: OrderPlatformValidator.GetOrdersParam, { responseHeaders }?: object): Promise<OrderPlatformModel.OrderListingResponse>;
336
336
  /**
337
337
  * @param {OrderPlatformValidator.GetRoleBasedActionsParam} arg - Arg object
338
338
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -352,7 +352,7 @@ declare class Order {
352
352
  * @summary: Get shipment by ID.
353
353
  * @description: Retrieve detailed information about a specific shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentById/).
354
354
  */
355
- getShipmentById({ channelShipmentId, shipmentId, fetchActiveShipment, requestHeaders }?: OrderPlatformValidator.GetShipmentByIdParam, { responseHeaders }?: object): Promise<OrderPlatformModel.ShipmentInfoResponse>;
355
+ getShipmentById({ channelShipmentId, shipmentId, fetchActiveShipment, allowInactive, requestHeaders, }?: OrderPlatformValidator.GetShipmentByIdParam, { responseHeaders }?: object): Promise<OrderPlatformModel.ShipmentInfoResponse>;
356
356
  /**
357
357
  * @param {OrderPlatformValidator.GetShipmentHistoryParam} arg - Arg object
358
358
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -2816,6 +2816,7 @@ class Order {
2816
2816
  showCrossCompanyData,
2817
2817
  customerId,
2818
2818
  orderType,
2819
+ allowInactive,
2819
2820
  requestHeaders,
2820
2821
  } = { requestHeaders: {} },
2821
2822
  { responseHeaders } = { responseHeaders: false }
@@ -2844,6 +2845,7 @@ class Order {
2844
2845
  showCrossCompanyData,
2845
2846
  customerId,
2846
2847
  orderType,
2848
+ allowInactive,
2847
2849
  },
2848
2850
  { abortEarly: false, allowUnknown: true }
2849
2851
  );
@@ -2876,6 +2878,7 @@ class Order {
2876
2878
  showCrossCompanyData,
2877
2879
  customerId,
2878
2880
  orderType,
2881
+ allowInactive,
2879
2882
  },
2880
2883
  { abortEarly: false, allowUnknown: false }
2881
2884
  );
@@ -2909,6 +2912,7 @@ class Order {
2909
2912
  query_params["show_cross_company_data"] = showCrossCompanyData;
2910
2913
  query_params["customer_id"] = customerId;
2911
2914
  query_params["order_type"] = orderType;
2915
+ query_params["allow_inactive"] = allowInactive;
2912
2916
 
2913
2917
  const xHeaders = {};
2914
2918
 
@@ -3033,9 +3037,13 @@ class Order {
3033
3037
  * @description: Retrieve detailed information about a specific shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentById/).
3034
3038
  */
3035
3039
  async getShipmentById(
3036
- { channelShipmentId, shipmentId, fetchActiveShipment, requestHeaders } = {
3037
- requestHeaders: {},
3038
- },
3040
+ {
3041
+ channelShipmentId,
3042
+ shipmentId,
3043
+ fetchActiveShipment,
3044
+ allowInactive,
3045
+ requestHeaders,
3046
+ } = { requestHeaders: {} },
3039
3047
  { responseHeaders } = { responseHeaders: false }
3040
3048
  ) {
3041
3049
  const { error } = OrderPlatformValidator.getShipmentById().validate(
@@ -3043,6 +3051,7 @@ class Order {
3043
3051
  channelShipmentId,
3044
3052
  shipmentId,
3045
3053
  fetchActiveShipment,
3054
+ allowInactive,
3046
3055
  },
3047
3056
  { abortEarly: false, allowUnknown: true }
3048
3057
  );
@@ -3058,6 +3067,7 @@ class Order {
3058
3067
  channelShipmentId,
3059
3068
  shipmentId,
3060
3069
  fetchActiveShipment,
3070
+ allowInactive,
3061
3071
  },
3062
3072
  { abortEarly: false, allowUnknown: false }
3063
3073
  );
@@ -3072,6 +3082,7 @@ class Order {
3072
3082
  query_params["channel_shipment_id"] = channelShipmentId;
3073
3083
  query_params["shipment_id"] = shipmentId;
3074
3084
  query_params["fetch_active_shipment"] = fetchActiveShipment;
3085
+ query_params["allow_inactive"] = allowInactive;
3075
3086
 
3076
3087
  const xHeaders = {};
3077
3088
 
@@ -223,6 +223,8 @@ export = OrderPlatformValidator;
223
223
  * company order
224
224
  * @property {string} [customerId]
225
225
  * @property {string} [orderType]
226
+ * @property {boolean} [allowInactive] - Flag indicating whether inactive
227
+ * shipments are allowed
226
228
  */
227
229
  /** @typedef GetRoleBasedActionsParam */
228
230
  /**
@@ -231,6 +233,8 @@ export = OrderPlatformValidator;
231
233
  * @property {string} [shipmentId] - Shipment Id
232
234
  * @property {boolean} [fetchActiveShipment] - Flag to fetch active or
233
235
  * deactivated shipments
236
+ * @property {boolean} [allowInactive] - Flag indicating whether inactive
237
+ * shipments are allowed
234
238
  */
235
239
  /**
236
240
  * @typedef GetShipmentHistoryParam
@@ -884,6 +888,11 @@ type GetOrdersParam = {
884
888
  showCrossCompanyData?: boolean;
885
889
  customerId?: string;
886
890
  orderType?: string;
891
+ /**
892
+ * - Flag indicating whether inactive
893
+ * shipments are allowed
894
+ */
895
+ allowInactive?: boolean;
887
896
  };
888
897
  type GetShipmentByIdParam = {
889
898
  /**
@@ -899,6 +908,11 @@ type GetShipmentByIdParam = {
899
908
  * deactivated shipments
900
909
  */
901
910
  fetchActiveShipment?: boolean;
911
+ /**
912
+ * - Flag indicating whether inactive
913
+ * shipments are allowed
914
+ */
915
+ allowInactive?: boolean;
902
916
  };
903
917
  type GetShipmentHistoryParam = {
904
918
  /**
@@ -257,6 +257,8 @@ const OrderPlatformModel = require("./OrderPlatformModel");
257
257
  * company order
258
258
  * @property {string} [customerId]
259
259
  * @property {string} [orderType]
260
+ * @property {boolean} [allowInactive] - Flag indicating whether inactive
261
+ * shipments are allowed
260
262
  */
261
263
 
262
264
  /** @typedef GetRoleBasedActionsParam */
@@ -267,6 +269,8 @@ const OrderPlatformModel = require("./OrderPlatformModel");
267
269
  * @property {string} [shipmentId] - Shipment Id
268
270
  * @property {boolean} [fetchActiveShipment] - Flag to fetch active or
269
271
  * deactivated shipments
272
+ * @property {boolean} [allowInactive] - Flag indicating whether inactive
273
+ * shipments are allowed
270
274
  */
271
275
 
272
276
  /**
@@ -743,6 +747,7 @@ class OrderPlatformValidator {
743
747
  showCrossCompanyData: Joi.boolean(),
744
748
  customerId: Joi.string().allow(""),
745
749
  orderType: Joi.string().allow(""),
750
+ allowInactive: Joi.boolean(),
746
751
  }).required();
747
752
  }
748
753
 
@@ -757,6 +762,7 @@ class OrderPlatformValidator {
757
762
  channelShipmentId: Joi.string().allow(""),
758
763
  shipmentId: Joi.string().allow(""),
759
764
  fetchActiveShipment: Joi.boolean(),
765
+ allowInactive: Joi.boolean(),
760
766
  }).required();
761
767
  }
762
768
 
@@ -74,7 +74,7 @@ export = WebhookPlatformModel;
74
74
  * @property {string} [event_name] - The name of the processed event.
75
75
  * @property {number} [response_code] - The response code of the event.
76
76
  * @property {string} [response_message] - The response message of the event.
77
- * @property {Object} [data] - The data associated with the event.
77
+ * @property {string} [data] - The data associated with the event.
78
78
  * @property {number} [attempt] - The attempt number of the event.
79
79
  * @property {number} [last_attempted_on] - The timestamp of the last attempted event.
80
80
  * @property {string} [status] - The status of the event (e.g., "FAILED").
@@ -113,6 +113,7 @@ export = WebhookPlatformModel;
113
113
  * @property {string} [event_name]
114
114
  * @property {string} [event_type]
115
115
  * @property {string} [event_category]
116
+ * @property {SubscriberEventMapping} [subscriber_event_mapping]
116
117
  * @property {Object} [event_schema]
117
118
  * @property {string} [version]
118
119
  * @property {string} [display_name]
@@ -203,26 +204,6 @@ export = WebhookPlatformModel;
203
204
  * @property {string} [type]
204
205
  * @property {string} [secret]
205
206
  */
206
- /**
207
- * @typedef SubscriberFailureResponse
208
- * @property {string} [message]
209
- * @property {string} [code]
210
- * @property {string} [stack]
211
- */
212
- /**
213
- * @typedef EventConfigs
214
- * @property {number} [id]
215
- * @property {string} [event_name]
216
- * @property {string} [event_type]
217
- * @property {string} [event_category]
218
- * @property {Object} [event_schema]
219
- * @property {string} [version]
220
- * @property {string} [display_name]
221
- * @property {string} [description]
222
- * @property {string} [created_on]
223
- * @property {string} [updated_on]
224
- * @property {SubscriberEventMapping} [subscriber_event_mapping]
225
- */
226
207
  /**
227
208
  * @typedef SubscriberEventMapping
228
209
  * @property {number} [id]
@@ -279,11 +260,11 @@ export = WebhookPlatformModel;
279
260
  * @property {SubscriberResponse[]} [items]
280
261
  * @property {Page} [page]
281
262
  */
282
- /** @typedef {"active" | "inactive" | "blocked"} SubscriberStatus */
263
+ /** @typedef {"" | "" | ""} SubscriberStatus */
283
264
  declare class WebhookPlatformModel {
284
265
  }
285
266
  declare namespace WebhookPlatformModel {
286
- 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, SubscriberFailureResponse, EventConfigs, SubscriberEventMapping, SubscriberResponse, SubscriberConfig, SubscriberConfigResponse, SubscriberConfigList, SubscriberStatus };
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 };
287
268
  }
288
269
  /** @returns {Error} */
289
270
  declare function Error(): Error;
@@ -400,7 +381,7 @@ type EventProcessReportObject = {
400
381
  /**
401
382
  * - The data associated with the event.
402
383
  */
403
- data?: any;
384
+ data?: string;
404
385
  /**
405
386
  * - The attempt number of the event.
406
387
  */
@@ -479,6 +460,7 @@ type EventConfig = {
479
460
  event_name?: string;
480
461
  event_type?: string;
481
462
  event_category?: string;
463
+ subscriber_event_mapping?: SubscriberEventMapping;
482
464
  event_schema?: any;
483
465
  version?: string;
484
466
  display_name?: string;
@@ -637,28 +619,6 @@ type AuthMeta = {
637
619
  type?: string;
638
620
  secret?: string;
639
621
  };
640
- /** @returns {SubscriberFailureResponse} */
641
- declare function SubscriberFailureResponse(): SubscriberFailureResponse;
642
- type SubscriberFailureResponse = {
643
- message?: string;
644
- code?: string;
645
- stack?: string;
646
- };
647
- /** @returns {EventConfigs} */
648
- declare function EventConfigs(): EventConfigs;
649
- type EventConfigs = {
650
- id?: number;
651
- event_name?: string;
652
- event_type?: string;
653
- event_category?: string;
654
- event_schema?: any;
655
- version?: string;
656
- display_name?: string;
657
- description?: string;
658
- created_on?: string;
659
- updated_on?: string;
660
- subscriber_event_mapping?: SubscriberEventMapping;
661
- };
662
622
  /** @returns {SubscriberEventMapping} */
663
623
  declare function SubscriberEventMapping(): SubscriberEventMapping;
664
624
  type SubscriberEventMapping = {
@@ -726,4 +686,4 @@ type SubscriberConfigList = {
726
686
  * @returns {SubscriberStatus}
727
687
  */
728
688
  declare function SubscriberStatus(): SubscriberStatus;
729
- type SubscriberStatus = "active" | "inactive" | "blocked";
689
+ type SubscriberStatus = "" | "" | "";
@@ -87,7 +87,7 @@ const Joi = require("joi");
87
87
  * @property {string} [event_name] - The name of the processed event.
88
88
  * @property {number} [response_code] - The response code of the event.
89
89
  * @property {string} [response_message] - The response message of the event.
90
- * @property {Object} [data] - The data associated with the event.
90
+ * @property {string} [data] - The data associated with the event.
91
91
  * @property {number} [attempt] - The attempt number of the event.
92
92
  * @property {number} [last_attempted_on] - The timestamp of the last attempted event.
93
93
  * @property {string} [status] - The status of the event (e.g., "FAILED").
@@ -130,6 +130,7 @@ const Joi = require("joi");
130
130
  * @property {string} [event_name]
131
131
  * @property {string} [event_type]
132
132
  * @property {string} [event_category]
133
+ * @property {SubscriberEventMapping} [subscriber_event_mapping]
133
134
  * @property {Object} [event_schema]
134
135
  * @property {string} [version]
135
136
  * @property {string} [display_name]
@@ -235,28 +236,6 @@ const Joi = require("joi");
235
236
  * @property {string} [secret]
236
237
  */
237
238
 
238
- /**
239
- * @typedef SubscriberFailureResponse
240
- * @property {string} [message]
241
- * @property {string} [code]
242
- * @property {string} [stack]
243
- */
244
-
245
- /**
246
- * @typedef EventConfigs
247
- * @property {number} [id]
248
- * @property {string} [event_name]
249
- * @property {string} [event_type]
250
- * @property {string} [event_category]
251
- * @property {Object} [event_schema]
252
- * @property {string} [version]
253
- * @property {string} [display_name]
254
- * @property {string} [description]
255
- * @property {string} [created_on]
256
- * @property {string} [updated_on]
257
- * @property {SubscriberEventMapping} [subscriber_event_mapping]
258
- */
259
-
260
239
  /**
261
240
  * @typedef SubscriberEventMapping
262
241
  * @property {number} [id]
@@ -318,7 +297,7 @@ const Joi = require("joi");
318
297
  * @property {Page} [page]
319
298
  */
320
299
 
321
- /** @typedef {"active" | "inactive" | "blocked"} SubscriberStatus */
300
+ /** @typedef {"" | "" | ""} SubscriberStatus */
322
301
 
323
302
  class WebhookPlatformModel {
324
303
  /** @returns {Error} */
@@ -432,7 +411,7 @@ class WebhookPlatformModel {
432
411
  event_name: Joi.string().allow(""),
433
412
  response_code: Joi.number(),
434
413
  response_message: Joi.string().allow(""),
435
- data: Joi.object().pattern(/\S/, Joi.any()),
414
+ data: Joi.string().allow(""),
436
415
  attempt: Joi.number(),
437
416
  last_attempted_on: Joi.number(),
438
417
  status: Joi.string().allow(""),
@@ -482,6 +461,7 @@ class WebhookPlatformModel {
482
461
  event_name: Joi.string().allow(""),
483
462
  event_type: Joi.string().allow(""),
484
463
  event_category: Joi.string().allow(""),
464
+ subscriber_event_mapping: WebhookPlatformModel.SubscriberEventMapping(),
485
465
  event_schema: Joi.object().pattern(/\S/, Joi.any()),
486
466
  version: Joi.string().allow(""),
487
467
  display_name: Joi.string().allow(""),
@@ -612,32 +592,6 @@ class WebhookPlatformModel {
612
592
  });
613
593
  }
614
594
 
615
- /** @returns {SubscriberFailureResponse} */
616
- static SubscriberFailureResponse() {
617
- return Joi.object({
618
- message: Joi.string().allow(""),
619
- code: Joi.string().allow(""),
620
- stack: Joi.string().allow(""),
621
- });
622
- }
623
-
624
- /** @returns {EventConfigs} */
625
- static EventConfigs() {
626
- return Joi.object({
627
- id: Joi.number(),
628
- event_name: Joi.string().allow(""),
629
- event_type: Joi.string().allow(""),
630
- event_category: Joi.string().allow(""),
631
- event_schema: Joi.object().pattern(/\S/, Joi.any()),
632
- version: Joi.string().allow(""),
633
- display_name: Joi.string().allow(""),
634
- description: Joi.string().allow(""),
635
- created_on: Joi.string().allow(""),
636
- updated_on: Joi.string().allow(""),
637
- subscriber_event_mapping: WebhookPlatformModel.SubscriberEventMapping(),
638
- });
639
- }
640
-
641
595
  /** @returns {SubscriberEventMapping} */
642
596
  static SubscriberEventMapping() {
643
597
  return Joi.object({