@meetkai/mka1 0.48.30 → 0.48.31
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.
- package/README.md +238 -229
- package/bin/mcp-server.js +2191 -1879
- package/bin/mcp-server.js.map +13 -9
- package/dist/commonjs/funcs/authApiKeyGetJwtFromKey.d.ts +2 -0
- package/dist/commonjs/funcs/authApiKeyGetJwtFromKey.d.ts.map +1 -1
- package/dist/commonjs/funcs/authApiKeyGetJwtFromKey.js +2 -0
- package/dist/commonjs/funcs/authApiKeyGetJwtFromKey.js.map +1 -1
- package/dist/commonjs/funcs/authApiKeysExchangeToken.d.ts +18 -0
- package/dist/commonjs/funcs/authApiKeysExchangeToken.d.ts.map +1 -0
- package/dist/commonjs/funcs/authApiKeysExchangeToken.js +133 -0
- package/dist/commonjs/funcs/authApiKeysExchangeToken.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +3 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/authApiKeysExchangeToken.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/authApiKeysExchangeToken.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/authApiKeysExchangeToken.js +64 -0
- package/dist/commonjs/mcp-server/tools/authApiKeysExchangeToken.js.map +1 -0
- package/dist/commonjs/models/errors/exchangeapikeytoken.d.ts +159 -0
- package/dist/commonjs/models/errors/exchangeapikeytoken.d.ts.map +1 -0
- package/dist/commonjs/models/errors/exchangeapikeytoken.js +234 -0
- package/dist/commonjs/models/errors/exchangeapikeytoken.js.map +1 -0
- package/dist/commonjs/models/errors/index.d.ts +1 -0
- package/dist/commonjs/models/errors/index.d.ts.map +1 -1
- package/dist/commonjs/models/errors/index.js +1 -0
- package/dist/commonjs/models/errors/index.js.map +1 -1
- package/dist/commonjs/models/operations/exchangeapikeytoken.d.ts +72 -0
- package/dist/commonjs/models/operations/exchangeapikeytoken.d.ts.map +1 -0
- package/dist/commonjs/models/operations/exchangeapikeytoken.js +111 -0
- package/dist/commonjs/models/operations/exchangeapikeytoken.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/react-query/authApiKeyGetJwtFromKey.d.ts +2 -0
- package/dist/commonjs/react-query/authApiKeyGetJwtFromKey.d.ts.map +1 -1
- package/dist/commonjs/react-query/authApiKeyGetJwtFromKey.js +2 -0
- package/dist/commonjs/react-query/authApiKeyGetJwtFromKey.js.map +1 -1
- package/dist/commonjs/react-query/authApiKeysExchangeToken.d.ts +29 -0
- package/dist/commonjs/react-query/authApiKeysExchangeToken.d.ts.map +1 -0
- package/dist/commonjs/react-query/authApiKeysExchangeToken.js +47 -0
- package/dist/commonjs/react-query/authApiKeysExchangeToken.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +1 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +1 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/sdk/apikey.d.ts +2 -0
- package/dist/commonjs/sdk/apikey.d.ts.map +1 -1
- package/dist/commonjs/sdk/apikey.js +2 -0
- package/dist/commonjs/sdk/apikey.js.map +1 -1
- package/dist/commonjs/sdk/apikeys.d.ts +7 -0
- package/dist/commonjs/sdk/apikeys.d.ts.map +1 -1
- package/dist/commonjs/sdk/apikeys.js +10 -0
- package/dist/commonjs/sdk/apikeys.js.map +1 -1
- package/dist/esm/funcs/authApiKeyGetJwtFromKey.d.ts +2 -0
- package/dist/esm/funcs/authApiKeyGetJwtFromKey.d.ts.map +1 -1
- package/dist/esm/funcs/authApiKeyGetJwtFromKey.js +2 -0
- package/dist/esm/funcs/authApiKeyGetJwtFromKey.js.map +1 -1
- package/dist/esm/funcs/authApiKeysExchangeToken.d.ts +18 -0
- package/dist/esm/funcs/authApiKeysExchangeToken.d.ts.map +1 -0
- package/dist/esm/funcs/authApiKeysExchangeToken.js +97 -0
- package/dist/esm/funcs/authApiKeysExchangeToken.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +3 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/authApiKeysExchangeToken.d.ts +8 -0
- package/dist/esm/mcp-server/tools/authApiKeysExchangeToken.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/authApiKeysExchangeToken.js +28 -0
- package/dist/esm/mcp-server/tools/authApiKeysExchangeToken.js.map +1 -0
- package/dist/esm/models/errors/exchangeapikeytoken.d.ts +159 -0
- package/dist/esm/models/errors/exchangeapikeytoken.d.ts.map +1 -0
- package/dist/esm/models/errors/exchangeapikeytoken.js +192 -0
- package/dist/esm/models/errors/exchangeapikeytoken.js.map +1 -0
- package/dist/esm/models/errors/index.d.ts +1 -0
- package/dist/esm/models/errors/index.d.ts.map +1 -1
- package/dist/esm/models/errors/index.js +1 -0
- package/dist/esm/models/errors/index.js.map +1 -1
- package/dist/esm/models/operations/exchangeapikeytoken.d.ts +72 -0
- package/dist/esm/models/operations/exchangeapikeytoken.d.ts.map +1 -0
- package/dist/esm/models/operations/exchangeapikeytoken.js +69 -0
- package/dist/esm/models/operations/exchangeapikeytoken.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/react-query/authApiKeyGetJwtFromKey.d.ts +2 -0
- package/dist/esm/react-query/authApiKeyGetJwtFromKey.d.ts.map +1 -1
- package/dist/esm/react-query/authApiKeyGetJwtFromKey.js +2 -0
- package/dist/esm/react-query/authApiKeyGetJwtFromKey.js.map +1 -1
- package/dist/esm/react-query/authApiKeysExchangeToken.d.ts +29 -0
- package/dist/esm/react-query/authApiKeysExchangeToken.d.ts.map +1 -0
- package/dist/esm/react-query/authApiKeysExchangeToken.js +42 -0
- package/dist/esm/react-query/authApiKeysExchangeToken.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +1 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +1 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/sdk/apikey.d.ts +2 -0
- package/dist/esm/sdk/apikey.d.ts.map +1 -1
- package/dist/esm/sdk/apikey.js +2 -0
- package/dist/esm/sdk/apikey.js.map +1 -1
- package/dist/esm/sdk/apikeys.d.ts +7 -0
- package/dist/esm/sdk/apikeys.d.ts.map +1 -1
- package/dist/esm/sdk/apikeys.js +10 -0
- package/dist/esm/sdk/apikeys.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/authApiKeyGetJwtFromKey.ts +2 -0
- package/src/funcs/authApiKeysExchangeToken.ts +225 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/authApiKeysExchangeToken.ts +37 -0
- package/src/models/errors/exchangeapikeytoken.ts +387 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/operations/exchangeapikeytoken.ts +191 -0
- package/src/models/operations/index.ts +1 -0
- package/src/react-query/authApiKeyGetJwtFromKey.ts +2 -0
- package/src/react-query/authApiKeysExchangeToken.ts +116 -0
- package/src/react-query/index.ts +1 -0
- package/src/sdk/apikey.ts +2 -0
- package/src/sdk/apikeys.ts +18 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { authApiKeysExchangeToken } from "../../funcs/authApiKeysExchangeToken.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.ExchangeApiKeyTokenRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$authApiKeysExchangeToken: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "auth-api-keys-exchange-token",
|
|
15
|
+
description: `Exchange API key for a JWT token
|
|
16
|
+
|
|
17
|
+
Exchange an API key for a short-lived JWT token.`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await authApiKeysExchangeToken(
|
|
21
|
+
client,
|
|
22
|
+
args.request,
|
|
23
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
24
|
+
).$inspect();
|
|
25
|
+
|
|
26
|
+
if (!result.ok) {
|
|
27
|
+
return {
|
|
28
|
+
content: [{ type: "text", text: result.error.message }],
|
|
29
|
+
isError: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const value = result.value;
|
|
34
|
+
|
|
35
|
+
return formatResult(value, apiCall);
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { SDKError } from "./sdkerror.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Rate limited
|
|
10
|
+
*/
|
|
11
|
+
export type ExchangeApiKeyTokenAuthApiKeysResponse429ResponseBodyData = {
|
|
12
|
+
message: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Rate limited
|
|
17
|
+
*/
|
|
18
|
+
export class ExchangeApiKeyTokenAuthApiKeysResponse429ResponseBody
|
|
19
|
+
extends SDKError
|
|
20
|
+
{
|
|
21
|
+
/** The original data that was passed to this error instance. */
|
|
22
|
+
data$: ExchangeApiKeyTokenAuthApiKeysResponse429ResponseBodyData;
|
|
23
|
+
|
|
24
|
+
constructor(
|
|
25
|
+
err: ExchangeApiKeyTokenAuthApiKeysResponse429ResponseBodyData,
|
|
26
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
27
|
+
) {
|
|
28
|
+
const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
|
|
29
|
+
super(message, httpMeta);
|
|
30
|
+
this.data$ = err;
|
|
31
|
+
|
|
32
|
+
this.name = "ExchangeApiKeyTokenAuthApiKeysResponse429ResponseBody";
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Conflict
|
|
38
|
+
*/
|
|
39
|
+
export type ExchangeApiKeyTokenAuthApiKeysResponse409ResponseBodyData = {
|
|
40
|
+
message: string;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Conflict
|
|
45
|
+
*/
|
|
46
|
+
export class ExchangeApiKeyTokenAuthApiKeysResponse409ResponseBody
|
|
47
|
+
extends SDKError
|
|
48
|
+
{
|
|
49
|
+
/** The original data that was passed to this error instance. */
|
|
50
|
+
data$: ExchangeApiKeyTokenAuthApiKeysResponse409ResponseBodyData;
|
|
51
|
+
|
|
52
|
+
constructor(
|
|
53
|
+
err: ExchangeApiKeyTokenAuthApiKeysResponse409ResponseBodyData,
|
|
54
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
55
|
+
) {
|
|
56
|
+
const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
|
|
57
|
+
super(message, httpMeta);
|
|
58
|
+
this.data$ = err;
|
|
59
|
+
|
|
60
|
+
this.name = "ExchangeApiKeyTokenAuthApiKeysResponse409ResponseBody";
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Not found
|
|
66
|
+
*/
|
|
67
|
+
export type ExchangeApiKeyTokenAuthApiKeysResponse404ResponseBodyData = {
|
|
68
|
+
message: string;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Not found
|
|
73
|
+
*/
|
|
74
|
+
export class ExchangeApiKeyTokenAuthApiKeysResponse404ResponseBody
|
|
75
|
+
extends SDKError
|
|
76
|
+
{
|
|
77
|
+
/** The original data that was passed to this error instance. */
|
|
78
|
+
data$: ExchangeApiKeyTokenAuthApiKeysResponse404ResponseBodyData;
|
|
79
|
+
|
|
80
|
+
constructor(
|
|
81
|
+
err: ExchangeApiKeyTokenAuthApiKeysResponse404ResponseBodyData,
|
|
82
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
83
|
+
) {
|
|
84
|
+
const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
|
|
85
|
+
super(message, httpMeta);
|
|
86
|
+
this.data$ = err;
|
|
87
|
+
|
|
88
|
+
this.name = "ExchangeApiKeyTokenAuthApiKeysResponse404ResponseBody";
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Forbidden
|
|
94
|
+
*/
|
|
95
|
+
export type ExchangeApiKeyTokenAuthApiKeysResponseResponseBodyData = {
|
|
96
|
+
message: string;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Forbidden
|
|
101
|
+
*/
|
|
102
|
+
export class ExchangeApiKeyTokenAuthApiKeysResponseResponseBody
|
|
103
|
+
extends SDKError
|
|
104
|
+
{
|
|
105
|
+
/** The original data that was passed to this error instance. */
|
|
106
|
+
data$: ExchangeApiKeyTokenAuthApiKeysResponseResponseBodyData;
|
|
107
|
+
|
|
108
|
+
constructor(
|
|
109
|
+
err: ExchangeApiKeyTokenAuthApiKeysResponseResponseBodyData,
|
|
110
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
111
|
+
) {
|
|
112
|
+
const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
|
|
113
|
+
super(message, httpMeta);
|
|
114
|
+
this.data$ = err;
|
|
115
|
+
|
|
116
|
+
this.name = "ExchangeApiKeyTokenAuthApiKeysResponseResponseBody";
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Unauthorized
|
|
122
|
+
*/
|
|
123
|
+
export type ExchangeApiKeyTokenAuthApiKeysResponseBodyData = {
|
|
124
|
+
message: string;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Unauthorized
|
|
129
|
+
*/
|
|
130
|
+
export class ExchangeApiKeyTokenAuthApiKeysResponseBody extends SDKError {
|
|
131
|
+
/** The original data that was passed to this error instance. */
|
|
132
|
+
data$: ExchangeApiKeyTokenAuthApiKeysResponseBodyData;
|
|
133
|
+
|
|
134
|
+
constructor(
|
|
135
|
+
err: ExchangeApiKeyTokenAuthApiKeysResponseBodyData,
|
|
136
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
137
|
+
) {
|
|
138
|
+
const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
|
|
139
|
+
super(message, httpMeta);
|
|
140
|
+
this.data$ = err;
|
|
141
|
+
|
|
142
|
+
this.name = "ExchangeApiKeyTokenAuthApiKeysResponseBody";
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Bad request
|
|
148
|
+
*/
|
|
149
|
+
export type ExchangeApiKeyTokenResponseBodyData = {
|
|
150
|
+
message: string;
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Bad request
|
|
155
|
+
*/
|
|
156
|
+
export class ExchangeApiKeyTokenResponseBody extends SDKError {
|
|
157
|
+
/** The original data that was passed to this error instance. */
|
|
158
|
+
data$: ExchangeApiKeyTokenResponseBodyData;
|
|
159
|
+
|
|
160
|
+
constructor(
|
|
161
|
+
err: ExchangeApiKeyTokenResponseBodyData,
|
|
162
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
163
|
+
) {
|
|
164
|
+
const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
|
|
165
|
+
super(message, httpMeta);
|
|
166
|
+
this.data$ = err;
|
|
167
|
+
|
|
168
|
+
this.name = "ExchangeApiKeyTokenResponseBody";
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/** @internal */
|
|
173
|
+
export const ExchangeApiKeyTokenAuthApiKeysResponse429ResponseBody$inboundSchema:
|
|
174
|
+
z.ZodType<
|
|
175
|
+
ExchangeApiKeyTokenAuthApiKeysResponse429ResponseBody,
|
|
176
|
+
z.ZodTypeDef,
|
|
177
|
+
unknown
|
|
178
|
+
> = z.object({
|
|
179
|
+
message: z.string(),
|
|
180
|
+
request$: z.instanceof(Request),
|
|
181
|
+
response$: z.instanceof(Response),
|
|
182
|
+
body$: z.string(),
|
|
183
|
+
})
|
|
184
|
+
.transform((v) => {
|
|
185
|
+
return new ExchangeApiKeyTokenAuthApiKeysResponse429ResponseBody(v, {
|
|
186
|
+
request: v.request$,
|
|
187
|
+
response: v.response$,
|
|
188
|
+
body: v.body$,
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
/** @internal */
|
|
193
|
+
export type ExchangeApiKeyTokenAuthApiKeysResponse429ResponseBody$Outbound = {
|
|
194
|
+
message: string;
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
/** @internal */
|
|
198
|
+
export const ExchangeApiKeyTokenAuthApiKeysResponse429ResponseBody$outboundSchema:
|
|
199
|
+
z.ZodType<
|
|
200
|
+
ExchangeApiKeyTokenAuthApiKeysResponse429ResponseBody$Outbound,
|
|
201
|
+
z.ZodTypeDef,
|
|
202
|
+
ExchangeApiKeyTokenAuthApiKeysResponse429ResponseBody
|
|
203
|
+
> = z.instanceof(ExchangeApiKeyTokenAuthApiKeysResponse429ResponseBody)
|
|
204
|
+
.transform(v => v.data$)
|
|
205
|
+
.pipe(z.object({
|
|
206
|
+
message: z.string(),
|
|
207
|
+
}));
|
|
208
|
+
|
|
209
|
+
/** @internal */
|
|
210
|
+
export const ExchangeApiKeyTokenAuthApiKeysResponse409ResponseBody$inboundSchema:
|
|
211
|
+
z.ZodType<
|
|
212
|
+
ExchangeApiKeyTokenAuthApiKeysResponse409ResponseBody,
|
|
213
|
+
z.ZodTypeDef,
|
|
214
|
+
unknown
|
|
215
|
+
> = z.object({
|
|
216
|
+
message: z.string(),
|
|
217
|
+
request$: z.instanceof(Request),
|
|
218
|
+
response$: z.instanceof(Response),
|
|
219
|
+
body$: z.string(),
|
|
220
|
+
})
|
|
221
|
+
.transform((v) => {
|
|
222
|
+
return new ExchangeApiKeyTokenAuthApiKeysResponse409ResponseBody(v, {
|
|
223
|
+
request: v.request$,
|
|
224
|
+
response: v.response$,
|
|
225
|
+
body: v.body$,
|
|
226
|
+
});
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
/** @internal */
|
|
230
|
+
export type ExchangeApiKeyTokenAuthApiKeysResponse409ResponseBody$Outbound = {
|
|
231
|
+
message: string;
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
/** @internal */
|
|
235
|
+
export const ExchangeApiKeyTokenAuthApiKeysResponse409ResponseBody$outboundSchema:
|
|
236
|
+
z.ZodType<
|
|
237
|
+
ExchangeApiKeyTokenAuthApiKeysResponse409ResponseBody$Outbound,
|
|
238
|
+
z.ZodTypeDef,
|
|
239
|
+
ExchangeApiKeyTokenAuthApiKeysResponse409ResponseBody
|
|
240
|
+
> = z.instanceof(ExchangeApiKeyTokenAuthApiKeysResponse409ResponseBody)
|
|
241
|
+
.transform(v => v.data$)
|
|
242
|
+
.pipe(z.object({
|
|
243
|
+
message: z.string(),
|
|
244
|
+
}));
|
|
245
|
+
|
|
246
|
+
/** @internal */
|
|
247
|
+
export const ExchangeApiKeyTokenAuthApiKeysResponse404ResponseBody$inboundSchema:
|
|
248
|
+
z.ZodType<
|
|
249
|
+
ExchangeApiKeyTokenAuthApiKeysResponse404ResponseBody,
|
|
250
|
+
z.ZodTypeDef,
|
|
251
|
+
unknown
|
|
252
|
+
> = z.object({
|
|
253
|
+
message: z.string(),
|
|
254
|
+
request$: z.instanceof(Request),
|
|
255
|
+
response$: z.instanceof(Response),
|
|
256
|
+
body$: z.string(),
|
|
257
|
+
})
|
|
258
|
+
.transform((v) => {
|
|
259
|
+
return new ExchangeApiKeyTokenAuthApiKeysResponse404ResponseBody(v, {
|
|
260
|
+
request: v.request$,
|
|
261
|
+
response: v.response$,
|
|
262
|
+
body: v.body$,
|
|
263
|
+
});
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
/** @internal */
|
|
267
|
+
export type ExchangeApiKeyTokenAuthApiKeysResponse404ResponseBody$Outbound = {
|
|
268
|
+
message: string;
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
/** @internal */
|
|
272
|
+
export const ExchangeApiKeyTokenAuthApiKeysResponse404ResponseBody$outboundSchema:
|
|
273
|
+
z.ZodType<
|
|
274
|
+
ExchangeApiKeyTokenAuthApiKeysResponse404ResponseBody$Outbound,
|
|
275
|
+
z.ZodTypeDef,
|
|
276
|
+
ExchangeApiKeyTokenAuthApiKeysResponse404ResponseBody
|
|
277
|
+
> = z.instanceof(ExchangeApiKeyTokenAuthApiKeysResponse404ResponseBody)
|
|
278
|
+
.transform(v => v.data$)
|
|
279
|
+
.pipe(z.object({
|
|
280
|
+
message: z.string(),
|
|
281
|
+
}));
|
|
282
|
+
|
|
283
|
+
/** @internal */
|
|
284
|
+
export const ExchangeApiKeyTokenAuthApiKeysResponseResponseBody$inboundSchema:
|
|
285
|
+
z.ZodType<
|
|
286
|
+
ExchangeApiKeyTokenAuthApiKeysResponseResponseBody,
|
|
287
|
+
z.ZodTypeDef,
|
|
288
|
+
unknown
|
|
289
|
+
> = z.object({
|
|
290
|
+
message: z.string(),
|
|
291
|
+
request$: z.instanceof(Request),
|
|
292
|
+
response$: z.instanceof(Response),
|
|
293
|
+
body$: z.string(),
|
|
294
|
+
})
|
|
295
|
+
.transform((v) => {
|
|
296
|
+
return new ExchangeApiKeyTokenAuthApiKeysResponseResponseBody(v, {
|
|
297
|
+
request: v.request$,
|
|
298
|
+
response: v.response$,
|
|
299
|
+
body: v.body$,
|
|
300
|
+
});
|
|
301
|
+
});
|
|
302
|
+
|
|
303
|
+
/** @internal */
|
|
304
|
+
export type ExchangeApiKeyTokenAuthApiKeysResponseResponseBody$Outbound = {
|
|
305
|
+
message: string;
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
/** @internal */
|
|
309
|
+
export const ExchangeApiKeyTokenAuthApiKeysResponseResponseBody$outboundSchema:
|
|
310
|
+
z.ZodType<
|
|
311
|
+
ExchangeApiKeyTokenAuthApiKeysResponseResponseBody$Outbound,
|
|
312
|
+
z.ZodTypeDef,
|
|
313
|
+
ExchangeApiKeyTokenAuthApiKeysResponseResponseBody
|
|
314
|
+
> = z.instanceof(ExchangeApiKeyTokenAuthApiKeysResponseResponseBody)
|
|
315
|
+
.transform(v => v.data$)
|
|
316
|
+
.pipe(z.object({
|
|
317
|
+
message: z.string(),
|
|
318
|
+
}));
|
|
319
|
+
|
|
320
|
+
/** @internal */
|
|
321
|
+
export const ExchangeApiKeyTokenAuthApiKeysResponseBody$inboundSchema:
|
|
322
|
+
z.ZodType<ExchangeApiKeyTokenAuthApiKeysResponseBody, z.ZodTypeDef, unknown> =
|
|
323
|
+
z.object({
|
|
324
|
+
message: z.string(),
|
|
325
|
+
request$: z.instanceof(Request),
|
|
326
|
+
response$: z.instanceof(Response),
|
|
327
|
+
body$: z.string(),
|
|
328
|
+
})
|
|
329
|
+
.transform((v) => {
|
|
330
|
+
return new ExchangeApiKeyTokenAuthApiKeysResponseBody(v, {
|
|
331
|
+
request: v.request$,
|
|
332
|
+
response: v.response$,
|
|
333
|
+
body: v.body$,
|
|
334
|
+
});
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
/** @internal */
|
|
338
|
+
export type ExchangeApiKeyTokenAuthApiKeysResponseBody$Outbound = {
|
|
339
|
+
message: string;
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
/** @internal */
|
|
343
|
+
export const ExchangeApiKeyTokenAuthApiKeysResponseBody$outboundSchema:
|
|
344
|
+
z.ZodType<
|
|
345
|
+
ExchangeApiKeyTokenAuthApiKeysResponseBody$Outbound,
|
|
346
|
+
z.ZodTypeDef,
|
|
347
|
+
ExchangeApiKeyTokenAuthApiKeysResponseBody
|
|
348
|
+
> = z.instanceof(ExchangeApiKeyTokenAuthApiKeysResponseBody)
|
|
349
|
+
.transform(v => v.data$)
|
|
350
|
+
.pipe(z.object({
|
|
351
|
+
message: z.string(),
|
|
352
|
+
}));
|
|
353
|
+
|
|
354
|
+
/** @internal */
|
|
355
|
+
export const ExchangeApiKeyTokenResponseBody$inboundSchema: z.ZodType<
|
|
356
|
+
ExchangeApiKeyTokenResponseBody,
|
|
357
|
+
z.ZodTypeDef,
|
|
358
|
+
unknown
|
|
359
|
+
> = z.object({
|
|
360
|
+
message: z.string(),
|
|
361
|
+
request$: z.instanceof(Request),
|
|
362
|
+
response$: z.instanceof(Response),
|
|
363
|
+
body$: z.string(),
|
|
364
|
+
})
|
|
365
|
+
.transform((v) => {
|
|
366
|
+
return new ExchangeApiKeyTokenResponseBody(v, {
|
|
367
|
+
request: v.request$,
|
|
368
|
+
response: v.response$,
|
|
369
|
+
body: v.body$,
|
|
370
|
+
});
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
/** @internal */
|
|
374
|
+
export type ExchangeApiKeyTokenResponseBody$Outbound = {
|
|
375
|
+
message: string;
|
|
376
|
+
};
|
|
377
|
+
|
|
378
|
+
/** @internal */
|
|
379
|
+
export const ExchangeApiKeyTokenResponseBody$outboundSchema: z.ZodType<
|
|
380
|
+
ExchangeApiKeyTokenResponseBody$Outbound,
|
|
381
|
+
z.ZodTypeDef,
|
|
382
|
+
ExchangeApiKeyTokenResponseBody
|
|
383
|
+
> = z.instanceof(ExchangeApiKeyTokenResponseBody)
|
|
384
|
+
.transform(v => v.data$)
|
|
385
|
+
.pipe(z.object({
|
|
386
|
+
message: z.string(),
|
|
387
|
+
}));
|
|
@@ -15,6 +15,7 @@ export * from "./deleteserviceaccountapikey.js";
|
|
|
15
15
|
export * from "./deleteteam.js";
|
|
16
16
|
export * from "./errorenvelope.js";
|
|
17
17
|
export * from "./errorresponse.js";
|
|
18
|
+
export * from "./exchangeapikeytoken.js";
|
|
18
19
|
export * from "./getclusterinviteinfo.js";
|
|
19
20
|
export * from "./getclusterorg.js";
|
|
20
21
|
export * from "./getfilecontent.js";
|
|
@@ -0,0 +1,191 @@
|
|
|
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 { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type ExchangeApiKeyTokenRequestBody = {
|
|
12
|
+
/**
|
|
13
|
+
* JWT audience (aud) claim for the exchanged token. Set this to the target API/service URL that should accept the token.
|
|
14
|
+
*/
|
|
15
|
+
audience: string;
|
|
16
|
+
/**
|
|
17
|
+
* Your external user identifier to place in the JWT subject (sub) claim. Must be 1–150 printable-ASCII characters and not the wildcard `*`.
|
|
18
|
+
*/
|
|
19
|
+
externalUserId: string;
|
|
20
|
+
/**
|
|
21
|
+
* Token lifetime in seconds. Must be between 300 (5 minutes) and 2592000 (30 days). Defaults to 3600 (1 hour).
|
|
22
|
+
*/
|
|
23
|
+
expiresIn?: number | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Optional subset of API key permissions to embed in the token. If omitted, all API key permissions are used.
|
|
26
|
+
*/
|
|
27
|
+
permissions?: Array<string> | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type ExchangeApiKeyTokenRequest = {
|
|
31
|
+
/**
|
|
32
|
+
* Optional external end-user identifier forwarded by the API gateway.
|
|
33
|
+
*/
|
|
34
|
+
xOnBehalfOf?: string | undefined;
|
|
35
|
+
requestBody?: ExchangeApiKeyTokenRequestBody | undefined;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Signed JWT
|
|
40
|
+
*/
|
|
41
|
+
export type ExchangeApiKeyTokenResponseBody = {
|
|
42
|
+
/**
|
|
43
|
+
* Signed JWT exchange token to use when calling downstream services.
|
|
44
|
+
*/
|
|
45
|
+
token: string;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const ExchangeApiKeyTokenRequestBody$inboundSchema: z.ZodType<
|
|
50
|
+
ExchangeApiKeyTokenRequestBody,
|
|
51
|
+
z.ZodTypeDef,
|
|
52
|
+
unknown
|
|
53
|
+
> = z.object({
|
|
54
|
+
audience: z.string(),
|
|
55
|
+
externalUserId: z.string(),
|
|
56
|
+
expiresIn: z.number().default(3600),
|
|
57
|
+
permissions: z.array(z.string()).optional(),
|
|
58
|
+
});
|
|
59
|
+
/** @internal */
|
|
60
|
+
export type ExchangeApiKeyTokenRequestBody$Outbound = {
|
|
61
|
+
audience: string;
|
|
62
|
+
externalUserId: string;
|
|
63
|
+
expiresIn: number;
|
|
64
|
+
permissions?: Array<string> | undefined;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/** @internal */
|
|
68
|
+
export const ExchangeApiKeyTokenRequestBody$outboundSchema: z.ZodType<
|
|
69
|
+
ExchangeApiKeyTokenRequestBody$Outbound,
|
|
70
|
+
z.ZodTypeDef,
|
|
71
|
+
ExchangeApiKeyTokenRequestBody
|
|
72
|
+
> = z.object({
|
|
73
|
+
audience: z.string(),
|
|
74
|
+
externalUserId: z.string(),
|
|
75
|
+
expiresIn: z.number().default(3600),
|
|
76
|
+
permissions: z.array(z.string()).optional(),
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
export function exchangeApiKeyTokenRequestBodyToJSON(
|
|
80
|
+
exchangeApiKeyTokenRequestBody: ExchangeApiKeyTokenRequestBody,
|
|
81
|
+
): string {
|
|
82
|
+
return JSON.stringify(
|
|
83
|
+
ExchangeApiKeyTokenRequestBody$outboundSchema.parse(
|
|
84
|
+
exchangeApiKeyTokenRequestBody,
|
|
85
|
+
),
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
export function exchangeApiKeyTokenRequestBodyFromJSON(
|
|
89
|
+
jsonString: string,
|
|
90
|
+
): SafeParseResult<ExchangeApiKeyTokenRequestBody, SDKValidationError> {
|
|
91
|
+
return safeParse(
|
|
92
|
+
jsonString,
|
|
93
|
+
(x) => ExchangeApiKeyTokenRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
94
|
+
`Failed to parse 'ExchangeApiKeyTokenRequestBody' from JSON`,
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** @internal */
|
|
99
|
+
export const ExchangeApiKeyTokenRequest$inboundSchema: z.ZodType<
|
|
100
|
+
ExchangeApiKeyTokenRequest,
|
|
101
|
+
z.ZodTypeDef,
|
|
102
|
+
unknown
|
|
103
|
+
> = z.object({
|
|
104
|
+
"X-On-Behalf-Of": z.string().optional(),
|
|
105
|
+
RequestBody: z.lazy(() => ExchangeApiKeyTokenRequestBody$inboundSchema)
|
|
106
|
+
.optional(),
|
|
107
|
+
}).transform((v) => {
|
|
108
|
+
return remap$(v, {
|
|
109
|
+
"X-On-Behalf-Of": "xOnBehalfOf",
|
|
110
|
+
"RequestBody": "requestBody",
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
/** @internal */
|
|
114
|
+
export type ExchangeApiKeyTokenRequest$Outbound = {
|
|
115
|
+
"X-On-Behalf-Of"?: string | undefined;
|
|
116
|
+
RequestBody?: ExchangeApiKeyTokenRequestBody$Outbound | undefined;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/** @internal */
|
|
120
|
+
export const ExchangeApiKeyTokenRequest$outboundSchema: z.ZodType<
|
|
121
|
+
ExchangeApiKeyTokenRequest$Outbound,
|
|
122
|
+
z.ZodTypeDef,
|
|
123
|
+
ExchangeApiKeyTokenRequest
|
|
124
|
+
> = z.object({
|
|
125
|
+
xOnBehalfOf: z.string().optional(),
|
|
126
|
+
requestBody: z.lazy(() => ExchangeApiKeyTokenRequestBody$outboundSchema)
|
|
127
|
+
.optional(),
|
|
128
|
+
}).transform((v) => {
|
|
129
|
+
return remap$(v, {
|
|
130
|
+
xOnBehalfOf: "X-On-Behalf-Of",
|
|
131
|
+
requestBody: "RequestBody",
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
export function exchangeApiKeyTokenRequestToJSON(
|
|
136
|
+
exchangeApiKeyTokenRequest: ExchangeApiKeyTokenRequest,
|
|
137
|
+
): string {
|
|
138
|
+
return JSON.stringify(
|
|
139
|
+
ExchangeApiKeyTokenRequest$outboundSchema.parse(exchangeApiKeyTokenRequest),
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
export function exchangeApiKeyTokenRequestFromJSON(
|
|
143
|
+
jsonString: string,
|
|
144
|
+
): SafeParseResult<ExchangeApiKeyTokenRequest, SDKValidationError> {
|
|
145
|
+
return safeParse(
|
|
146
|
+
jsonString,
|
|
147
|
+
(x) => ExchangeApiKeyTokenRequest$inboundSchema.parse(JSON.parse(x)),
|
|
148
|
+
`Failed to parse 'ExchangeApiKeyTokenRequest' from JSON`,
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/** @internal */
|
|
153
|
+
export const ExchangeApiKeyTokenResponseBody$inboundSchema: z.ZodType<
|
|
154
|
+
ExchangeApiKeyTokenResponseBody,
|
|
155
|
+
z.ZodTypeDef,
|
|
156
|
+
unknown
|
|
157
|
+
> = z.object({
|
|
158
|
+
token: z.string(),
|
|
159
|
+
});
|
|
160
|
+
/** @internal */
|
|
161
|
+
export type ExchangeApiKeyTokenResponseBody$Outbound = {
|
|
162
|
+
token: string;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
/** @internal */
|
|
166
|
+
export const ExchangeApiKeyTokenResponseBody$outboundSchema: z.ZodType<
|
|
167
|
+
ExchangeApiKeyTokenResponseBody$Outbound,
|
|
168
|
+
z.ZodTypeDef,
|
|
169
|
+
ExchangeApiKeyTokenResponseBody
|
|
170
|
+
> = z.object({
|
|
171
|
+
token: z.string(),
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
export function exchangeApiKeyTokenResponseBodyToJSON(
|
|
175
|
+
exchangeApiKeyTokenResponseBody: ExchangeApiKeyTokenResponseBody,
|
|
176
|
+
): string {
|
|
177
|
+
return JSON.stringify(
|
|
178
|
+
ExchangeApiKeyTokenResponseBody$outboundSchema.parse(
|
|
179
|
+
exchangeApiKeyTokenResponseBody,
|
|
180
|
+
),
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
export function exchangeApiKeyTokenResponseBodyFromJSON(
|
|
184
|
+
jsonString: string,
|
|
185
|
+
): SafeParseResult<ExchangeApiKeyTokenResponseBody, SDKValidationError> {
|
|
186
|
+
return safeParse(
|
|
187
|
+
jsonString,
|
|
188
|
+
(x) => ExchangeApiKeyTokenResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
189
|
+
`Failed to parse 'ExchangeApiKeyTokenResponseBody' from JSON`,
|
|
190
|
+
);
|
|
191
|
+
}
|
|
@@ -98,6 +98,7 @@ export * from "./downloadworkspacearchive.js";
|
|
|
98
98
|
export * from "./downloadworkspacefile.js";
|
|
99
99
|
export * from "./dropindex.js";
|
|
100
100
|
export * from "./embed.js";
|
|
101
|
+
export * from "./exchangeapikeytoken.js";
|
|
101
102
|
export * from "./extract.js";
|
|
102
103
|
export * from "./extractwithschema.js";
|
|
103
104
|
export * from "./getagent.js";
|
|
@@ -53,6 +53,8 @@ export type AuthApiKeyGetJwtFromKeyMutationError =
|
|
|
53
53
|
*
|
|
54
54
|
* @remarks
|
|
55
55
|
* Exchange an API key for a JWT token
|
|
56
|
+
*
|
|
57
|
+
* @deprecated method: Use auth.apiKeys.exchangeToken() instead. This method will be removed in a future release.. Use exchangeToken instead.
|
|
56
58
|
*/
|
|
57
59
|
export function useAuthApiKeyGetJwtFromKeyMutation(
|
|
58
60
|
options?: MutationHookOptions<
|