@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,28 +1,19 @@
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
- import { slackPaginate } from "../pagination.ts";
11
4
  import { SlackError, SlackRateLimited } from "../errors.ts";
5
+ import { slackPaginate } from "../pagination.ts";
6
+ import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
12
7
  import * as Retry from "../retry.ts";
8
+ import * as T from "../traits.ts";
13
9
 
14
10
  export type { SlackOpError, SlackOpContext };
15
11
 
16
12
  export type AccessLogsRequestBeforeCase0 = "now";
17
13
  export const AccessLogsRequestBeforeCase0 = S.String;
18
14
 
19
- export type AccessLogsRequestBefore =
20
- | AccessLogsRequestBeforeCase0
21
- | (string & {})
22
- | string;
23
- export const AccessLogsRequestBefore = /*@__PURE__*/ S.Unknown.pipe(
24
- T.UnionCases([[], []]),
25
- );
15
+ export type AccessLogsRequestBefore = AccessLogsRequestBeforeCase0 | (string & {}) | string;
16
+ export const AccessLogsRequestBefore = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], []]));
26
17
 
27
18
  export interface AccessLogsRequest {
28
19
  /** End of time range of logs to include in results (inclusive). */
@@ -45,9 +36,7 @@ export const AccessLogsRequest = /*@__PURE__*/ S.suspend(() =>
45
36
  limit: S.optional(S.Number.pipe(T.Query())),
46
37
  team_id: S.optional(S.String.pipe(T.Query())),
47
38
  }).pipe(T.Http({ method: "GET", uri: "/team.accessLogs", code: 200 })),
48
- ).annotate({
49
- identifier: "AccessLogsRequest",
50
- }) as any as S.Schema<AccessLogsRequest>;
39
+ ).annotate({ identifier: "AccessLogsRequest" }) as any as S.Schema<AccessLogsRequest>;
51
40
 
52
41
  export interface AccessLogsResponseLoginsItem {
53
42
  username: string;
@@ -96,9 +85,7 @@ export const AccessLogsResponsePaging = /*@__PURE__*/ S.suspend(() =>
96
85
  page: S.Number,
97
86
  pages: S.Number,
98
87
  }),
99
- ).annotate({
100
- identifier: "AccessLogsResponsePaging",
101
- }) as any as S.Schema<AccessLogsResponsePaging>;
88
+ ).annotate({ identifier: "AccessLogsResponsePaging" }) as any as S.Schema<AccessLogsResponsePaging>;
102
89
 
103
90
  /** Pagination metadata. An empty `next_cursor` means the last page. */
104
91
  export interface AccessLogsResponseResponseMetadata {
@@ -128,9 +115,7 @@ export const AccessLogsResponse = /*@__PURE__*/ S.suspend(() =>
128
115
  paging: S.optional(AccessLogsResponsePaging),
129
116
  response_metadata: S.optional(AccessLogsResponseResponseMetadata),
130
117
  }),
131
- ).annotate({
132
- identifier: "AccessLogsResponse",
133
- }) as any as S.Schema<AccessLogsResponse>;
118
+ ).annotate({ identifier: "AccessLogsResponse" }) as any as S.Schema<AccessLogsResponse>;
134
119
 
135
120
  export interface BillableInfoRequest {
136
121
  /** Set `cursor` to `next_cursor` returned by previous call, to indicate from where you want to list next page of users list. Default value fetches the first page. */
@@ -149,19 +134,13 @@ export const BillableInfoRequest = /*@__PURE__*/ S.suspend(() =>
149
134
  user: S.optional(S.String.pipe(T.Query())),
150
135
  team_id: S.optional(S.String.pipe(T.Query())),
151
136
  }).pipe(T.Http({ method: "GET", uri: "/team.billableInfo", code: 200 })),
152
- ).annotate({
153
- identifier: "BillableInfoRequest",
154
- }) as any as S.Schema<BillableInfoRequest>;
137
+ ).annotate({ identifier: "BillableInfoRequest" }) as any as S.Schema<BillableInfoRequest>;
155
138
 
156
139
  /** Pagination metadata. An empty `next_cursor` means the last page. */
