@xemahq/contracts 0.82.0 → 0.83.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.source-stamp.json +2 -2
- package/dist/address/lib/resource-instance-address.d.ts.map +1 -1
- package/dist/address/lib/resource-instance-address.js.map +1 -1
- package/dist/agent-composition/lib/agent-ref-resolution.d.ts.map +1 -1
- package/dist/agent-composition/lib/agent-ref-resolution.js.map +1 -1
- package/dist/agent-composition/lib/agent.d.ts.map +1 -1
- package/dist/agent-composition/lib/agent.js.map +1 -1
- package/dist/agent-session/lib/lifecycle.d.ts +1 -1
- package/dist/biome/lib/biome-component.d.ts +24 -0
- package/dist/biome/lib/biome-component.d.ts.map +1 -1
- package/dist/biome/lib/biome-component.js +69 -14
- package/dist/biome/lib/biome-component.js.map +1 -1
- package/dist/biome/lib/biome-kind.d.ts.map +1 -1
- package/dist/biome/lib/biome-kind.js.map +1 -1
- package/dist/biome/lib/biome-manifest.d.ts +94 -0
- package/dist/biome/lib/biome-manifest.d.ts.map +1 -1
- package/dist/biome/lib/biome-manifest.js +26 -1
- package/dist/biome/lib/biome-manifest.js.map +1 -1
- package/dist/biome/xema-biome.schema.json +214 -2
- package/dist/biome-catalog/lib/biome-permission-digest.d.ts +18 -0
- package/dist/biome-catalog/lib/biome-permission-digest.d.ts.map +1 -1
- package/dist/biome-catalog/lib/biome-permission-digest.js +14 -0
- package/dist/biome-catalog/lib/biome-permission-digest.js.map +1 -1
- package/dist/biome-dependency/lib/peer-seam-table.d.ts.map +1 -1
- package/dist/biome-dependency/lib/peer-seam-table.js +18 -0
- package/dist/biome-dependency/lib/peer-seam-table.js.map +1 -1
- package/dist/caller-context/index.d.ts +2 -0
- package/dist/caller-context/index.d.ts.map +1 -1
- package/dist/caller-context/index.js +2 -0
- package/dist/caller-context/index.js.map +1 -1
- package/dist/caller-context/lib/acting-chain.d.ts +20 -0
- package/dist/caller-context/lib/acting-chain.d.ts.map +1 -0
- package/dist/caller-context/lib/acting-chain.js +46 -0
- package/dist/caller-context/lib/acting-chain.js.map +1 -0
- package/dist/caller-context/lib/org-authority.d.ts.map +1 -1
- package/dist/caller-context/lib/org-authority.js.map +1 -1
- package/dist/caller-context/lib/platform-sweep.d.ts +5 -1
- package/dist/caller-context/lib/platform-sweep.d.ts.map +1 -1
- package/dist/caller-context/lib/platform-sweep.js +10 -0
- package/dist/caller-context/lib/platform-sweep.js.map +1 -1
- package/dist/caller-context/lib/request-context.d.ts +2 -0
- package/dist/caller-context/lib/request-context.d.ts.map +1 -1
- package/dist/caller-context/lib/request-context.js.map +1 -1
- package/dist/caller-context/lib/workflow-step-credential.d.ts +120 -0
- package/dist/caller-context/lib/workflow-step-credential.d.ts.map +1 -0
- package/dist/caller-context/lib/workflow-step-credential.js +169 -0
- package/dist/caller-context/lib/workflow-step-credential.js.map +1 -0
- package/dist/capability/index.d.ts +3 -3
- package/dist/capability/index.d.ts.map +1 -1
- package/dist/capability/index.js +3 -3
- package/dist/capability/index.js.map +1 -1
- package/dist/capability/lib/capability-aperture.js +1 -1
- package/dist/capability/lib/capability-aperture.js.map +1 -1
- package/dist/capability/lib/capability-caller-constraint.d.ts +23 -0
- package/dist/capability/lib/capability-caller-constraint.d.ts.map +1 -0
- package/dist/capability/lib/capability-caller-constraint.js +45 -0
- package/dist/capability/lib/capability-caller-constraint.js.map +1 -0
- package/dist/capability/lib/capability-contribution.d.ts +3 -0
- package/dist/capability/lib/capability-contribution.d.ts.map +1 -1
- package/dist/capability/lib/capability-contribution.js +11 -0
- package/dist/capability/lib/capability-contribution.js.map +1 -1
- package/dist/capability/lib/capability-ref-error.d.ts +12 -0
- package/dist/capability/lib/capability-ref-error.d.ts.map +1 -0
- package/dist/capability/lib/capability-ref-error.js +18 -0
- package/dist/capability/lib/capability-ref-error.js.map +1 -0
- package/dist/capability/lib/capability-ref.js +7 -7
- package/dist/capability/lib/capability-ref.js.map +1 -1
- package/dist/capability/lib/connector-capability-ref.js +4 -4
- package/dist/capability/lib/connector-capability-ref.js.map +1 -1
- package/dist/capability-domain/index.d.ts +2 -0
- package/dist/capability-domain/index.d.ts.map +1 -0
- package/dist/capability-domain/index.js +18 -0
- package/dist/capability-domain/index.js.map +1 -0
- package/dist/capability-domain/lib/capability-domain.d.ts.map +1 -0
- package/dist/capability-domain/lib/capability-domain.js.map +1 -0
- package/dist/capability-error/index.d.ts +3 -0
- package/dist/capability-error/index.d.ts.map +1 -0
- package/dist/capability-error/index.js +19 -0
- package/dist/capability-error/index.js.map +1 -0
- package/dist/capability-error/lib/capability-invocation-descriptor.d.ts.map +1 -0
- package/dist/{capability → capability-error}/lib/capability-invocation-descriptor.js +2 -2
- package/dist/capability-error/lib/capability-invocation-descriptor.js.map +1 -0
- package/dist/{capability → capability-error}/lib/errors.d.ts +3 -7
- package/dist/capability-error/lib/errors.d.ts.map +1 -0
- package/dist/{capability → capability-error}/lib/errors.js +4 -12
- package/dist/capability-error/lib/errors.js.map +1 -0
- package/dist/capability-projection/lib/projected-capability.d.ts +1 -0
- package/dist/capability-projection/lib/projected-capability.d.ts.map +1 -1
- package/dist/conformance/customer-edition-definition.vectors.json +987 -0
- package/dist/conformance/edition-source-pins.vectors.json +298 -0
- package/dist/conformance/optional-operation-admission.vectors.json +44 -0
- package/dist/connector/index.d.ts +2 -0
- package/dist/connector/index.d.ts.map +1 -1
- package/dist/connector/index.js +2 -0
- package/dist/connector/index.js.map +1 -1
- package/dist/connector/lib/connector-adapter-contribution.d.ts +10 -3
- package/dist/connector/lib/connector-adapter-contribution.d.ts.map +1 -1
- package/dist/connector/lib/connector-adapter-contribution.js +78 -21
- package/dist/connector/lib/connector-adapter-contribution.js.map +1 -1
- package/dist/connector/lib/connector-endpoint-source-declaration.d.ts +19 -0
- package/dist/connector/lib/connector-endpoint-source-declaration.d.ts.map +1 -0
- package/dist/connector/lib/connector-endpoint-source-declaration.js +50 -0
- package/dist/connector/lib/connector-endpoint-source-declaration.js.map +1 -0
- package/dist/connector/lib/connector-endpoint-source.d.ts +5 -0
- package/dist/connector/lib/connector-endpoint-source.d.ts.map +1 -0
- package/dist/connector/lib/connector-endpoint-source.js +9 -0
- package/dist/connector/lib/connector-endpoint-source.js.map +1 -0
- package/dist/connector/lib/provider-descriptor.d.ts.map +1 -1
- package/dist/connector/lib/provider-descriptor.js.map +1 -1
- package/dist/contribution/lib/contribution-kind.d.ts.map +1 -1
- package/dist/contribution/lib/contribution-kind.js.map +1 -1
- package/dist/contribution/lib/sync.d.ts +6 -2
- package/dist/contribution/lib/sync.d.ts.map +1 -1
- package/dist/contribution/lib/sync.js +26 -6
- package/dist/contribution/lib/sync.js.map +1 -1
- package/dist/deployment/index.d.ts +6 -0
- package/dist/deployment/index.d.ts.map +1 -1
- package/dist/deployment/index.js +6 -0
- package/dist/deployment/index.js.map +1 -1
- package/dist/deployment/lib/artifact-signer-trust.d.ts +71 -9
- package/dist/deployment/lib/artifact-signer-trust.d.ts.map +1 -1
- package/dist/deployment/lib/artifact-signer-trust.js +228 -16
- package/dist/deployment/lib/artifact-signer-trust.js.map +1 -1
- package/dist/deployment/lib/code-unit-order.d.ts +2 -0
- package/dist/deployment/lib/code-unit-order.d.ts.map +1 -0
- package/dist/deployment/lib/code-unit-order.js +7 -0
- package/dist/deployment/lib/code-unit-order.js.map +1 -0
- package/dist/deployment/lib/event-subscription-grant.d.ts +46 -0
- package/dist/deployment/lib/event-subscription-grant.d.ts.map +1 -0
- package/dist/deployment/lib/event-subscription-grant.js +52 -0
- package/dist/deployment/lib/event-subscription-grant.js.map +1 -0
- package/dist/deployment/lib/installed-event-subscription-grant.d.ts +60 -0
- package/dist/deployment/lib/installed-event-subscription-grant.d.ts.map +1 -0
- package/dist/deployment/lib/installed-event-subscription-grant.js +107 -0
- package/dist/deployment/lib/installed-event-subscription-grant.js.map +1 -0
- package/dist/deployment/lib/installed-workload-grant.d.ts +80 -0
- package/dist/deployment/lib/installed-workload-grant.d.ts.map +1 -0
- package/dist/deployment/lib/installed-workload-grant.js +119 -0
- package/dist/deployment/lib/installed-workload-grant.js.map +1 -0
- package/dist/deployment/lib/operation-grant.d.ts +19 -0
- package/dist/deployment/lib/operation-grant.d.ts.map +1 -1
- package/dist/deployment/lib/operation-grant.js +18 -9
- package/dist/deployment/lib/operation-grant.js.map +1 -1
- package/dist/deployment/lib/org-context-relay.d.ts +10 -0
- package/dist/deployment/lib/org-context-relay.d.ts.map +1 -0
- package/dist/deployment/lib/org-context-relay.js +22 -0
- package/dist/deployment/lib/org-context-relay.js.map +1 -0
- package/dist/deployment/lib/organization-sweep-grant.d.ts.map +1 -1
- package/dist/deployment/lib/organization-sweep-grant.js +4 -6
- package/dist/deployment/lib/organization-sweep-grant.js.map +1 -1
- package/dist/deployment/lib/platform-sweep.d.ts +3 -1
- package/dist/deployment/lib/platform-sweep.d.ts.map +1 -1
- package/dist/deployment/lib/platform-sweep.js +17 -1
- package/dist/deployment/lib/platform-sweep.js.map +1 -1
- package/dist/deployment/lib/resolved-deployment.d.ts +121 -2
- package/dist/deployment/lib/resolved-deployment.d.ts.map +1 -1
- package/dist/deployment/lib/resolved-deployment.js +140 -13
- package/dist/deployment/lib/resolved-deployment.js.map +1 -1
- package/dist/deployment/lib/store-event-ceiling.d.ts +43 -0
- package/dist/deployment/lib/store-event-ceiling.d.ts.map +1 -0
- package/dist/deployment/lib/store-event-ceiling.js +80 -0
- package/dist/deployment/lib/store-event-ceiling.js.map +1 -0
- package/dist/deployment/lib/store-workload-grant-ceiling.d.ts +59 -0
- package/dist/deployment/lib/store-workload-grant-ceiling.d.ts.map +1 -0
- package/dist/deployment/lib/store-workload-grant-ceiling.js +102 -0
- package/dist/deployment/lib/store-workload-grant-ceiling.js.map +1 -0
- package/dist/distribution/index.d.ts +9 -0
- package/dist/distribution/index.d.ts.map +1 -1
- package/dist/distribution/index.js +18 -6
- package/dist/distribution/index.js.map +1 -1
- package/dist/distribution/lib/customer-edition-definition.d.ts +8 -1
- package/dist/distribution/lib/customer-edition-definition.d.ts.map +1 -1
- package/dist/distribution/lib/customer-edition-definition.js +51 -2
- package/dist/distribution/lib/customer-edition-definition.js.map +1 -1
- package/dist/distribution/lib/distribution-lock.d.ts +10 -1
- package/dist/distribution/lib/distribution-lock.d.ts.map +1 -1
- package/dist/distribution/lib/distribution-lock.js +38 -11
- package/dist/distribution/lib/distribution-lock.js.map +1 -1
- package/dist/distribution/lib/distribution.d.ts +16 -0
- package/dist/distribution/lib/distribution.d.ts.map +1 -1
- package/dist/distribution/lib/distribution.js +39 -1
- package/dist/distribution/lib/distribution.js.map +1 -1
- package/dist/distribution/lib/event-subscription-admission.d.ts +22 -0
- package/dist/distribution/lib/event-subscription-admission.d.ts.map +1 -0
- package/dist/distribution/lib/event-subscription-admission.js +72 -0
- package/dist/distribution/lib/event-subscription-admission.js.map +1 -0
- package/dist/distribution/lib/image-lock.d.ts.map +1 -1
- package/dist/distribution/lib/image-lock.js +2 -10
- package/dist/distribution/lib/image-lock.js.map +1 -1
- package/dist/distribution/lib/image-producer-evidence.d.ts +114 -10
- package/dist/distribution/lib/image-producer-evidence.d.ts.map +1 -1
- package/dist/distribution/lib/image-producer-evidence.js +78 -31
- package/dist/distribution/lib/image-producer-evidence.js.map +1 -1
- package/dist/distribution/lib/installed-operation-ceiling-admission.d.ts +21 -0
- package/dist/distribution/lib/installed-operation-ceiling-admission.d.ts.map +1 -0
- package/dist/distribution/lib/installed-operation-ceiling-admission.js +54 -0
- package/dist/distribution/lib/installed-operation-ceiling-admission.js.map +1 -0
- package/dist/distribution/lib/kernel-contract-source-paths.d.ts +1 -1
- package/dist/distribution/lib/kernel-contract-source-paths.d.ts.map +1 -1
- package/dist/distribution/lib/kernel-contract-source-paths.js +24 -3
- package/dist/distribution/lib/kernel-contract-source-paths.js.map +1 -1
- package/dist/distribution/lib/operation-grant-admission.d.ts +29 -2
- package/dist/distribution/lib/operation-grant-admission.d.ts.map +1 -1
- package/dist/distribution/lib/operation-grant-admission.js +97 -19
- package/dist/distribution/lib/operation-grant-admission.js.map +1 -1
- package/dist/distribution/lib/org-context-relay-admission.d.ts +19 -0
- package/dist/distribution/lib/org-context-relay-admission.d.ts.map +1 -0
- package/dist/distribution/lib/org-context-relay-admission.js +50 -0
- package/dist/distribution/lib/org-context-relay-admission.js.map +1 -0
- package/dist/distribution/lib/organization-sweep-admission.d.ts +1 -0
- package/dist/distribution/lib/organization-sweep-admission.d.ts.map +1 -1
- package/dist/distribution/lib/organization-sweep-admission.js +4 -0
- package/dist/distribution/lib/organization-sweep-admission.js.map +1 -1
- package/dist/distribution/lib/package-image-lock.d.ts +99 -0
- package/dist/distribution/lib/package-image-lock.d.ts.map +1 -0
- package/dist/distribution/lib/package-image-lock.js +167 -0
- package/dist/distribution/lib/package-image-lock.js.map +1 -0
- package/dist/distribution/lib/package-image-trust.d.ts +36 -0
- package/dist/distribution/lib/package-image-trust.d.ts.map +1 -0
- package/dist/distribution/lib/package-image-trust.js +112 -0
- package/dist/distribution/lib/package-image-trust.js.map +1 -0
- package/dist/distribution/lib/resolve-unsplit-deployment.d.ts.map +1 -1
- package/dist/distribution/lib/resolve-unsplit-deployment.js +31 -0
- package/dist/distribution/lib/resolve-unsplit-deployment.js.map +1 -1
- package/dist/distribution/lib/store-workload-ceiling-admission.d.ts +17 -0
- package/dist/distribution/lib/store-workload-ceiling-admission.d.ts.map +1 -0
- package/dist/distribution/lib/store-workload-ceiling-admission.js +40 -0
- package/dist/distribution/lib/store-workload-ceiling-admission.js.map +1 -0
- package/dist/distribution/lib/store-workload-ceiling.d.ts +6 -0
- package/dist/distribution/lib/store-workload-ceiling.d.ts.map +1 -0
- package/dist/distribution/lib/store-workload-ceiling.js +13 -0
- package/dist/distribution/lib/store-workload-ceiling.js.map +1 -0
- package/dist/distribution/lib/verify-resolved-deployment.d.ts +12 -0
- package/dist/distribution/lib/verify-resolved-deployment.d.ts.map +1 -1
- package/dist/distribution/lib/verify-resolved-deployment.js +148 -4
- package/dist/distribution/lib/verify-resolved-deployment.js.map +1 -1
- package/dist/distribution/server/index.d.ts +8 -0
- package/dist/distribution/server/index.d.ts.map +1 -1
- package/dist/distribution/server/index.js +10 -0
- package/dist/distribution/server/index.js.map +1 -1
- package/dist/edition-protocol/edition-contract.schema.json +1 -1
- package/dist/edition-protocol/edition-protocol.json +1 -1
- package/dist/edition-protocol/lib/edition-protocol.d.ts +1 -1
- package/dist/edition-protocol/lib/edition-protocol.d.ts.map +1 -1
- package/dist/edition-protocol/lib/edition-protocol.js +3 -2
- package/dist/edition-protocol/lib/edition-protocol.js.map +1 -1
- package/dist/event-subscription/index.d.ts +4 -0
- package/dist/event-subscription/index.d.ts.map +1 -0
- package/dist/event-subscription/index.js +20 -0
- package/dist/event-subscription/index.js.map +1 -0
- package/dist/event-subscription/lib/event-subscription-clause.d.ts +61 -0
- package/dist/event-subscription/lib/event-subscription-clause.d.ts.map +1 -0
- package/dist/event-subscription/lib/event-subscription-clause.js +102 -0
- package/dist/event-subscription/lib/event-subscription-clause.js.map +1 -0
- package/dist/event-subscription/lib/event-type-pattern.d.ts +12 -0
- package/dist/event-subscription/lib/event-type-pattern.d.ts.map +1 -0
- package/dist/event-subscription/lib/event-type-pattern.js +47 -0
- package/dist/event-subscription/lib/event-type-pattern.js.map +1 -0
- package/dist/event-subscription/lib/visibility-tier.d.ts +10 -0
- package/dist/event-subscription/lib/visibility-tier.d.ts.map +1 -0
- package/dist/event-subscription/lib/visibility-tier.js +22 -0
- package/dist/event-subscription/lib/visibility-tier.js.map +1 -0
- package/dist/execution-environment/lib/execution-environment.d.ts +4 -2
- package/dist/execution-environment/lib/execution-environment.d.ts.map +1 -1
- package/dist/execution-environment/lib/execution-environment.js +5 -6
- package/dist/execution-environment/lib/execution-environment.js.map +1 -1
- package/dist/http/lib/problem-details.d.ts.map +1 -1
- package/dist/http/lib/problem-details.js.map +1 -1
- package/dist/http/lib/xema-error.d.ts.map +1 -1
- package/dist/http/lib/xema-error.js.map +1 -1
- package/dist/resolved-deployment-fixture/lib/resolved-deployment-fixture.d.ts +21 -1
- package/dist/resolved-deployment-fixture/lib/resolved-deployment-fixture.d.ts.map +1 -1
- package/dist/resolved-deployment-fixture/lib/resolved-deployment-fixture.js +76 -2
- package/dist/resolved-deployment-fixture/lib/resolved-deployment-fixture.js.map +1 -1
- package/dist/resource/lib/resource-kind.d.ts +7 -1
- package/dist/resource/lib/resource-kind.d.ts.map +1 -1
- package/dist/resource/lib/resource-kind.js +6 -0
- package/dist/resource/lib/resource-kind.js.map +1 -1
- package/dist/resource-accounting/index.d.ts +0 -1
- package/dist/resource-accounting/index.d.ts.map +1 -1
- package/dist/resource-accounting/index.js +0 -1
- package/dist/resource-accounting/index.js.map +1 -1
- package/dist/resource-accounting/lib/producer.d.ts +0 -2
- package/dist/resource-accounting/lib/producer.d.ts.map +1 -1
- package/dist/resource-accounting/lib/producer.js +0 -1
- package/dist/resource-accounting/lib/producer.js.map +1 -1
- package/dist/revision-target/lib/revision-target.d.ts +10 -4
- package/dist/revision-target/lib/revision-target.d.ts.map +1 -1
- package/dist/revision-target/lib/revision-target.js +26 -5
- package/dist/revision-target/lib/revision-target.js.map +1 -1
- package/dist/setting/index.d.ts +1 -0
- package/dist/setting/index.d.ts.map +1 -1
- package/dist/setting/index.js +1 -0
- package/dist/setting/index.js.map +1 -1
- package/dist/setting/lib/setting-lifecycle.d.ts +33 -0
- package/dist/setting/lib/setting-lifecycle.d.ts.map +1 -0
- package/dist/setting/lib/setting-lifecycle.js +64 -0
- package/dist/setting/lib/setting-lifecycle.js.map +1 -0
- package/dist/workflow/lib/compiled-run.d.ts +1 -1
- package/dist/workflow/lib/compiled-run.d.ts.map +1 -1
- package/dist/workflow/lib/enums.d.ts +2 -0
- package/dist/workflow/lib/enums.d.ts.map +1 -1
- package/dist/workflow/lib/enums.js +7 -1
- package/dist/workflow/lib/enums.js.map +1 -1
- package/dist/workflow/lib/errors.d.ts +1 -0
- package/dist/workflow/lib/errors.d.ts.map +1 -1
- package/dist/workflow/lib/errors.js +2 -0
- package/dist/workflow/lib/errors.js.map +1 -1
- package/package.json +4 -3
- package/dist/capability/lib/capability-domain.d.ts.map +0 -1
- package/dist/capability/lib/capability-domain.js.map +0 -1
- package/dist/capability/lib/capability-invocation-descriptor.d.ts.map +0 -1
- package/dist/capability/lib/capability-invocation-descriptor.js.map +0 -1
- package/dist/capability/lib/errors.d.ts.map +0 -1
- package/dist/capability/lib/errors.js.map +0 -1
- package/dist/resource-accounting/lib/reconciliation.d.ts +0 -81
- package/dist/resource-accounting/lib/reconciliation.d.ts.map +0 -1
- package/dist/resource-accounting/lib/reconciliation.js +0 -111
- package/dist/resource-accounting/lib/reconciliation.js.map +0 -1
- /package/dist/{capability → capability-domain}/lib/capability-domain.d.ts +0 -0
- /package/dist/{capability → capability-domain}/lib/capability-domain.js +0 -0
- /package/dist/{capability → capability-error}/lib/capability-invocation-descriptor.d.ts +0 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InstalledEventSubscriptionRefusalCode = exports.InstalledEventSubscriptionGrantSchema = void 0;
|
|
4
|
+
exports.compareInstalledEventSubscriptionTargets = compareInstalledEventSubscriptionTargets;
|
|
5
|
+
exports.admitInstalledEventSubscriptions = admitInstalledEventSubscriptions;
|
|
6
|
+
const zod_1 = require("zod");
|
|
7
|
+
const event_subscription_1 = require("../../event-subscription");
|
|
8
|
+
const code_unit_order_1 = require("./code-unit-order");
|
|
9
|
+
const installed_workload_grant_1 = require("./installed-workload-grant");
|
|
10
|
+
const trust_domain_1 = require("./trust-domain");
|
|
11
|
+
exports.InstalledEventSubscriptionGrantSchema = zod_1.z
|
|
12
|
+
.object({
|
|
13
|
+
orgId: zod_1.z.string().min(1),
|
|
14
|
+
installationId: zod_1.z.string().min(1),
|
|
15
|
+
biome: zod_1.z.string().regex(trust_domain_1.TRUST_DOMAIN_BIOME_ID_PATTERN, 'biome id must be lowercase kebab-case'),
|
|
16
|
+
component: zod_1.z.string().min(1),
|
|
17
|
+
clause: event_subscription_1.EventSubscriptionGrantClauseSchema,
|
|
18
|
+
biomeVersion: zod_1.z.string().min(1),
|
|
19
|
+
consentDigest: zod_1.z.string().min(1),
|
|
20
|
+
state: zod_1.z.nativeEnum(installed_workload_grant_1.InstalledWorkloadGrantState),
|
|
21
|
+
revokeReason: zod_1.z.nativeEnum(installed_workload_grant_1.RevokeReason).optional(),
|
|
22
|
+
})
|
|
23
|
+
.strict()
|
|
24
|
+
.superRefine((row, ctx) => {
|
|
25
|
+
if (row.clause.scope.kind !== event_subscription_1.EventSubscriptionScopeKind.Org || row.clause.scope.org !== row.orgId) {
|
|
26
|
+
ctx.addIssue({
|
|
27
|
+
code: 'custom',
|
|
28
|
+
path: ['clause', 'scope'],
|
|
29
|
+
message: 'an installed event subscription is scoped to the installing organization',
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
const revoked = row.state === installed_workload_grant_1.InstalledWorkloadGrantState.Revoked;
|
|
33
|
+
if (revoked && row.revokeReason === undefined) {
|
|
34
|
+
ctx.addIssue({ code: 'custom', path: ['revokeReason'], message: 'a revoked grant states why it was revoked' });
|
|
35
|
+
}
|
|
36
|
+
if (!revoked && row.revokeReason !== undefined) {
|
|
37
|
+
ctx.addIssue({ code: 'custom', path: ['revokeReason'], message: 'only a revoked grant states a revokeReason' });
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
var InstalledEventSubscriptionRefusalCode;
|
|
41
|
+
(function (InstalledEventSubscriptionRefusalCode) {
|
|
42
|
+
InstalledEventSubscriptionRefusalCode["UnknownComponent"] = "unknown-component";
|
|
43
|
+
InstalledEventSubscriptionRefusalCode["RealmReachNotInstallable"] = "realm-reach-not-installable";
|
|
44
|
+
InstalledEventSubscriptionRefusalCode["OutsideCeiling"] = "outside-ceiling";
|
|
45
|
+
})(InstalledEventSubscriptionRefusalCode || (exports.InstalledEventSubscriptionRefusalCode = InstalledEventSubscriptionRefusalCode = {}));
|
|
46
|
+
function compareInstalledEventSubscriptionTargets(a, b) {
|
|
47
|
+
return ((0, code_unit_order_1.compareCodeUnits)(a.component, b.component) ||
|
|
48
|
+
(0, code_unit_order_1.compareCodeUnits)((0, event_subscription_1.eventSubscriptionClauseKey)(a.clause), (0, event_subscription_1.eventSubscriptionClauseKey)(b.clause)));
|
|
49
|
+
}
|
|
50
|
+
const keyOf = (target) => `${target.component}\u0000${(0, event_subscription_1.eventSubscriptionClauseKey)(target.clause)}`;
|
|
51
|
+
function admitInstalledEventSubscriptions(input) {
|
|
52
|
+
const ceilingByComponent = new Map();
|
|
53
|
+
for (const row of input.ceiling) {
|
|
54
|
+
if (row.caller.biome !== input.biome)
|
|
55
|
+
continue;
|
|
56
|
+
ceilingByComponent.set(row.caller.component, [...(ceilingByComponent.get(row.caller.component) ?? []), ...row.clauses]);
|
|
57
|
+
}
|
|
58
|
+
const admitted = [];
|
|
59
|
+
const refused = [];
|
|
60
|
+
for (const [component, clauses] of Object.entries(input.requested)) {
|
|
61
|
+
const ceiling = ceilingByComponent.get(component);
|
|
62
|
+
for (const clause of (0, event_subscription_1.canonicalEventSubscriptionClauses)(clauses)) {
|
|
63
|
+
const refuse = (code) => {
|
|
64
|
+
refused.push({ code, component, clause });
|
|
65
|
+
};
|
|
66
|
+
if (ceiling === undefined) {
|
|
67
|
+
refuse(InstalledEventSubscriptionRefusalCode.UnknownComponent);
|
|
68
|
+
}
|
|
69
|
+
else if (clause.scope.kind !== event_subscription_1.EventSubscriptionScopeKind.Org) {
|
|
70
|
+
refuse(InstalledEventSubscriptionRefusalCode.RealmReachNotInstallable);
|
|
71
|
+
}
|
|
72
|
+
else if (!ceiling.some((allowed) => (0, event_subscription_1.eventSubscriptionClauseCovers)(allowed, clause))) {
|
|
73
|
+
refuse(InstalledEventSubscriptionRefusalCode.OutsideCeiling);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
admitted.push({
|
|
77
|
+
component,
|
|
78
|
+
clause: {
|
|
79
|
+
types: [...clause.types],
|
|
80
|
+
tiers: [...clause.tiers],
|
|
81
|
+
scope: { kind: event_subscription_1.EventSubscriptionScopeKind.Org, org: input.orgId },
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
admitted.sort(compareInstalledEventSubscriptionTargets);
|
|
88
|
+
refused.sort((a, b) => (0, code_unit_order_1.compareCodeUnits)(a.component, b.component) ||
|
|
89
|
+
(0, code_unit_order_1.compareCodeUnits)((0, event_subscription_1.eventSubscriptionClauseKey)(a.clause), (0, event_subscription_1.eventSubscriptionClauseKey)(b.clause)));
|
|
90
|
+
const active = (input.installed ?? []).filter((row) => row.biome === input.biome && row.state === installed_workload_grant_1.InstalledWorkloadGrantState.Active);
|
|
91
|
+
const activeKeys = new Set(active.map((row) => keyOf({ component: row.component, clause: row.clause })));
|
|
92
|
+
const admittedKeys = new Set(admitted.map(keyOf));
|
|
93
|
+
const kept = admitted.filter((target) => activeKeys.has(keyOf(target)));
|
|
94
|
+
const added = admitted.filter((target) => !activeKeys.has(keyOf(target)));
|
|
95
|
+
const removed = active
|
|
96
|
+
.map((row) => ({ component: row.component, clause: row.clause }))
|
|
97
|
+
.filter((target) => !admittedKeys.has(keyOf(target)))
|
|
98
|
+
.sort(compareInstalledEventSubscriptionTargets);
|
|
99
|
+
return {
|
|
100
|
+
admitted,
|
|
101
|
+
refused,
|
|
102
|
+
diff: { kept, added, removed },
|
|
103
|
+
consentRequired: input.installed !== undefined &&
|
|
104
|
+
added.some((target) => !active.some((held) => held.component === target.component && (0, event_subscription_1.eventSubscriptionClauseCovers)(held.clause, target.clause))),
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=installed-event-subscription-grant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"installed-event-subscription-grant.js","sourceRoot":"","sources":["../../../src/deployment/lib/installed-event-subscription-grant.ts"],"names":[],"mappings":";;;AAiIA,4FAQC;AAKD,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,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACxE,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC1E,MAAM,OAAO,GAAG,MAAM;SACnB,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;SAChE,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;SACpD,IAAI,CAAC,wCAAwC,CAAC,CAAC;IAElD,OAAO;QACL,QAAQ;QACR,OAAO;QACP,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE;QAC9B,eAAe,EACb,KAAK,CAAC,SAAS,KAAK,SAAS;YAC7B,KAAK,CAAC,IAAI,CACR,CAAC,MAAM,EAAE,EAAE,CACT,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,KAAK,MAAM,CAAC,SAAS,IAAI,IAAA,kDAA6B,EAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAC3H;KACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type OperationGrant } from './operation-grant';
|
|
3
|
+
import { type OperationId } from './operation-id';
|
|
4
|
+
import type { InstalledEventSubscriptionTarget } from './installed-event-subscription-grant';
|
|
5
|
+
export declare enum InstalledWorkloadGrantState {
|
|
6
|
+
Active = "active",
|
|
7
|
+
Revoked = "revoked"
|
|
8
|
+
}
|
|
9
|
+
export declare enum RevokeReason {
|
|
10
|
+
Uninstalled = "uninstalled",
|
|
11
|
+
Disabled = "disabled",
|
|
12
|
+
UpgradeNarrowed = "upgrade-narrowed",
|
|
13
|
+
CeilingNarrowed = "ceiling-narrowed"
|
|
14
|
+
}
|
|
15
|
+
export declare const InstalledWorkloadGrantSchema: z.ZodObject<{
|
|
16
|
+
orgId: z.ZodString;
|
|
17
|
+
installationId: z.ZodString;
|
|
18
|
+
biome: z.ZodString;
|
|
19
|
+
component: z.ZodString;
|
|
20
|
+
operation: z.core.$ZodBranded<z.ZodString, "OperationId", "out">;
|
|
21
|
+
receiver: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
22
|
+
kind: z.ZodLiteral<import("./operation-grant").OperationGrantReceiverKind.Biome>;
|
|
23
|
+
biome: z.ZodString;
|
|
24
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
25
|
+
kind: z.ZodLiteral<import("./operation-grant").OperationGrantReceiverKind.PlatformService>;
|
|
26
|
+
service: z.ZodString;
|
|
27
|
+
}, z.core.$strict>], "kind">;
|
|
28
|
+
biomeVersion: z.ZodString;
|
|
29
|
+
consentDigest: z.ZodString;
|
|
30
|
+
state: z.ZodEnum<typeof InstalledWorkloadGrantState>;
|
|
31
|
+
revokeReason: z.ZodOptional<z.ZodEnum<typeof RevokeReason>>;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
export type InstalledWorkloadGrant = z.infer<typeof InstalledWorkloadGrantSchema>;
|
|
34
|
+
export interface InstalledWorkloadGrantTarget {
|
|
35
|
+
readonly component: string;
|
|
36
|
+
readonly operation: OperationId;
|
|
37
|
+
readonly receiver: OperationGrant['receiver'];
|
|
38
|
+
}
|
|
39
|
+
export declare enum InstalledWorkloadGrantRefusalCode {
|
|
40
|
+
OutsideCeiling = "outside-ceiling",
|
|
41
|
+
UnknownComponent = "unknown-component"
|
|
42
|
+
}
|
|
43
|
+
export interface InstalledWorkloadGrantRefusal {
|
|
44
|
+
readonly code: InstalledWorkloadGrantRefusalCode;
|
|
45
|
+
readonly component: string;
|
|
46
|
+
readonly operation: OperationId;
|
|
47
|
+
}
|
|
48
|
+
export interface InstalledWorkloadGrantDiff {
|
|
49
|
+
readonly kept: readonly InstalledWorkloadGrantTarget[];
|
|
50
|
+
readonly added: readonly InstalledWorkloadGrantTarget[];
|
|
51
|
+
readonly removed: readonly InstalledWorkloadGrantTarget[];
|
|
52
|
+
}
|
|
53
|
+
export interface InstalledWorkloadGrantAdmissionInput {
|
|
54
|
+
readonly biome: string;
|
|
55
|
+
readonly requested: Readonly<Record<string, readonly OperationId[]>>;
|
|
56
|
+
readonly ceiling: readonly OperationGrant[];
|
|
57
|
+
readonly installed: readonly InstalledWorkloadGrant[] | undefined;
|
|
58
|
+
}
|
|
59
|
+
export interface InstalledWorkloadGrantAdmission {
|
|
60
|
+
readonly admitted: readonly InstalledWorkloadGrantTarget[];
|
|
61
|
+
readonly refused: readonly InstalledWorkloadGrantRefusal[];
|
|
62
|
+
readonly diff: InstalledWorkloadGrantDiff;
|
|
63
|
+
readonly consentRequired: boolean;
|
|
64
|
+
}
|
|
65
|
+
export declare function admitInstalledWorkloadGrants(input: InstalledWorkloadGrantAdmissionInput): InstalledWorkloadGrantAdmission;
|
|
66
|
+
export interface InstalledEventSubscriptionConsentEntry {
|
|
67
|
+
readonly component: string;
|
|
68
|
+
readonly clauses: readonly InstalledEventSubscriptionTarget['clause'][];
|
|
69
|
+
}
|
|
70
|
+
export interface InstalledWorkloadGrantConsentDocument {
|
|
71
|
+
readonly biome: string;
|
|
72
|
+
readonly grants: readonly InstalledWorkloadGrantTarget[];
|
|
73
|
+
readonly eventSubscriptions: readonly InstalledEventSubscriptionConsentEntry[];
|
|
74
|
+
}
|
|
75
|
+
export declare function installedWorkloadGrantConsentDocument(input: {
|
|
76
|
+
readonly biome: string;
|
|
77
|
+
readonly admitted: readonly InstalledWorkloadGrantTarget[];
|
|
78
|
+
readonly admittedEventSubscriptions: readonly InstalledEventSubscriptionTarget[];
|
|
79
|
+
}): InstalledWorkloadGrantConsentDocument;
|
|
80
|
+
//# sourceMappingURL=installed-workload-grant.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"installed-workload-grant.d.ts","sourceRoot":"","sources":["../../../src/deployment/lib/installed-workload-grant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAgC,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACtF,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIrE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,sCAAsC,CAAC;AAqB7F,oBAAY,2BAA2B;IACrC,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAGD,oBAAY,YAAY;IAEtB,WAAW,gBAAgB;IAE3B,QAAQ,aAAa;IAErB,eAAe,qBAAqB;IAEpC,eAAe,qBAAqB;CACrC;AAKD,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;kBAwBrC,CAAC;AAEL,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAGlF,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;CAC/C;AAGD,oBAAY,iCAAiC;IAE3C,cAAc,oBAAoB;IAElC,gBAAgB,sBAAsB;CACvC;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,IAAI,EAAE,iCAAiC,CAAC;IACjD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC;CACjC;AAED,MAAM,WAAW,0BAA0B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,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,SAAS,4BAA4B,EAAE,CAAC;IAC3D,QAAQ,CAAC,0BAA0B,EAAE,SAAS,gCAAgC,EAAE,CAAC;CAClF,GAAG,qCAAqC,CAsBxC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InstalledWorkloadGrantRefusalCode = exports.InstalledWorkloadGrantSchema = exports.RevokeReason = exports.InstalledWorkloadGrantState = void 0;
|
|
4
|
+
exports.admitInstalledWorkloadGrants = admitInstalledWorkloadGrants;
|
|
5
|
+
exports.installedWorkloadGrantConsentDocument = installedWorkloadGrantConsentDocument;
|
|
6
|
+
const zod_1 = require("zod");
|
|
7
|
+
const code_unit_order_1 = require("./code-unit-order");
|
|
8
|
+
const operation_grant_1 = require("./operation-grant");
|
|
9
|
+
const operation_id_1 = require("./operation-id");
|
|
10
|
+
const trust_domain_1 = require("./trust-domain");
|
|
11
|
+
const event_subscription_1 = require("../../event-subscription");
|
|
12
|
+
var InstalledWorkloadGrantState;
|
|
13
|
+
(function (InstalledWorkloadGrantState) {
|
|
14
|
+
InstalledWorkloadGrantState["Active"] = "active";
|
|
15
|
+
InstalledWorkloadGrantState["Revoked"] = "revoked";
|
|
16
|
+
})(InstalledWorkloadGrantState || (exports.InstalledWorkloadGrantState = InstalledWorkloadGrantState = {}));
|
|
17
|
+
var RevokeReason;
|
|
18
|
+
(function (RevokeReason) {
|
|
19
|
+
RevokeReason["Uninstalled"] = "uninstalled";
|
|
20
|
+
RevokeReason["Disabled"] = "disabled";
|
|
21
|
+
RevokeReason["UpgradeNarrowed"] = "upgrade-narrowed";
|
|
22
|
+
RevokeReason["CeilingNarrowed"] = "ceiling-narrowed";
|
|
23
|
+
})(RevokeReason || (exports.RevokeReason = RevokeReason = {}));
|
|
24
|
+
const OrganizationIdSchema = zod_1.z.string().min(1);
|
|
25
|
+
exports.InstalledWorkloadGrantSchema = zod_1.z
|
|
26
|
+
.object({
|
|
27
|
+
orgId: OrganizationIdSchema,
|
|
28
|
+
installationId: zod_1.z.string().min(1),
|
|
29
|
+
biome: zod_1.z.string().regex(trust_domain_1.TRUST_DOMAIN_BIOME_ID_PATTERN, 'biome id must be lowercase kebab-case'),
|
|
30
|
+
component: zod_1.z.string().min(1),
|
|
31
|
+
operation: operation_id_1.OperationIdSchema,
|
|
32
|
+
receiver: operation_grant_1.OperationGrantReceiverSchema,
|
|
33
|
+
biomeVersion: zod_1.z.string().min(1),
|
|
34
|
+
consentDigest: zod_1.z.string().min(1),
|
|
35
|
+
state: zod_1.z.nativeEnum(InstalledWorkloadGrantState),
|
|
36
|
+
revokeReason: zod_1.z.nativeEnum(RevokeReason).optional(),
|
|
37
|
+
})
|
|
38
|
+
.strict()
|
|
39
|
+
.superRefine((row, ctx) => {
|
|
40
|
+
const revoked = row.state === InstalledWorkloadGrantState.Revoked;
|
|
41
|
+
if (revoked && row.revokeReason === undefined) {
|
|
42
|
+
ctx.addIssue({ code: 'custom', path: ['revokeReason'], message: 'a revoked grant states why it was revoked' });
|
|
43
|
+
}
|
|
44
|
+
if (!revoked && row.revokeReason !== undefined) {
|
|
45
|
+
ctx.addIssue({ code: 'custom', path: ['revokeReason'], message: 'only a revoked grant states a revokeReason' });
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
var InstalledWorkloadGrantRefusalCode;
|
|
49
|
+
(function (InstalledWorkloadGrantRefusalCode) {
|
|
50
|
+
InstalledWorkloadGrantRefusalCode["OutsideCeiling"] = "outside-ceiling";
|
|
51
|
+
InstalledWorkloadGrantRefusalCode["UnknownComponent"] = "unknown-component";
|
|
52
|
+
})(InstalledWorkloadGrantRefusalCode || (exports.InstalledWorkloadGrantRefusalCode = InstalledWorkloadGrantRefusalCode = {}));
|
|
53
|
+
function compareTargets(a, b) {
|
|
54
|
+
return (0, code_unit_order_1.compareCodeUnits)(a.component, b.component) || (0, code_unit_order_1.compareCodeUnits)(a.operation, b.operation);
|
|
55
|
+
}
|
|
56
|
+
const keyOf = (target) => `${target.component}\u0000${target.operation}`;
|
|
57
|
+
function admitInstalledWorkloadGrants(input) {
|
|
58
|
+
const ceilingRows = input.ceiling.filter((row) => row.caller.biome === input.biome);
|
|
59
|
+
const ceilingByKey = new Map(ceilingRows.map((row) => [keyOf({ component: row.caller.component, operation: row.operation }), row]));
|
|
60
|
+
const knownComponents = new Set(ceilingRows.map((row) => row.caller.component));
|
|
61
|
+
const admitted = [];
|
|
62
|
+
const refused = [];
|
|
63
|
+
for (const [component, operations] of Object.entries(input.requested)) {
|
|
64
|
+
for (const operation of new Set(operations)) {
|
|
65
|
+
const row = ceilingByKey.get(keyOf({ component, operation }));
|
|
66
|
+
if (row !== undefined) {
|
|
67
|
+
admitted.push({ component, operation, receiver: row.receiver });
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
refused.push({
|
|
71
|
+
code: knownComponents.has(component)
|
|
72
|
+
? InstalledWorkloadGrantRefusalCode.OutsideCeiling
|
|
73
|
+
: InstalledWorkloadGrantRefusalCode.UnknownComponent,
|
|
74
|
+
component,
|
|
75
|
+
operation,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
admitted.sort(compareTargets);
|
|
81
|
+
refused.sort((a, b) => (0, code_unit_order_1.compareCodeUnits)(a.component, b.component) || (0, code_unit_order_1.compareCodeUnits)(a.operation, b.operation));
|
|
82
|
+
const active = (input.installed ?? []).filter((row) => row.biome === input.biome && row.state === InstalledWorkloadGrantState.Active);
|
|
83
|
+
const activeByKey = new Map(active.map((row) => [keyOf(row), row]));
|
|
84
|
+
const admittedKeys = new Set(admitted.map(keyOf));
|
|
85
|
+
const kept = admitted.filter((target) => activeByKey.has(keyOf(target)));
|
|
86
|
+
const added = admitted.filter((target) => !activeByKey.has(keyOf(target)));
|
|
87
|
+
const removed = active
|
|
88
|
+
.filter((row) => !admittedKeys.has(keyOf(row)))
|
|
89
|
+
.map((row) => ({ component: row.component, operation: row.operation, receiver: row.receiver }))
|
|
90
|
+
.sort(compareTargets);
|
|
91
|
+
return {
|
|
92
|
+
admitted,
|
|
93
|
+
refused,
|
|
94
|
+
diff: { kept, added, removed },
|
|
95
|
+
consentRequired: input.installed !== undefined && added.length > 0,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
function installedWorkloadGrantConsentDocument(input) {
|
|
99
|
+
const eventSubscriptions = [];
|
|
100
|
+
for (const target of [...input.admittedEventSubscriptions].sort((a, b) => (0, code_unit_order_1.compareCodeUnits)(a.component, b.component) ||
|
|
101
|
+
(0, code_unit_order_1.compareCodeUnits)((0, event_subscription_1.eventSubscriptionClauseKey)(a.clause), (0, event_subscription_1.eventSubscriptionClauseKey)(b.clause)))) {
|
|
102
|
+
const clause = { types: [...target.clause.types], tiers: [...target.clause.tiers], scope: { ...target.clause.scope } };
|
|
103
|
+
const last = eventSubscriptions[eventSubscriptions.length - 1];
|
|
104
|
+
if (last !== undefined && last.component === target.component) {
|
|
105
|
+
last.clauses.push(clause);
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
eventSubscriptions.push({ component: target.component, clauses: [clause] });
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return {
|
|
112
|
+
biome: input.biome,
|
|
113
|
+
grants: [...input.admitted]
|
|
114
|
+
.sort(compareTargets)
|
|
115
|
+
.map(({ component, operation, receiver }) => ({ component, operation, receiver })),
|
|
116
|
+
eventSubscriptions,
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=installed-workload-grant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"installed-workload-grant.js","sourceRoot":"","sources":["../../../src/deployment/lib/installed-workload-grant.ts"],"names":[],"mappings":";;;AA2IA,oEA8CC;AA0BD,sFA0BC;AA7OD,6BAAwB;AAExB,uDAAqD;AACrD,uDAAsF;AACtF,iDAAqE;AACr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E,CAAC,CAAC;QAC9E,CAAC;IACH,CAAC;IACD,OAAO;QACL,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,MAAM,EAAE,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC;aACxB,IAAI,CAAC,cAAc,CAAC;aACpB,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC;QACpF,kBAAkB;KACnB,CAAC;AACJ,CAAC"}
|
|
@@ -3,6 +3,13 @@ export declare enum OperationGrantReceiverKind {
|
|
|
3
3
|
Biome = "biome",
|
|
4
4
|
PlatformService = "platform-service"
|
|
5
5
|
}
|
|
6
|
+
export declare const OperationGrantReceiverSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7
|
+
kind: z.ZodLiteral<OperationGrantReceiverKind.Biome>;
|
|
8
|
+
biome: z.ZodString;
|
|
9
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
10
|
+
kind: z.ZodLiteral<OperationGrantReceiverKind.PlatformService>;
|
|
11
|
+
service: z.ZodString;
|
|
12
|
+
}, z.core.$strict>], "kind">;
|
|
6
13
|
export declare const OperationGrantSchema: z.ZodObject<{
|
|
7
14
|
caller: z.ZodObject<{
|
|
8
15
|
biome: z.ZodString;
|
|
@@ -18,5 +25,17 @@ export declare const OperationGrantSchema: z.ZodObject<{
|
|
|
18
25
|
}, z.core.$strict>], "kind">;
|
|
19
26
|
}, z.core.$strict>;
|
|
20
27
|
export type OperationGrant = z.infer<typeof OperationGrantSchema>;
|
|
28
|
+
export declare enum UngrantedOptionalOperationReason {
|
|
29
|
+
OwnerNotServed = "owner-not-served"
|
|
30
|
+
}
|
|
31
|
+
export declare const UngrantedOptionalOperationSchema: z.ZodObject<{
|
|
32
|
+
caller: z.ZodObject<{
|
|
33
|
+
biome: z.ZodString;
|
|
34
|
+
component: z.ZodString;
|
|
35
|
+
}, z.core.$strict>;
|
|
36
|
+
operation: z.core.$ZodBranded<z.ZodString, "OperationId", "out">;
|
|
37
|
+
reason: z.ZodEnum<typeof UngrantedOptionalOperationReason>;
|
|
38
|
+
}, z.core.$strict>;
|
|
39
|
+
export type UngrantedOptionalOperation = z.infer<typeof UngrantedOptionalOperationSchema>;
|
|
21
40
|
export declare function compareOperationGrants(a: Pick<OperationGrant, 'caller' | 'operation'>, b: Pick<OperationGrant, 'caller' | 'operation'>): number;
|
|
22
41
|
//# sourceMappingURL=operation-grant.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation-grant.d.ts","sourceRoot":"","sources":["../../../src/deployment/lib/operation-grant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"operation-grant.d.ts","sourceRoot":"","sources":["../../../src/deployment/lib/operation-grant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmBxB,oBAAY,0BAA0B;IAEpC,KAAK,UAAU;IAEf,eAAe,qBAAqB;CACrC;AAMD,eAAO,MAAM,4BAA4B;;;;;;4BAavC,CAAC;AAGH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;kBAMtB,CAAC;AAEZ,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAGlE,oBAAY,gCAAgC;IAE1C,cAAc,qBAAqB;CACpC;AAQD,eAAO,MAAM,gCAAgC;;;;;;;kBAMlC,CAAC;AAEZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAM1F,wBAAgB,sBAAsB,CACpC,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,GAAG,WAAW,CAAC,EAC/C,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,GAAG,WAAW,CAAC,GAC9C,MAAM,CAMR"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OperationGrantSchema = exports.OperationGrantReceiverKind = void 0;
|
|
3
|
+
exports.UngrantedOptionalOperationSchema = exports.UngrantedOptionalOperationReason = exports.OperationGrantSchema = exports.OperationGrantReceiverSchema = exports.OperationGrantReceiverKind = void 0;
|
|
4
4
|
exports.compareOperationGrants = compareOperationGrants;
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
const operation_id_1 = require("./operation-id");
|
|
7
7
|
const trust_domain_1 = require("./trust-domain");
|
|
8
|
+
const code_unit_order_1 = require("./code-unit-order");
|
|
8
9
|
var OperationGrantReceiverKind;
|
|
9
10
|
(function (OperationGrantReceiverKind) {
|
|
10
11
|
OperationGrantReceiverKind["Biome"] = "biome";
|
|
@@ -13,7 +14,7 @@ var OperationGrantReceiverKind;
|
|
|
13
14
|
const GrantBiomeIdSchema = zod_1.z
|
|
14
15
|
.string()
|
|
15
16
|
.regex(trust_domain_1.TRUST_DOMAIN_BIOME_ID_PATTERN, 'biome id must be lowercase kebab-case');
|
|
16
|
-
|
|
17
|
+
exports.OperationGrantReceiverSchema = zod_1.z.discriminatedUnion('kind', [
|
|
17
18
|
zod_1.z
|
|
18
19
|
.object({
|
|
19
20
|
kind: zod_1.z.literal(OperationGrantReceiverKind.Biome),
|
|
@@ -31,15 +32,23 @@ exports.OperationGrantSchema = zod_1.z
|
|
|
31
32
|
.object({
|
|
32
33
|
caller: zod_1.z.object({ biome: GrantBiomeIdSchema, component: zod_1.z.string().min(1) }).strict(),
|
|
33
34
|
operation: operation_id_1.OperationIdSchema,
|
|
34
|
-
receiver: OperationGrantReceiverSchema,
|
|
35
|
+
receiver: exports.OperationGrantReceiverSchema,
|
|
36
|
+
})
|
|
37
|
+
.strict();
|
|
38
|
+
var UngrantedOptionalOperationReason;
|
|
39
|
+
(function (UngrantedOptionalOperationReason) {
|
|
40
|
+
UngrantedOptionalOperationReason["OwnerNotServed"] = "owner-not-served";
|
|
41
|
+
})(UngrantedOptionalOperationReason || (exports.UngrantedOptionalOperationReason = UngrantedOptionalOperationReason = {}));
|
|
42
|
+
exports.UngrantedOptionalOperationSchema = zod_1.z
|
|
43
|
+
.object({
|
|
44
|
+
caller: zod_1.z.object({ biome: GrantBiomeIdSchema, component: zod_1.z.string().min(1) }).strict(),
|
|
45
|
+
operation: operation_id_1.OperationIdSchema,
|
|
46
|
+
reason: zod_1.z.nativeEnum(UngrantedOptionalOperationReason),
|
|
35
47
|
})
|
|
36
48
|
.strict();
|
|
37
|
-
function compareCodeUnits(a, b) {
|
|
38
|
-
return a < b ? -1 : a > b ? 1 : 0;
|
|
39
|
-
}
|
|
40
49
|
function compareOperationGrants(a, b) {
|
|
41
|
-
return (compareCodeUnits(a.caller.biome, b.caller.biome) ||
|
|
42
|
-
compareCodeUnits(a.caller.component, b.caller.component) ||
|
|
43
|
-
compareCodeUnits(a.operation, b.operation));
|
|
50
|
+
return ((0, code_unit_order_1.compareCodeUnits)(a.caller.biome, b.caller.biome) ||
|
|
51
|
+
(0, code_unit_order_1.compareCodeUnits)(a.caller.component, b.caller.component) ||
|
|
52
|
+
(0, code_unit_order_1.compareCodeUnits)(a.operation, b.operation));
|
|
44
53
|
}
|
|
45
54
|
//# sourceMappingURL=operation-grant.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation-grant.js","sourceRoot":"","sources":["../../../src/deployment/lib/operation-grant.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"operation-grant.js","sourceRoot":"","sources":["../../../src/deployment/lib/operation-grant.ts"],"names":[],"mappings":";;;AAkFA,wDASC;AA3FD,6BAAwB;AAExB,iDAAmD;AACnD,iDAA+D;AAC/D,uDAAqD;AAerD,IAAY,0BAKX;AALD,WAAY,0BAA0B;IAEpC,6CAAe,CAAA;IAEf,kEAAo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,EAAE;IACtF,SAAS,EAAE,gCAAiB;IAC5B,MAAM,EAAE,OAAC,CAAC,UAAU,CAAC,gCAAgC,CAAC;CACvD,CAAC;KACD,MAAM,EAAE,CAAC;AAQZ,SAAgB,sBAAsB,CACpC,CAA+C,EAC/C,CAA+C;IAE/C,OAAO,CACL,IAAA,kCAAgB,EAAC,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;QAChD,IAAA,kCAAgB,EAAC,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC;QACxD,IAAA,kCAAgB,EAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,CAC3C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const OrgContextRelaySchema: z.ZodObject<{
|
|
3
|
+
caller: z.ZodObject<{
|
|
4
|
+
biome: z.ZodString;
|
|
5
|
+
component: z.ZodString;
|
|
6
|
+
}, z.core.$strict>;
|
|
7
|
+
}, z.core.$strict>;
|
|
8
|
+
export type OrgContextRelay = z.infer<typeof OrgContextRelaySchema>;
|
|
9
|
+
export declare function compareOrgContextRelays(a: OrgContextRelay, b: OrgContextRelay): number;
|
|
10
|
+
//# sourceMappingURL=org-context-relay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"org-context-relay.d.ts","sourceRoot":"","sources":["../../../src/deployment/lib/org-context-relay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsBxB,eAAO,MAAM,qBAAqB;;;;;kBAIvB,CAAC;AAEZ,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAOpE,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,eAAe,EAAE,CAAC,EAAE,eAAe,GAAG,MAAM,CAKtF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OrgContextRelaySchema = void 0;
|
|
4
|
+
exports.compareOrgContextRelays = compareOrgContextRelays;
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const trust_domain_1 = require("./trust-domain");
|
|
7
|
+
const RelayBiomeIdSchema = zod_1.z
|
|
8
|
+
.string()
|
|
9
|
+
.regex(trust_domain_1.TRUST_DOMAIN_BIOME_ID_PATTERN, 'biome id must be lowercase kebab-case');
|
|
10
|
+
exports.OrgContextRelaySchema = zod_1.z
|
|
11
|
+
.object({
|
|
12
|
+
caller: zod_1.z.object({ biome: RelayBiomeIdSchema, component: zod_1.z.string().min(1) }).strict(),
|
|
13
|
+
})
|
|
14
|
+
.strict();
|
|
15
|
+
function compareCodeUnits(a, b) {
|
|
16
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
17
|
+
}
|
|
18
|
+
function compareOrgContextRelays(a, b) {
|
|
19
|
+
return (compareCodeUnits(a.caller.biome, b.caller.biome) ||
|
|
20
|
+
compareCodeUnits(a.caller.component, b.caller.component));
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=org-context-relay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"org-context-relay.js","sourceRoot":"","sources":["../../../src/deployment/lib/org-context-relay.ts"],"names":[],"mappings":";;;AAmCA,0DAKC;AAxCD,6BAAwB;AAExB,iDAA+D;AAe/D,MAAM,kBAAkB,GAAG,OAAC;KACzB,MAAM,EAAE;KACR,KAAK,CAAC,4CAA6B,EAAE,uCAAuC,CAAC,CAAC;AAGpE,QAAA,qBAAqB,GAAG,OAAC;KACnC,MAAM,CAAC;IACN,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE;CACvF,CAAC;KACD,MAAM,EAAE,CAAC;AAIZ,SAAS,gBAAgB,CAAC,CAAS,EAAE,CAAS;IAC5C,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpC,CAAC;AAGD,SAAgB,uBAAuB,CAAC,CAAkB,EAAE,CAAkB;IAC5E,OAAO,CACL,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;QAChD,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CACzD,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-sweep-grant.d.ts","sourceRoot":"","sources":["../../../src/deployment/lib/organization-sweep-grant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"organization-sweep-grant.d.ts","sourceRoot":"","sources":["../../../src/deployment/lib/organization-sweep-grant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAqB3E,eAAO,MAAM,4BAA4B;;;;;;kBAK9B,CAAC;AAEZ,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAMlF,wBAAgB,8BAA8B,CAC5C,CAAC,EAAE;IAAE,QAAQ,CAAC,MAAM,EAAE,sBAAsB,CAAC,QAAQ,CAAC,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAAA;CAAE,EAChG,CAAC,EAAE;IAAE,QAAQ,CAAC,MAAM,EAAE,sBAAsB,CAAC,QAAQ,CAAC,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAAA;CAAE,GAC/F,MAAM,CAMR"}
|
|
@@ -5,6 +5,7 @@ exports.compareOrganizationSweepGrants = compareOrganizationSweepGrants;
|
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
const platform_sweep_1 = require("./platform-sweep");
|
|
7
7
|
const trust_domain_1 = require("./trust-domain");
|
|
8
|
+
const code_unit_order_1 = require("./code-unit-order");
|
|
8
9
|
const SweepBiomeIdSchema = zod_1.z
|
|
9
10
|
.string()
|
|
10
11
|
.regex(trust_domain_1.TRUST_DOMAIN_BIOME_ID_PATTERN, 'biome id must be lowercase kebab-case');
|
|
@@ -14,12 +15,9 @@ exports.OrganizationSweepGrantSchema = zod_1.z
|
|
|
14
15
|
sweep: platform_sweep_1.PlatformSweepSchema,
|
|
15
16
|
})
|
|
16
17
|
.strict();
|
|
17
|
-
function compareCodeUnits(a, b) {
|
|
18
|
-
return a < b ? -1 : a > b ? 1 : 0;
|
|
19
|
-
}
|
|
20
18
|
function compareOrganizationSweepGrants(a, b) {
|
|
21
|
-
return (compareCodeUnits(a.caller.biome, b.caller.biome) ||
|
|
22
|
-
compareCodeUnits(a.caller.component, b.caller.component) ||
|
|
23
|
-
compareCodeUnits(a.sweep, b.sweep));
|
|
19
|
+
return ((0, code_unit_order_1.compareCodeUnits)(a.caller.biome, b.caller.biome) ||
|
|
20
|
+
(0, code_unit_order_1.compareCodeUnits)(a.caller.component, b.caller.component) ||
|
|
21
|
+
(0, code_unit_order_1.compareCodeUnits)(a.sweep, b.sweep));
|
|
24
22
|
}
|
|
25
23
|
//# sourceMappingURL=organization-sweep-grant.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-sweep-grant.js","sourceRoot":"","sources":["../../../src/deployment/lib/organization-sweep-grant.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"organization-sweep-grant.js","sourceRoot":"","sources":["../../../src/deployment/lib/organization-sweep-grant.ts"],"names":[],"mappings":";;;AAoCA,wEASC;AA7CD,6BAAwB;AAExB,qDAA2E;AAC3E,iDAA+D;AAC/D,uDAAqD;AAcrD,MAAM,kBAAkB,GAAG,OAAC;KACzB,MAAM,EAAE;KACR,KAAK,CAAC,4CAA6B,EAAE,uCAAuC,CAAC,CAAC;AAGpE,QAAA,4BAA4B,GAAG,OAAC;KAC1C,MAAM,CAAC;IACN,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE;IACtF,KAAK,EAAE,oCAAmB;CAC3B,CAAC;KACD,MAAM,EAAE,CAAC;AAQZ,SAAgB,8BAA8B,CAC5C,CAAgG,EAChG,CAAgG;IAEhG,OAAO,CACL,IAAA,kCAAgB,EAAC,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;QAChD,IAAA,kCAAgB,EAAC,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC;QACxD,IAAA,kCAAgB,EAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CACnC,CAAC;AACJ,CAAC"}
|
|
@@ -11,7 +11,9 @@ export declare enum PlatformSweep {
|
|
|
11
11
|
EndedHolderErasure = "ended-holder-erasure",
|
|
12
12
|
ScmProjectBindingMaintenance = "scm-project-binding-maintenance",
|
|
13
13
|
ContributionConvergence = "contribution-convergence",
|
|
14
|
-
RetentionExpiryErasure = "retention-expiry-erasure"
|
|
14
|
+
RetentionExpiryErasure = "retention-expiry-erasure",
|
|
15
|
+
InstallationCleanup = "installation-cleanup"
|
|
15
16
|
}
|
|
16
17
|
export declare const PlatformSweepSchema: z.ZodEnum<typeof PlatformSweep>;
|
|
18
|
+
export declare const PLATFORM_SWEEP_RETIRED_ORGANIZATION: Readonly<Record<PlatformSweep, boolean>>;
|
|
17
19
|
//# sourceMappingURL=platform-sweep.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-sweep.d.ts","sourceRoot":"","sources":["../../../src/deployment/lib/platform-sweep.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAuBxB,oBAAY,aAAa;IAUvB,UAAU,gBAAgB;IAO1B,UAAU,gBAAgB;IAK1B,UAAU,gBAAgB;IAM1B,gBAAgB,sBAAsB;IAKtC,sBAAsB,6BAA6B;IAKnD,iBAAiB,uBAAuB;IAMxC,qBAAqB,4BAA4B;IAOjD,kBAAkB,wBAAwB;IAU1C,kBAAkB,yBAAyB;IAU3C,4BAA4B,oCAAoC;IAMhE,uBAAuB,6BAA6B;IAQpD,sBAAsB,6BAA6B;
|
|
1
|
+
{"version":3,"file":"platform-sweep.d.ts","sourceRoot":"","sources":["../../../src/deployment/lib/platform-sweep.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAuBxB,oBAAY,aAAa;IAUvB,UAAU,gBAAgB;IAO1B,UAAU,gBAAgB;IAK1B,UAAU,gBAAgB;IAM1B,gBAAgB,sBAAsB;IAKtC,sBAAsB,6BAA6B;IAKnD,iBAAiB,uBAAuB;IAMxC,qBAAqB,4BAA4B;IAOjD,kBAAkB,wBAAwB;IAU1C,kBAAkB,yBAAyB;IAU3C,4BAA4B,oCAAoC;IAMhE,uBAAuB,6BAA6B;IAQpD,sBAAsB,6BAA6B;IAUnD,mBAAmB,yBAAyB;CAC7C;AAGD,eAAO,MAAM,mBAAmB,iCAAwB,CAAC;AAUzD,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CAAC,MAAM,CAAC,aAAa,EAAE,OAAO,CAAC,CAcxF,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PlatformSweepSchema = exports.PlatformSweep = void 0;
|
|
3
|
+
exports.PLATFORM_SWEEP_RETIRED_ORGANIZATION = exports.PlatformSweepSchema = exports.PlatformSweep = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
var PlatformSweep;
|
|
6
6
|
(function (PlatformSweep) {
|
|
@@ -16,6 +16,22 @@ var PlatformSweep;
|
|
|
16
16
|
PlatformSweep["ScmProjectBindingMaintenance"] = "scm-project-binding-maintenance";
|
|
17
17
|
PlatformSweep["ContributionConvergence"] = "contribution-convergence";
|
|
18
18
|
PlatformSweep["RetentionExpiryErasure"] = "retention-expiry-erasure";
|
|
19
|
+
PlatformSweep["InstallationCleanup"] = "installation-cleanup";
|
|
19
20
|
})(PlatformSweep || (exports.PlatformSweep = PlatformSweep = {}));
|
|
20
21
|
exports.PlatformSweepSchema = zod_1.z.enum(PlatformSweep);
|
|
22
|
+
exports.PLATFORM_SWEEP_RETIRED_ORGANIZATION = {
|
|
23
|
+
[PlatformSweep.EraseSweep]: true,
|
|
24
|
+
[PlatformSweep.OrgErasure]: true,
|
|
25
|
+
[PlatformSweep.AppErasure]: true,
|
|
26
|
+
[PlatformSweep.IndexMaintenance]: false,
|
|
27
|
+
[PlatformSweep.ConnectorSecretCustody]: false,
|
|
28
|
+
[PlatformSweep.CredentialRefresh]: false,
|
|
29
|
+
[PlatformSweep.ConnectionHealthProbe]: false,
|
|
30
|
+
[PlatformSweep.MemberNotification]: false,
|
|
31
|
+
[PlatformSweep.EndedHolderErasure]: false,
|
|
32
|
+
[PlatformSweep.ScmProjectBindingMaintenance]: false,
|
|
33
|
+
[PlatformSweep.ContributionConvergence]: false,
|
|
34
|
+
[PlatformSweep.RetentionExpiryErasure]: false,
|
|
35
|
+
[PlatformSweep.InstallationCleanup]: false,
|
|
36
|
+
};
|
|
21
37
|
//# sourceMappingURL=platform-sweep.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-sweep.js","sourceRoot":"","sources":["../../../src/deployment/lib/platform-sweep.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAuBxB,IAAY,
|
|
1
|
+
{"version":3,"file":"platform-sweep.js","sourceRoot":"","sources":["../../../src/deployment/lib/platform-sweep.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAuBxB,IAAY,aAgGX;AAhGD,WAAY,aAAa;IAUvB,2CAA0B,CAAA;IAO1B,2CAA0B,CAAA;IAK1B,2CAA0B,CAAA;IAM1B,uDAAsC,CAAA;IAKtC,oEAAmD,CAAA;IAKnD,yDAAwC,CAAA;IAMxC,kEAAiD,CAAA;IAOjD,2DAA0C,CAAA;IAU1C,4DAA2C,CAAA;IAU3C,iFAAgE,CAAA;IAMhE,qEAAoD,CAAA;IAQpD,oEAAmD,CAAA;IAUnD,6DAA4C,CAAA;AAC9C,CAAC,EAhGW,aAAa,6BAAb,aAAa,QAgGxB;AAGY,QAAA,mBAAmB,GAAG,OAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AAU5C,QAAA,mCAAmC,GAA6C;IAC3F,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE,IAAI;IAChC,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE,IAAI;IAChC,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE,IAAI;IAChC,CAAC,aAAa,CAAC,gBAAgB,CAAC,EAAE,KAAK;IACvC,CAAC,aAAa,CAAC,sBAAsB,CAAC,EAAE,KAAK;IAC7C,CAAC,aAAa,CAAC,iBAAiB,CAAC,EAAE,KAAK;IACxC,CAAC,aAAa,CAAC,qBAAqB,CAAC,EAAE,KAA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