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

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 (209) hide show
  1. package/lib/credentials.d.ts +1 -1
  2. package/lib/credentials.d.ts.map +1 -1
  3. package/lib/credentials.js +39 -34
  4. package/lib/credentials.js.map +1 -1
  5. package/lib/errors.d.ts +31 -31
  6. package/lib/errors.d.ts.map +1 -1
  7. package/lib/errors.js +41 -41
  8. package/lib/errors.js.map +1 -1
  9. package/lib/index.d.ts +1 -1
  10. package/lib/index.js +9 -9
  11. package/lib/pagination.d.ts +2 -2
  12. package/lib/pagination.js +28 -28
  13. package/lib/protocol.d.ts.map +1 -1
  14. package/lib/protocol.js +61 -59
  15. package/lib/protocol.js.map +1 -1
  16. package/lib/retry.d.ts +2 -2
  17. package/lib/retry.d.ts.map +1 -1
  18. package/lib/retry.js +34 -33
  19. package/lib/retry.js.map +1 -1
  20. package/lib/services/admin.d.ts +123 -575
  21. package/lib/services/admin.d.ts.map +1 -1
  22. package/lib/services/admin.js +304 -2878
  23. package/lib/services/agents.d.ts +13 -55
  24. package/lib/services/agents.d.ts.map +1 -1
  25. package/lib/services/agents.js +48 -309
  26. package/lib/services/api.d.ts +0 -4
  27. package/lib/services/api.d.ts.map +1 -1
  28. package/lib/services/api.js +16 -18
  29. package/lib/services/apps.d.ts +25 -106
  30. package/lib/services/apps.d.ts.map +1 -1
  31. package/lib/services/apps.js +84 -509
  32. package/lib/services/assistant.d.ts +6 -40
  33. package/lib/services/assistant.d.ts.map +1 -1
  34. package/lib/services/assistant.js +33 -204
  35. package/lib/services/auth.d.ts +4 -15
  36. package/lib/services/auth.d.ts.map +1 -1
  37. package/lib/services/auth.js +22 -90
  38. package/lib/services/blocks.d.ts +1 -7
  39. package/lib/services/blocks.d.ts.map +1 -1
  40. package/lib/services/blocks.js +16 -21
  41. package/lib/services/bookmarks.d.ts +4 -15
  42. package/lib/services/bookmarks.d.ts.map +1 -1
  43. package/lib/services/bookmarks.js +27 -76
  44. package/lib/services/bots.d.ts +1 -9
  45. package/lib/services/bots.d.ts.map +1 -1
  46. package/lib/services/bots.js +17 -54
  47. package/lib/services/calls.d.ts +6 -22
  48. package/lib/services/calls.d.ts.map +1 -1
  49. package/lib/services/calls.js +35 -110
  50. package/lib/services/canvases.d.ts +7 -35
  51. package/lib/services/canvases.d.ts.map +1 -1
  52. package/lib/services/canvases.js +39 -135
  53. package/lib/services/chat.d.ts +14 -83
  54. package/lib/services/chat.d.ts.map +1 -1
  55. package/lib/services/chat.js +59 -381
  56. package/lib/services/conversations.d.ts +31 -116
  57. package/lib/services/conversations.d.ts.map +1 -1
  58. package/lib/services/conversations.js +94 -690
  59. package/lib/services/dialog.d.ts +1 -4
  60. package/lib/services/dialog.d.ts.map +1 -1
  61. package/lib/services/dialog.js +13 -17
  62. package/lib/services/dnd.d.ts +5 -17
  63. package/lib/services/dnd.d.ts.map +1 -1
  64. package/lib/services/dnd.js +26 -91
  65. package/lib/services/emoji.d.ts +1 -8
  66. package/lib/services/emoji.d.ts.map +1 -1
  67. package/lib/services/emoji.js +18 -29
  68. package/lib/services/entity.d.ts +4 -16
  69. package/lib/services/entity.d.ts.map +1 -1
  70. package/lib/services/entity.js +29 -71
  71. package/lib/services/files.d.ts +16 -80
  72. package/lib/services/files.d.ts.map +1 -1
  73. package/lib/services/files.js +75 -433
  74. package/lib/services/functions.d.ts +8 -49
  75. package/lib/services/functions.d.ts.map +1 -1
  76. package/lib/services/functions.js +45 -203
  77. package/lib/services/lists.d.ts +13 -55
  78. package/lib/services/lists.d.ts.map +1 -1
  79. package/lib/services/lists.js +53 -248
  80. package/lib/services/migration.d.ts +1 -7
  81. package/lib/services/migration.d.ts.map +1 -1
  82. package/lib/services/migration.js +18 -27
  83. package/lib/services/oauth.d.ts +7 -43
  84. package/lib/services/oauth.d.ts.map +1 -1
  85. package/lib/services/oauth.js +34 -289
  86. package/lib/services/openid.d.ts +3 -10
  87. package/lib/services/openid.d.ts.map +1 -1
  88. package/lib/services/openid.js +19 -79
  89. package/lib/services/pins.d.ts +3 -13
  90. package/lib/services/pins.d.ts.map +1 -1
  91. package/lib/services/pins.js +27 -61
  92. package/lib/services/reactions.d.ts +5 -17
  93. package/lib/services/reactions.d.ts.map +1 -1
  94. package/lib/services/reactions.js +30 -96
  95. package/lib/services/reminders.d.ts +5 -17
  96. package/lib/services/reminders.d.ts.map +1 -1
  97. package/lib/services/reminders.js +33 -83
  98. package/lib/services/rtm.d.ts +2 -11
  99. package/lib/services/rtm.d.ts.map +1 -1
  100. package/lib/services/rtm.js +22 -56
  101. package/lib/services/search.d.ts +4 -35
  102. package/lib/services/search.d.ts.map +1 -1
  103. package/lib/services/search.js +28 -167
  104. package/lib/services/stars.d.ts +4 -26
  105. package/lib/services/stars.d.ts.map +1 -1
  106. package/lib/services/stars.js +28 -128
  107. package/lib/services/team.d.ts +11 -63
  108. package/lib/services/team.d.ts.map +1 -1
  109. package/lib/services/team.js +45 -289
  110. package/lib/services/tooling.d.ts +2 -5
  111. package/lib/services/tooling.d.ts.map +1 -1
  112. package/lib/services/tooling.js +15 -28
  113. package/lib/services/usergroups.d.ts +7 -31
  114. package/lib/services/usergroups.d.ts.map +1 -1
  115. package/lib/services/usergroups.js +40 -146
  116. package/lib/services/users.d.ts +14 -48
  117. package/lib/services/users.d.ts.map +1 -1
  118. package/lib/services/users.js +54 -249
  119. package/lib/services/views.d.ts +4 -14
  120. package/lib/services/views.d.ts.map +1 -1
  121. package/lib/services/views.js +28 -73
  122. package/lib/services/workflows.d.ts +8 -51
  123. package/lib/services/workflows.d.ts.map +1 -1
  124. package/lib/services/workflows.js +37 -188
  125. package/lib/traits.d.ts +1 -1
  126. package/lib/traits.js +8 -8
  127. package/package.json +14 -10
  128. package/src/credentials.ts +20 -21
  129. package/src/errors.ts +31 -27
  130. package/src/index.ts +1 -1
  131. package/src/pagination.ts +2 -2
  132. package/src/protocol.ts +30 -29
  133. package/src/retry.ts +6 -6
  134. package/src/services/admin.ts +2717 -3451
  135. package/src/services/agents.ts +380 -370
  136. package/src/services/api.ts +31 -21
  137. package/src/services/apps.ts +569 -621
  138. package/src/services/assistant.ts +235 -270
  139. package/src/services/auth.ts +118 -100
  140. package/src/services/blocks.ts +33 -29
  141. package/src/services/bookmarks.ts +101 -83
  142. package/src/services/bots.ts +74 -67
  143. package/src/services/calls.ts +118 -124
  144. package/src/services/canvases.ts +171 -178
  145. package/src/services/chat.ts +428 -496
  146. package/src/services/conversations.ts +675 -761
  147. package/src/services/dialog.ts +30 -17
  148. package/src/services/dnd.ts +125 -99
  149. package/src/services/emoji.ts +46 -42
  150. package/src/services/entity.ts +94 -92
  151. package/src/services/files.ts +536 -531
  152. package/src/services/functions.ts +209 -274
  153. package/src/services/lists.ts +289 -304
  154. package/src/services/migration.ts +39 -37
  155. package/src/services/oauth.ts +345 -361
  156. package/src/services/openid.ts +137 -122
  157. package/src/services/pins.ts +83 -70
  158. package/src/services/reactions.ts +119 -103
  159. package/src/services/reminders.ts +112 -90
  160. package/src/services/rtm.ts +73 -65
  161. package/src/services/search.ts +193 -244
  162. package/src/services/stars.ts +101 -160
  163. package/src/services/team.ts +333 -369
  164. package/src/services/tooling.ts +43 -30
  165. package/src/services/usergroups.ts +175 -179
  166. package/src/services/users.ts +301 -268
  167. package/src/services/views.ts +85 -80
  168. package/src/services/workflows.ts +184 -269
  169. package/src/traits.ts +1 -1
  170. package/lib/protocol.test.d.ts +0 -2
  171. package/lib/protocol.test.d.ts.map +0 -1
  172. package/lib/protocol.test.js +0 -288
  173. package/lib/protocol.test.js.map +0 -1
  174. package/lib/services/admin.js.map +0 -1
  175. package/lib/services/agents.js.map +0 -1
  176. package/lib/services/api.js.map +0 -1
  177. package/lib/services/apps.js.map +0 -1
  178. package/lib/services/assistant.js.map +0 -1
  179. package/lib/services/auth.js.map +0 -1
  180. package/lib/services/blocks.js.map +0 -1
  181. package/lib/services/bookmarks.js.map +0 -1
  182. package/lib/services/bots.js.map +0 -1
  183. package/lib/services/calls.js.map +0 -1
  184. package/lib/services/canvases.js.map +0 -1
  185. package/lib/services/chat.js.map +0 -1
  186. package/lib/services/conversations.js.map +0 -1
  187. package/lib/services/dialog.js.map +0 -1
  188. package/lib/services/dnd.js.map +0 -1
  189. package/lib/services/emoji.js.map +0 -1
  190. package/lib/services/entity.js.map +0 -1
  191. package/lib/services/files.js.map +0 -1
  192. package/lib/services/functions.js.map +0 -1
  193. package/lib/services/lists.js.map +0 -1
  194. package/lib/services/migration.js.map +0 -1
  195. package/lib/services/oauth.js.map +0 -1
  196. package/lib/services/openid.js.map +0 -1
  197. package/lib/services/pins.js.map +0 -1
  198. package/lib/services/reactions.js.map +0 -1
  199. package/lib/services/reminders.js.map +0 -1
  200. package/lib/services/rtm.js.map +0 -1
  201. package/lib/services/search.js.map +0 -1
  202. package/lib/services/stars.js.map +0 -1
  203. package/lib/services/team.js.map +0 -1
  204. package/lib/services/tooling.js.map +0 -1
  205. package/lib/services/usergroups.js.map +0 -1
  206. package/lib/services/users.js.map +0 -1
  207. package/lib/services/views.js.map +0 -1
  208. package/lib/services/workflows.js.map +0 -1
  209. package/src/protocol.test.ts +0 -372
