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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,97 +1,29 @@
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 ListTeamsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
10
- limit: S.optional(S.Number),
11
- cursor: S.optional(S.String),
12
- include_icon: S.optional(S.Boolean),
13
- }).pipe(T.Http({ method: "POST", uri: "/auth.teams.list", code: 200, contentType: "form-urlencoded" }))).annotate({ identifier: "ListTeamsRequest" });
14
- export const ListTeamsResponseTeamsItemIcon = /*@__PURE__*/ S.suspend(() => S.Struct({
15
- image_34: S.optional(S.String),
16
- image_44: S.optional(S.String),
17
- image_68: S.optional(S.String),
18
- image_88: S.optional(S.String),
19
- image_102: S.optional(S.String),
20
- image_132: S.optional(S.String),
21
- image_230: S.optional(S.String),
22
- image_default: S.optional(S.Boolean),
23
- })).annotate({
24
- identifier: "ListTeamsResponseTeamsItemIcon",
25
- });
26
- export const ListTeamsResponseTeamsItem = /*@__PURE__*/ S.suspend(() => S.Struct({
27
- id: S.optional(S.String),
28
- name: S.String,
29
- icon: S.optional(ListTeamsResponseTeamsItemIcon),
30
- })).annotate({
31
- identifier: "ListTeamsResponseTeamsItem",
32
- });
33
- export const ListTeamsResponseTeamsList = /*@__PURE__*/ S.Array(ListTeamsResponseTeamsItem);
34
- export const ListTeamsResponseResponseMetadata = /*@__PURE__*/ S.suspend(() => S.Struct({
35
- next_cursor: S.optional(S.String),
36
- })).annotate({
37
- identifier: "ListTeamsResponseResponseMetadata",
38
- });
39
- export const ListTeamsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
40
- ok: S.Boolean,
41
- teams: ListTeamsResponseTeamsList,
42
- response_metadata: S.optional(ListTeamsResponseResponseMetadata),
43
- })).annotate({ identifier: "ListTeamsResponse" });
44
- export const RevokeAuthRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
45
- test: S.optional(S.Boolean.pipe(T.Query())),
46
- }).pipe(T.Http({ method: "GET", uri: "/auth.revoke", code: 200 }))).annotate({ identifier: "RevokeAuthRequest" });
47
- export const RevokeAuthResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
48
- ok: S.Boolean,
49
- revoked: S.Boolean,
50
- })).annotate({ identifier: "RevokeAuthResponse" });
51
- export const TestAuthRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "POST", uri: "/auth.test", code: 200 }))).annotate({ identifier: "TestAuthRequest" });
52
- export const TestAuthResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
53
- ok: S.Boolean,
54
- user_id: S.optional(S.String),
55
- url: S.optional(S.String),
56
- team_id: S.optional(S.String),
57
- user: S.optional(S.NullOr(S.String)),
58
- team: S.optional(S.String),
59
- app_id: S.optional(S.String),
60
- app_name: S.optional(S.String),
61
- enterprise_id: S.optional(S.String),
62
- bot_id: S.optional(S.String),
63
- is_enterprise_install: S.optional(S.Boolean),
64
- expires_in: S.optional(S.NullOr(S.Number)),
65
- })).annotate({ identifier: "TestAuthResponse" });
66
- /** Obtain a full list of workspaces your org-wide app has been approved for. Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `invalid_cursor` — Invalid cursor. - `invalid_limit` — The value passed for `limit` was not valid. - `invalid_auth` — The token doesn't have access to this endpoint. - `internal_error` — There was an internal error. See https://docs.slack.dev/reference/methods/auth.teams.list */
67
- export const listTeams = /*@__PURE__*/ API.makePaginated(() => ({
68
- input: ListTeamsRequest,
69
- output: ListTeamsResponse,
70
- errors: [SlackError, SlackRateLimited],
71
- protocol: SlackProtocol,
72
- retry: Retry.Retry,
73
- pagination: {
74
- mode: "cursor",
75
- inputToken: "cursor",
76
- outputToken: "response_metadata.next_cursor",
77
- items: "teams",
78
- pageSize: "limit",
79
- },
80
- }), slackPaginate);
81
- /** Revokes a token. Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `internal_error` — Internal system error - `not_bearer_token` — Incompatible token type provided See https://docs.slack.dev/reference/methods/auth.revoke */
82
- export const revokeAuth = /*@__PURE__*/ API.make(() => ({
83
- input: RevokeAuthRequest,
84
- output: RevokeAuthResponse,
85
- errors: [SlackError, SlackRateLimited],
86
- protocol: SlackProtocol,
87
- retry: Retry.Retry,
88
- }));
89
- /** Checks authentication & identity. Rate limit tier: 5 Method-specific errors (the `error` slug on the SlackError): - `internal_error` — An internal error has been found. - `invalid_auth` — Method was called with invalid credentials See https://docs.slack.dev/reference/methods/auth.test */
90
- export const testAuth = /*@__PURE__*/ API.make(() => ({
91
- input: TestAuthRequest,
92
- output: TestAuthResponse,
93
- errors: [SlackError, SlackRateLimited],
94
- protocol: SlackProtocol,
95
- retry: Retry.Retry,
96
- }));
97
- //# sourceMappingURL=auth.js.map
10
+ const __0 = __L.at;
11
+ const __1 = T.Http;
12
+ const __2 = S.Number;
13
+ const __3 = S.optional;
14
+ const __4 = S.String;
15
+ const __5 = S.Boolean;
16
+ const __6 = S.Struct;
17
+ const __7 = S.suspend;
18
+ const __8 = S.Array;
19
+ const __9 = T.Query;
20
+ const __10 = S.NullOr;
21
+
22
+ export const listTeams = /*@__PURE__*/ API.opPaginated((i) => i === API.D ? API.named("ListTeamsResponse", '{input:#1,output:#6,errors:[$9,$10],protocol:$11,retry:$12,pagination:{mode:"cursor",inputToken:"cursor",outputToken:"response_metadata.next_cursor",items:"teams",pageSize:"limit"},strategy:$13};$7(>7)@"ListTeamsRequest";$7(>8)@"%TeamsItemIcon";$7(>9)@"%TeamsItem";$8(#3);$7(>10)@"%ResponseMetadata";$7(>11)@"%";$6({limit:$3($2),cursor:$3($4),include_icon:$3($5)}).pipe($1({method:"POST",uri:"/auth.teams.list",code:200,contentType:"form-urlencoded"}));$6({image_34:$3($4),image_44:$3($4),image_68:$3($4),image_88:$3($4),image_102:$3($4),image_132:$3($4),image_230:$3($4),image_default:$3($5)});$6({id:$3($4),name:$4,icon:$3(#2)});$6({next_cursor:$3($4)});$6({ok:$5,teams:#4,response_metadata:$3(#5)})', [__0, __1, __2, __3, __4, __5, __6, __7, __8, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry, slackPaginate]) : API.call(listTeams, i));
23
+
24
+ export const revokeAuth = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$7,$8],protocol:$9,retry:$10};$6(>3)@"RevokeAuthRequest";$6(>4)@"RevokeAuthResponse";$5({test:$4($3.pipe($2()))}).pipe($1({method:"GET",uri:"/auth.revoke",code:200}));$5({ok:$3,revoked:$3})', [__0, __1, __9, __5, __3, __6, __7, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(revokeAuth, i));
25
+
26
+ export const testAuth = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$9,$10],protocol:$11,retry:$12};$3(>3)@"TestAuthRequest";$3(>4)@"TestAuthResponse";$2({}).pipe($1({method:"POST",uri:"/auth.test",code:200}));$2({ok:$4,user_id:$6($5),url:$6($5),team_id:$6($5),user:$6($7($5)),team:$6($5),app_id:$6($5),app_name:$6($5),enterprise_id:$6($5),bot_id:$6($5),is_enterprise_install:$6($4),expires_in:$6($7($8))})', [__0, __1, __6, __7, __5, __4, __3, __10, __2, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(testAuth, i));
27
+ // Schema builders: each runs one schema initializer, on that schema's first use.
28
+ // Schema table: entry i is schema j of builder f, made on first reach.
29
+
@@ -1,16 +1,12 @@
1
1
  import * as API from "@distilled.cloud/core/api";
