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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. package/lib/.lazy.json +1 -0
  2. package/lib/_bundle/lazy.js +4 -0
  3. package/lib/_bundle/sdk.js +2 -0
  4. package/lib/_bundle/sdk.js.map +1 -0
  5. package/lib/credentials.d.ts +1 -1
  6. package/lib/credentials.d.ts.map +1 -1
  7. package/lib/credentials.js +1 -53
  8. package/lib/errors.d.ts +31 -31
  9. package/lib/errors.d.ts.map +1 -1
  10. package/lib/errors.js +1 -59
  11. package/lib/index.d.ts +1 -1
  12. package/lib/index.js +0 -10
  13. package/lib/index.lazy.js +7 -0
  14. package/lib/pagination.d.ts +2 -2
  15. package/lib/pagination.js +1 -31
  16. package/lib/protocol.d.ts.map +1 -1
  17. package/lib/protocol.js +1 -231
  18. package/lib/retry.d.ts +2 -2
  19. package/lib/retry.d.ts.map +1 -1
  20. package/lib/retry.js +1 -45
  21. package/lib/services/admin.d.ts +123 -575
  22. package/lib/services/admin.d.ts.map +1 -1
  23. package/lib/services/admin.js +141 -2884
  24. package/lib/services/admin.js.map +1 -1
  25. package/lib/services/agents.d.ts +13 -55
  26. package/lib/services/agents.d.ts.map +1 -1
  27. package/lib/services/agents.js +1 -314
  28. package/lib/services/agents.js.map +1 -1
  29. package/lib/services/api.d.ts +0 -4
  30. package/lib/services/api.d.ts.map +1 -1
  31. package/lib/services/api.js +1 -23
  32. package/lib/services/api.js.map +1 -1
  33. package/lib/services/apps.d.ts +25 -106
  34. package/lib/services/apps.d.ts.map +1 -1
  35. package/lib/services/apps.js +35 -515
  36. package/lib/services/apps.js.map +1 -1
  37. package/lib/services/assistant.d.ts +6 -40
  38. package/lib/services/assistant.d.ts.map +1 -1
  39. package/lib/services/assistant.js +1 -209
  40. package/lib/services/assistant.js.map +1 -1
  41. package/lib/services/auth.d.ts +4 -15
  42. package/lib/services/auth.d.ts.map +1 -1
  43. package/lib/services/auth.js +1 -96
  44. package/lib/services/auth.js.map +1 -1
  45. package/lib/services/blocks.d.ts +1 -7
  46. package/lib/services/blocks.d.ts.map +1 -1
  47. package/lib/services/blocks.js +1 -26
  48. package/lib/services/blocks.js.map +1 -1
  49. package/lib/services/bookmarks.d.ts +4 -15
  50. package/lib/services/bookmarks.d.ts.map +1 -1
  51. package/lib/services/bookmarks.js +1 -81
  52. package/lib/services/bookmarks.js.map +1 -1
  53. package/lib/services/bots.d.ts +1 -9
  54. package/lib/services/bots.d.ts.map +1 -1
  55. package/lib/services/bots.js +1 -59
  56. package/lib/services/bots.js.map +1 -1
  57. package/lib/services/calls.d.ts +6 -22
  58. package/lib/services/calls.d.ts.map +1 -1
  59. package/lib/services/calls.js +1 -115
  60. package/lib/services/calls.js.map +1 -1
  61. package/lib/services/canvases.d.ts +7 -35
  62. package/lib/services/canvases.d.ts.map +1 -1
  63. package/lib/services/canvases.js +1 -140
  64. package/lib/services/canvases.js.map +1 -1
  65. package/lib/services/chat.d.ts +14 -83
  66. package/lib/services/chat.d.ts.map +1 -1
  67. package/lib/services/chat.js +1 -387
  68. package/lib/services/chat.js.map +1 -1
  69. package/lib/services/conversations.d.ts +31 -116
  70. package/lib/services/conversations.d.ts.map +1 -1
  71. package/lib/services/conversations.js +40 -696
  72. package/lib/services/conversations.js.map +1 -1
  73. package/lib/services/dialog.d.ts +1 -4
  74. package/lib/services/dialog.d.ts.map +1 -1
  75. package/lib/services/dialog.js +1 -22
  76. package/lib/services/dialog.js.map +1 -1
  77. package/lib/services/dnd.d.ts +5 -17
  78. package/lib/services/dnd.d.ts.map +1 -1
  79. package/lib/services/dnd.js +1 -96
  80. package/lib/services/dnd.js.map +1 -1
  81. package/lib/services/emoji.d.ts +1 -8
  82. package/lib/services/emoji.d.ts.map +1 -1
  83. package/lib/services/emoji.js +1 -34
  84. package/lib/services/emoji.js.map +1 -1
  85. package/lib/services/entity.d.ts +4 -16
  86. package/lib/services/entity.d.ts.map +1 -1
  87. package/lib/services/entity.js +1 -76
  88. package/lib/services/entity.js.map +1 -1
  89. package/lib/services/files.d.ts +16 -80
  90. package/lib/services/files.d.ts.map +1 -1
  91. package/lib/services/files.js +1 -439
  92. package/lib/services/files.js.map +1 -1
  93. package/lib/services/functions.d.ts +8 -49
  94. package/lib/services/functions.d.ts.map +1 -1
  95. package/lib/services/functions.js +1 -208
  96. package/lib/services/functions.js.map +1 -1
  97. package/lib/services/index.js +0 -2
  98. package/lib/services/lists.d.ts +13 -55
  99. package/lib/services/lists.d.ts.map +1 -1
  100. package/lib/services/lists.js +1 -254
  101. package/lib/services/lists.js.map +1 -1
  102. package/lib/services/migration.d.ts +1 -7
  103. package/lib/services/migration.d.ts.map +1 -1
  104. package/lib/services/migration.js +1 -32
  105. package/lib/services/migration.js.map +1 -1
  106. package/lib/services/oauth.d.ts +7 -43
  107. package/lib/services/oauth.d.ts.map +1 -1
  108. package/lib/services/oauth.js +1 -294
  109. package/lib/services/oauth.js.map +1 -1
  110. package/lib/services/openid.d.ts +3 -10
  111. package/lib/services/openid.d.ts.map +1 -1
  112. package/lib/services/openid.js +1 -84
  113. package/lib/services/openid.js.map +1 -1
  114. package/lib/services/pins.d.ts +3 -13
  115. package/lib/services/pins.d.ts.map +1 -1
  116. package/lib/services/pins.js +1 -66
  117. package/lib/services/pins.js.map +1 -1
  118. package/lib/services/reactions.d.ts +5 -17
  119. package/lib/services/reactions.d.ts.map +1 -1
  120. package/lib/services/reactions.js +1 -102
  121. package/lib/services/reactions.js.map +1 -1
  122. package/lib/services/reminders.d.ts +5 -17
  123. package/lib/services/reminders.d.ts.map +1 -1
  124. package/lib/services/reminders.js +1 -88
  125. package/lib/services/reminders.js.map +1 -1
  126. package/lib/services/rtm.d.ts +2 -11
  127. package/lib/services/rtm.d.ts.map +1 -1
  128. package/lib/services/rtm.js +1 -61
  129. package/lib/services/rtm.js.map +1 -1
  130. package/lib/services/search.d.ts +4 -35
  131. package/lib/services/search.d.ts.map +1 -1
  132. package/lib/services/search.js +1 -172
  133. package/lib/services/search.js.map +1 -1
  134. package/lib/services/stars.d.ts +4 -26
  135. package/lib/services/stars.d.ts.map +1 -1
  136. package/lib/services/stars.js +1 -134
  137. package/lib/services/stars.js.map +1 -1
  138. package/lib/services/team.d.ts +11 -63
  139. package/lib/services/team.d.ts.map +1 -1
  140. package/lib/services/team.js +1 -295
  141. package/lib/services/team.js.map +1 -1
  142. package/lib/services/tooling.d.ts +2 -5
  143. package/lib/services/tooling.d.ts.map +1 -1
  144. package/lib/services/tooling.js +1 -33
  145. package/lib/services/tooling.js.map +1 -1
  146. package/lib/services/usergroups.d.ts +7 -31
  147. package/lib/services/usergroups.d.ts.map +1 -1
  148. package/lib/services/usergroups.js +1 -151
  149. package/lib/services/usergroups.js.map +1 -1
  150. package/lib/services/users.d.ts +14 -48
  151. package/lib/services/users.d.ts.map +1 -1
  152. package/lib/services/users.js +1 -255
  153. package/lib/services/users.js.map +1 -1
  154. package/lib/services/views.d.ts +4 -14
  155. package/lib/services/views.d.ts.map +1 -1
  156. package/lib/services/views.js +1 -78
  157. package/lib/services/views.js.map +1 -1
  158. package/lib/services/workflows.d.ts +8 -51
  159. package/lib/services/workflows.d.ts.map +1 -1
  160. package/lib/services/workflows.js +1 -193
  161. package/lib/services/workflows.js.map +1 -1
  162. package/lib/services.lazy/admin.js +3 -0
  163. package/lib/services.lazy/agents.js +1 -0
  164. package/lib/services.lazy/api.js +1 -0
  165. package/lib/services.lazy/apps.js +3 -0
  166. package/lib/services.lazy/assistant.js +1 -0
  167. package/lib/services.lazy/auth.js +1 -0
  168. package/lib/services.lazy/blocks.js +1 -0
  169. package/lib/services.lazy/bookmarks.js +1 -0
  170. package/lib/services.lazy/bots.js +1 -0
  171. package/lib/services.lazy/calls.js +1 -0
  172. package/lib/services.lazy/canvases.js +1 -0
  173. package/lib/services.lazy/chat.js +1 -0
  174. package/lib/services.lazy/conversations.js +3 -0
  175. package/lib/services.lazy/dialog.js +1 -0
  176. package/lib/services.lazy/dnd.js +1 -0
  177. package/lib/services.lazy/emoji.js +1 -0
  178. package/lib/services.lazy/entity.js +1 -0
  179. package/lib/services.lazy/files.js +1 -0
  180. package/lib/services.lazy/functions.js +1 -0
  181. package/lib/services.lazy/index.js +3 -0
  182. package/lib/services.lazy/lists.js +1 -0
  183. package/lib/services.lazy/migration.js +1 -0
  184. package/lib/services.lazy/oauth.js +1 -0
  185. package/lib/services.lazy/openid.js +1 -0
  186. package/lib/services.lazy/pins.js +1 -0
  187. package/lib/services.lazy/reactions.js +1 -0
  188. package/lib/services.lazy/reminders.js +1 -0
  189. package/lib/services.lazy/rtm.js +1 -0
  190. package/lib/services.lazy/search.js +1 -0
  191. package/lib/services.lazy/stars.js +1 -0
  192. package/lib/services.lazy/team.js +1 -0
  193. package/lib/services.lazy/tooling.js +1 -0
  194. package/lib/services.lazy/usergroups.js +1 -0
  195. package/lib/services.lazy/users.js +1 -0
  196. package/lib/services.lazy/views.js +1 -0
  197. package/lib/services.lazy/workflows.js +1 -0
  198. package/lib/traits.d.ts +1 -1
  199. package/lib/traits.js +1 -12
  200. package/package.json +10 -8
  201. package/src/credentials.ts +20 -21
  202. package/src/errors.ts +31 -27
  203. package/src/index.ts +1 -1
  204. package/src/pagination.ts +2 -2
  205. package/src/protocol.ts +30 -29
  206. package/src/retry.ts +6 -6
  207. package/src/services/admin.ts +2717 -3451
  208. package/src/services/agents.ts +380 -370
  209. package/src/services/api.ts +31 -21
  210. package/src/services/apps.ts +569 -621
  211. package/src/services/assistant.ts +235 -270
  212. package/src/services/auth.ts +118 -100
  213. package/src/services/blocks.ts +33 -29
  214. package/src/services/bookmarks.ts +101 -83
  215. package/src/services/bots.ts +74 -67
  216. package/src/services/calls.ts +118 -124
  217. package/src/services/canvases.ts +171 -178
  218. package/src/services/chat.ts +428 -496
  219. package/src/services/conversations.ts +675 -761
  220. package/src/services/dialog.ts +30 -17
  221. package/src/services/dnd.ts +125 -99
  222. package/src/services/emoji.ts +46 -42
  223. package/src/services/entity.ts +94 -92
  224. package/src/services/files.ts +536 -531
  225. package/src/services/functions.ts +209 -274
  226. package/src/services/lists.ts +289 -304
  227. package/src/services/migration.ts +39 -37
  228. package/src/services/oauth.ts +345 -361
  229. package/src/services/openid.ts +137 -122
  230. package/src/services/pins.ts +83 -70
  231. package/src/services/reactions.ts +119 -103
  232. package/src/services/reminders.ts +112 -90
  233. package/src/services/rtm.ts +73 -65
  234. package/src/services/search.ts +193 -244
  235. package/src/services/stars.ts +101 -160
  236. package/src/services/team.ts +333 -369
  237. package/src/services/tooling.ts +43 -30
  238. package/src/services/usergroups.ts +175 -179
  239. package/src/services/users.ts +301 -268
  240. package/src/services/views.ts +85 -80
  241. package/src/services/workflows.ts +184 -269
  242. package/src/traits.ts +1 -1
  243. package/lib/credentials.js.map +0 -1
  244. package/lib/errors.js.map +0 -1
  245. package/lib/pagination.js.map +0 -1
  246. package/lib/protocol.js.map +0 -1
  247. package/lib/protocol.test.d.ts +0 -2
  248. package/lib/protocol.test.d.ts.map +0 -1
  249. package/lib/protocol.test.js +0 -288
  250. package/lib/protocol.test.js.map +0 -1
  251. package/lib/retry.js.map +0 -1
  252. package/lib/services/index.js.map +0 -1
  253. package/lib/traits.js.map +0 -1
  254. package/src/protocol.test.ts +0 -372
  255. /package/lib/{index.js.map → index.lazy.js.map} +0 -0
