@meetkai/mka1 0.54.38 → 0.54.39

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 (106) hide show
  1. package/README.md +307 -297
  2. package/bin/mcp-server.js +288 -16
  3. package/bin/mcp-server.js.map +12 -10
  4. package/dist/commonjs/funcs/authClusterInviteOrgMembers.d.ts +18 -0
  5. package/dist/commonjs/funcs/authClusterInviteOrgMembers.d.ts.map +1 -0
  6. package/dist/commonjs/funcs/authClusterInviteOrgMembers.js +145 -0
  7. package/dist/commonjs/funcs/authClusterInviteOrgMembers.js.map +1 -0
  8. package/dist/commonjs/lib/config.d.ts +2 -2
  9. package/dist/commonjs/lib/config.js +2 -2
  10. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  11. package/dist/commonjs/mcp-server/server.js +1 -1
  12. package/dist/commonjs/models/errors/index.d.ts +1 -0
  13. package/dist/commonjs/models/errors/index.d.ts.map +1 -1
  14. package/dist/commonjs/models/errors/index.js +1 -0
  15. package/dist/commonjs/models/errors/index.js.map +1 -1
  16. package/dist/commonjs/models/errors/inviteclusterorgmembers.d.ts +205 -0
  17. package/dist/commonjs/models/errors/inviteclusterorgmembers.d.ts.map +1 -0
  18. package/dist/commonjs/models/errors/inviteclusterorgmembers.js +290 -0
  19. package/dist/commonjs/models/errors/inviteclusterorgmembers.js.map +1 -0
  20. package/dist/commonjs/models/operations/conversationsitemsretrieve.d.ts +5 -5
  21. package/dist/commonjs/models/operations/conversationsitemsretrieve.d.ts.map +1 -1
  22. package/dist/commonjs/models/operations/conversationsitemsretrieve.js +6 -6
  23. package/dist/commonjs/models/operations/conversationsitemsretrieve.js.map +1 -1
  24. package/dist/commonjs/models/operations/index.d.ts +1 -0
  25. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  26. package/dist/commonjs/models/operations/index.js +1 -0
  27. package/dist/commonjs/models/operations/index.js.map +1 -1
  28. package/dist/commonjs/models/operations/inviteclusterorgmembers.d.ts +124 -0
  29. package/dist/commonjs/models/operations/inviteclusterorgmembers.d.ts.map +1 -0
  30. package/dist/commonjs/models/operations/inviteclusterorgmembers.js +182 -0
  31. package/dist/commonjs/models/operations/inviteclusterorgmembers.js.map +1 -0
  32. package/dist/commonjs/models/operations/listclusterinvites.d.ts +8 -8
  33. package/dist/commonjs/models/operations/listclusterinvites.d.ts.map +1 -1
  34. package/dist/commonjs/models/operations/listclusterinvites.js +11 -11
  35. package/dist/commonjs/models/operations/listclusterinvites.js.map +1 -1
  36. package/dist/commonjs/react-query/authClusterInviteOrgMembers.d.ts +30 -0
  37. package/dist/commonjs/react-query/authClusterInviteOrgMembers.d.ts.map +1 -0
  38. package/dist/commonjs/react-query/authClusterInviteOrgMembers.js +47 -0
  39. package/dist/commonjs/react-query/authClusterInviteOrgMembers.js.map +1 -0
  40. package/dist/commonjs/react-query/index.d.ts +1 -0
  41. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  42. package/dist/commonjs/react-query/index.js +1 -0
  43. package/dist/commonjs/react-query/index.js.map +1 -1
  44. package/dist/commonjs/sdk/cluster.d.ts +7 -0
  45. package/dist/commonjs/sdk/cluster.d.ts.map +1 -1
  46. package/dist/commonjs/sdk/cluster.js +10 -0
  47. package/dist/commonjs/sdk/cluster.js.map +1 -1
  48. package/dist/esm/funcs/authClusterInviteOrgMembers.d.ts +18 -0
  49. package/dist/esm/funcs/authClusterInviteOrgMembers.d.ts.map +1 -0
  50. package/dist/esm/funcs/authClusterInviteOrgMembers.js +109 -0
  51. package/dist/esm/funcs/authClusterInviteOrgMembers.js.map +1 -0
  52. package/dist/esm/lib/config.d.ts +2 -2
  53. package/dist/esm/lib/config.js +2 -2
  54. package/dist/esm/mcp-server/mcp-server.js +1 -1
  55. package/dist/esm/mcp-server/server.js +1 -1
  56. package/dist/esm/models/errors/index.d.ts +1 -0
  57. package/dist/esm/models/errors/index.d.ts.map +1 -1
  58. package/dist/esm/models/errors/index.js +1 -0
  59. package/dist/esm/models/errors/index.js.map +1 -1
  60. package/dist/esm/models/errors/inviteclusterorgmembers.d.ts +205 -0
  61. package/dist/esm/models/errors/inviteclusterorgmembers.d.ts.map +1 -0
  62. package/dist/esm/models/errors/inviteclusterorgmembers.js +245 -0
  63. package/dist/esm/models/errors/inviteclusterorgmembers.js.map +1 -0
  64. package/dist/esm/models/operations/conversationsitemsretrieve.d.ts +5 -5
  65. package/dist/esm/models/operations/conversationsitemsretrieve.d.ts.map +1 -1
  66. package/dist/esm/models/operations/conversationsitemsretrieve.js +5 -5
  67. package/dist/esm/models/operations/conversationsitemsretrieve.js.map +1 -1
  68. package/dist/esm/models/operations/index.d.ts +1 -0
  69. package/dist/esm/models/operations/index.d.ts.map +1 -1
  70. package/dist/esm/models/operations/index.js +1 -0
  71. package/dist/esm/models/operations/index.js.map +1 -1
  72. package/dist/esm/models/operations/inviteclusterorgmembers.d.ts +124 -0
  73. package/dist/esm/models/operations/inviteclusterorgmembers.d.ts.map +1 -0
  74. package/dist/esm/models/operations/inviteclusterorgmembers.js +134 -0
  75. package/dist/esm/models/operations/inviteclusterorgmembers.js.map +1 -0
  76. package/dist/esm/models/operations/listclusterinvites.d.ts +8 -8
  77. package/dist/esm/models/operations/listclusterinvites.d.ts.map +1 -1
  78. package/dist/esm/models/operations/listclusterinvites.js +8 -8
  79. package/dist/esm/models/operations/listclusterinvites.js.map +1 -1
  80. package/dist/esm/react-query/authClusterInviteOrgMembers.d.ts +30 -0
  81. package/dist/esm/react-query/authClusterInviteOrgMembers.d.ts.map +1 -0
  82. package/dist/esm/react-query/authClusterInviteOrgMembers.js +42 -0
  83. package/dist/esm/react-query/authClusterInviteOrgMembers.js.map +1 -0
  84. package/dist/esm/react-query/index.d.ts +1 -0
  85. package/dist/esm/react-query/index.d.ts.map +1 -1
  86. package/dist/esm/react-query/index.js +1 -0
  87. package/dist/esm/react-query/index.js.map +1 -1
  88. package/dist/esm/sdk/cluster.d.ts +7 -0
  89. package/dist/esm/sdk/cluster.d.ts.map +1 -1
  90. package/dist/esm/sdk/cluster.js +10 -0
  91. package/dist/esm/sdk/cluster.js.map +1 -1
  92. package/jsr.json +1 -1
  93. package/package.json +1 -1
  94. package/src/funcs/authClusterInviteOrgMembers.ts +251 -0
  95. package/src/lib/config.ts +2 -2
  96. package/src/mcp-server/mcp-server.ts +1 -1
  97. package/src/mcp-server/server.ts +1 -1
  98. package/src/models/errors/index.ts +1 -0
  99. package/src/models/errors/inviteclusterorgmembers.ts +521 -0
  100. package/src/models/operations/conversationsitemsretrieve.ts +11 -10
  101. package/src/models/operations/index.ts +1 -0
  102. package/src/models/operations/inviteclusterorgmembers.ts +345 -0
  103. package/src/models/operations/listclusterinvites.ts +27 -17
  104. package/src/react-query/authClusterInviteOrgMembers.ts +120 -0
  105. package/src/react-query/index.ts +1 -0
  106. package/src/sdk/cluster.ts +20 -0
