@distilled.cloud/slack 1.0.0-rc.13 → 1.0.0-rc.14

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 (218) hide show
  1. package/lib/credentials.d.ts +2 -2
  2. package/lib/credentials.d.ts.map +1 -1
  3. package/lib/credentials.js +3 -3
  4. package/lib/credentials.js.map +1 -1
  5. package/lib/errors.d.ts.map +1 -1
  6. package/lib/errors.js +1 -1
  7. package/lib/errors.js.map +1 -1
  8. package/lib/index.d.ts +3 -3
  9. package/lib/index.d.ts.map +1 -1
  10. package/lib/index.js +3 -3
  11. package/lib/index.js.map +1 -1
  12. package/lib/pagination.d.ts.map +1 -1
  13. package/lib/pagination.js.map +1 -1
  14. package/lib/protocol.d.ts +3 -3
  15. package/lib/protocol.d.ts.map +1 -1
  16. package/lib/protocol.js +12 -18
  17. package/lib/protocol.js.map +1 -1
  18. package/lib/protocol.test.d.ts +2 -0
  19. package/lib/protocol.test.d.ts.map +1 -0
  20. package/lib/protocol.test.js +288 -0
  21. package/lib/protocol.test.js.map +1 -0
  22. package/lib/retry.d.ts +1 -1
  23. package/lib/retry.d.ts.map +1 -1
  24. package/lib/retry.js +1 -1
  25. package/lib/retry.js.map +1 -1
  26. package/lib/services/admin.d.ts +236 -29
  27. package/lib/services/admin.d.ts.map +1 -1
  28. package/lib/services/admin.js +417 -749
  29. package/lib/services/admin.js.map +1 -1
  30. package/lib/services/agents.d.ts +423 -0
  31. package/lib/services/agents.d.ts.map +1 -0
  32. package/lib/services/agents.js +315 -0
  33. package/lib/services/agents.js.map +1 -0
  34. package/lib/services/api.d.ts +1 -1
  35. package/lib/services/api.d.ts.map +1 -1
  36. package/lib/services/api.js +4 -6
  37. package/lib/services/api.js.map +1 -1
  38. package/lib/services/apps.d.ts +21 -3
  39. package/lib/services/apps.d.ts.map +1 -1
  40. package/lib/services/apps.js +65 -133
  41. package/lib/services/apps.js.map +1 -1
  42. package/lib/services/assistant.d.ts +4 -4
  43. package/lib/services/assistant.d.ts.map +1 -1
  44. package/lib/services/assistant.js +16 -38
  45. package/lib/services/assistant.js.map +1 -1
  46. package/lib/services/auth.d.ts +2 -2
  47. package/lib/services/auth.d.ts.map +1 -1
  48. package/lib/services/auth.js +11 -28
  49. package/lib/services/auth.js.map +1 -1
  50. package/lib/services/blocks.d.ts +1 -1
  51. package/lib/services/blocks.d.ts.map +1 -1
  52. package/lib/services/blocks.js +5 -9
  53. package/lib/services/blocks.js.map +1 -1
  54. package/lib/services/bookmarks.d.ts +4 -4
  55. package/lib/services/bookmarks.d.ts.map +1 -1
  56. package/lib/services/bookmarks.js +14 -30
  57. package/lib/services/bookmarks.js.map +1 -1
  58. package/lib/services/bots.d.ts +1 -1
  59. package/lib/services/bots.d.ts.map +1 -1
  60. package/lib/services/bots.js +7 -15
  61. package/lib/services/bots.js.map +1 -1
  62. package/lib/services/calls.d.ts +1 -1
  63. package/lib/services/calls.d.ts.map +1 -1
  64. package/lib/services/calls.js +13 -33
  65. package/lib/services/calls.js.map +1 -1
  66. package/lib/services/canvases.d.ts +22 -2
  67. package/lib/services/canvases.d.ts.map +1 -1
  68. package/lib/services/canvases.js +37 -48
  69. package/lib/services/canvases.js.map +1 -1
  70. package/lib/services/chat.d.ts +29 -25
  71. package/lib/services/chat.d.ts.map +1 -1
  72. package/lib/services/chat.js +47 -95
  73. package/lib/services/chat.js.map +1 -1
  74. package/lib/services/conversations.d.ts +10 -8
  75. package/lib/services/conversations.d.ts.map +1 -1
  76. package/lib/services/conversations.js +43 -115
  77. package/lib/services/conversations.js.map +1 -1
  78. package/lib/services/dialog.d.ts +1 -1
  79. package/lib/services/dialog.d.ts.map +1 -1
  80. package/lib/services/dialog.js +5 -9
  81. package/lib/services/dialog.js.map +1 -1
  82. package/lib/services/dnd.d.ts +1 -1
  83. package/lib/services/dnd.d.ts.map +1 -1
  84. package/lib/services/dnd.js +10 -24
  85. package/lib/services/dnd.js.map +1 -1
  86. package/lib/services/emoji.d.ts +1 -1
  87. package/lib/services/emoji.d.ts.map +1 -1
  88. package/lib/services/emoji.js +6 -11
  89. package/lib/services/emoji.js.map +1 -1
  90. package/lib/services/entity.d.ts +1 -1
  91. package/lib/services/entity.d.ts.map +1 -1
  92. package/lib/services/entity.js +8 -20
  93. package/lib/services/entity.js.map +1 -1
  94. package/lib/services/files.d.ts +5 -5
  95. package/lib/services/files.d.ts.map +1 -1
  96. package/lib/services/files.js +39 -109
  97. package/lib/services/files.js.map +1 -1
  98. package/lib/services/functions.d.ts +1 -1
  99. package/lib/services/functions.d.ts.map +1 -1
  100. package/lib/services/functions.js +28 -75
  101. package/lib/services/functions.js.map +1 -1
  102. package/lib/services/index.d.ts +1 -0
  103. package/lib/services/index.d.ts.map +1 -1
  104. package/lib/services/index.js +1 -0
  105. package/lib/services/index.js.map +1 -1
  106. package/lib/services/lists.d.ts +5 -1
  107. package/lib/services/lists.d.ts.map +1 -1
  108. package/lib/services/lists.js +35 -146
  109. package/lib/services/lists.js.map +1 -1
  110. package/lib/services/migration.d.ts +1 -1
  111. package/lib/services/migration.d.ts.map +1 -1
  112. package/lib/services/migration.js +5 -8
  113. package/lib/services/migration.js.map +1 -1
  114. package/lib/services/oauth.d.ts +38 -2
  115. package/lib/services/oauth.d.ts.map +1 -1
  116. package/lib/services/oauth.js +67 -50
  117. package/lib/services/oauth.js.map +1 -1
  118. package/lib/services/openid.d.ts +1 -1
  119. package/lib/services/openid.d.ts.map +1 -1
  120. package/lib/services/openid.js +7 -15
  121. package/lib/services/openid.js.map +1 -1
  122. package/lib/services/pins.d.ts +1 -1
  123. package/lib/services/pins.d.ts.map +1 -1
  124. package/lib/services/pins.js +7 -15
  125. package/lib/services/pins.js.map +1 -1
  126. package/lib/services/reactions.d.ts +2 -2
  127. package/lib/services/reactions.d.ts.map +1 -1
  128. package/lib/services/reactions.js +13 -29
  129. package/lib/services/reactions.js.map +1 -1
  130. package/lib/services/reminders.d.ts +1 -1
  131. package/lib/services/reminders.d.ts.map +1 -1
  132. package/lib/services/reminders.js +13 -33
  133. package/lib/services/reminders.js.map +1 -1
  134. package/lib/services/rtm.d.ts +1 -1
  135. package/lib/services/rtm.d.ts.map +1 -1
  136. package/lib/services/rtm.js +9 -21
  137. package/lib/services/rtm.js.map +1 -1
  138. package/lib/services/search.d.ts +1 -1
  139. package/lib/services/search.d.ts.map +1 -1
  140. package/lib/services/search.js +13 -30
  141. package/lib/services/search.js.map +1 -1
  142. package/lib/services/stars.d.ts +1 -1
  143. package/lib/services/stars.d.ts.map +1 -1
  144. package/lib/services/stars.js +10 -20
  145. package/lib/services/stars.js.map +1 -1
  146. package/lib/services/team.d.ts +1 -1
  147. package/lib/services/team.d.ts.map +1 -1
  148. package/lib/services/team.js +25 -62
  149. package/lib/services/team.js.map +1 -1
  150. package/lib/services/tooling.d.ts +1 -1
  151. package/lib/services/tooling.d.ts.map +1 -1
  152. package/lib/services/tooling.js +5 -9
  153. package/lib/services/tooling.js.map +1 -1
  154. package/lib/services/usergroups.d.ts +8 -3
  155. package/lib/services/usergroups.d.ts.map +1 -1
  156. package/lib/services/usergroups.js +23 -51
  157. package/lib/services/usergroups.js.map +1 -1
  158. package/lib/services/users.d.ts +2 -2
  159. package/lib/services/users.d.ts.map +1 -1
  160. package/lib/services/users.js +28 -81
  161. package/lib/services/users.js.map +1 -1
  162. package/lib/services/views.d.ts +1 -1
  163. package/lib/services/views.d.ts.map +1 -1
  164. package/lib/services/views.js +11 -27
  165. package/lib/services/views.js.map +1 -1
  166. package/lib/services/workflows.d.ts +1 -1
  167. package/lib/services/workflows.d.ts.map +1 -1
  168. package/lib/services/workflows.js +27 -71
  169. package/lib/services/workflows.js.map +1 -1
  170. package/package.json +15 -11
  171. package/src/credentials.ts +8 -10
  172. package/src/errors.ts +17 -31
  173. package/src/index.ts +3 -7
  174. package/src/pagination.ts +2 -5
  175. package/src/protocol.test.ts +372 -0
  176. package/src/protocol.ts +34 -66
  177. package/src/retry.ts +4 -9
  178. package/src/services/admin.ts +1241 -1557
  179. package/src/services/agents.ts +853 -0
  180. package/src/services/api.ts +4 -10
  181. package/src/services/apps.ts +146 -243
  182. package/src/services/assistant.ts +93 -144
  183. package/src/services/auth.ts +12 -33
  184. package/src/services/blocks.ts +9 -24
  185. package/src/services/bookmarks.ts +14 -34
  186. package/src/services/bots.ts +7 -19
  187. package/src/services/calls.ts +15 -43
  188. package/src/services/canvases.ts +82 -85
  189. package/src/services/chat.ts +134 -254
  190. package/src/services/conversations.ts +101 -217
  191. package/src/services/dialog.ts +5 -13
  192. package/src/services/dnd.ts +11 -31
  193. package/src/services/emoji.ts +9 -19
  194. package/src/services/entity.ts +17 -45
  195. package/src/services/files.ts +72 -165
  196. package/src/services/functions.ts +95 -168
  197. package/src/services/index.ts +1 -0
  198. package/src/services/lists.ts +65 -208
  199. package/src/services/migration.ts +8 -17
  200. package/src/services/oauth.ts +127 -60
  201. package/src/services/openid.ts +12 -34
  202. package/src/services/pins.ts +7 -19
  203. package/src/services/reactions.ts +19 -43
  204. package/src/services/reminders.ts +13 -37
  205. package/src/services/rtm.ts +9 -25
  206. package/src/services/search.ts +51 -92
  207. package/src/services/stars.ts +20 -31
  208. package/src/services/team.ts +81 -155
  209. package/src/services/tooling.ts +5 -13
  210. package/src/services/usergroups.ts +37 -68
  211. package/src/services/users.ts +35 -102
  212. package/src/services/views.ts +11 -31
  213. package/src/services/workflows.ts +65 -129
  214. package/lib/response-validation.test.d.ts +0 -4
  215. package/lib/response-validation.test.d.ts.map +0 -1
  216. package/lib/response-validation.test.js +0 -40
  217. package/lib/response-validation.test.js.map +0 -1
  218. package/src/response-validation.test.ts +0 -54
