@distilled.cloud/slack 1.0.0-rc.17 → 1.0.0-rc.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/lib/_bundle/sdk.js +1 -1
  2. package/lib/_bundle/sdk.js.map +1 -1
  3. package/lib/credentials.d.ts +2 -1
  4. package/lib/credentials.d.ts.map +1 -1
  5. package/lib/index.d.ts +3 -4
  6. package/lib/index.d.ts.map +1 -1
  7. package/lib/index.lazy.js.map +1 -1
  8. package/lib/protocol.d.ts +3 -2
  9. package/lib/protocol.d.ts.map +1 -1
  10. package/lib/services/admin.d.ts +594 -356
  11. package/lib/services/admin.d.ts.map +1 -1
  12. package/lib/services/admin.js +149 -139
  13. package/lib/services/admin.js.map +1 -1
  14. package/lib/services/agents.d.ts +89 -97
  15. package/lib/services/agents.d.ts.map +1 -1
  16. package/lib/services/agents.js +1 -1
  17. package/lib/services/agents.js.map +1 -1
  18. package/lib/services/api.d.ts +2 -2
  19. package/lib/services/api.d.ts.map +1 -1
  20. package/lib/services/api.js +1 -1
  21. package/lib/services/api.js.map +1 -1
  22. package/lib/services/apps.d.ts +74 -74
  23. package/lib/services/apps.d.ts.map +1 -1
  24. package/lib/services/apps.js +34 -33
  25. package/lib/services/apps.js.map +1 -1
  26. package/lib/services/assistant.d.ts +55 -46
  27. package/lib/services/assistant.d.ts.map +1 -1
  28. package/lib/services/assistant.js +1 -1
  29. package/lib/services/assistant.js.map +1 -1
  30. package/lib/services/auth.d.ts +27 -27
  31. package/lib/services/auth.d.ts.map +1 -1
  32. package/lib/services/auth.js +1 -1
  33. package/lib/services/auth.js.map +1 -1
  34. package/lib/services/blocks.d.ts +3 -3
  35. package/lib/services/blocks.d.ts.map +1 -1
  36. package/lib/services/blocks.js +1 -1
  37. package/lib/services/blocks.js.map +1 -1
  38. package/lib/services/bookmarks.d.ts +19 -19
  39. package/lib/services/bookmarks.d.ts.map +1 -1
  40. package/lib/services/bookmarks.js +1 -1
  41. package/lib/services/bookmarks.js.map +1 -1
  42. package/lib/services/bots.d.ts +23 -23
  43. package/lib/services/bots.d.ts.map +1 -1
  44. package/lib/services/bots.js +1 -1
  45. package/lib/services/bots.js.map +1 -1
  46. package/lib/services/calls.d.ts +10 -10
  47. package/lib/services/calls.d.ts.map +1 -1
  48. package/lib/services/calls.js +1 -1
  49. package/lib/services/calls.js.map +1 -1
  50. package/lib/services/canvases.d.ts +18 -18
  51. package/lib/services/canvases.d.ts.map +1 -1
  52. package/lib/services/canvases.js +1 -1
  53. package/lib/services/canvases.js.map +1 -1
  54. package/lib/services/chat.d.ts +103 -103
  55. package/lib/services/chat.d.ts.map +1 -1
  56. package/lib/services/chat.js +1 -1
  57. package/lib/services/chat.js.map +1 -1
  58. package/lib/services/conversations.d.ts +109 -103
  59. package/lib/services/conversations.d.ts.map +1 -1
  60. package/lib/services/conversations.js +39 -38
  61. package/lib/services/conversations.js.map +1 -1
  62. package/lib/services/dialog.d.ts.map +1 -1
  63. package/lib/services/dialog.js +1 -1
  64. package/lib/services/dialog.js.map +1 -1
  65. package/lib/services/dnd.d.ts +14 -14
  66. package/lib/services/dnd.d.ts.map +1 -1
  67. package/lib/services/dnd.js +1 -1
  68. package/lib/services/dnd.js.map +1 -1
  69. package/lib/services/emoji.d.ts +6 -6
  70. package/lib/services/emoji.d.ts.map +1 -1
  71. package/lib/services/emoji.js +1 -1
  72. package/lib/services/emoji.js.map +1 -1
  73. package/lib/services/entity.d.ts +14 -14
  74. package/lib/services/entity.d.ts.map +1 -1
  75. package/lib/services/entity.js +1 -1
  76. package/lib/services/entity.js.map +1 -1
  77. package/lib/services/files.d.ts +106 -106
  78. package/lib/services/files.d.ts.map +1 -1
  79. package/lib/services/files.js +30 -1
  80. package/lib/services/files.js.map +1 -1
  81. package/lib/services/functions.d.ts +37 -37
  82. package/lib/services/functions.d.ts.map +1 -1
  83. package/lib/services/functions.js +1 -1
  84. package/lib/services/functions.js.map +1 -1
  85. package/lib/services/index.d.ts +1 -0
  86. package/lib/services/index.d.ts.map +1 -1
  87. package/lib/services/index.js +1 -0
  88. package/lib/services/lists.d.ts +47 -45
  89. package/lib/services/lists.d.ts.map +1 -1
  90. package/lib/services/lists.js +1 -1
  91. package/lib/services/lists.js.map +1 -1
  92. package/lib/services/migration.d.ts +3 -3
  93. package/lib/services/migration.d.ts.map +1 -1
  94. package/lib/services/migration.js +1 -1
  95. package/lib/services/migration.js.map +1 -1
  96. package/lib/services/oauth.d.ts +102 -102
  97. package/lib/services/oauth.d.ts.map +1 -1
  98. package/lib/services/oauth.js +1 -1
  99. package/lib/services/oauth.js.map +1 -1
  100. package/lib/services/openid.d.ts +40 -40
  101. package/lib/services/openid.d.ts.map +1 -1
  102. package/lib/services/openid.js +1 -1
  103. package/lib/services/openid.js.map +1 -1
  104. package/lib/services/pins.d.ts +9 -9
  105. package/lib/services/pins.d.ts.map +1 -1
  106. package/lib/services/pins.js +1 -1
  107. package/lib/services/pins.js.map +1 -1
  108. package/lib/services/reactions.d.ts +23 -23
  109. package/lib/services/reactions.d.ts.map +1 -1
  110. package/lib/services/reactions.js +1 -1
  111. package/lib/services/reactions.js.map +1 -1
  112. package/lib/services/reminders.d.ts +8 -8
  113. package/lib/services/reminders.d.ts.map +1 -1
  114. package/lib/services/reminders.js +1 -1
  115. package/lib/services/reminders.js.map +1 -1
  116. package/lib/services/rtm.d.ts +11 -11
  117. package/lib/services/rtm.d.ts.map +1 -1
  118. package/lib/services/rtm.js +1 -1
  119. package/lib/services/rtm.js.map +1 -1
  120. package/lib/services/search.d.ts +84 -80
  121. package/lib/services/search.d.ts.map +1 -1
  122. package/lib/services/search.js +1 -1
  123. package/lib/services/search.js.map +1 -1
  124. package/lib/services/slackbot.d.ts +366 -0
  125. package/lib/services/slackbot.d.ts.map +1 -0
  126. package/lib/services/slackbot.js +2 -0
  127. package/lib/services/slackbot.js.map +1 -0
  128. package/lib/services/stars.d.ts +16 -16
  129. package/lib/services/stars.d.ts.map +1 -1
  130. package/lib/services/stars.js +1 -1
  131. package/lib/services/stars.js.map +1 -1
  132. package/lib/services/team.d.ts +39 -37
  133. package/lib/services/team.d.ts.map +1 -1
  134. package/lib/services/team.js +1 -1
  135. package/lib/services/team.js.map +1 -1
  136. package/lib/services/tooling.d.ts.map +1 -1
  137. package/lib/services/tooling.js +1 -1
  138. package/lib/services/tooling.js.map +1 -1
  139. package/lib/services/usergroups.d.ts +30 -30
  140. package/lib/services/usergroups.d.ts.map +1 -1
  141. package/lib/services/usergroups.js +1 -1
  142. package/lib/services/usergroups.js.map +1 -1
  143. package/lib/services/users.d.ts +37 -37
  144. package/lib/services/users.d.ts.map +1 -1
  145. package/lib/services/users.js +1 -1
  146. package/lib/services/users.js.map +1 -1
  147. package/lib/services/views.d.ts +9 -9
  148. package/lib/services/views.d.ts.map +1 -1
  149. package/lib/services/views.js +1 -1
  150. package/lib/services/views.js.map +1 -1
  151. package/lib/services/workflows.d.ts +16 -16
  152. package/lib/services/workflows.d.ts.map +1 -1
  153. package/lib/services/workflows.js +1 -1
  154. package/lib/services/workflows.js.map +1 -1
  155. package/lib/services.lazy/admin.js +2 -2
  156. package/lib/services.lazy/apps.js +1 -1
  157. package/lib/services.lazy/conversations.js +1 -1
  158. package/lib/services.lazy/files.js +3 -1
  159. package/lib/services.lazy/index.js +2 -2
  160. package/lib/services.lazy/slackbot.js +1 -0
  161. package/package.json +8 -7
  162. package/src/credentials.ts +3 -2
  163. package/src/index.ts +3 -4
  164. package/src/protocol.ts +23 -21
  165. package/src/services/admin.ts +1882 -1034
  166. package/src/services/agents.ts +128 -103
  167. package/src/services/api.ts +17 -2
  168. package/src/services/apps.ts +133 -74
  169. package/src/services/assistant.ts +109 -54
  170. package/src/services/auth.ts +46 -27
  171. package/src/services/blocks.ts +18 -3
  172. package/src/services/bookmarks.ts +40 -19
  173. package/src/services/bots.ts +38 -23
  174. package/src/services/calls.ts +35 -10
  175. package/src/services/canvases.ts +77 -46
  176. package/src/services/chat.ts +142 -103
  177. package/src/services/conversations.ts +195 -115
  178. package/src/services/dialog.ts +15 -0
  179. package/src/services/dnd.ts +37 -14
  180. package/src/services/emoji.ts +21 -6
  181. package/src/services/entity.ts +33 -14
  182. package/src/services/files.ts +149 -106
  183. package/src/services/functions.ts +66 -37
  184. package/src/services/index.ts +1 -0
  185. package/src/services/lists.ts +86 -46
  186. package/src/services/migration.ts +18 -3
  187. package/src/services/oauth.ts +127 -102
  188. package/src/services/openid.ts +57 -40
  189. package/src/services/pins.ts +28 -9
  190. package/src/services/reactions.ts +44 -23
  191. package/src/services/reminders.ts +31 -8
  192. package/src/services/rtm.ts +28 -11
  193. package/src/services/search.ts +142 -130
  194. package/src/services/slackbot.ts +766 -0
  195. package/src/services/stars.ts +35 -16
  196. package/src/services/team.ts +73 -37
  197. package/src/services/tooling.ts +15 -0
  198. package/src/services/usergroups.ts +57 -30
  199. package/src/services/users.ts +76 -37
  200. package/src/services/views.ts +30 -9
  201. package/src/services/workflows.ts +45 -16
