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

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 (218) hide show
  1. package/lib/credentials.d.ts +2 -2
  2. package/lib/credentials.d.ts.map +1 -1
  3. package/lib/credentials.js +3 -3
  4. package/lib/credentials.js.map +1 -1
  5. package/lib/errors.d.ts.map +1 -1
  6. package/lib/errors.js +1 -1
  7. package/lib/errors.js.map +1 -1
  8. package/lib/index.d.ts +3 -3
  9. package/lib/index.d.ts.map +1 -1
  10. package/lib/index.js +3 -3
  11. package/lib/index.js.map +1 -1
  12. package/lib/pagination.d.ts.map +1 -1
  13. package/lib/pagination.js.map +1 -1
  14. package/lib/protocol.d.ts +3 -3
  15. package/lib/protocol.d.ts.map +1 -1
  16. package/lib/protocol.js +12 -18
  17. package/lib/protocol.js.map +1 -1
  18. package/lib/protocol.test.d.ts +2 -0
  19. package/lib/protocol.test.d.ts.map +1 -0
  20. package/lib/protocol.test.js +288 -0
  21. package/lib/protocol.test.js.map +1 -0
  22. package/lib/retry.d.ts +1 -1
  23. package/lib/retry.d.ts.map +1 -1
  24. package/lib/retry.js +1 -1
  25. package/lib/retry.js.map +1 -1
  26. package/lib/services/admin.d.ts +236 -29
  27. package/lib/services/admin.d.ts.map +1 -1
  28. package/lib/services/admin.js +417 -749
  29. package/lib/services/admin.js.map +1 -1
  30. package/lib/services/agents.d.ts +423 -0
  31. package/lib/services/agents.d.ts.map +1 -0
  32. package/lib/services/agents.js +315 -0
  33. package/lib/services/agents.js.map +1 -0
  34. package/lib/services/api.d.ts +1 -1
  35. package/lib/services/api.d.ts.map +1 -1
  36. package/lib/services/api.js +4 -6
  37. package/lib/services/api.js.map +1 -1
  38. package/lib/services/apps.d.ts +21 -3
  39. package/lib/services/apps.d.ts.map +1 -1
  40. package/lib/services/apps.js +65 -133
  41. package/lib/services/apps.js.map +1 -1
  42. package/lib/services/assistant.d.ts +4 -4
  43. package/lib/services/assistant.d.ts.map +1 -1
  44. package/lib/services/assistant.js +16 -38
  45. package/lib/services/assistant.js.map +1 -1
  46. package/lib/services/auth.d.ts +2 -2
  47. package/lib/services/auth.d.ts.map +1 -1
  48. package/lib/services/auth.js +11 -28
  49. package/lib/services/auth.js.map +1 -1
  50. package/lib/services/blocks.d.ts +1 -1
  51. package/lib/services/blocks.d.ts.map +1 -1
  52. package/lib/services/blocks.js +5 -9
  53. package/lib/services/blocks.js.map +1 -1
  54. package/lib/services/bookmarks.d.ts +4 -4
  55. package/lib/services/bookmarks.d.ts.map +1 -1
  56. package/lib/services/bookmarks.js +14 -30
  57. package/lib/services/bookmarks.js.map +1 -1
  58. package/lib/services/bots.d.ts +1 -1
  59. package/lib/services/bots.d.ts.map +1 -1
  60. package/lib/services/bots.js +7 -15
  61. package/lib/services/bots.js.map +1 -1
  62. package/lib/services/calls.d.ts +1 -1
  63. package/lib/services/calls.d.ts.map +1 -1
  64. package/lib/services/calls.js +13 -33
  65. package/lib/services/calls.js.map +1 -1
  66. package/lib/services/canvases.d.ts +22 -2
  67. package/lib/services/canvases.d.ts.map +1 -1
  68. package/lib/services/canvases.js +37 -48
  69. package/lib/services/canvases.js.map +1 -1
  70. package/lib/services/chat.d.ts +29 -25
  71. package/lib/services/chat.d.ts.map +1 -1
  72. package/lib/services/chat.js +47 -95
  73. package/lib/services/chat.js.map +1 -1
  74. package/lib/services/conversations.d.ts +10 -8
  75. package/lib/services/conversations.d.ts.map +1 -1
  76. package/lib/services/conversations.js +43 -115
  77. package/lib/services/conversations.js.map +1 -1
  78. package/lib/services/dialog.d.ts +1 -1
  79. package/lib/services/dialog.d.ts.map +1 -1
  80. package/lib/services/dialog.js +5 -9
  81. package/lib/services/dialog.js.map +1 -1
  82. package/lib/services/dnd.d.ts +1 -1
  83. package/lib/services/dnd.d.ts.map +1 -1
  84. package/lib/services/dnd.js +10 -24
  85. package/lib/services/dnd.js.map +1 -1
  86. package/lib/services/emoji.d.ts +1 -1
  87. package/lib/services/emoji.d.ts.map +1 -1
  88. package/lib/services/emoji.js +6 -11
  89. package/lib/services/emoji.js.map +1 -1
  90. package/lib/services/entity.d.ts +1 -1
  91. package/lib/services/entity.d.ts.map +1 -1
  92. package/lib/services/entity.js +8 -20
  93. package/lib/services/entity.js.map +1 -1
  94. package/lib/services/files.d.ts +5 -5
  95. package/lib/services/files.d.ts.map +1 -1
  96. package/lib/services/files.js +39 -109
  97. package/lib/services/files.js.map +1 -1
  98. package/lib/services/functions.d.ts +1 -1
  99. package/lib/services/functions.d.ts.map +1 -1
  100. package/lib/services/functions.js +28 -75
  101. package/lib/services/functions.js.map +1 -1
  102. package/lib/services/index.d.ts +1 -0
  103. package/lib/services/index.d.ts.map +1 -1
  104. package/lib/services/index.js +1 -0
  105. package/lib/services/index.js.map +1 -1
  106. package/lib/services/lists.d.ts +5 -1
  107. package/lib/services/lists.d.ts.map +1 -1
  108. package/lib/services/lists.js +35 -146
  109. package/lib/services/lists.js.map +1 -1
  110. package/lib/services/migration.d.ts +1 -1
  111. package/lib/services/migration.d.ts.map +1 -1
  112. package/lib/services/migration.js +5 -8
  113. package/lib/services/migration.js.map +1 -1
  114. package/lib/services/oauth.d.ts +38 -2
  115. package/lib/services/oauth.d.ts.map +1 -1
  116. package/lib/services/oauth.js +67 -50
  117. package/lib/services/oauth.js.map +1 -1
  118. package/lib/services/openid.d.ts +1 -1
  119. package/lib/services/openid.d.ts.map +1 -1
  120. package/lib/services/openid.js +7 -15
  121. package/lib/services/openid.js.map +1 -1
  122. package/lib/services/pins.d.ts +1 -1
  123. package/lib/services/pins.d.ts.map +1 -1
  124. package/lib/services/pins.js +7 -15
  125. package/lib/services/pins.js.map +1 -1
  126. package/lib/services/reactions.d.ts +2 -2
  127. package/lib/services/reactions.d.ts.map +1 -1
  128. package/lib/services/reactions.js +13 -29
  129. package/lib/services/reactions.js.map +1 -1
  130. package/lib/services/reminders.d.ts +1 -1
  131. package/lib/services/reminders.d.ts.map +1 -1
  132. package/lib/services/reminders.js +13 -33
  133. package/lib/services/reminders.js.map +1 -1
  134. package/lib/services/rtm.d.ts +1 -1
  135. package/lib/services/rtm.d.ts.map +1 -1
  136. package/lib/services/rtm.js +9 -21
  137. package/lib/services/rtm.js.map +1 -1
  138. package/lib/services/search.d.ts +1 -1
  139. package/lib/services/search.d.ts.map +1 -1
  140. package/lib/services/search.js +13 -30
  141. package/lib/services/search.js.map +1 -1
  142. package/lib/services/stars.d.ts +1 -1
  143. package/lib/services/stars.d.ts.map +1 -1
  144. package/lib/services/stars.js +10 -20
  145. package/lib/services/stars.js.map +1 -1
  146. package/lib/services/team.d.ts +1 -1
  147. package/lib/services/team.d.ts.map +1 -1
  148. package/lib/services/team.js +25 -62
  149. package/lib/services/team.js.map +1 -1
  150. package/lib/services/tooling.d.ts +1 -1
  151. package/lib/services/tooling.d.ts.map +1 -1
  152. package/lib/services/tooling.js +5 -9
  153. package/lib/services/tooling.js.map +1 -1
  154. package/lib/services/usergroups.d.ts +8 -3
  155. package/lib/services/usergroups.d.ts.map +1 -1
  156. package/lib/services/usergroups.js +23 -51
  157. package/lib/services/usergroups.js.map +1 -1
  158. package/lib/services/users.d.ts +2 -2
  159. package/lib/services/users.d.ts.map +1 -1
  160. package/lib/services/users.js +28 -81
  161. package/lib/services/users.js.map +1 -1
  162. package/lib/services/views.d.ts +1 -1
  163. package/lib/services/views.d.ts.map +1 -1
  164. package/lib/services/views.js +11 -27
  165. package/lib/services/views.js.map +1 -1
  166. package/lib/services/workflows.d.ts +1 -1
  167. package/lib/services/workflows.d.ts.map +1 -1
  168. package/lib/services/workflows.js +27 -71
  169. package/lib/services/workflows.js.map +1 -1
  170. package/package.json +15 -11
  171. package/src/credentials.ts +8 -10
  172. package/src/errors.ts +17 -31
  173. package/src/index.ts +3 -7
  174. package/src/pagination.ts +2 -5
  175. package/src/protocol.test.ts +372 -0
  176. package/src/protocol.ts +34 -66
  177. package/src/retry.ts +4 -9
  178. package/src/services/admin.ts +1241 -1557
  179. package/src/services/agents.ts +853 -0
  180. package/src/services/api.ts +4 -10
  181. package/src/services/apps.ts +146 -243
  182. package/src/services/assistant.ts +93 -144
  183. package/src/services/auth.ts +12 -33
  184. package/src/services/blocks.ts +9 -24
  185. package/src/services/bookmarks.ts +14 -34
  186. package/src/services/bots.ts +7 -19
  187. package/src/services/calls.ts +15 -43
  188. package/src/services/canvases.ts +82 -85
  189. package/src/services/chat.ts +134 -254
  190. package/src/services/conversations.ts +101 -217
  191. package/src/services/dialog.ts +5 -13
  192. package/src/services/dnd.ts +11 -31
  193. package/src/services/emoji.ts +9 -19
  194. package/src/services/entity.ts +17 -45
  195. package/src/services/files.ts +72 -165
  196. package/src/services/functions.ts +95 -168
  197. package/src/services/index.ts +1 -0
  198. package/src/services/lists.ts +65 -208
  199. package/src/services/migration.ts +8 -17
  200. package/src/services/oauth.ts +127 -60
  201. package/src/services/openid.ts +12 -34
  202. package/src/services/pins.ts +7 -19
  203. package/src/services/reactions.ts +19 -43
  204. package/src/services/reminders.ts +13 -37
  205. package/src/services/rtm.ts +9 -25
  206. package/src/services/search.ts +51 -92
  207. package/src/services/stars.ts +20 -31
  208. package/src/services/team.ts +81 -155
  209. package/src/services/tooling.ts +5 -13
  210. package/src/services/usergroups.ts +37 -68
  211. package/src/services/users.ts +35 -102
  212. package/src/services/views.ts +11 -31
  213. package/src/services/workflows.ts +65 -129
  214. package/lib/response-validation.test.d.ts +0 -4
  215. package/lib/response-validation.test.d.ts.map +0 -1
  216. package/lib/response-validation.test.js +0 -40
  217. package/lib/response-validation.test.js.map +0 -1
  218. package/src/response-validation.test.ts +0 -54