@@ -1,15 +1,11 @@
1
+ import * as API from "@distilled.cloud/core/api";
1
2
  // AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
2
3
  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 { slackPaginate } from "../pagination.ts";
11
4
  import { SlackError, SlackRateLimited } from "../errors.ts";
5
+ import { slackPaginate } from "../pagination.ts";
6
+ import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
12
7
  import * as Retry from "../retry.ts";
8
+ import * as T from "../traits.ts";
13
9
 
14
10
  export type { SlackOpError, SlackOpContext };
15
11
 
@@ -35,17 +31,8 @@ export const CreateItemRequest = /*@__PURE__*/ S.suspend(() =>
35
31
  duplicated_item_id: S.optional(S.String),
36
32
  parent_item_id: S.optional(S.String),
37
33
  initial_fields: S.optional(CreateItemRequestInitialFieldsList),
38
- }).pipe(
39
- T.Http({
40
- method: "POST",
41
- uri: "/slackLists.items.create",
42
- code: 200,
43
- contentType: "form-urlencoded",
44
- }),
45
- ),
46
- ).annotate({
47
- identifier: "CreateItemRequest",
48
- }) as any as S.Schema<CreateItemRequest>;
34
+ }).pipe(T.Http({ method: "POST", uri: "/slackLists.items.create", code: 200 })),
35
+ ).annotate({ identifier: "CreateItemRequest" }) as any as S.Schema<CreateItemRequest>;
49
36
 
