files.com 1.1.661 → 1.1.663

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f5d1657cd2960ca08a61d277113bab0c606889dbcd13de1a0f0101f60bce5cf5
4
- data.tar.gz: 454cec2c47344387c5ecf6bcb290ec2e23563f4213d98a27143619e0ed5de982
3
+ metadata.gz: 218b3a030f1329067ae82c1af1375c610643aa60e03758b5d32cfd55f6a6b747
4
+ data.tar.gz: '0078f10d646a7f3e3b72fbdfb68015bd4e686e92913edbf054baebd0b69e45ce'
5
5
  SHA512:
6
- metadata.gz: eb6e585c04932db0c0d34aceef06ad83f1f4ef7cd97adf00255e0ff26a9720098ef64b0903d35e9c963f21348bd926eae24f457b86d678b6469894cae21bc94f
7
- data.tar.gz: 85eb230534050c522e8f42b21bffa8e505edc489b1a12e4ea6f2f7fdc40c5451371275085c0494b7e23489ac8f2b8da5c145c640f2632b12b1e648c7cc440e5f
6
+ metadata.gz: 6b1df0d63d27ff0eda2e0e5237a6123052897d55dc1a069a9adc3638998f78be984bbb1cba42c15ab6d68a7816050245e5fe2a2f66ee3147e3b771d134587e6b
7
+ data.tar.gz: 400128a4f14c42fbbe9c410dad318e9bd4a88355228350eabb0b8ef83eacc2fdf77c73498b9fbffdf3f08d716a6146632e3a222b7f92cb9b3458dfd1f5702899
data/README.md CHANGED
@@ -617,6 +617,7 @@ Files::FolderAdminPermissionRequiredError -> Files::NotAuthorizedError -> Files:
617
617
  |`SiteNotFoundError`| `NotFoundError` |
618
618
  |`UserNotFoundError`| `NotFoundError` |
619
619
  |`AgentUnavailableError`| `ProcessingFailureError` |
620
+ |`AiTaskCannotBeRunManuallyError`| `ProcessingFailureError` |
620
621
  |`AlreadyCompletedError`| `ProcessingFailureError` |
621
622
  |`AutomationCannotBeRunManuallyError`| `ProcessingFailureError` |
