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

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 (255) hide show
  1. package/lib/.lazy.json +1 -0
  2. package/lib/_bundle/lazy.js +4 -0
  3. package/lib/_bundle/sdk.js +2 -0
  4. package/lib/_bundle/sdk.js.map +1 -0
  5. package/lib/credentials.d.ts +1 -1
  6. package/lib/credentials.d.ts.map +1 -1
  7. package/lib/credentials.js +1 -53
  8. package/lib/errors.d.ts +31 -31
  9. package/lib/errors.d.ts.map +1 -1
  10. package/lib/errors.js +1 -59
  11. package/lib/index.d.ts +1 -1
  12. package/lib/index.js +0 -10
  13. package/lib/index.lazy.js +7 -0
  14. package/lib/pagination.d.ts +2 -2
  15. package/lib/pagination.js +1 -31
  16. package/lib/protocol.d.ts.map +1 -1
  17. package/lib/protocol.js +1 -231
  18. package/lib/retry.d.ts +2 -2
  19. package/lib/retry.d.ts.map +1 -1
  20. package/lib/retry.js +1 -45
  21. package/lib/services/admin.d.ts +123 -575
  22. package/lib/services/admin.d.ts.map +1 -1
  23. package/lib/services/admin.js +141 -2884
  24. package/lib/services/admin.js.map +1 -1
  25. package/lib/services/agents.d.ts +13 -55
  26. package/lib/services/agents.d.ts.map +1 -1
  27. package/lib/services/agents.js +1 -314
  28. package/lib/services/agents.js.map +1 -1
  29. package/lib/services/api.d.ts +0 -4
  30. package/lib/services/api.d.ts.map +1 -1
  31. package/lib/services/api.js +1 -23
  32. package/lib/services/api.js.map +1 -1
  33. package/lib/services/apps.d.ts +25 -106
  34. package/lib/services/apps.d.ts.map +1 -1
  35. package/lib/services/apps.js +35 -515
  36. package/lib/services/apps.js.map +1 -1
  37. package/lib/services/assistant.d.ts +6 -40
  38. package/lib/services/assistant.d.ts.map +1 -1
  39. package/lib/services/assistant.js +1 -209
  40. package/lib/services/assistant.js.map +1 -1
  41. package/lib/services/auth.d.ts +4 -15
  42. package/lib/services/auth.d.ts.map +1 -1
  43. package/lib/services/auth.js +1 -96
  44. package/lib/services/auth.js.map +1 -1
  45. package/lib/services/blocks.d.ts +1 -7
  46. package/lib/services/blocks.d.ts.map +1 -1
  47. package/lib/services/blocks.js +1 -26
  48. package/lib/services/blocks.js.map +1 -1
  49. package/lib/services/bookmarks.d.ts +4 -15
  50. package/lib/services/bookmarks.d.ts.map +1 -1
  51. package/lib/services/bookmarks.js +1 -81
  52. package/lib/services/bookmarks.js.map +1 -1
  53. package/lib/services/bots.d.ts +1 -9
  54. package/lib/services/bots.d.ts.map +1 -1
  55. package/lib/services/bots.js +1 -59
  56. package/lib/services/bots.js.map +1 -1
  57. package/lib/services/calls.d.ts +6 -22
  58. package/lib/services/calls.d.ts.map +1 -1
  59. package/lib/services/calls.js +1 -115
  60. package/lib/services/calls.js.map +1 -1
  61. package/lib/services/canvases.d.ts +7 -35
  62. package/lib/services/canvases.d.ts.map +1 -1
  63. package/lib/services/canvases.js +1 -140
  64. package/lib/services/canvases.js.map +1 -1
  65. package/lib/services/chat.d.ts +14 -83
  66. package/lib/services/chat.d.ts.map +1 -1
  67. package/lib/services/chat.js +1 -387
  68. package/lib/services/chat.js.map +1 -1
  69. package/lib/services/conversations.d.ts +31 -116
  70. package/lib/services/conversations.d.ts.map +1 -1
  71. package/lib/services/conversations.js +40 -696
  72. package/lib/services/conversations.js.map +1 -1
  73. package/lib/services/dialog.d.ts +1 -4
  74. package/lib/services/dialog.d.ts.map +1 -1
  75. package/lib/services/dialog.js +1 -22
  76. package/lib/services/dialog.js.map +1 -1
  77. package/lib/services/dnd.d.ts +5 -17
  78. package/lib/services/dnd.d.ts.map +1 -1
  79. package/lib/services/dnd.js +1 -96
  80. package/lib/services/dnd.js.map +1 -1
  81. package/lib/services/emoji.d.ts +1 -8
  82. package/lib/services/emoji.d.ts.map +1 -1
  83. package/lib/services/emoji.js +1 -34
  84. package/lib/services/emoji.js.map +1 -1
  85. package/lib/services/entity.d.ts +4 -16
  86. package/lib/services/entity.d.ts.map +1 -1
  87. package/lib/services/entity.js +1 -76
  88. package/lib/services/entity.js.map +1 -1
  89. package/lib/services/files.d.ts +16 -80
  90. package/lib/services/files.d.ts.map +1 -1
  91. package/lib/services/files.js +1 -439
  92. package/lib/services/files.js.map +1 -1
  93. package/lib/services/functions.d.ts +8 -49
  94. package/lib/services/functions.d.ts.map +1 -1
  95. package/lib/services/functions.js +1 -208
  96. package/lib/services/functions.js.map +1 -1
  97. package/lib/services/index.js +0 -2
  98. package/lib/services/lists.d.ts +13 -55
  99. package/lib/services/lists.d.ts.map +1 -1
  100. package/lib/services/lists.js +1 -254
  101. package/lib/services/lists.js.map +1 -1
  102. package/lib/services/migration.d.ts +1 -7
  103. package/lib/services/migration.d.ts.map +1 -1
  104. package/lib/services/migration.js +1 -32
  105. package/lib/services/migration.js.map +1 -1
  106. package/lib/services/oauth.d.ts +7 -43
  107. package/lib/services/oauth.d.ts.map +1 -1
  108. package/lib/services/oauth.js +1 -294
  109. package/lib/services/oauth.js.map +1 -1
  110. package/lib/services/openid.d.ts +3 -10
  111. package/lib/services/openid.d.ts.map +1 -1
  112. package/lib/services/openid.js +1 -84
  113. package/lib/services/openid.js.map +1 -1
  114. package/lib/services/pins.d.ts +3 -13
  115. package/lib/services/pins.d.ts.map +1 -1
  116. package/lib/services/pins.js +1 -66
  117. package/lib/services/pins.js.map +1 -1
  118. package/lib/services/reactions.d.ts +5 -17
  119. package/lib/services/reactions.d.ts.map +1 -1
  120. package/lib/services/reactions.js +1 -102
  121. package/lib/services/reactions.js.map +1 -1
  122. package/lib/services/reminders.d.ts +5 -17
  123. package/lib/services/reminders.d.ts.map +1 -1
  124. package/lib/services/reminders.js +1 -88
  125. package/lib/services/reminders.js.map +1 -1
  126. package/lib/services/rtm.d.ts +2 -11
  127. package/lib/services/rtm.d.ts.map +1 -1
  128. package/lib/services/rtm.js +1 -61
  129. package/lib/services/rtm.js.map +1 -1
  130. package/lib/services/search.d.ts +4 -35
  131. package/lib/services/search.d.ts.map +1 -1
  132. package/lib/services/search.js +1 -172
  133. package/lib/services/search.js.map +1 -1
  134. package/lib/services/stars.d.ts +4 -26
  135. package/lib/services/stars.d.ts.map +1 -1
  136. package/lib/services/stars.js +1 -134
  137. package/lib/services/stars.js.map +1 -1
  138. package/lib/services/team.d.ts +11 -63
  139. package/lib/services/team.d.ts.map +1 -1
  140. package/lib/services/team.js +1 -295
  141. package/lib/services/team.js.map +1 -1
  142. package/lib/services/tooling.d.ts +2 -5
  143. package/lib/services/tooling.d.ts.map +1 -1
  144. package/lib/services/tooling.js +1 -33
  145. package/lib/services/tooling.js.map +1 -1
  146. package/lib/services/usergroups.d.ts +7 -31
  147. package/lib/services/usergroups.d.ts.map +1 -1
  148. package/lib/services/usergroups.js +1 -151
  149. package/lib/services/usergroups.js.map +1 -1
  150. package/lib/services/users.d.ts +14 -48
  151. package/lib/services/users.d.ts.map +1 -1
  152. package/lib/services/users.js +1 -255
  153. package/lib/services/users.js.map +1 -1
  154. package/lib/services/views.d.ts +4 -14
  155. package/lib/services/views.d.ts.map +1 -1
  156. package/lib/services/views.js +1 -78
  157. package/lib/services/views.js.map +1 -1
  158. package/lib/services/workflows.d.ts +8 -51
  159. package/lib/services/workflows.d.ts.map +1 -1
  160. package/lib/services/workflows.js +1 -193
  161. package/lib/services/workflows.js.map +1 -1
  162. package/lib/services.lazy/admin.js +3 -0
  163. package/lib/services.lazy/agents.js +1 -0
  164. package/lib/services.lazy/api.js +1 -0
  165. package/lib/services.lazy/apps.js +3 -0
  166. package/lib/services.lazy/assistant.js +1 -0
  167. package/lib/services.lazy/auth.js +1 -0
  168. package/lib/services.lazy/blocks.js +1 -0
  169. package/lib/services.lazy/bookmarks.js +1 -0
  170. package/lib/services.lazy/bots.js +1 -0
  171. package/lib/services.lazy/calls.js +1 -0
  172. package/lib/services.lazy/canvases.js +1 -0
  173. package/lib/services.lazy/chat.js +1 -0
  174. package/lib/services.lazy/conversations.js +3 -0
  175. package/lib/services.lazy/dialog.js +1 -0
  176. package/lib/services.lazy/dnd.js +1 -0
  177. package/lib/services.lazy/emoji.js +1 -0
  178. package/lib/services.lazy/entity.js +1 -0
  179. package/lib/services.lazy/files.js +1 -0
  180. package/lib/services.lazy/functions.js +1 -0
  181. package/lib/services.lazy/index.js +3 -0
  182. package/lib/services.lazy/lists.js +1 -0
  183. package/lib/services.lazy/migration.js +1 -0
  184. package/lib/services.lazy/oauth.js +1 -0
  185. package/lib/services.lazy/openid.js +1 -0
  186. package/lib/services.lazy/pins.js +1 -0
  187. package/lib/services.lazy/reactions.js +1 -0
  188. package/lib/services.lazy/reminders.js +1 -0
  189. package/lib/services.lazy/rtm.js +1 -0
  190. package/lib/services.lazy/search.js +1 -0
  191. package/lib/services.lazy/stars.js +1 -0
  192. package/lib/services.lazy/team.js +1 -0
  193. package/lib/services.lazy/tooling.js +1 -0
  194. package/lib/services.lazy/usergroups.js +1 -0
  195. package/lib/services.lazy/users.js +1 -0
  196. package/lib/services.lazy/views.js +1 -0
  197. package/lib/services.lazy/workflows.js +1 -0
  198. package/lib/traits.d.ts +1 -1
  199. package/lib/traits.js +1 -12
  200. package/package.json +10 -8
  201. package/src/credentials.ts +20 -21
  202. package/src/errors.ts +31 -27
  203. package/src/index.ts +1 -1
  204. package/src/pagination.ts +2 -2
  205. package/src/protocol.ts +30 -29
  206. package/src/retry.ts +6 -6
  207. package/src/services/admin.ts +2717 -3451
  208. package/src/services/agents.ts +380 -370
  209. package/src/services/api.ts +31 -21
  210. package/src/services/apps.ts +569 -621
  211. package/src/services/assistant.ts +235 -270
  212. package/src/services/auth.ts +118 -100
  213. package/src/services/blocks.ts +33 -29
  214. package/src/services/bookmarks.ts +101 -83
  215. package/src/services/bots.ts +74 -67
  216. package/src/services/calls.ts +118 -124
  217. package/src/services/canvases.ts +171 -178
  218. package/src/services/chat.ts +428 -496
  219. package/src/services/conversations.ts +675 -761
  220. package/src/services/dialog.ts +30 -17
  221. package/src/services/dnd.ts +125 -99
  222. package/src/services/emoji.ts +46 -42
  223. package/src/services/entity.ts +94 -92
  224. package/src/services/files.ts +536 -531
  225. package/src/services/functions.ts +209 -274
  226. package/src/services/lists.ts +289 -304
  227. package/src/services/migration.ts +39 -37
  228. package/src/services/oauth.ts +345 -361
  229. package/src/services/openid.ts +137 -122
  230. package/src/services/pins.ts +83 -70
  231. package/src/services/reactions.ts +119 -103
  232. package/src/services/reminders.ts +112 -90
  233. package/src/services/rtm.ts +73 -65
  234. package/src/services/search.ts +193 -244
  235. package/src/services/stars.ts +101 -160
  236. package/src/services/team.ts +333 -369
  237. package/src/services/tooling.ts +43 -30
  238. package/src/services/usergroups.ts +175 -179
  239. package/src/services/users.ts +301 -268
  240. package/src/services/views.ts +85 -80
  241. package/src/services/workflows.ts +184 -269
  242. package/src/traits.ts +1 -1
  243. package/lib/credentials.js.map +0 -1
  244. package/lib/errors.js.map +0 -1
  245. package/lib/pagination.js.map +0 -1
  246. package/lib/protocol.js.map +0 -1
  247. package/lib/protocol.test.d.ts +0 -2
  248. package/lib/protocol.test.d.ts.map +0 -1
  249. package/lib/protocol.test.js +0 -288
  250. package/lib/protocol.test.js.map +0 -1
  251. package/lib/retry.js.map +0 -1
  252. package/lib/services/index.js.map +0 -1
  253. package/lib/traits.js.map +0 -1
  254. package/src/protocol.test.ts +0 -372
  255. /package/lib/{index.js.map → index.lazy.js.map} +0 -0