50
37
  export interface CreateItemResponse {
51
38
  /** Always `true` (a failed call raises a typed error instead). */
@@ -57,16 +44,13 @@ export const CreateItemResponse = /*@__PURE__*/ S.suspend(() =>
57
44
  ok: S.Boolean,
58
45
  item: S.Unknown,
59
46
  }),
60
- ).annotate({
61
- identifier: "CreateItemResponse",
62
- }) as any as S.Schema<CreateItemResponse>;
47
+ ).annotate({ identifier: "CreateItemResponse" }) as any as S.Schema<CreateItemResponse>;
63
48
 
64
49
  /** A rich text description of the List. */
65
50
  export type CreateSlackListRequestDescriptionBlocksList = Array<unknown>;
66
- export const CreateSlackListRequestDescriptionBlocksList =
67
- /*@__PURE__*/ S.Array(
68
- S.Unknown,
69
- ) as any as S.Schema<CreateSlackListRequestDescriptionBlocksList>;
51
+ export const CreateSlackListRequestDescriptionBlocksList = /*@__PURE__*/ S.Array(
52
+ S.Unknown,
53
+ ) as any as S.Schema<CreateSlackListRequestDescriptionBlocksList>;
70
54
 
71
55
  /** Column definition for the List. */
72
56
  export type CreateSlackListRequestSchemaList = Array<unknown>;