622
623
  |`BehaviorNotAllowedOnRemoteServerError`| `ProcessingFailureError` |
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.661
1
+ 1.1.663
data/docs/ai_task.md ADDED
@@ -0,0 +1,285 @@
1
+ # AiTask
2
+
3
+ ## Example AiTask Object
4
+
5
+ ```
6
+ {
7
+ "id": 1,
8
+ "workspace_id": 1,
9
+ "name": "Summarize daily reports",
10
+ "description": "Summarizes files uploaded by the accounting team.",
11
+ "prompt": "Summarize the uploaded file and identify follow-up actions.",
12
+ "permission_set": "files_only",
13
+ "path": "incoming/reports",
14
+ "source": "*.pdf",
15
+ "disabled": true,
16
+ "trigger": "daily",
17
+ "trigger_actions": [
18
+ "create"
19
+ ],
20
+ "interval": "day",
21
+ "recurring_day": 1,
22
+ "schedule_days_of_week": [
23
+ 1,
24
+ 3,
25
+ 5
26
+ ],
27
+ "schedule_times_of_day": [
28
+ "06:30"
29
+ ],
30
+ "schedule_time_zone": "Eastern Time (US & Canada)",
31
+ "holiday_region": "us",
32
+ "human_readable_schedule": "Runs every day at 06:30 AM UTC TZ.",
33
+ "last_run_at": "2000-01-01T01:00:00Z",
34
+ "master_admin_user_id": 1,
35
+ "created_at": "2000-01-01T01:00:00Z",
36
+ "updated_at": "2000-01-01T01:00:00Z"
37
+ }
38
+ ```
39
+
40
+ * `id` (int64): AI Task ID.
41
+ * `workspace_id` (int64): Workspace ID. `0` means the default workspace.
42
+ * `name` (string): AI Task name.
43
+ * `description` (string): AI Task description.
44
+ * `prompt` (string): Prompt sent when this AI Task is invoked.
45
+ * `permission_set` (string): Permissions used by the internal API key for this AI Task. Valid values are `full` and `files_only`.
46
+ * `path` (string): Path scope used for action-triggered AI Tasks. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
47
+ * `source` (string): Source glob used with `path` for action-triggered AI Tasks.
48
+ * `disabled` (boolean): If true, this AI Task will not run.
49
+ * `trigger` (string): How this AI Task is triggered.
50
+ * `trigger_actions` (array(string)): If trigger is `action`, the file action types that invoke this AI Task. Valid actions are create, copy, move, archived_delete, update, read, destroy.
51
+ * `interval` (string): If trigger is `daily`, this specifies how often to run the AI Task.
52
+ * `recurring_day` (int64): If trigger is `daily`, this selects the day number inside the chosen interval.
53
+ * `schedule_days_of_week` (array(int64)): If trigger is `custom_schedule`, the 0-based weekdays used by the schedule.
54
+ * `schedule_times_of_day` (array(string)): Times of day in HH:MM format for scheduled AI Tasks.
55
+ * `schedule_time_zone` (string): Time zone used by the AI Task schedule.
56
+ * `holiday_region` (string): Optional holiday region used by scheduled AI Tasks.
57
+ * `human_readable_schedule` (string): Human-readable schedule description.
58
+ * `last_run_at` (date-time): Most recent successful invocation time.
59
+ * `master_admin_user_id` (int64): Master User ID used for AI Task invocations.
60
+ * `created_at` (date-time): Creation time.
61
+ * `updated_at` (date-time): Last update time.
62
+
63
+
64
+ ---
65
+
66
+ ## List Ai Tasks
67
+
68
+ ```
69
+ Files::AiTask.list
70
+ ```
71
+
72
+ ### Parameters
73
+
74
+ * `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.
75
+ * `per_page` (int64): Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
76
+ * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `id`, `disabled` or `updated_at`.
77
+ * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `disabled`, `trigger` or `workspace_id`. Valid field combinations are `[ workspace_id, disabled ]`.
78
+
79
+
80
+ ---
81
+
82
+ ## Show Ai Task
83
+
84
+ ```
85
+ Files::AiTask.find(id)
86
+ ```
87
+
88
+ ### Parameters
89
+
90
+ * `id` (int64): Required - Ai Task ID.
91
+
92
+
93
+ ---
94
+
95
+ ## Create Ai Task
96
+
97
+ ```
98
+ Files::AiTask.create(
99
+ description: "Summarizes files uploaded by the accounting team.",
100
+ disabled: true,
101
+ holiday_region: "us",
102
+ interval: "day",
103
+ name: "Summarize daily reports",
104
+ path: "incoming/reports",
105
+ permission_set: "files_only",
106
+ prompt: "Summarize the uploaded file and identify follow-up actions.",
107
+ recurring_day: 1,
108
+ schedule_days_of_week: [1,3,5],
109
+ schedule_time_zone: "Eastern Time (US & Canada)",
110
+ schedule_times_of_day: ["06:30"],
111
+ source: "*.pdf",
112
+ trigger: "daily",
113
+ trigger_actions: ["create"],
114
+ workspace_id: 0
115
+ )
116
+ ```
117
+
118
+ ### Parameters
119
+
120
+ * `description` (string): AI Task description.
121
+ * `disabled` (boolean): If true, this AI Task will not run.
122
+ * `holiday_region` (string): Optional holiday region used by scheduled AI Tasks.
123
+ * `interval` (string): If trigger is `daily`, this specifies how often to run the AI Task.
124
+ * `name` (string): Required - AI Task name.
125
+ * `path` (string): Path scope used for action-triggered AI Tasks.
126
+ * `permission_set` (string): Permissions used by the internal API key for this AI Task. Valid values are `full` and `files_only`.
127
+ * `prompt` (string): Required - Prompt sent when this AI Task is invoked.
128
+ * `recurring_day` (int64): If trigger is `daily`, this selects the day number inside the chosen interval.
129
+ * `schedule_days_of_week` (array(int64)): If trigger is `custom_schedule`, the 0-based weekdays used by the schedule.
130
+ * `schedule_time_zone` (string): Time zone used by the AI Task schedule.
131
+ * `schedule_times_of_day` (array(string)): Times of day in HH:MM format for scheduled AI Tasks.
132
+ * `source` (string): Source glob used with `path` for action-triggered AI Tasks.
133
+ * `trigger` (string): How this AI Task is triggered.
134
+ * `trigger_actions` (array(string)): If trigger is `action`, the file action types that invoke this AI Task. Valid actions are create, copy, move, archived_delete, update, read, destroy.
135
+ * `workspace_id` (int64): Workspace ID. `0` means the default workspace.
136
+
137
+
138
+ ---
139
+
140
+ ## Manually Run AI Task
141
+
142
+ ```
143
+ Files::AiTask.manual_run(id)
144
+ ```
145
+
146
+ ### Parameters
147
+
148
+ * `id` (int64): Required - Ai Task ID.
149
+
150
+
151
+ ---
152
+
153
+ ## Update Ai Task
154
+
155
+ ```
156
+ Files::AiTask.update(id,
157
+ description: "Summarizes files uploaded by the accounting team.",
158
+ disabled: true,
159
+ holiday_region: "us",
160
+ interval: "day",
161
+ name: "Summarize daily reports",
162
+ path: "incoming/reports",
163
+ permission_set: "files_only",
164
+ prompt: "Summarize the uploaded file and identify follow-up actions.",
165
+ recurring_day: 1,
166
+ schedule_days_of_week: [1,3,5],
167
+ schedule_time_zone: "Eastern Time (US & Canada)",
168
+ schedule_times_of_day: ["06:30"],
169
+ source: "*.pdf",
170
+ trigger: "daily",
171
+ trigger_actions: ["create"],
172
+ workspace_id: 0
173
+ )
174
+ ```
175
+
176
+ ### Parameters
177
+
178
+ * `id` (int64): Required - Ai Task ID.
179
+ * `description` (string): AI Task description.
180
+ * `disabled` (boolean): If true, this AI Task will not run.
181
+ * `holiday_region` (string): Optional holiday region used by scheduled AI Tasks.
182
+ * `interval` (string): If trigger is `daily`, this specifies how often to run the AI Task.
183
+ * `name` (string): AI Task name.
184
+ * `path` (string): Path scope used for action-triggered AI Tasks.
185
+ * `permission_set` (string): Permissions used by the internal API key for this AI Task. Valid values are `full` and `files_only`.
186
+ * `prompt` (string): Prompt sent when this AI Task is invoked.
187
+ * `recurring_day` (int64): If trigger is `daily`, this selects the day number inside the chosen interval.
188
+ * `schedule_days_of_week` (array(int64)): If trigger is `custom_schedule`, the 0-based weekdays used by the schedule.
189
+ * `schedule_time_zone` (string): Time zone used by the AI Task schedule.
190
+ * `schedule_times_of_day` (array(string)): Times of day in HH:MM format for scheduled AI Tasks.
191
+ * `source` (string): Source glob used with `path` for action-triggered AI Tasks.
192
+ * `trigger` (string): How this AI Task is triggered.
193
+ * `trigger_actions` (array(string)): If trigger is `action`, the file action types that invoke this AI Task. Valid actions are create, copy, move, archived_delete, update, read, destroy.
194
+ * `workspace_id` (int64): Workspace ID. `0` means the default workspace.
195
+
196
+
197
+ ---
198
+
199
+ ## Delete Ai Task
200
+
201
+ ```
202
+ Files::AiTask.delete(id)
203
+ ```
204
+
205
+ ### Parameters
206
+
207
+ * `id` (int64): Required - Ai Task ID.
208
+
209
+
210
+ ---
211
+
212
+ ## Manually Run AI Task
213
+
214
+ ```
215
+ ai_task = Files::AiTask.find(id)
216
+
217
+ ai_task.manual_run
218
+ ```
219
+
220
+ ### Parameters
221
+
222
+ * `id` (int64): Required - Ai Task ID.
223
+
224
+
225
+ ---
226
+
227
+ ## Update Ai Task
228
+
229
+ ```
230
+ ai_task = Files::AiTask.find(id)
231
+
232
+ ai_task.update(
233
+ description: "Summarizes files uploaded by the accounting team.",
234
+ disabled: true,
235
+ holiday_region: "us",
236
+ interval: "day",
237
+ name: "Summarize daily reports",
238
+ path: "incoming/reports",
239
+ permission_set: "files_only",
240
+ prompt: "Summarize the uploaded file and identify follow-up actions.",
241
+ recurring_day: 1,
242
+ schedule_days_of_week: [1,3,5],
243
+ schedule_time_zone: "Eastern Time (US & Canada)",
244
+ schedule_times_of_day: ["06:30"],
245
+ source: "*.pdf",
246
+ trigger: "daily",
247
+ trigger_actions: ["create"],
248
+ workspace_id: 0
249
+ )
250
+ ```
251
+
252
+ ### Parameters
253
+
254
+ * `id` (int64): Required - Ai Task ID.
255
+ * `description` (string): AI Task description.
256
+ * `disabled` (boolean): If true, this AI Task will not run.
257
+ * `holiday_region` (string): Optional holiday region used by scheduled AI Tasks.
258
+ * `interval` (string): If trigger is `daily`, this specifies how often to run the AI Task.
259
+ * `name` (string): AI Task name.
260
+ * `path` (string): Path scope used for action-triggered AI Tasks.
261
+ * `permission_set` (string): Permissions used by the internal API key for this AI Task. Valid values are `full` and `files_only`.
262
+ * `prompt` (string): Prompt sent when this AI Task is invoked.
263
+ * `recurring_day` (int64): If trigger is `daily`, this selects the day number inside the chosen interval.
264
+ * `schedule_days_of_week` (array(int64)): If trigger is `custom_schedule`, the 0-based weekdays used by the schedule.
265
+ * `schedule_time_zone` (string): Time zone used by the AI Task schedule.
266
+ * `schedule_times_of_day` (array(string)): Times of day in HH:MM format for scheduled AI Tasks.
267
+ * `source` (string): Source glob used with `path` for action-triggered AI Tasks.
268
+ * `trigger` (string): How this AI Task is triggered.
269
+ * `trigger_actions` (array(string)): If trigger is `action`, the file action types that invoke this AI Task. Valid actions are create, copy, move, archived_delete, update, read, destroy.
270
+ * `workspace_id` (int64): Workspace ID. `0` means the default workspace.
271
+
272
+
273
+ ---
274
+
275
+ ## Delete Ai Task
276
+
277
+ ```
278
+ ai_task = Files::AiTask.find(id)
279
+
280
+ ai_task.delete
281
+ ```
282
+
283
+ ### Parameters
284
+
285
+ * `id` (int64): Required - Ai Task ID.
data/docs/api_key.md CHANGED
@@ -20,7 +20,8 @@
20
20
  "site_id": 1,
21
21
  "site_name": "example",
22
22
  "url": "example",
23
- "user_id": 1
23
+ "user_id": 1,
24
+ "workspace_id": 1
24
25
  }
25
26
  ```
