@distilled.cloud/slack 1.0.0-rc.15 → 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/stars.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
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 AddStarRequest {
|
|
@@ -12,12 +11,10 @@ export interface AddStarRequest {
|
|
|
12
11
|
/** Timestamp of the message to add star to. */
|
|
13
12
|
timestamp?: string;
|
|
14
13
|
}
|
|
15
|
-
export declare const AddStarRequest: S.Schema<AddStarRequest>;
|
|
16
14
|
export interface AddStarResponse {
|
|
17
15
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
18
16
|
ok: boolean;
|
|
19
17
|
}
|
|
20
|
-
export declare const AddStarResponse: S.Schema<AddStarResponse>;
|
|
21
18
|
export interface ListStarsRequest {
|
|
22
19
|
count?: number;
|
|
23
20
|
/** Parameter for pagination. Set `cursor` equal to the `next_cursor` attribute returned by the previous request's `response_metadata`. This parameter is optional, but pagination is mandatory: the default value simply fetches the first "page" of the collection. See [pagination](/apis/web-api/pagination) for more details. */
|
|
@@ -28,67 +25,51 @@ export interface ListStarsRequest {
|
|
|
28
25
|
/** encoded team id to list stars in, required if org token is used */
|
|
29
26
|
team_id?: string;
|
|
30
27
|
}
|
|
31
|
-
export declare const ListStarsRequest: S.Schema<ListStarsRequest>;
|
|
32
28
|
export type ListStarsResponseItemsItemCase0Type = "message";
|
|
33
|
-
export declare const ListStarsResponseItemsItemCase0Type: any;
|
|
34
29
|
export interface ListStarsResponseItemsItemCase0 {
|
|
35
30
|
type: ListStarsResponseItemsItemCase0Type;
|
|
36
31
|
channel: string;
|
|
37
32
|
message: unknown;
|
|
38
33
|
date_create: number;
|
|
39
34
|
}
|
|
40
|
-
export declare const ListStarsResponseItemsItemCase0: S.Schema<ListStarsResponseItemsItemCase0>;
|
|
41
35
|
export type ListStarsResponseItemsItemCase1Type = "file";
|
|
42
|
-
export declare const ListStarsResponseItemsItemCase1Type: any;
|
|
43
36
|
export interface ListStarsResponseItemsItemCase1 {
|
|
44
37
|
type: ListStarsResponseItemsItemCase1Type;
|
|
45
38
|
file: unknown;
|
|
46
39
|
date_create: number;
|
|
47
40
|
}
|
|
48
|
-
export declare const ListStarsResponseItemsItemCase1: S.Schema<ListStarsResponseItemsItemCase1>;
|
|
49
41
|
export type ListStarsResponseItemsItemCase2Type = "file_comment";
|
|
50
|
-
export declare const ListStarsResponseItemsItemCase2Type: any;
|
|
51
42
|
export interface ListStarsResponseItemsItemCase2 {
|
|
52
43
|
type: ListStarsResponseItemsItemCase2Type;
|
|
53
44
|
file: unknown;
|
|
54
45
|
comment: unknown;
|
|
55
46
|
date_create: number;
|
|
56
47
|
}
|
|
57
|
-
export declare const ListStarsResponseItemsItemCase2: S.Schema<ListStarsResponseItemsItemCase2>;
|
|
58
48
|
export type ListStarsResponseItemsItemCase3Type = "channel";
|
|
59
|
-
export declare const ListStarsResponseItemsItemCase3Type: any;
|
|
60
49
|
export interface ListStarsResponseItemsItemCase3 {
|
|
61
50
|
type: ListStarsResponseItemsItemCase3Type;
|
|
62
51
|
channel: string;
|
|
63
52
|
date_create: number;
|
|
64
53
|
}
|
|
65
|
-
export declare const ListStarsResponseItemsItemCase3: S.Schema<ListStarsResponseItemsItemCase3>;
|
|
66
54
|
export type ListStarsResponseItemsItemCase4Type = "im";
|
|
67
|
-
export declare const ListStarsResponseItemsItemCase4Type: any;
|
|
68
55
|
export interface ListStarsResponseItemsItemCase4 {
|
|
69
56
|
type: ListStarsResponseItemsItemCase4Type;
|
|
70
57
|
channel: string;
|
|
71
58
|
date_create: number;
|
|
72
59
|
}
|
|
73
|
-
export declare const ListStarsResponseItemsItemCase4: S.Schema<ListStarsResponseItemsItemCase4>;
|
|
74
60
|
export type ListStarsResponseItemsItemCase5Type = "group";
|
|
75
|
-
export declare const ListStarsResponseItemsItemCase5Type: any;
|
|
76
61
|
export interface ListStarsResponseItemsItemCase5 {
|
|
77
62
|
type: ListStarsResponseItemsItemCase5Type;
|
|
78
63
|
channel: string;
|
|
79
64
|
date_create: number;
|
|
80
65
|
}
|
|
81
|
-
export declare const ListStarsResponseItemsItemCase5: S.Schema<ListStarsResponseItemsItemCase5>;
|
|
82
66
|
export type ListStarsResponseItemsItem = ListStarsResponseItemsItemCase0 | ListStarsResponseItemsItemCase1 | ListStarsResponseItemsItemCase2 | ListStarsResponseItemsItemCase3 | ListStarsResponseItemsItemCase4 | ListStarsResponseItemsItemCase5;
|
|
83
|
-
export declare const ListStarsResponseItemsItem: any;
|
|
84
67
|
export type ListStarsResponseItemsList = Array<ListStarsResponseItemsItem>;
|
|
85
|
-
export declare const ListStarsResponseItemsList: S.Schema<ListStarsResponseItemsList>;
|
|
86
68
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
87
69
|
export interface ListStarsResponseResponseMetadata {
|
|
88
|
-
/** Cursor for the next page
|
|
70
|
+
/** Cursor for the next page -- pass as `cursor` on the next call. */
|
|
89
71
|
next_cursor?: string;
|
|
90
72
|
}
|
|
91
|
-
export declare const ListStarsResponseResponseMetadata: S.Schema<ListStarsResponseResponseMetadata>;
|
|
92
73
|
export interface ListStarsResponse {
|
|
93
74
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
94
75
|
ok: boolean;
|
|
@@ -97,7 +78,6 @@ export interface ListStarsResponse {
|
|
|
97
78
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
98
79
|
response_metadata?: ListStarsResponseResponseMetadata;
|
|
99
80
|
}
|
|
100
|
-
export declare const ListStarsResponse: S.Schema<ListStarsResponse>;
|
|
101
81
|
export interface RemoveStarRequest {
|
|
102
82
|
/** Channel to remove star from, or channel where the message to remove star from was posted (used with `timestamp`). */
|
|
103
83
|
channel?: string;
|
|
@@ -108,19 +88,17 @@ export interface RemoveStarRequest {
|
|
|
108
88
|
/** Timestamp of the message to remove star from. */
|
|
109
89
|
timestamp?: string;
|
|
110
90
|
}
|
|
111
|
-
export declare const RemoveStarRequest: S.Schema<RemoveStarRequest>;
|
|
112
91
|
export interface RemoveStarResponse {
|
|
113
92
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
114
93
|
ok: boolean;
|
|
115
94
|
}
|
|
116
|
-
export declare const RemoveStarResponse: S.Schema<RemoveStarResponse>;
|
|
117
95
|
export type AddStarError = SlackOpError;
|
|
118
|
-
/** Save an item for later. Formerly known as adding a star. Required scopes
|
|
96
|
+
/** Save an item for later. Formerly known as adding a star. Required scopes -- user: `stars:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `already_starred` -- The specified item has already been starred by the authenticated user. - `bad_timestamp` -- Value passed for `timestamp` was invalid. - `channel_not_found` -- Channel, private group, or DM specified by `channel` does not exist - `external_channel_migrating` -- Channel is undergoing active migration - `file_comment_not_found` -- File comment specified by `file_comment` does not exist. - `file_not_found` -- File specified by `file` does not exist. - `message_not_found` -- Message specified by `channel` and `timestamp` does not exist. - `no_item_specified` -- `file`, `file_comment`, `channel` and `timestamp` was not specified. See https://docs.slack.dev/reference/methods/stars.add */
|
|
119
97
|
export declare const addStar: API.OperationMethod<AddStarRequest, AddStarResponse, AddStarError, SlackOpContext>;
|
|
120
98
|
export type ListStarsError = SlackOpError;
|
|
121
|
-
/** (Deprecated) Listed a user's saved items, formerly known as stars. Required scopes
|
|
99
|
+
/** (Deprecated) Listed a user's saved items, formerly known as stars. Required scopes -- user: `stars:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `missing_argument` -- A required argument is missing. See https://docs.slack.dev/reference/methods/stars.list */
|
|
122
100
|
export declare const listStars: API.PaginatedOperationMethod<ListStarsRequest, ListStarsResponse, ListStarsError, SlackOpContext, ListStarsResponseItemsItem>;
|
|
123
101
|
export type RemoveStarError = SlackOpError;
|
|
124
|
-
/** Removes a saved item (star) from an item. Required scopes
|
|
102
|
+
/** Removes a saved item (star) from an item. Required scopes -- user: `stars:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `bad_timestamp` -- Value passed for `timestamp` was invalid. - `channel_not_found` -- Channel, private group, or DM specified by `channel` does not exist - `file_comment_not_found` -- File comment specified by `file_comment` does not exist. - `file_not_found` -- File specified by `file` does not exist. - `message_not_found` -- Message specified by `channel` and `timestamp` does not exist. - `no_item_specified` -- `file`, `file_comment`, `channel` and `timestamp` was not specified. - `not_starred` -- The specified item is not currently starred by the authenticated user. See https://docs.slack.dev/reference/methods/stars.remove */
|
|
125
103
|
export declare const removeStar: API.OperationMethod<RemoveStarRequest, RemoveStarResponse, RemoveStarError, SlackOpContext>;
|
|
126
104
|
//# sourceMappingURL=stars.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stars.d.ts","sourceRoot":"","sources":["../../src/services/stars.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"stars.d.ts","sourceRoot":"","sources":["../../src/services/stars.ts"],"names":[],"mappings":"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"}
|
package/lib/services/stars.js
CHANGED
|
@@ -1,135 +1,35 @@
|
|
|
1
1
|
import * as API from "@distilled.cloud/core/api";
|
|
2
2
|
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
|
|
3
|
-
import * as S from "@distilled.cloud/core/schema";
|
|
3
|
+
import * as S from "@distilled.cloud/core/schema-lite";
|
|
4
|
+
import * as __L from "@distilled.cloud/core/schema-lite";
|
|
4
5
|
import { SlackError, SlackRateLimited } from "../errors.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
|
-
}).pipe(
|
|
25
|
-
|
|
26
|
-
export const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
export const ListStarsResponseItemsItemCase1 = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
36
|
-
type: ListStarsResponseItemsItemCase1Type,
|
|
37
|
-
file: S.Unknown,
|
|
38
|
-
date_create: S.Number,
|
|
39
|
-
})).annotate({
|
|
40
|
-
identifier: "ListStarsResponseItemsItemCase1",
|
|
41
|
-
});
|
|
42
|
-
export const ListStarsResponseItemsItemCase2Type = S.String;
|
|
43
|
-
export const ListStarsResponseItemsItemCase2 = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
44
|
-
type: ListStarsResponseItemsItemCase2Type,
|
|
45
|
-
file: S.Unknown,
|
|
46
|
-
comment: S.Unknown,
|
|
47
|
-
date_create: S.Number,
|
|
48
|
-
})).annotate({
|
|
49
|
-
identifier: "ListStarsResponseItemsItemCase2",
|
|
50
|
-
});
|
|
51
|
-
export const ListStarsResponseItemsItemCase3Type = S.String;
|
|
52
|
-
export const ListStarsResponseItemsItemCase3 = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
53
|
-
type: ListStarsResponseItemsItemCase3Type,
|
|
54
|
-
channel: S.String,
|
|
55
|
-
date_create: S.Number,
|
|
56
|
-
})).annotate({
|
|
57
|
-
identifier: "ListStarsResponseItemsItemCase3",
|
|
58
|
-
});
|
|
59
|
-
export const ListStarsResponseItemsItemCase4Type = S.String;
|
|
60
|
-
export const ListStarsResponseItemsItemCase4 = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
61
|
-
type: ListStarsResponseItemsItemCase4Type,
|
|
62
|
-
channel: S.String,
|
|
63
|
-
date_create: S.Number,
|
|
64
|
-
})).annotate({
|
|
65
|
-
identifier: "ListStarsResponseItemsItemCase4",
|
|
66
|
-
});
|
|
67
|
-
export const ListStarsResponseItemsItemCase5Type = S.String;
|
|
68
|
-
export const ListStarsResponseItemsItemCase5 = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
69
|
-
type: ListStarsResponseItemsItemCase5Type,
|
|
70
|
-
channel: S.String,
|
|
71
|
-
date_create: S.Number,
|
|
72
|
-
})).annotate({
|
|
73
|
-
identifier: "ListStarsResponseItemsItemCase5",
|
|
74
|
-
});
|
|
75
|
-
export const ListStarsResponseItemsItem = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([
|
|
76
|
-
["type", "channel", "message", "date_create"],
|
|
77
|
-
["type", "file", "date_create"],
|
|
78
|
-
["type", "file", "comment", "date_create"],
|
|
79
|
-
["type", "channel", "date_create"],
|
|
80
|
-
["type", "channel", "date_create"],
|
|
81
|
-
["type", "channel", "date_create"],
|
|
82
|
-
], { key: "type", values: ["message", "file", "file_comment", "channel", "im", "group"] }));
|
|
83
|
-
export const ListStarsResponseItemsList = /*@__PURE__*/ S.Array(ListStarsResponseItemsItem);
|
|
84
|
-
export const ListStarsResponseResponseMetadata = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
85
|
-
next_cursor: S.optional(S.String),
|
|
86
|
-
})).annotate({
|
|
87
|
-
identifier: "ListStarsResponseResponseMetadata",
|
|
88
|
-
});
|
|
89
|
-
export const ListStarsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
90
|
-
ok: S.Boolean,
|
|
91
|
-
items: ListStarsResponseItemsList,
|
|
92
|
-
paging: S.optional(S.Unknown),
|
|
93
|
-
response_metadata: S.optional(ListStarsResponseResponseMetadata),
|
|
94
|
-
})).annotate({ identifier: "ListStarsResponse" });
|
|
95
|
-
export const RemoveStarRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
96
|
-
channel: S.optional(S.String),
|
|
97
|
-
file: S.optional(S.String),
|
|
98
|
-
file_comment: S.optional(S.String),
|
|
99
|
-
timestamp: S.optional(S.String),
|
|
100
|
-
}).pipe(T.Http({ method: "POST", uri: "/stars.remove", code: 200 }))).annotate({ identifier: "RemoveStarRequest" });
|
|
101
|
-
export const RemoveStarResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
|
|
102
|
-
ok: S.Boolean,
|
|
103
|
-
})).annotate({ identifier: "RemoveStarResponse" });
|
|
104
|
-
/** Save an item for later. Formerly known as adding a star. Required scopes — user: `stars:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `already_starred` — The specified item has already been starred by the authenticated user. - `bad_timestamp` — Value passed for `timestamp` was invalid. - `channel_not_found` — Channel, private group, or DM specified by `channel` does not exist - `external_channel_migrating` — Channel is undergoing active migration - `file_comment_not_found` — File comment specified by `file_comment` does not exist. - `file_not_found` — File specified by `file` does not exist. - `message_not_found` — Message specified by `channel` and `timestamp` does not exist. - `no_item_specified` — `file`, `file_comment`, `channel` and `timestamp` was not specified. See https://docs.slack.dev/reference/methods/stars.add */
|
|
105
|
-
export const addStar = /*@__PURE__*/ API.make(() => ({
|
|
106
|
-
input: AddStarRequest,
|
|
107
|
-
output: AddStarResponse,
|
|
108
|
-
errors: [SlackError, SlackRateLimited],
|
|
109
|
-
protocol: SlackProtocol,
|
|
110
|
-
retry: Retry.Retry,
|
|
111
|
-
}));
|
|
112
|
-
/** (Deprecated) Listed a user's saved items, formerly known as stars. Required scopes — user: `stars:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `missing_argument` — A required argument is missing. See https://docs.slack.dev/reference/methods/stars.list */
|
|
113
|
-
export const listStars = /*@__PURE__*/ API.makePaginated(() => ({
|
|
114
|
-
input: ListStarsRequest,
|
|
115
|
-
output: ListStarsResponse,
|
|
116
|
-
errors: [SlackError, SlackRateLimited],
|
|
117
|
-
protocol: SlackProtocol,
|
|
118
|
-
retry: Retry.Retry,
|
|
119
|
-
pagination: {
|
|
120
|
-
mode: "cursor",
|
|
121
|
-
inputToken: "cursor",
|
|
122
|
-
outputToken: "response_metadata.next_cursor",
|
|
123
|
-
items: "items",
|
|
124
|
-
pageSize: "limit",
|
|
125
|
-
},
|
|
126
|
-
}), slackPaginate);
|
|
127
|
-
/** Removes a saved item (star) from an item. Required scopes — user: `stars:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `bad_timestamp` — Value passed for `timestamp` was invalid. - `channel_not_found` — Channel, private group, or DM specified by `channel` does not exist - `file_comment_not_found` — File comment specified by `file_comment` does not exist. - `file_not_found` — File specified by `file` does not exist. - `message_not_found` — Message specified by `channel` and `timestamp` does not exist. - `no_item_specified` — `file`, `file_comment`, `channel` and `timestamp` was not specified. - `not_starred` — The specified item is not currently starred by the authenticated user. See https://docs.slack.dev/reference/methods/stars.remove */
|
|
128
|
-
export const removeStar = /*@__PURE__*/ API.make(() => ({
|
|
129
|
-
input: RemoveStarRequest,
|
|
130
|
-
output: RemoveStarResponse,
|
|
131
|
-
errors: [SlackError, SlackRateLimited],
|
|
132
|
-
protocol: SlackProtocol,
|
|
133
|
-
retry: Retry.Retry,
|
|
134
|
-
}));
|
|
135
|
-
//# sourceMappingURL=stars.js.map
|
|
10
|
+
const __0 = __L.at;
|
|
11
|
+
const __1 = T.Http;
|
|
12
|
+
const __2 = S.String;
|
|
13
|
+
const __3 = S.optional;
|
|
14
|
+
const __4 = S.Struct;
|
|
15
|
+
const __5 = S.suspend;
|
|
16
|
+
const __6 = S.Boolean;
|
|
17
|
+
const __7 = T.Query;
|
|
18
|
+
const __8 = S.Number;
|
|
19
|
+
const __9 = T.UnionCases;
|
|
20
|
+
const __10 = S.Unknown;
|
|
21
|
+
const __11 = S.Array;
|
|
22
|
+
|
|
23
|
+
export const addStar = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:0,errors:[$7,$8],protocol:$9,retry:$10};$5(>2)@"AddStarRequest";$4({channel:$3($2),file:$3($2),file_comment:$3($2),timestamp:$3($2)}).pipe($1({method:"POST",uri:"/stars.add",code:200}))', [__0, __1, __2, __3, __4, __5, __d0, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(addStar, i));
|
|
24
|
+
|
|
25
|
+
export const listStars = /*@__PURE__*/ API.opPaginated((i) => i === API.D ? API.named("date_create", '{input:#1,output:#5,errors:[$12,$13],protocol:$14,retry:$15,pagination:{mode:"cursor",inputToken:"cursor",outputToken:"response_metadata.next_cursor",items:"items",pageSize:"limit"},strategy:$16};$7(>6)@"ListStarsRequest";$9.pipe($8([["type","channel","message","%"],["type","file","%"],["type","file","comment","%"],["type","channel","%"],["type","channel","%"],["type","channel","%"]],{key:"type",values:["message","file","file_comment","channel","im","group"]}));$10(#2);$7(>7)@"ListStarsResponseResponseMetadata";$7(>8)@"ListStarsResponse";$6({count:$4($3.pipe($2())),cursor:$4($5.pipe($2())),limit:$4($3.pipe($2())),page:$4($3.pipe($2())),team_id:$4($5.pipe($2()))}).pipe($1({method:"GET",uri:"/stars.list",code:200}));$6({next_cursor:$4($5)});$6({ok:$11,items:#3,paging:$4($9),response_metadata:$4(#4)})', [__0, __1, __7, __8, __3, __2, __4, __5, __9, __10, __11, __6, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry, slackPaginate]) : API.call(listStars, i));
|
|
26
|
+
|
|
27
|
+
export const removeStar = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:0,errors:[$7,$8],protocol:$9,retry:$10};$5(>2)@"RemoveStarRequest";$4({channel:$3($2),file:$3($2),file_comment:$3($2),timestamp:$3($2)}).pipe($1({method:"POST",uri:"/stars.remove",code:200}))', [__0, __1, __2, __3, __4, __5, __d0, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(removeStar, i));
|
|
28
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
29
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
// Shared schema data (see `op` in core/api).
|
|
33
|
+
function __d0() {
|
|
34
|
+
return ['$3(>1)@"AddStarResponse";$2({ok:$1})', [__0, __6, __4, __5]];
|
|
35
|
+
}
|
package/lib/services/team.d.ts
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
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 type AccessLogsRequestBeforeCase0 = "now";
|
|
6
|
-
export declare const AccessLogsRequestBeforeCase0: any;
|
|
7
5
|
export type AccessLogsRequestBefore = AccessLogsRequestBeforeCase0 | (string & {}) | string;
|
|
8
|
-
export declare const AccessLogsRequestBefore: any;
|
|
9
6
|
export interface AccessLogsRequest {
|
|
10
7
|
/** End of time range of logs to include in results (inclusive). */
|
|
11
8
|
before?: AccessLogsRequestBefore;
|
|
@@ -18,7 +15,6 @@ export interface AccessLogsRequest {
|
|
|
18
15
|
/** encoded team id to get logs from, required if org token is used */
|
|
19
16
|
team_id?: string;
|
|
20
17
|
}
|
|
21
|
-
export declare const AccessLogsRequest: S.Schema<AccessLogsRequest>;
|
|
22
18
|
export interface AccessLogsResponseLoginsItem {
|
|
23
19
|
username: string;
|
|
24
20
|
count: number;
|
|
@@ -31,22 +27,18 @@ export interface AccessLogsResponseLoginsItem {
|
|
|
31
27
|
date_first: number;
|
|
32
28
|
date_last: number;
|
|
33
29
|
}
|
|
34
|
-
export declare const AccessLogsResponseLoginsItem: S.Schema<AccessLogsResponseLoginsItem>;
|
|
35
30
|
export type AccessLogsResponseLoginsList = Array<AccessLogsResponseLoginsItem>;
|
|
36
|
-
export declare const AccessLogsResponseLoginsList: S.Schema<AccessLogsResponseLoginsList>;
|
|
37
31
|
export interface AccessLogsResponsePaging {
|
|
38
32
|
count: number;
|
|
39
33
|
total: number;
|
|
40
34
|
page: number;
|
|
41
35
|
pages: number;
|
|
42
36
|
}
|
|
43
|
-
export declare const AccessLogsResponsePaging: S.Schema<AccessLogsResponsePaging>;
|
|
44
37
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
45
38
|
export interface AccessLogsResponseResponseMetadata {
|
|
46
|
-
/** Cursor for the next page
|
|
39
|
+
/** Cursor for the next page -- pass as `cursor` on the next call. */
|
|
47
40
|
next_cursor?: string;
|
|
48
41
|
}
|
|
49
|
-
export declare const AccessLogsResponseResponseMetadata: S.Schema<AccessLogsResponseResponseMetadata>;
|
|
50
42
|
export interface AccessLogsResponse {
|
|
51
43
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
52
44
|
ok: boolean;
|
|
@@ -55,7 +47,6 @@ export interface AccessLogsResponse {
|
|
|
55
47
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
56
48
|
response_metadata?: AccessLogsResponseResponseMetadata;
|
|
57
49
|
}
|
|
58
|
-
export declare const AccessLogsResponse: S.Schema<AccessLogsResponse>;
|
|
59
50
|
export interface BillableInfoRequest {
|
|
60
51
|
/** Set `cursor` to `next_cursor` returned by previous call, to indicate from where you want to list next page of users list. Default value fetches the first page. */
|
|
61
52
|
cursor?: string;
|
|
@@ -66,14 +57,11 @@ export interface BillableInfoRequest {
|
|
|
66
57
|
/** encoded team id to get the billable information from, required if org token is used */
|
|
67
58
|
team_id?: string;
|
|
68
59
|
}
|
|
69
|
-
export declare const BillableInfoRequest: S.Schema<BillableInfoRequest>;
|
|
70
60
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
71
61
|
export type BillableInfoResponseResponseMetadata = AccessLogsResponseResponseMetadata;
|
|
72
|
-
export declare const BillableInfoResponseResponseMetadata: S.Schema<AccessLogsResponseResponseMetadata>;
|
|
73
62
|
export type BillableInfoResponseBillableInfoMap = {
|
|
74
63
|
[key: string]: unknown | undefined;
|
|
75
64
|
};
|
|
76
|
-
export declare const BillableInfoResponseBillableInfoMap: S.Schema<BillableInfoResponseBillableInfoMap>;
|
|
77
65
|
export interface BillableInfoResponse {
|
|
78
66
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
79
67
|
ok: boolean;
|
|
@@ -81,51 +69,39 @@ export interface BillableInfoResponse {
|
|
|
81
69
|
response_metadata?: AccessLogsResponseResponseMetadata;
|
|
82
70
|
billable_info: BillableInfoResponseBillableInfoMap;
|
|
83
71
|
}
|
|
84
|
-
export declare const BillableInfoResponse: S.Schema<BillableInfoResponse>;
|
|
85
72
|
export interface BillingInfoRequest {
|
|
86
73
|
}
|
|
87
|
-
export declare const BillingInfoRequest: S.Schema<BillingInfoRequest>;
|
|
88
74
|
export interface BillingInfoResponse {
|
|
89
75
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
90
76
|
ok: boolean;
|
|
91
77
|
plan: string;
|
|
92
78
|
}
|
|
93
|
-
export declare const BillingInfoResponse: S.Schema<BillingInfoResponse>;
|
|
94
79
|
export interface DisconnectExternalTeamRequest {
|
|
95
80
|
/** The team ID of the target team. */
|
|
96
81
|
target_team: string;
|
|
97
82
|
}
|
|
98
|
-
export declare const DisconnectExternalTeamRequest: S.Schema<DisconnectExternalTeamRequest>;
|
|
99
83
|
export interface DisconnectExternalTeamResponse {
|
|
100
84
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
101
85
|
ok: boolean;
|
|
102
86
|
job_enqueued: boolean;
|
|
103
87
|
}
|
|
104
|
-
export declare const DisconnectExternalTeamResponse: S.Schema<DisconnectExternalTeamResponse>;
|
|
105
88
|
export type GetProfileRequestVisibility = "all" | "visible" | "hidden";
|
|
106
|
-
export declare const GetProfileRequestVisibility: any;
|
|
107
89
|
export interface GetProfileRequest {
|
|
108
90
|
/** Filter by visibility. */
|
|
109
91
|
visibility?: GetProfileRequestVisibility | (string & {});
|
|
110
92
|
}
|
|
111
|
-
export declare const GetProfileRequest: S.Schema<GetProfileRequest>;
|
|
112
93
|
export type GetProfileResponseProfileFieldsList = Array<unknown>;
|
|
113
|
-
export declare const GetProfileResponseProfileFieldsList: S.Schema<GetProfileResponseProfileFieldsList>;
|
|
114
94
|
export type GetProfileResponseProfileSectionsList = Array<unknown>;
|
|
115
|
-
export declare const GetProfileResponseProfileSectionsList: S.Schema<GetProfileResponseProfileSectionsList>;
|
|
116
95
|
export interface GetProfileResponseProfile {
|
|
117
96
|
fields?: GetProfileResponseProfileFieldsList;
|
|
118
97
|
sections?: GetProfileResponseProfileSectionsList;
|
|
119
98
|
}
|
|
120
|
-
export declare const GetProfileResponseProfile: S.Schema<GetProfileResponseProfile>;
|
|
121
99
|
export interface GetProfileResponse {
|
|
122
100
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
123
101
|
ok: boolean;
|
|
124
102
|
profile: GetProfileResponseProfile;
|
|
125
103
|
}
|
|
126
|
-
export declare const GetProfileResponse: S.Schema<GetProfileResponse>;
|
|
127
104
|
export type IntegrationLogsRequestChangeType = "added" | "removed" | "enabled" | "disabled" | "updated";
|
|
128
|
-
export declare const IntegrationLogsRequestChangeType: any;
|
|
129
105
|
export interface IntegrationLogsRequest {
|
|
130
106
|
/** Filter logs to this Slack app. Defaults to all logs. */
|
|
131
107
|
app_id?: string;
|
|
@@ -137,35 +113,25 @@ export interface IntegrationLogsRequest {
|
|
|
137
113
|
service_id?: string;
|
|
138
114
|
/** encoded team id to get logs from, required if org token is used */
|
|
139
115
|
team_id?: string;
|
|
140
|
-
/** Filter logs generated by this user
|
|
116
|
+
/** Filter logs generated by this user's actions. Defaults to all logs. */
|
|
141
117
|
user?: string;
|
|
142
118
|
}
|
|
143
|
-
export declare const IntegrationLogsRequest: S.Schema<IntegrationLogsRequest>;
|
|
144
119
|
export type IntegrationLogsResponseLogsItemMap = {
|
|
145
120
|
[key: string]: unknown | undefined;
|
|
146
121
|
};
|
|
147
|
-
export declare const IntegrationLogsResponseLogsItemMap: S.Schema<IntegrationLogsResponseLogsItemMap>;
|
|
148
122
|
export type IntegrationLogsResponseLogsList = Array<IntegrationLogsResponseLogsItemMap>;
|
|
149
|
-
export declare const IntegrationLogsResponseLogsList: S.Schema<IntegrationLogsResponseLogsList>;
|
|
150
123
|
export interface IntegrationLogsResponse {
|
|
151
124
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
152
125
|
ok: boolean;
|
|
153
126
|
paging: unknown;
|
|
154
127
|
logs: IntegrationLogsResponseLogsList;
|
|
155
128
|
}
|
|
156
|
-
export declare const IntegrationLogsResponse: S.Schema<IntegrationLogsResponse>;
|
|
157
129
|
export type ListExternalTeamsRequestSortField = "team_name" | "last_active_timestamp" | "connection_status";
|
|
158
|
-
export declare const ListExternalTeamsRequestSortField: any;
|
|
159
130
|
export type ListExternalTeamsRequestSortDirection = "asc" | "desc";
|
|
160
|
-
export declare const ListExternalTeamsRequestSortDirection: any;
|
|
161
131
|
export type ListExternalTeamsRequestSlackConnectPrefFilterItem = "approved_orgs_only" | "allow_sc_file_uploads" | "profile_visibility" | "away_team_sc_invite_permissions" | "accept_sc_invites" | "sc_mpdm_to_private" | "require_sc_channel_for_sc_dm" | "external_awareness_context_bar" | "interact_with_externally_owned_workflows" | "external_teams_interact_with_locally_owned_workflows";
|
|
162
|
-
export declare const ListExternalTeamsRequestSlackConnectPrefFilterItem: any;
|
|
163
132
|
export type ListExternalTeamsRequestSlackConnectPrefFilterList = Array<ListExternalTeamsRequestSlackConnectPrefFilterItem | (string & {})>;
|
|
164
|
-
export declare const ListExternalTeamsRequestSlackConnectPrefFilterList: S.Schema<ListExternalTeamsRequestSlackConnectPrefFilterList>;
|
|
165
133
|
export type ListExternalTeamsRequestWorkspaceFilterList = Array<string>;
|
|
166
|
-
export declare const ListExternalTeamsRequestWorkspaceFilterList: S.Schema<ListExternalTeamsRequestWorkspaceFilterList>;
|
|
167
134
|
export type ListExternalTeamsRequestConnectionStatusFilter = "CONNECTED" | "DISCONNECTED" | "BLOCKED" | "IN_REVIEW";
|
|
168
|
-
export declare const ListExternalTeamsRequestConnectionStatusFilter: any;
|
|
169
135
|
export interface ListExternalTeamsRequest {
|
|
170
136
|
/** The maximum number of items to return per page */
|
|
171
137
|
limit?: number;
|
|
@@ -182,39 +148,29 @@ export interface ListExternalTeamsRequest {
|
|
|
182
148
|
/** Status of the connected team. */
|
|
183
149
|
connection_status_filter?: ListExternalTeamsRequestConnectionStatusFilter | (string & {});
|
|
184
150
|
}
|
|
185
|
-
export declare const ListExternalTeamsRequest: S.Schema<ListExternalTeamsRequest>;
|
|
186
151
|
export interface ListExternalTeamsResponseOrganizationsItemConnectedWorkspacesItem {
|
|
187
152
|
workspace_id: string;
|
|
188
153
|
/** Name of the workspace. */
|
|
189
154
|
workspace_name: string;
|
|
190
155
|
}
|
|
191
|
-
export declare const ListExternalTeamsResponseOrganizationsItemConnectedWorkspacesItem: S.Schema<ListExternalTeamsResponseOrganizationsItemConnectedWorkspacesItem>;
|
|
192
156
|
export type ListExternalTeamsResponseOrganizationsItemConnectedWorkspacesList = Array<ListExternalTeamsResponseOrganizationsItemConnectedWorkspacesItem>;
|
|
193
|
-
export declare const ListExternalTeamsResponseOrganizationsItemConnectedWorkspacesList: S.Schema<ListExternalTeamsResponseOrganizationsItemConnectedWorkspacesList>;
|
|
194
157
|
/** Status of the connected team. (CONNECTED / DISCONNECTED / BLOCKED / IN_REVIEW / DISCONNECTiNG) */
|
|
195
158
|
export type ListExternalTeamsResponseOrganizationsItemConnectionStatus = "CONNECTED" | "DISCONNECTED" | "BLOCKED" | "IN_REVIEW" | "DISCONNECTING";
|
|
196
|
-
export declare const ListExternalTeamsResponseOrganizationsItemConnectionStatus: any;
|
|
197
159
|
export interface ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsItem {
|
|
198
160
|
team_id: string;
|
|
199
161
|
count: number;
|
|
200
162
|
}
|
|
201
|
-
export declare const ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsItem: S.Schema<ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsItem>;
|
|
202
163
|
export type ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsList = Array<ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsItem>;
|
|
203
|
-
export declare const ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsList: S.Schema<ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsList>;
|
|
204
164
|
export interface ListExternalTeamsResponseOrganizationsItemCanvas {
|
|
205
165
|
total_count: number;
|
|
206
166
|
ownership_details: ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsList;
|
|
207
167
|
}
|
|
208
|
-
export declare const ListExternalTeamsResponseOrganizationsItemCanvas: S.Schema<ListExternalTeamsResponseOrganizationsItemCanvas>;
|
|
209
168
|
export type ListExternalTeamsResponseOrganizationsItemListsOwnershipDetailsItem = ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsItem;
|
|
210
|
-
export declare const ListExternalTeamsResponseOrganizationsItemListsOwnershipDetailsItem: S.Schema<ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsItem>;
|
|
211
169
|
export type ListExternalTeamsResponseOrganizationsItemListsOwnershipDetailsList = Array<ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsItem>;
|
|
212
|
-
export declare const ListExternalTeamsResponseOrganizationsItemListsOwnershipDetailsList: S.Schema<ListExternalTeamsResponseOrganizationsItemListsOwnershipDetailsList>;
|
|
213
170
|
export interface ListExternalTeamsResponseOrganizationsItemLists {
|
|
214
171
|
total_count: number;
|
|
215
172
|
ownership_details: ListExternalTeamsResponseOrganizationsItemListsOwnershipDetailsList;
|
|
216
173
|
}
|
|
217
|
-
export declare const ListExternalTeamsResponseOrganizationsItemLists: S.Schema<ListExternalTeamsResponseOrganizationsItemLists>;
|
|
218
174
|
export interface ListExternalTeamsResponseOrganizationsItem {
|
|
219
175
|
team_id: string;
|
|
220
176
|
/** Name of the team that is connected */
|
|
@@ -240,12 +196,9 @@ export interface ListExternalTeamsResponseOrganizationsItem {
|
|
|
240
196
|
canvas?: ListExternalTeamsResponseOrganizationsItemCanvas;
|
|
241
197
|
lists?: ListExternalTeamsResponseOrganizationsItemLists;
|
|
242
198
|
}
|
|
243
|
-
export declare const ListExternalTeamsResponseOrganizationsItem: S.Schema<ListExternalTeamsResponseOrganizationsItem>;
|
|
244
199
|
export type ListExternalTeamsResponseOrganizationsList = Array<ListExternalTeamsResponseOrganizationsItem>;
|
|
245
|
-
export declare const ListExternalTeamsResponseOrganizationsList: S.Schema<ListExternalTeamsResponseOrganizationsList>;
|
|
246
200
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
247
201
|
export type ListExternalTeamsResponseResponseMetadata = AccessLogsResponseResponseMetadata;
|
|
248
|
-
export declare const ListExternalTeamsResponseResponseMetadata: S.Schema<AccessLogsResponseResponseMetadata>;
|
|
249
202
|
export interface ListExternalTeamsResponse {
|
|
250
203
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
251
204
|
ok: boolean;
|
|
@@ -254,10 +207,8 @@ export interface ListExternalTeamsResponse {
|
|
|
254
207
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
255
208
|
response_metadata?: AccessLogsResponseResponseMetadata;
|
|
256
209
|
}
|
|
257
|
-
export declare const ListExternalTeamsResponse: S.Schema<ListExternalTeamsResponse>;
|
|
258
210
|
export interface ListPreferencesRequest {
|
|
259
211
|
}
|
|
260
|
-
export declare const ListPreferencesRequest: S.Schema<ListPreferencesRequest>;
|
|
261
212
|
export interface ListPreferencesResponse {
|
|
262
213
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
263
214
|
ok: boolean;
|
|
@@ -266,44 +217,41 @@ export interface ListPreferencesResponse {
|
|
|
266
217
|
msg_edit_window_mins: number;
|
|
267
218
|
who_can_post_general: string;
|
|
268
219
|
}
|
|
269
|
-
export declare const ListPreferencesResponse: S.Schema<ListPreferencesResponse>;
|
|
270
220
|
export interface TeamInfoRequest {
|
|
271
221
|
/** Query by domain instead of team (only when team is null). This only works for domains in the same enterprise as the querying team token. This also expects the domain to belong to a team and not the enterprise itself. This is the value set up for the 'Joining This Workspace' workspace setting. If it contains more than one domain, the field will contain multiple comma-separated domain values. If no domain is set, the field is empty. */
|
|
272
222
|
domain?: string;
|
|
273
223
|
/** Team to get info about; if omitted, will return information about the current team. */
|
|
274
224
|
team?: string;
|
|
275
225
|
}
|
|
276
|
-
export declare const TeamInfoRequest: S.Schema<TeamInfoRequest>;
|
|
277
226
|
export interface TeamInfoResponse {
|
|
278
227
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
279
228
|
ok: boolean;
|
|
280
229
|
}
|
|
281
|
-
export declare const TeamInfoResponse: S.Schema<TeamInfoResponse>;
|
|
282
230
|
export type AccessLogsError = SlackOpError;
|
|
283
|
-
/** Gets the access logs for the current team. Required scopes
|
|
231
|
+
/** Gets the access logs for the current team. Required scopes -- user: `admin` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `missing_argument` -- A required argument is missing. - `missing_scope` -- The provided token hasn't obtained the necessary scopes to use this method. - `not_allowed_token_type` -- Method was called with an invalid token type - `over_pagination_limit` -- It is not possible to request more than 1000 items per page or more than 100 pages. - `paid_only` -- This is only available to paid teams. - `token_revoked` -- token revoked (generated) - `invalid_cursor` -- Value passed for `cursor` was not valid or is no longer valid. - `invalid_limit` -- The value passed for `limit` was not valid. - `invalid_team_id` -- The value passed for `team_id` is not valid given the token context. See https://docs.slack.dev/reference/methods/team.accessLogs */
|
|
284
232
|
export declare const accessLogs: API.PaginatedOperationMethod<AccessLogsRequest, AccessLogsResponse, AccessLogsError, SlackOpContext, AccessLogsResponseLoginsItem>;
|
|
285
233
|
export type BillableInfoError = SlackOpError;
|
|
286
|
-
/** Gets billable users information for the current team. Required scopes
|
|
234
|
+
/** Gets billable users information for the current team. Required scopes -- user: `admin` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `fatal_error` -- The server could not complete your operation(s) without encountering a catastrophic error. - `invalid_cursor` -- Value passed for `cursor` was not valid or is no longer valid. - `user_not_found` -- Unable to find the requested user. See https://docs.slack.dev/reference/methods/team.billableInfo */
|
|
287
235
|
export declare const billableInfo: API.OperationMethod<BillableInfoRequest, BillableInfoResponse, BillableInfoError, SlackOpContext>;
|
|
288
236
|
export type BillingInfoError = SlackOpError;
|
|
289
|
-
/** Reads a workspace's billing plan information. Required scopes
|
|
237
|
+
/** Reads a workspace's billing plan information. Required scopes -- bot: `team.billing:read`; user: `team.billing:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `invalid_auth` -- Invalid token provided. - `invalid_team` -- Cannot find a team associated with the authed token. See https://docs.slack.dev/reference/methods/team.billing.info */
|
|
290
238
|
export declare const billingInfo: API.OperationMethod<BillingInfoRequest, BillingInfoResponse, BillingInfoError, SlackOpContext>;
|
|
291
239
|
export type DisconnectExternalTeamError = SlackOpError;
|
|
292
|
-
/** Disconnect an external organization. Required scopes
|
|
240
|
+
/** Disconnect an external organization. Required scopes -- bot: `conversations.connect:manage` Rate limit tier: 1 Method-specific errors (the `error` slug on the SlackError): - `missing_argument` -- A required argument is missing. - `restricted_action` -- The actor is restricted from archiving or disconnecting. - `invalid_target_team` -- target team is invalid See https://docs.slack.dev/reference/methods/team.externalTeams.disconnect */
|
|
293
241
|
export declare const disconnectExternalTeam: API.OperationMethod<DisconnectExternalTeamRequest, DisconnectExternalTeamResponse, DisconnectExternalTeamError, SlackOpContext>;
|
|
294
242
|
export type GetProfileError = SlackOpError;
|
|
295
|
-
/** Retrieve a team's profile. Required scopes
|
|
243
|
+
/** Retrieve a team's profile. Required scopes -- bot: `users.profile:read`; user: `users.profile:read` Rate limit tier: 3 See https://docs.slack.dev/reference/methods/team.profile.get */
|
|
296
244
|
export declare const getProfile: API.OperationMethod<GetProfileRequest, GetProfileResponse, GetProfileError, SlackOpContext>;
|
|
297
245
|
export type IntegrationLogsError = SlackOpError;
|
|
298
|
-
/** Gets the integration logs for the current team. Required scopes
|
|
246
|
+
/** Gets the integration logs for the current team. Required scopes -- user: `admin` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `internal_error` -- Internal Error - `missing_argument` -- A required argument is missing. See https://docs.slack.dev/reference/methods/team.integrationLogs */
|
|
299
247
|
export declare const integrationLogs: API.OperationMethod<IntegrationLogsRequest, IntegrationLogsResponse, IntegrationLogsError, SlackOpContext>;
|
|
300
248
|
export type ListExternalTeamsError = SlackOpError;
|
|
301
|
-
/** Returns a list of all the external teams connected and details about the connection. Required scopes
|
|
249
|
+
/** Returns a list of all the external teams connected and details about the connection. Required scopes -- bot: `conversations.connect:manage`, `team:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `invalid_arguments` -- One or more of the API arguments are invalid. - `not_allowed` -- The user is not allowed to perform the action. - `restricted_action` -- The user does not have permission to perform the action. - `internal_error` -- There was an internal error processing this request. - `invalid_workspace_filter` -- The specified workspace is not valid. - `user_cannot_manage_workspace` -- The calling user cannot manage the workspace passed in the workspace filter. See https://docs.slack.dev/reference/methods/team.externalTeams.list */
|
|
302
250
|
export declare const listExternalTeams: API.PaginatedOperationMethod<ListExternalTeamsRequest, ListExternalTeamsResponse, ListExternalTeamsError, SlackOpContext, ListExternalTeamsResponseOrganizationsItem>;
|
|
303
251
|
export type ListPreferencesError = SlackOpError;
|
|
304
|
-
/** Retrieve a list of a workspace's team preferences. Required scopes
|
|
252
|
+
/** Retrieve a list of a workspace's team preferences. Required scopes -- bot: `team.preferences:read`; user: `team.preferences:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `invalid_auth` -- Invalid token provided. - `invalid_team` -- Cannot find a workspace associated with the presented token. See https://docs.slack.dev/reference/methods/team.preferences.list */
|
|
305
253
|
export declare const listPreferences: API.OperationMethod<ListPreferencesRequest, ListPreferencesResponse, ListPreferencesError, SlackOpContext>;
|
|
306
254
|
export type TeamInfoError = SlackOpError;
|
|
307
|
-
/** Gets information about the current team. Required scopes
|
|
255
|
+
/** Gets information about the current team. Required scopes -- bot: `team:read`; user: `team:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `enterprise_not_found` -- The `enterprise` was not found. - `fail_to_get_teams_for_restricted_user` -- Failed to get teams for restricted user. - `missing_user` -- The `user` was not found. - `org_not_found` -- The `org` was not found. - `team_not_found` -- The `team` was not found. - `team_not_on_enterprise` -- Cannot query team by domain because team is not on an enterprise. - `user_not_found` -- The `user` was not found. See https://docs.slack.dev/reference/methods/team.info */
|
|
308
256
|
export declare const teamInfo: API.OperationMethod<TeamInfoRequest, TeamInfoResponse, TeamInfoError, SlackOpContext>;
|
|
309
257
|
//# sourceMappingURL=team.d.ts.map
|