@@ -1,14 +1,10 @@
1
+ import * as API from "@distilled.cloud/core/api";
1
2
  // AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
2
3
  import * as S from "@distilled.cloud/core/schema";
3
- import * as API from "@distilled.cloud/core/api";
4
- import * as T from "../traits.ts";
5
- import {
6
- SlackProtocol,
7
- type SlackOpError,
8
- type SlackOpContext,
9
- } from "../protocol.ts";
10
4
  import { SlackError, SlackRateLimited } from "../errors.ts";
5
+ import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
11
6
  import * as Retry from "../retry.ts";
7
+ import * as T from "../traits.ts";
12
8
 
13
9
  export type { SlackOpError, SlackOpContext };
14
10
 
@@ -23,9 +19,7 @@ export const DialogOpenRequest = /*@__PURE__*/ S.suspend(() =>
23
19
  dialog: S.String,
24
20
  trigger_id: S.String,
25
21
  }).pipe(T.Http({ method: "POST", uri: "/dialog.open", code: 200 })),
26
- ).annotate({
27
- identifier: "DialogOpenRequest",
28
- }) as any as S.Schema<DialogOpenRequest>;
22
+ ).annotate({ identifier: "DialogOpenRequest" }) as any as S.Schema<DialogOpenRequest>;
29
23
 
