@distilled.cloud/slack 0.0.0 → 1.0.0-rc.9
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 +3225 -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 +261 -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 +336 -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 +240 -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 +7729 -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 +647 -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 +836 -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 +607 -0
- package/src/traits.ts +45 -0
|
@@ -0,0 +1,55 @@
|
|
|
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.ts";
|
|
5
|
+
import {
|
|
6
|
+
SlackProtocol,
|
|
7
|
+
type SlackOpError,
|
|
8
|
+
type SlackOpContext,
|
|
9
|
+
} from "../protocol.ts";
|
|
10
|
+
import { SlackError, SlackRateLimited } from "../errors.ts";
|
|
11
|
+
import * as Retry from "../retry.ts";
|
|
12
|
+
|
|
13
|
+
export type { SlackOpError, SlackOpContext };
|
|
14
|
+
|
|
15
|
+
export interface DialogOpenRequest {
|
|
16
|
+
/** The dialog definition. This must be a JSON-encoded string. */
|
|
17
|
+
dialog: string;
|
|
18
|
+
/** Exchange a trigger to post to the user. */
|
|
19
|
+
trigger_id: string;
|
|
20
|
+
}
|
|
21
|
+
export const DialogOpenRequest = /*@__PURE__*/ S.suspend(() =>
|
|
22
|
+
S.Struct({
|
|
23
|
+
dialog: S.String,
|
|
24
|
+
trigger_id: S.String,
|
|
25
|
+
}).pipe(T.Http({ method: "POST", uri: "/dialog.open", code: 200 })),
|
|
26
|
+
).annotate({
|
|
27
|
+
identifier: "DialogOpenRequest",
|
|
28
|
+
}) as any as S.Schema<DialogOpenRequest>;
|
|
29
|
+
|
|
30
|
+
export interface DialogOpenResponse {
|
|
31
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
32
|
+
ok: boolean;
|
|
33
|
+
}
|
|
34
|
+
export const DialogOpenResponse = /*@__PURE__*/ S.suspend(() =>
|
|
35
|
+
S.Struct({
|
|
36
|
+
ok: S.Boolean,
|
|
37
|
+
}),
|
|
38
|
+
).annotate({
|
|
39
|
+
identifier: "DialogOpenResponse",
|
|
40
|
+
}) as any as S.Schema<DialogOpenResponse>;
|
|
41
|
+
|
|
42
|
+
export type DialogOpenError = SlackOpError;
|
|
43
|
+
/** Open a dialog with a user Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `app_missing_action_url` — The app associated with the used token doesn't have a Action URL configured in its interactive components settings. - `cannot_create_dialog` — Something exceptional occurred and the dialog could not be created. - `failed_sending_dialog` — Something exceptional occurred and the dialog could not be sent. - `invalid_trigger` — The provided `trigger_id` is invalid or cannot be used by this token. - `missing_dialog` — No `dialog` argument was presented. - `missing_trigger` — No `trigger_id` argument was presented. - `trigger_exchanged` — The provided `trigger_id` has already been exchanged. - `trigger_expired` — The provided `trigger_id` was presented after the 3 second limit. - `validation_errors` — The provided `dialog` could not be validated. See https://docs.slack.dev/reference/methods/dialog.open */
|
|
44
|
+
export const dialogOpen: API.OperationMethod<
|
|
45
|
+
DialogOpenRequest,
|
|
46
|
+
DialogOpenResponse,
|
|
47
|
+
DialogOpenError,
|
|
48
|
+
SlackOpContext
|
|
49
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
50
|
+
input: DialogOpenRequest,
|
|
51
|
+
output: DialogOpenResponse,
|
|
52
|
+
errors: [SlackError, SlackRateLimited],
|
|
53
|
+
protocol: SlackProtocol,
|
|
54
|
+
retry: Retry.Retry,
|
|
55
|
+
}));
|
|
@@ -0,0 +1,246 @@
|
|
|
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.ts";
|
|
5
|
+
import {
|
|
6
|
+
SlackProtocol,
|
|
7
|
+
type SlackOpError,
|
|
8
|
+
type SlackOpContext,
|
|
9
|
+
} from "../protocol.ts";
|
|
10
|
+
import { SlackError, SlackRateLimited } from "../errors.ts";
|
|
11
|
+
import * as Retry from "../retry.ts";
|
|
12
|
+
|
|
13
|
+
export type { SlackOpError, SlackOpContext };
|
|
14
|
+
|
|
15
|
+
export interface DndInfoRequest {
|
|
16
|
+
/** User to fetch status for (defaults to current user) */
|
|
17
|
+
user?: string;
|
|
18
|
+
/** Encoded team id where passed in user param belongs, required if org token is used. If no user param is passed, then a team which has access to the app should be passed */
|
|
19
|
+
team_id?: string;
|
|
20
|
+
}
|
|
21
|
+
export const DndInfoRequest = /*@__PURE__*/ S.suspend(() =>
|
|
22
|
+
S.Struct({
|
|
23
|
+
user: S.optional(S.String.pipe(T.Query())),
|
|
24
|
+
team_id: S.optional(S.String.pipe(T.Query())),
|
|
25
|
+
}).pipe(T.Http({ method: "GET", uri: "/dnd.info", code: 200 })),
|
|
26
|
+
).annotate({ identifier: "DndInfoRequest" }) as any as S.Schema<DndInfoRequest>;
|
|
27
|
+
|
|
28
|
+
export interface DndInfoResponse {
|
|
29
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
30
|
+
ok: boolean;
|
|
31
|
+
dnd_enabled: boolean;
|
|
32
|
+
next_dnd_start_ts: number;
|
|
33
|
+
next_dnd_end_ts: number;
|
|
34
|
+
snooze_enabled?: boolean;
|
|
35
|
+
snooze_endtime?: number;
|
|
36
|
+
snooze_remaining?: number;
|
|
37
|
+
snooze_is_indefinite?: boolean;
|
|
38
|
+
dnd_profile_status?: unknown;
|
|
39
|
+
}
|
|
40
|
+
export const DndInfoResponse = /*@__PURE__*/ S.suspend(() =>
|
|
41
|
+
S.Struct({
|
|
42
|
+
ok: S.Boolean,
|
|
43
|
+
dnd_enabled: S.Boolean,
|
|
44
|
+
next_dnd_start_ts: S.Number,
|
|
45
|
+
next_dnd_end_ts: S.Number,
|
|
46
|
+
snooze_enabled: S.optional(S.Boolean),
|
|
47
|
+
snooze_endtime: S.optional(S.Number),
|
|
48
|
+
snooze_remaining: S.optional(S.Number),
|
|
49
|
+
snooze_is_indefinite: S.optional(S.Boolean),
|
|
50
|
+
dnd_profile_status: S.optional(S.Unknown),
|
|
51
|
+
}),
|
|
52
|
+
).annotate({
|
|
53
|
+
identifier: "DndInfoResponse",
|
|
54
|
+
}) as any as S.Schema<DndInfoResponse>;
|
|
55
|
+
|
|
56
|
+
export interface EndDndRequest {}
|
|
57
|
+
export const EndDndRequest = /*@__PURE__*/ S.suspend(() =>
|
|
58
|
+
S.Struct({}).pipe(T.Http({ method: "POST", uri: "/dnd.endDnd", code: 200 })),
|
|
59
|
+
).annotate({ identifier: "EndDndRequest" }) as any as S.Schema<EndDndRequest>;
|
|
60
|
+
|
|
61
|
+
export interface EndDndResponse {
|
|
62
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
63
|
+
ok: boolean;
|
|
64
|
+
}
|
|
65
|
+
export const EndDndResponse = /*@__PURE__*/ S.suspend(() =>
|
|
66
|
+
S.Struct({
|
|
67
|
+
ok: S.Boolean,
|
|
68
|
+
}),
|
|
69
|
+
).annotate({ identifier: "EndDndResponse" }) as any as S.Schema<EndDndResponse>;
|
|
70
|
+
|
|
71
|
+
export interface EndSnoozeRequest {}
|
|
72
|
+
export const EndSnoozeRequest = /*@__PURE__*/ S.suspend(() =>
|
|
73
|
+
S.Struct({}).pipe(
|
|
74
|
+
T.Http({ method: "POST", uri: "/dnd.endSnooze", code: 200 }),
|
|
75
|
+
),
|
|
76
|
+
).annotate({
|
|
77
|
+
identifier: "EndSnoozeRequest",
|
|
78
|
+
}) as any as S.Schema<EndSnoozeRequest>;
|
|
79
|
+
|
|
80
|
+
export interface EndSnoozeResponse {
|
|
81
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
82
|
+
ok: boolean;
|
|
83
|
+
snooze_enabled: boolean;
|
|
84
|
+
dnd_enabled: boolean;
|
|
85
|
+
next_dnd_end_ts: number;
|
|
86
|
+
next_dnd_start_ts: number;
|
|
87
|
+
snooze_endtime?: number;
|
|
88
|
+
snooze_remaining?: number;
|
|
89
|
+
dnd_profile_status?: unknown;
|
|
90
|
+
}
|
|
91
|
+
export const EndSnoozeResponse = /*@__PURE__*/ S.suspend(() =>
|
|
92
|
+
S.Struct({
|
|
93
|
+
ok: S.Boolean,
|
|
94
|
+
snooze_enabled: S.Boolean,
|
|
95
|
+
dnd_enabled: S.Boolean,
|
|
96
|
+
next_dnd_end_ts: S.Number,
|
|
97
|
+
next_dnd_start_ts: S.Number,
|
|
98
|
+
snooze_endtime: S.optional(S.Number),
|
|
99
|
+
snooze_remaining: S.optional(S.Number),
|
|
100
|
+
dnd_profile_status: S.optional(S.Unknown),
|
|
101
|
+
}),
|
|
102
|
+
).annotate({
|
|
103
|
+
identifier: "EndSnoozeResponse",
|
|
104
|
+
}) as any as S.Schema<EndSnoozeResponse>;
|
|
105
|
+
|
|
106
|
+
export interface SetSnoozeRequest {
|
|
107
|
+
/** This argument is required. Number of minutes, from now, to snooze until. */
|
|
108
|
+
num_minutes: string;
|
|
109
|
+
}
|
|
110
|
+
export const SetSnoozeRequest = /*@__PURE__*/ S.suspend(() =>
|
|
111
|
+
S.Struct({
|
|
112
|
+
num_minutes: S.String,
|
|
113
|
+
}).pipe(T.Http({ method: "POST", uri: "/dnd.setSnooze", code: 200 })),
|
|
114
|
+
).annotate({
|
|
115
|
+
identifier: "SetSnoozeRequest",
|
|
116
|
+
}) as any as S.Schema<SetSnoozeRequest>;
|
|
117
|
+
|
|
118
|
+
export interface SetSnoozeResponse {
|
|
119
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
120
|
+
ok: boolean;
|
|
121
|
+
snooze_endtime?: number;
|
|
122
|
+
snooze_enabled: boolean;
|
|
123
|
+
snooze_remaining?: number;
|
|
124
|
+
snooze_is_indefinite?: boolean;
|
|
125
|
+
}
|
|
126
|
+
export const SetSnoozeResponse = /*@__PURE__*/ S.suspend(() =>
|
|
127
|
+
S.Struct({
|
|
128
|
+
ok: S.Boolean,
|
|
129
|
+
snooze_endtime: S.optional(S.Number),
|
|
130
|
+
snooze_enabled: S.Boolean,
|
|
131
|
+
snooze_remaining: S.optional(S.Number),
|
|
132
|
+
snooze_is_indefinite: S.optional(S.Boolean),
|
|
133
|
+
}),
|
|
134
|
+
).annotate({
|
|
135
|
+
identifier: "SetSnoozeResponse",
|
|
136
|
+
}) as any as S.Schema<SetSnoozeResponse>;
|
|
137
|
+
|
|
138
|
+
export interface TeamInfoRequest {
|
|
139
|
+
/** Comma-separated list of users to fetch Do Not Disturb status for */
|
|
140
|
+
users: string;
|
|
141
|
+
/** Encoded team id where passed in users belong, required if org token is used */
|
|
142
|
+
team_id?: string;
|
|
143
|
+
}
|
|
144
|
+
export const TeamInfoRequest = /*@__PURE__*/ S.suspend(() =>
|
|
145
|
+
S.Struct({
|
|
146
|
+
users: S.String.pipe(T.Query()),
|
|
147
|
+
team_id: S.optional(S.String.pipe(T.Query())),
|
|
148
|
+
}).pipe(T.Http({ method: "GET", uri: "/dnd.teamInfo", code: 200 })),
|
|
149
|
+
).annotate({
|
|
150
|
+
identifier: "TeamInfoRequest",
|
|
151
|
+
}) as any as S.Schema<TeamInfoRequest>;
|
|
152
|
+
|
|
153
|
+
export type TeamInfoResponseUsersMap = { [key: string]: unknown | undefined };
|
|
154
|
+
export const TeamInfoResponseUsersMap = /*@__PURE__*/ S.Record(
|
|
155
|
+
S.String,
|
|
156
|
+
S.Unknown,
|
|
157
|
+
) as any as S.Schema<TeamInfoResponseUsersMap>;
|
|
158
|
+
|
|
159
|
+
export interface TeamInfoResponse {
|
|
160
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
161
|
+
ok: boolean;
|
|
162
|
+
users: TeamInfoResponseUsersMap;
|
|
163
|
+
}
|
|
164
|
+
export const TeamInfoResponse = /*@__PURE__*/ S.suspend(() =>
|
|
165
|
+
S.Struct({
|
|
166
|
+
ok: S.Boolean,
|
|
167
|
+
users: TeamInfoResponseUsersMap,
|
|
168
|
+
}),
|
|
169
|
+
).annotate({
|
|
170
|
+
identifier: "TeamInfoResponse",
|
|
171
|
+
}) as any as S.Schema<TeamInfoResponse>;
|
|
172
|
+
|
|
173
|
+
export type DndInfoError = SlackOpError;
|
|
174
|
+
/** Retrieves a user's current Do Not Disturb status. Required scopes — bot: `dnd:read`; user: `dnd:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `user_not_found` — Value passed for `user` was invalid. - `user_not_visible` — User is not visible for this request. See https://docs.slack.dev/reference/methods/dnd.info */
|
|
175
|
+
export const dndInfo: API.OperationMethod<
|
|
176
|
+
DndInfoRequest,
|
|
177
|
+
DndInfoResponse,
|
|
178
|
+
DndInfoError,
|
|
179
|
+
SlackOpContext
|
|
180
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
181
|
+
input: DndInfoRequest,
|
|
182
|
+
output: DndInfoResponse,
|
|
183
|
+
errors: [SlackError, SlackRateLimited],
|
|
184
|
+
protocol: SlackProtocol,
|
|
185
|
+
retry: Retry.Retry,
|
|
186
|
+
}));
|
|
187
|
+
|
|
188
|
+
export type EndDndError = SlackOpError;
|
|
189
|
+
/** Ends the current user's Do Not Disturb session immediately. Required scopes — user: `dnd:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `not_in_dnd` — The auth'd user isn't in DND mode. See https://docs.slack.dev/reference/methods/dnd.endDnd */
|
|
190
|
+
export const endDnd: API.OperationMethod<
|
|
191
|
+
EndDndRequest,
|
|
192
|
+
EndDndResponse,
|
|
193
|
+
EndDndError,
|
|
194
|
+
SlackOpContext
|
|
195
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
196
|
+
input: EndDndRequest,
|
|
197
|
+
output: EndDndResponse,
|
|
198
|
+
errors: [SlackError, SlackRateLimited],
|
|
199
|
+
protocol: SlackProtocol,
|
|
200
|
+
retry: Retry.Retry,
|
|
201
|
+
}));
|
|
202
|
+
|
|
203
|
+
export type EndSnoozeError = SlackOpError;
|
|
204
|
+
/** Ends the current user's snooze mode immediately. Required scopes — user: `dnd:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `snooze_end_failed` — There was a problem setting the user's Do Not Disturb status See https://docs.slack.dev/reference/methods/dnd.endSnooze */
|
|
205
|
+
export const endSnooze: API.OperationMethod<
|
|
206
|
+
EndSnoozeRequest,
|
|
207
|
+
EndSnoozeResponse,
|
|
208
|
+
EndSnoozeError,
|
|
209
|
+
SlackOpContext
|
|
210
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
211
|
+
input: EndSnoozeRequest,
|
|
212
|
+
output: EndSnoozeResponse,
|
|
213
|
+
errors: [SlackError, SlackRateLimited],
|
|
214
|
+
protocol: SlackProtocol,
|
|
215
|
+
retry: Retry.Retry,
|
|
216
|
+
}));
|
|
217
|
+
|
|
218
|
+
export type SetSnoozeError = SlackOpError;
|
|
219
|
+
/** Turns on Do Not Disturb mode for the current user, or changes its duration. Required scopes — user: `dnd:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `missing_duration` — No value provided for `num_minutes` - `snooze_failed` — There was a problem setting the user's Do Not Disturb status - `too_long` — The value for `num_minutes` was too large See https://docs.slack.dev/reference/methods/dnd.setSnooze */
|
|
220
|
+
export const setSnooze: API.OperationMethod<
|
|
221
|
+
SetSnoozeRequest,
|
|
222
|
+
SetSnoozeResponse,
|
|
223
|
+
SetSnoozeError,
|
|
224
|
+
SlackOpContext
|
|
225
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
226
|
+
input: SetSnoozeRequest,
|
|
227
|
+
output: SetSnoozeResponse,
|
|
228
|
+
errors: [SlackError, SlackRateLimited],
|
|
229
|
+
protocol: SlackProtocol,
|
|
230
|
+
retry: Retry.Retry,
|
|
231
|
+
}));
|
|
232
|
+
|
|
233
|
+
export type TeamInfoError = SlackOpError;
|
|
234
|
+
/** Retrieves the Do Not Disturb status for up to 50 users on a team. Required scopes — bot: `dnd:read`; user: `dnd:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `no_users_provided` — Must provide more than one user. - `user_not_visible` — User is not visible for this request. See https://docs.slack.dev/reference/methods/dnd.teamInfo */
|
|
235
|
+
export const teamInfo: API.OperationMethod<
|
|
236
|
+
TeamInfoRequest,
|
|
237
|
+
TeamInfoResponse,
|
|
238
|
+
TeamInfoError,
|
|
239
|
+
SlackOpContext
|
|
240
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
241
|
+
input: TeamInfoRequest,
|
|
242
|
+
output: TeamInfoResponse,
|
|
243
|
+
errors: [SlackError, SlackRateLimited],
|
|
244
|
+
protocol: SlackProtocol,
|
|
245
|
+
retry: Retry.Retry,
|
|
246
|
+
}));
|
|
@@ -0,0 +1,91 @@
|
|
|
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.ts";
|
|
5
|
+
import {
|
|
6
|
+
SlackProtocol,
|
|
7
|
+
type SlackOpError,
|
|
8
|
+
type SlackOpContext,
|
|
9
|
+
} from "../protocol.ts";
|
|
10
|
+
import { SlackError, SlackRateLimited } from "../errors.ts";
|
|
11
|
+
import * as Retry from "../retry.ts";
|
|
12
|
+
|
|
13
|
+
export type { SlackOpError, SlackOpContext };
|
|
14
|
+
|
|
15
|
+
export interface ListEmojiRequest {
|
|
16
|
+
/** Include a list of categories for Unicode emoji and the emoji in each category */
|
|
17
|
+
include_categories?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export const ListEmojiRequest = /*@__PURE__*/ S.suspend(() =>
|
|
20
|
+
S.Struct({
|
|
21
|
+
include_categories: S.optional(S.Boolean.pipe(T.Query())),
|
|
22
|
+
}).pipe(T.Http({ method: "GET", uri: "/emoji.list", code: 200 })),
|
|
23
|
+
).annotate({
|
|
24
|
+
identifier: "ListEmojiRequest",
|
|
25
|
+
}) as any as S.Schema<ListEmojiRequest>;
|
|
26
|
+
|
|
27
|
+
export type ListEmojiResponseEmojiMap = { [key: string]: unknown | undefined };
|
|
28
|
+
export const ListEmojiResponseEmojiMap = /*@__PURE__*/ S.Record(
|
|
29
|
+
S.String,
|
|
30
|
+
S.Unknown,
|
|
31
|
+
) as any as S.Schema<ListEmojiResponseEmojiMap>;
|
|
32
|
+
|
|
33
|
+
export type ListEmojiResponseCategoriesItemEmojiNamesList = Array<string>;
|
|
34
|
+
export const ListEmojiResponseCategoriesItemEmojiNamesList =
|
|
35
|
+
/*@__PURE__*/ S.Array(
|
|
36
|
+
S.String,
|
|
37
|
+
) as any as S.Schema<ListEmojiResponseCategoriesItemEmojiNamesList>;
|
|
38
|
+
|
|
39
|
+
export interface ListEmojiResponseCategoriesItem {
|
|
40
|
+
name?: string;
|
|
41
|
+
emoji_names?: ListEmojiResponseCategoriesItemEmojiNamesList;
|
|
42
|
+
}
|
|
43
|
+
export const ListEmojiResponseCategoriesItem = /*@__PURE__*/ S.suspend(() =>
|
|
44
|
+
S.Struct({
|
|
45
|
+
name: S.optional(S.String),
|
|
46
|
+
emoji_names: S.optional(ListEmojiResponseCategoriesItemEmojiNamesList),
|
|
47
|
+
}),
|
|
48
|
+
).annotate({
|
|
49
|
+
identifier: "ListEmojiResponseCategoriesItem",
|
|
50
|
+
}) as any as S.Schema<ListEmojiResponseCategoriesItem>;
|
|
51
|
+
|
|
52
|
+
export type ListEmojiResponseCategoriesList =
|
|
53
|
+
Array<ListEmojiResponseCategoriesItem>;
|
|
54
|
+
export const ListEmojiResponseCategoriesList = /*@__PURE__*/ S.Array(
|
|
55
|
+
ListEmojiResponseCategoriesItem,
|
|
56
|
+
) as any as S.Schema<ListEmojiResponseCategoriesList>;
|
|
57
|
+
|
|
58
|
+
export interface ListEmojiResponse {
|
|
59
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
60
|
+
ok: boolean;
|
|
61
|
+
cache_ts?: string;
|
|
62
|
+
emoji: ListEmojiResponseEmojiMap;
|
|
63
|
+
categories_version?: string;
|
|
64
|
+
categories?: ListEmojiResponseCategoriesList;
|
|
65
|
+
}
|
|
66
|
+
export const ListEmojiResponse = /*@__PURE__*/ S.suspend(() =>
|
|
67
|
+
S.Struct({
|
|
68
|
+
ok: S.Boolean,
|
|
69
|
+
cache_ts: S.optional(S.String),
|
|
70
|
+
emoji: ListEmojiResponseEmojiMap,
|
|
71
|
+
categories_version: S.optional(S.String),
|
|
72
|
+
categories: S.optional(ListEmojiResponseCategoriesList),
|
|
73
|
+
}),
|
|
74
|
+
).annotate({
|
|
75
|
+
identifier: "ListEmojiResponse",
|
|
76
|
+
}) as any as S.Schema<ListEmojiResponse>;
|
|
77
|
+
|
|
78
|
+
export type ListEmojiError = SlackOpError;
|
|
79
|
+
/** Lists custom emoji for a team. Required scopes — bot: `emoji:read`; user: `emoji:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `invalid_arguments` — Invalid API arguments provided - `unable_to_fetch_custom_emojis` — Unable to fetch custom emojis for team. See https://docs.slack.dev/reference/methods/emoji.list */
|
|
80
|
+
export const listEmoji: API.OperationMethod<
|
|
81
|
+
ListEmojiRequest,
|
|
82
|
+
ListEmojiResponse,
|
|
83
|
+
ListEmojiError,
|
|
84
|
+
SlackOpContext
|
|
85
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
86
|
+
input: ListEmojiRequest,
|
|
87
|
+
output: ListEmojiResponse,
|
|
88
|
+
errors: [SlackError, SlackRateLimited],
|
|
89
|
+
protocol: SlackProtocol,
|
|
90
|
+
retry: Retry.Retry,
|
|
91
|
+
}));
|
|
@@ -0,0 +1,225 @@
|
|
|
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.ts";
|
|
5
|
+
import {
|
|
6
|
+
SlackProtocol,
|
|
7
|
+
type SlackOpError,
|
|
8
|
+
type SlackOpContext,
|
|
9
|
+
} from "../protocol.ts";
|
|
10
|
+
import { SlackError, SlackRateLimited } from "../errors.ts";
|
|
11
|
+
import * as Retry from "../retry.ts";
|
|
12
|
+
|
|
13
|
+
export type { SlackOpError, SlackOpContext };
|
|
14
|
+
|
|
15
|
+
/** The full comment data. Required for edit and post actions. See the [comment schema](/messaging/work-objects-comments#entity-present-comments-method) for the full list of properties. */
|
|
16
|
+
export type AcknowledgeCommentActionRequestCommentMap = {
|
|
17
|
+
[key: string]: unknown | undefined;
|
|
18
|
+
};
|
|
19
|
+
export const AcknowledgeCommentActionRequestCommentMap = /*@__PURE__*/ S.Record(
|
|
20
|
+
S.String,
|
|
21
|
+
S.Unknown,
|
|
22
|
+
) as any as S.Schema<AcknowledgeCommentActionRequestCommentMap>;
|
|
23
|
+
|
|
24
|
+
export interface AcknowledgeCommentActionRequest {
|
|
25
|
+
/** A reference to the original user action that initiated the comment mutation */
|
|
26
|
+
trigger_id: string;
|
|
27
|
+
/** The full comment data. Required for edit and post actions. See the [comment schema](/messaging/work-objects-comments#entity-present-comments-method) for the full list of properties. */
|
|
28
|
+
comment?: AcknowledgeCommentActionRequestCommentMap;
|
|
29
|
+
/** Error message if the action failed in the app. When present, signals that the mutation could not be completed. */
|
|
30
|
+
error?: string;
|
|
31
|
+
}
|
|
32
|
+
export const AcknowledgeCommentActionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
33
|
+
S.Struct({
|
|
34
|
+
trigger_id: S.String,
|
|
35
|
+
comment: S.optional(AcknowledgeCommentActionRequestCommentMap),
|
|
36
|
+
error: S.optional(S.String),
|
|
37
|
+
}).pipe(
|
|
38
|
+
T.Http({
|
|
39
|
+
method: "POST",
|
|
40
|
+
uri: "/entity.acknowledgeCommentAction",
|
|
41
|
+
code: 200,
|
|
42
|
+
}),
|
|
43
|
+
),
|
|
44
|
+
).annotate({
|
|
45
|
+
identifier: "AcknowledgeCommentActionRequest",
|
|
46
|
+
}) as any as S.Schema<AcknowledgeCommentActionRequest>;
|
|
47
|
+
|
|
48
|
+
export interface AcknowledgeCommentActionResponse {
|
|
49
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
50
|
+
ok: boolean;
|
|
51
|
+
}
|
|
52
|
+
export const AcknowledgeCommentActionResponse = /*@__PURE__*/ S.suspend(() =>
|
|
53
|
+
S.Struct({
|
|
54
|
+
ok: S.Boolean,
|
|
55
|
+
}),
|
|
56
|
+
).annotate({
|
|
57
|
+
identifier: "AcknowledgeCommentActionResponse",
|
|
58
|
+
}) as any as S.Schema<AcknowledgeCommentActionResponse>;
|
|
59
|
+
|
|
60
|
+
export type PresentCommentsRequestCommentsItemMap = {
|
|
61
|
+
[key: string]: unknown | undefined;
|
|
62
|
+
};
|
|
63
|
+
export const PresentCommentsRequestCommentsItemMap = /*@__PURE__*/ S.Record(
|
|
64
|
+
S.String,
|
|
65
|
+
S.Unknown,
|
|
66
|
+
) as any as S.Schema<PresentCommentsRequestCommentsItemMap>;
|
|
67
|
+
|
|
68
|
+
/** Array of comments to present to the user. See the [comment schema](/messaging/work-objects-comments#entity-present-comments-method) for the full list of properties. */
|
|
69
|
+
export type PresentCommentsRequestCommentsList =
|
|
70
|
+
Array<PresentCommentsRequestCommentsItemMap>;
|
|
71
|
+
export const PresentCommentsRequestCommentsList = /*@__PURE__*/ S.Array(
|
|
72
|
+
PresentCommentsRequestCommentsItemMap,
|
|
73
|
+
) as any as S.Schema<PresentCommentsRequestCommentsList>;
|
|
74
|
+
|
|
75
|
+
export interface PresentCommentsRequest {
|
|
76
|
+
/** Array of comments to present to the user. See the [comment schema](/messaging/work-objects-comments#entity-present-comments-method) for the full list of properties. */
|
|
77
|
+
comments: PresentCommentsRequestCommentsList;
|
|
78
|
+
/** App supplied cursor used for pagination, will be sent in the next request for comments */
|
|
79
|
+
cursor?: string;
|
|
80
|
+
/** Indicates whether the user has permissions to post comments */
|
|
81
|
+
can_post_comment?: boolean;
|
|
82
|
+
/** A reference to the original user action that initiated the request */
|
|
83
|
+
trigger_id: string;
|
|
84
|
+
/** The block action id that will be sent when a delete request is initiated for a comment. */
|
|
85
|
+
delete_action_id?: string;
|
|
86
|
+
/** Set to true (or 1) to indicate that the user must authenticate to see the comments data. */
|
|
87
|
+
user_auth_required?: boolean;
|
|
88
|
+
/** A custom URL to which users are directed for authentication if required. */
|
|
89
|
+
user_auth_url?: string;
|
|
90
|
+
error?: string;
|
|
91
|
+
}
|
|
92
|
+
export const PresentCommentsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
93
|
+
S.Struct({
|
|
94
|
+
comments: PresentCommentsRequestCommentsList,
|
|
95
|
+
cursor: S.optional(S.String),
|
|
96
|
+
can_post_comment: S.optional(S.Boolean),
|
|
97
|
+
trigger_id: S.String,
|
|
98
|
+
delete_action_id: S.optional(S.String),
|
|
99
|
+
user_auth_required: S.optional(S.Boolean),
|
|
100
|
+
user_auth_url: S.optional(S.String),
|
|
101
|
+
error: S.optional(S.String),
|
|
102
|
+
}).pipe(
|
|
103
|
+
T.Http({ method: "POST", uri: "/entity.presentComments", code: 200 }),
|
|
104
|
+
),
|
|
105
|
+
).annotate({
|
|
106
|
+
identifier: "PresentCommentsRequest",
|
|
107
|
+
}) as any as S.Schema<PresentCommentsRequest>;
|
|
108
|
+
|
|
109
|
+
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
110
|
+
export interface PresentCommentsResponseResponseMetadata {
|
|
111
|
+
/** Cursor for the next page — pass as `cursor` on the next call. */
|
|
112
|
+
next_cursor?: string;
|
|
113
|
+
}
|
|
114
|
+
export const PresentCommentsResponseResponseMetadata = /*@__PURE__*/ S.suspend(
|
|
115
|
+
() =>
|
|
116
|
+
S.Struct({
|
|
117
|
+
next_cursor: S.optional(S.String),
|
|
118
|
+
}),
|
|
119
|
+
).annotate({
|
|
120
|
+
identifier: "PresentCommentsResponseResponseMetadata",
|
|
121
|
+
}) as any as S.Schema<PresentCommentsResponseResponseMetadata>;
|
|
122
|
+
|
|
123
|
+
export interface PresentCommentsResponse {
|
|
124
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
125
|
+
ok: boolean;
|
|
126
|
+
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
127
|
+
response_metadata?: PresentCommentsResponseResponseMetadata;
|
|
128
|
+
}
|
|
129
|
+
export const PresentCommentsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
130
|
+
S.Struct({
|
|
131
|
+
ok: S.Boolean,
|
|
132
|
+
response_metadata: S.optional(PresentCommentsResponseResponseMetadata),
|
|
133
|
+
}),
|
|
134
|
+
).annotate({
|
|
135
|
+
identifier: "PresentCommentsResponse",
|
|
136
|
+
}) as any as S.Schema<PresentCommentsResponse>;
|
|
137
|
+
|
|
138
|
+
/** URL-encoded JSON object containing flexpane metadata from the app that will be conformed to a Work Object metadata schema, keyed by entity ID. */
|
|
139
|
+
export type PresentDetailsRequestMetadataMap = {
|
|
140
|
+
[key: string]: unknown | undefined;
|
|
141
|
+
};
|
|
142
|
+
export const PresentDetailsRequestMetadataMap = /*@__PURE__*/ S.Record(
|
|
143
|
+
S.String,
|
|
144
|
+
S.Unknown,
|
|
145
|
+
) as any as S.Schema<PresentDetailsRequestMetadataMap>;
|
|
146
|
+
|
|
147
|
+
export interface PresentDetailsRequest {
|
|
148
|
+
/** URL-encoded JSON object containing flexpane metadata from the app that will be conformed to a Work Object metadata schema, keyed by entity ID. */
|
|
149
|
+
metadata?: PresentDetailsRequestMetadataMap;
|
|
150
|
+
/** A reference to the original user action that initiated the request. */
|
|
151
|
+
trigger_id: string;
|
|
152
|
+
/** Set to true (or 1) to indicate that the user must authenticate to view full flexpane data. */
|
|
153
|
+
user_auth_required?: boolean;
|
|
154
|
+
/** A custom URL to which users are directed for authentication if required. */
|
|
155
|
+
user_auth_url?: string;
|
|
156
|
+
error?: string;
|
|
157
|
+
}
|
|
158
|
+
export const PresentDetailsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
159
|
+
S.Struct({
|
|
160
|
+
metadata: S.optional(PresentDetailsRequestMetadataMap),
|
|
161
|
+
trigger_id: S.String,
|
|
162
|
+
user_auth_required: S.optional(S.Boolean),
|
|
163
|
+
user_auth_url: S.optional(S.String),
|
|
164
|
+
error: S.optional(S.String),
|
|
165
|
+
}).pipe(T.Http({ method: "POST", uri: "/entity.presentDetails", code: 200 })),
|
|
166
|
+
).annotate({
|
|
167
|
+
identifier: "PresentDetailsRequest",
|
|
168
|
+
}) as any as S.Schema<PresentDetailsRequest>;
|
|
169
|
+
|
|
170
|
+
export interface PresentDetailsResponse {
|
|
171
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
172
|
+
ok: boolean;
|
|
173
|
+
}
|
|
174
|
+
export const PresentDetailsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
175
|
+
S.Struct({
|
|
176
|
+
ok: S.Boolean,
|
|
177
|
+
}),
|
|
178
|
+
).annotate({
|
|
179
|
+
identifier: "PresentDetailsResponse",
|
|
180
|
+
}) as any as S.Schema<PresentDetailsResponse>;
|
|
181
|
+
|
|
182
|
+
export type AcknowledgeCommentActionError = SlackOpError;
|
|
183
|
+
/** Acknowledge a comment mutation (edit, delete, or post) on a work object entity. Apps call this endpoint to confirm they have processed a comment action, and the backend emits a dedicated RTM event to the user. Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `method_not_found` — when the API isn't available to the caller - `invalid_trigger_id` — Trigger id is not valid - `invalid_app_id` — App ID is not a valid format - `invalid_auth` — Invalid token provided - `invalid_action` — The comment data does not match the original trigger context (e.g., comment_id or thread_root_id mismatch) - `missing_comment_data` — Required comment fields are missing for the given action type - `not_allowed` — User is not enrolled in comment syncing - `invalid_sender_schema` — The sender field could not be transformed to a valid user schema See https://docs.slack.dev/reference/methods/entity.acknowledgeCommentAction */
|
|
184
|
+
export const acknowledgeCommentAction: API.OperationMethod<
|
|
185
|
+
AcknowledgeCommentActionRequest,
|
|
186
|
+
AcknowledgeCommentActionResponse,
|
|
187
|
+
AcknowledgeCommentActionError,
|
|
188
|
+
SlackOpContext
|
|
189
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
190
|
+
input: AcknowledgeCommentActionRequest,
|
|
191
|
+
output: AcknowledgeCommentActionResponse,
|
|
192
|
+
errors: [SlackError, SlackRateLimited],
|
|
193
|
+
protocol: SlackProtocol,
|
|
194
|
+
retry: Retry.Retry,
|
|
195
|
+
}));
|
|
196
|
+
|
|
197
|
+
export type PresentCommentsError = SlackOpError;
|
|
198
|
+
/** Provide comments for work objects. Apps call this endpoint to send per-user flexpane comment data to the client. Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `method_not_found` — when the API isn't available to the caller - `invalid_trigger_id` — Trigger id is not valid - `invalid_app_id` — App ID is not a valid format - `invalid_auth` — Invalid token provided - `user_auth_url_missing` — User auth url is required if user_auth_required is true - `missing_delete_action_id` — delete_action_id is required when any comment is marked can_delete See https://docs.slack.dev/reference/methods/entity.presentComments */
|
|
199
|
+
export const presentComments: API.OperationMethod<
|
|
200
|
+
PresentCommentsRequest,
|
|
201
|
+
PresentCommentsResponse,
|
|
202
|
+
PresentCommentsError,
|
|
203
|
+
SlackOpContext
|
|
204
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
205
|
+
input: PresentCommentsRequest,
|
|
206
|
+
output: PresentCommentsResponse,
|
|
207
|
+
errors: [SlackError, SlackRateLimited],
|
|
208
|
+
protocol: SlackProtocol,
|
|
209
|
+
retry: Retry.Retry,
|
|
210
|
+
}));
|
|
211
|
+
|
|
212
|
+
export type PresentDetailsError = SlackOpError;
|
|
213
|
+
/** Provide custom flexpane behavior for Work Objects. Apps call this endpoint to send per-user flexpane metadata to the client. Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `invalid_metadata` — The provided `metadata` argument could not be parsed or understood. - `feature_not_enabled` — temporarily gating API - `invalid_app_id` — App ID is not a valid format - `user_auth_url_missing` — User auth url is required if user_auth_required is true - `invalid_trigger_id` — Trigger id is not valid - `entity_metadata_does_not_match_trigger` — The provided entity's ID does not match the ID of the entity used to initiate the request - `missing_interactivity_url` — App does not have an interactivity URL configured - `missing_options_load_url` — App does not have an options load URL configured - `invalid_auth` — Invalid token provided See https://docs.slack.dev/reference/methods/entity.presentDetails */
|
|
214
|
+
export const presentDetails: API.OperationMethod<
|
|
215
|
+
PresentDetailsRequest,
|
|
216
|
+
PresentDetailsResponse,
|
|
217
|
+
PresentDetailsError,
|
|
218
|
+
SlackOpContext
|
|
219
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
220
|
+
input: PresentDetailsRequest,
|
|
221
|
+
output: PresentDetailsResponse,
|
|
222
|
+
errors: [SlackError, SlackRateLimited],
|
|
223
|
+
protocol: SlackProtocol,
|
|
224
|
+
retry: Retry.Retry,
|
|
225
|
+
}));
|