@@ -0,0 +1,345 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type InviteClusterOrgMembersSecurity = {
13
+ sessionCookie: string;
14
+ };
15
+
16
+ export const Role = {
17
+ Member: "member",
18
+ Admin: "admin",
19
+ } as const;
20
+ export type Role = ClosedEnum<typeof Role>;
21
+
22
+ export type Invitations = {
23
+ email: string;
24
+ role?: Role | undefined;
25
+ resend?: boolean | undefined;
26
+ };
27
+
28
+ export type InviteClusterOrgMembersRequestBody = {
29
+ invitations: Array<Invitations>;
30
+ };
31
+
32
+ export type InviteClusterOrgMembersRequest = {
33
+ id: string;
34
+ /**
35
+ * Optional external end-user identifier forwarded by the API gateway.
36
+ */
37
+ xOnBehalfOf?: string | undefined;
38
+ requestBody: InviteClusterOrgMembersRequestBody;
39
+ };
40
+
41
+ export const InviteClusterOrgMembersStatus = {
42
+ Sent: "sent",
43
+ EmailFailed: "email_failed",
44
+ AlreadyInvited: "already_invited",
45
+ AlreadyMember: "already_member",
46
+ Error: "error",
47
+ } as const;
48
+ export type InviteClusterOrgMembersStatus = ClosedEnum<
49
+ typeof InviteClusterOrgMembersStatus
50
+ >;
51
+
52
+ export type Results = {
53
+ email: string;
54
+ status: InviteClusterOrgMembersStatus;
55
+ invitationId?: string | undefined;
56
+ message?: string | undefined;
57
+ };
58
+
59
+ /**
60
+ * OK
61
+ */
62
+ export type InviteClusterOrgMembersResponseBody = {
63
+ results: Array<Results>;
64
+ };
65
+
66
+ /** @internal */
67
+ export const InviteClusterOrgMembersSecurity$inboundSchema: z.ZodType<
68
+ InviteClusterOrgMembersSecurity,
69
+ z.ZodTypeDef,
70
+ unknown
71
+ > = z.object({
72
+ sessionCookie: z.string(),
73
+ });
74
+ /** @internal */
75
+ export type InviteClusterOrgMembersSecurity$Outbound = {
76
+ sessionCookie: string;
77
+ };
78
+
79
+ /** @internal */
80
+ export const InviteClusterOrgMembersSecurity$outboundSchema: z.ZodType<
81
+ InviteClusterOrgMembersSecurity$Outbound,
82
+ z.ZodTypeDef,
83
+ InviteClusterOrgMembersSecurity
84
+ > = z.object({
85
+ sessionCookie: z.string(),
86
+ });
87
+
88
+ export function inviteClusterOrgMembersSecurityToJSON(
89
+ inviteClusterOrgMembersSecurity: InviteClusterOrgMembersSecurity,
90
+ ): string {
91
+ return JSON.stringify(
92
+ InviteClusterOrgMembersSecurity$outboundSchema.parse(
93
+ inviteClusterOrgMembersSecurity,
94
+ ),
95
+ );
96
+ }
97
+ export function inviteClusterOrgMembersSecurityFromJSON(
98
+ jsonString: string,
99
+ ): SafeParseResult<InviteClusterOrgMembersSecurity, SDKValidationError> {
100
+ return safeParse(
101
+ jsonString,
102
+ (x) => InviteClusterOrgMembersSecurity$inboundSchema.parse(JSON.parse(x)),
103
+ `Failed to parse 'InviteClusterOrgMembersSecurity' from JSON`,
104
+ );
105
+ }
106
+
107
+ /** @internal */
108
+ export const Role$inboundSchema: z.ZodNativeEnum<typeof Role> = z.nativeEnum(
109
+ Role,
110
+ );
111
+ /** @internal */
112
+ export const Role$outboundSchema: z.ZodNativeEnum<typeof Role> =
113
+ Role$inboundSchema;
114
+
115
+ /** @internal */
116
+ export const Invitations$inboundSchema: z.ZodType<
117
+ Invitations,
118
+ z.ZodTypeDef,
119
+ unknown
120
+ > = z.object({
121
+ email: z.string(),
122
+ role: Role$inboundSchema.default("member"),
123
+ resend: z.boolean().optional(),
124
+ });
125
+ /** @internal */
126
+ export type Invitations$Outbound = {
127
+ email: string;
128
+ role: string;
129
+ resend?: boolean | undefined;
130
+ };
131
+
132
+ /** @internal */
133
+ export const Invitations$outboundSchema: z.ZodType<
134
+ Invitations$Outbound,
135
+ z.ZodTypeDef,
136
+ Invitations
137
+ > = z.object({
138
+ email: z.string(),
139
+ role: Role$outboundSchema.default("member"),
140
+ resend: z.boolean().optional(),
141
+ });
142
+
143
+ export function invitationsToJSON(invitations: Invitations): string {
144
+ return JSON.stringify(Invitations$outboundSchema.parse(invitations));
145
+ }
146
+ export function invitationsFromJSON(
147
+ jsonString: string,
148
+ ): SafeParseResult<Invitations, SDKValidationError> {
149
+ return safeParse(
150
+ jsonString,
151
+ (x) => Invitations$inboundSchema.parse(JSON.parse(x)),
152
+ `Failed to parse 'Invitations' from JSON`,
153
+ );
154
+ }
155
+
156
+ /** @internal */
157
+ export const InviteClusterOrgMembersRequestBody$inboundSchema: z.ZodType<
158
+ InviteClusterOrgMembersRequestBody,
159
+ z.ZodTypeDef,
160
+ unknown
161
+ > = z.object({
162
+ invitations: z.array(z.lazy(() => Invitations$inboundSchema)),
163
+ });
164
+ /** @internal */
165
+ export type InviteClusterOrgMembersRequestBody$Outbound = {
166
+ invitations: Array<Invitations$Outbound>;
167
+ };
168
+
169
+ /** @internal */
170
+ export const InviteClusterOrgMembersRequestBody$outboundSchema: z.ZodType<
171
+ InviteClusterOrgMembersRequestBody$Outbound,
172
+ z.ZodTypeDef,
173
+ InviteClusterOrgMembersRequestBody
174
+ > = z.object({
175
+ invitations: z.array(z.lazy(() => Invitations$outboundSchema)),
176
+ });
177
+
178
+ export function inviteClusterOrgMembersRequestBodyToJSON(
179
+ inviteClusterOrgMembersRequestBody: InviteClusterOrgMembersRequestBody,
180
+ ): string {
181
+ return JSON.stringify(
182
+ InviteClusterOrgMembersRequestBody$outboundSchema.parse(
183
+ inviteClusterOrgMembersRequestBody,
184
+ ),
185
+ );
186
+ }
187
+ export function inviteClusterOrgMembersRequestBodyFromJSON(
188
+ jsonString: string,
189
+ ): SafeParseResult<InviteClusterOrgMembersRequestBody, SDKValidationError> {
190
+ return safeParse(
191
+ jsonString,
192
+ (x) =>
193
+ InviteClusterOrgMembersRequestBody$inboundSchema.parse(JSON.parse(x)),
194
+ `Failed to parse 'InviteClusterOrgMembersRequestBody' from JSON`,
195
+ );
196
+ }
197
+
198
+ /** @internal */
199
+ export const InviteClusterOrgMembersRequest$inboundSchema: z.ZodType<
200
+ InviteClusterOrgMembersRequest,
201
+ z.ZodTypeDef,
202
+ unknown
203
+ > = z.object({
204
+ id: z.string(),
205
+ "X-On-Behalf-Of": z.string().optional(),
206
+ RequestBody: z.lazy(() => InviteClusterOrgMembersRequestBody$inboundSchema),
207
+ }).transform((v) => {
208
+ return remap$(v, {
209
+ "X-On-Behalf-Of": "xOnBehalfOf",
210
+ "RequestBody": "requestBody",
211
+ });
212
+ });
213
+ /** @internal */
214
+ export type InviteClusterOrgMembersRequest$Outbound = {
215
+ id: string;
216
+ "X-On-Behalf-Of"?: string | undefined;
217
+ RequestBody: InviteClusterOrgMembersRequestBody$Outbound;
218
+ };
219
+
220
+ /** @internal */
221
+ export const InviteClusterOrgMembersRequest$outboundSchema: z.ZodType<
222
+ InviteClusterOrgMembersRequest$Outbound,
223
+ z.ZodTypeDef,
224
+ InviteClusterOrgMembersRequest
225
+ > = z.object({
226
+ id: z.string(),
227
+ xOnBehalfOf: z.string().optional(),
228
+ requestBody: z.lazy(() => InviteClusterOrgMembersRequestBody$outboundSchema),
229
+ }).transform((v) => {
230
+ return remap$(v, {
231
+ xOnBehalfOf: "X-On-Behalf-Of",
232
+ requestBody: "RequestBody",
233
+ });
234
+ });
235
+
236
+ export function inviteClusterOrgMembersRequestToJSON(
237
+ inviteClusterOrgMembersRequest: InviteClusterOrgMembersRequest,
238
+ ): string {
239
+ return JSON.stringify(
240
+ InviteClusterOrgMembersRequest$outboundSchema.parse(
241
+ inviteClusterOrgMembersRequest,
242
+ ),
243
+ );
244
+ }
245
+ export function inviteClusterOrgMembersRequestFromJSON(
246
+ jsonString: string,
247
+ ): SafeParseResult<InviteClusterOrgMembersRequest, SDKValidationError> {
248
+ return safeParse(
249
+ jsonString,
250
+ (x) => InviteClusterOrgMembersRequest$inboundSchema.parse(JSON.parse(x)),
251
+ `Failed to parse 'InviteClusterOrgMembersRequest' from JSON`,
252
+ );
253
+ }
254
+
255
+ /** @internal */
256
+ export const InviteClusterOrgMembersStatus$inboundSchema: z.ZodNativeEnum<
257
+ typeof InviteClusterOrgMembersStatus
258
+ > = z.nativeEnum(InviteClusterOrgMembersStatus);
259
+ /** @internal */
260
+ export const InviteClusterOrgMembersStatus$outboundSchema: z.ZodNativeEnum<
261
+ typeof InviteClusterOrgMembersStatus
262
+ > = InviteClusterOrgMembersStatus$inboundSchema;
263
+
264
+ /** @internal */
265
+ export const Results$inboundSchema: z.ZodType<Results, z.ZodTypeDef, unknown> =
266
+ z.object({
267
+ email: z.string(),
268
+ status: InviteClusterOrgMembersStatus$inboundSchema,
269
+ invitationId: z.string().optional(),
270
+ message: z.string().optional(),
271
+ });
272
+ /** @internal */
273
+ export type Results$Outbound = {
274
+ email: string;
275
+ status: string;
276
+ invitationId?: string | undefined;
277
+ message?: string | undefined;
278
+ };
279
+
280
+ /** @internal */
281
+ export const Results$outboundSchema: z.ZodType<
282
+ Results$Outbound,
283
+ z.ZodTypeDef,
284
+ Results
285
+ > = z.object({
286
+ email: z.string(),
287
+ status: InviteClusterOrgMembersStatus$outboundSchema,
288
+ invitationId: z.string().optional(),
289
+ message: z.string().optional(),
290
+ });
291
+
292
+ export function resultsToJSON(results: Results): string {
293
+ return JSON.stringify(Results$outboundSchema.parse(results));
294
+ }
295
+ export function resultsFromJSON(
296
+ jsonString: string,
297
+ ): SafeParseResult<Results, SDKValidationError> {
298
+ return safeParse(
299
+ jsonString,
300
+ (x) => Results$inboundSchema.parse(JSON.parse(x)),
301
+ `Failed to parse 'Results' from JSON`,
302
+ );
303
+ }
304
+
305
+ /** @internal */
306
+ export const InviteClusterOrgMembersResponseBody$inboundSchema: z.ZodType<
307
+ InviteClusterOrgMembersResponseBody,
308
+ z.ZodTypeDef,
309
+ unknown
310
+ > = z.object({
311
+ results: z.array(z.lazy(() => Results$inboundSchema)),
312
+ });
313
+ /** @internal */
314
+ export type InviteClusterOrgMembersResponseBody$Outbound = {
315
+ results: Array<Results$Outbound>;
316
+ };
317
+
318
+ /** @internal */
319
+ export const InviteClusterOrgMembersResponseBody$outboundSchema: z.ZodType<
320
+ InviteClusterOrgMembersResponseBody$Outbound,
321
+ z.ZodTypeDef,
322
+ InviteClusterOrgMembersResponseBody
323
+ > = z.object({
324
+ results: z.array(z.lazy(() => Results$outboundSchema)),
325
+ });
326
+
327
+ export function inviteClusterOrgMembersResponseBodyToJSON(
328
+ inviteClusterOrgMembersResponseBody: InviteClusterOrgMembersResponseBody,
329
+ ): string {
330
+ return JSON.stringify(
331
+ InviteClusterOrgMembersResponseBody$outboundSchema.parse(
332
+ inviteClusterOrgMembersResponseBody,
333
+ ),
334
+ );
335
+ }
336
+ export function inviteClusterOrgMembersResponseBodyFromJSON(
337
+ jsonString: string,
338
+ ): SafeParseResult<InviteClusterOrgMembersResponseBody, SDKValidationError> {
339
+ return safeParse(
340
+ jsonString,
341
+ (x) =>
342
+ InviteClusterOrgMembersResponseBody$inboundSchema.parse(JSON.parse(x)),
343
+ `Failed to parse 'InviteClusterOrgMembersResponseBody' from JSON`,
344
+ );
345
+ }
@@ -16,7 +16,7 @@ export type ListClusterInvitesRequest = {
16
16
  xOnBehalfOf?: string | undefined;
17
17
  };
