@distilled.cloud/slack 1.0.0-rc.14 → 1.0.0-rc.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/lib/credentials.d.ts +1 -1
  2. package/lib/credentials.d.ts.map +1 -1
  3. package/lib/credentials.js +39 -34
  4. package/lib/credentials.js.map +1 -1
  5. package/lib/errors.d.ts +31 -31
  6. package/lib/errors.d.ts.map +1 -1
  7. package/lib/errors.js +41 -41
  8. package/lib/errors.js.map +1 -1
  9. package/lib/index.d.ts +1 -1
  10. package/lib/index.js +9 -9
  11. package/lib/pagination.d.ts +2 -2
  12. package/lib/pagination.js +28 -28
  13. package/lib/protocol.d.ts.map +1 -1
  14. package/lib/protocol.js +61 -59
  15. package/lib/protocol.js.map +1 -1
  16. package/lib/retry.d.ts +2 -2
  17. package/lib/retry.d.ts.map +1 -1
  18. package/lib/retry.js +34 -33
  19. package/lib/retry.js.map +1 -1
  20. package/lib/services/admin.d.ts +123 -575
  21. package/lib/services/admin.d.ts.map +1 -1
  22. package/lib/services/admin.js +304 -2878
  23. package/lib/services/agents.d.ts +13 -55
  24. package/lib/services/agents.d.ts.map +1 -1
  25. package/lib/services/agents.js +48 -309
  26. package/lib/services/api.d.ts +0 -4
  27. package/lib/services/api.d.ts.map +1 -1
  28. package/lib/services/api.js +16 -18
  29. package/lib/services/apps.d.ts +25 -106
  30. package/lib/services/apps.d.ts.map +1 -1
  31. package/lib/services/apps.js +84 -509
  32. package/lib/services/assistant.d.ts +6 -40
  33. package/lib/services/assistant.d.ts.map +1 -1
  34. package/lib/services/assistant.js +33 -204
  35. package/lib/services/auth.d.ts +4 -15
  36. package/lib/services/auth.d.ts.map +1 -1
  37. package/lib/services/auth.js +22 -90
  38. package/lib/services/blocks.d.ts +1 -7
  39. package/lib/services/blocks.d.ts.map +1 -1
  40. package/lib/services/blocks.js +16 -21
  41. package/lib/services/bookmarks.d.ts +4 -15
  42. package/lib/services/bookmarks.d.ts.map +1 -1
  43. package/lib/services/bookmarks.js +27 -76
  44. package/lib/services/bots.d.ts +1 -9
  45. package/lib/services/bots.d.ts.map +1 -1
  46. package/lib/services/bots.js +17 -54
  47. package/lib/services/calls.d.ts +6 -22
  48. package/lib/services/calls.d.ts.map +1 -1
  49. package/lib/services/calls.js +35 -110
  50. package/lib/services/canvases.d.ts +7 -35
  51. package/lib/services/canvases.d.ts.map +1 -1
  52. package/lib/services/canvases.js +39 -135
  53. package/lib/services/chat.d.ts +14 -83
  54. package/lib/services/chat.d.ts.map +1 -1
  55. package/lib/services/chat.js +59 -381
  56. package/lib/services/conversations.d.ts +31 -116
  57. package/lib/services/conversations.d.ts.map +1 -1
  58. package/lib/services/conversations.js +94 -690
  59. package/lib/services/dialog.d.ts +1 -4
  60. package/lib/services/dialog.d.ts.map +1 -1
  61. package/lib/services/dialog.js +13 -17
  62. package/lib/services/dnd.d.ts +5 -17
  63. package/lib/services/dnd.d.ts.map +1 -1
  64. package/lib/services/dnd.js +26 -91
  65. package/lib/services/emoji.d.ts +1 -8
  66. package/lib/services/emoji.d.ts.map +1 -1
  67. package/lib/services/emoji.js +18 -29
  68. package/lib/services/entity.d.ts +4 -16
  69. package/lib/services/entity.d.ts.map +1 -1
  70. package/lib/services/entity.js +29 -71
  71. package/lib/services/files.d.ts +16 -80
  72. package/lib/services/files.d.ts.map +1 -1
  73. package/lib/services/files.js +75 -433
  74. package/lib/services/functions.d.ts +8 -49
  75. package/lib/services/functions.d.ts.map +1 -1
  76. package/lib/services/functions.js +45 -203
  77. package/lib/services/lists.d.ts +13 -55
  78. package/lib/services/lists.d.ts.map +1 -1
  79. package/lib/services/lists.js +53 -248
  80. package/lib/services/migration.d.ts +1 -7
  81. package/lib/services/migration.d.ts.map +1 -1
  82. package/lib/services/migration.js +18 -27
  83. package/lib/services/oauth.d.ts +7 -43
  84. package/lib/services/oauth.d.ts.map +1 -1
  85. package/lib/services/oauth.js +34 -289
  86. package/lib/services/openid.d.ts +3 -10
  87. package/lib/services/openid.d.ts.map +1 -1
  88. package/lib/services/openid.js +19 -79
  89. package/lib/services/pins.d.ts +3 -13
  90. package/lib/services/pins.d.ts.map +1 -1
  91. package/lib/services/pins.js +27 -61
  92. package/lib/services/reactions.d.ts +5 -17
  93. package/lib/services/reactions.d.ts.map +1 -1
  94. package/lib/services/reactions.js +30 -96
  95. package/lib/services/reminders.d.ts +5 -17
  96. package/lib/services/reminders.d.ts.map +1 -1
  97. package/lib/services/reminders.js +33 -83
  98. package/lib/services/rtm.d.ts +2 -11
  99. package/lib/services/rtm.d.ts.map +1 -1
  100. package/lib/services/rtm.js +22 -56
  101. package/lib/services/search.d.ts +4 -35
  102. package/lib/services/search.d.ts.map +1 -1
  103. package/lib/services/search.js +28 -167
  104. package/lib/services/stars.d.ts +4 -26
  105. package/lib/services/stars.d.ts.map +1 -1
  106. package/lib/services/stars.js +28 -128
  107. package/lib/services/team.d.ts +11 -63
  108. package/lib/services/team.d.ts.map +1 -1
  109. package/lib/services/team.js +45 -289
  110. package/lib/services/tooling.d.ts +2 -5
  111. package/lib/services/tooling.d.ts.map +1 -1
  112. package/lib/services/tooling.js +15 -28
  113. package/lib/services/usergroups.d.ts +7 -31
  114. package/lib/services/usergroups.d.ts.map +1 -1
  115. package/lib/services/usergroups.js +40 -146
  116. package/lib/services/users.d.ts +14 -48
  117. package/lib/services/users.d.ts.map +1 -1
  118. package/lib/services/users.js +54 -249
  119. package/lib/services/views.d.ts +4 -14
  120. package/lib/services/views.d.ts.map +1 -1
  121. package/lib/services/views.js +28 -73
  122. package/lib/services/workflows.d.ts +8 -51
  123. package/lib/services/workflows.d.ts.map +1 -1
  124. package/lib/services/workflows.js +37 -188
  125. package/lib/traits.d.ts +1 -1
  126. package/lib/traits.js +8 -8
  127. package/package.json +14 -10
  128. package/src/credentials.ts +20 -21
  129. package/src/errors.ts +31 -27
  130. package/src/index.ts +1 -1
  131. package/src/pagination.ts +2 -2
  132. package/src/protocol.ts +30 -29
  133. package/src/retry.ts +6 -6
  134. package/src/services/admin.ts +2717 -3451
  135. package/src/services/agents.ts +380 -370
  136. package/src/services/api.ts +31 -21
  137. package/src/services/apps.ts +569 -621
  138. package/src/services/assistant.ts +235 -270
  139. package/src/services/auth.ts +118 -100
  140. package/src/services/blocks.ts +33 -29
  141. package/src/services/bookmarks.ts +101 -83
  142. package/src/services/bots.ts +74 -67
  143. package/src/services/calls.ts +118 -124
  144. package/src/services/canvases.ts +171 -178
  145. package/src/services/chat.ts +428 -496
  146. package/src/services/conversations.ts +675 -761
  147. package/src/services/dialog.ts +30 -17
  148. package/src/services/dnd.ts +125 -99
  149. package/src/services/emoji.ts +46 -42
  150. package/src/services/entity.ts +94 -92
  151. package/src/services/files.ts +536 -531
  152. package/src/services/functions.ts +209 -274
  153. package/src/services/lists.ts +289 -304
  154. package/src/services/migration.ts +39 -37
  155. package/src/services/oauth.ts +345 -361
  156. package/src/services/openid.ts +137 -122
  157. package/src/services/pins.ts +83 -70
  158. package/src/services/reactions.ts +119 -103
  159. package/src/services/reminders.ts +112 -90
  160. package/src/services/rtm.ts +73 -65
  161. package/src/services/search.ts +193 -244
  162. package/src/services/stars.ts +101 -160
  163. package/src/services/team.ts +333 -369
  164. package/src/services/tooling.ts +43 -30
  165. package/src/services/usergroups.ts +175 -179
  166. package/src/services/users.ts +301 -268
  167. package/src/services/views.ts +85 -80
  168. package/src/services/workflows.ts +184 -269
  169. package/src/traits.ts +1 -1
  170. package/lib/protocol.test.d.ts +0 -2
  171. package/lib/protocol.test.d.ts.map +0 -1
  172. package/lib/protocol.test.js +0 -288
  173. package/lib/protocol.test.js.map +0 -1
  174. package/lib/services/admin.js.map +0 -1
  175. package/lib/services/agents.js.map +0 -1
  176. package/lib/services/api.js.map +0 -1
  177. package/lib/services/apps.js.map +0 -1
  178. package/lib/services/assistant.js.map +0 -1
  179. package/lib/services/auth.js.map +0 -1
  180. package/lib/services/blocks.js.map +0 -1
  181. package/lib/services/bookmarks.js.map +0 -1
  182. package/lib/services/bots.js.map +0 -1
  183. package/lib/services/calls.js.map +0 -1
  184. package/lib/services/canvases.js.map +0 -1
  185. package/lib/services/chat.js.map +0 -1
  186. package/lib/services/conversations.js.map +0 -1
  187. package/lib/services/dialog.js.map +0 -1
  188. package/lib/services/dnd.js.map +0 -1
  189. package/lib/services/emoji.js.map +0 -1
  190. package/lib/services/entity.js.map +0 -1
  191. package/lib/services/files.js.map +0 -1
  192. package/lib/services/functions.js.map +0 -1
  193. package/lib/services/lists.js.map +0 -1
  194. package/lib/services/migration.js.map +0 -1
  195. package/lib/services/oauth.js.map +0 -1
  196. package/lib/services/openid.js.map +0 -1
  197. package/lib/services/pins.js.map +0 -1
  198. package/lib/services/reactions.js.map +0 -1
  199. package/lib/services/reminders.js.map +0 -1
  200. package/lib/services/rtm.js.map +0 -1
  201. package/lib/services/search.js.map +0 -1
  202. package/lib/services/stars.js.map +0 -1
  203. package/lib/services/team.js.map +0 -1
  204. package/lib/services/tooling.js.map +0 -1
  205. package/lib/services/usergroups.js.map +0 -1
  206. package/lib/services/users.js.map +0 -1
  207. package/lib/services/views.js.map +0 -1
  208. package/lib/services/workflows.js.map +0 -1
  209. package/src/protocol.test.ts +0 -372
