@distilled.cloud/slack 1.0.0-rc.20 → 1.0.0-rc.21

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 (188) hide show
  1. package/README.md +2 -2
  2. package/lib/.lazy.json +1 -1
  3. package/lib/_bundle/sdk.js +1 -1
  4. package/lib/_bundle/sdk.js.map +1 -1
  5. package/lib/credentials.d.ts +6 -2
  6. package/lib/credentials.d.ts.map +1 -1
  7. package/lib/errors.d.ts +10 -0
  8. package/lib/errors.d.ts.map +1 -1
  9. package/lib/errors.js +1 -1
  10. package/lib/index.d.ts +0 -1
  11. package/lib/index.d.ts.map +1 -1
  12. package/lib/index.js +0 -1
  13. package/lib/pagination.d.ts.map +1 -1
  14. package/lib/protocol.d.ts +47 -12
  15. package/lib/protocol.d.ts.map +1 -1
  16. package/lib/retry.d.ts +1 -2
  17. package/lib/retry.d.ts.map +1 -1
  18. package/lib/services/admin.d.ts +264 -83
  19. package/lib/services/admin.d.ts.map +1 -1
  20. package/lib/services/admin.js +154 -149
  21. package/lib/services/admin.js.map +1 -1
  22. package/lib/services/agents.d.ts.map +1 -1
  23. package/lib/services/agents.js +1 -1
  24. package/lib/services/agents.js.map +1 -1
  25. package/lib/services/api.d.ts.map +1 -1
  26. package/lib/services/api.js +1 -1
  27. package/lib/services/api.js.map +1 -1
  28. package/lib/services/apps.d.ts +7 -7
  29. package/lib/services/apps.d.ts.map +1 -1
  30. package/lib/services/apps.js +34 -34
  31. package/lib/services/apps.js.map +1 -1
  32. package/lib/services/assistant.d.ts +4 -1
  33. package/lib/services/assistant.d.ts.map +1 -1
  34. package/lib/services/assistant.js +1 -1
  35. package/lib/services/assistant.js.map +1 -1
  36. package/lib/services/auth.d.ts.map +1 -1
  37. package/lib/services/auth.js +1 -1
  38. package/lib/services/auth.js.map +1 -1
  39. package/lib/services/blocks.d.ts.map +1 -1
  40. package/lib/services/blocks.js +1 -1
  41. package/lib/services/blocks.js.map +1 -1
  42. package/lib/services/bookmarks.d.ts.map +1 -1
  43. package/lib/services/bookmarks.js +1 -1
  44. package/lib/services/bookmarks.js.map +1 -1
  45. package/lib/services/bots.d.ts.map +1 -1
  46. package/lib/services/bots.js +1 -1
  47. package/lib/services/bots.js.map +1 -1
  48. package/lib/services/calls.d.ts.map +1 -1
  49. package/lib/services/calls.js +1 -1
  50. package/lib/services/calls.js.map +1 -1
  51. package/lib/services/canvases.d.ts +1 -1
  52. package/lib/services/canvases.d.ts.map +1 -1
  53. package/lib/services/canvases.js +1 -1
  54. package/lib/services/canvases.js.map +1 -1
  55. package/lib/services/chat.d.ts.map +1 -1
  56. package/lib/services/chat.js +1 -1
  57. package/lib/services/chat.js.map +1 -1
  58. package/lib/services/conversations.d.ts +5 -5
  59. package/lib/services/conversations.d.ts.map +1 -1
  60. package/lib/services/conversations.js +39 -39
  61. package/lib/services/conversations.js.map +1 -1
  62. package/lib/services/dialog.d.ts.map +1 -1
  63. package/lib/services/dialog.js +1 -1
  64. package/lib/services/dialog.js.map +1 -1
  65. package/lib/services/dnd.d.ts.map +1 -1
  66. package/lib/services/dnd.js +1 -1
  67. package/lib/services/dnd.js.map +1 -1
  68. package/lib/services/emoji.d.ts.map +1 -1
  69. package/lib/services/emoji.js +1 -1
  70. package/lib/services/emoji.js.map +1 -1
  71. package/lib/services/entity.d.ts.map +1 -1
  72. package/lib/services/entity.js +1 -1
  73. package/lib/services/entity.js.map +1 -1
  74. package/lib/services/files.d.ts +1 -1
  75. package/lib/services/files.d.ts.map +1 -1
  76. package/lib/services/files.js +28 -28
  77. package/lib/services/files.js.map +1 -1
  78. package/lib/services/functions.d.ts.map +1 -1
  79. package/lib/services/functions.js +1 -1
  80. package/lib/services/functions.js.map +1 -1
  81. package/lib/services/index.d.ts.map +1 -1
  82. package/lib/services/lists.d.ts.map +1 -1
  83. package/lib/services/lists.js +1 -1
  84. package/lib/services/lists.js.map +1 -1
  85. package/lib/services/migration.d.ts.map +1 -1
  86. package/lib/services/migration.js +1 -1
  87. package/lib/services/migration.js.map +1 -1
  88. package/lib/services/oauth.d.ts +6 -6
  89. package/lib/services/oauth.d.ts.map +1 -1
  90. package/lib/services/oauth.js +1 -1
  91. package/lib/services/oauth.js.map +1 -1
  92. package/lib/services/openid.d.ts +2 -2
  93. package/lib/services/openid.d.ts.map +1 -1
  94. package/lib/services/openid.js +1 -1
  95. package/lib/services/openid.js.map +1 -1
  96. package/lib/services/pins.d.ts.map +1 -1
  97. package/lib/services/pins.js +1 -1
  98. package/lib/services/pins.js.map +1 -1
  99. package/lib/services/reactions.d.ts.map +1 -1
  100. package/lib/services/reactions.js +1 -1
  101. package/lib/services/reactions.js.map +1 -1
  102. package/lib/services/reminders.d.ts.map +1 -1
  103. package/lib/services/reminders.js +1 -1
  104. package/lib/services/reminders.js.map +1 -1
  105. package/lib/services/rtm.d.ts.map +1 -1
  106. package/lib/services/rtm.js +1 -1
  107. package/lib/services/rtm.js.map +1 -1
  108. package/lib/services/search.d.ts.map +1 -1
  109. package/lib/services/search.js +1 -1
  110. package/lib/services/search.js.map +1 -1
  111. package/lib/services/slackbot.d.ts +2 -2
  112. package/lib/services/slackbot.d.ts.map +1 -1
  113. package/lib/services/slackbot.js +1 -1
  114. package/lib/services/slackbot.js.map +1 -1
  115. package/lib/services/stars.d.ts.map +1 -1
  116. package/lib/services/stars.js +1 -1
  117. package/lib/services/stars.js.map +1 -1
  118. package/lib/services/team.d.ts +1 -1
  119. package/lib/services/team.d.ts.map +1 -1
  120. package/lib/services/team.js +1 -1
  121. package/lib/services/team.js.map +1 -1
  122. package/lib/services/tooling.d.ts +1 -1
  123. package/lib/services/tooling.d.ts.map +1 -1
  124. package/lib/services/tooling.js +1 -1
  125. package/lib/services/tooling.js.map +1 -1
  126. package/lib/services/usergroups.d.ts.map +1 -1
  127. package/lib/services/usergroups.js +1 -1
  128. package/lib/services/usergroups.js.map +1 -1
  129. package/lib/services/users.d.ts +73 -1
  130. package/lib/services/users.d.ts.map +1 -1
  131. package/lib/services/users.js +1 -1
  132. package/lib/services/users.js.map +1 -1
  133. package/lib/services/views.d.ts.map +1 -1
  134. package/lib/services/views.js +1 -1
  135. package/lib/services/views.js.map +1 -1
  136. package/lib/services/workflows.d.ts +4 -4
  137. package/lib/services/workflows.d.ts.map +1 -1
  138. package/lib/services/workflows.js +1 -1
  139. package/lib/services/workflows.js.map +1 -1
  140. package/lib/services.lazy/admin.js +2 -2
  141. package/lib/services.lazy/apps.js +1 -1
  142. package/lib/services.lazy/conversations.js +1 -1
  143. package/lib/services.lazy/files.js +1 -1
  144. package/lib/traits.d.ts.map +1 -1
  145. package/package.json +6 -7
  146. package/src/credentials.ts +20 -15
  147. package/src/errors.ts +12 -1
  148. package/src/index.ts +0 -1
  149. package/src/protocol.ts +96 -86
  150. package/src/retry.ts +1 -2
  151. package/src/services/admin.ts +1523 -951
  152. package/src/services/agents.ts +23 -12
  153. package/src/services/api.ts +3 -2
  154. package/src/services/apps.ts +57 -34
  155. package/src/services/assistant.ts +17 -8
  156. package/src/services/auth.ts +7 -4
  157. package/src/services/blocks.ts +3 -2
  158. package/src/services/bookmarks.ts +9 -5
  159. package/src/services/bots.ts +3 -2
  160. package/src/services/calls.ts +13 -7
  161. package/src/services/canvases.ts +16 -9
  162. package/src/services/chat.ts +27 -14
  163. package/src/services/conversations.ts +62 -34
  164. package/src/services/dialog.ts +3 -2
  165. package/src/services/dnd.ts +11 -6
  166. package/src/services/emoji.ts +3 -2
  167. package/src/services/entity.ts +7 -4
  168. package/src/services/files.ts +32 -17
  169. package/src/services/functions.ts +17 -9
  170. package/src/services/lists.ts +25 -13
  171. package/src/services/migration.ts +3 -2
  172. package/src/services/oauth.ts +23 -17
  173. package/src/services/openid.ts +8 -6
  174. package/src/services/pins.ts +7 -4
  175. package/src/services/reactions.ts +9 -5
  176. package/src/services/reminders.ts +11 -6
  177. package/src/services/rtm.ts +5 -3
  178. package/src/services/search.ts +7 -4
  179. package/src/services/slackbot.ts +17 -10
  180. package/src/services/stars.ts +7 -4
  181. package/src/services/team.ts +20 -11
  182. package/src/services/tooling.ts +5 -4
  183. package/src/services/usergroups.ts +15 -8
  184. package/src/services/users.ts +136 -17
  185. package/src/services/views.ts +9 -5
  186. package/src/services/workflows.ts +21 -13
  187. package/lib/index.lazy.js +0 -7
  188. package/lib/index.lazy.js.map +0 -1