18
18
 
19
- export type Invitations = {
19
+ export type ListClusterInvitesInvitations = {
20
20
  id: string;
21
21
  token?: string | undefined;
22
22
  email: string | null;
@@ -46,7 +46,7 @@ export type Invitations = {
46
46
  * OK
47
47
  */
48
48
  export type ListClusterInvitesResponseBody = {
49
- invitations: Array<Invitations>;
49
+ invitations: Array<ListClusterInvitesInvitations>;
50
50
  };
51
51
 
52
52
  /** @internal */
@@ -97,8 +97,8 @@ export function listClusterInvitesRequestFromJSON(
97
97
  }
98
98
 
99
99
  /** @internal */
100
- export const Invitations$inboundSchema: z.ZodType<
101
- Invitations,
100
+ export const ListClusterInvitesInvitations$inboundSchema: z.ZodType<
101
+ ListClusterInvitesInvitations,
102
102
  z.ZodTypeDef,
103
103
  unknown
104
104
  > = z.object({
@@ -118,7 +118,7 @@ export const Invitations$inboundSchema: z.ZodType<
118
118
  emailSent: z.nullable(z.boolean()).optional(),
119
119
  });
120
120
  /** @internal */
121
- export type Invitations$Outbound = {
121
+ export type ListClusterInvitesInvitations$Outbound = {
122
122
  id: string;
123
123
  token?: string | undefined;
124
124
  email: string | null;
@@ -136,10 +136,10 @@ export type Invitations$Outbound = {
136
136
  };
137
137
 
138
138
  /** @internal */
139
- export const Invitations$outboundSchema: z.ZodType<
140
- Invitations$Outbound,
139
+ export const ListClusterInvitesInvitations$outboundSchema: z.ZodType<
140
+ ListClusterInvitesInvitations$Outbound,
141
141
  z.ZodTypeDef,
142
- Invitations
142
+ ListClusterInvitesInvitations
143
143
  > = z.object({
144
144
  id: z.string(),
145
145
  token: z.string().optional(),
@@ -157,16 +157,22 @@ export const Invitations$outboundSchema: z.ZodType<
157
157
  emailSent: z.nullable(z.boolean()).optional(),
158
158
  });
159
159
 
160
- export function invitationsToJSON(invitations: Invitations): string {
161
- return JSON.stringify(Invitations$outboundSchema.parse(invitations));
160
+ export function listClusterInvitesInvitationsToJSON(
161
+ listClusterInvitesInvitations: ListClusterInvitesInvitations,
162
+ ): string {
163
+ return JSON.stringify(
164
+ ListClusterInvitesInvitations$outboundSchema.parse(
165
+ listClusterInvitesInvitations,
166
+ ),
167
+ );
162
168
  }
163
- export function invitationsFromJSON(
169
+ export function listClusterInvitesInvitationsFromJSON(
164
170
  jsonString: string,
165
- ): SafeParseResult<Invitations, SDKValidationError> {
171
+ ): SafeParseResult<ListClusterInvitesInvitations, SDKValidationError> {
166
172
  return safeParse(
167
173
  jsonString,
168
- (x) => Invitations$inboundSchema.parse(JSON.parse(x)),
169
- `Failed to parse 'Invitations' from JSON`,
174
+ (x) => ListClusterInvitesInvitations$inboundSchema.parse(JSON.parse(x)),
175
+ `Failed to parse 'ListClusterInvitesInvitations' from JSON`,
170
176
  );
171
177
  }
172
178
 
@@ -176,11 +182,13 @@ export const ListClusterInvitesResponseBody$inboundSchema: z.ZodType<
176
182
  z.ZodTypeDef,
177
183
  unknown
178
184
  > = z.object({
179
- invitations: z.array(z.lazy(() => Invitations$inboundSchema)),
185
+ invitations: z.array(
186
+ z.lazy(() => ListClusterInvitesInvitations$inboundSchema),
187
+ ),
180
188
  });
181
189
  /** @internal */
182
190
  export type ListClusterInvitesResponseBody$Outbound = {
183
- invitations: Array<Invitations$Outbound>;
191
+ invitations: Array<ListClusterInvitesInvitations$Outbound>;
184
192
  };
185
193
 
186
194
  /** @internal */
@@ -189,7 +197,9 @@ export const ListClusterInvitesResponseBody$outboundSchema: z.ZodType<
189
197
  z.ZodTypeDef,
190
198
  ListClusterInvitesResponseBody
191
199
  > = z.object({
192
- invitations: z.array(z.lazy(() => Invitations$outboundSchema)),
200
+ invitations: z.array(
201
+ z.lazy(() => ListClusterInvitesInvitations$outboundSchema),
202
+ ),
193
203
  });
194
204
 
195
205
  export function listClusterInvitesResponseBodyToJSON(
@@ -0,0 +1,120 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import {
6
+ MutationKey,
7
+ useMutation,
8
+ UseMutationResult,
9
+ } from "@tanstack/react-query";
10
+ import { SDKCore } from "../core.js";
11
+ import { authClusterInviteOrgMembers } from "../funcs/authClusterInviteOrgMembers.js";
12
+ import { combineSignals } from "../lib/primitives.js";
13
+ import { RequestOptions } from "../lib/sdks.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import * as errors from "../models/errors/index.js";
22
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
23
+ import { SDKError } from "../models/errors/sdkerror.js";
24
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
25
+ import * as operations from "../models/operations/index.js";
26
+ import { unwrapAsync } from "../types/fp.js";
27
+ import { useSDKContext } from "./_context.js";
28
+ import { MutationHookOptions } from "./_types.js";
29
+
30
+ export type AuthClusterInviteOrgMembersMutationVariables = {
31
+ security: operations.InviteClusterOrgMembersSecurity;
32
+ request: operations.InviteClusterOrgMembersRequest;
33
+ options?: RequestOptions;
34
+ };
35
+
36
+ export type AuthClusterInviteOrgMembersMutationData =
37
+ operations.InviteClusterOrgMembersResponseBody;
38
+
39
+ export type AuthClusterInviteOrgMembersMutationError =
40
+ | errors.InviteClusterOrgMembersResponseBody
41
+ | errors.InviteClusterOrgMembersAuthClusterResponseBody
42
+ | errors.InviteClusterOrgMembersAuthClusterResponseResponseBody
43
+ | errors.InviteClusterOrgMembersAuthClusterResponse404ResponseBody
44
+ | errors.InviteClusterOrgMembersAuthClusterResponse409ResponseBody
45
+ | errors.InviteClusterOrgMembersAuthClusterResponse410ResponseBody
46
+ | errors.InviteClusterOrgMembersAuthClusterResponse429ResponseBody
47
+ | SDKError
48
+ | ResponseValidationError
49
+ | ConnectionError
50
+ | RequestAbortedError
51
+ | RequestTimeoutError
52
+ | InvalidRequestError
53
+ | UnexpectedClientError
54
+ | SDKValidationError;
55
+
56
+ /**
57
+ * Invite members on behalf of an organization
58
+ *
59
+ * @remarks
60
+ * Requires a cluster-admin session with Cluster as its active organization. The target must be active and cannot be Cluster. Sends up to 20 organization invitations without switching the admin's session or joining the target organization. Each row accepts role member or admin, defaulting to member; owner and custom roles are not supported. New invitations include the target's oldest team when one exists. Results follow input order; invalid emails, duplicates, existing members, pending invitations, and delivery failures are reported per row. An existing pending invitation must match the requested role, including when resend is false. An explicit resend reuses a matching pending invitation with no team or the target's oldest team, preserving its inviter, role, and team. Invitation expiry is 48 hours; at most 100 unexpired pending invitations are allowed per organization. API keys are not supported.
61
+ */
62
+ export function useAuthClusterInviteOrgMembersMutation(
63
+ options?: MutationHookOptions<
64
+ AuthClusterInviteOrgMembersMutationData,
65
+ AuthClusterInviteOrgMembersMutationError,
66
+ AuthClusterInviteOrgMembersMutationVariables
67
+ >,
68
+ ): UseMutationResult<
69
+ AuthClusterInviteOrgMembersMutationData,
70
+ AuthClusterInviteOrgMembersMutationError,
71
+ AuthClusterInviteOrgMembersMutationVariables
72
+ > {
73
+ const client = useSDKContext();
74
+ return useMutation({
75
+ ...buildAuthClusterInviteOrgMembersMutation(client, options),
76
+ ...options,
77
+ });
78
+ }
79
+
80
+ export function mutationKeyAuthClusterInviteOrgMembers(): MutationKey {
81
+ return ["@meetkai/mka1", "cluster", "inviteOrgMembers"];
82
+ }
83
+
84
+ export function buildAuthClusterInviteOrgMembersMutation(
85
+ client$: SDKCore,
86
+ hookOptions?: RequestOptions,
87
+ ): {
88
+ mutationKey: MutationKey;
89
+ mutationFn: (
90
+ variables: AuthClusterInviteOrgMembersMutationVariables,
91
+ ) => Promise<AuthClusterInviteOrgMembersMutationData>;
92
+ } {
93
+ return {
94
+ mutationKey: mutationKeyAuthClusterInviteOrgMembers(),
95
+ mutationFn: function authClusterInviteOrgMembersMutationFn({
96
+ security,
97
+ request,
98
+ options,
99
+ }): Promise<AuthClusterInviteOrgMembersMutationData> {
100
+ const mergedOptions = {
101
+ ...hookOptions,
102
+ ...options,
103
+ fetchOptions: {
104
+ ...hookOptions?.fetchOptions,
105
+ ...options?.fetchOptions,
106
+ signal: combineSignals(
107
+ hookOptions?.fetchOptions?.signal,
108
+ options?.fetchOptions?.signal,
109
+ ),
110
+ },
111
+ };
112
+ return unwrapAsync(authClusterInviteOrgMembers(
113
+ client$,
114
+ security,
115
+ request,
116
+ mergedOptions,
117
+ ));
118
+ },
119
+ };
120
+ }
@@ -53,6 +53,7 @@ export * from "./authClusterCreateInvite.js";
53
53
  export * from "./authClusterDeleteOrg.js";
54
54
  export * from "./authClusterGetOrg.js";
55
55
  export * from "./authClusterInviteInfo.js";
56
+ export * from "./authClusterInviteOrgMembers.js";
56
57
  export * from "./authClusterListInvites.js";
57
58
  export * from "./authClusterListOrgs.js";
58
59
  export * from "./authClusterReissueOwnerKey.js";
@@ -7,6 +7,7 @@ import { authClusterCreateInvite } from "../funcs/authClusterCreateInvite.js";
7
7
  import { authClusterDeleteOrg } from "../funcs/authClusterDeleteOrg.js";
8
8
  import { authClusterGetOrg } from "../funcs/authClusterGetOrg.js";
9
9
  import { authClusterInviteInfo } from "../funcs/authClusterInviteInfo.js";
10
+ import { authClusterInviteOrgMembers } from "../funcs/authClusterInviteOrgMembers.js";
10
11
  import { authClusterListInvites } from "../funcs/authClusterListInvites.js";
11
12
  import { authClusterListOrgs } from "../funcs/authClusterListOrgs.js";
12
13
  import { authClusterReissueOwnerKey } from "../funcs/authClusterReissueOwnerKey.js";
@@ -123,6 +124,25 @@ export class Cluster extends ClientSDK {
123
124
  ));
124
125
  }
125
126
 
127
+ /**
128
+ * Invite members on behalf of an organization
129
+ *
130
+ * @remarks
131
+ * Requires a cluster-admin session with Cluster as its active organization. The target must be active and cannot be Cluster. Sends up to 20 organization invitations without switching the admin's session or joining the target organization. Each row accepts role member or admin, defaulting to member; owner and custom roles are not supported. New invitations include the target's oldest team when one exists. Results follow input order; invalid emails, duplicates, existing members, pending invitations, and delivery failures are reported per row. An existing pending invitation must match the requested role, including when resend is false. An explicit resend reuses a matching pending invitation with no team or the target's oldest team, preserving its inviter, role, and team. Invitation expiry is 48 hours; at most 100 unexpired pending invitations are allowed per organization. API keys are not supported.
132
+ */
133
+ async inviteOrgMembers(
134
+ security: operations.InviteClusterOrgMembersSecurity,
135
+ request: operations.InviteClusterOrgMembersRequest,
136
+ options?: RequestOptions,
137
+ ): Promise<operations.InviteClusterOrgMembersResponseBody> {
138
+ return unwrapAsync(authClusterInviteOrgMembers(
139
+ this,
140
+ security,
141
+ request,
142
+ options,
143
+ ));
144
+ }
145
+
126
146
  /**
127
147
  * Suspend an organization
128
148
  */