@@ -1,19 +1,18 @@
1
1
  import * as API from "@distilled.cloud/core/api";
2
2
  // AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
3
- import * as S from "@distilled.cloud/core/schema";
3
+ import * as S from "@distilled.cloud/core/schema-lite";
4
+ import * as __L from "@distilled.cloud/core/schema-lite";
4
5
  import { SlackError, SlackRateLimited } from "../errors.ts";
5
6
  import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
6
7
  import * as Retry from "../retry.ts";
7
8
  import * as T from "../traits.ts";
9
+ // Schema table, filled on first reach (see __S at the end).
10
+ const __s: any[] = [];
8
11
 
9
12
  export type { SlackOpError, SlackOpContext };
10
13
 
11
14
  /** The list of users to register as participants in the Call. [Read more on how to specify users here](/apis/web-api/using-the-calls-api#users). */
12
15
  export type AddCallRequestUsersList = Array<unknown>;
13
- export const AddCallRequestUsersList = /*@__PURE__*/ S.Array(
14
- S.Unknown,
15
- ) as any as S.Schema<AddCallRequestUsersList>;
16
-
17
16
  export interface AddCallRequest {
18
17
  /** An ID supplied by the 3rd-party Call provider. It must be unique across all Calls from that service. */
19
18
  external_unique_id: string;
@@ -32,142 +31,57 @@ export interface AddCallRequest {
32
31
  /** The list of users to register as participants in the Call. [Read more on how to specify users here](/apis/web-api/using-the-calls-api#users). */
33
32
  users?: AddCallRequestUsersList;
34
33
  }
35
- export const AddCallRequest = /*@__PURE__*/ S.suspend(() =>
36
- S.Struct({
37
- external_unique_id: S.String,
38
- external_display_id: S.optional(S.String),
39
- join_url: S.String,
40
- desktop_app_join_url: S.optional(S.String),
41
- date_start: S.optional(S.Number),
42
- title: S.optional(S.String),
43
- created_by: S.optional(S.String),
44
- users: S.optional(AddCallRequestUsersList),
45
- }).pipe(T.Http({ method: "POST", uri: "/calls.add", code: 200 })),
46
- ).annotate({ identifier: "AddCallRequest" }) as any as S.Schema<AddCallRequest>;
47
-
48
34
  export interface AddCallResponse {
49
35
  /** Always `true` (a failed call raises a typed error instead). */
50
36
  ok: boolean;
51
37
  call: unknown;
52
38
  }
53
- export const AddCallResponse = /*@__PURE__*/ S.suspend(() =>
54
- S.Struct({
55
- ok: S.Boolean,
56
- call: S.Unknown,
57
- }),
58
- ).annotate({ identifier: "AddCallResponse" }) as any as S.Schema<AddCallResponse>;
59
-
60
39
  /** The list of users to add as participants in the Call. [Read more on how to specify users here](/apis/web-api/using-the-calls-api#users). */
61
40
  export type AddParticipantRequestUsersList = Array<unknown>;
62
- export const AddParticipantRequestUsersList = /*@__PURE__*/ S.Array(
63
- S.Unknown,
64
- ) as any as S.Schema<AddParticipantRequestUsersList>;
65
-
66
41
  export interface AddParticipantRequest {
67
42
  /** `id` returned by the [`calls.add`](/reference/methods/calls.add) method. */
68
43
  id: string;
69
44
  /** The list of users to add as participants in the Call. [Read more on how to specify users here](/apis/web-api/using-the-calls-api#users). */
70
45
  users: AddParticipantRequestUsersList;
71
46
  }
72
- export const AddParticipantRequest = /*@__PURE__*/ S.suspend(() =>
73
- S.Struct({
74
- id: S.String,
75
- users: AddParticipantRequestUsersList,
76
- }).pipe(T.Http({ method: "POST", uri: "/calls.participants.add", code: 200 })),
77
- ).annotate({ identifier: "AddParticipantRequest" }) as any as S.Schema<AddParticipantRequest>;
78
-
79
47
  export interface AddParticipantResponse {
80
48
  /** Always `true` (a failed call raises a typed error instead). */
81
49
  ok: boolean;
82
50
  call: unknown;
83
51
  }
84
- export const AddParticipantResponse = /*@__PURE__*/ S.suspend(() =>
85
- S.Struct({
86
- ok: S.Boolean,
87
- call: S.Unknown,
88
- }),
89
- ).annotate({ identifier: "AddParticipantResponse" }) as any as S.Schema<AddParticipantResponse>;
90
-
91
52
  export interface CallsEndRequest {
92
53
  /** `id` returned when registering the call using the [`calls.add`](/reference/methods/calls.add) method. */
93
54
  id: string;
94
55
  /** Call duration in seconds */
95
56
  duration?: number;
96
57
  }
97
- export const CallsEndRequest = /*@__PURE__*/ S.suspend(() =>
98
- S.Struct({
99
- id: S.String,
100
- duration: S.optional(S.Number),
101
- }).pipe(T.Http({ method: "POST", uri: "/calls.end", code: 200 })),
102
- ).annotate({ identifier: "CallsEndRequest" }) as any as S.Schema<CallsEndRequest>;
103
-
104
58
  export interface CallsEndResponse {
105
59
  /** Always `true` (a failed call raises a typed error instead). */
106
60
  ok: boolean;
107
61
  call: unknown;
108
62
  }
109
- export const CallsEndResponse = /*@__PURE__*/ S.suspend(() =>
110
- S.Struct({
111
- ok: S.Boolean,
112
- call: S.Unknown,
113
- }),
114
- ).annotate({ identifier: "CallsEndResponse" }) as any as S.Schema<CallsEndResponse>;
115
-
116
63
  export interface CallsInfoRequest {
117
64
  /** `id` of the Call returned by the [`calls.add`](/reference/methods/calls.add) method. */
118
65
  id: string;
119
66
  }
120
- export const CallsInfoRequest = /*@__PURE__*/ S.suspend(() =>
121
- S.Struct({
122
- id: S.String,
123
- }).pipe(T.Http({ method: "POST", uri: "/calls.info", code: 200 })),
124
- ).annotate({ identifier: "CallsInfoRequest" }) as any as S.Schema<CallsInfoRequest>;
125
-
126
67
  export interface CallsInfoResponse {
127
68
  /** Always `true` (a failed call raises a typed error instead). */
128
69
  ok: boolean;
129
70
  call: unknown;
130
71
  }
131
- export const CallsInfoResponse = /*@__PURE__*/ S.suspend(() =>
132
- S.Struct({
133
- ok: S.Boolean,
134
- call: S.Unknown,
135
- }),
136
- ).annotate({ identifier: "CallsInfoResponse" }) as any as S.Schema<CallsInfoResponse>;
137
-
138
72
  /** The list of users to remove as participants in the Call. [Read more on how to specify users here](/apis/web-api/using-the-calls-api#users). */
139
73
  export type RemoveParticipantRequestUsersList = Array<unknown>;
140
- export const RemoveParticipantRequestUsersList = /*@__PURE__*/ S.Array(
141
- S.Unknown,
142
- ) as any as S.Schema<RemoveParticipantRequestUsersList>;
143
-
144
74
  export interface RemoveParticipantRequest {
145
75
  /** `id` returned by the [`calls.add`](/reference/methods/calls.add) method. */
146
76
  id: string;
147
77
  /** The list of users to remove as participants in the Call. [Read more on how to specify users here](/apis/web-api/using-the-calls-api#users). */
148
78
  users: RemoveParticipantRequestUsersList;
149
79
  }
150
- export const RemoveParticipantRequest = /*@__PURE__*/ S.suspend(() =>
151
- S.Struct({
152
- id: S.String,
153
- users: RemoveParticipantRequestUsersList,
154
- }).pipe(T.Http({ method: "POST", uri: "/calls.participants.remove", code: 200 })),
155
- ).annotate({ identifier: "RemoveParticipantRequest" }) as any as S.Schema<RemoveParticipantRequest>;
156
-
157
80
  export interface RemoveParticipantResponse {
158
81
  /** Always `true` (a failed call raises a typed error instead). */
159
82
  ok: boolean;
160
83
  call: unknown;
161
84
  }
162
- export const RemoveParticipantResponse = /*@__PURE__*/ S.suspend(() =>
163
- S.Struct({
164
- ok: S.Boolean,
165
- call: S.Unknown,
166
- }),
167
- ).annotate({
168
- identifier: "RemoveParticipantResponse",
169
- }) as any as S.Schema<RemoveParticipantResponse>;
170
-
171
85
  export interface UpdateCallRequest {
172
86
  /** `id` returned by the [`calls.add`](/reference/methods/calls.add) method. */
173
87
  id: string;
@@ -178,113 +92,193 @@ export interface UpdateCallRequest {
178
92
  /** When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL. */
179
93
  desktop_app_join_url?: string;
180
94
  }
181
- export const UpdateCallRequest = /*@__PURE__*/ S.suspend(() =>
182
- S.Struct({
183
- id: S.String,
184
- title: S.optional(S.String),
185
- join_url: S.optional(S.String),
186
- desktop_app_join_url: S.optional(S.String),
187
- }).pipe(T.Http({ method: "POST", uri: "/calls.update", code: 200 })),
188
- ).annotate({ identifier: "UpdateCallRequest" }) as any as S.Schema<UpdateCallRequest>;
189
-
190
95
  export interface UpdateCallResponse {
191
96
  /** Always `true` (a failed call raises a typed error instead). */
192
97
  ok: boolean;
193
98
  call: unknown;
194
99
  }
195
- export const UpdateCallResponse = /*@__PURE__*/ S.suspend(() =>
196
- S.Struct({
197
- ok: S.Boolean,
198
- call: S.Unknown,
199
- }),
200
- ).annotate({ identifier: "UpdateCallResponse" }) as any as S.Schema<UpdateCallResponse>;
201
-
202
100
  export type AddCallError = SlackOpError;
203
- /** Registers a new Call. Required scopes — bot: `calls:write`; user: `calls:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `internal_error` — An unexpected error has occurred while trying to register the Call. - `invalid_created_by` — The `created_by` user ID is invalid. - `invalid_start_time` — The start time is invalid. - `not_authorized` — The specified user is not authorized to create a Call in this channel. - `not_implemented` — This method is not available. - `user_not_found` — A specified user wasn't found. See https://docs.slack.dev/reference/methods/calls.add */
101
+ /** Registers a new Call. Required scopes -- bot: `calls:write`; user: `calls:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `internal_error` -- An unexpected error has occurred while trying to register the Call. - `invalid_created_by` -- The `created_by` user ID is invalid. - `invalid_start_time` -- The start time is invalid. - `not_authorized` -- The specified user is not authorized to create a Call in this channel. - `not_implemented` -- This method is not available. - `user_not_found` -- A specified user wasn't found. See https://docs.slack.dev/reference/methods/calls.add */
204
102
  export const addCall: API.OperationMethod<
205
103
  AddCallRequest,
206
104
  AddCallResponse,
207
105
  AddCallError,
208
106
  SlackOpContext
209
107
  > = /*@__PURE__*/ API.make(() => ({
210
- input: AddCallRequest,
211
- output: AddCallResponse,
108
+ input: __S(0, __c0, 0) as any as S.Schema<AddCallRequest>,
109
+ output: __S(2, __c1, 0) as any as S.Schema<AddCallResponse>,
212
110
  errors: [SlackError, SlackRateLimited],
213
111
  protocol: SlackProtocol,
214
112
  retry: Retry.Retry,
215
113
  }));
216
114
 
217
115
  export type AddParticipantError = SlackOpError;
218
- /** Registers new participants added to a Call. Required scopes — bot: `calls:write`; user: `calls:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `bad_users` — At least one specified user is already part of the Call. - `inactive_call` — The Call has been already ended. - `internal_error` — An unexpected exception occurred while adding a Call participant. - `invalid_call_id` — The specified Call wasn't found. - `missing_argument` — A required argument is missing. - `not_implemented` — This method is not available. - `user_not_found` — At least one specified user wasn't found. See https://docs.slack.dev/reference/methods/calls.participants.add */
116
+ /** Registers new participants added to a Call. Required scopes -- bot: `calls:write`; user: `calls:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `bad_users` -- At least one specified user is already part of the Call. - `inactive_call` -- The Call has been already ended. - `internal_error` -- An unexpected exception occurred while adding a Call participant. - `invalid_call_id` -- The specified Call wasn't found. - `missing_argument` -- A required argument is missing. - `not_implemented` -- This method is not available. - `user_not_found` -- At least one specified user wasn't found. See https://docs.slack.dev/reference/methods/calls.participants.add */
219
117
  export const addParticipant: API.OperationMethod<
220
118
  AddParticipantRequest,
221
119
  AddParticipantResponse,
222
120
  AddParticipantError,
223
121
  SlackOpContext
224
122
  > = /*@__PURE__*/ API.make(() => ({
225
- input: AddParticipantRequest,
226
- output: AddParticipantResponse,
123
+ input: __S(6, __c3, 0) as any as S.Schema<AddParticipantRequest>,
124
+ output: __S(2, __c1, 0) as any as S.Schema<AddParticipantResponse>,
227
125
  errors: [SlackError, SlackRateLimited],
228
126
  protocol: SlackProtocol,
229
127
  retry: Retry.Retry,
230
128
  }));
231
129
 
232
130
  export type CallsEndError = SlackOpError;
233
- /** Ends a Call. Required scopes — bot: `calls:write`; user: `calls:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `inactive_call` — The Call has been already stopped. - `internal_error` — An unexpected error has occurred while ending the Call. - `invalid_call_id` — Invalid Call ID. - `not_implemented` — This method is not publicly available yet. See https://docs.slack.dev/reference/methods/calls.end */
131
+ /** Ends a Call. Required scopes -- bot: `calls:write`; user: `calls:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `inactive_call` -- The Call has been already stopped. - `internal_error` -- An unexpected error has occurred while ending the Call. - `invalid_call_id` -- Invalid Call ID. - `not_implemented` -- This method is not publicly available yet. See https://docs.slack.dev/reference/methods/calls.end */
234
132
  export const callsEnd: API.OperationMethod<
235
133
  CallsEndRequest,
236
134
  CallsEndResponse,
237
135
  CallsEndError,
238
136
  SlackOpContext
239
137
  > = /*@__PURE__*/ API.make(() => ({
240
- input: CallsEndRequest,
241
- output: CallsEndResponse,
138
+ input: __S(8, __c4, 0) as any as S.Schema<CallsEndRequest>,
139
+ output: __S(2, __c1, 0) as any as S.Schema<CallsEndResponse>,
242
140
  errors: [SlackError, SlackRateLimited],
243
141
  protocol: SlackProtocol,
244
142
  retry: Retry.Retry,
245
143
  }));
246
144
 
247
145
  export type CallsInfoError = SlackOpError;
248
- /** Returns information about a Call. Required scopes — bot: `calls:read`; user: `calls:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `internal_error` — An unexpected error occurred while finding information about this Call. - `not_implemented` — This method is not available. See https://docs.slack.dev/reference/methods/calls.info */
146
+ /** Returns information about a Call. Required scopes -- bot: `calls:read`; user: `calls:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `internal_error` -- An unexpected error occurred while finding information about this Call. - `not_implemented` -- This method is not available. See https://docs.slack.dev/reference/methods/calls.info */
249
147
  export const callsInfo: API.OperationMethod<
250
148
  CallsInfoRequest,
251
149
  CallsInfoResponse,
252
150
  CallsInfoError,
253
151
  SlackOpContext
254
152
  > = /*@__PURE__*/ API.make(() => ({
255
- input: CallsInfoRequest,
256
- output: CallsInfoResponse,
153
+ input: __S(10, __c5, 0) as any as S.Schema<CallsInfoRequest>,
154
+ output: __S(2, __c1, 0) as any as S.Schema<CallsInfoResponse>,
257
155
  errors: [SlackError, SlackRateLimited],
258
156
  protocol: SlackProtocol,
259
157
  retry: Retry.Retry,
260
158
  }));
261
159
 
262
160
  export type RemoveParticipantError = SlackOpError;
263
- /** Registers participants removed from a Call. Required scopes — bot: `calls:write`; user: `calls:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `bad_users` — At least one specified user is not part of the Call. - `inactive_call` — The Call has been already ended. - `internal_error` — An unexpected exception occurred while removing participants from the Call. - `invalid_call_id` — The specified Call wasn't found. - `missing_argument` — A required argument is missing. - `not_implemented` — This method is not available. - `user_not_found` — At least one specified user wasn't found. See https://docs.slack.dev/reference/methods/calls.participants.remove */
161
+ /** Registers participants removed from a Call. Required scopes -- bot: `calls:write`; user: `calls:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `bad_users` -- At least one specified user is not part of the Call. - `inactive_call` -- The Call has been already ended. - `internal_error` -- An unexpected exception occurred while removing participants from the Call. - `invalid_call_id` -- The specified Call wasn't found. - `missing_argument` -- A required argument is missing. - `not_implemented` -- This method is not available. - `user_not_found` -- At least one specified user wasn't found. See https://docs.slack.dev/reference/methods/calls.participants.remove */
264
162
  export const removeParticipant: API.OperationMethod<
265
163
  RemoveParticipantRequest,
266
164
  RemoveParticipantResponse,
267
165
  RemoveParticipantError,
268
166
  SlackOpContext
269
167
  > = /*@__PURE__*/ API.make(() => ({
270
- input: RemoveParticipantRequest,
271
- output: RemoveParticipantResponse,
168
+ input: __S(12, __c6, 0) as any as S.Schema<RemoveParticipantRequest>,
169
+ output: __S(2, __c1, 0) as any as S.Schema<RemoveParticipantResponse>,
272
170
  errors: [SlackError, SlackRateLimited],
273
171
  protocol: SlackProtocol,
274
172
  retry: Retry.Retry,
275
173
  }));
276
174
 
277
175
  export type UpdateCallError = SlackOpError;
278
- /** Updates information about a Call. Required scopes — bot: `calls:write`; user: `calls:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `internal_error` — An unexpected exception occurred while updating the Call info. - `invalid_call_id` — The Call's `id` was invalid. - `not_implemented` — This method is not available. See https://docs.slack.dev/reference/methods/calls.update */
176
+ /** Updates information about a Call. Required scopes -- bot: `calls:write`; user: `calls:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `internal_error` -- An unexpected exception occurred while updating the Call info. - `invalid_call_id` -- The Call's `id` was invalid. - `not_implemented` -- This method is not available. See https://docs.slack.dev/reference/methods/calls.update */
279
177
  export const updateCall: API.OperationMethod<
280
178
  UpdateCallRequest,
281
179
  UpdateCallResponse,
282
180
  UpdateCallError,
283
181
  SlackOpContext
284
182
  > = /*@__PURE__*/ API.make(() => ({
285
- input: UpdateCallRequest,
286
- output: UpdateCallResponse,
183
+ input: __S(14, __c7, 0) as any as S.Schema<UpdateCallRequest>,
184
+ output: __S(2, __c1, 0) as any as S.Schema<UpdateCallResponse>,
287
185
  errors: [SlackError, SlackRateLimited],
288
186
  protocol: SlackProtocol,
289
187
  retry: Retry.Retry,
290
188
  }));
189
+
190
+ // Schema builders: each runs one schema initializer, on that schema's first use.
191
+ function __c0(j: number): any {
192
+ switch (j) {
193
+ case 0:
194
+ return S.suspend(() =>
195
+ S.Struct({
196
+ external_unique_id: S.String,
197
+ external_display_id: S.optional(S.String),
198
+ join_url: S.String,
199
+ desktop_app_join_url: S.optional(S.String),
200
+ date_start: S.optional(S.Number),
201
+ title: S.optional(S.String),
202
+ created_by: S.optional(S.String),
203
+ users: S.optional(__S(4, __c2, 0)),
204
+ }).pipe(T.Http({ method: "POST", uri: "/calls.add", code: 200 })),
205
+ ).annotate({ identifier: "AddCallRequest" });
206
+ }
207
+ }
208
+ function __c1(j: number): any {
209
+ switch (j) {
210
+ case 0:
211
+ return S.suspend(() =>
212
+ S.Struct({
213
+ ok: S.Boolean,
214
+ call: S.Unknown,
215
+ }),
216
+ ).annotate({ identifier: "AddCallResponse" });
217
+ }
218
+ }
219
+ function __c2(j: number): any {
220
+ switch (j) {
221
+ case 0:
222
+ return S.Array(S.Unknown);
223
+ }
224
+ }
225
+ function __c3(j: number): any {
226
+ switch (j) {
227
+ case 0:
228
+ return S.suspend(() =>
229
+ S.Struct({
230
+ id: S.String,
231
+ users: __S(4, __c2, 0),
232
+ }).pipe(T.Http({ method: "POST", uri: "/calls.participants.add", code: 200 })),
233
+ ).annotate({ identifier: "AddParticipantRequest" });
234
+ }
235
+ }
236
+ function __c4(j: number): any {
237
+ switch (j) {
238
+ case 0:
239
+ return S.suspend(() =>
240
+ S.Struct({
241
+ id: S.String,
242
+ duration: S.optional(S.Number),
243
+ }).pipe(T.Http({ method: "POST", uri: "/calls.end", code: 200 })),
244
+ ).annotate({ identifier: "CallsEndRequest" });
245
+ }
246
+ }
247
+ function __c5(j: number): any {
248
+ switch (j) {
249
+ case 0:
250
+ return S.suspend(() =>
251
+ S.Struct({
252
+ id: S.String,
253
+ }).pipe(T.Http({ method: "POST", uri: "/calls.info", code: 200 })),
254
+ ).annotate({ identifier: "CallsInfoRequest" });
255
+ }
256
+ }
257
+ function __c6(j: number): any {
258
+ switch (j) {
259
+ case 0:
260
+ return S.suspend(() =>
261
+ S.Struct({
262
+ id: S.String,
263
+ users: __S(4, __c2, 0),
264
+ }).pipe(T.Http({ method: "POST", uri: "/calls.participants.remove", code: 200 })),
265
+ ).annotate({ identifier: "RemoveParticipantRequest" });
266
+ }
267
+ }
268
+ function __c7(j: number): any {
269
+ switch (j) {
270
+ case 0:
271
+ return S.suspend(() =>
272
+ S.Struct({
273
+ id: S.String,
274
+ title: S.optional(S.String),
275
+ join_url: S.optional(S.String),
276
+ desktop_app_join_url: S.optional(S.String),
277
+ }).pipe(T.Http({ method: "POST", uri: "/calls.update", code: 200 })),
278
+ ).annotate({ identifier: "UpdateCallRequest" });
279
+ }
280
+ }
281
+ // Schema table: entry i is schema j of builder f, made on first reach.
282
+ function __S(i: number, f: (j: number) => unknown, j: number): any {
283
+ return (__s[i] ??= __L.at(f, j));
284
+ }