@@ -1,20 +1,19 @@
1
1
  import * as API from "@distilled.cloud/core/api";
2
2
  // AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
3
- import * as S from "@distilled.cloud/core/schema";
3
+ import * as S from "@distilled.cloud/core/schema-lite";
4
+ import * as __L from "@distilled.cloud/core/schema-lite";
4
5
  import { SlackError, SlackRateLimited } from "../errors.ts";
5
6
  import { slackPaginate } from "../pagination.ts";
6
7
  import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
7
8
  import * as Retry from "../retry.ts";
8
9
  import * as T from "../traits.ts";
10
+ // Schema table, filled on first reach (see __S at the end).
11
+ const __s: any[] = [];
9
12
 
10
13
  export type { SlackOpError, SlackOpContext };
11
14
 
12
15
  /** Initial item data. */
13
16
  export type CreateItemRequestInitialFieldsList = Array<unknown>;
14
- export const CreateItemRequestInitialFieldsList = /*@__PURE__*/ S.Array(
15
- S.Unknown,
16
- ) as any as S.Schema<CreateItemRequestInitialFieldsList>;
17
-
18
17
  export interface CreateItemRequest {
19
18
  /** ID of the List to add the item to. */
20
19
  list_id: string;
@@ -25,39 +24,15 @@ export interface CreateItemRequest {
25
24
  /** Initial item data. */
26
25
  initial_fields?: CreateItemRequestInitialFieldsList;
27
26
  }
28
- export const CreateItemRequest = /*@__PURE__*/ S.suspend(() =>
29
- S.Struct({
30
- list_id: S.String,
31
- duplicated_item_id: S.optional(S.String),
32
- parent_item_id: S.optional(S.String),
33
- initial_fields: S.optional(CreateItemRequestInitialFieldsList),
34
- }).pipe(T.Http({ method: "POST", uri: "/slackLists.items.create", code: 200 })),
35
- ).annotate({ identifier: "CreateItemRequest" }) as any as S.Schema<CreateItemRequest>;
36
-
37
27
  export interface CreateItemResponse {
38
28
  /** Always `true` (a failed call raises a typed error instead). */
39
29
  ok: boolean;
40
30
  item: unknown;
41
31
  }
42
- export const CreateItemResponse = /*@__PURE__*/ S.suspend(() =>
43
- S.Struct({
44
- ok: S.Boolean,
45
- item: S.Unknown,
46
- }),
47
- ).annotate({ identifier: "CreateItemResponse" }) as any as S.Schema<CreateItemResponse>;
48
-
49
32
  /** A rich text description of the List. */
50
33
  export type CreateSlackListRequestDescriptionBlocksList = Array<unknown>;
51
- export const CreateSlackListRequestDescriptionBlocksList = /*@__PURE__*/ S.Array(
52
- S.Unknown,
53
- ) as any as S.Schema<CreateSlackListRequestDescriptionBlocksList>;
54
-
55
34
  /** Column definition for the List. */
56
35
  export type CreateSlackListRequestSchemaList = Array<unknown>;
57
- export const CreateSlackListRequestSchemaList = /*@__PURE__*/ S.Array(
58
- S.Unknown,
59
- ) as any as S.Schema<CreateSlackListRequestSchemaList>;
60
-
61
36
  export interface CreateSlackListRequest {
62
37
  /** Name of the List. */
63
38
  name: string;
@@ -72,17 +47,6 @@ export interface CreateSlackListRequest {
72
47
  /** Boolean indicating whether the List should be used to track todo tasks. */
73
48
  todo_mode?: boolean;
74
49
  }
75
- export const CreateSlackListRequest = /*@__PURE__*/ S.suspend(() =>
76
- S.Struct({
77
- name: S.String,
78
- description_blocks: S.optional(CreateSlackListRequestDescriptionBlocksList),
79
- schema: S.optional(CreateSlackListRequestSchemaList),
80
- copy_from_list_id: S.optional(S.String),
81
- include_copied_list_records: S.optional(S.Boolean),
82
- todo_mode: S.optional(S.Boolean),
83
- }).pipe(T.Http({ method: "POST", uri: "/slackLists.create", code: 200 })),
84
- ).annotate({ identifier: "CreateSlackListRequest" }) as any as S.Schema<CreateSlackListRequest>;
85
-
86
50
  export interface CreateSlackListResponse {
87
51
  /** Always `true` (a failed call raises a typed error instead). */
88
52
  ok: boolean;
@@ -91,26 +55,10 @@ export interface CreateSlackListResponse {
91
55
  /** The metadata of the List created. */
92
56
  list_metadata?: unknown;
93
57
  }
94
- export const CreateSlackListResponse = /*@__PURE__*/ S.suspend(() =>
95
- S.Struct({
96
- ok: S.Boolean,
97
- list_id: S.String,
98
- list_metadata: S.optional(S.Unknown),
99
- }),
100
- ).annotate({ identifier: "CreateSlackListResponse" }) as any as S.Schema<CreateSlackListResponse>;
101
-
102
58
  /** List of channels you wish to update access for. Can only be used if `user_ids` is not provided. */
103
59
  export type DeleteAccessRequestChannelIdsList = Array<string>;
104
- export const DeleteAccessRequestChannelIdsList = /*@__PURE__*/ S.Array(
105
- S.String,
106
- ) as any as S.Schema<DeleteAccessRequestChannelIdsList>;
107
-
108
60
  /** List of users you wish to update access for. Can only be used if `channel_ids` is not provided. */
109
61
  export type DeleteAccessRequestUserIdsList = Array<string>;
110
- export const DeleteAccessRequestUserIdsList = /*@__PURE__*/ S.Array(
111
- S.String,
112
- ) as any as S.Schema<DeleteAccessRequestUserIdsList>;
113
-
114
62
  export interface DeleteAccessRequest {
115
63
  /** Encoded ID of the List. */
116
64
  list_id: string;
@@ -119,26 +67,10 @@ export interface DeleteAccessRequest {
119
67
  /** List of users you wish to update access for. Can only be used if `channel_ids` is not provided. */
120
68
  user_ids?: DeleteAccessRequestUserIdsList;
121
69
  }
122
- export const DeleteAccessRequest = /*@__PURE__*/ S.suspend(() =>
123
- S.Struct({
124
- list_id: S.String,
125
- channel_ids: S.optional(DeleteAccessRequestChannelIdsList),
126
- user_ids: S.optional(DeleteAccessRequestUserIdsList),
127
- }).pipe(T.Http({ method: "POST", uri: "/slackLists.access.delete", code: 200 })),
128
- ).annotate({ identifier: "DeleteAccessRequest" }) as any as S.Schema<DeleteAccessRequest>;
129
-
130
70
  /** The channel IDs that could not be updated. */
131
71
  export type DeleteAccessResponseFailedToUpdateChannelIdsList = Array<string>;
132
- export const DeleteAccessResponseFailedToUpdateChannelIdsList = /*@__PURE__*/ S.Array(
133
- S.String,
134
- ) as any as S.Schema<DeleteAccessResponseFailedToUpdateChannelIdsList>;
135
-
136
72
  /** The user IDs that could not be updated. */
137
73
  export type DeleteAccessResponseFailedToUpdateUserIdsList = Array<string>;
138
- export const DeleteAccessResponseFailedToUpdateUserIdsList = /*@__PURE__*/ S.Array(
139
- S.String,
140
- ) as any as S.Schema<DeleteAccessResponseFailedToUpdateUserIdsList>;
141
-
142
74
  export interface DeleteAccessResponse {
143
75
  /** Always `true` (a failed call raises a typed error instead). */
144
76
  ok: boolean;
@@ -147,64 +79,26 @@ export interface DeleteAccessResponse {
147
79
  /** The user IDs that could not be updated. */
148
80
  failed_to_update_user_ids?: DeleteAccessResponseFailedToUpdateUserIdsList;
149
81
  }
150
- export const DeleteAccessResponse = /*@__PURE__*/ S.suspend(() =>
151
- S.Struct({
152
- ok: S.Boolean,
153
- failed_to_update_channel_ids: S.optional(DeleteAccessResponseFailedToUpdateChannelIdsList),
154
- failed_to_update_user_ids: S.optional(DeleteAccessResponseFailedToUpdateUserIdsList),
155
- }),
156
- ).annotate({ identifier: "DeleteAccessResponse" }) as any as S.Schema<DeleteAccessResponse>;
157
-
158
82
  export interface DeleteItemRequest {
159
83
  /** ID of the List containing the item. */
160
84
  list_id: string;
161
85
  /** ID of item to delete. */
162
86
  id: string;
163
87
  }
164
- export const DeleteItemRequest = /*@__PURE__*/ S.suspend(() =>
165
- S.Struct({
166
- list_id: S.String,
167
- id: S.String,
168
- }).pipe(T.Http({ method: "POST", uri: "/slackLists.items.delete", code: 200 })),
169
- ).annotate({ identifier: "DeleteItemRequest" }) as any as S.Schema<DeleteItemRequest>;
170
-
171
88
  export interface DeleteItemResponse {
172
89
  ok: boolean;
173
90
  }
174
- export const DeleteItemResponse = /*@__PURE__*/ S.suspend(() =>
175
- S.Struct({
176
- ok: S.Boolean,
177
- }),
178
- ).annotate({ identifier: "DeleteItemResponse" }) as any as S.Schema<DeleteItemResponse>;
179
-
180
91
  /** IDs of items to delete. */
181
92
  export type DeleteMultipleRequestIdsList = Array<string>;
182
- export const DeleteMultipleRequestIdsList = /*@__PURE__*/ S.Array(
183
- S.String,
184
- ) as any as S.Schema<DeleteMultipleRequestIdsList>;
185
-
186
93
  export interface DeleteMultipleRequest {
187
94
  /** ID of the List containing the items. */
188
95
  list_id: string;
189
96
  /** IDs of items to delete. */
190
97
  ids: DeleteMultipleRequestIdsList;
191
98
  }
192
- export const DeleteMultipleRequest = /*@__PURE__*/ S.suspend(() =>
193
- S.Struct({
194
- list_id: S.String,
195
- ids: DeleteMultipleRequestIdsList,
196
- }).pipe(T.Http({ method: "POST", uri: "/slackLists.items.deleteMultiple", code: 200 })),
197
- ).annotate({ identifier: "DeleteMultipleRequest" }) as any as S.Schema<DeleteMultipleRequest>;
198
-
199
99
  export interface DeleteMultipleResponse {
200
100
  ok: boolean;
201
101
  }
202
- export const DeleteMultipleResponse = /*@__PURE__*/ S.suspend(() =>
203
- S.Struct({
204
- ok: S.Boolean,
205
- }),
206
- ).annotate({ identifier: "DeleteMultipleResponse" }) as any as S.Schema<DeleteMultipleResponse>;
207
-
208
102
  export interface DownloadGetRequest {
209
103
  /** ID of the List to export. */
210
104
  list_id: string;
@@ -217,16 +111,6 @@ export interface DownloadGetRequest {
217
111
  /** Must match the `include_attachments` passed to `slackLists.download.start`. The returned `download_url` carries this through so the served export matches what was generated. Only applies when `format` is `json`. */
218
112
  include_attachments?: boolean;
219
113
  }
220
- export const DownloadGetRequest = /*@__PURE__*/ S.suspend(() =>
221
- S.Struct({
222
- list_id: S.String,
223
- job_id: S.String,
224
- format: S.optional(S.String),
225
- include_threads: S.optional(S.Boolean),
226
- include_attachments: S.optional(S.Boolean),
227
- }).pipe(T.Http({ method: "POST", uri: "/slackLists.download.get", code: 200 })),
228
- ).annotate({ identifier: "DownloadGetRequest" }) as any as S.Schema<DownloadGetRequest>;
229
-
230
114
  export interface DownloadGetResponse {
231
115
  /** Always `true` (a failed call raises a typed error instead). */
232
116
  ok: boolean;
@@ -235,14 +119,6 @@ export interface DownloadGetResponse {
235
119
  /** The URL at which to download the CSV. */
236
120
  download_url?: string;
237
121
  }
238
- export const DownloadGetResponse = /*@__PURE__*/ S.suspend(() =>
239
- S.Struct({
240
- ok: S.Boolean,
241
- status: S.Unknown,
242
- download_url: S.optional(S.String),
243
- }),
244
- ).annotate({ identifier: "DownloadGetResponse" }) as any as S.Schema<DownloadGetResponse>;
245
-
246
122
  export interface DownloadStartRequest {
247
123
  /** ID of the List to export. */
248
124
  list_id: string;
@@ -254,29 +130,12 @@ export interface DownloadStartRequest {
254
130
  /** Include file attachment metadata and access paths in the export. Only applies when `format` is `json`. */
255
131
  include_attachments?: boolean;
256
132
  }
257
- export const DownloadStartRequest = /*@__PURE__*/ S.suspend(() =>
258
- S.Struct({
259
- list_id: S.String,
260
- include_archived: S.optional(S.Boolean),
261
- format: S.optional(S.String),
262
- include_threads: S.optional(S.Boolean),
263
- include_attachments: S.optional(S.Boolean),
264
- }).pipe(T.Http({ method: "POST", uri: "/slackLists.download.start", code: 200 })),
265
- ).annotate({ identifier: "DownloadStartRequest" }) as any as S.Schema<DownloadStartRequest>;
266
-
267
133
  export interface DownloadStartResponse {
268
134
  /** Always `true` (a failed call raises a typed error instead). */
269
135
  ok: boolean;
270
136
  /** The ID of the recently started job to export the List. */
271
137
  job_id: number;
272
138
  }
273
- export const DownloadStartResponse = /*@__PURE__*/ S.suspend(() =>
274
- S.Struct({
275
- ok: S.Boolean,
276
- job_id: S.Number,
277
- }),
278
- ).annotate({ identifier: "DownloadStartResponse" }) as any as S.Schema<DownloadStartResponse>;
279
-
280
139
  export interface ItemsInfoRequest {
281
140
  /** ID of the List. */
282
141
  list_id: string;
@@ -285,19 +144,7 @@ export interface ItemsInfoRequest {
285
144
  /** Set to `true` to include `is_subscribed` data for the returned List row. */
286
145
  include_is_subscribed?: boolean;
287
146
  }
288
- export const ItemsInfoRequest = /*@__PURE__*/ S.suspend(() =>
289
- S.Struct({
290
- list_id: S.String,
291
- id: S.String,
292
- include_is_subscribed: S.optional(S.Boolean),
293
- }).pipe(T.Http({ method: "POST", uri: "/slackLists.items.info", code: 200 })),
294
- ).annotate({ identifier: "ItemsInfoRequest" }) as any as S.Schema<ItemsInfoRequest>;
295
-
296
147
  export type ItemsInfoResponseSubtasksList = Array<unknown>;
297
- export const ItemsInfoResponseSubtasksList = /*@__PURE__*/ S.Array(
298
- S.Unknown,
299
- ) as any as S.Schema<ItemsInfoResponseSubtasksList>;
300
-
301
148
  export interface ItemsInfoResponse {
302
149
  /** Always `true` (a failed call raises a typed error instead). */
303
150
  ok: boolean;
@@ -306,16 +153,6 @@ export interface ItemsInfoResponse {
306
153
  parent_task?: unknown;
307
154
  subtasks?: ItemsInfoResponseSubtasksList;
308
155
  }
309
- export const ItemsInfoResponse = /*@__PURE__*/ S.suspend(() =>
310
- S.Struct({
311
- ok: S.Boolean,
312
- list: S.Unknown,
313
- record: S.Unknown,
314
- parent_task: S.optional(S.Unknown),
315
- subtasks: S.optional(ItemsInfoResponseSubtasksList),
316
- }),
317
- ).annotate({ identifier: "ItemsInfoResponse" }) as any as S.Schema<ItemsInfoResponse>;
318
-
319
156
  export interface ListItemsRequest {
320
157
  /** ID of the List. */
321
158
  list_id: string;
@@ -328,34 +165,12 @@ export interface ListItemsRequest {
328
165
  /** 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
166
  include_list?: boolean;
330
167
  }
331
- export const ListItemsRequest = /*@__PURE__*/ S.suspend(() =>
332
- S.Struct({
333
- list_id: S.String,
334
- limit: S.optional(S.Number),
335
- cursor: S.optional(S.String),
336
- archived: S.optional(S.Boolean),
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>;
340
-
341
168
  export type ListItemsResponseItemsList = Array<unknown>;
342
- export const ListItemsResponseItemsList = /*@__PURE__*/ S.Array(
343
- S.Unknown,
344
- ) as any as S.Schema<ListItemsResponseItemsList>;
345
-
346
169
  /** Pagination metadata. An empty `next_cursor` means the last page. */
347
170
  export interface ListItemsResponseResponseMetadata {
348
- /** Cursor for the next page — pass as `cursor` on the next call. */
171
+ /** Cursor for the next page -- pass as `cursor` on the next call. */
349
172
  next_cursor?: string;
350
173
  }
351
- export const ListItemsResponseResponseMetadata = /*@__PURE__*/ S.suspend(() =>
352
- S.Struct({
353
- next_cursor: S.optional(S.String),
354
- }),
355
- ).annotate({
356
- identifier: "ListItemsResponseResponseMetadata",
357
- }) as any as S.Schema<ListItemsResponseResponseMetadata>;
358
-
359
174
  export interface ListItemsResponse {
360
175
  /** Always `true` (a failed call raises a typed error instead). */
361
176
  ok: boolean;
@@ -365,27 +180,10 @@ export interface ListItemsResponse {
365
180
  /** 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
181
  list?: unknown;
367
182
  }
368
- export const ListItemsResponse = /*@__PURE__*/ S.suspend(() =>
369
- S.Struct({
370
- ok: S.Boolean,
371
- items: ListItemsResponseItemsList,
372
- response_metadata: S.optional(ListItemsResponseResponseMetadata),
373
- list: S.optional(S.Unknown),
374
- }),
375
- ).annotate({ identifier: "ListItemsResponse" }) as any as S.Schema<ListItemsResponse>;
376
-
377
183
  /** List of channels you wish to update access for. Can only be used if `user_ids` is not provided. */
378
184
  export type SetAccessRequestChannelIdsList = Array<string>;
379
- export const SetAccessRequestChannelIdsList = /*@__PURE__*/ S.Array(
380
- S.String,
381
- ) as any as S.Schema<SetAccessRequestChannelIdsList>;
382
-
383
185
  /** List of users you wish to update access for. Can only be used if `channel_ids` is not provided. */
384
186
  export type SetAccessRequestUserIdsList = Array<string>;
385
- export const SetAccessRequestUserIdsList = /*@__PURE__*/ S.Array(
386
- S.String,
387
- ) as any as S.Schema<SetAccessRequestUserIdsList>;
388
-
389
187
  export interface SetAccessRequest {
390
188
  /** Encoded ID of the List. */
391
189
  list_id: string;
@@ -396,27 +194,10 @@ export interface SetAccessRequest {
396
194
  /** List of users you wish to update access for. Can only be used if `channel_ids` is not provided. */
397
195
  user_ids?: SetAccessRequestUserIdsList;
398
196
  }
399
- export const SetAccessRequest = /*@__PURE__*/ S.suspend(() =>
400
- S.Struct({
401
- list_id: S.String,
402
- access_level: S.String,
403
- channel_ids: S.optional(SetAccessRequestChannelIdsList),
404
- user_ids: S.optional(SetAccessRequestUserIdsList),
405
- }).pipe(T.Http({ method: "POST", uri: "/slackLists.access.set", code: 200 })),
406
- ).annotate({ identifier: "SetAccessRequest" }) as any as S.Schema<SetAccessRequest>;
407
-
408
197
  /** The channel IDs that could not be updated. */
409
198
  export type SetAccessResponseFailedToUpdateChannelIdsList = Array<string>;
410
- export const SetAccessResponseFailedToUpdateChannelIdsList = /*@__PURE__*/ S.Array(
411
- S.String,
412
- ) as any as S.Schema<SetAccessResponseFailedToUpdateChannelIdsList>;
413
-
414
199
  /** The user IDs that could not be updated. */
415
200
  export type SetAccessResponseFailedToUpdateUserIdsList = Array<string>;
416
- export const SetAccessResponseFailedToUpdateUserIdsList = /*@__PURE__*/ S.Array(
417
- S.String,
418
- ) as any as S.Schema<SetAccessResponseFailedToUpdateUserIdsList>;
419
-
420
201
  export interface SetAccessResponse {
421
202
  /** Always `true` (a failed call raises a typed error instead). */
422
203
  ok: boolean;
@@ -425,49 +206,20 @@ export interface SetAccessResponse {
425
206
  /** The user IDs that could not be updated. */
426
207
  failed_to_update_user_ids?: SetAccessResponseFailedToUpdateUserIdsList;
427
208
  }
428
- export const SetAccessResponse = /*@__PURE__*/ S.suspend(() =>
429
- S.Struct({
430
- ok: S.Boolean,
431
- failed_to_update_channel_ids: S.optional(SetAccessResponseFailedToUpdateChannelIdsList),
432
- failed_to_update_user_ids: S.optional(SetAccessResponseFailedToUpdateUserIdsList),
433
- }),
434
- ).annotate({ identifier: "SetAccessResponse" }) as any as S.Schema<SetAccessResponse>;
435
-
436
209
  /** Cells to update. */
437
210
  export type UpdateItemRequestCellsList = Array<unknown>;
438
- export const UpdateItemRequestCellsList = /*@__PURE__*/ S.Array(
439
- S.Unknown,
440
- ) as any as S.Schema<UpdateItemRequestCellsList>;
441
-
442
211
  export interface UpdateItemRequest {
443
212
  /** ID of the List to add or update cells. */
444
213
  list_id: string;
445
214
  /** Cells to update. */
446
215
  cells: UpdateItemRequestCellsList;
447
216
  }
448
- export const UpdateItemRequest = /*@__PURE__*/ S.suspend(() =>
449
- S.Struct({
450
- list_id: S.String,
451
- cells: UpdateItemRequestCellsList,
452
- }).pipe(T.Http({ method: "POST", uri: "/slackLists.items.update", code: 200 })),
453
- ).annotate({ identifier: "UpdateItemRequest" }) as any as S.Schema<UpdateItemRequest>;
454
-
455
217
  export interface UpdateItemResponse {
456
218
  /** Always `true` (a failed call raises a typed error instead). */
457
219
  ok: boolean;
458
220
  }
459
- export const UpdateItemResponse = /*@__PURE__*/ S.suspend(() =>
460
- S.Struct({
461
- ok: S.Boolean,
462
- }),
463
- ).annotate({ identifier: "UpdateItemResponse" }) as any as S.Schema<UpdateItemResponse>;
464
-
465
221
  /** A rich text description of the List. */
466
222
  export type UpdateSlackListRequestDescriptionBlocksList = Array<unknown>;
467
- export const UpdateSlackListRequestDescriptionBlocksList = /*@__PURE__*/ S.Array(
468
- S.Unknown,
469
- ) as any as S.Schema<UpdateSlackListRequestDescriptionBlocksList>;
470
-
471
223
  export interface UpdateSlackListRequest {
472
224
  /** The ID of the List to update. */
473
225
  id: string;
@@ -478,147 +230,132 @@ export interface UpdateSlackListRequest {
478
230
  /** Boolean indicating whether the List should be in todo mode. */
479
231
  todo_mode?: boolean;
480
232
  }
481
- export const UpdateSlackListRequest = /*@__PURE__*/ S.suspend(() =>
482
- S.Struct({
483
- id: S.String,
484
- name: S.optional(S.String),
485
- description_blocks: S.optional(UpdateSlackListRequestDescriptionBlocksList),
486
- todo_mode: S.optional(S.Boolean),
487
- }).pipe(T.Http({ method: "POST", uri: "/slackLists.update", code: 200 })),
488
- ).annotate({ identifier: "UpdateSlackListRequest" }) as any as S.Schema<UpdateSlackListRequest>;
489
-
490
233
  export interface UpdateSlackListResponse {
491
234
  /** Always `true` (a failed call raises a typed error instead). */
492
235
  ok: boolean;
493
236
  }
494
- export const UpdateSlackListResponse = /*@__PURE__*/ S.suspend(() =>
495
- S.Struct({
496
- ok: S.Boolean,
497
- }),
498
- ).annotate({ identifier: "UpdateSlackListResponse" }) as any as S.Schema<UpdateSlackListResponse>;
499
-
500
237
  export type CreateItemError = SlackOpError;
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 */
238
+ /** 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 */
502
239
  export const createItem: API.OperationMethod<
503
240
  CreateItemRequest,
504
241
  CreateItemResponse,
505
242
  CreateItemError,
506
243
  SlackOpContext
507
244
  > = /*@__PURE__*/ API.make(() => ({
508
- input: CreateItemRequest,
509
- output: CreateItemResponse,
245
+ input: __S(0, __c0, 0) as any as S.Schema<CreateItemRequest>,
246
+ output: __S(1, __c0, 1) as any as S.Schema<CreateItemResponse>,
510
247
  errors: [SlackError, SlackRateLimited],
511
248
  protocol: SlackProtocol,
512
249
  retry: Retry.Retry,
513
250
  }));
514
251
 
515
252
  export type CreateSlackListError = SlackOpError;
516
- /** 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 */
253
+ /** 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 */
517
254
  export const createSlackList: API.OperationMethod<
518
255
  CreateSlackListRequest,
519
256
  CreateSlackListResponse,
520
257
  CreateSlackListError,
521
258
  SlackOpContext
522
259
  > = /*@__PURE__*/ API.make(() => ({
523
- input: CreateSlackListRequest,
524
- output: CreateSlackListResponse,
260
+ input: __S(8, __c2, 0) as any as S.Schema<CreateSlackListRequest>,
261
+ output: __S(9, __c2, 1) as any as S.Schema<CreateSlackListResponse>,
525
262
  errors: [SlackError, SlackRateLimited],
526
263
  protocol: SlackProtocol,
527
264
  retry: Retry.Retry,
528
265
  }));
529
266
 
530
267
  export type DeleteAccessError = SlackOpError;
531
- /** 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 */
268
+ /** 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 */
532
269
  export const deleteAccess: API.OperationMethod<
533
270
  DeleteAccessRequest,
534
271
  DeleteAccessResponse,
535
272
  DeleteAccessError,
536
273
  SlackOpContext
537
274
  > = /*@__PURE__*/ API.make(() => ({
538
- input: DeleteAccessRequest,
539
- output: DeleteAccessResponse,
275
+ input: __S(20, __c5, 0) as any as S.Schema<DeleteAccessRequest>,
276
+ output: __S(28, __c7, 0) as any as S.Schema<DeleteAccessResponse>,
540
277
  errors: [SlackError, SlackRateLimited],
541
278
  protocol: SlackProtocol,
542
279
  retry: Retry.Retry,
543
280
  }));
544
281
 
545
282
  export type DeleteItemError = SlackOpError;
546
- /** 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 */
283
+ /** 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 */
547
284
  export const deleteItem: API.OperationMethod<
548
285
  DeleteItemRequest,
549
286
  DeleteItemResponse,
550
287
  DeleteItemError,
551
288
  SlackOpContext
552
289
  > = /*@__PURE__*/ API.make(() => ({
553
- input: DeleteItemRequest,
554
- output: DeleteItemResponse,
290
+ input: __S(32, __c8, 0) as any as S.Schema<DeleteItemRequest>,
291
+ output: __S(36, __c9, 0) as any as S.Schema<DeleteItemResponse>,
555
292
  errors: [SlackError, SlackRateLimited],
556
293
  protocol: SlackProtocol,
557
294
  retry: Retry.Retry,
558
295
  }));
559
296
 
560
297
  export type DeleteMultipleError = SlackOpError;
561
- /** 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 */
298
+ /** 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 */
562
299
  export const deleteMultiple: API.OperationMethod<
563
300
  DeleteMultipleRequest,
564
301
  DeleteMultipleResponse,
565
302
  DeleteMultipleError,
566
303
  SlackOpContext
567
304
  > = /*@__PURE__*/ API.make(() => ({
568
- input: DeleteMultipleRequest,
569
- output: DeleteMultipleResponse,
305
+ input: __S(40, __c10, 0) as any as S.Schema<DeleteMultipleRequest>,
306
+ output: __S(36, __c9, 0) as any as S.Schema<DeleteMultipleResponse>,
570
307
  errors: [SlackError, SlackRateLimited],
571
308
  protocol: SlackProtocol,
572
309
  retry: Retry.Retry,
573
310
  }));
574
311
 
575
312
  export type DownloadGetError = SlackOpError;
576
- /** 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 */
313
+ /** 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 */
577
314
  export const downloadGet: API.OperationMethod<
578
315
  DownloadGetRequest,
579
316
  DownloadGetResponse,
580
317
  DownloadGetError,
581
318
  SlackOpContext
582
319
  > = /*@__PURE__*/ API.make(() => ({
583
- input: DownloadGetRequest,
584
- output: DownloadGetResponse,
320
+ input: __S(44, __c11, 0) as any as S.Schema<DownloadGetRequest>,
321
+ output: __S(45, __c11, 1) as any as S.Schema<DownloadGetResponse>,
585
322
  errors: [SlackError, SlackRateLimited],
586
323
  protocol: SlackProtocol,
587
324
  retry: Retry.Retry,
588
325
  }));
589
326
 
590
327
  export type DownloadStartError = SlackOpError;
591
- /** 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 */
328
+ /** 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 */
592
329
  export const downloadStart: API.OperationMethod<
593
330
  DownloadStartRequest,
594
331
  DownloadStartResponse,
595
332
  DownloadStartError,
596
333
  SlackOpContext
597
334
  > = /*@__PURE__*/ API.make(() => ({
598
- input: DownloadStartRequest,
599
- output: DownloadStartResponse,
335
+ input: __S(48, __c12, 0) as any as S.Schema<DownloadStartRequest>,
336
+ output: __S(49, __c12, 1) as any as S.Schema<DownloadStartResponse>,
600
337
  errors: [SlackError, SlackRateLimited],
601
338
  protocol: SlackProtocol,
602
339
  retry: Retry.Retry,
603
340
  }));
604
341
 
605
342
  export type ItemsInfoError = SlackOpError;
606
- /** 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 */
343
+ /** 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 */
607
344
  export const itemsInfo: API.OperationMethod<
608
345
  ItemsInfoRequest,
609
346
  ItemsInfoResponse,
610
347
  ItemsInfoError,
611
348
  SlackOpContext
612
349
  > = /*@__PURE__*/ API.make(() => ({
613
- input: ItemsInfoRequest,
614
- output: ItemsInfoResponse,
350
+ input: __S(52, __c13, 0) as any as S.Schema<ItemsInfoRequest>,
351
+ output: __S(53, __c13, 1) as any as S.Schema<ItemsInfoResponse>,
615
352
  errors: [SlackError, SlackRateLimited],
616
353
  protocol: SlackProtocol,
617
354
  retry: Retry.Retry,
618
355
  }));
619
356
 
620
357
  export type ListItemsError = SlackOpError;
621
- /** 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 */
358
+ /** 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 */
622
359
  export const listItems: API.PaginatedOperationMethod<
623
360
  ListItemsRequest,
624
361
  ListItemsResponse,
@@ -627,8 +364,8 @@ export const listItems: API.PaginatedOperationMethod<
627
364
  unknown
628
365
  > = /*@__PURE__*/ API.makePaginated(
629
366
  () => ({
630
- input: ListItemsRequest,
631
- output: ListItemsResponse,
367
+ input: __S(56, __c14, 0) as any as S.Schema<ListItemsRequest>,
368
+ output: __S(58, __c14, 2) as any as S.Schema<ListItemsResponse>,
632
369
  errors: [SlackError, SlackRateLimited],
633
370
  protocol: SlackProtocol,
634
371
  retry: Retry.Retry,
@@ -644,46 +381,294 @@ export const listItems: API.PaginatedOperationMethod<
644
381
  ) as any;
645
382
 
646
383
  export type SetAccessError = SlackOpError;
647
- /** 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 */
384
+ /** 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 */
648
385
  export const setAccess: API.OperationMethod<
649
386
  SetAccessRequest,
650
387
  SetAccessResponse,
651
388
  SetAccessError,
652
389
  SlackOpContext
653
390
  > = /*@__PURE__*/ API.make(() => ({
654
- input: SetAccessRequest,
655
- output: SetAccessResponse,
391
+ input: __S(60, __c15, 0) as any as S.Schema<SetAccessRequest>,
392
+ output: __S(28, __c7, 0) as any as S.Schema<SetAccessResponse>,
656
393
  errors: [SlackError, SlackRateLimited],
657
394
  protocol: SlackProtocol,
658
395
  retry: Retry.Retry,
659
396
  }));
660
397
 
661
398
  export type UpdateItemError = SlackOpError;
662
- /** 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 */
399
+ /** 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 */
663
400
  export const updateItem: API.OperationMethod<
664
401
  UpdateItemRequest,
665
402
  UpdateItemResponse,
666
403
  UpdateItemError,
667
404
  SlackOpContext
668
405
  > = /*@__PURE__*/ API.make(() => ({
669
- input: UpdateItemRequest,
670
- output: UpdateItemResponse,
406
+ input: __S(12, __c3, 0) as any as S.Schema<UpdateItemRequest>,
407
+ output: __S(36, __c9, 0) as any as S.Schema<UpdateItemResponse>,
671
408
  errors: [SlackError, SlackRateLimited],
672
409
  protocol: SlackProtocol,
673
410
  retry: Retry.Retry,
674
411
  }));
675
412
 
676
413
  export type UpdateSlackListError = SlackOpError;
677
- /** 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 */
414
+ /** 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 */
678
415
  export const updateSlackList: API.OperationMethod<
679
416
  UpdateSlackListRequest,
680
417
  UpdateSlackListResponse,
681
418
  UpdateSlackListError,
682
419
  SlackOpContext
683
420
  > = /*@__PURE__*/ API.make(() => ({
684
- input: UpdateSlackListRequest,
685
- output: UpdateSlackListResponse,
421
+ input: __S(16, __c4, 0) as any as S.Schema<UpdateSlackListRequest>,
422
+ output: __S(36, __c9, 0) as any as S.Schema<UpdateSlackListResponse>,
686
423
  errors: [SlackError, SlackRateLimited],
687
424
  protocol: SlackProtocol,
688
425
  retry: Retry.Retry,
689
426
  }));
427
+
428
+ // Schema builders: each runs one schema initializer, on that schema's first use.
429
+ function __c0(j: number): any {
430
+ switch (j) {
431
+ case 0:
432
+ return S.suspend(() =>
433
+ S.Struct({
434
+ list_id: S.String,
435
+ duplicated_item_id: S.optional(S.String),
436
+ parent_item_id: S.optional(S.String),
437
+ initial_fields: S.optional(__S(4, __c1, 0)),
438
+ }).pipe(T.Http({ method: "POST", uri: "/slackLists.items.create", code: 200 })),
439
+ ).annotate({ identifier: "CreateItemRequest" });
440
+ case 1:
441
+ return S.suspend(() =>
442
+ S.Struct({
443
+ ok: S.Boolean,
444
+ item: S.Unknown,
445
+ }),
446
+ ).annotate({ identifier: "CreateItemResponse" });
447
+ }
448
+ }
449
+ function __c1(j: number): any {
450
+ switch (j) {
451
+ case 0:
452
+ return S.Array(S.Unknown);
453
+ }
454
+ }
455
+ function __c2(j: number): any {
456
+ switch (j) {
457
+ case 0:
458
+ return S.suspend(() =>
459
+ S.Struct({
460
+ name: S.String,
461
+ description_blocks: S.optional(__S(4, __c1, 0)),
462
+ schema: S.optional(__S(4, __c1, 0)),
463
+ copy_from_list_id: S.optional(S.String),
464
+ include_copied_list_records: S.optional(S.Boolean),
465
+ todo_mode: S.optional(S.Boolean),
466
+ }).pipe(T.Http({ method: "POST", uri: "/slackLists.create", code: 200 })),
467
+ ).annotate({ identifier: "CreateSlackListRequest" });
468
+ case 1:
469
+ return S.suspend(() =>
470
+ S.Struct({
471
+ ok: S.Boolean,
472
+ list_id: S.String,
473
+ list_metadata: S.optional(S.Unknown),
474
+ }),
475
+ ).annotate({ identifier: "CreateSlackListResponse" });
476
+ }
477
+ }
478
+ function __c3(j: number): any {
479
+ switch (j) {
480
+ case 0:
481
+ return S.suspend(() =>
482
+ S.Struct({
483
+ list_id: S.String,
484
+ cells: __S(4, __c1, 0),
485
+ }).pipe(T.Http({ method: "POST", uri: "/slackLists.items.update", code: 200 })),
486
+ ).annotate({ identifier: "UpdateItemRequest" });
487
+ }
488
+ }
489
+ function __c4(j: number): any {
490
+ switch (j) {
491
+ case 0:
492
+ return S.suspend(() =>
493
+ S.Struct({
494
+ id: S.String,
495
+ name: S.optional(S.String),
496
+ description_blocks: S.optional(__S(4, __c1, 0)),
497
+ todo_mode: S.optional(S.Boolean),
498
+ }).pipe(T.Http({ method: "POST", uri: "/slackLists.update", code: 200 })),
499
+ ).annotate({ identifier: "UpdateSlackListRequest" });
500
+ }
501
+ }
502
+ function __c5(j: number): any {
503
+ switch (j) {
504
+ case 0:
505
+ return S.suspend(() =>
506
+ S.Struct({
507
+ list_id: S.String,
508
+ channel_ids: S.optional(__S(24, __c6, 0)),
509
+ user_ids: S.optional(__S(24, __c6, 0)),
510
+ }).pipe(T.Http({ method: "POST", uri: "/slackLists.access.delete", code: 200 })),
511
+ ).annotate({ identifier: "DeleteAccessRequest" });
512
+ }
513
+ }
514
+ function __c6(j: number): any {
515
+ switch (j) {
516
+ case 0:
517
+ return S.Array(S.String);
518
+ }
519
+ }
520
+ function __c7(j: number): any {
521
+ switch (j) {
522
+ case 0:
523
+ return S.suspend(() =>
524
+ S.Struct({
525
+ ok: S.Boolean,
526
+ failed_to_update_channel_ids: S.optional(__S(24, __c6, 0)),
527
+ failed_to_update_user_ids: S.optional(__S(24, __c6, 0)),
528
+ }),
529
+ ).annotate({ identifier: "DeleteAccessResponse" });
530
+ }
531
+ }
532
+ function __c8(j: number): any {
533
+ switch (j) {
534
+ case 0:
535
+ return S.suspend(() =>
536
+ S.Struct({
537
+ list_id: S.String,
538
+ id: S.String,
539
+ }).pipe(T.Http({ method: "POST", uri: "/slackLists.items.delete", code: 200 })),
540
+ ).annotate({ identifier: "DeleteItemRequest" });
541
+ }
542
+ }
543
+ function __c9(j: number): any {
544
+ switch (j) {
545
+ case 0:
546
+ return S.suspend(() =>
547
+ S.Struct({
548
+ ok: S.Boolean,
549
+ }),
550
+ ).annotate({ identifier: "DeleteItemResponse" });
551
+ }
552
+ }
553
+ function __c10(j: number): any {
554
+ switch (j) {
555
+ case 0:
556
+ return S.suspend(() =>
557
+ S.Struct({
558
+ list_id: S.String,
559
+ ids: __S(24, __c6, 0),
560
+ }).pipe(T.Http({ method: "POST", uri: "/slackLists.items.deleteMultiple", code: 200 })),
561
+ ).annotate({ identifier: "DeleteMultipleRequest" });
562
+ }
563
+ }
564
+ function __c11(j: number): any {
565
+ switch (j) {
566
+ case 0:
567
+ return S.suspend(() =>
568
+ S.Struct({
569
+ list_id: S.String,
570
+ job_id: S.String,
571
+ format: S.optional(S.String),
572
+ include_threads: S.optional(S.Boolean),
573
+ include_attachments: S.optional(S.Boolean),
574
+ }).pipe(T.Http({ method: "POST", uri: "/slackLists.download.get", code: 200 })),
575
+ ).annotate({ identifier: "DownloadGetRequest" });
576
+ case 1:
577
+ return S.suspend(() =>
578
+ S.Struct({
579
+ ok: S.Boolean,
580
+ status: S.Unknown,
581
+ download_url: S.optional(S.String),
582
+ }),
583
+ ).annotate({ identifier: "DownloadGetResponse" });
584
+ }
585
+ }
586
+ function __c12(j: number): any {
587
+ switch (j) {
588
+ case 0:
589
+ return S.suspend(() =>
590
+ S.Struct({
591
+ list_id: S.String,
592
+ include_archived: S.optional(S.Boolean),
593
+ format: S.optional(S.String),
594
+ include_threads: S.optional(S.Boolean),
595
+ include_attachments: S.optional(S.Boolean),
596
+ }).pipe(T.Http({ method: "POST", uri: "/slackLists.download.start", code: 200 })),
597
+ ).annotate({ identifier: "DownloadStartRequest" });
598
+ case 1:
599
+ return S.suspend(() =>
600
+ S.Struct({
601
+ ok: S.Boolean,
602
+ job_id: S.Number,
603
+ }),
604
+ ).annotate({ identifier: "DownloadStartResponse" });
605
+ }
606
+ }
607
+ function __c13(j: number): any {
608
+ switch (j) {
609
+ case 0:
610
+ return S.suspend(() =>
611
+ S.Struct({
612
+ list_id: S.String,
613
+ id: S.String,
614
+ include_is_subscribed: S.optional(S.Boolean),
615
+ }).pipe(T.Http({ method: "POST", uri: "/slackLists.items.info", code: 200 })),
616
+ ).annotate({ identifier: "ItemsInfoRequest" });
617
+ case 1:
618
+ return S.suspend(() =>
619
+ S.Struct({
620
+ ok: S.Boolean,
621
+ list: S.Unknown,
622
+ record: S.Unknown,
623
+ parent_task: S.optional(S.Unknown),
624
+ subtasks: S.optional(__S(4, __c1, 0)),
625
+ }),
626
+ ).annotate({ identifier: "ItemsInfoResponse" });
627
+ }
628
+ }
629
+ function __c14(j: number): any {
630
+ switch (j) {
631
+ case 0:
632
+ return S.suspend(() =>
633
+ S.Struct({
634
+ list_id: S.String,
635
+ limit: S.optional(S.Number),
636
+ cursor: S.optional(S.String),
637
+ archived: S.optional(S.Boolean),
638
+ include_list: S.optional(S.Boolean),
639
+ }).pipe(T.Http({ method: "POST", uri: "/slackLists.items.list", code: 200 })),
640
+ ).annotate({ identifier: "ListItemsRequest" });
641
+ case 1:
642
+ return S.suspend(() =>
643
+ S.Struct({
644
+ next_cursor: S.optional(S.String),
645
+ }),
646
+ ).annotate({ identifier: "ListItemsResponseResponseMetadata" });
647
+ case 2:
648
+ return S.suspend(() =>
649
+ S.Struct({
650
+ ok: S.Boolean,
651
+ items: __S(4, __c1, 0),
652
+ response_metadata: S.optional(__S(57, __c14, 1)),
653
+ list: S.optional(S.Unknown),
654
+ }),
655
+ ).annotate({ identifier: "ListItemsResponse" });
656
+ }
657
+ }
658
+ function __c15(j: number): any {
659
+ switch (j) {
660
+ case 0:
661
+ return S.suspend(() =>
662
+ S.Struct({
663
+ list_id: S.String,
664
+ access_level: S.String,
665
+ channel_ids: S.optional(__S(24, __c6, 0)),
666
+ user_ids: S.optional(__S(24, __c6, 0)),
667
+ }).pipe(T.Http({ method: "POST", uri: "/slackLists.access.set", code: 200 })),
668
+ ).annotate({ identifier: "SetAccessRequest" });
669
+ }
670
+ }
671
+ // Schema table: entry i is schema j of builder f, made on first reach.
672
+ function __S(i: number, f: (j: number) => unknown, j: number): any {
673
+ return (__s[i] ??= __L.at(f, j));
674
+ }