@distilled.cloud/slack 0.0.0 → 1.0.0-rc.11

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 (212) hide show
  1. package/LICENSE +201 -0
  2. package/lib/credentials.d.ts +27 -0
  3. package/lib/credentials.d.ts.map +1 -0
  4. package/lib/credentials.js +53 -0
  5. package/lib/credentials.js.map +1 -0
  6. package/lib/errors.d.ts +83 -0
  7. package/lib/errors.d.ts.map +1 -0
  8. package/lib/errors.js +59 -0
  9. package/lib/errors.js.map +1 -0
  10. package/lib/index.d.ts +17 -0
  11. package/lib/index.d.ts.map +1 -0
  12. package/lib/index.js +17 -0
  13. package/lib/index.js.map +1 -0
  14. package/lib/pagination.d.ts +31 -0
  15. package/lib/pagination.d.ts.map +1 -0
  16. package/lib/pagination.js +31 -0
  17. package/lib/pagination.js.map +1 -0
  18. package/lib/protocol.d.ts +18 -0
  19. package/lib/protocol.d.ts.map +1 -0
  20. package/lib/protocol.js +230 -0
  21. package/lib/protocol.js.map +1 -0
  22. package/lib/retry.d.ts +52 -0
  23. package/lib/retry.d.ts.map +1 -0
  24. package/lib/retry.js +45 -0
  25. package/lib/retry.js.map +1 -0
  26. package/lib/services/admin.d.ts +2796 -0
  27. package/lib/services/admin.d.ts.map +1 -0
  28. package/lib/services/admin.js +3217 -0
  29. package/lib/services/admin.js.map +1 -0
  30. package/lib/services/api.d.ts +23 -0
  31. package/lib/services/api.d.ts.map +1 -0
  32. package/lib/services/api.js +26 -0
  33. package/lib/services/api.js.map +1 -0
  34. package/lib/services/apps.d.ts +568 -0
  35. package/lib/services/apps.d.ts.map +1 -0
  36. package/lib/services/apps.js +584 -0
  37. package/lib/services/apps.js.map +1 -0
  38. package/lib/services/assistant.d.ts +290 -0
  39. package/lib/services/assistant.d.ts.map +1 -0
  40. package/lib/services/assistant.js +232 -0
  41. package/lib/services/assistant.js.map +1 -0
  42. package/lib/services/auth.d.ts +90 -0
  43. package/lib/services/auth.d.ts.map +1 -0
  44. package/lib/services/auth.js +114 -0
  45. package/lib/services/auth.js.map +1 -0
  46. package/lib/services/blocks.d.ts +31 -0
  47. package/lib/services/blocks.d.ts.map +1 -0
  48. package/lib/services/blocks.js +31 -0
  49. package/lib/services/blocks.js.map +1 -0
  50. package/lib/services/bookmarks.d.ts +91 -0
  51. package/lib/services/bookmarks.d.ts.map +1 -0
  52. package/lib/services/bookmarks.js +98 -0
  53. package/lib/services/bookmarks.js.map +1 -0
  54. package/lib/services/bots.d.ts +60 -0
  55. package/lib/services/bots.d.ts.map +1 -0
  56. package/lib/services/bots.js +68 -0
  57. package/lib/services/bots.js.map +1 -0
  58. package/lib/services/calls.d.ts +124 -0
  59. package/lib/services/calls.d.ts.map +1 -0
  60. package/lib/services/calls.js +136 -0
  61. package/lib/services/calls.js.map +1 -0
  62. package/lib/services/canvases.d.ts +152 -0
  63. package/lib/services/canvases.d.ts.map +1 -0
  64. package/lib/services/canvases.js +152 -0
  65. package/lib/services/canvases.js.map +1 -0
  66. package/lib/services/chat.d.ts +525 -0
  67. package/lib/services/chat.d.ts.map +1 -0
  68. package/lib/services/chat.js +436 -0
  69. package/lib/services/chat.js.map +1 -0
  70. package/lib/services/conversations.d.ts +642 -0
  71. package/lib/services/conversations.d.ts.map +1 -0
  72. package/lib/services/conversations.js +769 -0
  73. package/lib/services/conversations.js.map +1 -0
  74. package/lib/services/dialog.d.ts +20 -0
  75. package/lib/services/dialog.d.ts.map +1 -0
  76. package/lib/services/dialog.js +27 -0
  77. package/lib/services/dialog.js.map +1 -0
  78. package/lib/services/dnd.d.ts +94 -0
  79. package/lib/services/dnd.d.ts.map +1 -0
  80. package/lib/services/dnd.js +111 -0
  81. package/lib/services/dnd.js.map +1 -0
  82. package/lib/services/emoji.d.ts +35 -0
  83. package/lib/services/emoji.d.ts.map +1 -0
  84. package/lib/services/emoji.js +40 -0
  85. package/lib/services/emoji.js.map +1 -0
  86. package/lib/services/entity.d.ts +93 -0
  87. package/lib/services/entity.d.ts.map +1 -0
  88. package/lib/services/entity.js +89 -0
  89. package/lib/services/entity.js.map +1 -0
  90. package/lib/services/files.d.ts +473 -0
  91. package/lib/services/files.d.ts.map +1 -0
  92. package/lib/services/files.js +510 -0
  93. package/lib/services/files.js.map +1 -0
  94. package/lib/services/functions.d.ts +235 -0
  95. package/lib/services/functions.d.ts.map +1 -0
  96. package/lib/services/functions.js +256 -0
  97. package/lib/services/functions.js.map +1 -0
  98. package/lib/services/index.d.ts +35 -0
  99. package/lib/services/index.d.ts.map +1 -0
  100. package/lib/services/index.js +36 -0
  101. package/lib/services/index.js.map +1 -0
  102. package/lib/services/lists.d.ts +300 -0
  103. package/lib/services/lists.d.ts.map +1 -0
  104. package/lib/services/lists.js +366 -0
  105. package/lib/services/lists.js.map +1 -0
  106. package/lib/services/migration.d.ts +34 -0
  107. package/lib/services/migration.d.ts.map +1 -0
  108. package/lib/services/migration.js +36 -0
  109. package/lib/services/migration.js.map +1 -0
  110. package/lib/services/oauth.d.ts +307 -0
  111. package/lib/services/oauth.d.ts.map +1 -0
  112. package/lib/services/oauth.js +278 -0
  113. package/lib/services/oauth.js.map +1 -0
  114. package/lib/services/openid.d.ts +86 -0
  115. package/lib/services/openid.d.ts.map +1 -0
  116. package/lib/services/openid.js +93 -0
  117. package/lib/services/openid.js.map +1 -0
  118. package/lib/services/pins.d.ts +64 -0
  119. package/lib/services/pins.d.ts.map +1 -0
  120. package/lib/services/pins.js +75 -0
  121. package/lib/services/pins.js.map +1 -0
  122. package/lib/services/reactions.d.ts +108 -0
  123. package/lib/services/reactions.d.ts.map +1 -0
  124. package/lib/services/reactions.js +119 -0
  125. package/lib/services/reactions.js.map +1 -0
  126. package/lib/services/reminders.d.ts +89 -0
  127. package/lib/services/reminders.d.ts.map +1 -0
  128. package/lib/services/reminders.js +109 -0
  129. package/lib/services/reminders.js.map +1 -0
  130. package/lib/services/rtm.d.ts +68 -0
  131. package/lib/services/rtm.d.ts.map +1 -0
  132. package/lib/services/rtm.js +74 -0
  133. package/lib/services/rtm.js.map +1 -0
  134. package/lib/services/search.d.ts +239 -0
  135. package/lib/services/search.d.ts.map +1 -0
  136. package/lib/services/search.js +190 -0
  137. package/lib/services/search.js.map +1 -0
  138. package/lib/services/stars.d.ts +126 -0
  139. package/lib/services/stars.d.ts.map +1 -0
  140. package/lib/services/stars.js +145 -0
  141. package/lib/services/stars.js.map +1 -0
  142. package/lib/services/team.d.ts +309 -0
  143. package/lib/services/team.d.ts.map +1 -0
  144. package/lib/services/team.js +333 -0
  145. package/lib/services/team.js.map +1 -0
  146. package/lib/services/tooling.d.ts +31 -0
  147. package/lib/services/tooling.d.ts.map +1 -0
  148. package/lib/services/tooling.js +38 -0
  149. package/lib/services/tooling.js.map +1 -0
  150. package/lib/services/usergroups.d.ts +183 -0
  151. package/lib/services/usergroups.d.ts.map +1 -0
  152. package/lib/services/usergroups.js +180 -0
  153. package/lib/services/usergroups.js.map +1 -0
  154. package/lib/services/users.d.ts +246 -0
  155. package/lib/services/users.d.ts.map +1 -0
  156. package/lib/services/users.js +309 -0
  157. package/lib/services/users.js.map +1 -0
  158. package/lib/services/views.d.ts +84 -0
  159. package/lib/services/views.d.ts.map +1 -0
  160. package/lib/services/views.js +95 -0
  161. package/lib/services/views.js.map +1 -0
  162. package/lib/services/workflows.d.ts +231 -0
  163. package/lib/services/workflows.d.ts.map +1 -0
  164. package/lib/services/workflows.js +238 -0
  165. package/lib/services/workflows.js.map +1 -0
  166. package/lib/traits.d.ts +11 -0
  167. package/lib/traits.d.ts.map +1 -0
  168. package/lib/traits.js +12 -0
  169. package/lib/traits.js.map +1 -0
  170. package/package.json +82 -4
  171. package/src/credentials.ts +86 -0
  172. package/src/errors.ts +101 -0
  173. package/src/index.ts +20 -0
  174. package/src/pagination.ts +35 -0
  175. package/src/protocol.ts +326 -0
  176. package/src/retry.ts +76 -0
  177. package/src/services/admin.ts +7722 -0
  178. package/src/services/api.ts +58 -0
  179. package/src/services/apps.ts +1441 -0
  180. package/src/services/assistant.ts +639 -0
  181. package/src/services/auth.ts +241 -0
  182. package/src/services/blocks.ts +80 -0
  183. package/src/services/bookmarks.ts +223 -0
  184. package/src/services/bots.ts +144 -0
  185. package/src/services/calls.ts +318 -0
  186. package/src/services/canvases.ts +392 -0
  187. package/src/services/chat.ts +1191 -0
  188. package/src/services/conversations.ts +1754 -0
  189. package/src/services/dialog.ts +55 -0
  190. package/src/services/dnd.ts +246 -0
  191. package/src/services/emoji.ts +91 -0
  192. package/src/services/entity.ts +225 -0
  193. package/src/services/files.ts +1192 -0
  194. package/src/services/functions.ts +642 -0
  195. package/src/services/index.ts +35 -0
  196. package/src/services/lists.ts +832 -0
  197. package/src/services/migration.ts +85 -0
  198. package/src/services/oauth.ts +658 -0
  199. package/src/services/openid.ts +243 -0
  200. package/src/services/pins.ts +167 -0
  201. package/src/services/reactions.ts +272 -0
  202. package/src/services/reminders.ts +240 -0
  203. package/src/services/rtm.ts +162 -0
  204. package/src/services/search.ts +507 -0
  205. package/src/services/stars.ts +323 -0
  206. package/src/services/team.ts +834 -0
  207. package/src/services/tooling.ts +78 -0
  208. package/src/services/usergroups.ts +441 -0
  209. package/src/services/users.ts +685 -0
  210. package/src/services/views.ts +212 -0
  211. package/src/services/workflows.ts +605 -0
  212. package/src/traits.ts +45 -0