@@ -12,17 +12,30 @@ const __s: any[] = [];
12
12
 
13
13
  export type { SlackOpError, SlackOpContext };
14
14
 
15
+ /** Span facts shared by every operation (com.distilled.telemetry#service). */
16
+ const TELEMETRY = {
17
+ system: "slack-api",
18
+ responseHeaders: [
19
+ { header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
20
+ { header: "request-id", name: "http.response.header.request-id", transform: "list" },
21
+ { header: "x-slack-req-id", name: "http.response.header.x-slack-req-id", transform: "list" },
22
+ ],
23
+ prefix: "Slack",
24
+ service: "Files",
25
+ propagate: "w3c",
26
+ } as const;
27
+
15
28
  export interface AddRemoteRequest {
16
29
  /** Creator defined GUID for the file. */
17
30
  external_id: string;
18
31
  /** URL of the remote file. */
19
32
  external_url: string;
20
33
  /** type of file */
21
- filetype?: string;
34
+ filetype?: string | undefined;
22
35
  /** A text file (txt, pdf, doc, etc.) containing textual search terms that are used to improve discovery of the remote file. */
23
- indexable_file_contents?: unknown;
36
+ indexable_file_contents?: unknown | undefined;
24
37
  /** Preview of the document via `multipart/form-data`. */
25
- preview_image?: unknown;
38
+ preview_image?: unknown | undefined;
26
39
  /** Title of the file being shared. */
27
40
  title: string;
28
41
  }
@@ -31,35 +44,35 @@ export type AddRemoteResponseFileChannelsList = Array<string>;
31
44
  export type AddRemoteResponseFileGroupsList = Array<string>;
32
45
  export type AddRemoteResponseFileImsList = Array<string>;
33
46
  export interface AddRemoteResponseFile {
34
- id?: string;
35
- created?: number;
36
- timestamp?: number;
37
- name?: string;
38
- title?: string;
39
- mimetype?: string;
40
- filetype?: string;
41
- pretty_type?: string;
42
- user?: string;
43
- editable?: boolean;
44
- size?: number;
45
- mode?: string;
46
- is_external?: boolean;
47
- external_type?: string;
48
- is_public?: boolean;
49
- public_url_shared?: boolean;
50
- display_as_bot?: boolean;
51
- username?: string;
52
- url_private?: string;
53
- permalink?: string;
54
- comments_count?: number;
55
- is_starred?: boolean;
56
- shares?: AddRemoteResponseFileSharesMap;
57
- channels?: AddRemoteResponseFileChannelsList;
58
- groups?: AddRemoteResponseFileGroupsList;
59
- ims?: AddRemoteResponseFileImsList;
60
- external_id?: string;
61
- external_url?: string;
62
- has_rich_preview?: boolean;
47
+ id?: string | undefined;
48
+ created?: number | undefined;
49
+ timestamp?: number | undefined;
50
+ name?: string | undefined;
51
+ title?: string | undefined;
52
+ mimetype?: string | undefined;
53
+ filetype?: string | undefined;
54
+ pretty_type?: string | undefined;
55
+ user?: string | undefined;
56
+ editable?: boolean | undefined;
57
+ size?: number | undefined;
58
+ mode?: string | undefined;
59
+ is_external?: boolean | undefined;
60
+ external_type?: string | undefined;
61
+ is_public?: boolean | undefined;
62
+ public_url_shared?: boolean | undefined;
63
+ display_as_bot?: boolean | undefined;
64
+ username?: string | undefined;
65
+ url_private?: string | undefined;
66
+ permalink?: string | undefined;
67
+ comments_count?: number | undefined;
68
+ is_starred?: boolean | undefined;
69
+ shares?: AddRemoteResponseFileSharesMap | undefined;
70
+ channels?: AddRemoteResponseFileChannelsList | undefined;
71
+ groups?: AddRemoteResponseFileGroupsList | undefined;
72
+ ims?: AddRemoteResponseFileImsList | undefined;
73
+ external_id?: string | undefined;
74
+ external_url?: string | undefined;
75
+ has_rich_preview?: boolean | undefined;
63
76
  }
64
77
  export interface AddRemoteResponse {
65
78
  /** Always `true` (a failed call raises a typed error instead). */
@@ -70,9 +83,9 @@ export interface CompleteUploadExternalRequestFilesItem {
70
83
  /** File ID returned from files.getUploadURL. */
71
84
  id: string;
72
85
  /** Title of file. */
73
- title?: string;
86
+ title?: string | undefined;
74
87
  /** Optional highlight type hint for the file. The upload processing job may overwrite this value. */
75
- highlight_type?: string;
88
+ highlight_type?: string | undefined;
76
89
  }
77
90
  /** Array of file ids and their corresponding (optional) titles. */
78
91
  export type CompleteUploadExternalRequestFilesList = Array<CompleteUploadExternalRequestFilesItem>;
@@ -89,31 +102,31 @@ export interface CompleteUploadExternalRequest {
89
102
  /** Array of file ids and their corresponding (optional) titles. */
90
103
  files: CompleteUploadExternalRequestFilesList;
91
104
  /** Channel ID where the file will be shared. If not specified the file will be private. */
92
- channel_id?: string;
105
+ channel_id?: string | undefined;
93
106
  /** Provide another message's `ts` value to upload this file as a reply. Never use a reply's `ts` value; use its parent instead. Also make sure to provide only one channel when using 'thread_ts' */
94
- thread_ts?: string;
107
+ thread_ts?: string | undefined;
95
108
  /** Comma-separated string of channel IDs or user IDs where the file will be shared. */
96
- channels?: string;
109
+ channels?: string | undefined;
97
110
  /** The message text introducing the file in specified channels. */
98
- initial_comment?: string;
111
+ initial_comment?: string | undefined;
99
112
  /** A JSON-based array of structured rich text blocks, presented as a URL-encoded string. If the `initial_comment` field is provided, the `blocks` field is ignored */
100
- blocks?: CompleteUploadExternalRequestBlocks;
113
+ blocks?: CompleteUploadExternalRequestBlocks | undefined;
101
114
  /** Set your bot's user name for the file share message. Requires the [`chat:write.customize`](/reference/scopes/chat.write.customize) scope. */
102
- username?: string | null;
115
+ username?: string | null | undefined;
103
116
  /** URL to an image to use as the icon for the file share message. Requires the [`chat:write.customize`](/reference/scopes/chat.write.customize) scope. */
104
- icon_url?: string | null;
117
+ icon_url?: string | null | undefined;
105
118
  /** Emoji to use as the icon for the file share message. Overrides `icon_url`. Requires the [`chat:write.customize`](/reference/scopes/chat.write.customize) scope. */
106
- icon_emoji?: string | null;
119
+ icon_emoji?: string | null | undefined;
107
120
  }
108
121
  export interface CompleteUploadExternalResponseFilesItem {
109
122
  /** File ID returned from files.getUploadURLExternal. */
110
123
  id: string;
111
124
  /** Title of file. */
112
- title?: unknown;
125
+ title?: unknown | undefined;
113
126
  /** file created timestamp */
114
- created?: number;
127
+ created?: number | undefined;
115
128
  /** file owner */
116
- user?: string;
129
+ user?: string | undefined;
117
130
  }
118
131
  /** Array of files uploaded. */
119
132
  export type CompleteUploadExternalResponseFilesList =
@@ -143,14 +156,14 @@ export interface DeleteFileResponse {
143
156
  ok: boolean;
144
157
  }
145
158
  export interface FilesInfoRequest {
146
- count?: number;
159
+ count?: number | undefined;
147
160
  /** Parameter for pagination. File comments are paginated for a single file. Set `cursor` equal to the `next_cursor` attribute returned by the previous request's `response_metadata`. This parameter is optional, but pagination is mandatory: the default value simply fetches the first "page" of the collection of comments. See [pagination](/apis/web-api/pagination) for more details. */
148
- cursor?: string;
161
+ cursor?: string | undefined;
149
162
  /** Specify a file by providing its ID. */
150
163
  file: string;
151
164
  /** The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. */
152
- limit?: number;
153
- page?: number;
165
+ limit?: number | undefined;
166
+ page?: number | undefined;
154
167
  }
155
168
  export interface FilesInfoResponseFile {
156
169
  id: string;
@@ -167,18 +180,18 @@ export type FilesInfoResponseCommentsList = Array<FilesInfoResponseCommentsItem>
167
180
  /** Pagination metadata. An empty `next_cursor` means the last page. */
168
181
  export interface FilesInfoResponseResponseMetadata {
169
182
  /** Cursor for the next page -- pass as `cursor` on the next call. */
170
- next_cursor?: string;
183
+ next_cursor?: string | undefined;
171
184
  }
172
185
  export interface FilesInfoResponse {
173
186
  /** Always `true` (a failed call raises a typed error instead). */
174
187
  ok: boolean;
175
188
  file: FilesInfoResponseFile;
176
189
  comments: FilesInfoResponseCommentsList;
177
- content?: string;
178
- content_html?: unknown;
179
- content_highlight_html?: unknown;
190
+ content?: string | undefined;
191
+ content_html?: unknown | undefined;
192
+ content_highlight_html?: unknown | undefined;
180
193
  /** Pagination metadata. An empty `next_cursor` means the last page. */
181
- response_metadata?: FilesInfoResponseResponseMetadata;
194
+ response_metadata?: FilesInfoResponseResponseMetadata | undefined;
182
195
  }
183
196
  export interface GetUploadURLExternalRequest {
184
197
  /** Size in bytes of the file being uploaded. */
@@ -186,9 +199,9 @@ export interface GetUploadURLExternalRequest {
186
199
  /** Name of the file being uploaded. */
187
200
  filename: string;
188
201
  /** Syntax type of the snippet being uploaded. */
189
- snippet_type?: string;
202
+ snippet_type?: string | undefined;
190
203
  /** Description of image for screen-reader. */
191
- alt_txt?: string;
204
+ alt_txt?: string | undefined;
192
205
  }
193
206
  export interface GetUploadURLExternalResponse {
194
207
  /** Always `true` (a failed call raises a typed error instead). */
@@ -200,30 +213,30 @@ export type ListFilesRequestCount = number | string;
200
213
  export type ListFilesRequestPage = number | string;
201
214
  export interface ListFilesRequest {
202
215
  /** Filter files appearing in a specific channel, indicated by its ID. */
203
- channel?: string;
204
- count?: ListFilesRequestCount;
205
- page?: ListFilesRequestPage;
216
+ channel?: string | undefined;
217
+ count?: ListFilesRequestCount | undefined;
218
+ page?: ListFilesRequestPage | undefined;
206
219
  /** Show truncated file info for files hidden due to being too old, and the team who owns the file being over the file limit. */
207
- show_files_hidden_by_limit?: boolean;
220
+ show_files_hidden_by_limit?: boolean | undefined;
208
221
  /** encoded team id to list files in, required if org token is used */
209
- team_id?: string;
222
+ team_id?: string | undefined;
210
223
  /** Filter files created after this timestamp (inclusive). */
211
- ts_from?: string;
224
+ ts_from?: string | undefined;
212
225
  /** Filter files created before this timestamp (inclusive). */
213
- ts_to?: string;
226
+ ts_to?: string | undefined;
214
227
  /** Filter files by type ([see below](#file_types)). You can pass multiple values in the types argument, like `types=spaces,snippets`.The default value is `all`, which does not filter the list. */
215
- types?: string;
228
+ types?: string | undefined;
216
229
  /** Filter files created by a single user. */
217
- user?: string;
230
+ user?: string | undefined;
218
231
  }
219
232
  export interface ListFilesResponseFilesItem {
220
233
  id: string;
221
- created?: number;
222
- user?: string;
234
+ created?: number | undefined;
235
+ user?: string | undefined;
223
236
  }
224
237
  export type ListFilesResponseFilesList = Array<ListFilesResponseFilesItem>;
225
238
  export interface ListFilesResponsePaging {
226
- count?: number;
239
+ count?: number | undefined;
227
240
  total: number;
228
241
  page: number;
229
242
  pages: number;
@@ -232,22 +245,22 @@ export interface ListFilesResponse {
232
245
  /** Always `true` (a failed call raises a typed error instead). */
233
246
  ok: boolean;
234
247
  files: ListFilesResponseFilesList;
235
- paging?: ListFilesResponsePaging;
248
+ paging?: ListFilesResponsePaging | undefined;
236
249
  }
237
250
  export interface ListRemoteRequest {
238
251
  /** Filter files appearing in a specific channel, indicated by its ID. */
239
- channel?: string;
252
+ channel?: string | undefined;
240
253
  /** Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/apis/web-api/pagination) for more detail. */
241
- cursor?: string;
254
+ cursor?: string | undefined;
242
255
  /** The maximum number of items to return. */
243
- limit?: number;
256
+ limit?: number | undefined;
244
257
  /** Filter files created after this timestamp (inclusive). */
245
- ts_from?: string;
258
+ ts_from?: string | undefined;
246
259
  /** Filter files created before this timestamp (inclusive). */
247
- ts_to?: string;
260
+ ts_to?: string | undefined;
248
261
  }
249
262
  export interface ListRemoteResponseFilesItem {
250
- id?: string;
263
+ id?: string | undefined;
251
264
  }
252
265
  export type ListRemoteResponseFilesList = Array<ListRemoteResponseFilesItem>;
253
266
  /** Pagination metadata. An empty `next_cursor` means the last page. */
@@ -257,13 +270,13 @@ export interface ListRemoteResponse {
257
270
  ok: boolean;
258
271
  files: ListRemoteResponseFilesList;
259
272
  /** Pagination metadata. An empty `next_cursor` means the last page. */
260
- response_metadata?: FilesInfoResponseResponseMetadata;
273
+ response_metadata?: FilesInfoResponseResponseMetadata | undefined;
261
274
  }
262
275
  export interface RemoteInfoRequest {
263
276
  /** Creator defined GUID for the file. */
264
- external_id?: string;
277
+ external_id?: string | undefined;
265
278
  /** Specify a file by providing its ID. */
266
- file?: string;
279
+ file?: string | undefined;
267
280
  }
268
281
  export type RemoteInfoResponseFile = ListFilesResponseFilesItem;
269
282
  export interface RemoteInfoResponse {
@@ -273,9 +286,9 @@ export interface RemoteInfoResponse {
273
286
  }
274
287
  export interface RemoveRemoteRequest {
275
288
  /** Creator defined GUID for the file. */
276
- external_id?: string;
289
+ external_id?: string | undefined;
277
290
  /** Specify a file by providing its ID. */
278
- file?: string;
291
+ file?: string | undefined;
279
292
  }
280
293
  export interface RemoveRemoteResponse {
281
294
  /** Always `true` (a failed call raises a typed error instead). */
@@ -286,9 +299,9 @@ export interface RevokePublicURLRequest {
286
299
  file: string;
287
300
  }
288
301
  export interface RevokePublicURLResponseFile {
289
- id?: string;
290
- created?: number;
291
- user?: string;
302
+ id?: string | undefined;
303
+ created?: number | undefined;
304
+ user?: string | undefined;
292
305
  }
293
306
  export interface RevokePublicURLResponse {
294
307
  /** Always `true` (a failed call raises a typed error instead). */
@@ -307,62 +320,62 @@ export interface SharedPublicURLResponse {
307
320
  /** Always `true` (a failed call raises a typed error instead). */
308
321
  ok: boolean;
309
322
  file: RevokePublicURLResponseFile;
310
- comment?: SharedPublicURLResponseCommentList;
311
- paging?: SharedPublicURLResponsePagingMap;
323
+ comment?: SharedPublicURLResponseCommentList | undefined;
324
+ paging?: SharedPublicURLResponsePagingMap | undefined;
312
325
  }
313
326
  export interface ShareRemoteRequest {
314
327
  /** Comma-separated list of channel IDs where the file will be shared. */
315
328
  channels: string;
316
329
  /** The globally unique identifier (GUID) for the file, as set by the app registering the file with Slack. Either this field or `file` or both are required. */
317
- external_id?: string;
330
+ external_id?: string | undefined;
318
331
  /** Specify a file registered with Slack by providing its ID. Either this field or `external_id` or both are required. */
319
- file?: string;
332
+ file?: string | undefined;
320
333
  }
321
334
  export type ShareRemoteResponseFile = ListRemoteResponseFilesItem;
322
335
  export interface ShareRemoteResponse {
323
336
  /** Always `true` (a failed call raises a typed error instead). */
324
337
  ok: boolean;
325
- file?: ListRemoteResponseFilesItem;
338
+ file?: ListRemoteResponseFilesItem | undefined;
326
339
  }
327
340
  export interface UpdateRemoteRequest {
328
341
  /** Creator defined GUID for the file. */
329
- external_id?: string;
342
+ external_id?: string | undefined;
330
343
  /** URL of the remote file. */
331
- external_url?: string;
344
+ external_url?: string | undefined;
332
345
  /** Specify a file by providing its ID. */
333
- file?: string;
346
+ file?: string | undefined;
334
347
  /** type of file */
335
- filetype?: string;
348
+ filetype?: string | undefined;
336
349
  /** File containing contents that can be used to improve searchability for the remote file. */
337
- indexable_file_contents?: unknown;
350
+ indexable_file_contents?: unknown | undefined;
338
351
  /** Preview of the document via `multipart/form-data`. */
339
- preview_image?: unknown;
352
+ preview_image?: unknown | undefined;
340
353
  /** Title of the file being shared. */
341
- title?: string;
354
+ title?: string | undefined;
342
355
  }
343
356
  export type UpdateRemoteResponseFile = ListRemoteResponseFilesItem;
344
357
  export interface UpdateRemoteResponse {
345
358
  /** Always `true` (a failed call raises a typed error instead). */
346
359
  ok: boolean;
347
- file?: ListRemoteResponseFilesItem;
360
+ file?: ListRemoteResponseFilesItem | undefined;
348
361
  }
349
362
  export interface UploadFileRequest {
350
363
  /** Comma-separated list of channel names or IDs where the file will be shared. */
351
- channels?: string;
364
+ channels?: string | undefined;
352
365
  /** File contents via a POST variable. If omitting this parameter, you must provide a `file`. */
353
- content?: string;
366
+ content?: string | undefined;
354
367
  /** File contents via `multipart/form-data`. If omitting this parameter, you must submit `content`. */
355
- file?: unknown;
368
+ file?: unknown | undefined;
356
369
  /** Filename of file. */
357
- filename?: string;
370
+ filename?: string | undefined;
358
371
  /** A [file type](/reference/objects/file-object#file_types) identifier. */
359
- filetype?: string;
372
+ filetype?: string | undefined;
360
373
  /** The message text introducing the file in specified `channels`. */
361
- initial_comment?: string;
374
+ initial_comment?: string | undefined;
362
375
  /** Provide another message's `ts` value to upload this file as a reply. Never use a reply's `ts` value; use its parent instead. */
363
- thread_ts?: string;
376
+ thread_ts?: string | undefined;
364
377
  /** Title of file. */
365
- title?: string;
378
+ title?: string | undefined;
366
379
  }
367
380
  export type UploadFileResponseFile = RevokePublicURLResponseFile;
368
381
  export interface UploadFileResponse {
@@ -371,7 +384,7 @@ export interface UploadFileResponse {
371
384
  file: RevokePublicURLResponseFile;
372
385
  }
373
386
  export type AddRemoteError = SlackOpError;
374
- /** Adds a file from a remote service Required scopes -- bot: `remote_files:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `bad_image` -- The uploaded image could not be processed - try passing a JPG or PNG - `bad_title` -- The title provided is too long. - `bot_user_required` -- bot user token is required - `invalid_external_id` -- The external_id provided is too long. - `too_large` -- The uploaded image had excessive dimensions See https://docs.slack.dev/reference/methods/files.remote.add */
387
+ /** Adds a file from a remote service Required scopes -- bot: `remote_files:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `bad_image` -- The uploaded image could not be processed - try passing a JPG or PNG - `bad_title` -- The title provided is too long. - `bot_user_required` -- bot user token is required - `invalid_external_id` -- The external_id provided is too long (over 255 characters) or contains non-ASCII characters. - `too_large` -- The uploaded image had excessive dimensions See https://docs.slack.dev/reference/methods/files.remote.add */
375
388
  export const addRemote: API.OperationMethod<
376
389
  AddRemoteRequest,
377
390
  AddRemoteResponse,
@@ -383,6 +396,8 @@ export const addRemote: API.OperationMethod<
383
396
  errors: [SlackError, SlackRateLimited],
384
397
  protocol: SlackProtocol,
385
398
  retry: Retry.Retry,
399
+ telemetry: TELEMETRY,
400
+ span: "AddRemote",
386
401
  }));
387
402
 
388
403
  export type CompleteUploadExternalError = SlackOpError;
@@ -398,6 +413,8 @@ export const completeUploadExternal: API.OperationMethod<
398
413
  errors: [SlackError, SlackRateLimited],
399
414
  protocol: SlackProtocol,
400
415
  retry: Retry.Retry,
416
+ telemetry: TELEMETRY,
417
+ span: "CompleteUploadExternal",
401
418
  }));
402
419
 
403
420
  export type DeleteCommentError = SlackOpError;
@@ -413,10 +430,12 @@ export const deleteComment: API.OperationMethod<
413
430
  errors: [SlackError, SlackRateLimited],
414
431
  protocol: SlackProtocol,
415
432
  retry: Retry.Retry,
433
+ telemetry: TELEMETRY,
434
+ span: "DeleteComment",
416
435
  }));
417
436
 
418
437
  export type DeleteFileError = SlackOpError;
419
- /** Deletes a file. Required scopes -- bot: `files:write`; user: `files:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `cant_delete_file` -- Authenticated user does not have permission to delete this file. - `delete_not_allowed` -- Error returned when the requested file does not support deletion; for example, when attempting to delete a canvas template. - `file_deleted` -- The file has already been deleted. - `file_deleting_disabled` -- This functionality is disabled. - `file_not_found` -- The file does not exist, or is not visible to the calling user. See https://docs.slack.dev/reference/methods/files.delete */
438
+ /** Deletes a file. Required scopes -- bot: `files:write`; user: `files:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `cant_delete_file` -- Authenticated user does not have permission to delete this file. - `delete_not_allowed` -- Error returned when the requested file does not support deletion; for example, when attempting to delete a canvas template. - `file_deleted` -- The file has already been deleted. - `file_deleting_disabled` -- This functionality is disabled. - `file_not_found` -- The file does not exist, or is not visible to the calling user. - `use_skills_api` -- This file is a Slackbot skill. Use slackbot.skills.delete with skill_id and a user OAuth token carrying skills:write. See https://docs.slack.dev/reference/methods/files.delete */
420
439
  export const deleteFile: API.OperationMethod<
421
440
  DeleteFileRequest,
422
441
  DeleteFileResponse,
@@ -428,6 +447,8 @@ export const deleteFile: API.OperationMethod<
428
447
  errors: [SlackError, SlackRateLimited],
429
448
  protocol: SlackProtocol,
430
449
  retry: Retry.Retry,
450
+ telemetry: TELEMETRY,
451
+ span: "DeleteFile",
431
452
  }));
