@to11ai/sdk 2.1.0-rc → 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 -215
- package/dist/generated/zod.gen.d.ts +416 -126
- 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 -261
- package/src/generated/zod.gen.ts +336 -216
- 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(),
|
|
@@ -1864,8 +1937,9 @@ export const zIngestTokenExchangeIngestTokenBody = z.object({
|
|
|
1864
1937
|
export const zIngestTokenExchangeIngestTokenResponse = z.object({
|
|
1865
1938
|
code: z.number(),
|
|
1866
1939
|
data: z.object({
|
|
1867
|
-
apiKeyId: z.string(),
|
|
1940
|
+
apiKeyId: z.string().nullish(),
|
|
1868
1941
|
expiresAt: z.string(),
|
|
1942
|
+
principalId: z.string(),
|
|
1869
1943
|
projectId: z.string(),
|
|
1870
1944
|
scopeClass: z.enum(['project', 'org']),
|
|
1871
1945
|
scopes: z.array(z.string()),
|
|
@@ -2000,50 +2074,6 @@ export const zOrganizationsGetOrganizationInvitationDetailsResponse = z.object({
|
|
|
2000
2074
|
success: z.boolean()
|
|
2001
2075
|
});
|
|
2002
2076
|
|
|
2003
|
-
export const zApiKeysListApiKeysSuperQuery = z.object({
|
|
2004
|
-
page: z.int().nullish(),
|
|
2005
|
-
limit: z.int().nullish()
|
|
2006
|
-
});
|
|
2007
|
-
|
|
2008
|
-
/**
|
|
2009
|
-
* Success
|
|
2010
|
-
*/
|
|
2011
|
-
export const zApiKeysListApiKeysSuperResponse = z.object({
|
|
2012
|
-
code: z.number(),
|
|
2013
|
-
data: z.array(z.object({
|
|
2014
|
-
createdAt: z.string(),
|
|
2015
|
-
environment: z.enum(['live', 'test']),
|
|
2016
|
-
expiresAt: z.string(),
|
|
2017
|
-
id: z.string(),
|
|
2018
|
-
key: z.string(),
|
|
2019
|
-
orgId: z.string().nullable(),
|
|
2020
|
-
projectId: z.string().nullable(),
|
|
2021
|
-
revokedAt: z.string().nullable(),
|
|
2022
|
-
scopes: z.array(z.string())
|
|
2023
|
-
})).nullable(),
|
|
2024
|
-
error: z.object({
|
|
2025
|
-
code: z.string(),
|
|
2026
|
-
details: z.unknown().nullish(),
|
|
2027
|
-
message: z.string(),
|
|
2028
|
-
rowErrors: z.array(z.object({
|
|
2029
|
-
code: z.string(),
|
|
2030
|
-
message: z.string(),
|
|
2031
|
-
path: z.array(z.union([z.string(), z.number()]))
|
|
2032
|
-
})).nullish()
|
|
2033
|
-
}).nullable(),
|
|
2034
|
-
pagination: z.object({
|
|
2035
|
-
limit: z.int().gte(1).lte(100),
|
|
2036
|
-
page: z.int().gte(1),
|
|
2037
|
-
total: z.int().gte(0),
|
|
2038
|
-
totalPages: z.int().gte(0)
|
|
2039
|
-
}).nullable(),
|
|
2040
|
-
sdkBehavior: z.object({
|
|
2041
|
-
flags: z.record(z.string(), z.unknown()),
|
|
2042
|
-
v: z.int().gte(1)
|
|
2043
|
-
}).nullish(),
|
|
2044
|
-
success: z.boolean()
|
|
2045
|
-
});
|
|
2046
|
-
|
|
2047
2077
|
export const zApiKeysCreateApiKeySuperBody = z.object({
|
|
2048
2078
|
environment: z.enum(['live', 'test']),
|
|
2049
2079
|
orgId: z.string().nullish(),
|
|
@@ -2922,54 +2952,6 @@ export const zOrganizationsResendOrganizationInvitationResponse = z.object({
|
|
|
2922
2952
|
success: z.boolean()
|
|
2923
2953
|
});
|
|
2924
2954
|
|
|
2925
|
-
export const zApiKeysListApiKeysOrgPath = z.object({
|
|
2926
|
-
orgId: z.string()
|
|
2927
|
-
});
|
|
2928
|
-
|
|
2929
|
-
export const zApiKeysListApiKeysOrgQuery = z.object({
|
|
2930
|
-
page: z.int().nullish(),
|
|
2931
|
-
limit: z.int().nullish()
|
|
2932
|
-
});
|
|
2933
|
-
|
|
2934
|
-
/**
|
|
2935
|
-
* Success
|
|
2936
|
-
*/
|
|
2937
|
-
export const zApiKeysListApiKeysOrgResponse = z.object({
|
|
2938
|
-
code: z.number(),
|
|
2939
|
-
data: z.array(z.object({
|
|
2940
|
-
createdAt: z.string(),
|
|
2941
|
-
environment: z.enum(['live', 'test']),
|
|
2942
|
-
expiresAt: z.string(),
|
|
2943
|
-
id: z.string(),
|
|
2944
|
-
key: z.string(),
|
|
2945
|
-
orgId: z.string().nullable(),
|
|
2946
|
-
projectId: z.string().nullable(),
|
|
2947
|
-
revokedAt: z.string().nullable(),
|
|
2948
|
-
scopes: z.array(z.string())
|
|
2949
|
-
})).nullable(),
|
|
2950
|
-
error: z.object({
|
|
2951
|
-
code: z.string(),
|
|
2952
|
-
details: z.unknown().nullish(),
|
|
2953
|
-
message: z.string(),
|
|
2954
|
-
rowErrors: z.array(z.object({
|
|
2955
|
-
code: z.string(),
|
|
2956
|
-
message: z.string(),
|
|
2957
|
-
path: z.array(z.union([z.string(), z.number()]))
|
|
2958
|
-
})).nullish()
|
|
2959
|
-
}).nullable(),
|
|
2960
|
-
pagination: z.object({
|
|
2961
|
-
limit: z.int().gte(1).lte(100),
|
|
2962
|
-
page: z.int().gte(1),
|
|
2963
|
-
total: z.int().gte(0),
|
|
2964
|
-
totalPages: z.int().gte(0)
|
|
2965
|
-
}).nullable(),
|
|
2966
|
-
sdkBehavior: z.object({
|
|
2967
|
-
flags: z.record(z.string(), z.unknown()),
|
|
2968
|
-
v: z.int().gte(1)
|
|
2969
|
-
}).nullish(),
|
|
2970
|
-
success: z.boolean()
|
|
2971
|
-
});
|
|
2972
|
-
|
|
2973
2955
|
export const zApiKeysCreateApiKeyOrgBody = z.object({
|
|
2974
2956
|
environment: z.enum(['live', 'test']),
|
|
2975
2957
|
expiresAt: z.string().nullish(),
|
|
@@ -3643,7 +3625,8 @@ export const zProjectsCreateProjectByOrgResponse = z.object({
|
|
|
3643
3625
|
'deleted'
|
|
3644
3626
|
]),
|
|
3645
3627
|
updatedAt: z.iso.datetime(),
|
|
3646
|
-
workspaceId: z.string()
|
|
3628
|
+
workspaceId: z.string(),
|
|
3629
|
+
workspaceSlug: z.string().min(1).max(120)
|
|
3647
3630
|
}).nullable(),
|
|
3648
3631
|
error: z.object({
|
|
3649
3632
|
code: z.string(),
|
|
@@ -4999,6 +4982,41 @@ export const zAuthLookupPrincipalsBatchResponse = z.object({
|
|
|
4999
4982
|
success: z.boolean()
|
|
5000
4983
|
});
|
|
5001
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
|
+
|
|
5002
5020
|
export const zProjectsDeleteProjectPath = z.object({
|
|
5003
5021
|
projectId: z.string()
|
|
5004
5022
|
});
|
|
@@ -5021,7 +5039,8 @@ export const zProjectsDeleteProjectResponse = z.object({
|
|
|
5021
5039
|
'deleted'
|
|
5022
5040
|
]),
|
|
5023
5041
|
updatedAt: z.iso.datetime(),
|
|
5024
|
-
workspaceId: z.string()
|
|
5042
|
+
workspaceId: z.string(),
|
|
5043
|
+
workspaceSlug: z.string().min(1).max(120)
|
|
5025
5044
|
}).nullable(),
|
|
5026
5045
|
error: z.object({
|
|
5027
5046
|
code: z.string(),
|
|
@@ -5068,7 +5087,8 @@ export const zProjectsGetProjectResponse = z.object({
|
|
|
5068
5087
|
'deleted'
|
|
5069
5088
|
]),
|
|
5070
5089
|
updatedAt: z.iso.datetime(),
|
|
5071
|
-
workspaceId: z.string()
|
|
5090
|
+
workspaceId: z.string(),
|
|
5091
|
+
workspaceSlug: z.string().min(1).max(120)
|
|
5072
5092
|
}).nullable(),
|
|
5073
5093
|
error: z.object({
|
|
5074
5094
|
code: z.string(),
|
|
@@ -5121,7 +5141,8 @@ export const zProjectsUpdateProjectResponse = z.object({
|
|
|
5121
5141
|
'deleted'
|
|
5122
5142
|
]),
|
|
5123
5143
|
updatedAt: z.iso.datetime(),
|
|
5124
|
-
workspaceId: z.string()
|
|
5144
|
+
workspaceId: z.string(),
|
|
5145
|
+
workspaceSlug: z.string().min(1).max(120)
|
|
5125
5146
|
}).nullable(),
|
|
5126
5147
|
error: z.object({
|
|
5127
5148
|
code: z.string(),
|
|
@@ -7312,6 +7333,7 @@ export const zPromptsListPromptsQuery = z.object({
|
|
|
7312
7333
|
search: z.string().nullish(),
|
|
7313
7334
|
sortDir: z.enum(['asc', 'desc']).nullish(),
|
|
7314
7335
|
status: z.string().nullish(),
|
|
7336
|
+
kind: z.string().regex(/^\s*$|^\s*(chat|skill)(\s*,\s*(chat|skill))*\s*$/).nullish(),
|
|
7315
7337
|
sortBy: z.enum([
|
|
7316
7338
|
'createdAt',
|
|
7317
7339
|
'updatedAt',
|
|
@@ -7334,6 +7356,7 @@ export const zPromptsListPromptsResponse = z.object({
|
|
|
7334
7356
|
createdByUserId: z.string(),
|
|
7335
7357
|
description: z.string().nullable(),
|
|
7336
7358
|
id: z.string(),
|
|
7359
|
+
kind: z.enum(['chat', 'skill']),
|
|
7337
7360
|
labels: z.array(z.object({
|
|
7338
7361
|
label: z.string(),
|
|
7339
7362
|
version: z.number().nullable(),
|
|
@@ -7384,6 +7407,7 @@ export const zPromptsListPromptsResponse = z.object({
|
|
|
7384
7407
|
|
|
7385
7408
|
export const zPromptsCreatePromptBody = z.object({
|
|
7386
7409
|
description: z.string().nullish(),
|
|
7410
|
+
kind: z.enum(['chat', 'skill']).nullish(),
|
|
7387
7411
|
name: z.string().min(1).max(200),
|
|
7388
7412
|
slug: z.string().min(1).max(128).regex(/^[a-z0-9-]+$/),
|
|
7389
7413
|
tags: z.array(z.string()).nullish()
|
|
@@ -7489,7 +7513,49 @@ export const zPromptsRenderPromptPath = z.object({
|
|
|
7489
7513
|
*/
|
|
7490
7514
|
export const zPromptsRenderPromptResponse = z.object({
|
|
7491
7515
|
code: z.number(),
|
|
7492
|
-
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(),
|
|
7493
7559
|
error: z.object({
|
|
7494
7560
|
code: z.string(),
|
|
7495
7561
|
details: z.unknown().nullish(),
|
|
@@ -7517,6 +7583,10 @@ export const zPromptsGetPromptDirectorySummaryPath = z.object({
|
|
|
7517
7583
|
projectId: z.string().min(1)
|
|
7518
7584
|
});
|
|
7519
7585
|
|
|
7586
|
+
export const zPromptsGetPromptDirectorySummaryQuery = z.object({
|
|
7587
|
+
kind: z.string().regex(/^\s*$|^\s*(chat|skill)(\s*,\s*(chat|skill))*\s*$/).nullish()
|
|
7588
|
+
});
|
|
7589
|
+
|
|
7520
7590
|
/**
|
|
7521
7591
|
* Success
|
|
7522
7592
|
*/
|
|
@@ -7635,6 +7705,7 @@ export const zPromptsGetPromptResponse = z.object({
|
|
|
7635
7705
|
export const zPromptsUpdatePromptBody = z.object({
|
|
7636
7706
|
description: z.string().nullish(),
|
|
7637
7707
|
name: z.string().min(1).max(200).nullish(),
|
|
7708
|
+
slug: z.string().min(1).max(128).regex(/^[a-z0-9-]+$/).nullish(),
|
|
7638
7709
|
status: z.enum(['active', 'archived']).nullish(),
|
|
7639
7710
|
tags: z.array(z.string()).nullish()
|
|
7640
7711
|
});
|
|
@@ -7673,6 +7744,42 @@ export const zPromptsUpdatePromptResponse = z.object({
|
|
|
7673
7744
|
success: z.boolean()
|
|
7674
7745
|
});
|
|
7675
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
|
+
|
|
7676
7783
|
export const zPromptsListPromptLabelEventsByPromptPath = z.object({
|
|
7677
7784
|
projectId: z.string().min(1),
|
|
7678
7785
|
promptId: z.string()
|
|
@@ -7992,7 +8099,11 @@ export const zPromptsCreatePromptVersionBody = z.object({
|
|
|
7992
8099
|
allowBlockRemovals: z.array(z.string()).nullish(),
|
|
7993
8100
|
baseVersionId: z.string().nullish(),
|
|
7994
8101
|
changelog: z.string().nullish(),
|
|
7995
|
-
format: z.enum([
|
|
8102
|
+
format: z.enum([
|
|
8103
|
+
'text',
|
|
8104
|
+
'chat',
|
|
8105
|
+
'skill'
|
|
8106
|
+
]),
|
|
7996
8107
|
modelConfig: z.unknown().nullish(),
|
|
7997
8108
|
templateJson: z.unknown(),
|
|
7998
8109
|
variablesSchema: z.unknown().nullish()
|
|
@@ -8047,118 +8158,121 @@ export const zPromptsGetPromptVersionDiffQuery = z.object({
|
|
|
8047
8158
|
*/
|
|
8048
8159
|
export const zPromptsGetPromptVersionDiffResponse = z.object({
|
|
8049
8160
|
code: z.number(),
|
|
8050
|
-
data: z.
|
|
8051
|
-
|
|
8052
|
-
z.
|
|
8053
|
-
|
|
8054
|
-
|
|
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()
|
|
8055
8184
|
}),
|
|
8056
|
-
|
|
8057
|
-
|
|
8058
|
-
|
|
8059
|
-
|
|
8060
|
-
|
|
8061
|
-
|
|
8062
|
-
'
|
|
8063
|
-
|
|
8064
|
-
|
|
8065
|
-
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
|
|
8069
|
-
|
|
8070
|
-
|
|
8071
|
-
|
|
8072
|
-
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
|
|
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()
|
|
8076
8205
|
}),
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
8081
|
-
'
|
|
8082
|
-
'user',
|
|
8083
|
-
'assistant',
|
|
8084
|
-
'developer',
|
|
8085
|
-
'tool'
|
|
8086
|
-
]),
|
|
8087
|
-
toolCallId: z.string().nullish(),
|
|
8088
|
-
toolCalls: z.array(z.object({
|
|
8089
|
-
arguments: z.record(z.string(), z.unknown()),
|
|
8090
|
-
id: z.string(),
|
|
8091
|
-
name: z.string()
|
|
8092
|
-
})).nullish()
|
|
8093
|
-
}),
|
|
8094
|
-
z.object({
|
|
8095
|
-
after: z.string(),
|
|
8096
|
-
before: z.string(),
|
|
8097
|
-
name: z.string(),
|
|
8098
|
-
op: z.enum(['edit_content'])
|
|
8099
|
-
}),
|
|
8100
|
-
z.object({
|
|
8101
|
-
after: z.object({
|
|
8102
|
-
kind: z.string()
|
|
8206
|
+
z.object({
|
|
8207
|
+
after: z.string(),
|
|
8208
|
+
before: z.string(),
|
|
8209
|
+
name: z.string(),
|
|
8210
|
+
op: z.enum(['edit_content'])
|
|
8103
8211
|
}),
|
|
8104
|
-
|
|
8105
|
-
|
|
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'])
|
|
8106
8221
|
}),
|
|
8107
|
-
|
|
8108
|
-
|
|
8109
|
-
|
|
8110
|
-
|
|
8111
|
-
|
|
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
|
-
}).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(),
|
|
8162
8276
|
error: z.object({
|
|
8163
8277
|
code: z.string(),
|
|
8164
8278
|
details: z.unknown().nullish(),
|
|
@@ -9627,7 +9741,7 @@ export const zRoutingProvidersCreateRoutingProviderBody = z.object({
|
|
|
9627
9741
|
value: z.string().min(1).max(64).regex(/^[a-z0-9]([a-z0-9_-]*[a-z0-9])?$/)
|
|
9628
9742
|
}).nullish(),
|
|
9629
9743
|
slug: z.string().min(1).max(120).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
|
|
9630
|
-
timeoutMs: z.int().gte(1000).lte(
|
|
9744
|
+
timeoutMs: z.int().gte(1000).lte(600000).nullish()
|
|
9631
9745
|
});
|
|
9632
9746
|
|
|
9633
9747
|
export const zRoutingProvidersCreateRoutingProviderPath = z.object({
|
|
@@ -9758,6 +9872,7 @@ export const zRoutingProvidersCreateRoutingProviderResponse = z.object({
|
|
|
9758
9872
|
});
|
|
9759
9873
|
|
|
9760
9874
|
export const zRoutingProvidersConnectRoutingProviderBody = z.object({
|
|
9875
|
+
blockedModels: z.array(z.string().min(1).max(256)).max(500).nullish(),
|
|
9761
9876
|
credential: z.union([
|
|
9762
9877
|
z.union([
|
|
9763
9878
|
z.object({
|
|
@@ -9798,6 +9913,7 @@ export const zRoutingProvidersConnectRoutingProviderBody = z.object({
|
|
|
9798
9913
|
type: z.enum(['existing'])
|
|
9799
9914
|
})
|
|
9800
9915
|
]),
|
|
9916
|
+
modelPolicy: z.enum(['allowlist', 'denylist']).nullish(),
|
|
9801
9917
|
models: z.array(z.string().min(1)).max(500),
|
|
9802
9918
|
provider: z.object({
|
|
9803
9919
|
apiVersion: z.string().min(1).max(64).nullish(),
|
|
@@ -9818,7 +9934,7 @@ export const zRoutingProvidersConnectRoutingProviderBody = z.object({
|
|
|
9818
9934
|
value: z.string().min(1).max(64).regex(/^[a-z0-9]([a-z0-9_-]*[a-z0-9])?$/)
|
|
9819
9935
|
}).nullish(),
|
|
9820
9936
|
slug: z.string().min(1).max(120).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
|
|
9821
|
-
timeoutMs: z.int().gte(1000).lte(
|
|
9937
|
+
timeoutMs: z.int().gte(1000).lte(600000).nullish()
|
|
9822
9938
|
}),
|
|
9823
9939
|
selectedEnvironmentIds: z.array(z.string().min(1)).max(64).nullish()
|
|
9824
9940
|
});
|
|
@@ -10314,7 +10430,7 @@ export const zRoutingProvidersUpdateRoutingProviderBody = z.object({
|
|
|
10314
10430
|
providerRegion: z.string().min(1).max(64).regex(/^[a-z0-9]([a-z0-9_-]*[a-z0-9])?$/).nullish(),
|
|
10315
10431
|
providerTier: z.string().min(1).max(64).regex(/^[a-z0-9]([a-z0-9_-]*[a-z0-9])?$/).nullish(),
|
|
10316
10432
|
slug: z.unknown().nullish(),
|
|
10317
|
-
timeoutMs: z.int().gte(1000).lte(
|
|
10433
|
+
timeoutMs: z.int().gte(1000).lte(600000).nullish()
|
|
10318
10434
|
});
|
|
10319
10435
|
|
|
10320
10436
|
export const zRoutingProvidersUpdateRoutingProviderPath = z.object({
|
|
@@ -10928,7 +11044,9 @@ export const zProviderConfigDraftsGetProviderDraftResponse = z.object({
|
|
|
10928
11044
|
export const zProviderConfigDraftsUpdateProviderDraftBody = z.object({
|
|
10929
11045
|
configSnapshotPatch: z.object({
|
|
10930
11046
|
baseUrl: z.string().nullish(),
|
|
11047
|
+
blockedModels: z.array(z.string().min(1).max(256)).max(500).nullish(),
|
|
10931
11048
|
customModelIds: z.array(z.string()).nullish(),
|
|
11049
|
+
modelPolicy: z.enum(['allowlist', 'denylist']).nullish(),
|
|
10932
11050
|
models: z.array(z.string()).nullish(),
|
|
10933
11051
|
passthroughMode: z.enum([
|
|
10934
11052
|
'managed_precedence',
|
|
@@ -12612,7 +12730,7 @@ export const zRoutingTargetsCreateRoutingTargetBody = z.object({
|
|
|
12612
12730
|
credentialId: z.string().nullish(),
|
|
12613
12731
|
modelId: z.string().min(1),
|
|
12614
12732
|
name: z.string().min(1).max(200),
|
|
12615
|
-
timeoutMs: z.int().gte(1000).lte(
|
|
12733
|
+
timeoutMs: z.int().gte(1000).lte(600000).nullish(),
|
|
12616
12734
|
weight: z.int().gte(1).nullish()
|
|
12617
12735
|
});
|
|
12618
12736
|
|
|
@@ -12743,7 +12861,7 @@ export const zRoutingTargetsUpdateRoutingTargetBody = z.object({
|
|
|
12743
12861
|
credentialId: z.string().nullish(),
|
|
12744
12862
|
modelId: z.string().min(1).nullish(),
|
|
12745
12863
|
name: z.string().min(1).max(200).nullish(),
|
|
12746
|
-
timeoutMs: z.int().gte(1000).lte(
|
|
12864
|
+
timeoutMs: z.int().gte(1000).lte(600000).nullish(),
|
|
12747
12865
|
weight: z.int().gte(1).nullish()
|
|
12748
12866
|
});
|
|
12749
12867
|
|
|
@@ -13641,7 +13759,8 @@ export const zProjectsListProjectsResponse = z.object({
|
|
|
13641
13759
|
'deleted'
|
|
13642
13760
|
]),
|
|
13643
13761
|
updatedAt: z.iso.datetime(),
|
|
13644
|
-
workspaceId: z.string()
|
|
13762
|
+
workspaceId: z.string(),
|
|
13763
|
+
workspaceSlug: z.string().min(1).max(120)
|
|
13645
13764
|
})).nullable(),
|
|
13646
13765
|
error: z.object({
|
|
13647
13766
|
code: z.string(),
|
|
@@ -13694,7 +13813,8 @@ export const zProjectsCreateProjectResponse = z.object({
|
|
|
13694
13813
|
'deleted'
|
|
13695
13814
|
]),
|
|
13696
13815
|
updatedAt: z.iso.datetime(),
|
|
13697
|
-
workspaceId: z.string()
|
|
13816
|
+
workspaceId: z.string(),
|
|
13817
|
+
workspaceSlug: z.string().min(1).max(120)
|
|
13698
13818
|
}).nullable(),
|
|
13699
13819
|
error: z.object({
|
|
13700
13820
|
code: z.string(),
|