@@ -1,11 +1,14 @@
1
1
  import * as API from "@distilled.cloud/core/api";
2
2
  // AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
3
- import * as S from "@distilled.cloud/core/schema";
3
+ import * as S from "@distilled.cloud/core/schema-lite";
4
+ import * as __L from "@distilled.cloud/core/schema-lite";
4
5
  import { SlackError, SlackRateLimited } from "../errors.ts";
5
6
  import { slackPaginate } from "../pagination.ts";
6
7
  import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
7
8
  import * as Retry from "../retry.ts";
8
9
  import * as T from "../traits.ts";
10
+ // Schema table, filled on first reach (see __S at the end).
11
+ const __s: any[] = [];
9
12
 
10
13
  export type { SlackOpError, SlackOpContext };
11
14
 
@@ -23,40 +26,10 @@ export interface AddRemoteRequest {
23
26
  /** Title of the file being shared. */
24
27
  title: string;
25
28
  }
26
- export const AddRemoteRequest = /*@__PURE__*/ S.suspend(() =>
27
- S.Struct({
28
- external_id: S.String,
29
- external_url: S.String,
30
- filetype: S.optional(S.String),
31
- indexable_file_contents: S.optional(S.Unknown),
32
- preview_image: S.optional(S.Unknown),
33
- title: S.String,
34
- }).pipe(
35
- T.Http({ method: "POST", uri: "/files.remote.add", code: 200, contentType: "form-urlencoded" }),
36
- ),
37
- ).annotate({ identifier: "AddRemoteRequest" }) as any as S.Schema<AddRemoteRequest>;
38
-
39
29
  export type AddRemoteResponseFileSharesMap = { [key: string]: unknown | undefined };
40
- export const AddRemoteResponseFileSharesMap = /*@__PURE__*/ S.Record(
41
- S.String,
42
- S.Unknown,
43
- ) as any as S.Schema<AddRemoteResponseFileSharesMap>;
44
-
45
30
  export type AddRemoteResponseFileChannelsList = Array<string>;
46
- export const AddRemoteResponseFileChannelsList = /*@__PURE__*/ S.Array(
47
- S.String,
48
- ) as any as S.Schema<AddRemoteResponseFileChannelsList>;
49
-
50
31
  export type AddRemoteResponseFileGroupsList = Array<string>;
51
- export const AddRemoteResponseFileGroupsList = /*@__PURE__*/ S.Array(
52
- S.String,
53
- ) as any as S.Schema<AddRemoteResponseFileGroupsList>;
54
-
55
32
  export type AddRemoteResponseFileImsList = Array<string>;
