terse-types 0.8.3 → 0.9.0

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/types.d.ts CHANGED
@@ -14874,6 +14874,19 @@ export declare const sdkDeployJobSchema: z.ZodObject<{
14874
14874
  }, z.core.$strip>]>>;
14875
14875
  }, z.core.$strip>;
14876
14876
  export type SdkDeployJob = z.infer<typeof sdkDeployJobSchema>;
14877
+ export declare const sdkActorSourceSchema: z.ZodObject<{
14878
+ sha256: z.ZodString;
14879
+ entrypoint: z.ZodString;
14880
+ }, z.core.$strip>;
14881
+ export type SdkActorSource = z.infer<typeof sdkActorSourceSchema>;
14882
+ export declare const sdkSourceUploadRequestSchema: z.ZodObject<{
14883
+ projectId: z.ZodString;
14884
+ actorSource: z.ZodObject<{
14885
+ sha256: z.ZodString;
14886
+ entrypoint: z.ZodString;
14887
+ }, z.core.$strip>;
14888
+ actorOnly: z.ZodBoolean;
14889
+ }, z.core.$strip>;
14877
14890
  export declare const sdkDeployRequestBodySchema: z.ZodObject<{
14878
14891
  projectId: z.ZodString;
14879
14892
  cliVersion: z.ZodString;
@@ -15469,6 +15482,10 @@ export declare const sdkDeployRequestBodySchema: z.ZodObject<{
15469
15482
  }, z.core.$strip>>;
15470
15483
  actorTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
15471
15484
  actorContract: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
15485
+ actorSource: z.ZodOptional<z.ZodObject<{
15486
+ sha256: z.ZodString;
15487
+ entrypoint: z.ZodString;
15488
+ }, z.core.$strip>>;
15472
15489
  remoteServerUrl: z.ZodOptional<z.ZodString>;
15473
15490
  sourceZipBase64: z.ZodOptional<z.ZodString>;
15474
15491
  sourceObjectKey: z.ZodOptional<z.ZodString>;
@@ -15477,6 +15494,7 @@ export declare const sdkDeployRequestBodySchema: z.ZodObject<{
15477
15494
  export type SdkDeployRequestBody = z.infer<typeof sdkDeployRequestBodySchema>;
15478
15495
  /** Absent `upload` means the control plane has no object storage, so the CLI inlines the archive. */
15479
15496
  export declare const sdkSourceUploadResponseSchema: z.ZodObject<{
15497
+ cached: z.ZodOptional<z.ZodBoolean>;
15480
15498
  upload: z.ZodOptional<z.ZodObject<{
15481
15499
  objectKey: z.ZodString;
15482
15500
  uploadUrl: z.ZodString;
package/dist/types.js CHANGED
@@ -695,6 +695,15 @@ export const sdkDeployJobSchema = z.object({
695
695
  jobName: z.string(),
696
696
  triggers: z.array(triggerConfigDataSchema)
697
697
  });
698
+ export const sdkActorSourceSchema = z.object({
699
+ sha256: z.string().regex(/^[a-f0-9]{64}$/),
700
+ entrypoint: z.string().regex(/^(src\/actors?\.ts|(?:src\/)?actors?\.py)$/)
701
+ });
702
+ export const sdkSourceUploadRequestSchema = z.object({
703
+ projectId: z.string().min(1),
704
+ actorSource: sdkActorSourceSchema,
705
+ actorOnly: z.boolean()
706
+ });
698
707
  export const sdkDeployRequestBodySchema = z
699
708
  .object({
700
709
  projectId: z.string(),
@@ -703,6 +712,7 @@ export const sdkDeployRequestBodySchema = z
703
712
  actorTypes: z.array(z.string().min(1)).optional(),
704
713
  /** Public actor API compiled by durable-actors; validated by the control plane on registration. */
705
714
  actorContract: z.record(z.string(), z.json()).optional(),
715
+ actorSource: sdkActorSourceSchema.optional(),
706
716
  remoteServerUrl: z.string().optional(),
707
717
  sourceZipBase64: z.string().optional(),
708
718
  /** Key of an archive already uploaded to object storage. Preferred over sourceZipBase64. */
@@ -710,7 +720,7 @@ export const sdkDeployRequestBodySchema = z
710
720
  /** Legacy compatibility flag. Current CLIs always send false because durable jobs load transformed source directly. */
711
721
  requiresWorkflowBundle: z.boolean().optional()
712
722
  })
713
- .refine(data => !(data.remoteServerUrl && (data.sourceZipBase64 || data.sourceObjectKey)), {
723
+ .refine(data => !(data.remoteServerUrl && (data.sourceZipBase64 || data.sourceObjectKey || data.actorSource)), {
714
724
  message: "remoteServerUrl and a source archive cannot be provided together",
715
725
  path: ["remoteServerUrl"]
716
726
  })
@@ -718,12 +728,20 @@ export const sdkDeployRequestBodySchema = z
718
728
  message: "sourceZipBase64 and sourceObjectKey cannot be provided together",
719
729
  path: ["sourceObjectKey"]
720
730
  })
721
- .refine(data => data.remoteServerUrl != null || data.sourceZipBase64 != null || data.sourceObjectKey != null, {
731
+ .refine(data => !data.actorTypes?.length || !!data.remoteServerUrl || (!!data.actorSource && !data.sourceZipBase64), {
732
+ message: "Hosted actors require actorSource and a direct source upload or a cached build",
733
+ path: ["actorSource"]
734
+ })
735
+ .refine(data => data.remoteServerUrl != null ||
736
+ data.sourceZipBase64 != null ||
737
+ data.sourceObjectKey != null ||
738
+ (data.actorSource != null && !!data.actorTypes?.length && !data.jobs.length && !data.requiresWorkflowBundle), {
722
739
  message: "Either remoteServerUrl or a source archive is required",
723
740
  path: ["sourceZipBase64"]
724
741
  });
725
742
  /** Absent `upload` means the control plane has no object storage, so the CLI inlines the archive. */
726
743
  export const sdkSourceUploadResponseSchema = z.object({
744
+ cached: z.boolean().optional(),
727
745
  upload: z
728
746
  .object({
729
747
  objectKey: z.string(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "terse-types",
3
- "version": "0.8.3",
3
+ "version": "0.9.0",
4
4
  "type": "module",
5
5
  "description": "Shared Terse TypeScript types, enums, constants, and helpers.",
6
6
  "main": "./dist/index.js",