@to11ai/sdk 2.1.0-rc.2 → 2.1.0-rc.4

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.
@@ -149,7 +149,7 @@ export type OAuthCredential = {
149
149
  type: 'oauth';
150
150
  };
151
151
  export type PrincipalApiKeyContextInvariant = {
152
- actorType?: 'oidc' | 'api_key' | 'internal_secret' | null;
152
+ actorType?: 'oidc' | 'api_key' | null;
153
153
  apiKey?: {
154
154
  allowed: Array<string>;
155
155
  denied: Array<string>;
@@ -178,12 +178,18 @@ export type ProjectEnvironment = {
178
178
  id: string;
179
179
  isDefault: boolean;
180
180
  isGatewayFallback: boolean;
181
- isPointer: boolean;
181
+ /**
182
+ * @deprecated Always `false`. To be removed.
183
+ */
184
+ isPointer?: boolean | null;
182
185
  isProduction: boolean;
183
186
  isSystem: boolean;
184
187
  name: string;
185
188
  projectId: string;
186
- requiresApproval: boolean;
189
+ /**
190
+ * @deprecated Always `false`. To be removed.
191
+ */
192
+ requiresApproval?: boolean | null;
187
193
  slug: string;
188
194
  sortOrder: number;
189
195
  updatedAt: string;
@@ -273,7 +279,7 @@ export type RenderedSkill = {
273
279
  format: 'skill';
274
280
  label: string;
275
281
  promptId: string;
276
- releaseId: string;
282
+ releaseId?: string | null;
277
283
  releasedAt?: string | null;
278
284
  releasedByDisplayName?: string | null | null;
279
285
  version: number;
@@ -319,7 +325,7 @@ export type ResolvedPrompt = {
319
325
  label: string;
320
326
  modelConfig?: unknown | null;
321
327
  promptId: string;
322
- releaseId: string;
328
+ releaseId?: string | null;
323
329
  rendered: RenderedPrompt;
324
330
  toolChoice?: 'auto' | 'none' | 'required' | {
325
331
  name: string;
@@ -10766,10 +10772,8 @@ export type ProjectEnvironmentsCreateProjectEnvironmentData = {
10766
10772
  description?: string | null | null;
10767
10773
  isDefault?: boolean | null;
10768
10774
  isGatewayFallback?: boolean | null;
10769
- isPointer?: boolean | null;
10770
10775
  isProduction?: boolean | null;
10771
10776
  name: string;
10772
- requiresApproval?: boolean | null;
10773
10777
  slug: string;
10774
10778
  sortOrder?: number | null;
10775
10779
  };
@@ -10982,10 +10986,8 @@ export type ProjectEnvironmentsUpdateProjectEnvironmentData = {
10982
10986
  description?: string | null | null;
10983
10987
  isDefault?: boolean | null;
10984
10988
  isGatewayFallback?: boolean | null;
10985
- isPointer?: boolean | null;
10986
10989
  isProduction?: boolean | null;
10987
10990
  name?: string | null;
10988
- requiresApproval?: boolean | null;
10989
10991
  slug?: string | null;
10990
10992
  sortOrder?: number | null;
10991
10993
  };
@@ -171,7 +171,6 @@ export declare const zPrincipalApiKeyContextInvariant: z.ZodObject<{
171
171
  actorType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
172
172
  oidc: "oidc";
173
173
  api_key: "api_key";
174
- internal_secret: "internal_secret";
175
174
  }>>>;
176
175
  apiKey: z.ZodOptional<z.ZodNullable<z.ZodObject<{
177
176
  allowed: z.ZodArray<z.ZodString>;
@@ -201,12 +200,12 @@ export declare const zProjectEnvironment: z.ZodObject<{
201
200
  id: z.ZodString;
202
201
  isDefault: z.ZodBoolean;
203
202
  isGatewayFallback: z.ZodBoolean;
204
- isPointer: z.ZodBoolean;
203
+ isPointer: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
205
204
  isProduction: z.ZodBoolean;
206
205
  isSystem: z.ZodBoolean;
207
206
  name: z.ZodString;
208
207
  projectId: z.ZodString;
209
- requiresApproval: z.ZodBoolean;
208
+ requiresApproval: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
210
209
  slug: z.ZodString;
211
210
  sortOrder: z.ZodInt;
212
211
  updatedAt: z.ZodISODateTime;
@@ -222,12 +221,12 @@ export declare const zArchiveProjectEnvironmentResult: z.ZodObject<{
222
221
  id: z.ZodString;
223
222
  isDefault: z.ZodBoolean;
224
223
  isGatewayFallback: z.ZodBoolean;
225
- isPointer: z.ZodBoolean;
224
+ isPointer: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
226
225
  isProduction: z.ZodBoolean;
227
226
  isSystem: z.ZodBoolean;
228
227
  name: z.ZodString;
229
228
  projectId: z.ZodString;
230
- requiresApproval: z.ZodBoolean;
229
+ requiresApproval: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
231
230
  slug: z.ZodString;
232
231
  sortOrder: z.ZodInt;
233
232
  updatedAt: z.ZodISODateTime;
@@ -352,7 +351,7 @@ export declare const zRenderedSkill: z.ZodObject<{
352
351
  }>;
353
352
  label: z.ZodString;
354
353
  promptId: z.ZodString;
355
- releaseId: z.ZodString;
354
+ releaseId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
356
355
  releasedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
357
356
  releasedByDisplayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
358
357
  version: z.ZodNumber;
@@ -519,7 +518,7 @@ export declare const zResolvedPrompt: z.ZodObject<{
519
518
  label: z.ZodString;
520
519
  modelConfig: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
521
520
  promptId: z.ZodString;
522
- releaseId: z.ZodString;
521
+ releaseId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
523
522
  rendered: z.ZodUnion<readonly [z.ZodObject<{
524
523
  format: z.ZodEnum<{
525
524
  text: "text";
@@ -1802,7 +1801,6 @@ export declare const zAuthAuthMeResponse: z.ZodObject<{
1802
1801
  actorType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1803
1802
  oidc: "oidc";
1804
1803
  api_key: "api_key";
1805
- internal_secret: "internal_secret";
1806
1804
  }>>>;
1807
1805
  apiKey: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1808
1806
  allowed: z.ZodArray<z.ZodString>;
@@ -5937,12 +5935,12 @@ export declare const zProjectEnvironmentsListProjectEnvironmentsResponse: z.ZodO
5937
5935
  id: z.ZodString;
5938
5936
  isDefault: z.ZodBoolean;
5939
5937
  isGatewayFallback: z.ZodBoolean;
5940
- isPointer: z.ZodBoolean;
5938
+ isPointer: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
5941
5939
  isProduction: z.ZodBoolean;
5942
5940
  isSystem: z.ZodBoolean;
5943
5941
  name: z.ZodString;
5944
5942
  projectId: z.ZodString;
5945
- requiresApproval: z.ZodBoolean;
5943
+ requiresApproval: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
5946
5944
  slug: z.ZodString;
5947
5945
  sortOrder: z.ZodInt;
5948
5946
  updatedAt: z.ZodISODateTime;
@@ -5975,10 +5973,8 @@ export declare const zProjectEnvironmentsCreateProjectEnvironmentBody: z.ZodObje
5975
5973
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5976
5974
  isDefault: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
5977
5975
  isGatewayFallback: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
5978
- isPointer: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
5979
5976
  isProduction: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
5980
5977
  name: z.ZodString;
5981
- requiresApproval: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
5982
5978
  slug: z.ZodString;
5983
5979
  sortOrder: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
5984
5980
  }, z.core.$strip>;
@@ -5999,12 +5995,12 @@ export declare const zProjectEnvironmentsCreateProjectEnvironmentResponse: z.Zod
5999
5995
  id: z.ZodString;
6000
5996
  isDefault: z.ZodBoolean;
6001
5997
  isGatewayFallback: z.ZodBoolean;
6002
- isPointer: z.ZodBoolean;
5998
+ isPointer: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
6003
5999
  isProduction: z.ZodBoolean;
6004
6000
  isSystem: z.ZodBoolean;
6005
6001
  name: z.ZodString;
6006
6002
  projectId: z.ZodString;
6007
- requiresApproval: z.ZodBoolean;
6003
+ requiresApproval: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
6008
6004
  slug: z.ZodString;
6009
6005
  sortOrder: z.ZodInt;
6010
6006
  updatedAt: z.ZodISODateTime;
@@ -6088,10 +6084,8 @@ export declare const zProjectEnvironmentsUpdateProjectEnvironmentBody: z.ZodObje
6088
6084
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6089
6085
  isDefault: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
6090
6086
  isGatewayFallback: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
6091
- isPointer: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
6092
6087
  isProduction: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
6093
6088
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6094
- requiresApproval: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
6095
6089
  slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6096
6090
  sortOrder: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
6097
6091
  }, z.core.$strip>;
@@ -6113,12 +6107,12 @@ export declare const zProjectEnvironmentsUpdateProjectEnvironmentResponse: z.Zod
6113
6107
  id: z.ZodString;
6114
6108
  isDefault: z.ZodBoolean;
6115
6109
  isGatewayFallback: z.ZodBoolean;
6116
- isPointer: z.ZodBoolean;
6110
+ isPointer: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
6117
6111
  isProduction: z.ZodBoolean;
6118
6112
  isSystem: z.ZodBoolean;
6119
6113
  name: z.ZodString;
6120
6114
  projectId: z.ZodString;
6121
- requiresApproval: z.ZodBoolean;
6115
+ requiresApproval: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
6122
6116
  slug: z.ZodString;
6123
6117
  sortOrder: z.ZodInt;
6124
6118
  updatedAt: z.ZodISODateTime;
@@ -6164,12 +6158,12 @@ export declare const zProjectEnvironmentsGetProjectEnvironmentResponse: z.ZodObj
6164
6158
  id: z.ZodString;
6165
6159
  isDefault: z.ZodBoolean;
6166
6160
  isGatewayFallback: z.ZodBoolean;
6167
- isPointer: z.ZodBoolean;
6161
+ isPointer: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
6168
6162
  isProduction: z.ZodBoolean;
6169
6163
  isSystem: z.ZodBoolean;
6170
6164
  name: z.ZodString;
6171
6165
  projectId: z.ZodString;
6172
- requiresApproval: z.ZodBoolean;
6166
+ requiresApproval: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
6173
6167
  slug: z.ZodString;
6174
6168
  sortOrder: z.ZodInt;
6175
6169
  updatedAt: z.ZodISODateTime;
@@ -6216,12 +6210,12 @@ export declare const zProjectEnvironmentsArchiveProjectEnvironmentResponse: z.Zo
6216
6210
  id: z.ZodString;
6217
6211
  isDefault: z.ZodBoolean;
6218
6212
  isGatewayFallback: z.ZodBoolean;
6219
- isPointer: z.ZodBoolean;
6213
+ isPointer: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
6220
6214
  isProduction: z.ZodBoolean;
6221
6215
  isSystem: z.ZodBoolean;
6222
6216
  name: z.ZodString;
6223
6217
  projectId: z.ZodString;
6224
- requiresApproval: z.ZodBoolean;
6218
+ requiresApproval: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
6225
6219
  slug: z.ZodString;
6226
6220
  sortOrder: z.ZodInt;
6227
6221
  updatedAt: z.ZodISODateTime;
@@ -6273,12 +6267,12 @@ export declare const zProjectEnvironmentsRestoreProjectEnvironmentResponse: z.Zo
6273
6267
  id: z.ZodString;
6274
6268
  isDefault: z.ZodBoolean;
6275
6269
  isGatewayFallback: z.ZodBoolean;
6276
- isPointer: z.ZodBoolean;
6270
+ isPointer: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
6277
6271
  isProduction: z.ZodBoolean;
6278
6272
  isSystem: z.ZodBoolean;
6279
6273
  name: z.ZodString;
6280
6274
  projectId: z.ZodString;
6281
- requiresApproval: z.ZodBoolean;
6275
+ requiresApproval: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
6282
6276
  slug: z.ZodString;
6283
6277
  sortOrder: z.ZodInt;
6284
6278
  updatedAt: z.ZodISODateTime;
@@ -7931,7 +7925,7 @@ export declare const zPromptsRenderPromptResponse: z.ZodObject<{
7931
7925
  label: z.ZodString;
7932
7926
  modelConfig: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
7933
7927
  promptId: z.ZodString;
7934
- releaseId: z.ZodString;
7928
+ releaseId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7935
7929
  rendered: z.ZodUnion<readonly [z.ZodObject<{
7936
7930
  format: z.ZodEnum<{
7937
7931
  text: "text";
@@ -7996,7 +7990,7 @@ export declare const zPromptsRenderPromptResponse: z.ZodObject<{
7996
7990
  }>;
7997
7991
  label: z.ZodString;
7998
7992
  promptId: z.ZodString;
7999
- releaseId: z.ZodString;
7993
+ releaseId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8000
7994
  releasedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8001
7995
  releasedByDisplayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8002
7996
  version: z.ZodNumber;
@@ -91,10 +91,6 @@ class ProjectEnvironmentResource {
91
91
  body.color = rest.color;
92
92
  if (rest.description !== undefined)
93
93
  body.description = rest.description;
94
- if (rest.isPointer !== undefined)
95
- body.isPointer = rest.isPointer;
96
- if (rest.requiresApproval !== undefined)
97
- body.requiresApproval = rest.requiresApproval;
98
94
  if (rest.isDefault !== undefined)
99
95
  body.isDefault = rest.isDefault;
100
96
  if (rest.isGatewayFallback !== undefined)
@@ -48,10 +48,6 @@ class ProjectEnvironmentResource {
48
48
  body.color = rest.color;
49
49
  if (rest.description !== undefined)
50
50
  body.description = rest.description;
51
- if (rest.isPointer !== undefined)
52
- body.isPointer = rest.isPointer;
53
- if (rest.requiresApproval !== undefined)
54
- body.requiresApproval = rest.requiresApproval;
55
51
  if (rest.isDefault !== undefined)
56
52
  body.isDefault = rest.isDefault;
57
53
  if (rest.isGatewayFallback !== undefined)
@@ -18,8 +18,6 @@ export interface CreateProjectEnvironmentInput {
18
18
  name: string;
19
19
  color?: string | null;
20
20
  description?: string | null;
21
- isPointer?: boolean;
22
- requiresApproval?: boolean;
23
21
  isDefault?: boolean;
24
22
  isGatewayFallback?: boolean;
25
23
  sortOrder?: number;
@@ -32,8 +30,6 @@ export interface UpdateProjectEnvironmentInput {
32
30
  name?: string;
33
31
  color?: string | null;
34
32
  description?: string | null;
35
- isPointer?: boolean;
36
- requiresApproval?: boolean;
37
33
  isDefault?: boolean;
38
34
  isGatewayFallback?: boolean;
39
35
  sortOrder?: number;
@@ -46,7 +46,6 @@ var import_errors = require("../errors");
46
46
  var import_zod = require("../generated/zod.gen");
47
47
  var import_shape = require("./shape");
48
48
  var import_types = require("./types");
49
- var zResolvedPromptEnvelope = import_zod.zResolvedPrompt.partial({ releaseId: true });
50
49
  function unwrap(envelope) {
51
50
  if (envelope.data === null || envelope.data === undefined) {
52
51
  throw new Error("API returned success but data is null");
@@ -237,7 +236,7 @@ class PromptResource {
237
236
  try {
238
237
  const envelope = await this.transport.request("POST", `${getProjectPromptsPath(this.projectId)}/by-slug/${encodeURIComponent(slug)}/labels/${encodeURIComponent(label)}/render`, {
239
238
  body,
240
- decode: (data) => zResolvedPromptEnvelope.parse(data)
239
+ decode: (data) => import_zod.zResolvedPrompt.parse(data)
241
240
  });
242
241
  const raw = unwrap(envelope);
243
242
  return normalizeResolvedEnvelope(raw, slug);
@@ -7,7 +7,6 @@ import {
7
7
  import { zResolvedPrompt } from "../generated/zod.gen";
8
8
  import { shapePrompt } from "./shape";
9
9
  import { ENV_SLUG_REGEX } from "./types";
10
- var zResolvedPromptEnvelope = zResolvedPrompt.partial({ releaseId: true });
11
10
  function unwrap(envelope) {
12
11
  if (envelope.data === null || envelope.data === undefined) {
13
12
  throw new Error("API returned success but data is null");
@@ -198,7 +197,7 @@ class PromptResource {
198
197
  try {
199
198
  const envelope = await this.transport.request("POST", `${getProjectPromptsPath(this.projectId)}/by-slug/${encodeURIComponent(slug)}/labels/${encodeURIComponent(label)}/render`, {
200
199
  body,
201
- decode: (data) => zResolvedPromptEnvelope.parse(data)
200
+ decode: (data) => zResolvedPrompt.parse(data)
202
201
  });
203
202
  const raw = unwrap(envelope);
204
203
  return normalizeResolvedEnvelope(raw, slug);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@to11ai/sdk",
3
- "version": "2.1.0-rc.2",
3
+ "version": "2.1.0-rc.4",
4
4
  "license": "MPL-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -164,7 +164,7 @@ export type OAuthCredential = {
164
164
  };
165
165
 
166
166
  export type PrincipalApiKeyContextInvariant = {
167
- actorType?: 'oidc' | 'api_key' | 'internal_secret' | null;
167
+ actorType?: 'oidc' | 'api_key' | null;
168
168
  apiKey?: {
169
169
  allowed: Array<string>;
170
170
  denied: Array<string>;
@@ -194,12 +194,18 @@ export type ProjectEnvironment = {
194
194
  id: string;
195
195
  isDefault: boolean;
196
196
  isGatewayFallback: boolean;
197
- isPointer: boolean;
197
+ /**
198
+ * @deprecated Always `false`. To be removed.
199
+ */
200
+ isPointer?: boolean | null;
198
201
  isProduction: boolean;
199
202
  isSystem: boolean;
200
203
  name: string;
201
204
  projectId: string;
202
- requiresApproval: boolean;
205
+ /**
206
+ * @deprecated Always `false`. To be removed.
207
+ */
208
+ requiresApproval?: boolean | null;
203
209
  slug: string;
204
210
  sortOrder: number;
205
211
  updatedAt: string;
@@ -300,7 +306,7 @@ export type RenderedSkill = {
300
306
  format: 'skill';
301
307
  label: string;
302
308
  promptId: string;
303
- releaseId: string;
309
+ releaseId?: string | null;
304
310
  releasedAt?: string | null;
305
311
  releasedByDisplayName?: string | null | null;
306
312
  version: number;
@@ -353,7 +359,7 @@ export type ResolvedPrompt = {
353
359
  label: string;
354
360
  modelConfig?: unknown | null;
355
361
  promptId: string;
356
- releaseId: string;
362
+ releaseId?: string | null;
357
363
  rendered: RenderedPrompt;
358
364
  toolChoice?: 'auto' | 'none' | 'required' | {
359
365
  name: string;
@@ -11302,10 +11308,8 @@ export type ProjectEnvironmentsCreateProjectEnvironmentData = {
11302
11308
  description?: string | null | null;
11303
11309
  isDefault?: boolean | null;
11304
11310
  isGatewayFallback?: boolean | null;
11305
- isPointer?: boolean | null;
11306
11311
  isProduction?: boolean | null;
11307
11312
  name: string;
11308
- requiresApproval?: boolean | null;
11309
11313
  slug: string;
11310
11314
  sortOrder?: number | null;
11311
11315
  };
@@ -11528,10 +11532,8 @@ export type ProjectEnvironmentsUpdateProjectEnvironmentData = {
11528
11532
  description?: string | null | null;
11529
11533
  isDefault?: boolean | null;
11530
11534
  isGatewayFallback?: boolean | null;
11531
- isPointer?: boolean | null;
11532
11535
  isProduction?: boolean | null;
11533
11536
  name?: string | null;
11534
- requiresApproval?: boolean | null;
11535
11537
  slug?: string | null;
11536
11538
  sortOrder?: number | null;
11537
11539
  };
@@ -157,11 +157,7 @@ export const zOAuthCredential = z.object({
157
157
  });
158
158
 
159
159
  export const zPrincipalApiKeyContextInvariant = z.object({
160
- actorType: z.enum([
161
- 'oidc',
162
- 'api_key',
163
- 'internal_secret'
164
- ]).nullish(),
160
+ actorType: z.enum(['oidc', 'api_key']).nullish(),
165
161
  apiKey: z.object({
166
162
  allowed: z.array(z.string()),
167
163
  denied: z.array(z.string()),
@@ -191,12 +187,12 @@ export const zProjectEnvironment = z.object({
191
187
  id: z.string(),
192
188
  isDefault: z.boolean(),
193
189
  isGatewayFallback: z.boolean(),
194
- isPointer: z.boolean(),
190
+ isPointer: z.boolean().nullish(),
195
191
  isProduction: z.boolean(),
196
192
  isSystem: z.boolean(),
197
193
  name: z.string().min(1).max(120),
198
194
  projectId: z.string(),
199
- requiresApproval: z.boolean(),
195
+ requiresApproval: z.boolean().nullish(),
200
196
  slug: z.string(),
201
197
  sortOrder: z.int(),
202
198
  updatedAt: z.iso.datetime(),
@@ -309,7 +305,7 @@ export const zRenderedSkill = z.object({
309
305
  format: z.enum(['skill']),
310
306
  label: z.string().min(1).max(64).regex(/^[a-zA-Z0-9_-]+$/),
311
307
  promptId: z.string(),
312
- releaseId: z.string(),
308
+ releaseId: z.string().nullish(),
313
309
  releasedAt: z.string().regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/).nullish(),
314
310
  releasedByDisplayName: z.string().nullish(),
315
311
  version: z.number(),
@@ -391,7 +387,7 @@ export const zResolvedPrompt = z.object({
391
387
  label: z.string().min(1).max(64).regex(/^[a-zA-Z0-9_-]+$/),
392
388
  modelConfig: z.unknown().nullish(),
393
389
  promptId: z.string(),
394
- releaseId: z.string(),
390
+ releaseId: z.string().nullish(),
395
391
  rendered: zRenderedPrompt,
396
392
  toolChoice: z.union([
397
393
  z.enum([
@@ -5648,10 +5644,8 @@ export const zProjectEnvironmentsCreateProjectEnvironmentBody = z.object({
5648
5644
  description: z.string().max(280).nullish(),
5649
5645
  isDefault: z.boolean().nullish(),
5650
5646
  isGatewayFallback: z.boolean().nullish(),
5651
- isPointer: z.boolean().nullish(),
5652
5647
  isProduction: z.boolean().nullish(),
5653
5648
  name: z.string().min(1).max(120),
5654
- requiresApproval: z.boolean().nullish(),
5655
5649
  slug: z.string().min(1).max(63).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
5656
5650
  sortOrder: z.int().nullish()
5657
5651
  });
@@ -5748,10 +5742,8 @@ export const zProjectEnvironmentsUpdateProjectEnvironmentBody = z.object({
5748
5742
  description: z.string().max(280).nullish(),
5749
5743
  isDefault: z.boolean().nullish(),
5750
5744
  isGatewayFallback: z.boolean().nullish(),
5751
- isPointer: z.boolean().nullish(),
5752
5745
  isProduction: z.boolean().nullish(),
5753
5746
  name: z.string().min(1).max(120).nullish(),
5754
- requiresApproval: z.boolean().nullish(),
5755
5747
  slug: z.string().min(1).max(63).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).nullish(),
5756
5748
  sortOrder: z.int().nullish()
5757
5749
  });
@@ -167,9 +167,6 @@ export class ProjectEnvironmentResource {
167
167
  if (rest.name !== undefined) body.name = rest.name;
168
168
  if (rest.color !== undefined) body.color = rest.color;
169
169
  if (rest.description !== undefined) body.description = rest.description;
170
- if (rest.isPointer !== undefined) body.isPointer = rest.isPointer;
171
- if (rest.requiresApproval !== undefined)
172
- body.requiresApproval = rest.requiresApproval;
173
170
  if (rest.isDefault !== undefined) body.isDefault = rest.isDefault;
174
171
  if (rest.isGatewayFallback !== undefined)
175
172
  body.isGatewayFallback = rest.isGatewayFallback;
@@ -31,8 +31,6 @@ export interface CreateProjectEnvironmentInput {
31
31
  name: string;
32
32
  color?: string | null;
33
33
  description?: string | null;
34
- isPointer?: boolean;
35
- requiresApproval?: boolean;
36
34
  isDefault?: boolean;
37
35
  isGatewayFallback?: boolean;
38
36
  sortOrder?: number;
@@ -47,8 +45,6 @@ export interface UpdateProjectEnvironmentInput {
47
45
  name?: string;
48
46
  color?: string | null;
49
47
  description?: string | null;
50
- isPointer?: boolean;
51
- requiresApproval?: boolean;
52
48
  isDefault?: boolean;
53
49
  isGatewayFallback?: boolean;
54
50
  sortOrder?: number;
@@ -118,8 +118,6 @@ export type {
118
118
  UpdatePromptResult,
119
119
  } from "./types";
120
120
 
121
- const zResolvedPromptEnvelope = zResolvedPrompt.partial({ releaseId: true });
122
-
123
121
  function unwrap<T>(envelope: ApiEnvelope<T>): T {
124
122
  if (envelope.data === null || envelope.data === undefined) {
125
123
  throw new Error("API returned success but data is null");
@@ -567,7 +565,7 @@ export class PromptResource<F extends RenderFormat | undefined = undefined> {
567
565
  {
568
566
  body,
569
567
  decode: (data) =>
570
- zResolvedPromptEnvelope.parse(data) as ResolvedPromptEnvelope,
568
+ zResolvedPrompt.parse(data) as ResolvedPromptEnvelope,
571
569
  },
572
570
  );
573
571
  const raw = unwrap(envelope);