@distilled.cloud/slack 1.0.0-rc.12 → 1.0.0-rc.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -0
- 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 +4 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -4
- 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 +23 -22
- 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 +16 -12
- package/src/credentials.ts +8 -10
- package/src/errors.ts +17 -31
- package/src/index.ts +4 -8
- package/src/pagination.ts +2 -5
- package/src/protocol.test.ts +372 -0
- package/src/protocol.ts +56 -72
- 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/src/services/team.ts
CHANGED
|
@@ -1,28 +1,19 @@
|
|
|
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
|
|
|
16
12
|
export type AccessLogsRequestBeforeCase0 = "now";
|
|
17
13
|
export const AccessLogsRequestBeforeCase0 = S.String;
|
|
18
14
|
|
|
19
|
-
export type AccessLogsRequestBefore =
|
|
20
|
-
|
|
21
|
-
| (string & {})
|
|
22
|
-
| string;
|
|
23
|
-
export const AccessLogsRequestBefore = /*@__PURE__*/ S.Unknown.pipe(
|
|
24
|
-
T.UnionCases([[], []]),
|
|
25
|
-
);
|
|
15
|
+
export type AccessLogsRequestBefore = AccessLogsRequestBeforeCase0 | (string & {}) | string;
|
|
16
|
+
export const AccessLogsRequestBefore = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], []]));
|
|
26
17
|
|
|
27
18
|
export interface AccessLogsRequest {
|
|
28
19
|
/** End of time range of logs to include in results (inclusive). */
|
|
@@ -45,9 +36,7 @@ export const AccessLogsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
45
36
|
limit: S.optional(S.Number.pipe(T.Query())),
|
|
46
37
|
team_id: S.optional(S.String.pipe(T.Query())),
|
|
47
38
|
}).pipe(T.Http({ method: "GET", uri: "/team.accessLogs", code: 200 })),
|
|
48
|
-
).annotate({
|
|
49
|
-
identifier: "AccessLogsRequest",
|
|
50
|
-
}) as any as S.Schema<AccessLogsRequest>;
|
|
39
|
+
).annotate({ identifier: "AccessLogsRequest" }) as any as S.Schema<AccessLogsRequest>;
|
|
51
40
|
|
|
52
41
|
export interface AccessLogsResponseLoginsItem {
|
|
53
42
|
username: string;
|
|
@@ -96,9 +85,7 @@ export const AccessLogsResponsePaging = /*@__PURE__*/ S.suspend(() =>
|
|
|
96
85
|
page: S.Number,
|
|
97
86
|
pages: S.Number,
|
|
98
87
|
}),
|
|
99
|
-
).annotate({
|
|
100
|
-
identifier: "AccessLogsResponsePaging",
|
|
101
|
-
}) as any as S.Schema<AccessLogsResponsePaging>;
|
|
88
|
+
).annotate({ identifier: "AccessLogsResponsePaging" }) as any as S.Schema<AccessLogsResponsePaging>;
|
|
102
89
|
|
|
103
90
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
104
91
|
export interface AccessLogsResponseResponseMetadata {
|
|
@@ -128,9 +115,7 @@ export const AccessLogsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
128
115
|
paging: S.optional(AccessLogsResponsePaging),
|
|
129
116
|
response_metadata: S.optional(AccessLogsResponseResponseMetadata),
|
|
130
117
|
}),
|
|
131
|
-
).annotate({
|
|
132
|
-
identifier: "AccessLogsResponse",
|
|
133
|
-
}) as any as S.Schema<AccessLogsResponse>;
|
|
118
|
+
).annotate({ identifier: "AccessLogsResponse" }) as any as S.Schema<AccessLogsResponse>;
|
|
134
119
|
|
|
135
120
|
export interface BillableInfoRequest {
|
|
136
121
|
/** Set `cursor` to `next_cursor` returned by previous call, to indicate from where you want to list next page of users list. Default value fetches the first page. */
|
|
@@ -149,19 +134,13 @@ export const BillableInfoRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
149
134
|
user: S.optional(S.String.pipe(T.Query())),
|
|
150
135
|
team_id: S.optional(S.String.pipe(T.Query())),
|
|
151
136
|
}).pipe(T.Http({ method: "GET", uri: "/team.billableInfo", code: 200 })),
|
|
152
|
-
).annotate({
|
|
153
|
-
identifier: "BillableInfoRequest",
|
|
154
|
-
}) as any as S.Schema<BillableInfoRequest>;
|
|
137
|
+
).annotate({ identifier: "BillableInfoRequest" }) as any as S.Schema<BillableInfoRequest>;
|
|
155
138
|
|
|
156
139
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
157
|
-
export type BillableInfoResponseResponseMetadata =
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
export type BillableInfoResponseBillableInfoMap = {
|
|
163
|
-
[key: string]: unknown | undefined;
|
|
164
|
-
};
|
|
140
|
+
export type BillableInfoResponseResponseMetadata = AccessLogsResponseResponseMetadata;
|
|
141
|
+
export const BillableInfoResponseResponseMetadata = AccessLogsResponseResponseMetadata;
|
|
142
|
+
|
|
143
|
+
export type BillableInfoResponseBillableInfoMap = { [key: string]: unknown | undefined };
|
|
165
144
|
export const BillableInfoResponseBillableInfoMap = /*@__PURE__*/ S.Record(
|
|
166
145
|
S.String,
|
|
167
146
|
S.Unknown,
|
|
@@ -180,18 +159,12 @@ export const BillableInfoResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
180
159
|
response_metadata: S.optional(AccessLogsResponseResponseMetadata),
|
|
181
160
|
billable_info: BillableInfoResponseBillableInfoMap,
|
|
182
161
|
}),
|
|
183
|
-
).annotate({
|
|
184
|
-
identifier: "BillableInfoResponse",
|
|
185
|
-
}) as any as S.Schema<BillableInfoResponse>;
|
|
162
|
+
).annotate({ identifier: "BillableInfoResponse" }) as any as S.Schema<BillableInfoResponse>;
|
|
186
163
|
|
|
187
164
|
export interface BillingInfoRequest {}
|
|
188
165
|
export const BillingInfoRequest = /*@__PURE__*/ S.suspend(() =>
|
|
189
|
-
S.Struct({}).pipe(
|
|
190
|
-
|
|
191
|
-
),
|
|
192
|
-
).annotate({
|
|
193
|
-
identifier: "BillingInfoRequest",
|
|
194
|
-
}) as any as S.Schema<BillingInfoRequest>;
|
|
166
|
+
S.Struct({}).pipe(T.Http({ method: "POST", uri: "/team.billing.info", code: 200 })),
|
|
167
|
+
).annotate({ identifier: "BillingInfoRequest" }) as any as S.Schema<BillingInfoRequest>;
|
|
195
168
|
|
|
196
169
|
export interface BillingInfoResponse {
|
|
197
170
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -203,9 +176,7 @@ export const BillingInfoResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
203
176
|
ok: S.Boolean,
|
|
204
177
|
plan: S.String,
|
|
205
178
|
}),
|
|
206
|
-
).annotate({
|
|
207
|
-
identifier: "BillingInfoResponse",
|
|
208
|
-
}) as any as S.Schema<BillingInfoResponse>;
|
|
179
|
+
).annotate({ identifier: "BillingInfoResponse" }) as any as S.Schema<BillingInfoResponse>;
|
|
209
180
|
|
|
210
181
|
export interface DisconnectExternalTeamRequest {
|
|
211
182
|
/** The team ID of the target team. */
|
|
@@ -251,9 +222,7 @@ export const GetProfileRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
251
222
|
S.Struct({
|
|
252
223
|
visibility: S.optional(GetProfileRequestVisibility.pipe(T.Query())),
|
|
253
224
|
}).pipe(T.Http({ method: "GET", uri: "/team.profile.get", code: 200 })),
|
|
254
|
-
).annotate({
|
|
255
|
-
identifier: "GetProfileRequest",
|
|
256
|
-
}) as any as S.Schema<GetProfileRequest>;
|
|
225
|
+
).annotate({ identifier: "GetProfileRequest" }) as any as S.Schema<GetProfileRequest>;
|
|
257
226
|
|
|
258
227
|
export type GetProfileResponseProfileFieldsList = Array<unknown>;
|
|
259
228
|
export const GetProfileResponseProfileFieldsList = /*@__PURE__*/ S.Array(
|
|
@@ -288,9 +257,7 @@ export const GetProfileResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
288
257
|
ok: S.Boolean,
|
|
289
258
|
profile: GetProfileResponseProfile,
|
|
290
259
|
}),
|
|
291
|
-
).annotate({
|
|
292
|
-
identifier: "GetProfileResponse",
|
|
293
|
-
}) as any as S.Schema<GetProfileResponse>;
|
|
260
|
+
).annotate({ identifier: "GetProfileResponse" }) as any as S.Schema<GetProfileResponse>;
|
|
294
261
|
|
|
295
262
|
export type IntegrationLogsRequestChangeType =
|
|
296
263
|
| "added"
|
|
@@ -324,20 +291,15 @@ export const IntegrationLogsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
324
291
|
team_id: S.optional(S.String.pipe(T.Query())),
|
|
325
292
|
user: S.optional(S.String.pipe(T.Query())),
|
|
326
293
|
}).pipe(T.Http({ method: "GET", uri: "/team.integrationLogs", code: 200 })),
|
|
327
|
-
).annotate({
|
|
328
|
-
identifier: "IntegrationLogsRequest",
|
|
329
|
-
}) as any as S.Schema<IntegrationLogsRequest>;
|
|
294
|
+
).annotate({ identifier: "IntegrationLogsRequest" }) as any as S.Schema<IntegrationLogsRequest>;
|
|
330
295
|
|
|
331
|
-
export type IntegrationLogsResponseLogsItemMap = {
|
|
332
|
-
[key: string]: unknown | undefined;
|
|
333
|
-
};
|
|
296
|
+
export type IntegrationLogsResponseLogsItemMap = { [key: string]: unknown | undefined };
|
|
334
297
|
export const IntegrationLogsResponseLogsItemMap = /*@__PURE__*/ S.Record(
|
|
335
298
|
S.String,
|
|
336
299
|
S.Unknown,
|
|
337
300
|
) as any as S.Schema<IntegrationLogsResponseLogsItemMap>;
|
|
338
301
|
|
|
339
|
-
export type IntegrationLogsResponseLogsList =
|
|
340
|
-
Array<IntegrationLogsResponseLogsItemMap>;
|
|
302
|
+
export type IntegrationLogsResponseLogsList = Array<IntegrationLogsResponseLogsItemMap>;
|
|
341
303
|
export const IntegrationLogsResponseLogsList = /*@__PURE__*/ S.Array(
|
|
342
304
|
IntegrationLogsResponseLogsItemMap,
|
|
343
305
|
) as any as S.Schema<IntegrationLogsResponseLogsList>;
|
|
@@ -354,9 +316,7 @@ export const IntegrationLogsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
354
316
|
paging: S.Unknown,
|
|
355
317
|
logs: IntegrationLogsResponseLogsList,
|
|
356
318
|
}),
|
|
357
|
-
).annotate({
|
|
358
|
-
identifier: "IntegrationLogsResponse",
|
|
359
|
-
}) as any as S.Schema<IntegrationLogsResponse>;
|
|
319
|
+
).annotate({ identifier: "IntegrationLogsResponse" }) as any as S.Schema<IntegrationLogsResponse>;
|
|
360
320
|
|
|
361
321
|
export type ListExternalTeamsRequestSortField =
|
|
362
322
|
| "team_name"
|
|
@@ -383,16 +343,14 @@ export const ListExternalTeamsRequestSlackConnectPrefFilterItem = S.String;
|
|
|
383
343
|
export type ListExternalTeamsRequestSlackConnectPrefFilterList = Array<
|
|
384
344
|
ListExternalTeamsRequestSlackConnectPrefFilterItem | (string & {})
|
|
385
345
|
>;
|
|
386
|
-
export const ListExternalTeamsRequestSlackConnectPrefFilterList =
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
) as any as S.Schema<ListExternalTeamsRequestSlackConnectPrefFilterList>;
|
|
346
|
+
export const ListExternalTeamsRequestSlackConnectPrefFilterList = /*@__PURE__*/ S.Array(
|
|
347
|
+
ListExternalTeamsRequestSlackConnectPrefFilterItem,
|
|
348
|
+
) as any as S.Schema<ListExternalTeamsRequestSlackConnectPrefFilterList>;
|
|
390
349
|
|
|
391
350
|
export type ListExternalTeamsRequestWorkspaceFilterList = Array<string>;
|
|
392
|
-
export const ListExternalTeamsRequestWorkspaceFilterList =
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
) as any as S.Schema<ListExternalTeamsRequestWorkspaceFilterList>;
|
|
351
|
+
export const ListExternalTeamsRequestWorkspaceFilterList = /*@__PURE__*/ S.Array(
|
|
352
|
+
S.String,
|
|
353
|
+
) as any as S.Schema<ListExternalTeamsRequestWorkspaceFilterList>;
|
|
396
354
|
|
|
397
355
|
export type ListExternalTeamsRequestConnectionStatusFilter =
|
|
398
356
|
| "CONNECTED"
|
|
@@ -415,33 +373,23 @@ export interface ListExternalTeamsRequest {
|
|
|
415
373
|
/** Shows connected orgs which are connected on a specified encoded workspace ID */
|
|
416
374
|
workspace_filter?: ListExternalTeamsRequestWorkspaceFilterList;
|
|
417
375
|
/** Status of the connected team. */
|
|
418
|
-
connection_status_filter?:
|
|
419
|
-
| ListExternalTeamsRequestConnectionStatusFilter
|
|
420
|
-
| (string & {});
|
|
376
|
+
connection_status_filter?: ListExternalTeamsRequestConnectionStatusFilter | (string & {});
|
|
421
377
|
}
|
|
422
378
|
export const ListExternalTeamsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
423
379
|
S.Struct({
|
|
424
380
|
limit: S.optional(S.Number.pipe(T.Query())),
|
|
425
381
|
cursor: S.optional(S.String.pipe(T.Query())),
|
|
426
382
|
sort_field: S.optional(ListExternalTeamsRequestSortField.pipe(T.Query())),
|
|
427
|
-
sort_direction: S.optional(
|
|
428
|
-
ListExternalTeamsRequestSortDirection.pipe(T.Query()),
|
|
429
|
-
),
|
|
383
|
+
sort_direction: S.optional(ListExternalTeamsRequestSortDirection.pipe(T.Query())),
|
|
430
384
|
slack_connect_pref_filter: S.optional(
|
|
431
385
|
ListExternalTeamsRequestSlackConnectPrefFilterList.pipe(T.Query()),
|
|
432
386
|
),
|
|
433
|
-
workspace_filter: S.optional(
|
|
434
|
-
ListExternalTeamsRequestWorkspaceFilterList.pipe(T.Query()),
|
|
435
|
-
),
|
|
387
|
+
workspace_filter: S.optional(ListExternalTeamsRequestWorkspaceFilterList.pipe(T.Query())),
|
|
436
388
|
connection_status_filter: S.optional(
|
|
437
389
|
ListExternalTeamsRequestConnectionStatusFilter.pipe(T.Query()),
|
|
438
390
|
),
|
|
439
|
-
}).pipe(
|
|
440
|
-
|
|
441
|
-
),
|
|
442
|
-
).annotate({
|
|
443
|
-
identifier: "ListExternalTeamsRequest",
|
|
444
|
-
}) as any as S.Schema<ListExternalTeamsRequest>;
|
|
391
|
+
}).pipe(T.Http({ method: "GET", uri: "/team.externalTeams.list", code: 200 })),
|
|
392
|
+
).annotate({ identifier: "ListExternalTeamsRequest" }) as any as S.Schema<ListExternalTeamsRequest>;
|
|
445
393
|
|
|
446
394
|
export interface ListExternalTeamsResponseOrganizationsItemConnectedWorkspacesItem {
|
|
447
395
|
workspace_id: string;
|
|
@@ -455,8 +403,7 @@ export const ListExternalTeamsResponseOrganizationsItemConnectedWorkspacesItem =
|
|
|
455
403
|
workspace_name: S.String,
|
|
456
404
|
}),
|
|
457
405
|
).annotate({
|
|
458
|
-
identifier:
|
|
459
|
-
"ListExternalTeamsResponseOrganizationsItemConnectedWorkspacesItem",
|
|
406
|
+
identifier: "ListExternalTeamsResponseOrganizationsItemConnectedWorkspacesItem",
|
|
460
407
|
}) as any as S.Schema<ListExternalTeamsResponseOrganizationsItemConnectedWorkspacesItem>;
|
|
461
408
|
|
|
462
409
|
export type ListExternalTeamsResponseOrganizationsItemConnectedWorkspacesList =
|
|
@@ -473,8 +420,7 @@ export type ListExternalTeamsResponseOrganizationsItemConnectionStatus =
|
|
|
473
420
|
| "BLOCKED"
|
|
474
421
|
| "IN_REVIEW"
|
|
475
422
|
| "DISCONNECTING";
|
|
476
|
-
export const ListExternalTeamsResponseOrganizationsItemConnectionStatus =
|
|
477
|
-
S.String;
|
|
423
|
+
export const ListExternalTeamsResponseOrganizationsItemConnectionStatus = S.String;
|
|
478
424
|
|
|
479
425
|
export interface ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsItem {
|
|
480
426
|
team_id: string;
|
|
@@ -487,8 +433,7 @@ export const ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsIte
|
|
|
487
433
|
count: S.Number,
|
|
488
434
|
}),
|
|
489
435
|
).annotate({
|
|
490
|
-
identifier:
|
|
491
|
-
"ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsItem",
|
|
436
|
+
identifier: "ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsItem",
|
|
492
437
|
}) as any as S.Schema<ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsItem>;
|
|
493
438
|
|
|
494
439
|
export type ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsList =
|
|
@@ -502,16 +447,14 @@ export interface ListExternalTeamsResponseOrganizationsItemCanvas {
|
|
|
502
447
|
total_count: number;
|
|
503
448
|
ownership_details: ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsList;
|
|
504
449
|
}
|
|
505
|
-
export const ListExternalTeamsResponseOrganizationsItemCanvas =
|
|
506
|
-
|
|
507
|
-
S.
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
identifier: "ListExternalTeamsResponseOrganizationsItemCanvas",
|
|
514
|
-
}) as any as S.Schema<ListExternalTeamsResponseOrganizationsItemCanvas>;
|
|
450
|
+
export const ListExternalTeamsResponseOrganizationsItemCanvas = /*@__PURE__*/ S.suspend(() =>
|
|
451
|
+
S.Struct({
|
|
452
|
+
total_count: S.Number,
|
|
453
|
+
ownership_details: ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsList,
|
|
454
|
+
}),
|
|
455
|
+
).annotate({
|
|
456
|
+
identifier: "ListExternalTeamsResponseOrganizationsItemCanvas",
|
|
457
|
+
}) as any as S.Schema<ListExternalTeamsResponseOrganizationsItemCanvas>;
|
|
515
458
|
|
|
516
459
|
export type ListExternalTeamsResponseOrganizationsItemListsOwnershipDetailsItem =
|
|
517
460
|
ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsItem;
|
|
@@ -529,16 +472,14 @@ export interface ListExternalTeamsResponseOrganizationsItemLists {
|
|
|
529
472
|
total_count: number;
|
|
530
473
|
ownership_details: ListExternalTeamsResponseOrganizationsItemListsOwnershipDetailsList;
|
|
531
474
|
}
|
|
532
|
-
export const ListExternalTeamsResponseOrganizationsItemLists =
|
|
533
|
-
|
|
534
|
-
S.
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
identifier: "ListExternalTeamsResponseOrganizationsItemLists",
|
|
541
|
-
}) as any as S.Schema<ListExternalTeamsResponseOrganizationsItemLists>;
|
|
475
|
+
export const ListExternalTeamsResponseOrganizationsItemLists = /*@__PURE__*/ S.suspend(() =>
|
|
476
|
+
S.Struct({
|
|
477
|
+
total_count: S.Number,
|
|
478
|
+
ownership_details: ListExternalTeamsResponseOrganizationsItemListsOwnershipDetailsList,
|
|
479
|
+
}),
|
|
480
|
+
).annotate({
|
|
481
|
+
identifier: "ListExternalTeamsResponseOrganizationsItemLists",
|
|
482
|
+
}) as any as S.Schema<ListExternalTeamsResponseOrganizationsItemLists>;
|
|
542
483
|
|
|
543
484
|
export interface ListExternalTeamsResponseOrganizationsItem {
|
|
544
485
|
team_id: string;
|
|
@@ -565,29 +506,26 @@ export interface ListExternalTeamsResponseOrganizationsItem {
|
|
|
565
506
|
canvas?: ListExternalTeamsResponseOrganizationsItemCanvas;
|
|
566
507
|
lists?: ListExternalTeamsResponseOrganizationsItemLists;
|
|
567
508
|
}
|
|
568
|
-
export const ListExternalTeamsResponseOrganizationsItem =
|
|
569
|
-
|
|
570
|
-
S.
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
).annotate({
|
|
589
|
-
identifier: "ListExternalTeamsResponseOrganizationsItem",
|
|
590
|
-
}) as any as S.Schema<ListExternalTeamsResponseOrganizationsItem>;
|
|
509
|
+
export const ListExternalTeamsResponseOrganizationsItem = /*@__PURE__*/ S.suspend(() =>
|
|
510
|
+
S.Struct({
|
|
511
|
+
team_id: S.String,
|
|
512
|
+
team_name: S.String,
|
|
513
|
+
team_domain: S.String,
|
|
514
|
+
public_channel_count: S.Number,
|
|
515
|
+
private_channel_count: S.Number,
|
|
516
|
+
im_channel_count: S.Number,
|
|
517
|
+
mpim_channel_count: S.Number,
|
|
518
|
+
connected_workspaces: ListExternalTeamsResponseOrganizationsItemConnectedWorkspacesList,
|
|
519
|
+
slack_connect_prefs: S.Unknown,
|
|
520
|
+
connection_status: ListExternalTeamsResponseOrganizationsItemConnectionStatus,
|
|
521
|
+
last_active_timestamp: S.Number,
|
|
522
|
+
is_sponsored: S.Boolean,
|
|
523
|
+
canvas: S.optional(ListExternalTeamsResponseOrganizationsItemCanvas),
|
|
524
|
+
lists: S.optional(ListExternalTeamsResponseOrganizationsItemLists),
|
|
525
|
+
}),
|
|
526
|
+
).annotate({
|
|
527
|
+
identifier: "ListExternalTeamsResponseOrganizationsItem",
|
|
528
|
+
}) as any as S.Schema<ListExternalTeamsResponseOrganizationsItem>;
|
|
591
529
|
|
|
592
530
|
export type ListExternalTeamsResponseOrganizationsList =
|
|
593
531
|
Array<ListExternalTeamsResponseOrganizationsItem>;
|
|
@@ -596,10 +534,8 @@ export const ListExternalTeamsResponseOrganizationsList = /*@__PURE__*/ S.Array(
|
|
|
596
534
|
) as any as S.Schema<ListExternalTeamsResponseOrganizationsList>;
|
|
597
535
|
|
|
598
536
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
599
|
-
export type ListExternalTeamsResponseResponseMetadata =
|
|
600
|
-
|
|
601
|
-
export const ListExternalTeamsResponseResponseMetadata =
|
|
602
|
-
AccessLogsResponseResponseMetadata;
|
|
537
|
+
export type ListExternalTeamsResponseResponseMetadata = AccessLogsResponseResponseMetadata;
|
|
538
|
+
export const ListExternalTeamsResponseResponseMetadata = AccessLogsResponseResponseMetadata;
|
|
603
539
|
|
|
604
540
|
export interface ListExternalTeamsResponse {
|
|
605
541
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -622,12 +558,8 @@ export const ListExternalTeamsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
622
558
|
|
|
623
559
|
export interface ListPreferencesRequest {}
|
|
624
560
|
export const ListPreferencesRequest = /*@__PURE__*/ S.suspend(() =>
|
|
625
|
-
S.Struct({}).pipe(
|
|
626
|
-
|
|
627
|
-
),
|
|
628
|
-
).annotate({
|
|
629
|
-
identifier: "ListPreferencesRequest",
|
|
630
|
-
}) as any as S.Schema<ListPreferencesRequest>;
|
|
561
|
+
S.Struct({}).pipe(T.Http({ method: "POST", uri: "/team.preferences.list", code: 200 })),
|
|
562
|
+
).annotate({ identifier: "ListPreferencesRequest" }) as any as S.Schema<ListPreferencesRequest>;
|
|
631
563
|
|
|
632
564
|
export interface ListPreferencesResponse {
|
|
633
565
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -645,9 +577,7 @@ export const ListPreferencesResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
645
577
|
msg_edit_window_mins: S.Number,
|
|
646
578
|
who_can_post_general: S.String,
|
|
647
579
|
}),
|
|
648
|
-
).annotate({
|
|
649
|
-
identifier: "ListPreferencesResponse",
|
|
650
|
-
}) as any as S.Schema<ListPreferencesResponse>;
|
|
580
|
+
).annotate({ identifier: "ListPreferencesResponse" }) as any as S.Schema<ListPreferencesResponse>;
|
|
651
581
|
|
|
652
582
|
export interface TeamInfoRequest {
|
|
653
583
|
/** Query by domain instead of team (only when team is null). This only works for domains in the same enterprise as the querying team token. This also expects the domain to belong to a team and not the enterprise itself. This is the value set up for the 'Joining This Workspace' workspace setting. If it contains more than one domain, the field will contain multiple comma-separated domain values. If no domain is set, the field is empty. */
|
|
@@ -660,9 +590,7 @@ export const TeamInfoRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
660
590
|
domain: S.optional(S.String.pipe(T.Query())),
|
|
661
591
|
team: S.optional(S.String.pipe(T.Query())),
|
|
662
592
|
}).pipe(T.Http({ method: "GET", uri: "/team.info", code: 200 })),
|
|
663
|
-
).annotate({
|
|
664
|
-
identifier: "TeamInfoRequest",
|
|
665
|
-
}) as any as S.Schema<TeamInfoRequest>;
|
|
593
|
+
).annotate({ identifier: "TeamInfoRequest" }) as any as S.Schema<TeamInfoRequest>;
|
|
666
594
|
|
|
667
595
|
export interface TeamInfoResponse {
|
|
668
596
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -672,9 +600,7 @@ export const TeamInfoResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
672
600
|
S.Struct({
|
|
673
601
|
ok: S.Boolean,
|
|
674
602
|
}),
|
|
675
|
-
).annotate({
|
|
676
|
-
identifier: "TeamInfoResponse",
|
|
677
|
-
}) as any as S.Schema<TeamInfoResponse>;
|
|
603
|
+
).annotate({ identifier: "TeamInfoResponse" }) as any as S.Schema<TeamInfoResponse>;
|
|
678
604
|
|
|
679
605
|
export type AccessLogsError = SlackOpError;
|
|
680
606
|
/** Gets the access logs for the current team. Required scopes — user: `admin` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `missing_argument` — A required argument is missing. - `missing_scope` — The provided token hasn't obtained the necessary scopes to use this method. - `not_allowed_token_type` — Method was called with an invalid token type - `over_pagination_limit` — It is not possible to request more than 1000 items per page or more than 100 pages. - `paid_only` — This is only available to paid teams. - `token_revoked` — token revoked (generated) - `invalid_cursor` — Value passed for `cursor` was not valid or is no longer valid. - `invalid_limit` — The value passed for `limit` was not valid. - `invalid_team_id` — The value passed for `team_id` is not valid given the token context. See https://docs.slack.dev/reference/methods/team.accessLogs */
|
package/src/services/tooling.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
4
|
import * as Redacted from "effect/Redacted";
|
|
4
|
-
import * as API from "@distilled.cloud/core/api";
|
|
5
|
-
import * as T from "../traits.ts";
|
|
6
|
-
import {
|
|
7
|
-
SlackProtocol,
|
|
8
|
-
type SlackOpError,
|
|
9
|
-
type SlackOpContext,
|
|
10
|
-
} from "../protocol.ts";
|
|
11
5
|
import { SlackError, SlackRateLimited } from "../errors.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
|
|
|
@@ -28,9 +24,7 @@ export const RotateTokenRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
28
24
|
contentType: "form-urlencoded",
|
|
29
25
|
}),
|
|
30
26
|
),
|
|
31
|
-
).annotate({
|
|
32
|
-
identifier: "RotateTokenRequest",
|
|
33
|
-
}) as any as S.Schema<RotateTokenRequest>;
|
|
27
|
+
).annotate({ identifier: "RotateTokenRequest" }) as any as S.Schema<RotateTokenRequest>;
|
|
34
28
|
|
|
35
29
|
export interface RotateTokenResponse {
|
|
36
30
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -58,9 +52,7 @@ export const RotateTokenResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
58
52
|
exp: S.Number,
|
|
59
53
|
iat: S.Number,
|
|
60
54
|
}),
|
|
61
|
-
).annotate({
|
|
62
|
-
identifier: "RotateTokenResponse",
|
|
63
|
-
}) as any as S.Schema<RotateTokenResponse>;
|
|
55
|
+
).annotate({ identifier: "RotateTokenResponse" }) as any as S.Schema<RotateTokenResponse>;
|
|
64
56
|
|
|
65
57
|
export type RotateTokenError = SlackOpError;
|
|
66
58
|
/** Exchanges a refresh token for a new app configuration token. Rate limit tier: 5 Method-specific errors (the `error` slug on the SlackError): - `internal_error` — Internal error - `invalid_refresh_token` — The given refresh token is invalid. - `unknown_error` — Temporary error for dev only restriction See https://docs.slack.dev/reference/methods/tooling.tokens.rotate */
|