@@ -96,17 +80,8 @@ export const CreateSlackListRequest = /*@__PURE__*/ S.suspend(() =>
96
80
  copy_from_list_id: S.optional(S.String),
97
81
  include_copied_list_records: S.optional(S.Boolean),
98
82
  todo_mode: S.optional(S.Boolean),
99
- }).pipe(
100
- T.Http({
101
- method: "POST",
102
- uri: "/slackLists.create",
103
- code: 200,
104
- contentType: "form-urlencoded",
105
- }),
106
- ),
107
- ).annotate({
108
- identifier: "CreateSlackListRequest",
109
- }) as any as S.Schema<CreateSlackListRequest>;
83
+ }).pipe(T.Http({ method: "POST", uri: "/slackLists.create", code: 200 })),
84
+ ).annotate({ identifier: "CreateSlackListRequest" }) as any as S.Schema<CreateSlackListRequest>;
110
85
 
111
86
  export interface CreateSlackListResponse {
112
87
  /** Always `true` (a failed call raises a typed error instead). */
@@ -122,9 +97,7 @@ export const CreateSlackListResponse = /*@__PURE__*/ S.suspend(() =>
122
97
  list_id: S.String,
123
98
  list_metadata: S.optional(S.Unknown),
124
99
  }),
125
- ).annotate({
126
- identifier: "CreateSlackListResponse",
127
- }) as any as S.Schema<CreateSlackListResponse>;
100
+ ).annotate({ identifier: "CreateSlackListResponse" }) as any as S.Schema<CreateSlackListResponse>;
128
101
 
129
102
  /** List of channels you wish to update access for. Can only be used if `user_ids` is not provided. */
130
103
  export type DeleteAccessRequestChannelIdsList = Array<string>;
@@ -151,31 +124,20 @@ export const DeleteAccessRequest = /*@__PURE__*/ S.suspend(() =>
151
124
  list_id: S.String,
152
125
  channel_ids: S.optional(DeleteAccessRequestChannelIdsList),
153
126
  user_ids: S.optional(DeleteAccessRequestUserIdsList),
154
- }).pipe(
155
- T.Http({
156
- method: "POST",
157
- uri: "/slackLists.access.delete",
158
- code: 200,
159
- contentType: "form-urlencoded",
160
- }),
161
- ),
162
- ).annotate({
163
- identifier: "DeleteAccessRequest",
164
- }) as any as S.Schema<DeleteAccessRequest>;
127
+ }).pipe(T.Http({ method: "POST", uri: "/slackLists.access.delete", code: 200 })),
128
+ ).annotate({ identifier: "DeleteAccessRequest" }) as any as S.Schema<DeleteAccessRequest>;
165
129
 
166
130
  /** The channel IDs that could not be updated. */
167
131
  export type DeleteAccessResponseFailedToUpdateChannelIdsList = Array<string>;
168
- export const DeleteAccessResponseFailedToUpdateChannelIdsList =
169
- /*@__PURE__*/ S.Array(
170
- S.String,
171
- ) as any as S.Schema<DeleteAccessResponseFailedToUpdateChannelIdsList>;
132
+ export const DeleteAccessResponseFailedToUpdateChannelIdsList = /*@__PURE__*/ S.Array(
133
+ S.String,
134
+ ) as any as S.Schema<DeleteAccessResponseFailedToUpdateChannelIdsList>;
172
135
 
173
136
  /** The user IDs that could not be updated. */
174
137
  export type DeleteAccessResponseFailedToUpdateUserIdsList = Array<string>;
175
- export const DeleteAccessResponseFailedToUpdateUserIdsList =
176
- /*@__PURE__*/ S.Array(
177
- S.String,
178
- ) as any as S.Schema<DeleteAccessResponseFailedToUpdateUserIdsList>;
138
+ export const DeleteAccessResponseFailedToUpdateUserIdsList = /*@__PURE__*/ S.Array(
139
+ S.String,
140
+ ) as any as S.Schema<DeleteAccessResponseFailedToUpdateUserIdsList>;
179
141
 
180
142
  export interface DeleteAccessResponse {
181
143
  /** Always `true` (a failed call raises a typed error instead). */
@@ -188,16 +150,10 @@ export interface DeleteAccessResponse {
188
150
  export const DeleteAccessResponse = /*@__PURE__*/ S.suspend(() =>
189
151
  S.Struct({
190
152
  ok: S.Boolean,
191
- failed_to_update_channel_ids: S.optional(
192
- DeleteAccessResponseFailedToUpdateChannelIdsList,
193
- ),
194
- failed_to_update_user_ids: S.optional(
195
- DeleteAccessResponseFailedToUpdateUserIdsList,
196
- ),
153
+ failed_to_update_channel_ids: S.optional(DeleteAccessResponseFailedToUpdateChannelIdsList),
154
+ failed_to_update_user_ids: S.optional(DeleteAccessResponseFailedToUpdateUserIdsList),
197
155
  }),
198
- ).annotate({
199
- identifier: "DeleteAccessResponse",
200
- }) as any as S.Schema<DeleteAccessResponse>;
156
+ ).annotate({ identifier: "DeleteAccessResponse" }) as any as S.Schema<DeleteAccessResponse>;
201
157
 
202
158
  export interface DeleteItemRequest {
203
159
  /** ID of the List containing the item. */
@@ -209,17 +165,8 @@ export const DeleteItemRequest = /*@__PURE__*/ S.suspend(() =>
209
165
  S.Struct({
210
166
  list_id: S.String,
211
167
  id: S.String,
212
- }).pipe(
213
- T.Http({
214
- method: "POST",
215
- uri: "/slackLists.items.delete",
216
- code: 200,
217
- contentType: "form-urlencoded",
218
- }),
219
- ),
220
- ).annotate({
221
- identifier: "DeleteItemRequest",
222
- }) as any as S.Schema<DeleteItemRequest>;
168
+ }).pipe(T.Http({ method: "POST", uri: "/slackLists.items.delete", code: 200 })),
169
+ ).annotate({ identifier: "DeleteItemRequest" }) as any as S.Schema<DeleteItemRequest>;
223
170
 