157
- export type BillableInfoResponseResponseMetadata =
158
- AccessLogsResponseResponseMetadata;
159
- export const BillableInfoResponseResponseMetadata =
160
- AccessLogsResponseResponseMetadata;
161
-
162
- export type BillableInfoResponseBillableInfoMap = {
163
- [key: string]: unknown | undefined;
164
- };
140
+ export type BillableInfoResponseResponseMetadata = AccessLogsResponseResponseMetadata;
141
+ export const BillableInfoResponseResponseMetadata = AccessLogsResponseResponseMetadata;
142
+
143
+ export type BillableInfoResponseBillableInfoMap = { [key: string]: unknown | undefined };
165
144
  export const BillableInfoResponseBillableInfoMap = /*@__PURE__*/ S.Record(
166
145
  S.String,
167
146
  S.Unknown,
@@ -180,18 +159,12 @@ export const BillableInfoResponse = /*@__PURE__*/ S.suspend(() =>
180
159
  response_metadata: S.optional(AccessLogsResponseResponseMetadata),
181
160
  billable_info: BillableInfoResponseBillableInfoMap,
182
161
  }),
183
- ).annotate({
184
- identifier: "BillableInfoResponse",
185
- }) as any as S.Schema<BillableInfoResponse>;
162
+ ).annotate({ identifier: "BillableInfoResponse" }) as any as S.Schema<BillableInfoResponse>;
186
163
 
187
164
  export interface BillingInfoRequest {}
188
165
  export const BillingInfoRequest = /*@__PURE__*/ S.suspend(() =>
189
- S.Struct({}).pipe(
190
- T.Http({ method: "POST", uri: "/team.billing.info", code: 200 }),
191
- ),
192
- ).annotate({
193
- identifier: "BillingInfoRequest",
194
- }) as any as S.Schema<BillingInfoRequest>;
166
+ S.Struct({}).pipe(T.Http({ method: "POST", uri: "/team.billing.info", code: 200 })),
167
+ ).annotate({ identifier: "BillingInfoRequest" }) as any as S.Schema<BillingInfoRequest>;
195
168
 
196
169
  export interface BillingInfoResponse {
197
170
  /** Always `true` (a failed call raises a typed error instead). */
@@ -203,9 +176,7 @@ export const BillingInfoResponse = /*@__PURE__*/ S.suspend(() =>
203
176
  ok: S.Boolean,
204
177
  plan: S.String,
205
178
  }),
206
- ).annotate({
207
- identifier: "BillingInfoResponse",
208
- }) as any as S.Schema<BillingInfoResponse>;
179
+ ).annotate({ identifier: "BillingInfoResponse" }) as any as S.Schema<BillingInfoResponse>;
209
180
 
210
181
  export interface DisconnectExternalTeamRequest {
211
182
  /** The team ID of the target team. */
@@ -251,9 +222,7 @@ export const GetProfileRequest = /*@__PURE__*/ S.suspend(() =>
251
222
  S.Struct({
252
223
  visibility: S.optional(GetProfileRequestVisibility.pipe(T.Query())),
253
224
  }).pipe(T.Http({ method: "GET", uri: "/team.profile.get", code: 200 })),
254
- ).annotate({
255
- identifier: "GetProfileRequest",
256
- }) as any as S.Schema<GetProfileRequest>;
225
+ ).annotate({ identifier: "GetProfileRequest" }) as any as S.Schema<GetProfileRequest>;
257
226
 
258
227
  export type GetProfileResponseProfileFieldsList = Array<unknown>;
259
228
  export const GetProfileResponseProfileFieldsList = /*@__PURE__*/ S.Array(
@@ -288,9 +257,7 @@ export const GetProfileResponse = /*@__PURE__*/ S.suspend(() =>
288
257
  ok: S.Boolean,
289
258
  profile: GetProfileResponseProfile,
290
259
  }),
291
- ).annotate({
292
- identifier: "GetProfileResponse",
293
- }) as any as S.Schema<GetProfileResponse>;
260
+ ).annotate({ identifier: "GetProfileResponse" }) as any as S.Schema<GetProfileResponse>;
294
261
 
295
262
  export type IntegrationLogsRequestChangeType =
