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

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 (255) hide show
  1. package/lib/.lazy.json +1 -0
  2. package/lib/_bundle/lazy.js +4 -0
  3. package/lib/_bundle/sdk.js +2 -0
  4. package/lib/_bundle/sdk.js.map +1 -0
  5. package/lib/credentials.d.ts +1 -1
  6. package/lib/credentials.d.ts.map +1 -1
  7. package/lib/credentials.js +1 -53
  8. package/lib/errors.d.ts +31 -31
  9. package/lib/errors.d.ts.map +1 -1
  10. package/lib/errors.js +1 -59
  11. package/lib/index.d.ts +1 -1
  12. package/lib/index.js +0 -10
  13. package/lib/index.lazy.js +7 -0
  14. package/lib/pagination.d.ts +2 -2
  15. package/lib/pagination.js +1 -31
  16. package/lib/protocol.d.ts.map +1 -1
  17. package/lib/protocol.js +1 -231
  18. package/lib/retry.d.ts +2 -2
  19. package/lib/retry.d.ts.map +1 -1
  20. package/lib/retry.js +1 -45
  21. package/lib/services/admin.d.ts +123 -575
  22. package/lib/services/admin.d.ts.map +1 -1
  23. package/lib/services/admin.js +141 -2884
  24. package/lib/services/admin.js.map +1 -1
  25. package/lib/services/agents.d.ts +13 -55
  26. package/lib/services/agents.d.ts.map +1 -1
  27. package/lib/services/agents.js +1 -314
  28. package/lib/services/agents.js.map +1 -1
  29. package/lib/services/api.d.ts +0 -4
  30. package/lib/services/api.d.ts.map +1 -1
  31. package/lib/services/api.js +1 -23
  32. package/lib/services/api.js.map +1 -1
  33. package/lib/services/apps.d.ts +25 -106
  34. package/lib/services/apps.d.ts.map +1 -1
  35. package/lib/services/apps.js +35 -515
  36. package/lib/services/apps.js.map +1 -1
  37. package/lib/services/assistant.d.ts +6 -40
  38. package/lib/services/assistant.d.ts.map +1 -1
  39. package/lib/services/assistant.js +1 -209
  40. package/lib/services/assistant.js.map +1 -1
  41. package/lib/services/auth.d.ts +4 -15
  42. package/lib/services/auth.d.ts.map +1 -1
  43. package/lib/services/auth.js +1 -96
  44. package/lib/services/auth.js.map +1 -1
  45. package/lib/services/blocks.d.ts +1 -7
  46. package/lib/services/blocks.d.ts.map +1 -1
  47. package/lib/services/blocks.js +1 -26
  48. package/lib/services/blocks.js.map +1 -1
  49. package/lib/services/bookmarks.d.ts +4 -15
  50. package/lib/services/bookmarks.d.ts.map +1 -1
  51. package/lib/services/bookmarks.js +1 -81
  52. package/lib/services/bookmarks.js.map +1 -1
  53. package/lib/services/bots.d.ts +1 -9
  54. package/lib/services/bots.d.ts.map +1 -1
  55. package/lib/services/bots.js +1 -59
  56. package/lib/services/bots.js.map +1 -1
  57. package/lib/services/calls.d.ts +6 -22
  58. package/lib/services/calls.d.ts.map +1 -1
  59. package/lib/services/calls.js +1 -115
  60. package/lib/services/calls.js.map +1 -1
  61. package/lib/services/canvases.d.ts +7 -35
  62. package/lib/services/canvases.d.ts.map +1 -1
  63. package/lib/services/canvases.js +1 -140
  64. package/lib/services/canvases.js.map +1 -1
  65. package/lib/services/chat.d.ts +14 -83
  66. package/lib/services/chat.d.ts.map +1 -1
  67. package/lib/services/chat.js +1 -387
  68. package/lib/services/chat.js.map +1 -1
  69. package/lib/services/conversations.d.ts +31 -116
  70. package/lib/services/conversations.d.ts.map +1 -1
  71. package/lib/services/conversations.js +40 -696
  72. package/lib/services/conversations.js.map +1 -1
  73. package/lib/services/dialog.d.ts +1 -4
  74. package/lib/services/dialog.d.ts.map +1 -1
  75. package/lib/services/dialog.js +1 -22
  76. package/lib/services/dialog.js.map +1 -1
  77. package/lib/services/dnd.d.ts +5 -17
  78. package/lib/services/dnd.d.ts.map +1 -1
  79. package/lib/services/dnd.js +1 -96
  80. package/lib/services/dnd.js.map +1 -1
  81. package/lib/services/emoji.d.ts +1 -8
  82. package/lib/services/emoji.d.ts.map +1 -1
  83. package/lib/services/emoji.js +1 -34
  84. package/lib/services/emoji.js.map +1 -1
  85. package/lib/services/entity.d.ts +4 -16
  86. package/lib/services/entity.d.ts.map +1 -1
  87. package/lib/services/entity.js +1 -76
  88. package/lib/services/entity.js.map +1 -1
  89. package/lib/services/files.d.ts +16 -80
  90. package/lib/services/files.d.ts.map +1 -1
  91. package/lib/services/files.js +1 -439
  92. package/lib/services/files.js.map +1 -1
  93. package/lib/services/functions.d.ts +8 -49
  94. package/lib/services/functions.d.ts.map +1 -1
  95. package/lib/services/functions.js +1 -208
  96. package/lib/services/functions.js.map +1 -1
  97. package/lib/services/index.js +0 -2
  98. package/lib/services/lists.d.ts +13 -55
  99. package/lib/services/lists.d.ts.map +1 -1
  100. package/lib/services/lists.js +1 -254
  101. package/lib/services/lists.js.map +1 -1
  102. package/lib/services/migration.d.ts +1 -7
  103. package/lib/services/migration.d.ts.map +1 -1
  104. package/lib/services/migration.js +1 -32
  105. package/lib/services/migration.js.map +1 -1
  106. package/lib/services/oauth.d.ts +7 -43
  107. package/lib/services/oauth.d.ts.map +1 -1
  108. package/lib/services/oauth.js +1 -294
  109. package/lib/services/oauth.js.map +1 -1
  110. package/lib/services/openid.d.ts +3 -10
  111. package/lib/services/openid.d.ts.map +1 -1
  112. package/lib/services/openid.js +1 -84
  113. package/lib/services/openid.js.map +1 -1
  114. package/lib/services/pins.d.ts +3 -13
  115. package/lib/services/pins.d.ts.map +1 -1
  116. package/lib/services/pins.js +1 -66
  117. package/lib/services/pins.js.map +1 -1
  118. package/lib/services/reactions.d.ts +5 -17
  119. package/lib/services/reactions.d.ts.map +1 -1
  120. package/lib/services/reactions.js +1 -102
  121. package/lib/services/reactions.js.map +1 -1
  122. package/lib/services/reminders.d.ts +5 -17
  123. package/lib/services/reminders.d.ts.map +1 -1
  124. package/lib/services/reminders.js +1 -88
  125. package/lib/services/reminders.js.map +1 -1
  126. package/lib/services/rtm.d.ts +2 -11
  127. package/lib/services/rtm.d.ts.map +1 -1
  128. package/lib/services/rtm.js +1 -61
  129. package/lib/services/rtm.js.map +1 -1
  130. package/lib/services/search.d.ts +4 -35
  131. package/lib/services/search.d.ts.map +1 -1
  132. package/lib/services/search.js +1 -172
  133. package/lib/services/search.js.map +1 -1
  134. package/lib/services/stars.d.ts +4 -26
  135. package/lib/services/stars.d.ts.map +1 -1
  136. package/lib/services/stars.js +1 -134
  137. package/lib/services/stars.js.map +1 -1
  138. package/lib/services/team.d.ts +11 -63
  139. package/lib/services/team.d.ts.map +1 -1
  140. package/lib/services/team.js +1 -295
  141. package/lib/services/team.js.map +1 -1
  142. package/lib/services/tooling.d.ts +2 -5
  143. package/lib/services/tooling.d.ts.map +1 -1
  144. package/lib/services/tooling.js +1 -33
  145. package/lib/services/tooling.js.map +1 -1
  146. package/lib/services/usergroups.d.ts +7 -31
  147. package/lib/services/usergroups.d.ts.map +1 -1
  148. package/lib/services/usergroups.js +1 -151
  149. package/lib/services/usergroups.js.map +1 -1
  150. package/lib/services/users.d.ts +14 -48
  151. package/lib/services/users.d.ts.map +1 -1
  152. package/lib/services/users.js +1 -255
  153. package/lib/services/users.js.map +1 -1
  154. package/lib/services/views.d.ts +4 -14
  155. package/lib/services/views.d.ts.map +1 -1
  156. package/lib/services/views.js +1 -78
  157. package/lib/services/views.js.map +1 -1
  158. package/lib/services/workflows.d.ts +8 -51
  159. package/lib/services/workflows.d.ts.map +1 -1
  160. package/lib/services/workflows.js +1 -193
  161. package/lib/services/workflows.js.map +1 -1
  162. package/lib/services.lazy/admin.js +3 -0
  163. package/lib/services.lazy/agents.js +1 -0
  164. package/lib/services.lazy/api.js +1 -0
  165. package/lib/services.lazy/apps.js +3 -0
  166. package/lib/services.lazy/assistant.js +1 -0
  167. package/lib/services.lazy/auth.js +1 -0
  168. package/lib/services.lazy/blocks.js +1 -0
  169. package/lib/services.lazy/bookmarks.js +1 -0
  170. package/lib/services.lazy/bots.js +1 -0
  171. package/lib/services.lazy/calls.js +1 -0
  172. package/lib/services.lazy/canvases.js +1 -0
  173. package/lib/services.lazy/chat.js +1 -0
  174. package/lib/services.lazy/conversations.js +3 -0
  175. package/lib/services.lazy/dialog.js +1 -0
  176. package/lib/services.lazy/dnd.js +1 -0
  177. package/lib/services.lazy/emoji.js +1 -0
  178. package/lib/services.lazy/entity.js +1 -0
  179. package/lib/services.lazy/files.js +1 -0
  180. package/lib/services.lazy/functions.js +1 -0
  181. package/lib/services.lazy/index.js +3 -0
  182. package/lib/services.lazy/lists.js +1 -0
  183. package/lib/services.lazy/migration.js +1 -0
  184. package/lib/services.lazy/oauth.js +1 -0
  185. package/lib/services.lazy/openid.js +1 -0
  186. package/lib/services.lazy/pins.js +1 -0
  187. package/lib/services.lazy/reactions.js +1 -0
  188. package/lib/services.lazy/reminders.js +1 -0
  189. package/lib/services.lazy/rtm.js +1 -0
  190. package/lib/services.lazy/search.js +1 -0
  191. package/lib/services.lazy/stars.js +1 -0
  192. package/lib/services.lazy/team.js +1 -0
  193. package/lib/services.lazy/tooling.js +1 -0
  194. package/lib/services.lazy/usergroups.js +1 -0
  195. package/lib/services.lazy/users.js +1 -0
  196. package/lib/services.lazy/views.js +1 -0
  197. package/lib/services.lazy/workflows.js +1 -0
  198. package/lib/traits.d.ts +1 -1
  199. package/lib/traits.js +1 -12
  200. package/package.json +10 -8
  201. package/src/credentials.ts +20 -21
  202. package/src/errors.ts +31 -27
  203. package/src/index.ts +1 -1
  204. package/src/pagination.ts +2 -2
  205. package/src/protocol.ts +30 -29
  206. package/src/retry.ts +6 -6
  207. package/src/services/admin.ts +2717 -3451
  208. package/src/services/agents.ts +380 -370
  209. package/src/services/api.ts +31 -21
  210. package/src/services/apps.ts +569 -621
  211. package/src/services/assistant.ts +235 -270
  212. package/src/services/auth.ts +118 -100
  213. package/src/services/blocks.ts +33 -29
  214. package/src/services/bookmarks.ts +101 -83
  215. package/src/services/bots.ts +74 -67
  216. package/src/services/calls.ts +118 -124
  217. package/src/services/canvases.ts +171 -178
  218. package/src/services/chat.ts +428 -496
  219. package/src/services/conversations.ts +675 -761
  220. package/src/services/dialog.ts +30 -17
  221. package/src/services/dnd.ts +125 -99
  222. package/src/services/emoji.ts +46 -42
  223. package/src/services/entity.ts +94 -92
  224. package/src/services/files.ts +536 -531
  225. package/src/services/functions.ts +209 -274
  226. package/src/services/lists.ts +289 -304
  227. package/src/services/migration.ts +39 -37
  228. package/src/services/oauth.ts +345 -361
  229. package/src/services/openid.ts +137 -122
  230. package/src/services/pins.ts +83 -70
  231. package/src/services/reactions.ts +119 -103
  232. package/src/services/reminders.ts +112 -90
  233. package/src/services/rtm.ts +73 -65
  234. package/src/services/search.ts +193 -244
  235. package/src/services/stars.ts +101 -160
  236. package/src/services/team.ts +333 -369
  237. package/src/services/tooling.ts +43 -30
  238. package/src/services/usergroups.ts +175 -179
  239. package/src/services/users.ts +301 -268
  240. package/src/services/views.ts +85 -80
  241. package/src/services/workflows.ts +184 -269
  242. package/src/traits.ts +1 -1
  243. package/lib/credentials.js.map +0 -1
  244. package/lib/errors.js.map +0 -1
  245. package/lib/pagination.js.map +0 -1
  246. package/lib/protocol.js.map +0 -1
  247. package/lib/protocol.test.d.ts +0 -2
  248. package/lib/protocol.test.d.ts.map +0 -1
  249. package/lib/protocol.test.js +0 -288
  250. package/lib/protocol.test.js.map +0 -1
  251. package/lib/retry.js.map +0 -1
  252. package/lib/services/index.js.map +0 -1
  253. package/lib/traits.js.map +0 -1
  254. package/src/protocol.test.ts +0 -372
  255. /package/lib/{index.js.map → index.lazy.js.map} +0 -0
