@to11ai/sdk 2.0.0 → 2.1.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/context.d.ts +1 -1
- package/dist/generated/index.d.ts +1 -1
- package/dist/generated/types.gen.d.ts +365 -235
- package/dist/generated/zod.gen.d.ts +416 -130
- package/dist/prompts/resource.cjs +1 -1
- package/dist/prompts/resource.d.ts +1 -1
- package/dist/prompts/resource.js +1 -1
- package/dist/prompts/shape.d.ts +1 -1
- package/dist/traceparent.d.ts +1 -1
- package/package.json +1 -1
- package/src/context.ts +1 -1
- package/src/generated/index.ts +1 -1
- package/src/generated/types.gen.ts +423 -286
- package/src/generated/zod.gen.ts +336 -221
- package/src/projectEnvironments/resource.ts +2 -2
- package/src/prompts/resource.ts +11 -2
- package/src/prompts/shape.ts +1 -1
- package/src/traceparent.ts +1 -1
package/src/generated/zod.gen.ts
CHANGED
|
@@ -82,6 +82,18 @@ export const zGoneError = z.object({
|
|
|
82
82
|
success: z.literal(false)
|
|
83
83
|
});
|
|
84
84
|
|
|
85
|
+
export const zImportPromptVersionInput = z.object({
|
|
86
|
+
changelog: z.string().nullish(),
|
|
87
|
+
files: z.array(z.object({
|
|
88
|
+
content: z.string(),
|
|
89
|
+
contentType: z.enum(['text/markdown', 'text/plain']).nullish(),
|
|
90
|
+
filename: z.string(),
|
|
91
|
+
id: z.string().nullish()
|
|
92
|
+
})),
|
|
93
|
+
format: z.enum(['skill']).nullish(),
|
|
94
|
+
kind: z.enum(['skill']).nullish()
|
|
95
|
+
});
|
|
96
|
+
|
|
85
97
|
export const zInternalServerError = z.object({
|
|
86
98
|
_tag: z.enum(['InternalServerError']),
|
|
87
99
|
code: z.number(),
|
|
@@ -157,6 +169,7 @@ export const zPrincipalApiKeyContextInvariant = z.object({
|
|
|
157
169
|
keyFingerprint: z.string(),
|
|
158
170
|
keyId: z.string(),
|
|
159
171
|
orgId: z.string().nullable(),
|
|
172
|
+
orgSlug: z.string().nullish(),
|
|
160
173
|
projectId: z.string().nullable(),
|
|
161
174
|
scopes: z.array(z.string()),
|
|
162
175
|
workspaceId: z.string().nullable()
|
|
@@ -234,6 +247,7 @@ export const zPrompt = z.object({
|
|
|
234
247
|
createdByUserId: z.string(),
|
|
235
248
|
description: z.string().nullable(),
|
|
236
249
|
id: z.string(),
|
|
250
|
+
kind: z.enum(['chat', 'skill']),
|
|
237
251
|
name: z.string().min(1).max(200),
|
|
238
252
|
projectId: z.string(),
|
|
239
253
|
slug: z.string().min(1).max(128).regex(/^[a-z0-9-]+$/),
|
|
@@ -296,7 +310,11 @@ export const zPromptVersion = z.object({
|
|
|
296
310
|
createdByDisplayName: z.string().nullable(),
|
|
297
311
|
createdByImage: z.string().nullable(),
|
|
298
312
|
createdByUserId: z.string(),
|
|
299
|
-
format: z.enum([
|
|
313
|
+
format: z.enum([
|
|
314
|
+
'text',
|
|
315
|
+
'chat',
|
|
316
|
+
'skill'
|
|
317
|
+
]),
|
|
300
318
|
id: z.string(),
|
|
301
319
|
modelConfig: z.unknown(),
|
|
302
320
|
promptId: z.string(),
|
|
@@ -305,6 +323,33 @@ export const zPromptVersion = z.object({
|
|
|
305
323
|
version: z.int().gt(0).lte(2147483647)
|
|
306
324
|
});
|
|
307
325
|
|
|
326
|
+
export const zRenderedSkillFile = z.object({
|
|
327
|
+
content: z.string(),
|
|
328
|
+
contentType: z.enum(['text/markdown', 'text/plain']),
|
|
329
|
+
filename: z.string(),
|
|
330
|
+
id: z.string()
|
|
331
|
+
});
|
|
332
|
+
|
|
333
|
+
export const zRenderedSkill = z.object({
|
|
334
|
+
contentHash: z.string(),
|
|
335
|
+
files: z.array(zRenderedSkillFile),
|
|
336
|
+
format: z.enum(['skill']),
|
|
337
|
+
label: z.string().min(1).max(64).regex(/^[a-zA-Z0-9_-]+$/),
|
|
338
|
+
promptId: z.string(),
|
|
339
|
+
releaseId: z.string(),
|
|
340
|
+
version: z.number(),
|
|
341
|
+
versionId: z.string()
|
|
342
|
+
});
|
|
343
|
+
|
|
344
|
+
export const zRenderedSkillVersion = z.object({
|
|
345
|
+
contentHash: z.string(),
|
|
346
|
+
files: z.array(zRenderedSkillFile),
|
|
347
|
+
format: z.enum(['skill']),
|
|
348
|
+
promptId: z.string(),
|
|
349
|
+
version: z.number(),
|
|
350
|
+
versionId: z.string()
|
|
351
|
+
});
|
|
352
|
+
|
|
308
353
|
export const zRenderedTextMessage = z.object({
|
|
309
354
|
content: z.string(),
|
|
310
355
|
role: z.enum([
|
|
@@ -325,6 +370,12 @@ export const zRenderedToolMessage = z.object({
|
|
|
325
370
|
toolCallId: z.string()
|
|
326
371
|
});
|
|
327
372
|
|
|
373
|
+
export const zResolvedProjectName = z.object({
|
|
374
|
+
organizationId: z.string(),
|
|
375
|
+
projectId: z.string(),
|
|
376
|
+
workspaceId: z.string()
|
|
377
|
+
});
|
|
378
|
+
|
|
328
379
|
export const zResolvedToolCall = z.object({
|
|
329
380
|
arguments: z.record(z.string(), z.unknown()),
|
|
330
381
|
id: z.string(),
|
|
@@ -445,7 +496,8 @@ export const zRuleRetry = z.object({
|
|
|
445
496
|
});
|
|
446
497
|
|
|
447
498
|
export const zRuleTarget = z.object({
|
|
448
|
-
modelId: z.string(),
|
|
499
|
+
modelId: z.string().nullish(),
|
|
500
|
+
modelName: z.string().min(1).max(256).regex(/^\S[\s\S]*\S$|^\S$|^$/).nullish(),
|
|
449
501
|
params: z.record(z.string(), z.unknown()).nullish(),
|
|
450
502
|
providerId: z.string(),
|
|
451
503
|
when: z.unknown().nullish()
|
|
@@ -516,6 +568,27 @@ export const zServiceUnavailableError = z.object({
|
|
|
516
568
|
success: z.literal(false)
|
|
517
569
|
});
|
|
518
570
|
|
|
571
|
+
export const zSkillFileDiffRow = z.object({
|
|
572
|
+
change: z.enum([
|
|
573
|
+
'unchanged',
|
|
574
|
+
'modified',
|
|
575
|
+
'added',
|
|
576
|
+
'removed',
|
|
577
|
+
'renamed'
|
|
578
|
+
]),
|
|
579
|
+
filename: z.string(),
|
|
580
|
+
from: z.string().nullish(),
|
|
581
|
+
fromFilename: z.string().nullish(),
|
|
582
|
+
to: z.string().nullish()
|
|
583
|
+
});
|
|
584
|
+
|
|
585
|
+
export const zSkillVersionDiff = z.object({
|
|
586
|
+
files: z.array(zSkillFileDiffRow),
|
|
587
|
+
format: z.enum(['skill']),
|
|
588
|
+
from: z.number(),
|
|
589
|
+
to: z.number()
|
|
590
|
+
});
|
|
591
|
+
|
|
519
592
|
export const zTooManyRequestsError = z.object({
|
|
520
593
|
_tag: z.enum(['TooManyRequestsError']),
|
|
521
594
|
code: z.number(),
|
|
@@ -651,11 +724,6 @@ export const zRoutingSnapshotsGetRoutingSnapshotByEnvResponse = z.object({
|
|
|
651
724
|
success: z.boolean()
|
|
652
725
|
});
|
|
653
726
|
|
|
654
|
-
/**
|
|
655
|
-
* Success
|
|
656
|
-
*/
|
|
657
|
-
export const zMetricsMetricsResponse = z.string();
|
|
658
|
-
|
|
659
727
|
/**
|
|
660
728
|
* Success
|
|
661
729
|
*/
|
|
@@ -1869,8 +1937,9 @@ export const zIngestTokenExchangeIngestTokenBody = z.object({
|
|
|
1869
1937
|
export const zIngestTokenExchangeIngestTokenResponse = z.object({
|
|
1870
1938
|
code: z.number(),
|
|
1871
1939
|
data: z.object({
|
|
1872
|
-
apiKeyId: z.string(),
|
|
1940
|
+
apiKeyId: z.string().nullish(),
|
|
1873
1941
|
expiresAt: z.string(),
|
|
1942
|
+
principalId: z.string(),
|
|
1874
1943
|
projectId: z.string(),
|
|
1875
1944
|
scopeClass: z.enum(['project', 'org']),
|
|
1876
1945
|
scopes: z.array(z.string()),
|
|
@@ -2005,50 +2074,6 @@ export const zOrganizationsGetOrganizationInvitationDetailsResponse = z.object({
|
|
|
2005
2074
|
success: z.boolean()
|
|
2006
2075
|
});
|
|
2007
2076
|
|
|
2008
|
-
export const zApiKeysListApiKeysSuperQuery = z.object({
|
|
2009
|
-
page: z.int().nullish(),
|
|
2010
|
-
limit: z.int().nullish()
|
|
2011
|
-
});
|
|
2012
|
-
|
|
2013
|
-
/**
|
|
2014
|
-
* Success
|
|
2015
|
-
*/
|
|
2016
|
-
export const zApiKeysListApiKeysSuperResponse = z.object({
|
|
2017
|
-
code: z.number(),
|
|
2018
|
-
data: z.array(z.object({
|
|
2019
|
-
createdAt: z.string(),
|
|
2020
|
-
environment: z.enum(['live', 'test']),
|
|
2021
|
-
expiresAt: z.string(),
|
|
2022
|
-
id: z.string(),
|
|
2023
|
-
key: z.string(),
|
|
2024
|
-
orgId: z.string().nullable(),
|
|
2025
|
-
projectId: z.string().nullable(),
|
|
2026
|
-
revokedAt: z.string().nullable(),
|
|
2027
|
-
scopes: z.array(z.string())
|
|
2028
|
-
})).nullable(),
|
|
2029
|
-
error: z.object({
|
|
2030
|
-
code: z.string(),
|
|
2031
|
-
details: z.unknown().nullish(),
|
|
2032
|
-
message: z.string(),
|
|
2033
|
-
rowErrors: z.array(z.object({
|
|
2034
|
-
code: z.string(),
|
|
2035
|
-
message: z.string(),
|
|
2036
|
-
path: z.array(z.union([z.string(), z.number()]))
|
|
2037
|
-
})).nullish()
|
|
2038
|
-
}).nullable(),
|
|
2039
|
-
pagination: z.object({
|
|
2040
|
-
limit: z.int().gte(1).lte(100),
|
|
2041
|
-
page: z.int().gte(1),
|
|
2042
|
-
total: z.int().gte(0),
|
|
2043
|
-
totalPages: z.int().gte(0)
|
|
2044
|
-
}).nullable(),
|
|
2045
|
-
sdkBehavior: z.object({
|
|
2046
|
-
flags: z.record(z.string(), z.unknown()),
|
|
2047
|
-
v: z.int().gte(1)
|
|
2048
|
-
}).nullish(),
|
|
2049
|
-
success: z.boolean()
|
|
2050
|
-
});
|
|
2051
|
-
|
|
2052
2077
|
export const zApiKeysCreateApiKeySuperBody = z.object({
|
|
2053
2078
|
environment: z.enum(['live', 'test']),
|
|
2054
2079
|
orgId: z.string().nullish(),
|
|
@@ -2927,54 +2952,6 @@ export const zOrganizationsResendOrganizationInvitationResponse = z.object({
|
|
|
2927
2952
|
success: z.boolean()
|
|
2928
2953
|
});
|
|
2929
2954
|
|
|
2930
|
-
export const zApiKeysListApiKeysOrgPath = z.object({
|
|
2931
|
-
orgId: z.string()
|
|
2932
|
-
});
|
|
2933
|
-
|
|
2934
|
-
export const zApiKeysListApiKeysOrgQuery = z.object({
|
|
2935
|
-
page: z.int().nullish(),
|
|
2936
|
-
limit: z.int().nullish()
|
|
2937
|
-
});
|
|
2938
|
-
|
|
2939
|
-
/**
|
|
2940
|
-
* Success
|
|
2941
|
-
*/
|
|
2942
|
-
export const zApiKeysListApiKeysOrgResponse = z.object({
|
|
2943
|
-
code: z.number(),
|
|
2944
|
-
data: z.array(z.object({
|
|
2945
|
-
createdAt: z.string(),
|
|
2946
|
-
environment: z.enum(['live', 'test']),
|
|
2947
|
-
expiresAt: z.string(),
|
|
2948
|
-
id: z.string(),
|
|
2949
|
-
key: z.string(),
|
|
2950
|
-
orgId: z.string().nullable(),
|
|
2951
|
-
projectId: z.string().nullable(),
|
|
2952
|
-
revokedAt: z.string().nullable(),
|
|
2953
|
-
scopes: z.array(z.string())
|
|
2954
|
-
})).nullable(),
|
|
2955
|
-
error: z.object({
|
|
2956
|
-
code: z.string(),
|
|
2957
|
-
details: z.unknown().nullish(),
|
|
2958
|
-
message: z.string(),
|
|
2959
|
-
rowErrors: z.array(z.object({
|
|
2960
|
-
code: z.string(),
|
|
2961
|
-
message: z.string(),
|
|
2962
|
-
path: z.array(z.union([z.string(), z.number()]))
|
|
2963
|
-
})).nullish()
|
|
2964
|
-
}).nullable(),
|
|
2965
|
-
pagination: z.object({
|
|
2966
|
-
limit: z.int().gte(1).lte(100),
|
|
2967
|
-
page: z.int().gte(1),
|
|
2968
|
-
total: z.int().gte(0),
|
|
2969
|
-
totalPages: z.int().gte(0)
|
|
2970
|
-
}).nullable(),
|
|
2971
|
-
sdkBehavior: z.object({
|
|
2972
|
-
flags: z.record(z.string(), z.unknown()),
|
|
2973
|
-
v: z.int().gte(1)
|
|
2974
|
-
}).nullish(),
|
|
2975
|
-
success: z.boolean()
|
|
2976
|
-
});
|
|
2977
|
-
|
|
2978
2955
|
export const zApiKeysCreateApiKeyOrgBody = z.object({
|
|
2979
2956
|
environment: z.enum(['live', 'test']),
|
|
2980
2957
|
expiresAt: z.string().nullish(),
|
|
@@ -3648,7 +3625,8 @@ export const zProjectsCreateProjectByOrgResponse = z.object({
|
|
|
3648
3625
|
'deleted'
|
|
3649
3626
|
]),
|
|
3650
3627
|
updatedAt: z.iso.datetime(),
|
|
3651
|
-
workspaceId: z.string()
|
|
3628
|
+
workspaceId: z.string(),
|
|
3629
|
+
workspaceSlug: z.string().min(1).max(120)
|
|
3652
3630
|
}).nullable(),
|
|
3653
3631
|
error: z.object({
|
|
3654
3632
|
code: z.string(),
|
|
@@ -5004,6 +4982,41 @@ export const zAuthLookupPrincipalsBatchResponse = z.object({
|
|
|
5004
4982
|
success: z.boolean()
|
|
5005
4983
|
});
|
|
5006
4984
|
|
|
4985
|
+
export const zProjectsGetProjectByNamePath = z.object({
|
|
4986
|
+
organization: z.string().min(1).max(128).regex(/^[a-z0-9-]+$/),
|
|
4987
|
+
workspace: z.string().min(1).max(128).regex(/^[a-z0-9-]+$/),
|
|
4988
|
+
project: z.string().min(1).max(128).regex(/^[a-z0-9-]+$/)
|
|
4989
|
+
});
|
|
4990
|
+
|
|
4991
|
+
/**
|
|
4992
|
+
* Success
|
|
4993
|
+
*/
|
|
4994
|
+
export const zProjectsGetProjectByNameResponse = z.object({
|
|
4995
|
+
code: z.number(),
|
|
4996
|
+
data: zResolvedProjectName.nullable(),
|
|
4997
|
+
error: z.object({
|
|
4998
|
+
code: z.string(),
|
|
4999
|
+
details: z.unknown().nullish(),
|
|
5000
|
+
message: z.string(),
|
|
5001
|
+
rowErrors: z.array(z.object({
|
|
5002
|
+
code: z.string(),
|
|
5003
|
+
message: z.string(),
|
|
5004
|
+
path: z.array(z.union([z.string(), z.number()]))
|
|
5005
|
+
})).nullish()
|
|
5006
|
+
}).nullable(),
|
|
5007
|
+
pagination: z.object({
|
|
5008
|
+
limit: z.int().gte(1).lte(100),
|
|
5009
|
+
page: z.int().gte(1),
|
|
5010
|
+
total: z.int().gte(0),
|
|
5011
|
+
totalPages: z.int().gte(0)
|
|
5012
|
+
}).nullable(),
|
|
5013
|
+
sdkBehavior: z.object({
|
|
5014
|
+
flags: z.record(z.string(), z.unknown()),
|
|
5015
|
+
v: z.int().gte(1)
|
|
5016
|
+
}).nullish(),
|
|
5017
|
+
success: z.boolean()
|
|
5018
|
+
});
|
|
5019
|
+
|
|
5007
5020
|
export const zProjectsDeleteProjectPath = z.object({
|
|
5008
5021
|
projectId: z.string()
|
|
5009
5022
|
});
|
|
@@ -5026,7 +5039,8 @@ export const zProjectsDeleteProjectResponse = z.object({
|
|
|
5026
5039
|
'deleted'
|
|
5027
5040
|
]),
|
|
5028
5041
|
updatedAt: z.iso.datetime(),
|
|
5029
|
-
workspaceId: z.string()
|
|
5042
|
+
workspaceId: z.string(),
|
|
5043
|
+
workspaceSlug: z.string().min(1).max(120)
|
|
5030
5044
|
}).nullable(),
|
|
5031
5045
|
error: z.object({
|
|
5032
5046
|
code: z.string(),
|
|
@@ -5073,7 +5087,8 @@ export const zProjectsGetProjectResponse = z.object({
|
|
|
5073
5087
|
'deleted'
|
|
5074
5088
|
]),
|
|
5075
5089
|
updatedAt: z.iso.datetime(),
|
|
5076
|
-
workspaceId: z.string()
|
|
5090
|
+
workspaceId: z.string(),
|
|
5091
|
+
workspaceSlug: z.string().min(1).max(120)
|
|
5077
5092
|
}).nullable(),
|
|
5078
5093
|
error: z.object({
|
|
5079
5094
|
code: z.string(),
|
|
@@ -5126,7 +5141,8 @@ export const zProjectsUpdateProjectResponse = z.object({
|
|
|
5126
5141
|
'deleted'
|
|
5127
5142
|
]),
|
|
5128
5143
|
updatedAt: z.iso.datetime(),
|
|
5129
|
-
workspaceId: z.string()
|
|
5144
|
+
workspaceId: z.string(),
|
|
5145
|
+
workspaceSlug: z.string().min(1).max(120)
|
|
5130
5146
|
}).nullable(),
|
|
5131
5147
|
error: z.object({
|
|
5132
5148
|
code: z.string(),
|
|
@@ -7317,6 +7333,7 @@ export const zPromptsListPromptsQuery = z.object({
|
|
|
7317
7333
|
search: z.string().nullish(),
|
|
7318
7334
|
sortDir: z.enum(['asc', 'desc']).nullish(),
|
|
7319
7335
|
status: z.string().nullish(),
|
|
7336
|
+
kind: z.string().regex(/^\s*$|^\s*(chat|skill)(\s*,\s*(chat|skill))*\s*$/).nullish(),
|
|
7320
7337
|
sortBy: z.enum([
|
|
7321
7338
|
'createdAt',
|
|
7322
7339
|
'updatedAt',
|
|
@@ -7339,6 +7356,7 @@ export const zPromptsListPromptsResponse = z.object({
|
|
|
7339
7356
|
createdByUserId: z.string(),
|
|
7340
7357
|
description: z.string().nullable(),
|
|
7341
7358
|
id: z.string(),
|
|
7359
|
+
kind: z.enum(['chat', 'skill']),
|
|
7342
7360
|
labels: z.array(z.object({
|
|
7343
7361
|
label: z.string(),
|
|
7344
7362
|
version: z.number().nullable(),
|
|
@@ -7389,6 +7407,7 @@ export const zPromptsListPromptsResponse = z.object({
|
|
|
7389
7407
|
|
|
7390
7408
|
export const zPromptsCreatePromptBody = z.object({
|
|
7391
7409
|
description: z.string().nullish(),
|
|
7410
|
+
kind: z.enum(['chat', 'skill']).nullish(),
|
|
7392
7411
|
name: z.string().min(1).max(200),
|
|
7393
7412
|
slug: z.string().min(1).max(128).regex(/^[a-z0-9-]+$/),
|
|
7394
7413
|
tags: z.array(z.string()).nullish()
|
|
@@ -7494,7 +7513,49 @@ export const zPromptsRenderPromptPath = z.object({
|
|
|
7494
7513
|
*/
|
|
7495
7514
|
export const zPromptsRenderPromptResponse = z.object({
|
|
7496
7515
|
code: z.number(),
|
|
7497
|
-
data:
|
|
7516
|
+
data: z.union([
|
|
7517
|
+
zResolvedPrompt,
|
|
7518
|
+
zRenderedSkill
|
|
7519
|
+
]).nullable(),
|
|
7520
|
+
error: z.object({
|
|
7521
|
+
code: z.string(),
|
|
7522
|
+
details: z.unknown().nullish(),
|
|
7523
|
+
message: z.string(),
|
|
7524
|
+
rowErrors: z.array(z.object({
|
|
7525
|
+
code: z.string(),
|
|
7526
|
+
message: z.string(),
|
|
7527
|
+
path: z.array(z.union([z.string(), z.number()]))
|
|
7528
|
+
})).nullish()
|
|
7529
|
+
}).nullable(),
|
|
7530
|
+
pagination: z.object({
|
|
7531
|
+
limit: z.int().gte(1).lte(100),
|
|
7532
|
+
page: z.int().gte(1),
|
|
7533
|
+
total: z.int().gte(0),
|
|
7534
|
+
totalPages: z.int().gte(0)
|
|
7535
|
+
}).nullable(),
|
|
7536
|
+
sdkBehavior: z.object({
|
|
7537
|
+
flags: z.record(z.string(), z.unknown()),
|
|
7538
|
+
v: z.int().gte(1)
|
|
7539
|
+
}).nullish(),
|
|
7540
|
+
success: z.boolean()
|
|
7541
|
+
});
|
|
7542
|
+
|
|
7543
|
+
export const zPromptsRenderSkillVersionBody = z.object({
|
|
7544
|
+
variables: z.record(z.string(), z.unknown()).nullish()
|
|
7545
|
+
});
|
|
7546
|
+
|
|
7547
|
+
export const zPromptsRenderSkillVersionPath = z.object({
|
|
7548
|
+
projectId: z.string().min(1),
|
|
7549
|
+
slug: z.string().min(1),
|
|
7550
|
+
versionNumber: z.string()
|
|
7551
|
+
});
|
|
7552
|
+
|
|
7553
|
+
/**
|
|
7554
|
+
* Success
|
|
7555
|
+
*/
|
|
7556
|
+
export const zPromptsRenderSkillVersionResponse = z.object({
|
|
7557
|
+
code: z.number(),
|
|
7558
|
+
data: zRenderedSkillVersion.nullable(),
|
|
7498
7559
|
error: z.object({
|
|
7499
7560
|
code: z.string(),
|
|
7500
7561
|
details: z.unknown().nullish(),
|
|
@@ -7522,6 +7583,10 @@ export const zPromptsGetPromptDirectorySummaryPath = z.object({
|
|
|
7522
7583
|
projectId: z.string().min(1)
|
|
7523
7584
|
});
|
|
7524
7585
|
|
|
7586
|
+
export const zPromptsGetPromptDirectorySummaryQuery = z.object({
|
|
7587
|
+
kind: z.string().regex(/^\s*$|^\s*(chat|skill)(\s*,\s*(chat|skill))*\s*$/).nullish()
|
|
7588
|
+
});
|
|
7589
|
+
|
|
7525
7590
|
/**
|
|
7526
7591
|
* Success
|
|
7527
7592
|
*/
|
|
@@ -7640,6 +7705,7 @@ export const zPromptsGetPromptResponse = z.object({
|
|
|
7640
7705
|
export const zPromptsUpdatePromptBody = z.object({
|
|
7641
7706
|
description: z.string().nullish(),
|
|
7642
7707
|
name: z.string().min(1).max(200).nullish(),
|
|
7708
|
+
slug: z.string().min(1).max(128).regex(/^[a-z0-9-]+$/).nullish(),
|
|
7643
7709
|
status: z.enum(['active', 'archived']).nullish(),
|
|
7644
7710
|
tags: z.array(z.string()).nullish()
|
|
7645
7711
|
});
|
|
@@ -7678,6 +7744,42 @@ export const zPromptsUpdatePromptResponse = z.object({
|
|
|
7678
7744
|
success: z.boolean()
|
|
7679
7745
|
});
|
|
7680
7746
|
|
|
7747
|
+
export const zPromptsImportPromptVersionBody = zImportPromptVersionInput;
|
|
7748
|
+
|
|
7749
|
+
export const zPromptsImportPromptVersionPath = z.object({
|
|
7750
|
+
projectId: z.string().min(1),
|
|
7751
|
+
promptId: z.string()
|
|
7752
|
+
});
|
|
7753
|
+
|
|
7754
|
+
/**
|
|
7755
|
+
* Success
|
|
7756
|
+
*/
|
|
7757
|
+
export const zPromptsImportPromptVersionResponse = z.object({
|
|
7758
|
+
code: z.number(),
|
|
7759
|
+
data: zPromptVersion.nullable(),
|
|
7760
|
+
error: z.object({
|
|
7761
|
+
code: z.string(),
|
|
7762
|
+
details: z.unknown().nullish(),
|
|
7763
|
+
message: z.string(),
|
|
7764
|
+
rowErrors: z.array(z.object({
|
|
7765
|
+
code: z.string(),
|
|
7766
|
+
message: z.string(),
|
|
7767
|
+
path: z.array(z.union([z.string(), z.number()]))
|
|
7768
|
+
})).nullish()
|
|
7769
|
+
}).nullable(),
|
|
7770
|
+
pagination: z.object({
|
|
7771
|
+
limit: z.int().gte(1).lte(100),
|
|
7772
|
+
page: z.int().gte(1),
|
|
7773
|
+
total: z.int().gte(0),
|
|
7774
|
+
totalPages: z.int().gte(0)
|
|
7775
|
+
}).nullable(),
|
|
7776
|
+
sdkBehavior: z.object({
|
|
7777
|
+
flags: z.record(z.string(), z.unknown()),
|
|
7778
|
+
v: z.int().gte(1)
|
|
7779
|
+
}).nullish(),
|
|
7780
|
+
success: z.boolean()
|
|
7781
|
+
});
|
|
7782
|
+
|
|
7681
7783
|
export const zPromptsListPromptLabelEventsByPromptPath = z.object({
|
|
7682
7784
|
projectId: z.string().min(1),
|
|
7683
7785
|
promptId: z.string()
|
|
@@ -7997,7 +8099,11 @@ export const zPromptsCreatePromptVersionBody = z.object({
|
|
|
7997
8099
|
allowBlockRemovals: z.array(z.string()).nullish(),
|
|
7998
8100
|
baseVersionId: z.string().nullish(),
|
|
7999
8101
|
changelog: z.string().nullish(),
|
|
8000
|
-
format: z.enum([
|
|
8102
|
+
format: z.enum([
|
|
8103
|
+
'text',
|
|
8104
|
+
'chat',
|
|
8105
|
+
'skill'
|
|
8106
|
+
]),
|
|
8001
8107
|
modelConfig: z.unknown().nullish(),
|
|
8002
8108
|
templateJson: z.unknown(),
|
|
8003
8109
|
variablesSchema: z.unknown().nullish()
|
|
@@ -8052,118 +8158,121 @@ export const zPromptsGetPromptVersionDiffQuery = z.object({
|
|
|
8052
8158
|
*/
|
|
8053
8159
|
export const zPromptsGetPromptVersionDiffResponse = z.object({
|
|
8054
8160
|
code: z.number(),
|
|
8055
|
-
data: z.
|
|
8056
|
-
|
|
8057
|
-
z.
|
|
8058
|
-
|
|
8059
|
-
|
|
8161
|
+
data: z.union([
|
|
8162
|
+
z.object({
|
|
8163
|
+
operations: z.array(z.union([
|
|
8164
|
+
z.object({
|
|
8165
|
+
condition: z.object({
|
|
8166
|
+
kind: z.string()
|
|
8167
|
+
}),
|
|
8168
|
+
content: z.string().nullish(),
|
|
8169
|
+
name: z.string(),
|
|
8170
|
+
op: z.enum(['add']),
|
|
8171
|
+
role: z.enum([
|
|
8172
|
+
'system',
|
|
8173
|
+
'user',
|
|
8174
|
+
'assistant',
|
|
8175
|
+
'developer',
|
|
8176
|
+
'tool'
|
|
8177
|
+
]),
|
|
8178
|
+
toolCallId: z.string().nullish(),
|
|
8179
|
+
toolCalls: z.array(z.object({
|
|
8180
|
+
arguments: z.record(z.string(), z.unknown()),
|
|
8181
|
+
id: z.string(),
|
|
8182
|
+
name: z.string()
|
|
8183
|
+
})).nullish()
|
|
8060
8184
|
}),
|
|
8061
|
-
|
|
8062
|
-
|
|
8063
|
-
|
|
8064
|
-
|
|
8065
|
-
|
|
8066
|
-
|
|
8067
|
-
'
|
|
8068
|
-
|
|
8069
|
-
|
|
8070
|
-
|
|
8071
|
-
|
|
8072
|
-
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
8185
|
+
z.object({
|
|
8186
|
+
condition: z.object({
|
|
8187
|
+
kind: z.string()
|
|
8188
|
+
}),
|
|
8189
|
+
content: z.string().nullish(),
|
|
8190
|
+
name: z.string(),
|
|
8191
|
+
op: z.enum(['remove']),
|
|
8192
|
+
role: z.enum([
|
|
8193
|
+
'system',
|
|
8194
|
+
'user',
|
|
8195
|
+
'assistant',
|
|
8196
|
+
'developer',
|
|
8197
|
+
'tool'
|
|
8198
|
+
]),
|
|
8199
|
+
toolCallId: z.string().nullish(),
|
|
8200
|
+
toolCalls: z.array(z.object({
|
|
8201
|
+
arguments: z.record(z.string(), z.unknown()),
|
|
8202
|
+
id: z.string(),
|
|
8203
|
+
name: z.string()
|
|
8204
|
+
})).nullish()
|
|
8081
8205
|
}),
|
|
8082
|
-
|
|
8083
|
-
|
|
8084
|
-
|
|
8085
|
-
|
|
8086
|
-
'
|
|
8087
|
-
'user',
|
|
8088
|
-
'assistant',
|
|
8089
|
-
'developer',
|
|
8090
|
-
'tool'
|
|
8091
|
-
]),
|
|
8092
|
-
toolCallId: z.string().nullish(),
|
|
8093
|
-
toolCalls: z.array(z.object({
|
|
8094
|
-
arguments: z.record(z.string(), z.unknown()),
|
|
8095
|
-
id: z.string(),
|
|
8096
|
-
name: z.string()
|
|
8097
|
-
})).nullish()
|
|
8098
|
-
}),
|
|
8099
|
-
z.object({
|
|
8100
|
-
after: z.string(),
|
|
8101
|
-
before: z.string(),
|
|
8102
|
-
name: z.string(),
|
|
8103
|
-
op: z.enum(['edit_content'])
|
|
8104
|
-
}),
|
|
8105
|
-
z.object({
|
|
8106
|
-
after: z.object({
|
|
8107
|
-
kind: z.string()
|
|
8206
|
+
z.object({
|
|
8207
|
+
after: z.string(),
|
|
8208
|
+
before: z.string(),
|
|
8209
|
+
name: z.string(),
|
|
8210
|
+
op: z.enum(['edit_content'])
|
|
8108
8211
|
}),
|
|
8109
|
-
|
|
8110
|
-
|
|
8212
|
+
z.object({
|
|
8213
|
+
after: z.object({
|
|
8214
|
+
kind: z.string()
|
|
8215
|
+
}),
|
|
8216
|
+
before: z.object({
|
|
8217
|
+
kind: z.string()
|
|
8218
|
+
}),
|
|
8219
|
+
name: z.string(),
|
|
8220
|
+
op: z.enum(['edit_condition'])
|
|
8111
8221
|
}),
|
|
8112
|
-
|
|
8113
|
-
|
|
8114
|
-
|
|
8115
|
-
|
|
8116
|
-
|
|
8117
|
-
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8121
|
-
|
|
8122
|
-
|
|
8123
|
-
|
|
8124
|
-
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
'
|
|
8129
|
-
|
|
8130
|
-
|
|
8131
|
-
|
|
8132
|
-
|
|
8133
|
-
|
|
8134
|
-
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8138
|
-
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
|
|
8142
|
-
|
|
8143
|
-
|
|
8144
|
-
|
|
8145
|
-
|
|
8146
|
-
|
|
8147
|
-
|
|
8148
|
-
|
|
8149
|
-
|
|
8150
|
-
|
|
8151
|
-
|
|
8152
|
-
|
|
8153
|
-
|
|
8154
|
-
|
|
8155
|
-
})
|
|
8156
|
-
|
|
8157
|
-
|
|
8158
|
-
|
|
8159
|
-
|
|
8160
|
-
|
|
8161
|
-
|
|
8162
|
-
|
|
8163
|
-
|
|
8164
|
-
|
|
8165
|
-
|
|
8166
|
-
}).nullable(),
|
|
8222
|
+
z.object({
|
|
8223
|
+
after: z.enum([
|
|
8224
|
+
'system',
|
|
8225
|
+
'user',
|
|
8226
|
+
'assistant',
|
|
8227
|
+
'developer',
|
|
8228
|
+
'tool'
|
|
8229
|
+
]),
|
|
8230
|
+
before: z.enum([
|
|
8231
|
+
'system',
|
|
8232
|
+
'user',
|
|
8233
|
+
'assistant',
|
|
8234
|
+
'developer',
|
|
8235
|
+
'tool'
|
|
8236
|
+
]),
|
|
8237
|
+
name: z.string(),
|
|
8238
|
+
op: z.enum(['edit_role'])
|
|
8239
|
+
}),
|
|
8240
|
+
z.object({
|
|
8241
|
+
after: z.boolean(),
|
|
8242
|
+
before: z.boolean(),
|
|
8243
|
+
name: z.string(),
|
|
8244
|
+
op: z.enum(['edit_required'])
|
|
8245
|
+
}),
|
|
8246
|
+
z.object({
|
|
8247
|
+
after: z.string(),
|
|
8248
|
+
before: z.string(),
|
|
8249
|
+
name: z.string(),
|
|
8250
|
+
op: z.enum(['edit_tool_call_id'])
|
|
8251
|
+
}),
|
|
8252
|
+
z.object({
|
|
8253
|
+
after: z.array(z.object({
|
|
8254
|
+
arguments: z.record(z.string(), z.unknown()),
|
|
8255
|
+
id: z.string(),
|
|
8256
|
+
name: z.string()
|
|
8257
|
+
})),
|
|
8258
|
+
before: z.array(z.object({
|
|
8259
|
+
arguments: z.record(z.string(), z.unknown()),
|
|
8260
|
+
id: z.string(),
|
|
8261
|
+
name: z.string()
|
|
8262
|
+
})),
|
|
8263
|
+
name: z.string(),
|
|
8264
|
+
op: z.enum(['edit_tool_calls'])
|
|
8265
|
+
}),
|
|
8266
|
+
z.object({
|
|
8267
|
+
fromIndex: z.number(),
|
|
8268
|
+
name: z.string(),
|
|
8269
|
+
op: z.enum(['reorder']),
|
|
8270
|
+
toIndex: z.number()
|
|
8271
|
+
})
|
|
8272
|
+
]))
|
|
8273
|
+
}),
|
|
8274
|
+
zSkillVersionDiff
|
|
8275
|
+
]).nullable(),
|
|
8167
8276
|
error: z.object({
|
|
8168
8277
|
code: z.string(),
|
|
8169
8278
|
details: z.unknown().nullish(),
|
|
@@ -9632,7 +9741,7 @@ export const zRoutingProvidersCreateRoutingProviderBody = z.object({
|
|
|
9632
9741
|
value: z.string().min(1).max(64).regex(/^[a-z0-9]([a-z0-9_-]*[a-z0-9])?$/)
|
|
9633
9742
|
}).nullish(),
|
|
9634
9743
|
slug: z.string().min(1).max(120).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
|
|
9635
|
-
timeoutMs: z.int().gte(1000).lte(
|
|
9744
|
+
timeoutMs: z.int().gte(1000).lte(600000).nullish()
|
|
9636
9745
|
});
|
|
9637
9746
|
|
|
9638
9747
|
export const zRoutingProvidersCreateRoutingProviderPath = z.object({
|
|
@@ -9763,6 +9872,7 @@ export const zRoutingProvidersCreateRoutingProviderResponse = z.object({
|
|
|
9763
9872
|
});
|
|
9764
9873
|
|
|
9765
9874
|
export const zRoutingProvidersConnectRoutingProviderBody = z.object({
|
|
9875
|
+
blockedModels: z.array(z.string().min(1).max(256)).max(500).nullish(),
|
|
9766
9876
|
credential: z.union([
|
|
9767
9877
|
z.union([
|
|
9768
9878
|
z.object({
|
|
@@ -9803,6 +9913,7 @@ export const zRoutingProvidersConnectRoutingProviderBody = z.object({
|
|
|
9803
9913
|
type: z.enum(['existing'])
|
|
9804
9914
|
})
|
|
9805
9915
|
]),
|
|
9916
|
+
modelPolicy: z.enum(['allowlist', 'denylist']).nullish(),
|
|
9806
9917
|
models: z.array(z.string().min(1)).max(500),
|
|
9807
9918
|
provider: z.object({
|
|
9808
9919
|
apiVersion: z.string().min(1).max(64).nullish(),
|
|
@@ -9823,7 +9934,7 @@ export const zRoutingProvidersConnectRoutingProviderBody = z.object({
|
|
|
9823
9934
|
value: z.string().min(1).max(64).regex(/^[a-z0-9]([a-z0-9_-]*[a-z0-9])?$/)
|
|
9824
9935
|
}).nullish(),
|
|
9825
9936
|
slug: z.string().min(1).max(120).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
|
|
9826
|
-
timeoutMs: z.int().gte(1000).lte(
|
|
9937
|
+
timeoutMs: z.int().gte(1000).lte(600000).nullish()
|
|
9827
9938
|
}),
|
|
9828
9939
|
selectedEnvironmentIds: z.array(z.string().min(1)).max(64).nullish()
|
|
9829
9940
|
});
|
|
@@ -10319,7 +10430,7 @@ export const zRoutingProvidersUpdateRoutingProviderBody = z.object({
|
|
|
10319
10430
|
providerRegion: z.string().min(1).max(64).regex(/^[a-z0-9]([a-z0-9_-]*[a-z0-9])?$/).nullish(),
|
|
10320
10431
|
providerTier: z.string().min(1).max(64).regex(/^[a-z0-9]([a-z0-9_-]*[a-z0-9])?$/).nullish(),
|
|
10321
10432
|
slug: z.unknown().nullish(),
|
|
10322
|
-
timeoutMs: z.int().gte(1000).lte(
|
|
10433
|
+
timeoutMs: z.int().gte(1000).lte(600000).nullish()
|
|
10323
10434
|
});
|
|
10324
10435
|
|
|
10325
10436
|
export const zRoutingProvidersUpdateRoutingProviderPath = z.object({
|
|
@@ -10933,7 +11044,9 @@ export const zProviderConfigDraftsGetProviderDraftResponse = z.object({
|
|
|
10933
11044
|
export const zProviderConfigDraftsUpdateProviderDraftBody = z.object({
|
|
10934
11045
|
configSnapshotPatch: z.object({
|
|
10935
11046
|
baseUrl: z.string().nullish(),
|
|
11047
|
+
blockedModels: z.array(z.string().min(1).max(256)).max(500).nullish(),
|
|
10936
11048
|
customModelIds: z.array(z.string()).nullish(),
|
|
11049
|
+
modelPolicy: z.enum(['allowlist', 'denylist']).nullish(),
|
|
10937
11050
|
models: z.array(z.string()).nullish(),
|
|
10938
11051
|
passthroughMode: z.enum([
|
|
10939
11052
|
'managed_precedence',
|
|
@@ -12617,7 +12730,7 @@ export const zRoutingTargetsCreateRoutingTargetBody = z.object({
|
|
|
12617
12730
|
credentialId: z.string().nullish(),
|
|
12618
12731
|
modelId: z.string().min(1),
|
|
12619
12732
|
name: z.string().min(1).max(200),
|
|
12620
|
-
timeoutMs: z.int().gte(1000).lte(
|
|
12733
|
+
timeoutMs: z.int().gte(1000).lte(600000).nullish(),
|
|
12621
12734
|
weight: z.int().gte(1).nullish()
|
|
12622
12735
|
});
|
|
12623
12736
|
|
|
@@ -12748,7 +12861,7 @@ export const zRoutingTargetsUpdateRoutingTargetBody = z.object({
|
|
|
12748
12861
|
credentialId: z.string().nullish(),
|
|
12749
12862
|
modelId: z.string().min(1).nullish(),
|
|
12750
12863
|
name: z.string().min(1).max(200).nullish(),
|
|
12751
|
-
timeoutMs: z.int().gte(1000).lte(
|
|
12864
|
+
timeoutMs: z.int().gte(1000).lte(600000).nullish(),
|
|
12752
12865
|
weight: z.int().gte(1).nullish()
|
|
12753
12866
|
});
|
|
12754
12867
|
|
|
@@ -13646,7 +13759,8 @@ export const zProjectsListProjectsResponse = z.object({
|
|
|
13646
13759
|
'deleted'
|
|
13647
13760
|
]),
|
|
13648
13761
|
updatedAt: z.iso.datetime(),
|
|
13649
|
-
workspaceId: z.string()
|
|
13762
|
+
workspaceId: z.string(),
|
|
13763
|
+
workspaceSlug: z.string().min(1).max(120)
|
|
13650
13764
|
})).nullable(),
|
|
13651
13765
|
error: z.object({
|
|
13652
13766
|
code: z.string(),
|
|
@@ -13699,7 +13813,8 @@ export const zProjectsCreateProjectResponse = z.object({
|
|
|
13699
13813
|
'deleted'
|
|
13700
13814
|
]),
|
|
13701
13815
|
updatedAt: z.iso.datetime(),
|
|
13702
|
-
workspaceId: z.string()
|
|
13816
|
+
workspaceId: z.string(),
|
|
13817
|
+
workspaceSlug: z.string().min(1).max(120)
|
|
13703
13818
|
}).nullable(),
|
|
13704
13819
|
error: z.object({
|
|
13705
13820
|
code: z.string(),
|