296
263
  | "added"
@@ -324,20 +291,15 @@ export const IntegrationLogsRequest = /*@__PURE__*/ S.suspend(() =>
324
291
  team_id: S.optional(S.String.pipe(T.Query())),
325
292
  user: S.optional(S.String.pipe(T.Query())),
326
293
  }).pipe(T.Http({ method: "GET", uri: "/team.integrationLogs", code: 200 })),
327
- ).annotate({
328
- identifier: "IntegrationLogsRequest",
329
- }) as any as S.Schema<IntegrationLogsRequest>;
294
+ ).annotate({ identifier: "IntegrationLogsRequest" }) as any as S.Schema<IntegrationLogsRequest>;
330
295
 
331
- export type IntegrationLogsResponseLogsItemMap = {
332
- [key: string]: unknown | undefined;
333
- };
296
+ export type IntegrationLogsResponseLogsItemMap = { [key: string]: unknown | undefined };
334
297
  export const IntegrationLogsResponseLogsItemMap = /*@__PURE__*/ S.Record(
335
298
  S.String,
336
299
  S.Unknown,
337
300
  ) as any as S.Schema<IntegrationLogsResponseLogsItemMap>;
338
301
 
339
- export type IntegrationLogsResponseLogsList =
340
- Array<IntegrationLogsResponseLogsItemMap>;
302
+ export type IntegrationLogsResponseLogsList = Array<IntegrationLogsResponseLogsItemMap>;
341
303
  export const IntegrationLogsResponseLogsList = /*@__PURE__*/ S.Array(
342
304
  IntegrationLogsResponseLogsItemMap,
343
305
  ) as any as S.Schema<IntegrationLogsResponseLogsList>;
@@ -354,9 +316,7 @@ export const IntegrationLogsResponse = /*@__PURE__*/ S.suspend(() =>
354
316
  paging: S.Unknown,
355
317
  logs: IntegrationLogsResponseLogsList,
356
318
  }),
357
- ).annotate({
358
- identifier: "IntegrationLogsResponse",
359
- }) as any as S.Schema<IntegrationLogsResponse>;
319
+ ).annotate({ identifier: "IntegrationLogsResponse" }) as any as S.Schema<IntegrationLogsResponse>;
360
320
 
361
321
  export type ListExternalTeamsRequestSortField =
362
322
  | "team_name"
@@ -383,16 +343,14 @@ export const ListExternalTeamsRequestSlackConnectPrefFilterItem = S.String;
383
343
  export type ListExternalTeamsRequestSlackConnectPrefFilterList = Array<
384
344
  ListExternalTeamsRequestSlackConnectPrefFilterItem | (string & {})
385
345
  >;
386
- export const ListExternalTeamsRequestSlackConnectPrefFilterList =
387
- /*@__PURE__*/ S.Array(
388
- ListExternalTeamsRequestSlackConnectPrefFilterItem,
389
- ) as any as S.Schema<ListExternalTeamsRequestSlackConnectPrefFilterList>;
346
+ export const ListExternalTeamsRequestSlackConnectPrefFilterList = /*@__PURE__*/ S.Array(
347
+ ListExternalTeamsRequestSlackConnectPrefFilterItem,
348
+ ) as any as S.Schema<ListExternalTeamsRequestSlackConnectPrefFilterList>;
390
349
 
391
350
  export type ListExternalTeamsRequestWorkspaceFilterList = Array<string>;
392
- export const ListExternalTeamsRequestWorkspaceFilterList =
393
- /*@__PURE__*/ S.Array(
394
- S.String,
395
- ) as any as S.Schema<ListExternalTeamsRequestWorkspaceFilterList>;
351
+ export const ListExternalTeamsRequestWorkspaceFilterList = /*@__PURE__*/ S.Array(
352
+ S.String,
353
+ ) as any as S.Schema<ListExternalTeamsRequestWorkspaceFilterList>;
396
354
 
397
355
  export type ListExternalTeamsRequestConnectionStatusFilter =
398
356
  | "CONNECTED"
