@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
package/src/services/calls.ts
CHANGED
|
@@ -30,19 +30,19 @@ export interface AddCallRequest {
|
|
|
30
30
|
/** An ID supplied by the 3rd-party Call provider. It must be unique across all Calls from that service. */
|
|
31
31
|
external_unique_id: string;
|
|
32
32
|
/** An optional, human-readable ID supplied by the 3rd-party Call provider. If supplied, this ID will be displayed in the Call object. */
|
|
33
|
-
external_display_id?: string;
|
|
33
|
+
external_display_id?: string | undefined;
|
|
34
34
|
/** The URL required for a client to join the Call. */
|
|
35
35
|
join_url: string;
|
|
36
36
|
/** When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL. */
|
|
37
|
-
desktop_app_join_url?: string;
|
|
37
|
+
desktop_app_join_url?: string | undefined;
|
|
38
38
|
/** Unix timestamp of the call start time */
|
|
39
|
-
date_start?: number;
|
|
39
|
+
date_start?: number | undefined;
|
|
40
40
|
/** The name of the Call. */
|
|
41
|
-
title?: string;
|
|
41
|
+
title?: string | undefined;
|
|
42
42
|
/** The valid Slack user ID of the user who created this Call. When this method is called with a user token, the `created_by` field is optional and defaults to the authed user of the token. Otherwise, the field is required. */
|
|
43
|
-
created_by?: string;
|
|
43
|
+
created_by?: string | undefined;
|
|
44
44
|
/** The list of users to register as participants in the Call. [Read more on how to specify users here](/apis/web-api/using-the-calls-api#users). */
|
|
45
|
-
users?: AddCallRequestUsersList;
|
|
45
|
+
users?: AddCallRequestUsersList | undefined;
|
|
46
46
|
}
|
|
47
47
|
export interface AddCallResponse {
|
|
48
48
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -66,7 +66,7 @@ export interface CallsEndRequest {
|
|
|
66
66
|
/** `id` returned when registering the call using the [`calls.add`](/reference/methods/calls.add) method. */
|
|
67
67
|
id: string;
|
|
68
68
|
/** Call duration in seconds */
|
|
69
|
-
duration?: number;
|
|
69
|
+
duration?: number | undefined;
|
|
70
70
|
}
|
|
71
71
|
export interface CallsEndResponse {
|
|
72
72
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -99,11 +99,11 @@ export interface UpdateCallRequest {
|
|
|
99
99
|
/** `id` returned by the [`calls.add`](/reference/methods/calls.add) method. */
|
|
100
100
|
id: string;
|
|
101
101
|
/** The name of the Call. */
|
|
102
|
-
title?: string;
|
|
102
|
+
title?: string | undefined;
|
|
103
103
|
/** The URL required for a client to join the Call. */
|
|
104
|
-
join_url?: string;
|
|
104
|
+
join_url?: string | undefined;
|
|
105
105
|
/** When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL. */
|
|
106
|
-
desktop_app_join_url?: string;
|
|
106
|
+
desktop_app_join_url?: string | undefined;
|
|
107
107
|
}
|
|
108
108
|
export interface UpdateCallResponse {
|
|
109
109
|
/** Always `true` (a failed call raises a typed error instead). */
|
package/src/services/canvases.ts
CHANGED
|
@@ -26,11 +26,11 @@ const TELEMETRY = {
|
|
|
26
26
|
|
|
27
27
|
export interface CreateCanvaseRequest {
|
|
28
28
|
/** Title of the newly created canvas */
|
|
29
|
-
title?: string;
|
|
29
|
+
title?: string | undefined;
|
|
30
30
|
/** Structure describing the type and value of the content to create. The markdown content is limited to 1 MiB (1,048,576 characters). */
|
|
31
|
-
document_content?: unknown;
|
|
31
|
+
document_content?: unknown | undefined;
|
|
32
32
|
/** Channel ID of the channel the canvas will be tabbed in. This is a required field for free teams. */
|
|
33
|
-
channel_id?: string;
|
|
33
|
+
channel_id?: string | undefined;
|
|
34
34
|
}
|
|
35
35
|
export interface CreateCanvaseResponse {
|
|
36
36
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -39,16 +39,16 @@ export interface CreateCanvaseResponse {
|
|
|
39
39
|
canvas_id: string;
|
|
40
40
|
}
|
|
41
41
|
/** List of channels you wish to update access for */
|
|
42
|
-
export type DeleteAccessRequestChannelIdsList = Array<
|
|
42
|
+
export type DeleteAccessRequestChannelIdsList = Array<unknown>;
|
|
43
43
|
/** List of users you wish to update access for */
|
|
44
44
|
export type DeleteAccessRequestUserIdsList = Array<string>;
|
|
45
45
|
export interface DeleteAccessRequest {
|
|
46
46
|
/** Encoded ID of the canvas */
|
|
47
47
|
canvas_id: string;
|
|
48
48
|
/** List of channels you wish to update access for */
|
|
49
|
-
channel_ids?: DeleteAccessRequestChannelIdsList;
|
|
49
|
+
channel_ids?: DeleteAccessRequestChannelIdsList | undefined;
|
|
50
50
|
/** List of users you wish to update access for */
|
|
51
|
-
user_ids?: DeleteAccessRequestUserIdsList;
|
|
51
|
+
user_ids?: DeleteAccessRequestUserIdsList | undefined;
|
|
52
52
|
}
|
|
53
53
|
/** The channel IDs that could not be updated */
|
|
54
54
|
export type DeleteAccessResponseFailedToUpdateChannelIdsList = Array<string>;
|
|
@@ -58,9 +58,9 @@ export interface DeleteAccessResponse {
|
|
|
58
58
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
59
59
|
ok: boolean;
|
|
60
60
|
/** The channel IDs that could not be updated */
|
|
61
|
-
failed_to_update_channel_ids?: DeleteAccessResponseFailedToUpdateChannelIdsList;
|
|
61
|
+
failed_to_update_channel_ids?: DeleteAccessResponseFailedToUpdateChannelIdsList | undefined;
|
|
62
62
|
/** The user IDs that could not be updated */
|
|
63
|
-
failed_to_update_user_ids?: DeleteAccessResponseFailedToUpdateUserIdsList;
|
|
63
|
+
failed_to_update_user_ids?: DeleteAccessResponseFailedToUpdateUserIdsList | undefined;
|
|
64
64
|
}
|
|
65
65
|
export interface DeleteCanvaseRequest {
|
|
66
66
|
/** Encoded ID of the canvas */
|
|
@@ -88,7 +88,7 @@ export interface GetContentRequest {
|
|
|
88
88
|
/** Encoded ID of the canvas */
|
|
89
89
|
canvas_id: string;
|
|
90
90
|
/** Format in which to return the canvas content. Defaults to markdown. */
|
|
91
|
-
content_type?: GetContentRequestContentType | (string & {});
|
|
91
|
+
content_type?: GetContentRequestContentType | (string & {}) | undefined;
|
|
92
92
|
}
|
|
93
93
|
export interface GetContentResponse {
|
|
94
94
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -107,7 +107,7 @@ export type LookupSectionResponseSectionsItemChildSectionIdsList = Array<string>
|
|
|
107
107
|
export interface LookupSectionResponseSectionsItem {
|
|
108
108
|
id: string;
|
|
109
109
|
/** IDs of child sections within a layout container (blockquote, callout, flexbox, or table). */
|
|
110
|
-
child_section_ids?: LookupSectionResponseSectionsItemChildSectionIdsList;
|
|
110
|
+
child_section_ids?: LookupSectionResponseSectionsItemChildSectionIdsList | undefined;
|
|
111
111
|
}
|
|
112
112
|
/** Sections in the canvas that match the provided criteria */
|
|
113
113
|
export type LookupSectionResponseSectionsList = Array<LookupSectionResponseSectionsItem>;
|
|
@@ -118,7 +118,7 @@ export interface LookupSectionResponse {
|
|
|
118
118
|
sections: LookupSectionResponseSectionsList;
|
|
119
119
|
}
|
|
120
120
|
/** List of channels you wish to update access for. Can only be used if user_ids is not provided. */
|
|
121
|
-
export type SetAccessRequestChannelIdsList = Array<
|
|
121
|
+
export type SetAccessRequestChannelIdsList = Array<unknown>;
|
|
122
122
|
/** List of users you wish to update access for. Can only be used if channel_ids is not provided. */
|
|
123
123
|
export type SetAccessRequestUserIdsList = Array<string>;
|
|
124
124
|
export interface SetAccessRequest {
|
|
@@ -127,9 +127,9 @@ export interface SetAccessRequest {
|
|
|
127
127
|
/** Desired level of access */
|
|
128
128
|
access_level: string;
|
|
129
129
|
/** List of channels you wish to update access for. Can only be used if user_ids is not provided. */
|
|
130
|
-
channel_ids?: SetAccessRequestChannelIdsList;
|
|
130
|
+
channel_ids?: SetAccessRequestChannelIdsList | undefined;
|
|
131
131
|
/** List of users you wish to update access for. Can only be used if channel_ids is not provided. */
|
|
132
|
-
user_ids?: SetAccessRequestUserIdsList;
|
|
132
|
+
user_ids?: SetAccessRequestUserIdsList | undefined;
|
|
133
133
|
}
|
|
134
134
|
/** The channel IDs that could not be updated */
|
|
135
135
|
export type SetAccessResponseFailedToUpdateChannelIdsList = Array<string>;
|
|
@@ -139,9 +139,9 @@ export interface SetAccessResponse {
|
|
|
139
139
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
140
140
|
ok: boolean;
|
|
141
141
|
/** The channel IDs that could not be updated */
|
|
142
|
-
failed_to_update_channel_ids?: SetAccessResponseFailedToUpdateChannelIdsList;
|
|
142
|
+
failed_to_update_channel_ids?: SetAccessResponseFailedToUpdateChannelIdsList | undefined;
|
|
143
143
|
/** The user IDs that could not be updated */
|
|
144
|
-
failed_to_update_user_ids?: SetAccessResponseFailedToUpdateUserIdsList;
|
|
144
|
+
failed_to_update_user_ids?: SetAccessResponseFailedToUpdateUserIdsList | undefined;
|
|
145
145
|
}
|
|
146
146
|
export type CreateCanvaseError = SlackOpError;
|
|
147
147
|
/** Create canvas for a user Required scopes -- bot: `canvases:write`; user: `canvases:write`; seamless_user: `seamless.user` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `canvas_disabled_user_team` -- Canvas is disabled on user's team - `restricted_action` -- User does not have permission to perform this action. - `canvas_creation_failed` -- Canvas was unable to be created. - `free_team_canvas_tab_already_exists` -- Free teams are limited to one canvas tab per channel - `free_teams_cannot_create_standalone_canvases` -- Free teams cannot create standalone canvases See https://docs.slack.dev/reference/methods/canvases.create */
|
|
@@ -169,7 +169,7 @@ export const deleteAccess: API.OperationMethod<
|
|
|
169
169
|
SlackOpContext
|
|
170
170
|
> = /*@__PURE__*/ API.make(() => ({
|
|
171
171
|
input: __S(4, __c1, 0) as any as S.Schema<DeleteAccessRequest>,
|
|
172
|
-
output: __S(
|
|
172
|
+
output: __S(16, __c4, 0) as any as S.Schema<DeleteAccessResponse>,
|
|
173
173
|
errors: [SlackError, SlackRateLimited],
|
|
174
174
|
protocol: SlackProtocol,
|
|
175
175
|
retry: Retry.Retry,
|
|
@@ -178,15 +178,15 @@ export const deleteAccess: API.OperationMethod<
|
|
|
178
178
|
}));
|
|
179
179
|
|
|
180
180
|
export type DeleteCanvaseError = SlackOpError;
|
|
181
|
-
/** Deletes a canvas Required scopes -- bot: `canvases:write`; user: `canvases:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `canvas_deleting_disabled` -- This functionality is disabled. - `canvas_not_found` -- The canvas does not exist, or is not visible to the calling user. - `restricted_action` -- User does not have permission to perform this action. See https://docs.slack.dev/reference/methods/canvases.delete */
|
|
181
|
+
/** Deletes a canvas Required scopes -- bot: `canvases:write`; user: `canvases:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `canvas_deleting_disabled` -- This functionality is disabled. - `canvas_not_found` -- The canvas does not exist, or is not visible to the calling user. - `restricted_action` -- User does not have permission to perform this action. - `use_skills_api` -- When the Skills API is enabled for the caller, skill canvases must be deleted with slackbot.skills.delete using a user OAuth token with skills:write. Pass the canvas ID as skill_id. The success response remains ok: true. The skill and its canvas have not been deleted. See https://docs.slack.dev/reference/methods/canvases.delete */
|
|
182
182
|
export const deleteCanvase: API.OperationMethod<
|
|
183
183
|
DeleteCanvaseRequest,
|
|
184
184
|
DeleteCanvaseResponse,
|
|
185
185
|
DeleteCanvaseError,
|
|
186
186
|
SlackOpContext
|
|
187
187
|
> = /*@__PURE__*/ API.make(() => ({
|
|
188
|
-
input: __S(
|
|
189
|
-
output: __S(
|
|
188
|
+
input: __S(20, __c5, 0) as any as S.Schema<DeleteCanvaseRequest>,
|
|
189
|
+
output: __S(24, __c6, 0) as any as S.Schema<DeleteCanvaseResponse>,
|
|
190
190
|
errors: [SlackError, SlackRateLimited],
|
|
191
191
|
protocol: SlackProtocol,
|
|
192
192
|
retry: Retry.Retry,
|
|
@@ -195,15 +195,15 @@ export const deleteCanvase: API.OperationMethod<
|
|
|
195
195
|
}));
|
|
196
196
|
|
|
197
197
|
export type EditCanvaseError = SlackOpError;
|
|
198
|
-
/** Update an existing canvas Required scopes -- bot: `canvases:write`; user: `canvases:write`; seamless_user: `seamless.user` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `canvas_not_found` -- The canvas you wish to apply changes to is not available. - `canvas_disabled_user_team` -- Canvas is disabled on user's team - `free_teams_cannot_edit_standalone_canvases` -- Free teams cannot edit standalone canvases - `restricted_action` -- User does not have permission to perform this action. - `canvas_editing_failed` -- The changes to the canvas failed to be applied. - `canvas_editing_locked` -- Another edit to this canvas is currently in progress. Please retry after a short delay. - `canvas_too_large` -- The canvas is too large to apply the requested changes. Reduce the size of the canvas or the edit and try again. See https://docs.slack.dev/reference/methods/canvases.edit */
|
|
198
|
+
/** Update an existing canvas Required scopes -- bot: `canvases:write`; user: `canvases:write`; seamless_user: `seamless.user` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `canvas_not_found` -- The canvas you wish to apply changes to is not available. - `canvas_disabled_user_team` -- Canvas is disabled on user's team - `free_teams_cannot_edit_standalone_canvases` -- Free teams cannot edit standalone canvases - `restricted_action` -- User does not have permission to perform this action. - `canvas_editing_failed` -- The changes to the canvas failed to be applied. - `canvas_editing_locked` -- Another edit to this canvas is currently in progress. Please retry after a short delay. - `canvas_too_large` -- The canvas is too large to apply the requested changes. Reduce the size of the canvas or the edit and try again. - `use_skills_api` -- When the Skills API is enabled for the caller, skill canvases must be updated with slackbot.skills.update using a user OAuth token with skills:write. Pass the canvas ID as skill_id. The instructions input replaces the whole document; section edits are not supported. The response contains a skill object. No changes were made. See https://docs.slack.dev/reference/methods/canvases.edit */
|
|
199
199
|
export const editCanvase: API.OperationMethod<
|
|
200
200
|
EditCanvaseRequest,
|
|
201
201
|
EditCanvaseResponse,
|
|
202
202
|
EditCanvaseError,
|
|
203
203
|
SlackOpContext
|
|
204
204
|
> = /*@__PURE__*/ API.make(() => ({
|
|
205
|
-
input: __S(
|
|
206
|
-
output: __S(
|
|
205
|
+
input: __S(28, __c7, 0) as any as S.Schema<EditCanvaseRequest>,
|
|
206
|
+
output: __S(24, __c6, 0) as any as S.Schema<EditCanvaseResponse>,
|
|
207
207
|
errors: [SlackError, SlackRateLimited],
|
|
208
208
|
protocol: SlackProtocol,
|
|
209
209
|
retry: Retry.Retry,
|
|
@@ -212,15 +212,15 @@ export const editCanvase: API.OperationMethod<
|
|
|
212
212
|
}));
|
|
213
213
|
|
|
214
214
|
export type GetContentError = SlackOpError;
|
|
215
|
-
/** Get the content of a canvas as markdown (default) or HTML. Required scopes -- bot: `canvases:read`; user: `canvases:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `canvas_disabled_user_team` -- Canvas is disabled on user's team - `canvas_not_found` -- The canvas does not exist, or is not visible to the calling user. See https://docs.slack.dev/reference/methods/canvases.getContent */
|
|
215
|
+
/** Get the content of a canvas as markdown (default) or HTML. Required scopes -- bot: `canvases:read`; user: `canvases:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `canvas_disabled_user_team` -- Canvas is disabled on user's team - `canvas_not_found` -- The canvas does not exist, or is not visible to the calling user. - `internal_error` -- The server could not complete your operation(s) without encountering an error, likely due to a transient issue on our end. It's possible some aspect of the operation succeeded before the error was raised. See https://docs.slack.dev/reference/methods/canvases.getContent */
|
|
216
216
|
export const getContent: API.OperationMethod<
|
|
217
217
|
GetContentRequest,
|
|
218
218
|
GetContentResponse,
|
|
219
219
|
GetContentError,
|
|
220
220
|
SlackOpContext
|
|
221
221
|
> = /*@__PURE__*/ API.make(() => ({
|
|
222
|
-
input: __S(
|
|
223
|
-
output: __S(
|
|
222
|
+
input: __S(32, __c8, 0) as any as S.Schema<GetContentRequest>,
|
|
223
|
+
output: __S(33, __c8, 1) as any as S.Schema<GetContentResponse>,
|
|
224
224
|
errors: [SlackError, SlackRateLimited],
|
|
225
225
|
protocol: SlackProtocol,
|
|
226
226
|
retry: Retry.Retry,
|
|
@@ -236,8 +236,8 @@ export const lookupSection: API.OperationMethod<
|
|
|
236
236
|
LookupSectionError,
|
|
237
237
|
SlackOpContext
|
|
238
238
|
> = /*@__PURE__*/ API.make(() => ({
|
|
239
|
-
input: __S(
|
|
240
|
-
output: __S(
|
|
239
|
+
input: __S(36, __c9, 0) as any as S.Schema<LookupSectionRequest>,
|
|
240
|
+
output: __S(39, __c9, 3) as any as S.Schema<LookupSectionResponse>,
|
|
241
241
|
errors: [SlackError, SlackRateLimited],
|
|
242
242
|
protocol: SlackProtocol,
|
|
243
243
|
retry: Retry.Retry,
|
|
@@ -253,8 +253,8 @@ export const setAccess: API.OperationMethod<
|
|
|
253
253
|
SetAccessError,
|
|
254
254
|
SlackOpContext
|
|
255
255
|
> = /*@__PURE__*/ API.make(() => ({
|
|
256
|
-
input: __S(
|
|
257
|
-
output: __S(
|
|
256
|
+
input: __S(40, __c10, 0) as any as S.Schema<SetAccessRequest>,
|
|
257
|
+
output: __S(16, __c4, 0) as any as S.Schema<SetAccessResponse>,
|
|
258
258
|
errors: [SlackError, SlackRateLimited],
|
|
259
259
|
protocol: SlackProtocol,
|
|
260
260
|
retry: Retry.Retry,
|
|
@@ -289,7 +289,7 @@ function __c1(j: number): any {
|
|
|
289
289
|
S.Struct({
|
|
290
290
|
canvas_id: S.String,
|
|
291
291
|
channel_ids: S.optional(__S(8, __c2, 0)),
|
|
292
|
-
user_ids: S.optional(__S(
|
|
292
|
+
user_ids: S.optional(__S(12, __c3, 0)),
|
|
293
293
|
}).pipe(T.Http({ method: "POST", uri: "/canvases.access.delete", code: 200 })),
|
|
294
294
|
).annotate({ identifier: "DeleteAccessRequest" });
|
|
295
295
|
}
|
|
@@ -297,22 +297,28 @@ function __c1(j: number): any {
|
|
|
297
297
|
function __c2(j: number): any {
|
|
298
298
|
switch (j) {
|
|
299
299
|
case 0:
|
|
300
|
-
return S.Array(S.
|
|
300
|
+
return S.Array(S.Unknown);
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
function __c3(j: number): any {
|
|
304
|
+
switch (j) {
|
|
305
|
+
case 0:
|
|
306
|
+
return S.Array(S.String);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
function __c4(j: number): any {
|
|
304
310
|
switch (j) {
|
|
305
311
|
case 0:
|
|
306
312
|
return S.suspend(() =>
|
|
307
313
|
S.Struct({
|
|
308
314
|
ok: S.Boolean,
|
|
309
|
-
failed_to_update_channel_ids: S.optional(__S(
|
|
310
|
-
failed_to_update_user_ids: S.optional(__S(
|
|
315
|
+
failed_to_update_channel_ids: S.optional(__S(12, __c3, 0)),
|
|
316
|
+
failed_to_update_user_ids: S.optional(__S(12, __c3, 0)),
|
|
311
317
|
}),
|
|
312
318
|
).annotate({ identifier: "DeleteAccessResponse" });
|
|
313
319
|
}
|
|
314
320
|
}
|
|
315
|
-
function
|
|
321
|
+
function __c5(j: number): any {
|
|
316
322
|
switch (j) {
|
|
317
323
|
case 0:
|
|
318
324
|
return S.suspend(() =>
|
|
@@ -322,7 +328,7 @@ function __c4(j: number): any {
|
|
|
322
328
|
).annotate({ identifier: "DeleteCanvaseRequest" });
|
|
323
329
|
}
|
|
324
330
|
}
|
|
325
|
-
function
|
|
331
|
+
function __c6(j: number): any {
|
|
326
332
|
switch (j) {
|
|
327
333
|
case 0:
|
|
328
334
|
return S.suspend(() =>
|
|
@@ -332,20 +338,18 @@ function __c5(j: number): any {
|
|
|
332
338
|
).annotate({ identifier: "DeleteCanvaseResponse" });
|
|
333
339
|
}
|
|
334
340
|
}
|
|
335
|
-
function
|
|
341
|
+
function __c7(j: number): any {
|
|
336
342
|
switch (j) {
|
|
337
343
|
case 0:
|
|
338
|
-
return S.Array(S.Unknown);
|
|
339
|
-
case 1:
|
|
340
344
|
return S.suspend(() =>
|
|
341
345
|
S.Struct({
|
|
342
346
|
canvas_id: S.String,
|
|
343
|
-
changes: __S(
|
|
347
|
+
changes: __S(8, __c2, 0),
|
|
344
348
|
}).pipe(T.Http({ method: "POST", uri: "/canvases.edit", code: 200 })),
|
|
345
349
|
).annotate({ identifier: "EditCanvaseRequest" });
|
|
346
350
|
}
|
|
347
351
|
}
|
|
348
|
-
function
|
|
352
|
+
function __c8(j: number): any {
|
|
349
353
|
switch (j) {
|
|
350
354
|
case 0:
|
|
351
355
|
return S.suspend(() =>
|
|
@@ -363,7 +367,7 @@ function __c7(j: number): any {
|
|
|
363
367
|
).annotate({ identifier: "GetContentResponse" });
|
|
364
368
|
}
|
|
365
369
|
}
|
|
366
|
-
function
|
|
370
|
+
function __c9(j: number): any {
|
|
367
371
|
switch (j) {
|
|
368
372
|
case 0:
|
|
369
373
|
return S.suspend(() =>
|
|
@@ -376,21 +380,21 @@ function __c8(j: number): any {
|
|
|
376
380
|
return S.suspend(() =>
|
|
377
381
|
S.Struct({
|
|
378
382
|
id: S.String,
|
|
379
|
-
child_section_ids: S.optional(__S(
|
|
383
|
+
child_section_ids: S.optional(__S(12, __c3, 0)),
|
|
380
384
|
}),
|
|
381
385
|
).annotate({ identifier: "LookupSectionResponseSectionsItem" });
|
|
382
386
|
case 2:
|
|
383
|
-
return S.Array(__S(
|
|
387
|
+
return S.Array(__S(37, __c9, 1));
|
|
384
388
|
case 3:
|
|
385
389
|
return S.suspend(() =>
|
|
386
390
|
S.Struct({
|
|
387
391
|
ok: S.Boolean,
|
|
388
|
-
sections: __S(
|
|
392
|
+
sections: __S(38, __c9, 2),
|
|
389
393
|
}),
|
|
390
394
|
).annotate({ identifier: "LookupSectionResponse" });
|
|
391
395
|
}
|
|
392
396
|
}
|
|
393
|
-
function
|
|
397
|
+
function __c10(j: number): any {
|
|
394
398
|
switch (j) {
|
|
395
399
|
case 0:
|
|
396
400
|
return S.suspend(() =>
|
|
@@ -398,7 +402,7 @@ function __c9(j: number): any {
|
|
|
398
402
|
canvas_id: S.String,
|
|
399
403
|
access_level: S.String,
|
|
400
404
|
channel_ids: S.optional(__S(8, __c2, 0)),
|
|
401
|
-
user_ids: S.optional(__S(
|
|
405
|
+
user_ids: S.optional(__S(12, __c3, 0)),
|
|
402
406
|
}).pipe(T.Http({ method: "POST", uri: "/canvases.access.set", code: 200 })),
|
|
403
407
|
).annotate({ identifier: "SetAccessRequest" });
|
|
404
408
|
}
|