432
453
 
433
454
  export type FilesInfoError = SlackOpError;
@@ -445,6 +466,8 @@ export const filesInfo: API.PaginatedOperationMethod<
445
466
  errors: [SlackError, SlackRateLimited],
446
467
  protocol: SlackProtocol,
447
468
  retry: Retry.Retry,
469
+ telemetry: TELEMETRY,
470
+ span: "FilesInfo",
448
471
  pagination: {
449
472
  mode: "cursor",
450
473
  inputToken: "cursor",
@@ -469,6 +492,8 @@ export const getUploadURLExternal: API.OperationMethod<
469
492
  errors: [SlackError, SlackRateLimited],
470
493
  protocol: SlackProtocol,
471
494
  retry: Retry.Retry,
495
+ telemetry: TELEMETRY,
496
+ span: "GetUploadURLExternal",
472
497
  }));
473
498
 
474
499
  export type ListFilesError = SlackOpError;
@@ -484,6 +509,8 @@ export const listFiles: API.OperationMethod<
484
509
  errors: [SlackError, SlackRateLimited],
485
510
  protocol: SlackProtocol,
486
511
  retry: Retry.Retry,
512
+ telemetry: TELEMETRY,
513
+ span: "ListFiles",
487
514
  }));
488
515
 
489
516
  export type ListRemoteError = SlackOpError;
