@builder.io/ai-utils 0.75.0 → 0.75.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/package.json +1 -1
- package/src/projects.d.ts +21 -2
- package/src/projects.js +18 -4
package/package.json
CHANGED
package/src/projects.d.ts
CHANGED
|
@@ -1347,6 +1347,12 @@ export declare const DeployStatusSchema: z.ZodEnum<{
|
|
|
1347
1347
|
export type DeployStatus = z.infer<typeof DeployStatusSchema>;
|
|
1348
1348
|
/** Deploy statuses that are terminal — never transitioned out of. */
|
|
1349
1349
|
export declare const TERMINAL_DEPLOY_STATUSES: Set<"building" | "canceled" | "deploying" | "failed" | "live" | "queued" | "uploading">;
|
|
1350
|
+
export declare const HostingPublishStatusSchema: z.ZodEnum<{
|
|
1351
|
+
published: "published";
|
|
1352
|
+
publishing: "publishing";
|
|
1353
|
+
unpublished: "unpublished";
|
|
1354
|
+
}>;
|
|
1355
|
+
export type HostingPublishStatus = z.infer<typeof HostingPublishStatusSchema>;
|
|
1350
1356
|
export declare const ProjectHostingBuildConfigSchema: z.ZodObject<{
|
|
1351
1357
|
buildCommand: z.ZodOptional<z.ZodString>;
|
|
1352
1358
|
buildOutputDir: z.ZodOptional<z.ZodString>;
|
|
@@ -1383,6 +1389,11 @@ export declare const ProjectHostingSchema: z.ZodObject<{
|
|
|
1383
1389
|
explanation: z.ZodOptional<z.ZodString>;
|
|
1384
1390
|
}, z.core.$strip>>>;
|
|
1385
1391
|
}, z.core.$strip>>;
|
|
1392
|
+
publishStatus: z.ZodOptional<z.ZodEnum<{
|
|
1393
|
+
published: "published";
|
|
1394
|
+
publishing: "publishing";
|
|
1395
|
+
unpublished: "unpublished";
|
|
1396
|
+
}>>;
|
|
1386
1397
|
lastDeployId: z.ZodOptional<z.ZodString>;
|
|
1387
1398
|
lastDeployAt: z.ZodOptional<z.ZodNumber>;
|
|
1388
1399
|
lastDeployStatus: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1435,8 +1446,8 @@ export type Deploy = z.infer<typeof DeploySchema>;
|
|
|
1435
1446
|
*
|
|
1436
1447
|
* "Is this URL currently live?" is NOT a property of this doc. It's answered by the
|
|
1437
1448
|
* presence of the per-slug `HTTPRoute` in Envoy Gateway (the source of truth for routing)
|
|
1438
|
-
*
|
|
1439
|
-
* slug doc exists purely to enforce uniqueness and own the permanent reservation.
|
|
1449
|
+
* which is proxied by `project.hosting.publishStatus`.
|
|
1450
|
+
* The slug doc exists purely to enforce uniqueness and own the permanent reservation.
|
|
1440
1451
|
*/
|
|
1441
1452
|
export declare const HostingSlugSchema: z.ZodObject<{
|
|
1442
1453
|
projectId: z.ZodString;
|
|
@@ -1562,6 +1573,14 @@ export declare const DeployResponseSchema: z.ZodObject<{
|
|
|
1562
1573
|
}>;
|
|
1563
1574
|
}, z.core.$strip>;
|
|
1564
1575
|
export type DeployResponse = z.infer<typeof DeployResponseSchema>;
|
|
1576
|
+
export declare const DeleteHostingRequestSchema: z.ZodObject<{
|
|
1577
|
+
projectId: z.ZodString;
|
|
1578
|
+
}, z.core.$strip>;
|
|
1579
|
+
export type DeleteHostingRequest = z.infer<typeof DeleteHostingRequestSchema>;
|
|
1580
|
+
export declare const DeleteHostingResponseSchema: z.ZodObject<{
|
|
1581
|
+
success: z.ZodLiteral<true>;
|
|
1582
|
+
}, z.core.$strip>;
|
|
1583
|
+
export type DeleteHostingResponse = z.infer<typeof DeleteHostingResponseSchema>;
|
|
1565
1584
|
export declare const GetDeploysRequestSchema: z.ZodObject<{
|
|
1566
1585
|
projectId: z.ZodString;
|
|
1567
1586
|
deployId: z.ZodOptional<z.ZodString>;
|
package/src/projects.js
CHANGED
|
@@ -206,6 +206,11 @@ export const TERMINAL_DEPLOY_STATUSES = new Set([
|
|
|
206
206
|
"failed",
|
|
207
207
|
"canceled",
|
|
208
208
|
]);
|
|
209
|
+
export const HostingPublishStatusSchema = z.enum([
|
|
210
|
+
"unpublished",
|
|
211
|
+
"publishing",
|
|
212
|
+
"published",
|
|
213
|
+
]);
|
|
209
214
|
export const ProjectHostingBuildConfigSchema = z.object({
|
|
210
215
|
buildCommand: z.string().optional(),
|
|
211
216
|
buildOutputDir: z.string().optional(),
|
|
@@ -222,10 +227,10 @@ export const ProjectHostingSchema = z.object({
|
|
|
222
227
|
description: 'e.g. "my-cool-app" — set once on first publish, immutable',
|
|
223
228
|
}),
|
|
224
229
|
netlifySiteId: z.string().optional().meta({
|
|
225
|
-
description: "Netlify site ID for management API calls
|
|
230
|
+
description: "Netlify site ID for management API calls. Set once on first publish, immutable.",
|
|
226
231
|
}),
|
|
227
232
|
netlifySiteName: z.string().optional().meta({
|
|
228
|
-
description: "<name> in <name>.netlify.app — the upstream the HTTPRoute filter rewrites Host to
|
|
233
|
+
description: "<name> in <name>.netlify.app — the upstream the HTTPRoute filter rewrites Host to. Set once on first publish, immutable.",
|
|
229
234
|
}),
|
|
230
235
|
url: z.string().optional().meta({
|
|
231
236
|
description: '"https://my-cool-app.builder.cloud" — derived from slug',
|
|
@@ -250,6 +255,9 @@ export const ProjectHostingSchema = z.object({
|
|
|
250
255
|
}),
|
|
251
256
|
})
|
|
252
257
|
.optional(),
|
|
258
|
+
publishStatus: HostingPublishStatusSchema.optional().meta({
|
|
259
|
+
description: "Outer publish lifecycle. Absent === unpublished. Denormalized cache of the per-slug HTTPRoute (the source of truth); flipped only after the route op succeeds. Deploy.status is the interior detail of the publishing step.",
|
|
260
|
+
}),
|
|
253
261
|
lastDeployId: z.string().optional(),
|
|
254
262
|
lastDeployAt: z.number().optional(),
|
|
255
263
|
lastDeployStatus: DeployStatusSchema.optional(),
|
|
@@ -304,8 +312,8 @@ export const DeploySchema = z.object({
|
|
|
304
312
|
*
|
|
305
313
|
* "Is this URL currently live?" is NOT a property of this doc. It's answered by the
|
|
306
314
|
* presence of the per-slug `HTTPRoute` in Envoy Gateway (the source of truth for routing)
|
|
307
|
-
*
|
|
308
|
-
* slug doc exists purely to enforce uniqueness and own the permanent reservation.
|
|
315
|
+
* which is proxied by `project.hosting.publishStatus`.
|
|
316
|
+
* The slug doc exists purely to enforce uniqueness and own the permanent reservation.
|
|
309
317
|
*/
|
|
310
318
|
export const HostingSlugSchema = z.object({
|
|
311
319
|
projectId: z.string(),
|
|
@@ -486,6 +494,12 @@ export const DeployResponseSchema = z.object({
|
|
|
486
494
|
deployId: z.string(),
|
|
487
495
|
status: DeployStatusSchema,
|
|
488
496
|
});
|
|
497
|
+
export const DeleteHostingRequestSchema = z.object({
|
|
498
|
+
projectId: z.string(),
|
|
499
|
+
});
|
|
500
|
+
export const DeleteHostingResponseSchema = z.object({
|
|
501
|
+
success: z.literal(true),
|
|
502
|
+
});
|
|
489
503
|
export const GetDeploysRequestSchema = z.object({
|
|
490
504
|
projectId: z.string(),
|
|
491
505
|
deployId: z.string().optional(),
|