@@ -1,20 +1,18 @@
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.ts";
5
6
  import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
6
7
  import * as Retry from "../retry.ts";
7
8
  import * as T from "../traits.ts";
9
+ // Schema table, filled on first reach (see __S at the end).
10
+ const __s: any[] = [];
8
11
 
9
12
  export type { SlackOpError, SlackOpContext };
10
13
 
11
14
  /** The full comment data. Required for edit and post actions. See the [comment schema](/messaging/work-objects-comments#entity-present-comments-method) for the full list of properties. */
12
15
  export type AcknowledgeCommentActionRequestCommentMap = { [key: string]: unknown | undefined };
13
- export const AcknowledgeCommentActionRequestCommentMap = /*@__PURE__*/ S.Record(
14
- S.String,
15
- S.Unknown,
16
- ) as any as S.Schema<AcknowledgeCommentActionRequestCommentMap>;
17
-
18
16
  export interface AcknowledgeCommentActionRequest {
19
17
  /** A reference to the original user action that initiated the comment mutation */
20
18
  trigger_id: string;
@@ -23,40 +21,13 @@ export interface AcknowledgeCommentActionRequest {
23
21
  /** Error message if the action failed in the app. When present, signals that the mutation could not be completed. */
24
22
  error?: string;
25
23
  }
26
- export const AcknowledgeCommentActionRequest = /*@__PURE__*/ S.suspend(() =>
27
- S.Struct({
28
- trigger_id: S.String,
29
- comment: S.optional(AcknowledgeCommentActionRequestCommentMap),
30
- error: S.optional(S.String),
31
- }).pipe(T.Http({ method: "POST", uri: "/entity.acknowledgeCommentAction", code: 200 })),
32
- ).annotate({
33
- identifier: "AcknowledgeCommentActionRequest",
34
- }) as any as S.Schema<AcknowledgeCommentActionRequest>;
35
-
36
24
  export interface AcknowledgeCommentActionResponse {
37
25
  /** Always `true` (a failed call raises a typed error instead). */
38
26
  ok: boolean;
39
27
  }
40
- export const AcknowledgeCommentActionResponse = /*@__PURE__*/ S.suspend(() =>
41
- S.Struct({
42
- ok: S.Boolean,
43
- }),
44
- ).annotate({
45
- identifier: "AcknowledgeCommentActionResponse",
46
- }) as any as S.Schema<AcknowledgeCommentActionResponse>;
47
-
48
28
  export type PresentCommentsRequestCommentsItemMap = { [key: string]: unknown | undefined };
49
- export const PresentCommentsRequestCommentsItemMap = /*@__PURE__*/ S.Record(
50
- S.String,
51
- S.Unknown,
52
- ) as any as S.Schema<PresentCommentsRequestCommentsItemMap>;
53
-
54
29
  /** Array of comments to present to the user. See the [comment schema](/messaging/work-objects-comments#entity-present-comments-method) for the full list of properties. */
55
30
  export type PresentCommentsRequestCommentsList = Array<PresentCommentsRequestCommentsItemMap>;
56
- export const PresentCommentsRequestCommentsList = /*@__PURE__*/ S.Array(
57
- PresentCommentsRequestCommentsItemMap,
58
- ) as any as S.Schema<PresentCommentsRequestCommentsList>;
59
-
60
31
  export interface PresentCommentsRequest {
61
32
  /** Array of comments to present to the user. See the [comment schema](/messaging/work-objects-comments#entity-present-comments-method) for the full list of properties. */
62
33
  comments: PresentCommentsRequestCommentsList;
@@ -74,52 +45,19 @@ export interface PresentCommentsRequest {
74
45
  user_auth_url?: string;
75
46
  error?: string;
76
47
  }
77
- export const PresentCommentsRequest = /*@__PURE__*/ S.suspend(() =>
78
- S.Struct({
79
- comments: PresentCommentsRequestCommentsList,
80
- cursor: S.optional(S.String),
81
- can_post_comment: S.optional(S.Boolean),
82
- trigger_id: S.String,
83
- delete_action_id: S.optional(S.String),
84
- user_auth_required: S.optional(S.Boolean),
85
- user_auth_url: S.optional(S.String),
86
- error: S.optional(S.String),
87
- }).pipe(T.Http({ method: "POST", uri: "/entity.presentComments", code: 200 })),
88
- ).annotate({ identifier: "PresentCommentsRequest" }) as any as S.Schema<PresentCommentsRequest>;
89
-
90
48
  /** Pagination metadata. An empty `next_cursor` means the last page. */
91
49
  export interface PresentCommentsResponseResponseMetadata {
92
- /** Cursor for the next page — pass as `cursor` on the next call. */
50
+ /** Cursor for the next page -- pass as `cursor` on the next call. */
93
51
  next_cursor?: string;
94
52
  }
95
- export const PresentCommentsResponseResponseMetadata = /*@__PURE__*/ S.suspend(() =>
96
- S.Struct({
97
- next_cursor: S.optional(S.String),
98
- }),
99
- ).annotate({
100
- identifier: "PresentCommentsResponseResponseMetadata",
101
- }) as any as S.Schema<PresentCommentsResponseResponseMetadata>;
102
-
103
53
  export interface PresentCommentsResponse {
104
54
  /** Always `true` (a failed call raises a typed error instead). */
105
55
  ok: boolean;
106
56
  /** Pagination metadata. An empty `next_cursor` means the last page. */
107
57
  response_metadata?: PresentCommentsResponseResponseMetadata;
108
58
  }
109
- export const PresentCommentsResponse = /*@__PURE__*/ S.suspend(() =>
110
- S.Struct({
111
- ok: S.Boolean,
112
- response_metadata: S.optional(PresentCommentsResponseResponseMetadata),
113
- }),
114
- ).annotate({ identifier: "PresentCommentsResponse" }) as any as S.Schema<PresentCommentsResponse>;
115
-
116
59
  /** URL-encoded JSON object containing flexpane metadata from the app that will be conformed to a Work Object metadata schema, keyed by entity ID. */
117
60
  export type PresentDetailsRequestMetadataMap = { [key: string]: unknown | undefined };
118
- export const PresentDetailsRequestMetadataMap = /*@__PURE__*/ S.Record(
119
- S.String,
120
- S.Unknown,
121
- ) as any as S.Schema<PresentDetailsRequestMetadataMap>;
122
-
123
61
  export interface PresentDetailsRequest {
124
62
  /** URL-encoded JSON object containing flexpane metadata from the app that will be conformed to a Work Object metadata schema, keyed by entity ID. */
125
63
  metadata?: PresentDetailsRequestMetadataMap;
@@ -131,67 +69,131 @@ export interface PresentDetailsRequest {
131
69
  user_auth_url?: string;
132
70
  error?: string;
133
71
  }
134
- export const PresentDetailsRequest = /*@__PURE__*/ S.suspend(() =>
135
- S.Struct({
136
- metadata: S.optional(PresentDetailsRequestMetadataMap),
137
- trigger_id: S.String,
138
- user_auth_required: S.optional(S.Boolean),
139
- user_auth_url: S.optional(S.String),
140
- error: S.optional(S.String),
141
- }).pipe(T.Http({ method: "POST", uri: "/entity.presentDetails", code: 200 })),
142
- ).annotate({ identifier: "PresentDetailsRequest" }) as any as S.Schema<PresentDetailsRequest>;
143
-
144
72
  export interface PresentDetailsResponse {
145
73
  /** Always `true` (a failed call raises a typed error instead). */
146
74
  ok: boolean;
147
75
  }
148
- export const PresentDetailsResponse = /*@__PURE__*/ S.suspend(() =>
149
- S.Struct({
150
- ok: S.Boolean,
151
- }),
152
- ).annotate({ identifier: "PresentDetailsResponse" }) as any as S.Schema<PresentDetailsResponse>;
153
-
154
76
  export type AcknowledgeCommentActionError = SlackOpError;
155
- /** Acknowledge a comment mutation (edit, delete, or post) on a work object entity. Apps call this endpoint to confirm they have processed a comment action, and the backend emits a dedicated RTM event to the user. Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `method_not_found` — when the API isn't available to the caller - `invalid_trigger_id` — Trigger id is not valid - `invalid_app_id` — App ID is not a valid format - `invalid_auth` — Invalid token provided - `invalid_action` — The comment data does not match the original trigger context (e.g., comment_id or thread_root_id mismatch) - `missing_comment_data` — Required comment fields are missing for the given action type - `not_allowed` — User is not enrolled in comment syncing - `invalid_sender_schema` — The sender field could not be transformed to a valid user schema See https://docs.slack.dev/reference/methods/entity.acknowledgeCommentAction */
77
+ /** Acknowledge a comment mutation (edit, delete, or post) on a work object entity. Apps call this endpoint to confirm they have processed a comment action, and the backend emits a dedicated RTM event to the user. Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `method_not_found` -- when the API isn't available to the caller - `invalid_trigger_id` -- Trigger id is not valid - `invalid_app_id` -- App ID is not a valid format - `invalid_auth` -- Invalid token provided - `invalid_action` -- The comment data does not match the original trigger context (e.g., comment_id or thread_root_id mismatch) - `missing_comment_data` -- Required comment fields are missing for the given action type - `not_allowed` -- User is not enrolled in comment syncing - `invalid_sender_schema` -- The sender field could not be transformed to a valid user schema See https://docs.slack.dev/reference/methods/entity.acknowledgeCommentAction */
156
78
  export const acknowledgeCommentAction: API.OperationMethod<
157
79
  AcknowledgeCommentActionRequest,
158
80
  AcknowledgeCommentActionResponse,
159
81
  AcknowledgeCommentActionError,
160
82
  SlackOpContext
161
83
  > = /*@__PURE__*/ API.make(() => ({
162
- input: AcknowledgeCommentActionRequest,
163
- output: AcknowledgeCommentActionResponse,
84
+ input: __S(0, __c0, 0) as any as S.Schema<AcknowledgeCommentActionRequest>,
85
+ output: __S(8, __c2, 0) as any as S.Schema<AcknowledgeCommentActionResponse>,
164
86
  errors: [SlackError, SlackRateLimited],
165
87
  protocol: SlackProtocol,
166
88
  retry: Retry.Retry,
167
89
  }));
168
90
 
169
91
  export type PresentCommentsError = SlackOpError;
170
- /** Provide comments for work objects. Apps call this endpoint to send per-user flexpane comment data to the client. Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `method_not_found` — when the API isn't available to the caller - `invalid_trigger_id` — Trigger id is not valid - `invalid_app_id` — App ID is not a valid format - `invalid_auth` — Invalid token provided - `user_auth_url_missing` — User auth url is required if user_auth_required is true - `missing_delete_action_id` — delete_action_id is required when any comment is marked can_delete See https://docs.slack.dev/reference/methods/entity.presentComments */
92
+ /** Provide comments for work objects. Apps call this endpoint to send per-user flexpane comment data to the client. Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `method_not_found` -- when the API isn't available to the caller - `invalid_trigger_id` -- Trigger id is not valid - `invalid_app_id` -- App ID is not a valid format - `invalid_auth` -- Invalid token provided - `user_auth_url_missing` -- User auth url is required if user_auth_required is true - `missing_delete_action_id` -- delete_action_id is required when any comment is marked can_delete See https://docs.slack.dev/reference/methods/entity.presentComments */
171
93
  export const presentComments: API.OperationMethod<
172
94
  PresentCommentsRequest,
173
95
  PresentCommentsResponse,
174
96
  PresentCommentsError,
175
97
  SlackOpContext
176
98
  > = /*@__PURE__*/ API.make(() => ({
177
- input: PresentCommentsRequest,
178
- output: PresentCommentsResponse,
99
+ input: __S(13, __c3, 1) as any as S.Schema<PresentCommentsRequest>,
100
+ output: __S(15, __c3, 3) as any as S.Schema<PresentCommentsResponse>,
179
101
  errors: [SlackError, SlackRateLimited],
180
102
  protocol: SlackProtocol,
181
103
  retry: Retry.Retry,
182
104
  }));
183
105
 
184
106
  export type PresentDetailsError = SlackOpError;
185
- /** Provide custom flexpane behavior for Work Objects. Apps call this endpoint to send per-user flexpane metadata to the client. Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `invalid_metadata` — The provided `metadata` argument could not be parsed or understood. - `feature_not_enabled` — temporarily gating API - `invalid_app_id` — App ID is not a valid format - `user_auth_url_missing` — User auth url is required if user_auth_required is true - `invalid_trigger_id` — Trigger id is not valid - `entity_metadata_does_not_match_trigger` — The provided entity's ID does not match the ID of the entity used to initiate the request - `missing_interactivity_url` — App does not have an interactivity URL configured - `missing_options_load_url` — App does not have an options load URL configured - `invalid_auth` — Invalid token provided See https://docs.slack.dev/reference/methods/entity.presentDetails */
107
+ /** Provide custom flexpane behavior for Work Objects. Apps call this endpoint to send per-user flexpane metadata to the client. Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `invalid_metadata` -- The provided `metadata` argument could not be parsed or understood. - `feature_not_enabled` -- temporarily gating API - `invalid_app_id` -- App ID is not a valid format - `user_auth_url_missing` -- User auth url is required if user_auth_required is true - `invalid_trigger_id` -- Trigger id is not valid - `entity_metadata_does_not_match_trigger` -- The provided entity's ID does not match the ID of the entity used to initiate the request - `missing_interactivity_url` -- App does not have an interactivity URL configured - `missing_options_load_url` -- App does not have an options load URL configured - `invalid_auth` -- Invalid token provided See https://docs.slack.dev/reference/methods/entity.presentDetails */
186
108
  export const presentDetails: API.OperationMethod<
187
109
  PresentDetailsRequest,
188
110
  PresentDetailsResponse,
189
111
  PresentDetailsError,
190
112
  SlackOpContext
191
113
  > = /*@__PURE__*/ API.make(() => ({
192
- input: PresentDetailsRequest,
193
- output: PresentDetailsResponse,
114
+ input: __S(16, __c4, 0) as any as S.Schema<PresentDetailsRequest>,
115
+ output: __S(8, __c2, 0) as any as S.Schema<PresentDetailsResponse>,
194
116
  errors: [SlackError, SlackRateLimited],
195
117
  protocol: SlackProtocol,
196
118
  retry: Retry.Retry,
197
119
  }));
120
+
121
+ // Schema builders: each runs one schema initializer, on that schema's first use.
122
+ function __c0(j: number): any {
123
+ switch (j) {
124
+ case 0:
125
+ return S.suspend(() =>
126
+ S.Struct({
127
+ trigger_id: S.String,
128
+ comment: S.optional(__S(4, __c1, 0)),
129
+ error: S.optional(S.String),
130
+ }).pipe(T.Http({ method: "POST", uri: "/entity.acknowledgeCommentAction", code: 200 })),
131
+ ).annotate({ identifier: "AcknowledgeCommentActionRequest" });
132
+ }
133
+ }
134
+ function __c1(j: number): any {
135
+ switch (j) {
136
+ case 0:
137
+ return S.Record(S.String, S.Unknown);
138
+ }
139
+ }
140
+ function __c2(j: number): any {
141
+ switch (j) {
142
+ case 0:
143
+ return S.suspend(() =>
144
+ S.Struct({
145
+ ok: S.Boolean,
146
+ }),
147
+ ).annotate({ identifier: "AcknowledgeCommentActionResponse" });
148
+ }
149
+ }
150
+ function __c3(j: number): any {
151
+ switch (j) {
152
+ case 0:
153
+ return S.Array(__S(4, __c1, 0));
154
+ case 1:
155
+ return S.suspend(() =>
156
+ S.Struct({
157
+ comments: __S(12, __c3, 0),
158
+ cursor: S.optional(S.String),
159
+ can_post_comment: S.optional(S.Boolean),
160
+ trigger_id: S.String,
161
+ delete_action_id: S.optional(S.String),
162
+ user_auth_required: S.optional(S.Boolean),
163
+ user_auth_url: S.optional(S.String),
164
+ error: S.optional(S.String),
165
+ }).pipe(T.Http({ method: "POST", uri: "/entity.presentComments", code: 200 })),
166
+ ).annotate({ identifier: "PresentCommentsRequest" });
167
+ case 2:
168
+ return S.suspend(() =>
169
+ S.Struct({
170
+ next_cursor: S.optional(S.String),
171
+ }),
172
+ ).annotate({ identifier: "PresentCommentsResponseResponseMetadata" });
173
+ case 3:
174
+ return S.suspend(() =>
175
+ S.Struct({
176
+ ok: S.Boolean,
177
+ response_metadata: S.optional(__S(14, __c3, 2)),
178
+ }),
179
+ ).annotate({ identifier: "PresentCommentsResponse" });
180
+ }
181
+ }
182
+ function __c4(j: number): any {
183
+ switch (j) {
184
+ case 0:
185
+ return S.suspend(() =>
186
+ S.Struct({
187
+ metadata: S.optional(__S(4, __c1, 0)),
188
+ trigger_id: S.String,
189
+ user_auth_required: S.optional(S.Boolean),
190
+ user_auth_url: S.optional(S.String),
191
+ error: S.optional(S.String),
192
+ }).pipe(T.Http({ method: "POST", uri: "/entity.presentDetails", code: 200 })),
193
+ ).annotate({ identifier: "PresentDetailsRequest" });
194
+ }
195
+ }
196
+ // Schema table: entry i is schema j of builder f, made on first reach.
197
+ function __S(i: number, f: (j: number) => unknown, j: number): any {
198
+ return (__s[i] ??= __L.at(f, j));
199
+ }