224
171
  export interface DeleteItemResponse {
225
172
  ok: boolean;
@@ -228,9 +175,7 @@ export const DeleteItemResponse = /*@__PURE__*/ S.suspend(() =>
228
175
  S.Struct({
229
176
  ok: S.Boolean,
230
177
  }),
231
- ).annotate({
232
- identifier: "DeleteItemResponse",
233
- }) as any as S.Schema<DeleteItemResponse>;
178
+ ).annotate({ identifier: "DeleteItemResponse" }) as any as S.Schema<DeleteItemResponse>;
234
179
 
235
180
  /** IDs of items to delete. */
236
181
  export type DeleteMultipleRequestIdsList = Array<string>;
@@ -248,17 +193,8 @@ export const DeleteMultipleRequest = /*@__PURE__*/ S.suspend(() =>
248
193
  S.Struct({
249
194
  list_id: S.String,
250
195
  ids: DeleteMultipleRequestIdsList,
251
- }).pipe(
252
- T.Http({
253
- method: "POST",
254
- uri: "/slackLists.items.deleteMultiple",
255
- code: 200,
256
- contentType: "form-urlencoded",
257
- }),
258
- ),
259
- ).annotate({
260
- identifier: "DeleteMultipleRequest",
261
- }) as any as S.Schema<DeleteMultipleRequest>;
196
+ }).pipe(T.Http({ method: "POST", uri: "/slackLists.items.deleteMultiple", code: 200 })),
197
+ ).annotate({ identifier: "DeleteMultipleRequest" }) as any as S.Schema<DeleteMultipleRequest>;
262
198
 
263
199
  export interface DeleteMultipleResponse {
264
200
  ok: boolean;
@@ -267,9 +203,7 @@ export const DeleteMultipleResponse = /*@__PURE__*/ S.suspend(() =>
267
203
  S.Struct({
268
204
  ok: S.Boolean,
269
205
  }),
270
- ).annotate({
271
- identifier: "DeleteMultipleResponse",
272
- }) as any as S.Schema<DeleteMultipleResponse>;
206
+ ).annotate({ identifier: "DeleteMultipleResponse" }) as any as S.Schema<DeleteMultipleResponse>;
273
207
 
274
208
  export interface DownloadGetRequest {
275
209
  /** ID of the List to export. */
@@ -290,17 +224,8 @@ export const DownloadGetRequest = /*@__PURE__*/ S.suspend(() =>
290
224
  format: S.optional(S.String),
291
225
  include_threads: S.optional(S.Boolean),
292
226
  include_attachments: S.optional(S.Boolean),
293
- }).pipe(
294
- T.Http({
295
- method: "POST",
296
- uri: "/slackLists.download.get",
297
- code: 200,
298
- contentType: "form-urlencoded",
299
- }),
300
- ),
301
- ).annotate({
302
- identifier: "DownloadGetRequest",
303
- }) as any as S.Schema<DownloadGetRequest>;
227
+ }).pipe(T.Http({ method: "POST", uri: "/slackLists.download.get", code: 200 })),
228
+ ).annotate({ identifier: "DownloadGetRequest" }) as any as S.Schema<DownloadGetRequest>;
304
229
 
305
230
  export interface DownloadGetResponse {
306
231
  /** Always `true` (a failed call raises a typed error instead). */
@@ -316,9 +241,7 @@ export const DownloadGetResponse = /*@__PURE__*/ S.suspend(() =>
316
241
  status: S.Unknown,
317
242
  download_url: S.optional(S.String),
318
243
  }),
319
- ).annotate({
320
- identifier: "DownloadGetResponse",
321
- }) as any as S.Schema<DownloadGetResponse>;
244
+ ).annotate({ identifier: "DownloadGetResponse" }) as any as S.Schema<DownloadGetResponse>;
322
245
 
