You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/models/Notification.md
+9-2Lines changed: 9 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,7 @@
35
35
"*.jpg",
36
36
"notify_file.txt"
37
37
],
38
+
"workspace_id": 1,
38
39
"unsubscribed": true,
39
40
"unsubscribed_reason": "example",
40
41
"user_id": 1,
@@ -63,6 +64,7 @@
63
64
*`subject` (string): Custom subject line to use for notification emails
64
65
*`message` (string): Custom message to include in notification emails
65
66
*`triggering_filenames` (array(string)): Array of filenames (possibly with wildcards) to scope trigger
67
+
*`workspace_id` (int64): Workspace ID. `0` means the default workspace.
66
68
*`unsubscribed` (boolean): Is the user unsubscribed from this notification?
67
69
*`unsubscribed_reason` (string): The reason that the user unsubscribed
68
70
*`user_id` (int64): Notification user ID
@@ -85,8 +87,8 @@ await Notification.list({
85
87
86
88
*`cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
87
89
*`per_page` (int64): Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
88
-
*`sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `path`, `user_id` or `group_id`.
89
-
*`filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `path`, `user_id`or `group_id`.
90
+
*`sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `path`, `user_id` or `group_id`.
91
+
*`filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `path`, `user_id`, `workspace_id`or `group_id`. Valid field combinations are `[ workspace_id, path ]`, `[ workspace_id, user_id ]`, `[ workspace_id, group_id ]` or `[ workspace_id, user_id, path ]`.
90
92
*`filter_prefix` (object): If set, return records where the specified field is prefixed by the supplied value. Valid fields are `path`.
91
93
*`path` (string): Show notifications for this Path.
92
94
*`include_ancestors` (boolean): If `include_ancestors` is `true` and `path` is specified, include notifications for any parent paths. Ignored if `path` is not specified.
@@ -126,6 +128,7 @@ await Notification.create({
126
128
'triggering_group_ids': [1],
127
129
'triggering_user_ids': [1],
128
130
'trigger_by_share_recipients': true,
131
+
'workspace_id': 1,
129
132
'group_id': 1,
130
133
'group_ids': [1],
131
134
'username': "User",
@@ -150,6 +153,7 @@ await Notification.create({
150
153
*`triggering_group_ids` (array(int64)): If set, will only notify on actions made by a member of one of the specified groups
151
154
*`triggering_user_ids` (array(int64)): If set, will only notify on actions made one of the specified users
152
155
*`trigger_by_share_recipients` (boolean): Notify when actions are performed by a share recipient?
156
+
*`workspace_id` (int64): Workspace ID. `0` means the default workspace.
153
157
*`group_id` (int64): The ID of the group to notify. Provide `user_id`, `username` or `group_id`.
154
158
*`group_ids` (string): Group IDs when the notification requires multiple groups. If sent as a string, it should be comma-delimited.
155
159
*`path` (string): Path
@@ -177,6 +181,7 @@ await notification.update({
177
181
'triggering_group_ids': [1],
178
182
'triggering_user_ids': [1],
179
183
'trigger_by_share_recipients': true,
184
+
'workspace_id': 1,
180
185
})
181
186
```
182
187
@@ -197,6 +202,7 @@ await notification.update({
197
202
*`triggering_group_ids` (array(int64)): If set, will only notify on actions made by a member of one of the specified groups
198
203
*`triggering_user_ids` (array(int64)): If set, will only notify on actions made one of the specified users
199
204
*`trigger_by_share_recipients` (boolean): Notify when actions are performed by a share recipient?
205
+
*`workspace_id` (int64): Workspace ID. `0` means the default workspace.
@@ -285,26 +293,32 @@ var Notification = /*#__PURE__*/(0, _createClass2.default)(function Notification
285
293
}
286
294
thrownewerrors.InvalidParameterError("Bad parameter: triggering_user_ids must be of type Array, received ".concat((0,_utils.getType)(params.triggering_user_ids)));
// cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
409
423
// per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
410
-
// sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `path`, `user_id` or `group_id`.
411
-
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `path`, `user_id`or `group_id`.
424
+
// sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `path`, `user_id` or `group_id`.
425
+
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `path`, `user_id`, `workspace_id` or `group_id`. Valid field combinations are `[ workspace_id, path ]`, `[ workspace_id, user_id ]`, `[ workspace_id, group_id ]` or `[ workspace_id, user_id, path ]`.
412
426
// filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `path`.
413
427
// path - string - Show notifications for this Path.
414
428
// include_ancestors - boolean - If `include_ancestors` is `true` and `path` is specified, include notifications for any parent paths. Ignored if `path` is not specified.
@@ -534,6 +548,7 @@ _Notification = Notification;
534
548
// triggering_group_ids - array(int64) - If set, will only notify on actions made by a member of one of the specified groups
535
549
// triggering_user_ids - array(int64) - If set, will only notify on actions made one of the specified users
536
550
// trigger_by_share_recipients - boolean - Notify when actions are performed by a share recipient?
551
+
// workspace_id - int64 - Workspace ID. `0` means the default workspace.
537
552
// group_id - int64 - The ID of the group to notify. Provide `user_id`, `username` or `group_id`.
538
553
// group_ids - string - Group IDs when the notification requires multiple groups. If sent as a string, it should be comma-delimited.
thrownewerrors.InvalidParameterError("Bad parameter: triggering_user_ids must be of type Array, received ".concat((0,_utils.getType)(params.triggering_user_ids)));
thrownewerrors.InvalidParameterError(`Bad parameter: workspace_id must be of type Int, received ${getType(params.workspace_id)}`)
269
+
}
270
+
259
271
if(!params.id){
260
272
if(this.attributes.id){
261
273
params.id=this.id
@@ -312,8 +324,8 @@ class Notification {
312
324
// Parameters:
313
325
// cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
314
326
// per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
315
-
// sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `path`, `user_id` or `group_id`.
316
-
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `path`, `user_id`or `group_id`.
327
+
// sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `path`, `user_id` or `group_id`.
328
+
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `path`, `user_id`, `workspace_id` or `group_id`. Valid field combinations are `[ workspace_id, path ]`, `[ workspace_id, user_id ]`, `[ workspace_id, group_id ]` or `[ workspace_id, user_id, path ]`.
317
329
// filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `path`.
318
330
// path - string - Show notifications for this Path.
319
331
// include_ancestors - boolean - If `include_ancestors` is `true` and `path` is specified, include notifications for any parent paths. Ignored if `path` is not specified.
@@ -384,6 +396,7 @@ class Notification {
384
396
// triggering_group_ids - array(int64) - If set, will only notify on actions made by a member of one of the specified groups
385
397
// triggering_user_ids - array(int64) - If set, will only notify on actions made one of the specified users
386
398
// trigger_by_share_recipients - boolean - Notify when actions are performed by a share recipient?
399
+
// workspace_id - int64 - Workspace ID. `0` means the default workspace.
387
400
// group_id - int64 - The ID of the group to notify. Provide `user_id`, `username` or `group_id`.
388
401
// group_ids - string - Group IDs when the notification requires multiple groups. If sent as a string, it should be comma-delimited.
389
402
// path - string - Path
@@ -417,6 +430,10 @@ class Notification {
417
430
thrownewerrors.InvalidParameterError(`Bad parameter: triggering_user_ids must be of type Array, received ${getType(params.triggering_user_ids)}`)
0 commit comments