@@ -415,33 +373,23 @@ export interface ListExternalTeamsRequest {
415
373
  /** Shows connected orgs which are connected on a specified encoded workspace ID */
416
374
  workspace_filter?: ListExternalTeamsRequestWorkspaceFilterList;
417
375
  /** Status of the connected team. */
418
- connection_status_filter?:
419
- | ListExternalTeamsRequestConnectionStatusFilter
420
- | (string & {});
376
+ connection_status_filter?: ListExternalTeamsRequestConnectionStatusFilter | (string & {});
421
377
  }
422
378
  export const ListExternalTeamsRequest = /*@__PURE__*/ S.suspend(() =>
423
379
  S.Struct({
424
380
  limit: S.optional(S.Number.pipe(T.Query())),
425
381
  cursor: S.optional(S.String.pipe(T.Query())),
426
382
  sort_field: S.optional(ListExternalTeamsRequestSortField.pipe(T.Query())),
427
- sort_direction: S.optional(
428
- ListExternalTeamsRequestSortDirection.pipe(T.Query()),
429
- ),
383
+ sort_direction: S.optional(ListExternalTeamsRequestSortDirection.pipe(T.Query())),
430
384
  slack_connect_pref_filter: S.optional(
431
385
  ListExternalTeamsRequestSlackConnectPrefFilterList.pipe(T.Query()),
432
386
  ),
433
- workspace_filter: S.optional(
434
- ListExternalTeamsRequestWorkspaceFilterList.pipe(T.Query()),
435
- ),
387
+ workspace_filter: S.optional(ListExternalTeamsRequestWorkspaceFilterList.pipe(T.Query())),
436
388
  connection_status_filter: S.optional(
437
389
  ListExternalTeamsRequestConnectionStatusFilter.pipe(T.Query()),
438
390
  ),
439
- }).pipe(
440
- T.Http({ method: "GET", uri: "/team.externalTeams.list", code: 200 }),
441
- ),
442
- ).annotate({
443
- identifier: "ListExternalTeamsRequest",
444
- }) as any as S.Schema<ListExternalTeamsRequest>;
391
+ }).pipe(T.Http({ method: "GET", uri: "/team.externalTeams.list", code: 200 })),
392
+ ).annotate({ identifier: "ListExternalTeamsRequest" }) as any as S.Schema<ListExternalTeamsRequest>;
445
393
 
446
394
  export interface ListExternalTeamsResponseOrganizationsItemConnectedWorkspacesItem {
447
395
  workspace_id: string;
@@ -455,8 +403,7 @@ export const ListExternalTeamsResponseOrganizationsItemConnectedWorkspacesItem =
455
403
  workspace_name: S.String,
456
404
  }),
457
405
  ).annotate({
458
- identifier:
459
- "ListExternalTeamsResponseOrganizationsItemConnectedWorkspacesItem",
406
+ identifier: "ListExternalTeamsResponseOrganizationsItemConnectedWorkspacesItem",
460
407
  }) as any as S.Schema<ListExternalTeamsResponseOrganizationsItemConnectedWorkspacesItem>;
461
408
 
462
409
  export type ListExternalTeamsResponseOrganizationsItemConnectedWorkspacesList =
@@ -473,8 +420,7 @@ export type ListExternalTeamsResponseOrganizationsItemConnectionStatus =
473
420
  | "BLOCKED"
474
421
  | "IN_REVIEW"
475
422
  | "DISCONNECTING";
476
- export const ListExternalTeamsResponseOrganizationsItemConnectionStatus =
477
- S.String;
423
+ export const ListExternalTeamsResponseOrganizationsItemConnectionStatus = S.String;
478
424
 
479
425
  export interface ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsItem {
480
426
  team_id: string;
@@ -487,8 +433,7 @@ export const ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsIte
487
433
  count: S.Number,
488
434
  }),
489
435
  ).annotate({
490
- identifier:
491
- "ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsItem",
436
+ identifier: "ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsItem",
492
437
  }) as any as S.Schema<ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsItem>;
493
438
 
494
439
  export type ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsList =
@@ -502,16 +447,14 @@ export interface ListExternalTeamsResponseOrganizationsItemCanvas {
502
447
  total_count: number;
503
448
  ownership_details: ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsList;
504
449
  }
