@distilled.cloud/slack 1.0.0-rc.14 → 1.0.0-rc.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/credentials.d.ts +1 -1
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +39 -34
- package/lib/credentials.js.map +1 -1
- package/lib/errors.d.ts +31 -31
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +41 -41
- package/lib/errors.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +9 -9
- package/lib/pagination.d.ts +2 -2
- package/lib/pagination.js +28 -28
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +61 -59
- package/lib/protocol.js.map +1 -1
- package/lib/retry.d.ts +2 -2
- package/lib/retry.d.ts.map +1 -1
- package/lib/retry.js +34 -33
- package/lib/retry.js.map +1 -1
- package/lib/services/admin.d.ts +123 -575
- package/lib/services/admin.d.ts.map +1 -1
- package/lib/services/admin.js +304 -2878
- package/lib/services/agents.d.ts +13 -55
- package/lib/services/agents.d.ts.map +1 -1
- package/lib/services/agents.js +48 -309
- package/lib/services/api.d.ts +0 -4
- package/lib/services/api.d.ts.map +1 -1
- package/lib/services/api.js +16 -18
- package/lib/services/apps.d.ts +25 -106
- package/lib/services/apps.d.ts.map +1 -1
- package/lib/services/apps.js +84 -509
- package/lib/services/assistant.d.ts +6 -40
- package/lib/services/assistant.d.ts.map +1 -1
- package/lib/services/assistant.js +33 -204
- package/lib/services/auth.d.ts +4 -15
- package/lib/services/auth.d.ts.map +1 -1
- package/lib/services/auth.js +22 -90
- package/lib/services/blocks.d.ts +1 -7
- package/lib/services/blocks.d.ts.map +1 -1
- package/lib/services/blocks.js +16 -21
- package/lib/services/bookmarks.d.ts +4 -15
- package/lib/services/bookmarks.d.ts.map +1 -1
- package/lib/services/bookmarks.js +27 -76
- package/lib/services/bots.d.ts +1 -9
- package/lib/services/bots.d.ts.map +1 -1
- package/lib/services/bots.js +17 -54
- package/lib/services/calls.d.ts +6 -22
- package/lib/services/calls.d.ts.map +1 -1
- package/lib/services/calls.js +35 -110
- package/lib/services/canvases.d.ts +7 -35
- package/lib/services/canvases.d.ts.map +1 -1
- package/lib/services/canvases.js +39 -135
- package/lib/services/chat.d.ts +14 -83
- package/lib/services/chat.d.ts.map +1 -1
- package/lib/services/chat.js +59 -381
- package/lib/services/conversations.d.ts +31 -116
- package/lib/services/conversations.d.ts.map +1 -1
- package/lib/services/conversations.js +94 -690
- package/lib/services/dialog.d.ts +1 -4
- package/lib/services/dialog.d.ts.map +1 -1
- package/lib/services/dialog.js +13 -17
- package/lib/services/dnd.d.ts +5 -17
- package/lib/services/dnd.d.ts.map +1 -1
- package/lib/services/dnd.js +26 -91
- package/lib/services/emoji.d.ts +1 -8
- package/lib/services/emoji.d.ts.map +1 -1
- package/lib/services/emoji.js +18 -29
- package/lib/services/entity.d.ts +4 -16
- package/lib/services/entity.d.ts.map +1 -1
- package/lib/services/entity.js +29 -71
- package/lib/services/files.d.ts +16 -80
- package/lib/services/files.d.ts.map +1 -1
- package/lib/services/files.js +75 -433
- package/lib/services/functions.d.ts +8 -49
- package/lib/services/functions.d.ts.map +1 -1
- package/lib/services/functions.js +45 -203
- package/lib/services/lists.d.ts +13 -55
- package/lib/services/lists.d.ts.map +1 -1
- package/lib/services/lists.js +53 -248
- package/lib/services/migration.d.ts +1 -7
- package/lib/services/migration.d.ts.map +1 -1
- package/lib/services/migration.js +18 -27
- package/lib/services/oauth.d.ts +7 -43
- package/lib/services/oauth.d.ts.map +1 -1
- package/lib/services/oauth.js +34 -289
- package/lib/services/openid.d.ts +3 -10
- package/lib/services/openid.d.ts.map +1 -1
- package/lib/services/openid.js +19 -79
- package/lib/services/pins.d.ts +3 -13
- package/lib/services/pins.d.ts.map +1 -1
- package/lib/services/pins.js +27 -61
- package/lib/services/reactions.d.ts +5 -17
- package/lib/services/reactions.d.ts.map +1 -1
- package/lib/services/reactions.js +30 -96
- package/lib/services/reminders.d.ts +5 -17
- package/lib/services/reminders.d.ts.map +1 -1
- package/lib/services/reminders.js +33 -83
- package/lib/services/rtm.d.ts +2 -11
- package/lib/services/rtm.d.ts.map +1 -1
- package/lib/services/rtm.js +22 -56
- package/lib/services/search.d.ts +4 -35
- package/lib/services/search.d.ts.map +1 -1
- package/lib/services/search.js +28 -167
- package/lib/services/stars.d.ts +4 -26
- package/lib/services/stars.d.ts.map +1 -1
- package/lib/services/stars.js +28 -128
- package/lib/services/team.d.ts +11 -63
- package/lib/services/team.d.ts.map +1 -1
- package/lib/services/team.js +45 -289
- package/lib/services/tooling.d.ts +2 -5
- package/lib/services/tooling.d.ts.map +1 -1
- package/lib/services/tooling.js +15 -28
- package/lib/services/usergroups.d.ts +7 -31
- package/lib/services/usergroups.d.ts.map +1 -1
- package/lib/services/usergroups.js +40 -146
- package/lib/services/users.d.ts +14 -48
- package/lib/services/users.d.ts.map +1 -1
- package/lib/services/users.js +54 -249
- package/lib/services/views.d.ts +4 -14
- package/lib/services/views.d.ts.map +1 -1
- package/lib/services/views.js +28 -73
- package/lib/services/workflows.d.ts +8 -51
- package/lib/services/workflows.d.ts.map +1 -1
- package/lib/services/workflows.js +37 -188
- package/lib/traits.d.ts +1 -1
- package/lib/traits.js +8 -8
- package/package.json +14 -10
- package/src/credentials.ts +20 -21
- package/src/errors.ts +31 -27
- package/src/index.ts +1 -1
- package/src/pagination.ts +2 -2
- package/src/protocol.ts +30 -29
- package/src/retry.ts +6 -6
- package/src/services/admin.ts +2717 -3451
- package/src/services/agents.ts +380 -370
- package/src/services/api.ts +31 -21
- package/src/services/apps.ts +569 -621
- package/src/services/assistant.ts +235 -270
- package/src/services/auth.ts +118 -100
- package/src/services/blocks.ts +33 -29
- package/src/services/bookmarks.ts +101 -83
- package/src/services/bots.ts +74 -67
- package/src/services/calls.ts +118 -124
- package/src/services/canvases.ts +171 -178
- package/src/services/chat.ts +428 -496
- package/src/services/conversations.ts +675 -761
- package/src/services/dialog.ts +30 -17
- package/src/services/dnd.ts +125 -99
- package/src/services/emoji.ts +46 -42
- package/src/services/entity.ts +94 -92
- package/src/services/files.ts +536 -531
- package/src/services/functions.ts +209 -274
- package/src/services/lists.ts +289 -304
- package/src/services/migration.ts +39 -37
- package/src/services/oauth.ts +345 -361
- package/src/services/openid.ts +137 -122
- package/src/services/pins.ts +83 -70
- package/src/services/reactions.ts +119 -103
- package/src/services/reminders.ts +112 -90
- package/src/services/rtm.ts +73 -65
- package/src/services/search.ts +193 -244
- package/src/services/stars.ts +101 -160
- package/src/services/team.ts +333 -369
- package/src/services/tooling.ts +43 -30
- package/src/services/usergroups.ts +175 -179
- package/src/services/users.ts +301 -268
- package/src/services/views.ts +85 -80
- package/src/services/workflows.ts +184 -269
- package/src/traits.ts +1 -1
- package/lib/protocol.test.d.ts +0 -2
- package/lib/protocol.test.d.ts.map +0 -1
- package/lib/protocol.test.js +0 -288
- package/lib/protocol.test.js.map +0 -1
- package/lib/services/admin.js.map +0 -1
- package/lib/services/agents.js.map +0 -1
- package/lib/services/api.js.map +0 -1
- package/lib/services/apps.js.map +0 -1
- package/lib/services/assistant.js.map +0 -1
- package/lib/services/auth.js.map +0 -1
- package/lib/services/blocks.js.map +0 -1
- package/lib/services/bookmarks.js.map +0 -1
- package/lib/services/bots.js.map +0 -1
- package/lib/services/calls.js.map +0 -1
- package/lib/services/canvases.js.map +0 -1
- package/lib/services/chat.js.map +0 -1
- package/lib/services/conversations.js.map +0 -1
- package/lib/services/dialog.js.map +0 -1
- package/lib/services/dnd.js.map +0 -1
- package/lib/services/emoji.js.map +0 -1
- package/lib/services/entity.js.map +0 -1
- package/lib/services/files.js.map +0 -1
- package/lib/services/functions.js.map +0 -1
- package/lib/services/lists.js.map +0 -1
- package/lib/services/migration.js.map +0 -1
- package/lib/services/oauth.js.map +0 -1
- package/lib/services/openid.js.map +0 -1
- package/lib/services/pins.js.map +0 -1
- package/lib/services/reactions.js.map +0 -1
- package/lib/services/reminders.js.map +0 -1
- package/lib/services/rtm.js.map +0 -1
- package/lib/services/search.js.map +0 -1
- package/lib/services/stars.js.map +0 -1
- package/lib/services/team.js.map +0 -1
- package/lib/services/tooling.js.map +0 -1
- package/lib/services/usergroups.js.map +0 -1
- package/lib/services/users.js.map +0 -1
- package/lib/services/views.js.map +0 -1
- package/lib/services/workflows.js.map +0 -1
- package/src/protocol.test.ts +0 -372
package/src/services/calls.ts
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import * as API from "@distilled.cloud/core/api";
|
|
2
2
|
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
|
|
3
|
-
import * as S from "@distilled.cloud/core/schema";
|
|
3
|
+
import * as S from "@distilled.cloud/core/schema-lite";
|
|
4
|
+
import * as __L from "@distilled.cloud/core/schema-lite";
|
|
4
5
|
import { SlackError, SlackRateLimited } from "../errors.ts";
|
|
5
6
|
import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
|
|
6
7
|
import * as Retry from "../retry.ts";
|
|
7
8
|
import * as T from "../traits.ts";
|
|
9
|
+
// Schema table, filled on first reach (see __S at the end).
|
|
10
|
+
const __s: any[] = [];
|
|
8
11
|
|
|
9
12
|
export type { SlackOpError, SlackOpContext };
|
|
10
13
|
|
|
11
14
|
/** 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). */
|
|
12
15
|
export type AddCallRequestUsersList = Array<unknown>;
|
|
13
|
-
export const AddCallRequestUsersList = /*@__PURE__*/ S.Array(
|
|
14
|
-
S.Unknown,
|
|
15
|
-
) as any as S.Schema<AddCallRequestUsersList>;
|
|
16
|
-
|
|
17
16
|
export interface AddCallRequest {
|
|
18
17
|
/** An ID supplied by the 3rd-party Call provider. It must be unique across all Calls from that service. */
|
|
19
18
|
external_unique_id: string;
|
|
@@ -32,142 +31,57 @@ export interface AddCallRequest {
|
|
|
32
31
|
/** 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). */
|
|
33
32
|
users?: AddCallRequestUsersList;
|
|
34
33
|
}
|
|
35
|
-
export const AddCallRequest = /*@__PURE__*/ S.suspend(() =>
|
|
36
|
-
S.Struct({
|
|
37
|
-
external_unique_id: S.String,
|
|
38
|
-
external_display_id: S.optional(S.String),
|
|
39
|
-
join_url: S.String,
|
|
40
|
-
desktop_app_join_url: S.optional(S.String),
|
|
41
|
-
date_start: S.optional(S.Number),
|
|
42
|
-
title: S.optional(S.String),
|
|
43
|
-
created_by: S.optional(S.String),
|
|
44
|
-
users: S.optional(AddCallRequestUsersList),
|
|
45
|
-
}).pipe(T.Http({ method: "POST", uri: "/calls.add", code: 200 })),
|
|
46
|
-
).annotate({ identifier: "AddCallRequest" }) as any as S.Schema<AddCallRequest>;
|
|
47
|
-
|
|
48
34
|
export interface AddCallResponse {
|
|
49
35
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
50
36
|
ok: boolean;
|
|
51
37
|
call: unknown;
|
|
52
38
|
}
|
|
53
|
-
export const AddCallResponse = /*@__PURE__*/ S.suspend(() =>
|
|
54
|
-
S.Struct({
|
|
55
|
-
ok: S.Boolean,
|
|
56
|
-
call: S.Unknown,
|
|
57
|
-
}),
|
|
58
|
-
).annotate({ identifier: "AddCallResponse" }) as any as S.Schema<AddCallResponse>;
|
|
59
|
-
|
|
60
39
|
/** The list of users to add as participants in the Call. [Read more on how to specify users here](/apis/web-api/using-the-calls-api#users). */
|
|
61
40
|
export type AddParticipantRequestUsersList = Array<unknown>;
|
|
62
|
-
export const AddParticipantRequestUsersList = /*@__PURE__*/ S.Array(
|
|
63
|
-
S.Unknown,
|
|
64
|
-
) as any as S.Schema<AddParticipantRequestUsersList>;
|
|
65
|
-
|
|
66
41
|
export interface AddParticipantRequest {
|
|
67
42
|
/** `id` returned by the [`calls.add`](/reference/methods/calls.add) method. */
|
|
68
43
|
id: string;
|
|
69
44
|
/** The list of users to add as participants in the Call. [Read more on how to specify users here](/apis/web-api/using-the-calls-api#users). */
|
|
70
45
|
users: AddParticipantRequestUsersList;
|
|
71
46
|
}
|
|
72
|
-
export const AddParticipantRequest = /*@__PURE__*/ S.suspend(() =>
|
|
73
|
-
S.Struct({
|
|
74
|
-
id: S.String,
|
|
75
|
-
users: AddParticipantRequestUsersList,
|
|
76
|
-
}).pipe(T.Http({ method: "POST", uri: "/calls.participants.add", code: 200 })),
|
|
77
|
-
).annotate({ identifier: "AddParticipantRequest" }) as any as S.Schema<AddParticipantRequest>;
|
|
78
|
-
|
|
79
47
|
export interface AddParticipantResponse {
|
|
80
48
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
81
49
|
ok: boolean;
|
|
82
50
|
call: unknown;
|
|
83
51
|
}
|
|
84
|
-
export const AddParticipantResponse = /*@__PURE__*/ S.suspend(() =>
|
|
85
|
-
S.Struct({
|
|
86
|
-
ok: S.Boolean,
|
|
87
|
-
call: S.Unknown,
|
|
88
|
-
}),
|
|
89
|
-
).annotate({ identifier: "AddParticipantResponse" }) as any as S.Schema<AddParticipantResponse>;
|
|
90
|
-
|
|
91
52
|
export interface CallsEndRequest {
|
|
92
53
|
/** `id` returned when registering the call using the [`calls.add`](/reference/methods/calls.add) method. */
|
|
93
54
|
id: string;
|
|
94
55
|
/** Call duration in seconds */
|
|
95
56
|
duration?: number;
|
|
96
57
|
}
|
|
97
|
-
export const CallsEndRequest = /*@__PURE__*/ S.suspend(() =>
|
|
98
|
-
S.Struct({
|
|
99
|
-
id: S.String,
|
|
100
|
-
duration: S.optional(S.Number),
|
|
101
|
-
}).pipe(T.Http({ method: "POST", uri: "/calls.end", code: 200 })),
|
|
102
|
-
).annotate({ identifier: "CallsEndRequest" }) as any as S.Schema<CallsEndRequest>;
|
|
103
|
-
|
|
104
58
|
export interface CallsEndResponse {
|
|
105
59
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
106
60
|
ok: boolean;
|
|
107
61
|
call: unknown;
|
|
108
62
|
}
|
|
109
|
-
export const CallsEndResponse = /*@__PURE__*/ S.suspend(() =>
|
|
110
|
-
S.Struct({
|
|
111
|
-
ok: S.Boolean,
|
|
112
|
-
call: S.Unknown,
|
|
113
|
-
}),
|
|
114
|
-
).annotate({ identifier: "CallsEndResponse" }) as any as S.Schema<CallsEndResponse>;
|
|
115
|
-
|
|
116
63
|
export interface CallsInfoRequest {
|
|
117
64
|
/** `id` of the Call returned by the [`calls.add`](/reference/methods/calls.add) method. */
|
|
118
65
|
id: string;
|
|
119
66
|
}
|
|
120
|
-
export const CallsInfoRequest = /*@__PURE__*/ S.suspend(() =>
|
|
121
|
-
S.Struct({
|
|
122
|
-
id: S.String,
|
|
123
|
-
}).pipe(T.Http({ method: "POST", uri: "/calls.info", code: 200 })),
|
|
124
|
-
).annotate({ identifier: "CallsInfoRequest" }) as any as S.Schema<CallsInfoRequest>;
|
|
125
|
-
|
|
126
67
|
export interface CallsInfoResponse {
|
|
127
68
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
128
69
|
ok: boolean;
|
|
129
70
|
call: unknown;
|
|
130
71
|
}
|
|
131
|
-
export const CallsInfoResponse = /*@__PURE__*/ S.suspend(() =>
|
|
132
|
-
S.Struct({
|
|
133
|
-
ok: S.Boolean,
|
|
134
|
-
call: S.Unknown,
|
|
135
|
-
}),
|
|
136
|
-
).annotate({ identifier: "CallsInfoResponse" }) as any as S.Schema<CallsInfoResponse>;
|
|
137
|
-
|
|
138
72
|
/** The list of users to remove as participants in the Call. [Read more on how to specify users here](/apis/web-api/using-the-calls-api#users). */
|
|
139
73
|
export type RemoveParticipantRequestUsersList = Array<unknown>;
|
|
140
|
-
export const RemoveParticipantRequestUsersList = /*@__PURE__*/ S.Array(
|
|
141
|
-
S.Unknown,
|
|
142
|
-
) as any as S.Schema<RemoveParticipantRequestUsersList>;
|
|
143
|
-
|
|
144
74
|
export interface RemoveParticipantRequest {
|
|
145
75
|
/** `id` returned by the [`calls.add`](/reference/methods/calls.add) method. */
|
|
146
76
|
id: string;
|
|
147
77
|
/** The list of users to remove as participants in the Call. [Read more on how to specify users here](/apis/web-api/using-the-calls-api#users). */
|
|
148
78
|
users: RemoveParticipantRequestUsersList;
|
|
149
79
|
}
|
|
150
|
-
export const RemoveParticipantRequest = /*@__PURE__*/ S.suspend(() =>
|
|
151
|
-
S.Struct({
|
|
152
|
-
id: S.String,
|
|
153
|
-
users: RemoveParticipantRequestUsersList,
|
|
154
|
-
}).pipe(T.Http({ method: "POST", uri: "/calls.participants.remove", code: 200 })),
|
|
155
|
-
).annotate({ identifier: "RemoveParticipantRequest" }) as any as S.Schema<RemoveParticipantRequest>;
|
|
156
|
-
|
|
157
80
|
export interface RemoveParticipantResponse {
|
|
158
81
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
159
82
|
ok: boolean;
|
|
160
83
|
call: unknown;
|
|
161
84
|
}
|
|
162
|
-
export const RemoveParticipantResponse = /*@__PURE__*/ S.suspend(() =>
|
|
163
|
-
S.Struct({
|
|
164
|
-
ok: S.Boolean,
|
|
165
|
-
call: S.Unknown,
|
|
166
|
-
}),
|
|
167
|
-
).annotate({
|
|
168
|
-
identifier: "RemoveParticipantResponse",
|
|
169
|
-
}) as any as S.Schema<RemoveParticipantResponse>;
|
|
170
|
-
|
|
171
85
|
export interface UpdateCallRequest {
|
|
172
86
|
/** `id` returned by the [`calls.add`](/reference/methods/calls.add) method. */
|
|
173
87
|
id: string;
|
|
@@ -178,113 +92,193 @@ export interface UpdateCallRequest {
|
|
|
178
92
|
/** When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL. */
|
|
179
93
|
desktop_app_join_url?: string;
|
|
180
94
|
}
|
|
181
|
-
export const UpdateCallRequest = /*@__PURE__*/ S.suspend(() =>
|
|
182
|
-
S.Struct({
|
|
183
|
-
id: S.String,
|
|
184
|
-
title: S.optional(S.String),
|
|
185
|
-
join_url: S.optional(S.String),
|
|
186
|
-
desktop_app_join_url: S.optional(S.String),
|
|
187
|
-
}).pipe(T.Http({ method: "POST", uri: "/calls.update", code: 200 })),
|
|
188
|
-
).annotate({ identifier: "UpdateCallRequest" }) as any as S.Schema<UpdateCallRequest>;
|
|
189
|
-
|
|
190
95
|
export interface UpdateCallResponse {
|
|
191
96
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
192
97
|
ok: boolean;
|
|
193
98
|
call: unknown;
|
|
194
99
|
}
|
|
195
|
-
export const UpdateCallResponse = /*@__PURE__*/ S.suspend(() =>
|
|
196
|
-
S.Struct({
|
|
197
|
-
ok: S.Boolean,
|
|
198
|
-
call: S.Unknown,
|
|
199
|
-
}),
|
|
200
|
-
).annotate({ identifier: "UpdateCallResponse" }) as any as S.Schema<UpdateCallResponse>;
|
|
201
|
-
|
|
202
100
|
export type AddCallError = SlackOpError;
|
|
203
|
-
/** Registers a new Call. Required scopes
|
|
101
|
+
/** Registers a new Call. Required scopes -- bot: `calls:write`; user: `calls:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `internal_error` -- An unexpected error has occurred while trying to register the Call. - `invalid_created_by` -- The `created_by` user ID is invalid. - `invalid_start_time` -- The start time is invalid. - `not_authorized` -- The specified user is not authorized to create a Call in this channel. - `not_implemented` -- This method is not available. - `user_not_found` -- A specified user wasn't found. See https://docs.slack.dev/reference/methods/calls.add */
|
|
204
102
|
export const addCall: API.OperationMethod<
|
|
205
103
|
AddCallRequest,
|
|
206
104
|
AddCallResponse,
|
|
207
105
|
AddCallError,
|
|
208
106
|
SlackOpContext
|
|
209
107
|
> = /*@__PURE__*/ API.make(() => ({
|
|
210
|
-
input: AddCallRequest
|
|
211
|
-
output: AddCallResponse
|
|
108
|
+
input: __S(0, __c0, 0) as any as S.Schema<AddCallRequest>,
|
|
109
|
+
output: __S(2, __c1, 0) as any as S.Schema<AddCallResponse>,
|
|
212
110
|
errors: [SlackError, SlackRateLimited],
|
|
213
111
|
protocol: SlackProtocol,
|
|
214
112
|
retry: Retry.Retry,
|
|
215
113
|
}));
|
|
216
114
|
|
|
217
115
|
export type AddParticipantError = SlackOpError;
|
|
218
|
-
/** Registers new participants added to a Call. Required scopes
|
|
116
|
+
/** Registers new participants added to a Call. Required scopes -- bot: `calls:write`; user: `calls:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `bad_users` -- At least one specified user is already part of the Call. - `inactive_call` -- The Call has been already ended. - `internal_error` -- An unexpected exception occurred while adding a Call participant. - `invalid_call_id` -- The specified Call wasn't found. - `missing_argument` -- A required argument is missing. - `not_implemented` -- This method is not available. - `user_not_found` -- At least one specified user wasn't found. See https://docs.slack.dev/reference/methods/calls.participants.add */
|
|
219
117
|
export const addParticipant: API.OperationMethod<
|
|
220
118
|
AddParticipantRequest,
|
|
221
119
|
AddParticipantResponse,
|
|
222
120
|
AddParticipantError,
|
|
223
121
|
SlackOpContext
|
|
224
122
|
> = /*@__PURE__*/ API.make(() => ({
|
|
225
|
-
input: AddParticipantRequest
|
|
226
|
-
output: AddParticipantResponse
|
|
123
|
+
input: __S(6, __c3, 0) as any as S.Schema<AddParticipantRequest>,
|
|
124
|
+
output: __S(2, __c1, 0) as any as S.Schema<AddParticipantResponse>,
|
|
227
125
|
errors: [SlackError, SlackRateLimited],
|
|
228
126
|
protocol: SlackProtocol,
|
|
229
127
|
retry: Retry.Retry,
|
|
230
128
|
}));
|
|
231
129
|
|
|
232
130
|
export type CallsEndError = SlackOpError;
|
|
233
|
-
/** Ends a Call. Required scopes
|
|
131
|
+
/** Ends a Call. Required scopes -- bot: `calls:write`; user: `calls:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `inactive_call` -- The Call has been already stopped. - `internal_error` -- An unexpected error has occurred while ending the Call. - `invalid_call_id` -- Invalid Call ID. - `not_implemented` -- This method is not publicly available yet. See https://docs.slack.dev/reference/methods/calls.end */
|
|
234
132
|
export const callsEnd: API.OperationMethod<
|
|
235
133
|
CallsEndRequest,
|
|
236
134
|
CallsEndResponse,
|
|
237
135
|
CallsEndError,
|
|
238
136
|
SlackOpContext
|
|
239
137
|
> = /*@__PURE__*/ API.make(() => ({
|
|
240
|
-
input: CallsEndRequest
|
|
241
|
-
output: CallsEndResponse
|
|
138
|
+
input: __S(8, __c4, 0) as any as S.Schema<CallsEndRequest>,
|
|
139
|
+
output: __S(2, __c1, 0) as any as S.Schema<CallsEndResponse>,
|
|
242
140
|
errors: [SlackError, SlackRateLimited],
|
|
243
141
|
protocol: SlackProtocol,
|
|
244
142
|
retry: Retry.Retry,
|
|
245
143
|
}));
|
|
246
144
|
|
|
247
145
|
export type CallsInfoError = SlackOpError;
|
|
248
|
-
/** Returns information about a Call. Required scopes
|
|
146
|
+
/** Returns information about a Call. Required scopes -- bot: `calls:read`; user: `calls:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `internal_error` -- An unexpected error occurred while finding information about this Call. - `not_implemented` -- This method is not available. See https://docs.slack.dev/reference/methods/calls.info */
|
|
249
147
|
export const callsInfo: API.OperationMethod<
|
|
250
148
|
CallsInfoRequest,
|
|
251
149
|
CallsInfoResponse,
|
|
252
150
|
CallsInfoError,
|
|
253
151
|
SlackOpContext
|
|
254
152
|
> = /*@__PURE__*/ API.make(() => ({
|
|
255
|
-
input: CallsInfoRequest
|
|
256
|
-
output: CallsInfoResponse
|
|
153
|
+
input: __S(10, __c5, 0) as any as S.Schema<CallsInfoRequest>,
|
|
154
|
+
output: __S(2, __c1, 0) as any as S.Schema<CallsInfoResponse>,
|
|
257
155
|
errors: [SlackError, SlackRateLimited],
|
|
258
156
|
protocol: SlackProtocol,
|
|
259
157
|
retry: Retry.Retry,
|
|
260
158
|
}));
|
|
261
159
|
|
|
262
160
|
export type RemoveParticipantError = SlackOpError;
|
|
263
|
-
/** Registers participants removed from a Call. Required scopes
|
|
161
|
+
/** Registers participants removed from a Call. Required scopes -- bot: `calls:write`; user: `calls:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `bad_users` -- At least one specified user is not part of the Call. - `inactive_call` -- The Call has been already ended. - `internal_error` -- An unexpected exception occurred while removing participants from the Call. - `invalid_call_id` -- The specified Call wasn't found. - `missing_argument` -- A required argument is missing. - `not_implemented` -- This method is not available. - `user_not_found` -- At least one specified user wasn't found. See https://docs.slack.dev/reference/methods/calls.participants.remove */
|
|
264
162
|
export const removeParticipant: API.OperationMethod<
|
|
265
163
|
RemoveParticipantRequest,
|
|
266
164
|
RemoveParticipantResponse,
|
|
267
165
|
RemoveParticipantError,
|
|
268
166
|
SlackOpContext
|
|
269
167
|
> = /*@__PURE__*/ API.make(() => ({
|
|
270
|
-
input: RemoveParticipantRequest
|
|
271
|
-
output: RemoveParticipantResponse
|
|
168
|
+
input: __S(12, __c6, 0) as any as S.Schema<RemoveParticipantRequest>,
|
|
169
|
+
output: __S(2, __c1, 0) as any as S.Schema<RemoveParticipantResponse>,
|
|
272
170
|
errors: [SlackError, SlackRateLimited],
|
|
273
171
|
protocol: SlackProtocol,
|
|
274
172
|
retry: Retry.Retry,
|
|
275
173
|
}));
|
|
276
174
|
|
|
277
175
|
export type UpdateCallError = SlackOpError;
|
|
278
|
-
/** Updates information about a Call. Required scopes
|
|
176
|
+
/** Updates information about a Call. Required scopes -- bot: `calls:write`; user: `calls:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `internal_error` -- An unexpected exception occurred while updating the Call info. - `invalid_call_id` -- The Call's `id` was invalid. - `not_implemented` -- This method is not available. See https://docs.slack.dev/reference/methods/calls.update */
|
|
279
177
|
export const updateCall: API.OperationMethod<
|
|
280
178
|
UpdateCallRequest,
|
|
281
179
|
UpdateCallResponse,
|
|
282
180
|
UpdateCallError,
|
|
283
181
|
SlackOpContext
|
|
284
182
|
> = /*@__PURE__*/ API.make(() => ({
|
|
285
|
-
input: UpdateCallRequest
|
|
286
|
-
output: UpdateCallResponse
|
|
183
|
+
input: __S(14, __c7, 0) as any as S.Schema<UpdateCallRequest>,
|
|
184
|
+
output: __S(2, __c1, 0) as any as S.Schema<UpdateCallResponse>,
|
|
287
185
|
errors: [SlackError, SlackRateLimited],
|
|
288
186
|
protocol: SlackProtocol,
|
|
289
187
|
retry: Retry.Retry,
|
|
290
188
|
}));
|
|
189
|
+
|
|
190
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
191
|
+
function __c0(j: number): any {
|
|
192
|
+
switch (j) {
|
|
193
|
+
case 0:
|
|
194
|
+
return S.suspend(() =>
|
|
195
|
+
S.Struct({
|
|
196
|
+
external_unique_id: S.String,
|
|
197
|
+
external_display_id: S.optional(S.String),
|
|
198
|
+
join_url: S.String,
|
|
199
|
+
desktop_app_join_url: S.optional(S.String),
|
|
200
|
+
date_start: S.optional(S.Number),
|
|
201
|
+
title: S.optional(S.String),
|
|
202
|
+
created_by: S.optional(S.String),
|
|
203
|
+
users: S.optional(__S(4, __c2, 0)),
|
|
204
|
+
}).pipe(T.Http({ method: "POST", uri: "/calls.add", code: 200 })),
|
|
205
|
+
).annotate({ identifier: "AddCallRequest" });
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
function __c1(j: number): any {
|
|
209
|
+
switch (j) {
|
|
210
|
+
case 0:
|
|
211
|
+
return S.suspend(() =>
|
|
212
|
+
S.Struct({
|
|
213
|
+
ok: S.Boolean,
|
|
214
|
+
call: S.Unknown,
|
|
215
|
+
}),
|
|
216
|
+
).annotate({ identifier: "AddCallResponse" });
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
function __c2(j: number): any {
|
|
220
|
+
switch (j) {
|
|
221
|
+
case 0:
|
|
222
|
+
return S.Array(S.Unknown);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
function __c3(j: number): any {
|
|
226
|
+
switch (j) {
|
|
227
|
+
case 0:
|
|
228
|
+
return S.suspend(() =>
|
|
229
|
+
S.Struct({
|
|
230
|
+
id: S.String,
|
|
231
|
+
users: __S(4, __c2, 0),
|
|
232
|
+
}).pipe(T.Http({ method: "POST", uri: "/calls.participants.add", code: 200 })),
|
|
233
|
+
).annotate({ identifier: "AddParticipantRequest" });
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
function __c4(j: number): any {
|
|
237
|
+
switch (j) {
|
|
238
|
+
case 0:
|
|
239
|
+
return S.suspend(() =>
|
|
240
|
+
S.Struct({
|
|
241
|
+
id: S.String,
|
|
242
|
+
duration: S.optional(S.Number),
|
|
243
|
+
}).pipe(T.Http({ method: "POST", uri: "/calls.end", code: 200 })),
|
|
244
|
+
).annotate({ identifier: "CallsEndRequest" });
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
function __c5(j: number): any {
|
|
248
|
+
switch (j) {
|
|
249
|
+
case 0:
|
|
250
|
+
return S.suspend(() =>
|
|
251
|
+
S.Struct({
|
|
252
|
+
id: S.String,
|
|
253
|
+
}).pipe(T.Http({ method: "POST", uri: "/calls.info", code: 200 })),
|
|
254
|
+
).annotate({ identifier: "CallsInfoRequest" });
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
function __c6(j: number): any {
|
|
258
|
+
switch (j) {
|
|
259
|
+
case 0:
|
|
260
|
+
return S.suspend(() =>
|
|
261
|
+
S.Struct({
|
|
262
|
+
id: S.String,
|
|
263
|
+
users: __S(4, __c2, 0),
|
|
264
|
+
}).pipe(T.Http({ method: "POST", uri: "/calls.participants.remove", code: 200 })),
|
|
265
|
+
).annotate({ identifier: "RemoveParticipantRequest" });
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
function __c7(j: number): any {
|
|
269
|
+
switch (j) {
|
|
270
|
+
case 0:
|
|
271
|
+
return S.suspend(() =>
|
|
272
|
+
S.Struct({
|
|
273
|
+
id: S.String,
|
|
274
|
+
title: S.optional(S.String),
|
|
275
|
+
join_url: S.optional(S.String),
|
|
276
|
+
desktop_app_join_url: S.optional(S.String),
|
|
277
|
+
}).pipe(T.Http({ method: "POST", uri: "/calls.update", code: 200 })),
|
|
278
|
+
).annotate({ identifier: "UpdateCallRequest" });
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
282
|
+
function __S(i: number, f: (j: number) => unknown, j: number): any {
|
|
283
|
+
return (__s[i] ??= __L.at(f, j));
|
|
284
|
+
}
|