@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/lib/services/users.d.ts
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import * as API from "@distilled.cloud/core/api";
|
|
2
|
-
import * as S from "@distilled.cloud/core/schema";
|
|
3
2
|
import { type SlackOpError, type SlackOpContext } from "../protocol.ts";
|
|
4
3
|
export type { SlackOpError, SlackOpContext };
|
|
5
4
|
export interface DeletePhotoRequest {
|
|
6
5
|
}
|
|
7
|
-
export declare const DeletePhotoRequest: S.Schema<DeletePhotoRequest>;
|
|
8
6
|
export interface DeletePhotoResponse {
|
|
9
7
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
10
8
|
ok: boolean;
|
|
11
9
|
}
|
|
12
|
-
export declare const DeletePhotoResponse: S.Schema<DeletePhotoResponse>;
|
|
13
10
|
export interface GetPresenceRequest {
|
|
14
11
|
/** User to get presence info on. Defaults to the authed user. */
|
|
15
12
|
user?: string;
|
|
16
13
|
}
|
|
17
|
-
export declare const GetPresenceRequest: S.Schema<GetPresenceRequest>;
|
|
18
14
|
export interface GetPresenceResponse {
|
|
19
15
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
20
16
|
ok: boolean;
|
|
@@ -25,20 +21,17 @@ export interface GetPresenceResponse {
|
|
|
25
21
|
connection_count?: number;
|
|
26
22
|
auto_away?: boolean;
|
|
27
23
|
}
|
|
28
|
-
export declare const GetPresenceResponse: S.Schema<GetPresenceResponse>;
|
|
29
24
|
export interface GetProfileRequest {
|
|
30
25
|
/** Include labels for each ID in custom profile fields. Using this parameter will heavily rate-limit your requests and is not recommended. */
|
|
31
26
|
include_labels?: boolean;
|
|
32
27
|
/** User to retrieve profile info for */
|
|
33
28
|
user?: string;
|
|
34
29
|
}
|
|
35
|
-
export declare const GetProfileRequest: S.Schema<GetProfileRequest>;
|
|
36
30
|
export interface GetProfileResponse {
|
|
37
31
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
38
32
|
ok: boolean;
|
|
39
33
|
profile: unknown;
|
|
40
34
|
}
|
|
41
|
-
export declare const GetProfileResponse: S.Schema<GetProfileResponse>;
|
|
42
35
|
export interface ListUsersRequest {
|
|
43
36
|
/** 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. */
|
|
44
37
|
cursor?: string;
|
|
@@ -49,15 +42,12 @@ export interface ListUsersRequest {
|
|
|
49
42
|
/** encoded team id to list users in, required if org token is used */
|
|
50
43
|
team_id?: string;
|
|
51
44
|
}
|
|
52
|
-
export declare const ListUsersRequest: S.Schema<ListUsersRequest>;
|
|
53
45
|
export type ListUsersResponseMembersList = Array<unknown>;
|
|
54
|
-
export declare const ListUsersResponseMembersList: S.Schema<ListUsersResponseMembersList>;
|
|
55
46
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
56
47
|
export interface ListUsersResponseResponseMetadata {
|
|
57
|
-
/** Cursor for the next page
|
|
48
|
+
/** Cursor for the next page -- pass as `cursor` on the next call. */
|
|
58
49
|
next_cursor?: string;
|
|
59
50
|
}
|
|
60
|
-
export declare const ListUsersResponseResponseMetadata: S.Schema<ListUsersResponseResponseMetadata>;
|
|
61
51
|
export interface ListUsersResponse {
|
|
62
52
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
63
53
|
ok: boolean;
|
|
@@ -67,36 +57,29 @@ export interface ListUsersResponse {
|
|
|
67
57
|
response_metadata?: ListUsersResponseResponseMetadata;
|
|
68
58
|
offset?: string;
|
|
69
59
|
}
|
|
70
|
-
export declare const ListUsersResponse: S.Schema<ListUsersResponse>;
|
|
71
60
|
export interface LookupByEmailRequest {
|
|
72
61
|
/** An email address belonging to a user in the workspace */
|
|
73
62
|
email: string;
|
|
74
63
|
}
|
|
75
|
-
export declare const LookupByEmailRequest: S.Schema<LookupByEmailRequest>;
|
|
76
64
|
export interface LookupByEmailResponse {
|
|
77
65
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
78
66
|
ok: boolean;
|
|
79
67
|
user: unknown;
|
|
80
68
|
}
|
|
81
|
-
export declare const LookupByEmailResponse: S.Schema<LookupByEmailResponse>;
|
|
82
69
|
export interface LookupDiscoverableContactRequest {
|
|
83
70
|
email: string;
|
|
84
71
|
}
|
|
85
|
-
export declare const LookupDiscoverableContactRequest: S.Schema<LookupDiscoverableContactRequest>;
|
|
86
72
|
export interface LookupDiscoverableContactResponse {
|
|
87
73
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
88
74
|
ok: boolean;
|
|
89
75
|
is_discoverable: boolean;
|
|
90
76
|
}
|
|
91
|
-
export declare const LookupDiscoverableContactResponse: S.Schema<LookupDiscoverableContactResponse>;
|
|
92
77
|
export interface SetActiveRequest {
|
|
93
78
|
}
|
|
94
|
-
export declare const SetActiveRequest: S.Schema<SetActiveRequest>;
|
|
95
79
|
export interface SetActiveResponse {
|
|
96
80
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
97
81
|
ok: boolean;
|
|
98
82
|
}
|
|
99
|
-
export declare const SetActiveResponse: S.Schema<SetActiveResponse>;
|
|
100
83
|
export interface SetPhotoRequest {
|
|
101
84
|
/** Width/height of crop box (always square) */
|
|
102
85
|
crop_w?: string;
|
|
@@ -107,30 +90,24 @@ export interface SetPhotoRequest {
|
|
|
107
90
|
/** File contents via `multipart/form-data`. */
|
|
108
91
|
image?: unknown;
|
|
109
92
|
}
|
|
110
|
-
export declare const SetPhotoRequest: S.Schema<SetPhotoRequest>;
|
|
111
93
|
export type SetPhotoResponseProfileMap = {
|
|
112
94
|
[key: string]: unknown | undefined;
|
|
113
95
|
};
|
|
114
|
-
export declare const SetPhotoResponseProfileMap: S.Schema<SetPhotoResponseProfileMap>;
|
|
115
96
|
export interface SetPhotoResponse {
|
|
116
97
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
117
98
|
ok: boolean;
|
|
118
99
|
profile: SetPhotoResponseProfileMap;
|
|
119
100
|
}
|
|
120
|
-
export declare const SetPhotoResponse: S.Schema<SetPhotoResponse>;
|
|
121
101
|
/** Either `auto` or `away` */
|
|
122
102
|
export type SetPresenceRequestPresence = "auto" | "away";
|
|
123
|
-
export declare const SetPresenceRequestPresence: any;
|
|
124
103
|
export interface SetPresenceRequest {
|
|
125
104
|
/** Either `auto` or `away` */
|
|
126
105
|
presence: SetPresenceRequestPresence | (string & {});
|
|
127
106
|
}
|
|
128
|
-
export declare const SetPresenceRequest: S.Schema<SetPresenceRequest>;
|
|
129
107
|
export interface SetPresenceResponse {
|
|
130
108
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
131
109
|
ok: boolean;
|
|
132
110
|
}
|
|
133
|
-
export declare const SetPresenceResponse: S.Schema<SetPresenceResponse>;
|
|
134
111
|
export interface SetProfileRequest {
|
|
135
112
|
/** Name of a single key to set. Usable only if `profile` is not passed. */
|
|
136
113
|
name?: string;
|
|
@@ -141,7 +118,6 @@ export interface SetProfileRequest {
|
|
|
141
118
|
/** Value to set a single key to. Usable only if `profile` is not passed. */
|
|
142
119
|
value?: string;
|
|
143
120
|
}
|
|
144
|
-
export declare const SetProfileRequest: S.Schema<SetProfileRequest>;
|
|
145
121
|
export interface SetProfileResponse {
|
|
146
122
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
147
123
|
ok: boolean;
|
|
@@ -149,7 +125,6 @@ export interface SetProfileResponse {
|
|
|
149
125
|
profile: unknown;
|
|
150
126
|
email_pending?: string;
|
|
151
127
|
}
|
|
152
|
-
export declare const SetProfileResponse: S.Schema<SetProfileResponse>;
|
|
153
128
|
export interface UsersConversationsRequest {
|
|
154
129
|
/** 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. */
|
|
155
130
|
cursor?: string;
|
|
@@ -166,12 +141,9 @@ export interface UsersConversationsRequest {
|
|
|
166
141
|
/** Browse conversations by a specific user ID's membership. Non-public channels are restricted to those where the calling user shares membership. */
|
|
167
142
|
user?: string;
|
|
168
143
|
}
|
|
169
|
-
export declare const UsersConversationsRequest: S.Schema<UsersConversationsRequest>;
|
|
170
144
|
export type UsersConversationsResponseChannelsList = Array<unknown>;
|
|
171
|
-
export declare const UsersConversationsResponseChannelsList: S.Schema<UsersConversationsResponseChannelsList>;
|
|
172
145
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
173
146
|
export type UsersConversationsResponseResponseMetadata = ListUsersResponseResponseMetadata;
|
|
174
|
-
export declare const UsersConversationsResponseResponseMetadata: S.Schema<ListUsersResponseResponseMetadata>;
|
|
175
147
|
export interface UsersConversationsResponse {
|
|
176
148
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
177
149
|
ok: boolean;
|
|
@@ -179,68 +151,62 @@ export interface UsersConversationsResponse {
|
|
|
179
151
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
180
152
|
response_metadata?: ListUsersResponseResponseMetadata;
|
|
181
153
|
}
|
|
182
|
-
export declare const UsersConversationsResponse: S.Schema<UsersConversationsResponse>;
|
|
183
154
|
export interface UsersIdentityRequest {
|
|
184
155
|
}
|
|
185
|
-
export declare const UsersIdentityRequest: S.Schema<UsersIdentityRequest>;
|
|
186
156
|
export interface UsersIdentityResponse {
|
|
187
157
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
188
158
|
ok: boolean;
|
|
189
159
|
}
|
|
190
|
-
export declare const UsersIdentityResponse: S.Schema<UsersIdentityResponse>;
|
|
191
160
|
export interface UsersInfoRequest {
|
|
192
161
|
/** Set this to `true` to receive the locale for this user. Defaults to `false` */
|
|
193
162
|
include_locale?: boolean;
|
|
194
163
|
/** User to get info on */
|
|
195
164
|
user?: string;
|
|
196
165
|
}
|
|
197
|
-
export declare const UsersInfoRequest: S.Schema<UsersInfoRequest>;
|
|
198
166
|
export type UsersInfoResponseUsersList = Array<unknown>;
|
|
199
|
-
export declare const UsersInfoResponseUsersList: S.Schema<UsersInfoResponseUsersList>;
|
|
200
167
|
export interface UsersInfoResponse {
|
|
201
168
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
202
169
|
ok: boolean;
|
|
203
170
|
user?: unknown;
|
|
204
171
|
users?: UsersInfoResponseUsersList;
|
|
205
172
|
}
|
|
206
|
-
export declare const UsersInfoResponse: S.Schema<UsersInfoResponse>;
|
|
207
173
|
export type DeletePhotoError = SlackOpError;
|
|
208
|
-
/** Delete the user profile photo Required scopes
|
|
174
|
+
/** 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 */
|
|
209
175
|
export declare const deletePhoto: API.OperationMethod<DeletePhotoRequest, DeletePhotoResponse, DeletePhotoError, SlackOpContext>;
|
|
210
176
|
export type GetPresenceError = SlackOpError;
|
|
211
|
-
/** Gets user presence information. Required scopes
|
|
177
|
+
/** Gets user presence information. Required scopes -- bot: `users:read`; user: `users:read` Rate limit tier: 3 See https://docs.slack.dev/reference/methods/users.getPresence */
|
|
212
178
|
export declare const getPresence: API.OperationMethod<GetPresenceRequest, GetPresenceResponse, GetPresenceError, SlackOpContext>;
|
|
213
179
|
export type GetProfileError = SlackOpError;
|
|
214
|
-
/** Retrieve a user's profile information, including their custom status. Required scopes
|
|
180
|
+
/** Retrieve a user's profile information, including their custom status. Required scopes -- bot: `users.profile:read`; user: `users.profile:read` Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `user_not_found` -- Value passed for `user` was invalid. - `token_revoked` -- The token being used is not valid. - `ratelimited` -- You are attempting to call this method too frequently. See https://docs.slack.dev/reference/methods/users.profile.get */
|
|
215
181
|
export declare const getProfile: API.OperationMethod<GetProfileRequest, GetProfileResponse, GetProfileError, SlackOpContext>;
|
|
216
182
|
export type ListUsersError = SlackOpError;
|
|
217
|
-
/** Lists all users in a Slack team. Required scopes
|
|
183
|
+
/** Lists all users in a Slack team. Required scopes -- bot: `users:read`; user: `users:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `invalid_cursor` -- Value passed for `cursor` was not valid or is no longer valid. - `limit_required` -- For large teams a limit is required. - `missing_argument` -- A required argument is missing. See https://docs.slack.dev/reference/methods/users.list */
|
|
218
184
|
export declare const listUsers: API.PaginatedOperationMethod<ListUsersRequest, ListUsersResponse, ListUsersError, SlackOpContext, unknown>;
|
|
219
185
|
export type LookupByEmailError = SlackOpError;
|
|
220
|
-
/** Find a user with an email address. Required scopes
|
|
186
|
+
/** Find a user with an email address. Required scopes -- bot: `users:read.email`; user: `users:read.email` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `enterprise_is_restricted` -- This method was called with an inappropriate enterprise-level token. - `users_not_found` -- Value passed for `user` was invalid. See https://docs.slack.dev/reference/methods/users.lookupByEmail */
|
|
221
187
|
export declare const lookupByEmail: API.OperationMethod<LookupByEmailRequest, LookupByEmailResponse, LookupByEmailError, SlackOpContext>;
|
|
222
188
|
export type LookupDiscoverableContactError = SlackOpError;
|
|
223
|
-
/** Look up an email address to see if someone is discoverable on Slack Required scopes
|
|
189
|
+
/** Look up an email address to see if someone is discoverable on Slack Required scopes -- bot: `conversations.connect:manage`, `team:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `not_allowed` -- user is not allowed to call this API - `ratelimited` -- too many attempts - `invalid_arguments` -- Invalid arguments (including exceeding character count) - `restricted_action` -- user is restricted from calling this API - `not_an_enterprise` -- The token does not belong to an enterprise. See https://docs.slack.dev/reference/methods/users.discoverableContacts.lookup */
|
|
224
190
|
export declare const lookupDiscoverableContact: API.OperationMethod<LookupDiscoverableContactRequest, LookupDiscoverableContactResponse, LookupDiscoverableContactError, SlackOpContext>;
|
|
225
191
|
export type SetActiveError = SlackOpError;
|
|
226
|
-
/** Marked a user as active. Deprecated and non-functional. Required scopes
|
|
192
|
+
/** Marked a user as active. Deprecated and non-functional. Required scopes -- bot: `users:write`; user: `users:write` Rate limit tier: 2 See https://docs.slack.dev/reference/methods/users.setActive */
|
|
227
193
|
export declare const setActive: API.OperationMethod<SetActiveRequest, SetActiveResponse, SetActiveError, SlackOpContext>;
|
|
228
194
|
export type SetPhotoError = SlackOpError;
|
|
229
|
-
/** Set the user profile photo Required scopes
|
|
195
|
+
/** Set the user profile photo Required scopes -- user: `users.profile:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `bad_image` -- The uploaded image could not be processed - try passing a JPEG, GIF or PNG - `internal_error` -- An unexpected error occurred. - `too_large` -- The uploaded image had excessive dimensions - `too_many_frames` -- An animated GIF with too many frames was uploaded See https://docs.slack.dev/reference/methods/users.setPhoto */
|
|
230
196
|
export declare const setPhoto: API.OperationMethod<SetPhotoRequest, SetPhotoResponse, SetPhotoError, SlackOpContext>;
|
|
231
197
|
export type SetPresenceError = SlackOpError;
|
|
232
|
-
/** Manually sets user presence. Required scopes
|
|
198
|
+
/** Manually sets user presence. Required scopes -- bot: `users:write`; user: `users:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `invalid_presence` -- Value passed for `presence` was invalid. See https://docs.slack.dev/reference/methods/users.setPresence */
|
|
233
199
|
export declare const setPresence: API.OperationMethod<SetPresenceRequest, SetPresenceResponse, SetPresenceError, SlackOpContext>;
|
|
234
200
|
export type SetProfileError = SlackOpError;
|
|
235
|
-
/** Set a user's profile information, including custom status. Required scopes
|
|
201
|
+
/** Set a user's profile information, including custom status. Required scopes -- user: `users.profile:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `cannot_update_admin_user` -- Only a primary owner can update the profile of an admin. - `email_taken` -- email taken - `invalid_profile` -- Profile object passed in is not valid JSON (make sure it is URL encoded!). - `must_clear_both_status_text_and_status_emoji` -- Clearing the status requires setting both `status_text` and `status_emoji` to ''. - `name_not_allowed` -- name cannot contain URL. - `not_admin` -- Only admins can update the profile of another user. Some fields, like `email` may only be updated by an admin. - `not_app_admin` -- Only team owners and selected members can update the profile of a bot user. - `partial_profile_set_failed` -- Failed to set user profile. - `profile_set_failed` -- Failed to set user profile. - `reserved_name` -- First or last name are reserved. - `sudo_required` -- Request requires sudo session. - `too_long` -- You attempted to set a custom status but it was longer than the maximum allowed, 100. - `permission_denied` -- Permission denied. - `username_same` -- Username is the same as the current username. - `invalid_emoji_not_allowed` -- Invalid emoji not allowed. - `invalid_ooo_message` -- Invalid Out of Office message. - `invalid_starts_with_at` -- Name cannot start with @. See https://docs.slack.dev/reference/methods/users.profile.set */
|
|
236
202
|
export declare const setProfile: API.OperationMethod<SetProfileRequest, SetProfileResponse, SetProfileError, SlackOpContext>;
|
|
237
203
|
export type UsersConversationsError = SlackOpError;
|
|
238
|
-
/** List conversations the calling user is a member of. Required scopes
|
|
204
|
+
/** List conversations the calling user is a member of. Required scopes -- bot: `groups:read`, `im:read`, `mpim:read`, `channels:read`; user: `groups:read`, `im:read`, `mpim:read`, `channels:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `invalid_cursor` -- Value passed for `cursor` was not valid or is no longer valid. - `invalid_limit` -- Value passed for `limit` is not understood. - `invalid_types` -- Value passed for `type` could not be used based on the method's capabilities or the permission scopes granted to the used token. - `method_not_supported_for_channel_type` -- This type of conversation cannot be used with this method. - `missing_argument` -- A required argument is missing. - `missing_scope` -- The calling token is not granted the necessary scopes to complete this operation. See https://docs.slack.dev/reference/methods/users.conversations */
|
|
239
205
|
export declare const usersConversations: API.PaginatedOperationMethod<UsersConversationsRequest, UsersConversationsResponse, UsersConversationsError, SlackOpContext, unknown>;
|
|
240
206
|
export type UsersIdentityError = SlackOpError;
|
|
241
|
-
/** Get a user's identity. Required scopes
|
|
207
|
+
/** Get a user's identity. Required scopes -- user: `identity:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `internal_error` -- Internal error - `invalid_user_id` -- Invalid user id provided - `email_not_verified` -- user email has not been verified See https://docs.slack.dev/reference/methods/users.identity */
|
|
242
208
|
export declare const usersIdentity: API.OperationMethod<UsersIdentityRequest, UsersIdentityResponse, UsersIdentityError, SlackOpContext>;
|
|
243
209
|
export type UsersInfoError = SlackOpError;
|
|
244
|
-
/** Gets information about a user. Required scopes
|
|
210
|
+
/** Gets information about a user. Required scopes -- bot: `users:read`; user: `users:read` Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `too_many_users` -- Too many users. - `user_not_found` -- Value passed for `user` was invalid. - `user_not_visible` -- The requested user is not visible to the calling user See https://docs.slack.dev/reference/methods/users.info */
|
|
245
211
|
export declare const usersInfo: API.OperationMethod<UsersInfoRequest, UsersInfoResponse, UsersInfoError, SlackOpContext>;
|
|
246
212
|
//# sourceMappingURL=users.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/services/users.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/services/users.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAMjD,OAAO,EAAiB,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAMvF,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;AAE7C,MAAM,WAAW,kBAAkB;CAAG;AACtC,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,EAAE,EAAE,OAAO,CAAC;CACb;AACD,MAAM,WAAW,kBAAkB;IACjC,iEAAiE;IACjE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AACD,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,EAAE,EAAE,OAAO,CA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
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.js";
|
|
5
6
|
import { slackPaginate } from "../pagination.js";
|
|
6
7
|
import { SlackProtocol } from "../protocol.js";
|
|
7
8
|
import * as Retry from "../retry.js";
|
|
8
9
|
import * as T from "../traits.js";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
})).
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}).pipe(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
})).
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}).pipe(
|
|
39
|
-
|
|
40
|
-
export const
|
|
41
|
-
|
|
42
|
-
})).
|
|
43
|
-
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}).pipe(T.Http({ method: "POST", uri: "/users.discoverableContacts.lookup", code: 200 }))).annotate({
|
|
62
|
-
identifier: "LookupDiscoverableContactRequest",
|
|
63
|
-
});
|
|
64
|
-
export const LookupDiscoverableContactResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
65
|
-
ok: S.Boolean,
|
|
66
|
-
is_discoverable: S.Boolean,
|
|
67
|
-
})).annotate({
|
|
68
|
-
identifier: "LookupDiscoverableContactResponse",
|
|
69
|
-
});
|
|
70
|
-
export const SetActiveRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "POST", uri: "/users.setActive", code: 200 }))).annotate({ identifier: "SetActiveRequest" });
|
|
71
|
-
export const SetActiveResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
72
|
-
ok: S.Boolean,
|
|
73
|
-
})).annotate({ identifier: "SetActiveResponse" });
|
|
74
|
-
export const SetPhotoRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
75
|
-
crop_w: S.optional(S.String),
|
|
76
|
-
crop_x: S.optional(S.String),
|
|
77
|
-
crop_y: S.optional(S.String),
|
|
78
|
-
image: S.optional(S.Unknown),
|
|
79
|
-
}).pipe(T.Http({ method: "POST", uri: "/users.setPhoto", code: 200, contentType: "form-urlencoded" }))).annotate({ identifier: "SetPhotoRequest" });
|
|
80
|
-
export const SetPhotoResponseProfileMap = /*@__PURE__*/ S.Record(S.String, S.Unknown);
|
|
81
|
-
export const SetPhotoResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
82
|
-
ok: S.Boolean,
|
|
83
|
-
profile: SetPhotoResponseProfileMap,
|
|
84
|
-
})).annotate({ identifier: "SetPhotoResponse" });
|
|
85
|
-
export const SetPresenceRequestPresence = S.String;
|
|
86
|
-
export const SetPresenceRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
87
|
-
presence: SetPresenceRequestPresence,
|
|
88
|
-
}).pipe(T.Http({ method: "POST", uri: "/users.setPresence", code: 200 }))).annotate({ identifier: "SetPresenceRequest" });
|
|
89
|
-
export const SetPresenceResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
90
|
-
ok: S.Boolean,
|
|
91
|
-
})).annotate({ identifier: "SetPresenceResponse" });
|
|
92
|
-
export const SetProfileRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
93
|
-
name: S.optional(S.String),
|
|
94
|
-
profile: S.optional(S.String),
|
|
95
|
-
user: S.optional(S.String),
|
|
96
|
-
value: S.optional(S.String),
|
|
97
|
-
}).pipe(T.Http({ method: "POST", uri: "/users.profile.set", code: 200 }))).annotate({ identifier: "SetProfileRequest" });
|
|
98
|
-
export const SetProfileResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
99
|
-
ok: S.Boolean,
|
|
100
|
-
username: S.String,
|
|
101
|
-
profile: S.Unknown,
|
|
102
|
-
email_pending: S.optional(S.String),
|
|
103
|
-
})).annotate({ identifier: "SetProfileResponse" });
|
|
104
|
-
export const UsersConversationsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
105
|
-
cursor: S.optional(S.String.pipe(T.Query())),
|
|
106
|
-
exclude_archived: S.optional(S.Boolean.pipe(T.Query())),
|
|
107
|
-
exclude_muted: S.optional(S.Boolean.pipe(T.Query())),
|
|
108
|
-
limit: S.optional(S.Number.pipe(T.Query())),
|
|
109
|
-
team_id: S.optional(S.String.pipe(T.Query())),
|
|
110
|
-
types: S.optional(S.String.pipe(T.Query())),
|
|
111
|
-
user: S.optional(S.String.pipe(T.Query())),
|
|
112
|
-
}).pipe(T.Http({ method: "GET", uri: "/users.conversations", code: 200 }))).annotate({
|
|
113
|
-
identifier: "UsersConversationsRequest",
|
|
114
|
-
});
|
|
115
|
-
export const UsersConversationsResponseChannelsList = /*@__PURE__*/ S.Array(S.Unknown);
|
|
116
|
-
export const UsersConversationsResponseResponseMetadata = ListUsersResponseResponseMetadata;
|
|
117
|
-
export const UsersConversationsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
118
|
-
ok: S.Boolean,
|
|
119
|
-
channels: UsersConversationsResponseChannelsList,
|
|
120
|
-
response_metadata: S.optional(ListUsersResponseResponseMetadata),
|
|
121
|
-
})).annotate({
|
|
122
|
-
identifier: "UsersConversationsResponse",
|
|
123
|
-
});
|
|
124
|
-
export const UsersIdentityRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "GET", uri: "/users.identity", code: 200 }))).annotate({ identifier: "UsersIdentityRequest" });
|
|
125
|
-
export const UsersIdentityResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
126
|
-
ok: S.Boolean,
|
|
127
|
-
})).annotate({ identifier: "UsersIdentityResponse" });
|
|
128
|
-
export const UsersInfoRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
129
|
-
include_locale: S.optional(S.Boolean.pipe(T.Query())),
|
|
130
|
-
user: S.optional(S.String.pipe(T.Query())),
|
|
131
|
-
}).pipe(T.Http({ method: "GET", uri: "/users.info", code: 200 }))).annotate({ identifier: "UsersInfoRequest" });
|
|
132
|
-
export const UsersInfoResponseUsersList = /*@__PURE__*/ S.Array(S.Unknown);
|
|
133
|
-
export const UsersInfoResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
134
|
-
ok: S.Boolean,
|
|
135
|
-
user: S.optional(S.Unknown),
|
|
136
|
-
users: S.optional(UsersInfoResponseUsersList),
|
|
137
|
-
})).annotate({ identifier: "UsersInfoResponse" });
|
|
138
|
-
/** 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 */
|
|
139
|
-
export const deletePhoto = /*@__PURE__*/ API.make(() => ({
|
|
140
|
-
input: DeletePhotoRequest,
|
|
141
|
-
output: DeletePhotoResponse,
|
|
142
|
-
errors: [SlackError, SlackRateLimited],
|
|
143
|
-
protocol: SlackProtocol,
|
|
144
|
-
retry: Retry.Retry,
|
|
145
|
-
}));
|
|
146
|
-
/** Gets user presence information. Required scopes — bot: `users:read`; user: `users:read` Rate limit tier: 3 See https://docs.slack.dev/reference/methods/users.getPresence */
|
|
147
|
-
export const getPresence = /*@__PURE__*/ API.make(() => ({
|
|
148
|
-
input: GetPresenceRequest,
|
|
149
|
-
output: GetPresenceResponse,
|
|
150
|
-
errors: [SlackError, SlackRateLimited],
|
|
151
|
-
protocol: SlackProtocol,
|
|
152
|
-
retry: Retry.Retry,
|
|
153
|
-
}));
|
|
154
|
-
/** Retrieve a user's profile information, including their custom status. Required scopes — bot: `users.profile:read`; user: `users.profile:read` Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `user_not_found` — Value passed for `user` was invalid. - `token_revoked` — The token being used is not valid. - `ratelimited` — You are attempting to call this method too frequently. See https://docs.slack.dev/reference/methods/users.profile.get */
|
|
155
|
-
export const getProfile = /*@__PURE__*/ API.make(() => ({
|
|
156
|
-
input: GetProfileRequest,
|
|
157
|
-
output: GetProfileResponse,
|
|
158
|
-
errors: [SlackError, SlackRateLimited],
|
|
159
|
-
protocol: SlackProtocol,
|
|
160
|
-
retry: Retry.Retry,
|
|
161
|
-
}));
|
|
162
|
-
/** Lists all users in a Slack team. Required scopes — bot: `users:read`; user: `users:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `invalid_cursor` — Value passed for `cursor` was not valid or is no longer valid. - `limit_required` — For large teams a limit is required. - `missing_argument` — A required argument is missing. See https://docs.slack.dev/reference/methods/users.list */
|
|
163
|
-
export const listUsers = /*@__PURE__*/ API.makePaginated(() => ({
|
|
164
|
-
input: ListUsersRequest,
|
|
165
|
-
output: ListUsersResponse,
|
|
166
|
-
errors: [SlackError, SlackRateLimited],
|
|
167
|
-
protocol: SlackProtocol,
|
|
168
|
-
retry: Retry.Retry,
|
|
169
|
-
pagination: {
|
|
170
|
-
mode: "cursor",
|
|
171
|
-
inputToken: "cursor",
|
|
172
|
-
outputToken: "response_metadata.next_cursor",
|
|
173
|
-
items: "members",
|
|
174
|
-
pageSize: "limit",
|
|
175
|
-
},
|
|
176
|
-
}), slackPaginate);
|
|
177
|
-
/** Find a user with an email address. Required scopes — bot: `users:read.email`; user: `users:read.email` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `enterprise_is_restricted` — This method was called with an inappropriate enterprise-level token. - `users_not_found` — Value passed for `user` was invalid. See https://docs.slack.dev/reference/methods/users.lookupByEmail */
|
|
178
|
-
export const lookupByEmail = /*@__PURE__*/ API.make(() => ({
|
|
179
|
-
input: LookupByEmailRequest,
|
|
180
|
-
output: LookupByEmailResponse,
|
|
181
|
-
errors: [SlackError, SlackRateLimited],
|
|
182
|
-
protocol: SlackProtocol,
|
|
183
|
-
retry: Retry.Retry,
|
|
184
|
-
}));
|
|
185
|
-
/** Look up an email address to see if someone is discoverable on Slack Required scopes — bot: `conversations.connect:manage`, `team:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `not_allowed` — user is not allowed to call this API - `ratelimited` — too many attempts - `invalid_arguments` — Invalid arguments (including exceeding character count) - `restricted_action` — user is restricted from calling this API - `not_an_enterprise` — The token does not belong to an enterprise. See https://docs.slack.dev/reference/methods/users.discoverableContacts.lookup */
|
|
186
|
-
export const lookupDiscoverableContact = /*@__PURE__*/ API.make(() => ({
|
|
187
|
-
input: LookupDiscoverableContactRequest,
|
|
188
|
-
output: LookupDiscoverableContactResponse,
|
|
189
|
-
errors: [SlackError, SlackRateLimited],
|
|
190
|
-
protocol: SlackProtocol,
|
|
191
|
-
retry: Retry.Retry,
|
|
192
|
-
}));
|
|
193
|
-
/** Marked a user as active. Deprecated and non-functional. Required scopes — bot: `users:write`; user: `users:write` Rate limit tier: 2 See https://docs.slack.dev/reference/methods/users.setActive */
|
|
194
|
-
export const setActive = /*@__PURE__*/ API.make(() => ({
|
|
195
|
-
input: SetActiveRequest,
|
|
196
|
-
output: SetActiveResponse,
|
|
197
|
-
errors: [SlackError, SlackRateLimited],
|
|
198
|
-
protocol: SlackProtocol,
|
|
199
|
-
retry: Retry.Retry,
|
|
200
|
-
}));
|
|
201
|
-
/** Set the user profile photo Required scopes — user: `users.profile:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `bad_image` — The uploaded image could not be processed - try passing a JPEG, GIF or PNG - `internal_error` — An unexpected error occurred. - `too_large` — The uploaded image had excessive dimensions - `too_many_frames` — An animated GIF with too many frames was uploaded See https://docs.slack.dev/reference/methods/users.setPhoto */
|
|
202
|
-
export const setPhoto = /*@__PURE__*/ API.make(() => ({
|
|
203
|
-
input: SetPhotoRequest,
|
|
204
|
-
output: SetPhotoResponse,
|
|
205
|
-
errors: [SlackError, SlackRateLimited],
|
|
206
|
-
protocol: SlackProtocol,
|
|
207
|
-
retry: Retry.Retry,
|
|
208
|
-
}));
|
|
209
|
-
/** Manually sets user presence. Required scopes — bot: `users:write`; user: `users:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `invalid_presence` — Value passed for `presence` was invalid. See https://docs.slack.dev/reference/methods/users.setPresence */
|
|
210
|
-
export const setPresence = /*@__PURE__*/ API.make(() => ({
|
|
211
|
-
input: SetPresenceRequest,
|
|
212
|
-
output: SetPresenceResponse,
|
|
213
|
-
errors: [SlackError, SlackRateLimited],
|
|
214
|
-
protocol: SlackProtocol,
|
|
215
|
-
retry: Retry.Retry,
|
|
216
|
-
}));
|
|
217
|
-
/** Set a user's profile information, including custom status. Required scopes — user: `users.profile:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `cannot_update_admin_user` — Only a primary owner can update the profile of an admin. - `email_taken` — email taken - `invalid_profile` — Profile object passed in is not valid JSON (make sure it is URL encoded!). - `must_clear_both_status_text_and_status_emoji` — Clearing the status requires setting both `status_text` and `status_emoji` to ''. - `name_not_allowed` — name cannot contain URL. - `not_admin` — Only admins can update the profile of another user. Some fields, like `email` may only be updated by an admin. - `not_app_admin` — Only team owners and selected members can update the profile of a bot user. - `partial_profile_set_failed` — Failed to set user profile. - `profile_set_failed` — Failed to set user profile. - `reserved_name` — First or last name are reserved. - `sudo_required` — Request requires sudo session. - `too_long` — You attempted to set a custom status but it was longer than the maximum allowed, 100. - `permission_denied` — Permission denied. - `username_same` — Username is the same as the current username. - `invalid_emoji_not_allowed` — Invalid emoji not allowed. - `invalid_ooo_message` — Invalid Out of Office message. - `invalid_starts_with_at` — Name cannot start with @. See https://docs.slack.dev/reference/methods/users.profile.set */
|
|
218
|
-
export const setProfile = /*@__PURE__*/ API.make(() => ({
|
|
219
|
-
input: SetProfileRequest,
|
|
220
|
-
output: SetProfileResponse,
|
|
221
|
-
errors: [SlackError, SlackRateLimited],
|
|
222
|
-
protocol: SlackProtocol,
|
|
223
|
-
retry: Retry.Retry,
|
|
224
|
-
}));
|
|
225
|
-
/** List conversations the calling user is a member of. Required scopes — bot: `groups:read`, `im:read`, `mpim:read`, `channels:read`; user: `groups:read`, `im:read`, `mpim:read`, `channels:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `invalid_cursor` — Value passed for `cursor` was not valid or is no longer valid. - `invalid_limit` — Value passed for `limit` is not understood. - `invalid_types` — Value passed for `type` could not be used based on the method's capabilities or the permission scopes granted to the used token. - `method_not_supported_for_channel_type` — This type of conversation cannot be used with this method. - `missing_argument` — A required argument is missing. - `missing_scope` — The calling token is not granted the necessary scopes to complete this operation. See https://docs.slack.dev/reference/methods/users.conversations */
|
|
226
|
-
export const usersConversations = /*@__PURE__*/ API.makePaginated(() => ({
|
|
227
|
-
input: UsersConversationsRequest,
|
|
228
|
-
output: UsersConversationsResponse,
|
|
229
|
-
errors: [SlackError, SlackRateLimited],
|
|
230
|
-
protocol: SlackProtocol,
|
|
231
|
-
retry: Retry.Retry,
|
|
232
|
-
pagination: {
|
|
233
|
-
mode: "cursor",
|
|
234
|
-
inputToken: "cursor",
|
|
235
|
-
outputToken: "response_metadata.next_cursor",
|
|
236
|
-
items: "channels",
|
|
237
|
-
pageSize: "limit",
|
|
238
|
-
},
|
|
239
|
-
}), slackPaginate);
|
|
240
|
-
/** Get a user's identity. Required scopes — user: `identity:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `internal_error` — Internal error - `invalid_user_id` — Invalid user id provided - `email_not_verified` — user email has not been verified See https://docs.slack.dev/reference/methods/users.identity */
|
|
241
|
-
export const usersIdentity = /*@__PURE__*/ API.make(() => ({
|
|
242
|
-
input: UsersIdentityRequest,
|
|
243
|
-
output: UsersIdentityResponse,
|
|
244
|
-
errors: [SlackError, SlackRateLimited],
|
|
245
|
-
protocol: SlackProtocol,
|
|
246
|
-
retry: Retry.Retry,
|
|
247
|
-
}));
|
|
248
|
-
/** Gets information about a user. Required scopes — bot: `users:read`; user: `users:read` Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `too_many_users` — Too many users. - `user_not_found` — Value passed for `user` was invalid. - `user_not_visible` — The requested user is not visible to the calling user See https://docs.slack.dev/reference/methods/users.info */
|
|
249
|
-
export const usersInfo = /*@__PURE__*/ API.make(() => ({
|
|
250
|
-
input: UsersInfoRequest,
|
|
251
|
-
output: UsersInfoResponse,
|
|
252
|
-
errors: [SlackError, SlackRateLimited],
|
|
253
|
-
protocol: SlackProtocol,
|
|
254
|
-
retry: Retry.Retry,
|
|
255
|
-
}));
|
|
256
|
-
//# sourceMappingURL=users.js.map
|
|
10
|
+
const __0 = __L.at;
|
|
11
|
+
const __1 = T.Http;
|
|
12
|
+
const __2 = S.Struct;
|
|
13
|
+
const __3 = S.suspend;
|
|
14
|
+
const __4 = S.Boolean;
|
|
15
|
+
const __5 = T.Query;
|
|
16
|
+
const __6 = S.String;
|
|
17
|
+
const __7 = S.optional;
|
|
18
|
+
const __8 = S.Number;
|
|
19
|
+
const __9 = S.Unknown;
|
|
20
|
+
const __10 = S.Array;
|
|
21
|
+
const __11 = S.Record;
|
|
22
|
+
|
|
23
|
+
export const deletePhoto = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#4:0,errors:[$5,$6],protocol:$7,retry:$8};$3(>2)@"DeletePhotoRequest";$2({}).pipe($1({method:"GET",uri:"/users.deletePhoto",code:200}))', [__0, __1, __2, __3, __d0, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(deletePhoto, i));
|
|
24
|
+
|
|
25
|
+
export const getPresence = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$9,$10],protocol:$11,retry:$12};$6(>3)@"GetPresenceRequest";$6(>4)@"GetPresenceResponse";$5({user:$4($3.pipe($2()))}).pipe($1({method:"GET",uri:"/users.getPresence",code:200}));$5({ok:$7,last_activity:$4($8),manual_away:$4($7),presence:$3,online:$4($7),connection_count:$4($8),auto_away:$4($7)})', [__0, __1, __5, __6, __7, __2, __3, __4, __8, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(getPresence, i));
|
|
26
|
+
|
|
27
|
+
export const getProfile = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$9,$10],protocol:$11,retry:$12};$7(>3)@"GetProfileRequest";$7(>4)@"GetProfileResponse";$6({include_labels:$4($3.pipe($2())),user:$4($5.pipe($2()))}).pipe($1({method:"GET",uri:"/users.profile.get",code:200}));$6({ok:$3,profile:$8})', [__0, __1, __5, __4, __7, __6, __2, __3, __9, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(getProfile, i));
|
|
28
|
+
|
|
29
|
+
export const listUsers = /*@__PURE__*/ API.opPaginated((i) => i === API.D ? API.named("cursor", '{input:#1,output:#2,errors:[$11,$12],protocol:$13,retry:$14,pagination:{mode:"%",inputToken:"%",outputToken:"response_metadata.next_%",items:"members",pageSize:"limit"},strategy:$15};$8(>3)@"ListUsersRequest";$8(>4)@"ListUsersResponse";$7({cursor:$4($3.pipe($2())),include_locale:$4($5.pipe($2())),limit:$4($6.pipe($2())),team_id:$4($3.pipe($2()))}).pipe($1({method:"GET",uri:"/users.list",code:200}));$7({ok:$5,members:#9:0,cache_ts:$6,response_metadata:$4(#10:0),offset:$4($3)})', [__0, __1, __5, __6, __7, __4, __8, __2, __3, __d2, __d1, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry, slackPaginate]) : API.call(listUsers, i));
|
|
30
|
+
|
|
31
|
+
export const lookupByEmail = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$8,$9],protocol:$10,retry:$11};$5(>3)@"LookupByEmailRequest";$5(>4)@"LookupByEmailResponse";$4({email:$3.pipe($2())}).pipe($1({method:"GET",uri:"/users.lookupByEmail",code:200}));$4({ok:$6,user:$7})', [__0, __1, __5, __6, __2, __3, __4, __9, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(lookupByEmail, i));
|
|
32
|
+
|
|
33
|
+
export const lookupDiscoverableContact = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$6,$7],protocol:$8,retry:$9};$4(>3)@"LookupDiscoverableContactRequest";$4(>4)@"LookupDiscoverableContactResponse";$3({email:$2}).pipe($1({method:"POST",uri:"/users.discoverableContacts.lookup",code:200}));$3({ok:$5,is_discoverable:$5})', [__0, __1, __6, __2, __3, __4, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(lookupDiscoverableContact, i));
|
|
34
|
+
|
|
35
|
+
export const setActive = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#4:0,errors:[$5,$6],protocol:$7,retry:$8};$3(>2)@"SetActiveRequest";$2({}).pipe($1({method:"POST",uri:"/users.setActive",code:200}))', [__0, __1, __2, __3, __d0, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(setActive, i));
|
|
36
|
+
|
|
37
|
+
export const setPhoto = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#3,errors:[$9,$10],protocol:$11,retry:$12};$6(>4)@"SetPhotoRequest";$7($2,$4);$6(>5)@"SetPhotoResponse";$5({crop_w:$3($2),crop_x:$3($2),crop_y:$3($2),image:$3($4)}).pipe($1({method:"POST",uri:"/users.setPhoto",code:200,contentType:"form-urlencoded"}));$5({ok:$8,profile:#2})', [__0, __1, __6, __7, __9, __2, __3, __11, __4, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(setPhoto, i));
|
|
38
|
+
|
|
39
|
+
export const setPresence = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#5:0,errors:[$6,$7],protocol:$8,retry:$9};$4(>2)@"SetPresenceRequest";$3({presence:$2}).pipe($1({method:"POST",uri:"/users.setPresence",code:200}))', [__0, __1, __6, __2, __3, __d0, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(setPresence, i));
|
|
40
|
+
|
|
41
|
+
export const setProfile = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$8,$9],protocol:$10,retry:$11};$5(>3)@"SetProfileRequest";$5(>4)@"SetProfileResponse";$4({name:$3($2),profile:$3($2),user:$3($2),value:$3($2)}).pipe($1({method:"POST",uri:"/users.profile.set",code:200}));$4({ok:$6,username:$2,profile:$7,email_pending:$3($2)})', [__0, __1, __6, __7, __2, __3, __4, __9, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(setProfile, i));
|
|
42
|
+
|
|
43
|
+
export const usersConversations = /*@__PURE__*/ API.opPaginated((i) => i === API.D ? API.named("cursor", '{input:#1,output:#2,errors:[$11,$12],protocol:$13,retry:$14,pagination:{mode:"%",inputToken:"%",outputToken:"response_metadata.next_%",items:"channels",pageSize:"limit"},strategy:$15};$8(>3)@"UsersConversationsRequest";$8(>4)@"UsersConversationsResponse";$7({cursor:$4($3.pipe($2())),exclude_archived:$4($5.pipe($2())),exclude_muted:$4($5.pipe($2())),limit:$4($6.pipe($2())),team_id:$4($3.pipe($2())),types:$4($3.pipe($2())),user:$4($3.pipe($2()))}).pipe($1({method:"GET",uri:"/users.conversations",code:200}));$7({ok:$5,channels:#9:0,response_metadata:$4(#10:0)})', [__0, __1, __5, __6, __7, __4, __8, __2, __3, __d2, __d1, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry, slackPaginate]) : API.call(usersConversations, i));
|
|
44
|
+
|
|
45
|
+
export const usersIdentity = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#4:0,errors:[$5,$6],protocol:$7,retry:$8};$3(>2)@"UsersIdentityRequest";$2({}).pipe($1({method:"GET",uri:"/users.identity",code:200}))', [__0, __1, __2, __3, __d0, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(usersIdentity, i));
|
|
46
|
+
|
|
47
|
+
export const usersInfo = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$10,$11],protocol:$12,retry:$13};$7(>3)@"UsersInfoRequest";$7(>4)@"UsersInfoResponse";$6({include_locale:$4($3.pipe($2())),user:$4($5.pipe($2()))}).pipe($1({method:"GET",uri:"/users.info",code:200}));$6({ok:$3,user:$4($8),users:$4(#9:0)})', [__0, __1, __5, __4, __7, __6, __2, __3, __9, __d2, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(usersInfo, i));
|
|
48
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
49
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
// Shared schema data (see `op` in core/api).
|
|
53
|
+
function __d0() {
|
|
54
|
+
return ['$3(>1)@"DeletePhotoResponse";$2({ok:$1})', [__0, __4, __2, __3]];
|
|
55
|
+
}
|
|
56
|
+
function __d1() {
|
|
57
|
+
return ['$4(>1)@"ListUsersResponseResponseMetadata";$3({next_cursor:$2($1)})', [__0, __6, __7, __2, __3]];
|
|
58
|
+
}
|
|
59
|
+
function __d2() {
|
|
60
|
+
return ['$2($1)', [__0, __9, __10]];
|
|
61
|
+
}
|