505
- export const ListExternalTeamsResponseOrganizationsItemCanvas =
506
- /*@__PURE__*/ S.suspend(() =>
507
- S.Struct({
508
- total_count: S.Number,
509
- ownership_details:
510
- ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsList,
511
- }),
512
- ).annotate({
513
- identifier: "ListExternalTeamsResponseOrganizationsItemCanvas",
514
- }) as any as S.Schema<ListExternalTeamsResponseOrganizationsItemCanvas>;
450
+ export const ListExternalTeamsResponseOrganizationsItemCanvas = /*@__PURE__*/ S.suspend(() =>
451
+ S.Struct({
452
+ total_count: S.Number,
453
+ ownership_details: ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsList,
454
+ }),
455
+ ).annotate({
456
+ identifier: "ListExternalTeamsResponseOrganizationsItemCanvas",
457
+ }) as any as S.Schema<ListExternalTeamsResponseOrganizationsItemCanvas>;
515
458
 
516
459
  export type ListExternalTeamsResponseOrganizationsItemListsOwnershipDetailsItem =
517
460
  ListExternalTeamsResponseOrganizationsItemCanvasOwnershipDetailsItem;
@@ -529,16 +472,14 @@ export interface ListExternalTeamsResponseOrganizationsItemLists {
529
472
  total_count: number;
530
473
  ownership_details: ListExternalTeamsResponseOrganizationsItemListsOwnershipDetailsList;
531
474
  }
532
- export const ListExternalTeamsResponseOrganizationsItemLists =
533
- /*@__PURE__*/ S.suspend(() =>
534
- S.Struct({
535
- total_count: S.Number,
536
- ownership_details:
537
- ListExternalTeamsResponseOrganizationsItemListsOwnershipDetailsList,
538
- }),
539
- ).annotate({
540
- identifier: "ListExternalTeamsResponseOrganizationsItemLists",
541
- }) as any as S.Schema<ListExternalTeamsResponseOrganizationsItemLists>;
475
+ export const ListExternalTeamsResponseOrganizationsItemLists = /*@__PURE__*/ S.suspend(() =>
476
+ S.Struct({
477
+ total_count: S.Number,
478
+ ownership_details: ListExternalTeamsResponseOrganizationsItemListsOwnershipDetailsList,
479
+ }),
480
+ ).annotate({
481
+ identifier: "ListExternalTeamsResponseOrganizationsItemLists",
482
+ }) as any as S.Schema<ListExternalTeamsResponseOrganizationsItemLists>;
542
483
 
