@astrale-domains/services 0.4.8 → 0.5.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/README.md +153 -816
- package/dist/schema/index.d.ts +4 -5
- package/dist/schema/index.js +2 -3
- package/dist/schema/modules/deployment/classes/cloudflare-deployment.d.ts +4 -321
- package/dist/schema/modules/deployment/classes/cloudflare-deployment.js +1 -19
- package/dist/schema/modules/deployment/classes/current-deployment.d.ts +20 -0
- package/dist/schema/modules/deployment/classes/current-deployment.js +13 -0
- package/dist/schema/modules/deployment/classes/{deployment-on-line.d.ts → deployment-of.d.ts} +3 -3
- package/dist/schema/modules/deployment/classes/deployment-of.js +11 -0
- package/dist/schema/modules/deployment/classes/deployment.d.ts +9 -57
- package/dist/schema/modules/deployment/classes/deployment.js +9 -23
- package/dist/schema/modules/deployment/classes/index.d.ts +2 -3
- package/dist/schema/modules/deployment/classes/index.js +2 -3
- package/dist/schema/modules/deployment/errors/deployment-not-found.d.ts +2 -5
- package/dist/schema/modules/deployment/errors/deployment-not-found.js +2 -5
- package/dist/schema/modules/deployment/errors/index.d.ts +0 -2
- package/dist/schema/modules/deployment/errors/index.js +0 -2
- package/dist/schema/modules/deployment/functions/index.d.ts +0 -10
- package/dist/schema/modules/deployment/functions/index.js +0 -10
- package/dist/schema/modules/deployment/functions/retire-deployment.d.ts +8 -7
- package/dist/schema/modules/deployment/functions/retire-deployment.js +8 -7
- package/dist/schema/modules/deployment/index.d.ts +6 -6
- package/dist/schema/modules/deployment/index.js +7 -5
- package/dist/schema/modules/deployment/policies/index.d.ts +1 -4
- package/dist/schema/modules/deployment/policies/index.js +1 -4
- package/dist/schema/modules/deployment/policies/own-deployment.d.ts +1 -1
- package/dist/schema/modules/deployment/policies/own-deployment.js +6 -7
- package/dist/schema/modules/deployment/policies/traverse-owned-service-deployment.d.ts +2 -0
- package/dist/schema/modules/deployment/policies/traverse-owned-service-deployment.js +7 -0
- package/dist/schema/modules/deployment/states/deployment-lifecycle.d.ts +6 -9
- package/dist/schema/modules/deployment/states/deployment-lifecycle.js +6 -7
- package/dist/schema/modules/deployment/types/deployment-hosting.d.ts +9 -28
- package/dist/schema/modules/deployment/types/deployment-hosting.js +3 -3
- package/dist/schema/modules/deployment/types/deployment-request.d.ts +12 -40
- package/dist/schema/modules/deployment/types/deployment-request.js +17 -9
- package/dist/schema/modules/deployment/types/deployment-response.d.ts +7 -15
- package/dist/schema/modules/deployment/types/deployment-response.js +2 -2
- package/dist/schema/modules/deployment/types/deployment-retire.d.ts +1 -1
- package/dist/schema/modules/deployment/types/deployment-secret.d.ts +0 -39
- package/dist/schema/modules/deployment/types/deployment-secret.js +0 -34
- package/dist/schema/modules/deployment/types/deployment-summary.d.ts +14 -45
- package/dist/schema/modules/deployment/types/deployment-summary.js +9 -8
- package/dist/schema/modules/deployment/types/index.d.ts +7 -3
- package/dist/schema/modules/deployment/types/index.js +4 -2
- package/dist/schema/modules/{service → deployment}/types/service-deployment-artifact-module.d.ts +2 -20
- package/dist/schema/modules/deployment/types/service-deployment-artifact-module.js +10 -0
- package/dist/schema/modules/{service → deployment}/types/service-deployment-assets.d.ts +4 -20
- package/dist/schema/modules/{service → deployment}/types/service-deployment-assets.js +4 -7
- package/dist/schema/modules/service/classes/cloudflare-service.d.ts +321 -0
- package/dist/schema/modules/service/classes/cloudflare-service.js +35 -0
- package/dist/schema/modules/service/classes/index.d.ts +1 -1
- package/dist/schema/modules/service/classes/index.js +1 -1
- package/dist/schema/modules/service/classes/service.d.ts +18 -107
- package/dist/schema/modules/service/classes/service.js +16 -27
- package/dist/schema/modules/service/errors/index.d.ts +1 -0
- package/dist/schema/modules/service/errors/index.js +1 -0
- package/dist/schema/modules/service/errors/service-not-found.d.ts +7 -0
- package/dist/schema/modules/service/errors/service-not-found.js +8 -0
- package/dist/schema/modules/service/functions/delete-service.d.ts +1 -1
- package/dist/schema/modules/service/functions/delete-service.js +1 -1
- package/dist/schema/modules/{deployment/functions/deploy-cloudflare-deployment.d.ts → service/functions/deploy-service.d.ts} +20 -35
- package/dist/schema/modules/service/functions/deploy-service.js +15 -0
- package/dist/schema/modules/service/functions/describe-hosting.d.ts +8 -0
- package/dist/schema/modules/service/functions/describe-hosting.js +11 -0
- package/dist/schema/modules/service/functions/index.d.ts +5 -10
- package/dist/schema/modules/service/functions/index.js +5 -10
- package/dist/schema/modules/{deployment/functions/list-cloudflare-deployments.d.ts → service/functions/list-service-deployments.d.ts} +8 -12
- package/dist/schema/modules/service/functions/list-service-deployments.js +10 -0
- package/dist/schema/modules/service/functions/list-service-logs.d.ts +2 -1
- package/dist/schema/modules/service/functions/list-service-logs.js +1 -1
- package/dist/schema/modules/service/functions/list-service-schedules.d.ts +1 -1
- package/dist/schema/modules/service/functions/list-service-schedules.js +1 -1
- package/dist/schema/modules/service/functions/list-service-secret-names.d.ts +1 -1
- package/dist/schema/modules/service/functions/list-service-secret-names.js +1 -1
- package/dist/schema/modules/service/functions/promote-service.d.ts +14 -0
- package/dist/schema/modules/service/functions/promote-service.js +4 -0
- package/dist/schema/modules/service/functions/replace-service-schedules.d.ts +1 -1
- package/dist/schema/modules/service/functions/replace-service-schedules.js +1 -4
- package/dist/schema/modules/service/functions/set-service-secret.d.ts +4 -2
- package/dist/schema/modules/service/functions/set-service-secret.js +1 -1
- package/dist/schema/modules/service/functions/transfer-service.d.ts +14 -0
- package/dist/schema/modules/service/functions/transfer-service.js +4 -0
- package/dist/schema/modules/service/index.d.ts +5 -5
- package/dist/schema/modules/service/index.js +5 -4
- package/dist/schema/modules/service/policies/act-as.d.ts +6 -0
- package/dist/schema/modules/service/policies/act-as.js +10 -0
- package/dist/schema/modules/service/policies/index.d.ts +1 -0
- package/dist/schema/modules/service/policies/index.js +1 -0
- package/dist/schema/modules/service/states/service-lifecycle.d.ts +7 -20
- package/dist/schema/modules/service/states/service-lifecycle.js +6 -21
- package/dist/schema/modules/service/types/index.d.ts +1 -13
- package/dist/schema/modules/service/types/index.js +1 -8
- package/dist/schema/modules/service/types/service-management.d.ts +65 -24
- package/dist/schema/modules/service/types/service-management.js +46 -21
- package/dist/schema/schema.d.ts +252 -758
- package/dist/schema/schema.js +7 -11
- package/package.json +4 -11
- package/dist/scaffold/create-service.mjs +0 -77
- package/dist/scaffold/template/.env.example +0 -2
- package/dist/scaffold/template/README.md +0 -37
- package/dist/scaffold/template/gitignore +0 -6
- package/dist/scaffold/template/scripts/build.mjs +0 -10
- package/dist/scaffold/template/scripts/deploy.mjs +0 -50
- package/dist/scaffold/template/src/account.js +0 -26
- package/dist/scaffold/template/src/index.js +0 -32
- package/dist/scaffold/template/src/job.js +0 -19
- package/dist/schema/modules/deployment/classes/deployment-line.d.ts +0 -23
- package/dist/schema/modules/deployment/classes/deployment-line.js +0 -24
- package/dist/schema/modules/deployment/classes/deployment-on-line.js +0 -11
- package/dist/schema/modules/deployment/classes/line-owned-by.d.ts +0 -26
- package/dist/schema/modules/deployment/classes/line-owned-by.js +0 -19
- package/dist/schema/modules/deployment/errors/deployment-label-not-found.d.ts +0 -12
- package/dist/schema/modules/deployment/errors/deployment-label-not-found.js +0 -11
- package/dist/schema/modules/deployment/errors/deployment-registry-only.d.ts +0 -11
- package/dist/schema/modules/deployment/errors/deployment-registry-only.js +0 -12
- package/dist/schema/modules/deployment/functions/deploy-cloudflare-deployment.js +0 -14
- package/dist/schema/modules/deployment/functions/describe-deployment-hosting.d.ts +0 -8
- package/dist/schema/modules/deployment/functions/describe-deployment-hosting.js +0 -11
- package/dist/schema/modules/deployment/functions/expire-deployment-previews.d.ts +0 -16
- package/dist/schema/modules/deployment/functions/expire-deployment-previews.js +0 -14
- package/dist/schema/modules/deployment/functions/list-cloudflare-deployment-secret-names.d.ts +0 -5
- package/dist/schema/modules/deployment/functions/list-cloudflare-deployment-secret-names.js +0 -4
- package/dist/schema/modules/deployment/functions/list-cloudflare-deployments.js +0 -10
- package/dist/schema/modules/deployment/functions/list-deployment-secret-names.d.ts +0 -4
- package/dist/schema/modules/deployment/functions/list-deployment-secret-names.js +0 -6
- package/dist/schema/modules/deployment/functions/read-deployment-last-calls.d.ts +0 -10
- package/dist/schema/modules/deployment/functions/read-deployment-last-calls.js +0 -13
- package/dist/schema/modules/deployment/functions/retain-deployment.d.ts +0 -12
- package/dist/schema/modules/deployment/functions/retain-deployment.js +0 -13
- package/dist/schema/modules/deployment/functions/set-cloudflare-deployment-secret.d.ts +0 -18
- package/dist/schema/modules/deployment/functions/set-cloudflare-deployment-secret.js +0 -7
- package/dist/schema/modules/deployment/functions/set-deployment-secret.d.ts +0 -14
- package/dist/schema/modules/deployment/functions/set-deployment-secret.js +0 -3
- package/dist/schema/modules/deployment/policies/act-for-organization.d.ts +0 -6
- package/dist/schema/modules/deployment/policies/act-for-organization.js +0 -10
- package/dist/schema/modules/deployment/policies/own-line.d.ts +0 -5
- package/dist/schema/modules/deployment/policies/own-line.js +0 -10
- package/dist/schema/modules/deployment/policies/traverse-owned-line-deployment.d.ts +0 -2
- package/dist/schema/modules/deployment/policies/traverse-owned-line-deployment.js +0 -7
- package/dist/schema/modules/deployment/policies/traverse-owned-line.d.ts +0 -2
- package/dist/schema/modules/deployment/policies/traverse-owned-line.js +0 -7
- package/dist/schema/modules/deployment/types/deployment-retention.d.ts +0 -49
- package/dist/schema/modules/deployment/types/deployment-retention.js +0 -45
- package/dist/schema/modules/service/classes/cloudflare-worker.d.ts +0 -352
- package/dist/schema/modules/service/classes/cloudflare-worker.js +0 -41
- package/dist/schema/modules/service/functions/delete-service-secret.d.ts +0 -11
- package/dist/schema/modules/service/functions/delete-service-secret.js +0 -3
- package/dist/schema/modules/service/functions/delete-worker-secret.d.ts +0 -11
- package/dist/schema/modules/service/functions/delete-worker-secret.js +0 -7
- package/dist/schema/modules/service/functions/delete-worker.d.ts +0 -9
- package/dist/schema/modules/service/functions/delete-worker.js +0 -7
- package/dist/schema/modules/service/functions/deploy-cloudflare-worker.d.ts +0 -109
- package/dist/schema/modules/service/functions/deploy-cloudflare-worker.js +0 -9
- package/dist/schema/modules/service/functions/list-worker-logs.d.ts +0 -12
- package/dist/schema/modules/service/functions/list-worker-logs.js +0 -7
- package/dist/schema/modules/service/functions/list-worker-schedules.d.ts +0 -4
- package/dist/schema/modules/service/functions/list-worker-schedules.js +0 -7
- package/dist/schema/modules/service/functions/list-worker-secret-names.d.ts +0 -4
- package/dist/schema/modules/service/functions/list-worker-secret-names.js +0 -7
- package/dist/schema/modules/service/functions/migrate-worker-ingress.d.ts +0 -24
- package/dist/schema/modules/service/functions/migrate-worker-ingress.js +0 -26
- package/dist/schema/modules/service/functions/replace-worker-schedules.d.ts +0 -11
- package/dist/schema/modules/service/functions/replace-worker-schedules.js +0 -7
- package/dist/schema/modules/service/functions/set-worker-secret.d.ts +0 -12
- package/dist/schema/modules/service/functions/set-worker-secret.js +0 -7
- package/dist/schema/modules/service/types/deploy-cloudflare-worker.d.ts +0 -286
- package/dist/schema/modules/service/types/deploy-cloudflare-worker.js +0 -51
- package/dist/schema/modules/service/types/legacy/service-deployment-content.js +0 -22
- package/dist/schema/modules/service/types/service-deployment-artifact-module.js +0 -13
- package/dist/schema/modules/service/types/service-deployment-resource-limits.d.ts +0 -6
- package/dist/schema/modules/service/types/service-deployment-resource-limits.js +0 -7
- package/dist/schema/modules/service/types/service-readiness.d.ts +0 -6
- package/dist/schema/modules/service/types/service-readiness.js +0 -6
- package/dist/schema/modules/service/types/service-secret-operation-rejection.d.ts +0 -9
- package/dist/schema/modules/service/types/service-secret-operation-rejection.js +0 -5
- /package/dist/schema/modules/{service → deployment}/types/content/index.d.ts +0 -0
- /package/dist/schema/modules/{service → deployment}/types/content/index.js +0 -0
- /package/dist/schema/modules/{service → deployment}/types/content/limits.d.ts +0 -0
- /package/dist/schema/modules/{service → deployment}/types/content/limits.js +0 -0
- /package/dist/schema/modules/{service → deployment}/types/service-deployment-content.d.ts +0 -0
- /package/dist/schema/modules/{service → deployment}/types/service-deployment-content.js +0 -0
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const deleteServiceSecret: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
2
|
-
name: string;
|
|
3
|
-
}, {
|
|
4
|
-
readonly mode: 'value';
|
|
5
|
-
readonly value: {
|
|
6
|
-
ok: true;
|
|
7
|
-
} | {
|
|
8
|
-
kind: "rejected";
|
|
9
|
-
reason: "binding-unavailable" | "invalid-secret-name" | "service-unavailable";
|
|
10
|
-
};
|
|
11
|
-
}, "authorized", false, true, undefined>>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const deleteWorkerSecret: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
2
|
-
name: string;
|
|
3
|
-
}, {
|
|
4
|
-
readonly mode: 'value';
|
|
5
|
-
readonly value: {
|
|
6
|
-
ok: true;
|
|
7
|
-
} | {
|
|
8
|
-
kind: "rejected";
|
|
9
|
-
reason: "binding-unavailable" | "invalid-secret-name" | "service-unavailable";
|
|
10
|
-
};
|
|
11
|
-
}, "authorized", false, false, undefined>>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { method } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { OwnService } from '../policies/own-service.js';
|
|
3
|
-
import { deleteServiceSecretContract } from '../types/service-management.js';
|
|
4
|
-
export const deleteWorkerSecret = method({
|
|
5
|
-
...deleteServiceSecretContract,
|
|
6
|
-
policy: ({ check, self }) => check(OwnService, self),
|
|
7
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const deleteWorker: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
2
|
-
readonly mode: 'value';
|
|
3
|
-
readonly value: {
|
|
4
|
-
kind: "deleted";
|
|
5
|
-
} | {
|
|
6
|
-
kind: "deleting";
|
|
7
|
-
retryAfterMs: number;
|
|
8
|
-
};
|
|
9
|
-
}, "authorized", false, false, undefined>>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { method } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { OwnService } from '../policies/own-service.js';
|
|
3
|
-
import { deleteServiceContract } from '../types/service-management.js';
|
|
4
|
-
export const deleteWorker = method({
|
|
5
|
-
...deleteServiceContract,
|
|
6
|
-
policy: ({ check, self }) => check(OwnService, self),
|
|
7
|
-
});
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
export declare const deployCloudflareWorker: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
2
|
-
name?: string | undefined;
|
|
3
|
-
entry?: string | undefined;
|
|
4
|
-
modules?: ({
|
|
5
|
-
name: string;
|
|
6
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
7
|
-
content: {
|
|
8
|
-
encoding: "gzip" | "identity";
|
|
9
|
-
decodedSize: number;
|
|
10
|
-
contentBase64: string;
|
|
11
|
-
} | {
|
|
12
|
-
encoding: "gzip" | "identity";
|
|
13
|
-
decodedSize: number;
|
|
14
|
-
contentBase64Chunks: string[];
|
|
15
|
-
};
|
|
16
|
-
} | {
|
|
17
|
-
contentBase64: string;
|
|
18
|
-
name: string;
|
|
19
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
20
|
-
} | {
|
|
21
|
-
contentBase64Chunks: string[];
|
|
22
|
-
name: string;
|
|
23
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
24
|
-
})[] | undefined;
|
|
25
|
-
revisioned?: {
|
|
26
|
-
requiredSecrets: string[];
|
|
27
|
-
release: {
|
|
28
|
-
entry: string;
|
|
29
|
-
modules: ({
|
|
30
|
-
name: string;
|
|
31
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
32
|
-
content: {
|
|
33
|
-
encoding: "gzip" | "identity";
|
|
34
|
-
decodedSize: number;
|
|
35
|
-
contentBase64: string;
|
|
36
|
-
} | {
|
|
37
|
-
encoding: "gzip" | "identity";
|
|
38
|
-
decodedSize: number;
|
|
39
|
-
contentBase64Chunks: string[];
|
|
40
|
-
};
|
|
41
|
-
} | {
|
|
42
|
-
contentBase64: string;
|
|
43
|
-
name: string;
|
|
44
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
45
|
-
} | {
|
|
46
|
-
contentBase64Chunks: string[];
|
|
47
|
-
name: string;
|
|
48
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
49
|
-
})[];
|
|
50
|
-
};
|
|
51
|
-
readiness?: {
|
|
52
|
-
paths: string[];
|
|
53
|
-
required?: boolean | undefined;
|
|
54
|
-
} | undefined;
|
|
55
|
-
} | undefined;
|
|
56
|
-
compatibilityDate?: string | undefined;
|
|
57
|
-
compatibilityFlags?: string[] | undefined;
|
|
58
|
-
serviceBindings?: {
|
|
59
|
-
name: string;
|
|
60
|
-
service: string;
|
|
61
|
-
}[] | undefined;
|
|
62
|
-
vars?: Record<string, string> | undefined;
|
|
63
|
-
secrets?: Record<string, string> | undefined;
|
|
64
|
-
assets?: {
|
|
65
|
-
files: ({
|
|
66
|
-
path: string;
|
|
67
|
-
contentType?: string | undefined;
|
|
68
|
-
content: {
|
|
69
|
-
encoding: "gzip" | "identity";
|
|
70
|
-
decodedSize: number;
|
|
71
|
-
contentBase64: string;
|
|
72
|
-
} | {
|
|
73
|
-
encoding: "gzip" | "identity";
|
|
74
|
-
decodedSize: number;
|
|
75
|
-
contentBase64Chunks: string[];
|
|
76
|
-
};
|
|
77
|
-
} | {
|
|
78
|
-
contentBase64: string;
|
|
79
|
-
path: string;
|
|
80
|
-
contentType?: string | undefined;
|
|
81
|
-
} | {
|
|
82
|
-
contentBase64Chunks: string[];
|
|
83
|
-
path: string;
|
|
84
|
-
contentType?: string | undefined;
|
|
85
|
-
})[];
|
|
86
|
-
notFound?: "404-page" | "none" | "single-page-application" | undefined;
|
|
87
|
-
runWorkerFirst?: boolean | undefined;
|
|
88
|
-
htmlHandling?: "none" | undefined;
|
|
89
|
-
} | undefined;
|
|
90
|
-
limits?: {
|
|
91
|
-
cpuMs?: number | undefined;
|
|
92
|
-
subrequests?: number | undefined;
|
|
93
|
-
} | undefined;
|
|
94
|
-
serviceKey: string;
|
|
95
|
-
}, {
|
|
96
|
-
readonly mode: 'value';
|
|
97
|
-
readonly value: {
|
|
98
|
-
id: string;
|
|
99
|
-
serviceKey: string;
|
|
100
|
-
url: string;
|
|
101
|
-
digest: string;
|
|
102
|
-
state: "ready";
|
|
103
|
-
candidateReadiness?: "passed" | "unavailable-retained-secrets" | undefined;
|
|
104
|
-
} | {
|
|
105
|
-
kind: "rejected";
|
|
106
|
-
reason: "artifact-mode-conflict" | "invalid-deployment" | "service-unavailable";
|
|
107
|
-
message: string;
|
|
108
|
-
};
|
|
109
|
-
}, "authenticated", true, false, undefined>>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { method } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { deployServiceInput, deployServiceOutput } from '../types/deploy-cloudflare-worker.js';
|
|
3
|
-
export const deployCloudflareWorker = method({
|
|
4
|
-
description: 'Create or converge one Cloudflare Worker Service.',
|
|
5
|
-
auth: 'authenticated',
|
|
6
|
-
static: true,
|
|
7
|
-
input: deployServiceInput,
|
|
8
|
-
output: deployServiceOutput,
|
|
9
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const listWorkerLogs: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
2
|
-
tail?: number | undefined;
|
|
3
|
-
since?: number | undefined;
|
|
4
|
-
}, {
|
|
5
|
-
readonly mode: 'value';
|
|
6
|
-
readonly value: {
|
|
7
|
-
id: string;
|
|
8
|
-
ts: number;
|
|
9
|
-
level: string;
|
|
10
|
-
line: string;
|
|
11
|
-
}[];
|
|
12
|
-
}, "authorized", false, false, undefined>>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { method } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { OwnService } from '../policies/own-service.js';
|
|
3
|
-
import { listServiceLogsContract } from '../types/service-management.js';
|
|
4
|
-
export const listWorkerLogs = method({
|
|
5
|
-
...listServiceLogsContract,
|
|
6
|
-
policy: ({ check, self }) => check(OwnService, self),
|
|
7
|
-
});
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { method } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { OwnService } from '../policies/own-service.js';
|
|
3
|
-
import { listServiceSchedulesContract } from '../types/service-management.js';
|
|
4
|
-
export const listWorkerSchedules = method({
|
|
5
|
-
...listServiceSchedulesContract,
|
|
6
|
-
policy: ({ check, self }) => check(OwnService, self),
|
|
7
|
-
});
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { method } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { OwnService } from '../policies/own-service.js';
|
|
3
|
-
import { listServiceSecretNamesContract } from '../types/service-management.js';
|
|
4
|
-
export const listWorkerSecretNames = method({
|
|
5
|
-
...listServiceSecretNamesContract,
|
|
6
|
-
policy: ({ check, self }) => check(OwnService, self),
|
|
7
|
-
});
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export declare const migrateWorkerIngress: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
2
|
-
action: "complete" | "detach" | "restore";
|
|
3
|
-
probe: {
|
|
4
|
-
path: string;
|
|
5
|
-
status: number;
|
|
6
|
-
bodySha256: string;
|
|
7
|
-
};
|
|
8
|
-
}, {
|
|
9
|
-
readonly mode: 'value';
|
|
10
|
-
readonly value: {
|
|
11
|
-
kind: "detached";
|
|
12
|
-
detachedAt: string;
|
|
13
|
-
} | {
|
|
14
|
-
kind: "migrated";
|
|
15
|
-
} | {
|
|
16
|
-
kind: "restored";
|
|
17
|
-
} | {
|
|
18
|
-
kind: "pending";
|
|
19
|
-
retryAfterMs: number;
|
|
20
|
-
} | {
|
|
21
|
-
kind: "rejected";
|
|
22
|
-
reason: "missing-location" | "not-detached" | "service-unavailable";
|
|
23
|
-
};
|
|
24
|
-
}, "authorized", false, false, undefined>>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { method } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { OwnService } from '../policies/own-service.js';
|
|
4
|
-
export const migrateWorkerIngress = method({
|
|
5
|
-
description: 'Migrate legacy ingress to the shared wildcard, retaining cleanup evidence until verified; optionally restore the domain before finalization.',
|
|
6
|
-
auth: 'authorized',
|
|
7
|
-
input: z.strictObject({
|
|
8
|
-
action: z.enum(['detach', 'complete', 'restore']),
|
|
9
|
-
probe: z.strictObject({
|
|
10
|
-
path: z.string().min(1).max(1024),
|
|
11
|
-
status: z.number().int().min(200).max(299),
|
|
12
|
-
bodySha256: z.string().min(64).max(64),
|
|
13
|
-
}),
|
|
14
|
-
}),
|
|
15
|
-
output: z.discriminatedUnion('kind', [
|
|
16
|
-
z.strictObject({ kind: z.literal('detached'), detachedAt: z.string().min(20).max(30) }),
|
|
17
|
-
z.strictObject({ kind: z.literal('migrated') }),
|
|
18
|
-
z.strictObject({ kind: z.literal('restored') }),
|
|
19
|
-
z.strictObject({ kind: z.literal('pending'), retryAfterMs: z.number().int().positive() }),
|
|
20
|
-
z.strictObject({
|
|
21
|
-
kind: z.literal('rejected'),
|
|
22
|
-
reason: z.enum(['service-unavailable', 'missing-location', 'not-detached']),
|
|
23
|
-
}),
|
|
24
|
-
]),
|
|
25
|
-
policy: ({ check, self }) => check(OwnService, self),
|
|
26
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const replaceWorkerSchedules: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
2
|
-
crons: string[];
|
|
3
|
-
}, {
|
|
4
|
-
readonly mode: 'value';
|
|
5
|
-
readonly value: {
|
|
6
|
-
crons: string[];
|
|
7
|
-
} | {
|
|
8
|
-
kind: "rejected";
|
|
9
|
-
reason: "invalid-schedule" | "service-unavailable";
|
|
10
|
-
};
|
|
11
|
-
}, "authorized", false, false, undefined>>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { method } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { OwnService } from '../policies/own-service.js';
|
|
3
|
-
import { replaceServiceSchedulesContract } from '../types/service-management.js';
|
|
4
|
-
export const replaceWorkerSchedules = method({
|
|
5
|
-
...replaceServiceSchedulesContract,
|
|
6
|
-
policy: ({ check, self }) => check(OwnService, self),
|
|
7
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const setWorkerSecret: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
2
|
-
name: string;
|
|
3
|
-
value: string;
|
|
4
|
-
}, {
|
|
5
|
-
readonly mode: 'value';
|
|
6
|
-
readonly value: {
|
|
7
|
-
kind: "rejected";
|
|
8
|
-
reason: "binding-unavailable" | "invalid-secret-name" | "service-unavailable";
|
|
9
|
-
} | {
|
|
10
|
-
name: string;
|
|
11
|
-
};
|
|
12
|
-
}, "authorized", false, false, undefined>>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { method } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { OwnService } from '../policies/own-service.js';
|
|
3
|
-
import { setServiceSecretContract } from '../types/service-management.js';
|
|
4
|
-
export const setWorkerSecret = method({
|
|
5
|
-
...setServiceSecretContract,
|
|
6
|
-
policy: ({ check, self }) => check(OwnService, self),
|
|
7
|
-
});
|
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const artifact: z.ZodObject<{
|
|
3
|
-
entry: z.ZodString;
|
|
4
|
-
modules: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
5
|
-
name: z.ZodString;
|
|
6
|
-
kind: z.ZodOptional<z.ZodEnum<{
|
|
7
|
-
data: "data";
|
|
8
|
-
esm: "esm";
|
|
9
|
-
text: "text";
|
|
10
|
-
wasm: "wasm";
|
|
11
|
-
}>>;
|
|
12
|
-
content: z.ZodUnion<readonly [z.ZodObject<{
|
|
13
|
-
encoding: z.ZodEnum<{
|
|
14
|
-
gzip: "gzip";
|
|
15
|
-
identity: "identity";
|
|
16
|
-
}>;
|
|
17
|
-
decodedSize: z.ZodNumber;
|
|
18
|
-
contentBase64: z.ZodString;
|
|
19
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
20
|
-
encoding: z.ZodEnum<{
|
|
21
|
-
gzip: "gzip";
|
|
22
|
-
identity: "identity";
|
|
23
|
-
}>;
|
|
24
|
-
decodedSize: z.ZodNumber;
|
|
25
|
-
contentBase64Chunks: z.ZodArray<z.ZodString>;
|
|
26
|
-
}, z.core.$strict>]>;
|
|
27
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
28
|
-
contentBase64: z.ZodString;
|
|
29
|
-
name: z.ZodString;
|
|
30
|
-
kind: z.ZodOptional<z.ZodEnum<{
|
|
31
|
-
data: "data";
|
|
32
|
-
esm: "esm";
|
|
33
|
-
text: "text";
|
|
34
|
-
wasm: "wasm";
|
|
35
|
-
}>>;
|
|
36
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
37
|
-
contentBase64Chunks: z.ZodArray<z.ZodString>;
|
|
38
|
-
name: z.ZodString;
|
|
39
|
-
kind: z.ZodOptional<z.ZodEnum<{
|
|
40
|
-
data: "data";
|
|
41
|
-
esm: "esm";
|
|
42
|
-
text: "text";
|
|
43
|
-
wasm: "wasm";
|
|
44
|
-
}>>;
|
|
45
|
-
}, z.core.$strict>]>>;
|
|
46
|
-
}, z.core.$strict>;
|
|
47
|
-
export declare const revisionedDeployment: z.ZodObject<{
|
|
48
|
-
requiredSecrets: z.ZodArray<z.ZodString>;
|
|
49
|
-
release: z.ZodObject<{
|
|
50
|
-
entry: z.ZodString;
|
|
51
|
-
modules: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
52
|
-
name: z.ZodString;
|
|
53
|
-
kind: z.ZodOptional<z.ZodEnum<{
|
|
54
|
-
data: "data";
|
|
55
|
-
esm: "esm";
|
|
56
|
-
text: "text";
|
|
57
|
-
wasm: "wasm";
|
|
58
|
-
}>>;
|
|
59
|
-
content: z.ZodUnion<readonly [z.ZodObject<{
|
|
60
|
-
encoding: z.ZodEnum<{
|
|
61
|
-
gzip: "gzip";
|
|
62
|
-
identity: "identity";
|
|
63
|
-
}>;
|
|
64
|
-
decodedSize: z.ZodNumber;
|
|
65
|
-
contentBase64: z.ZodString;
|
|
66
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
67
|
-
encoding: z.ZodEnum<{
|
|
68
|
-
gzip: "gzip";
|
|
69
|
-
identity: "identity";
|
|
70
|
-
}>;
|
|
71
|
-
decodedSize: z.ZodNumber;
|
|
72
|
-
contentBase64Chunks: z.ZodArray<z.ZodString>;
|
|
73
|
-
}, z.core.$strict>]>;
|
|
74
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
75
|
-
contentBase64: z.ZodString;
|
|
76
|
-
name: z.ZodString;
|
|
77
|
-
kind: z.ZodOptional<z.ZodEnum<{
|
|
78
|
-
data: "data";
|
|
79
|
-
esm: "esm";
|
|
80
|
-
text: "text";
|
|
81
|
-
wasm: "wasm";
|
|
82
|
-
}>>;
|
|
83
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
84
|
-
contentBase64Chunks: z.ZodArray<z.ZodString>;
|
|
85
|
-
name: z.ZodString;
|
|
86
|
-
kind: z.ZodOptional<z.ZodEnum<{
|
|
87
|
-
data: "data";
|
|
88
|
-
esm: "esm";
|
|
89
|
-
text: "text";
|
|
90
|
-
wasm: "wasm";
|
|
91
|
-
}>>;
|
|
92
|
-
}, z.core.$strict>]>>;
|
|
93
|
-
}, z.core.$strict>;
|
|
94
|
-
readiness: z.ZodOptional<z.ZodObject<{
|
|
95
|
-
paths: z.ZodArray<z.ZodString>;
|
|
96
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
97
|
-
}, z.core.$strict>>;
|
|
98
|
-
}, z.core.$strict>;
|
|
99
|
-
export declare const deployServiceInput: z.ZodObject<{
|
|
100
|
-
name: z.ZodOptional<z.ZodString>;
|
|
101
|
-
entry: z.ZodOptional<z.ZodString>;
|
|
102
|
-
modules: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
103
|
-
name: z.ZodString;
|
|
104
|
-
kind: z.ZodOptional<z.ZodEnum<{
|
|
105
|
-
data: "data";
|
|
106
|
-
esm: "esm";
|
|
107
|
-
text: "text";
|
|
108
|
-
wasm: "wasm";
|
|
109
|
-
}>>;
|
|
110
|
-
content: z.ZodUnion<readonly [z.ZodObject<{
|
|
111
|
-
encoding: z.ZodEnum<{
|
|
112
|
-
gzip: "gzip";
|
|
113
|
-
identity: "identity";
|
|
114
|
-
}>;
|
|
115
|
-
decodedSize: z.ZodNumber;
|
|
116
|
-
contentBase64: z.ZodString;
|
|
117
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
118
|
-
encoding: z.ZodEnum<{
|
|
119
|
-
gzip: "gzip";
|
|
120
|
-
identity: "identity";
|
|
121
|
-
}>;
|
|
122
|
-
decodedSize: z.ZodNumber;
|
|
123
|
-
contentBase64Chunks: z.ZodArray<z.ZodString>;
|
|
124
|
-
}, z.core.$strict>]>;
|
|
125
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
126
|
-
contentBase64: z.ZodString;
|
|
127
|
-
name: z.ZodString;
|
|
128
|
-
kind: z.ZodOptional<z.ZodEnum<{
|
|
129
|
-
data: "data";
|
|
130
|
-
esm: "esm";
|
|
131
|
-
text: "text";
|
|
132
|
-
wasm: "wasm";
|
|
133
|
-
}>>;
|
|
134
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
135
|
-
contentBase64Chunks: z.ZodArray<z.ZodString>;
|
|
136
|
-
name: z.ZodString;
|
|
137
|
-
kind: z.ZodOptional<z.ZodEnum<{
|
|
138
|
-
data: "data";
|
|
139
|
-
esm: "esm";
|
|
140
|
-
text: "text";
|
|
141
|
-
wasm: "wasm";
|
|
142
|
-
}>>;
|
|
143
|
-
}, z.core.$strict>]>>>;
|
|
144
|
-
revisioned: z.ZodOptional<z.ZodObject<{
|
|
145
|
-
requiredSecrets: z.ZodArray<z.ZodString>;
|
|
146
|
-
release: z.ZodObject<{
|
|
147
|
-
entry: z.ZodString;
|
|
148
|
-
modules: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
149
|
-
name: z.ZodString;
|
|
150
|
-
kind: z.ZodOptional<z.ZodEnum<{
|
|
151
|
-
data: "data";
|
|
152
|
-
esm: "esm";
|
|
153
|
-
text: "text";
|
|
154
|
-
wasm: "wasm";
|
|
155
|
-
}>>;
|
|
156
|
-
content: z.ZodUnion<readonly [z.ZodObject<{
|
|
157
|
-
encoding: z.ZodEnum<{
|
|
158
|
-
gzip: "gzip";
|
|
159
|
-
identity: "identity";
|
|
160
|
-
}>;
|
|
161
|
-
decodedSize: z.ZodNumber;
|
|
162
|
-
contentBase64: z.ZodString;
|
|
163
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
164
|
-
encoding: z.ZodEnum<{
|
|
165
|
-
gzip: "gzip";
|
|
166
|
-
identity: "identity";
|
|
167
|
-
}>;
|
|
168
|
-
decodedSize: z.ZodNumber;
|
|
169
|
-
contentBase64Chunks: z.ZodArray<z.ZodString>;
|
|
170
|
-
}, z.core.$strict>]>;
|
|
171
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
172
|
-
contentBase64: z.ZodString;
|
|
173
|
-
name: z.ZodString;
|
|
174
|
-
kind: z.ZodOptional<z.ZodEnum<{
|
|
175
|
-
data: "data";
|
|
176
|
-
esm: "esm";
|
|
177
|
-
text: "text";
|
|
178
|
-
wasm: "wasm";
|
|
179
|
-
}>>;
|
|
180
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
181
|
-
contentBase64Chunks: z.ZodArray<z.ZodString>;
|
|
182
|
-
name: z.ZodString;
|
|
183
|
-
kind: z.ZodOptional<z.ZodEnum<{
|
|
184
|
-
data: "data";
|
|
185
|
-
esm: "esm";
|
|
186
|
-
text: "text";
|
|
187
|
-
wasm: "wasm";
|
|
188
|
-
}>>;
|
|
189
|
-
}, z.core.$strict>]>>;
|
|
190
|
-
}, z.core.$strict>;
|
|
191
|
-
readiness: z.ZodOptional<z.ZodObject<{
|
|
192
|
-
paths: z.ZodArray<z.ZodString>;
|
|
193
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
194
|
-
}, z.core.$strict>>;
|
|
195
|
-
}, z.core.$strict>>;
|
|
196
|
-
compatibilityDate: z.ZodOptional<z.ZodString>;
|
|
197
|
-
compatibilityFlags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
198
|
-
serviceBindings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
199
|
-
name: z.ZodString;
|
|
200
|
-
service: z.ZodString;
|
|
201
|
-
}, z.core.$strict>>>;
|
|
202
|
-
vars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
203
|
-
secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
204
|
-
assets: z.ZodOptional<z.ZodObject<{
|
|
205
|
-
files: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
206
|
-
path: z.ZodString;
|
|
207
|
-
contentType: z.ZodOptional<z.ZodString>;
|
|
208
|
-
content: z.ZodUnion<readonly [z.ZodObject<{
|
|
209
|
-
encoding: z.ZodEnum<{
|
|
210
|
-
gzip: "gzip";
|
|
211
|
-
identity: "identity";
|
|
212
|
-
}>;
|
|
213
|
-
decodedSize: z.ZodNumber;
|
|
214
|
-
contentBase64: z.ZodString;
|
|
215
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
216
|
-
encoding: z.ZodEnum<{
|
|
217
|
-
gzip: "gzip";
|
|
218
|
-
identity: "identity";
|
|
219
|
-
}>;
|
|
220
|
-
decodedSize: z.ZodNumber;
|
|
221
|
-
contentBase64Chunks: z.ZodArray<z.ZodString>;
|
|
222
|
-
}, z.core.$strict>]>;
|
|
223
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
224
|
-
contentBase64: z.ZodString;
|
|
225
|
-
path: z.ZodString;
|
|
226
|
-
contentType: z.ZodOptional<z.ZodString>;
|
|
227
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
228
|
-
contentBase64Chunks: z.ZodArray<z.ZodString>;
|
|
229
|
-
path: z.ZodString;
|
|
230
|
-
contentType: z.ZodOptional<z.ZodString>;
|
|
231
|
-
}, z.core.$strict>]>>;
|
|
232
|
-
notFound: z.ZodOptional<z.ZodEnum<{
|
|
233
|
-
"404-page": "404-page";
|
|
234
|
-
none: "none";
|
|
235
|
-
"single-page-application": "single-page-application";
|
|
236
|
-
}>>;
|
|
237
|
-
runWorkerFirst: z.ZodOptional<z.ZodBoolean>;
|
|
238
|
-
htmlHandling: z.ZodOptional<z.ZodLiteral<"none">>;
|
|
239
|
-
}, z.core.$strict>>;
|
|
240
|
-
limits: z.ZodOptional<z.ZodObject<{
|
|
241
|
-
cpuMs: z.ZodOptional<z.ZodNumber>;
|
|
242
|
-
subrequests: z.ZodOptional<z.ZodNumber>;
|
|
243
|
-
}, z.core.$strict>>;
|
|
244
|
-
serviceKey: z.ZodString;
|
|
245
|
-
}, z.core.$strict>;
|
|
246
|
-
export type DeployServiceInput = z.infer<typeof deployServiceInput>;
|
|
247
|
-
export declare const deployedService: z.ZodObject<{
|
|
248
|
-
id: z.ZodString;
|
|
249
|
-
serviceKey: z.ZodString;
|
|
250
|
-
url: z.ZodString;
|
|
251
|
-
digest: z.ZodString;
|
|
252
|
-
state: z.ZodLiteral<"ready">;
|
|
253
|
-
candidateReadiness: z.ZodOptional<z.ZodEnum<{
|
|
254
|
-
passed: "passed";
|
|
255
|
-
"unavailable-retained-secrets": "unavailable-retained-secrets";
|
|
256
|
-
}>>;
|
|
257
|
-
}, z.core.$strict>;
|
|
258
|
-
export declare const deploymentRejection: z.ZodObject<{
|
|
259
|
-
kind: z.ZodLiteral<"rejected">;
|
|
260
|
-
reason: z.ZodEnum<{
|
|
261
|
-
"artifact-mode-conflict": "artifact-mode-conflict";
|
|
262
|
-
"invalid-deployment": "invalid-deployment";
|
|
263
|
-
"service-unavailable": "service-unavailable";
|
|
264
|
-
}>;
|
|
265
|
-
message: z.ZodString;
|
|
266
|
-
}, z.core.$strict>;
|
|
267
|
-
export declare const deployServiceOutput: z.ZodUnion<readonly [z.ZodObject<{
|
|
268
|
-
id: z.ZodString;
|
|
269
|
-
serviceKey: z.ZodString;
|
|
270
|
-
url: z.ZodString;
|
|
271
|
-
digest: z.ZodString;
|
|
272
|
-
state: z.ZodLiteral<"ready">;
|
|
273
|
-
candidateReadiness: z.ZodOptional<z.ZodEnum<{
|
|
274
|
-
passed: "passed";
|
|
275
|
-
"unavailable-retained-secrets": "unavailable-retained-secrets";
|
|
276
|
-
}>>;
|
|
277
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
278
|
-
kind: z.ZodLiteral<"rejected">;
|
|
279
|
-
reason: z.ZodEnum<{
|
|
280
|
-
"artifact-mode-conflict": "artifact-mode-conflict";
|
|
281
|
-
"invalid-deployment": "invalid-deployment";
|
|
282
|
-
"service-unavailable": "service-unavailable";
|
|
283
|
-
}>;
|
|
284
|
-
message: z.ZodString;
|
|
285
|
-
}, z.core.$strict>]>;
|
|
286
|
-
export type DeployServiceOutput = z.infer<typeof deployServiceOutput>;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { artifactModule } from './service-deployment-artifact-module.js';
|
|
3
|
-
import { assetBundle } from './service-deployment-assets.js';
|
|
4
|
-
import { resourceLimits } from './service-deployment-resource-limits.js';
|
|
5
|
-
import { serviceReadiness } from './service-readiness.js';
|
|
6
|
-
export const artifact = z.strictObject({
|
|
7
|
-
entry: z.string().min(1).max(256),
|
|
8
|
-
modules: z.array(artifactModule).min(1).max(40),
|
|
9
|
-
});
|
|
10
|
-
export const revisionedDeployment = z.strictObject({
|
|
11
|
-
requiredSecrets: z.array(z.string().min(1).max(128)).max(64),
|
|
12
|
-
release: artifact,
|
|
13
|
-
readiness: serviceReadiness.optional(),
|
|
14
|
-
});
|
|
15
|
-
const deployServiceFields = {
|
|
16
|
-
name: z.string().min(1).max(256).optional(),
|
|
17
|
-
entry: z.string().min(1).max(256).optional(),
|
|
18
|
-
modules: z.array(artifactModule).min(1).max(40).optional(),
|
|
19
|
-
revisioned: revisionedDeployment.optional(),
|
|
20
|
-
compatibilityDate: z.string().min(1).max(32).optional(),
|
|
21
|
-
compatibilityFlags: z.array(z.string().min(1).max(128)).max(64).optional(),
|
|
22
|
-
serviceBindings: z
|
|
23
|
-
.array(z.strictObject({
|
|
24
|
-
name: z.string().min(1).max(64),
|
|
25
|
-
service: z.string().min(1).max(128),
|
|
26
|
-
}))
|
|
27
|
-
.max(32)
|
|
28
|
-
.optional(),
|
|
29
|
-
vars: z.record(z.string().max(256), z.string().max(64 * 1024)).optional(),
|
|
30
|
-
secrets: z.record(z.string().max(256), z.string().max(64 * 1024)).optional(),
|
|
31
|
-
assets: assetBundle.optional(),
|
|
32
|
-
limits: resourceLimits,
|
|
33
|
-
};
|
|
34
|
-
export const deployServiceInput = z.strictObject({
|
|
35
|
-
serviceKey: z.string().min(1).max(63),
|
|
36
|
-
...deployServiceFields,
|
|
37
|
-
});
|
|
38
|
-
export const deployedService = z.strictObject({
|
|
39
|
-
id: z.string().min(1),
|
|
40
|
-
serviceKey: z.string().min(1),
|
|
41
|
-
url: z.string(),
|
|
42
|
-
digest: z.string(),
|
|
43
|
-
state: z.literal('ready'),
|
|
44
|
-
candidateReadiness: z.enum(['passed', 'unavailable-retained-secrets']).optional(),
|
|
45
|
-
});
|
|
46
|
-
export const deploymentRejection = z.strictObject({
|
|
47
|
-
kind: z.literal('rejected'),
|
|
48
|
-
reason: z.enum(['invalid-deployment', 'service-unavailable', 'artifact-mode-conflict']),
|
|
49
|
-
message: z.string().min(1).max(500),
|
|
50
|
-
});
|
|
51
|
-
export const deployServiceOutput = z.union([deployedService, deploymentRejection]);
|