@distilled.cloud/slack 0.0.0 → 1.0.0-rc.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/lib/credentials.d.ts +27 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +53 -0
- package/lib/credentials.js.map +1 -0
- package/lib/errors.d.ts +83 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +59 -0
- package/lib/errors.js.map +1 -0
- package/lib/index.d.ts +17 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +17 -0
- package/lib/index.js.map +1 -0
- package/lib/pagination.d.ts +31 -0
- package/lib/pagination.d.ts.map +1 -0
- package/lib/pagination.js +31 -0
- package/lib/pagination.js.map +1 -0
- package/lib/protocol.d.ts +18 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +230 -0
- package/lib/protocol.js.map +1 -0
- package/lib/retry.d.ts +52 -0
- package/lib/retry.d.ts.map +1 -0
- package/lib/retry.js +45 -0
- package/lib/retry.js.map +1 -0
- package/lib/services/admin.d.ts +2796 -0
- package/lib/services/admin.d.ts.map +1 -0
- package/lib/services/admin.js +3225 -0
- package/lib/services/admin.js.map +1 -0
- package/lib/services/api.d.ts +23 -0
- package/lib/services/api.d.ts.map +1 -0
- package/lib/services/api.js +26 -0
- package/lib/services/api.js.map +1 -0
- package/lib/services/apps.d.ts +568 -0
- package/lib/services/apps.d.ts.map +1 -0
- package/lib/services/apps.js +584 -0
- package/lib/services/apps.js.map +1 -0
- package/lib/services/assistant.d.ts +290 -0
- package/lib/services/assistant.d.ts.map +1 -0
- package/lib/services/assistant.js +232 -0
- package/lib/services/assistant.js.map +1 -0
- package/lib/services/auth.d.ts +90 -0
- package/lib/services/auth.d.ts.map +1 -0
- package/lib/services/auth.js +114 -0
- package/lib/services/auth.js.map +1 -0
- package/lib/services/blocks.d.ts +31 -0
- package/lib/services/blocks.d.ts.map +1 -0
- package/lib/services/blocks.js +31 -0
- package/lib/services/blocks.js.map +1 -0
- package/lib/services/bookmarks.d.ts +91 -0
- package/lib/services/bookmarks.d.ts.map +1 -0
- package/lib/services/bookmarks.js +98 -0
- package/lib/services/bookmarks.js.map +1 -0
- package/lib/services/bots.d.ts +60 -0
- package/lib/services/bots.d.ts.map +1 -0
- package/lib/services/bots.js +68 -0
- package/lib/services/bots.js.map +1 -0
- package/lib/services/calls.d.ts +124 -0
- package/lib/services/calls.d.ts.map +1 -0
- package/lib/services/calls.js +136 -0
- package/lib/services/calls.js.map +1 -0
- package/lib/services/canvases.d.ts +152 -0
- package/lib/services/canvases.d.ts.map +1 -0
- package/lib/services/canvases.js +152 -0
- package/lib/services/canvases.js.map +1 -0
- package/lib/services/chat.d.ts +525 -0
- package/lib/services/chat.d.ts.map +1 -0
- package/lib/services/chat.js +436 -0
- package/lib/services/chat.js.map +1 -0
- package/lib/services/conversations.d.ts +642 -0
- package/lib/services/conversations.d.ts.map +1 -0
- package/lib/services/conversations.js +769 -0
- package/lib/services/conversations.js.map +1 -0
- package/lib/services/dialog.d.ts +20 -0
- package/lib/services/dialog.d.ts.map +1 -0
- package/lib/services/dialog.js +27 -0
- package/lib/services/dialog.js.map +1 -0
- package/lib/services/dnd.d.ts +94 -0
- package/lib/services/dnd.d.ts.map +1 -0
- package/lib/services/dnd.js +111 -0
- package/lib/services/dnd.js.map +1 -0
- package/lib/services/emoji.d.ts +35 -0
- package/lib/services/emoji.d.ts.map +1 -0
- package/lib/services/emoji.js +40 -0
- package/lib/services/emoji.js.map +1 -0
- package/lib/services/entity.d.ts +93 -0
- package/lib/services/entity.d.ts.map +1 -0
- package/lib/services/entity.js +89 -0
- package/lib/services/entity.js.map +1 -0
- package/lib/services/files.d.ts +473 -0
- package/lib/services/files.d.ts.map +1 -0
- package/lib/services/files.js +510 -0
- package/lib/services/files.js.map +1 -0
- package/lib/services/functions.d.ts +235 -0
- package/lib/services/functions.d.ts.map +1 -0
- package/lib/services/functions.js +261 -0
- package/lib/services/functions.js.map +1 -0
- package/lib/services/index.d.ts +35 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +36 -0
- package/lib/services/index.js.map +1 -0
- package/lib/services/lists.d.ts +300 -0
- package/lib/services/lists.d.ts.map +1 -0
- package/lib/services/lists.js +366 -0
- package/lib/services/lists.js.map +1 -0
- package/lib/services/migration.d.ts +34 -0
- package/lib/services/migration.d.ts.map +1 -0
- package/lib/services/migration.js +36 -0
- package/lib/services/migration.js.map +1 -0
- package/lib/services/oauth.d.ts +307 -0
- package/lib/services/oauth.d.ts.map +1 -0
- package/lib/services/oauth.js +278 -0
- package/lib/services/oauth.js.map +1 -0
- package/lib/services/openid.d.ts +86 -0
- package/lib/services/openid.d.ts.map +1 -0
- package/lib/services/openid.js +93 -0
- package/lib/services/openid.js.map +1 -0
- package/lib/services/pins.d.ts +64 -0
- package/lib/services/pins.d.ts.map +1 -0
- package/lib/services/pins.js +75 -0
- package/lib/services/pins.js.map +1 -0
- package/lib/services/reactions.d.ts +108 -0
- package/lib/services/reactions.d.ts.map +1 -0
- package/lib/services/reactions.js +119 -0
- package/lib/services/reactions.js.map +1 -0
- package/lib/services/reminders.d.ts +89 -0
- package/lib/services/reminders.d.ts.map +1 -0
- package/lib/services/reminders.js +109 -0
- package/lib/services/reminders.js.map +1 -0
- package/lib/services/rtm.d.ts +68 -0
- package/lib/services/rtm.d.ts.map +1 -0
- package/lib/services/rtm.js +74 -0
- package/lib/services/rtm.js.map +1 -0
- package/lib/services/search.d.ts +239 -0
- package/lib/services/search.d.ts.map +1 -0
- package/lib/services/search.js +190 -0
- package/lib/services/search.js.map +1 -0
- package/lib/services/stars.d.ts +126 -0
- package/lib/services/stars.d.ts.map +1 -0
- package/lib/services/stars.js +145 -0
- package/lib/services/stars.js.map +1 -0
- package/lib/services/team.d.ts +309 -0
- package/lib/services/team.d.ts.map +1 -0
- package/lib/services/team.js +336 -0
- package/lib/services/team.js.map +1 -0
- package/lib/services/tooling.d.ts +31 -0
- package/lib/services/tooling.d.ts.map +1 -0
- package/lib/services/tooling.js +38 -0
- package/lib/services/tooling.js.map +1 -0
- package/lib/services/usergroups.d.ts +183 -0
- package/lib/services/usergroups.d.ts.map +1 -0
- package/lib/services/usergroups.js +180 -0
- package/lib/services/usergroups.js.map +1 -0
- package/lib/services/users.d.ts +246 -0
- package/lib/services/users.d.ts.map +1 -0
- package/lib/services/users.js +309 -0
- package/lib/services/users.js.map +1 -0
- package/lib/services/views.d.ts +84 -0
- package/lib/services/views.d.ts.map +1 -0
- package/lib/services/views.js +95 -0
- package/lib/services/views.js.map +1 -0
- package/lib/services/workflows.d.ts +231 -0
- package/lib/services/workflows.d.ts.map +1 -0
- package/lib/services/workflows.js +240 -0
- package/lib/services/workflows.js.map +1 -0
- package/lib/traits.d.ts +11 -0
- package/lib/traits.d.ts.map +1 -0
- package/lib/traits.js +12 -0
- package/lib/traits.js.map +1 -0
- package/package.json +82 -4
- package/src/credentials.ts +86 -0
- package/src/errors.ts +101 -0
- package/src/index.ts +20 -0
- package/src/pagination.ts +35 -0
- package/src/protocol.ts +326 -0
- package/src/retry.ts +76 -0
- package/src/services/admin.ts +7729 -0
- package/src/services/api.ts +58 -0
- package/src/services/apps.ts +1441 -0
- package/src/services/assistant.ts +639 -0
- package/src/services/auth.ts +241 -0
- package/src/services/blocks.ts +80 -0
- package/src/services/bookmarks.ts +223 -0
- package/src/services/bots.ts +144 -0
- package/src/services/calls.ts +318 -0
- package/src/services/canvases.ts +392 -0
- package/src/services/chat.ts +1191 -0
- package/src/services/conversations.ts +1754 -0
- package/src/services/dialog.ts +55 -0
- package/src/services/dnd.ts +246 -0
- package/src/services/emoji.ts +91 -0
- package/src/services/entity.ts +225 -0
- package/src/services/files.ts +1192 -0
- package/src/services/functions.ts +647 -0
- package/src/services/index.ts +35 -0
- package/src/services/lists.ts +832 -0
- package/src/services/migration.ts +85 -0
- package/src/services/oauth.ts +658 -0
- package/src/services/openid.ts +243 -0
- package/src/services/pins.ts +167 -0
- package/src/services/reactions.ts +272 -0
- package/src/services/reminders.ts +240 -0
- package/src/services/rtm.ts +162 -0
- package/src/services/search.ts +507 -0
- package/src/services/stars.ts +323 -0
- package/src/services/team.ts +836 -0
- package/src/services/tooling.ts +78 -0
- package/src/services/usergroups.ts +441 -0
- package/src/services/users.ts +685 -0
- package/src/services/views.ts +212 -0
- package/src/services/workflows.ts +607 -0
- package/src/traits.ts +45 -0
|
@@ -0,0 +1,607 @@
|
|
|
1
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
|
|
2
|
+
import * as S from "@distilled.cloud/core/schema";
|
|
3
|
+
import * as API from "@distilled.cloud/core/api";
|
|
4
|
+
import * as T from "../traits.ts";
|
|
5
|
+
import {
|
|
6
|
+
SlackProtocol,
|
|
7
|
+
type SlackOpError,
|
|
8
|
+
type SlackOpContext,
|
|
9
|
+
} from "../protocol.ts";
|
|
10
|
+
import { SlackError, SlackRateLimited } from "../errors.ts";
|
|
11
|
+
import * as Retry from "../retry.ts";
|
|
12
|
+
|
|
13
|
+
export type { SlackOpError, SlackOpContext };
|
|
14
|
+
|
|
15
|
+
/** Comma-separated array of trigger IDs to add; max 15 */
|
|
16
|
+
export type AddFeaturedRequestTriggerIdsList = Array<string>;
|
|
17
|
+
export const AddFeaturedRequestTriggerIdsList = /*@__PURE__*/ S.Array(
|
|
18
|
+
S.String,
|
|
19
|
+
) as any as S.Schema<AddFeaturedRequestTriggerIdsList>;
|
|
20
|
+
|
|
21
|
+
export interface AddFeaturedRequest {
|
|
22
|
+
/** Channel to add featured workflow in. */
|
|
23
|
+
channel_id: string;
|
|
24
|
+
/** Comma-separated array of trigger IDs to add; max 15 */
|
|
25
|
+
trigger_ids: AddFeaturedRequestTriggerIdsList;
|
|
26
|
+
}
|
|
27
|
+
export const AddFeaturedRequest = /*@__PURE__*/ S.suspend(() =>
|
|
28
|
+
S.Struct({
|
|
29
|
+
channel_id: S.String,
|
|
30
|
+
trigger_ids: AddFeaturedRequestTriggerIdsList,
|
|
31
|
+
}).pipe(
|
|
32
|
+
T.Http({ method: "POST", uri: "/workflows.featured.add", code: 200 }),
|
|
33
|
+
),
|
|
34
|
+
).annotate({
|
|
35
|
+
identifier: "AddFeaturedRequest",
|
|
36
|
+
}) as any as S.Schema<AddFeaturedRequest>;
|
|
37
|
+
|
|
38
|
+
export interface AddFeaturedResponse {
|
|
39
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
40
|
+
ok: boolean;
|
|
41
|
+
}
|
|
42
|
+
export const AddFeaturedResponse = /*@__PURE__*/ S.suspend(() =>
|
|
43
|
+
S.Struct({
|
|
44
|
+
ok: S.Boolean,
|
|
45
|
+
}),
|
|
46
|
+
).annotate({
|
|
47
|
+
identifier: "AddFeaturedResponse",
|
|
48
|
+
}) as any as S.Schema<AddFeaturedResponse>;
|
|
49
|
+
|
|
50
|
+
/** List of encoded user IDs */
|
|
51
|
+
export type AddTriggersPermissionsRequestUserIdsList = Array<string>;
|
|
52
|
+
export const AddTriggersPermissionsRequestUserIdsList = /*@__PURE__*/ S.Array(
|
|
53
|
+
S.String,
|
|
54
|
+
) as any as S.Schema<AddTriggersPermissionsRequestUserIdsList>;
|
|
55
|
+
|
|
56
|
+
/** List of encoded channel IDs */
|
|
57
|
+
export type AddTriggersPermissionsRequestChannelIdsList = Array<string>;
|
|
58
|
+
export const AddTriggersPermissionsRequestChannelIdsList =
|
|
59
|
+
/*@__PURE__*/ S.Array(
|
|
60
|
+
S.String,
|
|
61
|
+
) as any as S.Schema<AddTriggersPermissionsRequestChannelIdsList>;
|
|
62
|
+
|
|
63
|
+
/** List of encoded workspace IDs */
|
|
64
|
+
export type AddTriggersPermissionsRequestTeamIdsList = Array<string>;
|
|
65
|
+
export const AddTriggersPermissionsRequestTeamIdsList = /*@__PURE__*/ S.Array(
|
|
66
|
+
S.String,
|
|
67
|
+
) as any as S.Schema<AddTriggersPermissionsRequestTeamIdsList>;
|
|
68
|
+
|
|
69
|
+
/** List of encoded organization IDs */
|
|
70
|
+
export type AddTriggersPermissionsRequestOrgIdsList = Array<string>;
|
|
71
|
+
export const AddTriggersPermissionsRequestOrgIdsList = /*@__PURE__*/ S.Array(
|
|
72
|
+
S.String,
|
|
73
|
+
) as any as S.Schema<AddTriggersPermissionsRequestOrgIdsList>;
|
|
74
|
+
|
|
75
|
+
export interface AddTriggersPermissionsRequest {
|
|
76
|
+
/** Encoded ID of the trigger */
|
|
77
|
+
trigger_id: string;
|
|
78
|
+
/** List of encoded user IDs */
|
|
79
|
+
user_ids?: AddTriggersPermissionsRequestUserIdsList;
|
|
80
|
+
/** List of encoded channel IDs */
|
|
81
|
+
channel_ids?: AddTriggersPermissionsRequestChannelIdsList;
|
|
82
|
+
/** List of encoded workspace IDs */
|
|
83
|
+
team_ids?: AddTriggersPermissionsRequestTeamIdsList;
|
|
84
|
+
/** List of encoded organization IDs */
|
|
85
|
+
org_ids?: AddTriggersPermissionsRequestOrgIdsList;
|
|
86
|
+
}
|
|
87
|
+
export const AddTriggersPermissionsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
88
|
+
S.Struct({
|
|
89
|
+
trigger_id: S.String,
|
|
90
|
+
user_ids: S.optional(AddTriggersPermissionsRequestUserIdsList),
|
|
91
|
+
channel_ids: S.optional(AddTriggersPermissionsRequestChannelIdsList),
|
|
92
|
+
team_ids: S.optional(AddTriggersPermissionsRequestTeamIdsList),
|
|
93
|
+
org_ids: S.optional(AddTriggersPermissionsRequestOrgIdsList),
|
|
94
|
+
}).pipe(
|
|
95
|
+
T.Http({
|
|
96
|
+
method: "POST",
|
|
97
|
+
uri: "/workflows.triggers.permissions.add",
|
|
98
|
+
code: 200,
|
|
99
|
+
}),
|
|
100
|
+
),
|
|
101
|
+
).annotate({
|
|
102
|
+
identifier: "AddTriggersPermissionsRequest",
|
|
103
|
+
}) as any as S.Schema<AddTriggersPermissionsRequest>;
|
|
104
|
+
|
|
105
|
+
export interface AddTriggersPermissionsResponse {
|
|
106
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
107
|
+
ok: boolean;
|
|
108
|
+
}
|
|
109
|
+
export const AddTriggersPermissionsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
110
|
+
S.Struct({
|
|
111
|
+
ok: S.Boolean,
|
|
112
|
+
}),
|
|
113
|
+
).annotate({
|
|
114
|
+
identifier: "AddTriggersPermissionsResponse",
|
|
115
|
+
}) as any as S.Schema<AddTriggersPermissionsResponse>;
|
|
116
|
+
|
|
117
|
+
/** Comma-separated array of channel IDs to list featured workflows for. */
|
|
118
|
+
export type ListFeaturedRequestChannelIdsList = Array<string>;
|
|
119
|
+
export const ListFeaturedRequestChannelIdsList = /*@__PURE__*/ S.Array(
|
|
120
|
+
S.String,
|
|
121
|
+
) as any as S.Schema<ListFeaturedRequestChannelIdsList>;
|
|
122
|
+
|
|
123
|
+
export interface ListFeaturedRequest {
|
|
124
|
+
/** Comma-separated array of channel IDs to list featured workflows for. */
|
|
125
|
+
channel_ids: ListFeaturedRequestChannelIdsList;
|
|
126
|
+
}
|
|
127
|
+
export const ListFeaturedRequest = /*@__PURE__*/ S.suspend(() =>
|
|
128
|
+
S.Struct({
|
|
129
|
+
channel_ids: ListFeaturedRequestChannelIdsList,
|
|
130
|
+
}).pipe(
|
|
131
|
+
T.Http({ method: "POST", uri: "/workflows.featured.list", code: 200 }),
|
|
132
|
+
),
|
|
133
|
+
).annotate({
|
|
134
|
+
identifier: "ListFeaturedRequest",
|
|
135
|
+
}) as any as S.Schema<ListFeaturedRequest>;
|
|
136
|
+
|
|
137
|
+
export interface ListFeaturedResponseFeaturedWorkflowsItemTriggersItem {
|
|
138
|
+
id: string;
|
|
139
|
+
title: string;
|
|
140
|
+
}
|
|
141
|
+
export const ListFeaturedResponseFeaturedWorkflowsItemTriggersItem =
|
|
142
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
143
|
+
S.Struct({
|
|
144
|
+
id: S.String,
|
|
145
|
+
title: S.String,
|
|
146
|
+
}),
|
|
147
|
+
).annotate({
|
|
148
|
+
identifier: "ListFeaturedResponseFeaturedWorkflowsItemTriggersItem",
|
|
149
|
+
}) as any as S.Schema<ListFeaturedResponseFeaturedWorkflowsItemTriggersItem>;
|
|
150
|
+
|
|
151
|
+
/** Array of triggers associated with channel */
|
|
152
|
+
export type ListFeaturedResponseFeaturedWorkflowsItemTriggersList =
|
|
153
|
+
Array<ListFeaturedResponseFeaturedWorkflowsItemTriggersItem>;
|
|
154
|
+
export const ListFeaturedResponseFeaturedWorkflowsItemTriggersList =
|
|
155
|
+
/*@__PURE__*/ S.Array(
|
|
156
|
+
ListFeaturedResponseFeaturedWorkflowsItemTriggersItem,
|
|
157
|
+
) as any as S.Schema<ListFeaturedResponseFeaturedWorkflowsItemTriggersList>;
|
|
158
|
+
|
|
159
|
+
export interface ListFeaturedResponseFeaturedWorkflowsItem {
|
|
160
|
+
/** Channel where workflows are featured */
|
|
161
|
+
channel_id: string;
|
|
162
|
+
/** Array of triggers associated with channel */
|
|
163
|
+
triggers: ListFeaturedResponseFeaturedWorkflowsItemTriggersList;
|
|
164
|
+
}
|
|
165
|
+
export const ListFeaturedResponseFeaturedWorkflowsItem =
|
|
166
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
167
|
+
S.Struct({
|
|
168
|
+
channel_id: S.String,
|
|
169
|
+
triggers: ListFeaturedResponseFeaturedWorkflowsItemTriggersList,
|
|
170
|
+
}),
|
|
171
|
+
).annotate({
|
|
172
|
+
identifier: "ListFeaturedResponseFeaturedWorkflowsItem",
|
|
173
|
+
}) as any as S.Schema<ListFeaturedResponseFeaturedWorkflowsItem>;
|
|
174
|
+
|
|
175
|
+
export type ListFeaturedResponseFeaturedWorkflowsList =
|
|
176
|
+
Array<ListFeaturedResponseFeaturedWorkflowsItem>;
|
|
177
|
+
export const ListFeaturedResponseFeaturedWorkflowsList = /*@__PURE__*/ S.Array(
|
|
178
|
+
ListFeaturedResponseFeaturedWorkflowsItem,
|
|
179
|
+
) as any as S.Schema<ListFeaturedResponseFeaturedWorkflowsList>;
|
|
180
|
+
|
|
181
|
+
export interface ListFeaturedResponse {
|
|
182
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
183
|
+
ok: boolean;
|
|
184
|
+
featured_workflows: ListFeaturedResponseFeaturedWorkflowsList;
|
|
185
|
+
}
|
|
186
|
+
export const ListFeaturedResponse = /*@__PURE__*/ S.suspend(() =>
|
|
187
|
+
S.Struct({
|
|
188
|
+
ok: S.Boolean,
|
|
189
|
+
featured_workflows: ListFeaturedResponseFeaturedWorkflowsList,
|
|
190
|
+
}),
|
|
191
|
+
).annotate({
|
|
192
|
+
identifier: "ListFeaturedResponse",
|
|
193
|
+
}) as any as S.Schema<ListFeaturedResponse>;
|
|
194
|
+
|
|
195
|
+
export interface ListTriggersPermissionsRequest {
|
|
196
|
+
/** Encoded ID of the trigger */
|
|
197
|
+
trigger_id: string;
|
|
198
|
+
}
|
|
199
|
+
export const ListTriggersPermissionsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
200
|
+
S.Struct({
|
|
201
|
+
trigger_id: S.String,
|
|
202
|
+
}).pipe(
|
|
203
|
+
T.Http({
|
|
204
|
+
method: "POST",
|
|
205
|
+
uri: "/workflows.triggers.permissions.list",
|
|
206
|
+
code: 200,
|
|
207
|
+
}),
|
|
208
|
+
),
|
|
209
|
+
).annotate({
|
|
210
|
+
identifier: "ListTriggersPermissionsRequest",
|
|
211
|
+
}) as any as S.Schema<ListTriggersPermissionsRequest>;
|
|
212
|
+
|
|
213
|
+
export interface ListTriggersPermissionsResponse {
|
|
214
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
215
|
+
ok: boolean;
|
|
216
|
+
}
|
|
217
|
+
export const ListTriggersPermissionsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
218
|
+
S.Struct({
|
|
219
|
+
ok: S.Boolean,
|
|
220
|
+
}),
|
|
221
|
+
).annotate({
|
|
222
|
+
identifier: "ListTriggersPermissionsResponse",
|
|
223
|
+
}) as any as S.Schema<ListTriggersPermissionsResponse>;
|
|
224
|
+
|
|
225
|
+
/** Comma-separated array of trigger IDs to remove; max 15 */
|
|
226
|
+
export type RemoveFeaturedRequestTriggerIdsList = Array<string>;
|
|
227
|
+
export const RemoveFeaturedRequestTriggerIdsList = /*@__PURE__*/ S.Array(
|
|
228
|
+
S.String,
|
|
229
|
+
) as any as S.Schema<RemoveFeaturedRequestTriggerIdsList>;
|
|
230
|
+
|
|
231
|
+
export interface RemoveFeaturedRequest {
|
|
232
|
+
/** Channel to remove featured workflow from. */
|
|
233
|
+
channel_id: string;
|
|
234
|
+
/** Comma-separated array of trigger IDs to remove; max 15 */
|
|
235
|
+
trigger_ids: RemoveFeaturedRequestTriggerIdsList;
|
|
236
|
+
}
|
|
237
|
+
export const RemoveFeaturedRequest = /*@__PURE__*/ S.suspend(() =>
|
|
238
|
+
S.Struct({
|
|
239
|
+
channel_id: S.String,
|
|
240
|
+
trigger_ids: RemoveFeaturedRequestTriggerIdsList,
|
|
241
|
+
}).pipe(
|
|
242
|
+
T.Http({ method: "POST", uri: "/workflows.featured.remove", code: 200 }),
|
|
243
|
+
),
|
|
244
|
+
).annotate({
|
|
245
|
+
identifier: "RemoveFeaturedRequest",
|
|
246
|
+
}) as any as S.Schema<RemoveFeaturedRequest>;
|
|
247
|
+
|
|
248
|
+
export interface RemoveFeaturedResponse {
|
|
249
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
250
|
+
ok: boolean;
|
|
251
|
+
}
|
|
252
|
+
export const RemoveFeaturedResponse = /*@__PURE__*/ S.suspend(() =>
|
|
253
|
+
S.Struct({
|
|
254
|
+
ok: S.Boolean,
|
|
255
|
+
}),
|
|
256
|
+
).annotate({
|
|
257
|
+
identifier: "RemoveFeaturedResponse",
|
|
258
|
+
}) as any as S.Schema<RemoveFeaturedResponse>;
|
|
259
|
+
|
|
260
|
+
/** List of encoded user IDs */
|
|
261
|
+
export type RemoveTriggersPermissionsRequestUserIdsList = Array<string>;
|
|
262
|
+
export const RemoveTriggersPermissionsRequestUserIdsList =
|
|
263
|
+
/*@__PURE__*/ S.Array(
|
|
264
|
+
S.String,
|
|
265
|
+
) as any as S.Schema<RemoveTriggersPermissionsRequestUserIdsList>;
|
|
266
|
+
|
|
267
|
+
/** List of encoded channel IDs */
|
|
268
|
+
export type RemoveTriggersPermissionsRequestChannelIdsList = Array<string>;
|
|
269
|
+
export const RemoveTriggersPermissionsRequestChannelIdsList =
|
|
270
|
+
/*@__PURE__*/ S.Array(
|
|
271
|
+
S.String,
|
|
272
|
+
) as any as S.Schema<RemoveTriggersPermissionsRequestChannelIdsList>;
|
|
273
|
+
|
|
274
|
+
/** List of encoded workspace IDs */
|
|
275
|
+
export type RemoveTriggersPermissionsRequestTeamIdsList = Array<string>;
|
|
276
|
+
export const RemoveTriggersPermissionsRequestTeamIdsList =
|
|
277
|
+
/*@__PURE__*/ S.Array(
|
|
278
|
+
S.String,
|
|
279
|
+
) as any as S.Schema<RemoveTriggersPermissionsRequestTeamIdsList>;
|
|
280
|
+
|
|
281
|
+
/** List of encoded organization IDs */
|
|
282
|
+
export type RemoveTriggersPermissionsRequestOrgIdsList = Array<string>;
|
|
283
|
+
export const RemoveTriggersPermissionsRequestOrgIdsList = /*@__PURE__*/ S.Array(
|
|
284
|
+
S.String,
|
|
285
|
+
) as any as S.Schema<RemoveTriggersPermissionsRequestOrgIdsList>;
|
|
286
|
+
|
|
287
|
+
export interface RemoveTriggersPermissionsRequest {
|
|
288
|
+
/** Encoded ID of the trigger */
|
|
289
|
+
trigger_id: string;
|
|
290
|
+
/** List of encoded user IDs */
|
|
291
|
+
user_ids?: RemoveTriggersPermissionsRequestUserIdsList;
|
|
292
|
+
/** List of encoded channel IDs */
|
|
293
|
+
channel_ids?: RemoveTriggersPermissionsRequestChannelIdsList;
|
|
294
|
+
/** List of encoded workspace IDs */
|
|
295
|
+
team_ids?: RemoveTriggersPermissionsRequestTeamIdsList;
|
|
296
|
+
/** List of encoded organization IDs */
|
|
297
|
+
org_ids?: RemoveTriggersPermissionsRequestOrgIdsList;
|
|
298
|
+
}
|
|
299
|
+
export const RemoveTriggersPermissionsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
300
|
+
S.Struct({
|
|
301
|
+
trigger_id: S.String,
|
|
302
|
+
user_ids: S.optional(RemoveTriggersPermissionsRequestUserIdsList),
|
|
303
|
+
channel_ids: S.optional(RemoveTriggersPermissionsRequestChannelIdsList),
|
|
304
|
+
team_ids: S.optional(RemoveTriggersPermissionsRequestTeamIdsList),
|
|
305
|
+
org_ids: S.optional(RemoveTriggersPermissionsRequestOrgIdsList),
|
|
306
|
+
}).pipe(
|
|
307
|
+
T.Http({
|
|
308
|
+
method: "POST",
|
|
309
|
+
uri: "/workflows.triggers.permissions.remove",
|
|
310
|
+
code: 200,
|
|
311
|
+
}),
|
|
312
|
+
),
|
|
313
|
+
).annotate({
|
|
314
|
+
identifier: "RemoveTriggersPermissionsRequest",
|
|
315
|
+
}) as any as S.Schema<RemoveTriggersPermissionsRequest>;
|
|
316
|
+
|
|
317
|
+
export type RemoveTriggersPermissionsResponsePermissionType =
|
|
318
|
+
| "everyone"
|
|
319
|
+
| "app_collaborators"
|
|
320
|
+
| "named_entities";
|
|
321
|
+
export const RemoveTriggersPermissionsResponsePermissionType =
|
|
322
|
+
/*@__PURE__*/ S.String;
|
|
323
|
+
|
|
324
|
+
/** A list of encoded user IDs. */
|
|
325
|
+
export type RemoveTriggersPermissionsResponseUserIdsList = Array<string>;
|
|
326
|
+
export const RemoveTriggersPermissionsResponseUserIdsList =
|
|
327
|
+
/*@__PURE__*/ S.Array(
|
|
328
|
+
S.String,
|
|
329
|
+
) as any as S.Schema<RemoveTriggersPermissionsResponseUserIdsList>;
|
|
330
|
+
|
|
331
|
+
/** A list of encoded channel IDs. */
|
|
332
|
+
export type RemoveTriggersPermissionsResponseChannelIdsList = Array<string>;
|
|
333
|
+
export const RemoveTriggersPermissionsResponseChannelIdsList =
|
|
334
|
+
/*@__PURE__*/ S.Array(
|
|
335
|
+
S.String,
|
|
336
|
+
) as any as S.Schema<RemoveTriggersPermissionsResponseChannelIdsList>;
|
|
337
|
+
|
|
338
|
+
/** Encoded workspace IDs. */
|
|
339
|
+
export type RemoveTriggersPermissionsResponseTeamIdsList = Array<string>;
|
|
340
|
+
export const RemoveTriggersPermissionsResponseTeamIdsList =
|
|
341
|
+
/*@__PURE__*/ S.Array(
|
|
342
|
+
S.String,
|
|
343
|
+
) as any as S.Schema<RemoveTriggersPermissionsResponseTeamIdsList>;
|
|
344
|
+
|
|
345
|
+
export type RemoveTriggersPermissionsResponseOrgIdsList = Array<string>;
|
|
346
|
+
export const RemoveTriggersPermissionsResponseOrgIdsList =
|
|
347
|
+
/*@__PURE__*/ S.Array(
|
|
348
|
+
S.String,
|
|
349
|
+
) as any as S.Schema<RemoveTriggersPermissionsResponseOrgIdsList>;
|
|
350
|
+
|
|
351
|
+
export interface RemoveTriggersPermissionsResponse {
|
|
352
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
353
|
+
ok: boolean;
|
|
354
|
+
permission_type: RemoveTriggersPermissionsResponsePermissionType;
|
|
355
|
+
/** A list of encoded user IDs. */
|
|
356
|
+
user_ids?: RemoveTriggersPermissionsResponseUserIdsList;
|
|
357
|
+
/** A list of encoded channel IDs. */
|
|
358
|
+
channel_ids?: RemoveTriggersPermissionsResponseChannelIdsList;
|
|
359
|
+
/** Encoded workspace IDs. */
|
|
360
|
+
team_ids?: RemoveTriggersPermissionsResponseTeamIdsList;
|
|
361
|
+
org_ids?: RemoveTriggersPermissionsResponseOrgIdsList;
|
|
362
|
+
}
|
|
363
|
+
export const RemoveTriggersPermissionsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
364
|
+
S.Struct({
|
|
365
|
+
ok: S.Boolean,
|
|
366
|
+
permission_type: RemoveTriggersPermissionsResponsePermissionType,
|
|
367
|
+
user_ids: S.optional(RemoveTriggersPermissionsResponseUserIdsList),
|
|
368
|
+
channel_ids: S.optional(RemoveTriggersPermissionsResponseChannelIdsList),
|
|
369
|
+
team_ids: S.optional(RemoveTriggersPermissionsResponseTeamIdsList),
|
|
370
|
+
org_ids: S.optional(RemoveTriggersPermissionsResponseOrgIdsList),
|
|
371
|
+
}),
|
|
372
|
+
).annotate({
|
|
373
|
+
identifier: "RemoveTriggersPermissionsResponse",
|
|
374
|
+
}) as any as S.Schema<RemoveTriggersPermissionsResponse>;
|
|
375
|
+
|
|
376
|
+
/** Comma-separated array of trigger IDs that will replace any existing featured workflows in the channel; max 15 */
|
|
377
|
+
export type SetFeaturedRequestTriggerIdsList = Array<string>;
|
|
378
|
+
export const SetFeaturedRequestTriggerIdsList = /*@__PURE__*/ S.Array(
|
|
379
|
+
S.String,
|
|
380
|
+
) as any as S.Schema<SetFeaturedRequestTriggerIdsList>;
|
|
381
|
+
|
|
382
|
+
export interface SetFeaturedRequest {
|
|
383
|
+
/** Channel to set featured workflows in. */
|
|
384
|
+
channel_id: string;
|
|
385
|
+
/** Comma-separated array of trigger IDs that will replace any existing featured workflows in the channel; max 15 */
|
|
386
|
+
trigger_ids: SetFeaturedRequestTriggerIdsList;
|
|
387
|
+
}
|
|
388
|
+
export const SetFeaturedRequest = /*@__PURE__*/ S.suspend(() =>
|
|
389
|
+
S.Struct({
|
|
390
|
+
channel_id: S.String,
|
|
391
|
+
trigger_ids: SetFeaturedRequestTriggerIdsList,
|
|
392
|
+
}).pipe(
|
|
393
|
+
T.Http({ method: "POST", uri: "/workflows.featured.set", code: 200 }),
|
|
394
|
+
),
|
|
395
|
+
).annotate({
|
|
396
|
+
identifier: "SetFeaturedRequest",
|
|
397
|
+
}) as any as S.Schema<SetFeaturedRequest>;
|
|
398
|
+
|
|
399
|
+
export interface SetFeaturedResponse {
|
|
400
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
401
|
+
ok: boolean;
|
|
402
|
+
}
|
|
403
|
+
export const SetFeaturedResponse = /*@__PURE__*/ S.suspend(() =>
|
|
404
|
+
S.Struct({
|
|
405
|
+
ok: S.Boolean,
|
|
406
|
+
}),
|
|
407
|
+
).annotate({
|
|
408
|
+
identifier: "SetFeaturedResponse",
|
|
409
|
+
}) as any as S.Schema<SetFeaturedResponse>;
|
|
410
|
+
|
|
411
|
+
/** The type of permission that defines who can run a trigger */
|
|
412
|
+
export type SetTriggersPermissionsRequestPermissionType =
|
|
413
|
+
| "everyone"
|
|
414
|
+
| "app_collaborators"
|
|
415
|
+
| "named_entities";
|
|
416
|
+
export const SetTriggersPermissionsRequestPermissionType =
|
|
417
|
+
/*@__PURE__*/ S.String;
|
|
418
|
+
|
|
419
|
+
/** List of encoded user IDs */
|
|
420
|
+
export type SetTriggersPermissionsRequestUserIdsList = Array<string>;
|
|
421
|
+
export const SetTriggersPermissionsRequestUserIdsList = /*@__PURE__*/ S.Array(
|
|
422
|
+
S.String,
|
|
423
|
+
) as any as S.Schema<SetTriggersPermissionsRequestUserIdsList>;
|
|
424
|
+
|
|
425
|
+
/** List of encoded channel IDs */
|
|
426
|
+
export type SetTriggersPermissionsRequestChannelIdsList = Array<string>;
|
|
427
|
+
export const SetTriggersPermissionsRequestChannelIdsList =
|
|
428
|
+
/*@__PURE__*/ S.Array(
|
|
429
|
+
S.String,
|
|
430
|
+
) as any as S.Schema<SetTriggersPermissionsRequestChannelIdsList>;
|
|
431
|
+
|
|
432
|
+
/** List of encoded workspace IDs */
|
|
433
|
+
export type SetTriggersPermissionsRequestTeamIdsList = Array<string>;
|
|
434
|
+
export const SetTriggersPermissionsRequestTeamIdsList = /*@__PURE__*/ S.Array(
|
|
435
|
+
S.String,
|
|
436
|
+
) as any as S.Schema<SetTriggersPermissionsRequestTeamIdsList>;
|
|
437
|
+
|
|
438
|
+
/** List of encoded organization IDs */
|
|
439
|
+
export type SetTriggersPermissionsRequestOrgIdsList = Array<string>;
|
|
440
|
+
export const SetTriggersPermissionsRequestOrgIdsList = /*@__PURE__*/ S.Array(
|
|
441
|
+
S.String,
|
|
442
|
+
) as any as S.Schema<SetTriggersPermissionsRequestOrgIdsList>;
|
|
443
|
+
|
|
444
|
+
export interface SetTriggersPermissionsRequest {
|
|
445
|
+
/** Encoded ID of the trigger */
|
|
446
|
+
trigger_id: string;
|
|
447
|
+
/** The type of permission that defines who can run a trigger */
|
|
448
|
+
permission_type: SetTriggersPermissionsRequestPermissionType | (string & {});
|
|
449
|
+
/** List of encoded user IDs */
|
|
450
|
+
user_ids?: SetTriggersPermissionsRequestUserIdsList;
|
|
451
|
+
/** List of encoded channel IDs */
|
|
452
|
+
channel_ids?: SetTriggersPermissionsRequestChannelIdsList;
|
|
453
|
+
/** List of encoded workspace IDs */
|
|
454
|
+
team_ids?: SetTriggersPermissionsRequestTeamIdsList;
|
|
455
|
+
/** List of encoded organization IDs */
|
|
456
|
+
org_ids?: SetTriggersPermissionsRequestOrgIdsList;
|
|
457
|
+
}
|
|
458
|
+
export const SetTriggersPermissionsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
459
|
+
S.Struct({
|
|
460
|
+
trigger_id: S.String,
|
|
461
|
+
permission_type: SetTriggersPermissionsRequestPermissionType,
|
|
462
|
+
user_ids: S.optional(SetTriggersPermissionsRequestUserIdsList),
|
|
463
|
+
channel_ids: S.optional(SetTriggersPermissionsRequestChannelIdsList),
|
|
464
|
+
team_ids: S.optional(SetTriggersPermissionsRequestTeamIdsList),
|
|
465
|
+
org_ids: S.optional(SetTriggersPermissionsRequestOrgIdsList),
|
|
466
|
+
}).pipe(
|
|
467
|
+
T.Http({
|
|
468
|
+
method: "POST",
|
|
469
|
+
uri: "/workflows.triggers.permissions.set",
|
|
470
|
+
code: 200,
|
|
471
|
+
}),
|
|
472
|
+
),
|
|
473
|
+
).annotate({
|
|
474
|
+
identifier: "SetTriggersPermissionsRequest",
|
|
475
|
+
}) as any as S.Schema<SetTriggersPermissionsRequest>;
|
|
476
|
+
|
|
477
|
+
export interface SetTriggersPermissionsResponse {
|
|
478
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
479
|
+
ok: boolean;
|
|
480
|
+
}
|
|
481
|
+
export const SetTriggersPermissionsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
482
|
+
S.Struct({
|
|
483
|
+
ok: S.Boolean,
|
|
484
|
+
}),
|
|
485
|
+
).annotate({
|
|
486
|
+
identifier: "SetTriggersPermissionsResponse",
|
|
487
|
+
}) as any as S.Schema<SetTriggersPermissionsResponse>;
|
|
488
|
+
|
|
489
|
+
export type AddFeaturedError = SlackOpError;
|
|
490
|
+
/** Add featured workflows to a channel. Required scopes — bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `method_not_supported` — Method not yet supported - `restricted_action` — User does not have access to this method. - `error_modifying_workflows` — Error modifying workflows See https://docs.slack.dev/reference/methods/workflows.featured.add */
|
|
491
|
+
export const addFeatured: API.OperationMethod<
|
|
492
|
+
AddFeaturedRequest,
|
|
493
|
+
AddFeaturedResponse,
|
|
494
|
+
AddFeaturedError,
|
|
495
|
+
SlackOpContext
|
|
496
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
497
|
+
input: AddFeaturedRequest,
|
|
498
|
+
output: AddFeaturedResponse,
|
|
499
|
+
errors: [SlackError, SlackRateLimited],
|
|
500
|
+
protocol: SlackProtocol,
|
|
501
|
+
retry: Retry.Retry,
|
|
502
|
+
}));
|
|
503
|
+
|
|
504
|
+
export type AddTriggersPermissionsError = SlackOpError;
|
|
505
|
+
/** Allows users to run a trigger that has its permission type set to named_entities Required scopes — bot: `triggers:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `access_denied` — This actor does not have access to the permissions on this resource. - `channel_not_found` — One or more of the listed channels could not be found. - `connected_org_denied` — The workspace admin does not allow connected organizations to be named_entities. - `connected_team_denied` — The workspace admin does not allow connected teams to be named_entities. - `connected_user_denied` — The workspace admin does not allow connected users to be named_entities. - `invalid_permission_type` — This trigger requires permission_type to be set as named_entities before adding users. - `no_valid_named_entities` — None of the provided named entities were valid - `org_not_connected` — One of more of the listed organizations were not connected. - `org_not_found` — One or more of the listed organizations could not be found. - `shared_channel_denied` — The workspace admin does not allow shared channels to be named_entities. - `team_not_connected` — One of more of the listed teams were not connected by org. - `team_not_found` — One or more of the listed teams could not be found. - `too_many_named_entities` — Too many named entities passed into the trigger permissions setting. - `trigger_not_found` — This trigger does not exist. - `unknown_method` — This method does not exist. - `user_not_found` — One or more of the listed users could not be found. See https://docs.slack.dev/reference/methods/workflows.triggers.permissions.add */
|
|
506
|
+
export const addTriggersPermissions: API.OperationMethod<
|
|
507
|
+
AddTriggersPermissionsRequest,
|
|
508
|
+
AddTriggersPermissionsResponse,
|
|
509
|
+
AddTriggersPermissionsError,
|
|
510
|
+
SlackOpContext
|
|
511
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
512
|
+
input: AddTriggersPermissionsRequest,
|
|
513
|
+
output: AddTriggersPermissionsResponse,
|
|
514
|
+
errors: [SlackError, SlackRateLimited],
|
|
515
|
+
protocol: SlackProtocol,
|
|
516
|
+
retry: Retry.Retry,
|
|
517
|
+
}));
|
|
518
|
+
|
|
519
|
+
export type ListFeaturedError = SlackOpError;
|
|
520
|
+
/** List the featured workflows for specified channels. Required scopes — bot: `bookmarks:read`; user: `bookmarks:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `method_not_supported` — Method not yet supported - `restricted_action` — User does not have access to this method. - `channel_not_found` — Channel not found. - `error_invalid_channels` — Invalid channels provided. See https://docs.slack.dev/reference/methods/workflows.featured.list */
|
|
521
|
+
export const listFeatured: API.OperationMethod<
|
|
522
|
+
ListFeaturedRequest,
|
|
523
|
+
ListFeaturedResponse,
|
|
524
|
+
ListFeaturedError,
|
|
525
|
+
SlackOpContext
|
|
526
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
527
|
+
input: ListFeaturedRequest,
|
|
528
|
+
output: ListFeaturedResponse,
|
|
529
|
+
errors: [SlackError, SlackRateLimited],
|
|
530
|
+
protocol: SlackProtocol,
|
|
531
|
+
retry: Retry.Retry,
|
|
532
|
+
}));
|
|
533
|
+
|
|
534
|
+
export type ListTriggersPermissionsError = SlackOpError;
|
|
535
|
+
/** Returns the permission type of a trigger and if applicable, includes the entities that have been granted access Required scopes — bot: `triggers:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `unknown_method` — This method does not exist. - `access_denied` — This actor does not have access to the permissions on this resource. - `trigger_not_found` — This trigger does not exist. See https://docs.slack.dev/reference/methods/workflows.triggers.permissions.list */
|
|
536
|
+
export const listTriggersPermissions: API.OperationMethod<
|
|
537
|
+
ListTriggersPermissionsRequest,
|
|
538
|
+
ListTriggersPermissionsResponse,
|
|
539
|
+
ListTriggersPermissionsError,
|
|
540
|
+
SlackOpContext
|
|
541
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
542
|
+
input: ListTriggersPermissionsRequest,
|
|
543
|
+
output: ListTriggersPermissionsResponse,
|
|
544
|
+
errors: [SlackError, SlackRateLimited],
|
|
545
|
+
protocol: SlackProtocol,
|
|
546
|
+
retry: Retry.Retry,
|
|
547
|
+
}));
|
|
548
|
+
|
|
549
|
+
export type RemoveFeaturedError = SlackOpError;
|
|
550
|
+
/** Remove featured workflows from a channel. Required scopes — bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `method_not_supported` — Method not yet supported - `restricted_action` — User does not have access to this method. - `error_modifying_workflows` — Error modifying workflows See https://docs.slack.dev/reference/methods/workflows.featured.remove */
|
|
551
|
+
export const removeFeatured: API.OperationMethod<
|
|
552
|
+
RemoveFeaturedRequest,
|
|
553
|
+
RemoveFeaturedResponse,
|
|
554
|
+
RemoveFeaturedError,
|
|
555
|
+
SlackOpContext
|
|
556
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
557
|
+
input: RemoveFeaturedRequest,
|
|
558
|
+
output: RemoveFeaturedResponse,
|
|
559
|
+
errors: [SlackError, SlackRateLimited],
|
|
560
|
+
protocol: SlackProtocol,
|
|
561
|
+
retry: Retry.Retry,
|
|
562
|
+
}));
|
|
563
|
+
|
|
564
|
+
export type RemoveTriggersPermissionsError = SlackOpError;
|
|
565
|
+
/** Revoke an entity's access to a trigger that has its permission type set to named_entities Required scopes — bot: `triggers:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `access_denied` — This actor does not have access to the permissions on this resource. - `connected_org_denied` — The workspace admin does not allow connected organizations to be named_entities. - `connected_team_denied` — The workspace admin does not allow connected teams to be named_entities. - `connected_user_denied` — The workspace admin does not allow connected users to be named_entities. - `named_entities_cannot_be_empty` — There must be at least one valid named entity - `org_not_connected` — One of more of the listed organizations were not connected. - `org_not_found` — One or more of the listed organizations could not be found. - `shared_channel_denied` — The workspace admin does not allow shared channels to be named_entities. - `trigger_not_found` — This trigger does not exist. - `invalid_permission_type` — This trigger requires permission_type to be set as named_entities before adding users. - `too_many_named_entities` — Too many named entities passed into the trigger permissions setting. - `unknown_method` — This method does not exist. See https://docs.slack.dev/reference/methods/workflows.triggers.permissions.remove */
|
|
566
|
+
export const removeTriggersPermissions: API.OperationMethod<
|
|
567
|
+
RemoveTriggersPermissionsRequest,
|
|
568
|
+
RemoveTriggersPermissionsResponse,
|
|
569
|
+
RemoveTriggersPermissionsError,
|
|
570
|
+
SlackOpContext
|
|
571
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
572
|
+
input: RemoveTriggersPermissionsRequest,
|
|
573
|
+
output: RemoveTriggersPermissionsResponse,
|
|
574
|
+
errors: [SlackError, SlackRateLimited],
|
|
575
|
+
protocol: SlackProtocol,
|
|
576
|
+
retry: Retry.Retry,
|
|
577
|
+
}));
|
|
578
|
+
|
|
579
|
+
export type SetFeaturedError = SlackOpError;
|
|
580
|
+
/** Set featured workflows for a channel. Required scopes — bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `method_not_supported` — Method not yet supported - `restricted_action` — User does not have access to this method. - `error_modifying_workflows` — Error modifying workflows See https://docs.slack.dev/reference/methods/workflows.featured.set */
|
|
581
|
+
export const setFeatured: API.OperationMethod<
|
|
582
|
+
SetFeaturedRequest,
|
|
583
|
+
SetFeaturedResponse,
|
|
584
|
+
SetFeaturedError,
|
|
585
|
+
SlackOpContext
|
|
586
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
587
|
+
input: SetFeaturedRequest,
|
|
588
|
+
output: SetFeaturedResponse,
|
|
589
|
+
errors: [SlackError, SlackRateLimited],
|
|
590
|
+
protocol: SlackProtocol,
|
|
591
|
+
retry: Retry.Retry,
|
|
592
|
+
}));
|
|
593
|
+
|
|
594
|
+
export type SetTriggersPermissionsError = SlackOpError;
|
|
595
|
+
/** Set the permission type for who can run a trigger Required scopes — bot: `triggers:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `access_denied` — This actor does not have access to the permissions on this resource. - `channel_not_found` — One or more of the listed channels could not be found. - `connected_org_denied` — The workspace admin does not allow connected organizations to be named_entities. - `connected_team_denied` — The workspace admin does not allow connected teams to be named_entities. - `connected_user_denied` — The workspace admin does not allow connected users to be named_entities. - `external_workspace_denied` — The channel selected is not on the workflow team. - `invalid_permission_type` — This function requires permission_type to be set as named_entities before adding users. - `named_entities_cannot_be_empty` — Must pass at least one valid named entity. - `no_valid_named_entities` — None of the provided named entities were valid - `org_not_found` — One or more of the listed organizations could not be found. - `org_not_connected` — One of more of the listed organizations were not connected. - `shared_channel_denied` — The workspace admin does not allow shared channels to be named_entities. - `team_not_connected` — One of more of the listed teams were not connected by org. - `team_not_found` — One or more of the listed teams could not be found. - `too_many_named_entities` — Too many named_entities passed into the trigger permissions setting. - `trigger_not_found` — This trigger does not exist. - `unknown_method` — This method does not exist. - `user_not_found` — One or more of the listed users could not be found. See https://docs.slack.dev/reference/methods/workflows.triggers.permissions.set */
|
|
596
|
+
export const setTriggersPermissions: API.OperationMethod<
|
|
597
|
+
SetTriggersPermissionsRequest,
|
|
598
|
+
SetTriggersPermissionsResponse,
|
|
599
|
+
SetTriggersPermissionsError,
|
|
600
|
+
SlackOpContext
|
|
601
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
602
|
+
input: SetTriggersPermissionsRequest,
|
|
603
|
+
output: SetTriggersPermissionsResponse,
|
|
604
|
+
errors: [SlackError, SlackRateLimited],
|
|
605
|
+
protocol: SlackProtocol,
|
|
606
|
+
retry: Retry.Retry,
|
|
607
|
+
}));
|
package/src/traits.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slack SDK trait surface — hand-written.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports the generic protocol traits from core so generated operations
|
|
5
|
+
* import everything from one place. Slack speaks bearer-token JSON with the
|
|
6
|
+
* `ok`/`error` envelope handled entirely by the protocol, so there are no
|
|
7
|
+
* provider-specific traits.
|
|
8
|
+
*/
|
|
9
|
+
export {
|
|
10
|
+
Body,
|
|
11
|
+
Header,
|
|
12
|
+
Query,
|
|
13
|
+
Label,
|
|
14
|
+
Http,
|
|
15
|
+
ResponseCode,
|
|
16
|
+
HttpBody,
|
|
17
|
+
FormDataFile,
|
|
18
|
+
KeyDictionary,
|
|
19
|
+
UnionCases,
|
|
20
|
+
applyErrorMatchers,
|
|
21
|
+
getErrorMatchers,
|
|
22
|
+
type HttpTrait,
|
|
23
|
+
type ErrorMatcher,
|
|
24
|
+
bodySymbol,
|
|
25
|
+
headerSymbol,
|
|
26
|
+
querySymbol,
|
|
27
|
+
labelSymbol,
|
|
28
|
+
httpSymbol,
|
|
29
|
+
responseCodeSymbol,
|
|
30
|
+
httpBodySymbol,
|
|
31
|
+
formDataFileSymbol,
|
|
32
|
+
keyDictionarySymbol,
|
|
33
|
+
unionCasesSymbol,
|
|
34
|
+
errorMatchersSymbol,
|
|
35
|
+
} from "@distilled.cloud/core/trait";
|
|
36
|
+
|
|
37
|
+
// Bearer-REST protocol traits (sensitive strings, bare-payload responses).
|
|
38
|
+
export {
|
|
39
|
+
SensitiveValue,
|
|
40
|
+
RawResponse,
|
|
41
|
+
RawResponseRoot,
|
|
42
|
+
sensitiveValueSymbol,
|
|
43
|
+
rawResponseSymbol,
|
|
44
|
+
rawResponseRootSymbol,
|
|
45
|
+
} from "@distilled.cloud/core/protocol-rest";
|