@distilled.cloud/slack 1.0.0-rc.15 → 1.0.0-rc.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/.lazy.json +1 -0
- package/lib/_bundle/lazy.js +4 -0
- package/lib/_bundle/sdk.js +2 -0
- package/lib/_bundle/sdk.js.map +1 -0
- package/lib/credentials.d.ts +1 -1
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +1 -53
- package/lib/errors.d.ts +31 -31
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -59
- package/lib/index.d.ts +1 -1
- package/lib/index.js +0 -10
- package/lib/index.lazy.js +7 -0
- package/lib/pagination.d.ts +2 -2
- package/lib/pagination.js +1 -31
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +1 -231
- package/lib/retry.d.ts +2 -2
- package/lib/retry.d.ts.map +1 -1
- package/lib/retry.js +1 -45
- package/lib/services/admin.d.ts +123 -575
- package/lib/services/admin.d.ts.map +1 -1
- package/lib/services/admin.js +141 -2884
- package/lib/services/admin.js.map +1 -1
- package/lib/services/agents.d.ts +13 -55
- package/lib/services/agents.d.ts.map +1 -1
- package/lib/services/agents.js +1 -314
- package/lib/services/agents.js.map +1 -1
- package/lib/services/api.d.ts +0 -4
- package/lib/services/api.d.ts.map +1 -1
- package/lib/services/api.js +1 -23
- package/lib/services/api.js.map +1 -1
- package/lib/services/apps.d.ts +25 -106
- package/lib/services/apps.d.ts.map +1 -1
- package/lib/services/apps.js +35 -515
- package/lib/services/apps.js.map +1 -1
- package/lib/services/assistant.d.ts +6 -40
- package/lib/services/assistant.d.ts.map +1 -1
- package/lib/services/assistant.js +1 -209
- package/lib/services/assistant.js.map +1 -1
- package/lib/services/auth.d.ts +4 -15
- package/lib/services/auth.d.ts.map +1 -1
- package/lib/services/auth.js +1 -96
- package/lib/services/auth.js.map +1 -1
- package/lib/services/blocks.d.ts +1 -7
- package/lib/services/blocks.d.ts.map +1 -1
- package/lib/services/blocks.js +1 -26
- package/lib/services/blocks.js.map +1 -1
- package/lib/services/bookmarks.d.ts +4 -15
- package/lib/services/bookmarks.d.ts.map +1 -1
- package/lib/services/bookmarks.js +1 -81
- package/lib/services/bookmarks.js.map +1 -1
- package/lib/services/bots.d.ts +1 -9
- package/lib/services/bots.d.ts.map +1 -1
- package/lib/services/bots.js +1 -59
- package/lib/services/bots.js.map +1 -1
- package/lib/services/calls.d.ts +6 -22
- package/lib/services/calls.d.ts.map +1 -1
- package/lib/services/calls.js +1 -115
- package/lib/services/calls.js.map +1 -1
- package/lib/services/canvases.d.ts +7 -35
- package/lib/services/canvases.d.ts.map +1 -1
- package/lib/services/canvases.js +1 -140
- package/lib/services/canvases.js.map +1 -1
- package/lib/services/chat.d.ts +14 -83
- package/lib/services/chat.d.ts.map +1 -1
- package/lib/services/chat.js +1 -387
- package/lib/services/chat.js.map +1 -1
- package/lib/services/conversations.d.ts +31 -116
- package/lib/services/conversations.d.ts.map +1 -1
- package/lib/services/conversations.js +40 -696
- package/lib/services/conversations.js.map +1 -1
- package/lib/services/dialog.d.ts +1 -4
- package/lib/services/dialog.d.ts.map +1 -1
- package/lib/services/dialog.js +1 -22
- package/lib/services/dialog.js.map +1 -1
- package/lib/services/dnd.d.ts +5 -17
- package/lib/services/dnd.d.ts.map +1 -1
- package/lib/services/dnd.js +1 -96
- package/lib/services/dnd.js.map +1 -1
- package/lib/services/emoji.d.ts +1 -8
- package/lib/services/emoji.d.ts.map +1 -1
- package/lib/services/emoji.js +1 -34
- package/lib/services/emoji.js.map +1 -1
- package/lib/services/entity.d.ts +4 -16
- package/lib/services/entity.d.ts.map +1 -1
- package/lib/services/entity.js +1 -76
- package/lib/services/entity.js.map +1 -1
- package/lib/services/files.d.ts +16 -80
- package/lib/services/files.d.ts.map +1 -1
- package/lib/services/files.js +1 -439
- package/lib/services/files.js.map +1 -1
- package/lib/services/functions.d.ts +8 -49
- package/lib/services/functions.d.ts.map +1 -1
- package/lib/services/functions.js +1 -208
- package/lib/services/functions.js.map +1 -1
- package/lib/services/index.js +0 -2
- package/lib/services/lists.d.ts +13 -55
- package/lib/services/lists.d.ts.map +1 -1
- package/lib/services/lists.js +1 -254
- package/lib/services/lists.js.map +1 -1
- package/lib/services/migration.d.ts +1 -7
- package/lib/services/migration.d.ts.map +1 -1
- package/lib/services/migration.js +1 -32
- package/lib/services/migration.js.map +1 -1
- package/lib/services/oauth.d.ts +7 -43
- package/lib/services/oauth.d.ts.map +1 -1
- package/lib/services/oauth.js +1 -294
- package/lib/services/oauth.js.map +1 -1
- package/lib/services/openid.d.ts +3 -10
- package/lib/services/openid.d.ts.map +1 -1
- package/lib/services/openid.js +1 -84
- package/lib/services/openid.js.map +1 -1
- package/lib/services/pins.d.ts +3 -13
- package/lib/services/pins.d.ts.map +1 -1
- package/lib/services/pins.js +1 -66
- package/lib/services/pins.js.map +1 -1
- package/lib/services/reactions.d.ts +5 -17
- package/lib/services/reactions.d.ts.map +1 -1
- package/lib/services/reactions.js +1 -102
- package/lib/services/reactions.js.map +1 -1
- package/lib/services/reminders.d.ts +5 -17
- package/lib/services/reminders.d.ts.map +1 -1
- package/lib/services/reminders.js +1 -88
- package/lib/services/reminders.js.map +1 -1
- package/lib/services/rtm.d.ts +2 -11
- package/lib/services/rtm.d.ts.map +1 -1
- package/lib/services/rtm.js +1 -61
- package/lib/services/rtm.js.map +1 -1
- package/lib/services/search.d.ts +4 -35
- package/lib/services/search.d.ts.map +1 -1
- package/lib/services/search.js +1 -172
- package/lib/services/search.js.map +1 -1
- package/lib/services/stars.d.ts +4 -26
- package/lib/services/stars.d.ts.map +1 -1
- package/lib/services/stars.js +1 -134
- package/lib/services/stars.js.map +1 -1
- package/lib/services/team.d.ts +11 -63
- package/lib/services/team.d.ts.map +1 -1
- package/lib/services/team.js +1 -295
- package/lib/services/team.js.map +1 -1
- package/lib/services/tooling.d.ts +2 -5
- package/lib/services/tooling.d.ts.map +1 -1
- package/lib/services/tooling.js +1 -33
- package/lib/services/tooling.js.map +1 -1
- package/lib/services/usergroups.d.ts +7 -31
- package/lib/services/usergroups.d.ts.map +1 -1
- package/lib/services/usergroups.js +1 -151
- package/lib/services/usergroups.js.map +1 -1
- package/lib/services/users.d.ts +14 -48
- package/lib/services/users.d.ts.map +1 -1
- package/lib/services/users.js +1 -255
- package/lib/services/users.js.map +1 -1
- package/lib/services/views.d.ts +4 -14
- package/lib/services/views.d.ts.map +1 -1
- package/lib/services/views.js +1 -78
- package/lib/services/views.js.map +1 -1
- package/lib/services/workflows.d.ts +8 -51
- package/lib/services/workflows.d.ts.map +1 -1
- package/lib/services/workflows.js +1 -193
- package/lib/services/workflows.js.map +1 -1
- package/lib/services.lazy/admin.js +3 -0
- package/lib/services.lazy/agents.js +1 -0
- package/lib/services.lazy/api.js +1 -0
- package/lib/services.lazy/apps.js +3 -0
- package/lib/services.lazy/assistant.js +1 -0
- package/lib/services.lazy/auth.js +1 -0
- package/lib/services.lazy/blocks.js +1 -0
- package/lib/services.lazy/bookmarks.js +1 -0
- package/lib/services.lazy/bots.js +1 -0
- package/lib/services.lazy/calls.js +1 -0
- package/lib/services.lazy/canvases.js +1 -0
- package/lib/services.lazy/chat.js +1 -0
- package/lib/services.lazy/conversations.js +3 -0
- package/lib/services.lazy/dialog.js +1 -0
- package/lib/services.lazy/dnd.js +1 -0
- package/lib/services.lazy/emoji.js +1 -0
- package/lib/services.lazy/entity.js +1 -0
- package/lib/services.lazy/files.js +1 -0
- package/lib/services.lazy/functions.js +1 -0
- package/lib/services.lazy/index.js +3 -0
- package/lib/services.lazy/lists.js +1 -0
- package/lib/services.lazy/migration.js +1 -0
- package/lib/services.lazy/oauth.js +1 -0
- package/lib/services.lazy/openid.js +1 -0
- package/lib/services.lazy/pins.js +1 -0
- package/lib/services.lazy/reactions.js +1 -0
- package/lib/services.lazy/reminders.js +1 -0
- package/lib/services.lazy/rtm.js +1 -0
- package/lib/services.lazy/search.js +1 -0
- package/lib/services.lazy/stars.js +1 -0
- package/lib/services.lazy/team.js +1 -0
- package/lib/services.lazy/tooling.js +1 -0
- package/lib/services.lazy/usergroups.js +1 -0
- package/lib/services.lazy/users.js +1 -0
- package/lib/services.lazy/views.js +1 -0
- package/lib/services.lazy/workflows.js +1 -0
- package/lib/traits.d.ts +1 -1
- package/lib/traits.js +1 -12
- package/package.json +10 -8
- package/src/credentials.ts +20 -21
- package/src/errors.ts +31 -27
- package/src/index.ts +1 -1
- package/src/pagination.ts +2 -2
- package/src/protocol.ts +30 -29
- package/src/retry.ts +6 -6
- package/src/services/admin.ts +2717 -3451
- package/src/services/agents.ts +380 -370
- package/src/services/api.ts +31 -21
- package/src/services/apps.ts +569 -621
- package/src/services/assistant.ts +235 -270
- package/src/services/auth.ts +118 -100
- package/src/services/blocks.ts +33 -29
- package/src/services/bookmarks.ts +101 -83
- package/src/services/bots.ts +74 -67
- package/src/services/calls.ts +118 -124
- package/src/services/canvases.ts +171 -178
- package/src/services/chat.ts +428 -496
- package/src/services/conversations.ts +675 -761
- package/src/services/dialog.ts +30 -17
- package/src/services/dnd.ts +125 -99
- package/src/services/emoji.ts +46 -42
- package/src/services/entity.ts +94 -92
- package/src/services/files.ts +536 -531
- package/src/services/functions.ts +209 -274
- package/src/services/lists.ts +289 -304
- package/src/services/migration.ts +39 -37
- package/src/services/oauth.ts +345 -361
- package/src/services/openid.ts +137 -122
- package/src/services/pins.ts +83 -70
- package/src/services/reactions.ts +119 -103
- package/src/services/reminders.ts +112 -90
- package/src/services/rtm.ts +73 -65
- package/src/services/search.ts +193 -244
- package/src/services/stars.ts +101 -160
- package/src/services/team.ts +333 -369
- package/src/services/tooling.ts +43 -30
- package/src/services/usergroups.ts +175 -179
- package/src/services/users.ts +301 -268
- package/src/services/views.ts +85 -80
- package/src/services/workflows.ts +184 -269
- package/src/traits.ts +1 -1
- package/lib/credentials.js.map +0 -1
- package/lib/errors.js.map +0 -1
- package/lib/pagination.js.map +0 -1
- package/lib/protocol.js.map +0 -1
- package/lib/protocol.test.d.ts +0 -2
- package/lib/protocol.test.d.ts.map +0 -1
- package/lib/protocol.test.js +0 -288
- package/lib/protocol.test.js.map +0 -1
- package/lib/retry.js.map +0 -1
- package/lib/services/index.js.map +0 -1
- package/lib/traits.js.map +0 -1
- package/src/protocol.test.ts +0 -372
- /package/lib/{index.js.map → index.lazy.js.map} +0 -0
package/src/services/agents.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import * as API from "@distilled.cloud/core/api";
|
|
2
2
|
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
|
|
3
|
-
import * as S from "@distilled.cloud/core/schema";
|
|
3
|
+
import * as S from "@distilled.cloud/core/schema-lite";
|
|
4
|
+
import * as __L from "@distilled.cloud/core/schema-lite";
|
|
4
5
|
import { SlackError, SlackRateLimited } from "../errors.ts";
|
|
5
6
|
import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
|
|
6
7
|
import * as Retry from "../retry.ts";
|
|
7
8
|
import * as T from "../traits.ts";
|
|
9
|
+
// Schema table, filled on first reach (see __S at the end).
|
|
10
|
+
const __s: any[] = [];
|
|
8
11
|
|
|
9
12
|
export type { SlackOpError, SlackOpContext };
|
|
10
13
|
|
|
@@ -14,33 +17,16 @@ export interface ArchiveConversationRequest {
|
|
|
14
17
|
/** Timestamp of a message in the code channel to share back as a thread reply on the origin message. Requires the channel to have an `origin_link` set. */
|
|
15
18
|
summary_message_ts?: string;
|
|
16
19
|
}
|
|
17
|
-
export const ArchiveConversationRequest = /*@__PURE__*/ S.suspend(() =>
|
|
18
|
-
S.Struct({
|
|
19
|
-
channel_id: S.String,
|
|
20
|
-
summary_message_ts: S.optional(S.String),
|
|
21
|
-
}).pipe(T.Http({ method: "POST", uri: "/agents.conversations.archive", code: 200 })),
|
|
22
|
-
).annotate({
|
|
23
|
-
identifier: "ArchiveConversationRequest",
|
|
24
|
-
}) as any as S.Schema<ArchiveConversationRequest>;
|
|
25
|
-
|
|
26
20
|
export interface ArchiveConversationResponse {
|
|
27
21
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
28
22
|
ok: boolean;
|
|
29
23
|
}
|
|
30
|
-
export const ArchiveConversationResponse = /*@__PURE__*/ S.suspend(() =>
|
|
31
|
-
S.Struct({
|
|
32
|
-
ok: S.Boolean,
|
|
33
|
-
}),
|
|
34
|
-
).annotate({
|
|
35
|
-
identifier: "ArchiveConversationResponse",
|
|
36
|
-
}) as any as S.Schema<ArchiveConversationResponse>;
|
|
37
|
-
|
|
38
24
|
export interface CreateConversationRequest {
|
|
39
25
|
/** Encoded team id to create the channel in. Required for org tokens when `origin_channel_id` is not provided. When omitted, the workspace is derived from the origin channel. */
|
|
40
26
|
team_id?: string;
|
|
41
27
|
/** An opaque identifier for the agent session. When provided, the call is idempotent: if a channel already exists for this `session_id`, it is returned instead of creating a new one. */
|
|
42
28
|
session_id?: string;
|
|
43
|
-
/** A friendly display name for the code channel. Optional when `origin_channel_id` and `origin_message_ts` are provided
|
|
29
|
+
/** A friendly display name for the code channel. Optional when `origin_channel_id` and `origin_message_ts` are provided -- in that case the channel is named from the origin message and re-titled automatically. Required when no origin link is given. */
|
|
44
30
|
name: string;
|
|
45
31
|
/** Create a private channel instead of a public one. */
|
|
46
32
|
is_private?: boolean;
|
|
@@ -49,38 +35,14 @@ export interface CreateConversationRequest {
|
|
|
49
35
|
/** The message timestamp in the origin channel that started the agent session. Must be provided together with `origin_channel_id`. The author of this message is automatically invited to the newly created code channel. */
|
|
50
36
|
origin_message_ts?: string;
|
|
51
37
|
}
|
|
52
|
-
export const CreateConversationRequest = /*@__PURE__*/ S.suspend(() =>
|
|
53
|
-
S.Struct({
|
|
54
|
-
team_id: S.optional(S.String),
|
|
55
|
-
session_id: S.optional(S.String),
|
|
56
|
-
name: S.String,
|
|
57
|
-
is_private: S.optional(S.Boolean),
|
|
58
|
-
origin_channel_id: S.optional(S.String),
|
|
59
|
-
origin_message_ts: S.optional(S.String),
|
|
60
|
-
}).pipe(T.Http({ method: "POST", uri: "/agents.conversations.create", code: 200 })),
|
|
61
|
-
).annotate({
|
|
62
|
-
identifier: "CreateConversationRequest",
|
|
63
|
-
}) as any as S.Schema<CreateConversationRequest>;
|
|
64
|
-
|
|
65
38
|
export interface CreateConversationResponse {
|
|
66
39
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
67
40
|
ok: boolean;
|
|
68
41
|
/** The encoded ID of the newly created code channel. */
|
|
69
42
|
channel_id: string;
|
|
70
43
|
}
|
|
71
|
-
export const CreateConversationResponse = /*@__PURE__*/ S.suspend(() =>
|
|
72
|
-
S.Struct({
|
|
73
|
-
ok: S.Boolean,
|
|
74
|
-
channel_id: S.String,
|
|
75
|
-
}),
|
|
76
|
-
).annotate({
|
|
77
|
-
identifier: "CreateConversationResponse",
|
|
78
|
-
}) as any as S.Schema<CreateConversationResponse>;
|
|
79
|
-
|
|
80
44
|
/** Format to render the canvas content in. Defaults to markdown. */
|
|
81
45
|
export type GetCanvasRequestContentFormat = "markdown";
|
|
82
|
-
export const GetCanvasRequestContentFormat = S.String;
|
|
83
|
-
|
|
84
46
|
export interface GetCanvasRequest {
|
|
85
47
|
/** ID of the agent session channel the canvas belongs to. */
|
|
86
48
|
channel: string;
|
|
@@ -91,15 +53,6 @@ export interface GetCanvasRequest {
|
|
|
91
53
|
/** Whether to include resolved comment threads in the response. Defaults to false. */
|
|
92
54
|
include_resolved?: boolean;
|
|
93
55
|
}
|
|
94
|
-
export const GetCanvasRequest = /*@__PURE__*/ S.suspend(() =>
|
|
95
|
-
S.Struct({
|
|
96
|
-
channel: S.String,
|
|
97
|
-
canvas_id: S.String,
|
|
98
|
-
content_format: S.optional(GetCanvasRequestContentFormat),
|
|
99
|
-
include_resolved: S.optional(S.Boolean),
|
|
100
|
-
}).pipe(T.Http({ method: "POST", uri: "/agents.conversations.getCanvas", code: 200 })),
|
|
101
|
-
).annotate({ identifier: "GetCanvasRequest" }) as any as S.Schema<GetCanvasRequest>;
|
|
102
|
-
|
|
103
56
|
export interface GetCanvasResponseCommentsItemRepliesItem {
|
|
104
57
|
/** Message timestamp of the reply. */
|
|
105
58
|
ts: string;
|
|
@@ -108,23 +61,9 @@ export interface GetCanvasResponseCommentsItemRepliesItem {
|
|
|
108
61
|
/** Text of the reply. */
|
|
109
62
|
text: string;
|
|
110
63
|
}
|
|
111
|
-
export const GetCanvasResponseCommentsItemRepliesItem = /*@__PURE__*/ S.suspend(() =>
|
|
112
|
-
S.Struct({
|
|
113
|
-
ts: S.String,
|
|
114
|
-
user_id: S.String,
|
|
115
|
-
text: S.String,
|
|
116
|
-
}),
|
|
117
|
-
).annotate({
|
|
118
|
-
identifier: "GetCanvasResponseCommentsItemRepliesItem",
|
|
119
|
-
}) as any as S.Schema<GetCanvasResponseCommentsItemRepliesItem>;
|
|
120
|
-
|
|
121
64
|
/** Threaded replies to the comment, ordered oldest first. Capped to the most recent 100 replies; older replies are dropped first. */
|
|
122
65
|
export type GetCanvasResponseCommentsItemRepliesList =
|
|
123
66
|
Array<GetCanvasResponseCommentsItemRepliesItem>;
|
|
124
|
-
export const GetCanvasResponseCommentsItemRepliesList = /*@__PURE__*/ S.Array(
|
|
125
|
-
GetCanvasResponseCommentsItemRepliesItem,
|
|
126
|
-
) as any as S.Schema<GetCanvasResponseCommentsItemRepliesList>;
|
|
127
|
-
|
|
128
67
|
export interface GetCanvasResponseCommentsItem {
|
|
129
68
|
/** Stable ID of the comment thread (the canvas annotation the comment is anchored to). */
|
|
130
69
|
id: string;
|
|
@@ -143,27 +82,8 @@ export interface GetCanvasResponseCommentsItem {
|
|
|
143
82
|
/** True if the thread had more replies than the cap and older replies were dropped from the response. */
|
|
144
83
|
has_more_replies: boolean;
|
|
145
84
|
}
|
|
146
|
-
export const GetCanvasResponseCommentsItem = /*@__PURE__*/ S.suspend(() =>
|
|
147
|
-
S.Struct({
|
|
148
|
-
id: S.String,
|
|
149
|
-
ts: S.String,
|
|
150
|
-
user_id: S.String,
|
|
151
|
-
text: S.String,
|
|
152
|
-
quoted_text: S.String,
|
|
153
|
-
is_resolved: S.Boolean,
|
|
154
|
-
replies: GetCanvasResponseCommentsItemRepliesList,
|
|
155
|
-
has_more_replies: S.Boolean,
|
|
156
|
-
}),
|
|
157
|
-
).annotate({
|
|
158
|
-
identifier: "GetCanvasResponseCommentsItem",
|
|
159
|
-
}) as any as S.Schema<GetCanvasResponseCommentsItem>;
|
|
160
|
-
|
|
161
85
|
/** Comment threads on the canvas, ordered oldest first. Resolved threads are excluded unless include_resolved is true. */
|
|
162
86
|
export type GetCanvasResponseCommentsList = Array<GetCanvasResponseCommentsItem>;
|
|
163
|
-
export const GetCanvasResponseCommentsList = /*@__PURE__*/ S.Array(
|
|
164
|
-
GetCanvasResponseCommentsItem,
|
|
165
|
-
) as any as S.Schema<GetCanvasResponseCommentsList>;
|
|
166
|
-
|
|
167
87
|
export interface GetCanvasResponse {
|
|
168
88
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
169
89
|
ok: boolean;
|
|
@@ -178,27 +98,10 @@ export interface GetCanvasResponse {
|
|
|
178
98
|
/** True if the canvas had more comment threads than the cap and older threads were dropped from the response. */
|
|
179
99
|
has_more_comments: boolean;
|
|
180
100
|
}
|
|
181
|
-
export const GetCanvasResponse = /*@__PURE__*/ S.suspend(() =>
|
|
182
|
-
S.Struct({
|
|
183
|
-
ok: S.Boolean,
|
|
184
|
-
canvas_id: S.String,
|
|
185
|
-
title: S.String,
|
|
186
|
-
content: S.String,
|
|
187
|
-
comments: GetCanvasResponseCommentsList,
|
|
188
|
-
has_more_comments: S.Boolean,
|
|
189
|
-
}),
|
|
190
|
-
).annotate({ identifier: "GetCanvasResponse" }) as any as S.Schema<GetCanvasResponse>;
|
|
191
|
-
|
|
192
101
|
export interface ListViewsRequest {
|
|
193
102
|
/** ID of the code channel to list views for. */
|
|
194
103
|
channel_id: string;
|
|
195
104
|
}
|
|
196
|
-
export const ListViewsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
197
|
-
S.Struct({
|
|
198
|
-
channel_id: S.String,
|
|
199
|
-
}).pipe(T.Http({ method: "POST", uri: "/agents.conversations.listViews", code: 200 })),
|
|
200
|
-
).annotate({ identifier: "ListViewsRequest" }) as any as S.Schema<ListViewsRequest>;
|
|
201
|
-
|
|
202
105
|
export interface ListViewsResponseViewsItem {
|
|
203
106
|
/** The encoded channel tab ID of the view. */
|
|
204
107
|
view_id: string;
|
|
@@ -213,38 +116,14 @@ export interface ListViewsResponseViewsItem {
|
|
|
213
116
|
/** Unix timestamp of when the view was first created. */
|
|
214
117
|
date_added: number;
|
|
215
118
|
}
|
|
216
|
-
export const ListViewsResponseViewsItem = /*@__PURE__*/ S.suspend(() =>
|
|
217
|
-
S.Struct({
|
|
218
|
-
view_id: S.String,
|
|
219
|
-
view_key: S.String,
|
|
220
|
-
file_id: S.String,
|
|
221
|
-
label: S.String,
|
|
222
|
-
content_version: S.Number,
|
|
223
|
-
date_added: S.Number,
|
|
224
|
-
}),
|
|
225
|
-
).annotate({
|
|
226
|
-
identifier: "ListViewsResponseViewsItem",
|
|
227
|
-
}) as any as S.Schema<ListViewsResponseViewsItem>;
|
|
228
|
-
|
|
229
119
|
/** The agent views attached to the channel, in creation order. */
|
|
230
120
|
export type ListViewsResponseViewsList = Array<ListViewsResponseViewsItem>;
|
|
231
|
-
export const ListViewsResponseViewsList = /*@__PURE__*/ S.Array(
|
|
232
|
-
ListViewsResponseViewsItem,
|
|
233
|
-
) as any as S.Schema<ListViewsResponseViewsList>;
|
|
234
|
-
|
|
235
121
|
export interface ListViewsResponse {
|
|
236
122
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
237
123
|
ok: boolean;
|
|
238
124
|
/** The agent views attached to the channel, in creation order. */
|
|
239
125
|
views: ListViewsResponseViewsList;
|
|
240
126
|
}
|
|
241
|
-
export const ListViewsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
242
|
-
S.Struct({
|
|
243
|
-
ok: S.Boolean,
|
|
244
|
-
views: ListViewsResponseViewsList,
|
|
245
|
-
}),
|
|
246
|
-
).annotate({ identifier: "ListViewsResponse" }) as any as S.Schema<ListViewsResponse>;
|
|
247
|
-
|
|
248
127
|
export interface RemoveViewRequest {
|
|
249
128
|
/** ID of the code channel to remove the view from. */
|
|
250
129
|
channel_id: string;
|
|
@@ -253,14 +132,6 @@ export interface RemoveViewRequest {
|
|
|
253
132
|
/** Encoded channel tab ID of the view to remove. Provide exactly one of view_key or view_id. */
|
|
254
133
|
view_id?: string;
|
|
255
134
|
}
|
|
256
|
-
export const RemoveViewRequest = /*@__PURE__*/ S.suspend(() =>
|
|
257
|
-
S.Struct({
|
|
258
|
-
channel_id: S.String,
|
|
259
|
-
view_key: S.optional(S.String),
|
|
260
|
-
view_id: S.optional(S.String),
|
|
261
|
-
}).pipe(T.Http({ method: "POST", uri: "/agents.conversations.removeView", code: 200 })),
|
|
262
|
-
).annotate({ identifier: "RemoveViewRequest" }) as any as S.Schema<RemoveViewRequest>;
|
|
263
|
-
|
|
264
135
|
export interface RemoveViewResponse {
|
|
265
136
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
266
137
|
ok: boolean;
|
|
@@ -269,14 +140,6 @@ export interface RemoveViewResponse {
|
|
|
269
140
|
/** The encoded channel tab ID of the removed view. */
|
|
270
141
|
view_id: string;
|
|
271
142
|
}
|
|
272
|
-
export const RemoveViewResponse = /*@__PURE__*/ S.suspend(() =>
|
|
273
|
-
S.Struct({
|
|
274
|
-
ok: S.Boolean,
|
|
275
|
-
channel_id: S.String,
|
|
276
|
-
view_id: S.String,
|
|
277
|
-
}),
|
|
278
|
-
).annotate({ identifier: "RemoveViewResponse" }) as any as S.Schema<RemoveViewResponse>;
|
|
279
|
-
|
|
280
143
|
export interface RenameSessionRequest {
|
|
281
144
|
/** ID of the channel containing the agent session. Required for public channels. */
|
|
282
145
|
channel_id?: string;
|
|
@@ -285,14 +148,6 @@ export interface RenameSessionRequest {
|
|
|
285
148
|
/** Timestamp of the thread root message the session is scoped to. Required for thread-based sessions in regular channels and DMs. Must be omitted for session channels. */
|
|
286
149
|
thread_ts?: string;
|
|
287
150
|
}
|
|
288
|
-
export const RenameSessionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
289
|
-
S.Struct({
|
|
290
|
-
channel_id: S.optional(S.String),
|
|
291
|
-
title: S.String,
|
|
292
|
-
thread_ts: S.optional(S.String),
|
|
293
|
-
}).pipe(T.Http({ method: "POST", uri: "/agents.sessions.rename", code: 200 })),
|
|
294
|
-
).annotate({ identifier: "RenameSessionRequest" }) as any as S.Schema<RenameSessionRequest>;
|
|
295
|
-
|
|
296
151
|
export interface RenameSessionResponse {
|
|
297
152
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
298
153
|
ok: boolean;
|
|
@@ -301,14 +156,6 @@ export interface RenameSessionResponse {
|
|
|
301
156
|
/** The encoded ID of the channel, returned when an agent channel was renamed. */
|
|
302
157
|
channel_id?: string;
|
|
303
158
|
}
|
|
304
|
-
export const RenameSessionResponse = /*@__PURE__*/ S.suspend(() =>
|
|
305
|
-
S.Struct({
|
|
306
|
-
ok: S.Boolean,
|
|
307
|
-
title: S.optional(S.String),
|
|
308
|
-
channel_id: S.optional(S.String),
|
|
309
|
-
}),
|
|
310
|
-
).annotate({ identifier: "RenameSessionResponse" }) as any as S.Schema<RenameSessionResponse>;
|
|
311
|
-
|
|
312
159
|
export interface SetCanvasContentRequest {
|
|
313
160
|
/** ID of the agent session channel the canvas is attached to. */
|
|
314
161
|
channel: string;
|
|
@@ -317,14 +164,6 @@ export interface SetCanvasContentRequest {
|
|
|
317
164
|
/** The full new canvas content as markdown. The server diffs this against the current content and applies only the changed sections. */
|
|
318
165
|
content: string;
|
|
319
166
|
}
|
|
320
|
-
export const SetCanvasContentRequest = /*@__PURE__*/ S.suspend(() =>
|
|
321
|
-
S.Struct({
|
|
322
|
-
channel: S.String,
|
|
323
|
-
canvas_id: S.String,
|
|
324
|
-
content: S.String,
|
|
325
|
-
}).pipe(T.Http({ method: "POST", uri: "/agents.conversations.setCanvasContent", code: 200 })),
|
|
326
|
-
).annotate({ identifier: "SetCanvasContentRequest" }) as any as S.Schema<SetCanvasContentRequest>;
|
|
327
|
-
|
|
328
167
|
export interface SetCanvasContentResponse {
|
|
329
168
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
330
169
|
ok: boolean;
|
|
@@ -333,33 +172,14 @@ export interface SetCanvasContentResponse {
|
|
|
333
172
|
/** Number of section-level edit operations applied (replaced + inserted + deleted). Zero when the new content was identical to the current content. */
|
|
334
173
|
sections_changed_count: number;
|
|
335
174
|
}
|
|
336
|
-
export const SetCanvasContentResponse = /*@__PURE__*/ S.suspend(() =>
|
|
337
|
-
S.Struct({
|
|
338
|
-
ok: S.Boolean,
|
|
339
|
-
canvas_id: S.String,
|
|
340
|
-
sections_changed_count: S.Number,
|
|
341
|
-
}),
|
|
342
|
-
).annotate({ identifier: "SetCanvasContentResponse" }) as any as S.Schema<SetCanvasContentResponse>;
|
|
343
|
-
|
|
344
175
|
/** Full set of commands to register for the calling agent in this channel, replacing that agent's previously registered set. Pass an empty array to clear the agent's commands. At most 10 commands may exist across all agents in the channel; names must be unique within the set and must not collide with builtin Slack commands. */
|
|
345
176
|
export type SetCommandsRequestCommandsList = Array<unknown>;
|
|
346
|
-
export const SetCommandsRequestCommandsList = /*@__PURE__*/ S.Array(
|
|
347
|
-
S.Unknown,
|
|
348
|
-
) as any as S.Schema<SetCommandsRequestCommandsList>;
|
|
349
|
-
|
|
350
177
|
export interface SetCommandsRequest {
|
|
351
178
|
/** ID of the code channel to register commands for. */
|
|
352
179
|
channel_id: string;
|
|
353
180
|
/** Full set of commands to register for the calling agent in this channel, replacing that agent's previously registered set. Pass an empty array to clear the agent's commands. At most 10 commands may exist across all agents in the channel; names must be unique within the set and must not collide with builtin Slack commands. */
|
|
354
181
|
commands: SetCommandsRequestCommandsList;
|
|
355
182
|
}
|
|
356
|
-
export const SetCommandsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
357
|
-
S.Struct({
|
|
358
|
-
channel_id: S.String,
|
|
359
|
-
commands: SetCommandsRequestCommandsList,
|
|
360
|
-
}).pipe(T.Http({ method: "POST", uri: "/agents.conversations.setCommands", code: 200 })),
|
|
361
|
-
).annotate({ identifier: "SetCommandsRequest" }) as any as S.Schema<SetCommandsRequest>;
|
|
362
|
-
|
|
363
183
|
export interface SetCommandsResponse {
|
|
364
184
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
365
185
|
ok: boolean;
|
|
@@ -368,30 +188,12 @@ export interface SetCommandsResponse {
|
|
|
368
188
|
/** The number of commands now registered for the calling agent in this channel. */
|
|
369
189
|
command_count: number;
|
|
370
190
|
}
|
|
371
|
-
export const SetCommandsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
372
|
-
S.Struct({
|
|
373
|
-
ok: S.Boolean,
|
|
374
|
-
channel_id: S.String,
|
|
375
|
-
command_count: S.Number,
|
|
376
|
-
}),
|
|
377
|
-
).annotate({ identifier: "SetCommandsResponse" }) as any as S.Schema<SetCommandsResponse>;
|
|
378
|
-
|
|
379
191
|
/** New status for the agent session. */
|
|
380
192
|
export type SetPropertiesRequestStatus = "active" | "processing" | "suspended" | "closed";
|
|
381
|
-
export const SetPropertiesRequestStatus = S.String;
|
|
382
|
-
|
|
383
193
|
/** List of file paths relevant to this session. */
|
|
384
194
|
export type SetPropertiesRequestCodeChannelFilePathsList = Array<string>;
|
|
385
|
-
export const SetPropertiesRequestCodeChannelFilePathsList = /*@__PURE__*/ S.Array(
|
|
386
|
-
S.String,
|
|
387
|
-
) as any as S.Schema<SetPropertiesRequestCodeChannelFilePathsList>;
|
|
388
|
-
|
|
389
195
|
/** Configurable items to display in the channel context bar. A maximum of 5 items will be applied; any beyond that will be silently truncated and a warning returned. */
|
|
390
196
|
export type SetPropertiesRequestCodeChannelContextBarItemsList = Array<unknown>;
|
|
391
|
-
export const SetPropertiesRequestCodeChannelContextBarItemsList = /*@__PURE__*/ S.Array(
|
|
392
|
-
S.Unknown,
|
|
393
|
-
) as any as S.Schema<SetPropertiesRequestCodeChannelContextBarItemsList>;
|
|
394
|
-
|
|
395
197
|
/** Points to the current summary message for this code channel. Must reference a message within this channel. When the channel is archived with a summary_message_ts, this property is also set to record where the summary lives so clients can fetch it. */
|
|
396
198
|
export interface SetPropertiesRequestCodeChannelSummaryMessage {
|
|
397
199
|
/** Timestamp of the summary message in the code channel. */
|
|
@@ -399,15 +201,6 @@ export interface SetPropertiesRequestCodeChannelSummaryMessage {
|
|
|
399
201
|
/** Thread timestamp if the summary message is a thread reply. Clients need this to fetch the message via conversations.replies. */
|
|
400
202
|
thread_ts?: string;
|
|
401
203
|
}
|
|
402
|
-
export const SetPropertiesRequestCodeChannelSummaryMessage = /*@__PURE__*/ S.suspend(() =>
|
|
403
|
-
S.Struct({
|
|
404
|
-
message_ts: S.String,
|
|
405
|
-
thread_ts: S.optional(S.String),
|
|
406
|
-
}),
|
|
407
|
-
).annotate({
|
|
408
|
-
identifier: "SetPropertiesRequestCodeChannelSummaryMessage",
|
|
409
|
-
}) as any as S.Schema<SetPropertiesRequestCodeChannelSummaryMessage>;
|
|
410
|
-
|
|
411
204
|
/** Code channel properties to set. Only provided fields are updated. */
|
|
412
205
|
export interface SetPropertiesRequestCodeChannel {
|
|
413
206
|
/** Git hosting provider (e.g. github.com). */
|
|
@@ -445,30 +238,6 @@ export interface SetPropertiesRequestCodeChannel {
|
|
|
445
238
|
/** Points to the current summary message for this code channel. Must reference a message within this channel. When the channel is archived with a summary_message_ts, this property is also set to record where the summary lives so clients can fetch it. */
|
|
446
239
|
summary_message?: SetPropertiesRequestCodeChannelSummaryMessage;
|
|
447
240
|
}
|
|
448
|
-
export const SetPropertiesRequestCodeChannel = /*@__PURE__*/ S.suspend(() =>
|
|
449
|
-
S.Struct({
|
|
450
|
-
host: S.optional(S.String),
|
|
451
|
-
repo: S.optional(S.String),
|
|
452
|
-
branch: S.optional(S.String),
|
|
453
|
-
base_branch: S.optional(S.String),
|
|
454
|
-
commit_sha: S.optional(S.String),
|
|
455
|
-
pr_number: S.optional(S.Number),
|
|
456
|
-
pr_url: S.optional(S.String),
|
|
457
|
-
pr_title: S.optional(S.String),
|
|
458
|
-
pr_status: S.optional(S.String),
|
|
459
|
-
ci_url: S.optional(S.String),
|
|
460
|
-
ci_state: S.optional(S.String),
|
|
461
|
-
file_paths: S.optional(SetPropertiesRequestCodeChannelFilePathsList),
|
|
462
|
-
language: S.optional(S.String),
|
|
463
|
-
upstream_url: S.optional(S.String),
|
|
464
|
-
branch_url: S.optional(S.String),
|
|
465
|
-
context_bar_items: S.optional(SetPropertiesRequestCodeChannelContextBarItemsList),
|
|
466
|
-
summary_message: S.optional(SetPropertiesRequestCodeChannelSummaryMessage),
|
|
467
|
-
}),
|
|
468
|
-
).annotate({
|
|
469
|
-
identifier: "SetPropertiesRequestCodeChannel",
|
|
470
|
-
}) as any as S.Schema<SetPropertiesRequestCodeChannel>;
|
|
471
|
-
|
|
472
241
|
/** Agent resource properties to set. Only provided fields are updated. */
|
|
473
242
|
export interface SetPropertiesRequestAgentResource {
|
|
474
243
|
/** URL of the external resource. */
|
|
@@ -480,17 +249,6 @@ export interface SetPropertiesRequestAgentResource {
|
|
|
480
249
|
/** Provider of the external resource. */
|
|
481
250
|
provider?: string;
|
|
482
251
|
}
|
|
483
|
-
export const SetPropertiesRequestAgentResource = /*@__PURE__*/ S.suspend(() =>
|
|
484
|
-
S.Struct({
|
|
485
|
-
url: S.optional(S.String),
|
|
486
|
-
resource_type: S.optional(S.String),
|
|
487
|
-
title: S.optional(S.String),
|
|
488
|
-
provider: S.optional(S.String),
|
|
489
|
-
}),
|
|
490
|
-
).annotate({
|
|
491
|
-
identifier: "SetPropertiesRequestAgentResource",
|
|
492
|
-
}) as any as S.Schema<SetPropertiesRequestAgentResource>;
|
|
493
|
-
|
|
494
252
|
export interface SetPropertiesRequest {
|
|
495
253
|
/** ID of the code channel to update. */
|
|
496
254
|
channel_id: string;
|
|
@@ -503,33 +261,14 @@ export interface SetPropertiesRequest {
|
|
|
503
261
|
/** Agent resource properties to set. Only provided fields are updated. */
|
|
504
262
|
agent_resource?: SetPropertiesRequestAgentResource;
|
|
505
263
|
}
|
|
506
|
-
export const SetPropertiesRequest = /*@__PURE__*/ S.suspend(() =>
|
|
507
|
-
S.Struct({
|
|
508
|
-
channel_id: S.String,
|
|
509
|
-
title: S.optional(S.String),
|
|
510
|
-
status: S.optional(SetPropertiesRequestStatus),
|
|
511
|
-
code_channel: S.optional(SetPropertiesRequestCodeChannel),
|
|
512
|
-
agent_resource: S.optional(SetPropertiesRequestAgentResource),
|
|
513
|
-
}).pipe(T.Http({ method: "POST", uri: "/agents.conversations.setProperties", code: 200 })),
|
|
514
|
-
).annotate({ identifier: "SetPropertiesRequest" }) as any as S.Schema<SetPropertiesRequest>;
|
|
515
|
-
|
|
516
264
|
export interface SetPropertiesResponse {
|
|
517
265
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
518
266
|
ok: boolean;
|
|
519
267
|
/** The encoded ID of the updated code channel. */
|
|
520
268
|
channel_id: string;
|
|
521
269
|
}
|
|
522
|
-
export const SetPropertiesResponse = /*@__PURE__*/ S.suspend(() =>
|
|
523
|
-
S.Struct({
|
|
524
|
-
ok: S.Boolean,
|
|
525
|
-
channel_id: S.String,
|
|
526
|
-
}),
|
|
527
|
-
).annotate({ identifier: "SetPropertiesResponse" }) as any as S.Schema<SetPropertiesResponse>;
|
|
528
|
-
|
|
529
270
|
/** The lifecycle status to set. */
|
|
530
271
|
export type SetStatusRequestStatus = "active" | "processing" | "suspended" | "closed";
|
|
531
|
-
export const SetStatusRequestStatus = S.String;
|
|
532
|
-
|
|
533
272
|
export interface SetStatusRequest {
|
|
534
273
|
/** ID of the channel containing the agent session. Required for public channels. */
|
|
535
274
|
channel_id?: string;
|
|
@@ -548,19 +287,6 @@ export interface SetStatusRequest {
|
|
|
548
287
|
/** Display name override for the agent (max 200 characters). Remains in effect until you clear it (pass `null`) or set a new value. Requires the `chat:write.customize` scope. */
|
|
549
288
|
username?: string;
|
|
550
289
|
}
|
|
551
|
-
export const SetStatusRequest = /*@__PURE__*/ S.suspend(() =>
|
|
552
|
-
S.Struct({
|
|
553
|
-
channel_id: S.optional(S.String),
|
|
554
|
-
status: SetStatusRequestStatus,
|
|
555
|
-
thread_ts: S.optional(S.String),
|
|
556
|
-
title: S.optional(S.String),
|
|
557
|
-
initiator_user_id: S.optional(S.String),
|
|
558
|
-
icon_emoji: S.optional(S.String),
|
|
559
|
-
icon_url: S.optional(S.String),
|
|
560
|
-
username: S.optional(S.String),
|
|
561
|
-
}).pipe(T.Http({ method: "POST", uri: "/agents.sessions.setStatus", code: 200 })),
|
|
562
|
-
).annotate({ identifier: "SetStatusRequest" }) as any as S.Schema<SetStatusRequest>;
|
|
563
|
-
|
|
564
290
|
export interface SetStatusResponse {
|
|
565
291
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
566
292
|
ok: boolean;
|
|
@@ -571,31 +297,12 @@ export interface SetStatusResponse {
|
|
|
571
297
|
/** The current title of the agent session, if set. */
|
|
572
298
|
title?: string;
|
|
573
299
|
}
|
|
574
|
-
export const SetStatusResponse = /*@__PURE__*/ S.suspend(() =>
|
|
575
|
-
S.Struct({
|
|
576
|
-
ok: S.Boolean,
|
|
577
|
-
status: S.optional(S.Unknown),
|
|
578
|
-
agent_status: S.optional(S.Unknown),
|
|
579
|
-
title: S.optional(S.String),
|
|
580
|
-
}),
|
|
581
|
-
).annotate({ identifier: "SetStatusResponse" }) as any as S.Schema<SetStatusResponse>;
|
|
582
|
-
|
|
583
300
|
/** For canvas views: access level granted to the channel for the canvas tab. Defaults to write. Use 'comment' to grant channel members comment access (read and comment, no editing) so the agent remains the sole author of the canvas text. */
|
|
584
301
|
export type SetViewRequestAccessLevel = "read" | "write" | "comment";
|
|
585
|
-
export const SetViewRequestAccessLevel = S.String;
|
|
586
|
-
|
|
587
302
|
/** Origins the view may fetch()/XHR/WebSocket to. Accepted and stored, but not honored at render time yet. */
|
|
588
303
|
export type SetViewRequestCspConnectDomainsList = Array<string>;
|
|
589
|
-
export const SetViewRequestCspConnectDomainsList = /*@__PURE__*/ S.Array(
|
|
590
|
-
S.String,
|
|
591
|
-
) as any as S.Schema<SetViewRequestCspConnectDomainsList>;
|
|
592
|
-
|
|
593
304
|
/** Origins the view may load scripts/styles/fonts/images/media from, merged into the curated CDN allowlist at render time. */
|
|
594
305
|
export type SetViewRequestCspResourceDomainsList = Array<string>;
|
|
595
|
-
export const SetViewRequestCspResourceDomainsList = /*@__PURE__*/ S.Array(
|
|
596
|
-
S.String,
|
|
597
|
-
) as any as S.Schema<SetViewRequestCspResourceDomainsList>;
|
|
598
|
-
|
|
599
306
|
/** Content-Security-Policy domain declarations for the view. Domains are validated server-side (https-only, no private/internal hosts) and persisted. Only resource_domains is honored at render time today; connect_domains is accepted and stored for forward-compatibility but NOT honored yet. */
|
|
600
307
|
export interface SetViewRequestCsp {
|
|
601
308
|
/** Origins the view may fetch()/XHR/WebSocket to. Accepted and stored, but not honored at render time yet. */
|
|
@@ -603,13 +310,6 @@ export interface SetViewRequestCsp {
|
|
|
603
310
|
/** Origins the view may load scripts/styles/fonts/images/media from, merged into the curated CDN allowlist at render time. */
|
|
604
311
|
resource_domains?: SetViewRequestCspResourceDomainsList;
|
|
605
312
|
}
|
|
606
|
-
export const SetViewRequestCsp = /*@__PURE__*/ S.suspend(() =>
|
|
607
|
-
S.Struct({
|
|
608
|
-
connect_domains: S.optional(SetViewRequestCspConnectDomainsList),
|
|
609
|
-
resource_domains: S.optional(SetViewRequestCspResourceDomainsList),
|
|
610
|
-
}),
|
|
611
|
-
).annotate({ identifier: "SetViewRequestCsp" }) as any as S.Schema<SetViewRequestCsp>;
|
|
612
|
-
|
|
613
313
|
export interface SetViewRequest {
|
|
614
314
|
/** ID of the code channel to render the view in. */
|
|
615
315
|
channel_id: string;
|
|
@@ -617,7 +317,7 @@ export interface SetViewRequest {
|
|
|
617
317
|
type?: unknown;
|
|
618
318
|
/** Agent-assigned stable identity for the view (e.g. the source file path on the agent's machine). Used as the upsert key: calls with the same view_key update the same view. Required for html, block_kit, and canvas views; ignored for diff (a diff view is a per-channel singleton). */
|
|
619
319
|
view_key?: string;
|
|
620
|
-
/** View content. For html, a full self-contained HTML document; for diff, raw unified diff text. Capped at 1,000,000 bytes
|
|
320
|
+
/** View content. For html, a full self-contained HTML document; for diff, raw unified diff text. Capped at 1,000,000 bytes -- larger content returns content_too_large. The cap is enforced by the handler (not schema maxLength) so the documented error code actually surfaces instead of a generic argument-validation failure. Required when type is html or diff. */
|
|
621
321
|
content?: string;
|
|
622
322
|
/** Block Kit blocks to render in the view tab. Required when type is block_kit; ignored otherwise. */
|
|
623
323
|
blocks?: unknown;
|
|
@@ -640,25 +340,6 @@ export interface SetViewRequest {
|
|
|
640
340
|
/** Content-Security-Policy domain declarations for the view. Domains are validated server-side (https-only, no private/internal hosts) and persisted. Only resource_domains is honored at render time today; connect_domains is accepted and stored for forward-compatibility but NOT honored yet. */
|
|
641
341
|
csp?: SetViewRequestCsp;
|
|
642
342
|
}
|
|
643
|
-
export const SetViewRequest = /*@__PURE__*/ S.suspend(() =>
|
|
644
|
-
S.Struct({
|
|
645
|
-
channel_id: S.String,
|
|
646
|
-
type: S.optional(S.Unknown),
|
|
647
|
-
view_key: S.optional(S.String),
|
|
648
|
-
content: S.optional(S.String),
|
|
649
|
-
blocks: S.optional(S.Unknown),
|
|
650
|
-
canvas_id: S.optional(S.String),
|
|
651
|
-
access_level: S.optional(SetViewRequestAccessLevel),
|
|
652
|
-
agent_content_hash: S.optional(S.String),
|
|
653
|
-
pr_url: S.optional(S.String),
|
|
654
|
-
base_branch: S.optional(S.String),
|
|
655
|
-
head_branch: S.optional(S.String),
|
|
656
|
-
name: S.optional(S.String),
|
|
657
|
-
label: S.optional(S.String),
|
|
658
|
-
csp: S.optional(SetViewRequestCsp),
|
|
659
|
-
}).pipe(T.Http({ method: "POST", uri: "/agents.conversations.setView", code: 200 })),
|
|
660
|
-
).annotate({ identifier: "SetViewRequest" }) as any as S.Schema<SetViewRequest>;
|
|
661
|
-
|
|
662
343
|
export interface SetViewResponse {
|
|
663
344
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
664
345
|
ok: boolean;
|
|
@@ -675,179 +356,508 @@ export interface SetViewResponse {
|
|
|
675
356
|
/** For canvas views, the encoded ID of the attached canvas. Absent for other view types. */
|
|
676
357
|
canvas_id?: string;
|
|
677
358
|
}
|
|
678
|
-
export const SetViewResponse = /*@__PURE__*/ S.suspend(() =>
|
|
679
|
-
S.Struct({
|
|
680
|
-
ok: S.Boolean,
|
|
681
|
-
channel_id: S.String,
|
|
682
|
-
view_id: S.String,
|
|
683
|
-
file_id: S.String,
|
|
684
|
-
content_version: S.Number,
|
|
685
|
-
type: S.optional(S.Unknown),
|
|
686
|
-
canvas_id: S.optional(S.String),
|
|
687
|
-
}),
|
|
688
|
-
).annotate({ identifier: "SetViewResponse" }) as any as S.Schema<SetViewResponse>;
|
|
689
|
-
|
|
690
359
|
export type ArchiveConversationError = SlackOpError;
|
|
691
|
-
/** Archive a code channel. Required scopes
|
|
360
|
+
/** Archive a code channel. Required scopes -- bot: `code_channels:manage` Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` -- The specified channel_id does not correspond to a valid channel. - `not_agent_channel` -- The specified channel is not a code channel. - `not_authorized` -- The caller is not an authorized agent bot for this channel. - `already_archived` -- The channel has already been archived. - `restricted_action` -- The workspace does not allow the bot to archive channels. - `summary_message_not_found` -- The specified summary_message_ts does not correspond to a message in the code channel. - `no_origin_link` -- summary_message_ts was provided but the code channel has no origin_link set. - `origin_channel_not_found` -- The origin channel referenced by the code channel is no longer accessible. - `origin_message_not_found` -- The origin message referenced by the code channel's origin_link could not be found. See https://docs.slack.dev/reference/methods/agents.conversations.archive */
|
|
692
361
|
export const archiveConversation: API.OperationMethod<
|
|
693
362
|
ArchiveConversationRequest,
|
|
694
363
|
ArchiveConversationResponse,
|
|
695
364
|
ArchiveConversationError,
|
|
696
365
|
SlackOpContext
|
|
697
366
|
> = /*@__PURE__*/ API.make(() => ({
|
|
698
|
-
input: ArchiveConversationRequest
|
|
699
|
-
output: ArchiveConversationResponse
|
|
367
|
+
input: __S(0, __c0, 0) as any as S.Schema<ArchiveConversationRequest>,
|
|
368
|
+
output: __S(1, __c0, 1) as any as S.Schema<ArchiveConversationResponse>,
|
|
700
369
|
errors: [SlackError, SlackRateLimited],
|
|
701
370
|
protocol: SlackProtocol,
|
|
702
371
|
retry: Retry.Retry,
|
|
703
372
|
}));
|
|
704
373
|
|
|
705
374
|
export type CreateConversationError = SlackOpError;
|
|
706
|
-
/** Create a dedicated code channel for an agent session. Required scopes
|
|
375
|
+
/** Create a dedicated code channel for an agent session. Required scopes -- bot: `code_channels:manage` Method-specific errors (the `error` slug on the SlackError): - `feature_disabled` -- The caller is not authorized to create code channels. The app must be a recognized agent session app, or the user must have the feature enabled. - `user_not_enabled` -- The author of the origin message does not have the code channels feature enabled. - `invalid_agent` -- The agent bot user associated with the calling app is not a valid bot. - `channel_not_viewable` -- A channel exists for this session but the caller does not have permission to view it. - `origin_channel_externally_shared` -- The origin message is in an externally shared (Slack Connect) channel, DM, or group DM. Code channels cannot be created from a Slack Connect conversation. - `origin_channel_is_file_channel` -- The origin message is a comment on a file or canvas. Code channels cannot be created from a file channel -- when the canvas belongs to a code channel, continue that session instead. - `invalid_origin_link` -- The origin link is invalid. Either origin_channel_id and origin_message_ts were not provided together, the channel does not exist or is not accessible to the caller, or the message was not found at the given timestamp. - `name_or_origin_required` -- A name must be provided unless an origin link (origin_channel_id and origin_message_ts) is given to derive the channel name from. - `no_shared_workspace` -- No workspace could be found where both the app and the requesting user are present. The org app must have a workspace grant for at least one workspace the user belongs to. - `restricted_action` -- The calling user is not permitted to create channels of the requested type in this workspace. - `channel_creation_failed` -- The code channel could not be created. - `open_failed` -- The channel was created but could not be opened in the sidebar. - `invite_failed` -- The channel was created but the agent bot could not be invited. See https://docs.slack.dev/reference/methods/agents.conversations.create */
|
|
707
376
|
export const createConversation: API.OperationMethod<
|
|
708
377
|
CreateConversationRequest,
|
|
709
378
|
CreateConversationResponse,
|
|
710
379
|
CreateConversationError,
|
|
711
380
|
SlackOpContext
|
|
712
381
|
> = /*@__PURE__*/ API.make(() => ({
|
|
713
|
-
input: CreateConversationRequest
|
|
714
|
-
output: CreateConversationResponse
|
|
382
|
+
input: __S(8, __c1, 0) as any as S.Schema<CreateConversationRequest>,
|
|
383
|
+
output: __S(16, __c2, 0) as any as S.Schema<CreateConversationResponse>,
|
|
715
384
|
errors: [SlackError, SlackRateLimited],
|
|
716
385
|
protocol: SlackProtocol,
|
|
717
386
|
retry: Retry.Retry,
|
|
718
387
|
}));
|
|
719
388
|
|
|
720
389
|
export type GetCanvasError = SlackOpError;
|
|
721
|
-
/** Fetch a canvas attached to a code channel. Required scopes
|
|
390
|
+
/** Fetch a canvas attached to a code channel. Required scopes -- bot: `code_channels:manage` Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` -- The specified channel does not correspond to a valid channel. - `not_agent_channel` -- The specified channel is not an agent session channel. - `not_authorized` -- The caller is not an authorized agent bot for this channel. - `canvas_not_found` -- The specified `canvas_id` does not correspond to a canvas you can access. - `canvas_content_fetch_failed` -- The canvas content could not be fetched or rendered. - `comments_fetch_failed` -- The canvas comment threads could not be fetched. See https://docs.slack.dev/reference/methods/agents.conversations.getCanvas */
|
|
722
391
|
export const getCanvas: API.OperationMethod<
|
|
723
392
|
GetCanvasRequest,
|
|
724
393
|
GetCanvasResponse,
|
|
725
394
|
GetCanvasError,
|
|
726
395
|
SlackOpContext
|
|
727
396
|
> = /*@__PURE__*/ API.make(() => ({
|
|
728
|
-
input: GetCanvasRequest
|
|
729
|
-
output: GetCanvasResponse
|
|
397
|
+
input: __S(32, __c4, 0) as any as S.Schema<GetCanvasRequest>,
|
|
398
|
+
output: __S(37, __c4, 5) as any as S.Schema<GetCanvasResponse>,
|
|
730
399
|
errors: [SlackError, SlackRateLimited],
|
|
731
400
|
protocol: SlackProtocol,
|
|
732
401
|
retry: Retry.Retry,
|
|
733
402
|
}));
|
|
734
403
|
|
|
735
404
|
export type ListViewsError = SlackOpError;
|
|
736
|
-
/** List the views currently attached to a code channel. Required scopes
|
|
405
|
+
/** List the views currently attached to a code channel. Required scopes -- bot: `code_channels:manage` Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` -- The specified channel does not correspond to a valid channel. - `not_agent_channel` -- The specified channel is not a code channel. - `not_authorized` -- The caller is not an authorized agent bot or member for this channel. See https://docs.slack.dev/reference/methods/agents.conversations.listViews */
|
|
737
406
|
export const listViews: API.OperationMethod<
|
|
738
407
|
ListViewsRequest,
|
|
739
408
|
ListViewsResponse,
|
|
740
409
|
ListViewsError,
|
|
741
410
|
SlackOpContext
|
|
742
411
|
> = /*@__PURE__*/ API.make(() => ({
|
|
743
|
-
input: ListViewsRequest
|
|
744
|
-
output: ListViewsResponse
|
|
412
|
+
input: __S(40, __c5, 0) as any as S.Schema<ListViewsRequest>,
|
|
413
|
+
output: __S(43, __c5, 3) as any as S.Schema<ListViewsResponse>,
|
|
745
414
|
errors: [SlackError, SlackRateLimited],
|
|
746
415
|
protocol: SlackProtocol,
|
|
747
416
|
retry: Retry.Retry,
|
|
748
417
|
}));
|
|
749
418
|
|
|
750
419
|
export type RemoveViewError = SlackOpError;
|
|
751
|
-
/** Remove a view from a code channel. Required scopes
|
|
420
|
+
/** Remove a view from a code channel. Required scopes -- bot: `code_channels:manage` Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` -- The specified channel does not correspond to a valid channel. - `not_agent_channel` -- The specified channel is not a code channel. - `not_authorized` -- The caller is not an authorized agent bot or member for this channel. - `view_not_found` -- No agent view matches the supplied view_key or view_id in this channel. - `not_view_owner` -- The view was created by a different agent bot; only its owner may remove it. - `invalid_arguments` -- Exactly one of view_key or view_id must be provided. - `view_remove_failed` -- The view's tab or channel properties could not be updated. Safe to retry. See https://docs.slack.dev/reference/methods/agents.conversations.removeView */
|
|
752
421
|
export const removeView: API.OperationMethod<
|
|
753
422
|
RemoveViewRequest,
|
|
754
423
|
RemoveViewResponse,
|
|
755
424
|
RemoveViewError,
|
|
756
425
|
SlackOpContext
|
|
757
426
|
> = /*@__PURE__*/ API.make(() => ({
|
|
758
|
-
input: RemoveViewRequest
|
|
759
|
-
output: RemoveViewResponse
|
|
427
|
+
input: __S(48, __c6, 0) as any as S.Schema<RemoveViewRequest>,
|
|
428
|
+
output: __S(49, __c6, 1) as any as S.Schema<RemoveViewResponse>,
|
|
760
429
|
errors: [SlackError, SlackRateLimited],
|
|
761
430
|
protocol: SlackProtocol,
|
|
762
431
|
retry: Retry.Retry,
|
|
763
432
|
}));
|
|
764
433
|
|
|
765
434
|
export type RenameSessionError = SlackOpError;
|
|
766
|
-
/** Rename an agent session. Required scopes
|
|
435
|
+
/** Rename an agent session. Required scopes -- bot: `chat:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `feature_disabled` -- The agent tasks feature is not enabled for this workspace. - `channel_not_found` -- The specified channel does not exist or is not accessible. - `not_authorized` -- The calling app is not an authorized agent for this session. - `session_not_found` -- No agent session exists for the specified channel and thread. - `thread_ts_required` -- `thread_ts` is required for thread-based sessions in regular channels and DMs. - `thread_ts_not_allowed` -- `thread_ts` must not be provided for session channels. - `invalid_name` -- The `title` value is not valid for a channel name. - `name_taken` -- The new channel name is already taken. - `is_archived` -- Cannot rename an archived channel. - `internal_error` -- An internal error occurred while renaming the session. See https://docs.slack.dev/reference/methods/agents.sessions.rename */
|
|
767
436
|
export const renameSession: API.OperationMethod<
|
|
768
437
|
RenameSessionRequest,
|
|
769
438
|
RenameSessionResponse,
|
|
770
439
|
RenameSessionError,
|
|
771
440
|
SlackOpContext
|
|
772
441
|
> = /*@__PURE__*/ API.make(() => ({
|
|
773
|
-
input: RenameSessionRequest
|
|
774
|
-
output: RenameSessionResponse
|
|
442
|
+
input: __S(56, __c7, 0) as any as S.Schema<RenameSessionRequest>,
|
|
443
|
+
output: __S(57, __c7, 1) as any as S.Schema<RenameSessionResponse>,
|
|
775
444
|
errors: [SlackError, SlackRateLimited],
|
|
776
445
|
protocol: SlackProtocol,
|
|
777
446
|
retry: Retry.Retry,
|
|
778
447
|
}));
|
|
779
448
|
|
|
780
449
|
export type SetCanvasContentError = SlackOpError;
|
|
781
|
-
/** Replace the full markdown content of a plan canvas attached to a code channel. Required scopes
|
|
450
|
+
/** Replace the full markdown content of a plan canvas attached to a code channel. Required scopes -- bot: `code_channels:manage` Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` -- The specified channel does not correspond to a valid channel. - `not_agent_channel` -- The specified channel is not an agent session channel. - `feature_not_enabled` -- The set-canvas-content feature is not enabled for this user. - `not_authorized` -- The caller is not an authorized agent bot for this channel. - `canvas_not_found` -- The specified canvas_id does not correspond to a canvas you can access. - `content_too_large` -- The provided content exceeds the maximum canvas size. - `too_many_sections` -- The provided content or the existing canvas has too many sections to diff. Reduce the number of distinct blocks (paragraphs, headings, code fences) in the document. - `canvas_content_fetch_failed` -- The canvas's current content could not be read to compute the diff. - `canvas_content_update_failed` -- The canvas content could not be updated. See https://docs.slack.dev/reference/methods/agents.conversations.setCanvasContent */
|
|
782
451
|
export const setCanvasContent: API.OperationMethod<
|
|
783
452
|
SetCanvasContentRequest,
|
|
784
453
|
SetCanvasContentResponse,
|
|
785
454
|
SetCanvasContentError,
|
|
786
455
|
SlackOpContext
|
|
787
456
|
> = /*@__PURE__*/ API.make(() => ({
|
|
788
|
-
input: SetCanvasContentRequest
|
|
789
|
-
output: SetCanvasContentResponse
|
|
457
|
+
input: __S(64, __c8, 0) as any as S.Schema<SetCanvasContentRequest>,
|
|
458
|
+
output: __S(65, __c8, 1) as any as S.Schema<SetCanvasContentResponse>,
|
|
790
459
|
errors: [SlackError, SlackRateLimited],
|
|
791
460
|
protocol: SlackProtocol,
|
|
792
461
|
retry: Retry.Retry,
|
|
793
462
|
}));
|
|
794
463
|
|
|
795
464
|
export type SetCommandsError = SlackOpError;
|
|
796
|
-
/** Register the set of agent-defined slash commands for the calling agent in a code channel. Required scopes
|
|
465
|
+
/** Register the set of agent-defined slash commands for the calling agent in a code channel. Required scopes -- bot: `code_channels:manage` Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` -- The specified channel does not exist or is not accessible. - `not_agent_channel` -- The specified channel is not a code channel. - `not_authorized` -- The caller is not the channel's agent bot. - `agent_required` -- The caller is not a bot, so no agent could be determined for the command set. - `no_actions_url` -- The calling agent app has no configured request URL (slash command or interactivity), so it could not receive command invocations. - `too_many_agents` -- Registering a new agent would exceed the maximum number of agents with commands in this channel. - `invalid_commands` -- One or more commands are malformed (invalid name, missing description, or a field exceeds its length limit). - `too_many_commands` -- Registering this set would exceed the maximum of 10 commands across all agents in the channel. - `duplicate_command` -- Two or more commands in the set share the same name. - `colliding_with_builtin` -- One or more command names collide with a builtin Slack slash command. - `properties_update_failed` -- The command set could not be persisted to the channel properties. See https://docs.slack.dev/reference/methods/agents.conversations.setCommands */
|
|
797
466
|
export const setCommands: API.OperationMethod<
|
|
798
467
|
SetCommandsRequest,
|
|
799
468
|
SetCommandsResponse,
|
|
800
469
|
SetCommandsError,
|
|
801
470
|
SlackOpContext
|
|
802
471
|
> = /*@__PURE__*/ API.make(() => ({
|
|
803
|
-
input: SetCommandsRequest
|
|
804
|
-
output: SetCommandsResponse
|
|
472
|
+
input: __S(72, __c9, 0) as any as S.Schema<SetCommandsRequest>,
|
|
473
|
+
output: __S(73, __c9, 1) as any as S.Schema<SetCommandsResponse>,
|
|
805
474
|
errors: [SlackError, SlackRateLimited],
|
|
806
475
|
protocol: SlackProtocol,
|
|
807
476
|
retry: Retry.Retry,
|
|
808
477
|
}));
|
|
809
478
|
|
|
810
479
|
export type SetPropertiesError = SlackOpError;
|
|
811
|
-
/** Set properties on a code channel. Required scopes
|
|
480
|
+
/** Set properties on a code channel. Required scopes -- bot: `code_channels:manage` Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` -- The specified channel_id does not correspond to a valid channel. - `not_agent_channel` -- The specified channel is not a code channel. - `not_authorized` -- The caller is not an authorized agent bot for this channel. - `invalid_status` -- Value passed for `status` was not a valid agent session status. - `invalid_title` -- Value passed for `title` was invalid. - `no_properties_provided` -- At least one property field must be provided. See https://docs.slack.dev/reference/methods/agents.conversations.setProperties */
|
|
812
481
|
export const setProperties: API.OperationMethod<
|
|
813
482
|
SetPropertiesRequest,
|
|
814
483
|
SetPropertiesResponse,
|
|
815
484
|
SetPropertiesError,
|
|
816
485
|
SlackOpContext
|
|
817
486
|
> = /*@__PURE__*/ API.make(() => ({
|
|
818
|
-
input: SetPropertiesRequest
|
|
819
|
-
output: SetPropertiesResponse
|
|
487
|
+
input: __S(91, __c11, 3) as any as S.Schema<SetPropertiesRequest>,
|
|
488
|
+
output: __S(16, __c2, 0) as any as S.Schema<SetPropertiesResponse>,
|
|
820
489
|
errors: [SlackError, SlackRateLimited],
|
|
821
490
|
protocol: SlackProtocol,
|
|
822
491
|
retry: Retry.Retry,
|
|
823
492
|
}));
|
|
824
493
|
|
|
825
494
|
export type SetStatusError = SlackOpError;
|
|
826
|
-
/** Set an agent session's lifecycle status, creating the session if needed. Required scopes
|
|
495
|
+
/** Set an agent session's lifecycle status, creating the session if needed. Required scopes -- bot: `chat:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `feature_disabled` -- The agent tasks feature is not enabled for this workspace. - `channel_not_found` -- The specified channel does not exist or is not accessible. - `user_not_found` -- The specified `initiator_user_id` does not exist or is not accessible. - `not_authorized` -- The caller is not a member of the specified channel. - `invalid_status` -- The `status` value is not a valid agent session status. Must be one of: `active`, `processing`, `suspended`, `closed`. - `thread_ts_required` -- `thread_ts` is required for thread-based sessions in regular channels and DMs. - `thread_ts_not_allowed` -- `thread_ts` must not be provided for session channels. The channel-level session is updated automatically. - `internal_error` -- An internal error occurred while updating the session. See https://docs.slack.dev/reference/methods/agents.sessions.setStatus */
|
|
827
496
|
export const setStatus: API.OperationMethod<
|
|
828
497
|
SetStatusRequest,
|
|
829
498
|
SetStatusResponse,
|
|
830
499
|
SetStatusError,
|
|
831
500
|
SlackOpContext
|
|
832
501
|
> = /*@__PURE__*/ API.make(() => ({
|
|
833
|
-
input: SetStatusRequest
|
|
834
|
-
output: SetStatusResponse
|
|
502
|
+
input: __S(104, __c13, 0) as any as S.Schema<SetStatusRequest>,
|
|
503
|
+
output: __S(105, __c13, 1) as any as S.Schema<SetStatusResponse>,
|
|
835
504
|
errors: [SlackError, SlackRateLimited],
|
|
836
505
|
protocol: SlackProtocol,
|
|
837
506
|
retry: Retry.Retry,
|
|
838
507
|
}));
|
|
839
508
|
|
|
840
509
|
export type SetViewError = SlackOpError;
|
|
841
|
-
/** Create or update a view in a code channel. Required scopes
|
|
510
|
+
/** Create or update a view in a code channel. Required scopes -- bot: `code_channels:manage` Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` -- The specified channel does not correspond to a valid channel. - `not_agent_channel` -- The specified channel is not a code channel. - `not_authorized` -- The caller is not an authorized agent bot or member for this channel. - `content_too_large` -- The view content exceeds the maximum allowed size (1 MB). - `too_many_views` -- The channel already has the maximum number of views (5), or already has a diff view (at most 1 is allowed). - `invalid_csp_domain` -- One or more declared CSP domains failed validation (must be https:// origins, no private/reserved/internal hosts). - `invalid_view_type` -- The supplied type is not a recognized view type. - `missing_required_arg` -- A required argument for the supplied view type is missing (content for html/diff, blocks for block_kit, canvas_id for canvas, pr_url for pull_request). - `invalid_pr_url` -- The supplied pr_url is not a valid https pull request URL. - `invalid_blocks` -- The supplied blocks failed Block Kit validation. - `canvas_not_found` -- The specified canvas_id does not correspond to a canvas you can access. - `not_view_owner` -- The view already exists and was created by a different agent bot; only its owner may update it. - `view_creation_failed` -- The view could not be created as a channel tab. See https://docs.slack.dev/reference/methods/agents.conversations.setView */
|
|
842
511
|
export const setView: API.OperationMethod<
|
|
843
512
|
SetViewRequest,
|
|
844
513
|
SetViewResponse,
|
|
845
514
|
SetViewError,
|
|
846
515
|
SlackOpContext
|
|
847
516
|
> = /*@__PURE__*/ API.make(() => ({
|
|
848
|
-
input: SetViewRequest
|
|
849
|
-
output: SetViewResponse
|
|
517
|
+
input: __S(25, __c3, 1) as any as S.Schema<SetViewRequest>,
|
|
518
|
+
output: __S(26, __c3, 2) as any as S.Schema<SetViewResponse>,
|
|
850
519
|
errors: [SlackError, SlackRateLimited],
|
|
851
520
|
protocol: SlackProtocol,
|
|
852
521
|
retry: Retry.Retry,
|
|
853
522
|
}));
|
|
523
|
+
|
|
524
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
525
|
+
function __c0(j: number): any {
|
|
526
|
+
switch (j) {
|
|
527
|
+
case 0:
|
|
528
|
+
return S.suspend(() =>
|
|
529
|
+
S.Struct({
|
|
530
|
+
channel_id: S.String,
|
|
531
|
+
summary_message_ts: S.optional(S.String),
|
|
532
|
+
}).pipe(T.Http({ method: "POST", uri: "/agents.conversations.archive", code: 200 })),
|
|
533
|
+
).annotate({ identifier: "ArchiveConversationRequest" });
|
|
534
|
+
case 1:
|
|
535
|
+
return S.suspend(() =>
|
|
536
|
+
S.Struct({
|
|
537
|
+
ok: S.Boolean,
|
|
538
|
+
}),
|
|
539
|
+
).annotate({ identifier: "ArchiveConversationResponse" });
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
function __c1(j: number): any {
|
|
543
|
+
switch (j) {
|
|
544
|
+
case 0:
|
|
545
|
+
return S.suspend(() =>
|
|
546
|
+
S.Struct({
|
|
547
|
+
team_id: S.optional(S.String),
|
|
548
|
+
session_id: S.optional(S.String),
|
|
549
|
+
name: S.String,
|
|
550
|
+
is_private: S.optional(S.Boolean),
|
|
551
|
+
origin_channel_id: S.optional(S.String),
|
|
552
|
+
origin_message_ts: S.optional(S.String),
|
|
553
|
+
}).pipe(T.Http({ method: "POST", uri: "/agents.conversations.create", code: 200 })),
|
|
554
|
+
).annotate({ identifier: "CreateConversationRequest" });
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
function __c2(j: number): any {
|
|
558
|
+
switch (j) {
|
|
559
|
+
case 0:
|
|
560
|
+
return S.suspend(() =>
|
|
561
|
+
S.Struct({
|
|
562
|
+
ok: S.Boolean,
|
|
563
|
+
channel_id: S.String,
|
|
564
|
+
}),
|
|
565
|
+
).annotate({ identifier: "CreateConversationResponse" });
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
function __c3(j: number): any {
|
|
569
|
+
switch (j) {
|
|
570
|
+
case 0:
|
|
571
|
+
return S.suspend(() =>
|
|
572
|
+
S.Struct({
|
|
573
|
+
connect_domains: S.optional(__S(96, __c12, 0)),
|
|
574
|
+
resource_domains: S.optional(__S(96, __c12, 0)),
|
|
575
|
+
}),
|
|
576
|
+
).annotate({ identifier: "SetViewRequestCsp" });
|
|
577
|
+
case 1:
|
|
578
|
+
return S.suspend(() =>
|
|
579
|
+
S.Struct({
|
|
580
|
+
channel_id: S.String,
|
|
581
|
+
type: S.optional(S.Unknown),
|
|
582
|
+
view_key: S.optional(S.String),
|
|
583
|
+
content: S.optional(S.String),
|
|
584
|
+
blocks: S.optional(S.Unknown),
|
|
585
|
+
canvas_id: S.optional(S.String),
|
|
586
|
+
access_level: S.optional(S.String),
|
|
587
|
+
agent_content_hash: S.optional(S.String),
|
|
588
|
+
pr_url: S.optional(S.String),
|
|
589
|
+
base_branch: S.optional(S.String),
|
|
590
|
+
head_branch: S.optional(S.String),
|
|
591
|
+
name: S.optional(S.String),
|
|
592
|
+
label: S.optional(S.String),
|
|
593
|
+
csp: S.optional(__S(24, __c3, 0)),
|
|
594
|
+
}).pipe(T.Http({ method: "POST", uri: "/agents.conversations.setView", code: 200 })),
|
|
595
|
+
).annotate({ identifier: "SetViewRequest" });
|
|
596
|
+
case 2:
|
|
597
|
+
return S.suspend(() =>
|
|
598
|
+
S.Struct({
|
|
599
|
+
ok: S.Boolean,
|
|
600
|
+
channel_id: S.String,
|
|
601
|
+
view_id: S.String,
|
|
602
|
+
file_id: S.String,
|
|
603
|
+
content_version: S.Number,
|
|
604
|
+
type: S.optional(S.Unknown),
|
|
605
|
+
canvas_id: S.optional(S.String),
|
|
606
|
+
}),
|
|
607
|
+
).annotate({ identifier: "SetViewResponse" });
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
function __c4(j: number): any {
|
|
611
|
+
switch (j) {
|
|
612
|
+
case 0:
|
|
613
|
+
return S.suspend(() =>
|
|
614
|
+
S.Struct({
|
|
615
|
+
channel: S.String,
|
|
616
|
+
canvas_id: S.String,
|
|
617
|
+
content_format: S.optional(S.String),
|
|
618
|
+
include_resolved: S.optional(S.Boolean),
|
|
619
|
+
}).pipe(T.Http({ method: "POST", uri: "/agents.conversations.getCanvas", code: 200 })),
|
|
620
|
+
).annotate({ identifier: "GetCanvasRequest" });
|
|
621
|
+
case 1:
|
|
622
|
+
return S.suspend(() =>
|
|
623
|
+
S.Struct({
|
|
624
|
+
ts: S.String,
|
|
625
|
+
user_id: S.String,
|
|
626
|
+
text: S.String,
|
|
627
|
+
}),
|
|
628
|
+
).annotate({ identifier: "GetCanvasResponseCommentsItemRepliesItem" });
|
|
629
|
+
case 2:
|
|
630
|
+
return S.Array(__S(33, __c4, 1));
|
|
631
|
+
case 3:
|
|
632
|
+
return S.suspend(() =>
|
|
633
|
+
S.Struct({
|
|
634
|
+
id: S.String,
|
|
635
|
+
ts: S.String,
|
|
636
|
+
user_id: S.String,
|
|
637
|
+
text: S.String,
|
|
638
|
+
quoted_text: S.String,
|
|
639
|
+
is_resolved: S.Boolean,
|
|
640
|
+
replies: __S(34, __c4, 2),
|
|
641
|
+
has_more_replies: S.Boolean,
|
|
642
|
+
}),
|
|
643
|
+
).annotate({ identifier: "GetCanvasResponseCommentsItem" });
|
|
644
|
+
case 4:
|
|
645
|
+
return S.Array(__S(35, __c4, 3));
|
|
646
|
+
case 5:
|
|
647
|
+
return S.suspend(() =>
|
|
648
|
+
S.Struct({
|
|
649
|
+
ok: S.Boolean,
|
|
650
|
+
canvas_id: S.String,
|
|
651
|
+
title: S.String,
|
|
652
|
+
content: S.String,
|
|
653
|
+
comments: __S(36, __c4, 4),
|
|
654
|
+
has_more_comments: S.Boolean,
|
|
655
|
+
}),
|
|
656
|
+
).annotate({ identifier: "GetCanvasResponse" });
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
function __c5(j: number): any {
|
|
660
|
+
switch (j) {
|
|
661
|
+
case 0:
|
|
662
|
+
return S.suspend(() =>
|
|
663
|
+
S.Struct({
|
|
664
|
+
channel_id: S.String,
|
|
665
|
+
}).pipe(T.Http({ method: "POST", uri: "/agents.conversations.listViews", code: 200 })),
|
|
666
|
+
).annotate({ identifier: "ListViewsRequest" });
|
|
667
|
+
case 1:
|
|
668
|
+
return S.suspend(() =>
|
|
669
|
+
S.Struct({
|
|
670
|
+
view_id: S.String,
|
|
671
|
+
view_key: S.String,
|
|
672
|
+
file_id: S.String,
|
|
673
|
+
label: S.String,
|
|
674
|
+
content_version: S.Number,
|
|
675
|
+
date_added: S.Number,
|
|
676
|
+
}),
|
|
677
|
+
).annotate({ identifier: "ListViewsResponseViewsItem" });
|
|
678
|
+
case 2:
|
|
679
|
+
return S.Array(__S(41, __c5, 1));
|
|
680
|
+
case 3:
|
|
681
|
+
return S.suspend(() =>
|
|
682
|
+
S.Struct({
|
|
683
|
+
ok: S.Boolean,
|
|
684
|
+
views: __S(42, __c5, 2),
|
|
685
|
+
}),
|
|
686
|
+
).annotate({ identifier: "ListViewsResponse" });
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
function __c6(j: number): any {
|
|
690
|
+
switch (j) {
|
|
691
|
+
case 0:
|
|
692
|
+
return S.suspend(() =>
|
|
693
|
+
S.Struct({
|
|
694
|
+
channel_id: S.String,
|
|
695
|
+
view_key: S.optional(S.String),
|
|
696
|
+
view_id: S.optional(S.String),
|
|
697
|
+
}).pipe(T.Http({ method: "POST", uri: "/agents.conversations.removeView", code: 200 })),
|
|
698
|
+
).annotate({ identifier: "RemoveViewRequest" });
|
|
699
|
+
case 1:
|
|
700
|
+
return S.suspend(() =>
|
|
701
|
+
S.Struct({
|
|
702
|
+
ok: S.Boolean,
|
|
703
|
+
channel_id: S.String,
|
|
704
|
+
view_id: S.String,
|
|
705
|
+
}),
|
|
706
|
+
).annotate({ identifier: "RemoveViewResponse" });
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
function __c7(j: number): any {
|
|
710
|
+
switch (j) {
|
|
711
|
+
case 0:
|
|
712
|
+
return S.suspend(() =>
|
|
713
|
+
S.Struct({
|
|
714
|
+
channel_id: S.optional(S.String),
|
|
715
|
+
title: S.String,
|
|
716
|
+
thread_ts: S.optional(S.String),
|
|
717
|
+
}).pipe(T.Http({ method: "POST", uri: "/agents.sessions.rename", code: 200 })),
|
|
718
|
+
).annotate({ identifier: "RenameSessionRequest" });
|
|
719
|
+
case 1:
|
|
720
|
+
return S.suspend(() =>
|
|
721
|
+
S.Struct({
|
|
722
|
+
ok: S.Boolean,
|
|
723
|
+
title: S.optional(S.String),
|
|
724
|
+
channel_id: S.optional(S.String),
|
|
725
|
+
}),
|
|
726
|
+
).annotate({ identifier: "RenameSessionResponse" });
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
function __c8(j: number): any {
|
|
730
|
+
switch (j) {
|
|
731
|
+
case 0:
|
|
732
|
+
return S.suspend(() =>
|
|
733
|
+
S.Struct({
|
|
734
|
+
channel: S.String,
|
|
735
|
+
canvas_id: S.String,
|
|
736
|
+
content: S.String,
|
|
737
|
+
}).pipe(
|
|
738
|
+
T.Http({ method: "POST", uri: "/agents.conversations.setCanvasContent", code: 200 }),
|
|
739
|
+
),
|
|
740
|
+
).annotate({ identifier: "SetCanvasContentRequest" });
|
|
741
|
+
case 1:
|
|
742
|
+
return S.suspend(() =>
|
|
743
|
+
S.Struct({
|
|
744
|
+
ok: S.Boolean,
|
|
745
|
+
canvas_id: S.String,
|
|
746
|
+
sections_changed_count: S.Number,
|
|
747
|
+
}),
|
|
748
|
+
).annotate({ identifier: "SetCanvasContentResponse" });
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
function __c9(j: number): any {
|
|
752
|
+
switch (j) {
|
|
753
|
+
case 0:
|
|
754
|
+
return S.suspend(() =>
|
|
755
|
+
S.Struct({
|
|
756
|
+
channel_id: S.String,
|
|
757
|
+
commands: __S(80, __c10, 0),
|
|
758
|
+
}).pipe(T.Http({ method: "POST", uri: "/agents.conversations.setCommands", code: 200 })),
|
|
759
|
+
).annotate({ identifier: "SetCommandsRequest" });
|
|
760
|
+
case 1:
|
|
761
|
+
return S.suspend(() =>
|
|
762
|
+
S.Struct({
|
|
763
|
+
ok: S.Boolean,
|
|
764
|
+
channel_id: S.String,
|
|
765
|
+
command_count: S.Number,
|
|
766
|
+
}),
|
|
767
|
+
).annotate({ identifier: "SetCommandsResponse" });
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
function __c10(j: number): any {
|
|
771
|
+
switch (j) {
|
|
772
|
+
case 0:
|
|
773
|
+
return S.Array(S.Unknown);
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
function __c11(j: number): any {
|
|
777
|
+
switch (j) {
|
|
778
|
+
case 0:
|
|
779
|
+
return S.suspend(() =>
|
|
780
|
+
S.Struct({
|
|
781
|
+
message_ts: S.String,
|
|
782
|
+
thread_ts: S.optional(S.String),
|
|
783
|
+
}),
|
|
784
|
+
).annotate({ identifier: "SetPropertiesRequestCodeChannelSummaryMessage" });
|
|
785
|
+
case 1:
|
|
786
|
+
return S.suspend(() =>
|
|
787
|
+
S.Struct({
|
|
788
|
+
host: S.optional(S.String),
|
|
789
|
+
repo: S.optional(S.String),
|
|
790
|
+
branch: S.optional(S.String),
|
|
791
|
+
base_branch: S.optional(S.String),
|
|
792
|
+
commit_sha: S.optional(S.String),
|
|
793
|
+
pr_number: S.optional(S.Number),
|
|
794
|
+
pr_url: S.optional(S.String),
|
|
795
|
+
pr_title: S.optional(S.String),
|
|
796
|
+
pr_status: S.optional(S.String),
|
|
797
|
+
ci_url: S.optional(S.String),
|
|
798
|
+
ci_state: S.optional(S.String),
|
|
799
|
+
file_paths: S.optional(__S(96, __c12, 0)),
|
|
800
|
+
language: S.optional(S.String),
|
|
801
|
+
upstream_url: S.optional(S.String),
|
|
802
|
+
branch_url: S.optional(S.String),
|
|
803
|
+
context_bar_items: S.optional(__S(80, __c10, 0)),
|
|
804
|
+
summary_message: S.optional(__S(88, __c11, 0)),
|
|
805
|
+
}),
|
|
806
|
+
).annotate({ identifier: "SetPropertiesRequestCodeChannel" });
|
|
807
|
+
case 2:
|
|
808
|
+
return S.suspend(() =>
|
|
809
|
+
S.Struct({
|
|
810
|
+
url: S.optional(S.String),
|
|
811
|
+
resource_type: S.optional(S.String),
|
|
812
|
+
title: S.optional(S.String),
|
|
813
|
+
provider: S.optional(S.String),
|
|
814
|
+
}),
|
|
815
|
+
).annotate({ identifier: "SetPropertiesRequestAgentResource" });
|
|
816
|
+
case 3:
|
|
817
|
+
return S.suspend(() =>
|
|
818
|
+
S.Struct({
|
|
819
|
+
channel_id: S.String,
|
|
820
|
+
title: S.optional(S.String),
|
|
821
|
+
status: S.optional(S.String),
|
|
822
|
+
code_channel: S.optional(__S(89, __c11, 1)),
|
|
823
|
+
agent_resource: S.optional(__S(90, __c11, 2)),
|
|
824
|
+
}).pipe(T.Http({ method: "POST", uri: "/agents.conversations.setProperties", code: 200 })),
|
|
825
|
+
).annotate({ identifier: "SetPropertiesRequest" });
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
function __c12(j: number): any {
|
|
829
|
+
switch (j) {
|
|
830
|
+
case 0:
|
|
831
|
+
return S.Array(S.String);
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
function __c13(j: number): any {
|
|
835
|
+
switch (j) {
|
|
836
|
+
case 0:
|
|
837
|
+
return S.suspend(() =>
|
|
838
|
+
S.Struct({
|
|
839
|
+
channel_id: S.optional(S.String),
|
|
840
|
+
status: S.String,
|
|
841
|
+
thread_ts: S.optional(S.String),
|
|
842
|
+
title: S.optional(S.String),
|
|
843
|
+
initiator_user_id: S.optional(S.String),
|
|
844
|
+
icon_emoji: S.optional(S.String),
|
|
845
|
+
icon_url: S.optional(S.String),
|
|
846
|
+
username: S.optional(S.String),
|
|
847
|
+
}).pipe(T.Http({ method: "POST", uri: "/agents.sessions.setStatus", code: 200 })),
|
|
848
|
+
).annotate({ identifier: "SetStatusRequest" });
|
|
849
|
+
case 1:
|
|
850
|
+
return S.suspend(() =>
|
|
851
|
+
S.Struct({
|
|
852
|
+
ok: S.Boolean,
|
|
853
|
+
status: S.optional(S.Unknown),
|
|
854
|
+
agent_status: S.optional(S.Unknown),
|
|
855
|
+
title: S.optional(S.String),
|
|
856
|
+
}),
|
|
857
|
+
).annotate({ identifier: "SetStatusResponse" });
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
861
|
+
function __S(i: number, f: (j: number) => unknown, j: number): any {
|
|
862
|
+
return (__s[i] ??= __L.at(f, j));
|
|
863
|
+
}
|