543
484
  export interface ListExternalTeamsResponseOrganizationsItem {
544
485
  team_id: string;
@@ -565,29 +506,26 @@ export interface ListExternalTeamsResponseOrganizationsItem {
565
506
  canvas?: ListExternalTeamsResponseOrganizationsItemCanvas;
566
507
  lists?: ListExternalTeamsResponseOrganizationsItemLists;
567
508
  }
568
- export const ListExternalTeamsResponseOrganizationsItem =
569
- /*@__PURE__*/ S.suspend(() =>
570
- S.Struct({
571
- team_id: S.String,
572
- team_name: S.String,
573
- team_domain: S.String,
574
- public_channel_count: S.Number,
575
- private_channel_count: S.Number,
576
- im_channel_count: S.Number,
577
- mpim_channel_count: S.Number,
578
- connected_workspaces:
579
- ListExternalTeamsResponseOrganizationsItemConnectedWorkspacesList,
580
- slack_connect_prefs: S.Unknown,
581
- connection_status:
582
- ListExternalTeamsResponseOrganizationsItemConnectionStatus,
583
- last_active_timestamp: S.Number,
584
- is_sponsored: S.Boolean,
585
- canvas: S.optional(ListExternalTeamsResponseOrganizationsItemCanvas),
586
- lists: S.optional(ListExternalTeamsResponseOrganizationsItemLists),
587
- }),
588
- ).annotate({
589
- identifier: "ListExternalTeamsResponseOrganizationsItem",
590
- }) as any as S.Schema<ListExternalTeamsResponseOrganizationsItem>;
509
+ export const ListExternalTeamsResponseOrganizationsItem = /*@__PURE__*/ S.suspend(() =>
510
+ S.Struct({
511
+ team_id: S.String,
512
+ team_name: S.String,
513
+ team_domain: S.String,
514
+ public_channel_count: S.Number,
515
+ private_channel_count: S.Number,
516
+ im_channel_count: S.Number,
517
+ mpim_channel_count: S.Number,
518
+ connected_workspaces: ListExternalTeamsResponseOrganizationsItemConnectedWorkspacesList,
519
+ slack_connect_prefs: S.Unknown,
520
+ connection_status: ListExternalTeamsResponseOrganizationsItemConnectionStatus,
521
+ last_active_timestamp: S.Number,
522
+ is_sponsored: S.Boolean,
523
+ canvas: S.optional(ListExternalTeamsResponseOrganizationsItemCanvas),
524
+ lists: S.optional(ListExternalTeamsResponseOrganizationsItemLists),
525
+ }),
526
+ ).annotate({
527
+ identifier: "ListExternalTeamsResponseOrganizationsItem",
528
+ }) as any as S.Schema<ListExternalTeamsResponseOrganizationsItem>;
591
529
 
592
530
  export type ListExternalTeamsResponseOrganizationsList =
593
531
  Array<ListExternalTeamsResponseOrganizationsItem>;
@@ -596,10 +534,8 @@ export const ListExternalTeamsResponseOrganizationsList = /*@__PURE__*/ S.Array(
596
534
  ) as any as S.Schema<ListExternalTeamsResponseOrganizationsList>;
597
535
 
598
536
  /** Pagination metadata. An empty `next_cursor` means the last page. */
599
- export type ListExternalTeamsResponseResponseMetadata =
600
- AccessLogsResponseResponseMetadata;
601
- export const ListExternalTeamsResponseResponseMetadata =
602
- AccessLogsResponseResponseMetadata;
537
+ export type ListExternalTeamsResponseResponseMetadata = AccessLogsResponseResponseMetadata;
538
+ export const ListExternalTeamsResponseResponseMetadata = AccessLogsResponseResponseMetadata;
603
539
 
604
540
  export interface ListExternalTeamsResponse {
605
541
  /** Always `true` (a failed call raises a typed error instead). */
@@ -622,12 +558,8 @@ export const ListExternalTeamsResponse = /*@__PURE__*/ S.suspend(() =>
622
558
 
623
559
  export interface ListPreferencesRequest {}
624
560
  export const ListPreferencesRequest = /*@__PURE__*/ S.suspend(() =>
625
- S.Struct({}).pipe(
626
- T.Http({ method: "POST", uri: "/team.preferences.list", code: 200 }),
627
- ),
628
- ).annotate({
629
- identifier: "ListPreferencesRequest",
630
- }) as any as S.Schema<ListPreferencesRequest>;
561
+ S.Struct({}).pipe(T.Http({ method: "POST", uri: "/team.preferences.list", code: 200 })),
562
+ ).annotate({ identifier: "ListPreferencesRequest" }) as any as S.Schema<ListPreferencesRequest>;
631
563
 
632
564
  export interface ListPreferencesResponse {
633
565
  /** Always `true` (a failed call raises a typed error instead). */
@@ -645,9 +577,7 @@ export const ListPreferencesResponse = /*@__PURE__*/ S.suspend(() =>
645
577
  msg_edit_window_mins: S.Number,
646
578
  who_can_post_general: S.String,
647
579
  }),
648
- ).annotate({
649
- identifier: "ListPreferencesResponse",
650
- }) as any as S.Schema<ListPreferencesResponse>;
580
+ ).annotate({ identifier: "ListPreferencesResponse" }) as any as S.Schema<ListPreferencesResponse>;
651
581
 
652
582
  export interface TeamInfoRequest {
653
583
  /** Query by domain instead of team (only when team is null). This only works for domains in the same enterprise as the querying team token. This also expects the domain to belong to a team and not the enterprise itself. This is the value set up for the 'Joining This Workspace' workspace setting. If it contains more than one domain, the field will contain multiple comma-separated domain values. If no domain is set, the field is empty. */
@@ -660,9 +590,7 @@ export const TeamInfoRequest = /*@__PURE__*/ S.suspend(() =>
660
590
  domain: S.optional(S.String.pipe(T.Query())),
661
591
  team: S.optional(S.String.pipe(T.Query())),
662
592
  }).pipe(T.Http({ method: "GET", uri: "/team.info", code: 200 })),