@@ -501,6 +528,8 @@ export const listRemote: API.PaginatedOperationMethod<
501
528
  errors: [SlackError, SlackRateLimited],
502
529
  protocol: SlackProtocol,
503
530
  retry: Retry.Retry,
531
+ telemetry: TELEMETRY,
532
+ span: "ListRemote",
504
533
  pagination: {
505
534
  mode: "cursor",
506
535
  inputToken: "cursor",
@@ -525,6 +554,8 @@ export const remoteInfo: API.OperationMethod<
525
554
  errors: [SlackError, SlackRateLimited],
526
555
  protocol: SlackProtocol,
527
556
  retry: Retry.Retry,
557
+ telemetry: TELEMETRY,
558
+ span: "RemoteInfo",
528
559
  }));
529
560
 
530
561
  export type RemoveRemoteError = SlackOpError;
@@ -540,6 +571,8 @@ export const removeRemote: API.OperationMethod<
540
571
  errors: [SlackError, SlackRateLimited],
541
572
  protocol: SlackProtocol,
542
573
  retry: Retry.Retry,
574
+ telemetry: TELEMETRY,
575
+ span: "RemoveRemote",
543
576
  }));
544
577
 
545
578
  export type RevokePublicURLError = SlackOpError;
@@ -555,6 +588,8 @@ export const revokePublicURL: API.OperationMethod<
555
588
  errors: [SlackError, SlackRateLimited],