30
24
  export interface DialogOpenResponse {
31
25
  /** Always `true` (a failed call raises a typed error instead). */
@@ -35,9 +29,7 @@ export const DialogOpenResponse = /*@__PURE__*/ S.suspend(() =>
35
29
  S.Struct({
36
30
  ok: S.Boolean,
37
31
  }),
38
- ).annotate({
39
- identifier: "DialogOpenResponse",
40
- }) as any as S.Schema<DialogOpenResponse>;
32
+ ).annotate({ identifier: "DialogOpenResponse" }) as any as S.Schema<DialogOpenResponse>;
41
33
 
42
34
  export type DialogOpenError = SlackOpError;
43
35
  /** Open a dialog with a user Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `app_missing_action_url` — The app associated with the used token doesn't have a Action URL configured in its interactive components settings. - `cannot_create_dialog` — Something exceptional occurred and the dialog could not be created. - `failed_sending_dialog` — Something exceptional occurred and the dialog could not be sent. - `invalid_trigger` — The provided `trigger_id` is invalid or cannot be used by this token. - `missing_dialog` — No `dialog` argument was presented. - `missing_trigger` — No `trigger_id` argument was presented. - `trigger_exchanged` — The provided `trigger_id` has already been exchanged. - `trigger_expired` — The provided `trigger_id` was presented after the 3 second limit. - `validation_errors` — The provided `dialog` could not be validated. See https://docs.slack.dev/reference/methods/dialog.open */