@@ -2,7 +2,7 @@ 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
3
  import * as S from "@distilled.cloud/core/schema-lite";
4
4
  import * as __L from "@distilled.cloud/core/schema-lite";
5
- import { SlackError, SlackRateLimited } from "../errors.ts";
5
+ import { SlackServiceErrors } from "../errors.ts";
6
6
  import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
7
7
  import * as Retry from "../retry.ts";
8
8
  import * as T from "../traits.ts";
@@ -225,7 +225,8 @@ export const addDistributionsPermissions: API.OperationMethod<
225
225
  > = /*@__PURE__*/ API.make(() => ({
226
226
  input: __S(0, __c0, 0) as any as S.Schema<AddDistributionsPermissionsRequest>,
227
227
  output: __S(8, __c2, 0) as any as S.Schema<AddDistributionsPermissionsResponse>,
228
- errors: [SlackError, SlackRateLimited],
228
+ errors: [],
229
+ serviceErrors: SlackServiceErrors,
229
230
  protocol: SlackProtocol,
230
231
  retry: Retry.Retry,
231
232
  telemetry: TELEMETRY,
@@ -242,7 +243,8 @@ export const completeError: API.OperationMethod<
242
243
  > = /*@__PURE__*/ API.make(() => ({
243
244
  input: __S(12, __c3, 0) as any as S.Schema<CompleteErrorRequest>,
244
245
  output: __S(16, __c4, 0) as any as S.Schema<CompleteErrorResponse>,
245
- errors: [SlackError, SlackRateLimited],
246
+ errors: [],
247
+ serviceErrors: SlackServiceErrors,
246
248
  protocol: SlackProtocol,
247
249
  retry: Retry.Retry,
248
250
  telemetry: TELEMETRY,
@@ -259,7 +261,8 @@ export const completeSuccess: API.OperationMethod<
259
261
  > = /*@__PURE__*/ API.make(() => ({
260
262
  input: __S(21, __c5, 1) as any as S.Schema<CompleteSuccessRequest>,
261
263
  output: __S(16, __c4, 0) as any as S.Schema<CompleteSuccessResponse>,
262
- errors: [SlackError, SlackRateLimited],
264
+ errors: [],
265
+ serviceErrors: SlackServiceErrors,
263
266
  protocol: SlackProtocol,
264
267
  retry: Retry.Retry,
265
268
  telemetry: TELEMETRY,
@@ -276,7 +279,8 @@ export const exportWorkflowsStepsResponse: API.OperationMethod<
276
279
  > = /*@__PURE__*/ API.make(() => ({
277
280
  input: __S(24, __c6, 0) as any as S.Schema<ExportWorkflowsStepsResponseRequest>,
278
281
  output: __S(16, __c4, 0) as any as S.Schema<ExportWorkflowsStepsResponseResponse>,
279
- errors: [SlackError, SlackRateLimited],
282
+ errors: [],
283
+ serviceErrors: SlackServiceErrors,
280
284
  protocol: SlackProtocol,
281
285
  retry: Retry.Retry,
282
286
  telemetry: TELEMETRY,
@@ -293,7 +297,8 @@ export const listDistributionsPermissions: API.OperationMethod<
293
297
  > = /*@__PURE__*/ API.make(() => ({
294
298
  input: __S(28, __c7, 0) as any as S.Schema<ListDistributionsPermissionsRequest>,
295
299
  output: __S(32, __c8, 0) as any as S.Schema<ListDistributionsPermissionsResponse>,
296
- errors: [SlackError, SlackRateLimited],
300
+ errors: [],
301
+ serviceErrors: SlackServiceErrors,
297
302
  protocol: SlackProtocol,
298
303
  retry: Retry.Retry,
299
304
  telemetry: TELEMETRY,
@@ -310,7 +315,8 @@ export const listWorkflowsSteps: API.OperationMethod<
310
315
  > = /*@__PURE__*/ API.make(() => ({
311
316
  input: __S(36, __c9, 0) as any as S.Schema<ListWorkflowsStepsRequest>,
312
317
  output: __S(38, __c9, 2) as any as S.Schema<ListWorkflowsStepsResponse>,
313
- errors: [SlackError, SlackRateLimited],
318
+ errors: [],
319
+ serviceErrors: SlackServiceErrors,
314
320
  protocol: SlackProtocol,
315
321
  retry: Retry.Retry,
316
322
  telemetry: TELEMETRY,
@@ -327,7 +333,8 @@ export const removeDistributionsPermissions: API.OperationMethod<
327
333
  > = /*@__PURE__*/ API.make(() => ({
328
334
  input: __S(40, __c10, 0) as any as S.Schema<RemoveDistributionsPermissionsRequest>,
329
335
  output: __S(8, __c2, 0) as any as S.Schema<RemoveDistributionsPermissionsResponse>,
330
- errors: [SlackError, SlackRateLimited],
336
+ errors: [],
337
+ serviceErrors: SlackServiceErrors,
331
338
  protocol: SlackProtocol,
332
339
  retry: Retry.Retry,
333
340
  telemetry: TELEMETRY,
@@ -344,7 +351,8 @@ export const setDistributionsPermissions: API.OperationMethod<
344
351
  > = /*@__PURE__*/ API.make(() => ({
345
352
  input: __S(44, __c11, 0) as any as S.Schema<SetDistributionsPermissionsRequest>,
346
353
  output: __S(32, __c8, 0) as any as S.Schema<SetDistributionsPermissionsResponse>,
347
- errors: [SlackError, SlackRateLimited],
354
+ errors: [],
355
+ serviceErrors: SlackServiceErrors,
348
356
  protocol: SlackProtocol,
349
357
  retry: Retry.Retry,
350
358
  telemetry: TELEMETRY,
@@ -2,7 +2,7 @@ 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
3
  import * as S from "@distilled.cloud/core/schema-lite";
4
4
  import * as __L from "@distilled.cloud/core/schema-lite";
5
- import { SlackError, SlackRateLimited } from "../errors.ts";
5
+ import { SlackServiceErrors } from "../errors.ts";
6
6
  import { slackPaginate } from "../pagination.ts";
7
7
  import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
8
8
  import * as Retry from "../retry.ts";
@@ -259,7 +259,8 @@ export const createItem: API.OperationMethod<
259
259
  > = /*@__PURE__*/ API.make(() => ({
260
260
  input: __S(0, __c0, 0) as any as S.Schema<CreateItemRequest>,
261
261
  output: __S(1, __c0, 1) as any as S.Schema<CreateItemResponse>,
262
- errors: [SlackError, SlackRateLimited],
262
+ errors: [],
263
+ serviceErrors: SlackServiceErrors,
263
264
  protocol: SlackProtocol,
264
265
  retry: Retry.Retry,
265
266
  telemetry: TELEMETRY,
@@ -276,7 +277,8 @@ export const createSlackList: API.OperationMethod<
276
277
  > = /*@__PURE__*/ API.make(() => ({
277
278
  input: __S(8, __c2, 0) as any as S.Schema<CreateSlackListRequest>,
278
279
  output: __S(9, __c2, 1) as any as S.Schema<CreateSlackListResponse>,
279
- errors: [SlackError, SlackRateLimited],
280
+ errors: [],
281
+ serviceErrors: SlackServiceErrors,
280
282
  protocol: SlackProtocol,
281
283
  retry: Retry.Retry,
282
284
  telemetry: TELEMETRY,
@@ -293,7 +295,8 @@ export const deleteAccess: API.OperationMethod<
293
295
  > = /*@__PURE__*/ API.make(() => ({
294
296
  input: __S(20, __c5, 0) as any as S.Schema<DeleteAccessRequest>,
295
297
  output: __S(28, __c7, 0) as any as S.Schema<DeleteAccessResponse>,
296
- errors: [SlackError, SlackRateLimited],
298
+ errors: [],
299
+ serviceErrors: SlackServiceErrors,
297
300
  protocol: SlackProtocol,
298
301
  retry: Retry.Retry,
299
302
  telemetry: TELEMETRY,
@@ -310,7 +313,8 @@ export const deleteItem: API.OperationMethod<
310
313
  > = /*@__PURE__*/ API.make(() => ({
311
314
  input: __S(32, __c8, 0) as any as S.Schema<DeleteItemRequest>,
312
315
  output: __S(36, __c9, 0) as any as S.Schema<DeleteItemResponse>,
313
- errors: [SlackError, SlackRateLimited],
316
+ errors: [],
317
+ serviceErrors: SlackServiceErrors,
314
318
  protocol: SlackProtocol,
315
319
  retry: Retry.Retry,
316
320
  telemetry: TELEMETRY,
@@ -327,7 +331,8 @@ export const deleteMultiple: API.OperationMethod<
327
331
  > = /*@__PURE__*/ API.make(() => ({
328
332
  input: __S(40, __c10, 0) as any as S.Schema<DeleteMultipleRequest>,
329
333
  output: __S(36, __c9, 0) as any as S.Schema<DeleteMultipleResponse>,
330
- errors: [SlackError, SlackRateLimited],
334
+ errors: [],
335
+ serviceErrors: SlackServiceErrors,
331
336
  protocol: SlackProtocol,
332
337
  retry: Retry.Retry,
333
338
  telemetry: TELEMETRY,
@@ -344,7 +349,8 @@ export const downloadGet: API.OperationMethod<
344
349
  > = /*@__PURE__*/ API.make(() => ({
345
350
  input: __S(44, __c11, 0) as any as S.Schema<DownloadGetRequest>,
346
351
  output: __S(45, __c11, 1) as any as S.Schema<DownloadGetResponse>,
347
- errors: [SlackError, SlackRateLimited],
352
+ errors: [],
353
+ serviceErrors: SlackServiceErrors,
348
354
  protocol: SlackProtocol,
349
355
  retry: Retry.Retry,
350
356
  telemetry: TELEMETRY,
@@ -361,7 +367,8 @@ export const downloadStart: API.OperationMethod<
361
367
  > = /*@__PURE__*/ API.make(() => ({
362
368
  input: __S(48, __c12, 0) as any as S.Schema<DownloadStartRequest>,
363
369
  output: __S(49, __c12, 1) as any as S.Schema<DownloadStartResponse>,
364
- errors: [SlackError, SlackRateLimited],
370
+ errors: [],
371
+ serviceErrors: SlackServiceErrors,
365
372
  protocol: SlackProtocol,
366
373
  retry: Retry.Retry,
367
374
  telemetry: TELEMETRY,
@@ -378,7 +385,8 @@ export const itemsInfo: API.OperationMethod<
378
385
  > = /*@__PURE__*/ API.make(() => ({
379
386
  input: __S(52, __c13, 0) as any as S.Schema<ItemsInfoRequest>,
380
387
  output: __S(53, __c13, 1) as any as S.Schema<ItemsInfoResponse>,
381
- errors: [SlackError, SlackRateLimited],
388
+ errors: [],
389
+ serviceErrors: SlackServiceErrors,
382
390
  protocol: SlackProtocol,
383
391
  retry: Retry.Retry,
384
392
  telemetry: TELEMETRY,
@@ -397,7 +405,8 @@ export const listItems: API.PaginatedOperationMethod<
397
405
  () => ({
398
406
  input: __S(56, __c14, 0) as any as S.Schema<ListItemsRequest>,
399
407
  output: __S(58, __c14, 2) as any as S.Schema<ListItemsResponse>,
400
- errors: [SlackError, SlackRateLimited],
408
+ errors: [],
409
+ serviceErrors: SlackServiceErrors,
401
410
  protocol: SlackProtocol,
402
411
  retry: Retry.Retry,
403
412
  telemetry: TELEMETRY,
@@ -423,7 +432,8 @@ export const setAccess: API.OperationMethod<
423
432
  > = /*@__PURE__*/ API.make(() => ({
424
433
  input: __S(60, __c15, 0) as any as S.Schema<SetAccessRequest>,
425
434
  output: __S(28, __c7, 0) as any as S.Schema<SetAccessResponse>,
426
- errors: [SlackError, SlackRateLimited],
435
+ errors: [],
436
+ serviceErrors: SlackServiceErrors,
427
437
  protocol: SlackProtocol,
428
438
  retry: Retry.Retry,
429
439
  telemetry: TELEMETRY,
@@ -440,7 +450,8 @@ export const updateItem: API.OperationMethod<
440
450
  > = /*@__PURE__*/ API.make(() => ({
441
451
  input: __S(12, __c3, 0) as any as S.Schema<UpdateItemRequest>,
442
452
  output: __S(36, __c9, 0) as any as S.Schema<UpdateItemResponse>,
443
- errors: [SlackError, SlackRateLimited],
453
+ errors: [],
454
+ serviceErrors: SlackServiceErrors,
444
455
  protocol: SlackProtocol,
445
456
  retry: Retry.Retry,
446
457
  telemetry: TELEMETRY,
@@ -457,7 +468,8 @@ export const updateSlackList: API.OperationMethod<
457
468
  > = /*@__PURE__*/ API.make(() => ({
458
469
  input: __S(16, __c4, 0) as any as S.Schema<UpdateSlackListRequest>,
459
470
  output: __S(36, __c9, 0) as any as S.Schema<UpdateSlackListResponse>,
460
- errors: [SlackError, SlackRateLimited],
471
+ errors: [],
472
+ serviceErrors: SlackServiceErrors,
461
473
  protocol: SlackProtocol,
462
474
  retry: Retry.Retry,
463
475
  telemetry: TELEMETRY,
@@ -2,7 +2,7 @@ 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
3
  import * as S from "@distilled.cloud/core/schema-lite";
4
4
  import * as __L from "@distilled.cloud/core/schema-lite";
5
- import { SlackError, SlackRateLimited } from "../errors.ts";
5
+ import { SlackServiceErrors } from "../errors.ts";
6
6
  import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
7
7
  import * as Retry from "../retry.ts";
8
8
  import * as T from "../traits.ts";
@@ -53,7 +53,8 @@ export const migrationExchange: API.OperationMethod<
53
53
  > = /*@__PURE__*/ API.make(() => ({
54
54
  input: __S(1, __c0, 1) as any as S.Schema<MigrationExchangeRequest>,
55
55
  output: __S(3, __c0, 3) as any as S.Schema<MigrationExchangeResponse>,
56
- errors: [SlackError, SlackRateLimited],
56
+ errors: [],
57
+ serviceErrors: SlackServiceErrors,
57
58
  protocol: SlackProtocol,
58
59
  retry: Retry.Retry,
59
60
  telemetry: TELEMETRY,
@@ -3,7 +3,7 @@ import * as API from "@distilled.cloud/core/api";
3
3
  import * as S from "@distilled.cloud/core/schema-lite";
4
4
  import * as __L from "@distilled.cloud/core/schema-lite";
5
5
  import type * as Redacted from "effect/Redacted";
6
- import { SlackError, SlackRateLimited } from "../errors.ts";
6
+ import { SlackServiceErrors } from "../errors.ts";
7
7
  import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
8
8
  import * as Retry from "../retry.ts";
9
9
  import * as T from "../traits.ts";
@@ -35,7 +35,7 @@ export interface BeginShortTokenRotationResponse {
35
35
  /** Always `true` (a failed call raises a typed error instead). */
36
36
  ok: boolean;
37
37
  /** A new xoxp access token to replace the token with a shorter secret. Not yet active until completeShortTokenRotation is called. */
38
- new_token: string;
38
+ new_token: string | Redacted.Redacted<string>;
39
39
  }
40
40
  export interface CompleteShortTokenRotationRequest {
41
41
  /** Issued when you created your application. Must be the app the token being rotated was issued to. */
@@ -43,13 +43,13 @@ export interface CompleteShortTokenRotationRequest {
43
43
  /** Issued when you created your application. */
44
44
  client_secret: string | Redacted.Redacted<string>;
45
45
  /** The new xoxp token returned by oauth.v2.beginShortTokenRotation. */
46
- new_token: string;
46
+ new_token: string | Redacted.Redacted<string>;
47
47
  }
48
48
  export interface CompleteShortTokenRotationResponse {
49
49
  /** Always `true` (a failed call raises a typed error instead). */
50
50
  ok: boolean;
51
51
  /** The new xoxp access token, now active. The previous token is no longer valid. */
52
- token: string;
52
+ token: string | Redacted.Redacted<string>;
53
53
  }
54
54
  export interface OauthAccessRequest {
55
55
  /** Issued when you created your application. If possible, avoid sending `client_id` and `client_secret` as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme. */
@@ -84,7 +84,7 @@ export interface OauthAccessResponseScopes {
84
84
  }
85
85
  export interface OauthAccessResponseBot {
86
86
  bot_user_id?: string | undefined;
87
- bot_access_token?: string | undefined;
87
+ bot_access_token?: string | Redacted.Redacted<string> | undefined;
88
88
  scope?: string | undefined;
89
89
  }
90
90
  export interface OauthAccessResponseUser {
@@ -319,7 +319,8 @@ export const beginShortTokenRotation: API.OperationMethod<
319
319
  > = /*@__PURE__*/ API.make(() => ({
320
320
  input: __S(0, __c0, 0) as any as S.Schema<BeginShortTokenRotationRequest>,
321
321
  output: __S(1, __c0, 1) as any as S.Schema<BeginShortTokenRotationResponse>,
322
- errors: [SlackError, SlackRateLimited],
322
+ errors: [],
323
+ serviceErrors: SlackServiceErrors,
323
324
  protocol: SlackProtocol,
324
325
  retry: Retry.Retry,
325
326
  telemetry: TELEMETRY,
@@ -336,7 +337,8 @@ export const completeShortTokenRotation: API.OperationMethod<
336
337
  > = /*@__PURE__*/ API.make(() => ({
337
338
  input: __S(16, __c1, 0) as any as S.Schema<CompleteShortTokenRotationRequest>,
338
339
  output: __S(17, __c1, 1) as any as S.Schema<CompleteShortTokenRotationResponse>,
339
- errors: [SlackError, SlackRateLimited],
340
+ errors: [],
341
+ serviceErrors: SlackServiceErrors,
340
342
  protocol: SlackProtocol,
341
343
  retry: Retry.Retry,
342
344
  telemetry: TELEMETRY,
@@ -353,7 +355,8 @@ export const oauthAccess: API.OperationMethod<
353
355
  > = /*@__PURE__*/ API.make(() => ({
354
356
  input: __S(32, __c2, 0) as any as S.Schema<OauthAccessRequest>,
355
357
  output: __S(40, __c2, 8) as any as S.Schema<OauthAccessResponse>,
356
- errors: [SlackError, SlackRateLimited],
358
+ errors: [],
359
+ serviceErrors: SlackServiceErrors,
357
360
  protocol: SlackProtocol,
358
361
  retry: Retry.Retry,
359
362
  telemetry: TELEMETRY,
@@ -361,7 +364,7 @@ export const oauthAccess: API.OperationMethod<
361
364
  }));
362
365
 
363
366
  export type V2AccessError = SlackOpError;
364
- /** Exchanges a temporary OAuth verifier code for an access token. Rate limit tier: 5 Method-specific errors (the `error` slug on the SlackError): - `bad_client_secret` -- Value passed for `client_secret` was invalid. - `bad_redirect_uri` -- Value passed for `redirect_uri` did not match the `redirect_uri` in the original request. - `cannot_install_an_org_installed_app` -- Returned when the the org-installed app cannot be installed on a workspace. - `invalid_client_id` -- Value passed for `client_id` was invalid. - `invalid_code` -- Value passed for `code` was invalid. - `invalid_grant_type` -- Value passed for `grant_type` was invalid. - `invalid_refresh_token` -- The given refresh token is invalid. - `no_scopes` -- Missing `scope` in the request. - `oauth_authorization_url_mismatch` -- The OAuth flow was initiated on an incorrect version of the authorization url. The flow must be initiated via /oauth/v2/authorize. - `preview_feature_not_available` -- Returned when the API method is not yet available on the team in context. - `user_email_unverified` -- The users email is unverified. - `pkce_not_allowed` -- The app is not allowed to use the PKCE flow. - `invalid_code_verifier` -- The code_verifier is invalid. See https://docs.slack.dev/reference/methods/oauth.v2.access */
367
+ /** Exchanges a temporary OAuth verifier code for an access token. Rate limit tier: 5 Method-specific errors (the `error` slug on the SlackError): - `bad_client_secret` -- Value passed for `client_secret` was invalid. - `bad_redirect_uri` -- Value passed for `redirect_uri` did not match the `redirect_uri` in the original request. - `cannot_install_an_org_installed_app` -- Returned when the the org-installed app cannot be installed on a workspace. - `workspace_denied_app` -- Returned when the org-installed app is denied for a workspace the install would add it to, by that workspace or by the org, so it can't be added there. - `invalid_client_id` -- Value passed for `client_id` was invalid. - `invalid_code` -- Value passed for `code` was invalid. - `invalid_grant_type` -- Value passed for `grant_type` was invalid. - `invalid_refresh_token` -- The given refresh token is invalid. - `no_scopes` -- Missing `scope` in the request. - `oauth_authorization_url_mismatch` -- The OAuth flow was initiated on an incorrect version of the authorization url. The flow must be initiated via /oauth/v2/authorize. - `preview_feature_not_available` -- Returned when the API method is not yet available on the team in context. - `user_email_unverified` -- The users email is unverified. - `pkce_not_allowed` -- The app is not allowed to use the PKCE flow. - `invalid_code_verifier` -- The code_verifier is invalid. See https://docs.slack.dev/reference/methods/oauth.v2.access */
365
368
  export const v2Access: API.OperationMethod<
366
369
  V2AccessRequest,
367
370
  V2AccessResponse,
@@ -370,7 +373,8 @@ export const v2Access: API.OperationMethod<
370
373
  > = /*@__PURE__*/ API.make(() => ({
371
374
  input: __S(48, __c3, 0) as any as S.Schema<V2AccessRequest>,
372
375
  output: __S(51, __c3, 3) as any as S.Schema<V2AccessResponse>,
373
- errors: [SlackError, SlackRateLimited],
376
+ errors: [],
377
+ serviceErrors: SlackServiceErrors,
374
378
  protocol: SlackProtocol,
375
379
  retry: Retry.Retry,
376
380
  telemetry: TELEMETRY,
@@ -387,7 +391,8 @@ export const v2Exchange: API.OperationMethod<
387
391
  > = /*@__PURE__*/ API.make(() => ({
388
392
  input: __S(80, __c5, 0) as any as S.Schema<V2ExchangeRequest>,
389
393
  output: __S(81, __c5, 1) as any as S.Schema<V2ExchangeResponse>,
390
- errors: [SlackError, SlackRateLimited],
394
+ errors: [],
395
+ serviceErrors: SlackServiceErrors,
391
396
  protocol: SlackProtocol,
392
397
  retry: Retry.Retry,
393
398
  telemetry: TELEMETRY,
@@ -395,7 +400,7 @@ export const v2Exchange: API.OperationMethod<
395
400
  }));
396
401
 
397
402
  export type V2UserAccessError = SlackOpError;
398
- /** Exchanges a temporary OAuth verifier code for a user access token. Rate limit tier: 5 Method-specific errors (the `error` slug on the SlackError): - `bad_client_secret` -- Value passed for `client_secret` was invalid. - `bad_redirect_uri` -- Value passed for `redirect_uri` did not match the `redirect_uri` in the original request. - `cannot_install_an_org_installed_app` -- Returned when the the org-installed app cannot be installed on a workspace. - `invalid_client_id` -- Value passed for `client_id` was invalid, or the `client_id` in the assertion is not a string. - `invalid_code` -- Value passed for `code` was invalid. - `invalid_grant_type` -- Value passed for `grant_type` was invalid. - `invalid_refresh_token` -- The given refresh token is invalid. - `invalid_resource` -- The `resource` in the assertion is malformed, or is not a resource tokens can be issued for. - `no_scopes` -- Missing `scope` in the request. - `no_user_scopes` -- Missing user `scope` in the auth request. - `not_implemented` -- Method not yet supported - `oauth_authorization_url_mismatch` -- The OAuth flow was initiated on an incorrect version of the authorization url. The flow must be initiated via /oauth/v2/authorize . - `preview_feature_not_available` -- Returned when the API method is not yet available on the team in context. - `user_email_unverified` -- The users email is unverified - `app_not_admin_approved` -- The app has not been approved by an org admin, so no tokens can be issued for this user. Ask an org admin to approve the app before requesting a token with the `urn:ietf:params:oauth:grant-type:jwt-bearer` grant. - `app_not_org_installed` -- The app is not installed at the organization level. Using the `urn:ietf:params:oauth:grant-type:jwt-bearer` grant type requires org level app installs. - `client_id_mismatch` -- Value passed for `client_id` did not match the `client_id` in the assertion. - `ema_disabled` -- Enterprise-managed auth is disabled. - `ema_issuer_mismatch` -- The issuer in the assertion did not match the issuer configured for enterprise-managed auth. - `invalid_audience` -- The audience in the assertion is not one this token endpoint supports. - `missing_scope` -- Missing `scope` in the assertion. The identity assertion JWT must carry a space-delimited `scope` claim. - `no_app_scopes_requested` -- None of the scopes requested in the identity assertion are configured on the app. Request only scopes the app already declares. - `no_approved_scopes_requested` -- The app is approved by org admins, but none of the requested scopes are approved ones. Ask an org admin to approve the requested scopes. - `no_assertion` -- Missing `assertion` in the request. - `user_not_authenticated` -- The user has never authenticated via single sign-on. - `no_idp_config_for_entity_id` -- No Enterprise-Managed Authorization (cross-app access) configuration is bound to the identity provider's SAML EntityID carried in the assertion's `sub_id`. An org admin must configure External Identity / cross-app access for that identity provider before requesting a token with the `urn:ietf:params:oauth:grant-type:jwt-bearer` grant. - `ema_tenant_mismatch` -- The `aud_tenant` in an assertion without a `sub_id` is missing, or is not the ID of the organization or workspace whose identity provider issued it. - `invalid_aud_tenant` -- The `aud_tenant` in the assertion is not a string. It must be the ID of the organization or workspace whose identity provider issued the assertion. - `invalid_email` -- The `email` in the assertion is not a string. - `invalid_issuer` -- The `iss` in the assertion is not a string. It must be the issuer URL of the identity provider that issued the assertion. - `invalid_jti` -- The `jti` in the assertion is not a string. It must be a unique identifier for the assertion. - `invalid_scope` -- The `scope` in the assertion is not a string. It must be a space-delimited list of scopes. - `invalid_sub` -- The `sub` in the assertion is not a string. - `invalid_sub_id_format` -- The `format` of the `sub_id` in the assertion is not a string. The only supported format is `saml-nameid`. - `missing_audience` -- Missing `aud` in the assertion. It must name this token endpoint as an audience. - `missing_client_id` -- Missing `client_id` in the assertion. It must match the `client_id` of the app requesting the token. See https://docs.slack.dev/reference/methods/oauth.v2.user.access */
403
+ /** Exchanges a temporary OAuth verifier code for a user access token. Rate limit tier: 5 Method-specific errors (the `error` slug on the SlackError): - `bad_client_secret` -- Value passed for `client_secret` was invalid. - `bad_redirect_uri` -- Value passed for `redirect_uri` did not match the `redirect_uri` in the original request. - `cannot_install_an_org_installed_app` -- Returned when the the org-installed app cannot be installed on a workspace. - `workspace_denied_app` -- Returned when the org-installed app is denied for a workspace the install would add it to, by that workspace or by the org, so it can't be added there. - `invalid_client_id` -- Value passed for `client_id` was invalid, or the `client_id` in the assertion is not a string. - `invalid_code` -- Value passed for `code` was invalid. - `invalid_grant_type` -- Value passed for `grant_type` was invalid. - `invalid_refresh_token` -- The given refresh token is invalid. - `invalid_resource` -- The `resource` in the assertion is malformed, or is not a resource tokens can be issued for. - `no_scopes` -- Missing `scope` in the request. - `no_user_scopes` -- Missing user `scope` in the auth request. - `not_implemented` -- Method not yet supported - `oauth_authorization_url_mismatch` -- The OAuth flow was initiated on an incorrect version of the authorization url. The flow must be initiated via /oauth/v2/authorize . - `preview_feature_not_available` -- Returned when the API method is not yet available on the team in context. - `user_email_unverified` -- The users email is unverified - `app_not_admin_approved` -- The app has not been approved by an org admin, so no tokens can be issued for this user. Ask an org admin to approve the app before requesting a token with the `urn:ietf:params:oauth:grant-type:jwt-bearer` grant. - `app_not_org_installed` -- The app is not installed at the organization level. Using the `urn:ietf:params:oauth:grant-type:jwt-bearer` grant type requires org level app installs. - `client_id_mismatch` -- Value passed for `client_id` did not match the `client_id` in the assertion. - `ema_disabled` -- Enterprise-managed auth is disabled. - `ema_issuer_mismatch` -- The issuer in the assertion did not match the issuer configured for enterprise-managed auth. - `invalid_audience` -- The audience in the assertion is not one this token endpoint supports. - `missing_scope` -- Missing `scope` in the assertion. The identity assertion JWT must carry a space-delimited `scope` claim. - `missing_sub_id` -- Missing `sub_id` in the assertion. It must identify the user with a `sub_id` in the `saml-nameid` format, unless it carries an `aud_tenant` for an organization set up to accept assertions without one. - `no_app_scopes_requested` -- None of the scopes requested in the identity assertion are configured on the app. Request only scopes the app already declares. - `no_approved_scopes_requested` -- The app is approved by org admins, but none of the requested scopes are approved ones. Ask an org admin to approve the requested scopes. - `no_assertion` -- Missing `assertion` in the request. - `user_not_authenticated` -- The user has never authenticated via single sign-on. - `no_idp_config_for_entity_id` -- No Enterprise-Managed Authorization (cross-app access) configuration is bound to the identity provider's SAML EntityID carried in the assertion's `sub_id`. An org admin must configure External Identity / cross-app access for that identity provider before requesting a token with the `urn:ietf:params:oauth:grant-type:jwt-bearer` grant. - `ema_tenant_mismatch` -- The `aud_tenant` in an assertion without a `sub_id` is missing, or is not the ID of the organization or workspace whose identity provider issued it. - `invalid_aud_tenant` -- The `aud_tenant` in the assertion is not a string. It must be the ID of the organization or workspace whose identity provider issued the assertion. - `invalid_email` -- The `email` in the assertion is not a string. - `invalid_issuer` -- The `iss` in the assertion is not a string. It must be the issuer URL of the identity provider that issued the assertion. - `invalid_jti` -- The `jti` in the assertion is not a string. It must be a unique identifier for the assertion. - `invalid_scope` -- The `scope` in the assertion is not a string. It must be a space-delimited list of scopes. - `invalid_sub` -- The `sub` in the assertion is not a string. - `invalid_sub_id_format` -- The `format` of the `sub_id` in the assertion is not a string. The only supported format is `saml-nameid`. - `missing_audience` -- Missing `aud` in the assertion. It must name this token endpoint as an audience. - `missing_client_id` -- Missing `client_id` in the assertion. It must match the `client_id` of the app requesting the token. - `expired_token` -- The assertion has expired: its `exp` is in the past. Request a new assertion from the identity provider. - `idp_keys_unavailable` -- Slack could not fetch the OpenID Connect discovery document (`/.well-known/openid-configuration`) or the `jwks_uri` of the identity provider named by the `iss` in the assertion: the request failed or returned an HTTP error status. Retry, and if it keeps failing, check that both are served over HTTPS. - `invalid_exp` -- The `exp` in the assertion is not an integer. It must be the assertion's expiration time, in seconds since the epoch. - `invalid_header_encoding` -- The header of the assertion is not base64url-encoded JSON. - `invalid_jwks` -- The identity provider's `jwks_uri` did not return a JSON Web Key Set with a `keys` array. - `invalid_jwt_format` -- Value passed for `assertion` is not a JWT in compact serialization. It must have exactly three segments separated by `.`. - `invalid_openid_provider_metadata` -- The identity provider's OpenID Connect discovery document (`/.well-known/openid-configuration`) is not JSON with string `issuer` and `jwks_uri` fields. - `invalid_payload_encoding` -- The payload of the assertion is not base64url-encoded JSON. - `invalid_signature` -- The signature of the assertion does not verify against the identity provider's signing key named by its `kid`. - `invalid_sub_id` -- The `sub_id` in the assertion is not a JSON object. It must identify the user in the `saml-nameid` format. - `invalid_token` -- The assertion could not be verified. For example, its header has no `alg` or `kid`, its `alg` is not supported or doesn't match the signing key, or its `nbf`, `iat`, or `exp` is not a number. - `invalid_typ_header` -- The `typ` in the header of the assertion is not `oauth-id-jag+jwt`. - `invalid_code_verifier` -- The code_verifier is invalid. - `jwks_uri_not_https` -- The `jwks_uri` in the identity provider's OpenID Connect discovery document is not an `https` URL. - `jwt_already_used` -- The assertion has already been exchanged for a token. An assertion can be used only once: request a new one, with a new `jti`, from the identity provider. - `jwt_expired` -- The assertion was presented before and has since expired. Request a new assertion, with a new `jti`, from the identity provider. - `missing_email` -- Missing `email` in an assertion without a `sub_id`, or it is empty. It must be the email address of the user the token is for. - `missing_exp` -- Missing `exp` in the assertion. It must be the assertion's expiration time, in seconds since the epoch. - `missing_issuer` -- Missing `iss` in the assertion. It must be the issuer URL of the identity provider that issued the assertion. - `missing_jti` -- Missing `jti` in the assertion, or it is empty. It must be a unique identifier for the assertion. - `missing_sub` -- Missing `sub` in the assertion, or it is empty. - `missing_sub_id_format` -- Missing `format` in the `sub_id` of the assertion. The only supported format is `saml-nameid`. - `missing_sub_id_issuer` -- Missing `issuer` in the `sub_id` of the assertion, or it is not a string. It must be the SAML EntityID of the identity provider. - `missing_sub_id_nameid` -- Missing `nameid` in the `sub_id` of the assertion, or it is not a string. It must be the user's SAML NameID. - `missing_typ_header` -- Missing `typ` in the header of the assertion. It must be `oauth-id-jag+jwt`. - `openid_provider_issuer_mismatch` -- The `issuer` in the identity provider's OpenID Connect discovery document does not exactly match the `iss` in the assertion. - `pkce_not_allowed` -- The app is not allowed to use the PKCE flow. - `token_not_yet_valid` -- The assertion is not valid yet: its `nbf` or `iat` is in the future. Check the identity provider's clock. - `unknown_kid` -- The `kid` in the header of the assertion does not match any signing key published at the identity provider's `jwks_uri`. - `unknown_saml_issuer_for_team` -- The `issuer` in the `sub_id` of the assertion is not a SAML identity provider configured for the organization or workspace. - `unsupported_sub_id_format` -- The `format` of the `sub_id` in the assertion is not supported. The only supported format is `saml-nameid`. - `user_not_found` -- No active user in the organization or workspace matches the user the assertion identifies by its `sub_id` NameID or, without a `sub_id`, its `email`. External guests can't be identified this way. - `well_known_url_not_https` -- The `iss` in the assertion is not an `https` URL, so the identity provider's OpenID Connect discovery document can't be fetched. See https://docs.slack.dev/reference/methods/oauth.v2.user.access */
399
404
  export const v2UserAccess: API.OperationMethod<
400
405
  V2UserAccessRequest,
401
406
  V2UserAccessResponse,
@@ -404,7 +409,8 @@ export const v2UserAccess: API.OperationMethod<
404
409
  > = /*@__PURE__*/ API.make(() => ({
405
410
  input: __S(96, __c6, 0) as any as S.Schema<V2UserAccessRequest>,
406
411
  output: __S(97, __c6, 1) as any as S.Schema<V2UserAccessResponse>,
407
- errors: [SlackError, SlackRateLimited],
412
+ errors: [],
413
+ serviceErrors: SlackServiceErrors,
408
414
  protocol: SlackProtocol,
409
415
  retry: Retry.Retry,
410
416
  telemetry: TELEMETRY,
@@ -432,7 +438,7 @@ function __c0(j: number): any {
432
438
  return S.suspend(() =>
433
439
  S.Struct({
434
440
  ok: S.Boolean,
435
- new_token: S.String,
441
+ new_token: S.String.pipe(T.SensitiveValue({})),
436
442
  }),
437
443
  ).annotate({ identifier: "BeginShortTokenRotationResponse" });
438
444
  }
@@ -444,7 +450,7 @@ function __c1(j: number): any {
444
450
  S.Struct({
445
451
  client_id: S.String,
446
452
  client_secret: S.String.pipe(T.SensitiveValue({})),
447
- new_token: S.String,
453
+ new_token: S.String.pipe(T.SensitiveValue({})),
448
454
  }).pipe(
449
455
  T.Http({
450
456
  method: "POST",
@@ -458,7 +464,7 @@ function __c1(j: number): any {
458
464
  return S.suspend(() =>
459
465
  S.Struct({
460
466
  ok: S.Boolean,
461
- token: S.String,
467
+ token: S.String.pipe(T.SensitiveValue({})),
462
468
  }),
463
469
  ).annotate({ identifier: "CompleteShortTokenRotationResponse" });
464
470
  }
@@ -506,7 +512,7 @@ function __c2(j: number): any {
506
512
  return S.suspend(() =>
507
513
  S.Struct({
508
514
  bot_user_id: S.optional(S.String),
509
- bot_access_token: S.optional(S.String),
515
+ bot_access_token: S.optional(S.String.pipe(T.SensitiveValue({}))),
510
516
  scope: S.optional(S.String),
511
517
  }),
512
518
  ).annotate({ identifier: "OauthAccessResponseBot" });
@@ -3,7 +3,7 @@ import * as API from "@distilled.cloud/core/api";
3
3
  import * as S from "@distilled.cloud/core/schema-lite";
4
4
  import * as __L from "@distilled.cloud/core/schema-lite";
5
5
  import type * as Redacted from "effect/Redacted";
6
- import { SlackError, SlackRateLimited } from "../errors.ts";
6
+ import { SlackServiceErrors } from "../errors.ts";
7
7
  import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
8
8
  import * as Retry from "../retry.ts";
9
9
  import * as T from "../traits.ts";
@@ -49,7 +49,7 @@ export interface ConnectTokenResponse {
49
49
  ok: boolean;
50
50
  access_token: string | Redacted.Redacted<string>;
51
51
  token_type: ConnectTokenResponseTokenType;
52
- id_token?: string | undefined;
52
+ id_token?: string | Redacted.Redacted<string> | undefined;
53
53
  state?: string | undefined;
54
54
  /** Time until this credential expires, if it expires at all */
55
55
  expires_in?: number | undefined;
@@ -93,7 +93,7 @@ export interface UserInfoResponse {
93
93
  https___slack_com_team_image_default?: boolean | undefined;
94
94
  }
95
95
  export type ConnectTokenError = SlackOpError;
96
- /** Exchanges a temporary OAuth verifier code for an access token for Sign in with Slack. Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `bad_client_secret` -- The value passed for `client_secret` was invalid. - `bad_redirect_uri` -- The value passed for `redirect_uri` did not match the `redirect_uri` in the original request. - `cannot_install_an_org_installed_app` -- An org-installed app cannot be installed on a workspace. - `invalid_client` -- Client authentication failed (unknown `client_id` or bad `client_secret`). - `invalid_client_id` -- The value passed for `client_id` was invalid. - `invalid_code` -- The value passed for `code` was invalid. - `invalid_grant` -- The authorization code is invalid, expired, revoked, or the PKCE `code_verifier` does not match. - `invalid_grant_type` -- The value passed for `grant_type` was invalid. - `invalid_refresh_token` -- The given refresh token is invalid. - `invalid_request` -- The request is missing a required parameter or includes an invalid parameter value. - `oauth_authorization_url_mismatch` -- The OAuth flow was initiated on an incorrect version of the authorization URL. The flow must be initiated via /openid/connect/authorize . - `preview_feature_not_available` -- The API method is not yet available on the team. - `unsupported_grant_type` -- The `grant_type` is not supported by this endpoint. See https://docs.slack.dev/reference/methods/openid.connect.token */
96
+ /** Exchanges a temporary OAuth verifier code for an access token for Sign in with Slack. Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `bad_client_secret` -- The value passed for `client_secret` was invalid. - `bad_redirect_uri` -- The value passed for `redirect_uri` did not match the `redirect_uri` in the original request. - `cannot_install_an_org_installed_app` -- An org-installed app cannot be installed on a workspace. - `workspace_denied_app` -- Returned when the org-installed app is denied for a workspace the install would add it to, by that workspace or by the org, so it can't be added there. - `invalid_client` -- Client authentication failed (unknown `client_id` or bad `client_secret`). - `invalid_client_id` -- The value passed for `client_id` was invalid. - `invalid_code` -- The value passed for `code` was invalid. - `invalid_grant` -- The authorization code is invalid, expired, revoked, or the PKCE `code_verifier` does not match. - `invalid_grant_type` -- The value passed for `grant_type` was invalid. - `invalid_refresh_token` -- The given refresh token is invalid. - `invalid_request` -- The request is missing a required parameter or includes an invalid parameter value. - `oauth_authorization_url_mismatch` -- The OAuth flow was initiated on an incorrect version of the authorization URL. The flow must be initiated via /openid/connect/authorize . - `preview_feature_not_available` -- The API method is not yet available on the team. - `unsupported_grant_type` -- The `grant_type` is not supported by this endpoint. See https://docs.slack.dev/reference/methods/openid.connect.token */
97
97
  export const connectToken: API.OperationMethod<
98
98
  ConnectTokenRequest,
99
99
  ConnectTokenResponse,
@@ -102,7 +102,8 @@ export const connectToken: API.OperationMethod<
102
102
  > = /*@__PURE__*/ API.make(() => ({
103
103
  input: __S(0, __c0, 0) as any as S.Schema<ConnectTokenRequest>,
104
104
  output: __S(1, __c0, 1) as any as S.Schema<ConnectTokenResponse>,
105
- errors: [SlackError, SlackRateLimited],
105
+ errors: [],
106
+ serviceErrors: SlackServiceErrors,
106
107
  protocol: SlackProtocol,
107
108
  retry: Retry.Retry,
108
109
  telemetry: TELEMETRY,
@@ -119,7 +120,8 @@ export const userInfo: API.OperationMethod<
119
120
  > = /*@__PURE__*/ API.make(() => ({
120
121
  input: __S(2, __c1, 0) as any as S.Schema<UserInfoRequest>,
121
122
  output: __S(3, __c1, 1) as any as S.Schema<UserInfoResponse>,
122
- errors: [SlackError, SlackRateLimited],
123
+ errors: [],
124
+ serviceErrors: SlackServiceErrors,
123
125
  protocol: SlackProtocol,
124
126
  retry: Retry.Retry,
125
127
  telemetry: TELEMETRY,
@@ -154,7 +156,7 @@ function __c0(j: number): any {
154
156
  ok: S.Boolean,
155
157
  access_token: S.String.pipe(T.SensitiveValue({})),
156
158
  token_type: S.String,
157
- id_token: S.optional(S.String),
159
+ id_token: S.optional(S.String.pipe(T.SensitiveValue({}))),
158
160
  state: S.optional(S.String),
159
161
  expires_in: S.optional(S.Number),
160
162
  refresh_token: S.optional(S.String.pipe(T.SensitiveValue({}))),
@@ -2,7 +2,7 @@ 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
3
  import * as S from "@distilled.cloud/core/schema-lite";
4
4
  import * as __L from "@distilled.cloud/core/schema-lite";
5
- import { SlackError, SlackRateLimited } from "../errors.ts";
5
+ import { SlackServiceErrors } from "../errors.ts";
6
6
  import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
7
7
  import * as Retry from "../retry.ts";
8
8
  import * as T from "../traits.ts";
@@ -75,7 +75,8 @@ export const addPin: API.OperationMethod<
75
75
  > = /*@__PURE__*/ API.make(() => ({
76
76
  input: __S(0, __c0, 0) as any as S.Schema<AddPinRequest>,
77
77
  output: __S(4, __c1, 0) as any as S.Schema<AddPinResponse>,
78
- errors: [SlackError, SlackRateLimited],
78
+ errors: [],
79
+ serviceErrors: SlackServiceErrors,
79
80
  protocol: SlackProtocol,
80
81
  retry: Retry.Retry,
81
82
  telemetry: TELEMETRY,
@@ -92,7 +93,8 @@ export const listPins: API.OperationMethod<
92
93
  > = /*@__PURE__*/ API.make(() => ({
93
94
  input: __S(8, __c2, 0) as any as S.Schema<ListPinsRequest>,
94
95
  output: __S(11, __c2, 3) as any as S.Schema<ListPinsResponse>,
95
- errors: [SlackError, SlackRateLimited],
96
+ errors: [],
97
+ serviceErrors: SlackServiceErrors,
96
98
  protocol: SlackProtocol,
97
99
  retry: Retry.Retry,
98
100
  telemetry: TELEMETRY,
@@ -109,7 +111,8 @@ export const removePin: API.OperationMethod<
109
111
  > = /*@__PURE__*/ API.make(() => ({
110
112
  input: __S(12, __c3, 0) as any as S.Schema<RemovePinRequest>,
111
113
  output: __S(4, __c1, 0) as any as S.Schema<RemovePinResponse>,
112
- errors: [SlackError, SlackRateLimited],
114
+ errors: [],
115
+ serviceErrors: SlackServiceErrors,
113
116
  protocol: SlackProtocol,
114
117
  retry: Retry.Retry,
115
118
  telemetry: TELEMETRY,
@@ -2,7 +2,7 @@ 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
3
  import * as S from "@distilled.cloud/core/schema-lite";
4
4
  import * as __L from "@distilled.cloud/core/schema-lite";
5
- import { SlackError, SlackRateLimited } from "../errors.ts";
5
+ import { SlackServiceErrors } from "../errors.ts";
6
6
  import { slackPaginate } from "../pagination.ts";
7
7
  import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
8
8
  import * as Retry from "../retry.ts";
@@ -113,7 +113,8 @@ export const addReaction: API.OperationMethod<
113
113
  > = /*@__PURE__*/ API.make(() => ({
114
114
  input: __S(0, __c0, 0) as any as S.Schema<AddReactionRequest>,
115
115
  output: __S(8, __c1, 0) as any as S.Schema<AddReactionResponse>,
116
- errors: [SlackError, SlackRateLimited],
116
+ errors: [],
117
+ serviceErrors: SlackServiceErrors,
117
118
  protocol: SlackProtocol,
118
119
  retry: Retry.Retry,
119
120
  telemetry: TELEMETRY,
@@ -130,7 +131,8 @@ export const getReaction: API.OperationMethod<
130
131
  > = /*@__PURE__*/ API.make(() => ({
131
132
  input: __S(16, __c2, 0) as any as S.Schema<GetReactionRequest>,
132
133
  output: __S(17, __c2, 1) as any as S.Schema<GetReactionResponse>,
133
- errors: [SlackError, SlackRateLimited],
134
+ errors: [],
135
+ serviceErrors: SlackServiceErrors,
134
136
  protocol: SlackProtocol,
135
137
  retry: Retry.Retry,
136
138
  telemetry: TELEMETRY,
@@ -149,7 +151,8 @@ export const listReactions: API.PaginatedOperationMethod<
149
151
  () => ({
150
152
  input: __S(24, __c3, 0) as any as S.Schema<ListReactionsRequest>,
151
153
  output: __S(28, __c3, 4) as any as S.Schema<ListReactionsResponse>,
152
- errors: [SlackError, SlackRateLimited],
154
+ errors: [],
155
+ serviceErrors: SlackServiceErrors,
153
156
  protocol: SlackProtocol,
154
157
  retry: Retry.Retry,
155
158
  telemetry: TELEMETRY,
@@ -175,7 +178,8 @@ export const removeReaction: API.OperationMethod<
175
178
  > = /*@__PURE__*/ API.make(() => ({
176
179
  input: __S(32, __c4, 0) as any as S.Schema<RemoveReactionRequest>,
177
180
  output: __S(8, __c1, 0) as any as S.Schema<RemoveReactionResponse>,
178
- errors: [SlackError, SlackRateLimited],
181
+ errors: [],
182
+ serviceErrors: SlackServiceErrors,
179
183
  protocol: SlackProtocol,
180
184
  retry: Retry.Retry,
181
185
  telemetry: TELEMETRY,
@@ -2,7 +2,7 @@ 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
3
  import * as S from "@distilled.cloud/core/schema-lite";
4
4
  import * as __L from "@distilled.cloud/core/schema-lite";
5
- import { SlackError, SlackRateLimited } from "../errors.ts";
5
+ import { SlackServiceErrors } from "../errors.ts";
6
6
  import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
7
7
  import * as Retry from "../retry.ts";
8
8
  import * as T from "../traits.ts";
@@ -92,7 +92,8 @@ export const addReminder: API.OperationMethod<
92
92
  > = /*@__PURE__*/ API.make(() => ({
93
93
  input: __S(0, __c0, 0) as any as S.Schema<AddReminderRequest>,
94
94
  output: __S(4, __c1, 0) as any as S.Schema<AddReminderResponse>,
95
- errors: [SlackError, SlackRateLimited],
95
+ errors: [],
96
+ serviceErrors: SlackServiceErrors,
96
97
  protocol: SlackProtocol,
97
98
  retry: Retry.Retry,
98
99
  telemetry: TELEMETRY,
@@ -109,7 +110,8 @@ export const completeReminder: API.OperationMethod<
109
110
  > = /*@__PURE__*/ API.make(() => ({
110
111
  input: __S(8, __c2, 0) as any as S.Schema<CompleteReminderRequest>,
111
112
  output: __S(12, __c3, 0) as any as S.Schema<CompleteReminderResponse>,
112
- errors: [SlackError, SlackRateLimited],
113
+ errors: [],
114
+ serviceErrors: SlackServiceErrors,
113
115
  protocol: SlackProtocol,
114
116
  retry: Retry.Retry,
115
117
  telemetry: TELEMETRY,
@@ -126,7 +128,8 @@ export const deleteReminder: API.OperationMethod<
126
128
  > = /*@__PURE__*/ API.make(() => ({
127
129
  input: __S(16, __c4, 0) as any as S.Schema<DeleteReminderRequest>,
128
130
  output: __S(12, __c3, 0) as any as S.Schema<DeleteReminderResponse>,
129
- errors: [SlackError, SlackRateLimited],
131
+ errors: [],
132
+ serviceErrors: SlackServiceErrors,
130
133
  protocol: SlackProtocol,
131
134
  retry: Retry.Retry,
132
135
  telemetry: TELEMETRY,
@@ -143,7 +146,8 @@ export const listReminders: API.OperationMethod<
143
146
  > = /*@__PURE__*/ API.make(() => ({
144
147
  input: __S(20, __c5, 0) as any as S.Schema<ListRemindersRequest>,
145
148
  output: __S(22, __c5, 2) as any as S.Schema<ListRemindersResponse>,
146
- errors: [SlackError, SlackRateLimited],
149
+ errors: [],
150
+ serviceErrors: SlackServiceErrors,
147
151
  protocol: SlackProtocol,
148
152
  retry: Retry.Retry,
149
153
  telemetry: TELEMETRY,
@@ -160,7 +164,8 @@ export const remindersInfo: API.OperationMethod<
160
164
  > = /*@__PURE__*/ API.make(() => ({
161
165
  input: __S(24, __c6, 0) as any as S.Schema<RemindersInfoRequest>,
162
166
  output: __S(4, __c1, 0) as any as S.Schema<RemindersInfoResponse>,
163
- errors: [SlackError, SlackRateLimited],
167
+ errors: [],
168
+ serviceErrors: SlackServiceErrors,
164
169
  protocol: SlackProtocol,
165
170
  retry: Retry.Retry,
166
171
  telemetry: TELEMETRY,
@@ -2,7 +2,7 @@ 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
3
  import * as S from "@distilled.cloud/core/schema-lite";
4
4
  import * as __L from "@distilled.cloud/core/schema-lite";
5
- import { SlackError, SlackRateLimited } from "../errors.ts";
5
+ import { SlackServiceErrors } from "../errors.ts";
6
6
  import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
7
7
  import * as Retry from "../retry.ts";
8
8
  import * as T from "../traits.ts";
@@ -83,7 +83,8 @@ export const connectRtm: API.OperationMethod<
83
83
  > = /*@__PURE__*/ API.make(() => ({
84
84
  input: __S(0, __c0, 0) as any as S.Schema<ConnectRtmRequest>,
85
85
  output: __S(6, __c1, 2) as any as S.Schema<ConnectRtmResponse>,
86
- errors: [SlackError, SlackRateLimited],
86
+ errors: [],
87
+ serviceErrors: SlackServiceErrors,
87
88
  protocol: SlackProtocol,
88
89
  retry: Retry.Retry,
89
90
  telemetry: TELEMETRY,
@@ -100,7 +101,8 @@ export const startRtm: API.OperationMethod<
100
101
  > = /*@__PURE__*/ API.make(() => ({
101
102
  input: __S(8, __c2, 0) as any as S.Schema<StartRtmRequest>,
102
103
  output: __S(6, __c1, 2) as any as S.Schema<StartRtmResponse>,
103
- errors: [SlackError, SlackRateLimited],
104
+ errors: [],
105
+ serviceErrors: SlackServiceErrors,
104
106
  protocol: SlackProtocol,
105
107
  retry: Retry.Retry,
106
108
  telemetry: TELEMETRY,