@distilled.cloud/slack 0.0.0 → 1.0.0-rc.11

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 (212) hide show
  1. package/LICENSE +201 -0
  2. package/lib/credentials.d.ts +27 -0
  3. package/lib/credentials.d.ts.map +1 -0
  4. package/lib/credentials.js +53 -0
  5. package/lib/credentials.js.map +1 -0
  6. package/lib/errors.d.ts +83 -0
  7. package/lib/errors.d.ts.map +1 -0
  8. package/lib/errors.js +59 -0
  9. package/lib/errors.js.map +1 -0
  10. package/lib/index.d.ts +17 -0
  11. package/lib/index.d.ts.map +1 -0
  12. package/lib/index.js +17 -0
  13. package/lib/index.js.map +1 -0
  14. package/lib/pagination.d.ts +31 -0
  15. package/lib/pagination.d.ts.map +1 -0
  16. package/lib/pagination.js +31 -0
  17. package/lib/pagination.js.map +1 -0
  18. package/lib/protocol.d.ts +18 -0
  19. package/lib/protocol.d.ts.map +1 -0
  20. package/lib/protocol.js +230 -0
  21. package/lib/protocol.js.map +1 -0
  22. package/lib/retry.d.ts +52 -0
  23. package/lib/retry.d.ts.map +1 -0
  24. package/lib/retry.js +45 -0
  25. package/lib/retry.js.map +1 -0
  26. package/lib/services/admin.d.ts +2796 -0
  27. package/lib/services/admin.d.ts.map +1 -0
  28. package/lib/services/admin.js +3217 -0
  29. package/lib/services/admin.js.map +1 -0
  30. package/lib/services/api.d.ts +23 -0
  31. package/lib/services/api.d.ts.map +1 -0
  32. package/lib/services/api.js +26 -0
  33. package/lib/services/api.js.map +1 -0
  34. package/lib/services/apps.d.ts +568 -0
  35. package/lib/services/apps.d.ts.map +1 -0
  36. package/lib/services/apps.js +584 -0
  37. package/lib/services/apps.js.map +1 -0
  38. package/lib/services/assistant.d.ts +290 -0
  39. package/lib/services/assistant.d.ts.map +1 -0
  40. package/lib/services/assistant.js +232 -0
  41. package/lib/services/assistant.js.map +1 -0
  42. package/lib/services/auth.d.ts +90 -0
  43. package/lib/services/auth.d.ts.map +1 -0
  44. package/lib/services/auth.js +114 -0
  45. package/lib/services/auth.js.map +1 -0
  46. package/lib/services/blocks.d.ts +31 -0
  47. package/lib/services/blocks.d.ts.map +1 -0
  48. package/lib/services/blocks.js +31 -0
  49. package/lib/services/blocks.js.map +1 -0
  50. package/lib/services/bookmarks.d.ts +91 -0
  51. package/lib/services/bookmarks.d.ts.map +1 -0
  52. package/lib/services/bookmarks.js +98 -0
  53. package/lib/services/bookmarks.js.map +1 -0
  54. package/lib/services/bots.d.ts +60 -0
  55. package/lib/services/bots.d.ts.map +1 -0
  56. package/lib/services/bots.js +68 -0
  57. package/lib/services/bots.js.map +1 -0
  58. package/lib/services/calls.d.ts +124 -0
  59. package/lib/services/calls.d.ts.map +1 -0
  60. package/lib/services/calls.js +136 -0
  61. package/lib/services/calls.js.map +1 -0
  62. package/lib/services/canvases.d.ts +152 -0
  63. package/lib/services/canvases.d.ts.map +1 -0
  64. package/lib/services/canvases.js +152 -0
  65. package/lib/services/canvases.js.map +1 -0
  66. package/lib/services/chat.d.ts +525 -0
  67. package/lib/services/chat.d.ts.map +1 -0
  68. package/lib/services/chat.js +436 -0
  69. package/lib/services/chat.js.map +1 -0
  70. package/lib/services/conversations.d.ts +642 -0
  71. package/lib/services/conversations.d.ts.map +1 -0
  72. package/lib/services/conversations.js +769 -0
  73. package/lib/services/conversations.js.map +1 -0
  74. package/lib/services/dialog.d.ts +20 -0
  75. package/lib/services/dialog.d.ts.map +1 -0
  76. package/lib/services/dialog.js +27 -0
  77. package/lib/services/dialog.js.map +1 -0
  78. package/lib/services/dnd.d.ts +94 -0
  79. package/lib/services/dnd.d.ts.map +1 -0
  80. package/lib/services/dnd.js +111 -0
  81. package/lib/services/dnd.js.map +1 -0
  82. package/lib/services/emoji.d.ts +35 -0
  83. package/lib/services/emoji.d.ts.map +1 -0
  84. package/lib/services/emoji.js +40 -0
  85. package/lib/services/emoji.js.map +1 -0
  86. package/lib/services/entity.d.ts +93 -0
  87. package/lib/services/entity.d.ts.map +1 -0
  88. package/lib/services/entity.js +89 -0
  89. package/lib/services/entity.js.map +1 -0
  90. package/lib/services/files.d.ts +473 -0
  91. package/lib/services/files.d.ts.map +1 -0
  92. package/lib/services/files.js +510 -0
  93. package/lib/services/files.js.map +1 -0
  94. package/lib/services/functions.d.ts +235 -0
  95. package/lib/services/functions.d.ts.map +1 -0
  96. package/lib/services/functions.js +256 -0
  97. package/lib/services/functions.js.map +1 -0
  98. package/lib/services/index.d.ts +35 -0
  99. package/lib/services/index.d.ts.map +1 -0
  100. package/lib/services/index.js +36 -0
  101. package/lib/services/index.js.map +1 -0
  102. package/lib/services/lists.d.ts +300 -0
  103. package/lib/services/lists.d.ts.map +1 -0
  104. package/lib/services/lists.js +366 -0
  105. package/lib/services/lists.js.map +1 -0
  106. package/lib/services/migration.d.ts +34 -0
  107. package/lib/services/migration.d.ts.map +1 -0
  108. package/lib/services/migration.js +36 -0
  109. package/lib/services/migration.js.map +1 -0
  110. package/lib/services/oauth.d.ts +307 -0
  111. package/lib/services/oauth.d.ts.map +1 -0
  112. package/lib/services/oauth.js +278 -0
  113. package/lib/services/oauth.js.map +1 -0
  114. package/lib/services/openid.d.ts +86 -0
  115. package/lib/services/openid.d.ts.map +1 -0
  116. package/lib/services/openid.js +93 -0
  117. package/lib/services/openid.js.map +1 -0
  118. package/lib/services/pins.d.ts +64 -0
  119. package/lib/services/pins.d.ts.map +1 -0
  120. package/lib/services/pins.js +75 -0
  121. package/lib/services/pins.js.map +1 -0
  122. package/lib/services/reactions.d.ts +108 -0
  123. package/lib/services/reactions.d.ts.map +1 -0
  124. package/lib/services/reactions.js +119 -0
  125. package/lib/services/reactions.js.map +1 -0
  126. package/lib/services/reminders.d.ts +89 -0
  127. package/lib/services/reminders.d.ts.map +1 -0
  128. package/lib/services/reminders.js +109 -0
  129. package/lib/services/reminders.js.map +1 -0
  130. package/lib/services/rtm.d.ts +68 -0
  131. package/lib/services/rtm.d.ts.map +1 -0
  132. package/lib/services/rtm.js +74 -0
  133. package/lib/services/rtm.js.map +1 -0
  134. package/lib/services/search.d.ts +239 -0
  135. package/lib/services/search.d.ts.map +1 -0
  136. package/lib/services/search.js +190 -0
  137. package/lib/services/search.js.map +1 -0
  138. package/lib/services/stars.d.ts +126 -0
  139. package/lib/services/stars.d.ts.map +1 -0
  140. package/lib/services/stars.js +145 -0
  141. package/lib/services/stars.js.map +1 -0
  142. package/lib/services/team.d.ts +309 -0
  143. package/lib/services/team.d.ts.map +1 -0
  144. package/lib/services/team.js +333 -0
  145. package/lib/services/team.js.map +1 -0
  146. package/lib/services/tooling.d.ts +31 -0
  147. package/lib/services/tooling.d.ts.map +1 -0
  148. package/lib/services/tooling.js +38 -0
  149. package/lib/services/tooling.js.map +1 -0
  150. package/lib/services/usergroups.d.ts +183 -0
  151. package/lib/services/usergroups.d.ts.map +1 -0
  152. package/lib/services/usergroups.js +180 -0
  153. package/lib/services/usergroups.js.map +1 -0
  154. package/lib/services/users.d.ts +246 -0
  155. package/lib/services/users.d.ts.map +1 -0
  156. package/lib/services/users.js +309 -0
  157. package/lib/services/users.js.map +1 -0
  158. package/lib/services/views.d.ts +84 -0
  159. package/lib/services/views.d.ts.map +1 -0
  160. package/lib/services/views.js +95 -0
  161. package/lib/services/views.js.map +1 -0
  162. package/lib/services/workflows.d.ts +231 -0
  163. package/lib/services/workflows.d.ts.map +1 -0
  164. package/lib/services/workflows.js +238 -0
  165. package/lib/services/workflows.js.map +1 -0
  166. package/lib/traits.d.ts +11 -0
  167. package/lib/traits.d.ts.map +1 -0
  168. package/lib/traits.js +12 -0
  169. package/lib/traits.js.map +1 -0
  170. package/package.json +82 -4
  171. package/src/credentials.ts +86 -0
  172. package/src/errors.ts +101 -0
  173. package/src/index.ts +20 -0
  174. package/src/pagination.ts +35 -0
  175. package/src/protocol.ts +326 -0
  176. package/src/retry.ts +76 -0
  177. package/src/services/admin.ts +7722 -0
  178. package/src/services/api.ts +58 -0
  179. package/src/services/apps.ts +1441 -0
  180. package/src/services/assistant.ts +639 -0
  181. package/src/services/auth.ts +241 -0
  182. package/src/services/blocks.ts +80 -0
  183. package/src/services/bookmarks.ts +223 -0
  184. package/src/services/bots.ts +144 -0
  185. package/src/services/calls.ts +318 -0
  186. package/src/services/canvases.ts +392 -0
  187. package/src/services/chat.ts +1191 -0
  188. package/src/services/conversations.ts +1754 -0
  189. package/src/services/dialog.ts +55 -0
  190. package/src/services/dnd.ts +246 -0
  191. package/src/services/emoji.ts +91 -0
  192. package/src/services/entity.ts +225 -0
  193. package/src/services/files.ts +1192 -0
  194. package/src/services/functions.ts +642 -0
  195. package/src/services/index.ts +35 -0
  196. package/src/services/lists.ts +832 -0
  197. package/src/services/migration.ts +85 -0
  198. package/src/services/oauth.ts +658 -0
  199. package/src/services/openid.ts +243 -0
  200. package/src/services/pins.ts +167 -0
  201. package/src/services/reactions.ts +272 -0
  202. package/src/services/reminders.ts +240 -0
  203. package/src/services/rtm.ts +162 -0
  204. package/src/services/search.ts +507 -0
  205. package/src/services/stars.ts +323 -0
  206. package/src/services/team.ts +834 -0
  207. package/src/services/tooling.ts +78 -0
  208. package/src/services/usergroups.ts +441 -0
  209. package/src/services/users.ts +685 -0
  210. package/src/services/views.ts +212 -0
  211. package/src/services/workflows.ts +605 -0
  212. package/src/traits.ts +45 -0
