@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,366 @@
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.js";
5
+ import { SlackProtocol, } from "../protocol.js";
6
+ import { slackPaginate } from "../pagination.js";
7
+ import { SlackError, SlackRateLimited } from "../errors.js";
8
+ import * as Retry from "../retry.js";
9
+ export const CreateItemRequestInitialFieldsList = /*@__PURE__*/ S.Array(S.Unknown);
10
+ export const CreateItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
11
+ list_id: S.String,
12
+ duplicated_item_id: S.optional(S.String),
13
+ parent_item_id: S.optional(S.String),
14
+ initial_fields: S.optional(CreateItemRequestInitialFieldsList),
15
+ }).pipe(T.Http({
16
+ method: "POST",
17
+ uri: "/slackLists.items.create",
18
+ code: 200,
19
+ contentType: "form-urlencoded",
20
+ }))).annotate({
21
+ identifier: "CreateItemRequest",
22
+ });
23
+ export const CreateItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
24
+ ok: S.Boolean,
25
+ item: S.Unknown,
26
+ })).annotate({
27
+ identifier: "CreateItemResponse",
28
+ });
29
+ export const CreateSlackListRequestDescriptionBlocksList =
30
+ /*@__PURE__*/ S.Array(S.Unknown);
31
+ export const CreateSlackListRequestSchemaList = /*@__PURE__*/ S.Array(S.Unknown);
32
+ export const CreateSlackListRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
33
+ name: S.String,
34
+ description_blocks: S.optional(CreateSlackListRequestDescriptionBlocksList),
35
+ schema: S.optional(CreateSlackListRequestSchemaList),
36
+ copy_from_list_id: S.optional(S.String),
37
+ include_copied_list_records: S.optional(S.Boolean),
38
+ todo_mode: S.optional(S.Boolean),
39
+ }).pipe(T.Http({
40
+ method: "POST",
41
+ uri: "/slackLists.create",
42
+ code: 200,
43
+ contentType: "form-urlencoded",
44
+ }))).annotate({
45
+ identifier: "CreateSlackListRequest",
46
+ });
47
+ export const CreateSlackListResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
48
+ ok: S.Boolean,
49
+ list_id: S.String,
50
+ list_metadata: S.optional(S.Unknown),
51
+ })).annotate({
52
+ identifier: "CreateSlackListResponse",
53
+ });
54
+ export const DeleteAccessRequestChannelIdsList = /*@__PURE__*/ S.Array(S.String);
55
+ export const DeleteAccessRequestUserIdsList = /*@__PURE__*/ S.Array(S.String);
56
+ export const DeleteAccessRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
57
+ list_id: S.String,
58
+ channel_ids: S.optional(DeleteAccessRequestChannelIdsList),
59
+ user_ids: S.optional(DeleteAccessRequestUserIdsList),
60
+ }).pipe(T.Http({
61
+ method: "POST",
62
+ uri: "/slackLists.access.delete",
63
+ code: 200,
64
+ contentType: "form-urlencoded",
65
+ }))).annotate({
66
+ identifier: "DeleteAccessRequest",
67
+ });
68
+ export const DeleteAccessResponseFailedToUpdateChannelIdsList =
69
+ /*@__PURE__*/ S.Array(S.String);
70
+ export const DeleteAccessResponseFailedToUpdateUserIdsList =
71
+ /*@__PURE__*/ S.Array(S.String);
72
+ export const DeleteAccessResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
73
+ ok: S.Boolean,
74
+ failed_to_update_channel_ids: S.optional(DeleteAccessResponseFailedToUpdateChannelIdsList),
75
+ failed_to_update_user_ids: S.optional(DeleteAccessResponseFailedToUpdateUserIdsList),
76
+ })).annotate({
77
+ identifier: "DeleteAccessResponse",
78
+ });
79
+ export const DeleteItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
80
+ list_id: S.String,
81
+ id: S.String,
82
+ }).pipe(T.Http({
83
+ method: "POST",
84
+ uri: "/slackLists.items.delete",
85
+ code: 200,
86
+ contentType: "form-urlencoded",
87
+ }))).annotate({
88
+ identifier: "DeleteItemRequest",
89
+ });
90
+ export const DeleteItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
91
+ ok: S.Boolean,
92
+ })).annotate({
93
+ identifier: "DeleteItemResponse",
94
+ });
95
+ export const DeleteMultipleRequestIdsList = /*@__PURE__*/ S.Array(S.String);
96
+ export const DeleteMultipleRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
97
+ list_id: S.String,
98
+ ids: DeleteMultipleRequestIdsList,
99
+ }).pipe(T.Http({
100
+ method: "POST",
101
+ uri: "/slackLists.items.deleteMultiple",
102
+ code: 200,
103
+ contentType: "form-urlencoded",
104
+ }))).annotate({
105
+ identifier: "DeleteMultipleRequest",
106
+ });
107
+ export const DeleteMultipleResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
108
+ ok: S.Boolean,
109
+ })).annotate({
110
+ identifier: "DeleteMultipleResponse",
111
+ });
112
+ export const DownloadGetRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
113
+ list_id: S.String,
114
+ job_id: S.String,
115
+ format: S.optional(S.String),
116
+ include_threads: S.optional(S.Boolean),
117
+ include_attachments: S.optional(S.Boolean),
118
+ }).pipe(T.Http({
119
+ method: "POST",
120
+ uri: "/slackLists.download.get",
121
+ code: 200,
122
+ contentType: "form-urlencoded",
123
+ }))).annotate({
124
+ identifier: "DownloadGetRequest",
125
+ });
126
+ export const DownloadGetResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
127
+ ok: S.Boolean,
128
+ status: S.Unknown,
129
+ download_url: S.optional(S.String),
130
+ })).annotate({
131
+ identifier: "DownloadGetResponse",
132
+ });
133
+ export const DownloadStartRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
134
+ list_id: S.String,
135
+ include_archived: S.optional(S.Boolean),
136
+ format: S.optional(S.String),
137
+ include_threads: S.optional(S.Boolean),
138
+ include_attachments: S.optional(S.Boolean),
139
+ }).pipe(T.Http({
140
+ method: "POST",
141
+ uri: "/slackLists.download.start",
142
+ code: 200,
143
+ contentType: "form-urlencoded",
144
+ }))).annotate({
145
+ identifier: "DownloadStartRequest",
146
+ });
147
+ export const DownloadStartResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
148
+ ok: S.Boolean,
149
+ job_id: S.Number,
150
+ })).annotate({
151
+ identifier: "DownloadStartResponse",
152
+ });
153
+ export const ItemsInfoRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
154
+ list_id: S.String,
155
+ id: S.String,
156
+ include_is_subscribed: S.optional(S.Boolean),
157
+ }).pipe(T.Http({
158
+ method: "POST",
159
+ uri: "/slackLists.items.info",
160
+ code: 200,
161
+ contentType: "form-urlencoded",
162
+ }))).annotate({
163
+ identifier: "ItemsInfoRequest",
164
+ });
165
+ export const ItemsInfoResponseSubtasksList = /*@__PURE__*/ S.Array(S.Unknown);
166
+ export const ItemsInfoResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
167
+ ok: S.Boolean,
168
+ list: S.Unknown,
169
+ record: S.Unknown,
170
+ parent_task: S.optional(S.Unknown),
171
+ subtasks: S.optional(ItemsInfoResponseSubtasksList),
172
+ })).annotate({
173
+ identifier: "ItemsInfoResponse",
174
+ });
175
+ export const ListItemsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
176
+ list_id: S.String,
177
+ limit: S.optional(S.Number),
178
+ cursor: S.optional(S.String),
179
+ archived: S.optional(S.Boolean),
180
+ }).pipe(T.Http({
181
+ method: "POST",
182
+ uri: "/slackLists.items.list",
183
+ code: 200,
184
+ contentType: "form-urlencoded",
185
+ }))).annotate({
186
+ identifier: "ListItemsRequest",
187
+ });
188
+ export const ListItemsResponseItemsList = /*@__PURE__*/ S.Array(S.Unknown);
189
+ export const ListItemsResponseResponseMetadata = /*@__PURE__*/ S.suspend(() => S.Struct({
190
+ next_cursor: S.optional(S.String),
191
+ })).annotate({
192
+ identifier: "ListItemsResponseResponseMetadata",
193
+ });
194
+ export const ListItemsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
195
+ ok: S.Boolean,
196
+ items: ListItemsResponseItemsList,
197
+ response_metadata: S.optional(ListItemsResponseResponseMetadata),
198
+ })).annotate({
199
+ identifier: "ListItemsResponse",
200
+ });
201
+ export const SetAccessRequestChannelIdsList = /*@__PURE__*/ S.Array(S.String);
202
+ export const SetAccessRequestUserIdsList = /*@__PURE__*/ S.Array(S.String);
203
+ export const SetAccessRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
204
+ list_id: S.String,
205
+ access_level: S.String,
206
+ channel_ids: S.optional(SetAccessRequestChannelIdsList),
207
+ user_ids: S.optional(SetAccessRequestUserIdsList),
208
+ }).pipe(T.Http({
209
+ method: "POST",
210
+ uri: "/slackLists.access.set",
211
+ code: 200,
212
+ contentType: "form-urlencoded",
213
+ }))).annotate({
214
+ identifier: "SetAccessRequest",
215
+ });
216
+ export const SetAccessResponseFailedToUpdateChannelIdsList =
217
+ /*@__PURE__*/ S.Array(S.String);
218
+ export const SetAccessResponseFailedToUpdateUserIdsList = /*@__PURE__*/ S.Array(S.String);
219
+ export const SetAccessResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
220
+ ok: S.Boolean,
221
+ failed_to_update_channel_ids: S.optional(SetAccessResponseFailedToUpdateChannelIdsList),
222
+ failed_to_update_user_ids: S.optional(SetAccessResponseFailedToUpdateUserIdsList),
223
+ })).annotate({
224
+ identifier: "SetAccessResponse",
225
+ });
226
+ export const UpdateItemRequestCellsList = /*@__PURE__*/ S.Array(S.Unknown);
227
+ export const UpdateItemRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
228
+ list_id: S.String,
229
+ cells: UpdateItemRequestCellsList,
230
+ }).pipe(T.Http({
231
+ method: "POST",
232
+ uri: "/slackLists.items.update",
233
+ code: 200,
234
+ contentType: "form-urlencoded",
235
+ }))).annotate({
236
+ identifier: "UpdateItemRequest",
237
+ });
238
+ export const UpdateItemResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
239
+ ok: S.Boolean,
240
+ })).annotate({
241
+ identifier: "UpdateItemResponse",
242
+ });
243
+ export const UpdateSlackListRequestDescriptionBlocksList =
244
+ /*@__PURE__*/ S.Array(S.Unknown);
245
+ export const UpdateSlackListRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
246
+ id: S.String,
247
+ name: S.optional(S.String),
248
+ description_blocks: S.optional(UpdateSlackListRequestDescriptionBlocksList),
249
+ todo_mode: S.optional(S.Boolean),
250
+ }).pipe(T.Http({
251
+ method: "POST",
252
+ uri: "/slackLists.update",
253
+ code: 200,
254
+ contentType: "form-urlencoded",
255
+ }))).annotate({
256
+ identifier: "UpdateSlackListRequest",
257
+ });
258
+ export const UpdateSlackListResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
259
+ ok: S.Boolean,
260
+ })).annotate({
261
+ identifier: "UpdateSlackListResponse",
262
+ });
263
+ /** Add a new item to an existing List. Required scopes — bot: `lists:write`; user: `lists:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `list_not_found` — The List was not found. - `over_row_maximum` — Cannot create more items over the maximum. - `team_not_found` — The team cannot be found. - `user_not_found` — The user cannot be found. - `duplicated_item_not_found` — The item to duplicate cannot be found. - `invalid_option_id` — Option ID provided does not match column definition. - `invalid_args` — The provided arguments are invalid. - `uneditable_column` — Initial values provided for an uneditable column. - `invalid_input_type` — The field value type does not match the column type. - `invalid_column_id` — The column ID provided does not exist in the List. - `over_cell_fields_limit` — Too many values provided for a single field. - `file_not_found` — The attachment file could not be found. - `invalid_vote_value` — Invalid value provided for a vote column. See https://docs.slack.dev/reference/methods/slackLists.items.create */
264
+ export const createItem = /*@__PURE__*/ API.make(() => ({
265
+ input: CreateItemRequest,
266
+ output: CreateItemResponse,
267
+ errors: [SlackError, SlackRateLimited],
268
+ protocol: SlackProtocol,
269
+ retry: Retry.Retry,
270
+ }));
271
+ /** Create a List. Required scopes — bot: `lists:write`; user: `lists:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `permission_denied` — The user does not have permission to perform this action. - `invalid_schema` — The schema was invalid. - `invalid_primary_column` — Missing or more than one primary column. - `team_not_found` — The team cannot be found. - `user_not_found` — The user cannot be found. - `over_list_file_maximum` — Cannot create any more List files. - `over_title_length_maximum` — Title can not exceed defined length. - `invalid_column_type` — Column type not allowed. - `missing_arg_copy_from_list_id` — Missing argument `copy_from_list_id`. - `invalid_copy_and_schema_args` — Cannot provide both `copy_from_list_id` and `schema`. - `over_column_maximum` — Cannot create List with more than allowed column count. See https://docs.slack.dev/reference/methods/slackLists.create */
272
+ export const createSlackList = /*@__PURE__*/ API.make(() => ({
273
+ input: CreateSlackListRequest,
274
+ output: CreateSlackListResponse,
275
+ errors: [SlackError, SlackRateLimited],
276
+ protocol: SlackProtocol,
277
+ retry: Retry.Retry,
278
+ }));
279
+ /** Revoke access to a List for specified entities. Required scopes — bot: `lists:write`; user: `lists:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `lists_disabled_user_team` — Lists is disabled on user's team. - `list_not_found` — The List 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/slackLists.access.delete */
280
+ export const deleteAccess = /*@__PURE__*/ API.make(() => ({
281
+ input: DeleteAccessRequest,
282
+ output: DeleteAccessResponse,
283
+ errors: [SlackError, SlackRateLimited],
284
+ protocol: SlackProtocol,
285
+ retry: Retry.Retry,
286
+ }));
287
+ /** Deletes an item from an existing List. Required scopes — bot: `lists:write`; user: `lists:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `list_not_found` — The List was not found. - `record_not_found` — The record was not found in the List. - `team_not_found` — The team cannot be found. - `user_not_found` — The user cannot be found. See https://docs.slack.dev/reference/methods/slackLists.items.delete */
288
+ export const deleteItem = /*@__PURE__*/ API.make(() => ({
289
+ input: DeleteItemRequest,
290
+ output: DeleteItemResponse,
291
+ errors: [SlackError, SlackRateLimited],
292
+ protocol: SlackProtocol,
293
+ retry: Retry.Retry,
294
+ }));
295
+ /** Deletes multiple items from an existing List. Required scopes — bot: `lists:write`; user: `lists:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `list_not_found` — The List was not found. - `team_not_found` — The team cannot be found. - `user_not_found` — The user cannot be found. See https://docs.slack.dev/reference/methods/slackLists.items.deleteMultiple */
296
+ export const deleteMultiple = /*@__PURE__*/ API.make(() => ({
297
+ input: DeleteMultipleRequest,
298
+ output: DeleteMultipleResponse,
299
+ errors: [SlackError, SlackRateLimited],
300
+ protocol: SlackProtocol,
301
+ retry: Retry.Retry,
302
+ }));
303
+ /** Retrieve List download URL from an export job to download List contents. Required scopes — bot: `lists:read`; user: `lists:read` Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `list_not_found` — The List was not found. - `permission_denied` — The bot does not have permission to perform this action. - `unknown_method` — Feature not enabled for this team. - `job_not_found` — Could not find an export job matching that ID. See https://docs.slack.dev/reference/methods/slackLists.download.get */
304
+ export const downloadGet = /*@__PURE__*/ API.make(() => ({
305
+ input: DownloadGetRequest,
306
+ output: DownloadGetResponse,
307
+ errors: [SlackError, SlackRateLimited],
308
+ protocol: SlackProtocol,
309
+ retry: Retry.Retry,
310
+ }));
311
+ /** Initiate a job to export List contents. Required scopes — bot: `lists:read`; user: `lists:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `list_not_found` — The List was not found. - `permission_denied` — The bot does not have permission to perform this action. - `unknown_method` — Feature not enabled for this team. See https://docs.slack.dev/reference/methods/slackLists.download.start */
312
+ export const downloadStart = /*@__PURE__*/ API.make(() => ({
313
+ input: DownloadStartRequest,
314
+ output: DownloadStartResponse,
315
+ errors: [SlackError, SlackRateLimited],
316
+ protocol: SlackProtocol,
317
+ retry: Retry.Retry,
318
+ }));
319
+ /** Get a row from a List. Required scopes — bot: `lists:read`; user: `lists:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `list_not_found` — The List was not found. - `record_not_found` — The record was not found in the List. - `record_deleted` — The record has been deleted. - `team_not_found` — The team cannot be found. - `user_not_found` — The user cannot be found. See https://docs.slack.dev/reference/methods/slackLists.items.info */
320
+ export const itemsInfo = /*@__PURE__*/ API.make(() => ({
321
+ input: ItemsInfoRequest,
322
+ output: ItemsInfoResponse,
323
+ errors: [SlackError, SlackRateLimited],
324
+ protocol: SlackProtocol,
325
+ retry: Retry.Retry,
326
+ }));
327
+ /** Get records from a List. Required scopes — bot: `lists:read`; user: `lists:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `list_not_found` — The List was not found. - `team_not_found` — The team cannot be found. - `user_not_found` — The user cannot be found. - `invalid_cursor` — Value passed for `cursor` was not valid or is no longer valid. - `archive_not_supported` — Archiving is not supported. See https://docs.slack.dev/reference/methods/slackLists.items.list */
328
+ export const listItems = /*@__PURE__*/ API.makePaginated(() => ({
329
+ input: ListItemsRequest,
330
+ output: ListItemsResponse,
331
+ errors: [SlackError, SlackRateLimited],
332
+ protocol: SlackProtocol,
333
+ retry: Retry.Retry,
334
+ pagination: {
335
+ mode: "cursor",
336
+ inputToken: "cursor",
337
+ outputToken: "response_metadata.next_cursor",
338
+ items: "items",
339
+ pageSize: "limit",
340
+ },
341
+ }), slackPaginate);
342
+ /** Set the access level to a List for specified entities. Required scopes — bot: `lists:write`; user: `lists:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `lists_disabled_user_team` — Lists is disabled on user's team. - `list_not_found` — The List 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/slackLists.access.set */
343
+ export const setAccess = /*@__PURE__*/ API.make(() => ({
344
+ input: SetAccessRequest,
345
+ output: SetAccessResponse,
346
+ errors: [SlackError, SlackRateLimited],
347
+ protocol: SlackProtocol,
348
+ retry: Retry.Retry,
349
+ }));
350
+ /** Updates cells in a List. Required scopes — bot: `lists:write`; user: `lists:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `list_not_found` — The List was not found. - `row_not_found` — The row was not found. - `column_not_found` — The column was not found. - `file_not_found` — Invalid file ID for this List. - `invalid_input_type` — Supplied value key or value type is invalid for the given column type. - `invalid_row_id` — Invalid row ID for this List. - `invalid_column_id` — Invalid column ID for this List. - `permission_denied` — The user does not have permission to perform this action. - `team_not_found` — The team cannot be found. - `user_not_found` — The user cannot be found. - `channel_not_found` — The channel cannot be found. - `uneditable_column` — The column cannot be updated. - `invalid_blocks` — Rich text payload supplied is invalid. - `invalid_text_block` — Rich text payload supplied is invalid. - `invalid_email` — Email supplied is invalid. - `invalid_link` — Message archive link supplied is invalid. - `invalid_date` — Date supplied is invalid. - `invalid_option_id` — Option supplied is invalid. - `row_id_not_provided` — The `row_id` or `row_id_to_create` field must be provided. - `column_id_not_provided` — The `column_id` or `column_id_to_create` field must be provided. - `over_cell_fields_limit` — The supplied cell fields are over the cell field maximum. - `invalid_message` — Invalid message provided. - `invalid_attachment` — Invalid attachment provided. - `invalid_phone_number` — Invalid phone number provided. - `invalid_vote_value` — Invalid vote value is supplied. See https://docs.slack.dev/reference/methods/slackLists.items.update */
351
+ export const updateItem = /*@__PURE__*/ API.make(() => ({
352
+ input: UpdateItemRequest,
353
+ output: UpdateItemResponse,
354
+ errors: [SlackError, SlackRateLimited],
355
+ protocol: SlackProtocol,
356
+ retry: Retry.Retry,
357
+ }));
358
+ /** Update a List. Required scopes — bot: `lists:write`; user: `lists:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `list_not_found` — The List was not found. - `team_not_found` — The team cannot be found. - `user_not_found` — The user cannot be found. - `list_edits_update_error` — Failed to update List metadata. - `list_editor_upsert_error` — Failed to upsert List editor. - `over_title_length_maximum` — Title can not exceed defined length. - `file_channel_rename_error` — Failed to rename file channel based on file title. - `unexpected_description_blocks_arg` — Unexpected description blocks argument. - `missing_arguments` — No arguments were provided to update the List. See https://docs.slack.dev/reference/methods/slackLists.update */
359
+ export const updateSlackList = /*@__PURE__*/ API.make(() => ({
360
+ input: UpdateSlackListRequest,
361
+ output: UpdateSlackListResponse,
362
+ errors: [SlackError, SlackRateLimited],
363
+ protocol: SlackProtocol,
364
+ retry: Retry.Retry,
365
+ }));
366
+ //# sourceMappingURL=lists.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lists.js","sourceRoot":"","sources":["../../src/services/lists.ts"],"names":[],"mappings":"AAAA,wGAAwG;AACxG,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EACL,a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sBAAsB;IAC7B,MAAM,EAAE,uBAAuB;IAC/B,MAAM,EAAE,CAAC,UAAU,EAAE,gBAAgB,CAAC;IACtC,QAAQ,EAAE,aAAa;IACvB,KAAK,EAAE,KAAK,CAAC,KAAK;CACnB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,34 @@
1
+ import * as S from "@distilled.cloud/core/schema";
2
+ import * as API from "@distilled.cloud/core/api";
3
+ import { type SlackOpError, type SlackOpContext } from "../protocol.ts";
4
+ export type { SlackOpError, SlackOpContext };
5
+ export type MigrationExchangeRequestUsersList = Array<string>;
6
+ export declare const MigrationExchangeRequestUsersList: S.Schema<MigrationExchangeRequestUsersList>;
7
+ export interface MigrationExchangeRequest {
8
+ /** A comma-separated list of user ids, up to 400 per request */
9
+ users: MigrationExchangeRequestUsersList;
10
+ /** Specify team_id starts with `T` in case of Org Token */
11
+ team_id?: string;
12
+ /** Specify `true` to convert `W` global user IDs to workspace-specific `U` IDs. Defaults to `false`. */
13
+ to_old?: boolean;
14
+ }
15
+ export declare const MigrationExchangeRequest: S.Schema<MigrationExchangeRequest>;
16
+ export type MigrationExchangeResponseUserIdMapMap = {
17
+ [key: string]: unknown | undefined;
18
+ };
19
+ export declare const MigrationExchangeResponseUserIdMapMap: S.Schema<MigrationExchangeResponseUserIdMapMap>;
20
+ export type MigrationExchangeResponseInvalidUserIdsList = Array<string>;
21
+ export declare const MigrationExchangeResponseInvalidUserIdsList: S.Schema<MigrationExchangeResponseInvalidUserIdsList>;
22
+ export interface MigrationExchangeResponse {
23
+ /** Always `true` (a failed call raises a typed error instead). */
24
+ ok: boolean;
25
+ team_id: string;
26
+ enterprise_id: string;
27
+ user_id_map: MigrationExchangeResponseUserIdMapMap;
28
+ invalid_user_ids?: MigrationExchangeResponseInvalidUserIdsList;
29
+ }
30
+ export declare const MigrationExchangeResponse: S.Schema<MigrationExchangeResponse>;
31
+ export type MigrationExchangeError = SlackOpError;
32
+ /** For Enterprise organization workspaces, map local user IDs to global user IDs Required scopes — bot: `tokens.basic`; user: `tokens.basic` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `not_enterprise_team` — The workspace associated with the token is not part of an Enterprise organization. User IDs have not changed and there is nothing to map. - `too_many_users` — Too many user IDs provided in `users`. Up to 400 user IDs are allowed per request. See https://docs.slack.dev/reference/methods/migration.exchange */
33
+ export declare const migrationExchange: API.OperationMethod<MigrationExchangeRequest, MigrationExchangeResponse, MigrationExchangeError, SlackOpContext>;
34
+ //# sourceMappingURL=migration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration.d.ts","sourceRoot":"","sources":["../../src/services/migration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAEjD,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AAIxB,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;AAE7C,MAAM,MAAM,iCAAiC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAC9D,eAAO,MAAM,iCAAiC,EAElC,CAAC,CAAC,MAAM,CAAC,iCAAiC,CAAC,CAAC;AAExD,MAAM,WAAW,wBAAwB;IACvC,gEAAgE;IAChE,KAAK,EAAE,iCAAiC,CAAC;IACzC,2DAA2D;IAC3D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wGAAwG;IACxG,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AACD,eAAO,MAAM,wBAAwB,EAQxB,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC;AAEhD,MAAM,MAAM,qCAAqC,GAAG;IAClD,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CACpC,CAAC;AACF,eAAO,MAAM,qCAAqC,EAGtC,CAAC,CAAC,MAAM,CAAC,qCAAqC,CAAC,CAAC;AAE5D,MAAM,MAAM,2CAA2C,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AACxE,eAAO,MAAM,2CAA2C,EAG1C,CAAC,CAAC,MAAM,CAAC,2CAA2C,CAAC,CAAC;AAEpE,MAAM,WAAW,yBAAyB;IACxC,kEAAkE;IAClE,EAAE,EAAE,OAAO,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,qCAAqC,CAAC;IACnD,gBAAgB,CAAC,EAAE,2CAA2C,CAAC;CAChE;AACD,eAAO,MAAM,yBAAyB,EAUzB,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,CAAC;AAEjD,MAAM,MAAM,sBAAsB,GAAG,YAAY,CAAC;AAClD,4iBAA4iB;AAC5iB,eAAO,MAAM,iBAAiB,EAAE,GAAG,CAAC,eAAe,CACjD,wBAAwB,EACxB,yBAAyB,EACzB,sBAAsB,EACtB,cAAc,CAOb,CAAC"}
@@ -0,0 +1,36 @@
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.js";
5
+ import { SlackProtocol, } from "../protocol.js";
6
+ import { SlackError, SlackRateLimited } from "../errors.js";
7
+ import * as Retry from "../retry.js";
8
+ export const MigrationExchangeRequestUsersList = /*@__PURE__*/ S.Array(S.String);
9
+ export const MigrationExchangeRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
10
+ users: MigrationExchangeRequestUsersList.pipe(T.Query()),
11
+ team_id: S.optional(S.String.pipe(T.Query())),
12
+ to_old: S.optional(S.Boolean.pipe(T.Query())),
13
+ }).pipe(T.Http({ method: "GET", uri: "/migration.exchange", code: 200 }))).annotate({
14
+ identifier: "MigrationExchangeRequest",
15
+ });
16
+ export const MigrationExchangeResponseUserIdMapMap = /*@__PURE__*/ S.Record(S.String, S.Unknown);
17
+ export const MigrationExchangeResponseInvalidUserIdsList =
18
+ /*@__PURE__*/ S.Array(S.String);
19
+ export const MigrationExchangeResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
20
+ ok: S.Boolean,
21
+ team_id: S.String,
22
+ enterprise_id: S.String,
23
+ user_id_map: MigrationExchangeResponseUserIdMapMap,
24
+ invalid_user_ids: S.optional(MigrationExchangeResponseInvalidUserIdsList),
25
+ })).annotate({
26
+ identifier: "MigrationExchangeResponse",
27
+ });
28
+ /** For Enterprise organization workspaces, map local user IDs to global user IDs Required scopes — bot: `tokens.basic`; user: `tokens.basic` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `not_enterprise_team` — The workspace associated with the token is not part of an Enterprise organization. User IDs have not changed and there is nothing to map. - `too_many_users` — Too many user IDs provided in `users`. Up to 400 user IDs are allowed per request. See https://docs.slack.dev/reference/methods/migration.exchange */
29
+ export const migrationExchange = /*@__PURE__*/ API.make(() => ({
30
+ input: MigrationExchangeRequest,
31
+ output: MigrationExchangeResponse,
32
+ errors: [SlackError, SlackRateLimited],
33
+ protocol: SlackProtocol,
34
+ retry: Retry.Retry,
35
+ }));
36
+ //# sourceMappingURL=migration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration.js","sourceRoot":"","sources":["../../src/services/migration.ts"],"names":[],"mappings":"AAAA,wGAAwG;AACxG,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EACL,aAAa,GAGd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,KAAK,KAAK,MAAM,aAAa,CAAC;AAKrC,MAAM,CAAC,MAAM,iCAAiC,GAAG,aAAa,CAAC,CAAC,CAAC,KAAK,CACpE,CAAC,CAAC,MAAM,CAC6C,CAAC;AAUxD,MAAM,CAAC,M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