323
246
  export interface DownloadStartRequest {
324
247
  /** ID of the List to export. */
@@ -338,17 +261,8 @@ export const DownloadStartRequest = /*@__PURE__*/ S.suspend(() =>
338
261
  format: S.optional(S.String),
339
262
  include_threads: S.optional(S.Boolean),
340
263
  include_attachments: S.optional(S.Boolean),
341
- }).pipe(
342
- T.Http({
343
- method: "POST",
344
- uri: "/slackLists.download.start",
345
- code: 200,
346
- contentType: "form-urlencoded",
347
- }),
348
- ),
349
- ).annotate({
350
- identifier: "DownloadStartRequest",
351
- }) as any as S.Schema<DownloadStartRequest>;
264
+ }).pipe(T.Http({ method: "POST", uri: "/slackLists.download.start", code: 200 })),
265
+ ).annotate({ identifier: "DownloadStartRequest" }) as any as S.Schema<DownloadStartRequest>;
352
266
 
353
267
  export interface DownloadStartResponse {
354
268
  /** Always `true` (a failed call raises a typed error instead). */
@@ -361,9 +275,7 @@ export const DownloadStartResponse = /*@__PURE__*/ S.suspend(() =>
361
275
  ok: S.Boolean,
362
276
  job_id: S.Number,
363
277
  }),
364
- ).annotate({
365
- identifier: "DownloadStartResponse",
366
- }) as any as S.Schema<DownloadStartResponse>;
278
+ ).annotate({ identifier: "DownloadStartResponse" }) as any as S.Schema<DownloadStartResponse>;
367
279
 
368
280
  export interface ItemsInfoRequest {
369
281
  /** ID of the List. */
@@ -378,17 +290,8 @@ export const ItemsInfoRequest = /*@__PURE__*/ S.suspend(() =>
378
290
  list_id: S.String,
379
291
  id: S.String,
380
292
  include_is_subscribed: S.optional(S.Boolean),
381
- }).pipe(
382
- T.Http({
383
- method: "POST",
384
- uri: "/slackLists.items.info",
385
- code: 200,
386
- contentType: "form-urlencoded",
387
- }),
388
- ),
389
- ).annotate({
390
- identifier: "ItemsInfoRequest",
391
- }) as any as S.Schema<ItemsInfoRequest>;
293
+ }).pipe(T.Http({ method: "POST", uri: "/slackLists.items.info", code: 200 })),
294
+ ).annotate({ identifier: "ItemsInfoRequest" }) as any as S.Schema<ItemsInfoRequest>;
392
295
 
393
296
  export type ItemsInfoResponseSubtasksList = Array<unknown>;
394
297
  export const ItemsInfoResponseSubtasksList = /*@__PURE__*/ S.Array(
@@ -411,9 +314,7 @@ export const ItemsInfoResponse = /*@__PURE__*/ S.suspend(() =>
411
314
  parent_task: S.optional(S.Unknown),
412
315
  subtasks: S.optional(ItemsInfoResponseSubtasksList),
413
316
  }),
414
- ).annotate({
415
- identifier: "ItemsInfoResponse",
416
- }) as any as S.Schema<ItemsInfoResponse>;
317
+ ).annotate({ identifier: "ItemsInfoResponse" }) as any as S.Schema<ItemsInfoResponse>;
417
318
 
418
319
  export interface ListItemsRequest {
419
320
  /** ID of the List. */
@@ -424,6 +325,8 @@ export interface ListItemsRequest {
424
325
  cursor?: string;
425
326
  /** Boolean indicating whether archived items or normal items should be returned. */
426
327
  archived?: boolean;
328
+ /** Set to `true` to also return the parent `list` object, including its title, column schema, and total row count. Defaults to `false` to keep the response small. */
329
+ include_list?: boolean;
427
330
  }
428
331
  export const ListItemsRequest = /*@__PURE__*/ S.suspend(() =>
429
332
  S.Struct({
@@ -431,17 +334,9 @@ export const ListItemsRequest = /*@__PURE__*/ S.suspend(() =>
431
334
  limit: S.optional(S.Number),
432
335
  cursor: S.optional(S.String),
433
336
  archived: S.optional(S.Boolean),
434
- }).pipe(
435
- T.Http({
436
- method: "POST",
437
- uri: "/slackLists.items.list",
438
- code: 200,
439
- contentType: "form-urlencoded",
440
- }),
441
- ),
442
- ).annotate({
443
- identifier: "ListItemsRequest",
444
- }) as any as S.Schema<ListItemsRequest>;
337
+ include_list: S.optional(S.Boolean),
338
+ }).pipe(T.Http({ method: "POST", uri: "/slackLists.items.list", code: 200 })),
339
+ ).annotate({ identifier: "ListItemsRequest" }) as any as S.Schema<ListItemsRequest>;
445
340
 
446
341
  export type ListItemsResponseItemsList = Array<unknown>;