@@ -1,67 +1,33 @@
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 { SlackProtocol } from "../protocol.js";
6
7
  import * as Retry from "../retry.js";
7
8
  import * as T from "../traits.js";
8
- export const AddPinRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
9
- channel: S.String,
10
- timestamp: S.optional(S.String),
11
- }).pipe(T.Http({ method: "POST", uri: "/pins.add", code: 200 }))).annotate({ identifier: "AddPinRequest" });
12
- export const AddPinResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
13
- ok: S.Boolean,
14
- })).annotate({ identifier: "AddPinResponse" });
15
- export const ListPinsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
16
- channel: S.String.pipe(T.Query()),
17
- }).pipe(T.Http({ method: "GET", uri: "/pins.list", code: 200 }))).annotate({ identifier: "ListPinsRequest" });
18
- export const ListPinsResponseItemsItemType = S.String;
19
- export const ListPinsResponseItemsItem = /*@__PURE__*/ S.suspend(() => S.Struct({
20
- type: ListPinsResponseItemsItemType,
21
- created: S.Number,
22
- created_by: S.String,
23
- channel: S.optional(S.String),
24
- message: S.optional(S.Unknown),
25
- file: S.optional(S.Unknown),
26
- comment: S.optional(S.String),
27
- })).annotate({
28
- identifier: "ListPinsResponseItemsItem",
29
- });
30
- export const ListPinsResponseItemsList = /*@__PURE__*/ S.Array(ListPinsResponseItemsItem);
31
- export const ListPinsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
32
- ok: S.Boolean,
33
- items: S.optional(ListPinsResponseItemsList),
34
- count: S.optional(S.Number),
35
- })).annotate({ identifier: "ListPinsResponse" });
36
- export const RemovePinRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
37
- channel: S.String,
38
- timestamp: S.optional(S.String),
39
- }).pipe(T.Http({ method: "POST", uri: "/pins.remove", code: 200 }))).annotate({ identifier: "RemovePinRequest" });
40
- export const RemovePinResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
41
- ok: S.Boolean,
42
- })).annotate({ identifier: "RemovePinResponse" });
43
- /** Pins an item to a channel. Required scopes — bot: `pins:write`; user: `pins:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `already_pinned` — The specified item is already pinned to the channel. - `bad_timestamp` — Value passed for `timestamp` was invalid. - `channel_not_found` — The `channel` argument was not specified or was invalid - `external_channel_migrating` — Channel is undergoing an active migration. - `file_not_found` — File not found. - `file_not_shared` — File specified by `file` is not public nor shared to the channel. - `message_not_found` — Message specified by `channel` and `timestamp` does not exist. - `no_item_specified` — One of `file`, `file_comment`, or `timestamp` was not specified. - `not_in_channel` — Item is not in channel. - `not_pinnable` — This message type is not pinnable. - `restricted_action` — The user does not have permission to add pins to the channel. - `too_many_pins` — Too many pins in channel. See https://docs.slack.dev/reference/methods/pins.add */
44
- export const addPin = /*@__PURE__*/ API.make(() => ({
45
- input: AddPinRequest,
46
- output: AddPinResponse,
47
- errors: [SlackError, SlackRateLimited],
48
- protocol: SlackProtocol,
49
- retry: Retry.Retry,
50
- }));
51
- /** Lists items pinned to a channel. Required scopes — bot: `pins:read`; user: `pins:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` — Value passed for `channel` was invalid. - `restricted_action` — The user does not have permission to view the channel. See https://docs.slack.dev/reference/methods/pins.list */
52
- export const listPins = /*@__PURE__*/ API.make(() => ({
53
- input: ListPinsRequest,
54
- output: ListPinsResponse,
55
- errors: [SlackError, SlackRateLimited],
56
- protocol: SlackProtocol,
57
- retry: Retry.Retry,
58
- }));
59
- /** Un-pins an item from a channel. Required scopes — bot: `pins:write`; user: `pins: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` — The `channel` argument was not specified or was invalid - `external_channel_migrating` — Channel is undergoing an 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` — One of `file`, `file_comment`, or `timestamp` was not specified. - `no_pin` — The pin could not be found. - `not_pinned` — The specified item is not pinned to the channel. - `restricted_action` — The user does not have permission to remove pins from the channel. See https://docs.slack.dev/reference/methods/pins.remove */
60
- export const removePin = /*@__PURE__*/ API.make(() => ({
61
- input: RemovePinRequest,
62
- output: RemovePinResponse,
63
- errors: [SlackError, SlackRateLimited],
64
- protocol: SlackProtocol,
65
- retry: Retry.Retry,
66
- }));
67
- //# sourceMappingURL=pins.js.map
9
+ const __0 = __L.at;
10
+ const __1 = T.Http;
11
+ const __2 = S.String;
12
+ const __3 = S.optional;
13
+ const __4 = S.Struct;
14
+ const __5 = S.suspend;
15
+ const __6 = S.Boolean;
16
+ const __7 = T.Query;
17
+ const __8 = S.Number;
18
+ const __9 = S.Unknown;
19
+ const __10 = S.Array;
20
+
21
+ export const addPin = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:0,errors:[$7,$8],protocol:$9,retry:$10};$5(>2)@"AddPinRequest";$4({channel:$2,timestamp:$3($2)}).pipe($1({method:"POST",uri:"/pins.add",code:200}))', [__0, __1, __2, __3, __4, __5, __d0, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(addPin, i));
22
+
23
+ export const listPins = /*@__PURE__*/ API.op((i) => i === API.D ? API.named("ListPinsResponse", '{input:#1,output:#4,errors:[$11,$12],protocol:$13,retry:$14};$5(>5)@"ListPinsRequest";$5(>6)@"%ItemsItem";$9(#2);$5(>7)@"%";$4({channel:$3.pipe($2())}).pipe($1({method:"GET",uri:"/pins.list",code:200}));$4({type:$3,created:$6,created_by:$3,channel:$7($3),message:$7($8),file:$7($8),comment:$7($3)});$4({ok:$10,items:$7(#3),count:$7($6)})', [__0, __1, __7, __2, __4, __5, __8, __3, __9, __10, __6, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]) : API.call(listPins, i));
24
+
25
+ export const removePin = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:0,errors:[$7,$8],protocol:$9,retry:$10};$5(>2)@"RemovePinRequest";$4({channel:$2,timestamp:$3($2)}).pipe($1({method:"POST",uri:"/pins.remove",code:200}))', [__0, __1, __2, __3, __4, __5, __d0, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(removePin, i));
26
+ // Schema builders: each runs one schema initializer, on that schema's first use.
27
+ // Schema table: entry i is schema j of builder f, made on first reach.
28
+
29
+
30
+ // Shared schema data (see `op` in core/api).
31
+ function __d0() {
32
+ return ['$3(>1)@"AddPinResponse";$2({ok:$1})', [__0, __6, __4, __5]];
33
+ }
@@ -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 AddReactionRequest {
@@ -10,12 +9,10 @@ export interface AddReactionRequest {
10
9
  /** Timestamp of the message to add reaction to. */
11
10
  timestamp: string;
12
11
  }
13
- export declare const AddReactionRequest: S.Schema<AddReactionRequest>;
14
12
  export interface AddReactionResponse {
15
13
  /** Always `true` (a failed call raises a typed error instead). */
16
14
  ok: boolean;
17
15
  }
18
- export declare const AddReactionResponse: S.Schema<AddReactionResponse>;
19
16
  export interface GetReactionRequest {
20
17
  /** Channel where the message to get reactions for was posted. */
21
18
  channel?: string;
@@ -28,7 +25,6 @@ export interface GetReactionRequest {
28
25
  /** Timestamp of the message to get reactions for. */
29
26
  timestamp?: string;
30
27
  }
31
- export declare const GetReactionRequest: S.Schema<GetReactionRequest>;
32
28
  export interface GetReactionResponse {
33
29
  /** Always `true` (a failed call raises a typed error instead). */
34
30
  ok: boolean;
@@ -38,7 +34,6 @@ export interface GetReactionResponse {
38
34
  channel?: string;
39
35
  file?: unknown;
40
36
  }
41
- export declare const GetReactionResponse: S.Schema<GetReactionResponse>;
42
37
  export interface ListReactionsRequest {
43
38
  /** Show reactions made by this user. Defaults to the authed user. */
44
39
  user?: string;
@@ -53,19 +48,15 @@ export interface ListReactionsRequest {
53
48
  /** encoded team id to list reactions in, required if org token is used */
54
49
  team_id?: string;
55
50
  }
56
- export declare const ListReactionsRequest: S.Schema<ListReactionsRequest>;
57
51
  export type ListReactionsResponseItemsItemMap = {
58
52
  [key: string]: unknown | undefined;
59
53
  };
60
- export declare const ListReactionsResponseItemsItemMap: S.Schema<ListReactionsResponseItemsItemMap>;
61
54
  export type ListReactionsResponseItemsList = Array<ListReactionsResponseItemsItemMap>;
62
- export declare const ListReactionsResponseItemsList: S.Schema<ListReactionsResponseItemsList>;
63
55
  /** Pagination metadata. An empty `next_cursor` means the last page. */
64
56
  export interface ListReactionsResponseResponseMetadata {
65
- /** Cursor for the next page — pass as `cursor` on the next call. */
57
+ /** Cursor for the next page -- pass as `cursor` on the next call. */
66
58
  next_cursor?: string;
67
59
  }
68
- export declare const ListReactionsResponseResponseMetadata: S.Schema<ListReactionsResponseResponseMetadata>;
69
60
  export interface ListReactionsResponse {
70
61
  /** Always `true` (a failed call raises a typed error instead). */
71
62
  ok: boolean;
@@ -74,7 +65,6 @@ export interface ListReactionsResponse {
74
65
  /** Pagination metadata. An empty `next_cursor` means the last page. */
75
66
  response_metadata?: ListReactionsResponseResponseMetadata;
76
67
  }
77
- export declare const ListReactionsResponse: S.Schema<ListReactionsResponse>;
78
68
  export interface RemoveReactionRequest {
79
69
  /** Reaction (emoji) name. */
80
70
  name: string;
@@ -87,22 +77,20 @@ export interface RemoveReactionRequest {
87
77
  /** Timestamp of the message to remove reaction from. */
88
78
  timestamp?: string;
89
79
  }
90
- export declare const RemoveReactionRequest: S.Schema<RemoveReactionRequest>;
91
80
  export interface RemoveReactionResponse {
92
81
  /** Always `true` (a failed call raises a typed error instead). */
93
82
  ok: boolean;
94
83
  }
95
- export declare const RemoveReactionResponse: S.Schema<RemoveReactionResponse>;
96
84
  export type AddReactionError = SlackOpError;
97
- /** Adds a reaction to an item. Required scopes — bot: `reactions:write`; user: `reactions:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `already_reacted` — The specified item already has the user/reaction combination. - `bad_timestamp` — Value passed for `timestamp` was invalid. - `channel_not_found` — Value passed for `channel` is invalid. - `external_channel_migrating` — The channel is in the process of being migrated. - `invalid_name` — Value passed for `name` was invalid. - `is_archived` — Channel specified has been archived. - `message_not_found` — Message specified by `channel` and `timestamp` does not exist. - `no_item_specified` — combination of `channel` and `timestamp` was not specified. - `not_reactable` — Whatever you passed in, like a `file` or `file_comment`, can't be reacted to anymore. Your app can react to messages though. - `thread_locked` — Reactions are disabled as the specified message is part of a locked thread. - `too_many_emoji` — The limit for distinct reactions (i.e emoji) on the item has been reached. - `too_many_reactions` — The limit for reactions a person may add to the item has been reached. - `no_access` — User does not have access to react to this canvas. See https://docs.slack.dev/reference/methods/reactions.add */
85
+ /** Adds a reaction to an item. Required scopes -- bot: `reactions:write`; user: `reactions:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `already_reacted` -- The specified item already has the user/reaction combination. - `bad_timestamp` -- Value passed for `timestamp` was invalid. - `channel_not_found` -- Value passed for `channel` is invalid. - `external_channel_migrating` -- The channel is in the process of being migrated. - `invalid_name` -- Value passed for `name` was invalid. - `is_archived` -- Channel specified has been archived. - `message_not_found` -- Message specified by `channel` and `timestamp` does not exist. - `no_item_specified` -- combination of `channel` and `timestamp` was not specified. - `not_reactable` -- Whatever you passed in, like a `file` or `file_comment`, can't be reacted to anymore. Your app can react to messages though. - `thread_locked` -- Reactions are disabled as the specified message is part of a locked thread. - `too_many_emoji` -- The limit for distinct reactions (i.e emoji) on the item has been reached. - `too_many_reactions` -- The limit for reactions a person may add to the item has been reached. - `no_access` -- User does not have access to react to this canvas. See https://docs.slack.dev/reference/methods/reactions.add */
98
86
  export declare const addReaction: API.OperationMethod<AddReactionRequest, AddReactionResponse, AddReactionError, SlackOpContext>;
99
87
  export type GetReactionError = SlackOpError;
100
- /** Gets reactions for an item. Required scopes — bot: `reactions:read`; user: `reactions:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `bad_timestamp` — Value passed for `timestamp` was invalid. - `channel_not_found` — Value passed for `channel` was invalid. - `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`, or combination of `channel` and `timestamp` was not specified. See https://docs.slack.dev/reference/methods/reactions.get */
88
+ /** Gets reactions for an item. Required scopes -- bot: `reactions:read`; user: `reactions:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `bad_timestamp` -- Value passed for `timestamp` was invalid. - `channel_not_found` -- Value passed for `channel` was invalid. - `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`, or combination of `channel` and `timestamp` was not specified. See https://docs.slack.dev/reference/methods/reactions.get */
101
89
  export declare const getReaction: API.OperationMethod<GetReactionRequest, GetReactionResponse, GetReactionError, SlackOpContext>;
102
90
  export type ListReactionsError = SlackOpError;
103
- /** Lists reactions made by a user. Required scopes — bot: `reactions:read`; user: `reactions:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `invalid_cursor` — Value passed for `cursor` was not valid or is no longer valid. - `user_not_found` — Value passed for `user` was invalid. See https://docs.slack.dev/reference/methods/reactions.list */
91
+ /** Lists reactions made by a user. Required scopes -- bot: `reactions:read`; user: `reactions:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `invalid_cursor` -- Value passed for `cursor` was not valid or is no longer valid. - `user_not_found` -- Value passed for `user` was invalid. See https://docs.slack.dev/reference/methods/reactions.list */
104
92
  export declare const listReactions: API.PaginatedOperationMethod<ListReactionsRequest, ListReactionsResponse, ListReactionsError, SlackOpContext, ListReactionsResponseItemsItemMap>;
105
93
  export type RemoveReactionError = SlackOpError;
106
- /** Removes a reaction from an item. Required scopes — bot: `reactions:write`; user: `reactions: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` — The specified channel was not found. - `external_channel_migrating` — The reaction is in a channel that is being migrated - `file_not_found` — File specified by `file` does not exist. - `file_comment_not_found` — File comment specified by `file_comment` does not exist. - `invalid_name` — Value passed for `name` was invalid. - `message_not_found` — Message specified by `channel` and `timestamp` does not exist. - `no_item_specified` — `file`, `file_comment`, or combination of `channel` and `timestamp` was not specified. - `no_access` — The requestor does not have permission to perform this action on the specified item. - `no_reaction` — The specified reaction does not exist, or the requestor is not the original reaction author. - `thread_locked` — Reactions are disabled as the specified message is part of a locked thread. See https://docs.slack.dev/reference/methods/reactions.remove */
94
+ /** Removes a reaction from an item. Required scopes -- bot: `reactions:write`; user: `reactions: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` -- The specified channel was not found. - `external_channel_migrating` -- The reaction is in a channel that is being migrated - `file_not_found` -- File specified by `file` does not exist. - `file_comment_not_found` -- File comment specified by `file_comment` does not exist. - `invalid_name` -- Value passed for `name` was invalid. - `message_not_found` -- Message specified by `channel` and `timestamp` does not exist. - `no_item_specified` -- `file`, `file_comment`, or combination of `channel` and `timestamp` was not specified. - `no_access` -- The requestor does not have permission to perform this action on the specified item. - `no_reaction` -- The specified reaction does not exist, or the requestor is not the original reaction author. - `thread_locked` -- Reactions are disabled as the specified message is part of a locked thread. See https://docs.slack.dev/reference/methods/reactions.remove */
107
95
  export declare const removeReaction: API.OperationMethod<RemoveReactionRequest, RemoveReactionResponse, RemoveReactionError, SlackOpContext>;
108
96
  //# sourceMappingURL=reactions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reactions.d.ts","sourceRoot":"","sources":["../../src/services/reactions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAEjD,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAGlD,OAAO,EAAiB,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAIvF,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;AAE7C,MAAM,WAAW,kBAAkB;IACjC,+DAA+D;IAC/D,OAAO,EAAE,MAAM,CAAC;IAChB,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,SAAS,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;AAET,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC;AAC/C,ypCAAypC;AACzpC,eAAO,MAAM,cAAc,EAAE,GAAG,CAAC,eAAe,CAC9C,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,cAAc,CAOb,CAAC"}
@@ -1,103 +1,37 @@
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
- export const AddReactionRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
10
- channel: S.String,
11
- name: S.String,
12
- timestamp: S.String,
13
- }).pipe(T.Http({ method: "POST", uri: "/reactions.add", code: 200 }))).annotate({ identifier: "AddReactionRequest" });
14
- export const AddReactionResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
15
- ok: S.Boolean,
16
- })).annotate({ identifier: "AddReactionResponse" });
17
- export const GetReactionRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
18
- channel: S.optional(S.String.pipe(T.Query())),
19
- file: S.optional(S.String.pipe(T.Query())),
20
- file_comment: S.optional(S.String.pipe(T.Query())),
21
- full: S.optional(S.Boolean.pipe(T.Query())),
22
- timestamp: S.optional(S.String.pipe(T.Query())),
23
- }).pipe(T.Http({ method: "GET", uri: "/reactions.get", code: 200 }))).annotate({ identifier: "GetReactionRequest" });
24
- export const GetReactionResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
25
- ok: S.Boolean,
26
- comment: S.optional(S.Unknown),
27
- message: S.optional(S.Unknown),
28
- type: S.String,
29
- channel: S.optional(S.String),
30
- file: S.optional(S.Unknown),
31
- })).annotate({ identifier: "GetReactionResponse" });
32
- export const ListReactionsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
33
- user: S.optional(S.String.pipe(T.Query())),
34
- full: S.optional(S.Boolean.pipe(T.Query())),
35
- count: S.optional(S.Number.pipe(T.Query())),
36
- page: S.optional(S.Number.pipe(T.Query())),
37
- cursor: S.optional(S.String.pipe(T.Query())),
38
- limit: S.optional(S.Number.pipe(T.Query())),
39
- team_id: S.optional(S.String.pipe(T.Query())),
40
- }).pipe(T.Http({ method: "GET", uri: "/reactions.list", code: 200 }))).annotate({ identifier: "ListReactionsRequest" });
41
- export const ListReactionsResponseItemsItemMap = /*@__PURE__*/ S.Record(S.String, S.Unknown);
42
- export const ListReactionsResponseItemsList = /*@__PURE__*/ S.Array(ListReactionsResponseItemsItemMap);
43
- export const ListReactionsResponseResponseMetadata = /*@__PURE__*/ S.suspend(() => S.Struct({
44
- next_cursor: S.optional(S.String),
45
- })).annotate({
46
- identifier: "ListReactionsResponseResponseMetadata",
47
- });
48
- export const ListReactionsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
49
- ok: S.Boolean,
50
- items: ListReactionsResponseItemsList,
51
- paging: S.optional(S.Unknown),
52
- response_metadata: S.optional(ListReactionsResponseResponseMetadata),
53
- })).annotate({ identifier: "ListReactionsResponse" });
54
- export const RemoveReactionRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
55
- name: S.String,
56
- file: S.optional(S.String),
57
- file_comment: S.optional(S.String),
58
- channel: S.optional(S.String),
59
- timestamp: S.optional(S.String),
60
- }).pipe(T.Http({ method: "POST", uri: "/reactions.remove", code: 200 }))).annotate({ identifier: "RemoveReactionRequest" });
61
- export const RemoveReactionResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
62
- ok: S.Boolean,
63
- })).annotate({ identifier: "RemoveReactionResponse" });
64
- /** Adds a reaction to an item. Required scopes — bot: `reactions:write`; user: `reactions:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `already_reacted` — The specified item already has the user/reaction combination. - `bad_timestamp` — Value passed for `timestamp` was invalid. - `channel_not_found` — Value passed for `channel` is invalid. - `external_channel_migrating` — The channel is in the process of being migrated. - `invalid_name` — Value passed for `name` was invalid. - `is_archived` — Channel specified has been archived. - `message_not_found` — Message specified by `channel` and `timestamp` does not exist. - `no_item_specified` — combination of `channel` and `timestamp` was not specified. - `not_reactable` — Whatever you passed in, like a `file` or `file_comment`, can't be reacted to anymore. Your app can react to messages though. - `thread_locked` — Reactions are disabled as the specified message is part of a locked thread. - `too_many_emoji` — The limit for distinct reactions (i.e emoji) on the item has been reached. - `too_many_reactions` — The limit for reactions a person may add to the item has been reached. - `no_access` — User does not have access to react to this canvas. See https://docs.slack.dev/reference/methods/reactions.add */
65
- export const addReaction = /*@__PURE__*/ API.make(() => ({
66
- input: AddReactionRequest,
67
- output: AddReactionResponse,
68
- errors: [SlackError, SlackRateLimited],
69
- protocol: SlackProtocol,
70
- retry: Retry.Retry,
71
- }));
72
- /** Gets reactions for an item. Required scopes — bot: `reactions:read`; user: `reactions:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `bad_timestamp` — Value passed for `timestamp` was invalid. - `channel_not_found` — Value passed for `channel` was invalid. - `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`, or combination of `channel` and `timestamp` was not specified. See https://docs.slack.dev/reference/methods/reactions.get */
73
- export const getReaction = /*@__PURE__*/ API.make(() => ({
74
- input: GetReactionRequest,
75
- output: GetReactionResponse,
76
- errors: [SlackError, SlackRateLimited],
77
- protocol: SlackProtocol,
78
- retry: Retry.Retry,
79
- }));
80
- /** Lists reactions made by a user. Required scopes — bot: `reactions:read`; user: `reactions:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `invalid_cursor` — Value passed for `cursor` was not valid or is no longer valid. - `user_not_found` — Value passed for `user` was invalid. See https://docs.slack.dev/reference/methods/reactions.list */
81
- export const listReactions = /*@__PURE__*/ API.makePaginated(() => ({
82
- input: ListReactionsRequest,
83
- output: ListReactionsResponse,
84
- errors: [SlackError, SlackRateLimited],
85
- protocol: SlackProtocol,
86
- retry: Retry.Retry,
87
- pagination: {
88
- mode: "cursor",
89
- inputToken: "cursor",
90
- outputToken: "response_metadata.next_cursor",
91
- items: "items",
92
- pageSize: "limit",
93
- },
94
- }), slackPaginate);
95
- /** Removes a reaction from an item. Required scopes — bot: `reactions:write`; user: `reactions: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` — The specified channel was not found. - `external_channel_migrating` — The reaction is in a channel that is being migrated - `file_not_found` — File specified by `file` does not exist. - `file_comment_not_found` — File comment specified by `file_comment` does not exist. - `invalid_name` — Value passed for `name` was invalid. - `message_not_found` — Message specified by `channel` and `timestamp` does not exist. - `no_item_specified` — `file`, `file_comment`, or combination of `channel` and `timestamp` was not specified. - `no_access` — The requestor does not have permission to perform this action on the specified item. - `no_reaction` — The specified reaction does not exist, or the requestor is not the original reaction author. - `thread_locked` — Reactions are disabled as the specified message is part of a locked thread. See https://docs.slack.dev/reference/methods/reactions.remove */
96
- export const removeReaction = /*@__PURE__*/ API.make(() => ({
97
- input: RemoveReactionRequest,
98
- output: RemoveReactionResponse,
99
- errors: [SlackError, SlackRateLimited],
100
- protocol: SlackProtocol,
101
- retry: Retry.Retry,
102
- }));
103
- //# sourceMappingURL=reactions.js.map
10
+ const __0 = __L.at;
11
+ const __1 = T.Http;
12
+ const __2 = S.String;
13
+ const __3 = S.Struct;
14
+ const __4 = S.suspend;
15
+ const __5 = S.Boolean;
16
+ const __6 = T.Query;
17
+ const __7 = S.optional;
18
+ const __8 = S.Unknown;
19
+ const __9 = S.Number;
20
+ const __10 = S.Record;
21
+ const __11 = S.Array;
22
+
23
+ export const addReaction = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#5:0,errors:[$6,$7],protocol:$8,retry:$9};$4(>2)@"AddReactionRequest";$3({channel:$2,name:$2,timestamp:$2}).pipe($1({method:"POST",uri:"/reactions.add",code:200}))', [__0, __1, __2, __3, __4, __d0, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(addReaction, i));
24
+
25
+ export const getReaction = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$9,$10],protocol:$11,retry:$12};$7(>3)@"GetReactionRequest";$7(>4)@"GetReactionResponse";$6({channel:$4($3.pipe($2())),file:$4($3.pipe($2())),file_comment:$4($3.pipe($2())),full:$4($5.pipe($2())),timestamp:$4($3.pipe($2()))}).pipe($1({method:"GET",uri:"/reactions.get",code:200}));$6({ok:$5,comment:$4($8),message:$4($8),type:$3,channel:$4($3),file:$4($8)})', [__0, __1, __6, __2, __7, __5, __3, __4, __8, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(getReaction, i));
26
+
27
+ export const listReactions = /*@__PURE__*/ API.opPaginated((i) => i === API.D ? API.named("ListReactionsResponse", '{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};$8(>6)@"ListReactionsRequest";$10($3,$9);$11(#2);$8(>7)@"%ResponseMetadata";$8(>8)@"%";$7({user:$4($3.pipe($2())),full:$4($5.pipe($2())),count:$4($6.pipe($2())),page:$4($6.pipe($2())),cursor:$4($3.pipe($2())),limit:$4($6.pipe($2())),team_id:$4($3.pipe($2()))}).pipe($1({method:"GET",uri:"/reactions.list",code:200}));$7({next_cursor:$4($3)});$7({ok:$5,items:#3,paging:$4($9),response_metadata:$4(#4)})', [__0, __1, __6, __2, __7, __5, __9, __3, __4, __8, __10, __11, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry, slackPaginate]) : API.call(listReactions, i));
28
+
29
+ export const removeReaction = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:0,errors:[$7,$8],protocol:$9,retry:$10};$5(>2)@"RemoveReactionRequest";$4({name:$2,file:$3($2),file_comment:$3($2),channel:$3($2),timestamp:$3($2)}).pipe($1({method:"POST",uri:"/reactions.remove",code:200}))', [__0, __1, __2, __7, __3, __4, __d0, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(removeReaction, i));
30
+ // Schema builders: each runs one schema initializer, on that schema's first use.
31
+ // Schema table: entry i is schema j of builder f, made on first reach.
32
+
33
+
34
+ // Shared schema data (see `op` in core/api).
35
+ function __d0() {
36
+ return ['$3(>1)@"AddReactionResponse";$2({ok:$1})', [__0, __5, __3, __4]];
37
+ }
@@ -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 AddReminderRequest {
@@ -14,76 +13,65 @@ export interface AddReminderRequest {
14
13
  /** Specify the repeating behavior of a reminder. Available options: `daily`, `weekly`, `monthly`, or `yearly`. If `weekly`, may further specify the days of the week. */
15
14
  recurrence?: unknown;
16
15
  }
17
- export declare const AddReminderRequest: S.Schema<AddReminderRequest>;
18
16
  export interface AddReminderResponse {
19
17
  /** Always `true` (a failed call raises a typed error instead). */
20
18
  ok: boolean;
21
19
  reminder: unknown;
22
20
  }
23
- export declare const AddReminderResponse: S.Schema<AddReminderResponse>;
24
21
  export interface CompleteReminderRequest {
25
22
  /** The ID of the reminder to be marked as complete */
26
23
  reminder: string;
27
24
  /** Encoded team id, required if org token is used */
28
25
  team_id?: string;
29
26
  }
30
- export declare const CompleteReminderRequest: S.Schema<CompleteReminderRequest>;
31
27
  export interface CompleteReminderResponse {
32
28
  /** Always `true` (a failed call raises a typed error instead). */
33
29
  ok: boolean;
34
30
  }
35
- export declare const CompleteReminderResponse: S.Schema<CompleteReminderResponse>;
36
31
  export interface DeleteReminderRequest {
37
32
  /** The ID of the reminder */
38
33
  reminder: string;
39
34
  /** Encoded team id, required if org token is used */
40
35
  team_id?: string;
41
36
  }
42
- export declare const DeleteReminderRequest: S.Schema<DeleteReminderRequest>;
43
37
  export interface DeleteReminderResponse {
44
38
  /** Always `true` (a failed call raises a typed error instead). */
45
39
  ok: boolean;
46
40
  }
47
- export declare const DeleteReminderResponse: S.Schema<DeleteReminderResponse>;
48
41
  export interface ListRemindersRequest {
49
42
  /** Encoded team id, required if org token is passed */
50
43
  team_id?: string;
51
44
  }
52
- export declare const ListRemindersRequest: S.Schema<ListRemindersRequest>;
53
45
  export type ListRemindersResponseRemindersList = Array<unknown>;
54
- export declare const ListRemindersResponseRemindersList: S.Schema<ListRemindersResponseRemindersList>;
55
46
  export interface ListRemindersResponse {
56
47
  /** Always `true` (a failed call raises a typed error instead). */
57
48
  ok: boolean;
58
49
  reminders?: ListRemindersResponseRemindersList;
59
50
  }
60
- export declare const ListRemindersResponse: S.Schema<ListRemindersResponse>;
61
51
  export interface RemindersInfoRequest {
62
52
  /** The ID of the reminder */
63
53
  reminder: string;
64
54
  /** Encoded team id, required if org token is passed */
65
55
  team_id?: string;
66
56
  }
67
- export declare const RemindersInfoRequest: S.Schema<RemindersInfoRequest>;
68
57
  export interface RemindersInfoResponse {
69
58
  /** Always `true` (a failed call raises a typed error instead). */
70
59
  ok: boolean;
71
60
  reminder: unknown;
72
61
  }
73
- export declare const RemindersInfoResponse: S.Schema<RemindersInfoResponse>;
74
62
  export type AddReminderError = SlackOpError;
75
- /** 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 */
63
+ /** 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 */
76
64
  export declare const addReminder: API.OperationMethod<AddReminderRequest, AddReminderResponse, AddReminderError, SlackOpContext>;
77
65
  export type CompleteReminderError = SlackOpError;
78
- /** Marks a reminder as complete. Required scopes — user: `reminders:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `cannot_complete_others` — Reminders for other team members can't be marked complete. - `cannot_complete_recurring` — Recurring reminders can't be marked complete. - `missing_argument` — An argument is missing. - `not_found` — That reminder can't be found. See https://docs.slack.dev/reference/methods/reminders.complete */
66
+ /** Marks a reminder as complete. Required scopes -- user: `reminders:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `cannot_complete_others` -- Reminders for other team members can't be marked complete. - `cannot_complete_recurring` -- Recurring reminders can't be marked complete. - `missing_argument` -- An argument is missing. - `not_found` -- That reminder can't be found. See https://docs.slack.dev/reference/methods/reminders.complete */
79
67
  export declare const completeReminder: API.OperationMethod<CompleteReminderRequest, CompleteReminderResponse, CompleteReminderError, SlackOpContext>;
80
68
  export type DeleteReminderError = SlackOpError;
81
- /** Deletes a reminder. Required scopes — user: `reminders:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `missing_argument` — An argument is missing. - `not_found` — That reminder can't be found. See https://docs.slack.dev/reference/methods/reminders.delete */
69
+ /** Deletes a reminder. Required scopes -- user: `reminders:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `missing_argument` -- An argument is missing. - `not_found` -- That reminder can't be found. See https://docs.slack.dev/reference/methods/reminders.delete */
82
70
  export declare const deleteReminder: API.OperationMethod<DeleteReminderRequest, DeleteReminderResponse, DeleteReminderError, SlackOpContext>;
83
71
  export type ListRemindersError = SlackOpError;
84
- /** Lists all reminders created by or for a given user. Required scopes — user: `reminders:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `missing_argument` — An argument is missing. See https://docs.slack.dev/reference/methods/reminders.list */
72
+ /** Lists all reminders created by or for a given user. Required scopes -- user: `reminders:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `missing_argument` -- An argument is missing. See https://docs.slack.dev/reference/methods/reminders.list */
85
73
  export declare const listReminders: API.OperationMethod<ListRemindersRequest, ListRemindersResponse, ListRemindersError, SlackOpContext>;
86
74
  export type RemindersInfoError = SlackOpError;
87
- /** Gets information about a reminder. Required scopes — user: `reminders:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `missing_argument` — An argument is missing. - `not_found` — That reminder can't be found. See https://docs.slack.dev/reference/methods/reminders.info */
75
+ /** Gets information about a reminder. Required scopes -- user: `reminders:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `missing_argument` -- An argument is missing. - `not_found` -- That reminder can't be found. See https://docs.slack.dev/reference/methods/reminders.info */
88
76
  export declare const remindersInfo: API.OperationMethod<RemindersInfoRequest, RemindersInfoResponse, RemindersInfoError, SlackOpContext>;
89
77
  //# sourceMappingURL=reminders.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reminders.d.ts","s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AAG,CAAC,eAAe,CAC3C,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,CAOb,CAAC;AAEJ,MAAM,MAAM,qBAAqB,GAAG,YAAY,CAAC;AACjD,seAAse;AACte,eAAO,MAAM,gBAAgB,EAAE,GAAG,CAAC,eAAe,CAChD,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,cAAc,CAOb,CAAC;AAEJ,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC;AAC/C,kTAAkT;AAClT,eAAO,MAAM,cAAc,EAAE,GAAG,CAAC,eAAe,CAC9C,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,cAAc,CAOb,CAAC;AAEJ,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC;AAC9C,gSAAgS;AAChS,eAAO,MAAM,aAAa,EAAE,GAAG,CAAC,eAAe,CAC7C,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,CAOb,CAAC;AAEJ,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC;AAC9C,8TAA8T;AAC9T,eAAO,MAAM,aAAa,EAAE,GAAG,CAAC,eAAe,CAC7C,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,CAOb,CAAC"}
@@ -1,89 +1,39 @@
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 { SlackProtocol } from "../protocol.js";
6
7
  import * as Retry from "../retry.js";
7
8
  import * as T from "../traits.js";
8
- export const AddReminderRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
9
- text: S.String,
10
- time: S.String,
11
- user: S.optional(S.String),
12
- team_id: S.optional(S.String),
13
- recurrence: S.optional(S.Unknown),
14
- }).pipe(T.Http({ method: "POST", uri: "/reminders.add", code: 200 }))).annotate({ identifier: "AddReminderRequest" });
15
- export const AddReminderResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
16
- ok: S.Boolean,
17
- reminder: S.Unknown,
18
- })).annotate({ identifier: "AddReminderResponse" });
19
- export const CompleteReminderRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
20
- reminder: S.String,
21
- team_id: S.optional(S.String),
22
- }).pipe(T.Http({ method: "POST", uri: "/reminders.complete", code: 200 }))).annotate({ identifier: "CompleteReminderRequest" });
23
- export const CompleteReminderResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
24
- ok: S.Boolean,
25
- })).annotate({ identifier: "CompleteReminderResponse" });
26
- export const DeleteReminderRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
27
- reminder: S.String,
28
- team_id: S.optional(S.String),
29
- }).pipe(T.Http({ method: "POST", uri: "/reminders.delete", code: 200 }))).annotate({ identifier: "DeleteReminderRequest" });
30
- export const DeleteReminderResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
31
- ok: S.Boolean,
32
- })).annotate({ identifier: "DeleteReminderResponse" });
33
- export const ListRemindersRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
34
- team_id: S.optional(S.String.pipe(T.Query())),
35
- }).pipe(T.Http({ method: "GET", uri: "/reminders.list", code: 200 }))).annotate({ identifier: "ListRemindersRequest" });
36
- export const ListRemindersResponseRemindersList = /*@__PURE__*/ S.Array(S.Unknown);
37
- export const ListRemindersResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
38
- ok: S.Boolean,
39
- reminders: S.optional(ListRemindersResponseRemindersList),
40
- })).annotate({ identifier: "ListRemindersResponse" });
41
- export const RemindersInfoRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
42
- reminder: S.String.pipe(T.Query()),
43
- team_id: S.optional(S.String.pipe(T.Query())),
44
- }).pipe(T.Http({ method: "GET", uri: "/reminders.info", code: 200 }))).annotate({ identifier: "RemindersInfoRequest" });
45
- export const RemindersInfoResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
46
- ok: S.Boolean,
47
- reminder: S.Unknown,
48
- })).annotate({ identifier: "RemindersInfoResponse" });
49
- /** 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 */
50
- export const addReminder = /*@__PURE__*/ API.make(() => ({
51
- input: AddReminderRequest,
52
- output: AddReminderResponse,
53
- errors: [SlackError, SlackRateLimited],
54
- protocol: SlackProtocol,
55
- retry: Retry.Retry,
56
- }));
57
- /** Marks a reminder as complete. Required scopes — user: `reminders:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `cannot_complete_others` — Reminders for other team members can't be marked complete. - `cannot_complete_recurring` — Recurring reminders can't be marked complete. - `missing_argument` — An argument is missing. - `not_found` — That reminder can't be found. See https://docs.slack.dev/reference/methods/reminders.complete */
58
- export const completeReminder = /*@__PURE__*/ API.make(() => ({
59
- input: CompleteReminderRequest,
60
- output: CompleteReminderResponse,
61
- errors: [SlackError, SlackRateLimited],
62
- protocol: SlackProtocol,
63
- retry: Retry.Retry,
64
- }));
65
- /** Deletes a reminder. Required scopes — user: `reminders:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `missing_argument` — An argument is missing. - `not_found` — That reminder can't be found. See https://docs.slack.dev/reference/methods/reminders.delete */
66
- export const deleteReminder = /*@__PURE__*/ API.make(() => ({
67
- input: DeleteReminderRequest,
68
- output: DeleteReminderResponse,
69
- errors: [SlackError, SlackRateLimited],
70
- protocol: SlackProtocol,
71
- retry: Retry.Retry,
72
- }));
73
- /** Lists all reminders created by or for a given user. Required scopes — user: `reminders:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `missing_argument` — An argument is missing. See https://docs.slack.dev/reference/methods/reminders.list */
74
- export const listReminders = /*@__PURE__*/ API.make(() => ({
75
- input: ListRemindersRequest,
76
- output: ListRemindersResponse,
77
- errors: [SlackError, SlackRateLimited],
78
- protocol: SlackProtocol,
79
- retry: Retry.Retry,
80
- }));
81
- /** Gets information about a reminder. Required scopes — user: `reminders:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `missing_argument` — An argument is missing. - `not_found` — That reminder can't be found. See https://docs.slack.dev/reference/methods/reminders.info */
82
- export const remindersInfo = /*@__PURE__*/ API.make(() => ({
83
- input: RemindersInfoRequest,
84
- output: RemindersInfoResponse,
85
- errors: [SlackError, SlackRateLimited],
86
- protocol: SlackProtocol,
87
- retry: Retry.Retry,
88
- }));
89
- //# sourceMappingURL=reminders.js.map
9
+ const __0 = __L.at;
10
+ const __1 = T.Http;
11
+ const __2 = S.String;
12
+ const __3 = S.optional;
13
+ const __4 = S.Unknown;
14
+ const __5 = S.Struct;
15
+ const __6 = S.suspend;
16
+ const __7 = S.Boolean;
17
+ const __8 = T.Query;
18
+ const __9 = S.Array;
19
+
20
+ export const addReminder = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#7:0,errors:[$8,$9],protocol:$10,retry:$11};$6(>2)@"AddReminderRequest";$5({text:$2,time:$2,user:$3($2),team_id:$3($2),recurrence:$3($4)}).pipe($1({method:"POST",uri:"/reminders.add",code:200}))', [__0, __1, __2, __3, __4, __5, __6, __d0, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(addReminder, i));
21
+
22
+ export const completeReminder = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:0,errors:[$7,$8],protocol:$9,retry:$10};$5(>2)@"CompleteReminderRequest";$4({reminder:$2,team_id:$3($2)}).pipe($1({method:"POST",uri:"/reminders.complete",code:200}))', [__0, __1, __2, __3, __5, __6, __d1, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(completeReminder, i));
23
+
24
+ export const deleteReminder = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:0,errors:[$7,$8],protocol:$9,retry:$10};$5(>2)@"DeleteReminderRequest";$4({reminder:$2,team_id:$3($2)}).pipe($1({method:"POST",uri:"/reminders.delete",code:200}))', [__0, __1, __2, __3, __5, __6, __d1, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(deleteReminder, i));
25
+
26
+ export const listReminders = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#3,errors:[$10,$11],protocol:$12,retry:$13};$6(>4)@"ListRemindersRequest";$8($7);$6(>5)@"ListRemindersResponse";$5({team_id:$4($3.pipe($2()))}).pipe($1({method:"GET",uri:"/reminders.list",code:200}));$5({ok:$9,reminders:$4(#2)})', [__0, __1, __8, __2, __3, __5, __6, __4, __9, __7, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(listReminders, i));
27
+
28
+ export const remindersInfo = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#7:0,errors:[$8,$9],protocol:$10,retry:$11};$6(>2)@"RemindersInfoRequest";$5({reminder:$3.pipe($2()),team_id:$4($3.pipe($2()))}).pipe($1({method:"GET",uri:"/reminders.info",code:200}))', [__0, __1, __8, __2, __3, __5, __6, __d0, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(remindersInfo, i));
29
+ // Schema builders: each runs one schema initializer, on that schema's first use.
30
+ // Schema table: entry i is schema j of builder f, made on first reach.
31
+
32
+
33
+ // Shared schema data (see `op` in core/api).
34
+ function __d0() {
35
+ return ['$4(>1)@"AddReminderResponse";$3({ok:$1,reminder:$2})', [__0, __7, __4, __5, __6]];
36
+ }
37
+ function __d1() {
38
+ return ['$3(>1)@"CompleteReminderResponse";$2({ok:$1})', [__0, __7, __5, __6]];
39
+ }