@@ -1,14 +1,10 @@
1
+ import * as API from "@distilled.cloud/core/api";
1
2
  // AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
2
3
  import * as S from "@distilled.cloud/core/schema";
3
- import * as API from "@distilled.cloud/core/api";
4
- import * as T from "../traits.ts";
5
- import {
6
- SlackProtocol,
7
- type SlackOpError,
8
- type SlackOpContext,
9
- } from "../protocol.ts";
10
4
  import { SlackError, SlackRateLimited } from "../errors.ts";
5
+ import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
11
6
  import * as Retry from "../retry.ts";
7
+ import * as T from "../traits.ts";
12
8
 
13
9
  export type { SlackOpError, SlackOpContext };
14
10
 
@@ -49,9 +45,7 @@ export const DndInfoResponse = /*@__PURE__*/ S.suspend(() =>
49
45
  snooze_is_indefinite: S.optional(S.Boolean),
50
46
  dnd_profile_status: S.optional(S.Unknown),
51
47
  }),
52
- ).annotate({
53
- identifier: "DndInfoResponse",
54
- }) as any as S.Schema<DndInfoResponse>;
48
+ ).annotate({ identifier: "DndInfoResponse" }) as any as S.Schema<DndInfoResponse>;
55
49
 
56
50
  export interface EndDndRequest {}
