@astrale-domains/services 0.2.1 → 0.2.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.
Files changed (55) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/README.md +12 -7
  3. package/dist/schema/deployment/deployment-rejection.d.ts +11 -0
  4. package/dist/schema/deployment/deployment-rejection.js +6 -0
  5. package/dist/schema/deployment/index.d.ts +3 -1
  6. package/dist/schema/deployment/index.js +2 -1
  7. package/dist/schema/deployment/request.d.ts +3 -45
  8. package/dist/schema/deployment/request.js +11 -4
  9. package/dist/schema/deployment/result.d.ts +51 -2
  10. package/dist/schema/deployment/result.js +13 -3
  11. package/dist/schema/index.d.ts +4 -4
  12. package/dist/schema/index.js +3 -3
  13. package/dist/schema/schema.d.ts +7035 -0
  14. package/dist/schema/schema.js +19 -0
  15. package/dist/schema/service/cloudflare-worker-class.d.ts +6759 -0
  16. package/dist/schema/service/cloudflare-worker-class.js +18 -0
  17. package/dist/schema/service/hosted-by-service-edge-class.d.ts +19 -0
  18. package/dist/schema/service/hosted-by-service-edge-class.js +14 -0
  19. package/dist/schema/service/index.d.ts +7 -4
  20. package/dist/schema/service/index.js +7 -4
  21. package/dist/schema/service/methods/delete-secret.d.ts +11 -0
  22. package/dist/schema/service/methods/delete-secret.js +10 -0
  23. package/dist/schema/service/methods/delete-service.d.ts +9 -0
  24. package/dist/schema/service/methods/delete-service.js +14 -0
  25. package/dist/schema/service/methods/deploy-cloudflare-worker.d.ts +82 -0
  26. package/dist/schema/service/methods/deploy-cloudflare-worker.js +9 -0
  27. package/dist/schema/service/methods/index.d.ts +8 -0
  28. package/dist/schema/service/methods/index.js +8 -0
  29. package/dist/schema/service/methods/list-service-logs.d.ts +12 -0
  30. package/dist/schema/service/methods/list-service-logs.js +11 -0
  31. package/dist/schema/service/methods/list-service-schedules.d.ts +4 -0
  32. package/dist/schema/service/methods/list-service-schedules.js +8 -0
  33. package/dist/schema/service/methods/list-service-secret-names.d.ts +4 -0
  34. package/dist/schema/service/methods/list-service-secret-names.js +9 -0
  35. package/dist/schema/service/methods/replace-service-schedules.d.ts +11 -0
  36. package/dist/schema/service/methods/replace-service-schedules.js +14 -0
  37. package/dist/schema/service/methods/secret-name.js +2 -0
  38. package/dist/schema/service/methods/secret-operation-rejection.js +5 -0
  39. package/dist/schema/service/methods/set-service-secret.d.ts +12 -0
  40. package/dist/schema/service/methods/set-service-secret.js +16 -0
  41. package/dist/schema/service/policies.d.ts +3 -0
  42. package/dist/schema/service/policies.js +12 -1
  43. package/dist/schema/service/{class.d.ts → service-class.d.ts} +48 -175
  44. package/dist/schema/service/service-class.js +40 -0
  45. package/dist/schema/service/service-hosts-domain-edge-class.d.ts +16 -0
  46. package/dist/schema/service/service-hosts-domain-edge-class.js +9 -0
  47. package/dist/schema/service/{relationships.js → service-owned-by-edge-class.js} +2 -2
  48. package/package.json +13 -8
  49. package/dist/schema/application/functions.js +0 -20
  50. package/dist/schema/application/index.d.ts +0 -391
  51. package/dist/schema/application/index.js +0 -10
  52. package/dist/schema/service/class.js +0 -22
  53. package/dist/schema/service/methods.d.ts +0 -135
  54. package/dist/schema/service/methods.js +0 -64
  55. /package/dist/schema/service/{relationships.d.ts → service-owned-by-edge-class.d.ts} +0 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,83 @@
