@distilled.cloud/slack 1.0.0-rc.13 → 1.0.0-rc.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/credentials.d.ts +2 -2
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +3 -3
- package/lib/credentials.js.map +1 -1
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -1
- package/lib/errors.js.map +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -3
- package/lib/index.js.map +1 -1
- package/lib/pagination.d.ts.map +1 -1
- package/lib/pagination.js.map +1 -1
- package/lib/protocol.d.ts +3 -3
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +12 -18
- package/lib/protocol.js.map +1 -1
- package/lib/protocol.test.d.ts +2 -0
- package/lib/protocol.test.d.ts.map +1 -0
- package/lib/protocol.test.js +288 -0
- package/lib/protocol.test.js.map +1 -0
- package/lib/retry.d.ts +1 -1
- package/lib/retry.d.ts.map +1 -1
- package/lib/retry.js +1 -1
- package/lib/retry.js.map +1 -1
- package/lib/services/admin.d.ts +236 -29
- package/lib/services/admin.d.ts.map +1 -1
- package/lib/services/admin.js +417 -749
- package/lib/services/admin.js.map +1 -1
- package/lib/services/agents.d.ts +423 -0
- package/lib/services/agents.d.ts.map +1 -0
- package/lib/services/agents.js +315 -0
- package/lib/services/agents.js.map +1 -0
- package/lib/services/api.d.ts +1 -1
- package/lib/services/api.d.ts.map +1 -1
- package/lib/services/api.js +4 -6
- package/lib/services/api.js.map +1 -1
- package/lib/services/apps.d.ts +21 -3
- package/lib/services/apps.d.ts.map +1 -1
- package/lib/services/apps.js +65 -133
- package/lib/services/apps.js.map +1 -1
- package/lib/services/assistant.d.ts +4 -4
- package/lib/services/assistant.d.ts.map +1 -1
- package/lib/services/assistant.js +16 -38
- package/lib/services/assistant.js.map +1 -1
- package/lib/services/auth.d.ts +2 -2
- package/lib/services/auth.d.ts.map +1 -1
- package/lib/services/auth.js +11 -28
- package/lib/services/auth.js.map +1 -1
- package/lib/services/blocks.d.ts +1 -1
- package/lib/services/blocks.d.ts.map +1 -1
- package/lib/services/blocks.js +5 -9
- package/lib/services/blocks.js.map +1 -1
- package/lib/services/bookmarks.d.ts +4 -4
- package/lib/services/bookmarks.d.ts.map +1 -1
- package/lib/services/bookmarks.js +14 -30
- package/lib/services/bookmarks.js.map +1 -1
- package/lib/services/bots.d.ts +1 -1
- package/lib/services/bots.d.ts.map +1 -1
- package/lib/services/bots.js +7 -15
- package/lib/services/bots.js.map +1 -1
- package/lib/services/calls.d.ts +1 -1
- package/lib/services/calls.d.ts.map +1 -1
- package/lib/services/calls.js +13 -33
- package/lib/services/calls.js.map +1 -1
- package/lib/services/canvases.d.ts +22 -2
- package/lib/services/canvases.d.ts.map +1 -1
- package/lib/services/canvases.js +37 -48
- package/lib/services/canvases.js.map +1 -1
- package/lib/services/chat.d.ts +29 -25
- package/lib/services/chat.d.ts.map +1 -1
- package/lib/services/chat.js +47 -95
- package/lib/services/chat.js.map +1 -1
- package/lib/services/conversations.d.ts +10 -8
- package/lib/services/conversations.d.ts.map +1 -1
- package/lib/services/conversations.js +43 -115
- package/lib/services/conversations.js.map +1 -1
- package/lib/services/dialog.d.ts +1 -1
- package/lib/services/dialog.d.ts.map +1 -1
- package/lib/services/dialog.js +5 -9
- package/lib/services/dialog.js.map +1 -1
- package/lib/services/dnd.d.ts +1 -1
- package/lib/services/dnd.d.ts.map +1 -1
- package/lib/services/dnd.js +10 -24
- package/lib/services/dnd.js.map +1 -1
- package/lib/services/emoji.d.ts +1 -1
- package/lib/services/emoji.d.ts.map +1 -1
- package/lib/services/emoji.js +6 -11
- package/lib/services/emoji.js.map +1 -1
- package/lib/services/entity.d.ts +1 -1
- package/lib/services/entity.d.ts.map +1 -1
- package/lib/services/entity.js +8 -20
- package/lib/services/entity.js.map +1 -1
- package/lib/services/files.d.ts +5 -5
- package/lib/services/files.d.ts.map +1 -1
- package/lib/services/files.js +39 -109
- package/lib/services/files.js.map +1 -1
- package/lib/services/functions.d.ts +1 -1
- package/lib/services/functions.d.ts.map +1 -1
- package/lib/services/functions.js +28 -75
- package/lib/services/functions.js.map +1 -1
- package/lib/services/index.d.ts +1 -0
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/index.js +1 -0
- package/lib/services/index.js.map +1 -1
- package/lib/services/lists.d.ts +5 -1
- package/lib/services/lists.d.ts.map +1 -1
- package/lib/services/lists.js +35 -146
- package/lib/services/lists.js.map +1 -1
- package/lib/services/migration.d.ts +1 -1
- package/lib/services/migration.d.ts.map +1 -1
- package/lib/services/migration.js +5 -8
- package/lib/services/migration.js.map +1 -1
- package/lib/services/oauth.d.ts +38 -2
- package/lib/services/oauth.d.ts.map +1 -1
- package/lib/services/oauth.js +67 -50
- package/lib/services/oauth.js.map +1 -1
- package/lib/services/openid.d.ts +1 -1
- package/lib/services/openid.d.ts.map +1 -1
- package/lib/services/openid.js +7 -15
- package/lib/services/openid.js.map +1 -1
- package/lib/services/pins.d.ts +1 -1
- package/lib/services/pins.d.ts.map +1 -1
- package/lib/services/pins.js +7 -15
- package/lib/services/pins.js.map +1 -1
- package/lib/services/reactions.d.ts +2 -2
- package/lib/services/reactions.d.ts.map +1 -1
- package/lib/services/reactions.js +13 -29
- package/lib/services/reactions.js.map +1 -1
- package/lib/services/reminders.d.ts +1 -1
- package/lib/services/reminders.d.ts.map +1 -1
- package/lib/services/reminders.js +13 -33
- package/lib/services/reminders.js.map +1 -1
- package/lib/services/rtm.d.ts +1 -1
- package/lib/services/rtm.d.ts.map +1 -1
- package/lib/services/rtm.js +9 -21
- package/lib/services/rtm.js.map +1 -1
- package/lib/services/search.d.ts +1 -1
- package/lib/services/search.d.ts.map +1 -1
- package/lib/services/search.js +13 -30
- package/lib/services/search.js.map +1 -1
- package/lib/services/stars.d.ts +1 -1
- package/lib/services/stars.d.ts.map +1 -1
- package/lib/services/stars.js +10 -20
- package/lib/services/stars.js.map +1 -1
- package/lib/services/team.d.ts +1 -1
- package/lib/services/team.d.ts.map +1 -1
- package/lib/services/team.js +25 -62
- package/lib/services/team.js.map +1 -1
- package/lib/services/tooling.d.ts +1 -1
- package/lib/services/tooling.d.ts.map +1 -1
- package/lib/services/tooling.js +5 -9
- package/lib/services/tooling.js.map +1 -1
- package/lib/services/usergroups.d.ts +8 -3
- package/lib/services/usergroups.d.ts.map +1 -1
- package/lib/services/usergroups.js +23 -51
- package/lib/services/usergroups.js.map +1 -1
- package/lib/services/users.d.ts +2 -2
- package/lib/services/users.d.ts.map +1 -1
- package/lib/services/users.js +28 -81
- package/lib/services/users.js.map +1 -1
- package/lib/services/views.d.ts +1 -1
- package/lib/services/views.d.ts.map +1 -1
- package/lib/services/views.js +11 -27
- package/lib/services/views.js.map +1 -1
- package/lib/services/workflows.d.ts +1 -1
- package/lib/services/workflows.d.ts.map +1 -1
- package/lib/services/workflows.js +27 -71
- package/lib/services/workflows.js.map +1 -1
- package/package.json +15 -11
- package/src/credentials.ts +8 -10
- package/src/errors.ts +17 -31
- package/src/index.ts +3 -7
- package/src/pagination.ts +2 -5
- package/src/protocol.test.ts +372 -0
- package/src/protocol.ts +34 -66
- package/src/retry.ts +4 -9
- package/src/services/admin.ts +1241 -1557
- package/src/services/agents.ts +853 -0
- package/src/services/api.ts +4 -10
- package/src/services/apps.ts +146 -243
- package/src/services/assistant.ts +93 -144
- package/src/services/auth.ts +12 -33
- package/src/services/blocks.ts +9 -24
- package/src/services/bookmarks.ts +14 -34
- package/src/services/bots.ts +7 -19
- package/src/services/calls.ts +15 -43
- package/src/services/canvases.ts +82 -85
- package/src/services/chat.ts +134 -254
- package/src/services/conversations.ts +101 -217
- package/src/services/dialog.ts +5 -13
- package/src/services/dnd.ts +11 -31
- package/src/services/emoji.ts +9 -19
- package/src/services/entity.ts +17 -45
- package/src/services/files.ts +72 -165
- package/src/services/functions.ts +95 -168
- package/src/services/index.ts +1 -0
- package/src/services/lists.ts +65 -208
- package/src/services/migration.ts +8 -17
- package/src/services/oauth.ts +127 -60
- package/src/services/openid.ts +12 -34
- package/src/services/pins.ts +7 -19
- package/src/services/reactions.ts +19 -43
- package/src/services/reminders.ts +13 -37
- package/src/services/rtm.ts +9 -25
- package/src/services/search.ts +51 -92
- package/src/services/stars.ts +20 -31
- package/src/services/team.ts +81 -155
- package/src/services/tooling.ts +5 -13
- package/src/services/usergroups.ts +37 -68
- package/src/services/users.ts +35 -102
- package/src/services/views.ts +11 -31
- package/src/services/workflows.ts +65 -129
- package/lib/response-validation.test.d.ts +0 -4
- package/lib/response-validation.test.d.ts.map +0 -1
- package/lib/response-validation.test.js +0 -40
- package/lib/response-validation.test.js.map +0 -1
- package/src/response-validation.test.ts +0 -54
|
@@ -1,14 +1,10 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
1
2
|
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
|
|
2
3
|
import * as S from "@distilled.cloud/core/schema";
|
|
3
|
-
import * as API from "@distilled.cloud/core/api";
|
|
4
|
-
import * as T from "../traits.ts";
|
|
5
|
-
import {
|
|
6
|
-
SlackProtocol,
|
|
7
|
-
type SlackOpError,
|
|
8
|
-
type SlackOpContext,
|
|
9
|
-
} from "../protocol.ts";
|
|
10
4
|
import { SlackError, SlackRateLimited } from "../errors.ts";
|
|
5
|
+
import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
|
|
11
6
|
import * as Retry from "../retry.ts";
|
|
7
|
+
import * as T from "../traits.ts";
|
|
12
8
|
|
|
13
9
|
export type { SlackOpError, SlackOpContext };
|
|
14
10
|
|
|
@@ -32,9 +28,7 @@ export const AddReminderRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
32
28
|
team_id: S.optional(S.String),
|
|
33
29
|
recurrence: S.optional(S.Unknown),
|
|
34
30
|
}).pipe(T.Http({ method: "POST", uri: "/reminders.add", code: 200 })),
|
|
35
|
-
).annotate({
|
|
36
|
-
identifier: "AddReminderRequest",
|
|
37
|
-
}) as any as S.Schema<AddReminderRequest>;
|
|
31
|
+
).annotate({ identifier: "AddReminderRequest" }) as any as S.Schema<AddReminderRequest>;
|
|
38
32
|
|
|
39
33
|
export interface AddReminderResponse {
|
|
40
34
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -46,9 +40,7 @@ export const AddReminderResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
46
40
|
ok: S.Boolean,
|
|
47
41
|
reminder: S.Unknown,
|
|
48
42
|
}),
|
|
49
|
-
).annotate({
|
|
50
|
-
identifier: "AddReminderResponse",
|
|
51
|
-
}) as any as S.Schema<AddReminderResponse>;
|
|
43
|
+
).annotate({ identifier: "AddReminderResponse" }) as any as S.Schema<AddReminderResponse>;
|
|
52
44
|
|
|
53
45
|
export interface CompleteReminderRequest {
|
|
54
46
|
/** The ID of the reminder to be marked as complete */
|
|
@@ -61,9 +53,7 @@ export const CompleteReminderRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
61
53
|
reminder: S.String,
|
|
62
54
|
team_id: S.optional(S.String),
|
|
63
55
|
}).pipe(T.Http({ method: "POST", uri: "/reminders.complete", code: 200 })),
|
|
64
|
-
).annotate({
|
|
65
|
-
identifier: "CompleteReminderRequest",
|
|
66
|
-
}) as any as S.Schema<CompleteReminderRequest>;
|
|
56
|
+
).annotate({ identifier: "CompleteReminderRequest" }) as any as S.Schema<CompleteReminderRequest>;
|
|
67
57
|
|
|
68
58
|
export interface CompleteReminderResponse {
|
|
69
59
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -73,9 +63,7 @@ export const CompleteReminderResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
73
63
|
S.Struct({
|
|
74
64
|
ok: S.Boolean,
|
|
75
65
|
}),
|
|
76
|
-
).annotate({
|
|
77
|
-
identifier: "CompleteReminderResponse",
|
|
78
|
-
}) as any as S.Schema<CompleteReminderResponse>;
|
|
66
|
+
).annotate({ identifier: "CompleteReminderResponse" }) as any as S.Schema<CompleteReminderResponse>;
|
|
79
67
|
|
|
80
68
|
export interface DeleteReminderRequest {
|
|
81
69
|
/** The ID of the reminder */
|
|
@@ -88,9 +76,7 @@ export const DeleteReminderRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
88
76
|
reminder: S.String,
|
|
89
77
|
team_id: S.optional(S.String),
|
|
90
78
|
}).pipe(T.Http({ method: "POST", uri: "/reminders.delete", code: 200 })),
|
|
91
|
-
).annotate({
|
|
92
|
-
identifier: "DeleteReminderRequest",
|
|
93
|
-
}) as any as S.Schema<DeleteReminderRequest>;
|
|
79
|
+
).annotate({ identifier: "DeleteReminderRequest" }) as any as S.Schema<DeleteReminderRequest>;
|
|
94
80
|
|
|
95
81
|
export interface DeleteReminderResponse {
|
|
96
82
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -100,9 +86,7 @@ export const DeleteReminderResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
100
86
|
S.Struct({
|
|
101
87
|
ok: S.Boolean,
|
|
102
88
|
}),
|
|
103
|
-
).annotate({
|
|
104
|
-
identifier: "DeleteReminderResponse",
|
|
105
|
-
}) as any as S.Schema<DeleteReminderResponse>;
|
|
89
|
+
).annotate({ identifier: "DeleteReminderResponse" }) as any as S.Schema<DeleteReminderResponse>;
|
|
106
90
|
|
|
107
91
|
export interface ListRemindersRequest {
|
|
108
92
|
/** Encoded team id, required if org token is passed */
|
|
@@ -112,9 +96,7 @@ export const ListRemindersRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
112
96
|
S.Struct({
|
|
113
97
|
team_id: S.optional(S.String.pipe(T.Query())),
|
|
114
98
|
}).pipe(T.Http({ method: "GET", uri: "/reminders.list", code: 200 })),
|
|
115
|
-
).annotate({
|
|
116
|
-
identifier: "ListRemindersRequest",
|
|
117
|
-
}) as any as S.Schema<ListRemindersRequest>;
|
|
99
|
+
).annotate({ identifier: "ListRemindersRequest" }) as any as S.Schema<ListRemindersRequest>;
|
|
118
100
|
|
|
119
101
|
export type ListRemindersResponseRemindersList = Array<unknown>;
|
|
120
102
|
export const ListRemindersResponseRemindersList = /*@__PURE__*/ S.Array(
|
|
@@ -131,9 +113,7 @@ export const ListRemindersResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
131
113
|
ok: S.Boolean,
|
|
132
114
|
reminders: S.optional(ListRemindersResponseRemindersList),
|
|
133
115
|
}),
|
|
134
|
-
).annotate({
|
|
135
|
-
identifier: "ListRemindersResponse",
|
|
136
|
-
}) as any as S.Schema<ListRemindersResponse>;
|
|
116
|
+
).annotate({ identifier: "ListRemindersResponse" }) as any as S.Schema<ListRemindersResponse>;
|
|
137
117
|
|
|
138
118
|
export interface RemindersInfoRequest {
|
|
139
119
|
/** The ID of the reminder */
|
|
@@ -146,9 +126,7 @@ export const RemindersInfoRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
146
126
|
reminder: S.String.pipe(T.Query()),
|
|
147
127
|
team_id: S.optional(S.String.pipe(T.Query())),
|
|
148
128
|
}).pipe(T.Http({ method: "GET", uri: "/reminders.info", code: 200 })),
|
|
149
|
-
).annotate({
|
|
150
|
-
identifier: "RemindersInfoRequest",
|
|
151
|
-
}) as any as S.Schema<RemindersInfoRequest>;
|
|
129
|
+
).annotate({ identifier: "RemindersInfoRequest" }) as any as S.Schema<RemindersInfoRequest>;
|
|
152
130
|
|
|
153
131
|
export interface RemindersInfoResponse {
|
|
154
132
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -160,9 +138,7 @@ export const RemindersInfoResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
160
138
|
ok: S.Boolean,
|
|
161
139
|
reminder: S.Unknown,
|
|
162
140
|
}),
|
|
163
|
-
).annotate({
|
|
164
|
-
identifier: "RemindersInfoResponse",
|
|
165
|
-
}) as any as S.Schema<RemindersInfoResponse>;
|
|
141
|
+
).annotate({ identifier: "RemindersInfoResponse" }) as any as S.Schema<RemindersInfoResponse>;
|
|
166
142
|
|
|
167
143
|
export type AddReminderError = SlackOpError;
|
|
168
144
|
/** Creates a reminder. Required scopes — user: `reminders:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `cannot_add_bot` — Reminders can't be sent to bots. - `cannot_add_others` — Guests can't set reminders for other team members. - `cannot_add_others_recurring` — Recurring reminders can't be set for other team members. - `cannot_add_profile_only_user` — Reminders can't be sent to profile only users. - `cannot_add_slackbot` — Reminders can't be sent to Slackbot. - `cannot_parse` — The phrasing of the timing for this reminder is unclear. You must include a complete time description. Some examples that work: `1458678068`, `20`, `in 5 minutes`, `tomorrow`, `at 3:30pm`, `on Tuesday`, or `next week`. - `missing_argument` — An argument is missing. - `user_not_found` — That user can't be found. See https://docs.slack.dev/reference/methods/reminders.add */
|
package/src/services/rtm.ts
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
1
2
|
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
|
|
2
3
|
import * as S from "@distilled.cloud/core/schema";
|
|
3
|
-
import * as API from "@distilled.cloud/core/api";
|
|
4
|
-
import * as T from "../traits.ts";
|
|
5
|
-
import {
|
|
6
|
-
SlackProtocol,
|
|
7
|
-
type SlackOpError,
|
|
8
|
-
type SlackOpContext,
|
|
9
|
-
} from "../protocol.ts";
|
|
10
4
|
import { SlackError, SlackRateLimited } from "../errors.ts";
|
|
5
|
+
import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
|
|
11
6
|
import * as Retry from "../retry.ts";
|
|
7
|
+
import * as T from "../traits.ts";
|
|
12
8
|
|
|
13
9
|
export type { SlackOpError, SlackOpContext };
|
|
14
10
|
|
|
@@ -23,9 +19,7 @@ export const ConnectRtmRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
23
19
|
batch_presence_aware: S.optional(S.Boolean.pipe(T.Query())),
|
|
24
20
|
presence_sub: S.optional(S.Boolean.pipe(T.Query())),
|
|
25
21
|
}).pipe(T.Http({ method: "GET", uri: "/rtm.connect", code: 200 })),
|
|
26
|
-
).annotate({
|
|
27
|
-
identifier: "ConnectRtmRequest",
|
|
28
|
-
}) as any as S.Schema<ConnectRtmRequest>;
|
|
22
|
+
).annotate({ identifier: "ConnectRtmRequest" }) as any as S.Schema<ConnectRtmRequest>;
|
|
29
23
|
|
|
30
24
|
export interface ConnectRtmResponseSelf {
|
|
31
25
|
id: string;
|
|
@@ -36,9 +30,7 @@ export const ConnectRtmResponseSelf = /*@__PURE__*/ S.suspend(() =>
|
|
|
36
30
|
id: S.String,
|
|
37
31
|
name: S.String,
|
|
38
32
|
}),
|
|
39
|
-
).annotate({
|
|
40
|
-
identifier: "ConnectRtmResponseSelf",
|
|
41
|
-
}) as any as S.Schema<ConnectRtmResponseSelf>;
|
|
33
|
+
).annotate({ identifier: "ConnectRtmResponseSelf" }) as any as S.Schema<ConnectRtmResponseSelf>;
|
|
42
34
|
|
|
43
35
|
export interface ConnectRtmResponseTeam {
|
|
44
36
|
domain: string;
|
|
@@ -55,9 +47,7 @@ export const ConnectRtmResponseTeam = /*@__PURE__*/ S.suspend(() =>
|
|
|
55
47
|
enterprise_id: S.optional(S.String),
|
|
56
48
|
enterprise_name: S.optional(S.String),
|
|
57
49
|
}),
|
|
58
|
-
).annotate({
|
|
59
|
-
identifier: "ConnectRtmResponseTeam",
|
|
60
|
-
}) as any as S.Schema<ConnectRtmResponseTeam>;
|
|
50
|
+
).annotate({ identifier: "ConnectRtmResponseTeam" }) as any as S.Schema<ConnectRtmResponseTeam>;
|
|
61
51
|
|
|
62
52
|
export interface ConnectRtmResponse {
|
|
63
53
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -73,9 +63,7 @@ export const ConnectRtmResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
73
63
|
self: ConnectRtmResponseSelf,
|
|
74
64
|
team: ConnectRtmResponseTeam,
|
|
75
65
|
}),
|
|
76
|
-
).annotate({
|
|
77
|
-
identifier: "ConnectRtmResponse",
|
|
78
|
-
}) as any as S.Schema<ConnectRtmResponse>;
|
|
66
|
+
).annotate({ identifier: "ConnectRtmResponse" }) as any as S.Schema<ConnectRtmResponse>;
|
|
79
67
|
|
|
80
68
|
export interface StartRtmRequest {
|
|
81
69
|
/** Return timestamp only for latest message object of each channel (improves performance). */
|
|
@@ -103,9 +91,7 @@ export const StartRtmRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
103
91
|
no_latest: S.optional(S.Boolean.pipe(T.Query())),
|
|
104
92
|
include_locale: S.optional(S.Boolean.pipe(T.Query())),
|
|
105
93
|
}).pipe(T.Http({ method: "GET", uri: "/rtm.start", code: 200 })),
|
|
106
|
-
).annotate({
|
|
107
|
-
identifier: "StartRtmRequest",
|
|
108
|
-
}) as any as S.Schema<StartRtmRequest>;
|
|
94
|
+
).annotate({ identifier: "StartRtmRequest" }) as any as S.Schema<StartRtmRequest>;
|
|
109
95
|
|
|
110
96
|
export type StartRtmResponseSelf = ConnectRtmResponseSelf;
|
|
111
97
|
export const StartRtmResponseSelf = ConnectRtmResponseSelf;
|
|
@@ -127,9 +113,7 @@ export const StartRtmResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
127
113
|
self: ConnectRtmResponseSelf,
|
|
128
114
|
team: ConnectRtmResponseTeam,
|
|
129
115
|
}),
|
|
130
|
-
).annotate({
|
|
131
|
-
identifier: "StartRtmResponse",
|
|
132
|
-
}) as any as S.Schema<StartRtmResponse>;
|
|
116
|
+
).annotate({ identifier: "StartRtmResponse" }) as any as S.Schema<StartRtmResponse>;
|
|
133
117
|
|
|
134
118
|
export type ConnectRtmError = SlackOpError;
|
|
135
119
|
/** Starts a Real Time Messaging session. Rate limit tier: 1 Method-specific errors (the `error` slug on the SlackError): - `migration_in_progress` — Team is being migrated between servers. See [the `team_migration_started` event documentation](/reference/events/team_migration_started) for details. See https://docs.slack.dev/reference/methods/rtm.connect */
|
package/src/services/search.ts
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
1
2
|
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
|
|
2
3
|
import * as S from "@distilled.cloud/core/schema";
|
|
3
|
-
import * as API from "@distilled.cloud/core/api";
|
|
4
|
-
import * as T from "../traits.ts";
|
|
5
|
-
import {
|
|
6
|
-
SlackProtocol,
|
|
7
|
-
type SlackOpError,
|
|
8
|
-
type SlackOpContext,
|
|
9
|
-
} from "../protocol.ts";
|
|
10
4
|
import { SlackError, SlackRateLimited } from "../errors.ts";
|
|
5
|
+
import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
|
|
11
6
|
import * as Retry from "../retry.ts";
|
|
7
|
+
import * as T from "../traits.ts";
|
|
12
8
|
|
|
13
9
|
export type { SlackOpError, SlackOpContext };
|
|
14
10
|
|
|
@@ -39,9 +35,7 @@ export const SearchAllRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
39
35
|
sort_dir: S.optional(SearchAllRequestSortDir.pipe(T.Query())),
|
|
40
36
|
team_id: S.optional(S.String.pipe(T.Query())),
|
|
41
37
|
}).pipe(T.Http({ method: "GET", uri: "/search.all", code: 200 })),
|
|
42
|
-
).annotate({
|
|
43
|
-
identifier: "SearchAllRequest",
|
|
44
|
-
}) as any as S.Schema<SearchAllRequest>;
|
|
38
|
+
).annotate({ identifier: "SearchAllRequest" }) as any as S.Schema<SearchAllRequest>;
|
|
45
39
|
|
|
46
40
|
export interface SearchAllResponse {
|
|
47
41
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -62,9 +56,7 @@ export const SearchAllResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
62
56
|
posts: S.optional(S.Unknown),
|
|
63
57
|
query: S.optional(S.String),
|
|
64
58
|
}),
|
|
65
|
-
).annotate({
|
|
66
|
-
identifier: "SearchAllResponse",
|
|
67
|
-
}) as any as S.Schema<SearchAllResponse>;
|
|
59
|
+
).annotate({ identifier: "SearchAllResponse" }) as any as S.Schema<SearchAllResponse>;
|
|
68
60
|
|
|
69
61
|
export type SearchFilesRequestSortDir = "asc" | "desc";
|
|
70
62
|
export const SearchFilesRequestSortDir = S.String;
|
|
@@ -93,15 +85,12 @@ export const SearchFilesRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
93
85
|
sort_dir: S.optional(SearchFilesRequestSortDir.pipe(T.Query())),
|
|
94
86
|
team_id: S.optional(S.String.pipe(T.Query())),
|
|
95
87
|
}).pipe(T.Http({ method: "GET", uri: "/search.files", code: 200 })),
|
|
96
|
-
).annotate({
|
|
97
|
-
identifier: "SearchFilesRequest",
|
|
98
|
-
}) as any as S.Schema<SearchFilesRequest>;
|
|
88
|
+
).annotate({ identifier: "SearchFilesRequest" }) as any as S.Schema<SearchFilesRequest>;
|
|
99
89
|
|
|
100
90
|
export type SearchFilesResponseFilesPaginationWarningsList = Array<string>;
|
|
101
|
-
export const SearchFilesResponseFilesPaginationWarningsList =
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
) as any as S.Schema<SearchFilesResponseFilesPaginationWarningsList>;
|
|
91
|
+
export const SearchFilesResponseFilesPaginationWarningsList = /*@__PURE__*/ S.Array(
|
|
92
|
+
S.String,
|
|
93
|
+
) as any as S.Schema<SearchFilesResponseFilesPaginationWarningsList>;
|
|
105
94
|
|
|
106
95
|
export interface SearchFilesResponseFilesPagination {
|
|
107
96
|
/** Last result id */
|
|
@@ -183,29 +172,21 @@ export const SearchFilesResponseFiles = /*@__PURE__*/ S.suspend(() =>
|
|
|
183
172
|
total: S.optional(S.Number),
|
|
184
173
|
query_too_long: S.optional(S.Boolean),
|
|
185
174
|
}),
|
|
186
|
-
).annotate({
|
|
187
|
-
identifier: "SearchFilesResponseFiles",
|
|
188
|
-
}) as any as S.Schema<SearchFilesResponseFiles>;
|
|
175
|
+
).annotate({ identifier: "SearchFilesResponseFiles" }) as any as S.Schema<SearchFilesResponseFiles>;
|
|
189
176
|
|
|
190
|
-
export type SearchFilesResponseUsersMap = {
|
|
191
|
-
[key: string]: unknown | undefined;
|
|
192
|
-
};
|
|
177
|
+
export type SearchFilesResponseUsersMap = { [key: string]: unknown | undefined };
|
|
193
178
|
export const SearchFilesResponseUsersMap = /*@__PURE__*/ S.Record(
|
|
194
179
|
S.String,
|
|
195
180
|
S.Unknown,
|
|
196
181
|
) as any as S.Schema<SearchFilesResponseUsersMap>;
|
|
197
182
|
|
|
198
|
-
export type SearchFilesResponseTeamsMap = {
|
|
199
|
-
[key: string]: unknown | undefined;
|
|
200
|
-
};
|
|
183
|
+
export type SearchFilesResponseTeamsMap = { [key: string]: unknown | undefined };
|
|
201
184
|
export const SearchFilesResponseTeamsMap = /*@__PURE__*/ S.Record(
|
|
202
185
|
S.String,
|
|
203
186
|
S.Unknown,
|
|
204
187
|
) as any as S.Schema<SearchFilesResponseTeamsMap>;
|
|
205
188
|
|
|
206
|
-
export type SearchFilesResponseChannelsMap = {
|
|
207
|
-
[key: string]: unknown | undefined;
|
|
208
|
-
};
|
|
189
|
+
export type SearchFilesResponseChannelsMap = { [key: string]: unknown | undefined };
|
|
209
190
|
export const SearchFilesResponseChannelsMap = /*@__PURE__*/ S.Record(
|
|
210
191
|
S.String,
|
|
211
192
|
S.Unknown,
|
|
@@ -217,9 +198,7 @@ export const SearchFilesResponseImsMap = /*@__PURE__*/ S.Record(
|
|
|
217
198
|
S.Unknown,
|
|
218
199
|
) as any as S.Schema<SearchFilesResponseImsMap>;
|
|
219
200
|
|
|
220
|
-
export type SearchFilesResponseGroupsMap = {
|
|
221
|
-
[key: string]: unknown | undefined;
|
|
222
|
-
};
|
|
201
|
+
export type SearchFilesResponseGroupsMap = { [key: string]: unknown | undefined };
|
|
223
202
|
export const SearchFilesResponseGroupsMap = /*@__PURE__*/ S.Record(
|
|
224
203
|
S.String,
|
|
225
204
|
S.Unknown,
|
|
@@ -252,9 +231,7 @@ export const SearchFilesResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
252
231
|
query: S.optional(S.String),
|
|
253
232
|
ignored_exclude_bots_pref: S.optional(S.Boolean),
|
|
254
233
|
}),
|
|
255
|
-
).annotate({
|
|
256
|
-
identifier: "SearchFilesResponse",
|
|
257
|
-
}) as any as S.Schema<SearchFilesResponse>;
|
|
234
|
+
).annotate({ identifier: "SearchFilesResponse" }) as any as S.Schema<SearchFilesResponse>;
|
|
258
235
|
|
|
259
236
|
export type SearchMessagesRequestSortDir = "asc" | "desc" | "";
|
|
260
237
|
export const SearchMessagesRequestSortDir = S.String;
|
|
@@ -287,13 +264,9 @@ export const SearchMessagesRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
287
264
|
sort_dir: S.optional(SearchMessagesRequestSortDir.pipe(T.Query())),
|
|
288
265
|
team_id: S.optional(S.String.pipe(T.Query())),
|
|
289
266
|
}).pipe(T.Http({ method: "GET", uri: "/search.messages", code: 200 })),
|
|
290
|
-
).annotate({
|
|
291
|
-
identifier: "SearchMessagesRequest",
|
|
292
|
-
}) as any as S.Schema<SearchMessagesRequest>;
|
|
267
|
+
).annotate({ identifier: "SearchMessagesRequest" }) as any as S.Schema<SearchMessagesRequest>;
|
|
293
268
|
|
|
294
|
-
export type SearchMessagesResponseUsersMap = {
|
|
295
|
-
[key: string]: unknown | undefined;
|
|
296
|
-
};
|
|
269
|
+
export type SearchMessagesResponseUsersMap = { [key: string]: unknown | undefined };
|
|
297
270
|
export const SearchMessagesResponseUsersMap = /*@__PURE__*/ S.Record(
|
|
298
271
|
S.String,
|
|
299
272
|
S.Unknown,
|
|
@@ -304,12 +277,10 @@ export const SearchMessagesResponseMessagesMatchesList = /*@__PURE__*/ S.Array(
|
|
|
304
277
|
S.Unknown,
|
|
305
278
|
) as any as S.Schema<SearchMessagesResponseMessagesMatchesList>;
|
|
306
279
|
|
|
307
|
-
export type SearchMessagesResponseMessagesPaginationWarningsList =
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
S.String,
|
|
312
|
-
) as any as S.Schema<SearchMessagesResponseMessagesPaginationWarningsList>;
|
|
280
|
+
export type SearchMessagesResponseMessagesPaginationWarningsList = Array<string>;
|
|
281
|
+
export const SearchMessagesResponseMessagesPaginationWarningsList = /*@__PURE__*/ S.Array(
|
|
282
|
+
S.String,
|
|
283
|
+
) as any as S.Schema<SearchMessagesResponseMessagesPaginationWarningsList>;
|
|
313
284
|
|
|
314
285
|
export interface SearchMessagesResponseMessagesPagination {
|
|
315
286
|
/** Last result id */
|
|
@@ -328,29 +299,25 @@ export interface SearchMessagesResponseMessagesPagination {
|
|
|
328
299
|
/** value of next cursor to be passed when using cursormark pagination */
|
|
329
300
|
next_cursor?: string;
|
|
330
301
|
}
|
|
331
|
-
export const SearchMessagesResponseMessagesPagination = /*@__PURE__*/ S.suspend(
|
|
332
|
-
(
|
|
333
|
-
S.
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
first: S.optional(S.Number),
|
|
343
|
-
next_cursor: S.optional(S.String),
|
|
344
|
-
}),
|
|
302
|
+
export const SearchMessagesResponseMessagesPagination = /*@__PURE__*/ S.suspend(() =>
|
|
303
|
+
S.Struct({
|
|
304
|
+
last: S.optional(S.Number),
|
|
305
|
+
warnings: S.optional(SearchMessagesResponseMessagesPaginationWarningsList),
|
|
306
|
+
total_count: S.optional(S.Number),
|
|
307
|
+
page_count: S.optional(S.Number),
|
|
308
|
+
per_page: S.optional(S.Number),
|
|
309
|
+
page: S.optional(S.Number),
|
|
310
|
+
first: S.optional(S.Number),
|
|
311
|
+
next_cursor: S.optional(S.String),
|
|
312
|
+
}),
|
|
345
313
|
).annotate({
|
|
346
314
|
identifier: "SearchMessagesResponseMessagesPagination",
|
|
347
315
|
}) as any as S.Schema<SearchMessagesResponseMessagesPagination>;
|
|
348
316
|
|
|
349
317
|
export type SearchMessagesResponseMessagesPagingWarningsList = Array<string>;
|
|
350
|
-
export const SearchMessagesResponseMessagesPagingWarningsList =
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
) as any as S.Schema<SearchMessagesResponseMessagesPagingWarningsList>;
|
|
318
|
+
export const SearchMessagesResponseMessagesPagingWarningsList = /*@__PURE__*/ S.Array(
|
|
319
|
+
S.String,
|
|
320
|
+
) as any as S.Schema<SearchMessagesResponseMessagesPagingWarningsList>;
|
|
354
321
|
|
|
355
322
|
export interface SearchMessagesResponseMessagesPaging {
|
|
356
323
|
/** Number of results per page */
|
|
@@ -365,16 +332,15 @@ export interface SearchMessagesResponseMessagesPaging {
|
|
|
365
332
|
/** next cursor to be passed to the method for next set of results using cursor pagination */
|
|
366
333
|
next_cursor?: string;
|
|
367
334
|
}
|
|
368
|
-
export const SearchMessagesResponseMessagesPaging = /*@__PURE__*/ S.suspend(
|
|
369
|
-
(
|
|
370
|
-
S.
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
}),
|
|
335
|
+
export const SearchMessagesResponseMessagesPaging = /*@__PURE__*/ S.suspend(() =>
|
|
336
|
+
S.Struct({
|
|
337
|
+
count: S.optional(S.Number),
|
|
338
|
+
total: S.optional(S.Number),
|
|
339
|
+
pages: S.optional(S.Number),
|
|
340
|
+
page: S.optional(S.Number),
|
|
341
|
+
warnings: S.optional(SearchMessagesResponseMessagesPagingWarningsList),
|
|
342
|
+
next_cursor: S.optional(S.String),
|
|
343
|
+
}),
|
|
378
344
|
).annotate({
|
|
379
345
|
identifier: "SearchMessagesResponseMessagesPaging",
|
|
380
346
|
}) as any as S.Schema<SearchMessagesResponseMessagesPaging>;
|
|
@@ -399,17 +365,13 @@ export const SearchMessagesResponseMessages = /*@__PURE__*/ S.suspend(() =>
|
|
|
399
365
|
identifier: "SearchMessagesResponseMessages",
|
|
400
366
|
}) as any as S.Schema<SearchMessagesResponseMessages>;
|
|
401
367
|
|
|
402
|
-
export type SearchMessagesResponseTeamsMap = {
|
|
403
|
-
[key: string]: unknown | undefined;
|
|
404
|
-
};
|
|
368
|
+
export type SearchMessagesResponseTeamsMap = { [key: string]: unknown | undefined };
|
|
405
369
|
export const SearchMessagesResponseTeamsMap = /*@__PURE__*/ S.Record(
|
|
406
370
|
S.String,
|
|
407
371
|
S.Unknown,
|
|
408
372
|
) as any as S.Schema<SearchMessagesResponseTeamsMap>;
|
|
409
373
|
|
|
410
|
-
export type SearchMessagesResponseBotsMap = {
|
|
411
|
-
[key: string]: unknown | undefined;
|
|
412
|
-
};
|
|
374
|
+
export type SearchMessagesResponseBotsMap = { [key: string]: unknown | undefined };
|
|
413
375
|
export const SearchMessagesResponseBotsMap = /*@__PURE__*/ S.Record(
|
|
414
376
|
S.String,
|
|
415
377
|
S.Unknown,
|
|
@@ -420,11 +382,10 @@ export interface SearchMessagesResponseResponseMetadata {
|
|
|
420
382
|
/** Cursor for the next page — pass as `cursor` on the next call. */
|
|
421
383
|
next_cursor?: string;
|
|
422
384
|
}
|
|
423
|
-
export const SearchMessagesResponseResponseMetadata = /*@__PURE__*/ S.suspend(
|
|
424
|
-
(
|
|
425
|
-
S.
|
|
426
|
-
|
|
427
|
-
}),
|
|
385
|
+
export const SearchMessagesResponseResponseMetadata = /*@__PURE__*/ S.suspend(() =>
|
|
386
|
+
S.Struct({
|
|
387
|
+
next_cursor: S.optional(S.String),
|
|
388
|
+
}),
|
|
428
389
|
).annotate({
|
|
429
390
|
identifier: "SearchMessagesResponseResponseMetadata",
|
|
430
391
|
}) as any as S.Schema<SearchMessagesResponseResponseMetadata>;
|
|
@@ -457,9 +418,7 @@ export const SearchMessagesResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
457
418
|
ignored_exclude_bots_pref: S.optional(S.Boolean),
|
|
458
419
|
response_metadata: S.optional(SearchMessagesResponseResponseMetadata),
|
|
459
420
|
}),
|
|
460
|
-
).annotate({
|
|
461
|
-
identifier: "SearchMessagesResponse",
|
|
462
|
-
}) as any as S.Schema<SearchMessagesResponse>;
|
|
421
|
+
).annotate({ identifier: "SearchMessagesResponse" }) as any as S.Schema<SearchMessagesResponse>;
|
|
463
422
|
|
|
464
423
|
export type SearchAllError = SlackOpError;
|
|
465
424
|
/** Searches for messages and files matching a query. Required scopes — user: `search:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `no_query` — No query was provided. See https://docs.slack.dev/reference/methods/search.all */
|
package/src/services/stars.ts
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
1
2
|
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
|
|
2
3
|
import * as S from "@distilled.cloud/core/schema";
|
|
3
|
-
import * as API from "@distilled.cloud/core/api";
|
|
4
|
-
import * as T from "../traits.ts";
|
|
5
|
-
import {
|
|
6
|
-
SlackProtocol,
|
|
7
|
-
type SlackOpError,
|
|
8
|
-
type SlackOpContext,
|
|
9
|
-
} from "../protocol.ts";
|
|
10
|
-
import { slackPaginate } from "../pagination.ts";
|
|
11
4
|
import { SlackError, SlackRateLimited } from "../errors.ts";
|
|
5
|
+
import { slackPaginate } from "../pagination.ts";
|
|
6
|
+
import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
|
|
12
7
|
import * as Retry from "../retry.ts";
|
|
8
|
+
import * as T from "../traits.ts";
|
|
13
9
|
|
|
14
10
|
export type { SlackOpError, SlackOpContext };
|
|
15
11
|
|
|
@@ -40,9 +36,7 @@ export const AddStarResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
40
36
|
S.Struct({
|
|
41
37
|
ok: S.Boolean,
|
|
42
38
|
}),
|
|
43
|
-
).annotate({
|
|
44
|
-
identifier: "AddStarResponse",
|
|
45
|
-
}) as any as S.Schema<AddStarResponse>;
|
|
39
|
+
).annotate({ identifier: "AddStarResponse" }) as any as S.Schema<AddStarResponse>;
|
|
46
40
|
|
|
47
41
|
export interface ListStarsRequest {
|
|
48
42
|
count?: number;
|
|
@@ -62,9 +56,7 @@ export const ListStarsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
62
56
|
page: S.optional(S.Number.pipe(T.Query())),
|
|
63
57
|
team_id: S.optional(S.String.pipe(T.Query())),
|
|
64
58
|
}).pipe(T.Http({ method: "GET", uri: "/stars.list", code: 200 })),
|
|
65
|
-
).annotate({
|
|
66
|
-
identifier: "ListStarsRequest",
|
|
67
|
-
}) as any as S.Schema<ListStarsRequest>;
|
|
59
|
+
).annotate({ identifier: "ListStarsRequest" }) as any as S.Schema<ListStarsRequest>;
|
|
68
60
|
|
|
69
61
|
export type ListStarsResponseItemsItemCase0Type = "message";
|
|
70
62
|
export const ListStarsResponseItemsItemCase0Type = S.String;
|
|
@@ -186,14 +178,17 @@ export type ListStarsResponseItemsItem =
|
|
|
186
178
|
| ListStarsResponseItemsItemCase4
|
|
187
179
|
| ListStarsResponseItemsItemCase5;
|
|
188
180
|
export const ListStarsResponseItemsItem = /*@__PURE__*/ S.Unknown.pipe(
|
|
189
|
-
T.UnionCases(
|
|
190
|
-
[
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
181
|
+
T.UnionCases(
|
|
182
|
+
[
|
|
183
|
+
["type", "channel", "message", "date_create"],
|
|
184
|
+
["type", "file", "date_create"],
|
|
185
|
+
["type", "file", "comment", "date_create"],
|
|
186
|
+
["type", "channel", "date_create"],
|
|
187
|
+
["type", "channel", "date_create"],
|
|
188
|
+
["type", "channel", "date_create"],
|
|
189
|
+
],
|
|
190
|
+
{ key: "type", values: ["message", "file", "file_comment", "channel", "im", "group"] },
|
|
191
|
+
),
|
|
197
192
|
);
|
|
198
193
|
|
|
199
194
|
export type ListStarsResponseItemsList = Array<ListStarsResponseItemsItem>;
|
|
@@ -229,9 +224,7 @@ export const ListStarsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
229
224
|
paging: S.optional(S.Unknown),
|
|
230
225
|
response_metadata: S.optional(ListStarsResponseResponseMetadata),
|
|
231
226
|
}),
|
|
232
|
-
).annotate({
|
|
233
|
-
identifier: "ListStarsResponse",
|
|
234
|
-
}) as any as S.Schema<ListStarsResponse>;
|
|
227
|
+
).annotate({ identifier: "ListStarsResponse" }) as any as S.Schema<ListStarsResponse>;
|
|
235
228
|
|
|
236
229
|
export interface RemoveStarRequest {
|
|
237
230
|
/** Channel to remove star from, or channel where the message to remove star from was posted (used with `timestamp`). */
|
|
@@ -250,9 +243,7 @@ export const RemoveStarRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
250
243
|
file_comment: S.optional(S.String),
|
|
251
244
|
timestamp: S.optional(S.String),
|
|
252
245
|
}).pipe(T.Http({ method: "POST", uri: "/stars.remove", code: 200 })),
|
|
253
|
-
).annotate({
|
|
254
|
-
identifier: "RemoveStarRequest",
|
|
255
|
-
}) as any as S.Schema<RemoveStarRequest>;
|
|
246
|
+
).annotate({ identifier: "RemoveStarRequest" }) as any as S.Schema<RemoveStarRequest>;
|
|
256
247
|
|
|
257
248
|
export interface RemoveStarResponse {
|
|
258
249
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -262,9 +253,7 @@ export const RemoveStarResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
262
253
|
S.Struct({
|
|
263
254
|
ok: S.Boolean,
|
|
264
255
|
}),
|
|
265
|
-
).annotate({
|
|
266
|
-
identifier: "RemoveStarResponse",
|
|
267
|
-
}) as any as S.Schema<RemoveStarResponse>;
|
|
256
|
+
).annotate({ identifier: "RemoveStarResponse" }) as any as S.Schema<RemoveStarResponse>;
|
|
268
257
|
|
|
269
258
|
export type AddStarError = SlackOpError;
|
|
270
259
|
/** 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 */
|