57
51
  export const EndDndRequest = /*@__PURE__*/ S.suspend(() =>
@@ -70,12 +64,8 @@ export const EndDndResponse = /*@__PURE__*/ S.suspend(() =>
70
64
 
71
65
  export interface EndSnoozeRequest {}
72
66
  export const EndSnoozeRequest = /*@__PURE__*/ S.suspend(() =>
73
- S.Struct({}).pipe(
74
- T.Http({ method: "POST", uri: "/dnd.endSnooze", code: 200 }),
75
- ),
76
- ).annotate({
77
- identifier: "EndSnoozeRequest",
78
- }) as any as S.Schema<EndSnoozeRequest>;
67
+ S.Struct({}).pipe(T.Http({ method: "POST", uri: "/dnd.endSnooze", code: 200 })),
68
+ ).annotate({ identifier: "EndSnoozeRequest" }) as any as S.Schema<EndSnoozeRequest>;
79
69
 
80
70
  export interface EndSnoozeResponse {
81
71
  /** Always `true` (a failed call raises a typed error instead). */
@@ -99,9 +89,7 @@ export const EndSnoozeResponse = /*@__PURE__*/ S.suspend(() =>
99
89
  snooze_remaining: S.optional(S.Number),
100
90
  dnd_profile_status: S.optional(S.Unknown),
101
91
  }),
102
- ).annotate({
103
- identifier: "EndSnoozeResponse",
104
- }) as any as S.Schema<EndSnoozeResponse>;
92
+ ).annotate({ identifier: "EndSnoozeResponse" }) as any as S.Schema<EndSnoozeResponse>;
105
93
 
106
94
  export interface SetSnoozeRequest {
107
95
  /** This argument is required. Number of minutes, from now, to snooze until. */
@@ -111,9 +99,7 @@ export const SetSnoozeRequest = /*@__PURE__*/ S.suspend(() =>
111
99
  S.Struct({
112
100
  num_minutes: S.String,
113
101
  }).pipe(T.Http({ method: "POST", uri: "/dnd.setSnooze", code: 200 })),
114
- ).annotate({
115
- identifier: "SetSnoozeRequest",
116
- }) as any as S.Schema<SetSnoozeRequest>;
102
+ ).annotate({ identifier: "SetSnoozeRequest" }) as any as S.Schema<SetSnoozeRequest>;
117
103
 
118
104
  export interface SetSnoozeResponse {
119
105
  /** Always `true` (a failed call raises a typed error instead). */
@@ -131,9 +117,7 @@ export const SetSnoozeResponse = /*@__PURE__*/ S.suspend(() =>
131
117
  snooze_remaining: S.optional(S.Number),
132
118
  snooze_is_indefinite: S.optional(S.Boolean),
133
119
  }),
134
- ).annotate({
135
- identifier: "SetSnoozeResponse",
136
- }) as any as S.Schema<SetSnoozeResponse>;
120
+ ).annotate({ identifier: "SetSnoozeResponse" }) as any as S.Schema<SetSnoozeResponse>;
137
121
 
138
122
  export interface TeamInfoRequest {
139
123
  /** Comma-separated list of users to fetch Do Not Disturb status for */
@@ -146,9 +130,7 @@ export const TeamInfoRequest = /*@__PURE__*/ S.suspend(() =>
146
130
  users: S.String.pipe(T.Query()),
147
131
  team_id: S.optional(S.String.pipe(T.Query())),
148
132
  }).pipe(T.Http({ method: "GET", uri: "/dnd.teamInfo", code: 200 })),
149
- ).annotate({
150
- identifier: "TeamInfoRequest",
151
- }) as any as S.Schema<TeamInfoRequest>;
133
+ ).annotate({ identifier: "TeamInfoRequest" }) as any as S.Schema<TeamInfoRequest>;
152
134
 
153
135
  export type TeamInfoResponseUsersMap = { [key: string]: unknown | undefined };
154
136
  export const TeamInfoResponseUsersMap = /*@__PURE__*/ S.Record(
@@ -166,9 +148,7 @@ export const TeamInfoResponse = /*@__PURE__*/ S.suspend(() =>
166
148
  ok: S.Boolean,
167
149
  users: TeamInfoResponseUsersMap,
168
150
  }),
