terse-types 0.4.0 → 0.4.2
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/ApiRouteBuilder.d.ts +1 -0
- package/dist/ApiRoutes.json +2 -1
- package/dist/types.d.ts +32 -6
- package/dist/types.js +34 -6
- package/package.json +1 -1
package/dist/ApiRoutes.json
CHANGED
|
@@ -198,7 +198,8 @@
|
|
|
198
198
|
"SWITCH_ORGANIZATION": "/sdk/auth/switch-organization",
|
|
199
199
|
"INTEGRATION_FIELDS": "/sdk/integrations/:integrationType/fields",
|
|
200
200
|
"INTEGRATION_FORM_SUBMIT": "/sdk/integrations/:integrationType/form-submit",
|
|
201
|
-
"JOB_WEBHOOK_TRIGGER": "/webhook/terse/trigger"
|
|
201
|
+
"JOB_WEBHOOK_TRIGGER": "/webhook/terse/trigger",
|
|
202
|
+
"DEPLOY_SOURCE_UPLOAD": "/sdk/deploy/source-upload"
|
|
202
203
|
},
|
|
203
204
|
"NOTIFICATION_SETTINGS": "/notification-settings",
|
|
204
205
|
"SENT_NOTIFICATIONS": {
|
package/dist/types.d.ts
CHANGED
|
@@ -13902,16 +13902,26 @@ export declare const doneSchema: z.ZodObject<{
|
|
|
13902
13902
|
type: z.ZodLiteral<"done">;
|
|
13903
13903
|
}, z.core.$strip>;
|
|
13904
13904
|
export declare const sdkDeployStageEnum: z.ZodEnum<{
|
|
13905
|
-
|
|
13906
|
-
|
|
13905
|
+
PACKAGING_PROJECT: "PACKAGING_PROJECT";
|
|
13906
|
+
PREPARING_BUILD: "PREPARING_BUILD";
|
|
13907
|
+
REUSING_CACHED_BUILD: "REUSING_CACHED_BUILD";
|
|
13908
|
+
STARTING_SANDBOX: "STARTING_SANDBOX";
|
|
13909
|
+
UPLOADING_SOURCE: "UPLOADING_SOURCE";
|
|
13910
|
+
BUILDING_PROJECT: "BUILDING_PROJECT";
|
|
13911
|
+
SAVING_IMAGE: "SAVING_IMAGE";
|
|
13907
13912
|
CONFIGURING_AUTOMATIONS: "CONFIGURING_AUTOMATIONS";
|
|
13908
13913
|
}>;
|
|
13909
13914
|
export type SdkDeployStage = z.infer<typeof sdkDeployStageEnum>;
|
|
13910
13915
|
export declare const deployStageSchema: z.ZodObject<{
|
|
13911
13916
|
type: z.ZodLiteral<"deploy_stage">;
|
|
13912
13917
|
stage: z.ZodEnum<{
|
|
13913
|
-
|
|
13914
|
-
|
|
13918
|
+
PACKAGING_PROJECT: "PACKAGING_PROJECT";
|
|
13919
|
+
PREPARING_BUILD: "PREPARING_BUILD";
|
|
13920
|
+
REUSING_CACHED_BUILD: "REUSING_CACHED_BUILD";
|
|
13921
|
+
STARTING_SANDBOX: "STARTING_SANDBOX";
|
|
13922
|
+
UPLOADING_SOURCE: "UPLOADING_SOURCE";
|
|
13923
|
+
BUILDING_PROJECT: "BUILDING_PROJECT";
|
|
13924
|
+
SAVING_IMAGE: "SAVING_IMAGE";
|
|
13915
13925
|
CONFIGURING_AUTOMATIONS: "CONFIGURING_AUTOMATIONS";
|
|
13916
13926
|
}>;
|
|
13917
13927
|
}, z.core.$strip>;
|
|
@@ -13971,8 +13981,13 @@ export declare const sdkAgentStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
13971
13981
|
}, z.core.$strip>, z.ZodObject<{
|
|
13972
13982
|
type: z.ZodLiteral<"deploy_stage">;
|
|
13973
13983
|
stage: z.ZodEnum<{
|
|
13974
|
-
|
|
13975
|
-
|
|
13984
|
+
PACKAGING_PROJECT: "PACKAGING_PROJECT";
|
|
13985
|
+
PREPARING_BUILD: "PREPARING_BUILD";
|
|
13986
|
+
REUSING_CACHED_BUILD: "REUSING_CACHED_BUILD";
|
|
13987
|
+
STARTING_SANDBOX: "STARTING_SANDBOX";
|
|
13988
|
+
UPLOADING_SOURCE: "UPLOADING_SOURCE";
|
|
13989
|
+
BUILDING_PROJECT: "BUILDING_PROJECT";
|
|
13990
|
+
SAVING_IMAGE: "SAVING_IMAGE";
|
|
13976
13991
|
CONFIGURING_AUTOMATIONS: "CONFIGURING_AUTOMATIONS";
|
|
13977
13992
|
}>;
|
|
13978
13993
|
}, z.core.$strip>], "type">;
|
|
@@ -15353,8 +15368,19 @@ export declare const sdkDeployRequestBodySchema: z.ZodObject<{
|
|
|
15353
15368
|
}, z.core.$strip>>;
|
|
15354
15369
|
remoteServerUrl: z.ZodOptional<z.ZodString>;
|
|
15355
15370
|
sourceZipBase64: z.ZodOptional<z.ZodString>;
|
|
15371
|
+
sourceObjectKey: z.ZodOptional<z.ZodString>;
|
|
15372
|
+
requiresWorkflowBundle: z.ZodOptional<z.ZodBoolean>;
|
|
15356
15373
|
}, z.core.$strip>;
|
|
15357
15374
|
export type SdkDeployRequestBody = z.infer<typeof sdkDeployRequestBodySchema>;
|
|
15375
|
+
/** Absent `upload` means the control plane has no object storage, so the CLI inlines the archive. */
|
|
15376
|
+
export declare const sdkSourceUploadResponseSchema: z.ZodObject<{
|
|
15377
|
+
upload: z.ZodOptional<z.ZodObject<{
|
|
15378
|
+
objectKey: z.ZodString;
|
|
15379
|
+
uploadUrl: z.ZodString;
|
|
15380
|
+
contentType: z.ZodString;
|
|
15381
|
+
}, z.core.$strip>>;
|
|
15382
|
+
}, z.core.$strip>;
|
|
15383
|
+
export type SdkSourceUploadResponse = z.infer<typeof sdkSourceUploadResponseSchema>;
|
|
15358
15384
|
export declare const sdkDeployResultSchema: z.ZodObject<{
|
|
15359
15385
|
jobName: z.ZodString;
|
|
15360
15386
|
automationId: z.ZodString;
|
package/dist/types.js
CHANGED
|
@@ -490,7 +490,17 @@ export const toolApprovalRequestedSchema = z.object({
|
|
|
490
490
|
export const actionSchema = z.object({ type: z.literal("action"), action: runHistoryActionBaseSchema });
|
|
491
491
|
export const errorSchema = z.object({ type: z.literal("error"), message: z.string() });
|
|
492
492
|
export const doneSchema = z.object({ type: z.literal("done") });
|
|
493
|
-
export const sdkDeployStageEnum = z.enum([
|
|
493
|
+
export const sdkDeployStageEnum = z.enum([
|
|
494
|
+
// Client-side stages: the CLI reports these itself, the control plane never sends them.
|
|
495
|
+
"PACKAGING_PROJECT",
|
|
496
|
+
"PREPARING_BUILD",
|
|
497
|
+
"REUSING_CACHED_BUILD",
|
|
498
|
+
"STARTING_SANDBOX",
|
|
499
|
+
"UPLOADING_SOURCE",
|
|
500
|
+
"BUILDING_PROJECT",
|
|
501
|
+
"SAVING_IMAGE",
|
|
502
|
+
"CONFIGURING_AUTOMATIONS"
|
|
503
|
+
]);
|
|
494
504
|
export const deployStageSchema = z.object({ type: z.literal("deploy_stage"), stage: sdkDeployStageEnum });
|
|
495
505
|
export const sdkAgentStreamEventSchema = z.discriminatedUnion("type", [
|
|
496
506
|
runStartedSchema,
|
|
@@ -664,16 +674,34 @@ export const sdkDeployRequestBodySchema = z
|
|
|
664
674
|
cliVersion: z.string(),
|
|
665
675
|
jobs: z.array(sdkDeployJobSchema),
|
|
666
676
|
remoteServerUrl: z.string().optional(),
|
|
667
|
-
sourceZipBase64: z.string().optional()
|
|
677
|
+
sourceZipBase64: z.string().optional(),
|
|
678
|
+
/** Key of an archive already uploaded to object storage. Preferred over sourceZipBase64. */
|
|
679
|
+
sourceObjectKey: z.string().optional(),
|
|
680
|
+
/** False when no job needs the durable workflow bundle, letting the build skip compiling one. */
|
|
681
|
+
requiresWorkflowBundle: z.boolean().optional()
|
|
668
682
|
})
|
|
669
|
-
.refine(data => !(data.remoteServerUrl && data.sourceZipBase64), {
|
|
670
|
-
message: "remoteServerUrl and
|
|
683
|
+
.refine(data => !(data.remoteServerUrl && (data.sourceZipBase64 || data.sourceObjectKey)), {
|
|
684
|
+
message: "remoteServerUrl and a source archive cannot be provided together",
|
|
671
685
|
path: ["remoteServerUrl"]
|
|
672
686
|
})
|
|
673
|
-
.refine(data => data.
|
|
674
|
-
message: "
|
|
687
|
+
.refine(data => !(data.sourceZipBase64 && data.sourceObjectKey), {
|
|
688
|
+
message: "sourceZipBase64 and sourceObjectKey cannot be provided together",
|
|
689
|
+
path: ["sourceObjectKey"]
|
|
690
|
+
})
|
|
691
|
+
.refine(data => data.remoteServerUrl != null || data.sourceZipBase64 != null || data.sourceObjectKey != null, {
|
|
692
|
+
message: "Either remoteServerUrl or a source archive is required",
|
|
675
693
|
path: ["sourceZipBase64"]
|
|
676
694
|
});
|
|
695
|
+
/** Absent `upload` means the control plane has no object storage, so the CLI inlines the archive. */
|
|
696
|
+
export const sdkSourceUploadResponseSchema = z.object({
|
|
697
|
+
upload: z
|
|
698
|
+
.object({
|
|
699
|
+
objectKey: z.string(),
|
|
700
|
+
uploadUrl: z.string(),
|
|
701
|
+
contentType: z.string()
|
|
702
|
+
})
|
|
703
|
+
.optional()
|
|
704
|
+
});
|
|
677
705
|
export const sdkDeployResultSchema = z.object({
|
|
678
706
|
jobName: z.string(),
|
|
679
707
|
automationId: z.string(),
|