@distilled.cloud/slack 1.0.0-rc.13 → 1.0.0-rc.14
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 +2 -2
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +3 -3
- package/lib/credentials.js.map +1 -1
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -1
- package/lib/errors.js.map +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -3
- package/lib/index.js.map +1 -1
- package/lib/pagination.d.ts.map +1 -1
- package/lib/pagination.js.map +1 -1
- package/lib/protocol.d.ts +3 -3
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +12 -18
- package/lib/protocol.js.map +1 -1
- package/lib/protocol.test.d.ts +2 -0
- package/lib/protocol.test.d.ts.map +1 -0
- package/lib/protocol.test.js +288 -0
- package/lib/protocol.test.js.map +1 -0
- package/lib/retry.d.ts +1 -1
- package/lib/retry.d.ts.map +1 -1
- package/lib/retry.js +1 -1
- package/lib/retry.js.map +1 -1
- package/lib/services/admin.d.ts +236 -29
- package/lib/services/admin.d.ts.map +1 -1
- package/lib/services/admin.js +417 -749
- package/lib/services/admin.js.map +1 -1
- package/lib/services/agents.d.ts +423 -0
- package/lib/services/agents.d.ts.map +1 -0
- package/lib/services/agents.js +315 -0
- package/lib/services/agents.js.map +1 -0
- package/lib/services/api.d.ts +1 -1
- package/lib/services/api.d.ts.map +1 -1
- package/lib/services/api.js +4 -6
- package/lib/services/api.js.map +1 -1
- package/lib/services/apps.d.ts +21 -3
- package/lib/services/apps.d.ts.map +1 -1
- package/lib/services/apps.js +65 -133
- package/lib/services/apps.js.map +1 -1
- package/lib/services/assistant.d.ts +4 -4
- package/lib/services/assistant.d.ts.map +1 -1
- package/lib/services/assistant.js +16 -38
- package/lib/services/assistant.js.map +1 -1
- package/lib/services/auth.d.ts +2 -2
- package/lib/services/auth.d.ts.map +1 -1
- package/lib/services/auth.js +11 -28
- package/lib/services/auth.js.map +1 -1
- package/lib/services/blocks.d.ts +1 -1
- package/lib/services/blocks.d.ts.map +1 -1
- package/lib/services/blocks.js +5 -9
- package/lib/services/blocks.js.map +1 -1
- package/lib/services/bookmarks.d.ts +4 -4
- package/lib/services/bookmarks.d.ts.map +1 -1
- package/lib/services/bookmarks.js +14 -30
- package/lib/services/bookmarks.js.map +1 -1
- package/lib/services/bots.d.ts +1 -1
- package/lib/services/bots.d.ts.map +1 -1
- package/lib/services/bots.js +7 -15
- package/lib/services/bots.js.map +1 -1
- package/lib/services/calls.d.ts +1 -1
- package/lib/services/calls.d.ts.map +1 -1
- package/lib/services/calls.js +13 -33
- package/lib/services/calls.js.map +1 -1
- package/lib/services/canvases.d.ts +22 -2
- package/lib/services/canvases.d.ts.map +1 -1
- package/lib/services/canvases.js +37 -48
- package/lib/services/canvases.js.map +1 -1
- package/lib/services/chat.d.ts +29 -25
- package/lib/services/chat.d.ts.map +1 -1
- package/lib/services/chat.js +47 -95
- package/lib/services/chat.js.map +1 -1
- package/lib/services/conversations.d.ts +10 -8
- package/lib/services/conversations.d.ts.map +1 -1
- package/lib/services/conversations.js +43 -115
- package/lib/services/conversations.js.map +1 -1
- package/lib/services/dialog.d.ts +1 -1
- package/lib/services/dialog.d.ts.map +1 -1
- package/lib/services/dialog.js +5 -9
- package/lib/services/dialog.js.map +1 -1
- package/lib/services/dnd.d.ts +1 -1
- package/lib/services/dnd.d.ts.map +1 -1
- package/lib/services/dnd.js +10 -24
- package/lib/services/dnd.js.map +1 -1
- package/lib/services/emoji.d.ts +1 -1
- package/lib/services/emoji.d.ts.map +1 -1
- package/lib/services/emoji.js +6 -11
- package/lib/services/emoji.js.map +1 -1
- package/lib/services/entity.d.ts +1 -1
- package/lib/services/entity.d.ts.map +1 -1
- package/lib/services/entity.js +8 -20
- package/lib/services/entity.js.map +1 -1
- package/lib/services/files.d.ts +5 -5
- package/lib/services/files.d.ts.map +1 -1
- package/lib/services/files.js +39 -109
- package/lib/services/files.js.map +1 -1
- package/lib/services/functions.d.ts +1 -1
- package/lib/services/functions.d.ts.map +1 -1
- package/lib/services/functions.js +28 -75
- 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/index.js.map +1 -1
- package/lib/services/lists.d.ts +5 -1
- package/lib/services/lists.d.ts.map +1 -1
- package/lib/services/lists.js +35 -146
- package/lib/services/lists.js.map +1 -1
- package/lib/services/migration.d.ts +1 -1
- package/lib/services/migration.d.ts.map +1 -1
- package/lib/services/migration.js +5 -8
- package/lib/services/migration.js.map +1 -1
- package/lib/services/oauth.d.ts +38 -2
- package/lib/services/oauth.d.ts.map +1 -1
- package/lib/services/oauth.js +67 -50
- package/lib/services/oauth.js.map +1 -1
- package/lib/services/openid.d.ts +1 -1
- package/lib/services/openid.d.ts.map +1 -1
- package/lib/services/openid.js +7 -15
- package/lib/services/openid.js.map +1 -1
- package/lib/services/pins.d.ts +1 -1
- package/lib/services/pins.d.ts.map +1 -1
- package/lib/services/pins.js +7 -15
- package/lib/services/pins.js.map +1 -1
- package/lib/services/reactions.d.ts +2 -2
- package/lib/services/reactions.d.ts.map +1 -1
- package/lib/services/reactions.js +13 -29
- package/lib/services/reactions.js.map +1 -1
- package/lib/services/reminders.d.ts +1 -1
- package/lib/services/reminders.d.ts.map +1 -1
- package/lib/services/reminders.js +13 -33
- package/lib/services/reminders.js.map +1 -1
- package/lib/services/rtm.d.ts +1 -1
- package/lib/services/rtm.d.ts.map +1 -1
- package/lib/services/rtm.js +9 -21
- package/lib/services/rtm.js.map +1 -1
- package/lib/services/search.d.ts +1 -1
- package/lib/services/search.d.ts.map +1 -1
- package/lib/services/search.js +13 -30
- package/lib/services/search.js.map +1 -1
- package/lib/services/stars.d.ts +1 -1
- package/lib/services/stars.d.ts.map +1 -1
- package/lib/services/stars.js +10 -20
- package/lib/services/stars.js.map +1 -1
- package/lib/services/team.d.ts +1 -1
- package/lib/services/team.d.ts.map +1 -1
- package/lib/services/team.js +25 -62
- package/lib/services/team.js.map +1 -1
- package/lib/services/tooling.d.ts +1 -1
- package/lib/services/tooling.d.ts.map +1 -1
- package/lib/services/tooling.js +5 -9
- package/lib/services/tooling.js.map +1 -1
- package/lib/services/usergroups.d.ts +8 -3
- package/lib/services/usergroups.d.ts.map +1 -1
- package/lib/services/usergroups.js +23 -51
- package/lib/services/usergroups.js.map +1 -1
- package/lib/services/users.d.ts +2 -2
- package/lib/services/users.d.ts.map +1 -1
- package/lib/services/users.js +28 -81
- package/lib/services/users.js.map +1 -1
- package/lib/services/views.d.ts +1 -1
- package/lib/services/views.d.ts.map +1 -1
- package/lib/services/views.js +11 -27
- package/lib/services/views.js.map +1 -1
- package/lib/services/workflows.d.ts +1 -1
- package/lib/services/workflows.d.ts.map +1 -1
- package/lib/services/workflows.js +27 -71
- package/lib/services/workflows.js.map +1 -1
- package/package.json +15 -11
- package/src/credentials.ts +8 -10
- package/src/errors.ts +17 -31
- package/src/index.ts +3 -7
- package/src/pagination.ts +2 -5
- package/src/protocol.test.ts +372 -0
- package/src/protocol.ts +34 -66
- package/src/retry.ts +4 -9
- package/src/services/admin.ts +1241 -1557
- package/src/services/agents.ts +853 -0
- package/src/services/api.ts +4 -10
- package/src/services/apps.ts +146 -243
- package/src/services/assistant.ts +93 -144
- package/src/services/auth.ts +12 -33
- package/src/services/blocks.ts +9 -24
- package/src/services/bookmarks.ts +14 -34
- package/src/services/bots.ts +7 -19
- package/src/services/calls.ts +15 -43
- package/src/services/canvases.ts +82 -85
- package/src/services/chat.ts +134 -254
- package/src/services/conversations.ts +101 -217
- package/src/services/dialog.ts +5 -13
- package/src/services/dnd.ts +11 -31
- package/src/services/emoji.ts +9 -19
- package/src/services/entity.ts +17 -45
- package/src/services/files.ts +72 -165
- package/src/services/functions.ts +95 -168
- package/src/services/index.ts +1 -0
- package/src/services/lists.ts +65 -208
- package/src/services/migration.ts +8 -17
- package/src/services/oauth.ts +127 -60
- package/src/services/openid.ts +12 -34
- package/src/services/pins.ts +7 -19
- package/src/services/reactions.ts +19 -43
- package/src/services/reminders.ts +13 -37
- package/src/services/rtm.ts +9 -25
- package/src/services/search.ts +51 -92
- package/src/services/stars.ts +20 -31
- package/src/services/team.ts +81 -155
- package/src/services/tooling.ts +5 -13
- package/src/services/usergroups.ts +37 -68
- package/src/services/users.ts +35 -102
- package/src/services/views.ts +11 -31
- package/src/services/workflows.ts +65 -129
- package/lib/response-validation.test.d.ts +0 -4
- package/lib/response-validation.test.d.ts.map +0 -1
- package/lib/response-validation.test.js +0 -40
- package/lib/response-validation.test.js.map +0 -1
- package/src/response-validation.test.ts +0 -54
|
@@ -1,14 +1,10 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
1
2
|
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
|
|
2
3
|
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
4
|
import { SlackError, SlackRateLimited } from "../errors.ts";
|
|
5
|
+
import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
|
|
11
6
|
import * as Retry from "../retry.ts";
|
|
7
|
+
import * as T from "../traits.ts";
|
|
12
8
|
|
|
13
9
|
export type { SlackOpError, SlackOpContext };
|
|
14
10
|
|
|
@@ -20,10 +16,9 @@ export const CreateUsergroupRequestChannelsList = /*@__PURE__*/ S.Array(
|
|
|
20
16
|
|
|
21
17
|
/** A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too. */
|
|
22
18
|
export type CreateUsergroupRequestAdditionalChannelsList = Array<string>;
|
|
23
|
-
export const CreateUsergroupRequestAdditionalChannelsList =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
) as any as S.Schema<CreateUsergroupRequestAdditionalChannelsList>;
|
|
19
|
+
export const CreateUsergroupRequestAdditionalChannelsList = /*@__PURE__*/ S.Array(
|
|
20
|
+
S.String,
|
|
21
|
+
) as any as S.Schema<CreateUsergroupRequestAdditionalChannelsList>;
|
|
27
22
|
|
|
28
23
|
export interface CreateUsergroupRequest {
|
|
29
24
|
/** A comma separated string of encoded channel IDs for which the User Group uses as a default. */
|
|
@@ -46,9 +41,7 @@ export interface CreateUsergroupRequest {
|
|
|
46
41
|
export const CreateUsergroupRequest = /*@__PURE__*/ S.suspend(() =>
|
|
47
42
|
S.Struct({
|
|
48
43
|
channels: S.optional(CreateUsergroupRequestChannelsList),
|
|
49
|
-
additional_channels: S.optional(
|
|
50
|
-
CreateUsergroupRequestAdditionalChannelsList,
|
|
51
|
-
),
|
|
44
|
+
additional_channels: S.optional(CreateUsergroupRequestAdditionalChannelsList),
|
|
52
45
|
description: S.optional(S.String),
|
|
53
46
|
handle: S.optional(S.String),
|
|
54
47
|
include_count: S.optional(S.Boolean),
|
|
@@ -56,9 +49,7 @@ export const CreateUsergroupRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
56
49
|
team_id: S.optional(S.String),
|
|
57
50
|
enable_section: S.optional(S.Boolean),
|
|
58
51
|
}).pipe(T.Http({ method: "POST", uri: "/usergroups.create", code: 200 })),
|
|
59
|
-
).annotate({
|
|
60
|
-
identifier: "CreateUsergroupRequest",
|
|
61
|
-
}) as any as S.Schema<CreateUsergroupRequest>;
|
|
52
|
+
).annotate({ identifier: "CreateUsergroupRequest" }) as any as S.Schema<CreateUsergroupRequest>;
|
|
62
53
|
|
|
63
54
|
export interface CreateUsergroupResponse {
|
|
64
55
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -70,9 +61,7 @@ export const CreateUsergroupResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
70
61
|
ok: S.Boolean,
|
|
71
62
|
usergroup: S.Unknown,
|
|
72
63
|
}),
|
|
73
|
-
).annotate({
|
|
74
|
-
identifier: "CreateUsergroupResponse",
|
|
75
|
-
}) as any as S.Schema<CreateUsergroupResponse>;
|
|
64
|
+
).annotate({ identifier: "CreateUsergroupResponse" }) as any as S.Schema<CreateUsergroupResponse>;
|
|
76
65
|
|
|
77
66
|
export interface DisableUsergroupRequest {
|
|
78
67
|
/** Include the number of users in the User Group. */
|
|
@@ -88,9 +77,7 @@ export const DisableUsergroupRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
88
77
|
team_id: S.optional(S.String),
|
|
89
78
|
usergroup: S.String,
|
|
90
79
|
}).pipe(T.Http({ method: "POST", uri: "/usergroups.disable", code: 200 })),
|
|
91
|
-
).annotate({
|
|
92
|
-
identifier: "DisableUsergroupRequest",
|
|
93
|
-
}) as any as S.Schema<DisableUsergroupRequest>;
|
|
80
|
+
).annotate({ identifier: "DisableUsergroupRequest" }) as any as S.Schema<DisableUsergroupRequest>;
|
|
94
81
|
|
|
95
82
|
export interface DisableUsergroupResponse {
|
|
96
83
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -102,9 +89,7 @@ export const DisableUsergroupResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
102
89
|
ok: S.Boolean,
|
|
103
90
|
usergroup: S.Unknown,
|
|
104
91
|
}),
|
|
105
|
-
).annotate({
|
|
106
|
-
identifier: "DisableUsergroupResponse",
|
|
107
|
-
}) as any as S.Schema<DisableUsergroupResponse>;
|
|
92
|
+
).annotate({ identifier: "DisableUsergroupResponse" }) as any as S.Schema<DisableUsergroupResponse>;
|
|
108
93
|
|
|
109
94
|
export interface EnableUsergroupRequest {
|
|
110
95
|
/** Include the number of users in the User Group. */
|
|
@@ -120,9 +105,7 @@ export const EnableUsergroupRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
120
105
|
team_id: S.optional(S.String),
|
|
121
106
|
usergroup: S.String,
|
|
122
107
|
}).pipe(T.Http({ method: "POST", uri: "/usergroups.enable", code: 200 })),
|
|
123
|
-
).annotate({
|
|
124
|
-
identifier: "EnableUsergroupRequest",
|
|
125
|
-
}) as any as S.Schema<EnableUsergroupRequest>;
|
|
108
|
+
).annotate({ identifier: "EnableUsergroupRequest" }) as any as S.Schema<EnableUsergroupRequest>;
|
|
126
109
|
|
|
127
110
|
export interface EnableUsergroupResponse {
|
|
128
111
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -134,9 +117,7 @@ export const EnableUsergroupResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
134
117
|
ok: S.Boolean,
|
|
135
118
|
usergroup: S.Unknown,
|
|
136
119
|
}),
|
|
137
|
-
).annotate({
|
|
138
|
-
identifier: "EnableUsergroupResponse",
|
|
139
|
-
}) as any as S.Schema<EnableUsergroupResponse>;
|
|
120
|
+
).annotate({ identifier: "EnableUsergroupResponse" }) as any as S.Schema<EnableUsergroupResponse>;
|
|
140
121
|
|
|
141
122
|
export interface ListUsergroupsRequest {
|
|
142
123
|
/** Include the number of users in each User Group. */
|
|
@@ -155,9 +136,7 @@ export const ListUsergroupsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
155
136
|
include_users: S.optional(S.Boolean.pipe(T.Query())),
|
|
156
137
|
team_id: S.optional(S.String.pipe(T.Query())),
|
|
157
138
|
}).pipe(T.Http({ method: "GET", uri: "/usergroups.list", code: 200 })),
|
|
158
|
-
).annotate({
|
|
159
|
-
identifier: "ListUsergroupsRequest",
|
|
160
|
-
}) as any as S.Schema<ListUsergroupsRequest>;
|
|
139
|
+
).annotate({ identifier: "ListUsergroupsRequest" }) as any as S.Schema<ListUsergroupsRequest>;
|
|
161
140
|
|
|
162
141
|
export type ListUsergroupsResponseUsergroupsList = Array<unknown>;
|
|
163
142
|
export const ListUsergroupsResponseUsergroupsList = /*@__PURE__*/ S.Array(
|
|
@@ -174,9 +153,7 @@ export const ListUsergroupsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
174
153
|
ok: S.Boolean,
|
|
175
154
|
usergroups: ListUsergroupsResponseUsergroupsList,
|
|
176
155
|
}),
|
|
177
|
-
).annotate({
|
|
178
|
-
identifier: "ListUsergroupsResponse",
|
|
179
|
-
}) as any as S.Schema<ListUsergroupsResponse>;
|
|
156
|
+
).annotate({ identifier: "ListUsergroupsResponse" }) as any as S.Schema<ListUsergroupsResponse>;
|
|
180
157
|
|
|
181
158
|
export interface ListUsersRequest {
|
|
182
159
|
/** Include results for disabled User Groups. */
|
|
@@ -192,9 +169,7 @@ export const ListUsersRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
192
169
|
usergroup: S.String.pipe(T.Query()),
|
|
193
170
|
team_id: S.optional(S.String.pipe(T.Query())),
|
|
194
171
|
}).pipe(T.Http({ method: "GET", uri: "/usergroups.users.list", code: 200 })),
|
|
195
|
-
).annotate({
|
|
196
|
-
identifier: "ListUsersRequest",
|
|
197
|
-
}) as any as S.Schema<ListUsersRequest>;
|
|
172
|
+
).annotate({ identifier: "ListUsersRequest" }) as any as S.Schema<ListUsersRequest>;
|
|
198
173
|
|
|
199
174
|
export type ListUsersResponseUsersList = Array<unknown>;
|
|
200
175
|
export const ListUsersResponseUsersList = /*@__PURE__*/ S.Array(
|
|
@@ -211,9 +186,7 @@ export const ListUsersResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
211
186
|
ok: S.Boolean,
|
|
212
187
|
users: ListUsersResponseUsersList,
|
|
213
188
|
}),
|
|
214
|
-
).annotate({
|
|
215
|
-
identifier: "ListUsersResponse",
|
|
216
|
-
}) as any as S.Schema<ListUsersResponse>;
|
|
189
|
+
).annotate({ identifier: "ListUsersResponse" }) as any as S.Schema<ListUsersResponse>;
|
|
217
190
|
|
|
218
191
|
/** A comma separated string of encoded user IDs that represent the entire list of users for the user group. */
|
|
219
192
|
export type UpdateUserRequestUsersList = Array<string>;
|
|
@@ -249,12 +222,8 @@ export const UpdateUserRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
249
222
|
users: UpdateUserRequestUsersList,
|
|
250
223
|
additional_channels: S.optional(UpdateUserRequestAdditionalChannelsList),
|
|
251
224
|
is_shared: S.optional(S.Boolean),
|
|
252
|
-
}).pipe(
|
|
253
|
-
|
|
254
|
-
),
|
|
255
|
-
).annotate({
|
|
256
|
-
identifier: "UpdateUserRequest",
|
|
257
|
-
}) as any as S.Schema<UpdateUserRequest>;
|
|
225
|
+
}).pipe(T.Http({ method: "POST", uri: "/usergroups.users.update", code: 200 })),
|
|
226
|
+
).annotate({ identifier: "UpdateUserRequest" }) as any as S.Schema<UpdateUserRequest>;
|
|
258
227
|
|
|
259
228
|
export interface UpdateUserResponse {
|
|
260
229
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -266,9 +235,7 @@ export const UpdateUserResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
266
235
|
ok: S.Boolean,
|
|
267
236
|
usergroup: S.Unknown,
|
|
268
237
|
}),
|
|
269
|
-
).annotate({
|
|
270
|
-
identifier: "UpdateUserResponse",
|
|
271
|
-
}) as any as S.Schema<UpdateUserResponse>;
|
|
238
|
+
).annotate({ identifier: "UpdateUserResponse" }) as any as S.Schema<UpdateUserResponse>;
|
|
272
239
|
|
|
273
240
|
/** A comma separated string of encoded channel IDs for which the User Group uses as a default. */
|
|
274
241
|
export type UpdateUsergroupRequestChannelsList = Array<string>;
|
|
@@ -278,10 +245,9 @@ export const UpdateUsergroupRequestChannelsList = /*@__PURE__*/ S.Array(
|
|
|
278
245
|
|
|
279
246
|
/** A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too. */
|
|
280
247
|
export type UpdateUsergroupRequestAdditionalChannelsList = Array<string>;
|
|
281
|
-
export const UpdateUsergroupRequestAdditionalChannelsList =
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
) as any as S.Schema<UpdateUsergroupRequestAdditionalChannelsList>;
|
|
248
|
+
export const UpdateUsergroupRequestAdditionalChannelsList = /*@__PURE__*/ S.Array(
|
|
249
|
+
S.String,
|
|
250
|
+
) as any as S.Schema<UpdateUsergroupRequestAdditionalChannelsList>;
|
|
285
251
|
|
|
286
252
|
export interface UpdateUsergroupRequest {
|
|
287
253
|
/** A comma separated string of encoded channel IDs for which the User Group uses as a default. */
|
|
@@ -306,9 +272,7 @@ export interface UpdateUsergroupRequest {
|
|
|
306
272
|
export const UpdateUsergroupRequest = /*@__PURE__*/ S.suspend(() =>
|
|
307
273
|
S.Struct({
|
|
308
274
|
channels: S.optional(UpdateUsergroupRequestChannelsList),
|
|
309
|
-
additional_channels: S.optional(
|
|
310
|
-
UpdateUsergroupRequestAdditionalChannelsList,
|
|
311
|
-
),
|
|
275
|
+
additional_channels: S.optional(UpdateUsergroupRequestAdditionalChannelsList),
|
|
312
276
|
description: S.optional(S.String),
|
|
313
277
|
handle: S.optional(S.String),
|
|
314
278
|
include_count: S.optional(S.Boolean),
|
|
@@ -317,23 +281,28 @@ export const UpdateUsergroupRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
317
281
|
usergroup: S.String,
|
|
318
282
|
enable_section: S.optional(S.Boolean),
|
|
319
283
|
}).pipe(T.Http({ method: "POST", uri: "/usergroups.update", code: 200 })),
|
|
320
|
-
).annotate({
|
|
321
|
-
|
|
322
|
-
|
|
284
|
+
).annotate({ identifier: "UpdateUsergroupRequest" }) as any as S.Schema<UpdateUsergroupRequest>;
|
|
285
|
+
|
|
286
|
+
/** List of user IDs who would exceed their channel limit */
|
|
287
|
+
export type UpdateUsergroupResponseChannelLimitUserIdsList = Array<string>;
|
|
288
|
+
export const UpdateUsergroupResponseChannelLimitUserIdsList = /*@__PURE__*/ S.Array(
|
|
289
|
+
S.String,
|
|
290
|
+
) as any as S.Schema<UpdateUsergroupResponseChannelLimitUserIdsList>;
|
|
323
291
|
|
|
324
292
|
export interface UpdateUsergroupResponse {
|
|
325
293
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
326
294
|
ok: boolean;
|
|
327
295
|
usergroup: unknown;
|
|
296
|
+
/** List of user IDs who would exceed their channel limit */
|
|
297
|
+
channel_limit_user_ids?: UpdateUsergroupResponseChannelLimitUserIdsList;
|
|
328
298
|
}
|
|
329
299
|
export const UpdateUsergroupResponse = /*@__PURE__*/ S.suspend(() =>
|
|
330
300
|
S.Struct({
|
|
331
301
|
ok: S.Boolean,
|
|
332
302
|
usergroup: S.Unknown,
|
|
303
|
+
channel_limit_user_ids: S.optional(UpdateUsergroupResponseChannelLimitUserIdsList),
|
|
333
304
|
}),
|
|
334
|
-
).annotate({
|
|
335
|
-
identifier: "UpdateUsergroupResponse",
|
|
336
|
-
}) as any as S.Schema<UpdateUsergroupResponse>;
|
|
305
|
+
).annotate({ identifier: "UpdateUsergroupResponse" }) as any as S.Schema<UpdateUsergroupResponse>;
|
|
337
306
|
|
|
338
307
|
export type CreateUsergroupError = SlackOpError;
|
|
339
308
|
/** Create a User Group. Required scopes — bot: `usergroups:write`; user: `usergroups:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `bad_handle` — Handle is invalid - `description_too_long` — Given usergroup description is too long - `forbidden_handle` — Handle is invalid - `handle_already_exists` — Handle is already in use on this workspace - `invalid_channel_provided` — An invalid channel ID was provided - `invalid_group_provided` — An invalid group ID was provided - `missing_argument` — A required argument is missing. - `missing_subteam_name` — Subteam name is required - `name_already_exists` — Name is already in use on this workspace - `name_too_long` — Name too long. - `paid_teams_only` — Usergroups can only be used on paid Slack teams - `permission_denied` — The user does not have permission to create a User Group. - `plan_upgrade_required` — This workspace does not have access to User Groups, as that feature is only available on Standard and above plans. - `target_team_not_on_org` — Target team specified is not on the org in context - `target_team_must_be_specified_in_org_context` — No target team was specified but the team in context is an org See https://docs.slack.dev/reference/methods/usergroups.create */
|
|
@@ -411,7 +380,7 @@ export const listUsers: API.OperationMethod<
|
|
|
411
380
|
}));
|
|
412
381
|
|
|
413
382
|
export type UpdateUserError = SlackOpError;
|
|
414
|
-
/** Update the list of users for a user group. Required scopes — bot: `usergroups:write`; user: `usergroups:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `invalid_users` — Value passed for `users` was empty or invalid. - `failed_for_some_users` — User(s) are not in the workspace where this usergroup exists - `missing_argument` — A required argument is missing. - `no_users_provided` — Either the `users` field wasn't provided or an empty value was passed. - `permission_denied` — The user does not have permission to update the list of users for a user group. Check workspace settings to confirm whether the calling user has permission. - `plan_upgrade_required` — This workspace does not have access to user groups, as that feature is only available on Standard and above plans. - `subteam_max_users_exceeded` — Exceeds maximum supported number of users per subteam. See https://docs.slack.dev/reference/methods/usergroups.users.update */
|
|
383
|
+
/** Update the list of users for a user group. Required scopes — bot: `usergroups:write`; user: `usergroups:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `invalid_users` — Value passed for `users` was empty or invalid. - `failed_for_some_users` — User(s) are not in the workspace where this usergroup exists - `missing_argument` — A required argument is missing. - `no_users_provided` — Either the `users` field wasn't provided or an empty value was passed. - `permission_denied` — The user does not have permission to update the list of users for a user group. Check workspace settings to confirm whether the calling user has permission. - `plan_upgrade_required` — This workspace does not have access to user groups, as that feature is only available on Standard and above plans. - `subteam_max_users_exceeded` — Exceeds maximum supported number of users per subteam. - `cannot_modify_role_admin` — The user does not have permission to modify the roles admin role. See https://docs.slack.dev/reference/methods/usergroups.users.update */
|
|
415
384
|
export const updateUser: API.OperationMethod<
|
|
416
385
|
UpdateUserRequest,
|
|
417
386
|
UpdateUserResponse,
|
|
@@ -426,7 +395,7 @@ export const updateUser: API.OperationMethod<
|
|
|
426
395
|
}));
|
|
427
396
|
|
|
428
397
|
export type UpdateUsergroupError = SlackOpError;
|
|
429
|
-
/** Update an existing User Group. Required scopes — bot: `usergroups:write`; user: `usergroups:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `missing_argument` — A required argument is missing. - `paid_teams_only` — This workspace does not have access to User Groups, as that feature is only available on Standard and above plans. - `permission_denied` — The user does not have permission to update the User Group. - `too_many_linked_channels` — This request exceeds the number of channels we supporting linking to a single usergroup. See https://docs.slack.dev/reference/methods/usergroups.update */
|
|
398
|
+
/** Update an existing User Group. Required scopes — bot: `usergroups:write`; user: `usergroups:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `missing_argument` — A required argument is missing. - `paid_teams_only` — This workspace does not have access to User Groups, as that feature is only available on Standard and above plans. - `permission_denied` — The user does not have permission to update the User Group. - `too_many_linked_channels` — This request exceeds the number of channels we supporting linking to a single usergroup. - `user_channel_limit_exceeded` — Adding these channels would cause one or more members to exceed their channel limit. See https://docs.slack.dev/reference/methods/usergroups.update */
|
|
430
399
|
export const updateUsergroup: API.OperationMethod<
|
|
431
400
|
UpdateUsergroupRequest,
|
|
432
401
|
UpdateUsergroupResponse,
|
package/src/services/users.ts
CHANGED
|
@@ -1,26 +1,18 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
1
2
|
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
|
|
2
3
|
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 { slackPaginate } from "../pagination.ts";
|
|
11
4
|
import { SlackError, SlackRateLimited } from "../errors.ts";
|
|
5
|
+
import { slackPaginate } from "../pagination.ts";
|
|
6
|
+
import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
|
|
12
7
|
import * as Retry from "../retry.ts";
|
|
8
|
+
import * as T from "../traits.ts";
|
|
13
9
|
|
|
14
10
|
export type { SlackOpError, SlackOpContext };
|
|
15
11
|
|
|
16
12
|
export interface DeletePhotoRequest {}
|
|
17
13
|
export const DeletePhotoRequest = /*@__PURE__*/ S.suspend(() =>
|
|
18
|
-
S.Struct({}).pipe(
|
|
19
|
-
|
|
20
|
-
),
|
|
21
|
-
).annotate({
|
|
22
|
-
identifier: "DeletePhotoRequest",
|
|
23
|
-
}) as any as S.Schema<DeletePhotoRequest>;
|
|
14
|
+
S.Struct({}).pipe(T.Http({ method: "GET", uri: "/users.deletePhoto", code: 200 })),
|
|
15
|
+
).annotate({ identifier: "DeletePhotoRequest" }) as any as S.Schema<DeletePhotoRequest>;
|
|
24
16
|
|
|
25
17
|
export interface DeletePhotoResponse {
|
|
26
18
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -30,9 +22,7 @@ export const DeletePhotoResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
30
22
|
S.Struct({
|
|
31
23
|
ok: S.Boolean,
|
|
32
24
|
}),
|
|
33
|
-
).annotate({
|
|
34
|
-
identifier: "DeletePhotoResponse",
|
|
35
|
-
}) as any as S.Schema<DeletePhotoResponse>;
|
|
25
|
+
).annotate({ identifier: "DeletePhotoResponse" }) as any as S.Schema<DeletePhotoResponse>;
|
|
36
26
|
|
|
37
27
|
export interface GetPresenceRequest {
|
|
38
28
|
/** User to get presence info on. Defaults to the authed user. */
|
|
@@ -42,9 +32,7 @@ export const GetPresenceRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
42
32
|
S.Struct({
|
|
43
33
|
user: S.optional(S.String.pipe(T.Query())),
|
|
44
34
|
}).pipe(T.Http({ method: "GET", uri: "/users.getPresence", code: 200 })),
|
|
45
|
-
).annotate({
|
|
46
|
-
identifier: "GetPresenceRequest",
|
|
47
|
-
}) as any as S.Schema<GetPresenceRequest>;
|
|
35
|
+
).annotate({ identifier: "GetPresenceRequest" }) as any as S.Schema<GetPresenceRequest>;
|
|
48
36
|
|
|
49
37
|
export interface GetPresenceResponse {
|
|
50
38
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -66,9 +54,7 @@ export const GetPresenceResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
66
54
|
connection_count: S.optional(S.Number),
|
|
67
55
|
auto_away: S.optional(S.Boolean),
|
|
68
56
|
}),
|
|
69
|
-
).annotate({
|
|
70
|
-
identifier: "GetPresenceResponse",
|
|
71
|
-
}) as any as S.Schema<GetPresenceResponse>;
|
|
57
|
+
).annotate({ identifier: "GetPresenceResponse" }) as any as S.Schema<GetPresenceResponse>;
|
|
72
58
|
|
|
73
59
|
export interface GetProfileRequest {
|
|
74
60
|
/** Include labels for each ID in custom profile fields. Using this parameter will heavily rate-limit your requests and is not recommended. */
|
|
@@ -81,9 +67,7 @@ export const GetProfileRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
81
67
|
include_labels: S.optional(S.Boolean.pipe(T.Query())),
|
|
82
68
|
user: S.optional(S.String.pipe(T.Query())),
|
|
83
69
|
}).pipe(T.Http({ method: "GET", uri: "/users.profile.get", code: 200 })),
|
|
84
|
-
).annotate({
|
|
85
|
-
identifier: "GetProfileRequest",
|
|
86
|
-
}) as any as S.Schema<GetProfileRequest>;
|
|
70
|
+
).annotate({ identifier: "GetProfileRequest" }) as any as S.Schema<GetProfileRequest>;
|
|
87
71
|
|
|
88
72
|
export interface GetProfileResponse {
|
|
89
73
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -95,9 +79,7 @@ export const GetProfileResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
95
79
|
ok: S.Boolean,
|
|
96
80
|
profile: S.Unknown,
|
|
97
81
|
}),
|
|
98
|
-
).annotate({
|
|
99
|
-
identifier: "GetProfileResponse",
|
|
100
|
-
}) as any as S.Schema<GetProfileResponse>;
|
|
82
|
+
).annotate({ identifier: "GetProfileResponse" }) as any as S.Schema<GetProfileResponse>;
|
|
101
83
|
|
|
102
84
|
export interface ListUsersRequest {
|
|
103
85
|
/** Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/apis/web-api/pagination) for more detail. */
|
|
@@ -116,9 +98,7 @@ export const ListUsersRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
116
98
|
limit: S.optional(S.Number.pipe(T.Query())),
|
|
117
99
|
team_id: S.optional(S.String.pipe(T.Query())),
|
|
118
100
|
}).pipe(T.Http({ method: "GET", uri: "/users.list", code: 200 })),
|
|
119
|
-
).annotate({
|
|
120
|
-
identifier: "ListUsersRequest",
|
|
121
|
-
}) as any as S.Schema<ListUsersRequest>;
|
|
101
|
+
).annotate({ identifier: "ListUsersRequest" }) as any as S.Schema<ListUsersRequest>;
|
|
122
102
|
|
|
123
103
|
export type ListUsersResponseMembersList = Array<unknown>;
|
|
124
104
|
export const ListUsersResponseMembersList = /*@__PURE__*/ S.Array(
|
|
@@ -155,9 +135,7 @@ export const ListUsersResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
155
135
|
response_metadata: S.optional(ListUsersResponseResponseMetadata),
|
|
156
136
|
offset: S.optional(S.String),
|
|
157
137
|
}),
|
|
158
|
-
).annotate({
|
|
159
|
-
identifier: "ListUsersResponse",
|
|
160
|
-
}) as any as S.Schema<ListUsersResponse>;
|
|
138
|
+
).annotate({ identifier: "ListUsersResponse" }) as any as S.Schema<ListUsersResponse>;
|
|
161
139
|
|
|
162
140
|
export interface LookupByEmailRequest {
|
|
163
141
|
/** An email address belonging to a user in the workspace */
|
|
@@ -167,9 +145,7 @@ export const LookupByEmailRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
167
145
|
S.Struct({
|
|
168
146
|
email: S.String.pipe(T.Query()),
|
|
169
147
|
}).pipe(T.Http({ method: "GET", uri: "/users.lookupByEmail", code: 200 })),
|
|
170
|
-
).annotate({
|
|
171
|
-
identifier: "LookupByEmailRequest",
|
|
172
|
-
}) as any as S.Schema<LookupByEmailRequest>;
|
|
148
|
+
).annotate({ identifier: "LookupByEmailRequest" }) as any as S.Schema<LookupByEmailRequest>;
|
|
173
149
|
|
|
174
150
|
export interface LookupByEmailResponse {
|
|
175
151
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -181,9 +157,7 @@ export const LookupByEmailResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
181
157
|
ok: S.Boolean,
|
|
182
158
|
user: S.Unknown,
|
|
183
159
|
}),
|
|
184
|
-
).annotate({
|
|
185
|
-
identifier: "LookupByEmailResponse",
|
|
186
|
-
}) as any as S.Schema<LookupByEmailResponse>;
|
|
160
|
+
).annotate({ identifier: "LookupByEmailResponse" }) as any as S.Schema<LookupByEmailResponse>;
|
|
187
161
|
|
|
188
162
|
export interface LookupDiscoverableContactRequest {
|
|
189
163
|
email: string;
|
|
@@ -191,13 +165,7 @@ export interface LookupDiscoverableContactRequest {
|
|
|
191
165
|
export const LookupDiscoverableContactRequest = /*@__PURE__*/ S.suspend(() =>
|
|
192
166
|
S.Struct({
|
|
193
167
|
email: S.String,
|
|
194
|
-
}).pipe(
|
|
195
|
-
T.Http({
|
|
196
|
-
method: "POST",
|
|
197
|
-
uri: "/users.discoverableContacts.lookup",
|
|
198
|
-
code: 200,
|
|
199
|
-
}),
|
|
200
|
-
),
|
|
168
|
+
}).pipe(T.Http({ method: "POST", uri: "/users.discoverableContacts.lookup", code: 200 })),
|
|
201
169
|
).annotate({
|
|
202
170
|
identifier: "LookupDiscoverableContactRequest",
|
|
203
171
|
}) as any as S.Schema<LookupDiscoverableContactRequest>;
|
|
@@ -218,12 +186,8 @@ export const LookupDiscoverableContactResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
218
186
|
|
|
219
187
|
export interface SetActiveRequest {}
|
|
220
188
|
export const SetActiveRequest = /*@__PURE__*/ S.suspend(() =>
|
|
221
|
-
S.Struct({}).pipe(
|
|
222
|
-
|
|
223
|
-
),
|
|
224
|
-
).annotate({
|
|
225
|
-
identifier: "SetActiveRequest",
|
|
226
|
-
}) as any as S.Schema<SetActiveRequest>;
|
|
189
|
+
S.Struct({}).pipe(T.Http({ method: "POST", uri: "/users.setActive", code: 200 })),
|
|
190
|
+
).annotate({ identifier: "SetActiveRequest" }) as any as S.Schema<SetActiveRequest>;
|
|
227
191
|
|
|
228
192
|
export interface SetActiveResponse {
|
|
229
193
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -233,9 +197,7 @@ export const SetActiveResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
233
197
|
S.Struct({
|
|
234
198
|
ok: S.Boolean,
|
|
235
199
|
}),
|
|
236
|
-
).annotate({
|
|
237
|
-
identifier: "SetActiveResponse",
|
|
238
|
-
}) as any as S.Schema<SetActiveResponse>;
|
|
200
|
+
).annotate({ identifier: "SetActiveResponse" }) as any as S.Schema<SetActiveResponse>;
|
|
239
201
|
|
|
240
202
|
export interface SetPhotoRequest {
|
|
241
203
|
/** Width/height of crop box (always square) */
|
|
@@ -254,16 +216,9 @@ export const SetPhotoRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
254
216
|
crop_y: S.optional(S.String),
|
|
255
217
|
image: S.optional(S.Unknown),
|
|
256
218
|
}).pipe(
|
|
257
|
-
T.Http({
|
|
258
|
-
method: "POST",
|
|
259
|
-
uri: "/users.setPhoto",
|
|
260
|
-
code: 200,
|
|
261
|
-
contentType: "form-urlencoded",
|
|
262
|
-
}),
|
|
219
|
+
T.Http({ method: "POST", uri: "/users.setPhoto", code: 200, contentType: "form-urlencoded" }),
|
|
263
220
|
),
|
|
264
|
-
).annotate({
|
|
265
|
-
identifier: "SetPhotoRequest",
|
|
266
|
-
}) as any as S.Schema<SetPhotoRequest>;
|
|
221
|
+
).annotate({ identifier: "SetPhotoRequest" }) as any as S.Schema<SetPhotoRequest>;
|
|
267
222
|
|
|
268
223
|
export type SetPhotoResponseProfileMap = { [key: string]: unknown | undefined };
|
|
269
224
|
export const SetPhotoResponseProfileMap = /*@__PURE__*/ S.Record(
|
|
@@ -281,9 +236,7 @@ export const SetPhotoResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
281
236
|
ok: S.Boolean,
|
|
282
237
|
profile: SetPhotoResponseProfileMap,
|
|
283
238
|
}),
|
|
284
|
-
).annotate({
|
|
285
|
-
identifier: "SetPhotoResponse",
|
|
286
|
-
}) as any as S.Schema<SetPhotoResponse>;
|
|
239
|
+
).annotate({ identifier: "SetPhotoResponse" }) as any as S.Schema<SetPhotoResponse>;
|
|
287
240
|
|
|
288
241
|
/** Either `auto` or `away` */
|
|
289
242
|
export type SetPresenceRequestPresence = "auto" | "away";
|
|
@@ -297,9 +250,7 @@ export const SetPresenceRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
297
250
|
S.Struct({
|
|
298
251
|
presence: SetPresenceRequestPresence,
|
|
299
252
|
}).pipe(T.Http({ method: "POST", uri: "/users.setPresence", code: 200 })),
|
|
300
|
-
).annotate({
|
|
301
|
-
identifier: "SetPresenceRequest",
|
|
302
|
-
}) as any as S.Schema<SetPresenceRequest>;
|
|
253
|
+
).annotate({ identifier: "SetPresenceRequest" }) as any as S.Schema<SetPresenceRequest>;
|
|
303
254
|
|
|
304
255
|
export interface SetPresenceResponse {
|
|
305
256
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -309,9 +260,7 @@ export const SetPresenceResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
309
260
|
S.Struct({
|
|
310
261
|
ok: S.Boolean,
|
|
311
262
|
}),
|
|
312
|
-
).annotate({
|
|
313
|
-
identifier: "SetPresenceResponse",
|
|
314
|
-
}) as any as S.Schema<SetPresenceResponse>;
|
|
263
|
+
).annotate({ identifier: "SetPresenceResponse" }) as any as S.Schema<SetPresenceResponse>;
|
|
315
264
|
|
|
316
265
|
export interface SetProfileRequest {
|
|
317
266
|
/** Name of a single key to set. Usable only if `profile` is not passed. */
|
|
@@ -330,9 +279,7 @@ export const SetProfileRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
330
279
|
user: S.optional(S.String),
|
|
331
280
|
value: S.optional(S.String),
|
|
332
281
|
}).pipe(T.Http({ method: "POST", uri: "/users.profile.set", code: 200 })),
|
|
333
|
-
).annotate({
|
|
334
|
-
identifier: "SetProfileRequest",
|
|
335
|
-
}) as any as S.Schema<SetProfileRequest>;
|
|
282
|
+
).annotate({ identifier: "SetProfileRequest" }) as any as S.Schema<SetProfileRequest>;
|
|
336
283
|
|
|
337
284
|
export interface SetProfileResponse {
|
|
338
285
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -348,9 +295,7 @@ export const SetProfileResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
348
295
|
profile: S.Unknown,
|
|
349
296
|
email_pending: S.optional(S.String),
|
|
350
297
|
}),
|
|
351
|
-
).annotate({
|
|
352
|
-
identifier: "SetProfileResponse",
|
|
353
|
-
}) as any as S.Schema<SetProfileResponse>;
|
|
298
|
+
).annotate({ identifier: "SetProfileResponse" }) as any as S.Schema<SetProfileResponse>;
|
|
354
299
|
|
|
355
300
|
export interface UsersConversationsRequest {
|
|
356
301
|
/** Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/apis/web-api/pagination) for more detail. */
|
|
@@ -388,10 +333,8 @@ export const UsersConversationsResponseChannelsList = /*@__PURE__*/ S.Array(
|
|
|
388
333
|
) as any as S.Schema<UsersConversationsResponseChannelsList>;
|
|
389
334
|
|
|
390
335
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
391
|
-
export type UsersConversationsResponseResponseMetadata =
|
|
392
|
-
|
|
393
|
-
export const UsersConversationsResponseResponseMetadata =
|
|
394
|
-
ListUsersResponseResponseMetadata;
|
|
336
|
+
export type UsersConversationsResponseResponseMetadata = ListUsersResponseResponseMetadata;
|
|
337
|
+
export const UsersConversationsResponseResponseMetadata = ListUsersResponseResponseMetadata;
|
|
395
338
|
|
|
396
339
|
export interface UsersConversationsResponse {
|
|
397
340
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -412,12 +355,8 @@ export const UsersConversationsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
412
355
|
|
|
413
356
|
export interface UsersIdentityRequest {}
|
|
414
357
|
export const UsersIdentityRequest = /*@__PURE__*/ S.suspend(() =>
|
|
415
|
-
S.Struct({}).pipe(
|
|
416
|
-
|
|
417
|
-
),
|
|
418
|
-
).annotate({
|
|
419
|
-
identifier: "UsersIdentityRequest",
|
|
420
|
-
}) as any as S.Schema<UsersIdentityRequest>;
|
|
358
|
+
S.Struct({}).pipe(T.Http({ method: "GET", uri: "/users.identity", code: 200 })),
|
|
359
|
+
).annotate({ identifier: "UsersIdentityRequest" }) as any as S.Schema<UsersIdentityRequest>;
|
|
421
360
|
|
|
422
361
|
export interface UsersIdentityResponse {
|
|
423
362
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -427,24 +366,20 @@ export const UsersIdentityResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
427
366
|
S.Struct({
|
|
428
367
|
ok: S.Boolean,
|
|
429
368
|
}),
|
|
430
|
-
).annotate({
|
|
431
|
-
identifier: "UsersIdentityResponse",
|
|
432
|
-
}) as any as S.Schema<UsersIdentityResponse>;
|
|
369
|
+
).annotate({ identifier: "UsersIdentityResponse" }) as any as S.Schema<UsersIdentityResponse>;
|
|
433
370
|
|
|
434
371
|
export interface UsersInfoRequest {
|
|
435
372
|
/** Set this to `true` to receive the locale for this user. Defaults to `false` */
|
|
436
373
|
include_locale?: boolean;
|
|
437
374
|
/** User to get info on */
|
|
438
|
-
user
|
|
375
|
+
user?: string;
|
|
439
376
|
}
|
|
440
377
|
export const UsersInfoRequest = /*@__PURE__*/ S.suspend(() =>
|
|
441
378
|
S.Struct({
|
|
442
379
|
include_locale: S.optional(S.Boolean.pipe(T.Query())),
|
|
443
|
-
user: S.String.pipe(T.Query()),
|
|
380
|
+
user: S.optional(S.String.pipe(T.Query())),
|
|
444
381
|
}).pipe(T.Http({ method: "GET", uri: "/users.info", code: 200 })),
|
|
445
|
-
).annotate({
|
|
446
|
-
identifier: "UsersInfoRequest",
|
|
447
|
-
}) as any as S.Schema<UsersInfoRequest>;
|
|
382
|
+
).annotate({ identifier: "UsersInfoRequest" }) as any as S.Schema<UsersInfoRequest>;
|
|
448
383
|
|
|
449
384
|
export type UsersInfoResponseUsersList = Array<unknown>;
|
|
450
385
|
export const UsersInfoResponseUsersList = /*@__PURE__*/ S.Array(
|
|
@@ -463,9 +398,7 @@ export const UsersInfoResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
463
398
|
user: S.optional(S.Unknown),
|
|
464
399
|
users: S.optional(UsersInfoResponseUsersList),
|
|
465
400
|
}),
|
|
466
|
-
).annotate({
|
|
467
|
-
identifier: "UsersInfoResponse",
|
|
468
|
-
}) as any as S.Schema<UsersInfoResponse>;
|
|
401
|
+
).annotate({ identifier: "UsersInfoResponse" }) as any as S.Schema<UsersInfoResponse>;
|
|
469
402
|
|
|
470
403
|
export type DeletePhotoError = SlackOpError;
|
|
471
404
|
/** Delete the user profile photo Required scopes — user: `users.profile:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `internal_error` — An unexpected error occurred. See https://docs.slack.dev/reference/methods/users.deletePhoto */
|