2
- import * as S from "@distilled.cloud/core/schema";
3
2
  import { type SlackOpError, type SlackOpContext } from "../protocol.ts";
4
3
  export type { SlackOpError, SlackOpContext };
5
4
  export type ValidateBlockRequestBlocksCase1ItemMap = {
6
5
  [key: string]: unknown | undefined;
7
6
  };
8
- export declare const ValidateBlockRequestBlocksCase1ItemMap: S.Schema<ValidateBlockRequestBlocksCase1ItemMap>;
9
7
  export type ValidateBlockRequestBlocksCase1List = Array<ValidateBlockRequestBlocksCase1ItemMap>;
10
- export declare const ValidateBlockRequestBlocksCase1List: S.Schema<ValidateBlockRequestBlocksCase1List>;
11
8
  /** A JSON-encoded array of [structured blocks](/reference/block-kit/blocks). Provide exactly one of `blocks`, `view`, or `message`. */
12
9
  export type ValidateBlockRequestBlocks = string | ValidateBlockRequestBlocksCase1List;
13
- export declare const ValidateBlockRequestBlocks: any;
14
10
  export interface ValidateBlockRequest {
15
11
  /** A JSON-encoded array of [structured blocks](/reference/block-kit/blocks). Provide exactly one of `blocks`, `view`, or `message`. */
16
12
  blocks?: ValidateBlockRequestBlocks;
@@ -19,13 +15,11 @@ export interface ValidateBlockRequest {
19
15
  /** A JSON-encoded [view payload](/reference/views) to validate. Provide exactly one of `blocks`, `view`, or `message`. */
20
16
  view?: string;
21
17
  }
22
- export declare const ValidateBlockRequest: S.Schema<ValidateBlockRequest>;
23
18
  export interface ValidateBlockResponse {
24
19
  /** Always `true` (a failed call raises a typed error instead). */
25
20
  ok: boolean;
26
21
  }
27
- export declare const ValidateBlockResponse: S.Schema<ValidateBlockResponse>;
28
22
  export type ValidateBlockError = SlackOpError;
29
- /** Validates blocks, messages, and views Block Kit JSON payloads. Method-specific errors (the `error` slug on the SlackError): - `invalid_arguments` — The request arguments are invalid. Ensure you provide exactly one of `blocks`, `view`, or `message`, and that the value is valid JSON. Consult `response_metadata.messages` for details. - `invalid_blocks` — The blocks array failed validation. The `errors` field contains a list of issues, each with a JSON pointer path to the invalid element, the constraint that failed, and the expected value. - `invalid_view` — The view payload failed validation. The `errors` field contains a list of issues, each with a JSON pointer path to the invalid element, the constraint that failed, and the expected value. - `invalid_message` — The message payload failed validation. The `errors` field contains a list of issues, each with a JSON pointer path to the invalid element, the constraint that failed, and the expected value. - `ratelimited` — Too many requests. Reduce your request rate and retry after a brief wait. See https://docs.slack.dev/reference/methods/blocks.validate */
23
+ /** Validates blocks, messages, and views Block Kit JSON payloads. Method-specific errors (the `error` slug on the SlackError): - `invalid_arguments` -- The request arguments are invalid. Ensure you provide exactly one of `blocks`, `view`, or `message`, and that the value is valid JSON. Consult `response_metadata.messages` for details. - `invalid_blocks` -- The blocks array failed validation. The `errors` field contains a list of issues, each with a JSON pointer path to the invalid element, the constraint that failed, and the expected value. - `invalid_view` -- The view payload failed validation. The `errors` field contains a list of issues, each with a JSON pointer path to the invalid element, the constraint that failed, and the expected value. - `invalid_message` -- The message payload failed validation. The `errors` field contains a list of issues, each with a JSON pointer path to the invalid element, the constraint that failed, and the expected value. - `ratelimited` -- Too many requests. Reduce your request rate and retry after a brief wait. See https://docs.slack.dev/reference/methods/blocks.validate */
30
24
  export declare const validateBlock: API.OperationMethod<ValidateBlockRequest, ValidateBlockResponse, ValidateBlockError, SlackOpContext>;
31
25
  //# sourceMappingURL=blocks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../src/services/blocks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAEjD,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAElD,OAAO,EAAiB,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAIvF,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;AAE7C,MAAM,MAAM,sCAAsC,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;CAAE,CAAC;AAC5F,eAAO,MAAM,sCAAsC,EAGvC,CAAC,CAAC,MAAM,CAAC,sCAAsC,CAAC,CAAC;AAE7D,MAAM,MAAM,mCAAmC,GAAG,KAAK,CAAC,sCAAsC,CAAC,CAAC;AAChG,eAAO,MAAM,mCAAmC,EAEpC,CAAC,CAAC,MAAM,CAAC,mCAAmC,CAAC,CAAC;AAE1D,uIAAuI;AACvI,MAAM,MAAM,0BAA0B,GAAG,MAAM,GAAG,mCAAmC,CAAC;AACtF,eAAO,MAAM,0BAA0B,KAAuD,CAAC;AAE/F,MAAM,WAAW,oBAAoB;IACnC,uIAAuI;IACvI,MAAM,CAAC,EAAE,0BAA0B,CAAC;IACpC,qJAAqJ;IACrJ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0HAA0H;IAC1H,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AACD,eAAO,MAAM,oBAAoB,EAM4B,CAAC,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;AAE5F,MAAM,WA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,cAAc,CAOb,CAAC"}
@@ -1,27 +1,22 @@
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 ValidateBlockRequestBlocksCase1ItemMap = /*@__PURE__*/ S.Record(S.String, S.Unknown);
9
- export const ValidateBlockRequestBlocksCase1List = /*@__PURE__*/ S.Array(ValidateBlockRequestBlocksCase1ItemMap);
10
- export const ValidateBlockRequestBlocks = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], []]));
11
- export const ValidateBlockRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
12
- blocks: S.optional(ValidateBlockRequestBlocks),
13
- message: S.optional(S.String),
14
- view: S.optional(S.String),
15
- }).pipe(T.Http({ method: "POST", uri: "/blocks.validate", code: 200 }))).annotate({ identifier: "ValidateBlockRequest" });
16
- export const ValidateBlockResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
17
- ok: S.Boolean,
18
- })).annotate({ identifier: "ValidateBlockResponse" });
19
- /** Validates blocks, messages, and views Block Kit JSON payloads. Method-specific errors (the `error` slug on the SlackError): - `invalid_arguments` — The request arguments are invalid. Ensure you provide exactly one of `blocks`, `view`, or `message`, and that the value is valid JSON. Consult `response_metadata.messages` for details. - `invalid_blocks` — The blocks array failed validation. The `errors` field contains a list of issues, each with a JSON pointer path to the invalid element, the constraint that failed, and the expected value. - `invalid_view` — The view payload failed validation. The `errors` field contains a list of issues, each with a JSON pointer path to the invalid element, the constraint that failed, and the expected value. - `invalid_message` — The message payload failed validation. The `errors` field contains a list of issues, each with a JSON pointer path to the invalid element, the constraint that failed, and the expected value. - `ratelimited` — Too many requests. Reduce your request rate and retry after a brief wait. See https://docs.slack.dev/reference/methods/blocks.validate */
20
- export const validateBlock = /*@__PURE__*/ API.make(() => ({
21
- input: ValidateBlockRequest,
22
- output: ValidateBlockResponse,
23
- errors: [SlackError, SlackRateLimited],
24
- protocol: SlackProtocol,
25
- retry: Retry.Retry,
26
- }));
27
- //# sourceMappingURL=blocks.js.map
9
+ const __0 = __L.at;
10
+ const __1 = T.UnionCases;
11
+ const __2 = S.Unknown;
12
+ const __3 = T.Http;
13
+ const __4 = S.optional;
14
+ const __5 = S.String;
15
+ const __6 = S.Struct;
16
+ const __7 = S.suspend;
17
+ const __8 = S.Boolean;
18
+
19
+ export const validateBlock = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#2,output:#3,errors:[$9,$10],protocol:$11,retry:$12};$2.pipe($1([[],[]]));$7(>4)@"ValidateBlockRequest";$7(>5)@"ValidateBlockResponse";$6({blocks:$4(#1),message:$4($5),view:$4($5)}).pipe($3({method:"POST",uri:"/blocks.validate",code:200}));$6({ok:$8})', [__0, __1, __2, __3, __4, __5, __6, __7, __8, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(validateBlock, i));
20
+ // Schema builders: each runs one schema initializer, on that schema's first use.
21
+ // Schema table: entry i is schema j of builder f, made on first reach.
22
+
@@ -1,10 +1,8 @@
1
1
  import * as API from "@distilled.cloud/core/api";