447
342
  export const ListItemsResponseItemsList = /*@__PURE__*/ S.Array(
@@ -467,16 +362,17 @@ export interface ListItemsResponse {
467
362
  items: ListItemsResponseItemsList;
468
363
  /** Pagination metadata. An empty `next_cursor` means the last page. */
469
364
  response_metadata?: ListItemsResponseResponseMetadata;
365
+ /** The parent list. Only returned when `include_list` is `true`. `list_limits` carries `row_count` and no other key: the number of items matching this request's `archived` value, counting Slack-suggested items that `items` itself does not return, so it can exceed the number of items you can page through. Sharing and access fields (`channels`, `groups`, `ims`, `access`) are omitted; call `files.info` if you need those or the full set of list limits. */
366
+ list?: unknown;
470
367
  }
471
368
  export const ListItemsResponse = /*@__PURE__*/ S.suspend(() =>
472
369
  S.Struct({
473
370
  ok: S.Boolean,
474
371
  items: ListItemsResponseItemsList,
475
372
  response_metadata: S.optional(ListItemsResponseResponseMetadata),
373
+ list: S.optional(S.Unknown),
476
374
  }),
477
- ).annotate({
478
- identifier: "ListItemsResponse",
479
- }) as any as S.Schema<ListItemsResponse>;
375
+ ).annotate({ identifier: "ListItemsResponse" }) as any as S.Schema<ListItemsResponse>;
480
376
 
481
377
  /** List of channels you wish to update access for. Can only be used if `user_ids` is not provided. */
482
378
  export type SetAccessRequestChannelIdsList = Array<string>;
@@ -506,24 +402,14 @@ export const SetAccessRequest = /*@__PURE__*/ S.suspend(() =>
506
402
  access_level: S.String,
507
403
  channel_ids: S.optional(SetAccessRequestChannelIdsList),
508
404
  user_ids: S.optional(SetAccessRequestUserIdsList),
509
- }).pipe(
510
- T.Http({
511
- method: "POST",
512
- uri: "/slackLists.access.set",
513
- code: 200,
514
- contentType: "form-urlencoded",
515
- }),
516
- ),
517
- ).annotate({
518
- identifier: "SetAccessRequest",
519
- }) as any as S.Schema<SetAccessRequest>;
405
+ }).pipe(T.Http({ method: "POST", uri: "/slackLists.access.set", code: 200 })),
406
+ ).annotate({ identifier: "SetAccessRequest" }) as any as S.Schema<SetAccessRequest>;
520
407
 
521
408
  /** The channel IDs that could not be updated. */
522
409
  export type SetAccessResponseFailedToUpdateChannelIdsList = Array<string>;
523
- export const SetAccessResponseFailedToUpdateChannelIdsList =
524
- /*@__PURE__*/ S.Array(
525
- S.String,
526
- ) as any as S.Schema<SetAccessResponseFailedToUpdateChannelIdsList>;
410
+ export const SetAccessResponseFailedToUpdateChannelIdsList = /*@__PURE__*/ S.Array(
411
+ S.String,
412
+ ) as any as S.Schema<SetAccessResponseFailedToUpdateChannelIdsList>;
527
413
 
528
414
  /** The user IDs that could not be updated. */
529
415
  export type SetAccessResponseFailedToUpdateUserIdsList = Array<string>;
@@ -542,16 +428,10 @@ export interface SetAccessResponse {
542
428
  export const SetAccessResponse = /*@__PURE__*/ S.suspend(() =>
543
429
  S.Struct({
544
430
  ok: S.Boolean,
545
- failed_to_update_channel_ids: S.optional(
546
- SetAccessResponseFailedToUpdateChannelIdsList,
547
- ),
548
- failed_to_update_user_ids: S.optional(
549
- SetAccessResponseFailedToUpdateUserIdsList,
550
- ),
431
+ failed_to_update_channel_ids: S.optional(SetAccessResponseFailedToUpdateChannelIdsList),
432
+ failed_to_update_user_ids: S.optional(SetAccessResponseFailedToUpdateUserIdsList),
551
433
  }),
552
- ).annotate({
553
- identifier: "SetAccessResponse",
554
- }) as any as S.Schema<SetAccessResponse>;
434
+ ).annotate({ identifier: "SetAccessResponse" }) as any as S.Schema<SetAccessResponse>;
555
435
 
556
436
  /** Cells to update. */
557
437
  export type UpdateItemRequestCellsList = Array<unknown>;
@@ -569,17 +449,8 @@ export const UpdateItemRequest = /*@__PURE__*/ S.suspend(() =>
569
449
  S.Struct({
570
450
  list_id: S.String,
571
451
  cells: UpdateItemRequestCellsList,
572
- }).pipe(
573
- T.Http({
574
- method: "POST",
575
- uri: "/slackLists.items.update",
576
- code: 200,
577
- contentType: "form-urlencoded",
578
- }),
579
- ),
580
- ).annotate({
581
- identifier: "UpdateItemRequest",
582
- }) as any as S.Schema<UpdateItemRequest>;
452
+ }).pipe(T.Http({ method: "POST", uri: "/slackLists.items.update", code: 200 })),
453
+ ).annotate({ identifier: "UpdateItemRequest" }) as any as S.Schema<UpdateItemRequest>;
583
454
 