169
- ).annotate({
170
- identifier: "TeamInfoResponse",
171
- }) as any as S.Schema<TeamInfoResponse>;
151
+ ).annotate({ identifier: "TeamInfoResponse" }) as any as S.Schema<TeamInfoResponse>;
172
152
 
173
153
  export type DndInfoError = SlackOpError;
174
154
  /** Retrieves a user's current Do Not Disturb status. Required scopes — bot: `dnd:read`; user: `dnd:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `user_not_found` — Value passed for `user` was invalid. - `user_not_visible` — User is not visible for this request. See https://docs.slack.dev/reference/methods/dnd.info */
@@ -1,14 +1,10 @@
1
+ import * as API from "@distilled.cloud/core/api";
1
2
  // AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
2
3
  import * as S from "@distilled.cloud/core/schema";
3
- import * as API from "@distilled.cloud/core/api";
4
- import * as T from "../traits.ts";
5
- import {
6
- SlackProtocol,
7
- type SlackOpError,
8
- type SlackOpContext,
9
- } from "../protocol.ts";
10
4
  import { SlackError, SlackRateLimited } from "../errors.ts";
5
+ import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
11
6
  import * as Retry from "../retry.ts";
7
+ import * as T from "../traits.ts";
12
8
 
13
9
  export type { SlackOpError, SlackOpContext };
14
10
 
@@ -20,9 +16,7 @@ export const ListEmojiRequest = /*@__PURE__*/ S.suspend(() =>
20
16
  S.Struct({
21
17
  include_categories: S.optional(S.Boolean.pipe(T.Query())),
22
18
  }).pipe(T.Http({ method: "GET", uri: "/emoji.list", code: 200 })),
23
- ).annotate({
24
- identifier: "ListEmojiRequest",
25
- }) as any as S.Schema<ListEmojiRequest>;
19
+ ).annotate({ identifier: "ListEmojiRequest" }) as any as S.Schema<ListEmojiRequest>;
26
20
 
27
21
  export type ListEmojiResponseEmojiMap = { [key: string]: unknown | undefined };
28
22
  export const ListEmojiResponseEmojiMap = /*@__PURE__*/ S.Record(
@@ -31,10 +25,9 @@ export const ListEmojiResponseEmojiMap = /*@__PURE__*/ S.Record(
31
25
  ) as any as S.Schema<ListEmojiResponseEmojiMap>;
32
26
 
33
27
  export type ListEmojiResponseCategoriesItemEmojiNamesList = Array<string>;
34
- export const ListEmojiResponseCategoriesItemEmojiNamesList =
35
- /*@__PURE__*/ S.Array(
36
- S.String,
37
- ) as any as S.Schema<ListEmojiResponseCategoriesItemEmojiNamesList>;
28
+ export const ListEmojiResponseCategoriesItemEmojiNamesList = /*@__PURE__*/ S.Array(
29
+ S.String,
30
+ ) as any as S.Schema<ListEmojiResponseCategoriesItemEmojiNamesList>;
38
31
 
39
32
  export interface ListEmojiResponseCategoriesItem {
40
33
  name?: string;
@@ -49,8 +42,7 @@ export const ListEmojiResponseCategoriesItem = /*@__PURE__*/ S.suspend(() =>
49
42
  identifier: "ListEmojiResponseCategoriesItem",
50
43
  }) as any as S.Schema<ListEmojiResponseCategoriesItem>;
51
44
 
52
- export type ListEmojiResponseCategoriesList =
53
- Array<ListEmojiResponseCategoriesItem>;
45
+ export type ListEmojiResponseCategoriesList = Array<ListEmojiResponseCategoriesItem>;
54
46
  export const ListEmojiResponseCategoriesList = /*@__PURE__*/ S.Array(
55
47
  ListEmojiResponseCategoriesItem,
56
48
  ) as any as S.Schema<ListEmojiResponseCategoriesList>;
@@ -71,9 +63,7 @@ export const ListEmojiResponse = /*@__PURE__*/ S.suspend(() =>
71
63
  categories_version: S.optional(S.String),
72
64
  categories: S.optional(ListEmojiResponseCategoriesList),
73
65
  }),
