@astrale-domains/services 0.4.9 → 0.5.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/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 +2 -9
- 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,13 +0,0 @@
|
|
|
1
|
-
import { method } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { lastCallsInput, lastCallsOutput } from '../types/deployment-retention.js';
|
|
3
|
-
/**
|
|
4
|
-
* The last call of each deployment named, as the dispatcher counted it. The caller must hold
|
|
5
|
-
* every label's line; the registry Domain may read any label.
|
|
6
|
-
*/
|
|
7
|
-
export const readDeploymentLastCalls = method({
|
|
8
|
-
description: 'Read the instant of the last call of each named deployment.',
|
|
9
|
-
auth: 'authenticated',
|
|
10
|
-
static: true,
|
|
11
|
-
input: lastCallsInput,
|
|
12
|
-
output: lastCallsOutput,
|
|
13
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mark one deployment published, so it is served as long as it exists. Only the registry Domain
|
|
3
|
-
* marks, after the Publication that names the release; a line holder cannot keep its own preview.
|
|
4
|
-
*/
|
|
5
|
-
export declare const retainDeployment: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
6
|
-
label: string;
|
|
7
|
-
}, {
|
|
8
|
-
readonly mode: 'value';
|
|
9
|
-
readonly value: {
|
|
10
|
-
retention: "published";
|
|
11
|
-
};
|
|
12
|
-
}, "authenticated", true, false, undefined>>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { method } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { retainInput, retainOutput } from '../types/deployment-retention.js';
|
|
3
|
-
/**
|
|
4
|
-
* Mark one deployment published, so it is served as long as it exists. Only the registry Domain
|
|
5
|
-
* marks, after the Publication that names the release; a line holder cannot keep its own preview.
|
|
6
|
-
*/
|
|
7
|
-
export const retainDeployment = method({
|
|
8
|
-
description: 'Mark one deployment published so that it never expires.',
|
|
9
|
-
auth: 'authenticated',
|
|
10
|
-
static: true,
|
|
11
|
-
input: retainInput,
|
|
12
|
-
output: retainOutput,
|
|
13
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Only the holder of the deployment's line, or an Identity acting for it, rewrites its secrets:
|
|
3
|
-
* the handler asks the Kernel `OwnDeployment` for the caller before it reads the deployment.
|
|
4
|
-
*/
|
|
5
|
-
export declare const setCloudflareDeploymentSecret: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
6
|
-
name: string;
|
|
7
|
-
value: string;
|
|
8
|
-
}, {
|
|
9
|
-
readonly mode: 'value';
|
|
10
|
-
readonly value: {
|
|
11
|
-
name: string;
|
|
12
|
-
} | {
|
|
13
|
-
kind: "rejected";
|
|
14
|
-
reason: "secret-undeclared" | "service-unavailable";
|
|
15
|
-
message: string;
|
|
16
|
-
retryAfter?: string | undefined;
|
|
17
|
-
};
|
|
18
|
-
}, "authenticated", false, false, undefined>>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { method } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { setDeploymentSecretContract } from '../types/deployment-secret.js';
|
|
3
|
-
/**
|
|
4
|
-
* Only the holder of the deployment's line, or an Identity acting for it, rewrites its secrets:
|
|
5
|
-
* the handler asks the Kernel `OwnDeployment` for the caller before it reads the deployment.
|
|
6
|
-
*/
|
|
7
|
-
export const setCloudflareDeploymentSecret = method(setDeploymentSecretContract);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare const setDeploymentSecret: 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
|
-
name: string;
|
|
8
|
-
} | {
|
|
9
|
-
kind: "rejected";
|
|
10
|
-
reason: "secret-undeclared" | "service-unavailable";
|
|
11
|
-
message: string;
|
|
12
|
-
retryAfter?: string | undefined;
|
|
13
|
-
};
|
|
14
|
-
}, "authenticated", false, true, undefined>>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The subject is this organisation, or an Identity acting for it: a member or a CI identity
|
|
3
|
-
* reaches its organisation through `extends_with`, which the Kernel expands for the subject. Deploy
|
|
4
|
-
* asks it of the caller, on the organisation it names, before registering a line for it.
|
|
5
|
-
*/
|
|
6
|
-
export declare const ActForOrganization: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { policy } from '@astrale-os/sdk/schema';
|
|
2
|
-
/**
|
|
3
|
-
* The subject is this organisation, or an Identity acting for it: a member or a CI identity
|
|
4
|
-
* reaches its organisation through `extends_with`, which the Kernel expands for the subject. Deploy
|
|
5
|
-
* asks it of the caller, on the organisation it names, before registering a line for it.
|
|
6
|
-
*/
|
|
7
|
-
export const ActForOrganization = policy({
|
|
8
|
-
description: 'The subject is this organisation or acts for it through extends_with.',
|
|
9
|
-
match: ({ sameNode, subject, object }) => sameNode(subject, object),
|
|
10
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { policy } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { line_owned_by } from '../classes/line-owned-by.js';
|
|
3
|
-
/**
|
|
4
|
-
* The organisation holding a line, and every Identity that acts for it: a member or a CI identity
|
|
5
|
-
* reaches it through its `extends_with` composition, never through a second rule here.
|
|
6
|
-
*/
|
|
7
|
-
export const OwnLine = policy({
|
|
8
|
-
description: 'The subject holds this deployment line.',
|
|
9
|
-
match: ({ edge, object, subject }) => edge({ source: object, class: () => line_owned_by, target: subject }),
|
|
10
|
-
});
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { policy } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { line_owned_by } from '../classes/line-owned-by.js';
|
|
3
|
-
/** A deployment's line relationship is visible only to the holder of that line. */
|
|
4
|
-
export const TraverseOwnedLineDeployment = policy({
|
|
5
|
-
description: 'The subject holds the deployment line at the target of this relationship.',
|
|
6
|
-
match: ({ edge, subject, target }) => edge({ source: target, class: () => line_owned_by, target: subject }),
|
|
7
|
-
});
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { policy } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { line_owned_by } from '../classes/line-owned-by.js';
|
|
3
|
-
/** A line's holder relationship is visible only to the holder of that line. */
|
|
4
|
-
export const TraverseOwnedLine = policy({
|
|
5
|
-
description: 'The subject holds the deployment line at the source of this relationship.',
|
|
6
|
-
match: ({ edge, source, subject }) => edge({ source, class: () => line_owned_by, target: subject }),
|
|
7
|
-
});
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
/** A preview expires 30 days after its last call; a published deployment is retained. */
|
|
3
|
-
export declare const deploymentRetention: z.ZodEnum<{
|
|
4
|
-
preview: "preview";
|
|
5
|
-
published: "published";
|
|
6
|
-
}>;
|
|
7
|
-
/** Why a deployment left: an expired preview can be revived, a withdrawn one never. */
|
|
8
|
-
export declare const deploymentRetirement: z.ZodEnum<{
|
|
9
|
-
expired: "expired";
|
|
10
|
-
withdrawn: "withdrawn";
|
|
11
|
-
}>;
|
|
12
|
-
/**
|
|
13
|
-
* One deployment label, `<line>-<content16>`, as `deploymentLabel` produces it: lower-case, at
|
|
14
|
-
* most 57 characters. Handlers admit it again with `parseDeploymentLabel`.
|
|
15
|
-
*/
|
|
16
|
-
export declare const deploymentLabel: z.ZodString;
|
|
17
|
-
/** The most labels one `lastCalls` reads. */
|
|
18
|
-
export declare const MAXIMUM_LAST_CALL_LABELS = 100;
|
|
19
|
-
export declare const lastCallsInput: z.ZodObject<{
|
|
20
|
-
labels: z.ZodArray<z.ZodString>;
|
|
21
|
-
}, z.core.$strict>;
|
|
22
|
-
/** The instant of each label's last call, or null when none was ever recorded. */
|
|
23
|
-
export declare const lastCallsOutput: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>;
|
|
24
|
-
/** The most deployment writes one `expirePreviews` makes; the rest waits for the next pass. */
|
|
25
|
-
export declare const MAXIMUM_PREVIEW_EXPIRY_WRITES = 256;
|
|
26
|
-
export declare const expirePreviewsInput: z.ZodObject<{
|
|
27
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
28
|
-
apply: z.ZodOptional<z.ZodBoolean>;
|
|
29
|
-
}, z.core.$strict>;
|
|
30
|
-
/**
|
|
31
|
-
* One expiry pass. `planned`: previews past their expiry this pass did not retire. `retired`:
|
|
32
|
-
* previews this pass retired. `pending`: expired previews whose retirement started and waits for
|
|
33
|
-
* the dispatcher to answer `DEPLOYMENT_RETIRED` everywhere before their script is deleted.
|
|
34
|
-
*/
|
|
35
|
-
export declare const expirePreviewsOutput: z.ZodObject<{
|
|
36
|
-
planned: z.ZodArray<z.ZodString>;
|
|
37
|
-
retired: z.ZodArray<z.ZodString>;
|
|
38
|
-
pending: z.ZodArray<z.ZodString>;
|
|
39
|
-
}, z.core.$strict>;
|
|
40
|
-
export declare const retainInput: z.ZodObject<{
|
|
41
|
-
label: z.ZodString;
|
|
42
|
-
}, z.core.$strict>;
|
|
43
|
-
/** A retained deployment is published: monotonic, it never becomes a preview again. */
|
|
44
|
-
export declare const retainOutput: z.ZodObject<{
|
|
45
|
-
retention: z.ZodLiteral<"published">;
|
|
46
|
-
}, z.core.$strict>;
|
|
47
|
-
export type DeploymentRetention = z.output<typeof deploymentRetention>;
|
|
48
|
-
export type DeploymentRetirement = z.output<typeof deploymentRetirement>;
|
|
49
|
-
export type ExpirePreviewsResult = z.output<typeof expirePreviewsOutput>;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { fullMatch } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
/** A preview expires 30 days after its last call; a published deployment is retained. */
|
|
4
|
-
export const deploymentRetention = z.enum(['preview', 'published']);
|
|
5
|
-
/** Why a deployment left: an expired preview can be revived, a withdrawn one never. */
|
|
6
|
-
export const deploymentRetirement = z.enum(['expired', 'withdrawn']);
|
|
7
|
-
/** An ISO 8601 instant, as the graph's instant values read. */
|
|
8
|
-
const instant = z.string().min(1).max(64);
|
|
9
|
-
/**
|
|
10
|
-
* One deployment label, `<line>-<content16>`, as `deploymentLabel` produces it: lower-case, at
|
|
11
|
-
* most 57 characters. Handlers admit it again with `parseDeploymentLabel`.
|
|
12
|
-
*/
|
|
13
|
-
export const deploymentLabel = z
|
|
14
|
-
.string()
|
|
15
|
-
.min(33)
|
|
16
|
-
.max(57)
|
|
17
|
-
.check(fullMatch('([a-z0-9]+(-[a-z0-9]+)*-)?[a-z2-7]{16}-[a-z2-7]{16}'));
|
|
18
|
-
/** The most labels one `lastCalls` reads. */
|
|
19
|
-
export const MAXIMUM_LAST_CALL_LABELS = 100;
|
|
20
|
-
export const lastCallsInput = z.strictObject({
|
|
21
|
-
labels: z.array(deploymentLabel).min(1).max(MAXIMUM_LAST_CALL_LABELS),
|
|
22
|
-
});
|
|
23
|
-
/** The instant of each label's last call, or null when none was ever recorded. */
|
|
24
|
-
export const lastCallsOutput = z.record(z.string(), instant.nullable());
|
|
25
|
-
/** The most deployment writes one `expirePreviews` makes; the rest waits for the next pass. */
|
|
26
|
-
export const MAXIMUM_PREVIEW_EXPIRY_WRITES = 256;
|
|
27
|
-
export const expirePreviewsInput = z.strictObject({
|
|
28
|
-
/** Deployment writes this pass may make, retirements first; 64 when absent. */
|
|
29
|
-
limit: z.number().int().min(1).max(MAXIMUM_PREVIEW_EXPIRY_WRITES).optional(),
|
|
30
|
-
/** Retire what the plan lists; honoured only where `SERVICES_PREVIEW_EXPIRY` is `enforce`. */
|
|
31
|
-
apply: z.boolean().optional(),
|
|
32
|
-
});
|
|
33
|
-
/**
|
|
34
|
-
* One expiry pass. `planned`: previews past their expiry this pass did not retire. `retired`:
|
|
35
|
-
* previews this pass retired. `pending`: expired previews whose retirement started and waits for
|
|
36
|
-
* the dispatcher to answer `DEPLOYMENT_RETIRED` everywhere before their script is deleted.
|
|
37
|
-
*/
|
|
38
|
-
export const expirePreviewsOutput = z.strictObject({
|
|
39
|
-
planned: z.array(z.string()),
|
|
40
|
-
retired: z.array(z.string()),
|
|
41
|
-
pending: z.array(z.string()),
|
|
42
|
-
});
|
|
43
|
-
export const retainInput = z.strictObject({ label: deploymentLabel });
|
|
44
|
-
/** A retained deployment is published: monotonic, it never becomes a preview again. */
|
|
45
|
-
export const retainOutput = z.strictObject({ retention: z.literal('published') });
|
|
@@ -1,352 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const CloudflareWorker: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
|
|
3
|
-
readonly description: "One Service placed in a Cloudflare Workers dispatch namespace.";
|
|
4
|
-
readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
|
|
5
|
-
readonly extends: readonly [import("@astrale-os/sdk/schema").AuthoredNodeClass<{
|
|
6
|
-
readonly abstract: true;
|
|
7
|
-
readonly description: "One caller-owned provider-neutral deployed Service.";
|
|
8
|
-
readonly icon: import("@astrale-os/sdk/schema").ClassIcon;
|
|
9
|
-
readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Named">, import("@astrale-os/sdk/schema").KernelClass<"Descriptable">, import("@astrale-os/sdk/schema").KernelClass<"Timestamped">];
|
|
10
|
-
readonly properties: {
|
|
11
|
-
providerName: z.ZodString;
|
|
12
|
-
serviceKey: z.ZodString;
|
|
13
|
-
url: import("@astrale-os/sdk/schema").AuthoredProperty<z.ZodString, {
|
|
14
|
-
readonly required: false;
|
|
15
|
-
}>;
|
|
16
|
-
state: import("@astrale-os/sdk/schema").StateProperty<import("@astrale-os/sdk/schema").StateMachine<{
|
|
17
|
-
readonly deploying: {
|
|
18
|
-
readonly recordProviderDeployment: "reconciling";
|
|
19
|
-
readonly failDeployment: "failed";
|
|
20
|
-
readonly rejectDeployment: "ready";
|
|
21
|
-
readonly deleteService: "deleting";
|
|
22
|
-
};
|
|
23
|
-
readonly reconciling: {
|
|
24
|
-
readonly retryDeployment: "deploying";
|
|
25
|
-
readonly completeDeployment: "ready";
|
|
26
|
-
readonly deleteService: "deleting";
|
|
27
|
-
};
|
|
28
|
-
readonly ready: {
|
|
29
|
-
readonly redeploy: "deploying";
|
|
30
|
-
readonly deleteService: "deleting";
|
|
31
|
-
};
|
|
32
|
-
readonly failed: {
|
|
33
|
-
readonly retryDeployment: "deploying";
|
|
34
|
-
readonly deleteService: "deleting";
|
|
35
|
-
};
|
|
36
|
-
readonly deleting: {};
|
|
37
|
-
}, "deploying">, {
|
|
38
|
-
required?: boolean;
|
|
39
|
-
description?: string;
|
|
40
|
-
}>;
|
|
41
|
-
digest: import("@astrale-os/sdk/schema").AuthoredProperty<z.ZodString, {
|
|
42
|
-
readonly required: false;
|
|
43
|
-
}>;
|
|
44
|
-
deploymentReceipt: import("@astrale-os/sdk/schema").AuthoredProperty<z.ZodString, {
|
|
45
|
-
readonly required: false;
|
|
46
|
-
}>;
|
|
47
|
-
operationExpiresAt: import("@astrale-os/sdk/schema").AuthoredProperty<Readonly<{
|
|
48
|
-
readonly type: 'string';
|
|
49
|
-
readonly 'x-astrale-value-kind': 'instant';
|
|
50
|
-
}>, {
|
|
51
|
-
readonly required: false;
|
|
52
|
-
}>;
|
|
53
|
-
error: import("@astrale-os/sdk/schema").AuthoredProperty<z.ZodString, {
|
|
54
|
-
readonly required: false;
|
|
55
|
-
}>;
|
|
56
|
-
};
|
|
57
|
-
readonly methods: {
|
|
58
|
-
setSecret: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
59
|
-
name: string;
|
|
60
|
-
value: string;
|
|
61
|
-
}, {
|
|
62
|
-
readonly mode: 'value';
|
|
63
|
-
readonly value: {
|
|
64
|
-
name: string;
|
|
65
|
-
} | {
|
|
66
|
-
kind: "rejected";
|
|
67
|
-
reason: "binding-unavailable" | "invalid-secret-name" | "service-unavailable";
|
|
68
|
-
};
|
|
69
|
-
}, "authorized", false, true, undefined>>;
|
|
70
|
-
deleteSecret: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
71
|
-
name: string;
|
|
72
|
-
}, {
|
|
73
|
-
readonly mode: 'value';
|
|
74
|
-
readonly value: {
|
|
75
|
-
kind: "rejected";
|
|
76
|
-
reason: "binding-unavailable" | "invalid-secret-name" | "service-unavailable";
|
|
77
|
-
} | {
|
|
78
|
-
ok: true;
|
|
79
|
-
};
|
|
80
|
-
}, "authorized", false, true, undefined>>;
|
|
81
|
-
secrets: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
82
|
-
readonly mode: 'value';
|
|
83
|
-
readonly value: string[];
|
|
84
|
-
}, "authorized", false, true, undefined>>;
|
|
85
|
-
setSchedule: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
86
|
-
crons: string[];
|
|
87
|
-
}, {
|
|
88
|
-
readonly mode: 'value';
|
|
89
|
-
readonly value: {
|
|
90
|
-
crons: string[];
|
|
91
|
-
} | {
|
|
92
|
-
kind: "rejected";
|
|
93
|
-
reason: "invalid-schedule" | "service-unavailable";
|
|
94
|
-
};
|
|
95
|
-
}, "authorized", false, true, undefined>>;
|
|
96
|
-
schedules: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
97
|
-
readonly mode: 'value';
|
|
98
|
-
readonly value: string[];
|
|
99
|
-
}, "authorized", false, true, undefined>>;
|
|
100
|
-
logs: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
101
|
-
tail?: number | undefined;
|
|
102
|
-
since?: number | undefined;
|
|
103
|
-
}, {
|
|
104
|
-
readonly mode: 'value';
|
|
105
|
-
readonly value: {
|
|
106
|
-
id: string;
|
|
107
|
-
ts: number;
|
|
108
|
-
level: string;
|
|
109
|
-
line: string;
|
|
110
|
-
}[];
|
|
111
|
-
}, "authorized", false, true, undefined>>;
|
|
112
|
-
delete: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
113
|
-
readonly mode: 'value';
|
|
114
|
-
readonly value: {
|
|
115
|
-
kind: "deleted";
|
|
116
|
-
} | {
|
|
117
|
-
kind: "deleting";
|
|
118
|
-
retryAfterMs: number;
|
|
119
|
-
};
|
|
120
|
-
}, "authorized", false, true, undefined>>;
|
|
121
|
-
};
|
|
122
|
-
}>];
|
|
123
|
-
readonly properties: {
|
|
124
|
-
deploymentMode: z.ZodEnum<{
|
|
125
|
-
plain: "plain";
|
|
126
|
-
revisioned: "revisioned";
|
|
127
|
-
}>;
|
|
128
|
-
tenantDomainDetachedAt: import("@astrale-os/sdk/schema").AuthoredProperty<Readonly<{
|
|
129
|
-
readonly type: 'string';
|
|
130
|
-
readonly 'x-astrale-value-kind': 'instant';
|
|
131
|
-
}>, {
|
|
132
|
-
readonly required: false;
|
|
133
|
-
}>;
|
|
134
|
-
tenantDomainState: import("@astrale-os/sdk/schema").AuthoredProperty<z.ZodEnum<{
|
|
135
|
-
absent: "absent";
|
|
136
|
-
attached: "attached";
|
|
137
|
-
unresolved: "unresolved";
|
|
138
|
-
}>, {
|
|
139
|
-
readonly required: false;
|
|
140
|
-
}>;
|
|
141
|
-
tenantDomainId: import("@astrale-os/sdk/schema").AuthoredProperty<z.ZodString, {
|
|
142
|
-
readonly required: false;
|
|
143
|
-
}>;
|
|
144
|
-
tenantCertificatePackId: import("@astrale-os/sdk/schema").AuthoredProperty<z.ZodString, {
|
|
145
|
-
readonly required: false;
|
|
146
|
-
}>;
|
|
147
|
-
tenantZoneId: import("@astrale-os/sdk/schema").AuthoredProperty<z.ZodString, {
|
|
148
|
-
readonly required: false;
|
|
149
|
-
}>;
|
|
150
|
-
};
|
|
151
|
-
readonly methods: {
|
|
152
|
-
deploy: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
153
|
-
name?: string | undefined;
|
|
154
|
-
entry?: string | undefined;
|
|
155
|
-
modules?: ({
|
|
156
|
-
name: string;
|
|
157
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
158
|
-
content: {
|
|
159
|
-
encoding: "gzip" | "identity";
|
|
160
|
-
decodedSize: number;
|
|
161
|
-
contentBase64: string;
|
|
162
|
-
} | {
|
|
163
|
-
encoding: "gzip" | "identity";
|
|
164
|
-
decodedSize: number;
|
|
165
|
-
contentBase64Chunks: string[];
|
|
166
|
-
};
|
|
167
|
-
} | {
|
|
168
|
-
contentBase64: string;
|
|
169
|
-
name: string;
|
|
170
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
171
|
-
} | {
|
|
172
|
-
contentBase64Chunks: string[];
|
|
173
|
-
name: string;
|
|
174
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
175
|
-
})[] | undefined;
|
|
176
|
-
revisioned?: {
|
|
177
|
-
requiredSecrets: string[];
|
|
178
|
-
release: {
|
|
179
|
-
entry: string;
|
|
180
|
-
modules: ({
|
|
181
|
-
name: string;
|
|
182
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
183
|
-
content: {
|
|
184
|
-
encoding: "gzip" | "identity";
|
|
185
|
-
decodedSize: number;
|
|
186
|
-
contentBase64: string;
|
|
187
|
-
} | {
|
|
188
|
-
encoding: "gzip" | "identity";
|
|
189
|
-
decodedSize: number;
|
|
190
|
-
contentBase64Chunks: string[];
|
|
191
|
-
};
|
|
192
|
-
} | {
|
|
193
|
-
contentBase64: string;
|
|
194
|
-
name: string;
|
|
195
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
196
|
-
} | {
|
|
197
|
-
contentBase64Chunks: string[];
|
|
198
|
-
name: string;
|
|
199
|
-
kind?: "data" | "esm" | "text" | "wasm" | undefined;
|
|
200
|
-
})[];
|
|
201
|
-
};
|
|
202
|
-
readiness?: {
|
|
203
|
-
paths: string[];
|
|
204
|
-
required?: boolean | undefined;
|
|
205
|
-
} | undefined;
|
|
206
|
-
} | undefined;
|
|
207
|
-
compatibilityDate?: string | undefined;
|
|
208
|
-
compatibilityFlags?: string[] | undefined;
|
|
209
|
-
serviceBindings?: {
|
|
210
|
-
name: string;
|
|
211
|
-
service: string;
|
|
212
|
-
}[] | undefined;
|
|
213
|
-
vars?: Record<string, string> | undefined;
|
|
214
|
-
secrets?: Record<string, string> | undefined;
|
|
215
|
-
assets?: {
|
|
216
|
-
files: ({
|
|
217
|
-
path: string;
|
|
218
|
-
contentType?: string | undefined;
|
|
219
|
-
content: {
|
|
220
|
-
encoding: "gzip" | "identity";
|
|
221
|
-
decodedSize: number;
|
|
222
|
-
contentBase64: string;
|
|
223
|
-
} | {
|
|
224
|
-
encoding: "gzip" | "identity";
|
|
225
|
-
decodedSize: number;
|
|
226
|
-
contentBase64Chunks: string[];
|
|
227
|
-
};
|
|
228
|
-
} | {
|
|
229
|
-
contentBase64: string;
|
|
230
|
-
path: string;
|
|
231
|
-
contentType?: string | undefined;
|
|
232
|
-
} | {
|
|
233
|
-
contentBase64Chunks: string[];
|
|
234
|
-
path: string;
|
|
235
|
-
contentType?: string | undefined;
|
|
236
|
-
})[];
|
|
237
|
-
notFound?: "404-page" | "none" | "single-page-application" | undefined;
|
|
238
|
-
runWorkerFirst?: boolean | undefined;
|
|
239
|
-
htmlHandling?: "none" | undefined;
|
|
240
|
-
} | undefined;
|
|
241
|
-
limits?: {
|
|
242
|
-
cpuMs?: number | undefined;
|
|
243
|
-
subrequests?: number | undefined;
|
|
244
|
-
} | undefined;
|
|
245
|
-
serviceKey: string;
|
|
246
|
-
}, {
|
|
247
|
-
readonly mode: 'value';
|
|
248
|
-
readonly value: {
|
|
249
|
-
id: string;
|
|
250
|
-
serviceKey: string;
|
|
251
|
-
url: string;
|
|
252
|
-
digest: string;
|
|
253
|
-
state: "ready";
|
|
254
|
-
candidateReadiness?: "passed" | "unavailable-retained-secrets" | undefined;
|
|
255
|
-
} | {
|
|
256
|
-
kind: "rejected";
|
|
257
|
-
reason: "artifact-mode-conflict" | "invalid-deployment" | "service-unavailable";
|
|
258
|
-
message: string;
|
|
259
|
-
};
|
|
260
|
-
}, "authenticated", true, false, undefined>>;
|
|
261
|
-
migrateIngress: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
262
|
-
action: "complete" | "detach" | "restore";
|
|
263
|
-
probe: {
|
|
264
|
-
path: string;
|
|
265
|
-
status: number;
|
|
266
|
-
bodySha256: string;
|
|
267
|
-
};
|
|
268
|
-
}, {
|
|
269
|
-
readonly mode: 'value';
|
|
270
|
-
readonly value: {
|
|
271
|
-
kind: "detached";
|
|
272
|
-
detachedAt: string;
|
|
273
|
-
} | {
|
|
274
|
-
kind: "migrated";
|
|
275
|
-
} | {
|
|
276
|
-
kind: "restored";
|
|
277
|
-
} | {
|
|
278
|
-
kind: "pending";
|
|
279
|
-
retryAfterMs: number;
|
|
280
|
-
} | {
|
|
281
|
-
kind: "rejected";
|
|
282
|
-
reason: "missing-location" | "not-detached" | "service-unavailable";
|
|
283
|
-
};
|
|
284
|
-
}, "authorized", false, false, undefined>>;
|
|
285
|
-
setSecret: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
286
|
-
name: string;
|
|
287
|
-
value: string;
|
|
288
|
-
}, {
|
|
289
|
-
readonly mode: 'value';
|
|
290
|
-
readonly value: {
|
|
291
|
-
name: string;
|
|
292
|
-
} | {
|
|
293
|
-
kind: "rejected";
|
|
294
|
-
reason: "binding-unavailable" | "invalid-secret-name" | "service-unavailable";
|
|
295
|
-
};
|
|
296
|
-
}, "authorized", false, false, undefined>>;
|
|
297
|
-
deleteSecret: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
298
|
-
name: string;
|
|
299
|
-
}, {
|
|
300
|
-
readonly mode: 'value';
|
|
301
|
-
readonly value: {
|
|
302
|
-
kind: "rejected";
|
|
303
|
-
reason: "binding-unavailable" | "invalid-secret-name" | "service-unavailable";
|
|
304
|
-
} | {
|
|
305
|
-
ok: true;
|
|
306
|
-
};
|
|
307
|
-
}, "authorized", false, false, undefined>>;
|
|
308
|
-
secrets: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
309
|
-
readonly mode: 'value';
|
|
310
|
-
readonly value: string[];
|
|
311
|
-
}, "authorized", false, false, undefined>>;
|
|
312
|
-
setSchedule: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
313
|
-
crons: string[];
|
|
314
|
-
}, {
|
|
315
|
-
readonly mode: 'value';
|
|
316
|
-
readonly value: {
|
|
317
|
-
crons: string[];
|
|
318
|
-
} | {
|
|
319
|
-
kind: "rejected";
|
|
320
|
-
reason: "invalid-schedule" | "service-unavailable";
|
|
321
|
-
};
|
|
322
|
-
}, "authorized", false, false, undefined>>;
|
|
323
|
-
schedules: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
324
|
-
readonly mode: 'value';
|
|
325
|
-
readonly value: string[];
|
|
326
|
-
}, "authorized", false, false, undefined>>;
|
|
327
|
-
logs: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
328
|
-
tail?: number | undefined;
|
|
329
|
-
since?: number | undefined;
|
|
330
|
-
}, {
|
|
331
|
-
readonly mode: 'value';
|
|
332
|
-
readonly value: {
|
|
333
|
-
id: string;
|
|
334
|
-
ts: number;
|
|
335
|
-
level: string;
|
|
336
|
-
line: string;
|
|
337
|
-
}[];
|
|
338
|
-
}, "authorized", false, false, undefined>>;
|
|
339
|
-
delete: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
340
|
-
readonly mode: 'value';
|
|
341
|
-
readonly value: {
|
|
342
|
-
kind: "deleted";
|
|
343
|
-
} | {
|
|
344
|
-
kind: "deleting";
|
|
345
|
-
retryAfterMs: number;
|
|
346
|
-
};
|
|
347
|
-
}, "authorized", false, false, undefined>>;
|
|
348
|
-
};
|
|
349
|
-
readonly policies: {
|
|
350
|
-
read: import("@astrale-os/sdk/schema").Policy;
|
|
351
|
-
};
|
|
352
|
-
}>;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { classIcon, nodeClass, property, schema as valueSchema } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { CloudCog } from '@astrale-os/sdk/schema/icons';
|
|
3
|
-
import { z } from 'zod';
|
|
4
|
-
import { deleteWorkerSecret } from '../functions/delete-worker-secret.js';
|
|
5
|
-
import { deleteWorker } from '../functions/delete-worker.js';
|
|
6
|
-
import { deployCloudflareWorker } from '../functions/deploy-cloudflare-worker.js';
|
|
7
|
-
import { listWorkerLogs } from '../functions/list-worker-logs.js';
|
|
8
|
-
import { listWorkerSchedules } from '../functions/list-worker-schedules.js';
|
|
9
|
-
import { listWorkerSecretNames } from '../functions/list-worker-secret-names.js';
|
|
10
|
-
import { migrateWorkerIngress } from '../functions/migrate-worker-ingress.js';
|
|
11
|
-
import { replaceWorkerSchedules } from '../functions/replace-worker-schedules.js';
|
|
12
|
-
import { setWorkerSecret } from '../functions/set-worker-secret.js';
|
|
13
|
-
import { OwnService } from '../policies/own-service.js';
|
|
14
|
-
import { Service } from './service.js';
|
|
15
|
-
export const CloudflareWorker = nodeClass({
|
|
16
|
-
description: 'One Service placed in a Cloudflare Workers dispatch namespace.',
|
|
17
|
-
icon: classIcon.lucide(CloudCog),
|
|
18
|
-
extends: [Service],
|
|
19
|
-
properties: {
|
|
20
|
-
deploymentMode: z.enum(['plain', 'revisioned']),
|
|
21
|
-
tenantDomainDetachedAt: property(valueSchema.values.instant, { required: false }),
|
|
22
|
-
tenantDomainState: property(z.enum(['unresolved', 'absent', 'attached']), {
|
|
23
|
-
required: false,
|
|
24
|
-
}),
|
|
25
|
-
tenantDomainId: property(z.string().min(1).max(128), { required: false }),
|
|
26
|
-
tenantCertificatePackId: property(z.string().min(1).max(128), { required: false }),
|
|
27
|
-
tenantZoneId: property(z.string().min(1).max(128), { required: false }),
|
|
28
|
-
},
|
|
29
|
-
methods: {
|
|
30
|
-
deploy: deployCloudflareWorker,
|
|
31
|
-
migrateIngress: migrateWorkerIngress,
|
|
32
|
-
setSecret: setWorkerSecret,
|
|
33
|
-
deleteSecret: deleteWorkerSecret,
|
|
34
|
-
secrets: listWorkerSecretNames,
|
|
35
|
-
setSchedule: replaceWorkerSchedules,
|
|
36
|
-
schedules: listWorkerSchedules,
|
|
37
|
-
logs: listWorkerLogs,
|
|
38
|
-
delete: deleteWorker,
|
|
39
|
-
},
|
|
40
|
-
policies: { read: OwnService },
|
|
41
|
-
});
|
|
@@ -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>>;
|