@gofynd/fdk-client-javascript 1.6.2 → 1.6.4

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.
@@ -12,6 +12,16 @@ const UserPlatformModel = require("./UserPlatformModel");
12
12
  * @property {UserPlatformModel.BlockUserRequestSchema} body
13
13
  */
14
14
 
15
+ /**
16
+ * @typedef BulkImportStoreFrontUsersParam
17
+ * @property {UserPlatformModel.CreateStoreFrontUsersPayload} body
18
+ */
19
+
20
+ /**
21
+ * @typedef CreateBulkExportUsersParam
22
+ * @property {UserPlatformModel.BulkUserExportSchema} body
23
+ */
24
+
15
25
  /**
16
26
  * @typedef CreateUserParam
17
27
  * @property {UserPlatformModel.CreateUserRequestSchema} body
@@ -62,6 +72,28 @@ const UserPlatformModel = require("./UserPlatformModel");
62
72
  * @property {string} id - ID of a customer.
63
73
  */
64
74
 
75
+ /**
76
+ * @typedef GetBulkExportUsersListParam
77
+ * @property {string} [pageNo] - Page number for pagination result
78
+ * @property {string} [pageSize] - Page size for pagination result
79
+ * @property {string} [fileFormat] - Filter data based on file format eg csv or xlsx
80
+ * @property {string} [search] - The search queries based on job name.
81
+ * @property {string} [startDate] - Start date
82
+ * @property {string} [endDate] - End date
83
+ * @property {string} [status] - Status of the Import Documents
84
+ */
85
+
86
+ /**
87
+ * @typedef GetBulkImportUsersListParam
88
+ * @property {string} [pageNo] - Page number for pagination result
89
+ * @property {string} [pageSize] - Page size for pagination result
90
+ * @property {string} [search] - The search queries based on job name.
91
+ * @property {string} [startDate] - Start date
92
+ * @property {string} [endDate] - End date
93
+ * @property {string} [status] - Status of the Import Documents
94
+ * @property {string} [fileFormat] - Filter data based on file format eg csv or xlsx
95
+ */
96
+
65
97
  /**
66
98
  * @typedef GetCustomersParam
67
99
  * @property {string} [q] - The search query. Mobile number or email ID of a customer.
@@ -132,6 +164,12 @@ const UserPlatformModel = require("./UserPlatformModel");
132
164
  * @property {number} [groupUid] - To get User Groups with given uid
133
165
  */
134
166
 
167
+ /**
168
+ * @typedef GetUsersJobByJobIdParam
169
+ * @property {string} jobId - The unique identifier of the job. This is used to
170
+ * fetch the details of the specific job.
171
+ */
172
+
135
173
  /**
136
174
  * @typedef SearchUsersParam
137
175
  * @property {string} [q] - The search query. Mobile number or email ID of a customer.
@@ -197,6 +235,20 @@ class UserPlatformApplicationValidator {
197
235
  }).required();
198
236
  }
199
237
 
238
+ /** @returns {BulkImportStoreFrontUsersParam} */
239
+ static bulkImportStoreFrontUsers() {
240
+ return Joi.object({
241
+ body: UserPlatformModel.CreateStoreFrontUsersPayload().required(),
242
+ }).required();
243
+ }
244
+
245
+ /** @returns {CreateBulkExportUsersParam} */
246
+ static createBulkExportUsers() {
247
+ return Joi.object({
248
+ body: UserPlatformModel.BulkUserExportSchema().required(),
249
+ }).required();
250
+ }
251
+
200
252
  /** @returns {CreateUserParam} */