74
- ).annotate({
75
- identifier: "ListEmojiResponse",
76
- }) as any as S.Schema<ListEmojiResponse>;
66
+ ).annotate({ identifier: "ListEmojiResponse" }) as any as S.Schema<ListEmojiResponse>;
77
67
 
78
68
  export type ListEmojiError = SlackOpError;
79
69
  /** Lists custom emoji for a team. Required scopes — bot: `emoji:read`; user: `emoji:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `invalid_arguments` — Invalid API arguments provided - `unable_to_fetch_custom_emojis` — Unable to fetch custom emojis for team. See https://docs.slack.dev/reference/methods/emoji.list */
@@ -1,21 +1,15 @@
1
+ import * as API from "@distilled.cloud/core/api";
1
2
  // AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
2
3
  import * as S from "@distilled.cloud/core/schema";
3
- import * as API from "@distilled.cloud/core/api";
4
- import * as T from "../traits.ts";
5
- import {
6
- SlackProtocol,
7
- type SlackOpError,
8
- type SlackOpContext,
9
- } from "../protocol.ts";
10
4
  import { SlackError, SlackRateLimited } from "../errors.ts";
5
+ import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
11
6
  import * as Retry from "../retry.ts";
7
+ import * as T from "../traits.ts";
12
8
 
13
9
  export type { SlackOpError, SlackOpContext };
14
10
 
15
11
  /** 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. */
16
- export type AcknowledgeCommentActionRequestCommentMap = {
17
- [key: string]: unknown | undefined;
18
- };
12
+ export type AcknowledgeCommentActionRequestCommentMap = { [key: string]: unknown | undefined };
19
13
  export const AcknowledgeCommentActionRequestCommentMap = /*@__PURE__*/ S.Record(
20
14
  S.String,
21
15
  S.Unknown,
@@ -34,13 +28,7 @@ export const AcknowledgeCommentActionRequest = /*@__PURE__*/ S.suspend(() =>
34
28
  trigger_id: S.String,
35
29
  comment: S.optional(AcknowledgeCommentActionRequestCommentMap),
36
30
  error: S.optional(S.String),
37
- }).pipe(
38
- T.Http({
39
- method: "POST",
40
- uri: "/entity.acknowledgeCommentAction",
41
- code: 200,
42
- }),
43
- ),
31
+ }).pipe(T.Http({ method: "POST", uri: "/entity.acknowledgeCommentAction", code: 200 })),
44
32
  ).annotate({
45
33
  identifier: "AcknowledgeCommentActionRequest",
46
34
  }) as any as S.Schema<AcknowledgeCommentActionRequest>;
@@ -57,17 +45,14 @@ export const AcknowledgeCommentActionResponse = /*@__PURE__*/ S.suspend(() =>
57
45
  identifier: "AcknowledgeCommentActionResponse",
58
46
  }) as any as S.Schema<AcknowledgeCommentActionResponse>;
59
47
 
60
- export type PresentCommentsRequestCommentsItemMap = {
61
- [key: string]: unknown | undefined;
62
- };
48
+ export type PresentCommentsRequestCommentsItemMap = { [key: string]: unknown | undefined };
63
49
  export const PresentCommentsRequestCommentsItemMap = /*@__PURE__*/ S.Record(
64
50
  S.String,
65
51
  S.Unknown,
66
52
  ) as any as S.Schema<PresentCommentsRequestCommentsItemMap>;
67
53
 
68
54
  /** 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. */
69
- export type PresentCommentsRequestCommentsList =
70
- Array<PresentCommentsRequestCommentsItemMap>;
55
+ export type PresentCommentsRequestCommentsList = Array<PresentCommentsRequestCommentsItemMap>;
71
56
  export const PresentCommentsRequestCommentsList = /*@__PURE__*/ S.Array(
72
57
  PresentCommentsRequestCommentsItemMap,
73
58
  ) as any as S.Schema<PresentCommentsRequestCommentsList>;
