@distilled.cloud/slack 1.0.0-rc.13 → 1.0.0-rc.15
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.
- package/lib/credentials.d.ts +2 -2
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +3 -3
- package/lib/credentials.js.map +1 -1
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -1
- package/lib/errors.js.map +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -3
- package/lib/index.js.map +1 -1
- package/lib/pagination.d.ts.map +1 -1
- package/lib/pagination.js.map +1 -1
- package/lib/protocol.d.ts +3 -3
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +12 -18
- package/lib/protocol.js.map +1 -1
- package/lib/protocol.test.d.ts +2 -0
- package/lib/protocol.test.d.ts.map +1 -0
- package/lib/protocol.test.js +288 -0
- package/lib/protocol.test.js.map +1 -0
- package/lib/retry.d.ts +1 -1
- package/lib/retry.d.ts.map +1 -1
- package/lib/retry.js +1 -1
- package/lib/retry.js.map +1 -1
- package/lib/services/admin.d.ts +236 -29
- package/lib/services/admin.d.ts.map +1 -1
- package/lib/services/admin.js +417 -749
- package/lib/services/admin.js.map +1 -1
- package/lib/services/agents.d.ts +423 -0
- package/lib/services/agents.d.ts.map +1 -0
- package/lib/services/agents.js +315 -0
- package/lib/services/agents.js.map +1 -0
- package/lib/services/api.d.ts +1 -1
- package/lib/services/api.d.ts.map +1 -1
- package/lib/services/api.js +4 -6
- package/lib/services/api.js.map +1 -1
- package/lib/services/apps.d.ts +21 -3
- package/lib/services/apps.d.ts.map +1 -1
- package/lib/services/apps.js +65 -133
- package/lib/services/apps.js.map +1 -1
- package/lib/services/assistant.d.ts +4 -4
- package/lib/services/assistant.d.ts.map +1 -1
- package/lib/services/assistant.js +16 -38
- package/lib/services/assistant.js.map +1 -1
- package/lib/services/auth.d.ts +2 -2
- package/lib/services/auth.d.ts.map +1 -1
- package/lib/services/auth.js +11 -28
- package/lib/services/auth.js.map +1 -1
- package/lib/services/blocks.d.ts +1 -1
- package/lib/services/blocks.d.ts.map +1 -1
- package/lib/services/blocks.js +5 -9
- package/lib/services/blocks.js.map +1 -1
- package/lib/services/bookmarks.d.ts +4 -4
- package/lib/services/bookmarks.d.ts.map +1 -1
- package/lib/services/bookmarks.js +14 -30
- package/lib/services/bookmarks.js.map +1 -1
- package/lib/services/bots.d.ts +1 -1
- package/lib/services/bots.d.ts.map +1 -1
- package/lib/services/bots.js +7 -15
- package/lib/services/bots.js.map +1 -1
- package/lib/services/calls.d.ts +1 -1
- package/lib/services/calls.d.ts.map +1 -1
- package/lib/services/calls.js +13 -33
- package/lib/services/calls.js.map +1 -1
- package/lib/services/canvases.d.ts +22 -2
- package/lib/services/canvases.d.ts.map +1 -1
- package/lib/services/canvases.js +37 -48
- package/lib/services/canvases.js.map +1 -1
- package/lib/services/chat.d.ts +29 -25
- package/lib/services/chat.d.ts.map +1 -1
- package/lib/services/chat.js +47 -95
- package/lib/services/chat.js.map +1 -1
- package/lib/services/conversations.d.ts +10 -8
- package/lib/services/conversations.d.ts.map +1 -1
- package/lib/services/conversations.js +43 -115
- package/lib/services/conversations.js.map +1 -1
- package/lib/services/dialog.d.ts +1 -1
- package/lib/services/dialog.d.ts.map +1 -1
- package/lib/services/dialog.js +5 -9
- package/lib/services/dialog.js.map +1 -1
- package/lib/services/dnd.d.ts +1 -1
- package/lib/services/dnd.d.ts.map +1 -1
- package/lib/services/dnd.js +10 -24
- package/lib/services/dnd.js.map +1 -1
- package/lib/services/emoji.d.ts +1 -1
- package/lib/services/emoji.d.ts.map +1 -1
- package/lib/services/emoji.js +6 -11
- package/lib/services/emoji.js.map +1 -1
- package/lib/services/entity.d.ts +1 -1
- package/lib/services/entity.d.ts.map +1 -1
- package/lib/services/entity.js +8 -20
- package/lib/services/entity.js.map +1 -1
- package/lib/services/files.d.ts +5 -5
- package/lib/services/files.d.ts.map +1 -1
- package/lib/services/files.js +39 -109
- package/lib/services/files.js.map +1 -1
- package/lib/services/functions.d.ts +1 -1
- package/lib/services/functions.d.ts.map +1 -1
- package/lib/services/functions.js +28 -75
- package/lib/services/functions.js.map +1 -1
- package/lib/services/index.d.ts +1 -0
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/index.js +1 -0
- package/lib/services/index.js.map +1 -1
- package/lib/services/lists.d.ts +5 -1
- package/lib/services/lists.d.ts.map +1 -1
- package/lib/services/lists.js +35 -146
- package/lib/services/lists.js.map +1 -1
- package/lib/services/migration.d.ts +1 -1
- package/lib/services/migration.d.ts.map +1 -1
- package/lib/services/migration.js +5 -8
- package/lib/services/migration.js.map +1 -1
- package/lib/services/oauth.d.ts +38 -2
- package/lib/services/oauth.d.ts.map +1 -1
- package/lib/services/oauth.js +67 -50
- package/lib/services/oauth.js.map +1 -1
- package/lib/services/openid.d.ts +1 -1
- package/lib/services/openid.d.ts.map +1 -1
- package/lib/services/openid.js +7 -15
- package/lib/services/openid.js.map +1 -1
- package/lib/services/pins.d.ts +1 -1
- package/lib/services/pins.d.ts.map +1 -1
- package/lib/services/pins.js +7 -15
- package/lib/services/pins.js.map +1 -1
- package/lib/services/reactions.d.ts +2 -2
- package/lib/services/reactions.d.ts.map +1 -1
- package/lib/services/reactions.js +13 -29
- package/lib/services/reactions.js.map +1 -1
- package/lib/services/reminders.d.ts +1 -1
- package/lib/services/reminders.d.ts.map +1 -1
- package/lib/services/reminders.js +13 -33
- package/lib/services/reminders.js.map +1 -1
- package/lib/services/rtm.d.ts +1 -1
- package/lib/services/rtm.d.ts.map +1 -1
- package/lib/services/rtm.js +9 -21
- package/lib/services/rtm.js.map +1 -1
- package/lib/services/search.d.ts +1 -1
- package/lib/services/search.d.ts.map +1 -1
- package/lib/services/search.js +13 -30
- package/lib/services/search.js.map +1 -1
- package/lib/services/stars.d.ts +1 -1
- package/lib/services/stars.d.ts.map +1 -1
- package/lib/services/stars.js +10 -20
- package/lib/services/stars.js.map +1 -1
- package/lib/services/team.d.ts +1 -1
- package/lib/services/team.d.ts.map +1 -1
- package/lib/services/team.js +25 -62
- package/lib/services/team.js.map +1 -1
- package/lib/services/tooling.d.ts +1 -1
- package/lib/services/tooling.d.ts.map +1 -1
- package/lib/services/tooling.js +5 -9
- package/lib/services/tooling.js.map +1 -1
- package/lib/services/usergroups.d.ts +8 -3
- package/lib/services/usergroups.d.ts.map +1 -1
- package/lib/services/usergroups.js +23 -51
- package/lib/services/usergroups.js.map +1 -1
- package/lib/services/users.d.ts +2 -2
- package/lib/services/users.d.ts.map +1 -1
- package/lib/services/users.js +28 -81
- package/lib/services/users.js.map +1 -1
- package/lib/services/views.d.ts +1 -1
- package/lib/services/views.d.ts.map +1 -1
- package/lib/services/views.js +11 -27
- package/lib/services/views.js.map +1 -1
- package/lib/services/workflows.d.ts +1 -1
- package/lib/services/workflows.d.ts.map +1 -1
- package/lib/services/workflows.js +27 -71
- package/lib/services/workflows.js.map +1 -1
- package/package.json +15 -11
- package/src/credentials.ts +8 -10
- package/src/errors.ts +17 -31
- package/src/index.ts +3 -7
- package/src/pagination.ts +2 -5
- package/src/protocol.test.ts +372 -0
- package/src/protocol.ts +34 -66
- package/src/retry.ts +4 -9
- package/src/services/admin.ts +1241 -1557
- package/src/services/agents.ts +853 -0
- package/src/services/api.ts +4 -10
- package/src/services/apps.ts +146 -243
- package/src/services/assistant.ts +93 -144
- package/src/services/auth.ts +12 -33
- package/src/services/blocks.ts +9 -24
- package/src/services/bookmarks.ts +14 -34
- package/src/services/bots.ts +7 -19
- package/src/services/calls.ts +15 -43
- package/src/services/canvases.ts +82 -85
- package/src/services/chat.ts +134 -254
- package/src/services/conversations.ts +101 -217
- package/src/services/dialog.ts +5 -13
- package/src/services/dnd.ts +11 -31
- package/src/services/emoji.ts +9 -19
- package/src/services/entity.ts +17 -45
- package/src/services/files.ts +72 -165
- package/src/services/functions.ts +95 -168
- package/src/services/index.ts +1 -0
- package/src/services/lists.ts +65 -208
- package/src/services/migration.ts +8 -17
- package/src/services/oauth.ts +127 -60
- package/src/services/openid.ts +12 -34
- package/src/services/pins.ts +7 -19
- package/src/services/reactions.ts +19 -43
- package/src/services/reminders.ts +13 -37
- package/src/services/rtm.ts +9 -25
- package/src/services/search.ts +51 -92
- package/src/services/stars.ts +20 -31
- package/src/services/team.ts +81 -155
- package/src/services/tooling.ts +5 -13
- package/src/services/usergroups.ts +37 -68
- package/src/services/users.ts +35 -102
- package/src/services/views.ts +11 -31
- package/src/services/workflows.ts +65 -129
- package/lib/response-validation.test.d.ts +0 -4
- package/lib/response-validation.test.d.ts.map +0 -1
- package/lib/response-validation.test.js +0 -40
- package/lib/response-validation.test.js.map +0 -1
- package/src/response-validation.test.ts +0 -54
package/src/services/lists.ts
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
68
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
170
|
-
|
|
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
|
-
|
|
177
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
435
|
-
|
|
436
|
-
|
|
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
|
-
|
|
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
|
-
|
|
525
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
600
|
-
|
|
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
|
-
|
|
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
|
-
|
|
49
|
-
|
|
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). */
|