mtmsdk 0.0.7 → 0.0.9
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/dist/gomtmapi/@tanstack/react-query.gen.d.ts +2883 -0
- package/dist/gomtmapi/@tanstack/react-query.gen.d.ts.map +1 -0
- package/dist/gomtmapi/@tanstack/react-query.gen.js +2990 -0
- package/dist/gomtmapi/@tanstack/react-query.gen.js.map +1 -0
- package/dist/gomtmapi/client/client.d.ts +3 -0
- package/dist/gomtmapi/client/client.d.ts.map +1 -0
- package/dist/gomtmapi/client/client.js +146 -0
- package/dist/gomtmapi/client/client.js.map +1 -0
- package/dist/gomtmapi/client/index.d.ts +8 -0
- package/dist/gomtmapi/client/index.d.ts.map +1 -0
- package/dist/gomtmapi/client/index.js +5 -0
- package/dist/gomtmapi/client/index.js.map +1 -0
- package/dist/gomtmapi/client/types.d.ts +120 -0
- package/dist/gomtmapi/client/types.d.ts.map +1 -0
- package/dist/gomtmapi/client/types.js +2 -0
- package/dist/gomtmapi/client/types.js.map +1 -0
- package/dist/gomtmapi/client/utils.d.ts +46 -0
- package/dist/gomtmapi/client/utils.d.ts.map +1 -0
- package/dist/gomtmapi/client/utils.js +285 -0
- package/dist/gomtmapi/client/utils.js.map +1 -0
- package/dist/gomtmapi/client.gen.d.ts +13 -0
- package/dist/gomtmapi/client.gen.d.ts.map +1 -0
- package/dist/gomtmapi/client.gen.js +4 -0
- package/dist/gomtmapi/client.gen.js.map +1 -0
- package/dist/gomtmapi/core/auth.d.ts +19 -0
- package/dist/gomtmapi/core/auth.d.ts.map +1 -0
- package/dist/gomtmapi/core/auth.js +14 -0
- package/dist/gomtmapi/core/auth.js.map +1 -0
- package/dist/gomtmapi/core/bodySerializer.d.ts +18 -0
- package/dist/gomtmapi/core/bodySerializer.d.ts.map +1 -0
- package/dist/gomtmapi/core/bodySerializer.js +54 -0
- package/dist/gomtmapi/core/bodySerializer.js.map +1 -0
- package/dist/gomtmapi/core/params.d.ts +24 -0
- package/dist/gomtmapi/core/params.d.ts.map +1 -0
- package/dist/gomtmapi/core/params.js +88 -0
- package/dist/gomtmapi/core/params.js.map +1 -0
- package/dist/gomtmapi/core/pathSerializer.d.ts +34 -0
- package/dist/gomtmapi/core/pathSerializer.d.ts.map +1 -0
- package/dist/gomtmapi/core/pathSerializer.js +114 -0
- package/dist/gomtmapi/core/pathSerializer.js.map +1 -0
- package/dist/gomtmapi/core/types.d.ts +74 -0
- package/dist/gomtmapi/core/types.d.ts.map +1 -0
- package/dist/gomtmapi/core/types.js +2 -0
- package/dist/gomtmapi/core/types.js.map +1 -0
- package/dist/gomtmapi/index.d.ts +3 -0
- package/dist/gomtmapi/index.d.ts.map +1 -0
- package/dist/gomtmapi/index.js +4 -0
- package/dist/gomtmapi/index.js.map +1 -0
- package/dist/gomtmapi/schemas.gen.d.ts +4385 -0
- package/dist/gomtmapi/schemas.gen.d.ts.map +1 -0
- package/dist/gomtmapi/schemas.gen.js +4521 -0
- package/dist/gomtmapi/schemas.gen.js.map +1 -0
- package/dist/gomtmapi/sdk.gen.d.ts +574 -0
- package/dist/gomtmapi/sdk.gen.d.ts.map +1 -0
- package/dist/gomtmapi/sdk.gen.js +2259 -0
- package/dist/gomtmapi/sdk.gen.js.map +1 -0
- package/dist/gomtmapi/types.gen.d.ts +6480 -0
- package/dist/gomtmapi/types.gen.d.ts.map +1 -0
- package/dist/gomtmapi/types.gen.js +70 -0
- package/dist/gomtmapi/types.gen.js.map +1 -0
- package/dist/gomtmapi/zod.gen.d.ts +5324 -0
- package/dist/gomtmapi/zod.gen.d.ts.map +1 -0
- package/dist/gomtmapi/zod.gen.js +2534 -0
- package/dist/gomtmapi/zod.gen.js.map +1 -0
- package/dist/gomtmapi_v2/@tanstack/react-query.gen.d.ts +2260 -0
- package/dist/gomtmapi_v2/@tanstack/react-query.gen.d.ts.map +1 -0
- package/dist/gomtmapi_v2/@tanstack/react-query.gen.js +2413 -0
- package/dist/gomtmapi_v2/@tanstack/react-query.gen.js.map +1 -0
- package/dist/gomtmapi_v2/client/client.d.ts +3 -0
- package/dist/gomtmapi_v2/client/client.d.ts.map +1 -0
- package/dist/gomtmapi_v2/client/client.js +146 -0
- package/dist/gomtmapi_v2/client/client.js.map +1 -0
- package/dist/gomtmapi_v2/client/index.d.ts +8 -0
- package/dist/gomtmapi_v2/client/index.d.ts.map +1 -0
- package/dist/gomtmapi_v2/client/index.js +5 -0
- package/dist/gomtmapi_v2/client/index.js.map +1 -0
- package/dist/gomtmapi_v2/client/types.d.ts +120 -0
- package/dist/gomtmapi_v2/client/types.d.ts.map +1 -0
- package/dist/gomtmapi_v2/client/types.js +2 -0
- package/dist/gomtmapi_v2/client/types.js.map +1 -0
- package/dist/gomtmapi_v2/client/utils.d.ts +46 -0
- package/dist/gomtmapi_v2/client/utils.d.ts.map +1 -0
- package/dist/gomtmapi_v2/client/utils.js +285 -0
- package/dist/gomtmapi_v2/client/utils.js.map +1 -0
- package/dist/gomtmapi_v2/client.gen.d.ts +13 -0
- package/dist/gomtmapi_v2/client.gen.d.ts.map +1 -0
- package/dist/gomtmapi_v2/client.gen.js +4 -0
- package/dist/gomtmapi_v2/client.gen.js.map +1 -0
- package/dist/gomtmapi_v2/core/auth.d.ts +19 -0
- package/dist/gomtmapi_v2/core/auth.d.ts.map +1 -0
- package/dist/gomtmapi_v2/core/auth.js +14 -0
- package/dist/gomtmapi_v2/core/auth.js.map +1 -0
- package/dist/gomtmapi_v2/core/bodySerializer.d.ts +18 -0
- package/dist/gomtmapi_v2/core/bodySerializer.d.ts.map +1 -0
- package/dist/gomtmapi_v2/core/bodySerializer.js +54 -0
- package/dist/gomtmapi_v2/core/bodySerializer.js.map +1 -0
- package/dist/gomtmapi_v2/core/params.d.ts +24 -0
- package/dist/gomtmapi_v2/core/params.d.ts.map +1 -0
- package/dist/gomtmapi_v2/core/params.js +88 -0
- package/dist/gomtmapi_v2/core/params.js.map +1 -0
- package/dist/gomtmapi_v2/core/pathSerializer.d.ts +34 -0
- package/dist/gomtmapi_v2/core/pathSerializer.d.ts.map +1 -0
- package/dist/gomtmapi_v2/core/pathSerializer.js +114 -0
- package/dist/gomtmapi_v2/core/pathSerializer.js.map +1 -0
- package/dist/gomtmapi_v2/core/types.d.ts +74 -0
- package/dist/gomtmapi_v2/core/types.d.ts.map +1 -0
- package/dist/gomtmapi_v2/core/types.js +2 -0
- package/dist/gomtmapi_v2/core/types.js.map +1 -0
- package/dist/gomtmapi_v2/index.d.ts +3 -0
- package/dist/gomtmapi_v2/index.d.ts.map +1 -0
- package/dist/gomtmapi_v2/index.js +4 -0
- package/dist/gomtmapi_v2/index.js.map +1 -0
- package/dist/gomtmapi_v2/schemas.gen.d.ts +2371 -0
- package/dist/gomtmapi_v2/schemas.gen.d.ts.map +1 -0
- package/dist/gomtmapi_v2/schemas.gen.js +2372 -0
- package/dist/gomtmapi_v2/schemas.gen.js.map +1 -0
- package/dist/gomtmapi_v2/sdk.gen.d.ts +974 -0
- package/dist/gomtmapi_v2/sdk.gen.d.ts.map +1 -0
- package/dist/gomtmapi_v2/sdk.gen.js +1345 -0
- package/dist/gomtmapi_v2/sdk.gen.js.map +1 -0
- package/dist/gomtmapi_v2/types.gen.d.ts +2964 -0
- package/dist/gomtmapi_v2/types.gen.d.ts.map +1 -0
- package/dist/gomtmapi_v2/types.gen.js +3 -0
- package/dist/gomtmapi_v2/types.gen.js.map +1 -0
- package/dist/gomtmapi_v2/zod.gen.d.ts +2327 -0
- package/dist/gomtmapi_v2/zod.gen.d.ts.map +1 -0
- package/dist/gomtmapi_v2/zod.gen.js +1768 -0
- package/dist/gomtmapi_v2/zod.gen.js.map +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/adk-utils.d.ts +24 -0
- package/dist/lib/adk-utils.d.ts.map +1 -0
- package/dist/lib/adk-utils.js +51 -0
- package/dist/lib/adk-utils.js.map +1 -0
- package/dist/lib/constants.d.ts +40 -0
- package/dist/lib/constants.d.ts.map +1 -0
- package/dist/lib/constants.js +40 -0
- package/dist/lib/constants.js.map +1 -0
- package/dist/lib/d1-utils.d.ts +5 -0
- package/dist/lib/d1-utils.d.ts.map +1 -0
- package/dist/lib/d1-utils.js +36 -0
- package/dist/lib/d1-utils.js.map +1 -0
- package/dist/lib/get-query-client.d.ts +3 -0
- package/dist/lib/get-query-client.d.ts.map +1 -0
- package/dist/lib/get-query-client.js +43 -0
- package/dist/lib/get-query-client.js.map +1 -0
- package/dist/lib/mtmutils.d.ts +2 -0
- package/dist/lib/mtmutils.d.ts.map +1 -0
- package/dist/lib/mtmutils.js +9 -0
- package/dist/lib/mtmutils.js.map +1 -0
- package/dist/mtgate_api/zod.gen.d.ts +48 -48
- package/dist/mtmai_api/@tanstack/react-query.gen.d.ts +1286 -0
- package/dist/mtmai_api/@tanstack/react-query.gen.d.ts.map +1 -0
- package/dist/mtmai_api/@tanstack/react-query.gen.js +1321 -0
- package/dist/mtmai_api/@tanstack/react-query.gen.js.map +1 -0
- package/dist/mtmai_api/client/client.d.ts +3 -0
- package/dist/mtmai_api/client/client.d.ts.map +1 -0
- package/dist/mtmai_api/client/client.js +146 -0
- package/dist/mtmai_api/client/client.js.map +1 -0
- package/dist/mtmai_api/client/index.d.ts +8 -0
- package/dist/mtmai_api/client/index.d.ts.map +1 -0
- package/dist/mtmai_api/client/index.js +5 -0
- package/dist/mtmai_api/client/index.js.map +1 -0
- package/dist/mtmai_api/client/types.d.ts +120 -0
- package/dist/mtmai_api/client/types.d.ts.map +1 -0
- package/dist/mtmai_api/client/types.js +2 -0
- package/dist/mtmai_api/client/types.js.map +1 -0
- package/dist/mtmai_api/client/utils.d.ts +46 -0
- package/dist/mtmai_api/client/utils.d.ts.map +1 -0
- package/dist/mtmai_api/client/utils.js +285 -0
- package/dist/mtmai_api/client/utils.js.map +1 -0
- package/dist/mtmai_api/client.gen.d.ts +13 -0
- package/dist/mtmai_api/client.gen.d.ts.map +1 -0
- package/dist/mtmai_api/client.gen.js +4 -0
- package/dist/mtmai_api/client.gen.js.map +1 -0
- package/dist/mtmai_api/core/auth.d.ts +19 -0
- package/dist/mtmai_api/core/auth.d.ts.map +1 -0
- package/dist/mtmai_api/core/auth.js +14 -0
- package/dist/mtmai_api/core/auth.js.map +1 -0
- package/dist/mtmai_api/core/bodySerializer.d.ts +18 -0
- package/dist/mtmai_api/core/bodySerializer.d.ts.map +1 -0
- package/dist/mtmai_api/core/bodySerializer.js +54 -0
- package/dist/mtmai_api/core/bodySerializer.js.map +1 -0
- package/dist/mtmai_api/core/params.d.ts +24 -0
- package/dist/mtmai_api/core/params.d.ts.map +1 -0
- package/dist/mtmai_api/core/params.js +88 -0
- package/dist/mtmai_api/core/params.js.map +1 -0
- package/dist/mtmai_api/core/pathSerializer.d.ts +34 -0
- package/dist/mtmai_api/core/pathSerializer.d.ts.map +1 -0
- package/dist/mtmai_api/core/pathSerializer.js +114 -0
- package/dist/mtmai_api/core/pathSerializer.js.map +1 -0
- package/dist/mtmai_api/core/types.d.ts +74 -0
- package/dist/mtmai_api/core/types.d.ts.map +1 -0
- package/dist/mtmai_api/core/types.js +2 -0
- package/dist/mtmai_api/core/types.js.map +1 -0
- package/dist/mtmai_api/index.d.ts +3 -0
- package/dist/mtmai_api/index.d.ts.map +1 -0
- package/dist/mtmai_api/index.js +4 -0
- package/dist/mtmai_api/index.js.map +1 -0
- package/dist/mtmai_api/schemas.gen.d.ts +7364 -0
- package/dist/mtmai_api/schemas.gen.d.ts.map +1 -0
- package/dist/mtmai_api/schemas.gen.js +9574 -0
- package/dist/mtmai_api/schemas.gen.js.map +1 -0
- package/dist/mtmai_api/sdk.gen.d.ts +264 -0
- package/dist/mtmai_api/sdk.gen.d.ts.map +1 -0
- package/dist/mtmai_api/sdk.gen.js +598 -0
- package/dist/mtmai_api/sdk.gen.js.map +1 -0
- package/dist/mtmai_api/types.gen.d.ts +6376 -0
- package/dist/mtmai_api/types.gen.d.ts.map +1 -0
- package/dist/mtmai_api/types.gen.js +240 -0
- package/dist/mtmai_api/types.gen.js.map +1 -0
- package/dist/mtmai_api/zod.gen.d.ts +35067 -0
- package/dist/mtmai_api/zod.gen.d.ts.map +1 -0
- package/dist/mtmai_api/zod.gen.js +2930 -0
- package/dist/mtmai_api/zod.gen.js.map +1 -0
- package/dist/store/MtmsdkProvider.d.ts +15 -0
- package/dist/store/MtmsdkProvider.d.ts.map +1 -0
- package/dist/store/MtmsdkProvider.js +50 -0
- package/dist/store/MtmsdkProvider.js.map +1 -0
- package/dist/store/ReactQueryApiV2Provider.d.ts +10 -0
- package/dist/store/ReactQueryApiV2Provider.d.ts.map +1 -0
- package/dist/store/ReactQueryApiV2Provider.js +24 -0
- package/dist/store/ReactQueryApiV2Provider.js.map +1 -0
- package/dist/store/ReactQueryCfApiProvider.d.ts +9 -0
- package/dist/store/ReactQueryCfApiProvider.d.ts.map +1 -0
- package/dist/store/ReactQueryCfApiProvider.js +26 -0
- package/dist/store/ReactQueryCfApiProvider.js.map +1 -0
- package/dist/store/ReactQueryMtmaiApiProvider.d.ts +10 -0
- package/dist/store/ReactQueryMtmaiApiProvider.d.ts.map +1 -0
- package/dist/store/ReactQueryMtmaiApiProvider.js +23 -0
- package/dist/store/ReactQueryMtmaiApiProvider.js.map +1 -0
- package/dist/store/ReactQueryProvider.d.ts +10 -0
- package/dist/store/ReactQueryProvider.d.ts.map +1 -0
- package/dist/store/ReactQueryProvider.js +24 -0
- package/dist/store/ReactQueryProvider.js.map +1 -0
- package/package.json +69 -15
|
@@ -0,0 +1,2930 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
/**
|
|
4
|
+
* SecuritySchemeType
|
|
5
|
+
*/
|
|
6
|
+
export const zSecuritySchemeType = z.enum([
|
|
7
|
+
"apiKey",
|
|
8
|
+
"http",
|
|
9
|
+
"oauth2",
|
|
10
|
+
"openIdConnect",
|
|
11
|
+
]);
|
|
12
|
+
/**
|
|
13
|
+
* APIKeyIn
|
|
14
|
+
*/
|
|
15
|
+
export const zApiKeyIn = z.enum(["query", "header", "cookie"]);
|
|
16
|
+
/**
|
|
17
|
+
* APIKey
|
|
18
|
+
*/
|
|
19
|
+
export const zApiKey = z.object({
|
|
20
|
+
type: zSecuritySchemeType.optional(),
|
|
21
|
+
description: z.union([z.string(), z.null()]).optional(),
|
|
22
|
+
in: zApiKeyIn,
|
|
23
|
+
name: z.string(),
|
|
24
|
+
});
|
|
25
|
+
/**
|
|
26
|
+
* AddSessionToEvalSetRequest
|
|
27
|
+
*/
|
|
28
|
+
export const zAddSessionToEvalSetRequest = z.object({
|
|
29
|
+
evalId: z.string(),
|
|
30
|
+
sessionId: z.string(),
|
|
31
|
+
userId: z.string(),
|
|
32
|
+
});
|
|
33
|
+
/**
|
|
34
|
+
* ApiKeyConfig
|
|
35
|
+
* Config for authentication with API key.
|
|
36
|
+
*/
|
|
37
|
+
export const zApiKeyConfig = z.object({
|
|
38
|
+
apiKeyString: z.union([z.string(), z.null()]).optional(),
|
|
39
|
+
});
|
|
40
|
+
/**
|
|
41
|
+
* AuthConfigGoogleServiceAccountConfig
|
|
42
|
+
* Config for Google Service Account Authentication.
|
|
43
|
+
*/
|
|
44
|
+
export const zAuthConfigGoogleServiceAccountConfig = z.object({
|
|
45
|
+
serviceAccount: z.union([z.string(), z.null()]).optional(),
|
|
46
|
+
});
|
|
47
|
+
/**
|
|
48
|
+
* AuthConfigHttpBasicAuthConfig
|
|
49
|
+
* Config for HTTP Basic Authentication.
|
|
50
|
+
*/
|
|
51
|
+
export const zAuthConfigHttpBasicAuthConfig = z.object({
|
|
52
|
+
credentialSecret: z.union([z.string(), z.null()]).optional(),
|
|
53
|
+
});
|
|
54
|
+
/**
|
|
55
|
+
* AuthConfigOauthConfig
|
|
56
|
+
* Config for user oauth.
|
|
57
|
+
*/
|
|
58
|
+
export const zAuthConfigOauthConfig = z.object({
|
|
59
|
+
accessToken: z.union([z.string(), z.null()]).optional(),
|
|
60
|
+
serviceAccount: z.union([z.string(), z.null()]).optional(),
|
|
61
|
+
});
|
|
62
|
+
/**
|
|
63
|
+
* AuthConfigOidcConfig
|
|
64
|
+
* Config for user OIDC auth.
|
|
65
|
+
*/
|
|
66
|
+
export const zAuthConfigOidcConfig = z.object({
|
|
67
|
+
idToken: z.union([z.string(), z.null()]).optional(),
|
|
68
|
+
serviceAccount: z.union([z.string(), z.null()]).optional(),
|
|
69
|
+
});
|
|
70
|
+
/**
|
|
71
|
+
* AuthCredentialTypes
|
|
72
|
+
* Represents the type of authentication credential.
|
|
73
|
+
*/
|
|
74
|
+
export const zAuthCredentialTypes = z.enum([
|
|
75
|
+
"apiKey",
|
|
76
|
+
"http",
|
|
77
|
+
"oauth2",
|
|
78
|
+
"openIdConnect",
|
|
79
|
+
"serviceAccount",
|
|
80
|
+
]);
|
|
81
|
+
/**
|
|
82
|
+
* HttpCredentials
|
|
83
|
+
* Represents the secret token value for HTTP authentication, like user name, password, oauth token, etc.
|
|
84
|
+
*/
|
|
85
|
+
export const zHttpCredentials = z.object({
|
|
86
|
+
username: z.union([z.string(), z.null()]).optional(),
|
|
87
|
+
password: z.union([z.string(), z.null()]).optional(),
|
|
88
|
+
token: z.union([z.string(), z.null()]).optional(),
|
|
89
|
+
});
|
|
90
|
+
/**
|
|
91
|
+
* HttpAuth
|
|
92
|
+
* The credentials and metadata for HTTP authentication.
|
|
93
|
+
*/
|
|
94
|
+
export const zHttpAuth = z.object({
|
|
95
|
+
scheme: z.string(),
|
|
96
|
+
credentials: zHttpCredentials,
|
|
97
|
+
});
|
|
98
|
+
/**
|
|
99
|
+
* ServiceAccountCredential
|
|
100
|
+
* Represents Google Service Account configuration.
|
|
101
|
+
*
|
|
102
|
+
* Attributes:
|
|
103
|
+
* type: The type should be "service_account".
|
|
104
|
+
* project_id: The project ID.
|
|
105
|
+
* private_key_id: The ID of the private key.
|
|
106
|
+
* private_key: The private key.
|
|
107
|
+
* client_email: The client email.
|
|
108
|
+
* client_id: The client ID.
|
|
109
|
+
* auth_uri: The authorization URI.
|
|
110
|
+
* token_uri: The token URI.
|
|
111
|
+
* auth_provider_x509_cert_url: URL for auth provider's X.509 cert.
|
|
112
|
+
* client_x509_cert_url: URL for the client's X.509 cert.
|
|
113
|
+
* universe_domain: The universe domain.
|
|
114
|
+
*
|
|
115
|
+
* Example:
|
|
116
|
+
*
|
|
117
|
+
* config = ServiceAccountCredential(
|
|
118
|
+
* type_="service_account",
|
|
119
|
+
* project_id="your_project_id",
|
|
120
|
+
* private_key_id="your_private_key_id",
|
|
121
|
+
* private_key="-----BEGIN PRIVATE KEY-----...",
|
|
122
|
+
* client_email="...@....iam.gserviceaccount.com",
|
|
123
|
+
* client_id="your_client_id",
|
|
124
|
+
* auth_uri="https://accounts.google.com/o/oauth2/auth",
|
|
125
|
+
* token_uri="https://oauth2.googleapis.com/token",
|
|
126
|
+
* auth_provider_x509_cert_url="https://www.googleapis.com/oauth2/v1/certs",
|
|
127
|
+
* client_x509_cert_url="https://www.googleapis.com/robot/v1/metadata/x509/...",
|
|
128
|
+
* universe_domain="googleapis.com"
|
|
129
|
+
* )
|
|
130
|
+
*
|
|
131
|
+
*
|
|
132
|
+
* config = ServiceAccountConfig.model_construct(**{
|
|
133
|
+
* ...service account config dict
|
|
134
|
+
* })
|
|
135
|
+
*/
|
|
136
|
+
export const zServiceAccountCredential = z.object({
|
|
137
|
+
type: z.string().optional().default(""),
|
|
138
|
+
projectId: z.string(),
|
|
139
|
+
privateKeyId: z.string(),
|
|
140
|
+
privateKey: z.string(),
|
|
141
|
+
clientEmail: z.string(),
|
|
142
|
+
clientId: z.string(),
|
|
143
|
+
authUri: z.string(),
|
|
144
|
+
tokenUri: z.string(),
|
|
145
|
+
authProviderX509CertUrl: z.string(),
|
|
146
|
+
clientX509CertUrl: z.string(),
|
|
147
|
+
universeDomain: z.string(),
|
|
148
|
+
});
|
|
149
|
+
/**
|
|
150
|
+
* ServiceAccount
|
|
151
|
+
* Represents Google Service Account configuration.
|
|
152
|
+
*/
|
|
153
|
+
export const zServiceAccount = z.object({
|
|
154
|
+
serviceAccountCredential: z
|
|
155
|
+
.union([zServiceAccountCredential, z.null()])
|
|
156
|
+
.optional(),
|
|
157
|
+
scopes: z.array(z.string()),
|
|
158
|
+
useDefaultCredential: z.union([z.boolean(), z.null()]).optional(),
|
|
159
|
+
});
|
|
160
|
+
/**
|
|
161
|
+
* OAuth2Auth
|
|
162
|
+
* Represents credential value and its metadata for a OAuth2 credential.
|
|
163
|
+
*/
|
|
164
|
+
export const zOAuth2Auth = z.object({
|
|
165
|
+
clientId: z.union([z.string(), z.null()]).optional(),
|
|
166
|
+
clientSecret: z.union([z.string(), z.null()]).optional(),
|
|
167
|
+
authUri: z.union([z.string(), z.null()]).optional(),
|
|
168
|
+
state: z.union([z.string(), z.null()]).optional(),
|
|
169
|
+
redirectUri: z.union([z.string(), z.null()]).optional(),
|
|
170
|
+
authResponseUri: z.union([z.string(), z.null()]).optional(),
|
|
171
|
+
authCode: z.union([z.string(), z.null()]).optional(),
|
|
172
|
+
accessToken: z.union([z.string(), z.null()]).optional(),
|
|
173
|
+
refreshToken: z.union([z.string(), z.null()]).optional(),
|
|
174
|
+
expiresAt: z.union([z.number().int(), z.null()]).optional(),
|
|
175
|
+
expiresIn: z.union([z.number().int(), z.null()]).optional(),
|
|
176
|
+
audience: z.union([z.string(), z.null()]).optional(),
|
|
177
|
+
});
|
|
178
|
+
/**
|
|
179
|
+
* AuthCredential
|
|
180
|
+
* Data class representing an authentication credential.
|
|
181
|
+
*
|
|
182
|
+
* To exchange for the actual credential, please use
|
|
183
|
+
* CredentialExchanger.exchange_credential().
|
|
184
|
+
*
|
|
185
|
+
* Examples: API Key Auth
|
|
186
|
+
* AuthCredential(
|
|
187
|
+
* auth_type=AuthCredentialTypes.API_KEY,
|
|
188
|
+
* api_key="1234",
|
|
189
|
+
* )
|
|
190
|
+
*
|
|
191
|
+
* Example: HTTP Auth
|
|
192
|
+
* AuthCredential(
|
|
193
|
+
* auth_type=AuthCredentialTypes.HTTP,
|
|
194
|
+
* http=HttpAuth(
|
|
195
|
+
* scheme="basic",
|
|
196
|
+
* credentials=HttpCredentials(username="user", password="password"),
|
|
197
|
+
* ),
|
|
198
|
+
* )
|
|
199
|
+
*
|
|
200
|
+
* Example: OAuth2 Bearer Token in HTTP Header
|
|
201
|
+
* AuthCredential(
|
|
202
|
+
* auth_type=AuthCredentialTypes.HTTP,
|
|
203
|
+
* http=HttpAuth(
|
|
204
|
+
* scheme="bearer",
|
|
205
|
+
* credentials=HttpCredentials(token="eyAkaknabna...."),
|
|
206
|
+
* ),
|
|
207
|
+
* )
|
|
208
|
+
*
|
|
209
|
+
* Example: OAuth2 Auth with Authorization Code Flow
|
|
210
|
+
* AuthCredential(
|
|
211
|
+
* auth_type=AuthCredentialTypes.OAUTH2,
|
|
212
|
+
* oauth2=OAuth2Auth(
|
|
213
|
+
* client_id="1234",
|
|
214
|
+
* client_secret="secret",
|
|
215
|
+
* ),
|
|
216
|
+
* )
|
|
217
|
+
*
|
|
218
|
+
* Example: OpenID Connect Auth
|
|
219
|
+
* AuthCredential(
|
|
220
|
+
* auth_type=AuthCredentialTypes.OPEN_ID_CONNECT,
|
|
221
|
+
* oauth2=OAuth2Auth(
|
|
222
|
+
* client_id="1234",
|
|
223
|
+
* client_secret="secret",
|
|
224
|
+
* redirect_uri="https://example.com",
|
|
225
|
+
* scopes=["scope1", "scope2"],
|
|
226
|
+
* ),
|
|
227
|
+
* )
|
|
228
|
+
*
|
|
229
|
+
* Example: Auth with resource reference
|
|
230
|
+
* AuthCredential(
|
|
231
|
+
* auth_type=AuthCredentialTypes.API_KEY,
|
|
232
|
+
* resource_ref="projects/1234/locations/us-central1/resources/resource1",
|
|
233
|
+
* )
|
|
234
|
+
*/
|
|
235
|
+
export const zAuthCredentialInput = z.object({
|
|
236
|
+
authType: zAuthCredentialTypes,
|
|
237
|
+
resourceRef: z.union([z.string(), z.null()]).optional(),
|
|
238
|
+
apiKey: z.union([z.string(), z.null()]).optional(),
|
|
239
|
+
http: z.union([zHttpAuth, z.null()]).optional(),
|
|
240
|
+
serviceAccount: z.union([zServiceAccount, z.null()]).optional(),
|
|
241
|
+
oauth2: z.union([zOAuth2Auth, z.null()]).optional(),
|
|
242
|
+
});
|
|
243
|
+
/**
|
|
244
|
+
* AuthCredential
|
|
245
|
+
* Data class representing an authentication credential.
|
|
246
|
+
*
|
|
247
|
+
* To exchange for the actual credential, please use
|
|
248
|
+
* CredentialExchanger.exchange_credential().
|
|
249
|
+
*
|
|
250
|
+
* Examples: API Key Auth
|
|
251
|
+
* AuthCredential(
|
|
252
|
+
* auth_type=AuthCredentialTypes.API_KEY,
|
|
253
|
+
* api_key="1234",
|
|
254
|
+
* )
|
|
255
|
+
*
|
|
256
|
+
* Example: HTTP Auth
|
|
257
|
+
* AuthCredential(
|
|
258
|
+
* auth_type=AuthCredentialTypes.HTTP,
|
|
259
|
+
* http=HttpAuth(
|
|
260
|
+
* scheme="basic",
|
|
261
|
+
* credentials=HttpCredentials(username="user", password="password"),
|
|
262
|
+
* ),
|
|
263
|
+
* )
|
|
264
|
+
*
|
|
265
|
+
* Example: OAuth2 Bearer Token in HTTP Header
|
|
266
|
+
* AuthCredential(
|
|
267
|
+
* auth_type=AuthCredentialTypes.HTTP,
|
|
268
|
+
* http=HttpAuth(
|
|
269
|
+
* scheme="bearer",
|
|
270
|
+
* credentials=HttpCredentials(token="eyAkaknabna...."),
|
|
271
|
+
* ),
|
|
272
|
+
* )
|
|
273
|
+
*
|
|
274
|
+
* Example: OAuth2 Auth with Authorization Code Flow
|
|
275
|
+
* AuthCredential(
|
|
276
|
+
* auth_type=AuthCredentialTypes.OAUTH2,
|
|
277
|
+
* oauth2=OAuth2Auth(
|
|
278
|
+
* client_id="1234",
|
|
279
|
+
* client_secret="secret",
|
|
280
|
+
* ),
|
|
281
|
+
* )
|
|
282
|
+
*
|
|
283
|
+
* Example: OpenID Connect Auth
|
|
284
|
+
* AuthCredential(
|
|
285
|
+
* auth_type=AuthCredentialTypes.OPEN_ID_CONNECT,
|
|
286
|
+
* oauth2=OAuth2Auth(
|
|
287
|
+
* client_id="1234",
|
|
288
|
+
* client_secret="secret",
|
|
289
|
+
* redirect_uri="https://example.com",
|
|
290
|
+
* scopes=["scope1", "scope2"],
|
|
291
|
+
* ),
|
|
292
|
+
* )
|
|
293
|
+
*
|
|
294
|
+
* Example: Auth with resource reference
|
|
295
|
+
* AuthCredential(
|
|
296
|
+
* auth_type=AuthCredentialTypes.API_KEY,
|
|
297
|
+
* resource_ref="projects/1234/locations/us-central1/resources/resource1",
|
|
298
|
+
* )
|
|
299
|
+
*/
|
|
300
|
+
export const zAuthCredentialOutput = z.object({
|
|
301
|
+
authType: zAuthCredentialTypes,
|
|
302
|
+
resourceRef: z.union([z.string(), z.null()]).optional(),
|
|
303
|
+
apiKey: z.union([z.string(), z.null()]).optional(),
|
|
304
|
+
http: z.union([zHttpAuth, z.null()]).optional(),
|
|
305
|
+
serviceAccount: z.union([zServiceAccount, z.null()]).optional(),
|
|
306
|
+
oauth2: z.union([zOAuth2Auth, z.null()]).optional(),
|
|
307
|
+
});
|
|
308
|
+
/**
|
|
309
|
+
* AuthType
|
|
310
|
+
* Type of auth scheme.
|
|
311
|
+
*/
|
|
312
|
+
export const zAuthType = z.enum([
|
|
313
|
+
"AUTH_TYPE_UNSPECIFIED",
|
|
314
|
+
"NO_AUTH",
|
|
315
|
+
"API_KEY_AUTH",
|
|
316
|
+
"HTTP_BASIC_AUTH",
|
|
317
|
+
"GOOGLE_SERVICE_ACCOUNT_AUTH",
|
|
318
|
+
"OAUTH",
|
|
319
|
+
"OIDC_AUTH",
|
|
320
|
+
]);
|
|
321
|
+
/**
|
|
322
|
+
* AutomaticFunctionCallingConfig
|
|
323
|
+
* The configuration for automatic function calling.
|
|
324
|
+
*/
|
|
325
|
+
export const zAutomaticFunctionCallingConfig = z.object({
|
|
326
|
+
disable: z.union([z.boolean(), z.null()]).optional(),
|
|
327
|
+
maximumRemoteCalls: z.union([z.number().int(), z.null()]).optional(),
|
|
328
|
+
ignoreCallHistory: z.union([z.boolean(), z.null()]).optional(),
|
|
329
|
+
});
|
|
330
|
+
/**
|
|
331
|
+
* BaseCriterion
|
|
332
|
+
* Base creterion to use for an Eval Metric.
|
|
333
|
+
*/
|
|
334
|
+
export const zBaseCriterion = z.object({
|
|
335
|
+
threshold: z.number(),
|
|
336
|
+
});
|
|
337
|
+
/**
|
|
338
|
+
* Behavior
|
|
339
|
+
* Defines the function behavior. Defaults to `BLOCKING`.
|
|
340
|
+
*/
|
|
341
|
+
export const zBehavior = z.enum(["UNSPECIFIED", "BLOCKING", "NON_BLOCKING"]);
|
|
342
|
+
/**
|
|
343
|
+
* Blob
|
|
344
|
+
* Content blob.
|
|
345
|
+
*/
|
|
346
|
+
export const zBlob = z.object({
|
|
347
|
+
displayName: z.union([z.string(), z.null()]).optional(),
|
|
348
|
+
data: z.union([z.string(), z.null()]).optional(),
|
|
349
|
+
mimeType: z.union([z.string(), z.null()]).optional(),
|
|
350
|
+
});
|
|
351
|
+
/**
|
|
352
|
+
* Body_builder_build
|
|
353
|
+
*/
|
|
354
|
+
export const zBodyBuilderBuild = z.object({
|
|
355
|
+
files: z.array(z.string()),
|
|
356
|
+
});
|
|
357
|
+
/**
|
|
358
|
+
* ChatConfig
|
|
359
|
+
* 聊天配置
|
|
360
|
+
*/
|
|
361
|
+
export const zChatConfig = z.object({
|
|
362
|
+
provider: z.string().optional().default("openai"),
|
|
363
|
+
model_name: z.string().optional().default("gpt-4o-mini"),
|
|
364
|
+
api_key: z.union([z.string(), z.null()]).optional(),
|
|
365
|
+
base_url: z.union([z.string(), z.null()]).optional(),
|
|
366
|
+
max_turns: z.number().int().optional().default(10),
|
|
367
|
+
system_message: z
|
|
368
|
+
.string()
|
|
369
|
+
.optional()
|
|
370
|
+
.default("你是一个有用的AI助手,可以回答各种问题并提供帮助。"),
|
|
371
|
+
});
|
|
372
|
+
/**
|
|
373
|
+
* ChatRequest
|
|
374
|
+
* 聊天请求 - 兼容旧API格式
|
|
375
|
+
*/
|
|
376
|
+
export const zChatRequest = z.object({
|
|
377
|
+
message: z.string(),
|
|
378
|
+
config: z.union([zChatConfig, z.null()]).optional(),
|
|
379
|
+
});
|
|
380
|
+
/**
|
|
381
|
+
* ChatResponse
|
|
382
|
+
* 聊天响应 - 兼容旧API格式
|
|
383
|
+
*/
|
|
384
|
+
export const zChatResponse = z.object({
|
|
385
|
+
message: z.string(),
|
|
386
|
+
success: z.boolean().optional().default(true),
|
|
387
|
+
error: z.union([z.string(), z.null()]).optional(),
|
|
388
|
+
});
|
|
389
|
+
/**
|
|
390
|
+
* CheckSandboxStatusRequest
|
|
391
|
+
*/
|
|
392
|
+
export const zCheckSandboxStatusRequest = z.object({
|
|
393
|
+
sandboxIds: z.array(z.string()),
|
|
394
|
+
});
|
|
395
|
+
/**
|
|
396
|
+
* SandboxStatusInfo
|
|
397
|
+
* 沙盒状态信息
|
|
398
|
+
*/
|
|
399
|
+
export const zSandboxStatusInfo = z.object({
|
|
400
|
+
sandboxId: z.string(),
|
|
401
|
+
status: z.string(),
|
|
402
|
+
error: z.union([z.string(), z.null()]).optional(),
|
|
403
|
+
});
|
|
404
|
+
/**
|
|
405
|
+
* CheckSandboxStatusResponse
|
|
406
|
+
*/
|
|
407
|
+
export const zCheckSandboxStatusResponse = z.object({
|
|
408
|
+
results: z.array(zSandboxStatusInfo).optional(),
|
|
409
|
+
total_checked: z.number().int(),
|
|
410
|
+
});
|
|
411
|
+
/**
|
|
412
|
+
* Outcome
|
|
413
|
+
* Required. Outcome of the code execution.
|
|
414
|
+
*/
|
|
415
|
+
export const zOutcome = z.enum([
|
|
416
|
+
"OUTCOME_UNSPECIFIED",
|
|
417
|
+
"OUTCOME_OK",
|
|
418
|
+
"OUTCOME_FAILED",
|
|
419
|
+
"OUTCOME_DEADLINE_EXCEEDED",
|
|
420
|
+
]);
|
|
421
|
+
/**
|
|
422
|
+
* CodeExecutionResult
|
|
423
|
+
* Result of executing the [ExecutableCode].
|
|
424
|
+
*
|
|
425
|
+
* Always follows a `part` containing the [ExecutableCode].
|
|
426
|
+
*/
|
|
427
|
+
export const zCodeExecutionResult = z.object({
|
|
428
|
+
outcome: z.union([zOutcome, z.null()]).optional(),
|
|
429
|
+
output: z.union([z.string(), z.null()]).optional(),
|
|
430
|
+
});
|
|
431
|
+
/**
|
|
432
|
+
* VideoMetadata
|
|
433
|
+
* Describes how the video in the Part should be used by the model.
|
|
434
|
+
*/
|
|
435
|
+
export const zVideoMetadata = z.object({
|
|
436
|
+
fps: z.union([z.number(), z.null()]).optional(),
|
|
437
|
+
endOffset: z.union([z.string(), z.null()]).optional(),
|
|
438
|
+
startOffset: z.union([z.string(), z.null()]).optional(),
|
|
439
|
+
});
|
|
440
|
+
/**
|
|
441
|
+
* FileData
|
|
442
|
+
* URI based data.
|
|
443
|
+
*/
|
|
444
|
+
export const zFileData = z.object({
|
|
445
|
+
displayName: z.union([z.string(), z.null()]).optional(),
|
|
446
|
+
fileUri: z.union([z.string(), z.null()]).optional(),
|
|
447
|
+
mimeType: z.union([z.string(), z.null()]).optional(),
|
|
448
|
+
});
|
|
449
|
+
/**
|
|
450
|
+
* Language
|
|
451
|
+
* Required. Programming language of the `code`.
|
|
452
|
+
*/
|
|
453
|
+
export const zLanguage = z.enum(["LANGUAGE_UNSPECIFIED", "PYTHON"]);
|
|
454
|
+
/**
|
|
455
|
+
* ExecutableCode
|
|
456
|
+
* Code generated by the model that is meant to be executed, and the result returned to the model.
|
|
457
|
+
*
|
|
458
|
+
* Generated when using the [FunctionDeclaration] tool and
|
|
459
|
+
* [FunctionCallingConfig] mode is set to [Mode.CODE].
|
|
460
|
+
*/
|
|
461
|
+
export const zExecutableCode = z.object({
|
|
462
|
+
code: z.union([z.string(), z.null()]).optional(),
|
|
463
|
+
language: z.union([zLanguage, z.null()]).optional(),
|
|
464
|
+
});
|
|
465
|
+
/**
|
|
466
|
+
* FunctionCall
|
|
467
|
+
* A function call.
|
|
468
|
+
*/
|
|
469
|
+
export const zFunctionCall = z.object({
|
|
470
|
+
id: z.union([z.string(), z.null()]).optional(),
|
|
471
|
+
args: z.union([z.object({}), z.null()]).optional(),
|
|
472
|
+
name: z.union([z.string(), z.null()]).optional(),
|
|
473
|
+
});
|
|
474
|
+
/**
|
|
475
|
+
* FunctionResponseScheduling
|
|
476
|
+
* Specifies how the response should be scheduled in the conversation.
|
|
477
|
+
*/
|
|
478
|
+
export const zFunctionResponseScheduling = z.enum([
|
|
479
|
+
"SCHEDULING_UNSPECIFIED",
|
|
480
|
+
"SILENT",
|
|
481
|
+
"WHEN_IDLE",
|
|
482
|
+
"INTERRUPT",
|
|
483
|
+
]);
|
|
484
|
+
/**
|
|
485
|
+
* FunctionResponse
|
|
486
|
+
* A function response.
|
|
487
|
+
*/
|
|
488
|
+
export const zFunctionResponse = z.object({
|
|
489
|
+
willContinue: z.union([z.boolean(), z.null()]).optional(),
|
|
490
|
+
scheduling: z.union([zFunctionResponseScheduling, z.null()]).optional(),
|
|
491
|
+
id: z.union([z.string(), z.null()]).optional(),
|
|
492
|
+
name: z.union([z.string(), z.null()]).optional(),
|
|
493
|
+
response: z.union([z.object({}), z.null()]).optional(),
|
|
494
|
+
});
|
|
495
|
+
/**
|
|
496
|
+
* Part
|
|
497
|
+
* A datatype containing media content.
|
|
498
|
+
*
|
|
499
|
+
* Exactly one field within a Part should be set, representing the specific type
|
|
500
|
+
* of content being conveyed. Using multiple fields within the same `Part`
|
|
501
|
+
* instance is considered invalid.
|
|
502
|
+
*/
|
|
503
|
+
export const zPartInput = z.object({
|
|
504
|
+
videoMetadata: z.union([zVideoMetadata, z.null()]).optional(),
|
|
505
|
+
thought: z.union([z.boolean(), z.null()]).optional(),
|
|
506
|
+
inlineData: z.union([zBlob, z.null()]).optional(),
|
|
507
|
+
fileData: z.union([zFileData, z.null()]).optional(),
|
|
508
|
+
thoughtSignature: z.union([z.string(), z.null()]).optional(),
|
|
509
|
+
codeExecutionResult: z.union([zCodeExecutionResult, z.null()]).optional(),
|
|
510
|
+
executableCode: z.union([zExecutableCode, z.null()]).optional(),
|
|
511
|
+
functionCall: z.union([zFunctionCall, z.null()]).optional(),
|
|
512
|
+
functionResponse: z.union([zFunctionResponse, z.null()]).optional(),
|
|
513
|
+
text: z.union([z.string(), z.null()]).optional(),
|
|
514
|
+
});
|
|
515
|
+
/**
|
|
516
|
+
* Content
|
|
517
|
+
* Contains the multi-part content of a message.
|
|
518
|
+
*/
|
|
519
|
+
export const zContentInput = z.object({
|
|
520
|
+
parts: z.union([z.array(zPartInput), z.null()]).optional(),
|
|
521
|
+
role: z.union([z.string(), z.null()]).optional(),
|
|
522
|
+
});
|
|
523
|
+
/**
|
|
524
|
+
* Part
|
|
525
|
+
* A datatype containing media content.
|
|
526
|
+
*
|
|
527
|
+
* Exactly one field within a Part should be set, representing the specific type
|
|
528
|
+
* of content being conveyed. Using multiple fields within the same `Part`
|
|
529
|
+
* instance is considered invalid.
|
|
530
|
+
*/
|
|
531
|
+
export const zPartOutput = z.object({
|
|
532
|
+
videoMetadata: z.union([zVideoMetadata, z.null()]).optional(),
|
|
533
|
+
thought: z.union([z.boolean(), z.null()]).optional(),
|
|
534
|
+
inlineData: z.union([zBlob, z.null()]).optional(),
|
|
535
|
+
fileData: z.union([zFileData, z.null()]).optional(),
|
|
536
|
+
thoughtSignature: z.union([z.string(), z.null()]).optional(),
|
|
537
|
+
codeExecutionResult: z.union([zCodeExecutionResult, z.null()]).optional(),
|
|
538
|
+
executableCode: z.union([zExecutableCode, z.null()]).optional(),
|
|
539
|
+
functionCall: z.union([zFunctionCall, z.null()]).optional(),
|
|
540
|
+
functionResponse: z.union([zFunctionResponse, z.null()]).optional(),
|
|
541
|
+
text: z.union([z.string(), z.null()]).optional(),
|
|
542
|
+
});
|
|
543
|
+
/**
|
|
544
|
+
* Content
|
|
545
|
+
* Contains the multi-part content of a message.
|
|
546
|
+
*/
|
|
547
|
+
export const zContentOutput = z.object({
|
|
548
|
+
parts: z.union([z.array(zPartOutput), z.null()]).optional(),
|
|
549
|
+
role: z.union([z.string(), z.null()]).optional(),
|
|
550
|
+
});
|
|
551
|
+
/**
|
|
552
|
+
* IntermediateData
|
|
553
|
+
* Container for intermediate data that an agent would generate as it responds with a final answer.
|
|
554
|
+
*/
|
|
555
|
+
export const zIntermediateDataInput = z.object({
|
|
556
|
+
toolUses: z.array(zFunctionCall).optional().default([]),
|
|
557
|
+
toolResponses: z.array(zFunctionResponse).optional().default([]),
|
|
558
|
+
intermediateResponses: z
|
|
559
|
+
.array(z.tuple([z.string(), z.array(zPartInput)]))
|
|
560
|
+
.optional()
|
|
561
|
+
.default([]),
|
|
562
|
+
});
|
|
563
|
+
/**
|
|
564
|
+
* RubricContent
|
|
565
|
+
* The content of a rubric.
|
|
566
|
+
*/
|
|
567
|
+
export const zRubricContent = z.object({
|
|
568
|
+
textProperty: z.union([z.string(), z.null()]),
|
|
569
|
+
});
|
|
570
|
+
/**
|
|
571
|
+
* Rubric
|
|
572
|
+
* This class represents a single Rubric.
|
|
573
|
+
*/
|
|
574
|
+
export const zRubric = z.object({
|
|
575
|
+
rubricId: z.string(),
|
|
576
|
+
rubricContent: zRubricContent,
|
|
577
|
+
description: z.union([z.string(), z.null()]).optional(),
|
|
578
|
+
type: z.union([z.string(), z.null()]).optional(),
|
|
579
|
+
});
|
|
580
|
+
/**
|
|
581
|
+
* Invocation
|
|
582
|
+
* Represents a single invocation.
|
|
583
|
+
*/
|
|
584
|
+
export const zInvocationInput = z.object({
|
|
585
|
+
invocationId: z.string().optional().default(""),
|
|
586
|
+
userContent: zContentInput,
|
|
587
|
+
finalResponse: z.union([zContentInput, z.null()]).optional(),
|
|
588
|
+
intermediateData: z.union([zIntermediateDataInput, z.null()]).optional(),
|
|
589
|
+
creationTimestamp: z.number().optional().default(0),
|
|
590
|
+
rubrics: z.union([z.array(zRubric), z.null()]).optional(),
|
|
591
|
+
});
|
|
592
|
+
/**
|
|
593
|
+
* SessionInput
|
|
594
|
+
* Values that help initialize a Session.
|
|
595
|
+
*/
|
|
596
|
+
export const zSessionInput = z.object({
|
|
597
|
+
appName: z.string(),
|
|
598
|
+
userId: z.string(),
|
|
599
|
+
state: z.object({}).optional(),
|
|
600
|
+
});
|
|
601
|
+
/**
|
|
602
|
+
* EvalCase
|
|
603
|
+
* An eval case.
|
|
604
|
+
*/
|
|
605
|
+
export const zEvalCaseInput = z.object({
|
|
606
|
+
evalId: z.string(),
|
|
607
|
+
conversation: z.array(zInvocationInput),
|
|
608
|
+
sessionInput: z.union([zSessionInput, z.null()]).optional(),
|
|
609
|
+
creationTimestamp: z.number().optional().default(0),
|
|
610
|
+
rubrics: z.union([z.array(zRubric), z.null()]).optional(),
|
|
611
|
+
});
|
|
612
|
+
/**
|
|
613
|
+
* EvalSet
|
|
614
|
+
* A set of eval cases.
|
|
615
|
+
*/
|
|
616
|
+
export const zEvalSetInput = z.object({
|
|
617
|
+
eval_set_id: z.string(),
|
|
618
|
+
name: z.union([z.string(), z.null()]).optional(),
|
|
619
|
+
description: z.union([z.string(), z.null()]).optional(),
|
|
620
|
+
eval_cases: z.array(zEvalCaseInput),
|
|
621
|
+
creation_timestamp: z.number().optional().default(0),
|
|
622
|
+
});
|
|
623
|
+
/**
|
|
624
|
+
* CreateEvalSetRequest
|
|
625
|
+
*/
|
|
626
|
+
export const zCreateEvalSetRequest = z.object({
|
|
627
|
+
evalSet: zEvalSetInput,
|
|
628
|
+
});
|
|
629
|
+
/**
|
|
630
|
+
* RagChunkPageSpan
|
|
631
|
+
* Represents where the chunk starts and ends in the document.
|
|
632
|
+
*/
|
|
633
|
+
export const zRagChunkPageSpan = z.object({
|
|
634
|
+
firstPage: z.union([z.number().int(), z.null()]).optional(),
|
|
635
|
+
lastPage: z.union([z.number().int(), z.null()]).optional(),
|
|
636
|
+
});
|
|
637
|
+
/**
|
|
638
|
+
* RagChunk
|
|
639
|
+
* A RagChunk includes the content of a chunk of a RagFile, and associated metadata.
|
|
640
|
+
*/
|
|
641
|
+
export const zRagChunk = z.object({
|
|
642
|
+
pageSpan: z.union([zRagChunkPageSpan, z.null()]).optional(),
|
|
643
|
+
text: z.union([z.string(), z.null()]).optional(),
|
|
644
|
+
});
|
|
645
|
+
/**
|
|
646
|
+
* GroundingChunkRetrievedContext
|
|
647
|
+
* Chunk from context retrieved by the retrieval tools.
|
|
648
|
+
*/
|
|
649
|
+
export const zGroundingChunkRetrievedContextInput = z.object({
|
|
650
|
+
ragChunk: z.union([zRagChunk, z.null()]).optional(),
|
|
651
|
+
text: z.union([z.string(), z.null()]).optional(),
|
|
652
|
+
title: z.union([z.string(), z.null()]).optional(),
|
|
653
|
+
uri: z.union([z.string(), z.null()]).optional(),
|
|
654
|
+
});
|
|
655
|
+
/**
|
|
656
|
+
* GroundingChunkWeb
|
|
657
|
+
* Chunk from the web.
|
|
658
|
+
*/
|
|
659
|
+
export const zGroundingChunkWeb = z.object({
|
|
660
|
+
domain: z.union([z.string(), z.null()]).optional(),
|
|
661
|
+
title: z.union([z.string(), z.null()]).optional(),
|
|
662
|
+
uri: z.union([z.string(), z.null()]).optional(),
|
|
663
|
+
});
|
|
664
|
+
/**
|
|
665
|
+
* GroundingChunk
|
|
666
|
+
* Grounding chunk.
|
|
667
|
+
*/
|
|
668
|
+
export const zGroundingChunkInput = z.object({
|
|
669
|
+
retrievedContext: z
|
|
670
|
+
.union([zGroundingChunkRetrievedContextInput, z.null()])
|
|
671
|
+
.optional(),
|
|
672
|
+
web: z.union([zGroundingChunkWeb, z.null()]).optional(),
|
|
673
|
+
});
|
|
674
|
+
/**
|
|
675
|
+
* Segment
|
|
676
|
+
* Segment of the content.
|
|
677
|
+
*/
|
|
678
|
+
export const zSegment = z.object({
|
|
679
|
+
endIndex: z.union([z.number().int(), z.null()]).optional(),
|
|
680
|
+
partIndex: z.union([z.number().int(), z.null()]).optional(),
|
|
681
|
+
startIndex: z.union([z.number().int(), z.null()]).optional(),
|
|
682
|
+
text: z.union([z.string(), z.null()]).optional(),
|
|
683
|
+
});
|
|
684
|
+
/**
|
|
685
|
+
* GroundingSupport
|
|
686
|
+
* Grounding support.
|
|
687
|
+
*/
|
|
688
|
+
export const zGroundingSupport = z.object({
|
|
689
|
+
confidenceScores: z.union([z.array(z.number()), z.null()]).optional(),
|
|
690
|
+
groundingChunkIndices: z
|
|
691
|
+
.union([z.array(z.number().int()), z.null()])
|
|
692
|
+
.optional(),
|
|
693
|
+
segment: z.union([zSegment, z.null()]).optional(),
|
|
694
|
+
});
|
|
695
|
+
/**
|
|
696
|
+
* RetrievalMetadata
|
|
697
|
+
* Metadata related to retrieval in the grounding flow.
|
|
698
|
+
*/
|
|
699
|
+
export const zRetrievalMetadata = z.object({
|
|
700
|
+
googleSearchDynamicRetrievalScore: z.union([z.number(), z.null()]).optional(),
|
|
701
|
+
});
|
|
702
|
+
/**
|
|
703
|
+
* SearchEntryPoint
|
|
704
|
+
* Google search entry point.
|
|
705
|
+
*/
|
|
706
|
+
export const zSearchEntryPoint = z.object({
|
|
707
|
+
renderedContent: z.union([z.string(), z.null()]).optional(),
|
|
708
|
+
sdkBlob: z.union([z.string(), z.null()]).optional(),
|
|
709
|
+
});
|
|
710
|
+
/**
|
|
711
|
+
* GroundingMetadata
|
|
712
|
+
* Metadata returned to client when grounding is enabled.
|
|
713
|
+
*/
|
|
714
|
+
export const zGroundingMetadataInput = z.object({
|
|
715
|
+
groundingChunks: z
|
|
716
|
+
.union([z.array(zGroundingChunkInput), z.null()])
|
|
717
|
+
.optional(),
|
|
718
|
+
groundingSupports: z.union([z.array(zGroundingSupport), z.null()]).optional(),
|
|
719
|
+
retrievalMetadata: z.union([zRetrievalMetadata, z.null()]).optional(),
|
|
720
|
+
retrievalQueries: z.union([z.array(z.string()), z.null()]).optional(),
|
|
721
|
+
searchEntryPoint: z.union([zSearchEntryPoint, z.null()]).optional(),
|
|
722
|
+
webSearchQueries: z.union([z.array(z.string()), z.null()]).optional(),
|
|
723
|
+
});
|
|
724
|
+
/**
|
|
725
|
+
* FinishReason
|
|
726
|
+
* Output only. The reason why the model stopped generating tokens.
|
|
727
|
+
*
|
|
728
|
+
* If empty, the model has not stopped generating the tokens.
|
|
729
|
+
*/
|
|
730
|
+
export const zFinishReason = z.enum([
|
|
731
|
+
"FINISH_REASON_UNSPECIFIED",
|
|
732
|
+
"STOP",
|
|
733
|
+
"MAX_TOKENS",
|
|
734
|
+
"SAFETY",
|
|
735
|
+
"RECITATION",
|
|
736
|
+
"LANGUAGE",
|
|
737
|
+
"OTHER",
|
|
738
|
+
"BLOCKLIST",
|
|
739
|
+
"PROHIBITED_CONTENT",
|
|
740
|
+
"SPII",
|
|
741
|
+
"MALFORMED_FUNCTION_CALL",
|
|
742
|
+
"IMAGE_SAFETY",
|
|
743
|
+
"UNEXPECTED_TOOL_CALL",
|
|
744
|
+
]);
|
|
745
|
+
/**
|
|
746
|
+
* MediaModality
|
|
747
|
+
* Server content modalities.
|
|
748
|
+
*/
|
|
749
|
+
export const zMediaModality = z.enum([
|
|
750
|
+
"MODALITY_UNSPECIFIED",
|
|
751
|
+
"TEXT",
|
|
752
|
+
"IMAGE",
|
|
753
|
+
"VIDEO",
|
|
754
|
+
"AUDIO",
|
|
755
|
+
"DOCUMENT",
|
|
756
|
+
]);
|
|
757
|
+
/**
|
|
758
|
+
* ModalityTokenCount
|
|
759
|
+
* Represents token counting info for a single modality.
|
|
760
|
+
*/
|
|
761
|
+
export const zModalityTokenCount = z.object({
|
|
762
|
+
modality: z.union([zMediaModality, z.null()]).optional(),
|
|
763
|
+
tokenCount: z.union([z.number().int(), z.null()]).optional(),
|
|
764
|
+
});
|
|
765
|
+
/**
|
|
766
|
+
* TrafficType
|
|
767
|
+
* Output only.
|
|
768
|
+
*
|
|
769
|
+
* Traffic type. This shows whether a request consumes Pay-As-You-Go or
|
|
770
|
+
* Provisioned Throughput quota.
|
|
771
|
+
*/
|
|
772
|
+
export const zTrafficType = z.enum([
|
|
773
|
+
"TRAFFIC_TYPE_UNSPECIFIED",
|
|
774
|
+
"ON_DEMAND",
|
|
775
|
+
"PROVISIONED_THROUGHPUT",
|
|
776
|
+
]);
|
|
777
|
+
/**
|
|
778
|
+
* GenerateContentResponseUsageMetadata
|
|
779
|
+
* Usage metadata about response(s).
|
|
780
|
+
*/
|
|
781
|
+
export const zGenerateContentResponseUsageMetadataInput = z.object({
|
|
782
|
+
cacheTokensDetails: z
|
|
783
|
+
.union([z.array(zModalityTokenCount), z.null()])
|
|
784
|
+
.optional(),
|
|
785
|
+
cachedContentTokenCount: z.union([z.number().int(), z.null()]).optional(),
|
|
786
|
+
candidatesTokenCount: z.union([z.number().int(), z.null()]).optional(),
|
|
787
|
+
candidatesTokensDetails: z
|
|
788
|
+
.union([z.array(zModalityTokenCount), z.null()])
|
|
789
|
+
.optional(),
|
|
790
|
+
promptTokenCount: z.union([z.number().int(), z.null()]).optional(),
|
|
791
|
+
promptTokensDetails: z
|
|
792
|
+
.union([z.array(zModalityTokenCount), z.null()])
|
|
793
|
+
.optional(),
|
|
794
|
+
thoughtsTokenCount: z.union([z.number().int(), z.null()]).optional(),
|
|
795
|
+
toolUsePromptTokenCount: z.union([z.number().int(), z.null()]).optional(),
|
|
796
|
+
toolUsePromptTokensDetails: z
|
|
797
|
+
.union([z.array(zModalityTokenCount), z.null()])
|
|
798
|
+
.optional(),
|
|
799
|
+
totalTokenCount: z.union([z.number().int(), z.null()]).optional(),
|
|
800
|
+
trafficType: z.union([zTrafficType, z.null()]).optional(),
|
|
801
|
+
});
|
|
802
|
+
/**
|
|
803
|
+
* LiveServerSessionResumptionUpdate
|
|
804
|
+
* Update of the session resumption state.
|
|
805
|
+
*
|
|
806
|
+
* Only sent if `session_resumption` was set in the connection config.
|
|
807
|
+
*/
|
|
808
|
+
export const zLiveServerSessionResumptionUpdate = z.object({
|
|
809
|
+
newHandle: z.union([z.string(), z.null()]).optional(),
|
|
810
|
+
resumable: z.union([z.boolean(), z.null()]).optional(),
|
|
811
|
+
lastConsumedClientMessageIndex: z
|
|
812
|
+
.union([z.number().int(), z.null()])
|
|
813
|
+
.optional(),
|
|
814
|
+
});
|
|
815
|
+
/**
|
|
816
|
+
* Transcription
|
|
817
|
+
* Audio transcription in Server Conent.
|
|
818
|
+
*/
|
|
819
|
+
export const zTranscription = z.object({
|
|
820
|
+
text: z.union([z.string(), z.null()]).optional(),
|
|
821
|
+
finished: z.union([z.boolean(), z.null()]).optional(),
|
|
822
|
+
});
|
|
823
|
+
/**
|
|
824
|
+
* EventActions
|
|
825
|
+
* Represents the actions attached to an event.
|
|
826
|
+
*/
|
|
827
|
+
export const zEventActionsInput = z.object({
|
|
828
|
+
skipSummarization: z.union([z.boolean(), z.null()]).optional(),
|
|
829
|
+
stateDelta: z.object({}).optional(),
|
|
830
|
+
artifactDelta: z.object({}).optional(),
|
|
831
|
+
transferToAgent: z.union([z.string(), z.null()]).optional(),
|
|
832
|
+
escalate: z.union([z.boolean(), z.null()]).optional(),
|
|
833
|
+
requestedAuthConfigs: z.object({}).optional(),
|
|
834
|
+
requestedToolConfirmations: z.object({}).optional(),
|
|
835
|
+
});
|
|
836
|
+
/**
|
|
837
|
+
* Event
|
|
838
|
+
* Represents an event in a conversation between agents and users.
|
|
839
|
+
*
|
|
840
|
+
* It is used to store the content of the conversation, as well as the actions
|
|
841
|
+
* taken by the agents like function calls, etc.
|
|
842
|
+
*/
|
|
843
|
+
export const zEventInput = z.object({
|
|
844
|
+
content: z.union([zContentInput, z.null()]).optional(),
|
|
845
|
+
groundingMetadata: z.union([zGroundingMetadataInput, z.null()]).optional(),
|
|
846
|
+
partial: z.union([z.boolean(), z.null()]).optional(),
|
|
847
|
+
turnComplete: z.union([z.boolean(), z.null()]).optional(),
|
|
848
|
+
finishReason: z.union([zFinishReason, z.null()]).optional(),
|
|
849
|
+
errorCode: z.union([z.string(), z.null()]).optional(),
|
|
850
|
+
errorMessage: z.union([z.string(), z.null()]).optional(),
|
|
851
|
+
interrupted: z.union([z.boolean(), z.null()]).optional(),
|
|
852
|
+
customMetadata: z.union([z.object({}), z.null()]).optional(),
|
|
853
|
+
usageMetadata: z
|
|
854
|
+
.union([zGenerateContentResponseUsageMetadataInput, z.null()])
|
|
855
|
+
.optional(),
|
|
856
|
+
liveSessionResumptionUpdate: z
|
|
857
|
+
.union([zLiveServerSessionResumptionUpdate, z.null()])
|
|
858
|
+
.optional(),
|
|
859
|
+
inputTranscription: z.union([zTranscription, z.null()]).optional(),
|
|
860
|
+
outputTranscription: z.union([zTranscription, z.null()]).optional(),
|
|
861
|
+
invocationId: z.string().optional().default(""),
|
|
862
|
+
author: z.string(),
|
|
863
|
+
actions: zEventActionsInput.optional(),
|
|
864
|
+
longRunningToolIds: z.union([z.array(z.string()), z.null()]).optional(),
|
|
865
|
+
branch: z.union([z.string(), z.null()]).optional(),
|
|
866
|
+
id: z.string().optional().default(""),
|
|
867
|
+
timestamp: z.number().optional(),
|
|
868
|
+
});
|
|
869
|
+
/**
|
|
870
|
+
* CreateSessionRequest
|
|
871
|
+
*/
|
|
872
|
+
export const zCreateSessionRequest = z.object({
|
|
873
|
+
sessionId: z.union([z.string(), z.null()]).optional(),
|
|
874
|
+
state: z.union([z.object({}), z.null()]).optional(),
|
|
875
|
+
events: z.union([z.array(zEventInput), z.null()]).optional(),
|
|
876
|
+
});
|
|
877
|
+
/**
|
|
878
|
+
* DemoPublic
|
|
879
|
+
*/
|
|
880
|
+
export const zDemoPublic = z.object({
|
|
881
|
+
message: z.union([z.string(), z.null()]),
|
|
882
|
+
});
|
|
883
|
+
/**
|
|
884
|
+
* DynamicRetrievalConfigMode
|
|
885
|
+
* Config for the dynamic retrieval config mode.
|
|
886
|
+
*/
|
|
887
|
+
export const zDynamicRetrievalConfigMode = z.enum([
|
|
888
|
+
"MODE_UNSPECIFIED",
|
|
889
|
+
"MODE_DYNAMIC",
|
|
890
|
+
]);
|
|
891
|
+
/**
|
|
892
|
+
* DynamicRetrievalConfig
|
|
893
|
+
* Describes the options to customize dynamic retrieval.
|
|
894
|
+
*/
|
|
895
|
+
export const zDynamicRetrievalConfig = z.object({
|
|
896
|
+
mode: z.union([zDynamicRetrievalConfigMode, z.null()]).optional(),
|
|
897
|
+
dynamicThreshold: z.union([z.number(), z.null()]).optional(),
|
|
898
|
+
});
|
|
899
|
+
/**
|
|
900
|
+
* EnterpriseWebSearch
|
|
901
|
+
* Tool to search public web data, powered by Vertex AI Search and Sec4 compliance.
|
|
902
|
+
*/
|
|
903
|
+
export const zEnterpriseWebSearch = z.object({});
|
|
904
|
+
/**
|
|
905
|
+
* IntermediateData
|
|
906
|
+
* Container for intermediate data that an agent would generate as it responds with a final answer.
|
|
907
|
+
*/
|
|
908
|
+
export const zIntermediateDataOutput = z.object({
|
|
909
|
+
toolUses: z.array(zFunctionCall).optional().default([]),
|
|
910
|
+
toolResponses: z.array(zFunctionResponse).optional().default([]),
|
|
911
|
+
intermediateResponses: z
|
|
912
|
+
.array(z.tuple([z.string(), z.array(zPartOutput)]))
|
|
913
|
+
.optional()
|
|
914
|
+
.default([]),
|
|
915
|
+
});
|
|
916
|
+
/**
|
|
917
|
+
* Invocation
|
|
918
|
+
* Represents a single invocation.
|
|
919
|
+
*/
|
|
920
|
+
export const zInvocationOutput = z.object({
|
|
921
|
+
invocationId: z.string().optional().default(""),
|
|
922
|
+
userContent: zContentOutput,
|
|
923
|
+
finalResponse: z.union([zContentOutput, z.null()]).optional(),
|
|
924
|
+
intermediateData: z.union([zIntermediateDataOutput, z.null()]).optional(),
|
|
925
|
+
creationTimestamp: z.number().optional().default(0),
|
|
926
|
+
rubrics: z.union([z.array(zRubric), z.null()]).optional(),
|
|
927
|
+
});
|
|
928
|
+
/**
|
|
929
|
+
* EvalCase
|
|
930
|
+
* An eval case.
|
|
931
|
+
*/
|
|
932
|
+
export const zEvalCaseOutput = z.object({
|
|
933
|
+
evalId: z.string(),
|
|
934
|
+
conversation: z.array(zInvocationOutput),
|
|
935
|
+
sessionInput: z.union([zSessionInput, z.null()]).optional(),
|
|
936
|
+
creationTimestamp: z.number().optional().default(0),
|
|
937
|
+
rubrics: z.union([z.array(zRubric), z.null()]).optional(),
|
|
938
|
+
});
|
|
939
|
+
/**
|
|
940
|
+
* EvalStatus
|
|
941
|
+
*/
|
|
942
|
+
export const zEvalStatus = z.unknown();
|
|
943
|
+
/**
|
|
944
|
+
* HttpRetryOptions
|
|
945
|
+
* HTTP retry options to be used in each of the requests.
|
|
946
|
+
*/
|
|
947
|
+
export const zHttpRetryOptions = z.object({
|
|
948
|
+
attempts: z.union([z.number().int(), z.null()]).optional(),
|
|
949
|
+
initialDelay: z.union([z.number(), z.null()]).optional(),
|
|
950
|
+
maxDelay: z.union([z.number(), z.null()]).optional(),
|
|
951
|
+
expBase: z.union([z.number(), z.null()]).optional(),
|
|
952
|
+
jitter: z.union([z.number(), z.null()]).optional(),
|
|
953
|
+
httpStatusCodes: z.union([z.array(z.number().int()), z.null()]).optional(),
|
|
954
|
+
});
|
|
955
|
+
/**
|
|
956
|
+
* HttpOptions
|
|
957
|
+
* HTTP options to be used in each of the requests.
|
|
958
|
+
*/
|
|
959
|
+
export const zHttpOptions = z.object({
|
|
960
|
+
baseUrl: z.union([z.string(), z.null()]).optional(),
|
|
961
|
+
apiVersion: z.union([z.string(), z.null()]).optional(),
|
|
962
|
+
headers: z.union([z.object({}), z.null()]).optional(),
|
|
963
|
+
timeout: z.union([z.number().int(), z.null()]).optional(),
|
|
964
|
+
clientArgs: z.union([z.object({}), z.null()]).optional(),
|
|
965
|
+
asyncClientArgs: z.union([z.object({}), z.null()]).optional(),
|
|
966
|
+
extraBody: z.union([z.object({}), z.null()]).optional(),
|
|
967
|
+
retryOptions: z.union([zHttpRetryOptions, z.null()]).optional(),
|
|
968
|
+
});
|
|
969
|
+
/**
|
|
970
|
+
* FileState
|
|
971
|
+
* State for the lifecycle of a File.
|
|
972
|
+
*/
|
|
973
|
+
export const zFileState = z.enum([
|
|
974
|
+
"STATE_UNSPECIFIED",
|
|
975
|
+
"PROCESSING",
|
|
976
|
+
"ACTIVE",
|
|
977
|
+
"FAILED",
|
|
978
|
+
]);
|
|
979
|
+
/**
|
|
980
|
+
* FileSource
|
|
981
|
+
* Source of the File.
|
|
982
|
+
*/
|
|
983
|
+
export const zFileSource = z.enum([
|
|
984
|
+
"SOURCE_UNSPECIFIED",
|
|
985
|
+
"UPLOADED",
|
|
986
|
+
"GENERATED",
|
|
987
|
+
]);
|
|
988
|
+
/**
|
|
989
|
+
* FileStatus
|
|
990
|
+
* Status of a File that uses a common error model.
|
|
991
|
+
*/
|
|
992
|
+
export const zFileStatus = z.object({
|
|
993
|
+
details: z.union([z.array(z.object({})), z.null()]).optional(),
|
|
994
|
+
message: z.union([z.string(), z.null()]).optional(),
|
|
995
|
+
code: z.union([z.number().int(), z.null()]).optional(),
|
|
996
|
+
});
|
|
997
|
+
/**
|
|
998
|
+
* File
|
|
999
|
+
* A file uploaded to the API.
|
|
1000
|
+
*/
|
|
1001
|
+
export const zFile = z.object({
|
|
1002
|
+
name: z.union([z.string(), z.null()]).optional(),
|
|
1003
|
+
displayName: z.union([z.string(), z.null()]).optional(),
|
|
1004
|
+
mimeType: z.union([z.string(), z.null()]).optional(),
|
|
1005
|
+
sizeBytes: z.union([z.number().int(), z.null()]).optional(),
|
|
1006
|
+
createTime: z.union([z.string().datetime(), z.null()]).optional(),
|
|
1007
|
+
expirationTime: z.union([z.string().datetime(), z.null()]).optional(),
|
|
1008
|
+
updateTime: z.union([z.string().datetime(), z.null()]).optional(),
|
|
1009
|
+
sha256Hash: z.union([z.string(), z.null()]).optional(),
|
|
1010
|
+
uri: z.union([z.string(), z.null()]).optional(),
|
|
1011
|
+
downloadUri: z.union([z.string(), z.null()]).optional(),
|
|
1012
|
+
state: z.union([zFileState, z.null()]).optional(),
|
|
1013
|
+
source: z.union([zFileSource, z.null()]).optional(),
|
|
1014
|
+
videoMetadata: z.union([z.object({}), z.null()]).optional(),
|
|
1015
|
+
error: z.union([zFileStatus, z.null()]).optional(),
|
|
1016
|
+
});
|
|
1017
|
+
/**
|
|
1018
|
+
* Type
|
|
1019
|
+
* Optional. The type of the data.
|
|
1020
|
+
*/
|
|
1021
|
+
export const zType = z.enum([
|
|
1022
|
+
"TYPE_UNSPECIFIED",
|
|
1023
|
+
"STRING",
|
|
1024
|
+
"NUMBER",
|
|
1025
|
+
"INTEGER",
|
|
1026
|
+
"BOOLEAN",
|
|
1027
|
+
"ARRAY",
|
|
1028
|
+
"OBJECT",
|
|
1029
|
+
"NULL",
|
|
1030
|
+
]);
|
|
1031
|
+
/**
|
|
1032
|
+
* Schema
|
|
1033
|
+
* Schema is used to define the format of input/output data.
|
|
1034
|
+
*
|
|
1035
|
+
* Represents a select subset of an [OpenAPI 3.0 schema
|
|
1036
|
+
* object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may
|
|
1037
|
+
* be added in the future as needed.
|
|
1038
|
+
*/
|
|
1039
|
+
export const zSchemaOutput = z.object({
|
|
1040
|
+
additionalProperties: z.union([z.unknown(), z.null()]).optional(),
|
|
1041
|
+
defs: z.union([z.object({}), z.null()]).optional(),
|
|
1042
|
+
ref: z.union([z.string(), z.null()]).optional(),
|
|
1043
|
+
anyOf: z
|
|
1044
|
+
.union([
|
|
1045
|
+
z.array(z.lazy(() => {
|
|
1046
|
+
return zSchemaOutput;
|
|
1047
|
+
})),
|
|
1048
|
+
z.null(),
|
|
1049
|
+
])
|
|
1050
|
+
.optional(),
|
|
1051
|
+
default: z.union([z.unknown(), z.null()]).optional(),
|
|
1052
|
+
description: z.union([z.string(), z.null()]).optional(),
|
|
1053
|
+
enum: z.union([z.array(z.string()), z.null()]).optional(),
|
|
1054
|
+
example: z.union([z.unknown(), z.null()]).optional(),
|
|
1055
|
+
format: z.union([z.string(), z.null()]).optional(),
|
|
1056
|
+
items: z
|
|
1057
|
+
.union([
|
|
1058
|
+
z.lazy(() => {
|
|
1059
|
+
return zSchemaOutput;
|
|
1060
|
+
}),
|
|
1061
|
+
z.null(),
|
|
1062
|
+
])
|
|
1063
|
+
.optional(),
|
|
1064
|
+
maxItems: z.union([z.number().int(), z.null()]).optional(),
|
|
1065
|
+
maxLength: z.union([z.number().int(), z.null()]).optional(),
|
|
1066
|
+
maxProperties: z.union([z.number().int(), z.null()]).optional(),
|
|
1067
|
+
maximum: z.union([z.number(), z.null()]).optional(),
|
|
1068
|
+
minItems: z.union([z.number().int(), z.null()]).optional(),
|
|
1069
|
+
minLength: z.union([z.number().int(), z.null()]).optional(),
|
|
1070
|
+
minProperties: z.union([z.number().int(), z.null()]).optional(),
|
|
1071
|
+
minimum: z.union([z.number(), z.null()]).optional(),
|
|
1072
|
+
nullable: z.union([z.boolean(), z.null()]).optional(),
|
|
1073
|
+
pattern: z.union([z.string(), z.null()]).optional(),
|
|
1074
|
+
properties: z.union([z.object({}), z.null()]).optional(),
|
|
1075
|
+
propertyOrdering: z.union([z.array(z.string()), z.null()]).optional(),
|
|
1076
|
+
required: z.union([z.array(z.string()), z.null()]).optional(),
|
|
1077
|
+
title: z.union([z.string(), z.null()]).optional(),
|
|
1078
|
+
type: z.union([zType, z.null()]).optional(),
|
|
1079
|
+
});
|
|
1080
|
+
/**
|
|
1081
|
+
* GenerationConfigRoutingConfigAutoRoutingMode
|
|
1082
|
+
* When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference.
|
|
1083
|
+
*/
|
|
1084
|
+
export const zGenerationConfigRoutingConfigAutoRoutingMode = z.object({
|
|
1085
|
+
modelRoutingPreference: z
|
|
1086
|
+
.union([
|
|
1087
|
+
z.enum([
|
|
1088
|
+
"UNKNOWN",
|
|
1089
|
+
"PRIORITIZE_QUALITY",
|
|
1090
|
+
"BALANCED",
|
|
1091
|
+
"PRIORITIZE_COST",
|
|
1092
|
+
]),
|
|
1093
|
+
z.null(),
|
|
1094
|
+
])
|
|
1095
|
+
.optional(),
|
|
1096
|
+
});
|
|
1097
|
+
/**
|
|
1098
|
+
* GenerationConfigRoutingConfigManualRoutingMode
|
|
1099
|
+
* When manual routing is set, the specified model will be used directly.
|
|
1100
|
+
*/
|
|
1101
|
+
export const zGenerationConfigRoutingConfigManualRoutingMode = z.object({
|
|
1102
|
+
modelName: z.union([z.string(), z.null()]).optional(),
|
|
1103
|
+
});
|
|
1104
|
+
/**
|
|
1105
|
+
* GenerationConfigRoutingConfig
|
|
1106
|
+
* The configuration for routing the request to a specific model.
|
|
1107
|
+
*/
|
|
1108
|
+
export const zGenerationConfigRoutingConfig = z.object({
|
|
1109
|
+
autoMode: z
|
|
1110
|
+
.union([zGenerationConfigRoutingConfigAutoRoutingMode, z.null()])
|
|
1111
|
+
.optional(),
|
|
1112
|
+
manualMode: z
|
|
1113
|
+
.union([zGenerationConfigRoutingConfigManualRoutingMode, z.null()])
|
|
1114
|
+
.optional(),
|
|
1115
|
+
});
|
|
1116
|
+
/**
|
|
1117
|
+
* FeatureSelectionPreference
|
|
1118
|
+
* Options for feature selection preference.
|
|
1119
|
+
*/
|
|
1120
|
+
export const zFeatureSelectionPreference = z.enum([
|
|
1121
|
+
"FEATURE_SELECTION_PREFERENCE_UNSPECIFIED",
|
|
1122
|
+
"PRIORITIZE_QUALITY",
|
|
1123
|
+
"BALANCED",
|
|
1124
|
+
"PRIORITIZE_COST",
|
|
1125
|
+
]);
|
|
1126
|
+
/**
|
|
1127
|
+
* ModelSelectionConfig
|
|
1128
|
+
* Config for model selection.
|
|
1129
|
+
*/
|
|
1130
|
+
export const zModelSelectionConfig = z.object({
|
|
1131
|
+
featureSelectionPreference: z
|
|
1132
|
+
.union([zFeatureSelectionPreference, z.null()])
|
|
1133
|
+
.optional(),
|
|
1134
|
+
});
|
|
1135
|
+
/**
|
|
1136
|
+
* HarmBlockMethod
|
|
1137
|
+
* Optional.
|
|
1138
|
+
*
|
|
1139
|
+
* Specify if the threshold is used for probability or severity score. If not
|
|
1140
|
+
* specified, the threshold is used for probability score.
|
|
1141
|
+
*/
|
|
1142
|
+
export const zHarmBlockMethod = z.enum([
|
|
1143
|
+
"HARM_BLOCK_METHOD_UNSPECIFIED",
|
|
1144
|
+
"SEVERITY",
|
|
1145
|
+
"PROBABILITY",
|
|
1146
|
+
]);
|
|
1147
|
+
/**
|
|
1148
|
+
* HarmCategory
|
|
1149
|
+
* Required. Harm category.
|
|
1150
|
+
*/
|
|
1151
|
+
export const zHarmCategory = z.enum([
|
|
1152
|
+
"HARM_CATEGORY_UNSPECIFIED",
|
|
1153
|
+
"HARM_CATEGORY_HATE_SPEECH",
|
|
1154
|
+
"HARM_CATEGORY_DANGEROUS_CONTENT",
|
|
1155
|
+
"HARM_CATEGORY_HARASSMENT",
|
|
1156
|
+
"HARM_CATEGORY_SEXUALLY_EXPLICIT",
|
|
1157
|
+
"HARM_CATEGORY_CIVIC_INTEGRITY",
|
|
1158
|
+
]);
|
|
1159
|
+
/**
|
|
1160
|
+
* HarmBlockThreshold
|
|
1161
|
+
* Required. The harm block threshold.
|
|
1162
|
+
*/
|
|
1163
|
+
export const zHarmBlockThreshold = z.enum([
|
|
1164
|
+
"HARM_BLOCK_THRESHOLD_UNSPECIFIED",
|
|
1165
|
+
"BLOCK_LOW_AND_ABOVE",
|
|
1166
|
+
"BLOCK_MEDIUM_AND_ABOVE",
|
|
1167
|
+
"BLOCK_ONLY_HIGH",
|
|
1168
|
+
"BLOCK_NONE",
|
|
1169
|
+
"OFF",
|
|
1170
|
+
]);
|
|
1171
|
+
/**
|
|
1172
|
+
* SafetySetting
|
|
1173
|
+
* Safety settings.
|
|
1174
|
+
*/
|
|
1175
|
+
export const zSafetySetting = z.object({
|
|
1176
|
+
method: z.union([zHarmBlockMethod, z.null()]).optional(),
|
|
1177
|
+
category: z.union([zHarmCategory, z.null()]).optional(),
|
|
1178
|
+
threshold: z.union([zHarmBlockThreshold, z.null()]).optional(),
|
|
1179
|
+
});
|
|
1180
|
+
/**
|
|
1181
|
+
* FunctionDeclaration
|
|
1182
|
+
* Defines a function that the model can generate JSON inputs for.
|
|
1183
|
+
*
|
|
1184
|
+
* The inputs are based on `OpenAPI 3.0 specifications
|
|
1185
|
+
* <https://spec.openapis.org/oas/v3.0.3>`_.
|
|
1186
|
+
*/
|
|
1187
|
+
export const zFunctionDeclarationOutput = z.object({
|
|
1188
|
+
behavior: z.union([zBehavior, z.null()]).optional(),
|
|
1189
|
+
description: z.union([z.string(), z.null()]).optional(),
|
|
1190
|
+
name: z.union([z.string(), z.null()]).optional(),
|
|
1191
|
+
parameters: z.union([zSchemaOutput, z.null()]).optional(),
|
|
1192
|
+
parametersJsonSchema: z.union([z.unknown(), z.null()]).optional(),
|
|
1193
|
+
response: z.union([zSchemaOutput, z.null()]).optional(),
|
|
1194
|
+
responseJsonSchema: z.union([z.unknown(), z.null()]).optional(),
|
|
1195
|
+
});
|
|
1196
|
+
/**
|
|
1197
|
+
* VertexAISearchDataStoreSpec
|
|
1198
|
+
* Define data stores within engine to filter on in a search call and configurations for those data stores.
|
|
1199
|
+
*
|
|
1200
|
+
* For more information, see
|
|
1201
|
+
* https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec
|
|
1202
|
+
*/
|
|
1203
|
+
export const zVertexAiSearchDataStoreSpec = z.object({
|
|
1204
|
+
dataStore: z.union([z.string(), z.null()]).optional(),
|
|
1205
|
+
filter: z.union([z.string(), z.null()]).optional(),
|
|
1206
|
+
});
|
|
1207
|
+
/**
|
|
1208
|
+
* VertexAISearch
|
|
1209
|
+
* Retrieve from Vertex AI Search datastore or engine for grounding.
|
|
1210
|
+
*
|
|
1211
|
+
* datastore and engine are mutually exclusive. See
|
|
1212
|
+
* https://cloud.google.com/products/agent-builder
|
|
1213
|
+
*/
|
|
1214
|
+
export const zVertexAiSearch = z.object({
|
|
1215
|
+
dataStoreSpecs: z
|
|
1216
|
+
.union([z.array(zVertexAiSearchDataStoreSpec), z.null()])
|
|
1217
|
+
.optional(),
|
|
1218
|
+
datastore: z.union([z.string(), z.null()]).optional(),
|
|
1219
|
+
engine: z.union([z.string(), z.null()]).optional(),
|
|
1220
|
+
filter: z.union([z.string(), z.null()]).optional(),
|
|
1221
|
+
maxResults: z.union([z.number().int(), z.null()]).optional(),
|
|
1222
|
+
});
|
|
1223
|
+
/**
|
|
1224
|
+
* VertexRagStoreRagResource
|
|
1225
|
+
* The definition of the Rag resource.
|
|
1226
|
+
*/
|
|
1227
|
+
export const zVertexRagStoreRagResource = z.object({
|
|
1228
|
+
ragCorpus: z.union([z.string(), z.null()]).optional(),
|
|
1229
|
+
ragFileIds: z.union([z.array(z.string()), z.null()]).optional(),
|
|
1230
|
+
});
|
|
1231
|
+
/**
|
|
1232
|
+
* RagRetrievalConfigFilter
|
|
1233
|
+
* Config for filters.
|
|
1234
|
+
*/
|
|
1235
|
+
export const zRagRetrievalConfigFilter = z.object({
|
|
1236
|
+
metadataFilter: z.union([z.string(), z.null()]).optional(),
|
|
1237
|
+
vectorDistanceThreshold: z.union([z.number(), z.null()]).optional(),
|
|
1238
|
+
vectorSimilarityThreshold: z.union([z.number(), z.null()]).optional(),
|
|
1239
|
+
});
|
|
1240
|
+
/**
|
|
1241
|
+
* RagRetrievalConfigHybridSearch
|
|
1242
|
+
* Config for Hybrid Search.
|
|
1243
|
+
*/
|
|
1244
|
+
export const zRagRetrievalConfigHybridSearch = z.object({
|
|
1245
|
+
alpha: z.union([z.number(), z.null()]).optional(),
|
|
1246
|
+
});
|
|
1247
|
+
/**
|
|
1248
|
+
* RagRetrievalConfigRankingLlmRanker
|
|
1249
|
+
* Config for LlmRanker.
|
|
1250
|
+
*/
|
|
1251
|
+
export const zRagRetrievalConfigRankingLlmRanker = z.object({
|
|
1252
|
+
modelName: z.union([z.string(), z.null()]).optional(),
|
|
1253
|
+
});
|
|
1254
|
+
/**
|
|
1255
|
+
* RagRetrievalConfigRankingRankService
|
|
1256
|
+
* Config for Rank Service.
|
|
1257
|
+
*/
|
|
1258
|
+
export const zRagRetrievalConfigRankingRankService = z.object({
|
|
1259
|
+
modelName: z.union([z.string(), z.null()]).optional(),
|
|
1260
|
+
});
|
|
1261
|
+
/**
|
|
1262
|
+
* RagRetrievalConfigRanking
|
|
1263
|
+
* Config for ranking and reranking.
|
|
1264
|
+
*/
|
|
1265
|
+
export const zRagRetrievalConfigRanking = z.object({
|
|
1266
|
+
llmRanker: z
|
|
1267
|
+
.union([zRagRetrievalConfigRankingLlmRanker, z.null()])
|
|
1268
|
+
.optional(),
|
|
1269
|
+
rankService: z
|
|
1270
|
+
.union([zRagRetrievalConfigRankingRankService, z.null()])
|
|
1271
|
+
.optional(),
|
|
1272
|
+
});
|
|
1273
|
+
/**
|
|
1274
|
+
* RagRetrievalConfig
|
|
1275
|
+
* Specifies the context retrieval config.
|
|
1276
|
+
*/
|
|
1277
|
+
export const zRagRetrievalConfigOutput = z.object({
|
|
1278
|
+
filter: z.union([zRagRetrievalConfigFilter, z.null()]).optional(),
|
|
1279
|
+
hybridSearch: z.union([zRagRetrievalConfigHybridSearch, z.null()]).optional(),
|
|
1280
|
+
ranking: z.union([zRagRetrievalConfigRanking, z.null()]).optional(),
|
|
1281
|
+
topK: z.union([z.number().int(), z.null()]).optional(),
|
|
1282
|
+
});
|
|
1283
|
+
/**
|
|
1284
|
+
* VertexRagStore
|
|
1285
|
+
* Retrieve from Vertex RAG Store for grounding.
|
|
1286
|
+
*/
|
|
1287
|
+
export const zVertexRagStoreOutput = z.object({
|
|
1288
|
+
ragCorpora: z.union([z.array(z.string()), z.null()]).optional(),
|
|
1289
|
+
ragResources: z
|
|
1290
|
+
.union([z.array(zVertexRagStoreRagResource), z.null()])
|
|
1291
|
+
.optional(),
|
|
1292
|
+
ragRetrievalConfig: z.union([zRagRetrievalConfigOutput, z.null()]).optional(),
|
|
1293
|
+
similarityTopK: z.union([z.number().int(), z.null()]).optional(),
|
|
1294
|
+
storeContext: z.union([z.boolean(), z.null()]).optional(),
|
|
1295
|
+
vectorDistanceThreshold: z.union([z.number(), z.null()]).optional(),
|
|
1296
|
+
});
|
|
1297
|
+
/**
|
|
1298
|
+
* Retrieval
|
|
1299
|
+
* Defines a retrieval tool that model can call to access external knowledge.
|
|
1300
|
+
*/
|
|
1301
|
+
export const zRetrievalOutput = z.object({
|
|
1302
|
+
disableAttribution: z.union([z.boolean(), z.null()]).optional(),
|
|
1303
|
+
vertexAiSearch: z.union([zVertexAiSearch, z.null()]).optional(),
|
|
1304
|
+
vertexRagStore: z.union([zVertexRagStoreOutput, z.null()]).optional(),
|
|
1305
|
+
});
|
|
1306
|
+
/**
|
|
1307
|
+
* Interval
|
|
1308
|
+
* Represents a time interval, encoded as a start time (inclusive) and an end time (exclusive).
|
|
1309
|
+
*
|
|
1310
|
+
* The start time must be less than or equal to the end time.
|
|
1311
|
+
* When the start equals the end time, the interval is an empty interval.
|
|
1312
|
+
* (matches no time)
|
|
1313
|
+
* When both start and end are unspecified, the interval matches any time.
|
|
1314
|
+
*/
|
|
1315
|
+
export const zGoogleGenaiTypesInterval = z.object({
|
|
1316
|
+
startTime: z.union([z.string().datetime(), z.null()]).optional(),
|
|
1317
|
+
endTime: z.union([z.string().datetime(), z.null()]).optional(),
|
|
1318
|
+
});
|
|
1319
|
+
/**
|
|
1320
|
+
* GoogleSearch
|
|
1321
|
+
* Tool to support Google Search in Model. Powered by Google.
|
|
1322
|
+
*/
|
|
1323
|
+
export const zGoogleSearchOutput = z.object({
|
|
1324
|
+
timeRangeFilter: z.union([zGoogleGenaiTypesInterval, z.null()]).optional(),
|
|
1325
|
+
});
|
|
1326
|
+
/**
|
|
1327
|
+
* GoogleSearchRetrieval
|
|
1328
|
+
* Tool to retrieve public web data for grounding, powered by Google.
|
|
1329
|
+
*/
|
|
1330
|
+
export const zGoogleSearchRetrievalOutput = z.object({
|
|
1331
|
+
dynamicRetrievalConfig: z
|
|
1332
|
+
.union([zDynamicRetrievalConfig, z.null()])
|
|
1333
|
+
.optional(),
|
|
1334
|
+
});
|
|
1335
|
+
/**
|
|
1336
|
+
* AuthConfig
|
|
1337
|
+
* Auth configuration to run the extension.
|
|
1338
|
+
*/
|
|
1339
|
+
export const zGoogleGenaiTypesAuthConfig = z.object({
|
|
1340
|
+
apiKeyConfig: z.union([zApiKeyConfig, z.null()]).optional(),
|
|
1341
|
+
authType: z.union([zAuthType, z.null()]).optional(),
|
|
1342
|
+
googleServiceAccountConfig: z
|
|
1343
|
+
.union([zAuthConfigGoogleServiceAccountConfig, z.null()])
|
|
1344
|
+
.optional(),
|
|
1345
|
+
httpBasicAuthConfig: z
|
|
1346
|
+
.union([zAuthConfigHttpBasicAuthConfig, z.null()])
|
|
1347
|
+
.optional(),
|
|
1348
|
+
oauthConfig: z.union([zAuthConfigOauthConfig, z.null()]).optional(),
|
|
1349
|
+
oidcConfig: z.union([zAuthConfigOidcConfig, z.null()]).optional(),
|
|
1350
|
+
});
|
|
1351
|
+
/**
|
|
1352
|
+
* GoogleMaps
|
|
1353
|
+
* Tool to support Google Maps in Model.
|
|
1354
|
+
*/
|
|
1355
|
+
export const zGoogleMapsOutput = z.object({
|
|
1356
|
+
authConfig: z.union([zGoogleGenaiTypesAuthConfig, z.null()]).optional(),
|
|
1357
|
+
});
|
|
1358
|
+
/**
|
|
1359
|
+
* UrlContext
|
|
1360
|
+
* Tool to support URL context retrieval.
|
|
1361
|
+
*/
|
|
1362
|
+
export const zUrlContext = z.object({});
|
|
1363
|
+
/**
|
|
1364
|
+
* ToolCodeExecution
|
|
1365
|
+
* Tool that executes code generated by the model, and automatically returns the result to the model.
|
|
1366
|
+
*
|
|
1367
|
+
* See also [ExecutableCode]and [CodeExecutionResult] which are input and output
|
|
1368
|
+
* to this tool.
|
|
1369
|
+
*/
|
|
1370
|
+
export const zToolCodeExecution = z.object({});
|
|
1371
|
+
/**
|
|
1372
|
+
* Tool
|
|
1373
|
+
* Tool details of a tool that the model may use to generate a response.
|
|
1374
|
+
*/
|
|
1375
|
+
export const zGoogleGenaiTypesToolOutput = z.object({
|
|
1376
|
+
functionDeclarations: z
|
|
1377
|
+
.union([z.array(zFunctionDeclarationOutput), z.null()])
|
|
1378
|
+
.optional(),
|
|
1379
|
+
retrieval: z.union([zRetrievalOutput, z.null()]).optional(),
|
|
1380
|
+
googleSearch: z.union([zGoogleSearchOutput, z.null()]).optional(),
|
|
1381
|
+
googleSearchRetrieval: z
|
|
1382
|
+
.union([zGoogleSearchRetrievalOutput, z.null()])
|
|
1383
|
+
.optional(),
|
|
1384
|
+
enterpriseWebSearch: z.union([zEnterpriseWebSearch, z.null()]).optional(),
|
|
1385
|
+
googleMaps: z.union([zGoogleMapsOutput, z.null()]).optional(),
|
|
1386
|
+
urlContext: z.union([zUrlContext, z.null()]).optional(),
|
|
1387
|
+
codeExecution: z.union([zToolCodeExecution, z.null()]).optional(),
|
|
1388
|
+
});
|
|
1389
|
+
/**
|
|
1390
|
+
* ToolAnnotations
|
|
1391
|
+
* Additional properties describing a Tool to clients.
|
|
1392
|
+
*
|
|
1393
|
+
* NOTE: all properties in ToolAnnotations are **hints**.
|
|
1394
|
+
* They are not guaranteed to provide a faithful description of
|
|
1395
|
+
* tool behavior (including descriptive properties like `title`).
|
|
1396
|
+
*
|
|
1397
|
+
* Clients should never make tool use decisions based on ToolAnnotations
|
|
1398
|
+
* received from untrusted servers.
|
|
1399
|
+
*/
|
|
1400
|
+
export const zToolAnnotations = z.object({
|
|
1401
|
+
title: z.union([z.string(), z.null()]).optional(),
|
|
1402
|
+
readOnlyHint: z.union([z.boolean(), z.null()]).optional(),
|
|
1403
|
+
destructiveHint: z.union([z.boolean(), z.null()]).optional(),
|
|
1404
|
+
idempotentHint: z.union([z.boolean(), z.null()]).optional(),
|
|
1405
|
+
openWorldHint: z.union([z.boolean(), z.null()]).optional(),
|
|
1406
|
+
});
|
|
1407
|
+
/**
|
|
1408
|
+
* Tool
|
|
1409
|
+
* Definition for a tool the client can call.
|
|
1410
|
+
*/
|
|
1411
|
+
export const zMcpTypesTool = z.object({
|
|
1412
|
+
name: z.string(),
|
|
1413
|
+
description: z.union([z.string(), z.null()]).optional(),
|
|
1414
|
+
inputSchema: z.object({}),
|
|
1415
|
+
annotations: z.union([zToolAnnotations, z.null()]).optional(),
|
|
1416
|
+
});
|
|
1417
|
+
/**
|
|
1418
|
+
* FunctionCallingConfigMode
|
|
1419
|
+
* Config for the function calling config mode.
|
|
1420
|
+
*/
|
|
1421
|
+
export const zFunctionCallingConfigMode = z.enum([
|
|
1422
|
+
"MODE_UNSPECIFIED",
|
|
1423
|
+
"AUTO",
|
|
1424
|
+
"ANY",
|
|
1425
|
+
"NONE",
|
|
1426
|
+
]);
|
|
1427
|
+
/**
|
|
1428
|
+
* FunctionCallingConfig
|
|
1429
|
+
* Function calling config.
|
|
1430
|
+
*/
|
|
1431
|
+
export const zFunctionCallingConfig = z.object({
|
|
1432
|
+
mode: z.union([zFunctionCallingConfigMode, z.null()]).optional(),
|
|
1433
|
+
allowedFunctionNames: z.union([z.array(z.string()), z.null()]).optional(),
|
|
1434
|
+
});
|
|
1435
|
+
/**
|
|
1436
|
+
* LatLng
|
|
1437
|
+
* An object that represents a latitude/longitude pair.
|
|
1438
|
+
*
|
|
1439
|
+
* This is expressed as a pair of doubles to represent degrees latitude and
|
|
1440
|
+
* degrees longitude. Unless specified otherwise, this object must conform to the
|
|
1441
|
+
* <a href="https://en.wikipedia.org/wiki/World_Geodetic_System#1984_version">
|
|
1442
|
+
* WGS84 standard</a>. Values must be within normalized ranges.
|
|
1443
|
+
*/
|
|
1444
|
+
export const zLatLng = z.object({
|
|
1445
|
+
latitude: z.union([z.number(), z.null()]).optional(),
|
|
1446
|
+
longitude: z.union([z.number(), z.null()]).optional(),
|
|
1447
|
+
});
|
|
1448
|
+
/**
|
|
1449
|
+
* RetrievalConfig
|
|
1450
|
+
* Retrieval config.
|
|
1451
|
+
*/
|
|
1452
|
+
export const zRetrievalConfig = z.object({
|
|
1453
|
+
latLng: z.union([zLatLng, z.null()]).optional(),
|
|
1454
|
+
languageCode: z.union([z.string(), z.null()]).optional(),
|
|
1455
|
+
});
|
|
1456
|
+
/**
|
|
1457
|
+
* ToolConfig
|
|
1458
|
+
* Tool config.
|
|
1459
|
+
*
|
|
1460
|
+
* This config is shared for all tools provided in the request.
|
|
1461
|
+
*/
|
|
1462
|
+
export const zToolConfigOutput = z.object({
|
|
1463
|
+
functionCallingConfig: z.union([zFunctionCallingConfig, z.null()]).optional(),
|
|
1464
|
+
retrievalConfig: z.union([zRetrievalConfig, z.null()]).optional(),
|
|
1465
|
+
});
|
|
1466
|
+
/**
|
|
1467
|
+
* MediaResolution
|
|
1468
|
+
* The media resolution to use.
|
|
1469
|
+
*/
|
|
1470
|
+
export const zMediaResolution = z.enum([
|
|
1471
|
+
"MEDIA_RESOLUTION_UNSPECIFIED",
|
|
1472
|
+
"MEDIA_RESOLUTION_LOW",
|
|
1473
|
+
"MEDIA_RESOLUTION_MEDIUM",
|
|
1474
|
+
"MEDIA_RESOLUTION_HIGH",
|
|
1475
|
+
]);
|
|
1476
|
+
/**
|
|
1477
|
+
* PrebuiltVoiceConfig
|
|
1478
|
+
* The configuration for the prebuilt speaker to use.
|
|
1479
|
+
*/
|
|
1480
|
+
export const zPrebuiltVoiceConfig = z.object({
|
|
1481
|
+
voiceName: z.union([z.string(), z.null()]).optional(),
|
|
1482
|
+
});
|
|
1483
|
+
/**
|
|
1484
|
+
* VoiceConfig
|
|
1485
|
+
* The configuration for the voice to use.
|
|
1486
|
+
*/
|
|
1487
|
+
export const zVoiceConfig = z.object({
|
|
1488
|
+
prebuiltVoiceConfig: z.union([zPrebuiltVoiceConfig, z.null()]).optional(),
|
|
1489
|
+
});
|
|
1490
|
+
/**
|
|
1491
|
+
* SpeakerVoiceConfig
|
|
1492
|
+
* The configuration for the speaker to use.
|
|
1493
|
+
*/
|
|
1494
|
+
export const zSpeakerVoiceConfigOutput = z.object({
|
|
1495
|
+
speaker: z.union([z.string(), z.null()]).optional(),
|
|
1496
|
+
voiceConfig: z.union([zVoiceConfig, z.null()]).optional(),
|
|
1497
|
+
});
|
|
1498
|
+
/**
|
|
1499
|
+
* MultiSpeakerVoiceConfig
|
|
1500
|
+
* The configuration for the multi-speaker setup.
|
|
1501
|
+
*/
|
|
1502
|
+
export const zMultiSpeakerVoiceConfigOutput = z.object({
|
|
1503
|
+
speakerVoiceConfigs: z
|
|
1504
|
+
.union([z.array(zSpeakerVoiceConfigOutput), z.null()])
|
|
1505
|
+
.optional(),
|
|
1506
|
+
});
|
|
1507
|
+
/**
|
|
1508
|
+
* SpeechConfig
|
|
1509
|
+
* The speech generation configuration.
|
|
1510
|
+
*/
|
|
1511
|
+
export const zSpeechConfigOutput = z.object({
|
|
1512
|
+
voiceConfig: z.union([zVoiceConfig, z.null()]).optional(),
|
|
1513
|
+
multiSpeakerVoiceConfig: z
|
|
1514
|
+
.union([zMultiSpeakerVoiceConfigOutput, z.null()])
|
|
1515
|
+
.optional(),
|
|
1516
|
+
languageCode: z.union([z.string(), z.null()]).optional(),
|
|
1517
|
+
});
|
|
1518
|
+
/**
|
|
1519
|
+
* ThinkingConfig
|
|
1520
|
+
* The thinking features configuration.
|
|
1521
|
+
*/
|
|
1522
|
+
export const zThinkingConfig = z.object({
|
|
1523
|
+
includeThoughts: z.union([z.boolean(), z.null()]).optional(),
|
|
1524
|
+
thinkingBudget: z.union([z.number().int(), z.null()]).optional(),
|
|
1525
|
+
});
|
|
1526
|
+
/**
|
|
1527
|
+
* GenerateContentConfig
|
|
1528
|
+
* Optional model configuration parameters.
|
|
1529
|
+
*
|
|
1530
|
+
* For more information, see `Content generation parameters
|
|
1531
|
+
* <https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/content-generation-parameters>`_.
|
|
1532
|
+
*/
|
|
1533
|
+
export const zGenerateContentConfigOutput = z.object({
|
|
1534
|
+
httpOptions: z.union([zHttpOptions, z.null()]).optional(),
|
|
1535
|
+
systemInstruction: z
|
|
1536
|
+
.union([
|
|
1537
|
+
zContentOutput,
|
|
1538
|
+
z.array(z.union([zFile, zPartOutput, z.string()])),
|
|
1539
|
+
zFile,
|
|
1540
|
+
zPartOutput,
|
|
1541
|
+
z.string(),
|
|
1542
|
+
z.null(),
|
|
1543
|
+
])
|
|
1544
|
+
.optional(),
|
|
1545
|
+
temperature: z.union([z.number(), z.null()]).optional(),
|
|
1546
|
+
topP: z.union([z.number(), z.null()]).optional(),
|
|
1547
|
+
topK: z.union([z.number(), z.null()]).optional(),
|
|
1548
|
+
candidateCount: z.union([z.number().int(), z.null()]).optional(),
|
|
1549
|
+
maxOutputTokens: z.union([z.number().int(), z.null()]).optional(),
|
|
1550
|
+
stopSequences: z.union([z.array(z.string()), z.null()]).optional(),
|
|
1551
|
+
responseLogprobs: z.union([z.boolean(), z.null()]).optional(),
|
|
1552
|
+
logprobs: z.union([z.number().int(), z.null()]).optional(),
|
|
1553
|
+
presencePenalty: z.union([z.number(), z.null()]).optional(),
|
|
1554
|
+
frequencyPenalty: z.union([z.number(), z.null()]).optional(),
|
|
1555
|
+
seed: z.union([z.number().int(), z.null()]).optional(),
|
|
1556
|
+
responseMimeType: z.union([z.string(), z.null()]).optional(),
|
|
1557
|
+
responseSchema: z.union([z.object({}), zSchemaOutput, z.null()]).optional(),
|
|
1558
|
+
responseJsonSchema: z.union([z.unknown(), z.null()]).optional(),
|
|
1559
|
+
routingConfig: z.union([zGenerationConfigRoutingConfig, z.null()]).optional(),
|
|
1560
|
+
modelSelectionConfig: z.union([zModelSelectionConfig, z.null()]).optional(),
|
|
1561
|
+
safetySettings: z.union([z.array(zSafetySetting), z.null()]).optional(),
|
|
1562
|
+
tools: z
|
|
1563
|
+
.union([
|
|
1564
|
+
z.array(z.union([zGoogleGenaiTypesToolOutput, zMcpTypesTool])),
|
|
1565
|
+
z.null(),
|
|
1566
|
+
])
|
|
1567
|
+
.optional(),
|
|
1568
|
+
toolConfig: z.union([zToolConfigOutput, z.null()]).optional(),
|
|
1569
|
+
labels: z.union([z.object({}), z.null()]).optional(),
|
|
1570
|
+
cachedContent: z.union([z.string(), z.null()]).optional(),
|
|
1571
|
+
responseModalities: z.union([z.array(z.string()), z.null()]).optional(),
|
|
1572
|
+
mediaResolution: z.union([zMediaResolution, z.null()]).optional(),
|
|
1573
|
+
speechConfig: z.union([zSpeechConfigOutput, z.string(), z.null()]).optional(),
|
|
1574
|
+
audioTimestamp: z.union([z.boolean(), z.null()]).optional(),
|
|
1575
|
+
automaticFunctionCalling: z
|
|
1576
|
+
.union([zAutomaticFunctionCallingConfig, z.null()])
|
|
1577
|
+
.optional(),
|
|
1578
|
+
thinkingConfig: z.union([zThinkingConfig, z.null()]).optional(),
|
|
1579
|
+
});
|
|
1580
|
+
/**
|
|
1581
|
+
* JudgeModelOptions
|
|
1582
|
+
* Options for an eval metric's judge model.
|
|
1583
|
+
*/
|
|
1584
|
+
export const zJudgeModelOptionsOutput = z.object({
|
|
1585
|
+
judgeModel: z.string().optional().default("gemini-2.5-flash"),
|
|
1586
|
+
judgeModelConfig: z
|
|
1587
|
+
.union([zGenerateContentConfigOutput, z.null()])
|
|
1588
|
+
.optional(),
|
|
1589
|
+
numSamples: z.number().int().optional().default(5),
|
|
1590
|
+
});
|
|
1591
|
+
/**
|
|
1592
|
+
* EvalMetric
|
|
1593
|
+
* A metric used to evaluate a particular aspect of an eval case.
|
|
1594
|
+
*/
|
|
1595
|
+
export const zEvalMetricOutput = z.object({
|
|
1596
|
+
metricName: z.string(),
|
|
1597
|
+
threshold: z.number(),
|
|
1598
|
+
judgeModelOptions: z.union([zJudgeModelOptionsOutput, z.null()]).optional(),
|
|
1599
|
+
criterion: z.union([zBaseCriterion, z.null()]).optional(),
|
|
1600
|
+
});
|
|
1601
|
+
/**
|
|
1602
|
+
* RubricScore
|
|
1603
|
+
* The score obtained after applying the rubric to the Agent's response.
|
|
1604
|
+
*/
|
|
1605
|
+
export const zRubricScore = z.object({
|
|
1606
|
+
rubricId: z.string(),
|
|
1607
|
+
rationale: z.union([z.string(), z.null()]).optional(),
|
|
1608
|
+
score: z.union([z.number(), z.null()]).optional(),
|
|
1609
|
+
});
|
|
1610
|
+
/**
|
|
1611
|
+
* EvalMetricResultDetails
|
|
1612
|
+
*/
|
|
1613
|
+
export const zEvalMetricResultDetails = z.object({
|
|
1614
|
+
rubricScores: z.union([z.array(zRubricScore), z.null()]).optional(),
|
|
1615
|
+
});
|
|
1616
|
+
/**
|
|
1617
|
+
* EvalMetricResult
|
|
1618
|
+
* The actual computed score/value of a particular EvalMetric.
|
|
1619
|
+
*/
|
|
1620
|
+
export const zEvalMetricResult = z.object({
|
|
1621
|
+
metricName: z.string(),
|
|
1622
|
+
threshold: z.number(),
|
|
1623
|
+
judgeModelOptions: z.union([zJudgeModelOptionsOutput, z.null()]).optional(),
|
|
1624
|
+
criterion: z.union([zBaseCriterion, z.null()]).optional(),
|
|
1625
|
+
score: z.union([z.number(), z.null()]).optional(),
|
|
1626
|
+
evalStatus: zEvalStatus,
|
|
1627
|
+
details: zEvalMetricResultDetails.optional(),
|
|
1628
|
+
});
|
|
1629
|
+
/**
|
|
1630
|
+
* EvalMetricResultPerInvocation
|
|
1631
|
+
* Eval metric results per invocation.
|
|
1632
|
+
*/
|
|
1633
|
+
export const zEvalMetricResultPerInvocation = z.object({
|
|
1634
|
+
actualInvocation: zInvocationOutput,
|
|
1635
|
+
expectedInvocation: zInvocationOutput,
|
|
1636
|
+
evalMetricResults: z.array(zEvalMetricResult).optional().default([]),
|
|
1637
|
+
});
|
|
1638
|
+
/**
|
|
1639
|
+
* GroundingChunkRetrievedContext
|
|
1640
|
+
* Chunk from context retrieved by the retrieval tools.
|
|
1641
|
+
*/
|
|
1642
|
+
export const zGroundingChunkRetrievedContextOutput = z.object({
|
|
1643
|
+
ragChunk: z.union([zRagChunk, z.null()]).optional(),
|
|
1644
|
+
text: z.union([z.string(), z.null()]).optional(),
|
|
1645
|
+
title: z.union([z.string(), z.null()]).optional(),
|
|
1646
|
+
uri: z.union([z.string(), z.null()]).optional(),
|
|
1647
|
+
});
|
|
1648
|
+
/**
|
|
1649
|
+
* GroundingChunk
|
|
1650
|
+
* Grounding chunk.
|
|
1651
|
+
*/
|
|
1652
|
+
export const zGroundingChunkOutput = z.object({
|
|
1653
|
+
retrievedContext: z
|
|
1654
|
+
.union([zGroundingChunkRetrievedContextOutput, z.null()])
|
|
1655
|
+
.optional(),
|
|
1656
|
+
web: z.union([zGroundingChunkWeb, z.null()]).optional(),
|
|
1657
|
+
});
|
|
1658
|
+
/**
|
|
1659
|
+
* GroundingMetadata
|
|
1660
|
+
* Metadata returned to client when grounding is enabled.
|
|
1661
|
+
*/
|
|
1662
|
+
export const zGroundingMetadataOutput = z.object({
|
|
1663
|
+
groundingChunks: z
|
|
1664
|
+
.union([z.array(zGroundingChunkOutput), z.null()])
|
|
1665
|
+
.optional(),
|
|
1666
|
+
groundingSupports: z.union([z.array(zGroundingSupport), z.null()]).optional(),
|
|
1667
|
+
retrievalMetadata: z.union([zRetrievalMetadata, z.null()]).optional(),
|
|
1668
|
+
retrievalQueries: z.union([z.array(z.string()), z.null()]).optional(),
|
|
1669
|
+
searchEntryPoint: z.union([zSearchEntryPoint, z.null()]).optional(),
|
|
1670
|
+
webSearchQueries: z.union([z.array(z.string()), z.null()]).optional(),
|
|
1671
|
+
});
|
|
1672
|
+
/**
|
|
1673
|
+
* GenerateContentResponseUsageMetadata
|
|
1674
|
+
* Usage metadata about response(s).
|
|
1675
|
+
*/
|
|
1676
|
+
export const zGenerateContentResponseUsageMetadataOutput = z.object({
|
|
1677
|
+
cacheTokensDetails: z
|
|
1678
|
+
.union([z.array(zModalityTokenCount), z.null()])
|
|
1679
|
+
.optional(),
|
|
1680
|
+
cachedContentTokenCount: z.union([z.number().int(), z.null()]).optional(),
|
|
1681
|
+
candidatesTokenCount: z.union([z.number().int(), z.null()]).optional(),
|
|
1682
|
+
candidatesTokensDetails: z
|
|
1683
|
+
.union([z.array(zModalityTokenCount), z.null()])
|
|
1684
|
+
.optional(),
|
|
1685
|
+
promptTokenCount: z.union([z.number().int(), z.null()]).optional(),
|
|
1686
|
+
promptTokensDetails: z
|
|
1687
|
+
.union([z.array(zModalityTokenCount), z.null()])
|
|
1688
|
+
.optional(),
|
|
1689
|
+
thoughtsTokenCount: z.union([z.number().int(), z.null()]).optional(),
|
|
1690
|
+
toolUsePromptTokenCount: z.union([z.number().int(), z.null()]).optional(),
|
|
1691
|
+
toolUsePromptTokensDetails: z
|
|
1692
|
+
.union([z.array(zModalityTokenCount), z.null()])
|
|
1693
|
+
.optional(),
|
|
1694
|
+
totalTokenCount: z.union([z.number().int(), z.null()]).optional(),
|
|
1695
|
+
trafficType: z.union([zTrafficType, z.null()]).optional(),
|
|
1696
|
+
});
|
|
1697
|
+
/**
|
|
1698
|
+
* EventActions
|
|
1699
|
+
* Represents the actions attached to an event.
|
|
1700
|
+
*/
|
|
1701
|
+
export const zEventActionsOutput = z.object({
|
|
1702
|
+
skipSummarization: z.union([z.boolean(), z.null()]).optional(),
|
|
1703
|
+
stateDelta: z.object({}).optional(),
|
|
1704
|
+
artifactDelta: z.object({}).optional(),
|
|
1705
|
+
transferToAgent: z.union([z.string(), z.null()]).optional(),
|
|
1706
|
+
escalate: z.union([z.boolean(), z.null()]).optional(),
|
|
1707
|
+
requestedAuthConfigs: z.object({}).optional(),
|
|
1708
|
+
requestedToolConfirmations: z.object({}).optional(),
|
|
1709
|
+
});
|
|
1710
|
+
/**
|
|
1711
|
+
* Event
|
|
1712
|
+
* Represents an event in a conversation between agents and users.
|
|
1713
|
+
*
|
|
1714
|
+
* It is used to store the content of the conversation, as well as the actions
|
|
1715
|
+
* taken by the agents like function calls, etc.
|
|
1716
|
+
*/
|
|
1717
|
+
export const zEventOutput = z.object({
|
|
1718
|
+
content: z.union([zContentOutput, z.null()]).optional(),
|
|
1719
|
+
groundingMetadata: z.union([zGroundingMetadataOutput, z.null()]).optional(),
|
|
1720
|
+
partial: z.union([z.boolean(), z.null()]).optional(),
|
|
1721
|
+
turnComplete: z.union([z.boolean(), z.null()]).optional(),
|
|
1722
|
+
finishReason: z.union([zFinishReason, z.null()]).optional(),
|
|
1723
|
+
errorCode: z.union([z.string(), z.null()]).optional(),
|
|
1724
|
+
errorMessage: z.union([z.string(), z.null()]).optional(),
|
|
1725
|
+
interrupted: z.union([z.boolean(), z.null()]).optional(),
|
|
1726
|
+
customMetadata: z.union([z.object({}), z.null()]).optional(),
|
|
1727
|
+
usageMetadata: z
|
|
1728
|
+
.union([zGenerateContentResponseUsageMetadataOutput, z.null()])
|
|
1729
|
+
.optional(),
|
|
1730
|
+
liveSessionResumptionUpdate: z
|
|
1731
|
+
.union([zLiveServerSessionResumptionUpdate, z.null()])
|
|
1732
|
+
.optional(),
|
|
1733
|
+
inputTranscription: z.union([zTranscription, z.null()]).optional(),
|
|
1734
|
+
outputTranscription: z.union([zTranscription, z.null()]).optional(),
|
|
1735
|
+
invocationId: z.string().optional().default(""),
|
|
1736
|
+
author: z.string(),
|
|
1737
|
+
actions: zEventActionsOutput.optional(),
|
|
1738
|
+
longRunningToolIds: z.union([z.array(z.string()), z.null()]).optional(),
|
|
1739
|
+
branch: z.union([z.string(), z.null()]).optional(),
|
|
1740
|
+
id: z.string().optional().default(""),
|
|
1741
|
+
timestamp: z.number().optional(),
|
|
1742
|
+
});
|
|
1743
|
+
/**
|
|
1744
|
+
* Session
|
|
1745
|
+
* Represents a series of interactions between a user and agents.
|
|
1746
|
+
*/
|
|
1747
|
+
export const zSession = z.object({
|
|
1748
|
+
id: z.string(),
|
|
1749
|
+
appName: z.string(),
|
|
1750
|
+
userId: z.string(),
|
|
1751
|
+
state: z.object({}).optional(),
|
|
1752
|
+
events: z.array(zEventOutput).optional(),
|
|
1753
|
+
lastUpdateTime: z.number().optional().default(0),
|
|
1754
|
+
});
|
|
1755
|
+
/**
|
|
1756
|
+
* EvalCaseResult
|
|
1757
|
+
* Case level evaluation results.
|
|
1758
|
+
*/
|
|
1759
|
+
export const zEvalCaseResult = z.object({
|
|
1760
|
+
evalSetFile: z.union([z.string(), z.null()]).optional(),
|
|
1761
|
+
evalSetId: z.string().optional().default(""),
|
|
1762
|
+
evalId: z.string().optional().default(""),
|
|
1763
|
+
finalEvalStatus: zEvalStatus,
|
|
1764
|
+
evalMetricResults: z
|
|
1765
|
+
.union([z.array(z.tuple([zEvalMetricOutput, zEvalMetricResult])), z.null()])
|
|
1766
|
+
.optional(),
|
|
1767
|
+
overallEvalMetricResults: z.array(zEvalMetricResult),
|
|
1768
|
+
evalMetricResultPerInvocation: z.array(zEvalMetricResultPerInvocation),
|
|
1769
|
+
sessionId: z.string(),
|
|
1770
|
+
sessionDetails: z.union([zSession, z.null()]).optional(),
|
|
1771
|
+
userId: z.union([z.string(), z.null()]).optional(),
|
|
1772
|
+
});
|
|
1773
|
+
/**
|
|
1774
|
+
* Schema
|
|
1775
|
+
* Schema is used to define the format of input/output data.
|
|
1776
|
+
*
|
|
1777
|
+
* Represents a select subset of an [OpenAPI 3.0 schema
|
|
1778
|
+
* object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may
|
|
1779
|
+
* be added in the future as needed.
|
|
1780
|
+
*/
|
|
1781
|
+
export const zSchemaInput = z.object({
|
|
1782
|
+
additionalProperties: z.union([z.unknown(), z.null()]).optional(),
|
|
1783
|
+
defs: z.union([z.object({}), z.null()]).optional(),
|
|
1784
|
+
ref: z.union([z.string(), z.null()]).optional(),
|
|
1785
|
+
anyOf: z
|
|
1786
|
+
.union([
|
|
1787
|
+
z.array(z.lazy(() => {
|
|
1788
|
+
return zSchemaInput;
|
|
1789
|
+
})),
|
|
1790
|
+
z.null(),
|
|
1791
|
+
])
|
|
1792
|
+
.optional(),
|
|
1793
|
+
default: z.union([z.unknown(), z.null()]).optional(),
|
|
1794
|
+
description: z.union([z.string(), z.null()]).optional(),
|
|
1795
|
+
enum: z.union([z.array(z.string()), z.null()]).optional(),
|
|
1796
|
+
example: z.union([z.unknown(), z.null()]).optional(),
|
|
1797
|
+
format: z.union([z.string(), z.null()]).optional(),
|
|
1798
|
+
items: z
|
|
1799
|
+
.union([
|
|
1800
|
+
z.lazy(() => {
|
|
1801
|
+
return zSchemaInput;
|
|
1802
|
+
}),
|
|
1803
|
+
z.null(),
|
|
1804
|
+
])
|
|
1805
|
+
.optional(),
|
|
1806
|
+
maxItems: z.union([z.number().int(), z.null()]).optional(),
|
|
1807
|
+
maxLength: z.union([z.number().int(), z.null()]).optional(),
|
|
1808
|
+
maxProperties: z.union([z.number().int(), z.null()]).optional(),
|
|
1809
|
+
maximum: z.union([z.number(), z.null()]).optional(),
|
|
1810
|
+
minItems: z.union([z.number().int(), z.null()]).optional(),
|
|
1811
|
+
minLength: z.union([z.number().int(), z.null()]).optional(),
|
|
1812
|
+
minProperties: z.union([z.number().int(), z.null()]).optional(),
|
|
1813
|
+
minimum: z.union([z.number(), z.null()]).optional(),
|
|
1814
|
+
nullable: z.union([z.boolean(), z.null()]).optional(),
|
|
1815
|
+
pattern: z.union([z.string(), z.null()]).optional(),
|
|
1816
|
+
properties: z.union([z.object({}), z.null()]).optional(),
|
|
1817
|
+
propertyOrdering: z.union([z.array(z.string()), z.null()]).optional(),
|
|
1818
|
+
required: z.union([z.array(z.string()), z.null()]).optional(),
|
|
1819
|
+
title: z.union([z.string(), z.null()]).optional(),
|
|
1820
|
+
type: z.union([zType, z.null()]).optional(),
|
|
1821
|
+
});
|
|
1822
|
+
/**
|
|
1823
|
+
* FunctionDeclaration
|
|
1824
|
+
* Defines a function that the model can generate JSON inputs for.
|
|
1825
|
+
*
|
|
1826
|
+
* The inputs are based on `OpenAPI 3.0 specifications
|
|
1827
|
+
* <https://spec.openapis.org/oas/v3.0.3>`_.
|
|
1828
|
+
*/
|
|
1829
|
+
export const zFunctionDeclarationInput = z.object({
|
|
1830
|
+
behavior: z.union([zBehavior, z.null()]).optional(),
|
|
1831
|
+
description: z.union([z.string(), z.null()]).optional(),
|
|
1832
|
+
name: z.union([z.string(), z.null()]).optional(),
|
|
1833
|
+
parameters: z.union([zSchemaInput, z.null()]).optional(),
|
|
1834
|
+
parametersJsonSchema: z.union([z.unknown(), z.null()]).optional(),
|
|
1835
|
+
response: z.union([zSchemaInput, z.null()]).optional(),
|
|
1836
|
+
responseJsonSchema: z.union([z.unknown(), z.null()]).optional(),
|
|
1837
|
+
});
|
|
1838
|
+
/**
|
|
1839
|
+
* RagRetrievalConfig
|
|
1840
|
+
* Specifies the context retrieval config.
|
|
1841
|
+
*/
|
|
1842
|
+
export const zRagRetrievalConfigInput = z.object({
|
|
1843
|
+
filter: z.union([zRagRetrievalConfigFilter, z.null()]).optional(),
|
|
1844
|
+
hybridSearch: z.union([zRagRetrievalConfigHybridSearch, z.null()]).optional(),
|
|
1845
|
+
ranking: z.union([zRagRetrievalConfigRanking, z.null()]).optional(),
|
|
1846
|
+
topK: z.union([z.number().int(), z.null()]).optional(),
|
|
1847
|
+
});
|
|
1848
|
+
/**
|
|
1849
|
+
* VertexRagStore
|
|
1850
|
+
* Retrieve from Vertex RAG Store for grounding.
|
|
1851
|
+
*/
|
|
1852
|
+
export const zVertexRagStoreInput = z.object({
|
|
1853
|
+
ragCorpora: z.union([z.array(z.string()), z.null()]).optional(),
|
|
1854
|
+
ragResources: z
|
|
1855
|
+
.union([z.array(zVertexRagStoreRagResource), z.null()])
|
|
1856
|
+
.optional(),
|
|
1857
|
+
ragRetrievalConfig: z.union([zRagRetrievalConfigInput, z.null()]).optional(),
|
|
1858
|
+
similarityTopK: z.union([z.number().int(), z.null()]).optional(),
|
|
1859
|
+
storeContext: z.union([z.boolean(), z.null()]).optional(),
|
|
1860
|
+
vectorDistanceThreshold: z.union([z.number(), z.null()]).optional(),
|
|
1861
|
+
});
|
|
1862
|
+
/**
|
|
1863
|
+
* Retrieval
|
|
1864
|
+
* Defines a retrieval tool that model can call to access external knowledge.
|
|
1865
|
+
*/
|
|
1866
|
+
export const zRetrievalInput = z.object({
|
|
1867
|
+
disableAttribution: z.union([z.boolean(), z.null()]).optional(),
|
|
1868
|
+
vertexAiSearch: z.union([zVertexAiSearch, z.null()]).optional(),
|
|
1869
|
+
vertexRagStore: z.union([zVertexRagStoreInput, z.null()]).optional(),
|
|
1870
|
+
});
|
|
1871
|
+
/**
|
|
1872
|
+
* Interval
|
|
1873
|
+
* Represents a time interval, encoded as a start time (inclusive) and an end time (exclusive).
|
|
1874
|
+
*
|
|
1875
|
+
* The start time must be less than or equal to the end time.
|
|
1876
|
+
* When the start equals the end time, the interval is an empty interval.
|
|
1877
|
+
* (matches no time)
|
|
1878
|
+
* When both start and end are unspecified, the interval matches any time.
|
|
1879
|
+
*/
|
|
1880
|
+
export const zIntervalInput = z.object({
|
|
1881
|
+
startTime: z.union([z.string().datetime(), z.null()]).optional(),
|
|
1882
|
+
endTime: z.union([z.string().datetime(), z.null()]).optional(),
|
|
1883
|
+
});
|
|
1884
|
+
/**
|
|
1885
|
+
* GoogleSearch
|
|
1886
|
+
* Tool to support Google Search in Model. Powered by Google.
|
|
1887
|
+
*/
|
|
1888
|
+
export const zGoogleSearchInput = z.object({
|
|
1889
|
+
timeRangeFilter: z.union([zIntervalInput, z.null()]).optional(),
|
|
1890
|
+
});
|
|
1891
|
+
/**
|
|
1892
|
+
* GoogleSearchRetrieval
|
|
1893
|
+
* Tool to retrieve public web data for grounding, powered by Google.
|
|
1894
|
+
*/
|
|
1895
|
+
export const zGoogleSearchRetrievalInput = z.object({
|
|
1896
|
+
dynamicRetrievalConfig: z
|
|
1897
|
+
.union([zDynamicRetrievalConfig, z.null()])
|
|
1898
|
+
.optional(),
|
|
1899
|
+
});
|
|
1900
|
+
/**
|
|
1901
|
+
* GoogleMaps
|
|
1902
|
+
* Tool to support Google Maps in Model.
|
|
1903
|
+
*/
|
|
1904
|
+
export const zGoogleMapsInput = z.object({
|
|
1905
|
+
authConfig: z.union([zGoogleGenaiTypesAuthConfig, z.null()]).optional(),
|
|
1906
|
+
});
|
|
1907
|
+
/**
|
|
1908
|
+
* Tool
|
|
1909
|
+
* Tool details of a tool that the model may use to generate a response.
|
|
1910
|
+
*/
|
|
1911
|
+
export const zGoogleGenaiTypesToolInput = z.object({
|
|
1912
|
+
functionDeclarations: z
|
|
1913
|
+
.union([z.array(zFunctionDeclarationInput), z.null()])
|
|
1914
|
+
.optional(),
|
|
1915
|
+
retrieval: z.union([zRetrievalInput, z.null()]).optional(),
|
|
1916
|
+
googleSearch: z.union([zGoogleSearchInput, z.null()]).optional(),
|
|
1917
|
+
googleSearchRetrieval: z
|
|
1918
|
+
.union([zGoogleSearchRetrievalInput, z.null()])
|
|
1919
|
+
.optional(),
|
|
1920
|
+
enterpriseWebSearch: z.union([zEnterpriseWebSearch, z.null()]).optional(),
|
|
1921
|
+
googleMaps: z.union([zGoogleMapsInput, z.null()]).optional(),
|
|
1922
|
+
urlContext: z.union([zUrlContext, z.null()]).optional(),
|
|
1923
|
+
codeExecution: z.union([zToolCodeExecution, z.null()]).optional(),
|
|
1924
|
+
});
|
|
1925
|
+
/**
|
|
1926
|
+
* ToolConfig
|
|
1927
|
+
* Tool config.
|
|
1928
|
+
*
|
|
1929
|
+
* This config is shared for all tools provided in the request.
|
|
1930
|
+
*/
|
|
1931
|
+
export const zToolConfigInput = z.object({
|
|
1932
|
+
functionCallingConfig: z.union([zFunctionCallingConfig, z.null()]).optional(),
|
|
1933
|
+
retrievalConfig: z.union([zRetrievalConfig, z.null()]).optional(),
|
|
1934
|
+
});
|
|
1935
|
+
/**
|
|
1936
|
+
* SpeakerVoiceConfig
|
|
1937
|
+
* The configuration for the speaker to use.
|
|
1938
|
+
*/
|
|
1939
|
+
export const zSpeakerVoiceConfigInput = z.object({
|
|
1940
|
+
speaker: z.union([z.string(), z.null()]).optional(),
|
|
1941
|
+
voiceConfig: z.union([zVoiceConfig, z.null()]).optional(),
|
|
1942
|
+
});
|
|
1943
|
+
/**
|
|
1944
|
+
* MultiSpeakerVoiceConfig
|
|
1945
|
+
* The configuration for the multi-speaker setup.
|
|
1946
|
+
*/
|
|
1947
|
+
export const zMultiSpeakerVoiceConfigInput = z.object({
|
|
1948
|
+
speakerVoiceConfigs: z
|
|
1949
|
+
.union([z.array(zSpeakerVoiceConfigInput), z.null()])
|
|
1950
|
+
.optional(),
|
|
1951
|
+
});
|
|
1952
|
+
/**
|
|
1953
|
+
* SpeechConfig
|
|
1954
|
+
* The speech generation configuration.
|
|
1955
|
+
*/
|
|
1956
|
+
export const zSpeechConfigInput = z.object({
|
|
1957
|
+
voiceConfig: z.union([zVoiceConfig, z.null()]).optional(),
|
|
1958
|
+
multiSpeakerVoiceConfig: z
|
|
1959
|
+
.union([zMultiSpeakerVoiceConfigInput, z.null()])
|
|
1960
|
+
.optional(),
|
|
1961
|
+
languageCode: z.union([z.string(), z.null()]).optional(),
|
|
1962
|
+
});
|
|
1963
|
+
/**
|
|
1964
|
+
* GenerateContentConfig
|
|
1965
|
+
* Optional model configuration parameters.
|
|
1966
|
+
*
|
|
1967
|
+
* For more information, see `Content generation parameters
|
|
1968
|
+
* <https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/content-generation-parameters>`_.
|
|
1969
|
+
*/
|
|
1970
|
+
export const zGenerateContentConfigInput = z.object({
|
|
1971
|
+
httpOptions: z.union([zHttpOptions, z.null()]).optional(),
|
|
1972
|
+
systemInstruction: z
|
|
1973
|
+
.union([
|
|
1974
|
+
zContentInput,
|
|
1975
|
+
z.array(z.union([zFile, zPartInput, z.string()])),
|
|
1976
|
+
zFile,
|
|
1977
|
+
zPartInput,
|
|
1978
|
+
z.string(),
|
|
1979
|
+
z.null(),
|
|
1980
|
+
])
|
|
1981
|
+
.optional(),
|
|
1982
|
+
temperature: z.union([z.number(), z.null()]).optional(),
|
|
1983
|
+
topP: z.union([z.number(), z.null()]).optional(),
|
|
1984
|
+
topK: z.union([z.number(), z.null()]).optional(),
|
|
1985
|
+
candidateCount: z.union([z.number().int(), z.null()]).optional(),
|
|
1986
|
+
maxOutputTokens: z.union([z.number().int(), z.null()]).optional(),
|
|
1987
|
+
stopSequences: z.union([z.array(z.string()), z.null()]).optional(),
|
|
1988
|
+
responseLogprobs: z.union([z.boolean(), z.null()]).optional(),
|
|
1989
|
+
logprobs: z.union([z.number().int(), z.null()]).optional(),
|
|
1990
|
+
presencePenalty: z.union([z.number(), z.null()]).optional(),
|
|
1991
|
+
frequencyPenalty: z.union([z.number(), z.null()]).optional(),
|
|
1992
|
+
seed: z.union([z.number().int(), z.null()]).optional(),
|
|
1993
|
+
responseMimeType: z.union([z.string(), z.null()]).optional(),
|
|
1994
|
+
responseSchema: z.union([z.object({}), zSchemaInput, z.null()]).optional(),
|
|
1995
|
+
responseJsonSchema: z.union([z.unknown(), z.null()]).optional(),
|
|
1996
|
+
routingConfig: z.union([zGenerationConfigRoutingConfig, z.null()]).optional(),
|
|
1997
|
+
modelSelectionConfig: z.union([zModelSelectionConfig, z.null()]).optional(),
|
|
1998
|
+
safetySettings: z.union([z.array(zSafetySetting), z.null()]).optional(),
|
|
1999
|
+
tools: z
|
|
2000
|
+
.union([
|
|
2001
|
+
z.array(z.union([zGoogleGenaiTypesToolInput, zMcpTypesTool])),
|
|
2002
|
+
z.null(),
|
|
2003
|
+
])
|
|
2004
|
+
.optional(),
|
|
2005
|
+
toolConfig: z.union([zToolConfigInput, z.null()]).optional(),
|
|
2006
|
+
labels: z.union([z.object({}), z.null()]).optional(),
|
|
2007
|
+
cachedContent: z.union([z.string(), z.null()]).optional(),
|
|
2008
|
+
responseModalities: z.union([z.array(z.string()), z.null()]).optional(),
|
|
2009
|
+
mediaResolution: z.union([zMediaResolution, z.null()]).optional(),
|
|
2010
|
+
speechConfig: z.union([zSpeechConfigInput, z.string(), z.null()]).optional(),
|
|
2011
|
+
audioTimestamp: z.union([z.boolean(), z.null()]).optional(),
|
|
2012
|
+
automaticFunctionCalling: z
|
|
2013
|
+
.union([zAutomaticFunctionCallingConfig, z.null()])
|
|
2014
|
+
.optional(),
|
|
2015
|
+
thinkingConfig: z.union([zThinkingConfig, z.null()]).optional(),
|
|
2016
|
+
});
|
|
2017
|
+
/**
|
|
2018
|
+
* JudgeModelOptions
|
|
2019
|
+
* Options for an eval metric's judge model.
|
|
2020
|
+
*/
|
|
2021
|
+
export const zJudgeModelOptionsInput = z.object({
|
|
2022
|
+
judgeModel: z.string().optional().default("gemini-2.5-flash"),
|
|
2023
|
+
judgeModelConfig: z.union([zGenerateContentConfigInput, z.null()]).optional(),
|
|
2024
|
+
numSamples: z.number().int().optional().default(5),
|
|
2025
|
+
});
|
|
2026
|
+
/**
|
|
2027
|
+
* EvalMetric
|
|
2028
|
+
* A metric used to evaluate a particular aspect of an eval case.
|
|
2029
|
+
*/
|
|
2030
|
+
export const zEvalMetricInput = z.object({
|
|
2031
|
+
metricName: z.string(),
|
|
2032
|
+
threshold: z.number(),
|
|
2033
|
+
judgeModelOptions: z.union([zJudgeModelOptionsInput, z.null()]).optional(),
|
|
2034
|
+
criterion: z.union([zBaseCriterion, z.null()]).optional(),
|
|
2035
|
+
});
|
|
2036
|
+
/**
|
|
2037
|
+
* EvalResult
|
|
2038
|
+
* This class has no field intentionally.
|
|
2039
|
+
*
|
|
2040
|
+
* The goal here is to just give a new name to the class to align with the API
|
|
2041
|
+
* endpoint.
|
|
2042
|
+
*/
|
|
2043
|
+
export const zEvalResult = z.object({
|
|
2044
|
+
evalSetResultId: z.string(),
|
|
2045
|
+
evalSetResultName: z.union([z.string(), z.null()]).optional(),
|
|
2046
|
+
evalSetId: z.string(),
|
|
2047
|
+
evalCaseResults: z.array(zEvalCaseResult).optional(),
|
|
2048
|
+
creationTimestamp: z.number().optional().default(0),
|
|
2049
|
+
});
|
|
2050
|
+
/**
|
|
2051
|
+
* EvalSet
|
|
2052
|
+
* A set of eval cases.
|
|
2053
|
+
*/
|
|
2054
|
+
export const zEvalSetOutput = z.object({
|
|
2055
|
+
eval_set_id: z.string(),
|
|
2056
|
+
name: z.union([z.string(), z.null()]).optional(),
|
|
2057
|
+
description: z.union([z.string(), z.null()]).optional(),
|
|
2058
|
+
eval_cases: z.array(zEvalCaseOutput),
|
|
2059
|
+
creation_timestamp: z.number().optional().default(0),
|
|
2060
|
+
});
|
|
2061
|
+
/**
|
|
2062
|
+
* EvalSetResult
|
|
2063
|
+
* Eval set level evaluation results.
|
|
2064
|
+
*/
|
|
2065
|
+
export const zEvalSetResult = z.object({
|
|
2066
|
+
evalSetResultId: z.string(),
|
|
2067
|
+
evalSetResultName: z.union([z.string(), z.null()]).optional(),
|
|
2068
|
+
evalSetId: z.string(),
|
|
2069
|
+
evalCaseResults: z.array(zEvalCaseResult).optional(),
|
|
2070
|
+
creationTimestamp: z.number().optional().default(0),
|
|
2071
|
+
});
|
|
2072
|
+
/**
|
|
2073
|
+
* HTTPBase
|
|
2074
|
+
*/
|
|
2075
|
+
export const zHttpBase = z.object({
|
|
2076
|
+
type: zSecuritySchemeType.optional(),
|
|
2077
|
+
description: z.union([z.string(), z.null()]).optional(),
|
|
2078
|
+
scheme: z.string(),
|
|
2079
|
+
});
|
|
2080
|
+
/**
|
|
2081
|
+
* HTTPBearer
|
|
2082
|
+
*/
|
|
2083
|
+
export const zHttpBearer = z.object({
|
|
2084
|
+
type: zSecuritySchemeType.optional(),
|
|
2085
|
+
description: z.union([z.string(), z.null()]).optional(),
|
|
2086
|
+
scheme: z.literal("bearer").optional().default("bearer"),
|
|
2087
|
+
bearerFormat: z.union([z.string(), z.null()]).optional(),
|
|
2088
|
+
});
|
|
2089
|
+
/**
|
|
2090
|
+
* ValidationError
|
|
2091
|
+
*/
|
|
2092
|
+
export const zValidationError = z.object({
|
|
2093
|
+
loc: z.array(z.union([z.string(), z.number().int()])),
|
|
2094
|
+
msg: z.string(),
|
|
2095
|
+
type: z.string(),
|
|
2096
|
+
});
|
|
2097
|
+
/**
|
|
2098
|
+
* HTTPValidationError
|
|
2099
|
+
*/
|
|
2100
|
+
export const zHttpValidationError = z.object({
|
|
2101
|
+
detail: z.array(zValidationError).optional(),
|
|
2102
|
+
});
|
|
2103
|
+
/**
|
|
2104
|
+
* Item
|
|
2105
|
+
*/
|
|
2106
|
+
export const zItem = z.object({
|
|
2107
|
+
id: z.number().int(),
|
|
2108
|
+
name: z.string(),
|
|
2109
|
+
description: z.union([z.string(), z.null()]).optional(),
|
|
2110
|
+
price: z.number(),
|
|
2111
|
+
tags: z.array(z.string()).optional().default([]),
|
|
2112
|
+
});
|
|
2113
|
+
/**
|
|
2114
|
+
* ListEvalResultsResponse
|
|
2115
|
+
*/
|
|
2116
|
+
export const zListEvalResultsResponse = z.object({
|
|
2117
|
+
evalResultIds: z.array(z.string()),
|
|
2118
|
+
});
|
|
2119
|
+
/**
|
|
2120
|
+
* ListEvalSetsResponse
|
|
2121
|
+
*/
|
|
2122
|
+
export const zListEvalSetsResponse = z.object({
|
|
2123
|
+
evalSetIds: z.array(z.string()),
|
|
2124
|
+
});
|
|
2125
|
+
/**
|
|
2126
|
+
* Interval
|
|
2127
|
+
* Represents a range of numeric values, e.g. [0 ,1] or (2,3) or [-1, 6).
|
|
2128
|
+
*/
|
|
2129
|
+
export const zGoogleAdkEvaluationEvalMetricsInterval = z.object({
|
|
2130
|
+
minValue: z.number(),
|
|
2131
|
+
openAtMin: z.boolean().optional().default(false),
|
|
2132
|
+
maxValue: z.number(),
|
|
2133
|
+
openAtMax: z.boolean().optional().default(false),
|
|
2134
|
+
});
|
|
2135
|
+
/**
|
|
2136
|
+
* MetricValueInfo
|
|
2137
|
+
* Information about the type of metric value.
|
|
2138
|
+
*/
|
|
2139
|
+
export const zMetricValueInfo = z.object({
|
|
2140
|
+
interval: z
|
|
2141
|
+
.union([zGoogleAdkEvaluationEvalMetricsInterval, z.null()])
|
|
2142
|
+
.optional(),
|
|
2143
|
+
});
|
|
2144
|
+
/**
|
|
2145
|
+
* MetricInfo
|
|
2146
|
+
* Information about the metric that are used for Evals.
|
|
2147
|
+
*/
|
|
2148
|
+
export const zMetricInfo = z.object({
|
|
2149
|
+
metricName: z.string(),
|
|
2150
|
+
description: z.string().optional(),
|
|
2151
|
+
metricValueInfo: zMetricValueInfo,
|
|
2152
|
+
});
|
|
2153
|
+
/**
|
|
2154
|
+
* ListMetricsInfoResponse
|
|
2155
|
+
*/
|
|
2156
|
+
export const zListMetricsInfoResponse = z.object({
|
|
2157
|
+
metricsInfo: z.array(zMetricInfo),
|
|
2158
|
+
});
|
|
2159
|
+
/**
|
|
2160
|
+
* OAuthFlowImplicit
|
|
2161
|
+
*/
|
|
2162
|
+
export const zOAuthFlowImplicit = z.object({
|
|
2163
|
+
refreshUrl: z.union([z.string(), z.null()]).optional(),
|
|
2164
|
+
scopes: z.object({}).optional().default({}),
|
|
2165
|
+
authorizationUrl: z.string(),
|
|
2166
|
+
});
|
|
2167
|
+
/**
|
|
2168
|
+
* OAuthFlowPassword
|
|
2169
|
+
*/
|
|
2170
|
+
export const zOAuthFlowPassword = z.object({
|
|
2171
|
+
refreshUrl: z.union([z.string(), z.null()]).optional(),
|
|
2172
|
+
scopes: z.object({}).optional().default({}),
|
|
2173
|
+
tokenUrl: z.string(),
|
|
2174
|
+
});
|
|
2175
|
+
/**
|
|
2176
|
+
* OAuthFlowClientCredentials
|
|
2177
|
+
*/
|
|
2178
|
+
export const zOAuthFlowClientCredentials = z.object({
|
|
2179
|
+
refreshUrl: z.union([z.string(), z.null()]).optional(),
|
|
2180
|
+
scopes: z.object({}).optional().default({}),
|
|
2181
|
+
tokenUrl: z.string(),
|
|
2182
|
+
});
|
|
2183
|
+
/**
|
|
2184
|
+
* OAuthFlowAuthorizationCode
|
|
2185
|
+
*/
|
|
2186
|
+
export const zOAuthFlowAuthorizationCode = z.object({
|
|
2187
|
+
refreshUrl: z.union([z.string(), z.null()]).optional(),
|
|
2188
|
+
scopes: z.object({}).optional().default({}),
|
|
2189
|
+
authorizationUrl: z.string(),
|
|
2190
|
+
tokenUrl: z.string(),
|
|
2191
|
+
});
|
|
2192
|
+
/**
|
|
2193
|
+
* OAuthFlows
|
|
2194
|
+
*/
|
|
2195
|
+
export const zOAuthFlows = z.object({
|
|
2196
|
+
implicit: z.union([zOAuthFlowImplicit, z.null()]).optional(),
|
|
2197
|
+
password: z.union([zOAuthFlowPassword, z.null()]).optional(),
|
|
2198
|
+
clientCredentials: z
|
|
2199
|
+
.union([zOAuthFlowClientCredentials, z.null()])
|
|
2200
|
+
.optional(),
|
|
2201
|
+
authorizationCode: z
|
|
2202
|
+
.union([zOAuthFlowAuthorizationCode, z.null()])
|
|
2203
|
+
.optional(),
|
|
2204
|
+
});
|
|
2205
|
+
/**
|
|
2206
|
+
* OAuth2
|
|
2207
|
+
*/
|
|
2208
|
+
export const zOAuth2Input = z.object({
|
|
2209
|
+
type: zSecuritySchemeType.optional(),
|
|
2210
|
+
description: z.union([z.string(), z.null()]).optional(),
|
|
2211
|
+
flows: zOAuthFlows,
|
|
2212
|
+
});
|
|
2213
|
+
/**
|
|
2214
|
+
* OAuth2
|
|
2215
|
+
*/
|
|
2216
|
+
export const zOAuth2Output = z.object({
|
|
2217
|
+
type: zSecuritySchemeType.optional(),
|
|
2218
|
+
description: z.union([z.string(), z.null()]).optional(),
|
|
2219
|
+
flows: zOAuthFlows,
|
|
2220
|
+
});
|
|
2221
|
+
/**
|
|
2222
|
+
* OpenIdConnect
|
|
2223
|
+
*/
|
|
2224
|
+
export const zOpenIdConnect = z.object({
|
|
2225
|
+
type: zSecuritySchemeType.optional(),
|
|
2226
|
+
description: z.union([z.string(), z.null()]).optional(),
|
|
2227
|
+
openIdConnectUrl: z.string(),
|
|
2228
|
+
});
|
|
2229
|
+
/**
|
|
2230
|
+
* OpenIdConnectWithConfig
|
|
2231
|
+
*/
|
|
2232
|
+
export const zOpenIdConnectWithConfig = z.object({
|
|
2233
|
+
type: zSecuritySchemeType.optional(),
|
|
2234
|
+
description: z.union([z.string(), z.null()]).optional(),
|
|
2235
|
+
authorization_endpoint: z.string(),
|
|
2236
|
+
token_endpoint: z.string(),
|
|
2237
|
+
userinfo_endpoint: z.union([z.string(), z.null()]).optional(),
|
|
2238
|
+
revocation_endpoint: z.union([z.string(), z.null()]).optional(),
|
|
2239
|
+
token_endpoint_auth_methods_supported: z
|
|
2240
|
+
.union([z.array(z.string()), z.null()])
|
|
2241
|
+
.optional(),
|
|
2242
|
+
grant_types_supported: z.union([z.array(z.string()), z.null()]).optional(),
|
|
2243
|
+
scopes: z.union([z.array(z.string()), z.null()]).optional(),
|
|
2244
|
+
});
|
|
2245
|
+
/**
|
|
2246
|
+
* RunAgentRequest
|
|
2247
|
+
*/
|
|
2248
|
+
export const zRunAgentRequest = z.object({
|
|
2249
|
+
appName: z.string(),
|
|
2250
|
+
userId: z.string(),
|
|
2251
|
+
sessionId: z.string(),
|
|
2252
|
+
newMessage: zContentInput,
|
|
2253
|
+
streaming: z.boolean().optional().default(false),
|
|
2254
|
+
stateDelta: z.union([z.object({}), z.null()]).optional(),
|
|
2255
|
+
});
|
|
2256
|
+
/**
|
|
2257
|
+
* RunEvalRequest
|
|
2258
|
+
*/
|
|
2259
|
+
export const zRunEvalRequest = z.object({
|
|
2260
|
+
evalIds: z.array(z.string()).optional(),
|
|
2261
|
+
evalCaseIds: z.array(z.string()).optional(),
|
|
2262
|
+
evalMetrics: z.array(zEvalMetricInput),
|
|
2263
|
+
});
|
|
2264
|
+
/**
|
|
2265
|
+
* RunEvalResult
|
|
2266
|
+
*/
|
|
2267
|
+
export const zRunEvalResult = z.object({
|
|
2268
|
+
evalSetFile: z.string(),
|
|
2269
|
+
evalSetId: z.string(),
|
|
2270
|
+
evalId: z.string(),
|
|
2271
|
+
finalEvalStatus: zEvalStatus,
|
|
2272
|
+
evalMetricResults: z
|
|
2273
|
+
.array(z.tuple([zEvalMetricOutput, zEvalMetricResult]))
|
|
2274
|
+
.optional()
|
|
2275
|
+
.default([]),
|
|
2276
|
+
overallEvalMetricResults: z.array(zEvalMetricResult),
|
|
2277
|
+
evalMetricResultPerInvocation: z.array(zEvalMetricResultPerInvocation),
|
|
2278
|
+
userId: z.string(),
|
|
2279
|
+
sessionId: z.string(),
|
|
2280
|
+
});
|
|
2281
|
+
/**
|
|
2282
|
+
* RunEvalResponse
|
|
2283
|
+
*/
|
|
2284
|
+
export const zRunEvalResponse = z.object({
|
|
2285
|
+
runEvalResults: z.array(zRunEvalResult),
|
|
2286
|
+
});
|
|
2287
|
+
/**
|
|
2288
|
+
* StartNapcatRequest
|
|
2289
|
+
* 启动Napcat沙盒请求模型
|
|
2290
|
+
*/
|
|
2291
|
+
export const zStartNapcatRequest = z.object({
|
|
2292
|
+
sandbox_type: z.string(),
|
|
2293
|
+
sandboxId: z.string(),
|
|
2294
|
+
});
|
|
2295
|
+
/**
|
|
2296
|
+
* StartNapcatResponse
|
|
2297
|
+
* 启动Napcat沙盒响应模型
|
|
2298
|
+
*/
|
|
2299
|
+
export const zStartNapcatResponse = z.object({
|
|
2300
|
+
sandboxId: z.string(),
|
|
2301
|
+
error: z.union([z.string(), z.null()]).optional(),
|
|
2302
|
+
});
|
|
2303
|
+
/**
|
|
2304
|
+
* ToolConfirmation
|
|
2305
|
+
* Represents a tool confirmation configuration.
|
|
2306
|
+
*/
|
|
2307
|
+
export const zToolConfirmation = z.object({
|
|
2308
|
+
hint: z.string().optional().default(""),
|
|
2309
|
+
confirmed: z.boolean().optional().default(false),
|
|
2310
|
+
payload: z.union([z.unknown(), z.null()]).optional(),
|
|
2311
|
+
});
|
|
2312
|
+
/**
|
|
2313
|
+
* UserCreate
|
|
2314
|
+
*/
|
|
2315
|
+
export const zUserCreate = z.object({
|
|
2316
|
+
email: z.string().email().max(255),
|
|
2317
|
+
is_active: z.boolean().optional().default(true),
|
|
2318
|
+
is_superuser: z.boolean().optional().default(false),
|
|
2319
|
+
full_name: z.union([z.string().max(255), z.null()]).optional(),
|
|
2320
|
+
username: z.union([z.string().max(255), z.null()]).optional(),
|
|
2321
|
+
identifier: z.union([z.string().max(255), z.null()]).optional(),
|
|
2322
|
+
meta: z.union([z.object({}), z.null()]).optional(),
|
|
2323
|
+
organization_id: z.union([z.string().max(255), z.null()]).optional(),
|
|
2324
|
+
password: z.string().min(6).max(40),
|
|
2325
|
+
});
|
|
2326
|
+
/**
|
|
2327
|
+
* AuthConfig
|
|
2328
|
+
* The auth config sent by tool asking client to collect auth credentials and
|
|
2329
|
+
*
|
|
2330
|
+
* adk and client will help to fill in the response
|
|
2331
|
+
*/
|
|
2332
|
+
export const zGoogleAdkAuthAuthToolAuthConfigInput = z.object({
|
|
2333
|
+
authScheme: z.union([
|
|
2334
|
+
zApiKey,
|
|
2335
|
+
zHttpBase,
|
|
2336
|
+
zOAuth2Input,
|
|
2337
|
+
zOpenIdConnect,
|
|
2338
|
+
zHttpBearer,
|
|
2339
|
+
zOpenIdConnectWithConfig,
|
|
2340
|
+
]),
|
|
2341
|
+
rawAuthCredential: z.union([zAuthCredentialInput, z.null()]).optional(),
|
|
2342
|
+
exchangedAuthCredential: z.union([zAuthCredentialInput, z.null()]).optional(),
|
|
2343
|
+
credentialKey: z.union([z.string(), z.null()]).optional(),
|
|
2344
|
+
});
|
|
2345
|
+
/**
|
|
2346
|
+
* AuthConfig
|
|
2347
|
+
* The auth config sent by tool asking client to collect auth credentials and
|
|
2348
|
+
*
|
|
2349
|
+
* adk and client will help to fill in the response
|
|
2350
|
+
*/
|
|
2351
|
+
export const zGoogleAdkAuthAuthToolAuthConfigOutput = z.object({
|
|
2352
|
+
authScheme: z.union([
|
|
2353
|
+
zApiKey,
|
|
2354
|
+
zHttpBase,
|
|
2355
|
+
zOAuth2Output,
|
|
2356
|
+
zOpenIdConnect,
|
|
2357
|
+
zHttpBearer,
|
|
2358
|
+
zOpenIdConnectWithConfig,
|
|
2359
|
+
]),
|
|
2360
|
+
rawAuthCredential: z.union([zAuthCredentialOutput, z.null()]).optional(),
|
|
2361
|
+
exchangedAuthCredential: z
|
|
2362
|
+
.union([zAuthCredentialOutput, z.null()])
|
|
2363
|
+
.optional(),
|
|
2364
|
+
credentialKey: z.union([z.string(), z.null()]).optional(),
|
|
2365
|
+
});
|
|
2366
|
+
export const zListAppsData = z.object({
|
|
2367
|
+
body: z.never().optional(),
|
|
2368
|
+
path: z.never().optional(),
|
|
2369
|
+
query: z.never().optional(),
|
|
2370
|
+
});
|
|
2371
|
+
/**
|
|
2372
|
+
* Response List Apps
|
|
2373
|
+
* Successful Response
|
|
2374
|
+
*/
|
|
2375
|
+
export const zListAppsResponse = z.array(z.string());
|
|
2376
|
+
export const zDebugGetTraceDictData = z.object({
|
|
2377
|
+
body: z.never().optional(),
|
|
2378
|
+
path: z.object({
|
|
2379
|
+
event_id: z.string(),
|
|
2380
|
+
}),
|
|
2381
|
+
query: z.never().optional(),
|
|
2382
|
+
});
|
|
2383
|
+
export const zDebugGetSessionTraceData = z.object({
|
|
2384
|
+
body: z.never().optional(),
|
|
2385
|
+
path: z.object({
|
|
2386
|
+
session_id: z.string(),
|
|
2387
|
+
}),
|
|
2388
|
+
query: z.never().optional(),
|
|
2389
|
+
});
|
|
2390
|
+
export const zDeleteSessionData = z.object({
|
|
2391
|
+
body: z.never().optional(),
|
|
2392
|
+
path: z.object({
|
|
2393
|
+
app_name: z.string(),
|
|
2394
|
+
user_id: z.string(),
|
|
2395
|
+
session_id: z.string(),
|
|
2396
|
+
}),
|
|
2397
|
+
query: z.never().optional(),
|
|
2398
|
+
});
|
|
2399
|
+
/**
|
|
2400
|
+
* Response Delete Session
|
|
2401
|
+
* Successful Response
|
|
2402
|
+
*/
|
|
2403
|
+
export const zDeleteSessionResponse = z.null();
|
|
2404
|
+
export const zGetSessionData = z.object({
|
|
2405
|
+
body: z.never().optional(),
|
|
2406
|
+
path: z.object({
|
|
2407
|
+
app_name: z.string(),
|
|
2408
|
+
user_id: z.string(),
|
|
2409
|
+
session_id: z.string(),
|
|
2410
|
+
}),
|
|
2411
|
+
query: z.never().optional(),
|
|
2412
|
+
});
|
|
2413
|
+
/**
|
|
2414
|
+
* Successful Response
|
|
2415
|
+
*/
|
|
2416
|
+
export const zGetSessionResponse = zSession;
|
|
2417
|
+
export const zCreateSessionWithIdData = z.object({
|
|
2418
|
+
body: z.union([z.object({}), z.null()]).optional(),
|
|
2419
|
+
path: z.object({
|
|
2420
|
+
app_name: z.string(),
|
|
2421
|
+
user_id: z.string(),
|
|
2422
|
+
session_id: z.string(),
|
|
2423
|
+
}),
|
|
2424
|
+
query: z.never().optional(),
|
|
2425
|
+
});
|
|
2426
|
+
/**
|
|
2427
|
+
* Successful Response
|
|
2428
|
+
*/
|
|
2429
|
+
export const zCreateSessionWithIdResponse = zSession;
|
|
2430
|
+
export const zListSessionsData = z.object({
|
|
2431
|
+
body: z.never().optional(),
|
|
2432
|
+
path: z.object({
|
|
2433
|
+
app_name: z.string(),
|
|
2434
|
+
user_id: z.string(),
|
|
2435
|
+
}),
|
|
2436
|
+
query: z.never().optional(),
|
|
2437
|
+
});
|
|
2438
|
+
/**
|
|
2439
|
+
* Response List Sessions
|
|
2440
|
+
* Successful Response
|
|
2441
|
+
*/
|
|
2442
|
+
export const zListSessionsResponse = z.array(zSession);
|
|
2443
|
+
export const zCreateSessionData = z.object({
|
|
2444
|
+
body: z.union([zCreateSessionRequest, z.null()]).optional(),
|
|
2445
|
+
path: z.object({
|
|
2446
|
+
app_name: z.string(),
|
|
2447
|
+
user_id: z.string(),
|
|
2448
|
+
}),
|
|
2449
|
+
query: z.never().optional(),
|
|
2450
|
+
});
|
|
2451
|
+
/**
|
|
2452
|
+
* Successful Response
|
|
2453
|
+
*/
|
|
2454
|
+
export const zCreateSessionResponse = zSession;
|
|
2455
|
+
export const zEvaluationListEvalSetsData = z.object({
|
|
2456
|
+
body: z.never().optional(),
|
|
2457
|
+
path: z.object({
|
|
2458
|
+
app_name: z.string(),
|
|
2459
|
+
}),
|
|
2460
|
+
query: z.never().optional(),
|
|
2461
|
+
});
|
|
2462
|
+
/**
|
|
2463
|
+
* Successful Response
|
|
2464
|
+
*/
|
|
2465
|
+
export const zEvaluationListEvalSetsResponse = zListEvalSetsResponse;
|
|
2466
|
+
export const zEvaluationCreateEvalSetData = z.object({
|
|
2467
|
+
body: zCreateEvalSetRequest,
|
|
2468
|
+
path: z.object({
|
|
2469
|
+
app_name: z.string(),
|
|
2470
|
+
}),
|
|
2471
|
+
query: z.never().optional(),
|
|
2472
|
+
});
|
|
2473
|
+
/**
|
|
2474
|
+
* Successful Response
|
|
2475
|
+
*/
|
|
2476
|
+
export const zEvaluationCreateEvalSetResponse = zEvalSetOutput;
|
|
2477
|
+
export const zEvaluationCreateEvalSetLegacyData = z.object({
|
|
2478
|
+
body: z.never().optional(),
|
|
2479
|
+
path: z.object({
|
|
2480
|
+
app_name: z.string(),
|
|
2481
|
+
eval_set_id: z.string(),
|
|
2482
|
+
}),
|
|
2483
|
+
query: z.never().optional(),
|
|
2484
|
+
});
|
|
2485
|
+
export const zEvaluationListEvalSetsLegacyData = z.object({
|
|
2486
|
+
body: z.never().optional(),
|
|
2487
|
+
path: z.object({
|
|
2488
|
+
app_name: z.string(),
|
|
2489
|
+
}),
|
|
2490
|
+
query: z.never().optional(),
|
|
2491
|
+
});
|
|
2492
|
+
/**
|
|
2493
|
+
* Response Evaluation-List Eval Sets Legacy
|
|
2494
|
+
* Successful Response
|
|
2495
|
+
*/
|
|
2496
|
+
export const zEvaluationListEvalSetsLegacyResponse = z.array(z.string());
|
|
2497
|
+
export const zEvaluationAddSessionToEvalSetData = z.object({
|
|
2498
|
+
body: zAddSessionToEvalSetRequest,
|
|
2499
|
+
path: z.object({
|
|
2500
|
+
app_name: z.string(),
|
|
2501
|
+
eval_set_id: z.string(),
|
|
2502
|
+
}),
|
|
2503
|
+
query: z.never().optional(),
|
|
2504
|
+
});
|
|
2505
|
+
export const zEvaluationListEvalsInEvalSetData = z.object({
|
|
2506
|
+
body: z.never().optional(),
|
|
2507
|
+
path: z.object({
|
|
2508
|
+
app_name: z.string(),
|
|
2509
|
+
eval_set_id: z.string(),
|
|
2510
|
+
}),
|
|
2511
|
+
query: z.never().optional(),
|
|
2512
|
+
});
|
|
2513
|
+
/**
|
|
2514
|
+
* Response Evaluation-List Evals In Eval Set
|
|
2515
|
+
* Successful Response
|
|
2516
|
+
*/
|
|
2517
|
+
export const zEvaluationListEvalsInEvalSetResponse = z.array(z.string());
|
|
2518
|
+
export const zEvaluationDeleteEvalData = z.object({
|
|
2519
|
+
body: z.never().optional(),
|
|
2520
|
+
path: z.object({
|
|
2521
|
+
app_name: z.string(),
|
|
2522
|
+
eval_set_id: z.string(),
|
|
2523
|
+
eval_case_id: z.string(),
|
|
2524
|
+
}),
|
|
2525
|
+
query: z.never().optional(),
|
|
2526
|
+
});
|
|
2527
|
+
/**
|
|
2528
|
+
* Response Evaluation-Delete Eval
|
|
2529
|
+
* Successful Response
|
|
2530
|
+
*/
|
|
2531
|
+
export const zEvaluationDeleteEvalResponse = z.null();
|
|
2532
|
+
export const zEvaluationGetEvalData = z.object({
|
|
2533
|
+
body: z.never().optional(),
|
|
2534
|
+
path: z.object({
|
|
2535
|
+
app_name: z.string(),
|
|
2536
|
+
eval_set_id: z.string(),
|
|
2537
|
+
eval_case_id: z.string(),
|
|
2538
|
+
}),
|
|
2539
|
+
query: z.never().optional(),
|
|
2540
|
+
});
|
|
2541
|
+
/**
|
|
2542
|
+
* Successful Response
|
|
2543
|
+
*/
|
|
2544
|
+
export const zEvaluationGetEvalResponse = zEvalCaseOutput;
|
|
2545
|
+
export const zEvaluationUpdateEvalData = z.object({
|
|
2546
|
+
body: zEvalCaseInput,
|
|
2547
|
+
path: z.object({
|
|
2548
|
+
app_name: z.string(),
|
|
2549
|
+
eval_set_id: z.string(),
|
|
2550
|
+
eval_case_id: z.string(),
|
|
2551
|
+
}),
|
|
2552
|
+
query: z.never().optional(),
|
|
2553
|
+
});
|
|
2554
|
+
export const zEvaluationRunEvalLegacyData = z.object({
|
|
2555
|
+
body: zRunEvalRequest,
|
|
2556
|
+
path: z.object({
|
|
2557
|
+
app_name: z.string(),
|
|
2558
|
+
eval_set_id: z.string(),
|
|
2559
|
+
}),
|
|
2560
|
+
query: z.never().optional(),
|
|
2561
|
+
});
|
|
2562
|
+
/**
|
|
2563
|
+
* Response Evaluation-Run Eval Legacy
|
|
2564
|
+
* Successful Response
|
|
2565
|
+
*/
|
|
2566
|
+
export const zEvaluationRunEvalLegacyResponse = z.array(zRunEvalResult);
|
|
2567
|
+
export const zEvaluationRunEvalData = z.object({
|
|
2568
|
+
body: zRunEvalRequest,
|
|
2569
|
+
path: z.object({
|
|
2570
|
+
app_name: z.string(),
|
|
2571
|
+
eval_set_id: z.string(),
|
|
2572
|
+
}),
|
|
2573
|
+
query: z.never().optional(),
|
|
2574
|
+
});
|
|
2575
|
+
/**
|
|
2576
|
+
* Successful Response
|
|
2577
|
+
*/
|
|
2578
|
+
export const zEvaluationRunEvalResponse = zRunEvalResponse;
|
|
2579
|
+
export const zEvaluationGetEvalResultData = z.object({
|
|
2580
|
+
body: z.never().optional(),
|
|
2581
|
+
path: z.object({
|
|
2582
|
+
app_name: z.string(),
|
|
2583
|
+
eval_result_id: z.string(),
|
|
2584
|
+
}),
|
|
2585
|
+
query: z.never().optional(),
|
|
2586
|
+
});
|
|
2587
|
+
/**
|
|
2588
|
+
* Successful Response
|
|
2589
|
+
*/
|
|
2590
|
+
export const zEvaluationGetEvalResultResponse = zEvalResult;
|
|
2591
|
+
export const zEvaluationGetEvalResultLegacyData = z.object({
|
|
2592
|
+
body: z.never().optional(),
|
|
2593
|
+
path: z.object({
|
|
2594
|
+
app_name: z.string(),
|
|
2595
|
+
eval_result_id: z.string(),
|
|
2596
|
+
}),
|
|
2597
|
+
query: z.never().optional(),
|
|
2598
|
+
});
|
|
2599
|
+
/**
|
|
2600
|
+
* Successful Response
|
|
2601
|
+
*/
|
|
2602
|
+
export const zEvaluationGetEvalResultLegacyResponse = zEvalSetResult;
|
|
2603
|
+
export const zEvaluationListEvalResultsData = z.object({
|
|
2604
|
+
body: z.never().optional(),
|
|
2605
|
+
path: z.object({
|
|
2606
|
+
app_name: z.string(),
|
|
2607
|
+
}),
|
|
2608
|
+
query: z.never().optional(),
|
|
2609
|
+
});
|
|
2610
|
+
/**
|
|
2611
|
+
* Successful Response
|
|
2612
|
+
*/
|
|
2613
|
+
export const zEvaluationListEvalResultsResponse = zListEvalResultsResponse;
|
|
2614
|
+
export const zEvaluationListEvalResultsLegacyData = z.object({
|
|
2615
|
+
body: z.never().optional(),
|
|
2616
|
+
path: z.object({
|
|
2617
|
+
app_name: z.string(),
|
|
2618
|
+
}),
|
|
2619
|
+
query: z.never().optional(),
|
|
2620
|
+
});
|
|
2621
|
+
/**
|
|
2622
|
+
* Response Evaluation-List Eval Results Legacy
|
|
2623
|
+
* Successful Response
|
|
2624
|
+
*/
|
|
2625
|
+
export const zEvaluationListEvalResultsLegacyResponse = z.array(z.string());
|
|
2626
|
+
export const zEvaluationListMetricsInfoData = z.object({
|
|
2627
|
+
body: z.never().optional(),
|
|
2628
|
+
path: z.object({
|
|
2629
|
+
app_name: z.string(),
|
|
2630
|
+
}),
|
|
2631
|
+
query: z.never().optional(),
|
|
2632
|
+
});
|
|
2633
|
+
/**
|
|
2634
|
+
* Successful Response
|
|
2635
|
+
*/
|
|
2636
|
+
export const zEvaluationListMetricsInfoResponse = zListMetricsInfoResponse;
|
|
2637
|
+
export const zDeleteArtifactData = z.object({
|
|
2638
|
+
body: z.never().optional(),
|
|
2639
|
+
path: z.object({
|
|
2640
|
+
app_name: z.string(),
|
|
2641
|
+
user_id: z.string(),
|
|
2642
|
+
session_id: z.string(),
|
|
2643
|
+
artifact_name: z.string(),
|
|
2644
|
+
}),
|
|
2645
|
+
query: z.never().optional(),
|
|
2646
|
+
});
|
|
2647
|
+
/**
|
|
2648
|
+
* Response Delete Artifact
|
|
2649
|
+
* Successful Response
|
|
2650
|
+
*/
|
|
2651
|
+
export const zDeleteArtifactResponse = z.null();
|
|
2652
|
+
export const zLoadArtifactData = z.object({
|
|
2653
|
+
body: z.never().optional(),
|
|
2654
|
+
path: z.object({
|
|
2655
|
+
app_name: z.string(),
|
|
2656
|
+
user_id: z.string(),
|
|
2657
|
+
session_id: z.string(),
|
|
2658
|
+
artifact_name: z.string(),
|
|
2659
|
+
}),
|
|
2660
|
+
query: z
|
|
2661
|
+
.object({
|
|
2662
|
+
version: z.union([z.number().int(), z.null()]).optional(),
|
|
2663
|
+
})
|
|
2664
|
+
.optional(),
|
|
2665
|
+
});
|
|
2666
|
+
/**
|
|
2667
|
+
* Response Load Artifact
|
|
2668
|
+
* Successful Response
|
|
2669
|
+
*/
|
|
2670
|
+
export const zLoadArtifactResponse = z.union([zPartOutput, z.null()]);
|
|
2671
|
+
export const zLoadArtifactVersionData = z.object({
|
|
2672
|
+
body: z.never().optional(),
|
|
2673
|
+
path: z.object({
|
|
2674
|
+
app_name: z.string(),
|
|
2675
|
+
user_id: z.string(),
|
|
2676
|
+
session_id: z.string(),
|
|
2677
|
+
artifact_name: z.string(),
|
|
2678
|
+
version_id: z.number().int(),
|
|
2679
|
+
}),
|
|
2680
|
+
query: z.never().optional(),
|
|
2681
|
+
});
|
|
2682
|
+
/**
|
|
2683
|
+
* Response Load Artifact Version
|
|
2684
|
+
* Successful Response
|
|
2685
|
+
*/
|
|
2686
|
+
export const zLoadArtifactVersionResponse = z.union([zPartOutput, z.null()]);
|
|
2687
|
+
export const zListArtifactNamesData = z.object({
|
|
2688
|
+
body: z.never().optional(),
|
|
2689
|
+
path: z.object({
|
|
2690
|
+
app_name: z.string(),
|
|
2691
|
+
user_id: z.string(),
|
|
2692
|
+
session_id: z.string(),
|
|
2693
|
+
}),
|
|
2694
|
+
query: z.never().optional(),
|
|
2695
|
+
});
|
|
2696
|
+
/**
|
|
2697
|
+
* Response List Artifact Names
|
|
2698
|
+
* Successful Response
|
|
2699
|
+
*/
|
|
2700
|
+
export const zListArtifactNamesResponse = z.array(z.string());
|
|
2701
|
+
export const zListArtifactVersionsData = z.object({
|
|
2702
|
+
body: z.never().optional(),
|
|
2703
|
+
path: z.object({
|
|
2704
|
+
app_name: z.string(),
|
|
2705
|
+
user_id: z.string(),
|
|
2706
|
+
session_id: z.string(),
|
|
2707
|
+
artifact_name: z.string(),
|
|
2708
|
+
}),
|
|
2709
|
+
query: z.never().optional(),
|
|
2710
|
+
});
|
|
2711
|
+
/**
|
|
2712
|
+
* Response List Artifact Versions
|
|
2713
|
+
* Successful Response
|
|
2714
|
+
*/
|
|
2715
|
+
export const zListArtifactVersionsResponse = z.array(z.number().int());
|
|
2716
|
+
export const zRunAgentData = z.object({
|
|
2717
|
+
body: zRunAgentRequest,
|
|
2718
|
+
path: z.never().optional(),
|
|
2719
|
+
query: z.never().optional(),
|
|
2720
|
+
});
|
|
2721
|
+
/**
|
|
2722
|
+
* Response Run Agent
|
|
2723
|
+
* Successful Response
|
|
2724
|
+
*/
|
|
2725
|
+
export const zRunAgentResponse = z.array(zEventOutput);
|
|
2726
|
+
export const zRunAgentSseData = z.object({
|
|
2727
|
+
body: zRunAgentRequest,
|
|
2728
|
+
path: z.never().optional(),
|
|
2729
|
+
query: z.never().optional(),
|
|
2730
|
+
});
|
|
2731
|
+
export const zDebugGetEventGraphData = z.object({
|
|
2732
|
+
body: z.never().optional(),
|
|
2733
|
+
path: z.object({
|
|
2734
|
+
app_name: z.string(),
|
|
2735
|
+
user_id: z.string(),
|
|
2736
|
+
session_id: z.string(),
|
|
2737
|
+
event_id: z.string(),
|
|
2738
|
+
}),
|
|
2739
|
+
query: z.never().optional(),
|
|
2740
|
+
});
|
|
2741
|
+
export const zRedirectRootToDevUiData = z.object({
|
|
2742
|
+
body: z.never().optional(),
|
|
2743
|
+
path: z.never().optional(),
|
|
2744
|
+
query: z.never().optional(),
|
|
2745
|
+
});
|
|
2746
|
+
export const zRedirectDevUiAddSlashData = z.object({
|
|
2747
|
+
body: z.never().optional(),
|
|
2748
|
+
path: z.never().optional(),
|
|
2749
|
+
query: z.never().optional(),
|
|
2750
|
+
});
|
|
2751
|
+
export const zBuilderBuildData = z.object({
|
|
2752
|
+
body: zBodyBuilderBuild,
|
|
2753
|
+
path: z.never().optional(),
|
|
2754
|
+
query: z.never().optional(),
|
|
2755
|
+
});
|
|
2756
|
+
/**
|
|
2757
|
+
* Response Builder Build
|
|
2758
|
+
* Successful Response
|
|
2759
|
+
*/
|
|
2760
|
+
export const zBuilderBuildResponse = z.boolean();
|
|
2761
|
+
export const zGetAgentBuilderData = z.object({
|
|
2762
|
+
body: z.never().optional(),
|
|
2763
|
+
path: z.object({
|
|
2764
|
+
app_name: z.string(),
|
|
2765
|
+
}),
|
|
2766
|
+
query: z
|
|
2767
|
+
.object({
|
|
2768
|
+
file_path: z.union([z.string(), z.null()]).optional(),
|
|
2769
|
+
})
|
|
2770
|
+
.optional(),
|
|
2771
|
+
});
|
|
2772
|
+
/**
|
|
2773
|
+
* Successful Response
|
|
2774
|
+
*/
|
|
2775
|
+
export const zGetAgentBuilderResponse = z.string();
|
|
2776
|
+
export const zChatAgentGetChatConfigData = z.object({
|
|
2777
|
+
body: z.never().optional(),
|
|
2778
|
+
path: z.never().optional(),
|
|
2779
|
+
query: z.never().optional(),
|
|
2780
|
+
});
|
|
2781
|
+
/**
|
|
2782
|
+
* Successful Response
|
|
2783
|
+
*/
|
|
2784
|
+
export const zChatAgentGetChatConfigResponse = zChatConfig;
|
|
2785
|
+
export const zChatAgentUpdateChatConfigData = z.object({
|
|
2786
|
+
body: zChatConfig,
|
|
2787
|
+
path: z.never().optional(),
|
|
2788
|
+
query: z.never().optional(),
|
|
2789
|
+
});
|
|
2790
|
+
/**
|
|
2791
|
+
* Successful Response
|
|
2792
|
+
*/
|
|
2793
|
+
export const zChatAgentUpdateChatConfigResponse = zChatConfig;
|
|
2794
|
+
export const zChatAgentGetProvidersData = z.object({
|
|
2795
|
+
body: z.never().optional(),
|
|
2796
|
+
path: z.never().optional(),
|
|
2797
|
+
query: z.never().optional(),
|
|
2798
|
+
});
|
|
2799
|
+
export const zChatAgentValidateApiKeyData = z.object({
|
|
2800
|
+
body: z.object({}),
|
|
2801
|
+
path: z.never().optional(),
|
|
2802
|
+
query: z.never().optional(),
|
|
2803
|
+
});
|
|
2804
|
+
export const zChatAgentExportConfigData = z.object({
|
|
2805
|
+
body: z.never().optional(),
|
|
2806
|
+
path: z.never().optional(),
|
|
2807
|
+
query: z.never().optional(),
|
|
2808
|
+
});
|
|
2809
|
+
export const zChatAgentImportConfigData = z.object({
|
|
2810
|
+
body: z.object({}),
|
|
2811
|
+
path: z.never().optional(),
|
|
2812
|
+
query: z.never().optional(),
|
|
2813
|
+
});
|
|
2814
|
+
export const zChatAgentChatData = z.object({
|
|
2815
|
+
body: zChatRequest,
|
|
2816
|
+
path: z.never().optional(),
|
|
2817
|
+
query: z.never().optional(),
|
|
2818
|
+
});
|
|
2819
|
+
/**
|
|
2820
|
+
* Successful Response
|
|
2821
|
+
*/
|
|
2822
|
+
export const zChatAgentChatResponse = zChatResponse;
|
|
2823
|
+
export const zListItemsData = z.object({
|
|
2824
|
+
body: z.never().optional(),
|
|
2825
|
+
path: z.never().optional(),
|
|
2826
|
+
query: z
|
|
2827
|
+
.object({
|
|
2828
|
+
skip: z.number().int().optional().default(0),
|
|
2829
|
+
limit: z.number().int().optional().default(10),
|
|
2830
|
+
})
|
|
2831
|
+
.optional(),
|
|
2832
|
+
});
|
|
2833
|
+
/**
|
|
2834
|
+
* Response List Items
|
|
2835
|
+
* Successful Response
|
|
2836
|
+
*/
|
|
2837
|
+
export const zListItemsResponse = z.array(zItem);
|
|
2838
|
+
export const zCreateItemData = z.object({
|
|
2839
|
+
body: zItem,
|
|
2840
|
+
path: z.never().optional(),
|
|
2841
|
+
query: z.never().optional(),
|
|
2842
|
+
});
|
|
2843
|
+
/**
|
|
2844
|
+
* Successful Response
|
|
2845
|
+
*/
|
|
2846
|
+
export const zCreateItemResponse = zItem;
|
|
2847
|
+
export const zDeleteItemData = z.object({
|
|
2848
|
+
body: z.never().optional(),
|
|
2849
|
+
path: z.object({
|
|
2850
|
+
item_id: z.number().int(),
|
|
2851
|
+
}),
|
|
2852
|
+
query: z.never().optional(),
|
|
2853
|
+
});
|
|
2854
|
+
export const zGetItemData = z.object({
|
|
2855
|
+
body: z.never().optional(),
|
|
2856
|
+
path: z.object({
|
|
2857
|
+
item_id: z.number().int(),
|
|
2858
|
+
}),
|
|
2859
|
+
query: z.never().optional(),
|
|
2860
|
+
});
|
|
2861
|
+
/**
|
|
2862
|
+
* Successful Response
|
|
2863
|
+
*/
|
|
2864
|
+
export const zGetItemResponse = zItem;
|
|
2865
|
+
export const zUpdateItemData = z.object({
|
|
2866
|
+
body: zItem,
|
|
2867
|
+
path: z.object({
|
|
2868
|
+
item_id: z.number().int(),
|
|
2869
|
+
}),
|
|
2870
|
+
query: z.never().optional(),
|
|
2871
|
+
});
|
|
2872
|
+
/**
|
|
2873
|
+
* Successful Response
|
|
2874
|
+
*/
|
|
2875
|
+
export const zUpdateItemResponse = zItem;
|
|
2876
|
+
export const zSearchItemsData = z.object({
|
|
2877
|
+
body: z.never().optional(),
|
|
2878
|
+
path: z.never().optional(),
|
|
2879
|
+
query: z
|
|
2880
|
+
.object({
|
|
2881
|
+
q: z.union([z.string(), z.null()]).optional(),
|
|
2882
|
+
min_price: z.union([z.number(), z.null()]).optional(),
|
|
2883
|
+
max_price: z.union([z.number(), z.null()]).optional(),
|
|
2884
|
+
tags: z.array(z.string()).optional().default([]),
|
|
2885
|
+
})
|
|
2886
|
+
.optional(),
|
|
2887
|
+
});
|
|
2888
|
+
/**
|
|
2889
|
+
* Response Search Items
|
|
2890
|
+
* Successful Response
|
|
2891
|
+
*/
|
|
2892
|
+
export const zSearchItemsResponse = z.array(zItem);
|
|
2893
|
+
export const zAgentsAgentrunData = z.object({
|
|
2894
|
+
body: zRunAgentRequest,
|
|
2895
|
+
path: z.never().optional(),
|
|
2896
|
+
query: z.never().optional(),
|
|
2897
|
+
});
|
|
2898
|
+
export const zDemoDemo1Data = z.object({
|
|
2899
|
+
body: zUserCreate,
|
|
2900
|
+
path: z.never().optional(),
|
|
2901
|
+
query: z.never().optional(),
|
|
2902
|
+
headers: z
|
|
2903
|
+
.object({
|
|
2904
|
+
authorization: z.string().optional(),
|
|
2905
|
+
})
|
|
2906
|
+
.optional(),
|
|
2907
|
+
});
|
|
2908
|
+
/**
|
|
2909
|
+
* Successful Response
|
|
2910
|
+
*/
|
|
2911
|
+
export const zDemoDemo1Response = zDemoPublic;
|
|
2912
|
+
export const zSandboxStartNapcatSandboxData = z.object({
|
|
2913
|
+
body: zStartNapcatRequest,
|
|
2914
|
+
path: z.never().optional(),
|
|
2915
|
+
query: z.never().optional(),
|
|
2916
|
+
});
|
|
2917
|
+
/**
|
|
2918
|
+
* Successful Response
|
|
2919
|
+
*/
|
|
2920
|
+
export const zSandboxStartNapcatSandboxResponse = zStartNapcatResponse;
|
|
2921
|
+
export const zSandboxCheckSandboxStatusData = z.object({
|
|
2922
|
+
body: zCheckSandboxStatusRequest,
|
|
2923
|
+
path: z.never().optional(),
|
|
2924
|
+
query: z.never().optional(),
|
|
2925
|
+
});
|
|
2926
|
+
/**
|
|
2927
|
+
* Successful Response
|
|
2928
|
+
*/
|
|
2929
|
+
export const zSandboxCheckSandboxStatusResponse = zCheckSandboxStatusResponse;
|
|
2930
|
+
//# sourceMappingURL=zod.gen.js.map
|