@@ -99,23 +84,18 @@ export const PresentCommentsRequest = /*@__PURE__*/ S.suspend(() =>
99
84
  user_auth_required: S.optional(S.Boolean),
100
85
  user_auth_url: S.optional(S.String),
101
86
  error: S.optional(S.String),
102
- }).pipe(
103
- T.Http({ method: "POST", uri: "/entity.presentComments", code: 200 }),
104
- ),
105
- ).annotate({
106
- identifier: "PresentCommentsRequest",
107
- }) as any as S.Schema<PresentCommentsRequest>;
87
+ }).pipe(T.Http({ method: "POST", uri: "/entity.presentComments", code: 200 })),
88
+ ).annotate({ identifier: "PresentCommentsRequest" }) as any as S.Schema<PresentCommentsRequest>;
108
89
 
109
90
  /** Pagination metadata. An empty `next_cursor` means the last page. */
110
91
  export interface PresentCommentsResponseResponseMetadata {
111
92
  /** Cursor for the next page — pass as `cursor` on the next call. */
112
93
  next_cursor?: string;
113
94
  }
114
- export const PresentCommentsResponseResponseMetadata = /*@__PURE__*/ S.suspend(
115
- () =>
116
- S.Struct({
117
- next_cursor: S.optional(S.String),
118
- }),
95
+ export const PresentCommentsResponseResponseMetadata = /*@__PURE__*/ S.suspend(() =>
96
+ S.Struct({
97
+ next_cursor: S.optional(S.String),
98
+ }),
119
99
  ).annotate({
120
100
  identifier: "PresentCommentsResponseResponseMetadata",
121
101
  }) as any as S.Schema<PresentCommentsResponseResponseMetadata>;
@@ -131,14 +111,10 @@ export const PresentCommentsResponse = /*@__PURE__*/ S.suspend(() =>
131
111
  ok: S.Boolean,
132
112
  response_metadata: S.optional(PresentCommentsResponseResponseMetadata),
133
113
  }),
134
- ).annotate({
135
- identifier: "PresentCommentsResponse",
136
- }) as any as S.Schema<PresentCommentsResponse>;
114
+ ).annotate({ identifier: "PresentCommentsResponse" }) as any as S.Schema<PresentCommentsResponse>;
137
115
 
138
116
  /** URL-encoded JSON object containing flexpane metadata from the app that will be conformed to a Work Object metadata schema, keyed by entity ID. */
139
- export type PresentDetailsRequestMetadataMap = {
140
- [key: string]: unknown | undefined;
141
- };
117
+ export type PresentDetailsRequestMetadataMap = { [key: string]: unknown | undefined };
142
118
  export const PresentDetailsRequestMetadataMap = /*@__PURE__*/ S.Record(
143
119
  S.String,
144
120
  S.Unknown,
@@ -163,9 +139,7 @@ export const PresentDetailsRequest = /*@__PURE__*/ S.suspend(() =>
163
139
  user_auth_url: S.optional(S.String),
164
140
  error: S.optional(S.String),
165
141
  }).pipe(T.Http({ method: "POST", uri: "/entity.presentDetails", code: 200 })),
166
- ).annotate({
167
- identifier: "PresentDetailsRequest",
168
- }) as any as S.Schema<PresentDetailsRequest>;
142
+ ).annotate({ identifier: "PresentDetailsRequest" }) as any as S.Schema<PresentDetailsRequest>;
169
143
 
170
144
  export interface PresentDetailsResponse {
171
145
  /** Always `true` (a failed call raises a typed error instead). */
@@ -175,9 +149,7 @@ export const PresentDetailsResponse = /*@__PURE__*/ S.suspend(() =>
175
149
  S.Struct({
176
150
  ok: S.Boolean,
177
151
  }),
178
- ).annotate({
179
- identifier: "PresentDetailsResponse",
180
- }) as any as S.Schema<PresentDetailsResponse>;
152
+ ).annotate({ identifier: "PresentDetailsResponse" }) as any as S.Schema<PresentDetailsResponse>;
181
153
 
182
154
  export type AcknowledgeCommentActionError = SlackOpError;
183
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 */