556
589
  protocol: SlackProtocol,
557
590
  retry: Retry.Retry,
591
+ telemetry: TELEMETRY,
592
+ span: "RevokePublicURL",
558
593
  }));
559
594
 
560
595
  export type SharedPublicURLError = SlackOpError;
@@ -570,6 +605,8 @@ export const sharedPublicURL: API.OperationMethod<
570
605
  errors: [SlackError, SlackRateLimited],
571
606
  protocol: SlackProtocol,
572
607
  retry: Retry.Retry,
608
+ telemetry: TELEMETRY,
609
+ span: "SharedPublicURL",
573
610
  }));
574
611
 
575
612
  export type ShareRemoteError = SlackOpError;
@@ -585,6 +622,8 @@ export const shareRemote: API.OperationMethod<
585
622
  errors: [SlackError, SlackRateLimited],
586
623
  protocol: SlackProtocol,
587
624
  retry: Retry.Retry,
625
+ telemetry: TELEMETRY,
626
+ span: "ShareRemote",
588
627
  }));
589
628
 
590
629
  export type UpdateRemoteError = SlackOpError;
@@ -600,6 +639,8 @@ export const updateRemote: API.OperationMethod<
600
639
  errors: [SlackError, SlackRateLimited],
601
640
  protocol: SlackProtocol,
602
641
  retry: Retry.Retry,
642
+ telemetry: TELEMETRY,
643
+ span: "UpdateRemote",
603
644
  }));
604
645
 
605
646
  export type UploadFileError = SlackOpError;
@@ -615,6 +656,8 @@ export const uploadFile: API.OperationMethod<
615
656
  errors: [SlackError, SlackRateLimited],
616
657
  protocol: SlackProtocol,
617
658
  retry: Retry.Retry,
659
+ telemetry: TELEMETRY,
660
+ span: "UploadFile",
618
661
  }));
619
662
 
620
663
  // Schema builders: each runs one schema initializer, on that schema's first use.