@hartl-services/medusa-contracts 1.6.0 → 1.7.0
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 +6 -1
- package/dist/esm/order-assistant/paths.mjs +26 -0
- package/dist/esm/order-assistant/schemas.mjs +203 -1
- package/dist/order-assistant/paths.d.ts +26 -0
- package/dist/order-assistant/paths.js +26 -0
- package/dist/order-assistant/schemas.d.ts +178 -0
- package/dist/order-assistant/schemas.js +204 -1
- package/dist/order-assistant/types.d.ts +17 -1
- package/dist/plugin-features/schemas.d.ts +36 -36
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -77,7 +77,12 @@ The order assistant (`order-assistant`) is not a JSON REST route: `paths` holds
|
|
|
77
77
|
the MCP endpoint (`/mcp`), `schemas` the input and output schemas of its four
|
|
78
78
|
tools, the tool names and the order metadata keys the assistant writes, and
|
|
79
79
|
`types` their inferred types. A storefront never calls it; the consumer is an
|
|
80
|
-
MCP client (an AI chatbot) and the base's own tests.
|
|
80
|
+
MCP client (an AI chatbot) and the base's own tests. Since 1.7.0 the same
|
|
81
|
+
subpaths also hold the assistant's OAuth sign-in: `paths.oauth` (discovery,
|
|
82
|
+
registration, authorization, token), `paths.admin` and `paths.adminPages`
|
|
83
|
+
(consent page and connected chatbots in the Admin), the request and response
|
|
84
|
+
schemas of those endpoints, `ORDER_ASSISTANT_FEATURES` and
|
|
85
|
+
`ORDER_ASSISTANT_OAUTH` (scope and lifetimes).
|
|
81
86
|
|
|
82
87
|
File Gateway responses are binary and have no JSON response DTO. Public paths
|
|
83
88
|
come from `paths/files`. Private gateway URLs are opaque, signed server results
|
|
@@ -1,7 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The shop's MCP endpoint for the order assistant (Streamable HTTP,
|
|
3
3
|
* stateless). Outside `/admin` and `/store`: it authenticates on its own.
|
|
4
|
+
*
|
|
5
|
+
* `oauth`: the OAuth 2.1 endpoints an MCP client (claude.ai, ChatGPT) uses
|
|
6
|
+
* to sign an Admin user in; the well-known paths are fixed by RFC 9728 and
|
|
7
|
+
* RFC 8414. `admin`: the Admin API behind the consent page and the list of
|
|
8
|
+
* connected chatbots. `adminPages`: Admin pages, relative to the Admin root.
|
|
4
9
|
*/
|
|
5
10
|
export const orderAssistantPaths = {
|
|
6
11
|
mcp: "/mcp",
|
|
12
|
+
oauth: {
|
|
13
|
+
protectedResourceMetadata: "/.well-known/oauth-protected-resource",
|
|
14
|
+
/** Same document; clients probe the path of the MCP endpoint first. */
|
|
15
|
+
protectedResourceMetadataForMcp: "/.well-known/oauth-protected-resource/mcp",
|
|
16
|
+
authorizationServerMetadata: "/.well-known/oauth-authorization-server",
|
|
17
|
+
register: "/mcp/oauth/register",
|
|
18
|
+
authorize: "/mcp/oauth/authorize",
|
|
19
|
+
token: "/mcp/oauth/token",
|
|
20
|
+
},
|
|
21
|
+
admin: {
|
|
22
|
+
authorization: (authorizationId) => `/admin/order-assistant/authorizations/${encodeURIComponent(authorizationId)}`,
|
|
23
|
+
connections: "/admin/order-assistant/connections",
|
|
24
|
+
connection: (connectionId) => `/admin/order-assistant/connections/${encodeURIComponent(connectionId)}`,
|
|
25
|
+
},
|
|
26
|
+
adminPages: {
|
|
27
|
+
/**
|
|
28
|
+
* The request id is a path segment on purpose: the Admin login returns
|
|
29
|
+
* to the path it came from and drops the query string.
|
|
30
|
+
*/
|
|
31
|
+
authorize: (authorizationId) => `/order-assistant/authorize/${encodeURIComponent(authorizationId)}`,
|
|
32
|
+
},
|
|
7
33
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "@medusajs/framework/zod";
|
|
2
|
-
import { NonEmptyStringSchema } from "../shared/primitives.mjs";
|
|
2
|
+
import { NonEmptyStringSchema, WireDateSchema } from "../shared/primitives.mjs";
|
|
3
3
|
/** Plugin key and container key of the order assistant in the base. */
|
|
4
4
|
export const ORDER_ASSISTANT_PLUGIN_KEY = "order_assistant";
|
|
5
5
|
/** Tool names as the MCP client sees them. */
|
|
@@ -181,3 +181,205 @@ export const CreateDraftOrderOutputSchema = z.object({
|
|
|
181
181
|
/** Path of the draft in the Admin, relative to the backend URL. */
|
|
182
182
|
admin_path: z.string(),
|
|
183
183
|
});
|
|
184
|
+
// --- Anmeldung per OAuth (MCP authorization, OAuth 2.1) --------------------
|
|
185
|
+
/** Feature keys of the order assistant's plugin toggles. */
|
|
186
|
+
export const ORDER_ASSISTANT_FEATURES = {
|
|
187
|
+
oauth: "oauth",
|
|
188
|
+
};
|
|
189
|
+
export const ORDER_ASSISTANT_OAUTH = {
|
|
190
|
+
/** The one scope: use the assistant's tools as the signed-in Admin user. */
|
|
191
|
+
scope: "order_assistant",
|
|
192
|
+
accessTokenTtlSeconds: 3600,
|
|
193
|
+
/** A connection ends when its refresh token stays unused this long. */
|
|
194
|
+
connectionIdleDays: 30,
|
|
195
|
+
/** How long the consent page may stay open. */
|
|
196
|
+
authorizationRequestTtlSeconds: 600,
|
|
197
|
+
/** How long the client has to redeem the code after the consent. */
|
|
198
|
+
authorizationCodeTtlSeconds: 120,
|
|
199
|
+
maxRedirectUris: 10,
|
|
200
|
+
maxUriLength: 2000,
|
|
201
|
+
maxClientNameLength: 120,
|
|
202
|
+
maxStateLength: 2000,
|
|
203
|
+
};
|
|
204
|
+
const OAUTH_LOOPBACK_HOSTS = ["localhost", "127.0.0.1", "[::1]"];
|
|
205
|
+
/** `http://localhost`, `http://127.0.0.1` or `http://[::1]`, any port. */
|
|
206
|
+
export const isOAuthLoopbackRedirectUri = (value) => {
|
|
207
|
+
try {
|
|
208
|
+
const url = new URL(value);
|
|
209
|
+
return (url.protocol === "http:" && OAUTH_LOOPBACK_HOSTS.includes(url.hostname));
|
|
210
|
+
}
|
|
211
|
+
catch {
|
|
212
|
+
return false;
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
/**
|
|
216
|
+
* A redirect URI a client may register: https, or http on a loopback address
|
|
217
|
+
* (native clients such as Claude Code), without credentials or fragment.
|
|
218
|
+
*/
|
|
219
|
+
export const OAuthRedirectUriSchema = z
|
|
220
|
+
.string()
|
|
221
|
+
.max(ORDER_ASSISTANT_OAUTH.maxUriLength)
|
|
222
|
+
.refine((value) => {
|
|
223
|
+
let url;
|
|
224
|
+
try {
|
|
225
|
+
url = new URL(value);
|
|
226
|
+
}
|
|
227
|
+
catch {
|
|
228
|
+
return false;
|
|
229
|
+
}
|
|
230
|
+
if (url.hash || url.username || url.password) {
|
|
231
|
+
return false;
|
|
232
|
+
}
|
|
233
|
+
return url.protocol === "https:" || isOAuthLoopbackRedirectUri(value);
|
|
234
|
+
}, {
|
|
235
|
+
message: "A redirect URI must use https, or http on a loopback address, and carry no fragment.",
|
|
236
|
+
});
|
|
237
|
+
/**
|
|
238
|
+
* Dynamic client registration request (RFC 7591). Unknown metadata is
|
|
239
|
+
* ignored; the requested authentication method, grant and response types are
|
|
240
|
+
* accepted as sent and answered with what the server actually supports.
|
|
241
|
+
*/
|
|
242
|
+
export const OAuthClientRegistrationRequestSchema = z.object({
|
|
243
|
+
redirect_uris: z
|
|
244
|
+
.array(OAuthRedirectUriSchema)
|
|
245
|
+
.min(1)
|
|
246
|
+
.max(ORDER_ASSISTANT_OAUTH.maxRedirectUris),
|
|
247
|
+
client_name: z
|
|
248
|
+
.string()
|
|
249
|
+
.trim()
|
|
250
|
+
.min(1)
|
|
251
|
+
.max(ORDER_ASSISTANT_OAUTH.maxClientNameLength)
|
|
252
|
+
.optional(),
|
|
253
|
+
});
|
|
254
|
+
export const OAuthClientRegistrationResponseSchema = z.object({
|
|
255
|
+
client_id: z.string(),
|
|
256
|
+
/** Seconds since the epoch. */
|
|
257
|
+
client_id_issued_at: z.number(),
|
|
258
|
+
client_name: z.string().optional(),
|
|
259
|
+
redirect_uris: z.array(z.string()),
|
|
260
|
+
/** Public clients only: PKCE instead of a client secret. */
|
|
261
|
+
token_endpoint_auth_method: z.literal("none"),
|
|
262
|
+
grant_types: z.array(z.string()),
|
|
263
|
+
response_types: z.array(z.string()),
|
|
264
|
+
scope: z.string(),
|
|
265
|
+
});
|
|
266
|
+
/** Query of the authorization endpoint, before the client is looked up. */
|
|
267
|
+
export const OAuthAuthorizeQuerySchema = z.object({
|
|
268
|
+
client_id: z.string().min(1).max(200),
|
|
269
|
+
redirect_uri: z.string().min(1).max(ORDER_ASSISTANT_OAUTH.maxUriLength),
|
|
270
|
+
response_type: z.string().max(100).optional(),
|
|
271
|
+
code_challenge: z.string().max(200).optional(),
|
|
272
|
+
code_challenge_method: z.string().max(20).optional(),
|
|
273
|
+
state: z.string().max(ORDER_ASSISTANT_OAUTH.maxStateLength).optional(),
|
|
274
|
+
scope: z.string().max(1000).optional(),
|
|
275
|
+
resource: z.string().max(ORDER_ASSISTANT_OAUTH.maxUriLength).optional(),
|
|
276
|
+
});
|
|
277
|
+
/** Body of the token endpoint (`application/x-www-form-urlencoded`). */
|
|
278
|
+
export const OAuthTokenRequestSchema = z.discriminatedUnion("grant_type", [
|
|
279
|
+
z.object({
|
|
280
|
+
grant_type: z.literal("authorization_code"),
|
|
281
|
+
code: z.string().min(1).max(200),
|
|
282
|
+
/** RFC 7636: 43 to 128 unreserved characters. */
|
|
283
|
+
code_verifier: z.string().regex(/^[A-Za-z0-9\-._~]{43,128}$/),
|
|
284
|
+
client_id: z.string().min(1).max(200),
|
|
285
|
+
redirect_uri: z.string().max(ORDER_ASSISTANT_OAUTH.maxUriLength).optional(),
|
|
286
|
+
resource: z.string().max(ORDER_ASSISTANT_OAUTH.maxUriLength).optional(),
|
|
287
|
+
}),
|
|
288
|
+
z.object({
|
|
289
|
+
grant_type: z.literal("refresh_token"),
|
|
290
|
+
refresh_token: z.string().min(1).max(200),
|
|
291
|
+
client_id: z.string().min(1).max(200),
|
|
292
|
+
resource: z.string().max(ORDER_ASSISTANT_OAUTH.maxUriLength).optional(),
|
|
293
|
+
}),
|
|
294
|
+
]);
|
|
295
|
+
export const OAuthTokenResponseSchema = z.object({
|
|
296
|
+
access_token: z.string(),
|
|
297
|
+
token_type: z.literal("Bearer"),
|
|
298
|
+
/** Seconds until the access token expires. */
|
|
299
|
+
expires_in: z.number(),
|
|
300
|
+
/** Replaces the refresh token that was sent; the old one stops working. */
|
|
301
|
+
refresh_token: z.string(),
|
|
302
|
+
scope: z.string(),
|
|
303
|
+
});
|
|
304
|
+
export const OAuthErrorCodeSchema = z.enum([
|
|
305
|
+
"invalid_request",
|
|
306
|
+
"invalid_client",
|
|
307
|
+
"invalid_grant",
|
|
308
|
+
"invalid_target",
|
|
309
|
+
"invalid_client_metadata",
|
|
310
|
+
"invalid_redirect_uri",
|
|
311
|
+
"unsupported_grant_type",
|
|
312
|
+
"unsupported_response_type",
|
|
313
|
+
"access_denied",
|
|
314
|
+
"temporarily_unavailable",
|
|
315
|
+
]);
|
|
316
|
+
/** Error body of the registration and token endpoints (RFC 6749, RFC 7591). */
|
|
317
|
+
export const OAuthErrorResponseSchema = z.object({
|
|
318
|
+
error: OAuthErrorCodeSchema,
|
|
319
|
+
error_description: z.string(),
|
|
320
|
+
});
|
|
321
|
+
/** RFC 9728: where the MCP endpoint's authorization server is. */
|
|
322
|
+
export const OAuthProtectedResourceMetadataSchema = z.object({
|
|
323
|
+
resource: z.string(),
|
|
324
|
+
authorization_servers: z.array(z.string()),
|
|
325
|
+
bearer_methods_supported: z.array(z.string()),
|
|
326
|
+
scopes_supported: z.array(z.string()),
|
|
327
|
+
resource_name: z.string(),
|
|
328
|
+
});
|
|
329
|
+
/** RFC 8414: the authorization server's endpoints and capabilities. */
|
|
330
|
+
export const OAuthAuthorizationServerMetadataSchema = z.object({
|
|
331
|
+
issuer: z.string(),
|
|
332
|
+
authorization_endpoint: z.string(),
|
|
333
|
+
token_endpoint: z.string(),
|
|
334
|
+
registration_endpoint: z.string(),
|
|
335
|
+
response_types_supported: z.array(z.string()),
|
|
336
|
+
grant_types_supported: z.array(z.string()),
|
|
337
|
+
code_challenge_methods_supported: z.array(z.string()),
|
|
338
|
+
token_endpoint_auth_methods_supported: z.array(z.string()),
|
|
339
|
+
scopes_supported: z.array(z.string()),
|
|
340
|
+
/** RFC 9207: every authorization response carries `iss`. */
|
|
341
|
+
authorization_response_iss_parameter_supported: z.boolean(),
|
|
342
|
+
});
|
|
343
|
+
/** What the consent page shows about a pending sign-in request. */
|
|
344
|
+
export const AdminOrderAssistantAuthorizationSchema = z.object({
|
|
345
|
+
id: z.string(),
|
|
346
|
+
/** Name the chatbot registered with; `null` when it gave none. */
|
|
347
|
+
client_name: z.string().nullable(),
|
|
348
|
+
/** Host the browser is sent back to after the decision. */
|
|
349
|
+
redirect_host: z.string(),
|
|
350
|
+
/** True when the chatbot runs on this computer (loopback redirect). */
|
|
351
|
+
redirect_is_loopback: z.boolean(),
|
|
352
|
+
/** True when the host belongs to a chatbot service the shop knows. */
|
|
353
|
+
redirect_is_known: z.boolean(),
|
|
354
|
+
expires_at: WireDateSchema,
|
|
355
|
+
});
|
|
356
|
+
export const AdminOrderAssistantAuthorizationResponseSchema = z.object({
|
|
357
|
+
authorization: AdminOrderAssistantAuthorizationSchema,
|
|
358
|
+
});
|
|
359
|
+
export const DecideOrderAssistantAuthorizationSchema = z
|
|
360
|
+
.object({ approve: z.boolean() })
|
|
361
|
+
.strict();
|
|
362
|
+
export const DecideOrderAssistantAuthorizationResponseSchema = z.object({
|
|
363
|
+
/** Where the browser must go next: the chatbot's redirect URI. */
|
|
364
|
+
redirect_to: z.string(),
|
|
365
|
+
});
|
|
366
|
+
/** One chatbot an Admin user connected through OAuth. */
|
|
367
|
+
export const AdminOrderAssistantConnectionSchema = z.object({
|
|
368
|
+
id: z.string(),
|
|
369
|
+
client_name: z.string().nullable(),
|
|
370
|
+
redirect_host: z.string(),
|
|
371
|
+
user_id: z.string(),
|
|
372
|
+
/** `null` when the Admin user no longer exists. */
|
|
373
|
+
user_email: z.string().nullable(),
|
|
374
|
+
created_at: WireDateSchema,
|
|
375
|
+
last_used_at: WireDateSchema.nullable(),
|
|
376
|
+
/** When the connection ends unless the chatbot uses it before. */
|
|
377
|
+
expires_at: WireDateSchema,
|
|
378
|
+
});
|
|
379
|
+
export const AdminOrderAssistantConnectionsResponseSchema = z.object({
|
|
380
|
+
connections: z.array(AdminOrderAssistantConnectionSchema),
|
|
381
|
+
});
|
|
382
|
+
export const DeleteOrderAssistantConnectionResponseSchema = z.object({
|
|
383
|
+
id: z.string(),
|
|
384
|
+
deleted: z.literal(true),
|
|
385
|
+
});
|
|
@@ -1,7 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The shop's MCP endpoint for the order assistant (Streamable HTTP,
|
|
3
3
|
* stateless). Outside `/admin` and `/store`: it authenticates on its own.
|
|
4
|
+
*
|
|
5
|
+
* `oauth`: the OAuth 2.1 endpoints an MCP client (claude.ai, ChatGPT) uses
|
|
6
|
+
* to sign an Admin user in; the well-known paths are fixed by RFC 9728 and
|
|
7
|
+
* RFC 8414. `admin`: the Admin API behind the consent page and the list of
|
|
8
|
+
* connected chatbots. `adminPages`: Admin pages, relative to the Admin root.
|
|
4
9
|
*/
|
|
5
10
|
export declare const orderAssistantPaths: {
|
|
6
11
|
readonly mcp: "/mcp";
|
|
12
|
+
readonly oauth: {
|
|
13
|
+
readonly protectedResourceMetadata: "/.well-known/oauth-protected-resource";
|
|
14
|
+
/** Same document; clients probe the path of the MCP endpoint first. */
|
|
15
|
+
readonly protectedResourceMetadataForMcp: "/.well-known/oauth-protected-resource/mcp";
|
|
16
|
+
readonly authorizationServerMetadata: "/.well-known/oauth-authorization-server";
|
|
17
|
+
readonly register: "/mcp/oauth/register";
|
|
18
|
+
readonly authorize: "/mcp/oauth/authorize";
|
|
19
|
+
readonly token: "/mcp/oauth/token";
|
|
20
|
+
};
|
|
21
|
+
readonly admin: {
|
|
22
|
+
readonly authorization: (authorizationId: string) => string;
|
|
23
|
+
readonly connections: "/admin/order-assistant/connections";
|
|
24
|
+
readonly connection: (connectionId: string) => string;
|
|
25
|
+
};
|
|
26
|
+
readonly adminPages: {
|
|
27
|
+
/**
|
|
28
|
+
* The request id is a path segment on purpose: the Admin login returns
|
|
29
|
+
* to the path it came from and drops the query string.
|
|
30
|
+
*/
|
|
31
|
+
readonly authorize: (authorizationId: string) => string;
|
|
32
|
+
};
|
|
7
33
|
};
|
|
@@ -4,7 +4,33 @@ exports.orderAssistantPaths = void 0;
|
|
|
4
4
|
/**
|
|
5
5
|
* The shop's MCP endpoint for the order assistant (Streamable HTTP,
|
|
6
6
|
* stateless). Outside `/admin` and `/store`: it authenticates on its own.
|
|
7
|
+
*
|
|
8
|
+
* `oauth`: the OAuth 2.1 endpoints an MCP client (claude.ai, ChatGPT) uses
|
|
9
|
+
* to sign an Admin user in; the well-known paths are fixed by RFC 9728 and
|
|
10
|
+
* RFC 8414. `admin`: the Admin API behind the consent page and the list of
|
|
11
|
+
* connected chatbots. `adminPages`: Admin pages, relative to the Admin root.
|
|
7
12
|
*/
|
|
8
13
|
exports.orderAssistantPaths = {
|
|
9
14
|
mcp: "/mcp",
|
|
15
|
+
oauth: {
|
|
16
|
+
protectedResourceMetadata: "/.well-known/oauth-protected-resource",
|
|
17
|
+
/** Same document; clients probe the path of the MCP endpoint first. */
|
|
18
|
+
protectedResourceMetadataForMcp: "/.well-known/oauth-protected-resource/mcp",
|
|
19
|
+
authorizationServerMetadata: "/.well-known/oauth-authorization-server",
|
|
20
|
+
register: "/mcp/oauth/register",
|
|
21
|
+
authorize: "/mcp/oauth/authorize",
|
|
22
|
+
token: "/mcp/oauth/token",
|
|
23
|
+
},
|
|
24
|
+
admin: {
|
|
25
|
+
authorization: (authorizationId) => `/admin/order-assistant/authorizations/${encodeURIComponent(authorizationId)}`,
|
|
26
|
+
connections: "/admin/order-assistant/connections",
|
|
27
|
+
connection: (connectionId) => `/admin/order-assistant/connections/${encodeURIComponent(connectionId)}`,
|
|
28
|
+
},
|
|
29
|
+
adminPages: {
|
|
30
|
+
/**
|
|
31
|
+
* The request id is a path segment on purpose: the Admin login returns
|
|
32
|
+
* to the path it came from and drops the query string.
|
|
33
|
+
*/
|
|
34
|
+
authorize: (authorizationId) => `/order-assistant/authorize/${encodeURIComponent(authorizationId)}`,
|
|
35
|
+
},
|
|
10
36
|
};
|
|
@@ -211,3 +211,181 @@ export declare const CreateDraftOrderOutputSchema: z.ZodObject<{
|
|
|
211
211
|
total: z.ZodNumber;
|
|
212
212
|
admin_path: z.ZodString;
|
|
213
213
|
}, z.core.$strip>;
|
|
214
|
+
/** Feature keys of the order assistant's plugin toggles. */
|
|
215
|
+
export declare const ORDER_ASSISTANT_FEATURES: {
|
|
216
|
+
readonly oauth: "oauth";
|
|
217
|
+
};
|
|
218
|
+
export declare const ORDER_ASSISTANT_OAUTH: {
|
|
219
|
+
/** The one scope: use the assistant's tools as the signed-in Admin user. */
|
|
220
|
+
readonly scope: "order_assistant";
|
|
221
|
+
readonly accessTokenTtlSeconds: 3600;
|
|
222
|
+
/** A connection ends when its refresh token stays unused this long. */
|
|
223
|
+
readonly connectionIdleDays: 30;
|
|
224
|
+
/** How long the consent page may stay open. */
|
|
225
|
+
readonly authorizationRequestTtlSeconds: 600;
|
|
226
|
+
/** How long the client has to redeem the code after the consent. */
|
|
227
|
+
readonly authorizationCodeTtlSeconds: 120;
|
|
228
|
+
readonly maxRedirectUris: 10;
|
|
229
|
+
readonly maxUriLength: 2000;
|
|
230
|
+
readonly maxClientNameLength: 120;
|
|
231
|
+
readonly maxStateLength: 2000;
|
|
232
|
+
};
|
|
233
|
+
/** `http://localhost`, `http://127.0.0.1` or `http://[::1]`, any port. */
|
|
234
|
+
export declare const isOAuthLoopbackRedirectUri: (value: string) => boolean;
|
|
235
|
+
/**
|
|
236
|
+
* A redirect URI a client may register: https, or http on a loopback address
|
|
237
|
+
* (native clients such as Claude Code), without credentials or fragment.
|
|
238
|
+
*/
|
|
239
|
+
export declare const OAuthRedirectUriSchema: z.ZodString;
|
|
240
|
+
/**
|
|
241
|
+
* Dynamic client registration request (RFC 7591). Unknown metadata is
|
|
242
|
+
* ignored; the requested authentication method, grant and response types are
|
|
243
|
+
* accepted as sent and answered with what the server actually supports.
|
|
244
|
+
*/
|
|
245
|
+
export declare const OAuthClientRegistrationRequestSchema: z.ZodObject<{
|
|
246
|
+
redirect_uris: z.ZodArray<z.ZodString>;
|
|
247
|
+
client_name: z.ZodOptional<z.ZodString>;
|
|
248
|
+
}, z.core.$strip>;
|
|
249
|
+
export declare const OAuthClientRegistrationResponseSchema: z.ZodObject<{
|
|
250
|
+
client_id: z.ZodString;
|
|
251
|
+
client_id_issued_at: z.ZodNumber;
|
|
252
|
+
client_name: z.ZodOptional<z.ZodString>;
|
|
253
|
+
redirect_uris: z.ZodArray<z.ZodString>;
|
|
254
|
+
token_endpoint_auth_method: z.ZodLiteral<"none">;
|
|
255
|
+
grant_types: z.ZodArray<z.ZodString>;
|
|
256
|
+
response_types: z.ZodArray<z.ZodString>;
|
|
257
|
+
scope: z.ZodString;
|
|
258
|
+
}, z.core.$strip>;
|
|
259
|
+
/** Query of the authorization endpoint, before the client is looked up. */
|
|
260
|
+
export declare const OAuthAuthorizeQuerySchema: z.ZodObject<{
|
|
261
|
+
client_id: z.ZodString;
|
|
262
|
+
redirect_uri: z.ZodString;
|
|
263
|
+
response_type: z.ZodOptional<z.ZodString>;
|
|
264
|
+
code_challenge: z.ZodOptional<z.ZodString>;
|
|
265
|
+
code_challenge_method: z.ZodOptional<z.ZodString>;
|
|
266
|
+
state: z.ZodOptional<z.ZodString>;
|
|
267
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
268
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
269
|
+
}, z.core.$strip>;
|
|
270
|
+
/** Body of the token endpoint (`application/x-www-form-urlencoded`). */
|
|
271
|
+
export declare const OAuthTokenRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
272
|
+
grant_type: z.ZodLiteral<"authorization_code">;
|
|
273
|
+
code: z.ZodString;
|
|
274
|
+
code_verifier: z.ZodString;
|
|
275
|
+
client_id: z.ZodString;
|
|
276
|
+
redirect_uri: z.ZodOptional<z.ZodString>;
|
|
277
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
278
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
279
|
+
grant_type: z.ZodLiteral<"refresh_token">;
|
|
280
|
+
refresh_token: z.ZodString;
|
|
281
|
+
client_id: z.ZodString;
|
|
282
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
283
|
+
}, z.core.$strip>], "grant_type">;
|
|
284
|
+
export declare const OAuthTokenResponseSchema: z.ZodObject<{
|
|
285
|
+
access_token: z.ZodString;
|
|
286
|
+
token_type: z.ZodLiteral<"Bearer">;
|
|
287
|
+
expires_in: z.ZodNumber;
|
|
288
|
+
refresh_token: z.ZodString;
|
|
289
|
+
scope: z.ZodString;
|
|
290
|
+
}, z.core.$strip>;
|
|
291
|
+
export declare const OAuthErrorCodeSchema: z.ZodEnum<{
|
|
292
|
+
invalid_request: "invalid_request";
|
|
293
|
+
invalid_client: "invalid_client";
|
|
294
|
+
invalid_grant: "invalid_grant";
|
|
295
|
+
invalid_target: "invalid_target";
|
|
296
|
+
invalid_client_metadata: "invalid_client_metadata";
|
|
297
|
+
invalid_redirect_uri: "invalid_redirect_uri";
|
|
298
|
+
unsupported_grant_type: "unsupported_grant_type";
|
|
299
|
+
unsupported_response_type: "unsupported_response_type";
|
|
300
|
+
access_denied: "access_denied";
|
|
301
|
+
temporarily_unavailable: "temporarily_unavailable";
|
|
302
|
+
}>;
|
|
303
|
+
/** Error body of the registration and token endpoints (RFC 6749, RFC 7591). */
|
|
304
|
+
export declare const OAuthErrorResponseSchema: z.ZodObject<{
|
|
305
|
+
error: z.ZodEnum<{
|
|
306
|
+
invalid_request: "invalid_request";
|
|
307
|
+
invalid_client: "invalid_client";
|
|
308
|
+
invalid_grant: "invalid_grant";
|
|
309
|
+
invalid_target: "invalid_target";
|
|
310
|
+
invalid_client_metadata: "invalid_client_metadata";
|
|
311
|
+
invalid_redirect_uri: "invalid_redirect_uri";
|
|
312
|
+
unsupported_grant_type: "unsupported_grant_type";
|
|
313
|
+
unsupported_response_type: "unsupported_response_type";
|
|
314
|
+
access_denied: "access_denied";
|
|
315
|
+
temporarily_unavailable: "temporarily_unavailable";
|
|
316
|
+
}>;
|
|
317
|
+
error_description: z.ZodString;
|
|
318
|
+
}, z.core.$strip>;
|
|
319
|
+
/** RFC 9728: where the MCP endpoint's authorization server is. */
|
|
320
|
+
export declare const OAuthProtectedResourceMetadataSchema: z.ZodObject<{
|
|
321
|
+
resource: z.ZodString;
|
|
322
|
+
authorization_servers: z.ZodArray<z.ZodString>;
|
|
323
|
+
bearer_methods_supported: z.ZodArray<z.ZodString>;
|
|
324
|
+
scopes_supported: z.ZodArray<z.ZodString>;
|
|
325
|
+
resource_name: z.ZodString;
|
|
326
|
+
}, z.core.$strip>;
|
|
327
|
+
/** RFC 8414: the authorization server's endpoints and capabilities. */
|
|
328
|
+
export declare const OAuthAuthorizationServerMetadataSchema: z.ZodObject<{
|
|
329
|
+
issuer: z.ZodString;
|
|
330
|
+
authorization_endpoint: z.ZodString;
|
|
331
|
+
token_endpoint: z.ZodString;
|
|
332
|
+
registration_endpoint: z.ZodString;
|
|
333
|
+
response_types_supported: z.ZodArray<z.ZodString>;
|
|
334
|
+
grant_types_supported: z.ZodArray<z.ZodString>;
|
|
335
|
+
code_challenge_methods_supported: z.ZodArray<z.ZodString>;
|
|
336
|
+
token_endpoint_auth_methods_supported: z.ZodArray<z.ZodString>;
|
|
337
|
+
scopes_supported: z.ZodArray<z.ZodString>;
|
|
338
|
+
authorization_response_iss_parameter_supported: z.ZodBoolean;
|
|
339
|
+
}, z.core.$strip>;
|
|
340
|
+
/** What the consent page shows about a pending sign-in request. */
|
|
341
|
+
export declare const AdminOrderAssistantAuthorizationSchema: z.ZodObject<{
|
|
342
|
+
id: z.ZodString;
|
|
343
|
+
client_name: z.ZodNullable<z.ZodString>;
|
|
344
|
+
redirect_host: z.ZodString;
|
|
345
|
+
redirect_is_loopback: z.ZodBoolean;
|
|
346
|
+
redirect_is_known: z.ZodBoolean;
|
|
347
|
+
expires_at: z.ZodString;
|
|
348
|
+
}, z.core.$strip>;
|
|
349
|
+
export declare const AdminOrderAssistantAuthorizationResponseSchema: z.ZodObject<{
|
|
350
|
+
authorization: z.ZodObject<{
|
|
351
|
+
id: z.ZodString;
|
|
352
|
+
client_name: z.ZodNullable<z.ZodString>;
|
|
353
|
+
redirect_host: z.ZodString;
|
|
354
|
+
redirect_is_loopback: z.ZodBoolean;
|
|
355
|
+
redirect_is_known: z.ZodBoolean;
|
|
356
|
+
expires_at: z.ZodString;
|
|
357
|
+
}, z.core.$strip>;
|
|
358
|
+
}, z.core.$strip>;
|
|
359
|
+
export declare const DecideOrderAssistantAuthorizationSchema: z.ZodObject<{
|
|
360
|
+
approve: z.ZodBoolean;
|
|
361
|
+
}, z.core.$strict>;
|
|
362
|
+
export declare const DecideOrderAssistantAuthorizationResponseSchema: z.ZodObject<{
|
|
363
|
+
redirect_to: z.ZodString;
|
|
364
|
+
}, z.core.$strip>;
|
|
365
|
+
/** One chatbot an Admin user connected through OAuth. */
|
|
366
|
+
export declare const AdminOrderAssistantConnectionSchema: z.ZodObject<{
|
|
367
|
+
id: z.ZodString;
|
|
368
|
+
client_name: z.ZodNullable<z.ZodString>;
|
|
369
|
+
redirect_host: z.ZodString;
|
|
370
|
+
user_id: z.ZodString;
|
|
371
|
+
user_email: z.ZodNullable<z.ZodString>;
|
|
372
|
+
created_at: z.ZodString;
|
|
373
|
+
last_used_at: z.ZodNullable<z.ZodString>;
|
|
374
|
+
expires_at: z.ZodString;
|
|
375
|
+
}, z.core.$strip>;
|
|
376
|
+
export declare const AdminOrderAssistantConnectionsResponseSchema: z.ZodObject<{
|
|
377
|
+
connections: z.ZodArray<z.ZodObject<{
|
|
378
|
+
id: z.ZodString;
|
|
379
|
+
client_name: z.ZodNullable<z.ZodString>;
|
|
380
|
+
redirect_host: z.ZodString;
|
|
381
|
+
user_id: z.ZodString;
|
|
382
|
+
user_email: z.ZodNullable<z.ZodString>;
|
|
383
|
+
created_at: z.ZodString;
|
|
384
|
+
last_used_at: z.ZodNullable<z.ZodString>;
|
|
385
|
+
expires_at: z.ZodString;
|
|
386
|
+
}, z.core.$strip>>;
|
|
387
|
+
}, z.core.$strip>;
|
|
388
|
+
export declare const DeleteOrderAssistantConnectionResponseSchema: z.ZodObject<{
|
|
389
|
+
id: z.ZodString;
|
|
390
|
+
deleted: z.ZodLiteral<true>;
|
|
391
|
+
}, z.core.$strip>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CreateDraftOrderOutputSchema = exports.OrderAssistantDraftItemSchema = exports.CreateDraftOrderInputSchema = exports.OrderAssistantNewCustomerSchema = exports.ListShippingOptionsOutputSchema = exports.OrderAssistantShippingOptionSchema = exports.ListShippingOptionsInputSchema = exports.SearchProductsOutputSchema = exports.OrderAssistantVariantSchema = exports.SearchProductsInputSchema = exports.SearchCustomersOutputSchema = exports.OrderAssistantCustomerSchema = exports.OrderAssistantCustomerAddressSchema = exports.SearchCustomersInputSchema = exports.OrderAssistantAddressSchema = exports.ORDER_ASSISTANT_LIMITS = exports.ORDER_ASSISTANT_METADATA = exports.OrderAssistantSourceSchema = exports.ORDER_ASSISTANT_TOOLS = exports.ORDER_ASSISTANT_PLUGIN_KEY = void 0;
|
|
3
|
+
exports.DeleteOrderAssistantConnectionResponseSchema = exports.AdminOrderAssistantConnectionsResponseSchema = exports.AdminOrderAssistantConnectionSchema = exports.DecideOrderAssistantAuthorizationResponseSchema = exports.DecideOrderAssistantAuthorizationSchema = exports.AdminOrderAssistantAuthorizationResponseSchema = exports.AdminOrderAssistantAuthorizationSchema = exports.OAuthAuthorizationServerMetadataSchema = exports.OAuthProtectedResourceMetadataSchema = exports.OAuthErrorResponseSchema = exports.OAuthErrorCodeSchema = exports.OAuthTokenResponseSchema = exports.OAuthTokenRequestSchema = exports.OAuthAuthorizeQuerySchema = exports.OAuthClientRegistrationResponseSchema = exports.OAuthClientRegistrationRequestSchema = exports.OAuthRedirectUriSchema = exports.isOAuthLoopbackRedirectUri = exports.ORDER_ASSISTANT_OAUTH = exports.ORDER_ASSISTANT_FEATURES = exports.CreateDraftOrderOutputSchema = exports.OrderAssistantDraftItemSchema = exports.CreateDraftOrderInputSchema = exports.OrderAssistantNewCustomerSchema = exports.ListShippingOptionsOutputSchema = exports.OrderAssistantShippingOptionSchema = exports.ListShippingOptionsInputSchema = exports.SearchProductsOutputSchema = exports.OrderAssistantVariantSchema = exports.SearchProductsInputSchema = exports.SearchCustomersOutputSchema = exports.OrderAssistantCustomerSchema = exports.OrderAssistantCustomerAddressSchema = exports.SearchCustomersInputSchema = exports.OrderAssistantAddressSchema = exports.ORDER_ASSISTANT_LIMITS = exports.ORDER_ASSISTANT_METADATA = exports.OrderAssistantSourceSchema = exports.ORDER_ASSISTANT_TOOLS = exports.ORDER_ASSISTANT_PLUGIN_KEY = void 0;
|
|
4
4
|
const zod_1 = require("@medusajs/framework/zod");
|
|
5
5
|
const primitives_1 = require("../shared/primitives");
|
|
6
6
|
/** Plugin key and container key of the order assistant in the base. */
|
|
@@ -184,3 +184,206 @@ exports.CreateDraftOrderOutputSchema = zod_1.z.object({
|
|
|
184
184
|
/** Path of the draft in the Admin, relative to the backend URL. */
|
|
185
185
|
admin_path: zod_1.z.string(),
|
|
186
186
|
});
|
|
187
|
+
// --- Anmeldung per OAuth (MCP authorization, OAuth 2.1) --------------------
|
|
188
|
+
/** Feature keys of the order assistant's plugin toggles. */
|
|
189
|
+
exports.ORDER_ASSISTANT_FEATURES = {
|
|
190
|
+
oauth: "oauth",
|
|
191
|
+
};
|
|
192
|
+
exports.ORDER_ASSISTANT_OAUTH = {
|
|
193
|
+
/** The one scope: use the assistant's tools as the signed-in Admin user. */
|
|
194
|
+
scope: "order_assistant",
|
|
195
|
+
accessTokenTtlSeconds: 3600,
|
|
196
|
+
/** A connection ends when its refresh token stays unused this long. */
|
|
197
|
+
connectionIdleDays: 30,
|
|
198
|
+
/** How long the consent page may stay open. */
|
|
199
|
+
authorizationRequestTtlSeconds: 600,
|
|
200
|
+
/** How long the client has to redeem the code after the consent. */
|
|
201
|
+
authorizationCodeTtlSeconds: 120,
|
|
202
|
+
maxRedirectUris: 10,
|
|
203
|
+
maxUriLength: 2000,
|
|
204
|
+
maxClientNameLength: 120,
|
|
205
|
+
maxStateLength: 2000,
|
|
206
|
+
};
|
|
207
|
+
const OAUTH_LOOPBACK_HOSTS = ["localhost", "127.0.0.1", "[::1]"];
|
|
208
|
+
/** `http://localhost`, `http://127.0.0.1` or `http://[::1]`, any port. */
|
|
209
|
+
const isOAuthLoopbackRedirectUri = (value) => {
|
|
210
|
+
try {
|
|
211
|
+
const url = new URL(value);
|
|
212
|
+
return (url.protocol === "http:" && OAUTH_LOOPBACK_HOSTS.includes(url.hostname));
|
|
213
|
+
}
|
|
214
|
+
catch {
|
|
215
|
+
return false;
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
exports.isOAuthLoopbackRedirectUri = isOAuthLoopbackRedirectUri;
|
|
219
|
+
/**
|
|
220
|
+
* A redirect URI a client may register: https, or http on a loopback address
|
|
221
|
+
* (native clients such as Claude Code), without credentials or fragment.
|
|
222
|
+
*/
|
|
223
|
+
exports.OAuthRedirectUriSchema = zod_1.z
|
|
224
|
+
.string()
|
|
225
|
+
.max(exports.ORDER_ASSISTANT_OAUTH.maxUriLength)
|
|
226
|
+
.refine((value) => {
|
|
227
|
+
let url;
|
|
228
|
+
try {
|
|
229
|
+
url = new URL(value);
|
|
230
|
+
}
|
|
231
|
+
catch {
|
|
232
|
+
return false;
|
|
233
|
+
}
|
|
234
|
+
if (url.hash || url.username || url.password) {
|
|
235
|
+
return false;
|
|
236
|
+
}
|
|
237
|
+
return url.protocol === "https:" || (0, exports.isOAuthLoopbackRedirectUri)(value);
|
|
238
|
+
}, {
|
|
239
|
+
message: "A redirect URI must use https, or http on a loopback address, and carry no fragment.",
|
|
240
|
+
});
|
|
241
|
+
/**
|
|
242
|
+
* Dynamic client registration request (RFC 7591). Unknown metadata is
|
|
243
|
+
* ignored; the requested authentication method, grant and response types are
|
|
244
|
+
* accepted as sent and answered with what the server actually supports.
|
|
245
|
+
*/
|
|
246
|
+
exports.OAuthClientRegistrationRequestSchema = zod_1.z.object({
|
|
247
|
+
redirect_uris: zod_1.z
|
|
248
|
+
.array(exports.OAuthRedirectUriSchema)
|
|
249
|
+
.min(1)
|
|
250
|
+
.max(exports.ORDER_ASSISTANT_OAUTH.maxRedirectUris),
|
|
251
|
+
client_name: zod_1.z
|
|
252
|
+
.string()
|
|
253
|
+
.trim()
|
|
254
|
+
.min(1)
|
|
255
|
+
.max(exports.ORDER_ASSISTANT_OAUTH.maxClientNameLength)
|
|
256
|
+
.optional(),
|
|
257
|
+
});
|
|
258
|
+
exports.OAuthClientRegistrationResponseSchema = zod_1.z.object({
|
|
259
|
+
client_id: zod_1.z.string(),
|
|
260
|
+
/** Seconds since the epoch. */
|
|
261
|
+
client_id_issued_at: zod_1.z.number(),
|
|
262
|
+
client_name: zod_1.z.string().optional(),
|
|
263
|
+
redirect_uris: zod_1.z.array(zod_1.z.string()),
|
|
264
|
+
/** Public clients only: PKCE instead of a client secret. */
|
|
265
|
+
token_endpoint_auth_method: zod_1.z.literal("none"),
|
|
266
|
+
grant_types: zod_1.z.array(zod_1.z.string()),
|
|
267
|
+
response_types: zod_1.z.array(zod_1.z.string()),
|
|
268
|
+
scope: zod_1.z.string(),
|
|
269
|
+
});
|
|
270
|
+
/** Query of the authorization endpoint, before the client is looked up. */
|
|
271
|
+
exports.OAuthAuthorizeQuerySchema = zod_1.z.object({
|
|
272
|
+
client_id: zod_1.z.string().min(1).max(200),
|
|
273
|
+
redirect_uri: zod_1.z.string().min(1).max(exports.ORDER_ASSISTANT_OAUTH.maxUriLength),
|
|
274
|
+
response_type: zod_1.z.string().max(100).optional(),
|
|
275
|
+
code_challenge: zod_1.z.string().max(200).optional(),
|
|
276
|
+
code_challenge_method: zod_1.z.string().max(20).optional(),
|
|
277
|
+
state: zod_1.z.string().max(exports.ORDER_ASSISTANT_OAUTH.maxStateLength).optional(),
|
|
278
|
+
scope: zod_1.z.string().max(1000).optional(),
|
|
279
|
+
resource: zod_1.z.string().max(exports.ORDER_ASSISTANT_OAUTH.maxUriLength).optional(),
|
|
280
|
+
});
|
|
281
|
+
/** Body of the token endpoint (`application/x-www-form-urlencoded`). */
|
|
282
|
+
exports.OAuthTokenRequestSchema = zod_1.z.discriminatedUnion("grant_type", [
|
|
283
|
+
zod_1.z.object({
|
|
284
|
+
grant_type: zod_1.z.literal("authorization_code"),
|
|
285
|
+
code: zod_1.z.string().min(1).max(200),
|
|
286
|
+
/** RFC 7636: 43 to 128 unreserved characters. */
|
|
287
|
+
code_verifier: zod_1.z.string().regex(/^[A-Za-z0-9\-._~]{43,128}$/),
|
|
288
|
+
client_id: zod_1.z.string().min(1).max(200),
|
|
289
|
+
redirect_uri: zod_1.z.string().max(exports.ORDER_ASSISTANT_OAUTH.maxUriLength).optional(),
|
|
290
|
+
resource: zod_1.z.string().max(exports.ORDER_ASSISTANT_OAUTH.maxUriLength).optional(),
|
|
291
|
+
}),
|
|
292
|
+
zod_1.z.object({
|
|
293
|
+
grant_type: zod_1.z.literal("refresh_token"),
|
|
294
|
+
refresh_token: zod_1.z.string().min(1).max(200),
|
|
295
|
+
client_id: zod_1.z.string().min(1).max(200),
|
|
296
|
+
resource: zod_1.z.string().max(exports.ORDER_ASSISTANT_OAUTH.maxUriLength).optional(),
|
|
297
|
+
}),
|
|
298
|
+
]);
|
|
299
|
+
exports.OAuthTokenResponseSchema = zod_1.z.object({
|
|
300
|
+
access_token: zod_1.z.string(),
|
|
301
|
+
token_type: zod_1.z.literal("Bearer"),
|
|
302
|
+
/** Seconds until the access token expires. */
|
|
303
|
+
expires_in: zod_1.z.number(),
|
|
304
|
+
/** Replaces the refresh token that was sent; the old one stops working. */
|
|
305
|
+
refresh_token: zod_1.z.string(),
|
|
306
|
+
scope: zod_1.z.string(),
|
|
307
|
+
});
|
|
308
|
+
exports.OAuthErrorCodeSchema = zod_1.z.enum([
|
|
309
|
+
"invalid_request",
|
|
310
|
+
"invalid_client",
|
|
311
|
+
"invalid_grant",
|
|
312
|
+
"invalid_target",
|
|
313
|
+
"invalid_client_metadata",
|
|
314
|
+
"invalid_redirect_uri",
|
|
315
|
+
"unsupported_grant_type",
|
|
316
|
+
"unsupported_response_type",
|
|
317
|
+
"access_denied",
|
|
318
|
+
"temporarily_unavailable",
|
|
319
|
+
]);
|
|
320
|
+
/** Error body of the registration and token endpoints (RFC 6749, RFC 7591). */
|
|
321
|
+
exports.OAuthErrorResponseSchema = zod_1.z.object({
|
|
322
|
+
error: exports.OAuthErrorCodeSchema,
|
|
323
|
+
error_description: zod_1.z.string(),
|
|
324
|
+
});
|
|
325
|
+
/** RFC 9728: where the MCP endpoint's authorization server is. */
|
|
326
|
+
exports.OAuthProtectedResourceMetadataSchema = zod_1.z.object({
|
|
327
|
+
resource: zod_1.z.string(),
|
|
328
|
+
authorization_servers: zod_1.z.array(zod_1.z.string()),
|
|
329
|
+
bearer_methods_supported: zod_1.z.array(zod_1.z.string()),
|
|
330
|
+
scopes_supported: zod_1.z.array(zod_1.z.string()),
|
|
331
|
+
resource_name: zod_1.z.string(),
|
|
332
|
+
});
|
|
333
|
+
/** RFC 8414: the authorization server's endpoints and capabilities. */
|
|
334
|
+
exports.OAuthAuthorizationServerMetadataSchema = zod_1.z.object({
|
|
335
|
+
issuer: zod_1.z.string(),
|
|
336
|
+
authorization_endpoint: zod_1.z.string(),
|
|
337
|
+
token_endpoint: zod_1.z.string(),
|
|
338
|
+
registration_endpoint: zod_1.z.string(),
|
|
339
|
+
response_types_supported: zod_1.z.array(zod_1.z.string()),
|
|
340
|
+
grant_types_supported: zod_1.z.array(zod_1.z.string()),
|
|
341
|
+
code_challenge_methods_supported: zod_1.z.array(zod_1.z.string()),
|
|
342
|
+
token_endpoint_auth_methods_supported: zod_1.z.array(zod_1.z.string()),
|
|
343
|
+
scopes_supported: zod_1.z.array(zod_1.z.string()),
|
|
344
|
+
/** RFC 9207: every authorization response carries `iss`. */
|
|
345
|
+
authorization_response_iss_parameter_supported: zod_1.z.boolean(),
|
|
346
|
+
});
|
|
347
|
+
/** What the consent page shows about a pending sign-in request. */
|
|
348
|
+
exports.AdminOrderAssistantAuthorizationSchema = zod_1.z.object({
|
|
349
|
+
id: zod_1.z.string(),
|
|
350
|
+
/** Name the chatbot registered with; `null` when it gave none. */
|
|
351
|
+
client_name: zod_1.z.string().nullable(),
|
|
352
|
+
/** Host the browser is sent back to after the decision. */
|
|
353
|
+
redirect_host: zod_1.z.string(),
|
|
354
|
+
/** True when the chatbot runs on this computer (loopback redirect). */
|
|
355
|
+
redirect_is_loopback: zod_1.z.boolean(),
|
|
356
|
+
/** True when the host belongs to a chatbot service the shop knows. */
|
|
357
|
+
redirect_is_known: zod_1.z.boolean(),
|
|
358
|
+
expires_at: primitives_1.WireDateSchema,
|
|
359
|
+
});
|
|
360
|
+
exports.AdminOrderAssistantAuthorizationResponseSchema = zod_1.z.object({
|
|
361
|
+
authorization: exports.AdminOrderAssistantAuthorizationSchema,
|
|
362
|
+
});
|
|
363
|
+
exports.DecideOrderAssistantAuthorizationSchema = zod_1.z
|
|
364
|
+
.object({ approve: zod_1.z.boolean() })
|
|
365
|
+
.strict();
|
|
366
|
+
exports.DecideOrderAssistantAuthorizationResponseSchema = zod_1.z.object({
|
|
367
|
+
/** Where the browser must go next: the chatbot's redirect URI. */
|
|
368
|
+
redirect_to: zod_1.z.string(),
|
|
369
|
+
});
|
|
370
|
+
/** One chatbot an Admin user connected through OAuth. */
|
|
371
|
+
exports.AdminOrderAssistantConnectionSchema = zod_1.z.object({
|
|
372
|
+
id: zod_1.z.string(),
|
|
373
|
+
client_name: zod_1.z.string().nullable(),
|
|
374
|
+
redirect_host: zod_1.z.string(),
|
|
375
|
+
user_id: zod_1.z.string(),
|
|
376
|
+
/** `null` when the Admin user no longer exists. */
|
|
377
|
+
user_email: zod_1.z.string().nullable(),
|
|
378
|
+
created_at: primitives_1.WireDateSchema,
|
|
379
|
+
last_used_at: primitives_1.WireDateSchema.nullable(),
|
|
380
|
+
/** When the connection ends unless the chatbot uses it before. */
|
|
381
|
+
expires_at: primitives_1.WireDateSchema,
|
|
382
|
+
});
|
|
383
|
+
exports.AdminOrderAssistantConnectionsResponseSchema = zod_1.z.object({
|
|
384
|
+
connections: zod_1.z.array(exports.AdminOrderAssistantConnectionSchema),
|
|
385
|
+
});
|
|
386
|
+
exports.DeleteOrderAssistantConnectionResponseSchema = zod_1.z.object({
|
|
387
|
+
id: zod_1.z.string(),
|
|
388
|
+
deleted: zod_1.z.literal(true),
|
|
389
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { z } from "@medusajs/framework/zod";
|
|
2
|
-
import type { CreateDraftOrderInputSchema, CreateDraftOrderOutputSchema, ListShippingOptionsInputSchema, ListShippingOptionsOutputSchema, OrderAssistantAddressSchema, OrderAssistantCustomerSchema, OrderAssistantShippingOptionSchema, OrderAssistantSourceSchema, OrderAssistantVariantSchema, SearchCustomersInputSchema, SearchCustomersOutputSchema, SearchProductsInputSchema, SearchProductsOutputSchema } from "./schemas";
|
|
2
|
+
import type { AdminOrderAssistantAuthorizationResponseSchema, AdminOrderAssistantAuthorizationSchema, AdminOrderAssistantConnectionSchema, AdminOrderAssistantConnectionsResponseSchema, CreateDraftOrderInputSchema, CreateDraftOrderOutputSchema, DecideOrderAssistantAuthorizationResponseSchema, DecideOrderAssistantAuthorizationSchema, DeleteOrderAssistantConnectionResponseSchema, ListShippingOptionsInputSchema, ListShippingOptionsOutputSchema, OAuthAuthorizationServerMetadataSchema, OAuthAuthorizeQuerySchema, OAuthClientRegistrationRequestSchema, OAuthClientRegistrationResponseSchema, OAuthErrorCodeSchema, OAuthErrorResponseSchema, OAuthProtectedResourceMetadataSchema, OAuthTokenRequestSchema, OAuthTokenResponseSchema, OrderAssistantAddressSchema, OrderAssistantCustomerSchema, OrderAssistantShippingOptionSchema, OrderAssistantSourceSchema, OrderAssistantVariantSchema, SearchCustomersInputSchema, SearchCustomersOutputSchema, SearchProductsInputSchema, SearchProductsOutputSchema } from "./schemas";
|
|
3
3
|
export type OrderAssistantSource = z.infer<typeof OrderAssistantSourceSchema>;
|
|
4
4
|
export type OrderAssistantAddress = z.infer<typeof OrderAssistantAddressSchema>;
|
|
5
5
|
export type OrderAssistantCustomer = z.infer<typeof OrderAssistantCustomerSchema>;
|
|
@@ -13,3 +13,19 @@ export type ListShippingOptionsInput = z.infer<typeof ListShippingOptionsInputSc
|
|
|
13
13
|
export type ListShippingOptionsOutput = z.infer<typeof ListShippingOptionsOutputSchema>;
|
|
14
14
|
export type CreateDraftOrderInput = z.infer<typeof CreateDraftOrderInputSchema>;
|
|
15
15
|
export type CreateDraftOrderOutput = z.infer<typeof CreateDraftOrderOutputSchema>;
|
|
16
|
+
export type OAuthClientRegistrationRequest = z.infer<typeof OAuthClientRegistrationRequestSchema>;
|
|
17
|
+
export type OAuthClientRegistrationResponse = z.infer<typeof OAuthClientRegistrationResponseSchema>;
|
|
18
|
+
export type OAuthAuthorizeQuery = z.infer<typeof OAuthAuthorizeQuerySchema>;
|
|
19
|
+
export type OAuthTokenRequest = z.infer<typeof OAuthTokenRequestSchema>;
|
|
20
|
+
export type OAuthTokenResponse = z.infer<typeof OAuthTokenResponseSchema>;
|
|
21
|
+
export type OAuthErrorCode = z.infer<typeof OAuthErrorCodeSchema>;
|
|
22
|
+
export type OAuthErrorResponse = z.infer<typeof OAuthErrorResponseSchema>;
|
|
23
|
+
export type OAuthProtectedResourceMetadata = z.infer<typeof OAuthProtectedResourceMetadataSchema>;
|
|
24
|
+
export type OAuthAuthorizationServerMetadata = z.infer<typeof OAuthAuthorizationServerMetadataSchema>;
|
|
25
|
+
export type AdminOrderAssistantAuthorization = z.infer<typeof AdminOrderAssistantAuthorizationSchema>;
|
|
26
|
+
export type AdminOrderAssistantAuthorizationResponse = z.infer<typeof AdminOrderAssistantAuthorizationResponseSchema>;
|
|
27
|
+
export type DecideOrderAssistantAuthorizationRequest = z.infer<typeof DecideOrderAssistantAuthorizationSchema>;
|
|
28
|
+
export type DecideOrderAssistantAuthorizationResponse = z.infer<typeof DecideOrderAssistantAuthorizationResponseSchema>;
|
|
29
|
+
export type AdminOrderAssistantConnection = z.infer<typeof AdminOrderAssistantConnectionSchema>;
|
|
30
|
+
export type AdminOrderAssistantConnectionsResponse = z.infer<typeof AdminOrderAssistantConnectionsResponseSchema>;
|
|
31
|
+
export type DeleteOrderAssistantConnectionResponse = z.infer<typeof DeleteOrderAssistantConnectionResponseSchema>;
|
|
@@ -49,9 +49,9 @@ export declare const PluginSettingTypeSchema: z.ZodEnum<{
|
|
|
49
49
|
/** Where a setting's current value comes from. */
|
|
50
50
|
export declare const PluginSettingSourceSchema: z.ZodEnum<{
|
|
51
51
|
default: "default";
|
|
52
|
+
none: "none";
|
|
52
53
|
stored: "stored";
|
|
53
54
|
config: "config";
|
|
54
|
-
none: "none";
|
|
55
55
|
}>;
|
|
56
56
|
export declare const PluginSettingValueSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
57
57
|
/**
|
|
@@ -68,9 +68,9 @@ export declare const AdminPluginSecretSettingSchema: z.ZodObject<{
|
|
|
68
68
|
is_set: z.ZodBoolean;
|
|
69
69
|
source: z.ZodEnum<{
|
|
70
70
|
default: "default";
|
|
71
|
+
none: "none";
|
|
71
72
|
stored: "stored";
|
|
72
73
|
config: "config";
|
|
73
|
-
none: "none";
|
|
74
74
|
}>;
|
|
75
75
|
invalidates: z.ZodArray<z.ZodString>;
|
|
76
76
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -102,9 +102,9 @@ export declare const AdminPluginSelectSettingSchema: z.ZodObject<{
|
|
|
102
102
|
is_set: z.ZodBoolean;
|
|
103
103
|
source: z.ZodEnum<{
|
|
104
104
|
default: "default";
|
|
105
|
+
none: "none";
|
|
105
106
|
stored: "stored";
|
|
106
107
|
config: "config";
|
|
107
|
-
none: "none";
|
|
108
108
|
}>;
|
|
109
109
|
invalidates: z.ZodArray<z.ZodString>;
|
|
110
110
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -136,9 +136,9 @@ export declare const AdminPluginOrderedListSettingSchema: z.ZodObject<{
|
|
|
136
136
|
is_set: z.ZodBoolean;
|
|
137
137
|
source: z.ZodEnum<{
|
|
138
138
|
default: "default";
|
|
139
|
+
none: "none";
|
|
139
140
|
stored: "stored";
|
|
140
141
|
config: "config";
|
|
141
|
-
none: "none";
|
|
142
142
|
}>;
|
|
143
143
|
invalidates: z.ZodArray<z.ZodString>;
|
|
144
144
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -164,9 +164,9 @@ export declare const AdminPluginNumberSettingSchema: z.ZodObject<{
|
|
|
164
164
|
is_set: z.ZodBoolean;
|
|
165
165
|
source: z.ZodEnum<{
|
|
166
166
|
default: "default";
|
|
167
|
+
none: "none";
|
|
167
168
|
stored: "stored";
|
|
168
169
|
config: "config";
|
|
169
|
-
none: "none";
|
|
170
170
|
}>;
|
|
171
171
|
invalidates: z.ZodArray<z.ZodString>;
|
|
172
172
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -196,9 +196,9 @@ export declare const AdminPluginPlainSettingSchema: z.ZodObject<{
|
|
|
196
196
|
is_set: z.ZodBoolean;
|
|
197
197
|
source: z.ZodEnum<{
|
|
198
198
|
default: "default";
|
|
199
|
+
none: "none";
|
|
199
200
|
stored: "stored";
|
|
200
201
|
config: "config";
|
|
201
|
-
none: "none";
|
|
202
202
|
}>;
|
|
203
203
|
invalidates: z.ZodArray<z.ZodString>;
|
|
204
204
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -219,9 +219,9 @@ export declare const AdminPluginSettingSchema: z.ZodUnion<readonly [z.ZodObject<
|
|
|
219
219
|
is_set: z.ZodBoolean;
|
|
220
220
|
source: z.ZodEnum<{
|
|
221
221
|
default: "default";
|
|
222
|
+
none: "none";
|
|
222
223
|
stored: "stored";
|
|
223
224
|
config: "config";
|
|
224
|
-
none: "none";
|
|
225
225
|
}>;
|
|
226
226
|
invalidates: z.ZodArray<z.ZodString>;
|
|
227
227
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -247,9 +247,9 @@ export declare const AdminPluginSettingSchema: z.ZodUnion<readonly [z.ZodObject<
|
|
|
247
247
|
is_set: z.ZodBoolean;
|
|
248
248
|
source: z.ZodEnum<{
|
|
249
249
|
default: "default";
|
|
250
|
+
none: "none";
|
|
250
251
|
stored: "stored";
|
|
251
252
|
config: "config";
|
|
252
|
-
none: "none";
|
|
253
253
|
}>;
|
|
254
254
|
invalidates: z.ZodArray<z.ZodString>;
|
|
255
255
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -275,9 +275,9 @@ export declare const AdminPluginSettingSchema: z.ZodUnion<readonly [z.ZodObject<
|
|
|
275
275
|
is_set: z.ZodBoolean;
|
|
276
276
|
source: z.ZodEnum<{
|
|
277
277
|
default: "default";
|
|
278
|
+
none: "none";
|
|
278
279
|
stored: "stored";
|
|
279
280
|
config: "config";
|
|
280
|
-
none: "none";
|
|
281
281
|
}>;
|
|
282
282
|
invalidates: z.ZodArray<z.ZodString>;
|
|
283
283
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -302,9 +302,9 @@ export declare const AdminPluginSettingSchema: z.ZodUnion<readonly [z.ZodObject<
|
|
|
302
302
|
is_set: z.ZodBoolean;
|
|
303
303
|
source: z.ZodEnum<{
|
|
304
304
|
default: "default";
|
|
305
|
+
none: "none";
|
|
305
306
|
stored: "stored";
|
|
306
307
|
config: "config";
|
|
307
|
-
none: "none";
|
|
308
308
|
}>;
|
|
309
309
|
invalidates: z.ZodArray<z.ZodString>;
|
|
310
310
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -333,9 +333,9 @@ export declare const AdminPluginSettingSchema: z.ZodUnion<readonly [z.ZodObject<
|
|
|
333
333
|
is_set: z.ZodBoolean;
|
|
334
334
|
source: z.ZodEnum<{
|
|
335
335
|
default: "default";
|
|
336
|
+
none: "none";
|
|
336
337
|
stored: "stored";
|
|
337
338
|
config: "config";
|
|
338
|
-
none: "none";
|
|
339
339
|
}>;
|
|
340
340
|
invalidates: z.ZodArray<z.ZodString>;
|
|
341
341
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -375,9 +375,9 @@ export declare const AdminPluginSettingsSchema: z.ZodObject<{
|
|
|
375
375
|
is_set: z.ZodBoolean;
|
|
376
376
|
source: z.ZodEnum<{
|
|
377
377
|
default: "default";
|
|
378
|
+
none: "none";
|
|
378
379
|
stored: "stored";
|
|
379
380
|
config: "config";
|
|
380
|
-
none: "none";
|
|
381
381
|
}>;
|
|
382
382
|
invalidates: z.ZodArray<z.ZodString>;
|
|
383
383
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -403,9 +403,9 @@ export declare const AdminPluginSettingsSchema: z.ZodObject<{
|
|
|
403
403
|
is_set: z.ZodBoolean;
|
|
404
404
|
source: z.ZodEnum<{
|
|
405
405
|
default: "default";
|
|
406
|
+
none: "none";
|
|
406
407
|
stored: "stored";
|
|
407
408
|
config: "config";
|
|
408
|
-
none: "none";
|
|
409
409
|
}>;
|
|
410
410
|
invalidates: z.ZodArray<z.ZodString>;
|
|
411
411
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -431,9 +431,9 @@ export declare const AdminPluginSettingsSchema: z.ZodObject<{
|
|
|
431
431
|
is_set: z.ZodBoolean;
|
|
432
432
|
source: z.ZodEnum<{
|
|
433
433
|
default: "default";
|
|
434
|
+
none: "none";
|
|
434
435
|
stored: "stored";
|
|
435
436
|
config: "config";
|
|
436
|
-
none: "none";
|
|
437
437
|
}>;
|
|
438
438
|
invalidates: z.ZodArray<z.ZodString>;
|
|
439
439
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -458,9 +458,9 @@ export declare const AdminPluginSettingsSchema: z.ZodObject<{
|
|
|
458
458
|
is_set: z.ZodBoolean;
|
|
459
459
|
source: z.ZodEnum<{
|
|
460
460
|
default: "default";
|
|
461
|
+
none: "none";
|
|
461
462
|
stored: "stored";
|
|
462
463
|
config: "config";
|
|
463
|
-
none: "none";
|
|
464
464
|
}>;
|
|
465
465
|
invalidates: z.ZodArray<z.ZodString>;
|
|
466
466
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -489,9 +489,9 @@ export declare const AdminPluginSettingsSchema: z.ZodObject<{
|
|
|
489
489
|
is_set: z.ZodBoolean;
|
|
490
490
|
source: z.ZodEnum<{
|
|
491
491
|
default: "default";
|
|
492
|
+
none: "none";
|
|
492
493
|
stored: "stored";
|
|
493
494
|
config: "config";
|
|
494
|
-
none: "none";
|
|
495
495
|
}>;
|
|
496
496
|
invalidates: z.ZodArray<z.ZodString>;
|
|
497
497
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -544,9 +544,9 @@ export declare const AdminPluginFeaturesSchema: z.ZodObject<{
|
|
|
544
544
|
is_set: z.ZodBoolean;
|
|
545
545
|
source: z.ZodEnum<{
|
|
546
546
|
default: "default";
|
|
547
|
+
none: "none";
|
|
547
548
|
stored: "stored";
|
|
548
549
|
config: "config";
|
|
549
|
-
none: "none";
|
|
550
550
|
}>;
|
|
551
551
|
invalidates: z.ZodArray<z.ZodString>;
|
|
552
552
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -572,9 +572,9 @@ export declare const AdminPluginFeaturesSchema: z.ZodObject<{
|
|
|
572
572
|
is_set: z.ZodBoolean;
|
|
573
573
|
source: z.ZodEnum<{
|
|
574
574
|
default: "default";
|
|
575
|
+
none: "none";
|
|
575
576
|
stored: "stored";
|
|
576
577
|
config: "config";
|
|
577
|
-
none: "none";
|
|
578
578
|
}>;
|
|
579
579
|
invalidates: z.ZodArray<z.ZodString>;
|
|
580
580
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -600,9 +600,9 @@ export declare const AdminPluginFeaturesSchema: z.ZodObject<{
|
|
|
600
600
|
is_set: z.ZodBoolean;
|
|
601
601
|
source: z.ZodEnum<{
|
|
602
602
|
default: "default";
|
|
603
|
+
none: "none";
|
|
603
604
|
stored: "stored";
|
|
604
605
|
config: "config";
|
|
605
|
-
none: "none";
|
|
606
606
|
}>;
|
|
607
607
|
invalidates: z.ZodArray<z.ZodString>;
|
|
608
608
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -627,9 +627,9 @@ export declare const AdminPluginFeaturesSchema: z.ZodObject<{
|
|
|
627
627
|
is_set: z.ZodBoolean;
|
|
628
628
|
source: z.ZodEnum<{
|
|
629
629
|
default: "default";
|
|
630
|
+
none: "none";
|
|
630
631
|
stored: "stored";
|
|
631
632
|
config: "config";
|
|
632
|
-
none: "none";
|
|
633
633
|
}>;
|
|
634
634
|
invalidates: z.ZodArray<z.ZodString>;
|
|
635
635
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -658,9 +658,9 @@ export declare const AdminPluginFeaturesSchema: z.ZodObject<{
|
|
|
658
658
|
is_set: z.ZodBoolean;
|
|
659
659
|
source: z.ZodEnum<{
|
|
660
660
|
default: "default";
|
|
661
|
+
none: "none";
|
|
661
662
|
stored: "stored";
|
|
662
663
|
config: "config";
|
|
663
|
-
none: "none";
|
|
664
664
|
}>;
|
|
665
665
|
invalidates: z.ZodArray<z.ZodString>;
|
|
666
666
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -735,9 +735,9 @@ export declare const AdminPluginFeaturesListResponseSchema: z.ZodObject<{
|
|
|
735
735
|
is_set: z.ZodBoolean;
|
|
736
736
|
source: z.ZodEnum<{
|
|
737
737
|
default: "default";
|
|
738
|
+
none: "none";
|
|
738
739
|
stored: "stored";
|
|
739
740
|
config: "config";
|
|
740
|
-
none: "none";
|
|
741
741
|
}>;
|
|
742
742
|
invalidates: z.ZodArray<z.ZodString>;
|
|
743
743
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -763,9 +763,9 @@ export declare const AdminPluginFeaturesListResponseSchema: z.ZodObject<{
|
|
|
763
763
|
is_set: z.ZodBoolean;
|
|
764
764
|
source: z.ZodEnum<{
|
|
765
765
|
default: "default";
|
|
766
|
+
none: "none";
|
|
766
767
|
stored: "stored";
|
|
767
768
|
config: "config";
|
|
768
|
-
none: "none";
|
|
769
769
|
}>;
|
|
770
770
|
invalidates: z.ZodArray<z.ZodString>;
|
|
771
771
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -791,9 +791,9 @@ export declare const AdminPluginFeaturesListResponseSchema: z.ZodObject<{
|
|
|
791
791
|
is_set: z.ZodBoolean;
|
|
792
792
|
source: z.ZodEnum<{
|
|
793
793
|
default: "default";
|
|
794
|
+
none: "none";
|
|
794
795
|
stored: "stored";
|
|
795
796
|
config: "config";
|
|
796
|
-
none: "none";
|
|
797
797
|
}>;
|
|
798
798
|
invalidates: z.ZodArray<z.ZodString>;
|
|
799
799
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -818,9 +818,9 @@ export declare const AdminPluginFeaturesListResponseSchema: z.ZodObject<{
|
|
|
818
818
|
is_set: z.ZodBoolean;
|
|
819
819
|
source: z.ZodEnum<{
|
|
820
820
|
default: "default";
|
|
821
|
+
none: "none";
|
|
821
822
|
stored: "stored";
|
|
822
823
|
config: "config";
|
|
823
|
-
none: "none";
|
|
824
824
|
}>;
|
|
825
825
|
invalidates: z.ZodArray<z.ZodString>;
|
|
826
826
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -849,9 +849,9 @@ export declare const AdminPluginFeaturesListResponseSchema: z.ZodObject<{
|
|
|
849
849
|
is_set: z.ZodBoolean;
|
|
850
850
|
source: z.ZodEnum<{
|
|
851
851
|
default: "default";
|
|
852
|
+
none: "none";
|
|
852
853
|
stored: "stored";
|
|
853
854
|
config: "config";
|
|
854
|
-
none: "none";
|
|
855
855
|
}>;
|
|
856
856
|
invalidates: z.ZodArray<z.ZodString>;
|
|
857
857
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -927,9 +927,9 @@ export declare const AdminPluginFeaturesResponseSchema: z.ZodObject<{
|
|
|
927
927
|
is_set: z.ZodBoolean;
|
|
928
928
|
source: z.ZodEnum<{
|
|
929
929
|
default: "default";
|
|
930
|
+
none: "none";
|
|
930
931
|
stored: "stored";
|
|
931
932
|
config: "config";
|
|
932
|
-
none: "none";
|
|
933
933
|
}>;
|
|
934
934
|
invalidates: z.ZodArray<z.ZodString>;
|
|
935
935
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -955,9 +955,9 @@ export declare const AdminPluginFeaturesResponseSchema: z.ZodObject<{
|
|
|
955
955
|
is_set: z.ZodBoolean;
|
|
956
956
|
source: z.ZodEnum<{
|
|
957
957
|
default: "default";
|
|
958
|
+
none: "none";
|
|
958
959
|
stored: "stored";
|
|
959
960
|
config: "config";
|
|
960
|
-
none: "none";
|
|
961
961
|
}>;
|
|
962
962
|
invalidates: z.ZodArray<z.ZodString>;
|
|
963
963
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -983,9 +983,9 @@ export declare const AdminPluginFeaturesResponseSchema: z.ZodObject<{
|
|
|
983
983
|
is_set: z.ZodBoolean;
|
|
984
984
|
source: z.ZodEnum<{
|
|
985
985
|
default: "default";
|
|
986
|
+
none: "none";
|
|
986
987
|
stored: "stored";
|
|
987
988
|
config: "config";
|
|
988
|
-
none: "none";
|
|
989
989
|
}>;
|
|
990
990
|
invalidates: z.ZodArray<z.ZodString>;
|
|
991
991
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -1010,9 +1010,9 @@ export declare const AdminPluginFeaturesResponseSchema: z.ZodObject<{
|
|
|
1010
1010
|
is_set: z.ZodBoolean;
|
|
1011
1011
|
source: z.ZodEnum<{
|
|
1012
1012
|
default: "default";
|
|
1013
|
+
none: "none";
|
|
1013
1014
|
stored: "stored";
|
|
1014
1015
|
config: "config";
|
|
1015
|
-
none: "none";
|
|
1016
1016
|
}>;
|
|
1017
1017
|
invalidates: z.ZodArray<z.ZodString>;
|
|
1018
1018
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -1041,9 +1041,9 @@ export declare const AdminPluginFeaturesResponseSchema: z.ZodObject<{
|
|
|
1041
1041
|
is_set: z.ZodBoolean;
|
|
1042
1042
|
source: z.ZodEnum<{
|
|
1043
1043
|
default: "default";
|
|
1044
|
+
none: "none";
|
|
1044
1045
|
stored: "stored";
|
|
1045
1046
|
config: "config";
|
|
1046
|
-
none: "none";
|
|
1047
1047
|
}>;
|
|
1048
1048
|
invalidates: z.ZodArray<z.ZodString>;
|
|
1049
1049
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -1113,9 +1113,9 @@ export declare const AdminPluginSettingsResponseSchema: z.ZodObject<{
|
|
|
1113
1113
|
is_set: z.ZodBoolean;
|
|
1114
1114
|
source: z.ZodEnum<{
|
|
1115
1115
|
default: "default";
|
|
1116
|
+
none: "none";
|
|
1116
1117
|
stored: "stored";
|
|
1117
1118
|
config: "config";
|
|
1118
|
-
none: "none";
|
|
1119
1119
|
}>;
|
|
1120
1120
|
invalidates: z.ZodArray<z.ZodString>;
|
|
1121
1121
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -1141,9 +1141,9 @@ export declare const AdminPluginSettingsResponseSchema: z.ZodObject<{
|
|
|
1141
1141
|
is_set: z.ZodBoolean;
|
|
1142
1142
|
source: z.ZodEnum<{
|
|
1143
1143
|
default: "default";
|
|
1144
|
+
none: "none";
|
|
1144
1145
|
stored: "stored";
|
|
1145
1146
|
config: "config";
|
|
1146
|
-
none: "none";
|
|
1147
1147
|
}>;
|
|
1148
1148
|
invalidates: z.ZodArray<z.ZodString>;
|
|
1149
1149
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -1169,9 +1169,9 @@ export declare const AdminPluginSettingsResponseSchema: z.ZodObject<{
|
|
|
1169
1169
|
is_set: z.ZodBoolean;
|
|
1170
1170
|
source: z.ZodEnum<{
|
|
1171
1171
|
default: "default";
|
|
1172
|
+
none: "none";
|
|
1172
1173
|
stored: "stored";
|
|
1173
1174
|
config: "config";
|
|
1174
|
-
none: "none";
|
|
1175
1175
|
}>;
|
|
1176
1176
|
invalidates: z.ZodArray<z.ZodString>;
|
|
1177
1177
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -1196,9 +1196,9 @@ export declare const AdminPluginSettingsResponseSchema: z.ZodObject<{
|
|
|
1196
1196
|
is_set: z.ZodBoolean;
|
|
1197
1197
|
source: z.ZodEnum<{
|
|
1198
1198
|
default: "default";
|
|
1199
|
+
none: "none";
|
|
1199
1200
|
stored: "stored";
|
|
1200
1201
|
config: "config";
|
|
1201
|
-
none: "none";
|
|
1202
1202
|
}>;
|
|
1203
1203
|
invalidates: z.ZodArray<z.ZodString>;
|
|
1204
1204
|
hint: z.ZodNullable<z.ZodString>;
|
|
@@ -1227,9 +1227,9 @@ export declare const AdminPluginSettingsResponseSchema: z.ZodObject<{
|
|
|
1227
1227
|
is_set: z.ZodBoolean;
|
|
1228
1228
|
source: z.ZodEnum<{
|
|
1229
1229
|
default: "default";
|
|
1230
|
+
none: "none";
|
|
1230
1231
|
stored: "stored";
|
|
1231
1232
|
config: "config";
|
|
1232
|
-
none: "none";
|
|
1233
1233
|
}>;
|
|
1234
1234
|
invalidates: z.ZodArray<z.ZodString>;
|
|
1235
1235
|
hint: z.ZodNullable<z.ZodString>;
|