584
455
  export interface UpdateItemResponse {
585
456
  /** Always `true` (a failed call raises a typed error instead). */
@@ -589,16 +460,13 @@ export const UpdateItemResponse = /*@__PURE__*/ S.suspend(() =>
589
460
  S.Struct({
590
461
  ok: S.Boolean,
591
462
  }),
592
- ).annotate({
593
- identifier: "UpdateItemResponse",
594
- }) as any as S.Schema<UpdateItemResponse>;
463
+ ).annotate({ identifier: "UpdateItemResponse" }) as any as S.Schema<UpdateItemResponse>;
595
464
 
596
465
  /** A rich text description of the List. */
597
466
  export type UpdateSlackListRequestDescriptionBlocksList = Array<unknown>;
598
- export const UpdateSlackListRequestDescriptionBlocksList =
599
- /*@__PURE__*/ S.Array(
600
- S.Unknown,
601
- ) as any as S.Schema<UpdateSlackListRequestDescriptionBlocksList>;
467
+ export const UpdateSlackListRequestDescriptionBlocksList = /*@__PURE__*/ S.Array(
468
+ S.Unknown,
469
+ ) as any as S.Schema<UpdateSlackListRequestDescriptionBlocksList>;
602
470
 
603
471
  export interface UpdateSlackListRequest {
604
472
  /** The ID of the List to update. */
@@ -616,17 +484,8 @@ export const UpdateSlackListRequest = /*@__PURE__*/ S.suspend(() =>
616
484
  name: S.optional(S.String),
617
485
  description_blocks: S.optional(UpdateSlackListRequestDescriptionBlocksList),
618
486
  todo_mode: S.optional(S.Boolean),
619
- }).pipe(
620
- T.Http({
621
- method: "POST",
622
- uri: "/slackLists.update",
623
- code: 200,
624
- contentType: "form-urlencoded",
625
- }),
626
- ),
627
- ).annotate({
628
- identifier: "UpdateSlackListRequest",
629
- }) as any as S.Schema<UpdateSlackListRequest>;
487
+ }).pipe(T.Http({ method: "POST", uri: "/slackLists.update", code: 200 })),
488
+ ).annotate({ identifier: "UpdateSlackListRequest" }) as any as S.Schema<UpdateSlackListRequest>;
630
489
 
631
490
  export interface UpdateSlackListResponse {
632
491
  /** Always `true` (a failed call raises a typed error instead). */
@@ -636,9 +495,7 @@ export const UpdateSlackListResponse = /*@__PURE__*/ S.suspend(() =>
636
495
  S.Struct({
637
496
  ok: S.Boolean,
638
497
  }),
639
- ).annotate({
640
- identifier: "UpdateSlackListResponse",
641
- }) as any as S.Schema<UpdateSlackListResponse>;
498
+ ).annotate({ identifier: "UpdateSlackListResponse" }) as any as S.Schema<UpdateSlackListResponse>;
642
499
 
643
500
  export type CreateItemError = SlackOpError;
644
501
  /** 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 */
@@ -1,14 +1,10 @@
1
+ import * as API from "@distilled.cloud/core/api";
1
2
  // AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
2
3
  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
4
  import { SlackError, SlackRateLimited } from "../errors.ts";
5
+ import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
11
6
  import * as Retry from "../retry.ts";
7
+ import * as T from "../traits.ts";
12
8
 
13
9
  export type { SlackOpError, SlackOpContext };
14
10
 
@@ -31,23 +27,18 @@ export const MigrationExchangeRequest = /*@__PURE__*/ S.suspend(() =>
31
27
  team_id: S.optional(S.String.pipe(T.Query())),
32
28
  to_old: S.optional(S.Boolean.pipe(T.Query())),
33
29
  }).pipe(T.Http({ method: "GET", uri: "/migration.exchange", code: 200 })),
34
- ).annotate({
35
- identifier: "MigrationExchangeRequest",
36
- }) as any as S.Schema<MigrationExchangeRequest>;
30
+ ).annotate({ identifier: "MigrationExchangeRequest" }) as any as S.Schema<MigrationExchangeRequest>;
37
31
 
38
- export type MigrationExchangeResponseUserIdMapMap = {
39
- [key: string]: unknown | undefined;
40
- };
32
+ export type MigrationExchangeResponseUserIdMapMap = { [key: string]: unknown | undefined };
41
33
  export const MigrationExchangeResponseUserIdMapMap = /*@__PURE__*/ S.Record(
42
34
  S.String,
43
35
  S.Unknown,
44
36
  ) as any as S.Schema<MigrationExchangeResponseUserIdMapMap>;
45
37
 
46
38
  export type MigrationExchangeResponseInvalidUserIdsList = Array<string>;
47
- export const MigrationExchangeResponseInvalidUserIdsList =
48
- /*@__PURE__*/ S.Array(
49
- S.String,
50
- ) as any as S.Schema<MigrationExchangeResponseInvalidUserIdsList>;
39
+ export const MigrationExchangeResponseInvalidUserIdsList = /*@__PURE__*/ S.Array(
40
+ S.String,
41
+ ) as any as S.Schema<MigrationExchangeResponseInvalidUserIdsList>;
51
42
 
52
43
  export interface MigrationExchangeResponse {
53
44
  /** Always `true` (a failed call raises a typed error instead). */