2
- import * as S from "@distilled.cloud/core/schema";
3
2
  import { type SlackOpError, type SlackOpContext } from "../protocol.ts";
4
3
  export type { SlackOpError, SlackOpContext };
5
4
  /** The level that we are setting the file's permission to (read or write) */
6
5
  export type AddBookmarkRequestAccessLevel = "read" | "write";
7
- export declare const AddBookmarkRequestAccessLevel: any;
8
6
  export interface AddBookmarkRequest {
9
7
  /** Channel to add bookmark in. Required for public channels. */
10
8
  channel_id?: string;
@@ -23,13 +21,11 @@ export interface AddBookmarkRequest {
23
21
  /** Id of this bookmark's parent */
24
22
  parent_id?: string;
25
23
  }
26
- export declare const AddBookmarkRequest: S.Schema<AddBookmarkRequest>;
27
24
  export interface AddBookmarkResponse {
28
25
  /** Always `true` (a failed call raises a typed error instead). */
29
26
  ok: boolean;
30
27
  bookmark: unknown;
31
28
  }
32
- export declare const AddBookmarkResponse: S.Schema<AddBookmarkResponse>;
33
29
  export interface EditBookmarkRequest {
34
30
  /** Channel to update bookmark in. Required for public channels. */
35
31
  channel_id?: string;
@@ -42,26 +38,21 @@ export interface EditBookmarkRequest {
42
38
  /** Emoji tag to apply to the link. */
43
39
  emoji?: string;
44
40
  }
45
- export declare const EditBookmarkRequest: S.Schema<EditBookmarkRequest>;
46
41
  export interface EditBookmarkResponse {
47
42
  /** Always `true` (a failed call raises a typed error instead). */
48
43
  ok: boolean;
49
44
  bookmark: unknown;
50
45
  }
51
- export declare const EditBookmarkResponse: S.Schema<EditBookmarkResponse>;
52
46
  export interface ListBookmarksRequest {
53
47
  /** Channel to list bookmarks in. Required for public channels. */
54
48
  channel_id?: string;
55
49
  }
56
- export declare const ListBookmarksRequest: S.Schema<ListBookmarksRequest>;
57
50
  export type ListBookmarksResponseBookmarksList = Array<unknown>;
58
- export declare const ListBookmarksResponseBookmarksList: S.Schema<ListBookmarksResponseBookmarksList>;
59
51
  export interface ListBookmarksResponse {
60
52
  /** Always `true` (a failed call raises a typed error instead). */
61
53
  ok: boolean;
62
54
  bookmarks: ListBookmarksResponseBookmarksList;
63
55
  }
64
- export declare const ListBookmarksResponse: S.Schema<ListBookmarksResponse>;
65
56
  export interface RemoveBookmarkRequest {
66
57
  /** Channel to remove bookmark. Required for public channels. */
67
58
  channel_id?: string;
@@ -70,22 +61,20 @@ export interface RemoveBookmarkRequest {
70
61
  /** Quip section ID to unbookmark */
71
62
  quip_section_id?: string;
72
63
  }
73
- export declare const RemoveBookmarkRequest: S.Schema<RemoveBookmarkRequest>;
74
64
  export interface RemoveBookmarkResponse {
75
65
  /** Always `true` (a failed call raises a typed error instead). */
76
66
  ok: boolean;
77
67
  }
78
- export declare const RemoveBookmarkResponse: S.Schema<RemoveBookmarkResponse>;
79
68
  export type AddBookmarkError = SlackOpError;
80
- /** Add bookmark to a channel. Required scopes — bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` — Actor lacks access to the requested resource. - `cannot_bookmark_from_external_org` — File is an external file and cannot be bookmarked. - `cannot_bookmark_restricted_sharing_enabled` — File has restricted sharing enabled and cannot be bookmarked. - `channel_not_found` — Channel cannot be found. - `file_already_added` — The file has already been added to the folder. - `file_not_found` — File cannot be found. - `invalid_bookmark_type` — Bookmark type is not valid. - `invalid_app_action_type` — App action type is not valid. - `invalid_shortcut_type` — Shortcut type is not valid. - `invalid_child_type` — Child type is not valid. - `invalid_emoji` — Invalid emoji, does not follow the pattern of a valid emoji name. - `invalid_entity_id` — Invalid entity_id, file or message type bookmark should have original file or message ID. - `invalid_link` — Invalid link, link should begin with either http:// or https://. - `invalid_parent_type` — Parent type is not valid. - `not_implemented` — bookmarking not available for the user. - `parent_bookmark_disabled` — Parent bookmark feature flag is off. - `parent_with_link` — Parent bookmark should not have link. - `permission_denied` — No permission to perform this operation. - `restricted_action` — Members from an external organization cannot add workflow bookmarks to this channel. - `slack_connect_file_upload_sharing_blocked` — Admin has disabled File uploads in all Slack Connect communications - `slack_connect_clip_sharing_blocked` — Admin has disabled Clip sharing in Slack Connect channels - `slack_connect_blocked_file_type` — Files with certain extensions are blocked from being uploaded in all Slack Connect communications - `too_many_bookmarks` — Bookmark limit reached for channel. - `too_many_tabs` — tab limit reached for channel. - `too_many_requests` — Too many concurrent requests. Please retry. See https://docs.slack.dev/reference/methods/bookmarks.add */
69
+ /** Add bookmark to a channel. Required scopes -- bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` -- Actor lacks access to the requested resource. - `cannot_bookmark_from_external_org` -- File is an external file and cannot be bookmarked. - `cannot_bookmark_restricted_sharing_enabled` -- File has restricted sharing enabled and cannot be bookmarked. - `channel_not_found` -- Channel cannot be found. - `file_already_added` -- The file has already been added to the folder. - `file_not_found` -- File cannot be found. - `invalid_bookmark_type` -- Bookmark type is not valid. - `invalid_app_action_type` -- App action type is not valid. - `invalid_shortcut_type` -- Shortcut type is not valid. - `invalid_child_type` -- Child type is not valid. - `invalid_emoji` -- Invalid emoji, does not follow the pattern of a valid emoji name. - `invalid_entity_id` -- Invalid entity_id, file or message type bookmark should have original file or message ID. - `invalid_link` -- Invalid link, link should begin with either http:// or https://. - `invalid_parent_type` -- Parent type is not valid. - `not_implemented` -- bookmarking not available for the user. - `parent_bookmark_disabled` -- Parent bookmark feature flag is off. - `parent_with_link` -- Parent bookmark should not have link. - `permission_denied` -- No permission to perform this operation. - `restricted_action` -- Members from an external organization cannot add workflow bookmarks to this channel. - `slack_connect_file_upload_sharing_blocked` -- Admin has disabled File uploads in all Slack Connect communications - `slack_connect_clip_sharing_blocked` -- Admin has disabled Clip sharing in Slack Connect channels - `slack_connect_blocked_file_type` -- Files with certain extensions are blocked from being uploaded in all Slack Connect communications - `too_many_bookmarks` -- Bookmark limit reached for channel. - `too_many_tabs` -- tab limit reached for channel. - `too_many_requests` -- Too many concurrent requests. Please retry. See https://docs.slack.dev/reference/methods/bookmarks.add */
81
70
  export declare const addBookmark: API.OperationMethod<AddBookmarkRequest, AddBookmarkResponse, AddBookmarkError, SlackOpContext>;
82
71
  export type EditBookmarkError = SlackOpError;
83
- /** Edit bookmark. Required scopes — bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` — Actor lacks access to the requested resource. - `channel_not_found` — Channel cannot be found. - `invalid_bookmark_type` — Bookmark type is not valid. - `invalid_emoji` — Invalid emoji, does not follow the pattern of a valid emoji name. - `invalid_link` — Invalid link, link should begin with either http:// or https://. - `not_found` — Bookmark cannot be found. - `not_implemented` — bookmarking not available for the user. - `parent_with_link` — Parent bookmark should not have link. - `permission_denied` — No permission to perform this operation. - `restricted_action` — Members from an external organization cannot edit workflow bookmarks in this channel. - `slack_connect_file_upload_sharing_blocked` — Admin has disabled File uploads in all Slack Connect communications - `slack_connect_clip_sharing_blocked` — Admin has disabled Clip sharing in Slack Connect channels - `slack_connect_blocked_file_type` — Files with certain extensions are blocked from being uploaded in all Slack Connect communications See https://docs.slack.dev/reference/methods/bookmarks.edit */
72
+ /** Edit bookmark. Required scopes -- bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` -- Actor lacks access to the requested resource. - `channel_not_found` -- Channel cannot be found. - `invalid_bookmark_type` -- Bookmark type is not valid. - `invalid_emoji` -- Invalid emoji, does not follow the pattern of a valid emoji name. - `invalid_link` -- Invalid link, link should begin with either http:// or https://. - `not_found` -- Bookmark cannot be found. - `not_implemented` -- bookmarking not available for the user. - `parent_with_link` -- Parent bookmark should not have link. - `permission_denied` -- No permission to perform this operation. - `restricted_action` -- Members from an external organization cannot edit workflow bookmarks in this channel. - `slack_connect_file_upload_sharing_blocked` -- Admin has disabled File uploads in all Slack Connect communications - `slack_connect_clip_sharing_blocked` -- Admin has disabled Clip sharing in Slack Connect channels - `slack_connect_blocked_file_type` -- Files with certain extensions are blocked from being uploaded in all Slack Connect communications See https://docs.slack.dev/reference/methods/bookmarks.edit */
84
73
  export declare const editBookmark: API.OperationMethod<EditBookmarkRequest, EditBookmarkResponse, EditBookmarkError, SlackOpContext>;
85
74
  export type ListBookmarksError = SlackOpError;
86
- /** List bookmark for the channel. Required scopes — bot: `bookmarks:read`; user: `bookmarks:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `access_denied` — Actor lacks access to the requested resource. - `channel_not_found` — Channel cannot be found. - `not_implemented` — bookmarking not available for the user. See https://docs.slack.dev/reference/methods/bookmarks.list */
75
+ /** List bookmark for the channel. Required scopes -- bot: `bookmarks:read`; user: `bookmarks:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `access_denied` -- Actor lacks access to the requested resource. - `channel_not_found` -- Channel cannot be found. - `not_implemented` -- bookmarking not available for the user. See https://docs.slack.dev/reference/methods/bookmarks.list */
87
76
  export declare const listBookmarks: API.OperationMethod<ListBookmarksRequest, ListBookmarksResponse, ListBookmarksError, SlackOpContext>;
88
77
  export type RemoveBookmarkError = SlackOpError;
89
- /** Remove bookmark from the channel. Required scopes — bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` — Actor lacks access to the requested resource. - `channel_not_found` — Channel cannot be found. - `user_not_found` — User cannot be found. - `invalid_bookmark_type` — Bookmark type is not valid. - `not_found` — Bookmark cannot be found. - `not_implemented` — bookmarking not available for the user. - `permission_denied` — No permission to perform this operation. - `restricted_action` — Members from an external organization cannot remove workflow bookmarks from this channel. See https://docs.slack.dev/reference/methods/bookmarks.remove */
78
+ /** Remove bookmark from the channel. Required scopes -- bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` -- Actor lacks access to the requested resource. - `channel_not_found` -- Channel cannot be found. - `user_not_found` -- User cannot be found. - `invalid_bookmark_type` -- Bookmark type is not valid. - `not_found` -- Bookmark cannot be found. - `not_implemented` -- bookmarking not available for the user. - `permission_denied` -- No permission to perform this operation. - `restricted_action` -- Members from an external organization cannot remove workflow bookmarks from this channel. See https://docs.slack.dev/reference/methods/bookmarks.remove */
90
79
  export declare const removeBookmark: API.OperationMethod<RemoveBookmarkRequest, RemoveBookmarkResponse, RemoveBookmarkError, SlackOpContext>;
91
80
  //# sourceMappingURL=bookmarks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bookmarks.d.ts","sourceRoot":"","sources":["../../src/services/bookmarks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAEjD,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAElD,OA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C;CACb;AACD,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC;AAC5C,smEAAsmE;AACtmE,eAAO,MAAM,WAAW,EAAE,GAAG,CAAC,eAAe,CAC3C,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,CAOb,CAAC;AAEJ,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC;AAC7C,yvCAAyvC;AACzvC,eAAO,MAAM,YAAY,EAAE,GAAG,CAAC,eAAe,CAC5C,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,CAOb,CAAC;AAEJ,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC;AAC9C,saAAsa;AACta,eAAO,MAAM,aAAa,EAAE,GAAG,CAAC,eAAe,CAC7C,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,CAOb,CAAC;AAEJ,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC;AAC/C,kvBAAkvB;AAClvB,eAAO,MAAM,cAAc,EAAE,GAAG,CAAC,eAAe,CAC9C,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,cAAc,CAOb,CAAC"}
@@ -1,82 +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 AddBookmarkRequestAccessLevel = S.String;
9
- export const AddBookmarkRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
10
- channel_id: S.optional(S.String),
11
- title: S.String,
12
- link: S.optional(S.String),
13
- type: S.String,
14
- emoji: S.optional(S.String),
15
- entity_id: S.optional(S.String),
16
- access_level: S.optional(AddBookmarkRequestAccessLevel),
17
- parent_id: S.optional(S.String),
18
- }).pipe(T.Http({ method: "POST", uri: "/bookmarks.add", code: 200 }))).annotate({ identifier: "AddBookmarkRequest" });
19
- export const AddBookmarkResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
20
- ok: S.Boolean,
21
- bookmark: S.Unknown,
22
- })).annotate({ identifier: "AddBookmarkResponse" });
23
- export const EditBookmarkRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
24
- channel_id: S.optional(S.String),
25
- bookmark_id: S.optional(S.String),
26
- title: S.optional(S.String),
27
- link: S.optional(S.String),
28
- emoji: S.optional(S.String),
29
- }).pipe(T.Http({ method: "POST", uri: "/bookmarks.edit", code: 200 }))).annotate({ identifier: "EditBookmarkRequest" });
30
- export const EditBookmarkResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
31
- ok: S.Boolean,
32
- bookmark: S.Unknown,
33
- })).annotate({ identifier: "EditBookmarkResponse" });
34
- export const ListBookmarksRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
35
- channel_id: S.optional(S.String),
36
- }).pipe(T.Http({ method: "POST", uri: "/bookmarks.list", code: 200 }))).annotate({ identifier: "ListBookmarksRequest" });
37
- export const ListBookmarksResponseBookmarksList = /*@__PURE__*/ S.Array(S.Unknown);
38
- export const ListBookmarksResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
39
- ok: S.Boolean,
40
- bookmarks: ListBookmarksResponseBookmarksList,
41
- })).annotate({ identifier: "ListBookmarksResponse" });
42
- export const RemoveBookmarkRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
43
- channel_id: S.optional(S.String),
44
- bookmark_id: S.optional(S.String),
45
- quip_section_id: S.optional(S.String),
46
- }).pipe(T.Http({ method: "POST", uri: "/bookmarks.remove", code: 200 }))).annotate({ identifier: "RemoveBookmarkRequest" });
47
- export const RemoveBookmarkResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
48
- ok: S.Boolean,
49
- })).annotate({ identifier: "RemoveBookmarkResponse" });
50
- /** Add bookmark to a channel. Required scopes — bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` — Actor lacks access to the requested resource. - `cannot_bookmark_from_external_org` — File is an external file and cannot be bookmarked. - `cannot_bookmark_restricted_sharing_enabled` — File has restricted sharing enabled and cannot be bookmarked. - `channel_not_found` — Channel cannot be found. - `file_already_added` — The file has already been added to the folder. - `file_not_found` — File cannot be found. - `invalid_bookmark_type` — Bookmark type is not valid. - `invalid_app_action_type` — App action type is not valid. - `invalid_shortcut_type` — Shortcut type is not valid. - `invalid_child_type` — Child type is not valid. - `invalid_emoji` — Invalid emoji, does not follow the pattern of a valid emoji name. - `invalid_entity_id` — Invalid entity_id, file or message type bookmark should have original file or message ID. - `invalid_link` — Invalid link, link should begin with either http:// or https://. - `invalid_parent_type` — Parent type is not valid. - `not_implemented` — bookmarking not available for the user. - `parent_bookmark_disabled` — Parent bookmark feature flag is off. - `parent_with_link` — Parent bookmark should not have link. - `permission_denied` — No permission to perform this operation. - `restricted_action` — Members from an external organization cannot add workflow bookmarks to this channel. - `slack_connect_file_upload_sharing_blocked` — Admin has disabled File uploads in all Slack Connect communications - `slack_connect_clip_sharing_blocked` — Admin has disabled Clip sharing in Slack Connect channels - `slack_connect_blocked_file_type` — Files with certain extensions are blocked from being uploaded in all Slack Connect communications - `too_many_bookmarks` — Bookmark limit reached for channel. - `too_many_tabs` — tab limit reached for channel. - `too_many_requests` — Too many concurrent requests. Please retry. See https://docs.slack.dev/reference/methods/bookmarks.add */
51
- export const addBookmark = /*@__PURE__*/ API.make(() => ({
52
- input: AddBookmarkRequest,
53
- output: AddBookmarkResponse,
54
- errors: [SlackError, SlackRateLimited],
55
- protocol: SlackProtocol,
56
- retry: Retry.Retry,
57
- }));
58
- /** Edit bookmark. Required scopes — bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` — Actor lacks access to the requested resource. - `channel_not_found` — Channel cannot be found. - `invalid_bookmark_type` — Bookmark type is not valid. - `invalid_emoji` — Invalid emoji, does not follow the pattern of a valid emoji name. - `invalid_link` — Invalid link, link should begin with either http:// or https://. - `not_found` — Bookmark cannot be found. - `not_implemented` — bookmarking not available for the user. - `parent_with_link` — Parent bookmark should not have link. - `permission_denied` — No permission to perform this operation. - `restricted_action` — Members from an external organization cannot edit workflow bookmarks in this channel. - `slack_connect_file_upload_sharing_blocked` — Admin has disabled File uploads in all Slack Connect communications - `slack_connect_clip_sharing_blocked` — Admin has disabled Clip sharing in Slack Connect channels - `slack_connect_blocked_file_type` — Files with certain extensions are blocked from being uploaded in all Slack Connect communications See https://docs.slack.dev/reference/methods/bookmarks.edit */
59
- export const editBookmark = /*@__PURE__*/ API.make(() => ({
60
- input: EditBookmarkRequest,
61
- output: EditBookmarkResponse,
62
- errors: [SlackError, SlackRateLimited],
63
- protocol: SlackProtocol,
64
- retry: Retry.Retry,
65
- }));
66
- /** List bookmark for the channel. Required scopes — bot: `bookmarks:read`; user: `bookmarks:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `access_denied` — Actor lacks access to the requested resource. - `channel_not_found` — Channel cannot be found. - `not_implemented` — bookmarking not available for the user. See https://docs.slack.dev/reference/methods/bookmarks.list */
67
- export const listBookmarks = /*@__PURE__*/ API.make(() => ({
68
- input: ListBookmarksRequest,
69
- output: ListBookmarksResponse,
70
- errors: [SlackError, SlackRateLimited],
71
- protocol: SlackProtocol,
72
- retry: Retry.Retry,
73
- }));
74
- /** Remove bookmark from the channel. Required scopes — bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` — Actor lacks access to the requested resource. - `channel_not_found` — Channel cannot be found. - `user_not_found` — User cannot be found. - `invalid_bookmark_type` — Bookmark type is not valid. - `not_found` — Bookmark cannot be found. - `not_implemented` — bookmarking not available for the user. - `permission_denied` — No permission to perform this operation. - `restricted_action` — Members from an external organization cannot remove workflow bookmarks from this channel. See https://docs.slack.dev/reference/methods/bookmarks.remove */
75
- export const removeBookmark = /*@__PURE__*/ API.make(() => ({
76
- input: RemoveBookmarkRequest,
77
- output: RemoveBookmarkResponse,
78
- errors: [SlackError, SlackRateLimited],
79
- protocol: SlackProtocol,
80
- retry: Retry.Retry,
81
- }));
82
- //# sourceMappingURL=bookmarks.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 = S.Unknown;
17
+ const __8 = S.Array;
18
+
19
+ export const addBookmark = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:0,errors:[$7,$8],protocol:$9,retry:$10};$5(>2)@"AddBookmarkRequest";$4({channel_id:$3($2),title:$2,link:$3($2),type:$2,emoji:$3($2),entity_id:$3($2),access_level:$3($2),parent_id:$3($2)}).pipe($1({method:"POST",uri:"/bookmarks.add",code:200}))', [__0, __1, __2, __3, __4, __5, __d0, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(addBookmark, i));
20
+
21
+ export const editBookmark = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:0,errors:[$7,$8],protocol:$9,retry:$10};$5(>2)@"EditBookmarkRequest";$4({channel_id:$3($2),bookmark_id:$3($2),title:$3($2),link:$3($2),emoji:$3($2)}).pipe($1({method:"POST",uri:"/bookmarks.edit",code:200}))', [__0, __1, __2, __3, __4, __5, __d0, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(editBookmark, i));
22
+
23
+ export const listBookmarks = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#3,errors:[$9,$10],protocol:$11,retry:$12};$5(>4)@"ListBookmarksRequest";$7($6);$5(>5)@"ListBookmarksResponse";$4({channel_id:$3($2)}).pipe($1({method:"POST",uri:"/bookmarks.list",code:200}));$4({ok:$8,bookmarks:#2})', [__0, __1, __2, __3, __4, __5, __7, __8, __6, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(listBookmarks, i));
24
+
25
+ export const removeBookmark = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$7,$8],protocol:$9,retry:$10};$5(>3)@"RemoveBookmarkRequest";$5(>4)@"RemoveBookmarkResponse";$4({channel_id:$3($2),bookmark_id:$3($2),quip_section_id:$3($2)}).pipe($1({method:"POST",uri:"/bookmarks.remove",code:200}));$4({ok:$6})', [__0, __1, __2, __3, __4, __5, __6, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]] : API.call(removeBookmark, 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 ['$4(>1)@"AddBookmarkResponse";$3({ok:$1,bookmark:$2})', [__0, __6, __7, __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 BotsInfoRequest {
@@ -8,7 +7,6 @@ export interface BotsInfoRequest {
8
7
  /** encoded team id or enterprise id where the bot exists, required if org token is used */
9
8
  team_id?: string;
10
9
  }