663
- ).annotate({
664
- identifier: "TeamInfoRequest",
665
- }) as any as S.Schema<TeamInfoRequest>;
593
+ ).annotate({ identifier: "TeamInfoRequest" }) as any as S.Schema<TeamInfoRequest>;
666
594
 
667
595
  export interface TeamInfoResponse {
668
596
  /** Always `true` (a failed call raises a typed error instead). */
@@ -672,9 +600,7 @@ export const TeamInfoResponse = /*@__PURE__*/ S.suspend(() =>
672
600
  S.Struct({
673
601
  ok: S.Boolean,
674
602
  }),
675
- ).annotate({
676
- identifier: "TeamInfoResponse",
677
- }) as any as S.Schema<TeamInfoResponse>;
603
+ ).annotate({ identifier: "TeamInfoResponse" }) as any as S.Schema<TeamInfoResponse>;
678
604
 
679
605
  export type AccessLogsError = SlackOpError;
680
606
  /** Gets the access logs for the current team. Required scopes — user: `admin` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `missing_argument` — A required argument is missing. - `missing_scope` — The provided token hasn't obtained the necessary scopes to use this method. - `not_allowed_token_type` — Method was called with an invalid token type - `over_pagination_limit` — It is not possible to request more than 1000 items per page or more than 100 pages. - `paid_only` — This is only available to paid teams. - `token_revoked` — token revoked (generated) - `invalid_cursor` — Value passed for `cursor` was not valid or is no longer valid. - `invalid_limit` — The value passed for `limit` was not valid. - `invalid_team_id` — The value passed for `team_id` is not valid given the token context. See https://docs.slack.dev/reference/methods/team.accessLogs */
@@ -1,15 +1,11 @@
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
4
  import * as Redacted from "effect/Redacted";
4
- import * as API from "@distilled.cloud/core/api";
5
- import * as T from "../traits.ts";
6
- import {
7
- SlackProtocol,
8
- type SlackOpError,
9
- type SlackOpContext,
10
- } from "../protocol.ts";
11
5
  import { SlackError, SlackRateLimited } from "../errors.ts";
6
+ import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
12
7
  import * as Retry from "../retry.ts";
8
+ import * as T from "../traits.ts";
13
9
 
14
10
  export type { SlackOpError, SlackOpContext };
15
11
 
@@ -28,9 +24,7 @@ export const RotateTokenRequest = /*@__PURE__*/ S.suspend(() =>
28
24
  contentType: "form-urlencoded",
29
25
  }),
30
26
  ),
31
- ).annotate({
32
- identifier: "RotateTokenRequest",
33
- }) as any as S.Schema<RotateTokenRequest>;
27
+ ).annotate({ identifier: "RotateTokenRequest" }) as any as S.Schema<RotateTokenRequest>;
34
28
 
35
29
  export interface RotateTokenResponse {
36
30
  /** Always `true` (a failed call raises a typed error instead). */
@@ -58,9 +52,7 @@ export const RotateTokenResponse = /*@__PURE__*/ S.suspend(() =>
58
52
  exp: S.Number,
59
53
  iat: S.Number,
60
54
  }),
61
- ).annotate({
62
- identifier: "RotateTokenResponse",
63
- }) as any as S.Schema<RotateTokenResponse>;
55
+ ).annotate({ identifier: "RotateTokenResponse" }) as any as S.Schema<RotateTokenResponse>;
64
56
 
65
57
  export type RotateTokenError = SlackOpError;
66
58
  /** Exchanges a refresh token for a new app configuration token. Rate limit tier: 5 Method-specific errors (the `error` slug on the SlackError): - `internal_error` — Internal error - `invalid_refresh_token` — The given refresh token is invalid. - `unknown_error` — Temporary error for dev only restriction See https://docs.slack.dev/reference/methods/tooling.tokens.rotate */