@@ -0,0 +1,68 @@
1
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
2
+ import * as S from "@distilled.cloud/core/schema";
3
+ import * as API from "@distilled.cloud/core/api";
4
+ import * as T from "../traits.js";
5
+ import { SlackProtocol, } from "../protocol.js";
6
+ import { SlackError, SlackRateLimited } from "../errors.js";
7
+ import * as Retry from "../retry.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({
12
+ identifier: "BotsInfoRequest",
13
+ });
14
+ export const BotsInfoResponseBotsItemIcons = /*@__PURE__*/ S.suspend(() => S.Struct({
15
+ emoji: S.optional(S.String),
16
+ image_36: S.optional(S.String),
17
+ image_48: S.optional(S.String),
18
+ image_64: S.optional(S.String),
19
+ image_72: S.optional(S.String),
20
+ })).annotate({
21
+ identifier: "BotsInfoResponseBotsItemIcons",
22
+ });
23
+ export const BotsInfoResponseBotsItem = /*@__PURE__*/ S.suspend(() => S.Struct({
24
+ updated: S.Number,
25
+ name: S.optional(S.String),
26
+ icons: S.optional(BotsInfoResponseBotsItemIcons),
27
+ deleted: S.Boolean,
28
+ app_id: S.optional(S.String),
29
+ id: S.String,
30
+ is_workflow_bot: S.optional(S.Boolean),
31
+ is_connector_bot: S.optional(S.Boolean),
32
+ is_legacy_workflow_bot: S.optional(S.Boolean),
33
+ user_id: S.optional(S.String),
34
+ })).annotate({
35
+ identifier: "BotsInfoResponseBotsItem",
36
+ });
37
+ export const BotsInfoResponseBotsList = /*@__PURE__*/ S.Array(BotsInfoResponseBotsItem);
38
+ export const BotsInfoResponseBotIcons = BotsInfoResponseBotsItemIcons;
39
+ export const BotsInfoResponseBot = /*@__PURE__*/ S.suspend(() => S.Struct({
40
+ updated: S.Number,
41
+ user_id: S.optional(S.String),
42
+ name: S.optional(S.String),
43
+ icons: S.optional(BotsInfoResponseBotsItemIcons),
44
+ deleted: S.Boolean,
45
+ app_id: S.optional(S.String),
46
+ id: S.String,
47
+ is_workflow_bot: S.optional(S.Boolean),
48
+ is_connector_bot: S.optional(S.Boolean),
49
+ is_legacy_workflow_bot: S.optional(S.Boolean),
50
+ })).annotate({
51
+ identifier: "BotsInfoResponseBot",
52
+ });
53
+ export const BotsInfoResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
54
+ ok: S.Boolean,
55
+ bots: S.optional(BotsInfoResponseBotsList),
56
+ bot: S.optional(BotsInfoResponseBot),
57
+ })).annotate({
58
+ identifier: "BotsInfoResponse",
59
+ });
60
+ /** 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 */
61
+ export const botsInfo = /*@__PURE__*/ API.make(() => ({
62
+ input: BotsInfoRequest,
63
+ output: BotsInfoResponse,
64
+ errors: [SlackError, SlackRateLimited],
65
+ protocol: SlackProtocol,
66
+ retry: Retry.Retry,
67
+ }));
68
+ //# sourceMappingURL=bots.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bots.js","sourceRoot":"","sources":["../../src/services/bots.ts"],"names":[],"mappings":"AAAA,wGAAwG;AACxG,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EACL,aAAa,GAGd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,KAAK,KAAK,MAAM,aAAa,CAAC;AAUrC,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAC1D,CAAC,CAAC,MAAM,CAAC;IACP,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;IACzC,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;CAC9C,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,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,CAAC,CAAC,MAAM,CAAC;IACP,EAAE,EAAE,CAAC,CAAC,OAAO;IACb,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,wBAAwB,CAAC;IAC1C,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,mBAAmB,CAAC;CACrC,CAAC,CACH,CAAC,QAAQ,CAAC;IACT,UAAU,EAAE,kBAAkB;CAC/B,CAAsC,CAAC;AAGxC,2dAA2d;AAC3d,MAAM,CAAC,MAAM,QAAQ,GAKjB,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAChC,KAAK,EAAE,eAAe;IACtB,MAAM,EAAE,gBAAgB;IACxB,MAAM,EAAE,CAAC,UAAU,EAAE,gBAAgB,CAAC;IACtC,QAAQ,EAAE,aAAa;IACvB,KAAK,EAAE,KAAK,CAAC,KAAK;CACnB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,124 @@
1
+ import * as S from "@distilled.cloud/core/schema";
2
+ import * as API from "@distilled.cloud/core/api";
3
+ import { type SlackOpError, type SlackOpContext } from "../protocol.ts";
4
+ export type { SlackOpError, SlackOpContext };
5
+ /** The list of users to register as participants in the Call. [Read more on how to specify users here](/apis/web-api/using-the-calls-api#users). */
6
+ export type AddCallRequestUsersList = Array<unknown>;
7
+ export declare const AddCallRequestUsersList: S.Schema<AddCallRequestUsersList>;
8
+ export interface AddCallRequest {
9
+ /** An ID supplied by the 3rd-party Call provider. It must be unique across all Calls from that service. */
10
+ external_unique_id: string;
11
+ /** An optional, human-readable ID supplied by the 3rd-party Call provider. If supplied, this ID will be displayed in the Call object. */
12
+ external_display_id?: string;
13
+ /** The URL required for a client to join the Call. */
14
+ join_url: string;
15
+ /** When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL. */
16
+ desktop_app_join_url?: string;
17
+ /** Unix timestamp of the call start time */
18
+ date_start?: number;
19
+ /** The name of the Call. */
20
+ title?: string;
21
+ /** The valid Slack user ID of the user who created this Call. When this method is called with a user token, the `created_by` field is optional and defaults to the authed user of the token. Otherwise, the field is required. */
22
+ created_by?: string;
23
+ /** The list of users to register as participants in the Call. [Read more on how to specify users here](/apis/web-api/using-the-calls-api#users). */
24
+ users?: AddCallRequestUsersList;
25
+ }
26
+ export declare const AddCallRequest: S.Schema<AddCallRequest>;
27
+ export interface AddCallResponse {
28
+ /** Always `true` (a failed call raises a typed error instead). */
29
+ ok: boolean;
30
+ call: unknown;
31
+ }
32
+ export declare const AddCallResponse: S.Schema<AddCallResponse>;
33
+ /** The list of users to add as participants in the Call. [Read more on how to specify users here](/apis/web-api/using-the-calls-api#users). */
34
+ export type AddParticipantRequestUsersList = Array<unknown>;
35
+ export declare const AddParticipantRequestUsersList: S.Schema<AddParticipantRequestUsersList>;
36
+ export interface AddParticipantRequest {
37
+ /** `id` returned by the [`calls.add`](/reference/methods/calls.add) method. */
38
+ id: string;
39
+ /** The list of users to add as participants in the Call. [Read more on how to specify users here](/apis/web-api/using-the-calls-api#users). */
40
+ users: AddParticipantRequestUsersList;
41
+ }
42
+ export declare const AddParticipantRequest: S.Schema<AddParticipantRequest>;
43
+ export interface AddParticipantResponse {
44
+ /** Always `true` (a failed call raises a typed error instead). */
45
+ ok: boolean;
46
+ call: unknown;
47
+ }
48
+ export declare const AddParticipantResponse: S.Schema<AddParticipantResponse>;
49
+ export interface CallsEndRequest {
50
+ /** `id` returned when registering the call using the [`calls.add`](/reference/methods/calls.add) method. */
51
+ id: string;
52
+ /** Call duration in seconds */
53
+ duration?: number;
54
+ }
55
+ export declare const CallsEndRequest: S.Schema<CallsEndRequest>;
56
+ export interface CallsEndResponse {
57
+ /** Always `true` (a failed call raises a typed error instead). */
58
+ ok: boolean;
59
+ call: unknown;
60
+ }
61
+ export declare const CallsEndResponse: S.Schema<CallsEndResponse>;
62
+ export interface CallsInfoRequest {
63
+ /** `id` of the Call returned by the [`calls.add`](/reference/methods/calls.add) method. */
64
+ id: string;
65
+ }
66
+ export declare const CallsInfoRequest: S.Schema<CallsInfoRequest>;
67
+ export interface CallsInfoResponse {
68
+ /** Always `true` (a failed call raises a typed error instead). */
69
+ ok: boolean;
70
+ call: unknown;
71
+ }
72
+ export declare const CallsInfoResponse: S.Schema<CallsInfoResponse>;
73
+ /** The list of users to remove as participants in the Call. [Read more on how to specify users here](/apis/web-api/using-the-calls-api#users). */
74
+ export type RemoveParticipantRequestUsersList = Array<unknown>;
75
+ export declare const RemoveParticipantRequestUsersList: S.Schema<RemoveParticipantRequestUsersList>;
76
+ export interface RemoveParticipantRequest {
77
+ /** `id` returned by the [`calls.add`](/reference/methods/calls.add) method. */
78
+ id: string;
79
+ /** The list of users to remove as participants in the Call. [Read more on how to specify users here](/apis/web-api/using-the-calls-api#users). */
80
+ users: RemoveParticipantRequestUsersList;
81
+ }
82
+ export declare const RemoveParticipantRequest: S.Schema<RemoveParticipantRequest>;
83
+ export interface RemoveParticipantResponse {
84
+ /** Always `true` (a failed call raises a typed error instead). */
85
+ ok: boolean;
86
+ call: unknown;
87
+ }
88
+ export declare const RemoveParticipantResponse: S.Schema<RemoveParticipantResponse>;
89
+ export interface UpdateCallRequest {
90
+ /** `id` returned by the [`calls.add`](/reference/methods/calls.add) method. */
91
+ id: string;
92
+ /** The name of the Call. */
93
+ title?: string;
94
+ /** The URL required for a client to join the Call. */
95
+ join_url?: string;
96
+ /** When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL. */
97
+ desktop_app_join_url?: string;
98
+ }
99
+ export declare const UpdateCallRequest: S.Schema<UpdateCallRequest>;
100
+ export interface UpdateCallResponse {
101
+ /** Always `true` (a failed call raises a typed error instead). */
102
+ ok: boolean;
103
+ call: unknown;
104
+ }
105
+ export declare const UpdateCallResponse: S.Schema<UpdateCallResponse>;
106
+ export type AddCallError = SlackOpError;
107
+ /** Registers a new Call. Required scopes — bot: `calls:write`; user: `calls:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `internal_error` — An unexpected error has occurred while trying to register the Call. - `invalid_created_by` — The `created_by` user ID is invalid. - `invalid_start_time` — The start time is invalid. - `not_authorized` — The specified user is not authorized to create a Call in this channel. - `not_implemented` — This method is not available. - `user_not_found` — A specified user wasn't found. See https://docs.slack.dev/reference/methods/calls.add */
108
+ export declare const addCall: API.OperationMethod<AddCallRequest, AddCallResponse, AddCallError, SlackOpContext>;
109
+ export type AddParticipantError = SlackOpError;
110
+ /** Registers new participants added to a Call. Required scopes — bot: `calls:write`; user: `calls:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `bad_users` — At least one specified user is already part of the Call. - `inactive_call` — The Call has been already ended. - `internal_error` — An unexpected exception occurred while adding a Call participant. - `invalid_call_id` — The specified Call wasn't found. - `missing_argument` — A required argument is missing. - `not_implemented` — This method is not available. - `user_not_found` — At least one specified user wasn't found. See https://docs.slack.dev/reference/methods/calls.participants.add */
111
+ export declare const addParticipant: API.OperationMethod<AddParticipantRequest, AddParticipantResponse, AddParticipantError, SlackOpContext>;
112
+ export type CallsEndError = SlackOpError;
113
+ /** Ends a Call. Required scopes — bot: `calls:write`; user: `calls:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `inactive_call` — The Call has been already stopped. - `internal_error` — An unexpected error has occurred while ending the Call. - `invalid_call_id` — Invalid Call ID. - `not_implemented` — This method is not publicly available yet. See https://docs.slack.dev/reference/methods/calls.end */
114
+ export declare const callsEnd: API.OperationMethod<CallsEndRequest, CallsEndResponse, CallsEndError, SlackOpContext>;
115
+ export type CallsInfoError = SlackOpError;
116
+ /** Returns information about a Call. Required scopes — bot: `calls:read`; user: `calls:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `internal_error` — An unexpected error occurred while finding information about this Call. - `not_implemented` — This method is not available. See https://docs.slack.dev/reference/methods/calls.info */
117
+ export declare const callsInfo: API.OperationMethod<CallsInfoRequest, CallsInfoResponse, CallsInfoError, SlackOpContext>;
118
+ export type RemoveParticipantError = SlackOpError;
119
+ /** Registers participants removed from a Call. Required scopes — bot: `calls:write`; user: `calls:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `bad_users` — At least one specified user is not part of the Call. - `inactive_call` — The Call has been already ended. - `internal_error` — An unexpected exception occurred while removing participants from the Call. - `invalid_call_id` — The specified Call wasn't found. - `missing_argument` — A required argument is missing. - `not_implemented` — This method is not available. - `user_not_found` — At least one specified user wasn't found. See https://docs.slack.dev/reference/methods/calls.participants.remove */
120
+ export declare const removeParticipant: API.OperationMethod<RemoveParticipantRequest, RemoveParticipantResponse, RemoveParticipantError, SlackOpContext>;
121
+ export type UpdateCallError = SlackOpError;
122
+ /** Updates information about a Call. Required scopes — bot: `calls:write`; user: `calls:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `internal_error` — An unexpected exception occurred while updating the Call info. - `invalid_call_id` — The Call's `id` was invalid. - `not_implemented` — This method is not available. See https://docs.slack.dev/reference/methods/calls.update */
123
+ export declare const updateCall: API.OperationMethod<UpdateCallRequest, UpdateCallResponse, UpdateCallError, SlackOpContext>;
124
+ //# sourceMappingURL=calls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calls.d.ts","sourceRoot":"","sources":["../../src/services/calls.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAEjD,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AAIxB,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;AAE7C,oJAAoJ;AACpJ,MAAM,MAAM,uBAAuB,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;AACrD,eAAO,MAAM,uBAAuB,EAExB,CAAC,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC;AAE9C,MAAM,WAAW,cAAc;IAC7B,2GAA2G;IAC3G,kBAAkB,EAAE,MAAM,CAAC;IAC3B,yIAAyI;IACzI,mBAAmB,CAAC,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,CACjD,wBAAwB,EACxB,yBAAyB,EACzB,sBAAsB,EACtB,cAAc,CAOb,CAAC;AAEJ,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC;AAC3C,uaAAua;AACva,eAAO,MAAM,UAAU,EAAE,GAAG,CAAC,eAAe,CAC1C,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,cAAc,CAOb,CAAC"}
@@ -0,0 +1,136 @@
1
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
2
+ import * as S from "@distilled.cloud/core/schema";
3
+ import * as API from "@distilled.cloud/core/api";
4
+ import * as T from "../traits.js";
5
+ import { SlackProtocol, } from "../protocol.js";
6
+ import { SlackError, SlackRateLimited } from "../errors.js";
7
+ import * as Retry from "../retry.js";
8
+ export const AddCallRequestUsersList = /*@__PURE__*/ S.Array(S.Unknown);
9
+ export const AddCallRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
10
+ external_unique_id: S.String,
11
+ external_display_id: S.optional(S.String),
12
+ join_url: S.String,
13
+ desktop_app_join_url: S.optional(S.String),
14
+ date_start: S.optional(S.Number),
15
+ title: S.optional(S.String),
16
+ created_by: S.optional(S.String),
17
+ users: S.optional(AddCallRequestUsersList),
18
+ }).pipe(T.Http({ method: "POST", uri: "/calls.add", code: 200 }))).annotate({ identifier: "AddCallRequest" });
19
+ export const AddCallResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
20
+ ok: S.Boolean,
21
+ call: S.Unknown,
22
+ })).annotate({
23
+ identifier: "AddCallResponse",
24
+ });
25
+ export const AddParticipantRequestUsersList = /*@__PURE__*/ S.Array(S.Unknown);
26
+ export const AddParticipantRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
27
+ id: S.String,
28
+ users: AddParticipantRequestUsersList,
29
+ }).pipe(T.Http({ method: "POST", uri: "/calls.participants.add", code: 200 }))).annotate({
30
+ identifier: "AddParticipantRequest",
31
+ });
32
+ export const AddParticipantResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
33
+ ok: S.Boolean,
34
+ call: S.Unknown,
35
+ })).annotate({
36
+ identifier: "AddParticipantResponse",
37
+ });
38
+ export const CallsEndRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
39
+ id: S.String,
40
+ duration: S.optional(S.Number),
41
+ }).pipe(T.Http({ method: "POST", uri: "/calls.end", code: 200 }))).annotate({
42
+ identifier: "CallsEndRequest",
43
+ });
44
+ export const CallsEndResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
45
+ ok: S.Boolean,
46
+ call: S.Unknown,
47
+ })).annotate({
48
+ identifier: "CallsEndResponse",
49
+ });
50
+ export const CallsInfoRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
51
+ id: S.String,
52
+ }).pipe(T.Http({ method: "POST", uri: "/calls.info", code: 200 }))).annotate({
53
+ identifier: "CallsInfoRequest",
54
+ });
55
+ export const CallsInfoResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
56
+ ok: S.Boolean,
57
+ call: S.Unknown,
58
+ })).annotate({
59
+ identifier: "CallsInfoResponse",
60
+ });
61
+ export const RemoveParticipantRequestUsersList = /*@__PURE__*/ S.Array(S.Unknown);
62
+ export const RemoveParticipantRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
63
+ id: S.String,
64
+ users: RemoveParticipantRequestUsersList,
65
+ }).pipe(T.Http({ method: "POST", uri: "/calls.participants.remove", code: 200 }))).annotate({
66
+ identifier: "RemoveParticipantRequest",
67
+ });
68
+ export const RemoveParticipantResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
69
+ ok: S.Boolean,
70
+ call: S.Unknown,
71
+ })).annotate({
72
+ identifier: "RemoveParticipantResponse",
73
+ });
74
+ export const UpdateCallRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
75
+ id: S.String,
76
+ title: S.optional(S.String),
77
+ join_url: S.optional(S.String),
78
+ desktop_app_join_url: S.optional(S.String),
79
+ }).pipe(T.Http({ method: "POST", uri: "/calls.update", code: 200 }))).annotate({
80
+ identifier: "UpdateCallRequest",
81
+ });
82
+ export const UpdateCallResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
83
+ ok: S.Boolean,
84
+ call: S.Unknown,
85
+ })).annotate({
86
+ identifier: "UpdateCallResponse",
87
+ });
88
+ /** Registers a new Call. Required scopes — bot: `calls:write`; user: `calls:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `internal_error` — An unexpected error has occurred while trying to register the Call. - `invalid_created_by` — The `created_by` user ID is invalid. - `invalid_start_time` — The start time is invalid. - `not_authorized` — The specified user is not authorized to create a Call in this channel. - `not_implemented` — This method is not available. - `user_not_found` — A specified user wasn't found. See https://docs.slack.dev/reference/methods/calls.add */
89
+ export const addCall = /*@__PURE__*/ API.make(() => ({
90
+ input: AddCallRequest,
91
+ output: AddCallResponse,
92
+ errors: [SlackError, SlackRateLimited],
93
+ protocol: SlackProtocol,
94
+ retry: Retry.Retry,
95
+ }));
96
+ /** Registers new participants added to a Call. Required scopes — bot: `calls:write`; user: `calls:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `bad_users` — At least one specified user is already part of the Call. - `inactive_call` — The Call has been already ended. - `internal_error` — An unexpected exception occurred while adding a Call participant. - `invalid_call_id` — The specified Call wasn't found. - `missing_argument` — A required argument is missing. - `not_implemented` — This method is not available. - `user_not_found` — At least one specified user wasn't found. See https://docs.slack.dev/reference/methods/calls.participants.add */
97
+ export const addParticipant = /*@__PURE__*/ API.make(() => ({
98
+ input: AddParticipantRequest,
99
+ output: AddParticipantResponse,
100
+ errors: [SlackError, SlackRateLimited],
101
+ protocol: SlackProtocol,
102
+ retry: Retry.Retry,
103
+ }));
104
+ /** Ends a Call. Required scopes — bot: `calls:write`; user: `calls:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `inactive_call` — The Call has been already stopped. - `internal_error` — An unexpected error has occurred while ending the Call. - `invalid_call_id` — Invalid Call ID. - `not_implemented` — This method is not publicly available yet. See https://docs.slack.dev/reference/methods/calls.end */
105
+ export const callsEnd = /*@__PURE__*/ API.make(() => ({
106
+ input: CallsEndRequest,
107
+ output: CallsEndResponse,
108
+ errors: [SlackError, SlackRateLimited],
109
+ protocol: SlackProtocol,
110
+ retry: Retry.Retry,
111
+ }));
112
+ /** Returns information about a Call. Required scopes — bot: `calls:read`; user: `calls:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `internal_error` — An unexpected error occurred while finding information about this Call. - `not_implemented` — This method is not available. See https://docs.slack.dev/reference/methods/calls.info */
113
+ export const callsInfo = /*@__PURE__*/ API.make(() => ({
114
+ input: CallsInfoRequest,
115
+ output: CallsInfoResponse,
116
+ errors: [SlackError, SlackRateLimited],
117
+ protocol: SlackProtocol,
118
+ retry: Retry.Retry,
119
+ }));
120
+ /** Registers participants removed from a Call. Required scopes — bot: `calls:write`; user: `calls:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `bad_users` — At least one specified user is not part of the Call. - `inactive_call` — The Call has been already ended. - `internal_error` — An unexpected exception occurred while removing participants from the Call. - `invalid_call_id` — The specified Call wasn't found. - `missing_argument` — A required argument is missing. - `not_implemented` — This method is not available. - `user_not_found` — At least one specified user wasn't found. See https://docs.slack.dev/reference/methods/calls.participants.remove */
121
+ export const removeParticipant = /*@__PURE__*/ API.make(() => ({
122
+ input: RemoveParticipantRequest,
123
+ output: RemoveParticipantResponse,
124
+ errors: [SlackError, SlackRateLimited],
125
+ protocol: SlackProtocol,
126
+ retry: Retry.Retry,
127
+ }));
128
+ /** Updates information about a Call. Required scopes — bot: `calls:write`; user: `calls:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `internal_error` — An unexpected exception occurred while updating the Call info. - `invalid_call_id` — The Call's `id` was invalid. - `not_implemented` — This method is not available. See https://docs.slack.dev/reference/methods/calls.update */
129
+ export const updateCall = /*@__PURE__*/ API.make(() => ({
130
+ input: UpdateCallRequest,
131
+ output: UpdateCallResponse,
132
+ errors: [SlackError, SlackRateLimited],
133
+ protocol: SlackProtocol,
134
+ retry: Retry.Retry,
135
+ }));
136
+ //# sourceMappingURL=calls.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calls.js","sourceRoot":"","sources":["../../src/services/calls.ts"],"names":[],"mappings":"AAAA,wGAAwG;AACxG,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EACL,aAAa,GAGd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,KAAK,KAAK,MAAM,aAAa,CAAC;AAMrC,MAAM,CAAC,MAAM,uBAAuB,GAAG,aAAa,CAAC,CAAC,CAAC,KAAK,CAC1D,CAAC,CAAC,OAAO,CACkC,CAAC;AAoB9C,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CACzD,CAAC,CAAC,MAAM,CAAC;IACP,kBAAkB,EAAE,CAAC,CAAC,MAAM;IAC5B,mBAAmB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;IACzC,QAAQ,EAAE,CAAC,CAAC,MAAM;IAClB,oBAAoB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;IAC1C,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;IAChC,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;IAC3B,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;IAChC,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,uBAAuB,CAAC;CAC3C,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,M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xB,MAAM,EAAE,CAAC,UAAU,EAAE,gBAAgB,CAAC;IACtC,QAAQ,EAAE,aAAa;IACvB,KAAK,EAAE,KAAK,CAAC,KAAK;CACnB,CAAC,CAAC,CAAC;AAGJ,yXAAyX;AACzX,MAAM,CAAC,MAAM,SAAS,GAKlB,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAChC,KAAK,EAAE,gBAAgB;IACvB,MAAM,EAAE,iBAAiB;IACzB,MAAM,EAAE,CAAC,UAAU,EAAE,gBAAgB,CAAC;IACtC,QAAQ,EAAE,aAAa;IACvB,KAAK,EAAE,KAAK,CAAC,KAAK;CACnB,CAAC,CAAC,CAAC;AAGJ,+rBAA+rB;AAC/rB,MAAM,CAAC,MAAM,iBAAiB,GAK1B,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAChC,KAAK,EAAE,wBAAwB;IAC/B,MAAM,EAAE,yBAAyB;IACjC,MAAM,EAAE,CAAC,UAAU,EAAE,gBAAgB,CAAC;IACtC,QAAQ,EAAE,aAAa;IACvB,KAAK,EAAE,KAAK,CAAC,KAAK;CACnB,CAAC,CAAC,CAAC;AAGJ,uaAAua;AACva,MAAM,CAAC,MAAM,UAAU,GAKnB,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAChC,KAAK,EAAE,iBAAiB;IACxB,MAAM,EAAE,kBAAkB;IAC1B,MAAM,EAAE,CAAC,UAAU,EAAE,gBAAgB,CAAC;IACtC,QAAQ,EAAE,aAAa;IACvB,KAAK,EAAE,KAAK,CAAC,KAAK;CACnB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,152 @@
1
+ import * as S from "@distilled.cloud/core/schema";
2
+ import * as API from "@distilled.cloud/core/api";
3
+ import { type SlackOpError, type SlackOpContext } from "../protocol.ts";
4
+ export type { SlackOpError, SlackOpContext };
5
+ export interface CreateCanvaseRequest {
6
+ /** Title of the newly created canvas */
7
+ title?: string;
8
+ /** Structure describing the type and value of the content to create. The markdown content is limited to 1 MiB (1,048,576 characters). */
9
+ document_content?: unknown;
10
+ /** Channel ID of the channel the canvas will be tabbed in. This is a required field for free teams. */
11
+ channel_id?: string;
12
+ }
13
+ export declare const CreateCanvaseRequest: S.Schema<CreateCanvaseRequest>;
14
+ export interface CreateCanvaseResponse {
15
+ /** Always `true` (a failed call raises a typed error instead). */
16
+ ok: boolean;
17
+ /** Encoded ID of the canvas */
18
+ canvas_id: string;
19
+ }
20
+ export declare const CreateCanvaseResponse: S.Schema<CreateCanvaseResponse>;
21
+ /** List of channels you wish to update access for */
22
+ export type DeleteAccessRequestChannelIdsList = Array<string>;
23
+ export declare const DeleteAccessRequestChannelIdsList: S.Schema<DeleteAccessRequestChannelIdsList>;
24
+ /** List of users you wish to update access for */
25
+ export type DeleteAccessRequestUserIdsList = Array<string>;
26
+ export declare const DeleteAccessRequestUserIdsList: S.Schema<DeleteAccessRequestUserIdsList>;
27
+ export interface DeleteAccessRequest {
28
+ /** Encoded ID of the canvas */
29
+ canvas_id: string;
30
+ /** List of channels you wish to update access for */
31
+ channel_ids?: DeleteAccessRequestChannelIdsList;
32
+ /** List of users you wish to update access for */
33
+ user_ids?: DeleteAccessRequestUserIdsList;
34
+ }
35
+ export declare const DeleteAccessRequest: S.Schema<DeleteAccessRequest>;
36
+ /** The channel IDs that could not be updated */
37
+ export type DeleteAccessResponseFailedToUpdateChannelIdsList = Array<string>;
38
+ export declare const DeleteAccessResponseFailedToUpdateChannelIdsList: S.Schema<DeleteAccessResponseFailedToUpdateChannelIdsList>;
39
+ /** The user IDs that could not be updated */
40
+ export type DeleteAccessResponseFailedToUpdateUserIdsList = Array<string>;
41
+ export declare const DeleteAccessResponseFailedToUpdateUserIdsList: S.Schema<DeleteAccessResponseFailedToUpdateUserIdsList>;
42
+ export interface DeleteAccessResponse {
43
+ /** Always `true` (a failed call raises a typed error instead). */
44
+ ok: boolean;
45
+ /** The channel IDs that could not be updated */
46
+ failed_to_update_channel_ids?: DeleteAccessResponseFailedToUpdateChannelIdsList;
47
+ /** The user IDs that could not be updated */
48
+ failed_to_update_user_ids?: DeleteAccessResponseFailedToUpdateUserIdsList;
49
+ }
50
+ export declare const DeleteAccessResponse: S.Schema<DeleteAccessResponse>;
51
+ export interface DeleteCanvaseRequest {
52
+ /** Encoded ID of the canvas */
53
+ canvas_id: string;
54
+ }
55
+ export declare const DeleteCanvaseRequest: S.Schema<DeleteCanvaseRequest>;
56
+ export interface DeleteCanvaseResponse {
57
+ /** Always `true` (a failed call raises a typed error instead). */
58
+ ok: boolean;
59
+ }
60
+ export declare const DeleteCanvaseResponse: S.Schema<DeleteCanvaseResponse>;
61
+ /** List of changes to apply on the specified canvas. The markdown content of each change is limited to 1 MiB (1,048,576 characters). */
62
+ export type EditCanvaseRequestChangesList = Array<unknown>;
63
+ export declare const EditCanvaseRequestChangesList: S.Schema<EditCanvaseRequestChangesList>;
64
+ export interface EditCanvaseRequest {
65
+ /** Encoded ID of the canvas */
66
+ canvas_id: string;
67
+ /** List of changes to apply on the specified canvas. The markdown content of each change is limited to 1 MiB (1,048,576 characters). */
68
+ changes: EditCanvaseRequestChangesList;
69
+ }
70
+ export declare const EditCanvaseRequest: S.Schema<EditCanvaseRequest>;
71
+ export interface EditCanvaseResponse {
72
+ /** Always `true` (a failed call raises a typed error instead). */
73
+ ok: boolean;
74
+ }
75
+ export declare const EditCanvaseResponse: S.Schema<EditCanvaseResponse>;
76
+ export interface LookupSectionRequest {
77
+ /** Encoded ID of the canvas */
78
+ canvas_id: string;
79
+ /** Filtering criteria */
80
+ criteria: unknown;
81
+ }
82
+ export declare const LookupSectionRequest: S.Schema<LookupSectionRequest>;
83
+ /** IDs of child sections within a layout container (blockquote, callout, flexbox, or table). */
84
+ export type LookupSectionResponseSectionsItemChildSectionIdsList = Array<string>;
85
+ export declare const LookupSectionResponseSectionsItemChildSectionIdsList: S.Schema<LookupSectionResponseSectionsItemChildSectionIdsList>;
86
+ export interface LookupSectionResponseSectionsItem {
87
+ id: string;
88
+ /** IDs of child sections within a layout container (blockquote, callout, flexbox, or table). */
89
+ child_section_ids?: LookupSectionResponseSectionsItemChildSectionIdsList;
90
+ }
91
+ export declare const LookupSectionResponseSectionsItem: S.Schema<LookupSectionResponseSectionsItem>;
92
+ /** Sections in the canvas that match the provided criteria */
93
+ export type LookupSectionResponseSectionsList = Array<LookupSectionResponseSectionsItem>;
94
+ export declare const LookupSectionResponseSectionsList: S.Schema<LookupSectionResponseSectionsList>;
95
+ export interface LookupSectionResponse {
96
+ /** Always `true` (a failed call raises a typed error instead). */
97
+ ok: boolean;
98
+ /** Sections in the canvas that match the provided criteria */
99
+ sections: LookupSectionResponseSectionsList;
100
+ }
101
+ export declare const LookupSectionResponse: S.Schema<LookupSectionResponse>;
102
+ /** List of channels you wish to update access for. Can only be used if user_ids is not provided. */
103
+ export type SetAccessRequestChannelIdsList = Array<string>;
104
+ export declare const SetAccessRequestChannelIdsList: S.Schema<SetAccessRequestChannelIdsList>;
105
+ /** List of users you wish to update access for. Can only be used if channel_ids is not provided. */
106
+ export type SetAccessRequestUserIdsList = Array<string>;
107
+ export declare const SetAccessRequestUserIdsList: S.Schema<SetAccessRequestUserIdsList>;
108
+ export interface SetAccessRequest {
109
+ /** Encoded ID of the canvas */
110
+ canvas_id: string;
111
+ /** Desired level of access */
112
+ access_level: string;
113
+ /** List of channels you wish to update access for. Can only be used if user_ids is not provided. */
114
+ channel_ids?: SetAccessRequestChannelIdsList;
115
+ /** List of users you wish to update access for. Can only be used if channel_ids is not provided. */
116
+ user_ids?: SetAccessRequestUserIdsList;
117
+ }
118
+ export declare const SetAccessRequest: S.Schema<SetAccessRequest>;
119
+ /** The channel IDs that could not be updated */
120
+ export type SetAccessResponseFailedToUpdateChannelIdsList = Array<string>;
121
+ export declare const SetAccessResponseFailedToUpdateChannelIdsList: S.Schema<SetAccessResponseFailedToUpdateChannelIdsList>;
122
+ /** The user IDs that could not be updated */
123
+ export type SetAccessResponseFailedToUpdateUserIdsList = Array<string>;
124
+ export declare const SetAccessResponseFailedToUpdateUserIdsList: S.Schema<SetAccessResponseFailedToUpdateUserIdsList>;
125
+ export interface SetAccessResponse {
126
+ /** Always `true` (a failed call raises a typed error instead). */
127
+ ok: boolean;
128
+ /** The channel IDs that could not be updated */
129
+ failed_to_update_channel_ids?: SetAccessResponseFailedToUpdateChannelIdsList;
130
+ /** The user IDs that could not be updated */
131
+ failed_to_update_user_ids?: SetAccessResponseFailedToUpdateUserIdsList;
132
+ }
133
+ export declare const SetAccessResponse: S.Schema<SetAccessResponse>;
134
+ export type CreateCanvaseError = SlackOpError;
135
+ /** Create canvas for a user Required scopes — bot: `canvases:write`; user: `canvases:write`; seamless_user: `seamless.user` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `canvas_disabled_user_team` — Canvas is disabled on user's team - `restricted_action` — User does not have permission to perform this action. - `canvas_creation_failed` — Canvas was unable to be created. - `free_teams_cannot_create_non_tabbed_canvases` — Free teams cannot create non-tabbed standalone canvases - `free_team_canvas_tab_already_exists` — Free teams are limited to one canvas tab per channel - `free_teams_cannot_create_standalone_canvases` — Free teams cannot create standalone canvases See https://docs.slack.dev/reference/methods/canvases.create */
136
+ export declare const createCanvase: API.OperationMethod<CreateCanvaseRequest, CreateCanvaseResponse, CreateCanvaseError, SlackOpContext>;
137
+ export type DeleteAccessError = SlackOpError;
138
+ /** Remove access to a canvas for specified entities Required scopes — bot: `canvases:write`; user: `canvases:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `canvas_not_found` — The canvas you wish to revoke permissions for is not available. - `restricted_action` — User does not have permission to perform this action. - `canvas_disabled_user_team` — Canvas is disabled on user's team. - `invalid_parameters` — One of user_ids and channel_ids must be defined. - `channel_not_found` — A channel could not be found. - `user_not_found` — A user could not be found. See https://docs.slack.dev/reference/methods/canvases.access.delete */
139
+ export declare const deleteAccess: API.OperationMethod<DeleteAccessRequest, DeleteAccessResponse, DeleteAccessError, SlackOpContext>;
140
+ export type DeleteCanvaseError = SlackOpError;
141
+ /** Deletes a canvas Required scopes — bot: `canvases:write`; user: `canvases:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `canvas_deleting_disabled` — This functionality is disabled. - `canvas_not_found` — The canvas does not exist, or is not visible to the calling user. - `restricted_action` — User does not have permission to perform this action. See https://docs.slack.dev/reference/methods/canvases.delete */
142
+ export declare const deleteCanvase: API.OperationMethod<DeleteCanvaseRequest, DeleteCanvaseResponse, DeleteCanvaseError, SlackOpContext>;
143
+ export type EditCanvaseError = SlackOpError;
144
+ /** Update an existing canvas Required scopes — bot: `canvases:write`; user: `canvases:write`; seamless_user: `seamless.user` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `canvas_not_found` — The canvas you wish to apply changes to is not available. - `canvas_disabled_user_team` — Canvas is disabled on user's team - `free_teams_cannot_edit_standalone_canvases` — Free teams cannot edit standalone canvases - `restricted_action` — User does not have permission to perform this action. - `canvas_editing_failed` — The changes to the canvas failed to be applied. - `canvas_editing_locked` — Another edit to this canvas is currently in progress. Please retry after a short delay. - `canvas_too_large` — The canvas is too large to apply the requested changes. Reduce the size of the canvas or the edit and try again. See https://docs.slack.dev/reference/methods/canvases.edit */
145
+ export declare const editCanvase: API.OperationMethod<EditCanvaseRequest, EditCanvaseResponse, EditCanvaseError, SlackOpContext>;
146
+ export type LookupSectionError = SlackOpError;
147
+ /** Find sections matching the provided criteria Required scopes — bot: `canvases:read`; user: `canvases:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `canvas_deleted` — The canvas you wish to search is not available. - `canvas_disabled_user_team` — Canvas is disabled on user's team. - `canvas_not_found` — The canvas you wish to search for is not available. - `internal_error` — Something went wrong on our end, please try again. See https://docs.slack.dev/reference/methods/canvases.sections.lookup */
148
+ export declare const lookupSection: API.OperationMethod<LookupSectionRequest, LookupSectionResponse, LookupSectionError, SlackOpContext>;
149
+ export type SetAccessError = SlackOpError;
150
+ /** Sets the access level to a canvas for specified entities Required scopes — bot: `canvases:write`; user: `canvases:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `canvas_disabled_user_team` — Canvas is disabled on user's team - `canvas_not_found` — The canvas you wish to update permissions for is not available. - `channel_not_found` — A channel could not be found. - `failed_to_update_user_ids` — Failed to update the specified user_ids. - `invalid_parameters` — One of user_ids or channel_ids must be defined, but not both. - `restricted_action` — User does not have permission to perform this action. - `user_not_found` — A user could not be found. See https://docs.slack.dev/reference/methods/canvases.access.set */
151
+ export declare const setAccess: API.OperationMethod<SetAccessRequest, SetAccessResponse, SetAccessError, SlackOpContext>;
152
+ //# sourceMappingURL=canvases.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canvases.d.ts","sourceRoot":"","sources":["../../src/services/canvases.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,8BAA8B,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAEjD,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AAIxB,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;AAE7C,MAAM,WAAW,oBAAoB;IACnC,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yIAAyI;IACzI,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,uGAAuG;IACvG,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AACD,eAAO,MAAM,oBAAoB,EAQpB,CAAC,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;AAE5C,MAAM,WAAW,qBAAqB;IACpC,kEAAkE;IAClE,EAAE,EAAE,OAAO,CAAC;IACZ,+BAA+B;IAC/B,SAAS,EAAE,MAAM,CAAC;CACnB;AACD,eAAO,MAAM,qBAAqB,EAOrB,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;AAE7C,qDAAqD;AACrD,MAAM,MA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