11
- export declare const BotsInfoRequest: S.Schema<BotsInfoRequest>;
12
10
  export interface BotsInfoResponseBotsItemIcons {
13
11
  emoji?: string;
14
12
  image_36?: string;
@@ -16,7 +14,6 @@ export interface BotsInfoResponseBotsItemIcons {
16
14
  image_64?: string;
17
15
  image_72?: string;
18
16
  }
19
- export declare const BotsInfoResponseBotsItemIcons: S.Schema<BotsInfoResponseBotsItemIcons>;
20
17
  export interface BotsInfoResponseBotsItem {
21
18
  updated: number;
22
19
  name?: string;
@@ -29,11 +26,8 @@ export interface BotsInfoResponseBotsItem {
29
26
  is_legacy_workflow_bot?: boolean;
30
27
  user_id?: string;
31
28
  }
32
- export declare const BotsInfoResponseBotsItem: S.Schema<BotsInfoResponseBotsItem>;
33
29
  export type BotsInfoResponseBotsList = Array<BotsInfoResponseBotsItem>;
34
- export declare const BotsInfoResponseBotsList: S.Schema<BotsInfoResponseBotsList>;
35
30
  export type BotsInfoResponseBotIcons = BotsInfoResponseBotsItemIcons;
36
- export declare const BotsInfoResponseBotIcons: S.Schema<BotsInfoResponseBotsItemIcons>;
37
31
  export interface BotsInfoResponseBot {
38
32
  updated: number;
39
33
  user_id?: string;
@@ -46,15 +40,13 @@ export interface BotsInfoResponseBot {
46
40
  is_connector_bot?: boolean;
47
41
  is_legacy_workflow_bot?: boolean;
48
42
  }
49
- export declare const BotsInfoResponseBot: S.Schema<BotsInfoResponseBot>;
50
43
  export interface BotsInfoResponse {
51
44
  /** Always `true` (a failed call raises a typed error instead). */
52
45
  ok: boolean;
53
46
  bots?: BotsInfoResponseBotsList;
54
47
  bot?: BotsInfoResponseBot;
55
48
  }
56
- export declare const BotsInfoResponse: S.Schema<BotsInfoResponse>;
57
49
  export type BotsInfoError = SlackOpError;
58
- /** Gets information about a bot user. Required scopes — bot: `users:read`; user: `users:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `bot_not_found` — Value passed for `bot` was invalid. - `bots_not_found` — At least one value passed for `bots` was invalid. - `missing_argument` — A required argument is missing. - `team_not_found` — Value passed for `team_id` was invalid. See https://docs.slack.dev/reference/methods/bots.info */
50
+ /** Gets information about a bot user. Required scopes -- bot: `users:read`; user: `users:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `bot_not_found` -- Value passed for `bot` was invalid. - `bots_not_found` -- At least one value passed for `bots` was invalid. - `missing_argument` -- A required argument is missing. - `team_not_found` -- Value passed for `team_id` was invalid. See https://docs.slack.dev/reference/methods/bots.info */
59
51
  export declare const botsInfo: API.OperationMethod<BotsInfoRequest, BotsInfoResponse, BotsInfoError, SlackOpContext>;
60
52
  //# sourceMappingURL=bots.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bots.d.ts","sourceRoot":"","sources":["../../src/services/bots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAEjD,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAElD,OAAO,EAAiB,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAIvF,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;AAE7C,MAAM,WAAW,eAAe;IAC9B,8BAA8B;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,2FAA2F;IAC3F,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AACD,eAAO,MAAM,eAAe,EAK4B,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;AAElF,MAAM,WAAW,6BAA6B;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AACD,eAAO,MAAM,6BAA6B,EAU7B,CAAC,CAAC,MAAM,CAAC,6BAA6B,CAAC,CAAC;AAErD,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,6BAA6B,CAAC;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,sBAAsB,CAAC,EAAE,O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E,6BAA6B,CAAC;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AACD,MAAM,WAAW,gBAAgB;IAC/B,kEAAkE;IAClE,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,CAAC,EAAE,wBAAwB,CAAC;IAChC,GAAG,CAAC,EAAE,mBAAmB,CAAC;CAC3B;AACD,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC;AACzC,geAAge;AAChe,eAAO,MAAM,QAAQ,EAAE,GAAG,CAAC,eAAe,CACxC,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,cAAc,CAOb,CAAC"}
@@ -1,60 +1,23 @@
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 BotsInfoRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
9
- bot: S.optional(S.String.pipe(T.Query())),
10
- team_id: S.optional(S.String.pipe(T.Query())),
11
- }).pipe(T.Http({ method: "GET", uri: "/bots.info", code: 200 }))).annotate({ identifier: "BotsInfoRequest" });
12
- export const BotsInfoResponseBotsItemIcons = /*@__PURE__*/ S.suspend(() => S.Struct({
13
- emoji: S.optional(S.String),
14
- image_36: S.optional(S.String),
15
- image_48: S.optional(S.String),
16
- image_64: S.optional(S.String),
17
- image_72: S.optional(S.String),
18
- })).annotate({
19
- identifier: "BotsInfoResponseBotsItemIcons",
20
- });
21
- export const BotsInfoResponseBotsItem = /*@__PURE__*/ S.suspend(() => S.Struct({
22
- updated: S.Number,
23
- name: S.optional(S.String),
24
- icons: S.optional(BotsInfoResponseBotsItemIcons),
25
- deleted: S.Boolean,
26
- app_id: S.optional(S.String),
27
- id: S.String,
28
- is_workflow_bot: S.optional(S.Boolean),
29
- is_connector_bot: S.optional(S.Boolean),
30
- is_legacy_workflow_bot: S.optional(S.Boolean),
31
- user_id: S.optional(S.String),
32
- })).annotate({ identifier: "BotsInfoResponseBotsItem" });
33
- export const BotsInfoResponseBotsList = /*@__PURE__*/ S.Array(BotsInfoResponseBotsItem);
34
- export const BotsInfoResponseBotIcons = BotsInfoResponseBotsItemIcons;
35
- export const BotsInfoResponseBot = /*@__PURE__*/ S.suspend(() => S.Struct({
36
- updated: S.Number,
37
- user_id: S.optional(S.String),
38
- name: S.optional(S.String),
39
- icons: S.optional(BotsInfoResponseBotsItemIcons),
40
- deleted: S.Boolean,
41
- app_id: S.optional(S.String),
42
- id: S.String,
43
- is_workflow_bot: S.optional(S.Boolean),
44
- is_connector_bot: S.optional(S.Boolean),
45
- is_legacy_workflow_bot: S.optional(S.Boolean),
46
- })).annotate({ identifier: "BotsInfoResponseBot" });
47
- export const BotsInfoResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
48
- ok: S.Boolean,
49
- bots: S.optional(BotsInfoResponseBotsList),
50
- bot: S.optional(BotsInfoResponseBot),
51
- })).annotate({ identifier: "BotsInfoResponse" });
52
- /** Gets information about a bot user. Required scopes — bot: `users:read`; user: `users:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `bot_not_found` — Value passed for `bot` was invalid. - `bots_not_found` — At least one value passed for `bots` was invalid. - `missing_argument` — A required argument is missing. - `team_not_found` — Value passed for `team_id` was invalid. See https://docs.slack.dev/reference/methods/bots.info */
53
- export const botsInfo = /*@__PURE__*/ API.make(() => ({
54
- input: BotsInfoRequest,
55
- output: BotsInfoResponse,
56
- errors: [SlackError, SlackRateLimited],
57
- protocol: SlackProtocol,
58
- retry: Retry.Retry,
59
- }));
60
- //# sourceMappingURL=bots.js.map
9
+ const __0 = __L.at;
10
+ const __1 = T.Http;
11
+ const __2 = T.Query;
12
+ const __3 = S.String;
13
+ const __4 = S.optional;
14
+ const __5 = S.Struct;
15
+ const __6 = S.suspend;
16
+ const __7 = S.Number;
17
+ const __8 = S.Boolean;
18
+ const __9 = S.Array;
19
+
20
+ export const botsInfo = /*@__PURE__*/ API.op((i) => i === API.D ? API.named("BotsInfoResponse", '{input:#1,output:#6,errors:[$10,$11],protocol:$12,retry:$13};$6(>7)@"BotsInfoRequest";$6(>8)@"%BotsItemIcons";$6(>9)@"%BotsItem";$9(#3);$6(>10)@"%Bot";$6(>11)@"%";$5({bot:$4($3.pipe($2())),team_id:$4($3.pipe($2()))}).pipe($1({method:"GET",uri:"/bots.info",code:200}));$5({emoji:$4($3),image_36:$4($3),image_48:$4($3),image_64:$4($3),image_72:$4($3)});$5({updated:$7,name:$4($3),icons:$4(#2),deleted:$8,app_id:$4($3),id:$3,is_workflow_bot:$4($8),is_connector_bot:$4($8),is_legacy_workflow_bot:$4($8),user_id:$4($3)});$5({updated:$7,user_id:$4($3),name:$4($3),icons:$4(#2),deleted:$8,app_id:$4($3),id:$3,is_workflow_bot:$4($8),is_connector_bot:$4($8),is_legacy_workflow_bot:$4($8)});$5({ok:$8,bots:$4(#4),bot:$4(#5)})', [__0, __1, __2, __3, __4, __5, __6, __7, __8, __9, SlackError, SlackRateLimited, SlackProtocol, Retry.Retry]) : API.call(botsInfo, i));
21
+ // Schema builders: each runs one schema initializer, on that schema's first use.
22
+ // Schema table: entry i is schema j of builder f, made on first reach.
23
+