@distilled.cloud/slack 1.0.0-rc.18 → 1.0.0-rc.20
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/_bundle/sdk.js +1 -1
- package/lib/_bundle/sdk.js.map +1 -1
- package/lib/protocol.d.ts +2 -1
- package/lib/protocol.d.ts.map +1 -1
- package/lib/services/admin.d.ts +594 -356
- package/lib/services/admin.d.ts.map +1 -1
- package/lib/services/admin.js +149 -140
- package/lib/services/admin.js.map +1 -1
- package/lib/services/agents.d.ts +89 -97
- package/lib/services/agents.d.ts.map +1 -1
- package/lib/services/agents.js +1 -1
- package/lib/services/agents.js.map +1 -1
- package/lib/services/api.d.ts +2 -2
- package/lib/services/api.d.ts.map +1 -1
- package/lib/services/api.js +1 -1
- package/lib/services/api.js.map +1 -1
- package/lib/services/apps.d.ts +74 -74
- package/lib/services/apps.d.ts.map +1 -1
- package/lib/services/apps.js +32 -32
- package/lib/services/apps.js.map +1 -1
- package/lib/services/assistant.d.ts +55 -46
- package/lib/services/assistant.d.ts.map +1 -1
- package/lib/services/assistant.js +1 -1
- package/lib/services/assistant.js.map +1 -1
- package/lib/services/auth.d.ts +27 -27
- package/lib/services/auth.d.ts.map +1 -1
- package/lib/services/auth.js +1 -1
- package/lib/services/auth.js.map +1 -1
- package/lib/services/blocks.d.ts +3 -3
- package/lib/services/blocks.d.ts.map +1 -1
- package/lib/services/blocks.js +1 -1
- package/lib/services/blocks.js.map +1 -1
- package/lib/services/bookmarks.d.ts +19 -19
- package/lib/services/bookmarks.d.ts.map +1 -1
- package/lib/services/bookmarks.js +1 -1
- package/lib/services/bookmarks.js.map +1 -1
- package/lib/services/bots.d.ts +23 -23
- package/lib/services/bots.d.ts.map +1 -1
- package/lib/services/bots.js +1 -1
- package/lib/services/bots.js.map +1 -1
- package/lib/services/calls.d.ts +10 -10
- package/lib/services/calls.d.ts.map +1 -1
- package/lib/services/calls.js +1 -1
- package/lib/services/calls.js.map +1 -1
- package/lib/services/canvases.d.ts +18 -18
- package/lib/services/canvases.d.ts.map +1 -1
- package/lib/services/canvases.js +1 -1
- package/lib/services/canvases.js.map +1 -1
- package/lib/services/chat.d.ts +103 -103
- package/lib/services/chat.d.ts.map +1 -1
- package/lib/services/chat.js +1 -1
- package/lib/services/chat.js.map +1 -1
- package/lib/services/conversations.d.ts +109 -103
- package/lib/services/conversations.d.ts.map +1 -1
- package/lib/services/conversations.js +38 -38
- package/lib/services/conversations.js.map +1 -1
- package/lib/services/dialog.js +1 -1
- package/lib/services/dialog.js.map +1 -1
- package/lib/services/dnd.d.ts +14 -14
- package/lib/services/dnd.d.ts.map +1 -1
- package/lib/services/dnd.js +1 -1
- package/lib/services/dnd.js.map +1 -1
- package/lib/services/emoji.d.ts +6 -6
- package/lib/services/emoji.d.ts.map +1 -1
- package/lib/services/emoji.js +1 -1
- package/lib/services/emoji.js.map +1 -1
- package/lib/services/entity.d.ts +14 -14
- package/lib/services/entity.d.ts.map +1 -1
- package/lib/services/entity.js +1 -1
- package/lib/services/entity.js.map +1 -1
- package/lib/services/files.d.ts +106 -106
- package/lib/services/files.d.ts.map +1 -1
- package/lib/services/files.js +26 -26
- package/lib/services/files.js.map +1 -1
- package/lib/services/functions.d.ts +37 -37
- package/lib/services/functions.d.ts.map +1 -1
- package/lib/services/functions.js +1 -1
- package/lib/services/functions.js.map +1 -1
- package/lib/services/index.d.ts +1 -0
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/index.js +1 -0
- package/lib/services/lists.d.ts +47 -45
- package/lib/services/lists.d.ts.map +1 -1
- package/lib/services/lists.js +1 -1
- package/lib/services/lists.js.map +1 -1
- package/lib/services/migration.d.ts +3 -3
- package/lib/services/migration.d.ts.map +1 -1
- package/lib/services/migration.js +1 -1
- package/lib/services/migration.js.map +1 -1
- package/lib/services/oauth.d.ts +102 -102
- package/lib/services/oauth.d.ts.map +1 -1
- package/lib/services/oauth.js +1 -1
- package/lib/services/oauth.js.map +1 -1
- package/lib/services/openid.d.ts +40 -40
- package/lib/services/openid.d.ts.map +1 -1
- package/lib/services/openid.js +1 -1
- package/lib/services/openid.js.map +1 -1
- package/lib/services/pins.d.ts +9 -9
- package/lib/services/pins.d.ts.map +1 -1
- package/lib/services/pins.js +1 -1
- package/lib/services/pins.js.map +1 -1
- package/lib/services/reactions.d.ts +23 -23
- package/lib/services/reactions.d.ts.map +1 -1
- package/lib/services/reactions.js +1 -1
- package/lib/services/reactions.js.map +1 -1
- package/lib/services/reminders.d.ts +8 -8
- package/lib/services/reminders.d.ts.map +1 -1
- package/lib/services/reminders.js +1 -1
- package/lib/services/reminders.js.map +1 -1
- package/lib/services/rtm.d.ts +11 -11
- package/lib/services/rtm.d.ts.map +1 -1
- package/lib/services/rtm.js +1 -1
- package/lib/services/rtm.js.map +1 -1
- package/lib/services/search.d.ts +84 -80
- package/lib/services/search.d.ts.map +1 -1
- package/lib/services/search.js +1 -1
- package/lib/services/search.js.map +1 -1
- package/lib/services/slackbot.d.ts +366 -0
- package/lib/services/slackbot.d.ts.map +1 -0
- package/lib/services/slackbot.js +2 -0
- package/lib/services/slackbot.js.map +1 -0
- package/lib/services/stars.d.ts +16 -16
- package/lib/services/stars.d.ts.map +1 -1
- package/lib/services/stars.js +1 -1
- package/lib/services/stars.js.map +1 -1
- package/lib/services/team.d.ts +39 -37
- package/lib/services/team.d.ts.map +1 -1
- package/lib/services/team.js +1 -1
- package/lib/services/team.js.map +1 -1
- package/lib/services/tooling.js +1 -1
- package/lib/services/tooling.js.map +1 -1
- package/lib/services/usergroups.d.ts +30 -30
- package/lib/services/usergroups.d.ts.map +1 -1
- package/lib/services/usergroups.js +1 -1
- package/lib/services/usergroups.js.map +1 -1
- package/lib/services/users.d.ts +37 -37
- package/lib/services/users.d.ts.map +1 -1
- package/lib/services/users.js +1 -1
- package/lib/services/users.js.map +1 -1
- package/lib/services/views.d.ts +9 -9
- package/lib/services/views.d.ts.map +1 -1
- package/lib/services/views.js +1 -1
- package/lib/services/views.js.map +1 -1
- package/lib/services/workflows.d.ts +16 -16
- package/lib/services/workflows.d.ts.map +1 -1
- package/lib/services/workflows.js +1 -1
- package/lib/services/workflows.js.map +1 -1
- package/lib/services.lazy/admin.js +2 -2
- package/lib/services.lazy/apps.js +1 -1
- package/lib/services.lazy/conversations.js +1 -1
- package/lib/services.lazy/files.js +1 -1
- package/lib/services.lazy/index.js +2 -2
- package/lib/services.lazy/slackbot.js +1 -0
- package/package.json +6 -6
- package/src/protocol.ts +3 -5
- package/src/services/admin.ts +1609 -1016
- package/src/services/agents.ts +93 -103
- package/src/services/api.ts +2 -2
- package/src/services/apps.ts +74 -74
- package/src/services/assistant.ts +88 -56
- package/src/services/auth.ts +27 -27
- package/src/services/blocks.ts +3 -3
- package/src/services/bookmarks.ts +19 -19
- package/src/services/bots.ts +23 -23
- package/src/services/calls.ts +10 -10
- package/src/services/canvases.ts +50 -46
- package/src/services/chat.ts +103 -103
- package/src/services/conversations.ts +126 -115
- package/src/services/dnd.ts +14 -14
- package/src/services/emoji.ts +6 -6
- package/src/services/entity.ts +14 -14
- package/src/services/files.ts +106 -106
- package/src/services/functions.ts +37 -37
- package/src/services/index.ts +1 -0
- package/src/services/lists.ts +49 -46
- package/src/services/migration.ts +3 -3
- package/src/services/oauth.ts +102 -102
- package/src/services/openid.ts +40 -40
- package/src/services/pins.ts +9 -9
- package/src/services/reactions.ts +23 -23
- package/src/services/reminders.ts +8 -8
- package/src/services/rtm.ts +11 -11
- package/src/services/search.ts +123 -130
- package/src/services/slackbot.ts +766 -0
- package/src/services/stars.ts +16 -16
- package/src/services/team.ts +42 -37
- package/src/services/usergroups.ts +30 -30
- package/src/services/users.ts +37 -37
- package/src/services/views.ts +9 -9
- package/src/services/workflows.ts +16 -16
|
@@ -0,0 +1,766 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
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-lite";
|
|
4
|
+
import * as __L from "@distilled.cloud/core/schema-lite";
|
|
5
|
+
import { SlackError, SlackRateLimited } from "../errors.ts";
|
|
6
|
+
import { slackPaginate } from "../pagination.ts";
|
|
7
|
+
import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
|
|
8
|
+
import * as Retry from "../retry.ts";
|
|
9
|
+
import * as T from "../traits.ts";
|
|
10
|
+
// Schema table, filled on first reach (see __S at the end).
|
|
11
|
+
const __s: any[] = [];
|
|
12
|
+
|
|
13
|
+
export type { SlackOpError, SlackOpContext };
|
|
14
|
+
|
|
15
|
+
/** Span facts shared by every operation (com.distilled.telemetry#service). */
|
|
16
|
+
const TELEMETRY = {
|
|
17
|
+
system: "slack-api",
|
|
18
|
+
responseHeaders: [
|
|
19
|
+
{ header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
|
|
20
|
+
{ header: "request-id", name: "http.response.header.request-id", transform: "list" },
|
|
21
|
+
{ header: "x-slack-req-id", name: "http.response.header.x-slack-req-id", transform: "list" },
|
|
22
|
+
],
|
|
23
|
+
prefix: "Slack",
|
|
24
|
+
service: "Slackbot",
|
|
25
|
+
propagate: "w3c",
|
|
26
|
+
} as const;
|
|
27
|
+
|
|
28
|
+
export interface AddSkillsLibraryRequest {
|
|
29
|
+
/** Skill to turn on for the caller. */
|
|
30
|
+
skill_id: string;
|
|
31
|
+
}
|
|
32
|
+
export interface AddSkillsLibraryResponse {
|
|
33
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
34
|
+
ok: boolean;
|
|
35
|
+
}
|
|
36
|
+
/** One of the skill categories. */
|
|
37
|
+
export type CreateSkillRequestCategory =
|
|
38
|
+
| "communication"
|
|
39
|
+
| "customer_support"
|
|
40
|
+
| "data_and_analytics"
|
|
41
|
+
| "engineering"
|
|
42
|
+
| "product_management"
|
|
43
|
+
| "productivity"
|
|
44
|
+
| "professional_development"
|
|
45
|
+
| "project_management"
|
|
46
|
+
| "sales"
|
|
47
|
+
| "system"
|
|
48
|
+
| "team_management"
|
|
49
|
+
| "other";
|
|
50
|
+
/** An app the skill needs. App servers use `app_id` and `server_id`, Salesforce servers use `permission_namespace`, and built-in servers use `service_type` alone. */
|
|
51
|
+
export interface CreateSkillRequestMcpServersItem {
|
|
52
|
+
/** The server's service type: `app` for an app's MCP server, `salesforce`, or a built-in service type. */
|
|
53
|
+
service_type: string;
|
|
54
|
+
/** App ID. Present for app servers (`service_type` is `app`). */
|
|
55
|
+
app_id?: string | undefined;
|
|
56
|
+
/** ID of the app's MCP server. Present for app servers (`service_type` is `app`). */
|
|
57
|
+
server_id?: string | undefined;
|
|
58
|
+
/** Permission namespace. Present for Salesforce servers (`service_type` is `salesforce`). */
|
|
59
|
+
permission_namespace?: string | undefined;
|
|
60
|
+
}
|
|
61
|
+
/** Apps the skill needs, capped at the caller's MCP server limit. Declaring an app doesn't grant access to it. */
|
|
62
|
+
export type CreateSkillRequestMcpServersList = Array<CreateSkillRequestMcpServersItem>;
|
|
63
|
+
export interface CreateSkillRequest {
|
|
64
|
+
/** Human-readable label. Max 255 characters; not unique. */
|
|
65
|
+
display_name: string;
|
|
66
|
+
/** Markdown body of the skill. Send exactly one of `instructions` or `canvas_id`. */
|
|
67
|
+
instructions?: string | undefined;
|
|
68
|
+
/** Canvas the caller owns to turn into a skill. Send exactly one of `instructions` or `canvas_id`. */
|
|
69
|
+
canvas_id?: string | undefined;
|
|
70
|
+
/** When Slackbot should use the skill. Max 400 characters. */
|
|
71
|
+
description?: string | undefined;
|
|
72
|
+
/** One of the skill categories. */
|
|
73
|
+
category?: CreateSkillRequestCategory | (string & {}) | undefined;
|
|
74
|
+
/** Max 200 characters. May contain `{skill}`, which becomes the skill mention. */
|
|
75
|
+
example_prompt?: string | undefined;
|
|
76
|
+
/** Apps the skill needs, capped at the caller's MCP server limit. Declaring an app doesn't grant access to it. */
|
|
77
|
+
mcp_servers?: CreateSkillRequestMcpServersList | undefined;
|
|
78
|
+
}
|
|
79
|
+
/** Where the skill is defined. */
|
|
80
|
+
export type CreateSkillResponseSkillType = "canvas" | "builtin";
|
|
81
|
+
/** Enumerates the categories available for organizing AI skills. */
|
|
82
|
+
export type CreateSkillResponseSkillCategory =
|
|
83
|
+
| "communication"
|
|
84
|
+
| "customer_support"
|
|
85
|
+
| "data_and_analytics"
|
|
86
|
+
| "engineering"
|
|
87
|
+
| "product_management"
|
|
88
|
+
| "productivity"
|
|
89
|
+
| "professional_development"
|
|
90
|
+
| "project_management"
|
|
91
|
+
| "sales"
|
|
92
|
+
| "system"
|
|
93
|
+
| "team_management"
|
|
94
|
+
| "other";
|
|
95
|
+
/** Who in the workspace can view and share this skill. Derived from the highest ORG/WORKSPACE-level access grant on the underlying skill canvas: `invite_only` when no such grant exists (only the creator and explicitly invited members), `anyone_can_view` when a read or comment grant exists, `anyone_can_edit` when a write grant exists. */
|
|
96
|
+
export type CreateSkillResponseSkillVisibility =
|
|
97
|
+
| "invite_only"
|
|
98
|
+
| "anyone_can_view"
|
|
99
|
+
| "anyone_can_edit";
|
|
100
|
+
/** The caller's effective access to the skill. For canvas skills, the caller's access to the canvas, as in files.info. Built-in skills are always read. */
|
|
101
|
+
export type CreateSkillResponseSkillAccess = "read" | "comment" | "write" | "owner";
|
|
102
|
+
/** An app or MCP server a skill declares it needs. Listing a server does not grant access to it; normal OAuth and server permissions still apply when the skill runs. */
|
|
103
|
+
export interface CreateSkillResponseSkillMcpServersItem {
|
|
104
|
+
/** The server's service type: "app" for an app's MCP server, "salesforce", or a built-in service type. */
|
|
105
|
+
service_type: string;
|
|
106
|
+
/** App ID. Present for app servers. */
|
|
107
|
+
app_id?: string | undefined;
|
|
108
|
+
/** ID of the app's MCP server. Present for app servers. */
|
|
109
|
+
server_id?: string | undefined;
|
|
110
|
+
/** Permission namespace. Present for Salesforce servers. */
|
|
111
|
+
permission_namespace?: string | undefined;
|
|
112
|
+
/** The server's current name as the caller sees it, or null when the server isn't available to the caller. */
|
|
113
|
+
display_name: unknown;
|
|
114
|
+
/** Whether the caller can use this server. */
|
|
115
|
+
is_available: boolean;
|
|
116
|
+
}
|
|
117
|
+
/** Apps and MCP servers the skill needs. */
|
|
118
|
+
export type CreateSkillResponseSkillMcpServersList = Array<CreateSkillResponseSkillMcpServersItem>;
|
|
119
|
+
/** A Slackbot skill as returned by the slackbot.skills.* Web API methods. Fields with no value are null. */
|
|
120
|
+
export interface CreateSkillResponseSkill {
|
|
121
|
+
/** Skill ID: a canvas file ID for canvas skills, or a `builtin:` reference for built-in skills. */
|
|
122
|
+
id: string;
|
|
123
|
+
/** Where the skill is defined. */
|
|
124
|
+
type: CreateSkillResponseSkillType;
|
|
125
|
+
/** Human-readable label. Not unique. */
|
|
126
|
+
display_name: string;
|
|
127
|
+
/** Reserved for a future machine-readable skill name. Always null. */
|
|
128
|
+
name: unknown;
|
|
129
|
+
/** When Slackbot should use the skill. */
|
|
130
|
+
description: unknown;
|
|
131
|
+
/** Skill category. */
|
|
132
|
+
category: CreateSkillResponseSkillCategory | null;
|
|
133
|
+
/** Example prompt. `{skill}` stands for the skill mention. */
|
|
134
|
+
example_prompt: unknown;
|
|
135
|
+
/** Markdown instructions. Only returned by slackbot.skills.info; null elsewhere. */
|
|
136
|
+
instructions: unknown;
|
|
137
|
+
/** Who in the organization can view the skill. Null for built-in skills. */
|
|
138
|
+
visibility: CreateSkillResponseSkillVisibility | null;
|
|
139
|
+
/** Whether the skill is published to the organization's catalog. */
|
|
140
|
+
is_official: boolean;
|
|
141
|
+
/** The caller's effective access to the skill. For canvas skills, the caller's access to the canvas, as in files.info. Built-in skills are always read. */
|
|
142
|
+
access: CreateSkillResponseSkillAccess;
|
|
143
|
+
/** Apps and MCP servers the skill needs. */
|
|
144
|
+
mcp_servers: CreateSkillResponseSkillMcpServersList;
|
|
145
|
+
/** Approximate number of runs. */
|
|
146
|
+
usage_count: unknown;
|
|
147
|
+
/** Approximate number of people who have the skill enabled. */
|
|
148
|
+
library_count: unknown;
|
|
149
|
+
/** User ID of the skill's creator. Null for built-in skills. */
|
|
150
|
+
creator_id: unknown;
|
|
151
|
+
/** Unix timestamp when the skill was created. */
|
|
152
|
+
date_created: unknown;
|
|
153
|
+
/** Unix timestamp when the skill was last updated. */
|
|
154
|
+
date_updated: unknown;
|
|
155
|
+
/** Link to the skill. */
|
|
156
|
+
permalink: string;
|
|
157
|
+
}
|
|
158
|
+
export interface CreateSkillResponse {
|
|
159
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
160
|
+
ok: boolean;
|
|
161
|
+
/** A Slackbot skill as returned by the slackbot.skills.* Web API methods. Fields with no value are null. */
|
|
162
|
+
skill: CreateSkillResponseSkill;
|
|
163
|
+
}
|
|
164
|
+
export interface DeleteSkillRequest {
|
|
165
|
+
/** Skill to delete. */
|
|
166
|
+
skill_id: string;
|
|
167
|
+
}
|
|
168
|
+
export interface DeleteSkillResponse {
|
|
169
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
170
|
+
ok: boolean;
|
|
171
|
+
}
|
|
172
|
+
/** `library`: skills enabled for the caller, including auto-enabled skills and skills from skill sets. `owned`: skills the caller created. `catalog`: the organization's official skills. */
|
|
173
|
+
export type ListSkillsRequestFilter = "library" | "owned" | "catalog";
|
|
174
|
+
export interface ListSkillsRequest {
|
|
175
|
+
/** `library`: skills enabled for the caller, including auto-enabled skills and skills from skill sets. `owned`: skills the caller created. `catalog`: the organization's official skills. */
|
|
176
|
+
filter?: ListSkillsRequestFilter | (string & {}) | undefined;
|
|
177
|
+
/** Only return skills in this category. */
|
|
178
|
+
category?: string | undefined;
|
|
179
|
+
/** Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Must be used with the same `filter` and `category`. */
|
|
180
|
+
cursor?: string | undefined;
|
|
181
|
+
/** The maximum number of skills to return. Fewer may be returned even when more remain. */
|
|
182
|
+
limit?: number | undefined;
|
|
183
|
+
}
|
|
184
|
+
/** Where the skill is defined. */
|
|
185
|
+
export type ListSkillsResponseSkillsItemType = "canvas" | "builtin";
|
|
186
|
+
/** Enumerates the categories available for organizing AI skills. */
|
|
187
|
+
export type ListSkillsResponseSkillsItemCategory =
|
|
188
|
+
| "communication"
|
|
189
|
+
| "customer_support"
|
|
190
|
+
| "data_and_analytics"
|
|
191
|
+
| "engineering"
|
|
192
|
+
| "product_management"
|
|
193
|
+
| "productivity"
|
|
194
|
+
| "professional_development"
|
|
195
|
+
| "project_management"
|
|
196
|
+
| "sales"
|
|
197
|
+
| "system"
|
|
198
|
+
| "team_management"
|
|
199
|
+
| "other";
|
|
200
|
+
/** Who in the workspace can view and share this skill. Derived from the highest ORG/WORKSPACE-level access grant on the underlying skill canvas: `invite_only` when no such grant exists (only the creator and explicitly invited members), `anyone_can_view` when a read or comment grant exists, `anyone_can_edit` when a write grant exists. */
|
|
201
|
+
export type ListSkillsResponseSkillsItemVisibility =
|
|
202
|
+
| "invite_only"
|
|
203
|
+
| "anyone_can_view"
|
|
204
|
+
| "anyone_can_edit";
|
|
205
|
+
/** The caller's effective access to the skill. For canvas skills, the caller's access to the canvas, as in files.info. Built-in skills are always read. */
|
|
206
|
+
export type ListSkillsResponseSkillsItemAccess = "read" | "comment" | "write" | "owner";
|
|
207
|
+
/** An app or MCP server a skill declares it needs. Listing a server does not grant access to it; normal OAuth and server permissions still apply when the skill runs. */
|
|
208
|
+
export type ListSkillsResponseSkillsItemMcpServersItem = CreateSkillResponseSkillMcpServersItem;
|
|
209
|
+
/** Apps and MCP servers the skill needs. */
|
|
210
|
+
export type ListSkillsResponseSkillsItemMcpServersList =
|
|
211
|
+
Array<CreateSkillResponseSkillMcpServersItem>;
|
|
212
|
+
/** A Slackbot skill as returned by the slackbot.skills.* Web API methods. Fields with no value are null. */
|
|
213
|
+
export interface ListSkillsResponseSkillsItem {
|
|
214
|
+
/** Skill ID: a canvas file ID for canvas skills, or a `builtin:` reference for built-in skills. */
|
|
215
|
+
id: string;
|
|
216
|
+
/** Where the skill is defined. */
|
|
217
|
+
type: ListSkillsResponseSkillsItemType;
|
|
218
|
+
/** Human-readable label. Not unique. */
|
|
219
|
+
display_name: string;
|
|
220
|
+
/** Reserved for a future machine-readable skill name. Always null. */
|
|
221
|
+
name: unknown;
|
|
222
|
+
/** When Slackbot should use the skill. */
|
|
223
|
+
description: unknown;
|
|
224
|
+
/** Skill category. */
|
|
225
|
+
category: ListSkillsResponseSkillsItemCategory | null;
|
|
226
|
+
/** Example prompt. `{skill}` stands for the skill mention. */
|
|
227
|
+
example_prompt: unknown;
|
|
228
|
+
/** Markdown instructions. Only returned by slackbot.skills.info; null elsewhere. */
|
|
229
|
+
instructions: unknown;
|
|
230
|
+
/** Who in the organization can view the skill. Null for built-in skills. */
|
|
231
|
+
visibility: ListSkillsResponseSkillsItemVisibility | null;
|
|
232
|
+
/** Whether the skill is published to the organization's catalog. */
|
|
233
|
+
is_official: boolean;
|
|
234
|
+
/** The caller's effective access to the skill. For canvas skills, the caller's access to the canvas, as in files.info. Built-in skills are always read. */
|
|
235
|
+
access: ListSkillsResponseSkillsItemAccess;
|
|
236
|
+
/** Apps and MCP servers the skill needs. */
|
|
237
|
+
mcp_servers: ListSkillsResponseSkillsItemMcpServersList;
|
|
238
|
+
/** Approximate number of runs. */
|
|
239
|
+
usage_count: unknown;
|
|
240
|
+
/** Approximate number of people who have the skill enabled. */
|
|
241
|
+
library_count: unknown;
|
|
242
|
+
/** User ID of the skill's creator. Null for built-in skills. */
|
|
243
|
+
creator_id: unknown;
|
|
244
|
+
/** Unix timestamp when the skill was created. */
|
|
245
|
+
date_created: unknown;
|
|
246
|
+
/** Unix timestamp when the skill was last updated. */
|
|
247
|
+
date_updated: unknown;
|
|
248
|
+
/** Link to the skill. */
|
|
249
|
+
permalink: string;
|
|
250
|
+
}
|
|
251
|
+
export type ListSkillsResponseSkillsList = Array<ListSkillsResponseSkillsItem>;
|
|
252
|
+
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
253
|
+
export interface ListSkillsResponseResponseMetadata {
|
|
254
|
+
/** Cursor for the next page -- pass as `cursor` on the next call. */
|
|
255
|
+
next_cursor?: string | undefined;
|
|
256
|
+
}
|
|
257
|
+
export interface ListSkillsResponse {
|
|
258
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
259
|
+
ok: boolean;
|
|
260
|
+
skills: ListSkillsResponseSkillsList;
|
|
261
|
+
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
262
|
+
response_metadata?: ListSkillsResponseResponseMetadata | undefined;
|
|
263
|
+
}
|
|
264
|
+
export interface RemoveSkillsLibraryRequest {
|
|
265
|
+
/** Skill to turn off for the caller. */
|
|
266
|
+
skill_id: string;
|
|
267
|
+
}
|
|
268
|
+
export interface RemoveSkillsLibraryResponse {
|
|
269
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
270
|
+
ok: boolean;
|
|
271
|
+
}
|
|
272
|
+
export interface SkillsInfoRequest {
|
|
273
|
+
/** Skill to fetch: a canvas file ID or a `builtin:` reference. */
|
|
274
|
+
skill_id: string;
|
|
275
|
+
}
|
|
276
|
+
/** Where the skill is defined. */
|
|
277
|
+
export type SkillsInfoResponseSkillType = "canvas" | "builtin";
|
|
278
|
+
/** Enumerates the categories available for organizing AI skills. */
|
|
279
|
+
export type SkillsInfoResponseSkillCategory =
|
|
280
|
+
| "communication"
|
|
281
|
+
| "customer_support"
|
|
282
|
+
| "data_and_analytics"
|
|
283
|
+
| "engineering"
|
|
284
|
+
| "product_management"
|
|
285
|
+
| "productivity"
|
|
286
|
+
| "professional_development"
|
|
287
|
+
| "project_management"
|
|
288
|
+
| "sales"
|
|
289
|
+
| "system"
|
|
290
|
+
| "team_management"
|
|
291
|
+
| "other";
|
|
292
|
+
/** Who in the workspace can view and share this skill. Derived from the highest ORG/WORKSPACE-level access grant on the underlying skill canvas: `invite_only` when no such grant exists (only the creator and explicitly invited members), `anyone_can_view` when a read or comment grant exists, `anyone_can_edit` when a write grant exists. */
|
|
293
|
+
export type SkillsInfoResponseSkillVisibility =
|
|
294
|
+
| "invite_only"
|
|
295
|
+
| "anyone_can_view"
|
|
296
|
+
| "anyone_can_edit";
|
|
297
|
+
/** The caller's effective access to the skill. For canvas skills, the caller's access to the canvas, as in files.info. Built-in skills are always read. */
|
|
298
|
+
export type SkillsInfoResponseSkillAccess = "read" | "comment" | "write" | "owner";
|
|
299
|
+
/** An app or MCP server a skill declares it needs. Listing a server does not grant access to it; normal OAuth and server permissions still apply when the skill runs. */
|
|
300
|
+
export type SkillsInfoResponseSkillMcpServersItem = CreateSkillResponseSkillMcpServersItem;
|
|
301
|
+
/** Apps and MCP servers the skill needs. */
|
|
302
|
+
export type SkillsInfoResponseSkillMcpServersList = Array<CreateSkillResponseSkillMcpServersItem>;
|
|
303
|
+
/** A Slackbot skill as returned by the slackbot.skills.* Web API methods. Fields with no value are null. */
|
|
304
|
+
export interface SkillsInfoResponseSkill {
|
|
305
|
+
/** Skill ID: a canvas file ID for canvas skills, or a `builtin:` reference for built-in skills. */
|
|
306
|
+
id: string;
|
|
307
|
+
/** Where the skill is defined. */
|
|
308
|
+
type: SkillsInfoResponseSkillType;
|
|
309
|
+
/** Human-readable label. Not unique. */
|
|
310
|
+
display_name: string;
|
|
311
|
+
/** Reserved for a future machine-readable skill name. Always null. */
|
|
312
|
+
name: unknown;
|
|
313
|
+
/** When Slackbot should use the skill. */
|
|
314
|
+
description: unknown;
|
|
315
|
+
/** Skill category. */
|
|
316
|
+
category: SkillsInfoResponseSkillCategory | null;
|
|
317
|
+
/** Example prompt. `{skill}` stands for the skill mention. */
|
|
318
|
+
example_prompt: unknown;
|
|
319
|
+
/** Markdown instructions. Only returned by slackbot.skills.info; null elsewhere. */
|
|
320
|
+
instructions: unknown;
|
|
321
|
+
/** Who in the organization can view the skill. Null for built-in skills. */
|
|
322
|
+
visibility: SkillsInfoResponseSkillVisibility | null;
|
|
323
|
+
/** Whether the skill is published to the organization's catalog. */
|
|
324
|
+
is_official: boolean;
|
|
325
|
+
/** The caller's effective access to the skill. For canvas skills, the caller's access to the canvas, as in files.info. Built-in skills are always read. */
|
|
326
|
+
access: SkillsInfoResponseSkillAccess;
|
|
327
|
+
/** Apps and MCP servers the skill needs. */
|
|
328
|
+
mcp_servers: SkillsInfoResponseSkillMcpServersList;
|
|
329
|
+
/** Approximate number of runs. */
|
|
330
|
+
usage_count: unknown;
|
|
331
|
+
/** Approximate number of people who have the skill enabled. */
|
|
332
|
+
library_count: unknown;
|
|
333
|
+
/** User ID of the skill's creator. Null for built-in skills. */
|
|
334
|
+
creator_id: unknown;
|
|
335
|
+
/** Unix timestamp when the skill was created. */
|
|
336
|
+
date_created: unknown;
|
|
337
|
+
/** Unix timestamp when the skill was last updated. */
|
|
338
|
+
date_updated: unknown;
|
|
339
|
+
/** Link to the skill. */
|
|
340
|
+
permalink: string;
|
|
341
|
+
}
|
|
342
|
+
export interface SkillsInfoResponse {
|
|
343
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
344
|
+
ok: boolean;
|
|
345
|
+
/** A Slackbot skill as returned by the slackbot.skills.* Web API methods. Fields with no value are null. */
|
|
346
|
+
skill: SkillsInfoResponseSkill;
|
|
347
|
+
}
|
|
348
|
+
/** One of the skill categories. Send an empty string to clear. */
|
|
349
|
+
export type UpdateSkillRequestCategory =
|
|
350
|
+
| "communication"
|
|
351
|
+
| "customer_support"
|
|
352
|
+
| "data_and_analytics"
|
|
353
|
+
| "engineering"
|
|
354
|
+
| "product_management"
|
|
355
|
+
| "productivity"
|
|
356
|
+
| "professional_development"
|
|
357
|
+
| "project_management"
|
|
358
|
+
| "sales"
|
|
359
|
+
| "system"
|
|
360
|
+
| "team_management"
|
|
361
|
+
| "other"
|
|
362
|
+
| "";
|
|
363
|
+
/** An app the skill needs. App servers use `app_id` and `server_id`, Salesforce servers use `permission_namespace`, and built-in servers use `service_type` alone. */
|
|
364
|
+
export type UpdateSkillRequestMcpServersItem = CreateSkillRequestMcpServersItem;
|
|
365
|
+
/** Apps the skill needs. Replaces the whole list; send `[]` to clear. */
|
|
366
|
+
export type UpdateSkillRequestMcpServersList = Array<CreateSkillRequestMcpServersItem>;
|
|
367
|
+
export interface UpdateSkillRequest {
|
|
368
|
+
/** Skill to change. */
|
|
369
|
+
skill_id: string;
|
|
370
|
+
/** Human-readable label. Max 255 characters. */
|
|
371
|
+
display_name?: string | undefined;
|
|
372
|
+
/** Markdown that replaces the whole document. */
|
|
373
|
+
instructions?: string | undefined;
|
|
374
|
+
/** When Slackbot should use the skill. Max 400 characters. Send an empty string to clear. */
|
|
375
|
+
description?: string | undefined;
|
|
376
|
+
/** One of the skill categories. Send an empty string to clear. */
|
|
377
|
+
category?: UpdateSkillRequestCategory | (string & {}) | undefined;
|
|
378
|
+
/** Max 200 characters. May contain `{skill}`. Send an empty string to clear. */
|
|
379
|
+
example_prompt?: string | undefined;
|
|
380
|
+
/** Apps the skill needs. Replaces the whole list; send `[]` to clear. */
|
|
381
|
+
mcp_servers?: UpdateSkillRequestMcpServersList | undefined;
|
|
382
|
+
}
|
|
383
|
+
/** Where the skill is defined. */
|
|
384
|
+
export type UpdateSkillResponseSkillType = "canvas" | "builtin";
|
|
385
|
+
/** Enumerates the categories available for organizing AI skills. */
|
|
386
|
+
export type UpdateSkillResponseSkillCategory =
|
|
387
|
+
| "communication"
|
|
388
|
+
| "customer_support"
|
|
389
|
+
| "data_and_analytics"
|
|
390
|
+
| "engineering"
|
|
391
|
+
| "product_management"
|
|
392
|
+
| "productivity"
|
|
393
|
+
| "professional_development"
|
|
394
|
+
| "project_management"
|
|
395
|
+
| "sales"
|
|
396
|
+
| "system"
|
|
397
|
+
| "team_management"
|
|
398
|
+
| "other";
|
|
399
|
+
/** Who in the workspace can view and share this skill. Derived from the highest ORG/WORKSPACE-level access grant on the underlying skill canvas: `invite_only` when no such grant exists (only the creator and explicitly invited members), `anyone_can_view` when a read or comment grant exists, `anyone_can_edit` when a write grant exists. */
|
|
400
|
+
export type UpdateSkillResponseSkillVisibility =
|
|
401
|
+
| "invite_only"
|
|
402
|
+
| "anyone_can_view"
|
|
403
|
+
| "anyone_can_edit";
|
|
404
|
+
/** The caller's effective access to the skill. For canvas skills, the caller's access to the canvas, as in files.info. Built-in skills are always read. */
|
|
405
|
+
export type UpdateSkillResponseSkillAccess = "read" | "comment" | "write" | "owner";
|
|
406
|
+
/** An app or MCP server a skill declares it needs. Listing a server does not grant access to it; normal OAuth and server permissions still apply when the skill runs. */
|
|
407
|
+
export type UpdateSkillResponseSkillMcpServersItem = CreateSkillResponseSkillMcpServersItem;
|
|
408
|
+
/** Apps and MCP servers the skill needs. */
|
|
409
|
+
export type UpdateSkillResponseSkillMcpServersList = Array<CreateSkillResponseSkillMcpServersItem>;
|
|
410
|
+
/** A Slackbot skill as returned by the slackbot.skills.* Web API methods. Fields with no value are null. */
|
|
411
|
+
export interface UpdateSkillResponseSkill {
|
|
412
|
+
/** Skill ID: a canvas file ID for canvas skills, or a `builtin:` reference for built-in skills. */
|
|
413
|
+
id: string;
|
|
414
|
+
/** Where the skill is defined. */
|
|
415
|
+
type: UpdateSkillResponseSkillType;
|
|
416
|
+
/** Human-readable label. Not unique. */
|
|
417
|
+
display_name: string;
|
|
418
|
+
/** Reserved for a future machine-readable skill name. Always null. */
|
|
419
|
+
name: unknown;
|
|
420
|
+
/** When Slackbot should use the skill. */
|
|
421
|
+
description: unknown;
|
|
422
|
+
/** Skill category. */
|
|
423
|
+
category: UpdateSkillResponseSkillCategory | null;
|
|
424
|
+
/** Example prompt. `{skill}` stands for the skill mention. */
|
|
425
|
+
example_prompt: unknown;
|
|
426
|
+
/** Markdown instructions. Only returned by slackbot.skills.info; null elsewhere. */
|
|
427
|
+
instructions: unknown;
|
|
428
|
+
/** Who in the organization can view the skill. Null for built-in skills. */
|
|
429
|
+
visibility: UpdateSkillResponseSkillVisibility | null;
|
|
430
|
+
/** Whether the skill is published to the organization's catalog. */
|
|
431
|
+
is_official: boolean;
|
|
432
|
+
/** The caller's effective access to the skill. For canvas skills, the caller's access to the canvas, as in files.info. Built-in skills are always read. */
|
|
433
|
+
access: UpdateSkillResponseSkillAccess;
|
|
434
|
+
/** Apps and MCP servers the skill needs. */
|
|
435
|
+
mcp_servers: UpdateSkillResponseSkillMcpServersList;
|
|
436
|
+
/** Approximate number of runs. */
|
|
437
|
+
usage_count: unknown;
|
|
438
|
+
/** Approximate number of people who have the skill enabled. */
|
|
439
|
+
library_count: unknown;
|
|
440
|
+
/** User ID of the skill's creator. Null for built-in skills. */
|
|
441
|
+
creator_id: unknown;
|
|
442
|
+
/** Unix timestamp when the skill was created. */
|
|
443
|
+
date_created: unknown;
|
|
444
|
+
/** Unix timestamp when the skill was last updated. */
|
|
445
|
+
date_updated: unknown;
|
|
446
|
+
/** Link to the skill. */
|
|
447
|
+
permalink: string;
|
|
448
|
+
}
|
|
449
|
+
export interface UpdateSkillResponse {
|
|
450
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
451
|
+
ok: boolean;
|
|
452
|
+
/** A Slackbot skill as returned by the slackbot.skills.* Web API methods. Fields with no value are null. */
|
|
453
|
+
skill: UpdateSkillResponseSkill;
|
|
454
|
+
}
|
|
455
|
+
export type AddSkillsLibraryError = SlackOpError;
|
|
456
|
+
/** Turns a skill on in the caller's personal library. Required scopes -- bot: `skills:write`; user: `skills:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `skill_not_found` -- The skill doesn't exist or the caller can't see it. - `feature_not_enabled` -- The Skills API isn't enabled for this organization. - `restricted_action` -- The caller cannot use skills or cannot use this skill in their library. - `internal_error` -- The library could not be updated. Retry the request. See https://docs.slack.dev/reference/methods/slackbot.skills.library.add */
|
|
457
|
+
export const addSkillsLibrary: API.OperationMethod<
|
|
458
|
+
AddSkillsLibraryRequest,
|
|
459
|
+
AddSkillsLibraryResponse,
|
|
460
|
+
AddSkillsLibraryError,
|
|
461
|
+
SlackOpContext
|
|
462
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
463
|
+
input: __S(0, __c0, 0) as any as S.Schema<AddSkillsLibraryRequest>,
|
|
464
|
+
output: __S(4, __c1, 0) as any as S.Schema<AddSkillsLibraryResponse>,
|
|
465
|
+
errors: [SlackError, SlackRateLimited],
|
|
466
|
+
protocol: SlackProtocol,
|
|
467
|
+
retry: Retry.Retry,
|
|
468
|
+
telemetry: TELEMETRY,
|
|
469
|
+
span: "AddSkillsLibrary",
|
|
470
|
+
}));
|
|
471
|
+
|
|
472
|
+
export type CreateSkillError = SlackOpError;
|
|
473
|
+
/** Creates a skill from markdown instructions, or turns an existing canvas the caller owns into a skill. Required scopes -- bot: `skills:write`; user: `skills:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `invalid_arguments` -- The arguments are invalid, for example both or neither of `instructions` and `canvas_id` were sent. - `canvas_not_found` -- The canvas doesn't exist or the caller can't see it. - `not_canvas_owner` -- Only the canvas owner can turn it into a skill. - `is_a_template` -- Canvas templates can't be turned into skills. - `already_a_skill` -- The canvas is already a skill. Use `slackbot.skills.update` to change it. - `invalid_category` -- `category` isn't one of the skill categories. - `display_name_too_long` -- `display_name` is longer than 255 characters. - `description_too_long` -- `description` is longer than 400 characters. - `example_prompt_too_long` -- `example_prompt` is longer than 200 characters. - `instructions_too_large` -- `instructions` is larger than 500,000 bytes. - `too_many_mcp_servers` -- More apps were declared than the caller can enable at once. - `mcp_server_not_found` -- One or more declared apps don't exist or aren't available to the caller. `invalid_mcp_servers` lists them. - `restricted_action` -- The caller isn't allowed to author skills. - `feature_not_enabled` -- The Skills API isn't enabled for this organization. - `canvas_disabled_user_team` -- Canvases are disabled for the caller's team. - `free_teams_cannot_create_standalone_canvases` -- Free teams can't create standalone canvases. - `canvas_editing_locked` -- Another edit to the canvas is in progress. Retry the request. - `canvas_creation_failed` -- The skill's canvas couldn't be created. - `internal_error` -- The skill couldn't be saved. Retry the request. See https://docs.slack.dev/reference/methods/slackbot.skills.create */
|
|
474
|
+
export const createSkill: API.OperationMethod<
|
|
475
|
+
CreateSkillRequest,
|
|
476
|
+
CreateSkillResponse,
|
|
477
|
+
CreateSkillError,
|
|
478
|
+
SlackOpContext
|
|
479
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
480
|
+
input: __S(8, __c2, 0) as any as S.Schema<CreateSkillRequest>,
|
|
481
|
+
output: __S(16, __c4, 0) as any as S.Schema<CreateSkillResponse>,
|
|
482
|
+
errors: [SlackError, SlackRateLimited],
|
|
483
|
+
protocol: SlackProtocol,
|
|
484
|
+
retry: Retry.Retry,
|
|
485
|
+
telemetry: TELEMETRY,
|
|
486
|
+
span: "CreateSkill",
|
|
487
|
+
}));
|
|
488
|
+
|
|
489
|
+
export type DeleteSkillError = SlackOpError;
|
|
490
|
+
/** Deletes a Slackbot skill and its canvas, and removes it from every library, skill set, and the org catalog. Required scopes -- bot: `skills:write`; user: `skills:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `skill_not_found` -- The skill doesn't exist or the caller can't see it. - `method_not_supported_for_skill_type` -- Only canvas skills can be deleted. - `restricted_action` -- The caller isn't allowed to delete this skill. - `feature_not_enabled` -- The Skills API isn't enabled for this organization. - `canvas_deleting_disabled` -- Deleting canvases is disabled for the caller's team. - `internal_error` -- The skill couldn't be deleted. Retry the request. See https://docs.slack.dev/reference/methods/slackbot.skills.delete */
|
|
491
|
+
export const deleteSkill: API.OperationMethod<
|
|
492
|
+
DeleteSkillRequest,
|
|
493
|
+
DeleteSkillResponse,
|
|
494
|
+
DeleteSkillError,
|
|
495
|
+
SlackOpContext
|
|
496
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
497
|
+
input: __S(24, __c6, 0) as any as S.Schema<DeleteSkillRequest>,
|
|
498
|
+
output: __S(4, __c1, 0) as any as S.Schema<DeleteSkillResponse>,
|
|
499
|
+
errors: [SlackError, SlackRateLimited],
|
|
500
|
+
protocol: SlackProtocol,
|
|
501
|
+
retry: Retry.Retry,
|
|
502
|
+
telemetry: TELEMETRY,
|
|
503
|
+
span: "DeleteSkill",
|
|
504
|
+
}));
|
|
505
|
+
|
|
506
|
+
export type ListSkillsError = SlackOpError;
|
|
507
|
+
/** Lists Slackbot skills from the caller's point of view. Instructions are not included. Required scopes -- bot: `skills:read`; user: `skills:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `invalid_cursor` -- The cursor is malformed, expired, or was issued for a different filter or category. - `invalid_category` -- The category isn't one of the supported skill categories. - `feature_not_enabled` -- The Skills API isn't enabled for this organization. - `restricted_action` -- The caller isn't allowed to use skills. - `internal_error` -- A lookup failed, so the page couldn't be built completely. Retry the request with the same cursor. See https://docs.slack.dev/reference/methods/slackbot.skills.list */
|
|
508
|
+
export const listSkills: API.PaginatedOperationMethod<
|
|
509
|
+
ListSkillsRequest,
|
|
510
|
+
ListSkillsResponse,
|
|
511
|
+
ListSkillsError,
|
|
512
|
+
SlackOpContext,
|
|
513
|
+
ListSkillsResponseSkillsItem
|
|
514
|
+
> = /*@__PURE__*/ API.makePaginated(
|
|
515
|
+
() => ({
|
|
516
|
+
input: __S(28, __c7, 0) as any as S.Schema<ListSkillsRequest>,
|
|
517
|
+
output: __S(31, __c7, 3) as any as S.Schema<ListSkillsResponse>,
|
|
518
|
+
errors: [SlackError, SlackRateLimited],
|
|
519
|
+
protocol: SlackProtocol,
|
|
520
|
+
retry: Retry.Retry,
|
|
521
|
+
telemetry: TELEMETRY,
|
|
522
|
+
span: "ListSkills",
|
|
523
|
+
pagination: {
|
|
524
|
+
mode: "cursor",
|
|
525
|
+
inputToken: "cursor",
|
|
526
|
+
outputToken: "response_metadata.next_cursor",
|
|
527
|
+
items: "skills",
|
|
528
|
+
pageSize: "limit",
|
|
529
|
+
} as const,
|
|
530
|
+
}),
|
|
531
|
+
slackPaginate,
|
|
532
|
+
) as any;
|
|
533
|
+
|
|
534
|
+
export type RemoveSkillsLibraryError = SlackOpError;
|
|
535
|
+
/** Turns a skill off in the caller's personal library. Required scopes -- bot: `skills:write`; user: `skills:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `skill_not_found` -- The skill doesn't exist or the caller can't see it. - `feature_not_enabled` -- The Skills API isn't enabled for this organization. - `restricted_action` -- The caller cannot use skills or cannot use this skill in their library. - `internal_error` -- The library could not be updated. Retry the request. See https://docs.slack.dev/reference/methods/slackbot.skills.library.remove */
|
|
536
|
+
export const removeSkillsLibrary: API.OperationMethod<
|
|
537
|
+
RemoveSkillsLibraryRequest,
|
|
538
|
+
RemoveSkillsLibraryResponse,
|
|
539
|
+
RemoveSkillsLibraryError,
|
|
540
|
+
SlackOpContext
|
|
541
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
542
|
+
input: __S(32, __c8, 0) as any as S.Schema<RemoveSkillsLibraryRequest>,
|
|
543
|
+
output: __S(4, __c1, 0) as any as S.Schema<RemoveSkillsLibraryResponse>,
|
|
544
|
+
errors: [SlackError, SlackRateLimited],
|
|
545
|
+
protocol: SlackProtocol,
|
|
546
|
+
retry: Retry.Retry,
|
|
547
|
+
telemetry: TELEMETRY,
|
|
548
|
+
span: "RemoveSkillsLibrary",
|
|
549
|
+
}));
|
|
550
|
+
|
|
551
|
+
export type SkillsInfoError = SlackOpError;
|
|
552
|
+
/** Returns one Slackbot skill, including its instructions. Required scopes -- bot: `skills:read`; user: `skills:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `skill_not_found` -- The skill doesn't exist or the caller can't see it. - `feature_not_enabled` -- The Skills API isn't enabled for this organization. - `restricted_action` -- The caller isn't allowed to use skills. - `internal_error` -- The skill's instructions couldn't be read. Retry the request. See https://docs.slack.dev/reference/methods/slackbot.skills.info */
|
|
553
|
+
export const skillsInfo: API.OperationMethod<
|
|
554
|
+
SkillsInfoRequest,
|
|
555
|
+
SkillsInfoResponse,
|
|
556
|
+
SkillsInfoError,
|
|
557
|
+
SlackOpContext
|
|
558
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
559
|
+
input: __S(36, __c9, 0) as any as S.Schema<SkillsInfoRequest>,
|
|
560
|
+
output: __S(16, __c4, 0) as any as S.Schema<SkillsInfoResponse>,
|
|
561
|
+
errors: [SlackError, SlackRateLimited],
|
|
562
|
+
protocol: SlackProtocol,
|
|
563
|
+
retry: Retry.Retry,
|
|
564
|
+
telemetry: TELEMETRY,
|
|
565
|
+
span: "SkillsInfo",
|
|
566
|
+
}));
|
|
567
|
+
|
|
568
|
+
export type UpdateSkillError = SlackOpError;
|
|
569
|
+
/** Changes a Slackbot skill's instructions or metadata. Only the inputs you send are changed; a call that changes nothing succeeds without writing. Required scopes -- bot: `skills:write`; user: `skills:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `skill_not_found` -- The skill doesn't exist or the caller can't see it. - `method_not_supported_for_skill_type` -- Only canvas skills can be changed. - `restricted_action` -- The caller isn't allowed to change this skill. - `feature_not_enabled` -- The Skills API isn't enabled for this organization. - `canvas_editing_locked` -- Another edit to the skill is in progress. Retry the request. - `canvas_editing_failed` -- The skill's instructions or display name couldn't be saved. - `invalid_category` -- `category` isn't one of the skill categories. - `display_name_too_long` -- `display_name` is longer than 255 characters. - `description_too_long` -- `description` is longer than 400 characters. - `example_prompt_too_long` -- `example_prompt` is longer than 200 characters. - `instructions_too_large` -- `instructions` is larger than 500,000 bytes. - `too_many_mcp_servers` -- More apps were declared than the caller can enable at once. - `mcp_server_not_found` -- One or more declared apps don't exist or aren't available to the caller. `invalid_mcp_servers` lists them. - `internal_error` -- The skill's metadata couldn't be saved. Retry the request. See https://docs.slack.dev/reference/methods/slackbot.skills.update */
|
|
570
|
+
export const updateSkill: API.OperationMethod<
|
|
571
|
+
UpdateSkillRequest,
|
|
572
|
+
UpdateSkillResponse,
|
|
573
|
+
UpdateSkillError,
|
|
574
|
+
SlackOpContext
|
|
575
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
576
|
+
input: __S(40, __c10, 0) as any as S.Schema<UpdateSkillRequest>,
|
|
577
|
+
output: __S(16, __c4, 0) as any as S.Schema<UpdateSkillResponse>,
|
|
578
|
+
errors: [SlackError, SlackRateLimited],
|
|
579
|
+
protocol: SlackProtocol,
|
|
580
|
+
retry: Retry.Retry,
|
|
581
|
+
telemetry: TELEMETRY,
|
|
582
|
+
span: "UpdateSkill",
|
|
583
|
+
}));
|
|
584
|
+
|
|
585
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
586
|
+
function __c0(j: number): any {
|
|
587
|
+
switch (j) {
|
|
588
|
+
case 0:
|
|
589
|
+
return S.suspend(() =>
|
|
590
|
+
S.Struct({
|
|
591
|
+
skill_id: S.String,
|
|
592
|
+
}).pipe(T.Http({ method: "POST", uri: "/slackbot.skills.library.add", code: 200 })),
|
|
593
|
+
).annotate({ identifier: "AddSkillsLibraryRequest" });
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
function __c1(j: number): any {
|
|
597
|
+
switch (j) {
|
|
598
|
+
case 0:
|
|
599
|
+
return S.suspend(() =>
|
|
600
|
+
S.Struct({
|
|
601
|
+
ok: S.Boolean,
|
|
602
|
+
}),
|
|
603
|
+
).annotate({ identifier: "AddSkillsLibraryResponse" });
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
function __c2(j: number): any {
|
|
607
|
+
switch (j) {
|
|
608
|
+
case 0:
|
|
609
|
+
return S.suspend(() =>
|
|
610
|
+
S.Struct({
|
|
611
|
+
display_name: S.String,
|
|
612
|
+
instructions: S.optional(S.String),
|
|
613
|
+
canvas_id: S.optional(S.String),
|
|
614
|
+
description: S.optional(S.String),
|
|
615
|
+
category: S.optional(S.String),
|
|
616
|
+
example_prompt: S.optional(S.String),
|
|
617
|
+
mcp_servers: S.optional(__S(21, __c5, 1)),
|
|
618
|
+
}).pipe(T.Http({ method: "POST", uri: "/slackbot.skills.create", code: 200 })),
|
|
619
|
+
).annotate({ identifier: "CreateSkillRequest" });
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
function __c3(j: number): any {
|
|
623
|
+
switch (j) {
|
|
624
|
+
case 0:
|
|
625
|
+
return S.suspend(() =>
|
|
626
|
+
S.Struct({
|
|
627
|
+
service_type: S.String,
|
|
628
|
+
app_id: S.optional(S.String),
|
|
629
|
+
server_id: S.optional(S.String),
|
|
630
|
+
permission_namespace: S.optional(S.String),
|
|
631
|
+
display_name: S.Unknown,
|
|
632
|
+
is_available: S.Boolean,
|
|
633
|
+
}),
|
|
634
|
+
).annotate({ identifier: "CreateSkillResponseSkillMcpServersItem" });
|
|
635
|
+
case 1:
|
|
636
|
+
return S.Array(__S(12, __c3, 0));
|
|
637
|
+
case 2:
|
|
638
|
+
return S.suspend(() =>
|
|
639
|
+
S.Struct({
|
|
640
|
+
id: S.String,
|
|
641
|
+
type: S.String,
|
|
642
|
+
display_name: S.String,
|
|
643
|
+
name: S.Unknown,
|
|
644
|
+
description: S.Unknown,
|
|
645
|
+
category: S.NullOr(S.String),
|
|
646
|
+
example_prompt: S.Unknown,
|
|
647
|
+
instructions: S.Unknown,
|
|
648
|
+
visibility: S.NullOr(S.String),
|
|
649
|
+
is_official: S.Boolean,
|
|
650
|
+
access: S.String,
|
|
651
|
+
mcp_servers: __S(13, __c3, 1),
|
|
652
|
+
usage_count: S.Unknown,
|
|
653
|
+
library_count: S.Unknown,
|
|
654
|
+
creator_id: S.Unknown,
|
|
655
|
+
date_created: S.Unknown,
|
|
656
|
+
date_updated: S.Unknown,
|
|
657
|
+
permalink: S.String,
|
|
658
|
+
}),
|
|
659
|
+
).annotate({ identifier: "CreateSkillResponseSkill" });
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
function __c4(j: number): any {
|
|
663
|
+
switch (j) {
|
|
664
|
+
case 0:
|
|
665
|
+
return S.suspend(() =>
|
|
666
|
+
S.Struct({
|
|
667
|
+
ok: S.Boolean,
|
|
668
|
+
skill: __S(14, __c3, 2),
|
|
669
|
+
}),
|
|
670
|
+
).annotate({ identifier: "CreateSkillResponse" });
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
function __c5(j: number): any {
|
|
674
|
+
switch (j) {
|
|
675
|
+
case 0:
|
|
676
|
+
return S.suspend(() =>
|
|
677
|
+
S.Struct({
|
|
678
|
+
service_type: S.String,
|
|
679
|
+
app_id: S.optional(S.String),
|
|
680
|
+
server_id: S.optional(S.String),
|
|
681
|
+
permission_namespace: S.optional(S.String),
|
|
682
|
+
}),
|
|
683
|
+
).annotate({ identifier: "CreateSkillRequestMcpServersItem" });
|
|
684
|
+
case 1:
|
|
685
|
+
return S.Array(__S(20, __c5, 0));
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
function __c6(j: number): any {
|
|
689
|
+
switch (j) {
|
|
690
|
+
case 0:
|
|
691
|
+
return S.suspend(() =>
|
|
692
|
+
S.Struct({
|
|
693
|
+
skill_id: S.String,
|
|
694
|
+
}).pipe(T.Http({ method: "POST", uri: "/slackbot.skills.delete", code: 200 })),
|
|
695
|
+
).annotate({ identifier: "DeleteSkillRequest" });
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
function __c7(j: number): any {
|
|
699
|
+
switch (j) {
|
|
700
|
+
case 0:
|
|
701
|
+
return S.suspend(() =>
|
|
702
|
+
S.Struct({
|
|
703
|
+
filter: S.optional(S.String),
|
|
704
|
+
category: S.optional(S.String),
|
|
705
|
+
cursor: S.optional(S.String),
|
|
706
|
+
limit: S.optional(S.Number),
|
|
707
|
+
}).pipe(T.Http({ method: "POST", uri: "/slackbot.skills.list", code: 200 })),
|
|
708
|
+
).annotate({ identifier: "ListSkillsRequest" });
|
|
709
|
+
case 1:
|
|
710
|
+
return S.Array(__S(14, __c3, 2));
|
|
711
|
+
case 2:
|
|
712
|
+
return S.suspend(() =>
|
|
713
|
+
S.Struct({
|
|
714
|
+
next_cursor: S.optional(S.String),
|
|
715
|
+
}),
|
|
716
|
+
).annotate({ identifier: "ListSkillsResponseResponseMetadata" });
|
|
717
|
+
case 3:
|
|
718
|
+
return S.suspend(() =>
|
|
719
|
+
S.Struct({
|
|
720
|
+
ok: S.Boolean,
|
|
721
|
+
skills: __S(29, __c7, 1),
|
|
722
|
+
response_metadata: S.optional(__S(30, __c7, 2)),
|
|
723
|
+
}),
|
|
724
|
+
).annotate({ identifier: "ListSkillsResponse" });
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
function __c8(j: number): any {
|
|
728
|
+
switch (j) {
|
|
729
|
+
case 0:
|
|
730
|
+
return S.suspend(() =>
|
|
731
|
+
S.Struct({
|
|
732
|
+
skill_id: S.String,
|
|
733
|
+
}).pipe(T.Http({ method: "POST", uri: "/slackbot.skills.library.remove", code: 200 })),
|
|
734
|
+
).annotate({ identifier: "RemoveSkillsLibraryRequest" });
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
function __c9(j: number): any {
|
|
738
|
+
switch (j) {
|
|
739
|
+
case 0:
|
|
740
|
+
return S.suspend(() =>
|
|
741
|
+
S.Struct({
|
|
742
|
+
skill_id: S.String,
|
|
743
|
+
}).pipe(T.Http({ method: "POST", uri: "/slackbot.skills.info", code: 200 })),
|
|
744
|
+
).annotate({ identifier: "SkillsInfoRequest" });
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
function __c10(j: number): any {
|
|
748
|
+
switch (j) {
|
|
749
|
+
case 0:
|
|
750
|
+
return S.suspend(() =>
|
|
751
|
+
S.Struct({
|
|
752
|
+
skill_id: S.String,
|
|
753
|
+
display_name: S.optional(S.String),
|
|
754
|
+
instructions: S.optional(S.String),
|
|
755
|
+
description: S.optional(S.String),
|
|
756
|
+
category: S.optional(S.String),
|
|
757
|
+
example_prompt: S.optional(S.String),
|
|
758
|
+
mcp_servers: S.optional(__S(21, __c5, 1)),
|
|
759
|
+
}).pipe(T.Http({ method: "POST", uri: "/slackbot.skills.update", code: 200 })),
|
|
760
|
+
).annotate({ identifier: "UpdateSkillRequest" });
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
764
|
+
function __S(i: number, f: (j: number) => unknown, j: number): any {
|
|
765
|
+
return (__s[i] ??= __L.at(f, j));
|
|
766
|
+
}
|