@distilled.cloud/slack 1.0.0-rc.15 → 1.0.0-rc.17
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/.lazy.json +1 -0
- package/lib/_bundle/lazy.js +4 -0
- package/lib/_bundle/sdk.js +2 -0
- package/lib/_bundle/sdk.js.map +1 -0
- package/lib/credentials.d.ts +1 -1
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +1 -53
- package/lib/errors.d.ts +31 -31
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -59
- package/lib/index.d.ts +1 -1
- package/lib/index.js +0 -10
- package/lib/index.lazy.js +7 -0
- package/lib/pagination.d.ts +2 -2
- package/lib/pagination.js +1 -31
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +1 -231
- package/lib/retry.d.ts +2 -2
- package/lib/retry.d.ts.map +1 -1
- package/lib/retry.js +1 -45
- package/lib/services/admin.d.ts +123 -575
- package/lib/services/admin.d.ts.map +1 -1
- package/lib/services/admin.js +141 -2884
- package/lib/services/admin.js.map +1 -1
- package/lib/services/agents.d.ts +13 -55
- package/lib/services/agents.d.ts.map +1 -1
- package/lib/services/agents.js +1 -314
- package/lib/services/agents.js.map +1 -1
- package/lib/services/api.d.ts +0 -4
- package/lib/services/api.d.ts.map +1 -1
- package/lib/services/api.js +1 -23
- package/lib/services/api.js.map +1 -1
- package/lib/services/apps.d.ts +25 -106
- package/lib/services/apps.d.ts.map +1 -1
- package/lib/services/apps.js +35 -515
- package/lib/services/apps.js.map +1 -1
- package/lib/services/assistant.d.ts +6 -40
- package/lib/services/assistant.d.ts.map +1 -1
- package/lib/services/assistant.js +1 -209
- package/lib/services/assistant.js.map +1 -1
- package/lib/services/auth.d.ts +4 -15
- package/lib/services/auth.d.ts.map +1 -1
- package/lib/services/auth.js +1 -96
- package/lib/services/auth.js.map +1 -1
- package/lib/services/blocks.d.ts +1 -7
- package/lib/services/blocks.d.ts.map +1 -1
- package/lib/services/blocks.js +1 -26
- package/lib/services/blocks.js.map +1 -1
- package/lib/services/bookmarks.d.ts +4 -15
- package/lib/services/bookmarks.d.ts.map +1 -1
- package/lib/services/bookmarks.js +1 -81
- package/lib/services/bookmarks.js.map +1 -1
- package/lib/services/bots.d.ts +1 -9
- package/lib/services/bots.d.ts.map +1 -1
- package/lib/services/bots.js +1 -59
- package/lib/services/bots.js.map +1 -1
- package/lib/services/calls.d.ts +6 -22
- package/lib/services/calls.d.ts.map +1 -1
- package/lib/services/calls.js +1 -115
- package/lib/services/calls.js.map +1 -1
- package/lib/services/canvases.d.ts +7 -35
- package/lib/services/canvases.d.ts.map +1 -1
- package/lib/services/canvases.js +1 -140
- package/lib/services/canvases.js.map +1 -1
- package/lib/services/chat.d.ts +14 -83
- package/lib/services/chat.d.ts.map +1 -1
- package/lib/services/chat.js +1 -387
- package/lib/services/chat.js.map +1 -1
- package/lib/services/conversations.d.ts +31 -116
- package/lib/services/conversations.d.ts.map +1 -1
- package/lib/services/conversations.js +40 -696
- package/lib/services/conversations.js.map +1 -1
- package/lib/services/dialog.d.ts +1 -4
- package/lib/services/dialog.d.ts.map +1 -1
- package/lib/services/dialog.js +1 -22
- package/lib/services/dialog.js.map +1 -1
- package/lib/services/dnd.d.ts +5 -17
- package/lib/services/dnd.d.ts.map +1 -1
- package/lib/services/dnd.js +1 -96
- package/lib/services/dnd.js.map +1 -1
- package/lib/services/emoji.d.ts +1 -8
- package/lib/services/emoji.d.ts.map +1 -1
- package/lib/services/emoji.js +1 -34
- package/lib/services/emoji.js.map +1 -1
- package/lib/services/entity.d.ts +4 -16
- package/lib/services/entity.d.ts.map +1 -1
- package/lib/services/entity.js +1 -76
- package/lib/services/entity.js.map +1 -1
- package/lib/services/files.d.ts +16 -80
- package/lib/services/files.d.ts.map +1 -1
- package/lib/services/files.js +1 -439
- package/lib/services/files.js.map +1 -1
- package/lib/services/functions.d.ts +8 -49
- package/lib/services/functions.d.ts.map +1 -1
- package/lib/services/functions.js +1 -208
- package/lib/services/functions.js.map +1 -1
- package/lib/services/index.js +0 -2
- package/lib/services/lists.d.ts +13 -55
- package/lib/services/lists.d.ts.map +1 -1
- package/lib/services/lists.js +1 -254
- package/lib/services/lists.js.map +1 -1
- package/lib/services/migration.d.ts +1 -7
- package/lib/services/migration.d.ts.map +1 -1
- package/lib/services/migration.js +1 -32
- package/lib/services/migration.js.map +1 -1
- package/lib/services/oauth.d.ts +7 -43
- package/lib/services/oauth.d.ts.map +1 -1
- package/lib/services/oauth.js +1 -294
- package/lib/services/oauth.js.map +1 -1
- package/lib/services/openid.d.ts +3 -10
- package/lib/services/openid.d.ts.map +1 -1
- package/lib/services/openid.js +1 -84
- package/lib/services/openid.js.map +1 -1
- package/lib/services/pins.d.ts +3 -13
- package/lib/services/pins.d.ts.map +1 -1
- package/lib/services/pins.js +1 -66
- package/lib/services/pins.js.map +1 -1
- package/lib/services/reactions.d.ts +5 -17
- package/lib/services/reactions.d.ts.map +1 -1
- package/lib/services/reactions.js +1 -102
- package/lib/services/reactions.js.map +1 -1
- package/lib/services/reminders.d.ts +5 -17
- package/lib/services/reminders.d.ts.map +1 -1
- package/lib/services/reminders.js +1 -88
- package/lib/services/reminders.js.map +1 -1
- package/lib/services/rtm.d.ts +2 -11
- package/lib/services/rtm.d.ts.map +1 -1
- package/lib/services/rtm.js +1 -61
- package/lib/services/rtm.js.map +1 -1
- package/lib/services/search.d.ts +4 -35
- package/lib/services/search.d.ts.map +1 -1
- package/lib/services/search.js +1 -172
- package/lib/services/search.js.map +1 -1
- package/lib/services/stars.d.ts +4 -26
- package/lib/services/stars.d.ts.map +1 -1
- package/lib/services/stars.js +1 -134
- package/lib/services/stars.js.map +1 -1
- package/lib/services/team.d.ts +11 -63
- package/lib/services/team.d.ts.map +1 -1
- package/lib/services/team.js +1 -295
- package/lib/services/team.js.map +1 -1
- package/lib/services/tooling.d.ts +2 -5
- package/lib/services/tooling.d.ts.map +1 -1
- package/lib/services/tooling.js +1 -33
- package/lib/services/tooling.js.map +1 -1
- package/lib/services/usergroups.d.ts +7 -31
- package/lib/services/usergroups.d.ts.map +1 -1
- package/lib/services/usergroups.js +1 -151
- package/lib/services/usergroups.js.map +1 -1
- package/lib/services/users.d.ts +14 -48
- package/lib/services/users.d.ts.map +1 -1
- package/lib/services/users.js +1 -255
- package/lib/services/users.js.map +1 -1
- package/lib/services/views.d.ts +4 -14
- package/lib/services/views.d.ts.map +1 -1
- package/lib/services/views.js +1 -78
- package/lib/services/views.js.map +1 -1
- package/lib/services/workflows.d.ts +8 -51
- package/lib/services/workflows.d.ts.map +1 -1
- package/lib/services/workflows.js +1 -193
- package/lib/services/workflows.js.map +1 -1
- package/lib/services.lazy/admin.js +3 -0
- package/lib/services.lazy/agents.js +1 -0
- package/lib/services.lazy/api.js +1 -0
- package/lib/services.lazy/apps.js +3 -0
- package/lib/services.lazy/assistant.js +1 -0
- package/lib/services.lazy/auth.js +1 -0
- package/lib/services.lazy/blocks.js +1 -0
- package/lib/services.lazy/bookmarks.js +1 -0
- package/lib/services.lazy/bots.js +1 -0
- package/lib/services.lazy/calls.js +1 -0
- package/lib/services.lazy/canvases.js +1 -0
- package/lib/services.lazy/chat.js +1 -0
- package/lib/services.lazy/conversations.js +3 -0
- package/lib/services.lazy/dialog.js +1 -0
- package/lib/services.lazy/dnd.js +1 -0
- package/lib/services.lazy/emoji.js +1 -0
- package/lib/services.lazy/entity.js +1 -0
- package/lib/services.lazy/files.js +1 -0
- package/lib/services.lazy/functions.js +1 -0
- package/lib/services.lazy/index.js +3 -0
- package/lib/services.lazy/lists.js +1 -0
- package/lib/services.lazy/migration.js +1 -0
- package/lib/services.lazy/oauth.js +1 -0
- package/lib/services.lazy/openid.js +1 -0
- package/lib/services.lazy/pins.js +1 -0
- package/lib/services.lazy/reactions.js +1 -0
- package/lib/services.lazy/reminders.js +1 -0
- package/lib/services.lazy/rtm.js +1 -0
- package/lib/services.lazy/search.js +1 -0
- package/lib/services.lazy/stars.js +1 -0
- package/lib/services.lazy/team.js +1 -0
- package/lib/services.lazy/tooling.js +1 -0
- package/lib/services.lazy/usergroups.js +1 -0
- package/lib/services.lazy/users.js +1 -0
- package/lib/services.lazy/views.js +1 -0
- package/lib/services.lazy/workflows.js +1 -0
- package/lib/traits.d.ts +1 -1
- package/lib/traits.js +1 -12
- package/package.json +10 -8
- 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/credentials.js.map +0 -1
- package/lib/errors.js.map +0 -1
- package/lib/pagination.js.map +0 -1
- package/lib/protocol.js.map +0 -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/retry.js.map +0 -1
- package/lib/services/index.js.map +0 -1
- package/lib/traits.js.map +0 -1
- package/src/protocol.test.ts +0 -372
- /package/lib/{index.js.map → index.lazy.js.map} +0 -0
|
@@ -1,13 +1,10 @@
|
|
|
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
|
/** A comma separated string of encoded channel IDs for which the User Group uses as a default. */
|
|
6
5
|
export type CreateUsergroupRequestChannelsList = Array<string>;
|
|
7
|
-
export declare const CreateUsergroupRequestChannelsList: S.Schema<CreateUsergroupRequestChannelsList>;
|
|
8
6
|
/** A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too. */
|
|
9
7
|
export type CreateUsergroupRequestAdditionalChannelsList = Array<string>;
|
|
10
|
-
export declare const CreateUsergroupRequestAdditionalChannelsList: S.Schema<CreateUsergroupRequestAdditionalChannelsList>;
|
|
11
8
|
export interface CreateUsergroupRequest {
|
|
12
9
|
/** A comma separated string of encoded channel IDs for which the User Group uses as a default. */
|
|
13
10
|
channels?: CreateUsergroupRequestChannelsList;
|
|
@@ -26,13 +23,11 @@ export interface CreateUsergroupRequest {
|
|
|
26
23
|
/** Configure this user group to show as a sidebar section for all group members. Note: Only relevant if group has 1 or more default channels added. */
|
|
27
24
|
enable_section?: boolean;
|
|
28
25
|
}
|
|
29
|
-
export declare const CreateUsergroupRequest: S.Schema<CreateUsergroupRequest>;
|
|
30
26
|
export interface CreateUsergroupResponse {
|
|
31
27
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
32
28
|
ok: boolean;
|
|
33
29
|
usergroup: unknown;
|
|
34
30
|
}
|
|
35
|
-
export declare const CreateUsergroupResponse: S.Schema<CreateUsergroupResponse>;
|
|
36
31
|
export interface DisableUsergroupRequest {
|
|
37
32
|
/** Include the number of users in the User Group. */
|
|
38
33
|
include_count?: boolean;
|
|
@@ -41,13 +36,11 @@ export interface DisableUsergroupRequest {
|
|
|
41
36
|
/** The encoded ID of the User Group to disable. */
|
|
42
37
|
usergroup: string;
|
|
43
38
|
}
|
|
44
|
-
export declare const DisableUsergroupRequest: S.Schema<DisableUsergroupRequest>;
|
|
45
39
|
export interface DisableUsergroupResponse {
|
|
46
40
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
47
41
|
ok: boolean;
|
|
48
42
|
usergroup: unknown;
|
|
49
43
|
}
|
|
50
|
-
export declare const DisableUsergroupResponse: S.Schema<DisableUsergroupResponse>;
|
|
51
44
|
export interface EnableUsergroupRequest {
|
|
52
45
|
/** Include the number of users in the User Group. */
|
|
53
46
|
include_count?: boolean;
|
|
@@ -56,13 +49,11 @@ export interface EnableUsergroupRequest {
|
|
|
56
49
|
/** The encoded ID of the User Group to enable. */
|
|
57
50
|
usergroup: string;
|
|
58
51
|
}
|
|
59
|
-
export declare const EnableUsergroupRequest: S.Schema<EnableUsergroupRequest>;
|
|
60
52
|
export interface EnableUsergroupResponse {
|
|
61
53
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
62
54
|
ok: boolean;
|
|
63
55
|
usergroup: unknown;
|
|
64
56
|
}
|
|
65
|
-
export declare const EnableUsergroupResponse: S.Schema<EnableUsergroupResponse>;
|
|
66
57
|
export interface ListUsergroupsRequest {
|
|
67
58
|
/** Include the number of users in each User Group. */
|
|
68
59
|
include_count?: boolean;
|
|
@@ -73,15 +64,12 @@ export interface ListUsergroupsRequest {
|
|
|
73
64
|
/** The user group's encoded team ID. Required if org token is used. */
|
|
74
65
|
team_id?: string;
|
|
75
66
|
}
|
|
76
|
-
export declare const ListUsergroupsRequest: S.Schema<ListUsergroupsRequest>;
|
|
77
67
|
export type ListUsergroupsResponseUsergroupsList = Array<unknown>;
|
|
78
|
-
export declare const ListUsergroupsResponseUsergroupsList: S.Schema<ListUsergroupsResponseUsergroupsList>;
|
|
79
68
|
export interface ListUsergroupsResponse {
|
|
80
69
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
81
70
|
ok: boolean;
|
|
82
71
|
usergroups: ListUsergroupsResponseUsergroupsList;
|
|
83
72
|
}
|
|
84
|
-
export declare const ListUsergroupsResponse: S.Schema<ListUsergroupsResponse>;
|
|
85
73
|
export interface ListUsersRequest {
|
|
86
74
|
/** Include results for disabled User Groups. */
|
|
87
75
|
include_disabled?: boolean;
|
|
@@ -90,21 +78,16 @@ export interface ListUsersRequest {
|
|
|
90
78
|
/** The user group's encoded team ID. Required if org token is used. */
|
|
91
79
|
team_id?: string;
|
|
92
80
|
}
|
|
93
|
-
export declare const ListUsersRequest: S.Schema<ListUsersRequest>;
|
|
94
81
|
export type ListUsersResponseUsersList = Array<unknown>;
|
|
95
|
-
export declare const ListUsersResponseUsersList: S.Schema<ListUsersResponseUsersList>;
|
|
96
82
|
export interface ListUsersResponse {
|
|
97
83
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
98
84
|
ok: boolean;
|
|
99
85
|
users: ListUsersResponseUsersList;
|
|
100
86
|
}
|
|
101
|
-
export declare const ListUsersResponse: S.Schema<ListUsersResponse>;
|
|
102
87
|
/** A comma separated string of encoded user IDs that represent the entire list of users for the user group. */
|
|
103
88
|
export type UpdateUserRequestUsersList = Array<string>;
|
|
104
|
-
export declare const UpdateUserRequestUsersList: S.Schema<UpdateUserRequestUsersList>;
|
|
105
89
|
/** A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too. */
|
|
106
90
|
export type UpdateUserRequestAdditionalChannelsList = Array<string>;
|
|
107
|
-
export declare const UpdateUserRequestAdditionalChannelsList: S.Schema<UpdateUserRequestAdditionalChannelsList>;
|
|
108
91
|
export interface UpdateUserRequest {
|
|
109
92
|
/** Include the number of users in the user group. */
|
|
110
93
|
include_count?: boolean;
|
|
@@ -119,19 +102,15 @@ export interface UpdateUserRequest {
|
|
|
119
102
|
/** Boolean to identify if the API is getting called when a shared section is getting shared */
|
|
120
103
|
is_shared?: boolean;
|
|
121
104
|
}
|
|
122
|
-
export declare const UpdateUserRequest: S.Schema<UpdateUserRequest>;
|
|
123
105
|
export interface UpdateUserResponse {
|
|
124
106
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
125
107
|
ok: boolean;
|
|
126
108
|
usergroup: unknown;
|
|
127
109
|
}
|
|
128
|
-
export declare const UpdateUserResponse: S.Schema<UpdateUserResponse>;
|
|
129
110
|
/** A comma separated string of encoded channel IDs for which the User Group uses as a default. */
|
|
130
111
|
export type UpdateUsergroupRequestChannelsList = Array<string>;
|
|
131
|
-
export declare const UpdateUsergroupRequestChannelsList: S.Schema<UpdateUsergroupRequestChannelsList>;
|
|
132
112
|
/** A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too. */
|
|
133
113
|
export type UpdateUsergroupRequestAdditionalChannelsList = Array<string>;
|
|
134
|
-
export declare const UpdateUsergroupRequestAdditionalChannelsList: S.Schema<UpdateUsergroupRequestAdditionalChannelsList>;
|
|
135
114
|
export interface UpdateUsergroupRequest {
|
|
136
115
|
/** A comma separated string of encoded channel IDs for which the User Group uses as a default. */
|
|
137
116
|
channels?: UpdateUsergroupRequestChannelsList;
|
|
@@ -152,10 +131,8 @@ export interface UpdateUsergroupRequest {
|
|
|
152
131
|
/** Configure this user group to show as a sidebar section for all group members. Note: Only relevant if group has 1 or more default channels added. */
|
|
153
132
|
enable_section?: boolean;
|
|
154
133
|
}
|
|
155
|
-
export declare const UpdateUsergroupRequest: S.Schema<UpdateUsergroupRequest>;
|
|
156
134
|
/** List of user IDs who would exceed their channel limit */
|
|
157
135
|
export type UpdateUsergroupResponseChannelLimitUserIdsList = Array<string>;
|
|
158
|
-
export declare const UpdateUsergroupResponseChannelLimitUserIdsList: S.Schema<UpdateUsergroupResponseChannelLimitUserIdsList>;
|
|
159
136
|
export interface UpdateUsergroupResponse {
|
|
160
137
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
161
138
|
ok: boolean;
|
|
@@ -163,26 +140,25 @@ export interface UpdateUsergroupResponse {
|
|
|
163
140
|
/** List of user IDs who would exceed their channel limit */
|
|
164
141
|
channel_limit_user_ids?: UpdateUsergroupResponseChannelLimitUserIdsList;
|
|
165
142
|
}
|
|
166
|
-
export declare const UpdateUsergroupResponse: S.Schema<UpdateUsergroupResponse>;
|
|
167
143
|
export type CreateUsergroupError = SlackOpError;
|
|
168
|
-
/** Create a User Group. Required scopes
|
|
144
|
+
/** 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 */
|
|
169
145
|
export declare const createUsergroup: API.OperationMethod<CreateUsergroupRequest, CreateUsergroupResponse, CreateUsergroupError, SlackOpContext>;
|
|
170
146
|
export type DisableUsergroupError = SlackOpError;
|
|
171
|
-
/** Disable an existing User Group. Required scopes
|
|
147
|
+
/** Disable 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. - `permission_denied` -- The user does not have permission to disable the 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.disable */
|
|
172
148
|
export declare const disableUsergroup: API.OperationMethod<DisableUsergroupRequest, DisableUsergroupResponse, DisableUsergroupError, SlackOpContext>;
|
|
173
149
|
export type EnableUsergroupError = SlackOpError;
|
|
174
|
-
/** Enable a User Group. Required scopes
|
|
150
|
+
/** Enable a 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. - `permission_denied` -- The user does not have permission to enables the 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. See https://docs.slack.dev/reference/methods/usergroups.enable */
|
|
175
151
|
export declare const enableUsergroup: API.OperationMethod<EnableUsergroupRequest, EnableUsergroupResponse, EnableUsergroupError, SlackOpContext>;
|
|
176
152
|
export type ListUsergroupsError = SlackOpError;
|
|
177
|
-
/** List all User Groups for a team. Required scopes
|
|
153
|
+
/** List all User Groups for a team. Required scopes -- bot: `usergroups:read`; user: `usergroups:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `missing_argument` -- A required argument is missing. - `plan_upgrade_required` -- This workspace does not have access to User Groups, as that feature is only available on Standard and above plans. - `invalid_cursor` -- Value passed for `cursor` was not valid or is no longer valid. - `users_not_found` -- Cannot find users on subteam. - `invalid_team` -- Cannot find subteam team. See https://docs.slack.dev/reference/methods/usergroups.list */
|
|
178
154
|
export declare const listUsergroups: API.OperationMethod<ListUsergroupsRequest, ListUsergroupsResponse, ListUsergroupsError, SlackOpContext>;
|
|
179
155
|
export type ListUsersError = SlackOpError;
|
|
180
|
-
/** List all users in a User Group. Required scopes
|
|
156
|
+
/** List all users in a User Group. Required scopes -- bot: `usergroups:read`; user: `usergroups:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `no_such_subteam` -- No usergroup found with the given ID. - `plan_upgrade_required` -- This workspace does not have access to User Groups, as that feature is only available on Standard and above plans. - `invalid_cursor` -- Value passed for `cursor` was not valid or is no longer valid. See https://docs.slack.dev/reference/methods/usergroups.users.list */
|
|
181
157
|
export declare const listUsers: API.OperationMethod<ListUsersRequest, ListUsersResponse, ListUsersError, SlackOpContext>;
|
|
182
158
|
export type UpdateUserError = SlackOpError;
|
|
183
|
-
/** Update the list of users for a user group. Required scopes
|
|
159
|
+
/** 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 */
|
|
184
160
|
export declare const updateUser: API.OperationMethod<UpdateUserRequest, UpdateUserResponse, UpdateUserError, SlackOpContext>;
|
|
185
161
|
export type UpdateUsergroupError = SlackOpError;
|
|
186
|
-
/** Update an existing User Group. Required scopes
|
|
162
|
+
/** 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 */
|
|
187
163
|
export declare const updateUsergroup: API.OperationMethod<UpdateUsergroupRequest, UpdateUsergroupResponse, UpdateUsergroupError, SlackOpContext>;
|
|
188
164
|
//# sourceMappingURL=usergroups.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usergroups.d.ts","sourceRoot":"","sources":["../../src/services/usergroups.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"usergroups.d.ts","sourceRoot":"","sources":["../../src/services/usergroups.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAKjD,OAAO,EAAiB,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAMvF,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;AAE7C,kGAAkG;AAClG,MAAM,MAAM,kCAAkC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAC/D,qHAAqH;AACrH,MAAM,MAAM,4CAA4C,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AACzE,MAAM,WAAW,sBAAsB;IACrC,kGAAkG;IAClG,QAAQ,CAAC,EAAE,kCAAkC,CAAC;IAC9C,qHAAqH;IACrH,mBAAmB,CAAC,EAAE,4CAA4C,CAAC;IACnE,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAC;IACb,6FAA6F;IAC7F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uJAAuJ;IACvJ,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AACD,MAAM,WAAW,uBAAuB;IACtC,kEAAkE;IAClE,EAAE,EAAE,OAAO,CAAC;IACZ,SAAS,EA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B,EACjB,cAAc,EACd,cAAc,CAOb,CAAC;AAEJ,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC;AAC3C,kkCAAkkC;AAClkC,eAAO,MAAM,UAAU,EAAE,GAAG,CAAC,eAAe,CAC1C,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,cAAc,CAOb,CAAC;AAEJ,MAAM,MAAM,oBAAoB,GAAG,YAAY,CAAC;AAChD,iwBAAiwB;AACjwB,eAAO,MAAM,eAAe,EAAE,GAAG,CAAC,eAAe,CAC/C,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,cAAc,CAOb,CAAC"}
|
|
@@ -1,152 +1,2 @@
|
|
|
1
|
-
import
|
|
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";
|
|
4
|
-
import { SlackError, SlackRateLimited } from "../errors.js";
|
|
5
|
-
import { SlackProtocol } from "../protocol.js";
|
|
6
|
-
import * as Retry from "../retry.js";
|
|
7
|
-
import * as T from "../traits.js";
|
|
8
|
-
export const CreateUsergroupRequestChannelsList = /*@__PURE__*/ S.Array(S.String);
|
|
9
|
-
export const CreateUsergroupRequestAdditionalChannelsList = /*@__PURE__*/ S.Array(S.String);
|
|
10
|
-
export const CreateUsergroupRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
11
|
-
channels: S.optional(CreateUsergroupRequestChannelsList),
|
|
12
|
-
additional_channels: S.optional(CreateUsergroupRequestAdditionalChannelsList),
|
|
13
|
-
description: S.optional(S.String),
|
|
14
|
-
handle: S.optional(S.String),
|
|
15
|
-
include_count: S.optional(S.Boolean),
|
|
16
|
-
name: S.String,
|
|
17
|
-
team_id: S.optional(S.String),
|
|
18
|
-
enable_section: S.optional(S.Boolean),
|
|
19
|
-
}).pipe(T.Http({ method: "POST", uri: "/usergroups.create", code: 200 }))).annotate({ identifier: "CreateUsergroupRequest" });
|
|
20
|
-
export const CreateUsergroupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
21
|
-
ok: S.Boolean,
|
|
22
|
-
usergroup: S.Unknown,
|
|
23
|
-
})).annotate({ identifier: "CreateUsergroupResponse" });
|
|
24
|
-
export const DisableUsergroupRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
25
|
-
include_count: S.optional(S.Boolean),
|
|
26
|
-
team_id: S.optional(S.String),
|
|
27
|
-
usergroup: S.String,
|
|
28
|
-
}).pipe(T.Http({ method: "POST", uri: "/usergroups.disable", code: 200 }))).annotate({ identifier: "DisableUsergroupRequest" });
|
|
29
|
-
export const DisableUsergroupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
30
|
-
ok: S.Boolean,
|
|
31
|
-
usergroup: S.Unknown,
|
|
32
|
-
})).annotate({ identifier: "DisableUsergroupResponse" });
|
|
33
|
-
export const EnableUsergroupRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
34
|
-
include_count: S.optional(S.Boolean),
|
|
35
|
-
team_id: S.optional(S.String),
|
|
36
|
-
usergroup: S.String,
|
|
37
|
-
}).pipe(T.Http({ method: "POST", uri: "/usergroups.enable", code: 200 }))).annotate({ identifier: "EnableUsergroupRequest" });
|
|
38
|
-
export const EnableUsergroupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
39
|
-
ok: S.Boolean,
|
|
40
|
-
usergroup: S.Unknown,
|
|
41
|
-
})).annotate({ identifier: "EnableUsergroupResponse" });
|
|
42
|
-
export const ListUsergroupsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
43
|
-
include_count: S.optional(S.Boolean.pipe(T.Query())),
|
|
44
|
-
include_disabled: S.optional(S.Boolean.pipe(T.Query())),
|
|
45
|
-
include_users: S.optional(S.Boolean.pipe(T.Query())),
|
|
46
|
-
team_id: S.optional(S.String.pipe(T.Query())),
|
|
47
|
-
}).pipe(T.Http({ method: "GET", uri: "/usergroups.list", code: 200 }))).annotate({ identifier: "ListUsergroupsRequest" });
|
|
48
|
-
export const ListUsergroupsResponseUsergroupsList = /*@__PURE__*/ S.Array(S.Unknown);
|
|
49
|
-
export const ListUsergroupsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
50
|
-
ok: S.Boolean,
|
|
51
|
-
usergroups: ListUsergroupsResponseUsergroupsList,
|
|
52
|
-
})).annotate({ identifier: "ListUsergroupsResponse" });
|
|
53
|
-
export const ListUsersRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
54
|
-
include_disabled: S.optional(S.Boolean.pipe(T.Query())),
|
|
55
|
-
usergroup: S.String.pipe(T.Query()),
|
|
56
|
-
team_id: S.optional(S.String.pipe(T.Query())),
|
|
57
|
-
}).pipe(T.Http({ method: "GET", uri: "/usergroups.users.list", code: 200 }))).annotate({ identifier: "ListUsersRequest" });
|
|
58
|
-
export const ListUsersResponseUsersList = /*@__PURE__*/ S.Array(S.Unknown);
|
|
59
|
-
export const ListUsersResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
60
|
-
ok: S.Boolean,
|
|
61
|
-
users: ListUsersResponseUsersList,
|
|
62
|
-
})).annotate({ identifier: "ListUsersResponse" });
|
|
63
|
-
export const UpdateUserRequestUsersList = /*@__PURE__*/ S.Array(S.String);
|
|
64
|
-
export const UpdateUserRequestAdditionalChannelsList = /*@__PURE__*/ S.Array(S.String);
|
|
65
|
-
export const UpdateUserRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
66
|
-
include_count: S.optional(S.Boolean),
|
|
67
|
-
team_id: S.optional(S.String),
|
|
68
|
-
usergroup: S.String,
|
|
69
|
-
users: UpdateUserRequestUsersList,
|
|
70
|
-
additional_channels: S.optional(UpdateUserRequestAdditionalChannelsList),
|
|
71
|
-
is_shared: S.optional(S.Boolean),
|
|
72
|
-
}).pipe(T.Http({ method: "POST", uri: "/usergroups.users.update", code: 200 }))).annotate({ identifier: "UpdateUserRequest" });
|
|
73
|
-
export const UpdateUserResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
74
|
-
ok: S.Boolean,
|
|
75
|
-
usergroup: S.Unknown,
|
|
76
|
-
})).annotate({ identifier: "UpdateUserResponse" });
|
|
77
|
-
export const UpdateUsergroupRequestChannelsList = /*@__PURE__*/ S.Array(S.String);
|
|
78
|
-
export const UpdateUsergroupRequestAdditionalChannelsList = /*@__PURE__*/ S.Array(S.String);
|
|
79
|
-
export const UpdateUsergroupRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
80
|
-
channels: S.optional(UpdateUsergroupRequestChannelsList),
|
|
81
|
-
additional_channels: S.optional(UpdateUsergroupRequestAdditionalChannelsList),
|
|
82
|
-
description: S.optional(S.String),
|
|
83
|
-
handle: S.optional(S.String),
|
|
84
|
-
include_count: S.optional(S.Boolean),
|
|
85
|
-
name: S.optional(S.String),
|
|
86
|
-
team_id: S.optional(S.String),
|
|
87
|
-
usergroup: S.String,
|
|
88
|
-
enable_section: S.optional(S.Boolean),
|
|
89
|
-
}).pipe(T.Http({ method: "POST", uri: "/usergroups.update", code: 200 }))).annotate({ identifier: "UpdateUsergroupRequest" });
|
|
90
|
-
export const UpdateUsergroupResponseChannelLimitUserIdsList = /*@__PURE__*/ S.Array(S.String);
|
|
91
|
-
export const UpdateUsergroupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
92
|
-
ok: S.Boolean,
|
|
93
|
-
usergroup: S.Unknown,
|
|
94
|
-
channel_limit_user_ids: S.optional(UpdateUsergroupResponseChannelLimitUserIdsList),
|
|
95
|
-
})).annotate({ identifier: "UpdateUsergroupResponse" });
|
|
96
|
-
/** 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 */
|
|
97
|
-
export const createUsergroup = /*@__PURE__*/ API.make(() => ({
|
|
98
|
-
input: CreateUsergroupRequest,
|
|
99
|
-
output: CreateUsergroupResponse,
|
|
100
|
-
errors: [SlackError, SlackRateLimited],
|
|
101
|
-
protocol: SlackProtocol,
|
|
102
|
-
retry: Retry.Retry,
|
|
103
|
-
}));
|
|
104
|
-
/** Disable 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. - `permission_denied` — The user does not have permission to disable the 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.disable */
|
|
105
|
-
export const disableUsergroup = /*@__PURE__*/ API.make(() => ({
|
|
106
|
-
input: DisableUsergroupRequest,
|
|
107
|
-
output: DisableUsergroupResponse,
|
|
108
|
-
errors: [SlackError, SlackRateLimited],
|
|
109
|
-
protocol: SlackProtocol,
|
|
110
|
-
retry: Retry.Retry,
|
|
111
|
-
}));
|
|
112
|
-
/** Enable a 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. - `permission_denied` — The user does not have permission to enables the 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. See https://docs.slack.dev/reference/methods/usergroups.enable */
|
|
113
|
-
export const enableUsergroup = /*@__PURE__*/ API.make(() => ({
|
|
114
|
-
input: EnableUsergroupRequest,
|
|
115
|
-
output: EnableUsergroupResponse,
|
|
116
|
-
errors: [SlackError, SlackRateLimited],
|
|
117
|
-
protocol: SlackProtocol,
|
|
118
|
-
retry: Retry.Retry,
|
|
119
|
-
}));
|
|
120
|
-
/** List all User Groups for a team. Required scopes — bot: `usergroups:read`; user: `usergroups:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `missing_argument` — A required argument is missing. - `plan_upgrade_required` — This workspace does not have access to User Groups, as that feature is only available on Standard and above plans. - `invalid_cursor` — Value passed for `cursor` was not valid or is no longer valid. - `users_not_found` — Cannot find users on subteam. - `invalid_team` — Cannot find subteam team. See https://docs.slack.dev/reference/methods/usergroups.list */
|
|
121
|
-
export const listUsergroups = /*@__PURE__*/ API.make(() => ({
|
|
122
|
-
input: ListUsergroupsRequest,
|
|
123
|
-
output: ListUsergroupsResponse,
|
|
124
|
-
errors: [SlackError, SlackRateLimited],
|
|
125
|
-
protocol: SlackProtocol,
|
|
126
|
-
retry: Retry.Retry,
|
|
127
|
-
}));
|
|
128
|
-
/** List all users in a User Group. Required scopes — bot: `usergroups:read`; user: `usergroups:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `no_such_subteam` — No usergroup found with the given ID. - `plan_upgrade_required` — This workspace does not have access to User Groups, as that feature is only available on Standard and above plans. - `invalid_cursor` — Value passed for `cursor` was not valid or is no longer valid. See https://docs.slack.dev/reference/methods/usergroups.users.list */
|
|
129
|
-
export const listUsers = /*@__PURE__*/ API.make(() => ({
|
|
130
|
-
input: ListUsersRequest,
|
|
131
|
-
output: ListUsersResponse,
|
|
132
|
-
errors: [SlackError, SlackRateLimited],
|
|
133
|
-
protocol: SlackProtocol,
|
|
134
|
-
retry: Retry.Retry,
|
|
135
|
-
}));
|
|
136
|
-
/** 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 */
|
|
137
|
-
export const updateUser = /*@__PURE__*/ API.make(() => ({
|
|
138
|
-
input: UpdateUserRequest,
|
|
139
|
-
output: UpdateUserResponse,
|
|
140
|
-
errors: [SlackError, SlackRateLimited],
|
|
141
|
-
protocol: SlackProtocol,
|
|
142
|
-
retry: Retry.Retry,
|
|
143
|
-
}));
|
|
144
|
-
/** 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 */
|
|
145
|
-
export const updateUsergroup = /*@__PURE__*/ API.make(() => ({
|
|
146
|
-
input: UpdateUsergroupRequest,
|
|
147
|
-
output: UpdateUsergroupResponse,
|
|
148
|
-
errors: [SlackError, SlackRateLimited],
|
|
149
|
-
protocol: SlackProtocol,
|
|
150
|
-
retry: Retry.Retry,
|
|
151
|
-
}));
|
|
1
|
+
import{c as e,d as t,errors$SlackError as n,errors$SlackRateLimited as r,f as i,h as a,l as o,n as s,o as c,p as l,protocol$SlackProtocol as u,retry$Retry as d,s as f,t as p,traits$Http as m,traits$Query as h,u as g}from"../_bundle/sdk.js";const _=/*@__PURE__*/ a(e=>e===i?[`{input:#1,output:#8:0,errors:[$9,$10],protocol:$11,retry:$12};$7(>2)@"CreateUsergroupRequest";$6({channels:$3(#2:0),additional_channels:$3(#2:0),description:$3($4),handle:$3($4),include_count:$3($5),name:$4,team_id:$3($4),enable_section:$3($5)}).pipe($1({method:"POST",uri:"/usergroups.create",code:200}))`,[o,m,__d1,g,c,s,f,t,__d0,n,r,u,d]]:l(_,e));const v=/*@__PURE__*/ a(e=>e===i?[`{input:#1,output:#7:0,errors:[$8,$9],protocol:$10,retry:$11};$6(>2)@"DisableUsergroupRequest";$5({include_count:$3($2),team_id:$3($4),usergroup:$4}).pipe($1({method:"POST",uri:"/usergroups.disable",code:200}))`,[o,m,s,g,c,f,t,__d0,n,r,u,d]]:l(v,e));const y=/*@__PURE__*/ a(e=>e===i?[`{input:#1,output:#7:0,errors:[$8,$9],protocol:$10,retry:$11};$6(>2)@"EnableUsergroupRequest";$5({include_count:$3($2),team_id:$3($4),usergroup:$4}).pipe($1({method:"POST",uri:"/usergroups.enable",code:200}))`,[o,m,s,g,c,f,t,__d0,n,r,u,d]]:l(y,e));const b=/*@__PURE__*/ a(e=>e===i?[`{input:#1,output:#2,errors:[$9,$10],protocol:$11,retry:$12};$7(>3)@"ListUsergroupsRequest";$7(>4)@"ListUsergroupsResponse";$6({include_count:$4($3.pipe($2())),include_disabled:$4($3.pipe($2())),include_users:$4($3.pipe($2())),team_id:$4($5.pipe($2()))}).pipe($1({method:"GET",uri:"/usergroups.list",code:200}));$6({ok:$3,usergroups:#8:0})`,[o,m,h,s,g,c,f,t,__d2,n,r,u,d]]:l(b,e));const x=/*@__PURE__*/ a(e=>e===i?[`{input:#1,output:#2,errors:[$9,$10],protocol:$11,retry:$12};$7(>3)@"ListUsersRequest";$7(>4)@"ListUsersResponse";$6({include_disabled:$4($3.pipe($2())),usergroup:$5.pipe($2()),team_id:$4($5.pipe($2()))}).pipe($1({method:"GET",uri:"/usergroups.users.list",code:200}));$6({ok:$3,users:#8:0})`,[o,m,h,s,g,c,f,t,__d2,n,r,u,d]]:l(x,e));const S=/*@__PURE__*/ a(e=>e===i?[`{input:#1,output:#8:0,errors:[$9,$10],protocol:$11,retry:$12};$7(>2)@"UpdateUserRequest";$6({include_count:$3($2),team_id:$3($4),usergroup:$4,users:#5:0,additional_channels:$3(#5:0),is_shared:$3($2)}).pipe($1({method:"POST",uri:"/usergroups.users.update",code:200}))`,[o,m,s,g,c,__d1,f,t,__d0,n,r,u,d]]:l(S,e));const C=/*@__PURE__*/ a(a=>a===i?[`{input:#1,output:#2,errors:[$9,$10],protocol:$11,retry:$12};$7(>3)@"UpdateUsergroupRequest";$7(>4)@"UpdateUsergroupResponse";$6({channels:$3(#2:0),additional_channels:$3(#2:0),description:$3($4),handle:$3($4),include_count:$3($5),name:$3($4),team_id:$3($4),usergroup:$4,enable_section:$3($5)}).pipe($1({method:"POST",uri:"/usergroups.update",code:200}));$6({ok:$5,usergroup:$8,channel_limit_user_ids:$3(#2:0)})`,[o,m,__d1,g,c,s,f,t,e,n,r,u,d]]:l(C,a));function __d0(){return[`$4(>1)@"CreateUsergroupResponse";$3({ok:$1,usergroup:$2})`,[o,s,e,f,t]]}function __d1(){return[`$2($1)`,[o,c,p]]}function __d2(){return[`$2($1)`,[o,e,p]]}export{_ as createUsergroup,v as disableUsergroup,y as enableUsergroup,b as listUsergroups,x as listUsers,S as updateUser,C as updateUsergroup};
|
|
152
2
|
//# sourceMappingURL=usergroups.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usergroups.js","
|
|
1
|
+
{"version":3,"file":"usergroups.js","names":["API.D","__L.at","T.Http","S.optional","S.String","S.Boolean","S.Struct","S.suspend","Retry.Retry","API.call","T.Query","S.Unknown","S.Array","Unknown","suspend","SlackError","SlackRateLimited","D","op","at","Boolean","String","call","SlackProtocol","Retry","Struct","Array","Http","Query","optional","createUsergroup","i","disableUsergroup","enableUsergroup","listUsergroups","listUsers","updateUser","updateUsergroup"],"sources":["../../src/services/usergroups.ts"],"mappings":"gPAwJA,MAAa8B,EAKK,gBAAQ,GAAgBC,IAAM/B,EAAQ,CAAC,oTAAqT,CAACC,EAAQC,EAAQ,KAAMC,EAAYC,EAAUC,EAAWC,EAAUC,EAAW,KAAMQ,EAAYC,EAAkBO,EAAef,CAAW,CAAC,EAAIC,EAASqB,EAAiBC,CAAC,CAAC,EAI1hB,MAAaC,EAKK,gBAAQ,GAAgBD,IAAM/B,EAAQ,CAAC,oNAAqN,CAACC,EAAQC,EAAQG,EAAWF,EAAYC,EAAUE,EAAUC,EAAW,KAAMQ,EAAYC,EAAkBO,EAAef,CAAW,CAAC,EAAIC,EAASuB,EAAkBD,CAAC,CAAC,EAIrb,MAAaE,EAKK,gBAAQ,GAAgBF,IAAM/B,EAAQ,CAAC,kNAAmN,CAACC,EAAQC,EAAQG,EAAWF,EAAYC,EAAUE,EAAUC,EAAW,KAAMQ,EAAYC,EAAkBO,EAAef,CAAW,CAAC,EAAIC,EAASwB,EAAiBF,CAAC,CAAC,EAIlb,MAAaG,EAKK,gBAAQ,GAAgBH,IAAM/B,EAAQ,CAAC,qVAAsV,CAACC,EAAQC,EAAQQ,EAASL,EAAWF,EAAYC,EAAUE,EAAUC,EAAW,KAAMQ,EAAYC,EAAkBO,EAAef,CAAW,CAAC,EAAIC,EAASyB,EAAgBH,CAAC,CAAC,EAI7jB,MAAaI,EAKK,gBAAQ,GAAgBJ,IAAM/B,EAAQ,CAAC,oSAAqS,CAACC,EAAQC,EAAQQ,EAASL,EAAWF,EAAYC,EAAUE,EAAUC,EAAW,KAAMQ,EAAYC,EAAkBO,EAAef,CAAW,CAAC,EAAIC,EAAS0B,EAAWJ,CAAC,CAAC,EAIvgB,MAAaK,EAKK,gBAAQ,GAAgBL,IAAM/B,EAAQ,CAAC,6QAA8Q,CAACC,EAAQC,EAAQG,EAAWF,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