@distilled.cloud/slack 1.0.0-rc.14 → 1.0.0-rc.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/credentials.d.ts +1 -1
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +39 -34
- package/lib/credentials.js.map +1 -1
- package/lib/errors.d.ts +31 -31
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +41 -41
- package/lib/errors.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +9 -9
- package/lib/pagination.d.ts +2 -2
- package/lib/pagination.js +28 -28
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +61 -59
- package/lib/protocol.js.map +1 -1
- package/lib/retry.d.ts +2 -2
- package/lib/retry.d.ts.map +1 -1
- package/lib/retry.js +34 -33
- package/lib/retry.js.map +1 -1
- package/lib/services/admin.d.ts +123 -575
- package/lib/services/admin.d.ts.map +1 -1
- package/lib/services/admin.js +304 -2878
- package/lib/services/agents.d.ts +13 -55
- package/lib/services/agents.d.ts.map +1 -1
- package/lib/services/agents.js +48 -309
- package/lib/services/api.d.ts +0 -4
- package/lib/services/api.d.ts.map +1 -1
- package/lib/services/api.js +16 -18
- package/lib/services/apps.d.ts +25 -106
- package/lib/services/apps.d.ts.map +1 -1
- package/lib/services/apps.js +84 -509
- package/lib/services/assistant.d.ts +6 -40
- package/lib/services/assistant.d.ts.map +1 -1
- package/lib/services/assistant.js +33 -204
- package/lib/services/auth.d.ts +4 -15
- package/lib/services/auth.d.ts.map +1 -1
- package/lib/services/auth.js +22 -90
- package/lib/services/blocks.d.ts +1 -7
- package/lib/services/blocks.d.ts.map +1 -1
- package/lib/services/blocks.js +16 -21
- package/lib/services/bookmarks.d.ts +4 -15
- package/lib/services/bookmarks.d.ts.map +1 -1
- package/lib/services/bookmarks.js +27 -76
- package/lib/services/bots.d.ts +1 -9
- package/lib/services/bots.d.ts.map +1 -1
- package/lib/services/bots.js +17 -54
- package/lib/services/calls.d.ts +6 -22
- package/lib/services/calls.d.ts.map +1 -1
- package/lib/services/calls.js +35 -110
- package/lib/services/canvases.d.ts +7 -35
- package/lib/services/canvases.d.ts.map +1 -1
- package/lib/services/canvases.js +39 -135
- package/lib/services/chat.d.ts +14 -83
- package/lib/services/chat.d.ts.map +1 -1
- package/lib/services/chat.js +59 -381
- package/lib/services/conversations.d.ts +31 -116
- package/lib/services/conversations.d.ts.map +1 -1
- package/lib/services/conversations.js +94 -690
- package/lib/services/dialog.d.ts +1 -4
- package/lib/services/dialog.d.ts.map +1 -1
- package/lib/services/dialog.js +13 -17
- package/lib/services/dnd.d.ts +5 -17
- package/lib/services/dnd.d.ts.map +1 -1
- package/lib/services/dnd.js +26 -91
- package/lib/services/emoji.d.ts +1 -8
- package/lib/services/emoji.d.ts.map +1 -1
- package/lib/services/emoji.js +18 -29
- package/lib/services/entity.d.ts +4 -16
- package/lib/services/entity.d.ts.map +1 -1
- package/lib/services/entity.js +29 -71
- package/lib/services/files.d.ts +16 -80
- package/lib/services/files.d.ts.map +1 -1
- package/lib/services/files.js +75 -433
- package/lib/services/functions.d.ts +8 -49
- package/lib/services/functions.d.ts.map +1 -1
- package/lib/services/functions.js +45 -203
- package/lib/services/lists.d.ts +13 -55
- package/lib/services/lists.d.ts.map +1 -1
- package/lib/services/lists.js +53 -248
- package/lib/services/migration.d.ts +1 -7
- package/lib/services/migration.d.ts.map +1 -1
- package/lib/services/migration.js +18 -27
- package/lib/services/oauth.d.ts +7 -43
- package/lib/services/oauth.d.ts.map +1 -1
- package/lib/services/oauth.js +34 -289
- package/lib/services/openid.d.ts +3 -10
- package/lib/services/openid.d.ts.map +1 -1
- package/lib/services/openid.js +19 -79
- package/lib/services/pins.d.ts +3 -13
- package/lib/services/pins.d.ts.map +1 -1
- package/lib/services/pins.js +27 -61
- package/lib/services/reactions.d.ts +5 -17
- package/lib/services/reactions.d.ts.map +1 -1
- package/lib/services/reactions.js +30 -96
- package/lib/services/reminders.d.ts +5 -17
- package/lib/services/reminders.d.ts.map +1 -1
- package/lib/services/reminders.js +33 -83
- package/lib/services/rtm.d.ts +2 -11
- package/lib/services/rtm.d.ts.map +1 -1
- package/lib/services/rtm.js +22 -56
- package/lib/services/search.d.ts +4 -35
- package/lib/services/search.d.ts.map +1 -1
- package/lib/services/search.js +28 -167
- package/lib/services/stars.d.ts +4 -26
- package/lib/services/stars.d.ts.map +1 -1
- package/lib/services/stars.js +28 -128
- package/lib/services/team.d.ts +11 -63
- package/lib/services/team.d.ts.map +1 -1
- package/lib/services/team.js +45 -289
- package/lib/services/tooling.d.ts +2 -5
- package/lib/services/tooling.d.ts.map +1 -1
- package/lib/services/tooling.js +15 -28
- package/lib/services/usergroups.d.ts +7 -31
- package/lib/services/usergroups.d.ts.map +1 -1
- package/lib/services/usergroups.js +40 -146
- package/lib/services/users.d.ts +14 -48
- package/lib/services/users.d.ts.map +1 -1
- package/lib/services/users.js +54 -249
- package/lib/services/views.d.ts +4 -14
- package/lib/services/views.d.ts.map +1 -1
- package/lib/services/views.js +28 -73
- package/lib/services/workflows.d.ts +8 -51
- package/lib/services/workflows.d.ts.map +1 -1
- package/lib/services/workflows.js +37 -188
- package/lib/traits.d.ts +1 -1
- package/lib/traits.js +8 -8
- package/package.json +14 -10
- 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/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/services/admin.js.map +0 -1
- package/lib/services/agents.js.map +0 -1
- package/lib/services/api.js.map +0 -1
- package/lib/services/apps.js.map +0 -1
- package/lib/services/assistant.js.map +0 -1
- package/lib/services/auth.js.map +0 -1
- package/lib/services/blocks.js.map +0 -1
- package/lib/services/bookmarks.js.map +0 -1
- package/lib/services/bots.js.map +0 -1
- package/lib/services/calls.js.map +0 -1
- package/lib/services/canvases.js.map +0 -1
- package/lib/services/chat.js.map +0 -1
- package/lib/services/conversations.js.map +0 -1
- package/lib/services/dialog.js.map +0 -1
- package/lib/services/dnd.js.map +0 -1
- package/lib/services/emoji.js.map +0 -1
- package/lib/services/entity.js.map +0 -1
- package/lib/services/files.js.map +0 -1
- package/lib/services/functions.js.map +0 -1
- package/lib/services/lists.js.map +0 -1
- package/lib/services/migration.js.map +0 -1
- package/lib/services/oauth.js.map +0 -1
- package/lib/services/openid.js.map +0 -1
- package/lib/services/pins.js.map +0 -1
- package/lib/services/reactions.js.map +0 -1
- package/lib/services/reminders.js.map +0 -1
- package/lib/services/rtm.js.map +0 -1
- package/lib/services/search.js.map +0 -1
- package/lib/services/stars.js.map +0 -1
- package/lib/services/team.js.map +0 -1
- package/lib/services/tooling.js.map +0 -1
- package/lib/services/usergroups.js.map +0 -1
- package/lib/services/users.js.map +0 -1
- package/lib/services/views.js.map +0 -1
- package/lib/services/workflows.js.map +0 -1
- package/src/protocol.test.ts +0 -372
package/lib/services/agents.js
CHANGED
|
@@ -1,315 +1,54 @@
|
|
|
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.js";
|
|
5
6
|
import { SlackProtocol } from "../protocol.js";
|
|
6
7
|
import * as Retry from "../retry.js";
|
|
7
8
|
import * as T from "../traits.js";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
export const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
export const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
export const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
text: S.String,
|
|
55
|
-
quoted_text: S.String,
|
|
56
|
-
is_resolved: S.Boolean,
|
|
57
|
-
replies: GetCanvasResponseCommentsItemRepliesList,
|
|
58
|
-
has_more_replies: S.Boolean,
|
|
59
|
-
})).annotate({
|
|
60
|
-
identifier: "GetCanvasResponseCommentsItem",
|
|
61
|
-
});
|
|
62
|
-
export const GetCanvasResponseCommentsList = /*@__PURE__*/ S.Array(GetCanvasResponseCommentsItem);
|
|
63
|
-
export const GetCanvasResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
64
|
-
ok: S.Boolean,
|
|
65
|
-
canvas_id: S.String,
|
|
66
|
-
title: S.String,
|
|
67
|
-
content: S.String,
|
|
68
|
-
comments: GetCanvasResponseCommentsList,
|
|
69
|
-
has_more_comments: S.Boolean,
|
|
70
|
-
})).annotate({ identifier: "GetCanvasResponse" });
|
|
71
|
-
export const ListViewsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
72
|
-
channel_id: S.String,
|
|
73
|
-
}).pipe(T.Http({ method: "POST", uri: "/agents.conversations.listViews", code: 200 }))).annotate({ identifier: "ListViewsRequest" });
|
|
74
|
-
export const ListViewsResponseViewsItem = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
75
|
-
view_id: S.String,
|
|
76
|
-
view_key: S.String,
|
|
77
|
-
file_id: S.String,
|
|
78
|
-
label: S.String,
|
|
79
|
-
content_version: S.Number,
|
|
80
|
-
date_added: S.Number,
|
|
81
|
-
})).annotate({
|
|
82
|
-
identifier: "ListViewsResponseViewsItem",
|
|
83
|
-
});
|
|
84
|
-
export const ListViewsResponseViewsList = /*@__PURE__*/ S.Array(ListViewsResponseViewsItem);
|
|
85
|
-
export const ListViewsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
86
|
-
ok: S.Boolean,
|
|
87
|
-
views: ListViewsResponseViewsList,
|
|
88
|
-
})).annotate({ identifier: "ListViewsResponse" });
|
|
89
|
-
export const RemoveViewRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
90
|
-
channel_id: S.String,
|
|
91
|
-
view_key: S.optional(S.String),
|
|
92
|
-
view_id: S.optional(S.String),
|
|
93
|
-
}).pipe(T.Http({ method: "POST", uri: "/agents.conversations.removeView", code: 200 }))).annotate({ identifier: "RemoveViewRequest" });
|
|
94
|
-
export const RemoveViewResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
95
|
-
ok: S.Boolean,
|
|
96
|
-
channel_id: S.String,
|
|
97
|
-
view_id: S.String,
|
|
98
|
-
})).annotate({ identifier: "RemoveViewResponse" });
|
|
99
|
-
export const RenameSessionRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
100
|
-
channel_id: S.optional(S.String),
|
|
101
|
-
title: S.String,
|
|
102
|
-
thread_ts: S.optional(S.String),
|
|
103
|
-
}).pipe(T.Http({ method: "POST", uri: "/agents.sessions.rename", code: 200 }))).annotate({ identifier: "RenameSessionRequest" });
|
|
104
|
-
export const RenameSessionResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
105
|
-
ok: S.Boolean,
|
|
106
|
-
title: S.optional(S.String),
|
|
107
|
-
channel_id: S.optional(S.String),
|
|
108
|
-
})).annotate({ identifier: "RenameSessionResponse" });
|
|
109
|
-
export const SetCanvasContentRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
110
|
-
channel: S.String,
|
|
111
|
-
canvas_id: S.String,
|
|
112
|
-
content: S.String,
|
|
113
|
-
}).pipe(T.Http({ method: "POST", uri: "/agents.conversations.setCanvasContent", code: 200 }))).annotate({ identifier: "SetCanvasContentRequest" });
|
|
114
|
-
export const SetCanvasContentResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
115
|
-
ok: S.Boolean,
|
|
116
|
-
canvas_id: S.String,
|
|
117
|
-
sections_changed_count: S.Number,
|
|
118
|
-
})).annotate({ identifier: "SetCanvasContentResponse" });
|
|
119
|
-
export const SetCommandsRequestCommandsList = /*@__PURE__*/ S.Array(S.Unknown);
|
|
120
|
-
export const SetCommandsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
121
|
-
channel_id: S.String,
|
|
122
|
-
commands: SetCommandsRequestCommandsList,
|
|
123
|
-
}).pipe(T.Http({ method: "POST", uri: "/agents.conversations.setCommands", code: 200 }))).annotate({ identifier: "SetCommandsRequest" });
|
|
124
|
-
export const SetCommandsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
125
|
-
ok: S.Boolean,
|
|
126
|
-
channel_id: S.String,
|
|
127
|
-
command_count: S.Number,
|
|
128
|
-
})).annotate({ identifier: "SetCommandsResponse" });
|
|
129
|
-
export const SetPropertiesRequestStatus = S.String;
|
|
130
|
-
export const SetPropertiesRequestCodeChannelFilePathsList = /*@__PURE__*/ S.Array(S.String);
|
|
131
|
-
export const SetPropertiesRequestCodeChannelContextBarItemsList = /*@__PURE__*/ S.Array(S.Unknown);
|
|
132
|
-
export const SetPropertiesRequestCodeChannelSummaryMessage = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
133
|
-
message_ts: S.String,
|
|
134
|
-
thread_ts: S.optional(S.String),
|
|
135
|
-
})).annotate({
|
|
136
|
-
identifier: "SetPropertiesRequestCodeChannelSummaryMessage",
|
|
137
|
-
});
|
|
138
|
-
export const SetPropertiesRequestCodeChannel = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
139
|
-
host: S.optional(S.String),
|
|
140
|
-
repo: S.optional(S.String),
|
|
141
|
-
branch: S.optional(S.String),
|
|
142
|
-
base_branch: S.optional(S.String),
|
|
143
|
-
commit_sha: S.optional(S.String),
|
|
144
|
-
pr_number: S.optional(S.Number),
|
|
145
|
-
pr_url: S.optional(S.String),
|
|
146
|
-
pr_title: S.optional(S.String),
|
|
147
|
-
pr_status: S.optional(S.String),
|
|
148
|
-
ci_url: S.optional(S.String),
|
|
149
|
-
ci_state: S.optional(S.String),
|
|
150
|
-
file_paths: S.optional(SetPropertiesRequestCodeChannelFilePathsList),
|
|
151
|
-
language: S.optional(S.String),
|
|
152
|
-
upstream_url: S.optional(S.String),
|
|
153
|
-
branch_url: S.optional(S.String),
|
|
154
|
-
context_bar_items: S.optional(SetPropertiesRequestCodeChannelContextBarItemsList),
|
|
155
|
-
summary_message: S.optional(SetPropertiesRequestCodeChannelSummaryMessage),
|
|
156
|
-
})).annotate({
|
|
157
|
-
identifier: "SetPropertiesRequestCodeChannel",
|
|
158
|
-
});
|
|
159
|
-
export const SetPropertiesRequestAgentResource = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
160
|
-
url: S.optional(S.String),
|
|
161
|
-
resource_type: S.optional(S.String),
|
|
162
|
-
title: S.optional(S.String),
|
|
163
|
-
provider: S.optional(S.String),
|
|
164
|
-
})).annotate({
|
|
165
|
-
identifier: "SetPropertiesRequestAgentResource",
|
|
166
|
-
});
|
|
167
|
-
export const SetPropertiesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
168
|
-
channel_id: S.String,
|
|
169
|
-
title: S.optional(S.String),
|
|
170
|
-
status: S.optional(SetPropertiesRequestStatus),
|
|
171
|
-
code_channel: S.optional(SetPropertiesRequestCodeChannel),
|
|
172
|
-
agent_resource: S.optional(SetPropertiesRequestAgentResource),
|
|
173
|
-
}).pipe(T.Http({ method: "POST", uri: "/agents.conversations.setProperties", code: 200 }))).annotate({ identifier: "SetPropertiesRequest" });
|
|
174
|
-
export const SetPropertiesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
175
|
-
ok: S.Boolean,
|
|
176
|
-
channel_id: S.String,
|
|
177
|
-
})).annotate({ identifier: "SetPropertiesResponse" });
|
|
178
|
-
export const SetStatusRequestStatus = S.String;
|
|
179
|
-
export const SetStatusRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
180
|
-
channel_id: S.optional(S.String),
|
|
181
|
-
status: SetStatusRequestStatus,
|
|
182
|
-
thread_ts: S.optional(S.String),
|
|
183
|
-
title: S.optional(S.String),
|
|
184
|
-
initiator_user_id: S.optional(S.String),
|
|
185
|
-
icon_emoji: S.optional(S.String),
|
|
186
|
-
icon_url: S.optional(S.String),
|
|
187
|
-
username: S.optional(S.String),
|
|
188
|
-
}).pipe(T.Http({ method: "POST", uri: "/agents.sessions.setStatus", code: 200 }))).annotate({ identifier: "SetStatusRequest" });
|
|
189
|
-
export const SetStatusResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
190
|
-
ok: S.Boolean,
|
|
191
|
-
status: S.optional(S.Unknown),
|
|
192
|
-
agent_status: S.optional(S.Unknown),
|
|
193
|
-
title: S.optional(S.String),
|
|
194
|
-
})).annotate({ identifier: "SetStatusResponse" });
|
|
195
|
-
export const SetViewRequestAccessLevel = S.String;
|
|
196
|
-
export const SetViewRequestCspConnectDomainsList = /*@__PURE__*/ S.Array(S.String);
|
|
197
|
-
export const SetViewRequestCspResourceDomainsList = /*@__PURE__*/ S.Array(S.String);
|
|
198
|
-
export const SetViewRequestCsp = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
199
|
-
connect_domains: S.optional(SetViewRequestCspConnectDomainsList),
|
|
200
|
-
resource_domains: S.optional(SetViewRequestCspResourceDomainsList),
|
|
201
|
-
})).annotate({ identifier: "SetViewRequestCsp" });
|
|
202
|
-
export const SetViewRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
203
|
-
channel_id: S.String,
|
|
204
|
-
type: S.optional(S.Unknown),
|
|
205
|
-
view_key: S.optional(S.String),
|
|
206
|
-
content: S.optional(S.String),
|
|
207
|
-
blocks: S.optional(S.Unknown),
|
|
208
|
-
canvas_id: S.optional(S.String),
|
|
209
|
-
access_level: S.optional(SetViewRequestAccessLevel),
|
|
210
|
-
agent_content_hash: S.optional(S.String),
|
|
211
|
-
pr_url: S.optional(S.String),
|
|
212
|
-
base_branch: S.optional(S.String),
|
|
213
|
-
head_branch: S.optional(S.String),
|
|
214
|
-
name: S.optional(S.String),
|
|
215
|
-
label: S.optional(S.String),
|
|
216
|
-
csp: S.optional(SetViewRequestCsp),
|
|
217
|
-
}).pipe(T.Http({ method: "POST", uri: "/agents.conversations.setView", code: 200 }))).annotate({ identifier: "SetViewRequest" });
|
|
218
|
-
export const SetViewResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
219
|
-
ok: S.Boolean,
|
|
220
|
-
channel_id: S.String,
|
|
221
|
-
view_id: S.String,
|
|
222
|
-
file_id: S.String,
|
|
223
|
-
content_version: S.Number,
|
|
224
|
-
type: S.optional(S.Unknown),
|
|
225
|
-
canvas_id: S.optional(S.String),
|
|
226
|
-
})).annotate({ identifier: "SetViewResponse" });
|
|
227
|
-
/** 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 */
|
|
228
|
-
export const archiveConversation = /*@__PURE__*/ API.make(() => ({
|
|
229
|
-
input: ArchiveConversationRequest,
|
|
230
|
-
output: ArchiveConversationResponse,
|
|
231
|
-
errors: [SlackError, SlackRateLimited],
|
|
232
|
-
protocol: SlackProtocol,
|
|
233
|
-
retry: Retry.Retry,
|
|
234
|
-
}));
|
|
235
|
-
/** 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 */
|
|
236
|
-
export const createConversation = /*@__PURE__*/ API.make(() => ({
|
|
237
|
-
input: CreateConversationRequest,
|
|
238
|
-
output: CreateConversationResponse,
|
|
239
|
-
errors: [SlackError, SlackRateLimited],
|
|
240
|
-
protocol: SlackProtocol,
|
|
241
|
-
retry: Retry.Retry,
|
|
242
|
-
}));
|
|
243
|
-
/** 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 */
|
|
244
|
-
export const getCanvas = /*@__PURE__*/ API.make(() => ({
|
|
245
|
-
input: GetCanvasRequest,
|
|
246
|
-
output: GetCanvasResponse,
|
|
247
|
-
errors: [SlackError, SlackRateLimited],
|
|
248
|
-
protocol: SlackProtocol,
|
|
249
|
-
retry: Retry.Retry,
|
|
250
|
-
}));
|
|
251
|
-
/** 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 */
|
|
252
|
-
export const listViews = /*@__PURE__*/ API.make(() => ({
|
|
253
|
-
input: ListViewsRequest,
|
|
254
|
-
output: ListViewsResponse,
|
|
255
|
-
errors: [SlackError, SlackRateLimited],
|
|
256
|
-
protocol: SlackProtocol,
|
|
257
|
-
retry: Retry.Retry,
|
|
258
|
-
}));
|
|
259
|
-
/** 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 */
|
|
260
|
-
export const removeView = /*@__PURE__*/ API.make(() => ({
|
|
261
|
-
input: RemoveViewRequest,
|
|
262
|
-
output: RemoveViewResponse,
|
|
263
|
-
errors: [SlackError, SlackRateLimited],
|
|
264
|
-
protocol: SlackProtocol,
|
|
265
|
-
retry: Retry.Retry,
|
|
266
|
-
}));
|
|
267
|
-
/** 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 */
|
|
268
|
-
export const renameSession = /*@__PURE__*/ API.make(() => ({
|
|
269
|
-
input: RenameSessionRequest,
|
|
270
|
-
output: RenameSessionResponse,
|
|
271
|
-
errors: [SlackError, SlackRateLimited],
|
|
272
|
-
protocol: SlackProtocol,
|
|
273
|
-
retry: Retry.Retry,
|
|
274
|
-
}));
|
|
275
|
-
/** 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 */
|
|
276
|
-
export const setCanvasContent = /*@__PURE__*/ API.make(() => ({
|
|
277
|
-
input: SetCanvasContentRequest,
|
|
278
|
-
output: SetCanvasContentResponse,
|
|
279
|
-
errors: [SlackError, SlackRateLimited],
|
|
280
|
-
protocol: SlackProtocol,
|
|
281
|
-
retry: Retry.Retry,
|
|
282
|
-
}));
|
|
283
|
-
/** 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 */
|
|
284
|
-
export const setCommands = /*@__PURE__*/ API.make(() => ({
|
|
285
|
-
input: SetCommandsRequest,
|
|
286
|
-
output: SetCommandsResponse,
|
|
287
|
-
errors: [SlackError, SlackRateLimited],
|
|
288
|
-
protocol: SlackProtocol,
|
|
289
|
-
retry: Retry.Retry,
|
|
290
|
-
}));
|
|
291
|
-
/** 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 */
|
|
292
|
-
export const setProperties = /*@__PURE__*/ API.make(() => ({
|
|
293
|
-
input: SetPropertiesRequest,
|
|
294
|
-
output: SetPropertiesResponse,
|
|
295
|
-
errors: [SlackError, SlackRateLimited],
|
|
296
|
-
protocol: SlackProtocol,
|
|
297
|
-
retry: Retry.Retry,
|
|
298
|
-
}));
|
|
299
|
-
/** 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 */
|
|
300
|
-
export const setStatus = /*@__PURE__*/ API.make(() => ({
|
|
301
|
-
input: SetStatusRequest,
|
|
302
|
-
output: SetStatusResponse,
|
|
303
|
-
errors: [SlackError, SlackRateLimited],
|
|
304
|
-
protocol: SlackProtocol,
|
|
305
|
-
retry: Retry.Retry,
|
|
306
|
-
}));
|
|
307
|
-
/** 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 */
|
|
308
|
-
export const setView = /*@__PURE__*/ API.make(() => ({
|
|
309
|
-
input: SetViewRequest,
|
|
310
|
-
output: SetViewResponse,
|
|
311
|
-
errors: [SlackError, SlackRateLimited],
|
|
312
|
-
protocol: SlackProtocol,
|
|
313
|
-
retry: Retry.Retry,
|
|
314
|
-
}));
|
|
315
|
-
//# sourceMappingURL=agents.js.map
|
|
9
|
+
const __0 = __L.at;
|
|
10
|
+
const __1 = T.Http;
|
|
11
|
+
const __2 = S.String;
|
|
12
|
+
const __3 = S.optional;
|
|
13
|
+
const __4 = S.Struct;
|
|
14
|
+
const __5 = S.suspend;
|
|
15
|
+
const __6 = S.Boolean;
|
|
16
|
+
const __7 = S.Unknown;
|
|
17
|
+
const __8 = S.Number;
|
|
18
|
+
const __9 = S.Array;
|
|
19
|
+
|
|
20
|
+
export const archiveConversation = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$7,$8],protocol:$9,retry:$10};$5(>3)@"ArchiveConversationRequest";$5(>4)@"ArchiveConversationResponse";$4({channel_id:$2,summary_message_ts:$3($2)}).pipe($1({method:"POST",uri:"/agents.conversations.archive",code:200}));$4({ok:$6})', [__0, __1, __2, __3, __4, __5, __6, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(archiveConversation, i));
|
|
21
|
+
|
|
22
|
+
export const createConversation = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#7:0,errors:[$8,$9],protocol:$10,retry:$11};$6(>2)@"CreateConversationRequest";$5({team_id:$3($2),session_id:$3($2),name:$2,is_private:$3($4),origin_channel_id:$3($2),origin_message_ts:$3($2)}).pipe($1({method:"POST",uri:"/agents.conversations.create",code:200}))', [__0, __1, __2, __3, __6, __4, __5, __d0, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(createConversation, i));
|
|
23
|
+
|
|
24
|
+
export const getCanvas = /*@__PURE__*/ API.op((i) => i === API.D ? API.named("GetCanvasResponse", '{input:#1,output:#6,errors:[$8,$9],protocol:$10,retry:$11};$6(>7)@"GetCanvasRequest";$6(>8)@"%CommentsItemRepliesItem";$7(#2);$6(>9)@"%CommentsItem";$7(#4);$6(>10)@"%";$5({channel:$2,canvas_id:$2,content_format:$3($2),include_resolved:$3($4)}).pipe($1({method:"POST",uri:"/agents.conversations.getCanvas",code:200}));$5({ts:$2,user_id:$2,text:$2});$5({id:$2,ts:$2,user_id:$2,text:$2,quoted_text:$2,is_resolved:$4,replies:#3,has_more_replies:$4});$5({ok:$4,canvas_id:$2,title:$2,content:$2,comments:#5,has_more_comments:$4})', [__0, __1, __2, __3, __6, __4, __5, __9, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]) : API.call(getCanvas, i));
|
|
25
|
+
|
|
26
|
+
export const listViews = /*@__PURE__*/ API.op((i) => i === API.D ? API.named("ListViewsResponse", '{input:#1,output:#4,errors:[$8,$9],protocol:$10,retry:$11};$4(>5)@"ListViewsRequest";$4(>6)@"%ViewsItem";$6(#2);$4(>7)@"%";$3({channel_id:$2}).pipe($1({method:"POST",uri:"/agents.conversations.listViews",code:200}));$3({view_id:$2,view_key:$2,file_id:$2,label:$2,content_version:$5,date_added:$5});$3({ok:$7,views:#3})', [__0, __1, __2, __4, __5, __8, __9, __6, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]) : API.call(listViews, i));
|
|
27
|
+
|
|
28
|
+
export const removeView = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$7,$8],protocol:$9,retry:$10};$5(>3)@"RemoveViewRequest";$5(>4)@"RemoveViewResponse";$4({channel_id:$2,view_key:$3($2),view_id:$3($2)}).pipe($1({method:"POST",uri:"/agents.conversations.removeView",code:200}));$4({ok:$6,channel_id:$2,view_id:$2})', [__0, __1, __2, __3, __4, __5, __6, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(removeView, i));
|
|
29
|
+
|
|
30
|
+
export const renameSession = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$7,$8],protocol:$9,retry:$10};$5(>3)@"RenameSessionRequest";$5(>4)@"RenameSessionResponse";$4({channel_id:$3($2),title:$2,thread_ts:$3($2)}).pipe($1({method:"POST",uri:"/agents.sessions.rename",code:200}));$4({ok:$6,title:$3($2),channel_id:$3($2)})', [__0, __1, __2, __3, __4, __5, __6, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(renameSession, i));
|
|
31
|
+
|
|
32
|
+
export const setCanvasContent = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$7,$8],protocol:$9,retry:$10};$4(>3)@"SetCanvasContentRequest";$4(>4)@"SetCanvasContentResponse";$3({channel:$2,canvas_id:$2,content:$2}).pipe($1({method:"POST",uri:"/agents.conversations.setCanvasContent",code:200}));$3({ok:$5,canvas_id:$2,sections_changed_count:$6})', [__0, __1, __2, __4, __5, __6, __8, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(setCanvasContent, i));
|
|
33
|
+
|
|
34
|
+
export const setCommands = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$8,$9],protocol:$10,retry:$11};$5(>3)@"SetCommandsRequest";$5(>4)@"SetCommandsResponse";$4({channel_id:$2,commands:#3:0}).pipe($1({method:"POST",uri:"/agents.conversations.setCommands",code:200}));$4({ok:$6,channel_id:$2,command_count:$7})', [__0, __1, __2, __d1, __4, __5, __6, __8, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(setCommands, i));
|
|
35
|
+
|
|
36
|
+
export const setProperties = /*@__PURE__*/ API.op((i) => i === API.D ? API.named("SetPropertiesRequest", '{input:#4,output:#9:0,errors:[$10,$11],protocol:$12,retry:$13};$4(>5)@"%CodeChannelSummaryMessage";$4(>6)@"%CodeChannel";$4(>7)@"%AgentResource";$4(>8)@"%";$3({message_ts:$1,thread_ts:$2($1)});$3({host:$2($1),repo:$2($1),branch:$2($1),base_branch:$2($1),commit_sha:$2($1),pr_number:$2($5),pr_url:$2($1),pr_title:$2($1),pr_status:$2($1),ci_url:$2($1),ci_state:$2($1),file_paths:$2(#6:0),language:$2($1),upstream_url:$2($1),branch_url:$2($1),context_bar_items:$2(#7:0),summary_message:$2(#1)});$3({url:$2($1),resource_type:$2($1),title:$2($1),provider:$2($1)});$3({channel_id:$1,title:$2($1),status:$2($1),code_channel:$2(#2),agent_resource:$2(#3)}).pipe($8({method:"POST",uri:"/agents.conversations.setProperties",code:200}))', [__0, __2, __3, __4, __5, __8, __d2, __d1, __1, __d0, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]) : API.call(setProperties, i));
|
|
37
|
+
|
|
38
|
+
export const setStatus = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$8,$9],protocol:$10,retry:$11};$5(>3)@"SetStatusRequest";$5(>4)@"SetStatusResponse";$4({channel_id:$3($2),status:$2,thread_ts:$3($2),title:$3($2),initiator_user_id:$3($2),icon_emoji:$3($2),icon_url:$3($2),username:$3($2)}).pipe($1({method:"POST",uri:"/agents.sessions.setStatus",code:200}));$4({ok:$6,status:$3($7),agent_status:$3($7),title:$3($2)})', [__0, __1, __2, __3, __4, __5, __6, __7, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(setStatus, i));
|
|
39
|
+
|
|
40
|
+
export const setView = /*@__PURE__*/ API.op((i) => i === API.D ? API.named("SetViewRequest", '{input:#2,output:#3,errors:[$10,$11],protocol:$12,retry:$13};$4(>4)@"%Csp";$4(>5)@"%";$4(>6)@"SetViewResponse";$3({connect_domains:$2(#1:0),resource_domains:$2(#1:0)});$3({channel_id:$6,type:$2($7),view_key:$2($6),content:$2($6),blocks:$2($7),canvas_id:$2($6),access_level:$2($6),agent_content_hash:$2($6),pr_url:$2($6),base_branch:$2($6),head_branch:$2($6),name:$2($6),label:$2($6),csp:$2(#1)}).pipe($5({method:"POST",uri:"/agents.conversations.setView",code:200}));$3({ok:$8,channel_id:$6,view_id:$6,file_id:$6,content_version:$9,type:$2($7),canvas_id:$2($6)})', [__0, __d2, __3, __4, __5, __1, __2, __7, __6, __8, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]) : API.call(setView, i));
|
|
41
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
42
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
// Shared schema data (see `op` in core/api).
|
|
46
|
+
function __d0() {
|
|
47
|
+
return ['$4(>1)@"CreateConversationResponse";$3({ok:$1,channel_id:$2})', [__0, __6, __2, __4, __5]];
|
|
48
|
+
}
|
|
49
|
+
function __d1() {
|
|
50
|
+
return ['$2($1)', [__0, __7, __9]];
|
|
51
|
+
}
|
|
52
|
+
function __d2() {
|
|
53
|
+
return ['$2($1)', [__0, __2, __9]];
|
|
54
|
+
}
|
package/lib/services/api.d.ts
CHANGED
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
import * as API from "@distilled.cloud/core/api";
|
|
2
|
-
import * as S from "@distilled.cloud/core/schema";
|
|
3
2
|
import { type SlackOpError, type SlackOpContext } from "../protocol.ts";
|
|
4
3
|
export type { SlackOpError, SlackOpContext };
|
|
5
4
|
export interface TestApiRequest {
|
|
6
5
|
/** Error response to return */
|
|
7
6
|
error?: string;
|
|
8
7
|
}
|
|
9
|
-
export declare const TestApiRequest: S.Schema<TestApiRequest>;
|
|
10
8
|
export type TestApiResponseArgsMap = {
|
|
11
9
|
[key: string]: unknown | undefined;
|
|
12
10
|
};
|
|
13
|
-
export declare const TestApiResponseArgsMap: S.Schema<TestApiResponseArgsMap>;
|
|
14
11
|
export interface TestApiResponse {
|
|
15
12
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
16
13
|
ok: boolean;
|
|
17
14
|
args?: TestApiResponseArgsMap;
|
|
18
15
|
}
|
|
19
|
-
export declare const TestApiResponse: S.Schema<TestApiResponse>;
|
|
20
16
|
export type TestApiError = SlackOpError;
|
|
21
17
|
/** Checks API calling code. Rate limit tier: 4 See https://docs.slack.dev/reference/methods/api.test */
|
|
22
18
|
export declare const testApi: API.OperationMethod<TestApiRequest, TestApiResponse, TestApiError, SlackOpContext>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/services/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/services/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAKjD,OAAO,EAAiB,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAMvF,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;AAE7C,MAAM,WAAW,cAAc;IAC7B,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AACD,MAAM,MAAM,sBAAsB,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;CAAE,CAAC;AAC5E,MAAM,WAAW,eAAe;IAC9B,kEAAkE;IAClE,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,CAAC,EAAE,sBAAsB,CAAC;CAC/B;AACD,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC;AACxC,wGAAwG;AACxG,eAAO,MAAM,OAAO,EAAE,GAAG,CAAC,eAAe,CACvC,cAAc,EACd,eAAe,EACf,YAAY,EACZ,cAAc,CAOb,CAAC"}
|
package/lib/services/api.js
CHANGED
|
@@ -1,24 +1,22 @@
|
|
|
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.js";
|
|
5
6
|
import { SlackProtocol } from "../protocol.js";
|
|
6
7
|
import * as Retry from "../retry.js";
|
|
7
8
|
import * as T from "../traits.js";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
retry: Retry.Retry,
|
|
23
|
-
}));
|
|
24
|
-
//# sourceMappingURL=api.js.map
|
|
9
|
+
const __0 = __L.at;
|
|
10
|
+
const __1 = T.Http;
|
|
11
|
+
const __2 = S.String;
|
|
12
|
+
const __3 = S.optional;
|
|
13
|
+
const __4 = S.Struct;
|
|
14
|
+
const __5 = S.suspend;
|
|
15
|
+
const __6 = S.Unknown;
|
|
16
|
+
const __7 = S.Record;
|
|
17
|
+
const __8 = S.Boolean;
|
|
18
|
+
|
|
19
|
+
export const testApi = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#3,errors:[$9,$10],protocol:$11,retry:$12};$5(>4)@"TestApiRequest";$7($2,$6);$5(>5)@"TestApiResponse";$4({error:$3($2)}).pipe($1({method:"POST",uri:"/api.test",code:200}));$4({ok:$8,args:$3(#2)})', [__0, __1, __2, __3, __4, __5, __6, __7, __8, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(testApi, i));
|
|
20
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
21
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
22
|
+
|