201
253
  static createUser() {
202
254
  return Joi.object({
@@ -264,6 +316,32 @@ class UserPlatformApplicationValidator {
264
316
  }).required();
265
317
  }
266
318
 
319
+ /** @returns {GetBulkExportUsersListParam} */
320
+ static getBulkExportUsersList() {
321
+ return Joi.object({
322
+ pageNo: Joi.string().allow(""),
323
+ pageSize: Joi.string().allow(""),
324
+ fileFormat: Joi.string().allow(""),
325
+ search: Joi.string().allow(""),
326
+ startDate: Joi.string().allow(""),
327
+ endDate: Joi.string().allow(""),
328
+ status: Joi.string().allow(""),
329
+ }).required();
330
+ }
331
+
332
+ /** @returns {GetBulkImportUsersListParam} */
333
+ static getBulkImportUsersList() {
334
+ return Joi.object({
335
+ pageNo: Joi.string().allow(""),
336
+ pageSize: Joi.string().allow(""),
337
+ search: Joi.string().allow(""),
338
+ startDate: Joi.string().allow(""),
339
+ endDate: Joi.string().allow(""),
340
+ status: Joi.string().allow(""),
341
+ fileFormat: Joi.string().allow(""),
342
+ }).required();
343
+ }
344
+
267
345
  /** @returns {GetCustomersParam} */
268
346
  static getCustomers() {
269
347
  return Joi.object({
@@ -347,6 +425,13 @@ class UserPlatformApplicationValidator {
347
425
  }).required();
348
426
  }
349
427
 
428
+ /** @returns {GetUsersJobByJobIdParam} */
429
+ static getUsersJobByJobId() {
430
+ return Joi.object({
431
+ jobId: Joi.string().allow("").required(),
432
+ }).required();
433
+ }
434
+
350
435
  /** @returns {SearchUsersParam} */
351
436
  static searchUsers() {
352
437
  return Joi.object({
@@ -78,6 +78,64 @@ export = UserPlatformModel;
78
78
  * @property {string} [default_value]
79
79
  * @property {Object[]} [validations]
80
80
  */
81
+ /**
82
+ * @typedef CreateStoreFrontUsersPayload
83
+ * @property {string} absolute_url - A valid URL linking to the file containing
84
+ * user data to be imported.
85
+ * @property {string} file_format - The format of the file containing the user's
86
+ * data. Supported formats are CSV and XLSX.
87
+ * @property {string} relative_url - A valid relative path to the file within
88
+ * the storage system. This path should not include the base URL or domain and
89
+ * must conform to the storage structure
90
+ */
91
+ /**
92
+ * @typedef BulkUserExportSchema
93
+ * @property {string} file_format - The format of the file in which you want to
94
+ * export data. Supported formats are CSV and XLSX.
95
+ */
96
+ /**
97
+ * @typedef BulkActionModel
98
+ * @property {string} _id - The Job ID associated with an Import or Export Job
99
+ * @property {string} file_name - The name of the file
100
+ * @property {string} file_format - The format of the uploaded file (e.g., CSV, XLSX).
101
+ * @property {string} action_type - The type of bulk action being performed
102
+ * (e.g., import, export).
103
+ * @property {CreatedBySchema} created_by
104
+ * @property {BulkActionCountSchema} [count]
105
+ * @property {string} [status] - The current status of the bulk action.
106
+ * @property {BulkActionLinkSchema} [links]
107
+ * @property {string} application_id - The unique identifier of the associated
108
+ * application.
109
+ * @property {string} company_id - The unique identifier of the company
110
+ * associated with the bulk action.
111
+ * @property {string} [created_at] - The timestamp when the bulk action was created.
112
+ * @property {string} [updated_at] - The timestamp when the bulk action was last updated.
113
+ */
114
+ /**
115
+ * @typedef CreatedBySchema
116
+ * @property {string} name - The name of the user who initiated the operation.
117
+ * @property {string} user_id - A unique identifier for the user who initiated
118
+ * the operation.
119
+ */
120
+ /**
121
+ * @typedef BulkActionLinkSchema
122
+ * @property {FileLinks} [file]
123
+ * @property {FileLinks} [error]
124
+ */
125
+ /**
126
+ * @typedef FileLinks
127
+ * @property {string} [absolute_url] - The full URL of the file, including the
128
+ * domain and protocol, allowing direct access to the file from any location.
129
+ * @property {string} [relative_url] - The relative path to the file within the
130
+ * storage system, excluding the base URL or domain. This path is specific to
131
+ * the storage structure.
132
+ */
133
+ /**
134
+ * @typedef BulkActionCountSchema
135
+ * @property {number} [total] - The total number of items to be processed.
136
+ * @property {number} [success] - The number of successfully processed items.
137
+ * @property {number} [error] - The number of items that failed to process.
138
+ */
81
139
  /**
82
140
  * @typedef BlockUserRequestSchema
83
141
  * @property {boolean} [status]
@@ -115,13 +173,18 @@ export = UserPlatformModel;
115
173
  * @property {UserSearchSchema[]} [items]
116
174
  * @property {PaginationSchema} [page]
117
175
  */
176
+ /**
177
+ * @typedef BulkActionPaginationSchema
178
+ * @property {BulkActionModel[]} [items] - Array of Bulk Action Documents
179
+ * @property {PaginationSchema} [page]
180
+ */
118
181
  /**
119
182
  * @typedef PaginationSchema
120
- * @property {number} [size]
121
- * @property {number} [item_total]
122
- * @property {boolean} [has_next]
123
- * @property {string} [type]
124
- * @property {number} [current]
183
+ * @property {number} [size] - The number of items per page.
184
+ * @property {number} [item_total] - The total number of items across all pages.
185
+ * @property {boolean} [has_next] - Indicates whether there are more pages to retrieve.
186
+ * @property {string} [type] - The type of pagination used (eg Number).
187
+ * @property {number} [current] - The current page number.
125
188
  */
126
189
  /**
127
190
  * @typedef SessionListResponseSchema
@@ -473,7 +536,7 @@ export = UserPlatformModel;
473
536
  declare class UserPlatformModel {
474
537
  }
475
538
  declare namespace UserPlatformModel {
476
- export { SuccessMessage, UserAttributeDefinition, UserAttributeDefinitionDetails, UserAttributeDefinitionValidation, UserAttribute, CreateUserAttribute, CreateUserAttributeDefinition, BlockUserRequestSchema, ArchiveUserRequestSchema, UnDeleteUserRequestSchema, BlockUserSuccess, ArchiveUserSuccess, UnDeleteUserSuccess, UserSearchResponseSchema, CustomerListResponseSchema, PaginationSchema, SessionListResponseSchema, SessionDeleteResponseSchema, SessionsDeleteResponseSchema, APIError, SessionListResponseInfo, Conditions, UserResponseErrorSchema, UserGroupResponseSchema, UserGroupListResponseSchema, ConditionsSchema, CreateUserGroup, CreateUserRequestSchema, CreateUserResponseSchema, CreateUserSessionRequestSchema, CreateUserSessionResponseSchema, PlatformSchema, LookAndFeel, Login, MetaSchema, Social, RequiredFields, PlatformEmail, PlatformMobile, RegisterRequiredFields, RegisterRequiredFieldsEmail, RegisterRequiredFieldsMobile, FlashCard, SocialTokens, DeleteAccountReasons, DeleteAccountConsent, Facebook, Accountkit, Google, SessionExpiry, UpdateUserGroupSchema, PartialUserGroupUpdateSchema, UserGroupUpdateData, UpdateUserRequestSchema, UserEmails, UserPhoneNumbers, UserSchema, UserSearchSchema, PhoneNumber, Email };
539
+ export { SuccessMessage, UserAttributeDefinition, UserAttributeDefinitionDetails, UserAttributeDefinitionValidation, UserAttribute, CreateUserAttribute, CreateUserAttributeDefinition, CreateStoreFrontUsersPayload, BulkUserExportSchema, BulkActionModel, CreatedBySchema, BulkActionLinkSchema, FileLinks, BulkActionCountSchema, BlockUserRequestSchema, ArchiveUserRequestSchema, UnDeleteUserRequestSchema, BlockUserSuccess, ArchiveUserSuccess, UnDeleteUserSuccess, UserSearchResponseSchema, CustomerListResponseSchema, BulkActionPaginationSchema, PaginationSchema, SessionListResponseSchema, SessionDeleteResponseSchema, SessionsDeleteResponseSchema, APIError, SessionListResponseInfo, Conditions, UserResponseErrorSchema, UserGroupResponseSchema, UserGroupListResponseSchema, ConditionsSchema, CreateUserGroup, CreateUserRequestSchema, CreateUserResponseSchema, CreateUserSessionRequestSchema, CreateUserSessionResponseSchema, PlatformSchema, LookAndFeel, Login, MetaSchema, Social, RequiredFields, PlatformEmail, PlatformMobile, RegisterRequiredFields, RegisterRequiredFieldsEmail, RegisterRequiredFieldsMobile, FlashCard, SocialTokens, DeleteAccountReasons, DeleteAccountConsent, Facebook, Accountkit, Google, SessionExpiry, UpdateUserGroupSchema, PartialUserGroupUpdateSchema, UserGroupUpdateData, UpdateUserRequestSchema, UserEmails, UserPhoneNumbers, UserSchema, UserSearchSchema, PhoneNumber, Email };
477
540
  }
478
541
  /** @returns {SuccessMessage} */
479
542
  declare function SuccessMessage(): SuccessMessage;
@@ -678,6 +741,131 @@ type CreateUserAttributeDefinition = {
678
741
  default_value?: string;
679
742
  validations?: any[];
680
743
  };
744
+ /** @returns {CreateStoreFrontUsersPayload} */
745
+ declare function CreateStoreFrontUsersPayload(): CreateStoreFrontUsersPayload;
746
+ type CreateStoreFrontUsersPayload = {
747
+ /**
748
+ * - A valid URL linking to the file containing
749
+ * user data to be imported.
750
+ */
751
+ absolute_url: string;
752
+ /**
753
+ * - The format of the file containing the user's
754
+ * data. Supported formats are CSV and XLSX.
755
+ */
756
+ file_format: string;
757
+ /**
758
+ * - A valid relative path to the file within
759
+ * the storage system. This path should not include the base URL or domain and
760
+ * must conform to the storage structure
761
+ */
762
+ relative_url: string;
763
+ };
764
+ /** @returns {BulkUserExportSchema} */
765
+ declare function BulkUserExportSchema(): BulkUserExportSchema;
766
+ type BulkUserExportSchema = {
767
+ /**
768
+ * - The format of the file in which you want to
769
+ * export data. Supported formats are CSV and XLSX.
770
+ */
771
+ file_format: string;
772
+ };
773
+ /** @returns {BulkActionModel} */
774
+ declare function BulkActionModel(): BulkActionModel;
775
+ type BulkActionModel = {
776
+ /**
777
+ * - The Job ID associated with an Import or Export Job
778
+ */
779
+ _id: string;
780
+ /**
781
+ * - The name of the file
782
+ */
783
+ file_name: string;
784
+ /**
785
+ * - The format of the uploaded file (e.g., CSV, XLSX).
786
+ */
787
+ file_format: string;
788
+ /**
789
+ * - The type of bulk action being performed
790
+ * (e.g., import, export).
791
+ */
792
+ action_type: string;
793
+ created_by: CreatedBySchema;
794
+ count?: BulkActionCountSchema;
795
+ /**
796
+ * - The current status of the bulk action.
797
+ */
798
+ status?: string;
799
+ links?: BulkActionLinkSchema;
800
+ /**
801
+ * - The unique identifier of the associated
802
+ * application.
803
+ */
804
+ application_id: string;
805
+ /**
806
+ * - The unique identifier of the company
807
+ * associated with the bulk action.
808
+ */
809
+ company_id: string;
810
+ /**
811
+ * - The timestamp when the bulk action was created.
812
+ */
813
+ created_at?: string;
814
+ /**
815
+ * - The timestamp when the bulk action was last updated.
816
+ */
817
+ updated_at?: string;
818
+ };
819
+ /** @returns {CreatedBySchema} */
820
+ declare function CreatedBySchema(): CreatedBySchema;
821
+ type CreatedBySchema = {
822
+ /**
823
+ * - The name of the user who initiated the operation.
824
+ */
825
+ name: string;
826
+ /**
827
+ * - A unique identifier for the user who initiated
828
+ * the operation.
829
+ */
830
+ user_id: string;
831
+ };
832
+ /** @returns {BulkActionLinkSchema} */
833
+ declare function BulkActionLinkSchema(): BulkActionLinkSchema;
834
+ type BulkActionLinkSchema = {
835
+ file?: FileLinks;
836
+ error?: FileLinks;
837
+ };
838
+ /** @returns {FileLinks} */
839
+ declare function FileLinks(): FileLinks;
840
+ type FileLinks = {
841
+ /**
842
+ * - The full URL of the file, including the
843
+ * domain and protocol, allowing direct access to the file from any location.
844
+ */
845
+ absolute_url?: string;
846
+ /**
847
+ * - The relative path to the file within the
848
+ * storage system, excluding the base URL or domain. This path is specific to
849
+ * the storage structure.
850
+ */
851
+ relative_url?: string;
852
+ };
853
+ /** @returns {BulkActionCountSchema} */
854
+ declare function BulkActionCountSchema(): BulkActionCountSchema;
855
+ type BulkActionCountSchema = {
856
+ /**
857
+ * - The total number of items to be processed.
858
+ */
859
+ total?: number;
860
+ /**
861
+ * - The number of successfully processed items.
862
+ */
863
+ success?: number;
864
+ /**
865
+ * - The number of items that failed to process.
866
+ */
867
+ error?: number;
868
+ };
681
869
  /** @returns {BlockUserRequestSchema} */
682
870
  declare function BlockUserRequestSchema(): BlockUserRequestSchema;
683
871
  type BlockUserRequestSchema = {
@@ -723,13 +911,37 @@ type CustomerListResponseSchema = {
723
911
  items?: UserSearchSchema[];
724
912
  page?: PaginationSchema;
725
913
  };
914
+ /** @returns {BulkActionPaginationSchema} */
915
+ declare function BulkActionPaginationSchema(): BulkActionPaginationSchema;
916
+ type BulkActionPaginationSchema = {
917
+ /**
918
+ * - Array of Bulk Action Documents
919
+ */
920
+ items?: BulkActionModel[];
921
+ page?: PaginationSchema;
922
+ };
726
923
  /** @returns {PaginationSchema} */
727
924
  declare function PaginationSchema(): PaginationSchema;
728
925
  type PaginationSchema = {
926
+ /**
927
+ * - The number of items per page.
928
+ */
729
929
  size?: number;
930
+ /**
931
+ * - The total number of items across all pages.
932
+ */
730
933
  item_total?: number;
934
+ /**
935
+ * - Indicates whether there are more pages to retrieve.
936
+ */
731
937
  has_next?: boolean;
938
+ /**
939
+ * - The type of pagination used (eg Number).
940
+ */
732
941
  type?: string;
942
+ /**
943
+ * - The current page number.
944
+ */
733
945
  current?: number;
734
946
  };
735
947
  /** @returns {SessionListResponseSchema} */
@@ -86,6 +86,71 @@ const Joi = require("joi");
86
86
  * @property {Object[]} [validations]
87
87
  */
88
88
 
89
+ /**
90
+ * @typedef CreateStoreFrontUsersPayload
91
+ * @property {string} absolute_url - A valid URL linking to the file containing
92
+ * user data to be imported.
93
+ * @property {string} file_format - The format of the file containing the user's
94
+ * data. Supported formats are CSV and XLSX.
95
+ * @property {string} relative_url - A valid relative path to the file within
96
+ * the storage system. This path should not include the base URL or domain and
97
+ * must conform to the storage structure
98
+ */
99
+
100
+ /**
101
+ * @typedef BulkUserExportSchema
102
+ * @property {string} file_format - The format of the file in which you want to
103
+ * export data. Supported formats are CSV and XLSX.
104
+ */
105
+
106
+ /**
107
+ * @typedef BulkActionModel
108
+ * @property {string} _id - The Job ID associated with an Import or Export Job
109
+ * @property {string} file_name - The name of the file
110
+ * @property {string} file_format - The format of the uploaded file (e.g., CSV, XLSX).
111
+ * @property {string} action_type - The type of bulk action being performed
112
+ * (e.g., import, export).
113
+ * @property {CreatedBySchema} created_by
114
+ * @property {BulkActionCountSchema} [count]
115
+ * @property {string} [status] - The current status of the bulk action.
116
+ * @property {BulkActionLinkSchema} [links]
117
+ * @property {string} application_id - The unique identifier of the associated
118
+ * application.
119
+ * @property {string} company_id - The unique identifier of the company
120
+ * associated with the bulk action.
121
+ * @property {string} [created_at] - The timestamp when the bulk action was created.
122
+ * @property {string} [updated_at] - The timestamp when the bulk action was last updated.
123
+ */
124
+
125
+ /**
126
+ * @typedef CreatedBySchema
127
+ * @property {string} name - The name of the user who initiated the operation.
128
+ * @property {string} user_id - A unique identifier for the user who initiated
129
+ * the operation.
130
+ */
131
+
132
+ /**
133
+ * @typedef BulkActionLinkSchema
134
+ * @property {FileLinks} [file]
135
+ * @property {FileLinks} [error]
136
+ */
137
+
138
+ /**
139
+ * @typedef FileLinks
140
+ * @property {string} [absolute_url] - The full URL of the file, including the
141
+ * domain and protocol, allowing direct access to the file from any location.
142
+ * @property {string} [relative_url] - The relative path to the file within the
143
+ * storage system, excluding the base URL or domain. This path is specific to
144
+ * the storage structure.
145
+ */
146
+
147
+ /**
148
+ * @typedef BulkActionCountSchema
149
+ * @property {number} [total] - The total number of items to be processed.
150
+ * @property {number} [success] - The number of successfully processed items.
151
+ * @property {number} [error] - The number of items that failed to process.
152
+ */
153
+
89
154
  /**
90
155
  * @typedef BlockUserRequestSchema
91
156
  * @property {boolean} [status]
@@ -131,13 +196,19 @@ const Joi = require("joi");
131
196
  * @property {PaginationSchema} [page]
132
197
  */
133
198
 
199
+ /**
200
+ * @typedef BulkActionPaginationSchema
201
+ * @property {BulkActionModel[]} [items] - Array of Bulk Action Documents
202
+ * @property {PaginationSchema} [page]
203
+ */
204
+
134
205
  /**
135
206
  * @typedef PaginationSchema
136
- * @property {number} [size]
137
- * @property {number} [item_total]
138
- * @property {boolean} [has_next]
139
- * @property {string} [type]
140
- * @property {number} [current]
207
+ * @property {number} [size] - The number of items per page.
208
+ * @property {number} [item_total] - The total number of items across all pages.
209
+ * @property {boolean} [has_next] - Indicates whether there are more pages to retrieve.
210
+ * @property {string} [type] - The type of pagination used (eg Number).
211
+ * @property {number} [current] - The current page number.
141
212
  */
142
213
 
143
214
  /**
@@ -633,6 +704,73 @@ class UserPlatformModel {
633
704
  });
634
705
  }
635
706
 
707
+ /** @returns {CreateStoreFrontUsersPayload} */
708
+ static CreateStoreFrontUsersPayload() {
709
+ return Joi.object({
710
+ absolute_url: Joi.string().allow("").required(),
711
+ file_format: Joi.string().allow("").required(),
712
+ relative_url: Joi.string().allow("").required(),
713
+ });
714
+ }
715
+
716
+ /** @returns {BulkUserExportSchema} */
717
+ static BulkUserExportSchema() {
718
+ return Joi.object({
719
+ file_format: Joi.string().allow("").required(),
720
+ });
721
+ }
722
+
723
+ /** @returns {BulkActionModel} */
724
+ static BulkActionModel() {
725
+ return Joi.object({
726
+ _id: Joi.string().allow("").required(),
727
+ file_name: Joi.string().allow("").required(),
728
+ file_format: Joi.string().allow("").required(),
729
+ action_type: Joi.string().allow("").required(),
730
+ created_by: UserPlatformModel.CreatedBySchema().required(),
731
+ count: UserPlatformModel.BulkActionCountSchema(),
732
+ status: Joi.string().allow(""),
733
+ links: UserPlatformModel.BulkActionLinkSchema(),
734
+ application_id: Joi.string().allow("").required(),
735
+ company_id: Joi.string().allow("").required(),
736
+ created_at: Joi.string().allow(""),
737
+ updated_at: Joi.string().allow(""),
738
+ });
739
+ }
740
+
741
+ /** @returns {CreatedBySchema} */
742
+ static CreatedBySchema() {
743
+ return Joi.object({
744
+ name: Joi.string().allow("").required(),
745
+ user_id: Joi.string().allow("").required(),
746
+ });
747
+ }
748
+
749
+ /** @returns {BulkActionLinkSchema} */
750
+ static BulkActionLinkSchema() {
751
+ return Joi.object({
752
+ file: UserPlatformModel.FileLinks(),
753
+ error: UserPlatformModel.FileLinks(),
754
+ });
755
+ }
756
+
757
+ /** @returns {FileLinks} */
758
+ static FileLinks() {
759
+ return Joi.object({
760
+ absolute_url: Joi.string().allow(""),
761
+ relative_url: Joi.string().allow(""),
762
+ });
763
+ }
764
+
765
+ /** @returns {BulkActionCountSchema} */
766
+ static BulkActionCountSchema() {
767
+ return Joi.object({
768
+ total: Joi.number(),
769
+ success: Joi.number(),
770
+ error: Joi.number(),
771
+ });
772
+ }
773
+
636
774
  /** @returns {BlockUserRequestSchema} */
637
775
  static BlockUserRequestSchema() {
638
776
  return Joi.object({
@@ -694,6 +832,14 @@ class UserPlatformModel {
694
832
  });
695
833
  }
696
834
 
835
+ /** @returns {BulkActionPaginationSchema} */
836
+ static BulkActionPaginationSchema() {
837
+ return Joi.object({
838
+ items: Joi.array().items(UserPlatformModel.BulkActionModel()),
839
+ page: UserPlatformModel.PaginationSchema(),
840
+ });
841
+ }
842
+
697
843
  /** @returns {PaginationSchema} */
698
844
  static PaginationSchema() {
699
845
  return Joi.object({
@@ -26,10 +26,31 @@ export = WebhookPlatformModel;
26
26
  * @property {number} [id] - The unique identifier for the subscriber event mapping.
27
27
  * @property {number} [event_id] - The ID of the event associated with the subscriber.
28
28
  * @property {number} [subscriber_id] - The ID of the subscriber.
29
+ * @property {FilterSchema} [filters]
30
+ * @property {Object} [reducer] - The reducer property allows users to customize
31
+ * the JSON structure of the webhook payload using JSONPath queries. They can
32
+ * also create new properties by mapping existing ones. Note that it overrides
33
+ * the entire JSON structure of the webhook payload sent via the webhook. See
34
+ * the partner documentation's filter and reducer section for details.
29
35
  * @property {BroadcasterConfig} [broadcaster_config]
30
36
  * @property {string} [created_on] - The date and time when the subscriber event
31
37
  * mapping was created.
32
38
  */
39
+ /**
40
+ * @typedef FilterSchema
41
+ * @property {string} [query] - JSONPath expression that specifies the property
42
+ * in the webhook payload to filter on. This enables targeting specific data
43
+ * within the payload.
44
+ * @property {string} [condition] - JavaScript function used to evaluate the
45
+ * specified property in the webhook payload against a condition. This
46
+ * function determines whether the filter passes based on its return value.
47
+ * @property {string} [logic] - Logical operator used to combine multiple
48
+ * conditions in the `conditions` array. Supported values are `AND` and `OR`.
49
+ * @property {Object[]} [conditions] - An array of filter objects to be
50
+ * evaluated using the specified logical operator. This array will contain
51
+ * more filters including a combination of single condition mode and logical
52
+ * group mode filters.
53
+ */
33
54
  /**
34
55
  * @typedef EventConfig
35
56
  * @property {number} [id] - The unique identifier for the event configuration.
@@ -293,7 +314,7 @@ export = WebhookPlatformModel;
293
314
  declare class WebhookPlatformModel {
294
315
  }
295
316
  declare namespace WebhookPlatformModel {
296
- export { Page, BroadcasterConfig, SubscriberEventMapping, EventConfig, EventConfigResult, Association, AssociationResp, AuthMeta, SubscriberDetails, Events, SubscriberConfigPostRequestV2, SubscriberConfigUpdateRequestV2, SubscriberConfigPost, SubscriberConfigUpdate, SubscriberConfigResult, SubscriberConfigList, RestEventData, RestConfig, QueueEventData, KafkaConfig, PubSubConfig, TemporalEventData, TemporalConfig, SqsEventData, SqsConfig, EventBridgeData, EventBridgeConfig, EventMapBody, WebhookConfig, UpsertSubscriberConfig, UpsertSubscriberConfigResult, SubscriberStatus };
317
+ export { Page, BroadcasterConfig, SubscriberEventMapping, FilterSchema, EventConfig, EventConfigResult, Association, AssociationResp, AuthMeta, SubscriberDetails, Events, SubscriberConfigPostRequestV2, SubscriberConfigUpdateRequestV2, SubscriberConfigPost, SubscriberConfigUpdate, SubscriberConfigResult, SubscriberConfigList, RestEventData, RestConfig, QueueEventData, KafkaConfig, PubSubConfig, TemporalEventData, TemporalConfig, SqsEventData, SqsConfig, EventBridgeData, EventBridgeConfig, EventMapBody, WebhookConfig, UpsertSubscriberConfig, UpsertSubscriberConfigResult, SubscriberStatus };
297
318
  }
298
319
  /** @returns {Page} */
299
320
  declare function Page(): Page;
@@ -373,6 +394,15 @@ type SubscriberEventMapping = {
373
394
  * - The ID of the subscriber.
374
395
  */
375
396
  subscriber_id?: number;
397
+ filters?: FilterSchema;
398
+ /**
399
+ * - The reducer property allows users to customize
400
+ * the JSON structure of the webhook payload using JSONPath queries. They can
401
+ * also create new properties by mapping existing ones. Note that it overrides
402
+ * the entire JSON structure of the webhook payload sent via the webhook. See
403
+ * the partner documentation's filter and reducer section for details.
404
+ */
405
+ reducer?: any;
376
406
  broadcaster_config?: BroadcasterConfig;
377
407
  /**
378
408
  * - The date and time when the subscriber event
@@ -380,6 +410,34 @@ type SubscriberEventMapping = {
380
410
  */
381
411
  created_on?: string;
382
412
  };
413
+ /** @returns {FilterSchema} */
414
+ declare function FilterSchema(): FilterSchema;
415
+ type FilterSchema = {
416
+ /**
417
+ * - JSONPath expression that specifies the property
418
+ * in the webhook payload to filter on. This enables targeting specific data
419
+ * within the payload.
420
+ */
421
+ query?: string;
422
+ /**
423
+ * - JavaScript function used to evaluate the
424
+ * specified property in the webhook payload against a condition. This
425
+ * function determines whether the filter passes based on its return value.
426
+ */
427
+ condition?: string;
428
+ /**
429
+ * - Logical operator used to combine multiple
430
+ * conditions in the `conditions` array. Supported values are `AND` and `OR`.
431
+ */
432
+ logic?: string;
433
+ /**
434
+ * - An array of filter objects to be
435
+ * evaluated using the specified logical operator. This array will contain
436
+ * more filters including a combination of single condition mode and logical
437
+ * group mode filters.
438
+ */
439
+ conditions?: any[];
440
+ };
383
441
  /** @returns {EventConfig} */
384
442
  declare function EventConfig(): EventConfig;
385
443
  type EventConfig = {