56
- export const AddRemoteResponseFileImsList = /*@__PURE__*/ S.Array(
57
- S.String,
58
- ) as any as S.Schema<AddRemoteResponseFileImsList>;
59
-
60
33
  export interface AddRemoteResponseFile {
61
34
  id?: string;
62
35
  created?: number;
@@ -88,52 +61,11 @@ export interface AddRemoteResponseFile {
88
61
  external_url?: string;
89
62
  has_rich_preview?: boolean;
90
63
  }
91
- export const AddRemoteResponseFile = /*@__PURE__*/ S.suspend(() =>
92
- S.Struct({
93
- id: S.optional(S.String),
94
- created: S.optional(S.Number),
95
- timestamp: S.optional(S.Number),
96
- name: S.optional(S.String),
97
- title: S.optional(S.String),
98
- mimetype: S.optional(S.String),
99
- filetype: S.optional(S.String),
100
- pretty_type: S.optional(S.String),
101
- user: S.optional(S.String),
102
- editable: S.optional(S.Boolean),
103
- size: S.optional(S.Number),
104
- mode: S.optional(S.String),
105
- is_external: S.optional(S.Boolean),
106
- external_type: S.optional(S.String),
107
- is_public: S.optional(S.Boolean),
108
- public_url_shared: S.optional(S.Boolean),
109
- display_as_bot: S.optional(S.Boolean),
110
- username: S.optional(S.String),
111
- url_private: S.optional(S.String),
112
- permalink: S.optional(S.String),
113
- comments_count: S.optional(S.Number),
114
- is_starred: S.optional(S.Boolean),
115
- shares: S.optional(AddRemoteResponseFileSharesMap),
116
- channels: S.optional(AddRemoteResponseFileChannelsList),
117
- groups: S.optional(AddRemoteResponseFileGroupsList),
118
- ims: S.optional(AddRemoteResponseFileImsList),
119
- external_id: S.optional(S.String),
120
- external_url: S.optional(S.String),
121
- has_rich_preview: S.optional(S.Boolean),
122
- }),
123
- ).annotate({ identifier: "AddRemoteResponseFile" }) as any as S.Schema<AddRemoteResponseFile>;
124
-
125
64
  export interface AddRemoteResponse {
126
65
  /** Always `true` (a failed call raises a typed error instead). */
127
66
  ok: boolean;
128
67
  file: AddRemoteResponseFile;
129
68
  }
130
- export const AddRemoteResponse = /*@__PURE__*/ S.suspend(() =>
131
- S.Struct({
132
- ok: S.Boolean,
133
- file: AddRemoteResponseFile,
134
- }),
135
- ).annotate({ identifier: "AddRemoteResponse" }) as any as S.Schema<AddRemoteResponse>;
136
-
137
69
  export interface CompleteUploadExternalRequestFilesItem {
138
70
  /** File ID returned from files.getUploadURL. */
139
71
  id: string;
@@ -142,44 +74,17 @@ export interface CompleteUploadExternalRequestFilesItem {
142
74
  /** Optional highlight type hint for the file. The upload processing job may overwrite this value. */
143
75
  highlight_type?: string;
144
76
  }
145
- export const CompleteUploadExternalRequestFilesItem = /*@__PURE__*/ S.suspend(() =>
146
- S.Struct({
147
- id: S.String,
148
- title: S.optional(S.String),
149
- highlight_type: S.optional(S.String),
150
- }),
151
- ).annotate({
152
- identifier: "CompleteUploadExternalRequestFilesItem",
153
- }) as any as S.Schema<CompleteUploadExternalRequestFilesItem>;
154
-
155
77
  /** Array of file ids and their corresponding (optional) titles. */
156
78
  export type CompleteUploadExternalRequestFilesList = Array<CompleteUploadExternalRequestFilesItem>;
157
- export const CompleteUploadExternalRequestFilesList = /*@__PURE__*/ S.Array(
158
- CompleteUploadExternalRequestFilesItem,
159
- ) as any as S.Schema<CompleteUploadExternalRequestFilesList>;
160
-
161
79
  export type CompleteUploadExternalRequestBlocksCase1ItemMap = {
162
80
  [key: string]: unknown | undefined;
163
81
  };
164
- export const CompleteUploadExternalRequestBlocksCase1ItemMap = /*@__PURE__*/ S.Record(
165
- S.String,
166
- S.Unknown,
167
- ) as any as S.Schema<CompleteUploadExternalRequestBlocksCase1ItemMap>;
168
-
169
82
  export type CompleteUploadExternalRequestBlocksCase1List =
170
83
  Array<CompleteUploadExternalRequestBlocksCase1ItemMap>;
171
- export const CompleteUploadExternalRequestBlocksCase1List = /*@__PURE__*/ S.Array(
172
- CompleteUploadExternalRequestBlocksCase1ItemMap,
173
- ) as any as S.Schema<CompleteUploadExternalRequestBlocksCase1List>;
174
-
175
84
  /** 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 */
176
85
  export type CompleteUploadExternalRequestBlocks =
177
86
  | string
178
87
  | CompleteUploadExternalRequestBlocksCase1List;
179
- export const CompleteUploadExternalRequestBlocks = /*@__PURE__*/ S.Unknown.pipe(
180
- T.UnionCases([[], []]),
181
- );
182
-
183
88
  export interface CompleteUploadExternalRequest {
184
89
  /** Array of file ids and their corresponding (optional) titles. */
185
90
  files: CompleteUploadExternalRequestFilesList;
@@ -200,22 +105,6 @@ export interface CompleteUploadExternalRequest {
200
105
  /** 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. */
201
106
  icon_emoji?: string | null;
202
107
  }
203
- export const CompleteUploadExternalRequest = /*@__PURE__*/ S.suspend(() =>
204
- S.Struct({
205
- files: CompleteUploadExternalRequestFilesList,
206
- channel_id: S.optional(S.String),
207
- thread_ts: S.optional(S.String),
208
- channels: S.optional(S.String),
209
- initial_comment: S.optional(S.String),
210
- blocks: S.optional(CompleteUploadExternalRequestBlocks),
211
- username: S.optional(S.NullOr(S.String)),
212
- icon_url: S.optional(S.NullOr(S.String)),
213
- icon_emoji: S.optional(S.NullOr(S.String)),
214
- }).pipe(T.Http({ method: "POST", uri: "/files.completeUploadExternal", code: 200 })),
215
- ).annotate({
216
- identifier: "CompleteUploadExternalRequest",
217
- }) as any as S.Schema<CompleteUploadExternalRequest>;
218
-
219
108
  export interface CompleteUploadExternalResponseFilesItem {
220
109
  /** File ID returned from files.getUploadURLExternal. */
221
110
  id: string;
@@ -226,82 +115,33 @@ export interface CompleteUploadExternalResponseFilesItem {
226
115
  /** file owner */
227
116
  user?: string;
228
117
  }
229
- export const CompleteUploadExternalResponseFilesItem = /*@__PURE__*/ S.suspend(() =>
230
- S.Struct({
231
- id: S.String,
232
- title: S.optional(S.Unknown),
233
- created: S.optional(S.Number),
234
- user: S.optional(S.String),
235
- }),
236
- ).annotate({
237
- identifier: "CompleteUploadExternalResponseFilesItem",
238
- }) as any as S.Schema<CompleteUploadExternalResponseFilesItem>;
239
-
240
118
  /** Array of files uploaded. */
241
119
  export type CompleteUploadExternalResponseFilesList =
242
120
  Array<CompleteUploadExternalResponseFilesItem>;
243
- export const CompleteUploadExternalResponseFilesList = /*@__PURE__*/ S.Array(
244
- CompleteUploadExternalResponseFilesItem,
245
- ) as any as S.Schema<CompleteUploadExternalResponseFilesList>;
246
-
247
121
  export interface CompleteUploadExternalResponse {
248
122
  /** Always `true` (a failed call raises a typed error instead). */
249
123
  ok: boolean;
250
124
  /** Array of files uploaded. */
251
125
  files: CompleteUploadExternalResponseFilesList;
252
126
  }
253
- export const CompleteUploadExternalResponse = /*@__PURE__*/ S.suspend(() =>
254
- S.Struct({
255
- ok: S.Boolean,
256
- files: CompleteUploadExternalResponseFilesList,
257
- }),
258
- ).annotate({
259
- identifier: "CompleteUploadExternalResponse",
260
- }) as any as S.Schema<CompleteUploadExternalResponse>;
261
-
262
127
  export interface DeleteCommentRequest {
263
128
  /** File to delete a comment from. */
264
129
  file: string;
265
130
  /** The comment to delete. */
266
131
  id: string;
267
132
  }
268
- export const DeleteCommentRequest = /*@__PURE__*/ S.suspend(() =>
269
- S.Struct({
270
- file: S.String,
271
- id: S.String,
272
- }).pipe(T.Http({ method: "POST", uri: "/files.comments.delete", code: 200 })),
273
- ).annotate({ identifier: "DeleteCommentRequest" }) as any as S.Schema<DeleteCommentRequest>;
274
-
275
133
  export interface DeleteCommentResponse {
276
134
  /** Always `true` (a failed call raises a typed error instead). */
277
135
  ok: boolean;
278
136
  }
279
- export const DeleteCommentResponse = /*@__PURE__*/ S.suspend(() =>
280
- S.Struct({
281
- ok: S.Boolean,
282
- }),
283
- ).annotate({ identifier: "DeleteCommentResponse" }) as any as S.Schema<DeleteCommentResponse>;
284
-
285
137
  export interface DeleteFileRequest {
286
138
  /** ID of file to delete. */
287
139
  file: string;
288
140
  }
289
- export const DeleteFileRequest = /*@__PURE__*/ S.suspend(() =>
290
- S.Struct({
291
- file: S.String,
292
- }).pipe(T.Http({ method: "POST", uri: "/files.delete", code: 200 })),
293
- ).annotate({ identifier: "DeleteFileRequest" }) as any as S.Schema<DeleteFileRequest>;
294
-
295
141
  export interface DeleteFileResponse {
296
142
  /** Always `true` (a failed call raises a typed error instead). */
297
143
  ok: boolean;
298
144
  }
299
- export const DeleteFileResponse = /*@__PURE__*/ S.suspend(() =>
300
- S.Struct({
301
- ok: S.Boolean,
302
- }),
303
- ).annotate({ identifier: "DeleteFileResponse" }) as any as S.Schema<DeleteFileResponse>;
304
-
305
145
  export interface FilesInfoRequest {
306
146
  count?: number;
307
147
  /** 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. */
@@ -312,25 +152,9 @@ export interface FilesInfoRequest {
312
152
  limit?: number;
313
153
  page?: number;
314
154
  }
315
- export const FilesInfoRequest = /*@__PURE__*/ S.suspend(() =>
316
- S.Struct({
317
- count: S.optional(S.Number.pipe(T.Query())),
318
- cursor: S.optional(S.String.pipe(T.Query())),
319
- file: S.String.pipe(T.Query()),
320
- limit: S.optional(S.Number.pipe(T.Query())),
321
- page: S.optional(S.Number.pipe(T.Query())),
322
- }).pipe(T.Http({ method: "GET", uri: "/files.info", code: 200 })),
323
- ).annotate({ identifier: "FilesInfoRequest" }) as any as S.Schema<FilesInfoRequest>;
324
-
325
155
  export interface FilesInfoResponseFile {
326
156
  id: string;
327
157
  }
328
- export const FilesInfoResponseFile = /*@__PURE__*/ S.suspend(() =>
329
- S.Struct({
330
- id: S.String,
331
- }),
332
- ).annotate({ identifier: "FilesInfoResponseFile" }) as any as S.Schema<FilesInfoResponseFile>;
333
-
334
158
  export interface FilesInfoResponseCommentsItem {
335
159
  comment: string;
336
160
  created: number;
@@ -339,37 +163,12 @@ export interface FilesInfoResponseCommentsItem {
339
163
  timestamp: number;
340
164
  user: string;
341
165
  }
342
- export const FilesInfoResponseCommentsItem = /*@__PURE__*/ S.suspend(() =>
343
- S.Struct({
344
- comment: S.String,
345
- created: S.Number,
346
- id: S.String,
347
- is_intro: S.Boolean,
348
- timestamp: S.Number,
349
- user: S.String,
350
- }),
351
- ).annotate({
352
- identifier: "FilesInfoResponseCommentsItem",
353
- }) as any as S.Schema<FilesInfoResponseCommentsItem>;
354
-
355
166
  export type FilesInfoResponseCommentsList = Array<FilesInfoResponseCommentsItem>;
356
- export const FilesInfoResponseCommentsList = /*@__PURE__*/ S.Array(
357
- FilesInfoResponseCommentsItem,
358
- ) as any as S.Schema<FilesInfoResponseCommentsList>;
359
-
360
167
  /** Pagination metadata. An empty `next_cursor` means the last page. */
361
168
  export interface FilesInfoResponseResponseMetadata {
362
- /** Cursor for the next page — pass as `cursor` on the next call. */
169
+ /** Cursor for the next page -- pass as `cursor` on the next call. */
363
170
  next_cursor?: string;
364
171
  }
365
- export const FilesInfoResponseResponseMetadata = /*@__PURE__*/ S.suspend(() =>
366
- S.Struct({
367
- next_cursor: S.optional(S.String),
368
- }),
369
- ).annotate({
370
- identifier: "FilesInfoResponseResponseMetadata",
371
- }) as any as S.Schema<FilesInfoResponseResponseMetadata>;
372
-
373
172
  export interface FilesInfoResponse {
374
173
  /** Always `true` (a failed call raises a typed error instead). */
375
174
  ok: boolean;
@@ -381,18 +180,6 @@ export interface FilesInfoResponse {
381
180
  /** Pagination metadata. An empty `next_cursor` means the last page. */
382
181
  response_metadata?: FilesInfoResponseResponseMetadata;
383
182
  }
384
- export const FilesInfoResponse = /*@__PURE__*/ S.suspend(() =>
385
- S.Struct({
386
- ok: S.Boolean,
387
- file: FilesInfoResponseFile,
388
- comments: FilesInfoResponseCommentsList,
389
- content: S.optional(S.String),
390
- content_html: S.optional(S.Unknown),
391
- content_highlight_html: S.optional(S.Unknown),
392
- response_metadata: S.optional(FilesInfoResponseResponseMetadata),
393
- }),
394
- ).annotate({ identifier: "FilesInfoResponse" }) as any as S.Schema<FilesInfoResponse>;
395
-
396
183
  export interface GetUploadURLExternalRequest {
397
184
  /** Size in bytes of the file being uploaded. */
398
185
  length: number;
@@ -403,46 +190,14 @@ export interface GetUploadURLExternalRequest {
403
190
  /** Description of image for screen-reader. */
404
191
  alt_txt?: string;
405
192
  }
406
- export const GetUploadURLExternalRequest = /*@__PURE__*/ S.suspend(() =>
407
- S.Struct({
408
- length: S.Number,
409
- filename: S.String,
410
- snippet_type: S.optional(S.String),
411
- alt_txt: S.optional(S.String),
412
- }).pipe(
413
- T.Http({
414
- method: "POST",
415
- uri: "/files.getUploadURLExternal",
416
- code: 200,
417
- contentType: "form-urlencoded",
418
- }),
419
- ),
420
- ).annotate({
421
- identifier: "GetUploadURLExternalRequest",
422
- }) as any as S.Schema<GetUploadURLExternalRequest>;
423
-
424
193
  export interface GetUploadURLExternalResponse {
425
194
  /** Always `true` (a failed call raises a typed error instead). */
426
195
  ok: boolean;
427
196
  file_id: string;
428
197
  upload_url: string;
429
198
  }
430
- export const GetUploadURLExternalResponse = /*@__PURE__*/ S.suspend(() =>
431
- S.Struct({
432
- ok: S.Boolean,
433
- file_id: S.String,
434
- upload_url: S.String,
435
- }),
436
- ).annotate({
437
- identifier: "GetUploadURLExternalResponse",
438
- }) as any as S.Schema<GetUploadURLExternalResponse>;
439
-
440
199
  export type ListFilesRequestCount = number | string;
441
- export const ListFilesRequestCount = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], []]));
442
-
443
200
  export type ListFilesRequestPage = number | string;
444
- export const ListFilesRequestPage = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], []]));
445
-
446
201
  export interface ListFilesRequest {
447
202
  /** Filter files appearing in a specific channel, indicated by its ID. */
448
203
  channel?: string;
@@ -461,69 +216,24 @@ export interface ListFilesRequest {
461
216
  /** Filter files created by a single user. */
462
217
  user?: string;
463
218
  }
464
- export const ListFilesRequest = /*@__PURE__*/ S.suspend(() =>
465
- S.Struct({
466
- channel: S.optional(S.String.pipe(T.Query())),
467
- count: S.optional(ListFilesRequestCount.pipe(T.Query())),
468
- page: S.optional(ListFilesRequestPage.pipe(T.Query())),
469
- show_files_hidden_by_limit: S.optional(S.Boolean.pipe(T.Query())),
470
- team_id: S.optional(S.String.pipe(T.Query())),
471
- ts_from: S.optional(S.String.pipe(T.Query())),
472
- ts_to: S.optional(S.String.pipe(T.Query())),
473
- types: S.optional(S.String.pipe(T.Query())),
474
- user: S.optional(S.String.pipe(T.Query())),
475
- }).pipe(T.Http({ method: "GET", uri: "/files.list", code: 200 })),
476
- ).annotate({ identifier: "ListFilesRequest" }) as any as S.Schema<ListFilesRequest>;
477
-
478
219
  export interface ListFilesResponseFilesItem {
479
220
  id: string;
480
221
  created?: number;
481
222
  user?: string;
482
223
  }
483
- export const ListFilesResponseFilesItem = /*@__PURE__*/ S.suspend(() =>
484
- S.Struct({
485
- id: S.String,
486
- created: S.optional(S.Number),
487
- user: S.optional(S.String),
488
- }),
489
- ).annotate({
490
- identifier: "ListFilesResponseFilesItem",
491
- }) as any as S.Schema<ListFilesResponseFilesItem>;
492
-
493
224
  export type ListFilesResponseFilesList = Array<ListFilesResponseFilesItem>;
494
- export const ListFilesResponseFilesList = /*@__PURE__*/ S.Array(
495
- ListFilesResponseFilesItem,
496
- ) as any as S.Schema<ListFilesResponseFilesList>;
497
-
498
225
  export interface ListFilesResponsePaging {
499
226
  count?: number;
500
227
  total: number;
501
228
  page: number;
502
229
  pages: number;
503
230
  }
504
- export const ListFilesResponsePaging = /*@__PURE__*/ S.suspend(() =>
505
- S.Struct({
506
- count: S.optional(S.Number),
507
- total: S.Number,
508
- page: S.Number,
509
- pages: S.Number,
510
- }),
511
- ).annotate({ identifier: "ListFilesResponsePaging" }) as any as S.Schema<ListFilesResponsePaging>;
512
-
513
231
  export interface ListFilesResponse {
514
232
  /** Always `true` (a failed call raises a typed error instead). */
515
233
  ok: boolean;
516
234
  files: ListFilesResponseFilesList;
517
235
  paging?: ListFilesResponsePaging;
518
236
  }
519
- export const ListFilesResponse = /*@__PURE__*/ S.suspend(() =>
520
- S.Struct({
521
- ok: S.Boolean,
522
- files: ListFilesResponseFilesList,
523
- paging: S.optional(ListFilesResponsePaging),
524
- }),
525
- ).annotate({ identifier: "ListFilesResponse" }) as any as S.Schema<ListFilesResponse>;
526
-
527
237
  export interface ListRemoteRequest {
528
238
  /** Filter files appearing in a specific channel, indicated by its ID. */
529
239
  channel?: string;
@@ -536,36 +246,12 @@ export interface ListRemoteRequest {
536
246
  /** Filter files created before this timestamp (inclusive). */
537
247
  ts_to?: string;
538
248
  }
539
- export const ListRemoteRequest = /*@__PURE__*/ S.suspend(() =>
540
- S.Struct({
541
- channel: S.optional(S.String.pipe(T.Query())),
542
- cursor: S.optional(S.String.pipe(T.Query())),
543
- limit: S.optional(S.Number.pipe(T.Query())),
544
- ts_from: S.optional(S.String.pipe(T.Query())),
545
- ts_to: S.optional(S.String.pipe(T.Query())),
546
- }).pipe(T.Http({ method: "GET", uri: "/files.remote.list", code: 200 })),
547
- ).annotate({ identifier: "ListRemoteRequest" }) as any as S.Schema<ListRemoteRequest>;
548
-
549
249
  export interface ListRemoteResponseFilesItem {
550
250
  id?: string;
551
251
  }
552
- export const ListRemoteResponseFilesItem = /*@__PURE__*/ S.suspend(() =>
553
- S.Struct({
554
- id: S.optional(S.String),
555
- }),
556
- ).annotate({
557
- identifier: "ListRemoteResponseFilesItem",
558
- }) as any as S.Schema<ListRemoteResponseFilesItem>;
559
-
560
252
  export type ListRemoteResponseFilesList = Array<ListRemoteResponseFilesItem>;
561
- export const ListRemoteResponseFilesList = /*@__PURE__*/ S.Array(
562
- ListRemoteResponseFilesItem,
563
- ) as any as S.Schema<ListRemoteResponseFilesList>;
564
-
565
253
  /** Pagination metadata. An empty `next_cursor` means the last page. */
566
254
  export type ListRemoteResponseResponseMetadata = FilesInfoResponseResponseMetadata;
567
- export const ListRemoteResponseResponseMetadata = FilesInfoResponseResponseMetadata;
568
-
569
255
  export interface ListRemoteResponse {
570
256
  /** Always `true` (a failed call raises a typed error instead). */
571
257
  ok: boolean;
@@ -573,139 +259,50 @@ export interface ListRemoteResponse {
573
259
  /** Pagination metadata. An empty `next_cursor` means the last page. */
574
260
  response_metadata?: FilesInfoResponseResponseMetadata;
575
261
  }
576
- export const ListRemoteResponse = /*@__PURE__*/ S.suspend(() =>
577
- S.Struct({
578
- ok: S.Boolean,
579
- files: ListRemoteResponseFilesList,
580
- response_metadata: S.optional(FilesInfoResponseResponseMetadata),
581
- }),
582
- ).annotate({ identifier: "ListRemoteResponse" }) as any as S.Schema<ListRemoteResponse>;
583
-
584
262
  export interface RemoteInfoRequest {
585
263
  /** Creator defined GUID for the file. */
586
264
  external_id?: string;
587
265
  /** Specify a file by providing its ID. */
588
266
  file?: string;
589
267
  }
590
- export const RemoteInfoRequest = /*@__PURE__*/ S.suspend(() =>
591
- S.Struct({
592
- external_id: S.optional(S.String.pipe(T.Query())),
593
- file: S.optional(S.String.pipe(T.Query())),
594
- }).pipe(T.Http({ method: "GET", uri: "/files.remote.info", code: 200 })),
595
- ).annotate({ identifier: "RemoteInfoRequest" }) as any as S.Schema<RemoteInfoRequest>;
596
-
597
268
  export type RemoteInfoResponseFile = ListFilesResponseFilesItem;
598
- export const RemoteInfoResponseFile = ListFilesResponseFilesItem;
599
-
600
269
  export interface RemoteInfoResponse {
601
270
  /** Always `true` (a failed call raises a typed error instead). */
602
271
  ok: boolean;
603
272
  file: ListFilesResponseFilesItem;
604
273
  }
605
- export const RemoteInfoResponse = /*@__PURE__*/ S.suspend(() =>
606
- S.Struct({
607
- ok: S.Boolean,
608
- file: ListFilesResponseFilesItem,
609
- }),
610
- ).annotate({ identifier: "RemoteInfoResponse" }) as any as S.Schema<RemoteInfoResponse>;
611
-
612
274
  export interface RemoveRemoteRequest {
613
275
  /** Creator defined GUID for the file. */
614
276
  external_id?: string;
615
277
  /** Specify a file by providing its ID. */
616
278
  file?: string;
617
279
  }
618
- export const RemoveRemoteRequest = /*@__PURE__*/ S.suspend(() =>
619
- S.Struct({
620
- external_id: S.optional(S.String),
621
- file: S.optional(S.String),
622
- }).pipe(
623
- T.Http({
624
- method: "POST",
625
- uri: "/files.remote.remove",
626
- code: 200,
627
- contentType: "form-urlencoded",
628
- }),
629
- ),
630
- ).annotate({ identifier: "RemoveRemoteRequest" }) as any as S.Schema<RemoveRemoteRequest>;
631
-
632
280
  export interface RemoveRemoteResponse {
633
281
  /** Always `true` (a failed call raises a typed error instead). */
634
282
  ok: boolean;
635
283
  }
636
- export const RemoveRemoteResponse = /*@__PURE__*/ S.suspend(() =>
637
- S.Struct({
638
- ok: S.Boolean,
639
- }),
640
- ).annotate({ identifier: "RemoveRemoteResponse" }) as any as S.Schema<RemoveRemoteResponse>;
641
-
642
284
  export interface RevokePublicURLRequest {
643
285
  /** File to revoke */
644
286
  file: string;
645
287
  }
646
- export const RevokePublicURLRequest = /*@__PURE__*/ S.suspend(() =>
647
- S.Struct({
648
- file: S.String,
649
- }).pipe(T.Http({ method: "POST", uri: "/files.revokePublicURL", code: 200 })),
650
- ).annotate({ identifier: "RevokePublicURLRequest" }) as any as S.Schema<RevokePublicURLRequest>;
651
-
652
288
  export interface RevokePublicURLResponseFile {
653
289
  id?: string;
654
290
  created?: number;
655
291
  user?: string;
656
292
  }
657
- export const RevokePublicURLResponseFile = /*@__PURE__*/ S.suspend(() =>
658
- S.Struct({
659
- id: S.optional(S.String),
660
- created: S.optional(S.Number),
661
- user: S.optional(S.String),
662
- }),
663
- ).annotate({
664
- identifier: "RevokePublicURLResponseFile",
665
- }) as any as S.Schema<RevokePublicURLResponseFile>;
666
-
667
293
  export interface RevokePublicURLResponse {
668
294
  /** Always `true` (a failed call raises a typed error instead). */
669
295
  ok: boolean;
670
296
  file: RevokePublicURLResponseFile;
671
297
  }
672
- export const RevokePublicURLResponse = /*@__PURE__*/ S.suspend(() =>
673
- S.Struct({
674
- ok: S.Boolean,
675
- file: RevokePublicURLResponseFile,
676
- }),
677
- ).annotate({ identifier: "RevokePublicURLResponse" }) as any as S.Schema<RevokePublicURLResponse>;
678
-
679
298
  export interface SharedPublicURLRequest {
680
299
  /** File to share */
681
300
  file: string;
682
301
  }
683
- export const SharedPublicURLRequest = /*@__PURE__*/ S.suspend(() =>
684
- S.Struct({
685
- file: S.String,
686
- }).pipe(T.Http({ method: "POST", uri: "/files.sharedPublicURL", code: 200 })),
687
- ).annotate({ identifier: "SharedPublicURLRequest" }) as any as S.Schema<SharedPublicURLRequest>;
688
-
689
302
  export type SharedPublicURLResponseFile = RevokePublicURLResponseFile;
690
- export const SharedPublicURLResponseFile = RevokePublicURLResponseFile;
691
-
692
303
  export type SharedPublicURLResponseCommentItemMap = { [key: string]: unknown | undefined };
693
- export const SharedPublicURLResponseCommentItemMap = /*@__PURE__*/ S.Record(
694
- S.String,
695
- S.Unknown,
696
- ) as any as S.Schema<SharedPublicURLResponseCommentItemMap>;
697
-
698
304
  export type SharedPublicURLResponseCommentList = Array<SharedPublicURLResponseCommentItemMap>;
699
- export const SharedPublicURLResponseCommentList = /*@__PURE__*/ S.Array(
700
- SharedPublicURLResponseCommentItemMap,
701
- ) as any as S.Schema<SharedPublicURLResponseCommentList>;
702
-
703
305
  export type SharedPublicURLResponsePagingMap = { [key: string]: unknown | undefined };
704
- export const SharedPublicURLResponsePagingMap = /*@__PURE__*/ S.Record(
705
- S.String,
706
- S.Unknown,
707
- ) as any as S.Schema<SharedPublicURLResponsePagingMap>;
708
-
709
306
  export interface SharedPublicURLResponse {
710
307
  /** Always `true` (a failed call raises a typed error instead). */
711
308
  ok: boolean;
@@ -713,15 +310,6 @@ export interface SharedPublicURLResponse {
713
310
  comment?: SharedPublicURLResponseCommentList;
714
311
  paging?: SharedPublicURLResponsePagingMap;
715
312
  }
716
- export const SharedPublicURLResponse = /*@__PURE__*/ S.suspend(() =>
717
- S.Struct({
718
- ok: S.Boolean,
719
- file: RevokePublicURLResponseFile,
720
- comment: S.optional(SharedPublicURLResponseCommentList),
721
- paging: S.optional(SharedPublicURLResponsePagingMap),
722
- }),
723
- ).annotate({ identifier: "SharedPublicURLResponse" }) as any as S.Schema<SharedPublicURLResponse>;
724
-
725
313
  export interface ShareRemoteRequest {
726
314
  /** Comma-separated list of channel IDs where the file will be shared. */
727
315
  channels: string;
@@ -730,29 +318,12 @@ export interface ShareRemoteRequest {
730
318
  /** Specify a file registered with Slack by providing its ID. Either this field or `external_id` or both are required. */
731
319
  file?: string;
732
320
  }
733
- export const ShareRemoteRequest = /*@__PURE__*/ S.suspend(() =>
734
- S.Struct({
735
- channels: S.String.pipe(T.Query()),
736
- external_id: S.optional(S.String.pipe(T.Query())),
737
- file: S.optional(S.String.pipe(T.Query())),
738
- }).pipe(T.Http({ method: "GET", uri: "/files.remote.share", code: 200 })),
739
- ).annotate({ identifier: "ShareRemoteRequest" }) as any as S.Schema<ShareRemoteRequest>;
740
-
741
321
  export type ShareRemoteResponseFile = ListRemoteResponseFilesItem;
742
- export const ShareRemoteResponseFile = ListRemoteResponseFilesItem;
743
-
744
322
  export interface ShareRemoteResponse {
745
323
  /** Always `true` (a failed call raises a typed error instead). */
746
324
  ok: boolean;
747
325
  file?: ListRemoteResponseFilesItem;
748
326
  }
749
- export const ShareRemoteResponse = /*@__PURE__*/ S.suspend(() =>
750
- S.Struct({
751
- ok: S.Boolean,
752
- file: S.optional(ListRemoteResponseFilesItem),
753
- }),
754
- ).annotate({ identifier: "ShareRemoteResponse" }) as any as S.Schema<ShareRemoteResponse>;
755
-
756
327
  export interface UpdateRemoteRequest {
757
328
  /** Creator defined GUID for the file. */
758
329
  external_id?: string;
@@ -769,40 +340,12 @@ export interface UpdateRemoteRequest {
769
340
  /** Title of the file being shared. */
770
341
  title?: string;
771
342
  }
772
- export const UpdateRemoteRequest = /*@__PURE__*/ S.suspend(() =>
773
- S.Struct({
774
- external_id: S.optional(S.String),
775
- external_url: S.optional(S.String),
776
- file: S.optional(S.String),
777
- filetype: S.optional(S.String),
778
- indexable_file_contents: S.optional(S.Unknown),
779
- preview_image: S.optional(S.Unknown),
780
- title: S.optional(S.String),
781
- }).pipe(
782
- T.Http({
783
- method: "POST",
784
- uri: "/files.remote.update",
785
- code: 200,
786
- contentType: "form-urlencoded",
787
- }),
788
- ),
789
- ).annotate({ identifier: "UpdateRemoteRequest" }) as any as S.Schema<UpdateRemoteRequest>;
790
-
791
343
  export type UpdateRemoteResponseFile = ListRemoteResponseFilesItem;
792
- export const UpdateRemoteResponseFile = ListRemoteResponseFilesItem;
793
-
794
344
  export interface UpdateRemoteResponse {
795
345
  /** Always `true` (a failed call raises a typed error instead). */
796
346
  ok: boolean;
797
347
  file?: ListRemoteResponseFilesItem;
798
348
  }
799
- export const UpdateRemoteResponse = /*@__PURE__*/ S.suspend(() =>
800
- S.Struct({
801
- ok: S.Boolean,
802
- file: S.optional(ListRemoteResponseFilesItem),
803
- }),
804
- ).annotate({ identifier: "UpdateRemoteResponse" }) as any as S.Schema<UpdateRemoteResponse>;
805
-
806
349
  export interface UploadFileRequest {
807
350
  /** Comma-separated list of channel names or IDs where the file will be shared. */
808
351
  channels?: string;
@@ -821,98 +364,74 @@ export interface UploadFileRequest {
821
364
  /** Title of file. */
822
365
  title?: string;
823
366
  }
824
- export const UploadFileRequest = /*@__PURE__*/ S.suspend(() =>
825
- S.Struct({
826
- channels: S.optional(S.String),
827
- content: S.optional(S.String),
828
- file: S.optional(S.Unknown),
829
- filename: S.optional(S.String),
830
- filetype: S.optional(S.String),
831
- initial_comment: S.optional(S.String),
832
- thread_ts: S.optional(S.String),
833
- title: S.optional(S.String),
834
- }).pipe(
835
- T.Http({ method: "POST", uri: "/files.upload", code: 200, contentType: "form-urlencoded" }),
836
- ),
837
- ).annotate({ identifier: "UploadFileRequest" }) as any as S.Schema<UploadFileRequest>;
838
-
839
367
  export type UploadFileResponseFile = RevokePublicURLResponseFile;
840
- export const UploadFileResponseFile = RevokePublicURLResponseFile;
841
-
842
368
  export interface UploadFileResponse {
843
369
  /** Always `true` (a failed call raises a typed error instead). */
844
370
  ok: boolean;
845
371
  file: RevokePublicURLResponseFile;
846
372
  }
847
- export const UploadFileResponse = /*@__PURE__*/ S.suspend(() =>
848
- S.Struct({
849
- ok: S.Boolean,
850
- file: RevokePublicURLResponseFile,
851
- }),
852
- ).annotate({ identifier: "UploadFileResponse" }) as any as S.Schema<UploadFileResponse>;
853
-
854
373
  export type AddRemoteError = SlackOpError;
855
- /** 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 */
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 */
856
375
  export const addRemote: API.OperationMethod<
857
376
  AddRemoteRequest,
858
377
  AddRemoteResponse,
859
378
  AddRemoteError,
860
379
  SlackOpContext
861
380
  > = /*@__PURE__*/ API.make(() => ({
862
- input: AddRemoteRequest,
863
- output: AddRemoteResponse,
381
+ input: __S(0, __c0, 0) as any as S.Schema<AddRemoteRequest>,
382
+ output: __S(3, __c0, 3) as any as S.Schema<AddRemoteResponse>,
864
383
  errors: [SlackError, SlackRateLimited],
865
384
  protocol: SlackProtocol,
866
385
  retry: Retry.Retry,
867
386
  }));
868
387
 
869
388
  export type CompleteUploadExternalError = SlackOpError;
870
- /** Finishes an upload started with files.getUploadURLExternal Required scopes — bot: `files:write`; user: `files:write` Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `access_denied` — User is not the owner of the file. - `channel_not_found` — Value passed for `channel_id` was invalid. - `file_not_found` — Could not find the file from the upload ticket. - `file_update_failed` — Failure occurred when attempting to update the file. - `invalid_blocks` — Provided blocks are in the incorrect format. - `invalid_channel` — Channel could not be found or channel specified is invalid. - `not_in_channel` — User/bot membership is required for the specified channel. - `posting_to_channel_denied` — User is not authorized to post to channel. - `channels_limit_exceeded` — Exceeded the channel limit. A maximum of 100 channels is allowed per request. - `file_type_not_allowed` — The file type is not permitted based on the team's allowed_file_upload_types preference. - `file_uploads_except_images_disabled` — Only image file uploads are permitted for this team. - `user_is_external_guest` — External guests cannot upload or share files. See https://docs.slack.dev/reference/methods/files.completeUploadExternal */
389
+ /** Finishes an upload started with files.getUploadURLExternal Required scopes -- bot: `files:write`; user: `files:write` Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `access_denied` -- User is not the owner of the file. - `channel_not_found` -- Value passed for `channel_id` was invalid. - `file_not_found` -- Could not find the file from the upload ticket. - `file_update_failed` -- Failure occurred when attempting to update the file. - `invalid_blocks` -- Provided blocks are in the incorrect format. - `invalid_channel` -- Channel could not be found or channel specified is invalid. - `not_in_channel` -- User/bot membership is required for the specified channel. - `posting_to_channel_denied` -- User is not authorized to post to channel. - `channels_limit_exceeded` -- Exceeded the channel limit. A maximum of 100 channels is allowed per request. - `file_type_not_allowed` -- The file type is not permitted based on the team's allowed_file_upload_types preference. - `file_uploads_except_images_disabled` -- Only image file uploads are permitted for this team. - `user_is_external_guest` -- External guests cannot upload or share files. See https://docs.slack.dev/reference/methods/files.completeUploadExternal */
871
390
  export const completeUploadExternal: API.OperationMethod<
872
391
  CompleteUploadExternalRequest,
873
392
  CompleteUploadExternalResponse,
874
393
  CompleteUploadExternalError,
875
394
  SlackOpContext
876
395
  > = /*@__PURE__*/ API.make(() => ({
877
- input: CompleteUploadExternalRequest,
878
- output: CompleteUploadExternalResponse,
396
+ input: __S(19, __c2, 3) as any as S.Schema<CompleteUploadExternalRequest>,
397
+ output: __S(22, __c2, 6) as any as S.Schema<CompleteUploadExternalResponse>,
879
398
  errors: [SlackError, SlackRateLimited],
880
399
  protocol: SlackProtocol,
881
400
  retry: Retry.Retry,
882
401
  }));
883
402
 
884
403
  export type DeleteCommentError = SlackOpError;
885
- /** Deletes an existing comment on a file. Required scopes — bot: `files:write`; user: `files:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `cant_delete` — The requested comment could not be deleted. - `file_deleted` — The requested file was previously deleted. - `file_not_found` — The requested file could not be found. See https://docs.slack.dev/reference/methods/files.comments.delete */
404
+ /** Deletes an existing comment on a file. Required scopes -- bot: `files:write`; user: `files:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `cant_delete` -- The requested comment could not be deleted. - `file_deleted` -- The requested file was previously deleted. - `file_not_found` -- The requested file could not be found. See https://docs.slack.dev/reference/methods/files.comments.delete */
886
405
  export const deleteComment: API.OperationMethod<
887
406
  DeleteCommentRequest,
888
407
  DeleteCommentResponse,
889
408
  DeleteCommentError,
890
409
  SlackOpContext
891
410
  > = /*@__PURE__*/ API.make(() => ({
892
- input: DeleteCommentRequest,
893
- output: DeleteCommentResponse,
411
+ input: __S(88, __c11, 0) as any as S.Schema<DeleteCommentRequest>,
412
+ output: __S(96, __c12, 0) as any as S.Schema<DeleteCommentResponse>,
894
413
  errors: [SlackError, SlackRateLimited],
895
414
  protocol: SlackProtocol,
896
415
  retry: Retry.Retry,
897
416
  }));
898
417
 
899
418
  export type DeleteFileError = SlackOpError;
900
- /** 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 */
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 */
901
420
  export const deleteFile: API.OperationMethod<
902
421
  DeleteFileRequest,
903
422
  DeleteFileResponse,
904
423
  DeleteFileError,
905
424
  SlackOpContext
906
425
  > = /*@__PURE__*/ API.make(() => ({
907
- input: DeleteFileRequest,
908
- output: DeleteFileResponse,
426
+ input: __S(104, __c13, 0) as any as S.Schema<DeleteFileRequest>,
427
+ output: __S(96, __c12, 0) as any as S.Schema<DeleteFileResponse>,
909
428
  errors: [SlackError, SlackRateLimited],
910
429
  protocol: SlackProtocol,
911
430
  retry: Retry.Retry,
912
431
  }));
913
432
 
914
433
  export type FilesInfoError = SlackOpError;
915
- /** Gets information about a file. Required scopes — bot: `files:read`; user: `files:read` Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `access_denied` — Unable to access the file (slack connect) - `file_deleted` — The requested file has been deleted - `file_not_found` — Value passed for `file` was invalid - `canvas_globally_disabled` — Canvas is disabled for this team - `canvas_disabled_user_team` — Canvas is disabled on user's team for connected Channels - `canvas_disabled_file_team` — Canvas is disabled on file's team - `not_visible` — Do not have permission to view the file - `template_not_visible` — Do not have permissions to view this template - `slack_connect_canvas_sharing_blocked` — Admin has disabled sharing of Canvas links in all Slack Connect communications See https://docs.slack.dev/reference/methods/files.info */
434
+ /** Gets information about a file. Required scopes -- bot: `files:read`; user: `files:read` Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `access_denied` -- Unable to access the file (slack connect) - `file_deleted` -- The requested file has been deleted - `file_not_found` -- Value passed for `file` was invalid - `canvas_globally_disabled` -- Canvas is disabled for this team - `canvas_disabled_user_team` -- Canvas is disabled on user's team for connected Channels - `canvas_disabled_file_team` -- Canvas is disabled on file's team - `not_visible` -- Do not have permission to view the file - `template_not_visible` -- Do not have permissions to view this template - `slack_connect_canvas_sharing_blocked` -- Admin has disabled sharing of Canvas links in all Slack Connect communications See https://docs.slack.dev/reference/methods/files.info */
916
435
  export const filesInfo: API.PaginatedOperationMethod<
917
436
  FilesInfoRequest,
918
437
  FilesInfoResponse,
@@ -921,8 +440,8 @@ export const filesInfo: API.PaginatedOperationMethod<
921
440
  FilesInfoResponseCommentsItem
922
441
  > = /*@__PURE__*/ API.makePaginated(
923
442
  () => ({
924
- input: FilesInfoRequest,
925
- output: FilesInfoResponse,
443
+ input: __S(112, __c14, 0) as any as S.Schema<FilesInfoRequest>,
444
+ output: __S(116, __c14, 4) as any as S.Schema<FilesInfoResponse>,
926
445
  errors: [SlackError, SlackRateLimited],
927
446
  protocol: SlackProtocol,
928
447
  retry: Retry.Retry,
@@ -938,37 +457,37 @@ export const filesInfo: API.PaginatedOperationMethod<
938
457
  ) as any;
939
458
 
940
459
  export type GetUploadURLExternalError = SlackOpError;
941
- /** Gets a URL for an edge external file upload Required scopes — bot: `files:write`; user: `files:write` Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `alt_txt_too_large` — Description for the image is longer than the limit of 1000 character - `file_upload_size_restricted` — The size of provided file is too large, as the team has restricted uploads of large files. - `file_uploads_disabled` — Team has disabled all file uploads. - `missing_argument` — A required argument was not provided. Typically only occurs when the `length` provided is 0. - `snippet_too_large` — The provided `length` is too large to create a snippet, which are limited to 1MB. - `storage_limit_reached` — File storage limit has been reached. This occurs when free teams have uploaded 5GB of files. - `unknown_snippet_type` — The provided `snippet_type` is not a supported type. - `unknown_subtype` — The provided `subtype` is not a supported type. - `file_type_not_allowed` — The file type is not allowed. - `file_uploads_except_images_disabled` — File uploads except images are disabled. - `user_is_external_guest` — External guests cannot upload or share files. See https://docs.slack.dev/reference/methods/files.getUploadURLExternal */
460
+ /** Gets a URL for an edge external file upload Required scopes -- bot: `files:write`; user: `files:write` Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `alt_txt_too_large` -- Description for the image is longer than the limit of 1000 character - `file_upload_size_restricted` -- The size of provided file is too large, as the team has restricted uploads of large files. - `file_uploads_disabled` -- Team has disabled all file uploads. - `missing_argument` -- A required argument was not provided. Typically only occurs when the `length` provided is 0. - `snippet_too_large` -- The provided `length` is too large to create a snippet, which are limited to 1MB. - `storage_limit_reached` -- File storage limit has been reached. This occurs when free teams have uploaded 5GB of files. - `unknown_snippet_type` -- The provided `snippet_type` is not a supported type. - `unknown_subtype` -- The provided `subtype` is not a supported type. - `file_type_not_allowed` -- The file type is not allowed. - `file_uploads_except_images_disabled` -- File uploads except images are disabled. - `user_is_external_guest` -- External guests cannot upload or share files. See https://docs.slack.dev/reference/methods/files.getUploadURLExternal */
942
461
  export const getUploadURLExternal: API.OperationMethod<
943
462
  GetUploadURLExternalRequest,
944
463
  GetUploadURLExternalResponse,
945
464
  GetUploadURLExternalError,
946
465
  SlackOpContext
947
466
  > = /*@__PURE__*/ API.make(() => ({
948
- input: GetUploadURLExternalRequest,
949
- output: GetUploadURLExternalResponse,
467
+ input: __S(128, __c16, 0) as any as S.Schema<GetUploadURLExternalRequest>,
468
+ output: __S(129, __c16, 1) as any as S.Schema<GetUploadURLExternalResponse>,
950
469
  errors: [SlackError, SlackRateLimited],
951
470
  protocol: SlackProtocol,
952
471
  retry: Retry.Retry,
953
472
  }));
954
473
 
955
474
  export type ListFilesError = SlackOpError;
956
- /** List files for a team, in a channel, or from a user with applied filters. Required scopes — bot: `files:read`; user: `files:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `missing_argument` — A required argument is missing. - `slack_connect_canvas_sharing_blocked` — Admin has disabled sharing of Canvas links in all Slack Connect communications - `user_not_found` — Value passed for `user` was invalid - `unknown_type` — Value passed for `types` was invalid See https://docs.slack.dev/reference/methods/files.list */
475
+ /** List files for a team, in a channel, or from a user with applied filters. Required scopes -- bot: `files:read`; user: `files:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `missing_argument` -- A required argument is missing. - `slack_connect_canvas_sharing_blocked` -- Admin has disabled sharing of Canvas links in all Slack Connect communications - `user_not_found` -- Value passed for `user` was invalid - `unknown_type` -- Value passed for `types` was invalid See https://docs.slack.dev/reference/methods/files.list */
957
476
  export const listFiles: API.OperationMethod<
958
477
  ListFilesRequest,
959
478
  ListFilesResponse,
960
479
  ListFilesError,
961
480
  SlackOpContext
962
481
  > = /*@__PURE__*/ API.make(() => ({
963
- input: ListFilesRequest,
964
- output: ListFilesResponse,
482
+ input: __S(138, __c17, 2) as any as S.Schema<ListFilesRequest>,
483
+ output: __S(141, __c17, 5) as any as S.Schema<ListFilesResponse>,
965
484
  errors: [SlackError, SlackRateLimited],
966
485
  protocol: SlackProtocol,
967
486
  retry: Retry.Retry,
968
487
  }));
969
488
 
970
489
  export type ListRemoteError = SlackOpError;
971
- /** Retrieve information about a remote file added to Slack Required scopes — bot: `remote_files:read`; user: `remote_files:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `invalid_cursor` — Value passed for `cursor` was not valid or is no longer valid. - `no_bot_user_for_app` — Cannot call the Remote Files endpoints unless app has associated bot user See https://docs.slack.dev/reference/methods/files.remote.list */
490
+ /** Retrieve information about a remote file added to Slack Required scopes -- bot: `remote_files:read`; user: `remote_files:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `invalid_cursor` -- Value passed for `cursor` was not valid or is no longer valid. - `no_bot_user_for_app` -- Cannot call the Remote Files endpoints unless app has associated bot user See https://docs.slack.dev/reference/methods/files.remote.list */
972
491
  export const listRemote: API.PaginatedOperationMethod<
973
492
  ListRemoteRequest,
974
493
  ListRemoteResponse,
@@ -977,8 +496,8 @@ export const listRemote: API.PaginatedOperationMethod<
977
496
  ListRemoteResponseFilesItem
978
497
  > = /*@__PURE__*/ API.makePaginated(
979
498
  () => ({
980
- input: ListRemoteRequest,
981
- output: ListRemoteResponse,
499
+ input: __S(152, __c19, 0) as any as S.Schema<ListRemoteRequest>,
500
+ output: __S(154, __c19, 2) as any as S.Schema<ListRemoteResponse>,
982
501
  errors: [SlackError, SlackRateLimited],
983
502
  protocol: SlackProtocol,
984
503
  retry: Retry.Retry,
@@ -994,106 +513,592 @@ export const listRemote: API.PaginatedOperationMethod<
994
513
  ) as any;
995
514
 
996
515
  export type RemoteInfoError = SlackOpError;
997
- /** Retrieve information about a remote file added to Slack Required scopes — bot: `remote_files:read`; user: `remote_files:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `file_not_found` — Value passed for `file` or `external_id` was invalid - `invalid_args` — Invalid arguments passed to endpoint - `no_bot_user_for_app` — Cannot call the Remote Files endpoints unless app has associated bot user - `too_many_ids` — The request specified both an external_id and a file, only one may be specified See https://docs.slack.dev/reference/methods/files.remote.info */
516
+ /** Retrieve information about a remote file added to Slack Required scopes -- bot: `remote_files:read`; user: `remote_files:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `file_not_found` -- Value passed for `file` or `external_id` was invalid - `invalid_args` -- Invalid arguments passed to endpoint - `no_bot_user_for_app` -- Cannot call the Remote Files endpoints unless app has associated bot user - `too_many_ids` -- The request specified both an external_id and a file, only one may be specified See https://docs.slack.dev/reference/methods/files.remote.info */
998
517
  export const remoteInfo: API.OperationMethod<
999
518
  RemoteInfoRequest,
1000
519
  RemoteInfoResponse,
1001
520
  RemoteInfoError,
1002
521
  SlackOpContext
1003
522
  > = /*@__PURE__*/ API.make(() => ({
1004
- input: RemoteInfoRequest,
1005
- output: RemoteInfoResponse,
523
+ input: __S(168, __c21, 0) as any as S.Schema<RemoteInfoRequest>,
524
+ output: __S(169, __c21, 1) as any as S.Schema<RemoteInfoResponse>,
1006
525
  errors: [SlackError, SlackRateLimited],
1007
526
  protocol: SlackProtocol,
1008
527
  retry: Retry.Retry,
1009
528
  }));
1010
529
 
1011
530
  export type RemoveRemoteError = SlackOpError;
1012
- /** Remove a remote file. Required scopes — bot: `remote_files:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `bot_user_required` — bot user token is required - `file_not_found` — Value passed for `file` or `external_id` was invalid - `file_under_review` — File passed is tombstoned for DLP review - `invalid_args` — Invalid arguments passed to endpoint - `too_many_ids` — The request specified both an external_id and a file, only one may be specified See https://docs.slack.dev/reference/methods/files.remote.remove */
531
+ /** Remove a remote file. Required scopes -- bot: `remote_files:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `bot_user_required` -- bot user token is required - `file_not_found` -- Value passed for `file` or `external_id` was invalid - `file_under_review` -- File passed is tombstoned for DLP review - `invalid_args` -- Invalid arguments passed to endpoint - `too_many_ids` -- The request specified both an external_id and a file, only one may be specified See https://docs.slack.dev/reference/methods/files.remote.remove */
1013
532
  export const removeRemote: API.OperationMethod<
1014
533
  RemoveRemoteRequest,
1015
534
  RemoveRemoteResponse,
1016
535
  RemoveRemoteError,
1017
536
  SlackOpContext
1018
537
  > = /*@__PURE__*/ API.make(() => ({
1019
- input: RemoveRemoteRequest,
1020
- output: RemoveRemoteResponse,
538
+ input: __S(176, __c22, 0) as any as S.Schema<RemoveRemoteRequest>,
539
+ output: __S(96, __c12, 0) as any as S.Schema<RemoveRemoteResponse>,
1021
540
  errors: [SlackError, SlackRateLimited],
1022
541
  protocol: SlackProtocol,
1023
542
  retry: Retry.Retry,
1024
543
  }));
1025
544
 
1026
545
  export type RevokePublicURLError = SlackOpError;
1027
- /** Revokes public/external sharing access for a file Required scopes — bot: `files:write`; user: `files:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `file_not_found` — Value passed for `file` was invalid See https://docs.slack.dev/reference/methods/files.revokePublicURL */
546
+ /** Revokes public/external sharing access for a file Required scopes -- bot: `files:write`; user: `files:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `file_not_found` -- Value passed for `file` was invalid See https://docs.slack.dev/reference/methods/files.revokePublicURL */
1028
547
  export const revokePublicURL: API.OperationMethod<
1029
548
  RevokePublicURLRequest,
1030
549
  RevokePublicURLResponse,
1031
550
  RevokePublicURLError,
1032
551
  SlackOpContext
1033
552
  > = /*@__PURE__*/ API.make(() => ({
1034
- input: RevokePublicURLRequest,
1035
- output: RevokePublicURLResponse,
553
+ input: __S(24, __c3, 0) as any as S.Schema<RevokePublicURLRequest>,
554
+ output: __S(40, __c5, 0) as any as S.Schema<RevokePublicURLResponse>,
1036
555
  errors: [SlackError, SlackRateLimited],
1037
556
  protocol: SlackProtocol,
1038
557
  retry: Retry.Retry,
1039
558
  }));
1040
559
 
1041
560
  export type SharedPublicURLError = SlackOpError;
1042
- /** Enables a file for public/external sharing. Required scopes — user: `files:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `file_not_found` — Value passed for `file` was invalid - `not_allowed` — Public sharing has been disabled for this team. You may see this error if you are creating an external link from a free or trial workspace. You can either upgrade to a [Paid Plan](https://app.slack.com/plans) or use `file.list` to get a `url_private_download` link, download the file with an application, and re-upload it somewhere it can be shared with users who are not members of your workspace. Be sure to pass the Slack [Bot token](/authentication/tokens#bot) to the request on the headers file when calling `url_private_download`. - `public_video_not_allowed` — Public sharing of videos is not available. A `Free` instance of Slack may encounter this error because free teams don't have the ability to share video files publicly. - `public_file_type_not_allowed` — Public sharing has been restricted for this file type. See https://docs.slack.dev/reference/methods/files.sharedPublicURL */
561
+ /** Enables a file for public/external sharing. Required scopes -- user: `files:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `file_not_found` -- Value passed for `file` was invalid - `not_allowed` -- Public sharing has been disabled for this team. You may see this error if you are creating an external link from a free or trial workspace. You can either upgrade to a [Paid Plan](https://app.slack.com/plans) or use `file.list` to get a `url_private_download` link, download the file with an application, and re-upload it somewhere it can be shared with users who are not members of your workspace. Be sure to pass the Slack [Bot token](/authentication/tokens#bot) to the request on the headers file when calling `url_private_download`. - `public_video_not_allowed` -- Public sharing of videos is not available. A `Free` instance of Slack may encounter this error because free teams don't have the ability to share video files publicly. - `public_file_type_not_allowed` -- Public sharing has been restricted for this file type. See https://docs.slack.dev/reference/methods/files.sharedPublicURL */
1043
562
  export const sharedPublicURL: API.OperationMethod<
1044
563
  SharedPublicURLRequest,
1045
564
  SharedPublicURLResponse,
1046
565
  SharedPublicURLError,
1047
566
  SlackOpContext
1048
567
  > = /*@__PURE__*/ API.make(() => ({
1049
- input: SharedPublicURLRequest,
1050
- output: SharedPublicURLResponse,
568
+ input: __S(49, __c6, 1) as any as S.Schema<SharedPublicURLRequest>,
569
+ output: __S(50, __c6, 2) as any as S.Schema<SharedPublicURLResponse>,
1051
570
  errors: [SlackError, SlackRateLimited],
1052
571
  protocol: SlackProtocol,
1053
572
  retry: Retry.Retry,
1054
573
  }));
1055
574
 
1056
575
  export type ShareRemoteError = SlackOpError;
1057
- /** Share a remote file into a channel. Required scopes — bot: `remote_files:share`; user: `remote_files:share` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` — At least one of the values passed for `channels` was invalid. - `file_not_found` — No file with the requested ID found. - `invalid_args` — Invalid arguments passed to endpoint - `no_bot_user_for_app` — Cannot call the Remote Files endpoints unless app has associated bot user - `not_in_channel` — Authenticated user is not in at least one of the the provided channels. See https://docs.slack.dev/reference/methods/files.remote.share */
576
+ /** Share a remote file into a channel. Required scopes -- bot: `remote_files:share`; user: `remote_files:share` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` -- At least one of the values passed for `channels` was invalid. - `file_not_found` -- No file with the requested ID found. - `invalid_args` -- Invalid arguments passed to endpoint - `no_bot_user_for_app` -- Cannot call the Remote Files endpoints unless app has associated bot user - `not_in_channel` -- Authenticated user is not in at least one of the the provided channels. See https://docs.slack.dev/reference/methods/files.remote.share */
1058
577
  export const shareRemote: API.OperationMethod<
1059
578
  ShareRemoteRequest,
1060
579
  ShareRemoteResponse,
1061
580
  ShareRemoteError,
1062
581
  SlackOpContext
1063
582
  > = /*@__PURE__*/ API.make(() => ({
1064
- input: ShareRemoteRequest,
1065
- output: ShareRemoteResponse,
583
+ input: __S(56, __c7, 0) as any as S.Schema<ShareRemoteRequest>,
584
+ output: __S(64, __c8, 0) as any as S.Schema<ShareRemoteResponse>,
1066
585
  errors: [SlackError, SlackRateLimited],
1067
586
  protocol: SlackProtocol,
1068
587
  retry: Retry.Retry,
1069
588
  }));
1070
589
 
1071
590
  export type UpdateRemoteError = SlackOpError;
1072
- /** Updates an existing remote file. 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 - `bot_user_required` — bot user token is required - `failed_to_unshare` — The file was either not found or it has been unshared already. - `file_not_found` — Could not find the file to update. - `invalid_title` — invalid title provided - `invalid_type` — invalid type provided - `invalid_url` — invalid url provided - `too_large` — The uploaded image had excessive dimensions See https://docs.slack.dev/reference/methods/files.remote.update */
591
+ /** Updates an existing remote file. 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 - `bot_user_required` -- bot user token is required - `failed_to_unshare` -- The file was either not found or it has been unshared already. - `file_not_found` -- Could not find the file to update. - `invalid_title` -- invalid title provided - `invalid_type` -- invalid type provided - `invalid_url` -- invalid url provided - `too_large` -- The uploaded image had excessive dimensions See https://docs.slack.dev/reference/methods/files.remote.update */
1073
592
  export const updateRemote: API.OperationMethod<
1074
593
  UpdateRemoteRequest,
1075
594
  UpdateRemoteResponse,
1076
595
  UpdateRemoteError,
1077
596
  SlackOpContext
1078
597
  > = /*@__PURE__*/ API.make(() => ({
1079
- input: UpdateRemoteRequest,
1080
- output: UpdateRemoteResponse,
598
+ input: __S(72, __c9, 0) as any as S.Schema<UpdateRemoteRequest>,
599
+ output: __S(64, __c8, 0) as any as S.Schema<UpdateRemoteResponse>,
1081
600
  errors: [SlackError, SlackRateLimited],
1082
601
  protocol: SlackProtocol,
1083
602
  retry: Retry.Retry,
1084
603
  }));
1085
604
 
1086
605
  export type UploadFileError = SlackOpError;
1087
- /** Uploads or creates a file. Required scopes — bot: `files:write`; user: `files:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `blocked_file_type` — Admin has disabled uploading this type of file - `channel_not_found` — At least one of the values passed for `channels` was invalid. - `invalid_channel` — One or more channels supplied are invalid - `malware_detected` — This file may contain a virus or other malware and can't be uploaded to Slack - `not_in_channel` — Authenticated user is not in the channel. - `post_contents_too_large` — File content is larger than 130kb. - `posting_to_general_channel_denied` — An admin has restricted posting to the #general channel. - `slack_connect_blocked_file_type` — File uploads with certain types are blocked in all Slack Connect communications - `slack_connect_clip_sharing_blocked` — Admin has disabled Clip sharing in Slack Connect channels - `slack_connect_file_upload_sharing_blocked` — Admin has disabled File uploads in all Slack Connect communications - `invalid_thread_ts` — Value passed to thread_ts was invalid - `method_deprecated` — This API is deprecated. Please refer to https://docs.slack.dev/changelog/2024-04-a-better-way-to-upload-files-is-here-to-stay See https://docs.slack.dev/reference/methods/files.upload */
606
+ /** Uploads or creates a file. Required scopes -- bot: `files:write`; user: `files:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `blocked_file_type` -- Admin has disabled uploading this type of file - `channel_not_found` -- At least one of the values passed for `channels` was invalid. - `invalid_channel` -- One or more channels supplied are invalid - `malware_detected` -- This file may contain a virus or other malware and can't be uploaded to Slack - `not_in_channel` -- Authenticated user is not in the channel. - `post_contents_too_large` -- File content is larger than 130kb. - `posting_to_general_channel_denied` -- An admin has restricted posting to the #general channel. - `slack_connect_blocked_file_type` -- File uploads with certain types are blocked in all Slack Connect communications - `slack_connect_clip_sharing_blocked` -- Admin has disabled Clip sharing in Slack Connect channels - `slack_connect_file_upload_sharing_blocked` -- Admin has disabled File uploads in all Slack Connect communications - `invalid_thread_ts` -- Value passed to thread_ts was invalid - `method_deprecated` -- This API is deprecated. Please refer to https://docs.slack.dev/changelog/2024-04-a-better-way-to-upload-files-is-here-to-stay See https://docs.slack.dev/reference/methods/files.upload */
1088
607
  export const uploadFile: API.OperationMethod<
1089
608
  UploadFileRequest,
1090
609
  UploadFileResponse,
1091
610
  UploadFileError,
1092
611
  SlackOpContext
1093
612
  > = /*@__PURE__*/ API.make(() => ({
1094
- input: UploadFileRequest,
1095
- output: UploadFileResponse,
613
+ input: __S(80, __c10, 0) as any as S.Schema<UploadFileRequest>,
614
+ output: __S(40, __c5, 0) as any as S.Schema<UploadFileResponse>,
1096
615
  errors: [SlackError, SlackRateLimited],
1097
616
  protocol: SlackProtocol,
1098
617
  retry: Retry.Retry,
1099
618
  }));
619
+
620
+ // Schema builders: each runs one schema initializer, on that schema's first use.
621
+ function __c0(j: number): any {
622
+ switch (j) {
623
+ case 0:
624
+ return S.suspend(() =>
625
+ S.Struct({
626
+ external_id: S.String,
627
+ external_url: S.String,
628
+ filetype: S.optional(S.String),
629
+ indexable_file_contents: S.optional(S.Unknown),
630
+ preview_image: S.optional(S.Unknown),
631
+ title: S.String,
632
+ }).pipe(
633
+ T.Http({
634
+ method: "POST",
635
+ uri: "/files.remote.add",
636
+ code: 200,
637
+ contentType: "form-urlencoded",
638
+ }),
639
+ ),
640
+ ).annotate({ identifier: "AddRemoteRequest" });
641
+ case 1:
642
+ return S.Array(S.String);
643
+ case 2:
644
+ return S.suspend(() =>
645
+ S.Struct({
646
+ id: S.optional(S.String),
647
+ created: S.optional(S.Number),
648
+ timestamp: S.optional(S.Number),
649
+ name: S.optional(S.String),
650
+ title: S.optional(S.String),
651
+ mimetype: S.optional(S.String),
652
+ filetype: S.optional(S.String),
653
+ pretty_type: S.optional(S.String),
654
+ user: S.optional(S.String),
655
+ editable: S.optional(S.Boolean),
656
+ size: S.optional(S.Number),
657
+ mode: S.optional(S.String),
658
+ is_external: S.optional(S.Boolean),
659
+ external_type: S.optional(S.String),
660
+ is_public: S.optional(S.Boolean),
661
+ public_url_shared: S.optional(S.Boolean),
662
+ display_as_bot: S.optional(S.Boolean),
663
+ username: S.optional(S.String),
664
+ url_private: S.optional(S.String),
665
+ permalink: S.optional(S.String),
666
+ comments_count: S.optional(S.Number),
667
+ is_starred: S.optional(S.Boolean),
668
+ shares: S.optional(__S(8, __c1, 0)),
669
+ channels: S.optional(__S(1, __c0, 1)),
670
+ groups: S.optional(__S(1, __c0, 1)),
671
+ ims: S.optional(__S(1, __c0, 1)),
672
+ external_id: S.optional(S.String),
673
+ external_url: S.optional(S.String),
674
+ has_rich_preview: S.optional(S.Boolean),
675
+ }),
676
+ ).annotate({ identifier: "AddRemoteResponseFile" });
677
+ case 3:
678
+ return S.suspend(() =>
679
+ S.Struct({
680
+ ok: S.Boolean,
681
+ file: __S(2, __c0, 2),
682
+ }),
683
+ ).annotate({ identifier: "AddRemoteResponse" });
684
+ }
685
+ }
686
+ function __c1(j: number): any {
687
+ switch (j) {
688
+ case 0:
689
+ return S.Record(S.String, S.Unknown);
690
+ }
691
+ }
692
+ function __c2(j: number): any {
693
+ switch (j) {
694
+ case 0:
695
+ return S.suspend(() =>
696
+ S.Struct({
697
+ id: S.String,
698
+ title: S.optional(S.String),
699
+ highlight_type: S.optional(S.String),
700
+ }),
701
+ ).annotate({ identifier: "CompleteUploadExternalRequestFilesItem" });
702
+ case 1:
703
+ return S.Array(__S(16, __c2, 0));
704
+ case 2:
705
+ return S.Unknown.pipe(/*@__PURE__*/ T.UnionCases([[], []]));
706
+ case 3:
707
+ return S.suspend(() =>
708
+ S.Struct({
709
+ files: __S(17, __c2, 1),
710
+ channel_id: S.optional(S.String),
711
+ thread_ts: S.optional(S.String),
712
+ channels: S.optional(S.String),
713
+ initial_comment: S.optional(S.String),
714
+ blocks: S.optional(__S(18, __c2, 2)),
715
+ username: S.optional(S.NullOr(S.String)),
716
+ icon_url: S.optional(S.NullOr(S.String)),
717
+ icon_emoji: S.optional(S.NullOr(S.String)),
718
+ }).pipe(T.Http({ method: "POST", uri: "/files.completeUploadExternal", code: 200 })),
719
+ ).annotate({ identifier: "CompleteUploadExternalRequest" });
720
+ case 4:
721
+ return S.suspend(() =>
722
+ S.Struct({
723
+ id: S.String,
724
+ title: S.optional(S.Unknown),
725
+ created: S.optional(S.Number),
726
+ user: S.optional(S.String),
727
+ }),
728
+ ).annotate({ identifier: "CompleteUploadExternalResponseFilesItem" });
729
+ case 5:
730
+ return S.Array(__S(20, __c2, 4));
731
+ case 6:
732
+ return S.suspend(() =>
733
+ S.Struct({
734
+ ok: S.Boolean,
735
+ files: __S(21, __c2, 5),
736
+ }),
737
+ ).annotate({ identifier: "CompleteUploadExternalResponse" });
738
+ }
739
+ }
740
+ function __c3(j: number): any {
741
+ switch (j) {
742
+ case 0:
743
+ return S.suspend(() =>
744
+ S.Struct({
745
+ file: S.String,
746
+ }).pipe(T.Http({ method: "POST", uri: "/files.revokePublicURL", code: 200 })),
747
+ ).annotate({ identifier: "RevokePublicURLRequest" });
748
+ }
749
+ }
750
+ function __c4(j: number): any {
751
+ switch (j) {
752
+ case 0:
753
+ return S.suspend(() =>
754
+ S.Struct({
755
+ id: S.optional(S.String),
756
+ created: S.optional(S.Number),
757
+ user: S.optional(S.String),
758
+ }),
759
+ ).annotate({ identifier: "RevokePublicURLResponseFile" });
760
+ }
761
+ }
762
+ function __c5(j: number): any {
763
+ switch (j) {
764
+ case 0:
765
+ return S.suspend(() =>
766
+ S.Struct({
767
+ ok: S.Boolean,
768
+ file: __S(32, __c4, 0),
769
+ }),
770
+ ).annotate({ identifier: "RevokePublicURLResponse" });
771
+ }
772
+ }
773
+ function __c6(j: number): any {
774
+ switch (j) {
775
+ case 0:
776
+ return S.Array(__S(8, __c1, 0));
777
+ case 1:
778
+ return S.suspend(() =>
779
+ S.Struct({
780
+ file: S.String,
781
+ }).pipe(T.Http({ method: "POST", uri: "/files.sharedPublicURL", code: 200 })),
782
+ ).annotate({ identifier: "SharedPublicURLRequest" });
783
+ case 2:
784
+ return S.suspend(() =>
785
+ S.Struct({
786
+ ok: S.Boolean,
787
+ file: __S(32, __c4, 0),
788
+ comment: S.optional(__S(48, __c6, 0)),
789
+ paging: S.optional(__S(8, __c1, 0)),
790
+ }),
791
+ ).annotate({ identifier: "SharedPublicURLResponse" });
792
+ }
793
+ }
794
+ function __c7(j: number): any {
795
+ switch (j) {
796
+ case 0:
797
+ return S.suspend(() =>
798
+ S.Struct({
799
+ channels: S.String.pipe(T.Query()),
800
+ external_id: S.optional(S.String.pipe(T.Query())),
801
+ file: S.optional(S.String.pipe(T.Query())),
802
+ }).pipe(T.Http({ method: "GET", uri: "/files.remote.share", code: 200 })),
803
+ ).annotate({ identifier: "ShareRemoteRequest" });
804
+ }
805
+ }
806
+ function __c8(j: number): any {
807
+ switch (j) {
808
+ case 0:
809
+ return S.suspend(() =>
810
+ S.Struct({
811
+ ok: S.Boolean,
812
+ file: S.optional(__S(160, __c20, 0)),
813
+ }),
814
+ ).annotate({ identifier: "ShareRemoteResponse" });
815
+ }
816
+ }
817
+ function __c9(j: number): any {
818
+ switch (j) {
819
+ case 0:
820
+ return S.suspend(() =>
821
+ S.Struct({
822
+ external_id: S.optional(S.String),
823
+ external_url: S.optional(S.String),
824
+ file: S.optional(S.String),
825
+ filetype: S.optional(S.String),
826
+ indexable_file_contents: S.optional(S.Unknown),
827
+ preview_image: S.optional(S.Unknown),
828
+ title: S.optional(S.String),
829
+ }).pipe(
830
+ T.Http({
831
+ method: "POST",
832
+ uri: "/files.remote.update",
833
+ code: 200,
834
+ contentType: "form-urlencoded",
835
+ }),
836
+ ),
837
+ ).annotate({ identifier: "UpdateRemoteRequest" });
838
+ }
839
+ }
840
+ function __c10(j: number): any {
841
+ switch (j) {
842
+ case 0:
843
+ return S.suspend(() =>
844
+ S.Struct({
845
+ channels: S.optional(S.String),
846
+ content: S.optional(S.String),
847
+ file: S.optional(S.Unknown),
848
+ filename: S.optional(S.String),
849
+ filetype: S.optional(S.String),
850
+ initial_comment: S.optional(S.String),
851
+ thread_ts: S.optional(S.String),
852
+ title: S.optional(S.String),
853
+ }).pipe(
854
+ T.Http({
855
+ method: "POST",
856
+ uri: "/files.upload",
857
+ code: 200,
858
+ contentType: "form-urlencoded",
859
+ }),
860
+ ),
861
+ ).annotate({ identifier: "UploadFileRequest" });
862
+ }
863
+ }
864
+ function __c11(j: number): any {
865
+ switch (j) {
866
+ case 0:
867
+ return S.suspend(() =>
868
+ S.Struct({
869
+ file: S.String,
870
+ id: S.String,
871
+ }).pipe(T.Http({ method: "POST", uri: "/files.comments.delete", code: 200 })),
872
+ ).annotate({ identifier: "DeleteCommentRequest" });
873
+ }
874
+ }
875
+ function __c12(j: number): any {
876
+ switch (j) {
877
+ case 0:
878
+ return S.suspend(() =>
879
+ S.Struct({
880
+ ok: S.Boolean,
881
+ }),
882
+ ).annotate({ identifier: "DeleteCommentResponse" });
883
+ }
884
+ }
885
+ function __c13(j: number): any {
886
+ switch (j) {
887
+ case 0:
888
+ return S.suspend(() =>
889
+ S.Struct({
890
+ file: S.String,
891
+ }).pipe(T.Http({ method: "POST", uri: "/files.delete", code: 200 })),
892
+ ).annotate({ identifier: "DeleteFileRequest" });
893
+ }
894
+ }
895
+ function __c14(j: number): any {
896
+ switch (j) {
897
+ case 0:
898
+ return S.suspend(() =>
899
+ S.Struct({
900
+ count: S.optional(S.Number.pipe(T.Query())),
901
+ cursor: S.optional(S.String.pipe(T.Query())),
902
+ file: S.String.pipe(T.Query()),
903
+ limit: S.optional(S.Number.pipe(T.Query())),
904
+ page: S.optional(S.Number.pipe(T.Query())),
905
+ }).pipe(T.Http({ method: "GET", uri: "/files.info", code: 200 })),
906
+ ).annotate({ identifier: "FilesInfoRequest" });
907
+ case 1:
908
+ return S.suspend(() =>
909
+ S.Struct({
910
+ id: S.String,
911
+ }),
912
+ ).annotate({ identifier: "FilesInfoResponseFile" });
913
+ case 2:
914
+ return S.suspend(() =>
915
+ S.Struct({
916
+ comment: S.String,
917
+ created: S.Number,
918
+ id: S.String,
919
+ is_intro: S.Boolean,
920
+ timestamp: S.Number,
921
+ user: S.String,
922
+ }),
923
+ ).annotate({ identifier: "FilesInfoResponseCommentsItem" });
924
+ case 3:
925
+ return S.Array(__S(114, __c14, 2));
926
+ case 4:
927
+ return S.suspend(() =>
928
+ S.Struct({
929
+ ok: S.Boolean,
930
+ file: __S(113, __c14, 1),
931
+ comments: __S(115, __c14, 3),
932
+ content: S.optional(S.String),
933
+ content_html: S.optional(S.Unknown),
934
+ content_highlight_html: S.optional(S.Unknown),
935
+ response_metadata: S.optional(__S(120, __c15, 0)),
936
+ }),
937
+ ).annotate({ identifier: "FilesInfoResponse" });
938
+ }
939
+ }
940
+ function __c15(j: number): any {
941
+ switch (j) {
942
+ case 0:
943
+ return S.suspend(() =>
944
+ S.Struct({
945
+ next_cursor: S.optional(S.String),
946
+ }),
947
+ ).annotate({ identifier: "FilesInfoResponseResponseMetadata" });
948
+ }
949
+ }
950
+ function __c16(j: number): any {
951
+ switch (j) {
952
+ case 0:
953
+ return S.suspend(() =>
954
+ S.Struct({
955
+ length: S.Number,
956
+ filename: S.String,
957
+ snippet_type: S.optional(S.String),
958
+ alt_txt: S.optional(S.String),
959
+ }).pipe(
960
+ T.Http({
961
+ method: "POST",
962
+ uri: "/files.getUploadURLExternal",
963
+ code: 200,
964
+ contentType: "form-urlencoded",
965
+ }),
966
+ ),
967
+ ).annotate({ identifier: "GetUploadURLExternalRequest" });
968
+ case 1:
969
+ return S.suspend(() =>
970
+ S.Struct({
971
+ ok: S.Boolean,
972
+ file_id: S.String,
973
+ upload_url: S.String,
974
+ }),
975
+ ).annotate({ identifier: "GetUploadURLExternalResponse" });
976
+ }
977
+ }
978
+ function __c17(j: number): any {
979
+ switch (j) {
980
+ case 0:
981
+ return S.Unknown.pipe(/*@__PURE__*/ T.UnionCases([[], []]));
982
+ case 1:
983
+ return S.Unknown.pipe(/*@__PURE__*/ T.UnionCases([[], []]));
984
+ case 2:
985
+ return S.suspend(() =>
986
+ S.Struct({
987
+ channel: S.optional(S.String.pipe(T.Query())),
988
+ count: S.optional(__S(136, __c17, 0).pipe(T.Query())),
989
+ page: S.optional(__S(137, __c17, 1).pipe(T.Query())),
990
+ show_files_hidden_by_limit: S.optional(S.Boolean.pipe(T.Query())),
991
+ team_id: S.optional(S.String.pipe(T.Query())),
992
+ ts_from: S.optional(S.String.pipe(T.Query())),
993
+ ts_to: S.optional(S.String.pipe(T.Query())),
994
+ types: S.optional(S.String.pipe(T.Query())),
995
+ user: S.optional(S.String.pipe(T.Query())),
996
+ }).pipe(T.Http({ method: "GET", uri: "/files.list", code: 200 })),
997
+ ).annotate({ identifier: "ListFilesRequest" });
998
+ case 3:
999
+ return S.Array(__S(144, __c18, 0));
1000
+ case 4:
1001
+ return S.suspend(() =>
1002
+ S.Struct({
1003
+ count: S.optional(S.Number),
1004
+ total: S.Number,
1005
+ page: S.Number,
1006
+ pages: S.Number,
1007
+ }),
1008
+ ).annotate({ identifier: "ListFilesResponsePaging" });
1009
+ case 5:
1010
+ return S.suspend(() =>
1011
+ S.Struct({
1012
+ ok: S.Boolean,
1013
+ files: __S(139, __c17, 3),
1014
+ paging: S.optional(__S(140, __c17, 4)),
1015
+ }),
1016
+ ).annotate({ identifier: "ListFilesResponse" });
1017
+ }
1018
+ }
1019
+ function __c18(j: number): any {
1020
+ switch (j) {
1021
+ case 0:
1022
+ return S.suspend(() =>
1023
+ S.Struct({
1024
+ id: S.String,
1025
+ created: S.optional(S.Number),
1026
+ user: S.optional(S.String),
1027
+ }),
1028
+ ).annotate({ identifier: "ListFilesResponseFilesItem" });
1029
+ }
1030
+ }
1031
+ function __c19(j: number): any {
1032
+ switch (j) {
1033
+ case 0:
1034
+ return S.suspend(() =>
1035
+ S.Struct({
1036
+ channel: S.optional(S.String.pipe(T.Query())),
1037
+ cursor: S.optional(S.String.pipe(T.Query())),
1038
+ limit: S.optional(S.Number.pipe(T.Query())),
1039
+ ts_from: S.optional(S.String.pipe(T.Query())),
1040
+ ts_to: S.optional(S.String.pipe(T.Query())),
1041
+ }).pipe(T.Http({ method: "GET", uri: "/files.remote.list", code: 200 })),
1042
+ ).annotate({ identifier: "ListRemoteRequest" });
1043
+ case 1:
1044
+ return S.Array(__S(160, __c20, 0));
1045
+ case 2:
1046
+ return S.suspend(() =>
1047
+ S.Struct({
1048
+ ok: S.Boolean,
1049
+ files: __S(153, __c19, 1),
1050
+ response_metadata: S.optional(__S(120, __c15, 0)),
1051
+ }),
1052
+ ).annotate({ identifier: "ListRemoteResponse" });
1053
+ }
1054
+ }
1055
+ function __c20(j: number): any {
1056
+ switch (j) {
1057
+ case 0:
1058
+ return S.suspend(() =>
1059
+ S.Struct({
1060
+ id: S.optional(S.String),
1061
+ }),
1062
+ ).annotate({ identifier: "ListRemoteResponseFilesItem" });
1063
+ }
1064
+ }
1065
+ function __c21(j: number): any {
1066
+ switch (j) {
1067
+ case 0:
1068
+ return S.suspend(() =>
1069
+ S.Struct({
1070
+ external_id: S.optional(S.String.pipe(T.Query())),
1071
+ file: S.optional(S.String.pipe(T.Query())),
1072
+ }).pipe(T.Http({ method: "GET", uri: "/files.remote.info", code: 200 })),
1073
+ ).annotate({ identifier: "RemoteInfoRequest" });
1074
+ case 1:
1075
+ return S.suspend(() =>
1076
+ S.Struct({
1077
+ ok: S.Boolean,
1078
+ file: __S(144, __c18, 0),
1079
+ }),
1080
+ ).annotate({ identifier: "RemoteInfoResponse" });
1081
+ }
1082
+ }
1083
+ function __c22(j: number): any {
1084
+ switch (j) {
1085
+ case 0:
1086
+ return S.suspend(() =>
1087
+ S.Struct({
1088
+ external_id: S.optional(S.String),
1089
+ file: S.optional(S.String),
1090
+ }).pipe(
1091
+ T.Http({
1092
+ method: "POST",
1093
+ uri: "/files.remote.remove",
1094
+ code: 200,
1095
+ contentType: "form-urlencoded",
1096
+ }),
1097
+ ),
1098
+ ).annotate({ identifier: "RemoveRemoteRequest" });
1099
+ }
1100
+ }
1101
+ // Schema table: entry i is schema j of builder f, made on first reach.
1102
+ function __S(i: number, f: (j: number) => unknown, j: number): any {
1103
+ return (__s[i] ??= __L.at(f, j));
1104
+ }