@distilled.cloud/slack 0.0.0 → 1.0.0-rc.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/lib/credentials.d.ts +27 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +53 -0
- package/lib/credentials.js.map +1 -0
- package/lib/errors.d.ts +83 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +59 -0
- package/lib/errors.js.map +1 -0
- package/lib/index.d.ts +17 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +17 -0
- package/lib/index.js.map +1 -0
- package/lib/pagination.d.ts +31 -0
- package/lib/pagination.d.ts.map +1 -0
- package/lib/pagination.js +31 -0
- package/lib/pagination.js.map +1 -0
- package/lib/protocol.d.ts +18 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +230 -0
- package/lib/protocol.js.map +1 -0
- package/lib/retry.d.ts +52 -0
- package/lib/retry.d.ts.map +1 -0
- package/lib/retry.js +45 -0
- package/lib/retry.js.map +1 -0
- package/lib/services/admin.d.ts +2796 -0
- package/lib/services/admin.d.ts.map +1 -0
- package/lib/services/admin.js +3217 -0
- package/lib/services/admin.js.map +1 -0
- package/lib/services/api.d.ts +23 -0
- package/lib/services/api.d.ts.map +1 -0
- package/lib/services/api.js +26 -0
- package/lib/services/api.js.map +1 -0
- package/lib/services/apps.d.ts +568 -0
- package/lib/services/apps.d.ts.map +1 -0
- package/lib/services/apps.js +584 -0
- package/lib/services/apps.js.map +1 -0
- package/lib/services/assistant.d.ts +290 -0
- package/lib/services/assistant.d.ts.map +1 -0
- package/lib/services/assistant.js +232 -0
- package/lib/services/assistant.js.map +1 -0
- package/lib/services/auth.d.ts +90 -0
- package/lib/services/auth.d.ts.map +1 -0
- package/lib/services/auth.js +114 -0
- package/lib/services/auth.js.map +1 -0
- package/lib/services/blocks.d.ts +31 -0
- package/lib/services/blocks.d.ts.map +1 -0
- package/lib/services/blocks.js +31 -0
- package/lib/services/blocks.js.map +1 -0
- package/lib/services/bookmarks.d.ts +91 -0
- package/lib/services/bookmarks.d.ts.map +1 -0
- package/lib/services/bookmarks.js +98 -0
- package/lib/services/bookmarks.js.map +1 -0
- package/lib/services/bots.d.ts +60 -0
- package/lib/services/bots.d.ts.map +1 -0
- package/lib/services/bots.js +68 -0
- package/lib/services/bots.js.map +1 -0
- package/lib/services/calls.d.ts +124 -0
- package/lib/services/calls.d.ts.map +1 -0
- package/lib/services/calls.js +136 -0
- package/lib/services/calls.js.map +1 -0
- package/lib/services/canvases.d.ts +152 -0
- package/lib/services/canvases.d.ts.map +1 -0
- package/lib/services/canvases.js +152 -0
- package/lib/services/canvases.js.map +1 -0
- package/lib/services/chat.d.ts +525 -0
- package/lib/services/chat.d.ts.map +1 -0
- package/lib/services/chat.js +436 -0
- package/lib/services/chat.js.map +1 -0
- package/lib/services/conversations.d.ts +642 -0
- package/lib/services/conversations.d.ts.map +1 -0
- package/lib/services/conversations.js +769 -0
- package/lib/services/conversations.js.map +1 -0
- package/lib/services/dialog.d.ts +20 -0
- package/lib/services/dialog.d.ts.map +1 -0
- package/lib/services/dialog.js +27 -0
- package/lib/services/dialog.js.map +1 -0
- package/lib/services/dnd.d.ts +94 -0
- package/lib/services/dnd.d.ts.map +1 -0
- package/lib/services/dnd.js +111 -0
- package/lib/services/dnd.js.map +1 -0
- package/lib/services/emoji.d.ts +35 -0
- package/lib/services/emoji.d.ts.map +1 -0
- package/lib/services/emoji.js +40 -0
- package/lib/services/emoji.js.map +1 -0
- package/lib/services/entity.d.ts +93 -0
- package/lib/services/entity.d.ts.map +1 -0
- package/lib/services/entity.js +89 -0
- package/lib/services/entity.js.map +1 -0
- package/lib/services/files.d.ts +473 -0
- package/lib/services/files.d.ts.map +1 -0
- package/lib/services/files.js +510 -0
- package/lib/services/files.js.map +1 -0
- package/lib/services/functions.d.ts +235 -0
- package/lib/services/functions.d.ts.map +1 -0
- package/lib/services/functions.js +256 -0
- package/lib/services/functions.js.map +1 -0
- package/lib/services/index.d.ts +35 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +36 -0
- package/lib/services/index.js.map +1 -0
- package/lib/services/lists.d.ts +300 -0
- package/lib/services/lists.d.ts.map +1 -0
- package/lib/services/lists.js +366 -0
- package/lib/services/lists.js.map +1 -0
- package/lib/services/migration.d.ts +34 -0
- package/lib/services/migration.d.ts.map +1 -0
- package/lib/services/migration.js +36 -0
- package/lib/services/migration.js.map +1 -0
- package/lib/services/oauth.d.ts +307 -0
- package/lib/services/oauth.d.ts.map +1 -0
- package/lib/services/oauth.js +278 -0
- package/lib/services/oauth.js.map +1 -0
- package/lib/services/openid.d.ts +86 -0
- package/lib/services/openid.d.ts.map +1 -0
- package/lib/services/openid.js +93 -0
- package/lib/services/openid.js.map +1 -0
- package/lib/services/pins.d.ts +64 -0
- package/lib/services/pins.d.ts.map +1 -0
- package/lib/services/pins.js +75 -0
- package/lib/services/pins.js.map +1 -0
- package/lib/services/reactions.d.ts +108 -0
- package/lib/services/reactions.d.ts.map +1 -0
- package/lib/services/reactions.js +119 -0
- package/lib/services/reactions.js.map +1 -0
- package/lib/services/reminders.d.ts +89 -0
- package/lib/services/reminders.d.ts.map +1 -0
- package/lib/services/reminders.js +109 -0
- package/lib/services/reminders.js.map +1 -0
- package/lib/services/rtm.d.ts +68 -0
- package/lib/services/rtm.d.ts.map +1 -0
- package/lib/services/rtm.js +74 -0
- package/lib/services/rtm.js.map +1 -0
- package/lib/services/search.d.ts +239 -0
- package/lib/services/search.d.ts.map +1 -0
- package/lib/services/search.js +190 -0
- package/lib/services/search.js.map +1 -0
- package/lib/services/stars.d.ts +126 -0
- package/lib/services/stars.d.ts.map +1 -0
- package/lib/services/stars.js +145 -0
- package/lib/services/stars.js.map +1 -0
- package/lib/services/team.d.ts +309 -0
- package/lib/services/team.d.ts.map +1 -0
- package/lib/services/team.js +333 -0
- package/lib/services/team.js.map +1 -0
- package/lib/services/tooling.d.ts +31 -0
- package/lib/services/tooling.d.ts.map +1 -0
- package/lib/services/tooling.js +38 -0
- package/lib/services/tooling.js.map +1 -0
- package/lib/services/usergroups.d.ts +183 -0
- package/lib/services/usergroups.d.ts.map +1 -0
- package/lib/services/usergroups.js +180 -0
- package/lib/services/usergroups.js.map +1 -0
- package/lib/services/users.d.ts +246 -0
- package/lib/services/users.d.ts.map +1 -0
- package/lib/services/users.js +309 -0
- package/lib/services/users.js.map +1 -0
- package/lib/services/views.d.ts +84 -0
- package/lib/services/views.d.ts.map +1 -0
- package/lib/services/views.js +95 -0
- package/lib/services/views.js.map +1 -0
- package/lib/services/workflows.d.ts +231 -0
- package/lib/services/workflows.d.ts.map +1 -0
- package/lib/services/workflows.js +238 -0
- package/lib/services/workflows.js.map +1 -0
- package/lib/traits.d.ts +11 -0
- package/lib/traits.d.ts.map +1 -0
- package/lib/traits.js +12 -0
- package/lib/traits.js.map +1 -0
- package/package.json +82 -4
- package/src/credentials.ts +86 -0
- package/src/errors.ts +101 -0
- package/src/index.ts +20 -0
- package/src/pagination.ts +35 -0
- package/src/protocol.ts +326 -0
- package/src/retry.ts +76 -0
- package/src/services/admin.ts +7722 -0
- package/src/services/api.ts +58 -0
- package/src/services/apps.ts +1441 -0
- package/src/services/assistant.ts +639 -0
- package/src/services/auth.ts +241 -0
- package/src/services/blocks.ts +80 -0
- package/src/services/bookmarks.ts +223 -0
- package/src/services/bots.ts +144 -0
- package/src/services/calls.ts +318 -0
- package/src/services/canvases.ts +392 -0
- package/src/services/chat.ts +1191 -0
- package/src/services/conversations.ts +1754 -0
- package/src/services/dialog.ts +55 -0
- package/src/services/dnd.ts +246 -0
- package/src/services/emoji.ts +91 -0
- package/src/services/entity.ts +225 -0
- package/src/services/files.ts +1192 -0
- package/src/services/functions.ts +642 -0
- package/src/services/index.ts +35 -0
- package/src/services/lists.ts +832 -0
- package/src/services/migration.ts +85 -0
- package/src/services/oauth.ts +658 -0
- package/src/services/openid.ts +243 -0
- package/src/services/pins.ts +167 -0
- package/src/services/reactions.ts +272 -0
- package/src/services/reminders.ts +240 -0
- package/src/services/rtm.ts +162 -0
- package/src/services/search.ts +507 -0
- package/src/services/stars.ts +323 -0
- package/src/services/team.ts +834 -0
- package/src/services/tooling.ts +78 -0
- package/src/services/usergroups.ts +441 -0
- package/src/services/users.ts +685 -0
- package/src/services/views.ts +212 -0
- package/src/services/workflows.ts +605 -0
- package/src/traits.ts +45 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import * as S from "@distilled.cloud/core/schema";
|
|
2
|
+
import * as API from "@distilled.cloud/core/api";
|
|
3
|
+
import { type SlackOpError, type SlackOpContext } from "../protocol.ts";
|
|
4
|
+
export type { SlackOpError, SlackOpContext };
|
|
5
|
+
export interface ListTeamsRequest {
|
|
6
|
+
/** The maximum number of workspaces to return. Must be a positive integer no larger than 1000. */
|
|
7
|
+
limit?: number;
|
|
8
|
+
/** Set `cursor` to `next_cursor` returned by the previous call to list items in the next page. */
|
|
9
|
+
cursor?: string;
|
|
10
|
+
/** Whether to return icon paths for each workspace. An icon path represents a URI pointing to the image signifying the workspace. */
|
|
11
|
+
include_icon?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const ListTeamsRequest: S.Schema<ListTeamsRequest>;
|
|
14
|
+
/** Paths to icons */
|
|
15
|
+
export interface ListTeamsResponseTeamsItemIcon {
|
|
16
|
+
image_34?: string;
|
|
17
|
+
image_44?: string;
|
|
18
|
+
image_68?: string;
|
|
19
|
+
image_88?: string;
|
|
20
|
+
image_102?: string;
|
|
21
|
+
image_132?: string;
|
|
22
|
+
image_230?: string;
|
|
23
|
+
image_default?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare const ListTeamsResponseTeamsItemIcon: S.Schema<ListTeamsResponseTeamsItemIcon>;
|
|
26
|
+
export interface ListTeamsResponseTeamsItem {
|
|
27
|
+
/** ID of the workspace */
|
|
28
|
+
id?: string;
|
|
29
|
+
/** Name of the workspace */
|
|
30
|
+
name: string;
|
|
31
|
+
/** Paths to icons */
|
|
32
|
+
icon?: ListTeamsResponseTeamsItemIcon;
|
|
33
|
+
}
|
|
34
|
+
export declare const ListTeamsResponseTeamsItem: S.Schema<ListTeamsResponseTeamsItem>;
|
|
35
|
+
export type ListTeamsResponseTeamsList = Array<ListTeamsResponseTeamsItem>;
|
|
36
|
+
export declare const ListTeamsResponseTeamsList: S.Schema<ListTeamsResponseTeamsList>;
|
|
37
|
+
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
38
|
+
export interface ListTeamsResponseResponseMetadata {
|
|
39
|
+
/** Cursor for the next page — pass as `cursor` on the next call. */
|
|
40
|
+
next_cursor?: string;
|
|
41
|
+
}
|
|
42
|
+
export declare const ListTeamsResponseResponseMetadata: S.Schema<ListTeamsResponseResponseMetadata>;
|
|
43
|
+
export interface ListTeamsResponse {
|
|
44
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
45
|
+
ok: boolean;
|
|
46
|
+
teams: ListTeamsResponseTeamsList;
|
|
47
|
+
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
48
|
+
response_metadata?: ListTeamsResponseResponseMetadata;
|
|
49
|
+
}
|
|
50
|
+
export declare const ListTeamsResponse: S.Schema<ListTeamsResponse>;
|
|
51
|
+
export interface RevokeAuthRequest {
|
|
52
|
+
/** Setting this parameter to `1` triggers a _testing mode_ where the specified token will not actually be revoked. */
|
|
53
|
+
test?: boolean;
|
|
54
|
+
}
|
|
55
|
+
export declare const RevokeAuthRequest: S.Schema<RevokeAuthRequest>;
|
|
56
|
+
export interface RevokeAuthResponse {
|
|
57
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
58
|
+
ok: boolean;
|
|
59
|
+
revoked: boolean;
|
|
60
|
+
}
|
|
61
|
+
export declare const RevokeAuthResponse: S.Schema<RevokeAuthResponse>;
|
|
62
|
+
export interface TestAuthRequest {
|
|
63
|
+
}
|
|
64
|
+
export declare const TestAuthRequest: S.Schema<TestAuthRequest>;
|
|
65
|
+
export interface TestAuthResponse {
|
|
66
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
67
|
+
ok: boolean;
|
|
68
|
+
user_id?: string;
|
|
69
|
+
url?: string;
|
|
70
|
+
team_id?: string;
|
|
71
|
+
user?: string | null;
|
|
72
|
+
team?: string;
|
|
73
|
+
app_id?: string;
|
|
74
|
+
app_name?: string;
|
|
75
|
+
enterprise_id?: string;
|
|
76
|
+
bot_id?: string;
|
|
77
|
+
is_enterprise_install?: boolean;
|
|
78
|
+
expires_in?: number | null;
|
|
79
|
+
}
|
|
80
|
+
export declare const TestAuthResponse: S.Schema<TestAuthResponse>;
|
|
81
|
+
export type ListTeamsError = SlackOpError;
|
|
82
|
+
/** Obtain a full list of workspaces your org-wide app has been approved for. Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `invalid_cursor` — Invalid cursor. - `invalid_limit` — The value passed for `limit` was not valid. - `invalid_auth` — The token doesn't have access to this endpoint. - `internal_error` — There was an internal error. See https://docs.slack.dev/reference/methods/auth.teams.list */
|
|
83
|
+
export declare const listTeams: API.PaginatedOperationMethod<ListTeamsRequest, ListTeamsResponse, ListTeamsError, SlackOpContext, ListTeamsResponseTeamsItem>;
|
|
84
|
+
export type RevokeAuthError = SlackOpError;
|
|
85
|
+
/** Revokes a token. Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `internal_error` — Internal system error - `not_bearer_token` — Incompatible token type provided See https://docs.slack.dev/reference/methods/auth.revoke */
|
|
86
|
+
export declare const revokeAuth: API.OperationMethod<RevokeAuthRequest, RevokeAuthResponse, RevokeAuthError, SlackOpContext>;
|
|
87
|
+
export type TestAuthError = SlackOpError;
|
|
88
|
+
/** Checks authentication & identity. Rate limit tier: 5 Method-specific errors (the `error` slug on the SlackError): - `internal_error` — An internal error has been found. - `invalid_auth` — Method was called with invalid credentials See https://docs.slack.dev/reference/methods/auth.test */
|
|
89
|
+
export declare const testAuth: API.OperationMethod<TestAuthRequest, TestAuthResponse, TestAuthError, SlackOpContext>;
|
|
90
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/services/auth.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAEjD,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AAKxB,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;AAE7C,MAAM,WAAW,gBAAgB;IAC/B,kGAAkG;IAClG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kGAAkG;IAClG,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qIAAqI;IACrI,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AACD,eAAO,MAAM,gBAAgB,EAehB,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAExC,qBAAqB;AACrB,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AACD,eAAO,MAAM,8BAA8B,EAa9B,CAAC,CAAC,MAAM,CAAC,8BAA8B,CAAC,CAAC;AAEtD,MAAM,WAAW,0BAA0B;IACzC,0BAA0B;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,qBAAqB;IACrB,IAAI,CAAC,EAAE,8BAA8B,CAAC;CACv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,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AACD,eAAO,MAAM,gBAAgB,EAiBhB,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAExC,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC;AAC1C,ubAAub;AACvb,eAAO,MAAM,SAAS,EAAE,GAAG,CAAC,wBAAwB,CAClD,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,0BAA0B,CAiBpB,CAAC;AAET,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC;AAC3C,mQAAmQ;AACnQ,eAAO,MAAM,UAAU,EAAE,GAAG,CAAC,eAAe,CAC1C,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,cAAc,CAOb,CAAC;AAEJ,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC;AACzC,oSAAoS;AACpS,eAAO,MAAM,QAAQ,EAAE,GAAG,CAAC,eAAe,CACxC,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,cAAc,CAOb,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
|
|
2
|
+
import * as S from "@distilled.cloud/core/schema";
|
|
3
|
+
import * as API from "@distilled.cloud/core/api";
|
|
4
|
+
import * as T from "../traits.js";
|
|
5
|
+
import { SlackProtocol, } from "../protocol.js";
|
|
6
|
+
import { slackPaginate } from "../pagination.js";
|
|
7
|
+
import { SlackError, SlackRateLimited } from "../errors.js";
|
|
8
|
+
import * as Retry from "../retry.js";
|
|
9
|
+
export const ListTeamsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
10
|
+
limit: S.optional(S.Number),
|
|
11
|
+
cursor: S.optional(S.String),
|
|
12
|
+
include_icon: S.optional(S.Boolean),
|
|
13
|
+
}).pipe(T.Http({
|
|
14
|
+
method: "POST",
|
|
15
|
+
uri: "/auth.teams.list",
|
|
16
|
+
code: 200,
|
|
17
|
+
contentType: "form-urlencoded",
|
|
18
|
+
}))).annotate({
|
|
19
|
+
identifier: "ListTeamsRequest",
|
|
20
|
+
});
|
|
21
|
+
export const ListTeamsResponseTeamsItemIcon = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
22
|
+
image_34: S.optional(S.String),
|
|
23
|
+
image_44: S.optional(S.String),
|
|
24
|
+
image_68: S.optional(S.String),
|
|
25
|
+
image_88: S.optional(S.String),
|
|
26
|
+
image_102: S.optional(S.String),
|
|
27
|
+
image_132: S.optional(S.String),
|
|
28
|
+
image_230: S.optional(S.String),
|
|
29
|
+
image_default: S.optional(S.Boolean),
|
|
30
|
+
})).annotate({
|
|
31
|
+
identifier: "ListTeamsResponseTeamsItemIcon",
|
|
32
|
+
});
|
|
33
|
+
export const ListTeamsResponseTeamsItem = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
34
|
+
id: S.optional(S.String),
|
|
35
|
+
name: S.String,
|
|
36
|
+
icon: S.optional(ListTeamsResponseTeamsItemIcon),
|
|
37
|
+
})).annotate({
|
|
38
|
+
identifier: "ListTeamsResponseTeamsItem",
|
|
39
|
+
});
|
|
40
|
+
export const ListTeamsResponseTeamsList = /*@__PURE__*/ S.Array(ListTeamsResponseTeamsItem);
|
|
41
|
+
export const ListTeamsResponseResponseMetadata = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
42
|
+
next_cursor: S.optional(S.String),
|
|
43
|
+
})).annotate({
|
|
44
|
+
identifier: "ListTeamsResponseResponseMetadata",
|
|
45
|
+
});
|
|
46
|
+
export const ListTeamsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
47
|
+
ok: S.Boolean,
|
|
48
|
+
teams: ListTeamsResponseTeamsList,
|
|
49
|
+
response_metadata: S.optional(ListTeamsResponseResponseMetadata),
|
|
50
|
+
})).annotate({
|
|
51
|
+
identifier: "ListTeamsResponse",
|
|
52
|
+
});
|
|
53
|
+
export const RevokeAuthRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
54
|
+
test: S.optional(S.Boolean.pipe(T.Query())),
|
|
55
|
+
}).pipe(T.Http({ method: "GET", uri: "/auth.revoke", code: 200 }))).annotate({
|
|
56
|
+
identifier: "RevokeAuthRequest",
|
|
57
|
+
});
|
|
58
|
+
export const RevokeAuthResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
59
|
+
ok: S.Boolean,
|
|
60
|
+
revoked: S.Boolean,
|
|
61
|
+
})).annotate({
|
|
62
|
+
identifier: "RevokeAuthResponse",
|
|
63
|
+
});
|
|
64
|
+
export const TestAuthRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "POST", uri: "/auth.test", code: 200 }))).annotate({
|
|
65
|
+
identifier: "TestAuthRequest",
|
|
66
|
+
});
|
|
67
|
+
export const TestAuthResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
68
|
+
ok: S.Boolean,
|
|
69
|
+
user_id: S.optional(S.String),
|
|
70
|
+
url: S.optional(S.String),
|
|
71
|
+
team_id: S.optional(S.String),
|
|
72
|
+
user: S.optional(S.NullOr(S.String)),
|
|
73
|
+
team: S.optional(S.String),
|
|
74
|
+
app_id: S.optional(S.String),
|
|
75
|
+
app_name: S.optional(S.String),
|
|
76
|
+
enterprise_id: S.optional(S.String),
|
|
77
|
+
bot_id: S.optional(S.String),
|
|
78
|
+
is_enterprise_install: S.optional(S.Boolean),
|
|
79
|
+
expires_in: S.optional(S.NullOr(S.Number)),
|
|
80
|
+
})).annotate({
|
|
81
|
+
identifier: "TestAuthResponse",
|
|
82
|
+
});
|
|
83
|
+
/** Obtain a full list of workspaces your org-wide app has been approved for. Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `invalid_cursor` — Invalid cursor. - `invalid_limit` — The value passed for `limit` was not valid. - `invalid_auth` — The token doesn't have access to this endpoint. - `internal_error` — There was an internal error. See https://docs.slack.dev/reference/methods/auth.teams.list */
|
|
84
|
+
export const listTeams = /*@__PURE__*/ API.makePaginated(() => ({
|
|
85
|
+
input: ListTeamsRequest,
|
|
86
|
+
output: ListTeamsResponse,
|
|
87
|
+
errors: [SlackError, SlackRateLimited],
|
|
88
|
+
protocol: SlackProtocol,
|
|
89
|
+
retry: Retry.Retry,
|
|
90
|
+
pagination: {
|
|
91
|
+
mode: "cursor",
|
|
92
|
+
inputToken: "cursor",
|
|
93
|
+
outputToken: "response_metadata.next_cursor",
|
|
94
|
+
items: "teams",
|
|
95
|
+
pageSize: "limit",
|
|
96
|
+
},
|
|
97
|
+
}), slackPaginate);
|
|
98
|
+
/** Revokes a token. Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `internal_error` — Internal system error - `not_bearer_token` — Incompatible token type provided See https://docs.slack.dev/reference/methods/auth.revoke */
|
|
99
|
+
export const revokeAuth = /*@__PURE__*/ API.make(() => ({
|
|
100
|
+
input: RevokeAuthRequest,
|
|
101
|
+
output: RevokeAuthResponse,
|
|
102
|
+
errors: [SlackError, SlackRateLimited],
|
|
103
|
+
protocol: SlackProtocol,
|
|
104
|
+
retry: Retry.Retry,
|
|
105
|
+
}));
|
|
106
|
+
/** Checks authentication & identity. Rate limit tier: 5 Method-specific errors (the `error` slug on the SlackError): - `internal_error` — An internal error has been found. - `invalid_auth` — Method was called with invalid credentials See https://docs.slack.dev/reference/methods/auth.test */
|
|
107
|
+
export const testAuth = /*@__PURE__*/ API.make(() => ({
|
|
108
|
+
input: TestAuthRequest,
|
|
109
|
+
output: TestAuthResponse,
|
|
110
|
+
errors: [SlackError, SlackRateLimited],
|
|
111
|
+
protocol: SlackProtocol,
|
|
112
|
+
retry: Retry.Retry,
|
|
113
|
+
}));
|
|
114
|
+
//# sourceMappingURL=auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/services/auth.ts"],"names":[],"mappings":"AAAA,wGAAwG;AACxG,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EACL,aAAa,GAGd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,KAAK,KAAK,MAAM,aAAa,CAAC;AAYrC,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAC3D,CAAC,CAAC,MAAM,CAAC;IACP,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;IAC3B,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;IAC5B,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC;CACpC,CAAC,CAAC,IAAI,CACL,CAAC,CAAC,IAAI,CAAC;IACL,MAAM,EAAE,MAAM;IACd,GAAG,EAAE,kBAAkB;IACvB,IAAI,EAAE,GAAG;IACT,WAAW,EAAE,iBAAiB;CAC/B,CAAC,CACH,CACF,CAAC,QAAQ,CAAC;IACT,UAAU,EAAE,kBAAkB;CAC/B,CAAsC,CAAC;AAaxC,MAAM,CAAC,MAAM,8BAA8B,GAAG,aAAa,CAAC,CAAC,CAAC,OA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* as S from "@distilled.cloud/core/schema";
|
|
2
|
+
import * as API from "@distilled.cloud/core/api";
|
|
3
|
+
import { type SlackOpError, type SlackOpContext } from "../protocol.ts";
|
|
4
|
+
export type { SlackOpError, SlackOpContext };
|
|
5
|
+
export type ValidateBlockRequestBlocksCase1ItemMap = {
|
|
6
|
+
[key: string]: unknown | undefined;
|
|
7
|
+
};
|
|
8
|
+
export declare const ValidateBlockRequestBlocksCase1ItemMap: S.Schema<ValidateBlockRequestBlocksCase1ItemMap>;
|
|
9
|
+
export type ValidateBlockRequestBlocksCase1List = Array<ValidateBlockRequestBlocksCase1ItemMap>;
|
|
10
|
+
export declare const ValidateBlockRequestBlocksCase1List: S.Schema<ValidateBlockRequestBlocksCase1List>;
|
|
11
|
+
/** A JSON-encoded array of [structured blocks](/reference/block-kit/blocks). Provide exactly one of `blocks`, `view`, or `message`. */
|
|
12
|
+
export type ValidateBlockRequestBlocks = string | ValidateBlockRequestBlocksCase1List;
|
|
13
|
+
export declare const ValidateBlockRequestBlocks: any;
|
|
14
|
+
export interface ValidateBlockRequest {
|
|
15
|
+
/** A JSON-encoded array of [structured blocks](/reference/block-kit/blocks). Provide exactly one of `blocks`, `view`, or `message`. */
|
|
16
|
+
blocks?: ValidateBlockRequestBlocks;
|
|
17
|
+
/** A JSON-encoded [message payload](/messaging/creating-interactive-messages) to validate. Provide exactly one of `blocks`, `view`, or `message`. */
|
|
18
|
+
message?: string;
|
|
19
|
+
/** A JSON-encoded [view payload](/reference/views) to validate. Provide exactly one of `blocks`, `view`, or `message`. */
|
|
20
|
+
view?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const ValidateBlockRequest: S.Schema<ValidateBlockRequest>;
|
|
23
|
+
export interface ValidateBlockResponse {
|
|
24
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
25
|
+
ok: boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare const ValidateBlockResponse: S.Schema<ValidateBlockResponse>;
|
|
28
|
+
export type ValidateBlockError = SlackOpError;
|
|
29
|
+
/** Validates blocks, messages, and views Block Kit JSON payloads. Method-specific errors (the `error` slug on the SlackError): - `invalid_arguments` — The request arguments are invalid. Ensure you provide exactly one of `blocks`, `view`, or `message`, and that the value is valid JSON. Consult `response_metadata.messages` for details. - `invalid_blocks` — The blocks array failed validation. The `errors` field contains a list of issues, each with a JSON pointer path to the invalid element, the constraint that failed, and the expected value. - `invalid_view` — The view payload failed validation. The `errors` field contains a list of issues, each with a JSON pointer path to the invalid element, the constraint that failed, and the expected value. - `invalid_message` — The message payload failed validation. The `errors` field contains a list of issues, each with a JSON pointer path to the invalid element, the constraint that failed, and the expected value. - `ratelimited` — Too many requests. Reduce your request rate and retry after a brief wait. See https://docs.slack.dev/reference/methods/blocks.validate */
|
|
30
|
+
export declare const validateBlock: API.OperationMethod<ValidateBlockRequest, ValidateBlockResponse, ValidateBlockError, SlackOpContext>;
|
|
31
|
+
//# sourceMappingURL=blocks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../src/services/blocks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAEjD,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AAIxB,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;AAE7C,MAAM,MAAM,sCAAsC,GAAG;IACnD,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CACpC,CAAC;AACF,eAAO,MAAM,sCAAsC,EAGvC,CAAC,CAAC,MAAM,CAAC,sCAAsC,CAAC,CAAC;AAE7D,MAAM,MAAM,mCAAmC,GAC7C,KAAK,CAAC,sCAAsC,CAAC,CAAC;AAChD,eAAO,MAAM,mCAAmC,EAEpC,CAAC,CAAC,MAAM,CAAC,mCAAmC,CAAC,CAAC;AAE1D,uIAAuI;AACvI,MAAM,MAAM,0BAA0B,GAClC,MAAM,GACN,mCAAmC,CAAC;AACxC,eAAO,MAAM,0BAA0B,KAEtC,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACnC,uIAAuI;IACvI,MAAM,CAAC,EAAE,0BAA0B,CAAC;IACpC,qJAAqJ;IACrJ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0HAA0H;IAC1H,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AACD,eAAO,MAAM,oBAAoB,EAQpB,CAAC,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;AAE5C,MAAM,WAAW,qBAAqB;IACpC,kEAAkE;IAClE,EAAE,EAAE,OAAO,CAAC;CACb;AACD,eAAO,MAAM,qBAAqB,EAMrB,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;AAE7C,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC;AAC9C,imCAAimC;AACjmC,eAAO,MAAM,aAAa,EAAE,GAAG,CAAC,eAAe,CAC7C,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,CAOb,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
|
|
2
|
+
import * as S from "@distilled.cloud/core/schema";
|
|
3
|
+
import * as API from "@distilled.cloud/core/api";
|
|
4
|
+
import * as T from "../traits.js";
|
|
5
|
+
import { SlackProtocol, } from "../protocol.js";
|
|
6
|
+
import { SlackError, SlackRateLimited } from "../errors.js";
|
|
7
|
+
import * as Retry from "../retry.js";
|
|
8
|
+
export const ValidateBlockRequestBlocksCase1ItemMap = /*@__PURE__*/ S.Record(S.String, S.Unknown);
|
|
9
|
+
export const ValidateBlockRequestBlocksCase1List = /*@__PURE__*/ S.Array(ValidateBlockRequestBlocksCase1ItemMap);
|
|
10
|
+
export const ValidateBlockRequestBlocks = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], []]));
|
|
11
|
+
export const ValidateBlockRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
12
|
+
blocks: S.optional(ValidateBlockRequestBlocks),
|
|
13
|
+
message: S.optional(S.String),
|
|
14
|
+
view: S.optional(S.String),
|
|
15
|
+
}).pipe(T.Http({ method: "POST", uri: "/blocks.validate", code: 200 }))).annotate({
|
|
16
|
+
identifier: "ValidateBlockRequest",
|
|
17
|
+
});
|
|
18
|
+
export const ValidateBlockResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
19
|
+
ok: S.Boolean,
|
|
20
|
+
})).annotate({
|
|
21
|
+
identifier: "ValidateBlockResponse",
|
|
22
|
+
});
|
|
23
|
+
/** Validates blocks, messages, and views Block Kit JSON payloads. Method-specific errors (the `error` slug on the SlackError): - `invalid_arguments` — The request arguments are invalid. Ensure you provide exactly one of `blocks`, `view`, or `message`, and that the value is valid JSON. Consult `response_metadata.messages` for details. - `invalid_blocks` — The blocks array failed validation. The `errors` field contains a list of issues, each with a JSON pointer path to the invalid element, the constraint that failed, and the expected value. - `invalid_view` — The view payload failed validation. The `errors` field contains a list of issues, each with a JSON pointer path to the invalid element, the constraint that failed, and the expected value. - `invalid_message` — The message payload failed validation. The `errors` field contains a list of issues, each with a JSON pointer path to the invalid element, the constraint that failed, and the expected value. - `ratelimited` — Too many requests. Reduce your request rate and retry after a brief wait. See https://docs.slack.dev/reference/methods/blocks.validate */
|
|
24
|
+
export const validateBlock = /*@__PURE__*/ API.make(() => ({
|
|
25
|
+
input: ValidateBlockRequest,
|
|
26
|
+
output: ValidateBlockResponse,
|
|
27
|
+
errors: [SlackError, SlackRateLimited],
|
|
28
|
+
protocol: SlackProtocol,
|
|
29
|
+
retry: Retry.Retry,
|
|
30
|
+
}));
|
|
31
|
+
//# sourceMappingURL=blocks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blocks.js","sourceRoot":"","sources":["../../src/services/bl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CAAC;AAM5C,MAAM,CAAC,MAAM,qBAAqB,GAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAChE,CAAC,CAAC,MAAM,CAAC;IACP,EAAE,EAAE,CAAC,CAAC,OAAO;CACd,CAAC,CACH,CAAC,QAAQ,CAAC;IACT,UAAU,EAAE,uBAAuB;CACpC,CAA2C,CAAC;AAG7C,imCAAimC;AACjmC,MAAM,CAAC,MAAM,aAAa,GAKtB,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAChC,KAAK,EAAE,oBAAoB;IAC3B,MAAM,EAAE,qBAAqB;IAC7B,MAAM,EAAE,CAAC,UAAU,EAAE,gBAAgB,CAAC;IACtC,QAAQ,EAAE,aAAa;IACvB,KAAK,EAAE,KAAK,CAAC,KAAK;CACnB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import * as S from "@distilled.cloud/core/schema";
|
|
2
|
+
import * as API from "@distilled.cloud/core/api";
|
|
3
|
+
import { type SlackOpError, type SlackOpContext } from "../protocol.ts";
|
|
4
|
+
export type { SlackOpError, SlackOpContext };
|
|
5
|
+
/** The level that we are setting the file's permission to (read or write) */
|
|
6
|
+
export type AddBookmarkRequestAccessLevel = "read" | "write";
|
|
7
|
+
export declare const AddBookmarkRequestAccessLevel: any;
|
|
8
|
+
export interface AddBookmarkRequest {
|
|
9
|
+
/** Channel to add bookmark in. Required for public channels. */
|
|
10
|
+
channel_id?: string;
|
|
11
|
+
/** Title for the bookmark. */
|
|
12
|
+
title: string;
|
|
13
|
+
/** Link to bookmark. */
|
|
14
|
+
link?: string;
|
|
15
|
+
/** Type of the bookmark i.e link. */
|
|
16
|
+
type: string;
|
|
17
|
+
/** Emoji tag to apply to the link. */
|
|
18
|
+
emoji?: string;
|
|
19
|
+
/** ID of the entity being bookmarked. Only applies to message and file types. */
|
|
20
|
+
entity_id?: string;
|
|
21
|
+
/** The level that we are setting the file's permission to (read or write) */
|
|
22
|
+
access_level?: AddBookmarkRequestAccessLevel | (string & {});
|
|
23
|
+
/** Id of this bookmark's parent */
|
|
24
|
+
parent_id?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare const AddBookmarkRequest: S.Schema<AddBookmarkRequest>;
|
|
27
|
+
export interface AddBookmarkResponse {
|
|
28
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
29
|
+
ok: boolean;
|
|
30
|
+
bookmark: unknown;
|
|
31
|
+
}
|
|
32
|
+
export declare const AddBookmarkResponse: S.Schema<AddBookmarkResponse>;
|
|
33
|
+
export interface EditBookmarkRequest {
|
|
34
|
+
/** Channel to update bookmark in. Required for public channels. */
|
|
35
|
+
channel_id?: string;
|
|
36
|
+
/** Bookmark to update. Required for public channels. */
|
|
37
|
+
bookmark_id?: string;
|
|
38
|
+
/** Title for the bookmark. */
|
|
39
|
+
title?: string;
|
|
40
|
+
/** Link to bookmark. */
|
|
41
|
+
link?: string;
|
|
42
|
+
/** Emoji tag to apply to the link. */
|
|
43
|
+
emoji?: string;
|
|
44
|
+
}
|
|
45
|
+
export declare const EditBookmarkRequest: S.Schema<EditBookmarkRequest>;
|
|
46
|
+
export interface EditBookmarkResponse {
|
|
47
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
48
|
+
ok: boolean;
|
|
49
|
+
bookmark: unknown;
|
|
50
|
+
}
|
|
51
|
+
export declare const EditBookmarkResponse: S.Schema<EditBookmarkResponse>;
|
|
52
|
+
export interface ListBookmarksRequest {
|
|
53
|
+
/** Channel to list bookmarks in. Required for public channels. */
|
|
54
|
+
channel_id?: string;
|
|
55
|
+
}
|
|
56
|
+
export declare const ListBookmarksRequest: S.Schema<ListBookmarksRequest>;
|
|
57
|
+
export type ListBookmarksResponseBookmarksList = Array<unknown>;
|
|
58
|
+
export declare const ListBookmarksResponseBookmarksList: S.Schema<ListBookmarksResponseBookmarksList>;
|
|
59
|
+
export interface ListBookmarksResponse {
|
|
60
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
61
|
+
ok: boolean;
|
|
62
|
+
bookmarks: ListBookmarksResponseBookmarksList;
|
|
63
|
+
}
|
|
64
|
+
export declare const ListBookmarksResponse: S.Schema<ListBookmarksResponse>;
|
|
65
|
+
export interface RemoveBookmarkRequest {
|
|
66
|
+
/** Channel to remove bookmark. Required for public channels. */
|
|
67
|
+
channel_id?: string;
|
|
68
|
+
/** Bookmark to remove. Required for public channels. */
|
|
69
|
+
bookmark_id?: string;
|
|
70
|
+
/** Quip section ID to unbookmark */
|
|
71
|
+
quip_section_id?: string;
|
|
72
|
+
}
|
|
73
|
+
export declare const RemoveBookmarkRequest: S.Schema<RemoveBookmarkRequest>;
|
|
74
|
+
export interface RemoveBookmarkResponse {
|
|
75
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
76
|
+
ok: boolean;
|
|
77
|
+
}
|
|
78
|
+
export declare const RemoveBookmarkResponse: S.Schema<RemoveBookmarkResponse>;
|
|
79
|
+
export type AddBookmarkError = SlackOpError;
|
|
80
|
+
/** Add bookmark to a channel. Required scopes — bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` — Actor lacks access to the requested resource. - `cannot_bookmark_from_external_org` — File is an external file and cannot be bookmarked. - `cannot_bookmark_restricted_sharing_enabled` — File has restricted sharing enabled and cannot be bookmarked. - `channel_not_found` — Channel cannot be found. - `file_already_added` — The file has already been added to the folder. - `file_not_found` — File cannot be found. - `invalid_bookmark_type` — Bookmark type is not valid. - `invalid_app_action_type` — App action type is not valid. - `invalid_shortcut_type` — Shortcut type is not valid. - `invalid_child_type` — Child type is not valid. - `invalid_emoji` — Invalid emoji, does not follow the pattern of a valid emoji name. - `invalid_entity_id` — Invalid entity_id, file or message type bookmark should have original file or message ID. - `invalid_link` — Invalid link, link should begin with either http:// or https://. - `invalid_parent_type` — Parent type is not valid. - `not_implemented` — bookmarking not available for the user. - `parent_bookmark_disabled` — Parent bookmark feature flag is off. - `parent_with_link` — Parent bookmark should not have link. - `permission_denied` — No permission to perform this operation. - `slack_connect_file_upload_sharing_blocked` — Admin has disabled File uploads in all Slack Connect communications - `slack_connect_clip_sharing_blocked` — Admin has disabled Clip sharing in Slack Connect channels - `slack_connect_blocked_file_type` — Files with certain extensions are blocked from being uploaded in all Slack Connect communications - `too_many_bookmarks` — Bookmark limit reached for channel. - `too_many_tabs` — tab limit reached for channel. - `too_many_requests` — Too many concurrent requests. Please retry. See https://docs.slack.dev/reference/methods/bookmarks.add */
|
|
81
|
+
export declare const addBookmark: API.OperationMethod<AddBookmarkRequest, AddBookmarkResponse, AddBookmarkError, SlackOpContext>;
|
|
82
|
+
export type EditBookmarkError = SlackOpError;
|
|
83
|
+
/** Edit bookmark. Required scopes — bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` — Actor lacks access to the requested resource. - `channel_not_found` — Channel cannot be found. - `invalid_bookmark_type` — Bookmark type is not valid. - `invalid_emoji` — Invalid emoji, does not follow the pattern of a valid emoji name. - `invalid_link` — Invalid link, link should begin with either http:// or https://. - `not_found` — Bookmark cannot be found. - `not_implemented` — bookmarking not available for the user. - `parent_with_link` — Parent bookmark should not have link. - `permission_denied` — No permission to perform this operation. - `slack_connect_file_upload_sharing_blocked` — Admin has disabled File uploads in all Slack Connect communications - `slack_connect_clip_sharing_blocked` — Admin has disabled Clip sharing in Slack Connect channels - `slack_connect_blocked_file_type` — Files with certain extensions are blocked from being uploaded in all Slack Connect communications See https://docs.slack.dev/reference/methods/bookmarks.edit */
|
|
84
|
+
export declare const editBookmark: API.OperationMethod<EditBookmarkRequest, EditBookmarkResponse, EditBookmarkError, SlackOpContext>;
|
|
85
|
+
export type ListBookmarksError = SlackOpError;
|
|
86
|
+
/** List bookmark for the channel. Required scopes — bot: `bookmarks:read`; user: `bookmarks:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `access_denied` — Actor lacks access to the requested resource. - `channel_not_found` — Channel cannot be found. - `not_implemented` — bookmarking not available for the user. See https://docs.slack.dev/reference/methods/bookmarks.list */
|
|
87
|
+
export declare const listBookmarks: API.OperationMethod<ListBookmarksRequest, ListBookmarksResponse, ListBookmarksError, SlackOpContext>;
|
|
88
|
+
export type RemoveBookmarkError = SlackOpError;
|
|
89
|
+
/** Remove bookmark from the channel. Required scopes — bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` — Actor lacks access to the requested resource. - `channel_not_found` — Channel cannot be found. - `user_not_found` — User cannot be found. - `invalid_bookmark_type` — Bookmark type is not valid. - `not_found` — Bookmark cannot be found. - `not_implemented` — bookmarking not available for the user. - `permission_denied` — No permission to perform this operation. See https://docs.slack.dev/reference/methods/bookmarks.remove */
|
|
90
|
+
export declare const removeBookmark: API.OperationMethod<RemoveBookmarkRequest, RemoveBookmarkResponse, RemoveBookmarkError, SlackOpContext>;
|
|
91
|
+
//# sourceMappingURL=bookmarks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bookmarks.d.ts","sourceRoot":"","sources":["../../src/services/bookmarks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAEjD,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AAIxB,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;AAE7C,6EAA6E;AAC7E,MAAM,MAAM,6BAA6B,GAAG,MAAM,GAAG,OAAO,CAAC;AAC7D,eAAO,MAAM,6BAA6B,KAAW,CAAC;AAEtD,MAAM,WAAW,kBAAkB;IACjC,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,wBAAwB;IACxB,IA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AACla,eAAO,MAAM,aAAa,EAAE,GAAG,CAAC,eAAe,CAC7C,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,CAOb,CAAC;AAEJ,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC;AAC/C,unBAAunB;AACvnB,eAAO,MAAM,cAAc,EAAE,GAAG,CAAC,eAAe,CAC9C,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,cAAc,CAOb,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
|
|
2
|
+
import * as S from "@distilled.cloud/core/schema";
|
|
3
|
+
import * as API from "@distilled.cloud/core/api";
|
|
4
|
+
import * as T from "../traits.js";
|
|
5
|
+
import { SlackProtocol, } from "../protocol.js";
|
|
6
|
+
import { SlackError, SlackRateLimited } from "../errors.js";
|
|
7
|
+
import * as Retry from "../retry.js";
|
|
8
|
+
export const AddBookmarkRequestAccessLevel = S.String;
|
|
9
|
+
export const AddBookmarkRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
10
|
+
channel_id: S.optional(S.String),
|
|
11
|
+
title: S.String,
|
|
12
|
+
link: S.optional(S.String),
|
|
13
|
+
type: S.String,
|
|
14
|
+
emoji: S.optional(S.String),
|
|
15
|
+
entity_id: S.optional(S.String),
|
|
16
|
+
access_level: S.optional(AddBookmarkRequestAccessLevel),
|
|
17
|
+
parent_id: S.optional(S.String),
|
|
18
|
+
}).pipe(T.Http({ method: "POST", uri: "/bookmarks.add", code: 200 }))).annotate({
|
|
19
|
+
identifier: "AddBookmarkRequest",
|
|
20
|
+
});
|
|
21
|
+
export const AddBookmarkResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
22
|
+
ok: S.Boolean,
|
|
23
|
+
bookmark: S.Unknown,
|
|
24
|
+
})).annotate({
|
|
25
|
+
identifier: "AddBookmarkResponse",
|
|
26
|
+
});
|
|
27
|
+
export const EditBookmarkRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
28
|
+
channel_id: S.optional(S.String),
|
|
29
|
+
bookmark_id: S.optional(S.String),
|
|
30
|
+
title: S.optional(S.String),
|
|
31
|
+
link: S.optional(S.String),
|
|
32
|
+
emoji: S.optional(S.String),
|
|
33
|
+
}).pipe(T.Http({ method: "POST", uri: "/bookmarks.edit", code: 200 }))).annotate({
|
|
34
|
+
identifier: "EditBookmarkRequest",
|
|
35
|
+
});
|
|
36
|
+
export const EditBookmarkResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
37
|
+
ok: S.Boolean,
|
|
38
|
+
bookmark: S.Unknown,
|
|
39
|
+
})).annotate({
|
|
40
|
+
identifier: "EditBookmarkResponse",
|
|
41
|
+
});
|
|
42
|
+
export const ListBookmarksRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
43
|
+
channel_id: S.optional(S.String),
|
|
44
|
+
}).pipe(T.Http({ method: "POST", uri: "/bookmarks.list", code: 200 }))).annotate({
|
|
45
|
+
identifier: "ListBookmarksRequest",
|
|
46
|
+
});
|
|
47
|
+
export const ListBookmarksResponseBookmarksList = /*@__PURE__*/ S.Array(S.Unknown);
|
|
48
|
+
export const ListBookmarksResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
49
|
+
ok: S.Boolean,
|
|
50
|
+
bookmarks: ListBookmarksResponseBookmarksList,
|
|
51
|
+
})).annotate({
|
|
52
|
+
identifier: "ListBookmarksResponse",
|
|
53
|
+
});
|
|
54
|
+
export const RemoveBookmarkRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
55
|
+
channel_id: S.optional(S.String),
|
|
56
|
+
bookmark_id: S.optional(S.String),
|
|
57
|
+
quip_section_id: S.optional(S.String),
|
|
58
|
+
}).pipe(T.Http({ method: "POST", uri: "/bookmarks.remove", code: 200 }))).annotate({
|
|
59
|
+
identifier: "RemoveBookmarkRequest",
|
|
60
|
+
});
|
|
61
|
+
export const RemoveBookmarkResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
62
|
+
ok: S.Boolean,
|
|
63
|
+
})).annotate({
|
|
64
|
+
identifier: "RemoveBookmarkResponse",
|
|
65
|
+
});
|
|
66
|
+
/** Add bookmark to a channel. Required scopes — bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` — Actor lacks access to the requested resource. - `cannot_bookmark_from_external_org` — File is an external file and cannot be bookmarked. - `cannot_bookmark_restricted_sharing_enabled` — File has restricted sharing enabled and cannot be bookmarked. - `channel_not_found` — Channel cannot be found. - `file_already_added` — The file has already been added to the folder. - `file_not_found` — File cannot be found. - `invalid_bookmark_type` — Bookmark type is not valid. - `invalid_app_action_type` — App action type is not valid. - `invalid_shortcut_type` — Shortcut type is not valid. - `invalid_child_type` — Child type is not valid. - `invalid_emoji` — Invalid emoji, does not follow the pattern of a valid emoji name. - `invalid_entity_id` — Invalid entity_id, file or message type bookmark should have original file or message ID. - `invalid_link` — Invalid link, link should begin with either http:// or https://. - `invalid_parent_type` — Parent type is not valid. - `not_implemented` — bookmarking not available for the user. - `parent_bookmark_disabled` — Parent bookmark feature flag is off. - `parent_with_link` — Parent bookmark should not have link. - `permission_denied` — No permission to perform this operation. - `slack_connect_file_upload_sharing_blocked` — Admin has disabled File uploads in all Slack Connect communications - `slack_connect_clip_sharing_blocked` — Admin has disabled Clip sharing in Slack Connect channels - `slack_connect_blocked_file_type` — Files with certain extensions are blocked from being uploaded in all Slack Connect communications - `too_many_bookmarks` — Bookmark limit reached for channel. - `too_many_tabs` — tab limit reached for channel. - `too_many_requests` — Too many concurrent requests. Please retry. See https://docs.slack.dev/reference/methods/bookmarks.add */
|
|
67
|
+
export const addBookmark = /*@__PURE__*/ API.make(() => ({
|
|
68
|
+
input: AddBookmarkRequest,
|
|
69
|
+
output: AddBookmarkResponse,
|
|
70
|
+
errors: [SlackError, SlackRateLimited],
|
|
71
|
+
protocol: SlackProtocol,
|
|
72
|
+
retry: Retry.Retry,
|
|
73
|
+
}));
|
|
74
|
+
/** Edit bookmark. Required scopes — bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` — Actor lacks access to the requested resource. - `channel_not_found` — Channel cannot be found. - `invalid_bookmark_type` — Bookmark type is not valid. - `invalid_emoji` — Invalid emoji, does not follow the pattern of a valid emoji name. - `invalid_link` — Invalid link, link should begin with either http:// or https://. - `not_found` — Bookmark cannot be found. - `not_implemented` — bookmarking not available for the user. - `parent_with_link` — Parent bookmark should not have link. - `permission_denied` — No permission to perform this operation. - `slack_connect_file_upload_sharing_blocked` — Admin has disabled File uploads in all Slack Connect communications - `slack_connect_clip_sharing_blocked` — Admin has disabled Clip sharing in Slack Connect channels - `slack_connect_blocked_file_type` — Files with certain extensions are blocked from being uploaded in all Slack Connect communications See https://docs.slack.dev/reference/methods/bookmarks.edit */
|
|
75
|
+
export const editBookmark = /*@__PURE__*/ API.make(() => ({
|
|
76
|
+
input: EditBookmarkRequest,
|
|
77
|
+
output: EditBookmarkResponse,
|
|
78
|
+
errors: [SlackError, SlackRateLimited],
|
|
79
|
+
protocol: SlackProtocol,
|
|
80
|
+
retry: Retry.Retry,
|
|
81
|
+
}));
|
|
82
|
+
/** List bookmark for the channel. Required scopes — bot: `bookmarks:read`; user: `bookmarks:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `access_denied` — Actor lacks access to the requested resource. - `channel_not_found` — Channel cannot be found. - `not_implemented` — bookmarking not available for the user. See https://docs.slack.dev/reference/methods/bookmarks.list */
|
|
83
|
+
export const listBookmarks = /*@__PURE__*/ API.make(() => ({
|
|
84
|
+
input: ListBookmarksRequest,
|
|
85
|
+
output: ListBookmarksResponse,
|
|
86
|
+
errors: [SlackError, SlackRateLimited],
|
|
87
|
+
protocol: SlackProtocol,
|
|
88
|
+
retry: Retry.Retry,
|
|
89
|
+
}));
|
|
90
|
+
/** Remove bookmark from the channel. Required scopes — bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` — Actor lacks access to the requested resource. - `channel_not_found` — Channel cannot be found. - `user_not_found` — User cannot be found. - `invalid_bookmark_type` — Bookmark type is not valid. - `not_found` — Bookmark cannot be found. - `not_implemented` — bookmarking not available for the user. - `permission_denied` — No permission to perform this operation. See https://docs.slack.dev/reference/methods/bookmarks.remove */
|
|
91
|
+
export const removeBookmark = /*@__PURE__*/ API.make(() => ({
|
|
92
|
+
input: RemoveBookmarkRequest,
|
|
93
|
+
output: RemoveBookmarkResponse,
|
|
94
|
+
errors: [SlackError, SlackRateLimited],
|
|
95
|
+
protocol: SlackProtocol,
|
|
96
|
+
retry: Retry.Retry,
|
|
97
|
+
}));
|
|
98
|
+
//# sourceMappingURL=bookmarks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bookmarks.js","sourceRoot":"","sources":["../../src/services/bookmarks.ts"],"names":[],"mappings":"AAAA,wGAAwG;AACxG,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EACL,aAAa,GAGd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,KAAK,KAAK,MAAM,aAAa,CAAC;AAMrC,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;AAoBtD,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAC7D,CAAC,CAAC,MAAM,CAAC;IACP,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;IAChC,KAAK,EAAE,CAAC,CAAC,MAA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AKrB,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAChC,KAAK,EAAE,mBAAmB;IAC1B,MAAM,EAAE,oBAAoB;IAC5B,MAAM,EAAE,CAAC,UAAU,EAAE,gBAAgB,CAAC;IACtC,QAAQ,EAAE,aAAa;IACvB,KAAK,EAAE,KAAK,CAAC,KAAK;CACnB,CAAC,CAAC,CAAC;AAGJ,kaAAka;AACla,MAAM,CAAC,MAAM,aAAa,GAKtB,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAChC,KAAK,EAAE,oBAAoB;IAC3B,MAAM,EAAE,qBAAqB;IAC7B,MAAM,EAAE,CAAC,UAAU,EAAE,gBAAgB,CAAC;IACtC,QAAQ,EAAE,aAAa;IACvB,KAAK,EAAE,KAAK,CAAC,KAAK;CACnB,CAAC,CAAC,CAAC;AAGJ,unBAAunB;AACvnB,MAAM,CAAC,MAAM,cAAc,GAKvB,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAChC,KAAK,EAAE,qBAAqB;IAC5B,MAAM,EAAE,sBAAsB;IAC9B,MAAM,EAAE,CAAC,UAAU,EAAE,gBAAgB,CAAC;IACtC,QAAQ,EAAE,aAAa;IACvB,KAAK,EAAE,KAAK,CAAC,KAAK;CACnB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as S from "@distilled.cloud/core/schema";
|
|
2
|
+
import * as API from "@distilled.cloud/core/api";
|
|
3
|
+
import { type SlackOpError, type SlackOpContext } from "../protocol.ts";
|
|
4
|
+
export type { SlackOpError, SlackOpContext };
|
|
5
|
+
export interface BotsInfoRequest {
|
|
6
|
+
/** Bot user to get info on */
|
|
7
|
+
bot?: string;
|
|
8
|
+
/** encoded team id or enterprise id where the bot exists, required if org token is used */
|
|
9
|
+
team_id?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const BotsInfoRequest: S.Schema<BotsInfoRequest>;
|
|
12
|
+
export interface BotsInfoResponseBotsItemIcons {
|
|
13
|
+
emoji?: string;
|
|
14
|
+
image_36?: string;
|
|
15
|
+
image_48?: string;
|
|
16
|
+
image_64?: string;
|
|
17
|
+
image_72?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const BotsInfoResponseBotsItemIcons: S.Schema<BotsInfoResponseBotsItemIcons>;
|
|
20
|
+
export interface BotsInfoResponseBotsItem {
|
|
21
|
+
updated: number;
|
|
22
|
+
name?: string;
|
|
23
|
+
icons?: BotsInfoResponseBotsItemIcons;
|
|
24
|
+
deleted: boolean;
|
|
25
|
+
app_id?: string;
|
|
26
|
+
id: string;
|
|
27
|
+
is_workflow_bot?: boolean;
|
|
28
|
+
is_connector_bot?: boolean;
|
|
29
|
+
is_legacy_workflow_bot?: boolean;
|
|
30
|
+
user_id?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare const BotsInfoResponseBotsItem: S.Schema<BotsInfoResponseBotsItem>;
|
|
33
|
+
export type BotsInfoResponseBotsList = Array<BotsInfoResponseBotsItem>;
|
|
34
|
+
export declare const BotsInfoResponseBotsList: S.Schema<BotsInfoResponseBotsList>;
|
|
35
|
+
export type BotsInfoResponseBotIcons = BotsInfoResponseBotsItemIcons;
|
|
36
|
+
export declare const BotsInfoResponseBotIcons: S.Schema<BotsInfoResponseBotsItemIcons>;
|
|
37
|
+
export interface BotsInfoResponseBot {
|
|
38
|
+
updated: number;
|
|
39
|
+
user_id?: string;
|
|
40
|
+
name?: string;
|
|
41
|
+
icons?: BotsInfoResponseBotsItemIcons;
|
|
42
|
+
deleted: boolean;
|
|
43
|
+
app_id?: string;
|
|
44
|
+
id: string;
|
|
45
|
+
is_workflow_bot?: boolean;
|
|
46
|
+
is_connector_bot?: boolean;
|
|
47
|
+
is_legacy_workflow_bot?: boolean;
|
|
48
|
+
}
|
|
49
|
+
export declare const BotsInfoResponseBot: S.Schema<BotsInfoResponseBot>;
|
|
50
|
+
export interface BotsInfoResponse {
|
|
51
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
52
|
+
ok: boolean;
|
|
53
|
+
bots?: BotsInfoResponseBotsList;
|
|
54
|
+
bot?: BotsInfoResponseBot;
|
|
55
|
+
}
|
|
56
|
+
export declare const BotsInfoResponse: S.Schema<BotsInfoResponse>;
|
|
57
|
+
export type BotsInfoError = SlackOpError;
|
|
58
|
+
/** Gets information about a bot user. Required scopes — bot: `users:read`; user: `users:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `bot_not_found` — Value passed for `bot` was invalid. - `bots_not_found` — At least one value passed for `bots` was invalid. - `missing_argument` — A required argument is missing. - `team_not_found` — Value passed for `team_id` was invalid. See https://docs.slack.dev/reference/methods/bots.info */
|
|
59
|
+
export declare const botsInfo: API.OperationMethod<BotsInfoRequest, BotsInfoResponse, BotsInfoError, SlackOpContext>;
|
|
60
|
+
//# sourceMappingURL=bots.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bots.d.ts","sourceRoot":"","sources":["../../src/services/bots.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAEjD,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AAIxB,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;AAE7C,MAAM,WAAW,eAAe;IAC9B,8BAA8B;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,2FAA2F;IAC3F,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AACD,eAAO,MAAM,eAAe,EAOf,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;AAEvC,MAAM,WAAW,6BAA6B;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC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