26
27
 
@@ -35,12 +36,13 @@
35
36
  * `aws_secret_key` (string): AWS Secret Key to use with AWS-compatible endpoints, such as our Inbound S3-compatible endpoint.
36
37
  * `last_use_at` (date-time): API Key last used - note this value is only updated once per 3 hour period, so the 'actual' time of last use may be up to 3 hours later than this timestamp.
37
38
  * `name` (string): Internal name for the API Key. For your use.
38
- * `permission_set` (string): Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
39
+ * `permission_set` (string): Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Keys with the `files_only` permission set can perform file operations as a full-access file user in the key's workspace scope, but cannot use site admin, workspace admin, folder admin, group admin, partner admin, or billing privileges from the owning user.
39
40
  * `platform` (string): If this API key represents a Desktop app, what platform was it created on?
40
41
  * `site_id` (int64): Site ID
41
42
  * `site_name` (string): Site Name
42
43
  * `url` (string): URL for API host.
43
44
  * `user_id` (int64): User ID for the owner of this API Key. May be blank for Site-wide API Keys.
45
+ * `workspace_id` (int64): Workspace ID for this API Key. `0` means the default workspace.
44
46
  * `path` (string): Folder path restriction for `office_integration` permission set API keys.
45
47
 
46
48
 
@@ -59,7 +61,7 @@ Files::ApiKey.list(
59
61
  * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
60
62
  * `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.
61
63
  * `per_page` (int64): Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
62
- * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`.
64
+ * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id` and `workspace_id`.
63
65
  * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `aws_style_credentials` and `expires_at`.
64
66
  * `filter_gt` (object): If set, return records where the specified field is greater than the supplied value. Valid fields are `expires_at`.
65
67
  * `filter_gteq` (object): If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `expires_at`.
@@ -101,7 +103,8 @@ Files::ApiKey.create(
101
103
  name: "My Main API Key",
102
104
  aws_style_credentials: true,
103
105
  path: "shared/docs",
104
- permission_set: "full"
106
+ permission_set: "full",
107
+ workspace_id: 1
105
108
  )
106
109
  ```
107
110
 
@@ -113,7 +116,8 @@ Files::ApiKey.create(
113
116
  * `name` (string): Required - Internal name for the API Key. For your use.
114
117
  * `aws_style_credentials` (boolean): If `true`, this API key will be usable with AWS-compatible endpoints, such as our Inbound S3-compatible endpoint.
115
118
  * `path` (string): Folder path restriction for `office_integration` permission set API keys.
116
- * `permission_set` (string): Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
119
+ * `permission_set` (string): Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Keys with the `files_only` permission set can perform file operations as a full-access file user in the key's workspace scope, but cannot use site admin, workspace admin, folder admin, group admin, partner admin, or billing privileges from the owning user.
120
+ * `workspace_id` (int64): Workspace ID for this API Key. `0` means the default workspace.
117
121
 
118
122
 
119
123
  ---
@@ -132,7 +136,7 @@ Files::ApiKey.update_current(
132
136
 
133
137
  * `expires_at` (string): API Key expiration date
134
138
  * `name` (string): Internal name for the API Key. For your use.
135
- * `permission_set` (string): Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
139
+ * `permission_set` (string): Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Keys with the `files_only` permission set can perform file operations as a full-access file user in the key's workspace scope, but cannot use site admin, workspace admin, folder admin, group admin, partner admin, or billing privileges from the owning user.
136
140
 
137
141
 
138
142
  ---
data/docs/chat_session.md CHANGED
@@ -6,6 +6,7 @@
6
6
  {
7
7
  "id": "example",
8
8
  "user_id": 1,
9
+ "ai_task_id": 1,
9
10
  "workspace_id": 1,
10
11
  "last_active_at": "2000-01-01T01:00:00Z",
11
12
  "created_at": "2000-01-01T01:00:00Z",
@@ -22,6 +23,7 @@
22
23
 
23
24
  * `id` (string): Chat Session ID.
24
25
  * `user_id` (int64): User ID.
26
+ * `ai_task_id` (int64): AI Task ID. Present when the conversation was started by an AI Task.
25
27
  * `workspace_id` (int64): Workspace ID. `0` means the default workspace.
26
28
  * `last_active_at` (date-time): Most recent chat activity date/time.
27
29
  * `created_at` (date-time): Chat session creation date/time.
@@ -40,6 +42,7 @@ Files::ChatSession.list
40
42
 
41
43
  * `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.
42
44
  * `per_page` (int64): Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
45
+ * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `ai_task_id`.
43
46
 
44
47
 
45
48
  ---
@@ -182,6 +182,7 @@ module Files
182
182
 
183
183
  class ProcessingFailureError < APIError; end
184
184
  class AgentUnavailableError < ProcessingFailureError; end
185
+ class AiTaskCannotBeRunManuallyError < ProcessingFailureError; end
185
186
  class AlreadyCompletedError < ProcessingFailureError; end
186
187
  class AutomationCannotBeRunManuallyError < ProcessingFailureError; end
187
188
  class BehaviorNotAllowedOnRemoteServerError < ProcessingFailureError; end
@@ -0,0 +1,425 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Files
4
+ class AiTask
5
+ attr_reader :options, :attributes
6
+
7
+ def initialize(attributes = {}, options = {})
8
+ @attributes = attributes || {}
9
+ @options = options || {}
10
+ end
11
+
12
+ # int64 - AI Task ID.
13
+ def id
14
+ @attributes[:id]
15
+ end
16
+
17
+ def id=(value)
18
+ @attributes[:id] = value
19
+ end
20
+
21
+ # int64 - Workspace ID. `0` means the default workspace.
22
+ def workspace_id
23
+ @attributes[:workspace_id]
24
+ end
25
+
26
+ def workspace_id=(value)
27
+ @attributes[:workspace_id] = value
28
+ end
29
+
30
+ # string - AI Task name.
31
+ def name
32
+ @attributes[:name]
33
+ end
34
+
35
+ def name=(value)
36
+ @attributes[:name] = value
37
+ end
38
+
39
+ # string - AI Task description.
40
+ def description
41
+ @attributes[:description]
42
+ end
43
+
44
+ def description=(value)
45
+ @attributes[:description] = value
46
+ end
47
+
48
+ # string - Prompt sent when this AI Task is invoked.
49
+ def prompt
50
+ @attributes[:prompt]
51
+ end
52
+
53
+ def prompt=(value)
54
+ @attributes[:prompt] = value
55
+ end
56
+
57
+ # string - Permissions used by the internal API key for this AI Task. Valid values are `full` and `files_only`.
58
+ def permission_set
59
+ @attributes[:permission_set]
60
+ end
61
+
62
+ def permission_set=(value)
63
+ @attributes[:permission_set] = value
64
+ end
65
+
66
+ # string - Path scope used for action-triggered AI Tasks. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
67
+ def path
68
+ @attributes[:path]
69
+ end
70
+
71
+ def path=(value)
72
+ @attributes[:path] = value
73
+ end
74
+
75
+ # string - Source glob used with `path` for action-triggered AI Tasks.
76
+ def source
77
+ @attributes[:source]
78
+ end
79
+
80
+ def source=(value)
81
+ @attributes[:source] = value
82
+ end
83
+
84
+ # boolean - If true, this AI Task will not run.
85
+ def disabled
86
+ @attributes[:disabled]
87
+ end
88
+
89
+ def disabled=(value)
90
+ @attributes[:disabled] = value
91
+ end
92
+
93
+ # string - How this AI Task is triggered.
94
+ def trigger
95
+ @attributes[:trigger]
96
+ end
97
+
98
+ def trigger=(value)
99
+ @attributes[:trigger] = value
100
+ end
101
+
102
+ # array(string) - If trigger is `action`, the file action types that invoke this AI Task. Valid actions are create, copy, move, archived_delete, update, read, destroy.
103
+ def trigger_actions
104
+ @attributes[:trigger_actions]
105
+ end
106
+
107
+ def trigger_actions=(value)
108
+ @attributes[:trigger_actions] = value
109
+ end
110
+
111
+ # string - If trigger is `daily`, this specifies how often to run the AI Task.
112
+ def interval
113
+ @attributes[:interval]
114
+ end
115
+
116
+ def interval=(value)
117
+ @attributes[:interval] = value
118
+ end
119
+
120
+ # int64 - If trigger is `daily`, this selects the day number inside the chosen interval.
121
+ def recurring_day
122
+ @attributes[:recurring_day]
123
+ end
124
+
125
+ def recurring_day=(value)
126
+ @attributes[:recurring_day] = value
127
+ end
128
+
129
+ # array(int64) - If trigger is `custom_schedule`, the 0-based weekdays used by the schedule.
130
+ def schedule_days_of_week
131
+ @attributes[:schedule_days_of_week]
132
+ end
133
+
134
+ def schedule_days_of_week=(value)
135
+ @attributes[:schedule_days_of_week] = value
136
+ end
137
+
138
+ # array(string) - Times of day in HH:MM format for scheduled AI Tasks.
139
+ def schedule_times_of_day
140
+ @attributes[:schedule_times_of_day]
141
+ end
142
+
143
+ def schedule_times_of_day=(value)
144
+ @attributes[:schedule_times_of_day] = value
145
+ end
146
+
147
+ # string - Time zone used by the AI Task schedule.
148
+ def schedule_time_zone
149
+ @attributes[:schedule_time_zone]
150
+ end
151
+
152
+ def schedule_time_zone=(value)
153
+ @attributes[:schedule_time_zone] = value
154
+ end
155
+
156
+ # string - Optional holiday region used by scheduled AI Tasks.
157
+ def holiday_region
158
+ @attributes[:holiday_region]
159
+ end
160
+
161
+ def holiday_region=(value)
162
+ @attributes[:holiday_region] = value
163
+ end
164
+
165
+ # string - Human-readable schedule description.
166
+ def human_readable_schedule
167
+ @attributes[:human_readable_schedule]
168
+ end
169
+
170
+ def human_readable_schedule=(value)
171
+ @attributes[:human_readable_schedule] = value
172
+ end
173
+
174
+ # date-time - Most recent successful invocation time.
175
+ def last_run_at
176
+ @attributes[:last_run_at]
177
+ end
178
+
179
+ def last_run_at=(value)
180
+ @attributes[:last_run_at] = value
181
+ end
182
+
183
+ # int64 - Master User ID used for AI Task invocations.
184
+ def master_admin_user_id
185
+ @attributes[:master_admin_user_id]
186
+ end
187
+
188
+ def master_admin_user_id=(value)
189
+ @attributes[:master_admin_user_id] = value
190
+ end
191
+
192
+ # date-time - Creation time.
193
+ def created_at
194
+ @attributes[:created_at]
195
+ end
196
+
197
+ # date-time - Last update time.
198
+ def updated_at
199
+ @attributes[:updated_at]
200
+ end
201
+
202
+ # Manually Run AI Task
203
+ def manual_run(params = {})
204
+ params ||= {}
205
+ params[:id] = @attributes[:id]
206
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
207
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
208
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
209
+
210
+ Api.send_request("/ai_tasks/#{@attributes[:id]}/manual_run", :post, params, @options)
211
+ end
212
+
213
+ # Parameters:
214
+ # description - string - AI Task description.
215
+ # disabled - boolean - If true, this AI Task will not run.
216
+ # holiday_region - string - Optional holiday region used by scheduled AI Tasks.
217
+ # interval - string - If trigger is `daily`, this specifies how often to run the AI Task.
218
+ # name - string - AI Task name.
219
+ # path - string - Path scope used for action-triggered AI Tasks.
220
+ # permission_set - string - Permissions used by the internal API key for this AI Task. Valid values are `full` and `files_only`.
221
+ # prompt - string - Prompt sent when this AI Task is invoked.
222
+ # recurring_day - int64 - If trigger is `daily`, this selects the day number inside the chosen interval.
223
+ # schedule_days_of_week - array(int64) - If trigger is `custom_schedule`, the 0-based weekdays used by the schedule.
224
+ # schedule_time_zone - string - Time zone used by the AI Task schedule.
225
+ # schedule_times_of_day - array(string) - Times of day in HH:MM format for scheduled AI Tasks.
226
+ # source - string - Source glob used with `path` for action-triggered AI Tasks.
227
+ # trigger - string - How this AI Task is triggered.
228
+ # trigger_actions - array(string) - If trigger is `action`, the file action types that invoke this AI Task. Valid actions are create, copy, move, archived_delete, update, read, destroy.
229
+ # workspace_id - int64 - Workspace ID. `0` means the default workspace.
230
+ def update(params = {})
231
+ params ||= {}
232
+ params[:id] = @attributes[:id]
233
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
234
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
235
+ raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String)
236
+ raise InvalidParameterError.new("Bad parameter: holiday_region must be an String") if params[:holiday_region] and !params[:holiday_region].is_a?(String)
237
+ raise InvalidParameterError.new("Bad parameter: interval must be an String") if params[:interval] and !params[:interval].is_a?(String)
238
+ raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
239
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
240
+ raise InvalidParameterError.new("Bad parameter: permission_set must be an String") if params[:permission_set] and !params[:permission_set].is_a?(String)
241
+ raise InvalidParameterError.new("Bad parameter: prompt must be an String") if params[:prompt] and !params[:prompt].is_a?(String)
242
+ raise InvalidParameterError.new("Bad parameter: recurring_day must be an Integer") if params[:recurring_day] and !params[:recurring_day].is_a?(Integer)
243
+ raise InvalidParameterError.new("Bad parameter: schedule_days_of_week must be an Array") if params[:schedule_days_of_week] and !params[:schedule_days_of_week].is_a?(Array)
244
+ raise InvalidParameterError.new("Bad parameter: schedule_time_zone must be an String") if params[:schedule_time_zone] and !params[:schedule_time_zone].is_a?(String)
245
+ raise InvalidParameterError.new("Bad parameter: schedule_times_of_day must be an Array") if params[:schedule_times_of_day] and !params[:schedule_times_of_day].is_a?(Array)
246
+ raise InvalidParameterError.new("Bad parameter: source must be an String") if params[:source] and !params[:source].is_a?(String)
247
+ raise InvalidParameterError.new("Bad parameter: trigger must be an String") if params[:trigger] and !params[:trigger].is_a?(String)
248
+ raise InvalidParameterError.new("Bad parameter: trigger_actions must be an Array") if params[:trigger_actions] and !params[:trigger_actions].is_a?(Array)
249
+ raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
250
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
251
+
252
+ Api.send_request("/ai_tasks/#{@attributes[:id]}", :patch, params, @options)
253
+ end
254
+
255
+ def delete(params = {})
256
+ params ||= {}
257
+ params[:id] = @attributes[:id]
258
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
259
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
260
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
261
+
262
+ Api.send_request("/ai_tasks/#{@attributes[:id]}", :delete, params, @options)
263
+ end
264
+
265
+ def destroy(params = {})
266
+ delete(params)
267
+ nil
268
+ end
269
+
270
+ def save
271
+ if @attributes[:id]
272
+ new_obj = update(@attributes)
273
+ else
274
+ new_obj = AiTask.create(@attributes, @options)
275
+ end
276
+
277
+ @attributes = new_obj.attributes
278
+ true
279
+ end
280
+
281
+ # Parameters:
282
+ # 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.
283
+ # per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
284
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `id`, `disabled` or `updated_at`.
285
+ # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `disabled`, `trigger` or `workspace_id`. Valid field combinations are `[ workspace_id, disabled ]`.
286
+ def self.list(params = {}, options = {})
287
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
288
+ raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
289
+ raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
290
+ raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
291
+
292
+ List.new(AiTask, params) do
293
+ Api.send_request("/ai_tasks", :get, params, options)
294
+ end
295
+ end
296
+
297
+ def self.all(params = {}, options = {})
298
+ list(params, options)
299
+ end
300
+
301
+ # Parameters:
302
+ # id (required) - int64 - Ai Task ID.
303
+ def self.find(id, params = {}, options = {})
304
+ params ||= {}
305
+ params[:id] = id
306
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
307
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
308
+
309
+ response, options = Api.send_request("/ai_tasks/#{params[:id]}", :get, params, options)
310
+ AiTask.new(response.data, options)
311
+ end
312
+
313
+ def self.get(id, params = {}, options = {})
314
+ find(id, params, options)
315
+ end
316
+
317
+ # Parameters:
318
+ # description - string - AI Task description.
319
+ # disabled - boolean - If true, this AI Task will not run.
320
+ # holiday_region - string - Optional holiday region used by scheduled AI Tasks.
321
+ # interval - string - If trigger is `daily`, this specifies how often to run the AI Task.
322
+ # name (required) - string - AI Task name.
323
+ # path - string - Path scope used for action-triggered AI Tasks.
324
+ # permission_set - string - Permissions used by the internal API key for this AI Task. Valid values are `full` and `files_only`.
325
+ # prompt (required) - string - Prompt sent when this AI Task is invoked.
326
+ # recurring_day - int64 - If trigger is `daily`, this selects the day number inside the chosen interval.
327
+ # schedule_days_of_week - array(int64) - If trigger is `custom_schedule`, the 0-based weekdays used by the schedule.
328
+ # schedule_time_zone - string - Time zone used by the AI Task schedule.
329
+ # schedule_times_of_day - array(string) - Times of day in HH:MM format for scheduled AI Tasks.
330
+ # source - string - Source glob used with `path` for action-triggered AI Tasks.
331
+ # trigger - string - How this AI Task is triggered.
332
+ # trigger_actions - array(string) - If trigger is `action`, the file action types that invoke this AI Task. Valid actions are create, copy, move, archived_delete, update, read, destroy.
333
+ # workspace_id - int64 - Workspace ID. `0` means the default workspace.
334
+ def self.create(params = {}, options = {})
335
+ raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String)
336
+ raise InvalidParameterError.new("Bad parameter: holiday_region must be an String") if params[:holiday_region] and !params[:holiday_region].is_a?(String)
337
+ raise InvalidParameterError.new("Bad parameter: interval must be an String") if params[:interval] and !params[:interval].is_a?(String)
338
+ raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
339
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
340
+ raise InvalidParameterError.new("Bad parameter: permission_set must be an String") if params[:permission_set] and !params[:permission_set].is_a?(String)
341
+ raise InvalidParameterError.new("Bad parameter: prompt must be an String") if params[:prompt] and !params[:prompt].is_a?(String)
342
+ raise InvalidParameterError.new("Bad parameter: recurring_day must be an Integer") if params[:recurring_day] and !params[:recurring_day].is_a?(Integer)
343
+ raise InvalidParameterError.new("Bad parameter: schedule_days_of_week must be an Array") if params[:schedule_days_of_week] and !params[:schedule_days_of_week].is_a?(Array)
344
+ raise InvalidParameterError.new("Bad parameter: schedule_time_zone must be an String") if params[:schedule_time_zone] and !params[:schedule_time_zone].is_a?(String)
345
+ raise InvalidParameterError.new("Bad parameter: schedule_times_of_day must be an Array") if params[:schedule_times_of_day] and !params[:schedule_times_of_day].is_a?(Array)
346
+ raise InvalidParameterError.new("Bad parameter: source must be an String") if params[:source] and !params[:source].is_a?(String)
347
+ raise InvalidParameterError.new("Bad parameter: trigger must be an String") if params[:trigger] and !params[:trigger].is_a?(String)
348
+ raise InvalidParameterError.new("Bad parameter: trigger_actions must be an Array") if params[:trigger_actions] and !params[:trigger_actions].is_a?(Array)
349
+ raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
350
+ raise MissingParameterError.new("Parameter missing: name") unless params[:name]
351
+ raise MissingParameterError.new("Parameter missing: prompt") unless params[:prompt]
352
+
353
+ response, options = Api.send_request("/ai_tasks", :post, params, options)
354
+ AiTask.new(response.data, options)
355
+ end
356
+
357
+ # Manually Run AI Task
358
+ def self.manual_run(id, params = {}, options = {})
359
+ params ||= {}
360
+ params[:id] = id
361
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
362
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
363
+
364
+ Api.send_request("/ai_tasks/#{params[:id]}/manual_run", :post, params, options)
365
+ nil
366
+ end
367
+
368
+ # Parameters:
369
+ # description - string - AI Task description.
370
+ # disabled - boolean - If true, this AI Task will not run.
371
+ # holiday_region - string - Optional holiday region used by scheduled AI Tasks.
372
+ # interval - string - If trigger is `daily`, this specifies how often to run the AI Task.
373
+ # name - string - AI Task name.
374
+ # path - string - Path scope used for action-triggered AI Tasks.
375
+ # permission_set - string - Permissions used by the internal API key for this AI Task. Valid values are `full` and `files_only`.
376
+ # prompt - string - Prompt sent when this AI Task is invoked.
377
+ # recurring_day - int64 - If trigger is `daily`, this selects the day number inside the chosen interval.
378
+ # schedule_days_of_week - array(int64) - If trigger is `custom_schedule`, the 0-based weekdays used by the schedule.
379
+ # schedule_time_zone - string - Time zone used by the AI Task schedule.
380
+ # schedule_times_of_day - array(string) - Times of day in HH:MM format for scheduled AI Tasks.
381
+ # source - string - Source glob used with `path` for action-triggered AI Tasks.
382
+ # trigger - string - How this AI Task is triggered.
383
+ # trigger_actions - array(string) - If trigger is `action`, the file action types that invoke this AI Task. Valid actions are create, copy, move, archived_delete, update, read, destroy.
384
+ # workspace_id - int64 - Workspace ID. `0` means the default workspace.
385
+ def self.update(id, params = {}, options = {})
386
+ params ||= {}
387
+ params[:id] = id
388
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
389
+ raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String)
390
+ raise InvalidParameterError.new("Bad parameter: holiday_region must be an String") if params[:holiday_region] and !params[:holiday_region].is_a?(String)
391
+ raise InvalidParameterError.new("Bad parameter: interval must be an String") if params[:interval] and !params[:interval].is_a?(String)
392
+ raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
393
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
394
+ raise InvalidParameterError.new("Bad parameter: permission_set must be an String") if params[:permission_set] and !params[:permission_set].is_a?(String)
395
+ raise InvalidParameterError.new("Bad parameter: prompt must be an String") if params[:prompt] and !params[:prompt].is_a?(String)
396
+ raise InvalidParameterError.new("Bad parameter: recurring_day must be an Integer") if params[:recurring_day] and !params[:recurring_day].is_a?(Integer)
397
+ raise InvalidParameterError.new("Bad parameter: schedule_days_of_week must be an Array") if params[:schedule_days_of_week] and !params[:schedule_days_of_week].is_a?(Array)
398
+ raise InvalidParameterError.new("Bad parameter: schedule_time_zone must be an String") if params[:schedule_time_zone] and !params[:schedule_time_zone].is_a?(String)
399
+ raise InvalidParameterError.new("Bad parameter: schedule_times_of_day must be an Array") if params[:schedule_times_of_day] and !params[:schedule_times_of_day].is_a?(Array)
400
+ raise InvalidParameterError.new("Bad parameter: source must be an String") if params[:source] and !params[:source].is_a?(String)
401
+ raise InvalidParameterError.new("Bad parameter: trigger must be an String") if params[:trigger] and !params[:trigger].is_a?(String)
402
+ raise InvalidParameterError.new("Bad parameter: trigger_actions must be an Array") if params[:trigger_actions] and !params[:trigger_actions].is_a?(Array)
403
+ raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
404
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
405
+
406
+ response, options = Api.send_request("/ai_tasks/#{params[:id]}", :patch, params, options)
407
+ AiTask.new(response.data, options)
408
+ end
409
+
410
+ def self.delete(id, params = {}, options = {})
411
+ params ||= {}
412
+ params[:id] = id
413
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
414
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
415
+
416
+ Api.send_request("/ai_tasks/#{params[:id]}", :delete, params, options)
417
+ nil
418
+ end
419
+
420
+ def self.destroy(id, params = {}, options = {})
421
+ delete(id, params, options)
422
+ nil
423
+ end
424
+ end
425
+ end
@@ -104,7 +104,7 @@ module Files
104
104
  @attributes[:name] = value
105
105
  end
106
106
 
107
- # string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
107
+ # string - Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Keys with the `files_only` permission set can perform file operations as a full-access file user in the key's workspace scope, but cannot use site admin, workspace admin, folder admin, group admin, partner admin, or billing privileges from the owning user.
108
108
  def permission_set
109
109
  @attributes[:permission_set]
110
110
  end
@@ -158,6 +158,15 @@ module Files
158
158
  @attributes[:user_id] = value
159
159
  end
160
160
 
161
+ # int64 - Workspace ID for this API Key. `0` means the default workspace.
162
+ def workspace_id
163
+ @attributes[:workspace_id]
164
+ end
165
+
166
+ def workspace_id=(value)
167
+ @attributes[:workspace_id] = value
168
+ end
169
+
161
170
  # string - Folder path restriction for `office_integration` permission set API keys.
162
171
  def path
163
172
  @attributes[:path]
@@ -214,7 +223,7 @@ module Files
214
223
  # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
215
224
  # 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.
216
225
  # per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
217
- # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`.
226
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id` and `workspace_id`.
218
227
  # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `aws_style_credentials` and `expires_at`.
219
228
  # filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `expires_at`.
220
229
  # filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `expires_at`.
@@ -268,7 +277,8 @@ module Files
268
277
  # name (required) - string - Internal name for the API Key. For your use.
269
278
  # aws_style_credentials - boolean - If `true`, this API key will be usable with AWS-compatible endpoints, such as our Inbound S3-compatible endpoint.
270
279
  # path - string - Folder path restriction for `office_integration` permission set API keys.
271
- # permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
280
+ # permission_set - string - Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Keys with the `files_only` permission set can perform file operations as a full-access file user in the key's workspace scope, but cannot use site admin, workspace admin, folder admin, group admin, partner admin, or billing privileges from the owning user.
281
+ # workspace_id - int64 - Workspace ID for this API Key. `0` means the default workspace.
272
282
  def self.create(params = {}, options = {})
273
283
  raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
274
284
  raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String)
@@ -276,6 +286,7 @@ module Files
276
286
  raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
277
287
  raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
278
288
  raise InvalidParameterError.new("Bad parameter: permission_set must be an String") if params[:permission_set] and !params[:permission_set].is_a?(String)
289
+ raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
279
290
  raise MissingParameterError.new("Parameter missing: name") unless params[:name]
280
291
 
281
292
  response, options = Api.send_request("/api_keys", :post, params, options)
@@ -285,7 +296,7 @@ module Files
285
296
  # Parameters:
286
297
  # expires_at - string - API Key expiration date
287
298
  # name - string - Internal name for the API Key. For your use.
288
- # permission_set - string - Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
299
+ # permission_set - string - Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Keys with the `files_only` permission set can perform file operations as a full-access file user in the key's workspace scope, but cannot use site admin, workspace admin, folder admin, group admin, partner admin, or billing privileges from the owning user.
289
300
  def self.update_current(params = {}, options = {})
290
301
  raise InvalidParameterError.new("Bad parameter: expires_at must be an String") if params[:expires_at] and !params[:expires_at].is_a?(String)
291
302
  raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
@@ -19,6 +19,11 @@ module Files
19
19
  @attributes[:user_id]
20
20
  end
21
21
 
22
+ # int64 - AI Task ID. Present when the conversation was started by an AI Task.
23
+ def ai_task_id
24
+ @attributes[:ai_task_id]
25
+ end
26
+
22
27
  # int64 - Workspace ID. `0` means the default workspace.
23
28
  def workspace_id
24
29
  @attributes[:workspace_id]
@@ -42,9 +47,11 @@ module Files
42
47
  # Parameters:
43
48
  # 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.
44
49
  # per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
50
+ # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `ai_task_id`.
45
51
  def self.list(params = {}, options = {})
46
52
  raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
47
53
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
54
+ raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
48
55
 
49
56
  List.new(ChatSession, params) do
50
57
  Api.send_request("/chat_sessions", :get, params, options)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
- VERSION = "1.1.661"
4
+ VERSION = "1.1.663"
5
5
  end
data/lib/files.com.rb CHANGED
@@ -38,6 +38,7 @@ require "files.com/models/action_log"
38
38
  require "files.com/models/action_notification_export"
39
39
  require "files.com/models/action_notification_export_result"
40
40
  require "files.com/models/agent_push_update"
41
+ require "files.com/models/ai_task"
41
42
  require "files.com/models/api_key"
42
43
  require "files.com/models/api_request_log"
43
44
  require "files.com/models/app"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: files.com
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.661
4
+ version: 1.1.663
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-26 00:00:00.000000000 Z
11
+ date: 2026-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -176,6 +176,7 @@ files:
176
176
  - docs/action_notification_export.md
177
177
  - docs/action_notification_export_result.md
178
178
  - docs/agent_push_update.md
179
+ - docs/ai_task.md
179
180
  - docs/api_key.md
180
181
  - docs/api_request_log.md
181
182
  - docs/app.md
@@ -318,6 +319,7 @@ files:
318
319
  - lib/files.com/models/action_notification_export.rb
319
320
  - lib/files.com/models/action_notification_export_result.rb
320
321
  - lib/files.com/models/agent_push_update.rb
322
+ - lib/files.com/models/ai_task.rb
321
323
  - lib/files.com/models/api_key.rb
322
324
  - lib/files.com/models/api_request_log.rb
323
325
  - lib/files.com/models/app.rb