1
+ # Changelog
2
+
3
+ ## [0.2.2](https://github.com/astrale-os/domains/compare/services-v0.2.1...services-v0.2.2) (2026-08-27)
4
+
5
+
6
+ ### Features
7
+
8
+ * make Domain lifecycles authoritative ([#101](https://github.com/astrale-os/domains/issues/101)) ([4ed45f6](https://github.com/astrale-os/domains/commit/4ed45f6c3f5708db52455904c28a2c13c983e33f))
9
+ * **services:** rebuild the hosted service control plane ([#99](https://github.com/astrale-os/domains/issues/99)) ([3460573](https://github.com/astrale-os/domains/commit/34605735a167cb62996850915fa79bf6caec910d))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * **integrations:** align provider authorization lifecycles ([#89](https://github.com/astrale-os/domains/issues/89)) ([734b396](https://github.com/astrale-os/domains/commit/734b396f80e6befa642e03aba8b0e311a4b63ade))
15
+ * **services:** converge terminal provider cleanup ([#100](https://github.com/astrale-os/domains/issues/100)) ([67304f8](https://github.com/astrale-os/domains/commit/67304f893b9625367aa5ec5131fe3c13e1613780))
16
+
17
+ ## [0.2.1](https://github.com/astrale-os/domains/compare/services-v0.2.0...services-v0.2.1) (2026-08-26)
18
+
19
+
20
+ ### Features
21
+
22
+ * **domains:** complete AI Gateway and Integrations parity qualification ([#87](https://github.com/astrale-os/domains/issues/87)) ([5be7461](https://github.com/astrale-os/domains/commit/5be74610469c4a20b108d73c38d0d2b6a298eef6))
23
+ * **domains:** restore AI Gateway and Integrations parity ([#80](https://github.com/astrale-os/domains/issues/80)) ([51ca802](https://github.com/astrale-os/domains/commit/51ca8027109bdc3fd3a05e861e6ed58bea8fe755))
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * align domains with current SDK cohort ([#85](https://github.com/astrale-os/domains/issues/85)) ([f2153e2](https://github.com/astrale-os/domains/commit/f2153e271e1389692ee9f98a14207c5e4340a743))
29
+ * **deps:** qualify GRC and domain dependencies ([#84](https://github.com/astrale-os/domains/issues/84)) ([e8a4c6b](https://github.com/astrale-os/domains/commit/e8a4c6b80e8e8f02a385e0001aa0f220acef5ce6))
30
+
31
+ ## [0.2.0](https://github.com/astrale-os/domains/compare/services-v0.1.0...services-v0.2.0) (2026-08-25)
32
+
33
+
34
+ ### ⚠ BREAKING CHANGES
35
+
36
+ * doors-only graph reads across workspace/agents/services/ai-gateway
37
+ * **services:** the Service interface method `remove` is now `delete`; callers invoking `<service>::remove` must switch to `<service>::delete`.
38
+
39
+ * doors-only graph reads across workspace/agents/services/ai-gateway ([d1b3f0a](https://github.com/astrale-os/domains/commit/d1b3f0af1059ab9dc8f4e10c3eaf0bd129c79876))
40
+ * **services:** rename Service.remove endpoint to delete ([3bcdb44](https://github.com/astrale-os/domains/commit/3bcdb440137acc0d4625f7d9ea5023c45b899c41))
41
+
42
+
43
+ ### Features
44
+
45
+ * add runtime logs, schedule, and secrets management ([265be00](https://github.com/astrale-os/domains/commit/265be00eb198c95f65308e12a61fdde4a2703848))
46
+ * **events:** add Events V0 and async issue notifications ([9538769](https://github.com/astrale-os/domains/commit/9538769b0e3ff4063583b3798b1e2301098a5e0c))
47
+ * implement batch edge creation and reconcile node structures ([8797cfb](https://github.com/astrale-os/domains/commit/8797cfb22a671e264f400edcf4e93384b4e32c7a))
48
+ * implement batch edge creation and reconcile node structures ([828c1fe](https://github.com/astrale-os/domains/commit/828c1fe1e3dda848b5bec9d9b445586ba65a2bd1))
49
+ * overhaul domain apps and runtime flows ([cb92e06](https://github.com/astrale-os/domains/commit/cb92e0601d329a601c4eb072d4c80b0eff6816e7))
50
+ * overhaul services and domain applications ([b8bc24d](https://github.com/astrale-os/domains/commit/b8bc24dbce4c4541ccf1f453b5f3cd335ff1aca4))
51
+ * publish Schema-only Domain contracts ([ec0a16a](https://github.com/astrale-os/domains/commit/ec0a16a46a08a3a2118ca1490a4f7e71239d62eb))
52
+ * publish Schema-only Domain contracts ([70aab15](https://github.com/astrale-os/domains/commit/70aab152f4eea0c69fed1a35cd4611d8d2f99ff9))
53
+ * **services:** reconcile hosted functions on deploy ([eb48173](https://github.com/astrale-os/domains/commit/eb48173664f40b2d923c9ed2736acf7c6847dc13))
54
+ * **services:** support immutable revisioned deployments ([3aac62f](https://github.com/astrale-os/domains/commit/3aac62f044543c4278eb3c880595e2a15b02528c))
55
+ * **services:** support immutable revisioned deployments ([6d20f53](https://github.com/astrale-os/domains/commit/6d20f5327eaf2c1e215efd7d040aebc367609d0a))
56
+ * **skills:** add domain skill packages ([#28](https://github.com/astrale-os/domains/issues/28)) ([6c0b949](https://github.com/astrale-os/domains/commit/6c0b949f1e5821d9f53745fb02eca3453ffb7f80))
57
+ * tag service deploys with provenance ([0a740b8](https://github.com/astrale-os/domains/commit/0a740b8d58f54c289c4bf1b8aebde1b621bbe91d))
58
+
59
+
60
+ ### Bug Fixes
61
+
62
+ * **ci:** keep standalone packaging permissive ([9151cf9](https://github.com/astrale-os/domains/commit/9151cf99311dd070068734c373a1b7ec7e1027a0))
63
+ * **ci:** make domain workspace standalone ([ff42931](https://github.com/astrale-os/domains/commit/ff429317dfd8dd4b0af2ffe8160867c9ba410099))
64
+ * **ci:** simplify Domain publication ([097befc](https://github.com/astrale-os/domains/commit/097befc1217352ce4e3ce91c01d797aba8fd78a2))
65
+ * **ci:** simplify Domain publication ([1b99dd9](https://github.com/astrale-os/domains/commit/1b99dd9781337e13e63c5b1838d96d4fd0dfa3bc))
66
+ * **domains:** pin legacy package cohorts ([12043e2](https://github.com/astrale-os/domains/commit/12043e2fab4e96099aa487ec91acd5e7b33dea12))
67
+ * **domains:** use the compatible legacy cohort ([f6d42fa](https://github.com/astrale-os/domains/commit/f6d42fa60a08305fe8e1e6e046b80f37a73b190b))
68
+ * **frontend:** pin compatible shell cohort [skip ci] ([c64bc4b](https://github.com/astrale-os/domains/commit/c64bc4b46a0ee0ec118d0add7e15bd494c1ff1f7))
69
+ * **frontend:** restore project source discovery ([#72](https://github.com/astrale-os/domains/issues/72)) ([7795508](https://github.com/astrale-os/domains/commit/77955086688833289b474c64314a6adae598be9f))
70
+ * isolate legacy domain test dependencies ([8f8f1ab](https://github.com/astrale-os/domains/commit/8f8f1abbeb5ef8a071cf036d4b8c433d2aaea741))
71
+ * isolate legacy test dependencies ([4599f59](https://github.com/astrale-os/domains/commit/4599f59e6b1d896e1a2bdbd70726e24c660cabc4))
72
+ * keep Domain command cleanup narrow ([90f0b6c](https://github.com/astrale-os/domains/commit/90f0b6c68cdc43068e63f62bfc17ff610a79bb58))
73
+ * **lint:** use PROP key accessors in tests + allowlist decoupled client bundles ([39c1c97](https://github.com/astrale-os/domains/commit/39c1c97971114208b454874b48e3b14e60d5acc7))
74
+ * point-read get returns the node, not an envelope ([17d62c4](https://github.com/astrale-os/domains/commit/17d62c4ec32e066b8c0e5da1e66f9225c469bce8))
75
+ * require hosted-functions SDK release ([e4d3122](https://github.com/astrale-os/domains/commit/e4d312268798a1ab803b815ebaff234aae24500a))
76
+ * **services:** admit empty Cloudflare script details ([cae00d9](https://github.com/astrale-os/domains/commit/cae00d9bfcef567756548678ced00022f65306e5))
77
+ * **services:** consume canonical domain publication ([bfef80f](https://github.com/astrale-os/domains/commit/bfef80f9c84c95ca594bc5f116cf8d1345582428))
78
+ * **services:** declare static frontend identity ([#76](https://github.com/astrale-os/domains/issues/76)) ([527a3ba](https://github.com/astrale-os/domains/commit/527a3bae47c00abd79fe00fc6e5246b4341bf4f7))
79
+ * **services:** seed function authority ([221d9bf](https://github.com/astrale-os/domains/commit/221d9bf48beedcea3aa6a5ff5d87541e6746ee56))
80
+ * **services:** seed function authority ([a33e06e](https://github.com/astrale-os/domains/commit/a33e06e3d6f4c52c591feafa0fcfd8440f52d5d3))
81
+ * **services:** type asset hash mapping ([f2d48dd](https://github.com/astrale-os/domains/commit/f2d48dd6487b7ce433f62388a82b3543bab2bfdd))
82
+ * **views:** adopt proof-bounded Shell cohort ([#74](https://github.com/astrale-os/domains/issues/74)) ([09fb9f3](https://github.com/astrale-os/domains/commit/09fb9f39e5350cf930ff083090b6a6f21369dc49))
83
+ * **views:** retain graph query provenance ([#75](https://github.com/astrale-os/domains/issues/75)) ([c880a42](https://github.com/astrale-os/domains/commit/c880a42f78f15e24ebfe54ae4eb76388d8872a80))
package/README.md CHANGED
@@ -6,18 +6,18 @@ deployment evidence in the graph.
6
6
 
7
7
  ## Model
8
8
 
9
- - `Service` records one opaque provider name, its public coordinate, deployment mode, URL, state,
10
- and deployment digest.
9
+ - `Service` records one opaque provider name, its owner-scoped stable `serviceKey`, deployment mode,
10
+ URL, state,
11
+ deployment receipt and—when revisioned—Schema revision independently of provider-local code staging.
11
12
  - `service_owned_by` connects the authenticated owner to each Service and governs graph visibility.
12
13
  - secret values stay write-only at Cloudflare and never enter Astrale mutations or graph state.
13
14
  - schedules remain provider state; only the owner may read or replace them.
14
15
  - logs are remote evidence admitted by the Cloudflare Provider before a Workflow returns them.
15
16
 
16
- The View reads `visibleServicesQuery` directly. `listServices` remains a caller-facing Function for
17
- CLI and agent consumers, not a frontend wrapper around the Query. Deployment, secrets, schedules,
18
- logs, and deletion are
19
- Workflows because they coordinate caller authorization with external effects. `service-hosting` is
20
- the provider-neutral Integration contract; Cloudflare is its first Provider.
17
+ The View, CLI, and agent consumers read the named Service Queries directly; there is intentionally
18
+ no list Function wrapping `visibleServicesQuery`. Deployment, secrets, schedules, logs, and deletion
19
+ are Workflows because they coordinate caller authorization with external effects. `service-hosting`
20
+ is the provider-neutral Integration contract; Cloudflare is its first Provider.
21
21
 
22
22
  ## Development
23
23
 
@@ -37,3 +37,8 @@ string or bounded Base64 chunks when one string cannot cross the portable Value
37
37
  unique and secrets use environment-variable identifiers. Plain and revisioned artifacts are
38
38
  distinct modes and cannot replace each other at one Service record. Five-field cron expressions are
39
39
  supported when `CLOUDFLARE_SCHEDULE_KV_ID` is configured.
40
+
41
+ SDK-authored Applications should deploy through `@astrale-os/adapter-astrale`, which projects the
42
+ admitted Cloudflare artifact into the revisioned Services request. Execution release identifies
43
+ immutable code/configuration and can change without a Schema revision; Publication generation then
44
+ selects the exact Kernel installation. Manual callers must not manufacture or reuse these identities.
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ export declare const deploymentRejection: z.ZodObject<{
3
+ kind: z.ZodLiteral<"rejected">;
4
+ reason: z.ZodEnum<{
5
+ "artifact-mode-conflict": "artifact-mode-conflict";
6
+ "invalid-deployment": "invalid-deployment";
7
+ "service-unavailable": "service-unavailable";
8
+ }>;
9
+ message: z.ZodString;
10
+ }, z.core.$strict>;
11
+ export type DeploymentRejection = z.infer<typeof deploymentRejection>;
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ export const deploymentRejection = z.strictObject({
3
+ kind: z.literal('rejected'),
4
+ reason: z.enum(['invalid-deployment', 'service-unavailable', 'artifact-mode-conflict']),
5
+ message: z.string().min(1).max(500),
6
+ });
@@ -3,9 +3,11 @@ export type { AssetBundle } from './asset.js';
3
3
  export { MAX_ASSET_BASE64_SIZE, MAX_MODULE_BASE64_SIZE, PORTABLE_BASE64_CHUNK_SIZE, } from './content.js';
4
4
  export { resourceLimits } from './limits.js';
5
5
  export type { ResourceLimits } from './limits.js';
6
+ export { deploymentRejection } from './deployment-rejection.js';
7
+ export type { DeploymentRejection } from './deployment-rejection.js';
6
8
  export { artifactModule } from './module.js';
7
9
  export type { ArtifactModule } from './module.js';
8
10
  export { artifact, deployServiceInput, revisionedDeployment } from './request.js';
9
11
  export type { DeployServiceInput } from './request.js';
10
- export { deployedFunction, deployServiceOutput } from './result.js';
12
+ export { deployedFunction, deployedService, deployServiceOutput, hostedDomain } from './result.js';
11
13
  export type { DeployServiceOutput } from './result.js';
@@ -1,6 +1,7 @@
1
1
  export { assetBundle, assetFile } from './asset.js';
2
2
  export { MAX_ASSET_BASE64_SIZE, MAX_MODULE_BASE64_SIZE, PORTABLE_BASE64_CHUNK_SIZE, } from './content.js';
3
3
  export { resourceLimits } from './limits.js';
4
+ export { deploymentRejection } from './deployment-rejection.js';
4
5
  export { artifactModule } from './module.js';
5
6
  export { artifact, deployServiceInput, revisionedDeployment } from './request.js';
6
- export { deployedFunction, deployServiceOutput } from './result.js';
7
+ export { deployedFunction, deployedService, deployServiceOutput, hostedDomain } from './result.js';
@@ -23,6 +23,7 @@ export declare const artifact: z.ZodObject<{
23
23
  }, z.core.$strict>;
24
24
  export declare const revisionedDeployment: z.ZodObject<{
25
25
  revision: z.ZodString;
26
+ requiredSecrets: z.ZodArray<z.ZodString>;
26
27
  release: z.ZodObject<{
27
28
  entry: z.ZodString;
28
29
  modules: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
@@ -45,31 +46,8 @@ export declare const revisionedDeployment: z.ZodObject<{
45
46
  }>>;
46
47
  }, z.core.$strict>]>>;
47
48
  }, z.core.$strict>;
48
- gateway: z.ZodObject<{
49
- entry: z.ZodString;
50
- modules: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
51
- contentBase64: z.ZodString;
52
- name: z.ZodString;
53
- kind: z.ZodOptional<z.ZodEnum<{
54
- data: "data";
55
- esm: "esm";
56
- text: "text";
57
- wasm: "wasm";
58
- }>>;
59
- }, z.core.$strict>, z.ZodObject<{
60
- contentBase64Chunks: z.ZodArray<z.ZodString>;
61
- name: z.ZodString;
62
- kind: z.ZodOptional<z.ZodEnum<{
63
- data: "data";
64
- esm: "esm";
65
- text: "text";
66
- wasm: "wasm";
67
- }>>;
68
- }, z.core.$strict>]>>;
69
- }, z.core.$strict>;
70
49
  }, z.core.$strict>;
71
50
  export declare const deployServiceInput: z.ZodObject<{
72
- path: z.ZodString;
73
51
  name: z.ZodOptional<z.ZodString>;
74
52
  entry: z.ZodOptional<z.ZodString>;
75
53
  modules: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
@@ -93,6 +71,7 @@ export declare const deployServiceInput: z.ZodObject<{
93
71
  }, z.core.$strict>]>>>;
94
72
  revisioned: z.ZodOptional<z.ZodObject<{
95
73
  revision: z.ZodString;
74
+ requiredSecrets: z.ZodArray<z.ZodString>;
96
75
  release: z.ZodObject<{
97
76
  entry: z.ZodString;
98
77
  modules: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
@@ -115,28 +94,6 @@ export declare const deployServiceInput: z.ZodObject<{
115
94
  }>>;
116
95
  }, z.core.$strict>]>>;
117
96
  }, z.core.$strict>;
118
- gateway: z.ZodObject<{
119
- entry: z.ZodString;
120
- modules: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
121
- contentBase64: z.ZodString;
122
- name: z.ZodString;
123
- kind: z.ZodOptional<z.ZodEnum<{
124
- data: "data";
125
- esm: "esm";
126
- text: "text";
127
- wasm: "wasm";
128
- }>>;
129
- }, z.core.$strict>, z.ZodObject<{
130
- contentBase64Chunks: z.ZodArray<z.ZodString>;
131
- name: z.ZodString;
132
- kind: z.ZodOptional<z.ZodEnum<{
133
- data: "data";
134
- esm: "esm";
135
- text: "text";
136
- wasm: "wasm";
137
- }>>;
138
- }, z.core.$strict>]>>;
139
- }, z.core.$strict>;
140
97
  }, z.core.$strict>>;
141
98
  compatibilityDate: z.ZodOptional<z.ZodString>;
142
99
  compatibilityFlags: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -168,5 +125,6 @@ export declare const deployServiceInput: z.ZodObject<{
168
125
  cpuMs: z.ZodOptional<z.ZodNumber>;
169
126
  subrequests: z.ZodOptional<z.ZodNumber>;
170
127
  }, z.core.$strict>>;
128
+ serviceKey: z.ZodString;
171
129
  }, z.core.$strict>;
172
130
  export type DeployServiceInput = z.infer<typeof deployServiceInput>;
@@ -6,13 +6,16 @@ export const artifact = z.strictObject({
6
6
  entry: z.string().min(1).max(256),
7
7
  modules: z.array(artifactModule).min(1).max(40),
8
8
  });
9
+ const digest = z
10
+ .string()
11
+ .length(71)
12
+ .regex(/sha256:[0-9a-f]{64}/);
9
13
  export const revisionedDeployment = z.strictObject({
10
- revision: z.string().min(1).max(80),
14
+ revision: digest,
15
+ requiredSecrets: z.array(z.string().min(1).max(128)).max(64),
11
16
  release: artifact,
12
- gateway: artifact,
13
17
  });
14
- export const deployServiceInput = z.strictObject({
15
- path: z.string().min(1).max(2_048),
18
+ const deploymentFields = {
16
19
  name: z.string().min(1).max(256).optional(),
17
20
  entry: z.string().min(1).max(256).optional(),
18
21
  modules: z.array(artifactModule).min(1).max(40).optional(),
@@ -30,4 +33,8 @@ export const deployServiceInput = z.strictObject({
30
33
  secrets: z.record(z.string().max(256), z.string().max(64 * 1024)).optional(),
31
34
  assets: assetBundle.optional(),
32
35
  limits: resourceLimits,
36
+ };
37
+ export const deployServiceInput = z.strictObject({
38
+ serviceKey: z.string().min(1).max(63),
39
+ ...deploymentFields,
33
40
  });
@@ -4,21 +4,70 @@ export declare const deployedFunction: z.ZodObject<{
4
4
  path: z.ZodString;
5
5
  ref: z.ZodString;
6
6
  }, z.core.$strict>;
7
- export declare const deployServiceOutput: z.ZodObject<{
8
- path: z.ZodString;
7
+ export declare const hostedDomain: z.ZodObject<{
8
+ issuer: z.ZodString;
9
+ origin: z.ZodString;
10
+ revision: z.ZodString;
11
+ publicationEtag: z.ZodString;
12
+ }, z.core.$strict>;
13
+ export declare const deployedService: z.ZodObject<{
14
+ id: z.ZodString;
15
+ serviceKey: z.ZodString;
9
16
  url: z.ZodString;
10
17
  digest: z.ZodString;
11
18
  revision: z.ZodOptional<z.ZodString>;
12
19
  state: z.ZodEnum<{
20
+ deleting: "deleting";
13
21
  deploying: "deploying";
14
22
  failed: "failed";
15
23
  ready: "ready";
24
+ reconciling: "reconciling";
16
25
  }>;
17
26
  error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
27
+ domain: z.ZodOptional<z.ZodObject<{
28
+ issuer: z.ZodString;
29
+ origin: z.ZodString;
30
+ revision: z.ZodString;
31
+ publicationEtag: z.ZodString;
32
+ }, z.core.$strict>>;
18
33
  functions: z.ZodArray<z.ZodObject<{
19
34
  id: z.ZodString;
20
35
  path: z.ZodString;
21
36
  ref: z.ZodString;
22
37
  }, z.core.$strict>>;
23
38
  }, z.core.$strict>;
39
+ export declare const deployServiceOutput: z.ZodUnion<readonly [z.ZodObject<{
40
+ id: z.ZodString;
41
+ serviceKey: z.ZodString;
42
+ url: z.ZodString;
43
+ digest: z.ZodString;
44
+ revision: z.ZodOptional<z.ZodString>;
45
+ state: z.ZodEnum<{
46
+ deleting: "deleting";
47
+ deploying: "deploying";
48
+ failed: "failed";
49
+ ready: "ready";
50
+ reconciling: "reconciling";
51
+ }>;
52
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
53
+ domain: z.ZodOptional<z.ZodObject<{
54
+ issuer: z.ZodString;
55
+ origin: z.ZodString;
56
+ revision: z.ZodString;
57
+ publicationEtag: z.ZodString;
58
+ }, z.core.$strict>>;
59
+ functions: z.ZodArray<z.ZodObject<{
60
+ id: z.ZodString;
61
+ path: z.ZodString;
62
+ ref: z.ZodString;
63
+ }, z.core.$strict>>;
64
+ }, z.core.$strict>, z.ZodObject<{
65
+ kind: z.ZodLiteral<"rejected">;
66
+ reason: z.ZodEnum<{
67
+ "artifact-mode-conflict": "artifact-mode-conflict";
68
+ "invalid-deployment": "invalid-deployment";
69
+ "service-unavailable": "service-unavailable";
70
+ }>;
71
+ message: z.ZodString;
72
+ }, z.core.$strict>]>;
24
73
  export type DeployServiceOutput = z.infer<typeof deployServiceOutput>;
@@ -1,15 +1,25 @@
1
1
  import { z } from 'zod';
2
+ import { deploymentRejection } from './deployment-rejection.js';
2
3
  export const deployedFunction = z.strictObject({
3
4
  id: z.string(),
4
5
  path: z.string(),
5
6
  ref: z.string(),
6
7
  });
7
- export const deployServiceOutput = z.strictObject({
8
- path: z.string(),
8
+ export const hostedDomain = z.strictObject({
9
+ issuer: z.string().min(1),
10
+ origin: z.string().min(1),
11
+ revision: z.string().min(1),
12
+ publicationEtag: z.string().min(1),
13
+ });
14
+ export const deployedService = z.strictObject({
15
+ id: z.string().min(1),
16
+ serviceKey: z.string().min(1),
9
17
  url: z.string(),
10
18
  digest: z.string(),
11
19
  revision: z.string().min(1).max(80).optional(),
12
- state: z.enum(['deploying', 'ready', 'failed']),
20
+ state: z.enum(['deploying', 'reconciling', 'ready', 'failed', 'deleting']),
13
21
  error: z.string().nullable().optional(),
22
+ domain: hostedDomain.optional(),
14
23
  functions: z.array(deployedFunction),
15
24
  });
25
+ export const deployServiceOutput = z.union([deployedService, deploymentRejection]);
@@ -1,5 +1,5 @@
1
- export { schema } from './application/index.js';
2
- export type { ServicesDomain, ServicesSchema } from './application/index.js';
3
- export { artifact, artifactModule, assetBundle, assetFile, deployedFunction, deployServiceInput, deployServiceOutput, resourceLimits, revisionedDeployment, } from './deployment/index.js';
1
+ export { schema } from './schema.js';
2
+ export type { ServicesDomain, ServicesSchema } from './schema.js';
3
+ export { artifact, artifactModule, assetBundle, assetFile, deployedFunction, deployServiceInput, deployServiceOutput, hostedDomain, resourceLimits, revisionedDeployment, } from './deployment/index.js';
4
4
  export type { ArtifactModule, AssetBundle, DeployServiceInput, DeployServiceOutput, ResourceLimits, } from './deployment/index.js';
5
- export { CloudflareWorker, service_owned_by } from './service/index.js';
5
+ export { CloudflareWorker, ObserveService, Service, TraverseHostedDomain, TraverseHostedFunction, TraverseOwnedService, hosted_by_service, service_hosts_domain, service_owned_by, } from './service/index.js';
@@ -1,3 +1,3 @@
1
- export { schema } from './application/index.js';
2
- export { artifact, artifactModule, assetBundle, assetFile, deployedFunction, deployServiceInput, deployServiceOutput, resourceLimits, revisionedDeployment, } from './deployment/index.js';
3
- export { CloudflareWorker, service_owned_by } from './service/index.js';
1
+ export { schema } from './schema.js';
2
+ export { artifact, artifactModule, assetBundle, assetFile, deployedFunction, deployServiceInput, deployServiceOutput, hostedDomain, resourceLimits, revisionedDeployment, } from './deployment/index.js';
3
+ export { CloudflareWorker, ObserveService, Service, TraverseHostedDomain, TraverseHostedFunction, TraverseOwnedService, hosted_by_service, service_hosts_domain, service_owned_by, } from './service/index.js';