@@ -0,0 +1,392 @@
1
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
2
+ import * as S from "@distilled.cloud/core/schema";
3
+ import * as API from "@distilled.cloud/core/api";
4
+ import * as T from "../traits.ts";
5
+ import {
6
+ SlackProtocol,
7
+ type SlackOpError,
8
+ type SlackOpContext,
9
+ } from "../protocol.ts";
10
+ import { SlackError, SlackRateLimited } from "../errors.ts";
11
+ import * as Retry from "../retry.ts";
12
+
13
+ export type { SlackOpError, SlackOpContext };
14
+
15
+ export interface CreateCanvaseRequest {
16
+ /** Title of the newly created canvas */
17
+ title?: string;
18
+ /** Structure describing the type and value of the content to create. The markdown content is limited to 1 MiB (1,048,576 characters). */
19
+ document_content?: unknown;
20
+ /** Channel ID of the channel the canvas will be tabbed in. This is a required field for free teams. */
21
+ channel_id?: string;
22
+ }
23
+ export const CreateCanvaseRequest = /*@__PURE__*/ S.suspend(() =>
24
+ S.Struct({
25
+ title: S.optional(S.String),
26
+ document_content: S.optional(S.Unknown),
27
+ channel_id: S.optional(S.String),
28
+ }).pipe(T.Http({ method: "POST", uri: "/canvases.create", code: 200 })),
29
+ ).annotate({
30
+ identifier: "CreateCanvaseRequest",
31
+ }) as any as S.Schema<CreateCanvaseRequest>;
32
+
33
+ export interface CreateCanvaseResponse {
34
+ /** Always `true` (a failed call raises a typed error instead). */
35
+ ok: boolean;
36
+ /** Encoded ID of the canvas */
37
+ canvas_id: string;
38
+ }
39
+ export const CreateCanvaseResponse = /*@__PURE__*/ S.suspend(() =>
40
+ S.Struct({
41
+ ok: S.Boolean,
42
+ canvas_id: S.String,
43
+ }),
44
+ ).annotate({
45
+ identifier: "CreateCanvaseResponse",
46
+ }) as any as S.Schema<CreateCanvaseResponse>;
47
+
48
+ /** List of channels you wish to update access for */
49
+ export type DeleteAccessRequestChannelIdsList = Array<string>;
50
+ export const DeleteAccessRequestChannelIdsList = /*@__PURE__*/ S.Array(
51
+ S.String,
52
+ ) as any as S.Schema<DeleteAccessRequestChannelIdsList>;
53
+
54
+ /** List of users you wish to update access for */
55
+ export type DeleteAccessRequestUserIdsList = Array<string>;
56
+ export const DeleteAccessRequestUserIdsList = /*@__PURE__*/ S.Array(
57
+ S.String,
58
+ ) as any as S.Schema<DeleteAccessRequestUserIdsList>;
59
+
60
+ export interface DeleteAccessRequest {
61
+ /** Encoded ID of the canvas */
62
+ canvas_id: string;
63
+ /** List of channels you wish to update access for */
64
+ channel_ids?: DeleteAccessRequestChannelIdsList;
65
+ /** List of users you wish to update access for */
66
+ user_ids?: DeleteAccessRequestUserIdsList;
67
+ }
68
+ export const DeleteAccessRequest = /*@__PURE__*/ S.suspend(() =>
69
+ S.Struct({
70
+ canvas_id: S.String,
71
+ channel_ids: S.optional(DeleteAccessRequestChannelIdsList),
72
+ user_ids: S.optional(DeleteAccessRequestUserIdsList),
73
+ }).pipe(
74
+ T.Http({ method: "POST", uri: "/canvases.access.delete", code: 200 }),
75
+ ),
76
+ ).annotate({
77
+ identifier: "DeleteAccessRequest",
78
+ }) as any as S.Schema<DeleteAccessRequest>;
79
+
80
+ /** The channel IDs that could not be updated */
81
+ export type DeleteAccessResponseFailedToUpdateChannelIdsList = Array<string>;
82
+ export const DeleteAccessResponseFailedToUpdateChannelIdsList =
83
+ /*@__PURE__*/ S.Array(
84
+ S.String,
85
+ ) as any as S.Schema<DeleteAccessResponseFailedToUpdateChannelIdsList>;
86
+
87
+ /** The user IDs that could not be updated */
88
+ export type DeleteAccessResponseFailedToUpdateUserIdsList = Array<string>;
89
+ export const DeleteAccessResponseFailedToUpdateUserIdsList =
90
+ /*@__PURE__*/ S.Array(
91
+ S.String,
92
+ ) as any as S.Schema<DeleteAccessResponseFailedToUpdateUserIdsList>;
93
+
94
+ export interface DeleteAccessResponse {
95
+ /** Always `true` (a failed call raises a typed error instead). */
96
+ ok: boolean;
97
+ /** The channel IDs that could not be updated */
98
+ failed_to_update_channel_ids?: DeleteAccessResponseFailedToUpdateChannelIdsList;
99
+ /** The user IDs that could not be updated */
100
+ failed_to_update_user_ids?: DeleteAccessResponseFailedToUpdateUserIdsList;
101
+ }
102
+ export const DeleteAccessResponse = /*@__PURE__*/ S.suspend(() =>
103
+ S.Struct({
104
+ ok: S.Boolean,
105
+ failed_to_update_channel_ids: S.optional(
106
+ DeleteAccessResponseFailedToUpdateChannelIdsList,
107
+ ),
108
+ failed_to_update_user_ids: S.optional(
109
+ DeleteAccessResponseFailedToUpdateUserIdsList,
110
+ ),
111
+ }),
112
+ ).annotate({
113
+ identifier: "DeleteAccessResponse",
114
+ }) as any as S.Schema<DeleteAccessResponse>;
115
+
116
+ export interface DeleteCanvaseRequest {
117
+ /** Encoded ID of the canvas */
118
+ canvas_id: string;
119
+ }
120
+ export const DeleteCanvaseRequest = /*@__PURE__*/ S.suspend(() =>
121
+ S.Struct({
122
+ canvas_id: S.String,
123
+ }).pipe(T.Http({ method: "POST", uri: "/canvases.delete", code: 200 })),
124
+ ).annotate({
125
+ identifier: "DeleteCanvaseRequest",
126
+ }) as any as S.Schema<DeleteCanvaseRequest>;
127
+
128
+ export interface DeleteCanvaseResponse {
129
+ /** Always `true` (a failed call raises a typed error instead). */
130
+ ok: boolean;
131
+ }
132
+ export const DeleteCanvaseResponse = /*@__PURE__*/ S.suspend(() =>
133
+ S.Struct({
134
+ ok: S.Boolean,
135
+ }),
136
+ ).annotate({
137
+ identifier: "DeleteCanvaseResponse",
138
+ }) as any as S.Schema<DeleteCanvaseResponse>;
139
+
140
+ /** List of changes to apply on the specified canvas. The markdown content of each change is limited to 1 MiB (1,048,576 characters). */
141
+ export type EditCanvaseRequestChangesList = Array<unknown>;
142
+ export const EditCanvaseRequestChangesList = /*@__PURE__*/ S.Array(
143
+ S.Unknown,
144
+ ) as any as S.Schema<EditCanvaseRequestChangesList>;
145
+
146
+ export interface EditCanvaseRequest {
147
+ /** Encoded ID of the canvas */
148
+ canvas_id: string;
149
+ /** List of changes to apply on the specified canvas. The markdown content of each change is limited to 1 MiB (1,048,576 characters). */
150
+ changes: EditCanvaseRequestChangesList;
151
+ }
152
+ export const EditCanvaseRequest = /*@__PURE__*/ S.suspend(() =>
153
+ S.Struct({
154
+ canvas_id: S.String,
155
+ changes: EditCanvaseRequestChangesList,
156
+ }).pipe(T.Http({ method: "POST", uri: "/canvases.edit", code: 200 })),
157
+ ).annotate({
158
+ identifier: "EditCanvaseRequest",
159
+ }) as any as S.Schema<EditCanvaseRequest>;
160
+
161
+ export interface EditCanvaseResponse {
162
+ /** Always `true` (a failed call raises a typed error instead). */
163
+ ok: boolean;
164
+ }
165
+ export const EditCanvaseResponse = /*@__PURE__*/ S.suspend(() =>
166
+ S.Struct({
167
+ ok: S.Boolean,
168
+ }),
169
+ ).annotate({
170
+ identifier: "EditCanvaseResponse",
171
+ }) as any as S.Schema<EditCanvaseResponse>;
172
+
173
+ export interface LookupSectionRequest {
174
+ /** Encoded ID of the canvas */
175
+ canvas_id: string;
176
+ /** Filtering criteria */
177
+ criteria: unknown;
178
+ }
179
+ export const LookupSectionRequest = /*@__PURE__*/ S.suspend(() =>
180
+ S.Struct({
181
+ canvas_id: S.String,
182
+ criteria: S.Unknown,
183
+ }).pipe(
184
+ T.Http({ method: "POST", uri: "/canvases.sections.lookup", code: 200 }),
185
+ ),
186
+ ).annotate({
187
+ identifier: "LookupSectionRequest",
188
+ }) as any as S.Schema<LookupSectionRequest>;
189
+
190
+ /** IDs of child sections within a layout container (blockquote, callout, flexbox, or table). */
191
+ export type LookupSectionResponseSectionsItemChildSectionIdsList =
192
+ Array<string>;
193
+ export const LookupSectionResponseSectionsItemChildSectionIdsList =
194
+ /*@__PURE__*/ S.Array(
195
+ S.String,
196
+ ) as any as S.Schema<LookupSectionResponseSectionsItemChildSectionIdsList>;
197
+
198
+ export interface LookupSectionResponseSectionsItem {
199
+ id: string;
200
+ /** IDs of child sections within a layout container (blockquote, callout, flexbox, or table). */
201
+ child_section_ids?: LookupSectionResponseSectionsItemChildSectionIdsList;
202
+ }
203
+ export const LookupSectionResponseSectionsItem = /*@__PURE__*/ S.suspend(() =>
204
+ S.Struct({
205
+ id: S.String,
206
+ child_section_ids: S.optional(
207
+ LookupSectionResponseSectionsItemChildSectionIdsList,
208
+ ),
209
+ }),
210
+ ).annotate({
211
+ identifier: "LookupSectionResponseSectionsItem",
212
+ }) as any as S.Schema<LookupSectionResponseSectionsItem>;
213
+
214
+ /** Sections in the canvas that match the provided criteria */
215
+ export type LookupSectionResponseSectionsList =
216
+ Array<LookupSectionResponseSectionsItem>;
217
+ export const LookupSectionResponseSectionsList = /*@__PURE__*/ S.Array(
218
+ LookupSectionResponseSectionsItem,
219
+ ) as any as S.Schema<LookupSectionResponseSectionsList>;
220
+
221
+ export interface LookupSectionResponse {
222
+ /** Always `true` (a failed call raises a typed error instead). */
223
+ ok: boolean;
224
+ /** Sections in the canvas that match the provided criteria */
225
+ sections: LookupSectionResponseSectionsList;
226
+ }
227
+ export const LookupSectionResponse = /*@__PURE__*/ S.suspend(() =>
228
+ S.Struct({
229
+ ok: S.Boolean,
230
+ sections: LookupSectionResponseSectionsList,
231
+ }),
232
+ ).annotate({
233
+ identifier: "LookupSectionResponse",
234
+ }) as any as S.Schema<LookupSectionResponse>;
235
+
236
+ /** List of channels you wish to update access for. Can only be used if user_ids is not provided. */
237
+ export type SetAccessRequestChannelIdsList = Array<string>;
238
+ export const SetAccessRequestChannelIdsList = /*@__PURE__*/ S.Array(
239
+ S.String,
240
+ ) as any as S.Schema<SetAccessRequestChannelIdsList>;
241
+
242
+ /** List of users you wish to update access for. Can only be used if channel_ids is not provided. */
243
+ export type SetAccessRequestUserIdsList = Array<string>;
244
+ export const SetAccessRequestUserIdsList = /*@__PURE__*/ S.Array(
245
+ S.String,
246
+ ) as any as S.Schema<SetAccessRequestUserIdsList>;
247
+
248
+ export interface SetAccessRequest {
249
+ /** Encoded ID of the canvas */
250
+ canvas_id: string;
251
+ /** Desired level of access */
252
+ access_level: string;
253
+ /** List of channels you wish to update access for. Can only be used if user_ids is not provided. */
254
+ channel_ids?: SetAccessRequestChannelIdsList;
255
+ /** List of users you wish to update access for. Can only be used if channel_ids is not provided. */
256
+ user_ids?: SetAccessRequestUserIdsList;
257
+ }
258
+ export const SetAccessRequest = /*@__PURE__*/ S.suspend(() =>
259
+ S.Struct({
260
+ canvas_id: S.String,
261
+ access_level: S.String,
262
+ channel_ids: S.optional(SetAccessRequestChannelIdsList),
263
+ user_ids: S.optional(SetAccessRequestUserIdsList),
264
+ }).pipe(T.Http({ method: "POST", uri: "/canvases.access.set", code: 200 })),
265
+ ).annotate({
266
+ identifier: "SetAccessRequest",
267
+ }) as any as S.Schema<SetAccessRequest>;
268
+
269
+ /** The channel IDs that could not be updated */
270
+ export type SetAccessResponseFailedToUpdateChannelIdsList = Array<string>;
271
+ export const SetAccessResponseFailedToUpdateChannelIdsList =
272
+ /*@__PURE__*/ S.Array(
273
+ S.String,
274
+ ) as any as S.Schema<SetAccessResponseFailedToUpdateChannelIdsList>;
275
+
276
+ /** The user IDs that could not be updated */
277
+ export type SetAccessResponseFailedToUpdateUserIdsList = Array<string>;
278
+ export const SetAccessResponseFailedToUpdateUserIdsList = /*@__PURE__*/ S.Array(
279
+ S.String,
280
+ ) as any as S.Schema<SetAccessResponseFailedToUpdateUserIdsList>;
281
+
282
+ export interface SetAccessResponse {
283
+ /** Always `true` (a failed call raises a typed error instead). */
284
+ ok: boolean;
285
+ /** The channel IDs that could not be updated */
286
+ failed_to_update_channel_ids?: SetAccessResponseFailedToUpdateChannelIdsList;
287
+ /** The user IDs that could not be updated */
288
+ failed_to_update_user_ids?: SetAccessResponseFailedToUpdateUserIdsList;
289
+ }
290
+ export const SetAccessResponse = /*@__PURE__*/ S.suspend(() =>
291
+ S.Struct({
292
+ ok: S.Boolean,
293
+ failed_to_update_channel_ids: S.optional(
294
+ SetAccessResponseFailedToUpdateChannelIdsList,
295
+ ),
296
+ failed_to_update_user_ids: S.optional(
297
+ SetAccessResponseFailedToUpdateUserIdsList,
298
+ ),
299
+ }),
300
+ ).annotate({
301
+ identifier: "SetAccessResponse",
302
+ }) as any as S.Schema<SetAccessResponse>;
303
+
304
+ export type CreateCanvaseError = SlackOpError;
305
+ /** Create canvas for a user Required scopes — bot: `canvases:write`; user: `canvases:write`; seamless_user: `seamless.user` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `canvas_disabled_user_team` — Canvas is disabled on user's team - `restricted_action` — User does not have permission to perform this action. - `canvas_creation_failed` — Canvas was unable to be created. - `free_teams_cannot_create_non_tabbed_canvases` — Free teams cannot create non-tabbed standalone canvases - `free_team_canvas_tab_already_exists` — Free teams are limited to one canvas tab per channel - `free_teams_cannot_create_standalone_canvases` — Free teams cannot create standalone canvases See https://docs.slack.dev/reference/methods/canvases.create */
306
+ export const createCanvase: API.OperationMethod<
307
+ CreateCanvaseRequest,
308
+ CreateCanvaseResponse,
309
+ CreateCanvaseError,
310
+ SlackOpContext
311
+ > = /*@__PURE__*/ API.make(() => ({
312
+ input: CreateCanvaseRequest,
313
+ output: CreateCanvaseResponse,
314
+ errors: [SlackError, SlackRateLimited],
315
+ protocol: SlackProtocol,
316
+ retry: Retry.Retry,
317
+ }));
318
+
319
+ export type DeleteAccessError = SlackOpError;
320
+ /** Remove access to a canvas for specified entities Required scopes — bot: `canvases:write`; user: `canvases:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `canvas_not_found` — The canvas you wish to revoke permissions for is not available. - `restricted_action` — User does not have permission to perform this action. - `canvas_disabled_user_team` — Canvas is disabled on user's team. - `invalid_parameters` — One of user_ids and channel_ids must be defined. - `channel_not_found` — A channel could not be found. - `user_not_found` — A user could not be found. See https://docs.slack.dev/reference/methods/canvases.access.delete */
321
+ export const deleteAccess: API.OperationMethod<
322
+ DeleteAccessRequest,
323
+ DeleteAccessResponse,
324
+ DeleteAccessError,
325
+ SlackOpContext
326
+ > = /*@__PURE__*/ API.make(() => ({
327
+ input: DeleteAccessRequest,
328
+ output: DeleteAccessResponse,
329
+ errors: [SlackError, SlackRateLimited],
330
+ protocol: SlackProtocol,
331
+ retry: Retry.Retry,
332
+ }));
333
+
334
+ export type DeleteCanvaseError = SlackOpError;
335
+ /** Deletes a canvas Required scopes — bot: `canvases:write`; user: `canvases:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `canvas_deleting_disabled` — This functionality is disabled. - `canvas_not_found` — The canvas does not exist, or is not visible to the calling user. - `restricted_action` — User does not have permission to perform this action. See https://docs.slack.dev/reference/methods/canvases.delete */
336
+ export const deleteCanvase: API.OperationMethod<
337
+ DeleteCanvaseRequest,
338
+ DeleteCanvaseResponse,
339
+ DeleteCanvaseError,
340
+ SlackOpContext
341
+ > = /*@__PURE__*/ API.make(() => ({
342
+ input: DeleteCanvaseRequest,
343
+ output: DeleteCanvaseResponse,
344
+ errors: [SlackError, SlackRateLimited],
345
+ protocol: SlackProtocol,
346
+ retry: Retry.Retry,
347
+ }));
348
+
349
+ export type EditCanvaseError = SlackOpError;
350
+ /** Update an existing canvas Required scopes — bot: `canvases:write`; user: `canvases:write`; seamless_user: `seamless.user` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `canvas_not_found` — The canvas you wish to apply changes to is not available. - `canvas_disabled_user_team` — Canvas is disabled on user's team - `free_teams_cannot_edit_standalone_canvases` — Free teams cannot edit standalone canvases - `restricted_action` — User does not have permission to perform this action. - `canvas_editing_failed` — The changes to the canvas failed to be applied. - `canvas_editing_locked` — Another edit to this canvas is currently in progress. Please retry after a short delay. - `canvas_too_large` — The canvas is too large to apply the requested changes. Reduce the size of the canvas or the edit and try again. See https://docs.slack.dev/reference/methods/canvases.edit */
351
+ export const editCanvase: API.OperationMethod<
352
+ EditCanvaseRequest,
353
+ EditCanvaseResponse,
354
+ EditCanvaseError,
355
+ SlackOpContext
356
+ > = /*@__PURE__*/ API.make(() => ({
357
+ input: EditCanvaseRequest,
358
+ output: EditCanvaseResponse,
359
+ errors: [SlackError, SlackRateLimited],
360
+ protocol: SlackProtocol,
361
+ retry: Retry.Retry,
362
+ }));
363
+
364
+ export type LookupSectionError = SlackOpError;
365
+ /** Find sections matching the provided criteria Required scopes — bot: `canvases:read`; user: `canvases:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `canvas_deleted` — The canvas you wish to search is not available. - `canvas_disabled_user_team` — Canvas is disabled on user's team. - `canvas_not_found` — The canvas you wish to search for is not available. - `internal_error` — Something went wrong on our end, please try again. See https://docs.slack.dev/reference/methods/canvases.sections.lookup */
366
+ export const lookupSection: API.OperationMethod<
367
+ LookupSectionRequest,
368
+ LookupSectionResponse,
369
+ LookupSectionError,
370
+ SlackOpContext
371
+ > = /*@__PURE__*/ API.make(() => ({
372
+ input: LookupSectionRequest,
373
+ output: LookupSectionResponse,
374
+ errors: [SlackError, SlackRateLimited],
375
+ protocol: SlackProtocol,
376
+ retry: Retry.Retry,
377
+ }));
378
+
379
+ export type SetAccessError = SlackOpError;
380
+ /** Sets the access level to a canvas for specified entities Required scopes — bot: `canvases:write`; user: `canvases:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `canvas_disabled_user_team` — Canvas is disabled on user's team - `canvas_not_found` — The canvas you wish to update permissions for is not available. - `channel_not_found` — A channel could not be found. - `failed_to_update_user_ids` — Failed to update the specified user_ids. - `invalid_parameters` — One of user_ids or channel_ids must be defined, but not both. - `restricted_action` — User does not have permission to perform this action. - `user_not_found` — A user could not be found. See https://docs.slack.dev/reference/methods/canvases.access.set */
381
+ export const setAccess: API.OperationMethod<
382
+ SetAccessRequest,
383
+ SetAccessResponse,
384
+ SetAccessError,
385
+ SlackOpContext
386
+ > = /*@__PURE__*/ API.make(() => ({
387
+ input: SetAccessRequest,
388
+ output: SetAccessResponse,
389
+ errors: [SlackError, SlackRateLimited],
390
+ protocol: SlackProtocol,
391
+ retry: Retry.Retry,
392
+ }));