simetra 0.3.0-next.2 → 0.3.0-next.3
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/compiler/index.d.ts +20 -3
- package/dist/compiler/index.js +257 -23
- package/dist/model/index.d.ts +155 -1
- package/dist/model/index.js +47 -4
- package/dist/schema/index.d.ts +1 -1
- package/dist/schema/index.js +1 -1
- package/dist/shell/index.d.ts +12 -0
- package/dist/shell/index.js +12 -1
- package/dist/ui/index.js +25 -2
- package/package.json +2 -2
- package/schemas/project.schema.json +179 -0
- package/schemas/rights-sets.schema.json +15 -0
- package/schemas/roles.schema.json +15 -0
package/dist/compiler/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { AttributeCase, CatalogTable, CatalogUnit, ClientCatalog, CustomTable, D
|
|
|
3
3
|
import { Constraint, IndexElem, IndexStmt, Node, Node as Node$1, RangeVar } from "libpg-query";
|
|
4
4
|
type Severity = "error" | "warning";
|
|
5
5
|
/** Коди правил самого компілятора; коди перевірок схем T0 — `SCHEMA_RULES`. */
|
|
6
|
-
export declare const COMPILER_RULES: readonly ["project.missing", "project.timezone-unknown", "project.database-required", "file.unknown-path", "file.orphan", "file.invalid-json", "file.schema", "file.unknown-key", "file.kind-mismatch", "file.name-mismatch", "file.movements-block", "file.movements-marker-indented", "sql.parse", "sql.statement-not-allowed", "sql.unit-duplicate", "sql.namespace-conflict", "sql.generated-grant", "sql.kind-table-verbatim", "sql.function-body-statement", "sql.function-body-session-setting", "sql.function-body-temp-type", "sql.function-body-session-builtin", "sql.platform-function-call", "sql.expression-call-not-allowed", "sql.dependency-cycle", "sql.closed-shell", "sql.command-context-write", "sql.head-not-allowed", "sql.domain-check-not-allowed", "sql.function-settings-shell", "sql.head-settings", "sql.function-overload", "sql.row-rule-grammar", "sql.row-rule-foreign-table", "sql.row-rule-outside-module", "sql.row-rule-name-taken", "sql.bare-current-user", "sql.debt-grows", "sql.debt-stale", "sql.debt-session-write", "sql.debt-extension-schema", "sql.definer-reads-rls", "sql.definer-caller-unchecked", "sql.policy-helper-correlated", "sql.declaration-target-missing", "sql.declaration-overload", "sql.declaration-duplicate", "sql.declaration-platform-form", "sql.declaration-platform-form-widens", "sql.declaration-execute-widened", "sql.declaration-check-missing", "sql.declaration-check-form", "sql.declaration-check-not-applied", "sql.declaration-anonymous-definer", "sql.default-privileges-execute", "sql.function-argument-type-reference", "rewrite.ambiguous-name", "rewrite.unqualified-table", "rewrite.unsupported", "rewrite.trigger-binding", "rewrite.label-literal", "rewrite.dynamic-sql", "rewrite.unresolved-type", "rewrite.body-quoting", "rewrite.verification-failed", "rewrite.contract-change", "rewrite.dynamic-sql-unscoped", "identity.id-missing", "identity.id-duplicate", "identity.physical-name-missing", "identity.kind-label-missing", "identity.kind-label-retained", "identity.kind-label-duplicate", "identity.assigned-once-changed", "identity.name-duplicate", "identity.name-case", "identity.name-reserved", "identity.name-structural", "reference.unresolved", "reference.ambiguous", "customTable.column-unknown", "customTable.index-derived-column", "register.balance-control-resource", "register.balance-control-duplicate", "posting.field-unknown", "posting.register-field-unknown", "posting.tabular-section-unknown", "scope.declaration-missing", "scope.unknown-kind", "scope.attribute-name-collision", "scope.root-duplicate", "scope.root-key", "scope.root-hierarchy", "scope.root-declaration", "scope.root-self-reference", "scope.root-cascade-not-kind", "scope.global-to-scoped", "scope.cross-kind", "scope.recorder-mismatch", "scope.custom-table-column", "scope.cross-scope-redundant", "scope.custom-table-cross-tenant", "scope.set-function-missing", "scope.set-function-signature", "scope.membership-missing", "storage.bucket-duplicate", "storage.scope-kind-unknown", "subscription.source-not-table", "subscription.provider-table-unknown", "subscription.when-changed-unknown", "subscription.when-changed-duplicate", "subscription.source-duplicate", "subscription.name-duplicate", "subscription.when-changed-on-delete", "subscription.handler-missing", "subscription.handler-signature", "subscription.handler-not-closed", "subscription.handler-assigns-mechanics", "subscription.handler-assigns-carrier", "subscription.handler-reads-carrier", "subscription.trigger-name-taken", "subscription.when-changed-mechanics", "users.catalog-duplicate", "users.scope-not-none", "users.description-required", "users.provision-unsafe", "users.catalog-missing", "languages.catalog-duplicate", "languages.scope-not-none", "languages.code-form", "languages.description-required", "languages.public-read", "languages.predefined-items", "languages.seed-unsafe", "languages.primary-missing", "languages.primary-without-catalog", "membership.not-scoped", "membership.user-not-users-ref", "membership.duplicate", "rights.action-unknown", "rights.custom-action-reserved", "rights.custom-action-effects", "rights.requires-cycle", "rights.attribute-unknown", "rights.carrier-not-ref", "rights.carrier-cross-tenant", "rights.carrier-column-taken", "rights.carrier-path-adopted", "rights.carrier-lazy", "rights.register-access-dimension", "rights.dimension-name-reserved", "rights.ownership-target", "rights.container-target", "rights.container-self", "rights.dimension-unknown", "rights.dimension-target", "rights.dimension-relation", "rights.access-target", "rights.access-duplicate", "rights.dimension-function-missing", "rights.dimension-function-signature", "rights.dimension-function-reads-rights", "rights.source-table", "rights.source-forced-rls", "rights.source-member-key", "rights.source-member-unique", "rights.source-column-type", "rights.source-where", "rights.source-role-key", "rights.source-scope-column", "rights.membership-source-duplicate", "rights.source-container-column", "rights.scope-kind-unknown", "rights.users-missing", "rights.public-read-forbidden", "rights.public-read-published-kind", "rights.public-read-published-rights", "rights.public-read-published-read", "rights.include-target", "rights.include-cycle", "rights.scope-without-membership", "rights.full-access-level", "rights.root-creator-level", "rights.root-creator-duplicate", "rights.root-creator-membership", "rights.root-creator-set-function", "rights.root-creator-assignments", "rights.root-creator-assignment-required", "rights.root-creator-subscription", "rights.root-create-author", "rights.root-creator-no-admin", "rights.root-creator-unreachable", "rights.source-unknown", "rights.source-key-level", "rights.source-key-duplicate", "rights.grant-level", "rights.extent-unsupported", "rights.requires-missing", "rights.custom-table-no-contract", "rights.object-without-rights", "rights.custom-action-multi-object", "rights.system-catalog-missing", "rights.system-catalog-duplicate", "rights.system-catalog-scope", "rights.system-catalog-description", "rights.system-catalog-parallel", "rights.system-catalog-custom-action", "rights.adopted-source-writes", "rights.scope-kind-unread", "project.self-sign-up", "rights.snapshot-source-unknown", "rights.snapshot-exempt-writer", "rights.signal-source-unknown", "reference.not-referenceable", "reference.custom-table-key", "reference.custom-table-deferrable-key", "reference.default-to-table", "reference.default-unknown-value", "reference.polymorphic-target-kind", "attribute.unique-within-place", "attribute.row-over-budget", "attribute.lazy-over-budget", "index.attribute-unknown", "index.attribute-duplicate", "index.attribute-rich-text", "search.field-unknown", "search.field-duplicate", "search.field-tabular", "search.field-ref", "search.field-generated", "search.field-rich-text", "catalog.owner-kind", "register.recorder-kind", "posting.register-kind", "posting.register-independent", "posting.register-undeclared", "posting.source-missing", "posting.source-ambiguous", "posting.query-not-select", "posting.query-order-missing", "posting.recorder-not-allowed", "posting.fields-incomplete", "posting.row-in-document-source", "posting.aggregate-in-section-source", "posting.movement-type", "posting.period-not-allowed", "posting.type-mismatch", "physical.table-duplicate", "physical.relation-duplicate", "physical.column-duplicate", "physical.function-duplicate", "physical.reserved-word", "physical.name-too-long", "physical.constraint-name-required", "customTable.foreign-key-arity", "customTable.foreign-key-deferrable-target", "customTable.fk-action-on-kind-table", "customTable.fk-target-not-key", "customTable.generated-conflict", "customTable.key-column-nullable", "presentation.unknown-standard-attribute", "operation.physical-name-too-long", "operation.input-invalid", "operation.target-not-found", "operation.object-exists", "operation.collection-unknown", "operation.delete-referenced", "promote.column-unplaced", "promote.mapping-unknown", "promote.unit-unsupported", "promote.reference-not-promoted", "promote.retired-referenced", "promote.unclassified", "promote.write-path", "promote.debt-writes-table", "promote.cascade-to-restrict", "promote.provider-user-reference", "promote.enum-labels", "promote.type-unsupported", "promote.default-unplaced", "promote.fill-missing", "promote.expression-invalid", "promote.debt-text-reference", "promote.text-conflict", "promote.property-not-equivalent", "engine.diagnostic", "engine.unmodeled-drift", "engine.shadow-load-failed", "engine.shadow-drop-failed", "engine.desired-rejected", "engine.clone-failed", "engine.environment-failed", "engine.preamble-unknown", "engine.unrepresentable", "engine.unmodeled-class", "engine.census-mismatch", "engine.unmodeled-property", "engine.out-of-scope", "engine.owner-not-member", "apply.state-format", "apply.ledger-without-marker", "apply.cascade", "apply.non-transactional", "apply.commit-boundary", "apply.permission-required", "apply.permission-unknown", "apply.first-apply", "apply.drift", "apply.drift-partial", "apply.drift-unverifiable", "apply.versions-changed", "apply.primary-language-changed", "apply.plan-versions", "apply.plan-format", "apply.plan-hash", "apply.plan-stale", "apply.busy", "apply.api-role", "apply.server-unsupported", "apply.role-mismatch", "apply.chain", "apply.target-changed", "apply.verify-failed", "apply.step-failed", "apply.lock-timeout", "apply.lock-privilege", "apply.lock-footprint-exceeded", "apply.connection-lost", "apply.type-narrowing", "apply.type-guard-failed", "apply.preservation-failed", "apply.preservation-measure-failed", "apply.function-check-failed", "apply.function-check-blind", "apply.deferred-constraint-failed", "apply.constraint-invalid", "apply.rehearsal-proof-failed", "apply.rehearsal-required", "apply.rehearsal-stale", "apply.rehearsal-copy-empty", "apply.rehearsal-fewer-rows", "apply.rehearsal-timeout-unbounded", "apply.temp-name-taken", "apply.plpgsql-check-unavailable", "apply.extension-unavailable", "apply.replication-role", "apply.data-step-failed", "apply.data-step-narrowing", "apply.data-write-mismatch", "apply.not-null-violation", "apply.backfill-rows-changed", "apply.backfill-triggers-changed", "plan.unparsable-step", "plan.clone-mismatch", "plan.proof-not-empty", "plan.fingerprint-disagrees", "plan.schema-only-proof", "plan.owner-mismatch", "plan.platform-role-missing", "plan.platform-role-shape", "plan.owner-not-bypassrls", "plan.owner-provider-login", "plan.shadow-base-unsupported", "plan.identity-table-missing", "plan.identity-trigger-locked", "plan.storage-added", "plan.storage-removed", "plan.type-guard-unsupported", "plan.type-change-dependent", "plan.promotion-record-missing", "plan.promotion-record-invalid", "plan.promotion-base", "plan.promotion-record-mismatch", "plan.promotion-record-stale", "plan.promotion-needs-marker", "plan.promotion-multiple", "plan.promotion-unsupported", "plan.promotion-applied", "plan.promotion-not-applicable", "plan.rename-not-realized", "plan.removal-unclassified", "plan.platform-replacement-missing", "plan.property-not-reproduced", "plan.write-path", "plan.service-role-access-lost", "plan.update-of-narrowed", "plan.foreign-exclusive-lock", "plan.plpgsql-check-unavailable", "plan.temp-name-taken", "plan.data-step-volatile", "plan.data-step-function-changed", "plan.temp-privilege", "plan.replication-role", "plan.preservation-type", "plan.provider-trigger-taken", "plan.provider-trigger-undeclared", "plan.trigger-function-unseedable", "plan.row-version-first", "plan.numbering-not-generated", "plan.not-null-violation", "plan.backfill-order", "plan.backfill-unique", "plan.backfill-check", "plan.backfill-carrier-source", "plan.backfill-rights-guard", "plan.backfill-count-failed", "plan.rights-source-access", "plan.rights-source-unknown-keys", "plan.rights-full-access-lost", "plan.rights-orphans", "database.failed", "roles.create-role-denied", "roles.admin-option-missing", "roles.membership-grant-denied", "roles.superuser-required", "roles.unsafe-schema", "roles.unsafe-template", "roles.database-owner", "roles.database-locale", "roles.shared-cluster", "roles.extension-unavailable", "roles.dev-passwords-unsupported", "roles.dev-password-missing", "roles.dev-passwords-remote", "maintenance.model-mismatch", "maintenance.unknown-role", "maintenance.role-level", "maintenance.role-ambiguous", "maintenance.unknown-scope-kind", "maintenance.no-catalog", "maintenance.scope-missing", "maintenance.unknown-user", "maintenance.busy", "maintenance.not-first", "maintenance.holder-exists", "maintenance.not-effective", "maintenance.invalid-member", "maintenance.member-required", "maintenance.refused", "maintenance.outcome-unknown", "introspect.unrepresentable", "introspect.identity-conflict", "introspect.project-mismatch", "introspect.path-collision", "introspect.definer-check-unknown", "introspect.execute-narrowed", "introspect.definer-platform-form-candidate", "introspect.definer-foreign-grant", "introspect.definer-callers-drift", "introspect.definer-acl-changed"];
|
|
6
|
+
export declare const COMPILER_RULES: readonly ["project.missing", "project.timezone-unknown", "project.database-required", "file.unknown-path", "file.orphan", "file.invalid-json", "file.schema", "file.unknown-key", "file.kind-mismatch", "file.name-mismatch", "file.movements-block", "file.movements-marker-indented", "sql.parse", "sql.statement-not-allowed", "sql.unit-duplicate", "sql.namespace-conflict", "sql.generated-grant", "sql.kind-table-verbatim", "sql.function-body-statement", "sql.function-body-session-setting", "sql.function-body-temp-type", "sql.function-body-session-builtin", "sql.platform-function-call", "sql.expression-call-not-allowed", "sql.dependency-cycle", "sql.closed-shell", "sql.command-context-write", "sql.head-not-allowed", "sql.domain-check-not-allowed", "sql.function-settings-shell", "sql.head-settings", "sql.function-overload", "sql.row-rule-grammar", "sql.row-rule-foreign-table", "sql.row-rule-outside-module", "sql.row-rule-name-taken", "sql.bare-current-user", "sql.debt-grows", "sql.debt-stale", "sql.debt-session-write", "sql.debt-extension-schema", "sql.definer-reads-rls", "sql.definer-caller-unchecked", "sql.policy-helper-correlated", "sql.declaration-target-missing", "sql.declaration-overload", "sql.declaration-duplicate", "sql.declaration-platform-form", "sql.declaration-platform-form-widens", "sql.declaration-execute-widened", "sql.declaration-check-missing", "sql.declaration-check-form", "sql.declaration-check-not-applied", "sql.declaration-anonymous-definer", "sql.default-privileges-execute", "sql.function-argument-type-reference", "rewrite.ambiguous-name", "rewrite.unqualified-table", "rewrite.unsupported", "rewrite.trigger-binding", "rewrite.label-literal", "rewrite.dynamic-sql", "rewrite.unresolved-type", "rewrite.body-quoting", "rewrite.verification-failed", "rewrite.contract-change", "rewrite.dynamic-sql-unscoped", "identity.id-missing", "identity.id-duplicate", "identity.physical-name-missing", "identity.kind-label-missing", "identity.kind-label-retained", "identity.kind-label-duplicate", "identity.assigned-once-changed", "identity.name-duplicate", "identity.name-case", "identity.name-reserved", "identity.name-structural", "reference.unresolved", "reference.ambiguous", "customTable.column-unknown", "customTable.index-derived-column", "register.balance-control-resource", "register.balance-control-duplicate", "posting.field-unknown", "posting.register-field-unknown", "posting.tabular-section-unknown", "scope.declaration-missing", "scope.unknown-kind", "scope.attribute-name-collision", "scope.root-duplicate", "scope.root-key", "scope.root-hierarchy", "scope.root-declaration", "scope.root-self-reference", "scope.root-cascade-not-kind", "scope.global-to-scoped", "scope.cross-kind", "scope.recorder-mismatch", "scope.custom-table-column", "scope.cross-scope-redundant", "scope.custom-table-cross-tenant", "scope.set-function-missing", "scope.set-function-signature", "scope.membership-missing", "storage.bucket-duplicate", "storage.scope-kind-unknown", "subscription.source-not-table", "subscription.provider-table-unknown", "subscription.when-changed-unknown", "subscription.when-changed-duplicate", "subscription.source-duplicate", "subscription.name-duplicate", "subscription.when-changed-on-delete", "subscription.handler-missing", "subscription.handler-signature", "subscription.handler-not-closed", "subscription.handler-assigns-mechanics", "subscription.handler-assigns-carrier", "subscription.handler-reads-carrier", "subscription.trigger-name-taken", "subscription.when-changed-mechanics", "users.catalog-duplicate", "users.scope-not-none", "users.description-required", "users.provision-unsafe", "users.catalog-missing", "languages.catalog-duplicate", "languages.scope-not-none", "languages.code-form", "languages.description-required", "languages.public-read", "languages.predefined-items", "languages.seed-unsafe", "languages.primary-missing", "languages.primary-without-catalog", "membership.not-scoped", "membership.user-not-users-ref", "membership.duplicate", "rights.action-unknown", "rights.custom-action-reserved", "rights.custom-action-effects", "rights.requires-cycle", "rights.attribute-unknown", "rights.carrier-not-ref", "rights.carrier-cross-tenant", "rights.carrier-column-taken", "rights.carrier-path-adopted", "rights.carrier-lazy", "rights.register-access-dimension", "rights.dimension-name-reserved", "rights.ownership-target", "rights.container-target", "rights.container-self", "rights.dimension-unknown", "rights.dimension-target", "rights.dimension-relation", "rights.access-target", "rights.access-duplicate", "rights.dimension-function-missing", "rights.dimension-function-signature", "rights.dimension-function-reads-rights", "rights.source-table", "rights.source-forced-rls", "rights.source-member-key", "rights.source-member-unique", "rights.source-column-type", "rights.source-where", "rights.source-role-key", "rights.source-scope-column", "rights.membership-source-duplicate", "rights.source-container-column", "rights.scope-kind-unknown", "rights.users-missing", "rights.public-read-forbidden", "rights.public-read-published-kind", "rights.public-read-published-rights", "rights.public-read-published-read", "rights.include-target", "rights.include-cycle", "rights.scope-without-membership", "rights.full-access-level", "rights.root-creator-level", "rights.root-creator-duplicate", "rights.root-creator-membership", "rights.root-creator-set-function", "rights.root-creator-assignments", "rights.root-creator-assignment-required", "rights.root-creator-subscription", "rights.root-create-author", "rights.root-creator-no-admin", "rights.root-creator-unreachable", "rights.source-unknown", "rights.source-key-level", "rights.source-key-duplicate", "rights.grant-level", "rights.extent-unsupported", "rights.requires-missing", "rights.custom-table-no-contract", "rights.object-without-rights", "rights.custom-action-multi-object", "rights.system-catalog-missing", "rights.system-catalog-duplicate", "rights.system-catalog-scope", "rights.system-catalog-description", "rights.system-catalog-parallel", "rights.system-catalog-custom-action", "rights.adopted-source-writes", "rights.scope-kind-unread", "project.self-sign-up", "project.self-sign-up-role", "project.self-sign-up-stale", "rights.snapshot-source-unknown", "rights.snapshot-exempt-writer", "rights.signal-source-unknown", "reference.not-referenceable", "reference.custom-table-key", "reference.custom-table-deferrable-key", "reference.default-to-table", "reference.default-unknown-value", "reference.polymorphic-target-kind", "attribute.unique-within-place", "attribute.row-over-budget", "attribute.lazy-over-budget", "index.attribute-unknown", "index.attribute-duplicate", "index.attribute-rich-text", "search.field-unknown", "search.field-duplicate", "search.field-tabular", "search.field-ref", "search.field-generated", "search.field-rich-text", "catalog.owner-kind", "register.recorder-kind", "posting.register-kind", "posting.register-independent", "posting.register-undeclared", "posting.source-missing", "posting.source-ambiguous", "posting.query-not-select", "posting.query-order-missing", "posting.recorder-not-allowed", "posting.fields-incomplete", "posting.row-in-document-source", "posting.aggregate-in-section-source", "posting.movement-type", "posting.period-not-allowed", "posting.type-mismatch", "physical.table-duplicate", "physical.relation-duplicate", "physical.column-duplicate", "physical.function-duplicate", "physical.reserved-word", "physical.name-too-long", "physical.constraint-name-required", "customTable.foreign-key-arity", "customTable.foreign-key-deferrable-target", "customTable.fk-action-on-kind-table", "customTable.fk-target-not-key", "customTable.generated-conflict", "customTable.key-column-nullable", "presentation.unknown-standard-attribute", "operation.physical-name-too-long", "operation.input-invalid", "operation.target-not-found", "operation.object-exists", "operation.collection-unknown", "operation.delete-referenced", "promote.column-unplaced", "promote.mapping-unknown", "promote.unit-unsupported", "promote.reference-not-promoted", "promote.retired-referenced", "promote.unclassified", "promote.write-path", "promote.debt-writes-table", "promote.cascade-to-restrict", "promote.provider-user-reference", "promote.enum-labels", "promote.type-unsupported", "promote.default-unplaced", "promote.fill-missing", "promote.expression-invalid", "promote.debt-text-reference", "promote.text-conflict", "promote.property-not-equivalent", "engine.diagnostic", "engine.unmodeled-drift", "engine.shadow-load-failed", "engine.shadow-drop-failed", "engine.desired-rejected", "engine.clone-failed", "engine.environment-failed", "engine.preamble-unknown", "engine.unrepresentable", "engine.unmodeled-class", "engine.census-mismatch", "engine.unmodeled-property", "engine.out-of-scope", "engine.owner-not-member", "apply.state-format", "apply.ledger-without-marker", "apply.cascade", "apply.non-transactional", "apply.commit-boundary", "apply.permission-required", "apply.permission-unknown", "apply.first-apply", "apply.drift", "apply.drift-partial", "apply.drift-unverifiable", "apply.versions-changed", "apply.primary-language-changed", "apply.plan-versions", "apply.plan-format", "apply.plan-hash", "apply.plan-stale", "apply.busy", "apply.api-role", "apply.server-unsupported", "apply.role-mismatch", "apply.chain", "apply.target-changed", "apply.verify-failed", "apply.step-failed", "apply.lock-timeout", "apply.lock-privilege", "apply.lock-footprint-exceeded", "apply.connection-lost", "apply.type-narrowing", "apply.type-guard-failed", "apply.preservation-failed", "apply.preservation-measure-failed", "apply.function-check-failed", "apply.function-check-blind", "apply.deferred-constraint-failed", "apply.constraint-invalid", "apply.rehearsal-proof-failed", "apply.rehearsal-required", "apply.rehearsal-stale", "apply.rehearsal-copy-empty", "apply.rehearsal-fewer-rows", "apply.rehearsal-timeout-unbounded", "apply.temp-name-taken", "apply.plpgsql-check-unavailable", "apply.extension-unavailable", "apply.replication-role", "apply.data-step-failed", "apply.data-step-narrowing", "apply.data-write-mismatch", "apply.not-null-violation", "apply.backfill-rows-changed", "apply.backfill-triggers-changed", "plan.unparsable-step", "plan.clone-mismatch", "plan.proof-not-empty", "plan.fingerprint-disagrees", "plan.schema-only-proof", "plan.owner-mismatch", "plan.platform-role-missing", "plan.platform-role-shape", "plan.owner-not-bypassrls", "plan.owner-provider-login", "plan.shadow-base-unsupported", "plan.identity-table-missing", "plan.identity-trigger-locked", "plan.storage-added", "plan.storage-removed", "plan.type-guard-unsupported", "plan.type-change-dependent", "plan.promotion-record-missing", "plan.promotion-record-invalid", "plan.promotion-base", "plan.promotion-record-mismatch", "plan.promotion-record-stale", "plan.promotion-needs-marker", "plan.promotion-multiple", "plan.promotion-unsupported", "plan.promotion-applied", "plan.promotion-not-applicable", "plan.rename-not-realized", "plan.removal-unclassified", "plan.platform-replacement-missing", "plan.property-not-reproduced", "plan.write-path", "plan.service-role-access-lost", "plan.update-of-narrowed", "plan.foreign-exclusive-lock", "plan.plpgsql-check-unavailable", "plan.temp-name-taken", "plan.data-step-volatile", "plan.data-step-function-changed", "plan.temp-privilege", "plan.replication-role", "plan.preservation-type", "plan.provider-trigger-taken", "plan.provider-trigger-undeclared", "plan.trigger-function-unseedable", "plan.row-version-first", "plan.numbering-not-generated", "plan.not-null-violation", "plan.backfill-order", "plan.backfill-unique", "plan.backfill-check", "plan.backfill-carrier-source", "plan.backfill-rights-guard", "plan.backfill-count-failed", "plan.rights-source-access", "plan.rights-source-unknown-keys", "plan.rights-full-access-lost", "plan.rights-orphans", "database.failed", "data.scope-unspecified", "roles.create-role-denied", "roles.admin-option-missing", "roles.membership-grant-denied", "roles.superuser-required", "roles.unsafe-schema", "roles.unsafe-template", "roles.database-owner", "roles.database-locale", "roles.shared-cluster", "roles.extension-unavailable", "roles.dev-passwords-unsupported", "roles.dev-password-missing", "roles.dev-passwords-remote", "maintenance.model-mismatch", "maintenance.unknown-role", "maintenance.role-level", "maintenance.role-ambiguous", "maintenance.unknown-scope-kind", "maintenance.no-catalog", "maintenance.scope-missing", "maintenance.unknown-user", "maintenance.busy", "maintenance.not-first", "maintenance.holder-exists", "maintenance.not-effective", "maintenance.invalid-member", "maintenance.member-required", "maintenance.refused", "maintenance.outcome-unknown", "introspect.unrepresentable", "introspect.identity-conflict", "introspect.project-mismatch", "introspect.path-collision", "introspect.definer-check-unknown", "introspect.execute-narrowed", "introspect.definer-platform-form-candidate", "introspect.definer-foreign-grant", "introspect.definer-callers-drift", "introspect.definer-acl-changed"];
|
|
7
7
|
type CompilerRule = (typeof COMPILER_RULES)[number];
|
|
8
8
|
type RuleCode = SchemaRule | CompilerRule;
|
|
9
9
|
type DiagnosticParams = Record<string, string | number>;
|
|
@@ -2505,6 +2505,23 @@ export declare const addElementInput: z.ZodObject<{
|
|
|
2505
2505
|
scope: z.ZodString;
|
|
2506
2506
|
scopeColumn: z.ZodOptional<z.ZodString>;
|
|
2507
2507
|
}, z.core.$strict>>>;
|
|
2508
|
+
objects: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2509
|
+
kind: z.ZodEnum<{
|
|
2510
|
+
Catalog: "Catalog";
|
|
2511
|
+
Document: "Document";
|
|
2512
|
+
Enumeration: "Enumeration";
|
|
2513
|
+
InformationRegister: "InformationRegister";
|
|
2514
|
+
AccumulationRegister: "AccumulationRegister";
|
|
2515
|
+
Constant: "Constant";
|
|
2516
|
+
CustomTable: "CustomTable";
|
|
2517
|
+
PgEnum: "PgEnum";
|
|
2518
|
+
EventSubscription: "EventSubscription";
|
|
2519
|
+
RightsSet: "RightsSet";
|
|
2520
|
+
Role: "Role";
|
|
2521
|
+
}>;
|
|
2522
|
+
name: z.ZodString;
|
|
2523
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2524
|
+
}, z.core.$strict>>>;
|
|
2508
2525
|
}, z.core.$strict>;
|
|
2509
2526
|
type AddElementInput = z.infer<typeof addElementInput>;
|
|
2510
2527
|
export declare const renameInput: z.ZodObject<{
|
|
@@ -2590,8 +2607,8 @@ export declare const promoteInput: z.ZodObject<{
|
|
|
2590
2607
|
to: z.ZodLiteral<"attribute">;
|
|
2591
2608
|
collection: z.ZodDefault<z.ZodEnum<{
|
|
2592
2609
|
attributes: "attributes";
|
|
2593
|
-
dimensions: "dimensions";
|
|
2594
2610
|
resources: "resources";
|
|
2611
|
+
dimensions: "dimensions";
|
|
2595
2612
|
}>>;
|
|
2596
2613
|
element: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2597
2614
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -2610,8 +2627,8 @@ export declare const promoteInput: z.ZodObject<{
|
|
|
2610
2627
|
to: z.ZodLiteral<"attribute">;
|
|
2611
2628
|
collection: z.ZodDefault<z.ZodEnum<{
|
|
2612
2629
|
attributes: "attributes";
|
|
2613
|
-
dimensions: "dimensions";
|
|
2614
2630
|
resources: "resources";
|
|
2631
|
+
dimensions: "dimensions";
|
|
2615
2632
|
}>>;
|
|
2616
2633
|
element: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2617
2634
|
}, z.core.$strict>, z.ZodObject<{
|
package/dist/compiler/index.js
CHANGED
|
@@ -2889,8 +2889,24 @@ const MESSAGES = {
|
|
|
2889
2889
|
en: (p) => `Open self sign-up lets anyone from the Internet become a signed-in user: objects open to every signed-in user (${p.objects || "none"}) and the grants of everyUser roles (${p.roles || "none"}) are exposed to them`,
|
|
2890
2890
|
uk: (p) => `Відкрита самореєстрація дає змогу будь-кому з Інтернету стати дійсним користувачем: йому відкрито об'єкти для кожного користувача (${p.objects || "немає"}) і гранти ролей everyUser (${p.roles || "немає"})`,
|
|
2891
2891
|
hint: {
|
|
2892
|
-
en: "Check that these objects and grants are meant for anyone, or set selfSignUp to false.",
|
|
2893
|
-
uk: "Переконайтеся, що ці об'єкти й гранти призначено для будь-кого, або вимкніть selfSignUp."
|
|
2892
|
+
en: "Check that these objects and grants are meant for anyone and list them in selfSignUpAccepted, or set selfSignUp to false.",
|
|
2893
|
+
uk: "Переконайтеся, що ці об'єкти й гранти призначено для будь-кого, і перелічіть їх у selfSignUpAccepted, або вимкніть selfSignUp."
|
|
2894
|
+
}
|
|
2895
|
+
},
|
|
2896
|
+
"project.self-sign-up-role": {
|
|
2897
|
+
en: (p) => `selfSignUpAccepted names ${p.kind} "${p.name}" as the role of a grant, but only a role of the everyUser level gives grants to anyone`,
|
|
2898
|
+
uk: (p) => `selfSignUpAccepted називає ${p.kind} "${p.name}" роллю гранту, але гранти будь-кому дає лише роль рівня everyUser`,
|
|
2899
|
+
hint: {
|
|
2900
|
+
en: "Name a Role with assignedOn everyUser, or remove the entry.",
|
|
2901
|
+
uk: "Назвіть Role з assignedOn everyUser або приберіть запис."
|
|
2902
|
+
}
|
|
2903
|
+
},
|
|
2904
|
+
"project.self-sign-up-stale": {
|
|
2905
|
+
en: (p) => `selfSignUpAccepted accepts ${p.entry}, but nothing open to every signed-in user matches it: the entry would silently accept such openness when it appears`,
|
|
2906
|
+
uk: (p) => `selfSignUpAccepted приймає ${p.entry}, але нічого відкритого кожному користувачу йому не відповідає: запис мовчки прийняв би таку відкритість, коли вона з'явиться`,
|
|
2907
|
+
hint: {
|
|
2908
|
+
en: "Remove the entry (or the actions it no longer matches); accept the openness again when it returns.",
|
|
2909
|
+
uk: "Приберіть запис (чи дії, яким уже нічого не відповідає); прийміть відкритість знову, коли вона повернеться."
|
|
2894
2910
|
}
|
|
2895
2911
|
},
|
|
2896
2912
|
"rights.ownership-target": {
|
|
@@ -3282,11 +3298,11 @@ const MESSAGES = {
|
|
|
3282
3298
|
}
|
|
3283
3299
|
},
|
|
3284
3300
|
"operation.input-invalid": {
|
|
3285
|
-
en: (p) => p.scopes !== void 0 ? `The scopes input ${p.scopes === "target" ? "is allowed only with the scopeKinds collection of Project" : p.scopes === "table-unknown" ? `names ${p.table}, which is not a CustomTable of the project` : `names ${p.table}, which already declares its scope: changing a scope is another operation`} (at ${p.at}); nothing was changed` : p.at === void 0 ? "The operation needs metadata that compiles without errors; nothing was changed" : `The operation input must not carry "id" (at ${p.at}): ids are assigned by the operation; nothing was changed`,
|
|
3286
|
-
uk: (p) => p.scopes !== void 0 ? `Вхід scopes ${p.scopes === "target" ? "дозволено лише з колекцією scopeKinds проєкту" : p.scopes === "table-unknown" ? `називає ${p.table}, якої немає серед CustomTable проєкту` : `називає ${p.table}, що вже оголошує скоуп: зміна скоупу — інша операція`} (у ${p.at}); нічого не змінено` : p.at === void 0 ? "Операція потребує метаданих, що компілюються без помилок; нічого не змінено" : `Вхід операції не повинен містити "id" (у ${p.at}): id призначає операція; нічого не змінено`,
|
|
3301
|
+
en: (p) => p.objects !== void 0 ? `The objects input is allowed only with the scopeKinds collection of Project (at ${p.at}); nothing was changed` : p.scopes !== void 0 ? `The scopes input ${p.scopes === "target" ? "is allowed only with the scopeKinds collection of Project" : p.scopes === "table-unknown" ? `names ${p.table}, which is not a CustomTable of the project` : `names ${p.table}, which already declares its scope: changing a scope is another operation`} (at ${p.at}); nothing was changed` : p.at === void 0 ? "The operation needs metadata that compiles without errors; nothing was changed" : `The operation input must not carry "id" (at ${p.at}): ids are assigned by the operation; nothing was changed`,
|
|
3302
|
+
uk: (p) => p.objects !== void 0 ? `Вхід objects дозволено лише з колекцією scopeKinds проєкту (у ${p.at}); нічого не змінено` : p.scopes !== void 0 ? `Вхід scopes ${p.scopes === "target" ? "дозволено лише з колекцією scopeKinds проєкту" : p.scopes === "table-unknown" ? `називає ${p.table}, якої немає серед CustomTable проєкту` : `називає ${p.table}, що вже оголошує скоуп: зміна скоупу — інша операція`} (у ${p.at}); нічого не змінено` : p.at === void 0 ? "Операція потребує метаданих, що компілюються без помилок; нічого не змінено" : `Вхід операції не повинен містити "id" (у ${p.at}): id призначає операція; нічого не змінено`,
|
|
3287
3303
|
hint: {
|
|
3288
|
-
en: (p) => p.scopes !== void 0 ? "Use scopes only when adding a scope kind to Project, and name only CustomTables that have no scope yet." : p.at === void 0 ? "Fix the errors reported with this diagnostic (simetra fix handles missing ids and physical names), then repeat the operation." : "Remove the id from the input; a new element gets a fresh id that is never reused.",
|
|
3289
|
-
uk: (p) => p.scopes !== void 0 ? "Використовуйте scopes лише при додаванні виду скоупу в проєкт і називайте лише CustomTable без скоупу." : p.at === void 0 ? "Виправте помилки, наведені поряд із цією діагностикою (відсутні id і фізичні імена лагодить simetra fix), і повторіть операцію." : "Приберіть id із входу; новий елемент отримує свіжий id, який ніколи не перевикористовується."
|
|
3304
|
+
en: (p) => p.objects !== void 0 ? "Use objects only when adding a scope kind to Project; create other objects with create." : p.scopes !== void 0 ? "Use scopes only when adding a scope kind to Project, and name only CustomTables that have no scope yet." : p.at === void 0 ? "Fix the errors reported with this diagnostic (simetra fix handles missing ids and physical names), then repeat the operation." : "Remove the id from the input; a new element gets a fresh id that is never reused.",
|
|
3305
|
+
uk: (p) => p.objects !== void 0 ? "Використовуйте objects лише при додаванні виду скоупу в проєкт; інші об'єкти створюйте через create." : p.scopes !== void 0 ? "Використовуйте scopes лише при додаванні виду скоупу в проєкт і називайте лише CustomTable без скоупу." : p.at === void 0 ? "Виправте помилки, наведені поряд із цією діагностикою (відсутні id і фізичні імена лагодить simetra fix), і повторіть операцію." : "Приберіть id із входу; новий елемент отримує свіжий id, який ніколи не перевикористовується."
|
|
3290
3306
|
}
|
|
3291
3307
|
},
|
|
3292
3308
|
"operation.target-not-found": {
|
|
@@ -4489,6 +4505,14 @@ const MESSAGES = {
|
|
|
4489
4505
|
uk: "Саме підключення вдалося; збій стався під час роботи з базою. Текст помилки драйвера приховано, бо він може нести облікові дані; знайдіть SQLSTATE або повторіть після виправлення бази."
|
|
4490
4506
|
}
|
|
4491
4507
|
},
|
|
4508
|
+
"data.scope-unspecified": {
|
|
4509
|
+
en: (p) => `The create of ${p.object} names no ${p.attribute}, and the user is a member of ${p.scopes} scopes of kind "${p.scopeKind}": the scope of the new row is not specified. Nothing was written.`,
|
|
4510
|
+
uk: (p) => `Створення ${p.object} не називає ${p.attribute}, а користувач — учасник ${p.scopes} скоупів виду "${p.scopeKind}": скоуп нового рядка не вказано. Нічого не записано.`,
|
|
4511
|
+
hint: {
|
|
4512
|
+
en: (p) => `Pass values.${p.attribute} with the scope of the new row; it is taken by itself only when the user is a member of exactly one scope of the kind.`,
|
|
4513
|
+
uk: (p) => `Передайте values.${p.attribute} зі скоупом нового рядка; сам він береться лише тоді, коли користувач — учасник рівно одного скоупу виду.`
|
|
4514
|
+
}
|
|
4515
|
+
},
|
|
4492
4516
|
"roles.create-role-denied": {
|
|
4493
4517
|
en: (p) => `The connecting role cannot create the platform role ${p.role} on the ${p.server} server: it has neither CREATEROLE nor SUPERUSER`,
|
|
4494
4518
|
uk: (p) => `Роль підключення не може створити платформну роль ${p.role} на сервері ${p.server === "shadow" ? "тіні" : "цілі"}: у неї немає ні CREATEROLE, ні SUPERUSER`,
|
|
@@ -5056,6 +5080,8 @@ const COMPILER_RULES = [
|
|
|
5056
5080
|
"rights.adopted-source-writes",
|
|
5057
5081
|
"rights.scope-kind-unread",
|
|
5058
5082
|
"project.self-sign-up",
|
|
5083
|
+
"project.self-sign-up-role",
|
|
5084
|
+
"project.self-sign-up-stale",
|
|
5059
5085
|
"rights.snapshot-source-unknown",
|
|
5060
5086
|
"rights.snapshot-exempt-writer",
|
|
5061
5087
|
"rights.signal-source-unknown",
|
|
@@ -5257,6 +5283,7 @@ const COMPILER_RULES = [
|
|
|
5257
5283
|
"plan.rights-full-access-lost",
|
|
5258
5284
|
"plan.rights-orphans",
|
|
5259
5285
|
"database.failed",
|
|
5286
|
+
"data.scope-unspecified",
|
|
5260
5287
|
"roles.create-role-denied",
|
|
5261
5288
|
"roles.admin-option-missing",
|
|
5262
5289
|
"roles.membership-grant-denied",
|
|
@@ -5347,6 +5374,7 @@ const WARNING_RULES = /* @__PURE__ */ new Set([
|
|
|
5347
5374
|
"rights.adopted-source-writes",
|
|
5348
5375
|
"rights.scope-kind-unread",
|
|
5349
5376
|
"project.self-sign-up",
|
|
5377
|
+
"project.self-sign-up-stale",
|
|
5350
5378
|
"rights.root-creator-no-admin",
|
|
5351
5379
|
"rights.root-creator-unreachable",
|
|
5352
5380
|
"sql.debt-session-write",
|
|
@@ -6967,7 +6995,6 @@ function derivedSearchColumn(object, style, name) {
|
|
|
6967
6995
|
};
|
|
6968
6996
|
}
|
|
6969
6997
|
}
|
|
6970
|
-
// src/compiler/stages/identity.ts
|
|
6971
6998
|
/**
|
|
6972
6999
|
* Ролі, де рядок файлу — логічне ім'я колонки прийнятої таблиці чи цілі її FK.
|
|
6973
7000
|
* Одна множина для знімка (ім'я → id елемента) і для стадії 3 (id → фізичне
|
|
@@ -7200,6 +7227,73 @@ function checkIdentity(objects, brokenNames, project, functionsFiles) {
|
|
|
7200
7227
|
role: "storage.scopeKind"
|
|
7201
7228
|
});
|
|
7202
7229
|
});
|
|
7230
|
+
const accepted = project?.selfSignUpAccepted;
|
|
7231
|
+
const acceptedTo = (pointer, to) => {
|
|
7232
|
+
references.push({
|
|
7233
|
+
from: {
|
|
7234
|
+
file: PROJECT_FILE,
|
|
7235
|
+
pointer,
|
|
7236
|
+
objectId: ""
|
|
7237
|
+
},
|
|
7238
|
+
to,
|
|
7239
|
+
role: "selfSignUp.accepted"
|
|
7240
|
+
});
|
|
7241
|
+
};
|
|
7242
|
+
const resolveAccepted = (pointer, ref) => {
|
|
7243
|
+
const key = objectKey(ref.kind, ref.name);
|
|
7244
|
+
const target = objectsByName.get(key);
|
|
7245
|
+
if (target === void 0) {
|
|
7246
|
+
if (!brokenNames.has(key)) diagnostics.push(diagnostic("reference.unresolved", PROJECT_FILE, pointer, {
|
|
7247
|
+
kind: ref.kind,
|
|
7248
|
+
name: ref.name
|
|
7249
|
+
}));
|
|
7250
|
+
return;
|
|
7251
|
+
}
|
|
7252
|
+
if (target.id !== void 0) acceptedTo(pointer, {
|
|
7253
|
+
kind: target.kind,
|
|
7254
|
+
id: target.id
|
|
7255
|
+
});
|
|
7256
|
+
return target;
|
|
7257
|
+
};
|
|
7258
|
+
accepted?.objects.forEach((entry, index) => {
|
|
7259
|
+
resolveAccepted(`/selfSignUpAccepted/objects/${index}/object`, entry.object);
|
|
7260
|
+
});
|
|
7261
|
+
accepted?.grants.forEach((grant, index) => {
|
|
7262
|
+
const at = `/selfSignUpAccepted/grants/${index}`;
|
|
7263
|
+
const role = resolveAccepted(`${at}/role`, grant.role);
|
|
7264
|
+
if (role !== void 0 && (role.kind !== "Role" || role.data.assignedOn !== "everyUser")) diagnostics.push(diagnostic("project.self-sign-up-role", PROJECT_FILE, `${at}/role`, {
|
|
7265
|
+
kind: role.kind,
|
|
7266
|
+
name: role.name
|
|
7267
|
+
}));
|
|
7268
|
+
const object = resolveAccepted(`${at}/object`, grant.object);
|
|
7269
|
+
if (object !== void 0) {
|
|
7270
|
+
const standard = KIND_REGISTRY[object.kind].actions(object.data);
|
|
7271
|
+
const custom = customActionsOf(object);
|
|
7272
|
+
grant.actions.forEach((name, i) => {
|
|
7273
|
+
if (standard.some((a) => a.name === name)) return;
|
|
7274
|
+
const id = custom.find((a) => a.name === name)?.id;
|
|
7275
|
+
if (id !== void 0) {
|
|
7276
|
+
acceptedTo(`${at}/actions/${i}`, {
|
|
7277
|
+
kind: "Element",
|
|
7278
|
+
id
|
|
7279
|
+
});
|
|
7280
|
+
return;
|
|
7281
|
+
}
|
|
7282
|
+
diagnostics.push(diagnostic("rights.action-unknown", PROJECT_FILE, `${at}/actions/${i}`, {
|
|
7283
|
+
action: name,
|
|
7284
|
+
object: object.name
|
|
7285
|
+
}));
|
|
7286
|
+
});
|
|
7287
|
+
}
|
|
7288
|
+
if (typeof grant.extent === "object") {
|
|
7289
|
+
const id = projectElements.get("accessDimensions")?.get(grant.extent.dimension)?.id;
|
|
7290
|
+
if (id !== void 0) acceptedTo(`${at}/extent/dimension`, {
|
|
7291
|
+
kind: "Element",
|
|
7292
|
+
id
|
|
7293
|
+
});
|
|
7294
|
+
else diagnostics.push(diagnostic("rights.dimension-unknown", PROJECT_FILE, `${at}/extent/dimension`, { dimension: grant.extent.dimension }));
|
|
7295
|
+
}
|
|
7296
|
+
});
|
|
7203
7297
|
dimensions.forEach((dimension, index) => {
|
|
7204
7298
|
resolveDimension(dimension, `/accessDimensions/${index}`, resolveObjectRef, style, references);
|
|
7205
7299
|
});
|
|
@@ -8175,7 +8269,8 @@ function canonicalSnapshot(model) {
|
|
|
8175
8269
|
"storageBuckets",
|
|
8176
8270
|
"accessDimensions",
|
|
8177
8271
|
"membershipSources",
|
|
8178
|
-
"assignmentSources"
|
|
8272
|
+
"assignmentSources",
|
|
8273
|
+
"selfSignUpAccepted"
|
|
8179
8274
|
]);
|
|
8180
8275
|
return {
|
|
8181
8276
|
project: Object.fromEntries(Object.entries(model.project).filter(([key]) => !unresolved.has(key))),
|
|
@@ -22292,7 +22387,7 @@ function systemOf(object) {
|
|
|
22292
22387
|
return KIND_REGISTRY[object.kind].rightsSystem?.(object.data);
|
|
22293
22388
|
}
|
|
22294
22389
|
/** Рівень системного довідника — його власний скоуп (спека прав §4.6). */
|
|
22295
|
-
function catalogLevel(object, references) {
|
|
22390
|
+
function catalogLevel$1(object, references) {
|
|
22296
22391
|
const scopeKindId = scopeKindOf(object, references);
|
|
22297
22392
|
return scopeKindId === void 0 ? GLOBAL : {
|
|
22298
22393
|
level: "scope",
|
|
@@ -22373,7 +22468,7 @@ function checkSystemCatalogs(ctx) {
|
|
|
22373
22468
|
const first = /* @__PURE__ */ new Map();
|
|
22374
22469
|
for (const object of catalogs) {
|
|
22375
22470
|
const system = must$9(systemOf(object));
|
|
22376
|
-
const level = catalogLevel(object, ctx.references);
|
|
22471
|
+
const level = catalogLevel$1(object, ctx.references);
|
|
22377
22472
|
const key = `${system}\u0000${storageKey(level)}`;
|
|
22378
22473
|
const firstObject = first.get(key);
|
|
22379
22474
|
if (firstObject === void 0) first.set(key, object);
|
|
@@ -22426,7 +22521,7 @@ function checkSystemCatalogs(ctx) {
|
|
|
22426
22521
|
}
|
|
22427
22522
|
}
|
|
22428
22523
|
for (const object of catalogs) {
|
|
22429
|
-
const level = catalogLevel(object, ctx.references);
|
|
22524
|
+
const level = catalogLevel$1(object, ctx.references);
|
|
22430
22525
|
const source = sourced.get(storageKey(level));
|
|
22431
22526
|
if (source === void 0 || uncovered.has(storageKey(level))) continue;
|
|
22432
22527
|
diagnostics.push(diagnostic("rights.system-catalog-parallel", object.file, "/role", {
|
|
@@ -22460,7 +22555,7 @@ function rightsCatalogContracts(objects, references, physical) {
|
|
|
22460
22555
|
for (const object of objects) {
|
|
22461
22556
|
const system = systemOf(object);
|
|
22462
22557
|
if (system === void 0) continue;
|
|
22463
|
-
const level = catalogLevel(object, references);
|
|
22558
|
+
const level = catalogLevel$1(object, references);
|
|
22464
22559
|
const key = storageKey(level);
|
|
22465
22560
|
byLevel.set(key, {
|
|
22466
22561
|
level,
|
|
@@ -33485,6 +33580,50 @@ function triggeredRelationTable(relation, physical, objects) {
|
|
|
33485
33580
|
return table;
|
|
33486
33581
|
}
|
|
33487
33582
|
// src/compiler/runtime-catalog.ts
|
|
33583
|
+
/** Рівень ролі контракту як його бачить каталог (спека «Споживач поза монорепо» §5.4). */
|
|
33584
|
+
function catalogLevel(level) {
|
|
33585
|
+
switch (level.level) {
|
|
33586
|
+
case "global":
|
|
33587
|
+
case "everyUser": return level.level;
|
|
33588
|
+
case "scope": return { scopeKind: level.scopeKindId };
|
|
33589
|
+
case "container": return { container: level.containerId };
|
|
33590
|
+
}
|
|
33591
|
+
}
|
|
33592
|
+
/**
|
|
33593
|
+
* Розділи `roles` і `rightsSets` спільної частини каталогу: назви архетипів
|
|
33594
|
+
* для екрана призначення. Порядок — за `order`, далі за `name`; у проєкті без
|
|
33595
|
+
* ролей чи наборів поля немає. `title` береться з метаданих, а не з
|
|
33596
|
+
* контракту: контракт у знімок не змінюється.
|
|
33597
|
+
*/
|
|
33598
|
+
function rightsDeclarationsOf(model) {
|
|
33599
|
+
const titleOf = (kind) => new Map(model.objects.filter((o) => o.kind === kind).map((o) => [o.id, o.data.title]));
|
|
33600
|
+
const roleTitles = titleOf("Role");
|
|
33601
|
+
const roles = model.contracts.roles.map((r) => {
|
|
33602
|
+
const title = roleTitles.get(r.roleId);
|
|
33603
|
+
return {
|
|
33604
|
+
id: r.roleId,
|
|
33605
|
+
name: r.name,
|
|
33606
|
+
...title === void 0 ? {} : { title },
|
|
33607
|
+
level: catalogLevel(r.assignedOn),
|
|
33608
|
+
...r.order === void 0 ? {} : { order: r.order },
|
|
33609
|
+
assignable: r.assignable,
|
|
33610
|
+
fullAccess: r.fullAccess
|
|
33611
|
+
};
|
|
33612
|
+
}).sort((a, b) => (a.order ?? Number.MAX_SAFE_INTEGER) - (b.order ?? Number.MAX_SAFE_INTEGER) || compareStrings(a.name, b.name));
|
|
33613
|
+
const setTitles = titleOf("RightsSet");
|
|
33614
|
+
const rightsSets = model.objects.filter((o) => o.kind === "RightsSet").map((o) => {
|
|
33615
|
+
const title = setTitles.get(o.id);
|
|
33616
|
+
return {
|
|
33617
|
+
id: o.id,
|
|
33618
|
+
name: o.name,
|
|
33619
|
+
...title === void 0 ? {} : { title }
|
|
33620
|
+
};
|
|
33621
|
+
}).sort((a, b) => compareStrings(a.name, b.name));
|
|
33622
|
+
return {
|
|
33623
|
+
...roles.length === 0 ? {} : { roles },
|
|
33624
|
+
...rightsSets.length === 0 ? {} : { rightsSets }
|
|
33625
|
+
};
|
|
33626
|
+
}
|
|
33488
33627
|
/**
|
|
33489
33628
|
* Каталог рантайму (спека П4 §6.3) — проєкція скомпільованої моделі: лише
|
|
33490
33629
|
* довідники з контрактом ядра команд (`CompiledModel.catalogCommands`), у
|
|
@@ -33530,6 +33669,7 @@ function buildRuntimeCatalog(model) {
|
|
|
33530
33669
|
...adoptedFactsOf(model)
|
|
33531
33670
|
} : {},
|
|
33532
33671
|
...model.project.selfSignUp ? { selfSignUp: true } : {},
|
|
33672
|
+
...rightsDeclarationsOf(model),
|
|
33533
33673
|
objects: model.objects.flatMap((object) => {
|
|
33534
33674
|
const contract = contracts.get(object.id);
|
|
33535
33675
|
if (contract === void 0) return [];
|
|
@@ -38433,21 +38573,84 @@ function scopeKindUnreadWarnings(contracts, project) {
|
|
|
38433
38573
|
* Роль `publicRead` читається зі скомпільованого контракту доступу, а не з
|
|
38434
38574
|
* рядкової форми метаданих: `anon` теж відкриває `user`, але його бачить і
|
|
38435
38575
|
* гість, тож самореєстрація до нього нічого не додає.
|
|
38576
|
+
*
|
|
38577
|
+
* Прийняте в `selfSignUpAccepted` (спека публічної частини §5.5) попередження не називає; без
|
|
38578
|
+
* поля воно звучить завжди, з полем — лише коли відкрито щось неприйняте, і
|
|
38579
|
+
* називає тільки його. Ціль прийняття — id з індексу посилань: `rename`
|
|
38580
|
+
* переписує запис, а `delete` прийнятої цілі блокується. Відома межа —
|
|
38581
|
+
* об'єкт-однойменник, створений після ручного видалення теки (повз
|
|
38582
|
+
* `delete`): він резолвиться з того самого запису (спека публічної частини
|
|
38583
|
+
* §5.5). Об'єкт приймається з формою відкритості, грант — з обсягом.
|
|
38584
|
+
*
|
|
38585
|
+
* Запис прийняття, що не покриває жодної наявної відкритості (знятий грант,
|
|
38586
|
+
* об'єкт без `publicRead`), — попередження `project.self-sign-up-stale`:
|
|
38587
|
+
* інакше він мовчки прийняв би майбутню відкритість, якої автор не бачив.
|
|
38588
|
+
* Його звітує й проєкт без `selfSignUp`: прийняття переживає вимкнення.
|
|
38436
38589
|
*/
|
|
38437
|
-
function selfSignUpWarnings(contracts, objects, project) {
|
|
38438
|
-
if (project.selfSignUp !== true) return [];
|
|
38590
|
+
function selfSignUpWarnings(contracts, objects, project, references) {
|
|
38439
38591
|
const names = new Map(objects.map(({ id, name }) => [id, name]));
|
|
38440
38592
|
const nameOf = (objectId) => names.get(objectId) ?? objectId;
|
|
38441
|
-
const
|
|
38593
|
+
const actionNames = new Map(objects.flatMap((o) => customActionsOf(o).map((a) => [a.id, a.name])));
|
|
38594
|
+
const actionOf = (action) => actionNames.get(action) ?? action;
|
|
38595
|
+
const dimensionNames = new Map((project.accessDimensions ?? []).map((d) => [d.id, d.name]));
|
|
38596
|
+
const extentOf = (extent) => typeof extent === "string" ? extent : dimensionNames.get(extent.dimensionId) ?? extent.dimensionId;
|
|
38597
|
+
const accepted = project.selfSignUpAccepted;
|
|
38598
|
+
const target = new Map(references.filter((r) => r.role === "selfSignUp.accepted").map((r) => [r.from.pointer, r.to.id]));
|
|
38599
|
+
const acceptedObjects = new Set((accepted?.objects ?? []).map((entry, i) => `${target.get(`/selfSignUpAccepted/objects/${i}/object`) ?? ""}\0${entry.published === true ? "published" : "all"}`));
|
|
38600
|
+
const objectAccepted = (objectId, published) => acceptedObjects.has(`${objectId}\0all`) || published && acceptedObjects.has(`${objectId}\0published`);
|
|
38601
|
+
const grantKey = (roleId, objectId, action, extent) => JSON.stringify([
|
|
38602
|
+
roleId,
|
|
38603
|
+
objectId,
|
|
38604
|
+
action,
|
|
38605
|
+
typeof extent === "string" ? extent : extent.dimensionId
|
|
38606
|
+
]);
|
|
38607
|
+
const acceptedGrants = new Set((accepted?.grants ?? []).flatMap((grant, i) => {
|
|
38608
|
+
const at = `/selfSignUpAccepted/grants/${i}`;
|
|
38609
|
+
const extent = typeof grant.extent === "string" ? grant.extent : { dimensionId: target.get(`${at}/extent/dimension`) ?? "" };
|
|
38610
|
+
return grant.actions.map((action, j) => grantKey(target.get(`${at}/role`) ?? "", target.get(`${at}/object`) ?? "", target.get(`${at}/actions/${j}`) ?? action, extent));
|
|
38611
|
+
}));
|
|
38612
|
+
const open = contracts.access.filter((a) => publicReadRoleOf(a.publicRead) === "authenticated");
|
|
38442
38613
|
const projection = expandedProjection(contracts);
|
|
38443
|
-
const
|
|
38444
|
-
|
|
38445
|
-
|
|
38446
|
-
|
|
38614
|
+
const everyUser = contracts.roles.filter((role) => role.assignedOn.level === "everyUser");
|
|
38615
|
+
const exposedGrants = new Set(projection.filter((row) => everyUser.some((role) => role.roleId === row.roleId)).map((row) => grantKey(row.roleId, row.objectId, row.action, row.extent)));
|
|
38616
|
+
const stale = staleEntries();
|
|
38617
|
+
if (project.selfSignUp !== true) return stale;
|
|
38618
|
+
const exposed = [...new Set(open.filter((a) => !objectAccepted(a.objectId, a.published !== void 0)).map((a) => `${nameOf(a.objectId)}${a.published === void 0 ? "" : " (published)"}`))].sort(compareStrings);
|
|
38619
|
+
const roles = everyUser.map((role) => ({
|
|
38620
|
+
role,
|
|
38621
|
+
grants: projection.filter((row) => row.roleId === role.roleId).filter((row) => !acceptedGrants.has(grantKey(role.roleId, row.objectId, row.action, row.extent))).map((row) => `${nameOf(row.objectId)}.${actionOf(row.action)} (${extentOf(row.extent)})`).sort(compareStrings)
|
|
38622
|
+
})).filter(({ grants }) => accepted === void 0 || grants.length > 0).map(({ role, grants }) => `${role.name}: ${grants.join(", ")}`).sort(compareStrings);
|
|
38623
|
+
if (accepted !== void 0 && exposed.length === 0 && roles.length === 0) return stale;
|
|
38447
38624
|
return [diagnostic("project.self-sign-up", PROJECT_FILE, "/selfSignUp", {
|
|
38448
38625
|
objects: exposed.join(", "),
|
|
38449
38626
|
roles: roles.join("; ")
|
|
38450
|
-
})];
|
|
38627
|
+
}), ...stale];
|
|
38628
|
+
/**
|
|
38629
|
+
* Записи без жодної відкритості, яку вони покривають. Непрорезолвлений
|
|
38630
|
+
* запис уже має помилку стадії 2, тож тут мовчить.
|
|
38631
|
+
*/
|
|
38632
|
+
function staleEntries() {
|
|
38633
|
+
const found = [];
|
|
38634
|
+
accepted?.objects.forEach((entry, i) => {
|
|
38635
|
+
const objectId = target.get(`/selfSignUpAccepted/objects/${i}/object`);
|
|
38636
|
+
if (objectId === void 0) return;
|
|
38637
|
+
const forms = open.filter((a) => a.objectId === objectId);
|
|
38638
|
+
if (entry.published === true ? forms.some((a) => a.published !== void 0) : forms.length > 0) return;
|
|
38639
|
+
found.push(diagnostic("project.self-sign-up-stale", PROJECT_FILE, `/selfSignUpAccepted/objects/${i}`, { entry: `${entry.object.name}${entry.published === true ? " (published)" : ""}` }));
|
|
38640
|
+
});
|
|
38641
|
+
accepted?.grants.forEach((grant, i) => {
|
|
38642
|
+
const at = `/selfSignUpAccepted/grants/${i}`;
|
|
38643
|
+
const roleId = target.get(`${at}/role`);
|
|
38644
|
+
const objectId = target.get(`${at}/object`);
|
|
38645
|
+
if (roleId === void 0 || objectId === void 0) return;
|
|
38646
|
+
if (typeof grant.extent === "object" && !target.has(`${at}/extent/dimension`)) return;
|
|
38647
|
+
const extent = typeof grant.extent === "string" ? grant.extent : { dimensionId: target.get(`${at}/extent/dimension`) };
|
|
38648
|
+
const unused = grant.actions.filter((action, j) => !exposedGrants.has(grantKey(roleId, objectId, target.get(`${at}/actions/${j}`) ?? action, extent)));
|
|
38649
|
+
if (unused.length === 0) return;
|
|
38650
|
+
found.push(diagnostic("project.self-sign-up-stale", PROJECT_FILE, at, { entry: `${grant.role.name}: ${unused.map((a) => `${grant.object.name}.${a}`).join(", ")} (${typeof grant.extent === "string" ? grant.extent : grant.extent.dimension})` }));
|
|
38651
|
+
});
|
|
38652
|
+
return found;
|
|
38653
|
+
}
|
|
38451
38654
|
}
|
|
38452
38655
|
// src/compiler/author-units.ts
|
|
38453
38656
|
/** Одна функція авторства на проєкт: тіло не залежить від таблиці. */
|
|
@@ -41466,7 +41669,7 @@ async function runStages(stage1, options = {}) {
|
|
|
41466
41669
|
rights,
|
|
41467
41670
|
roles,
|
|
41468
41671
|
rightsProjection: projection.rows
|
|
41469
|
-
}, stage1.objects, stage1.project)
|
|
41672
|
+
}, stage1.objects, stage1.project, stage2.references)
|
|
41470
41673
|
]);
|
|
41471
41674
|
return {
|
|
41472
41675
|
ok: !hasErrors(final),
|
|
@@ -42458,6 +42661,8 @@ function buildClientCatalog(runtime) {
|
|
|
42458
42661
|
provider: runtime.provider,
|
|
42459
42662
|
...present("rightsSnapshot", runtime.rightsSnapshot),
|
|
42460
42663
|
...present("adoptedFacts", runtime.adoptedFacts),
|
|
42664
|
+
...present("roles", runtime.roles),
|
|
42665
|
+
...present("rightsSets", runtime.rightsSets),
|
|
42461
42666
|
objects: runtime.objects.map(entryOf)
|
|
42462
42667
|
};
|
|
42463
42668
|
}
|
|
@@ -43585,7 +43790,7 @@ function nodeAt$1(root, pointer) {
|
|
|
43585
43790
|
* контейнера, тож нова колекція схеми стає доступною без змін тут.
|
|
43586
43791
|
*/
|
|
43587
43792
|
async function addElement(files, input, o) {
|
|
43588
|
-
const supplied = refuseSuppliedId(files, input.element, "element");
|
|
43793
|
+
const supplied = refuseSuppliedId(files, input.element, "element") ?? refuseSuppliedId(files, input.objects ?? [], "objects");
|
|
43589
43794
|
if (supplied !== void 0) return supplied;
|
|
43590
43795
|
const clean = await compileInput(files, { repair: true });
|
|
43591
43796
|
if (!clean.ok) return clean.result;
|
|
@@ -43607,6 +43812,26 @@ async function addElement(files, input, o) {
|
|
|
43607
43812
|
if (JSON.parse(files.get(object.file)).scope !== void 0) return scopesRefused("table-scoped", table);
|
|
43608
43813
|
}
|
|
43609
43814
|
}
|
|
43815
|
+
const created = /* @__PURE__ */ new Map();
|
|
43816
|
+
if (input.objects !== void 0) {
|
|
43817
|
+
if (input.target.kind !== "Project" || input.collection !== "scopeKinds") return refused(files, [diagnostic("operation.input-invalid", "", "", {
|
|
43818
|
+
objects: "target",
|
|
43819
|
+
at: "/objects"
|
|
43820
|
+
})]);
|
|
43821
|
+
for (const object of input.objects) {
|
|
43822
|
+
const path = `${KIND_REGISTRY[object.kind].dir}/${object.name}/${object.name}.meta.json`;
|
|
43823
|
+
const existing = clean.model.objects.find((o) => o.kind === object.kind && o.name === object.name);
|
|
43824
|
+
if (existing !== void 0 || files.has(path) || created.has(path)) return refused(files, [diagnostic("operation.object-exists", existing?.file ?? path, "", {
|
|
43825
|
+
kind: object.kind,
|
|
43826
|
+
name: object.name
|
|
43827
|
+
})]);
|
|
43828
|
+
created.set(path, {
|
|
43829
|
+
...object.data,
|
|
43830
|
+
kind: object.kind,
|
|
43831
|
+
name: object.name
|
|
43832
|
+
});
|
|
43833
|
+
}
|
|
43834
|
+
}
|
|
43610
43835
|
const collections = [...namedCollections(container.schema).keys()];
|
|
43611
43836
|
if (!collections.includes(input.collection)) return refused(files, [diagnostic("operation.collection-unknown", container.file, container.pointer, {
|
|
43612
43837
|
collection: input.collection,
|
|
@@ -43630,6 +43855,10 @@ async function addElement(files, input, o) {
|
|
|
43630
43855
|
changed.set(object.file, JSON.stringify(tableRaw));
|
|
43631
43856
|
only.add(object.file);
|
|
43632
43857
|
}
|
|
43858
|
+
for (const [path, raw] of created) {
|
|
43859
|
+
changed.set(path, JSON.stringify(raw));
|
|
43860
|
+
only.add(path);
|
|
43861
|
+
}
|
|
43633
43862
|
const after = await toPlatformFormsAfter(files, changed);
|
|
43634
43863
|
return completeAndCompile(files, after.files, o, only, clean.accepted, after.diagnostics);
|
|
43635
43864
|
}
|
|
@@ -43859,7 +44088,12 @@ const addElementInput = z.strictObject({
|
|
|
43859
44088
|
scopes: z.record(z.string(), z.strictObject({
|
|
43860
44089
|
scope: z.string().min(1),
|
|
43861
44090
|
scopeColumn: elementNameSchema.optional()
|
|
43862
|
-
})).optional().meta({ description: "Only for collection scopeKinds of Project: declares the scope of adopted CustomTables in the same change, keyed by table name, e.g. { Orders: { scope: \"org\", scopeColumn: \"org\" } }; a table that already has a scope is refused." })
|
|
44091
|
+
})).optional().meta({ description: "Only for collection scopeKinds of Project: declares the scope of adopted CustomTables in the same change, keyed by table name, e.g. { Orders: { scope: \"org\", scopeColumn: \"org\" } }; a table that already has a scope is refused." }),
|
|
44092
|
+
objects: z.array(z.strictObject({
|
|
44093
|
+
kind: metadataKindSchema.meta({ description: void 0 }),
|
|
44094
|
+
name: objectNameSchema.meta({ description: void 0 }),
|
|
44095
|
+
data: z.record(z.string(), z.unknown()).optional()
|
|
44096
|
+
})).optional().meta({ description: "Only for collection scopeKinds of Project: new objects created in the same change, as { kind, name, data } of create, e.g. the scope root and the membership catalog with scope set to the new kind." })
|
|
43863
44097
|
});
|
|
43864
44098
|
const renameInput = z.strictObject({
|
|
43865
44099
|
target: elementTarget,
|
package/dist/model/index.d.ts
CHANGED
|
@@ -2751,6 +2751,10 @@ export declare const rightsSetSchema: z.ZodObject<{
|
|
|
2751
2751
|
}, z.core.$strict>]>;
|
|
2752
2752
|
}, z.core.$strict>;
|
|
2753
2753
|
}, z.core.$strict>]>>>;
|
|
2754
|
+
title: z.ZodOptional<z.ZodObject<{
|
|
2755
|
+
uk: z.ZodOptional<z.ZodString>;
|
|
2756
|
+
en: z.ZodOptional<z.ZodString>;
|
|
2757
|
+
}, z.core.$strict>>;
|
|
2754
2758
|
id: z.ZodOptional<z.ZodUUID>;
|
|
2755
2759
|
name: z.ZodString;
|
|
2756
2760
|
$schema: z.ZodOptional<z.ZodString>;
|
|
@@ -2887,6 +2891,10 @@ export declare const roleSchema: z.ZodObject<{
|
|
|
2887
2891
|
}, z.core.$strict>]>>;
|
|
2888
2892
|
}, z.core.$strict>;
|
|
2889
2893
|
}, z.core.$strict>]>>>;
|
|
2894
|
+
title: z.ZodOptional<z.ZodObject<{
|
|
2895
|
+
uk: z.ZodOptional<z.ZodString>;
|
|
2896
|
+
en: z.ZodOptional<z.ZodString>;
|
|
2897
|
+
}, z.core.$strict>>;
|
|
2890
2898
|
id: z.ZodOptional<z.ZodUUID>;
|
|
2891
2899
|
name: z.ZodString;
|
|
2892
2900
|
$schema: z.ZodOptional<z.ZodString>;
|
|
@@ -3608,8 +3616,8 @@ export declare const projectSchema: z.ZodObject<{
|
|
|
3608
3616
|
en: z.ZodOptional<z.ZodString>;
|
|
3609
3617
|
}, z.core.$strict>>;
|
|
3610
3618
|
defaultLocale: z.ZodDefault<z.ZodEnum<{
|
|
3611
|
-
en: "en";
|
|
3612
3619
|
uk: "uk";
|
|
3620
|
+
en: "en";
|
|
3613
3621
|
}>>;
|
|
3614
3622
|
primaryDataLanguage: z.ZodOptional<z.ZodString>;
|
|
3615
3623
|
defaultSchema: z.ZodDefault<z.ZodString>;
|
|
@@ -3627,6 +3635,65 @@ export declare const projectSchema: z.ZodObject<{
|
|
|
3627
3635
|
}, z.core.$strict>>;
|
|
3628
3636
|
timezone: z.ZodDefault<z.ZodString>;
|
|
3629
3637
|
selfSignUp: z.ZodOptional<z.ZodBoolean>;
|
|
3638
|
+
selfSignUpAccepted: z.ZodOptional<z.ZodObject<{
|
|
3639
|
+
objects: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
3640
|
+
object: z.ZodObject<{
|
|
3641
|
+
kind: z.ZodEnum<{
|
|
3642
|
+
Catalog: "Catalog";
|
|
3643
|
+
Document: "Document";
|
|
3644
|
+
Enumeration: "Enumeration";
|
|
3645
|
+
InformationRegister: "InformationRegister";
|
|
3646
|
+
AccumulationRegister: "AccumulationRegister";
|
|
3647
|
+
Constant: "Constant";
|
|
3648
|
+
CustomTable: "CustomTable";
|
|
3649
|
+
PgEnum: "PgEnum";
|
|
3650
|
+
EventSubscription: "EventSubscription";
|
|
3651
|
+
RightsSet: "RightsSet";
|
|
3652
|
+
Role: "Role";
|
|
3653
|
+
}>;
|
|
3654
|
+
name: z.ZodString;
|
|
3655
|
+
}, z.core.$strict>;
|
|
3656
|
+
published: z.ZodOptional<z.ZodLiteral<true>>;
|
|
3657
|
+
}, z.core.$strict>>>;
|
|
3658
|
+
grants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
3659
|
+
role: z.ZodObject<{
|
|
3660
|
+
kind: z.ZodEnum<{
|
|
3661
|
+
Catalog: "Catalog";
|
|
3662
|
+
Document: "Document";
|
|
3663
|
+
Enumeration: "Enumeration";
|
|
3664
|
+
InformationRegister: "InformationRegister";
|
|
3665
|
+
AccumulationRegister: "AccumulationRegister";
|
|
3666
|
+
Constant: "Constant";
|
|
3667
|
+
CustomTable: "CustomTable";
|
|
3668
|
+
PgEnum: "PgEnum";
|
|
3669
|
+
EventSubscription: "EventSubscription";
|
|
3670
|
+
RightsSet: "RightsSet";
|
|
3671
|
+
Role: "Role";
|
|
3672
|
+
}>;
|
|
3673
|
+
name: z.ZodString;
|
|
3674
|
+
}, z.core.$strict>;
|
|
3675
|
+
object: z.ZodObject<{
|
|
3676
|
+
kind: z.ZodEnum<{
|
|
3677
|
+
Catalog: "Catalog";
|
|
3678
|
+
Document: "Document";
|
|
3679
|
+
Enumeration: "Enumeration";
|
|
3680
|
+
InformationRegister: "InformationRegister";
|
|
3681
|
+
AccumulationRegister: "AccumulationRegister";
|
|
3682
|
+
Constant: "Constant";
|
|
3683
|
+
CustomTable: "CustomTable";
|
|
3684
|
+
PgEnum: "PgEnum";
|
|
3685
|
+
EventSubscription: "EventSubscription";
|
|
3686
|
+
RightsSet: "RightsSet";
|
|
3687
|
+
Role: "Role";
|
|
3688
|
+
}>;
|
|
3689
|
+
name: z.ZodString;
|
|
3690
|
+
}, z.core.$strict>;
|
|
3691
|
+
actions: z.ZodArray<z.ZodString>;
|
|
3692
|
+
extent: z.ZodUnion<readonly [z.ZodLiteral<"any">, z.ZodLiteral<"own">, z.ZodObject<{
|
|
3693
|
+
dimension: z.ZodString;
|
|
3694
|
+
}, z.core.$strict>]>;
|
|
3695
|
+
}, z.core.$strict>>>;
|
|
3696
|
+
}, z.core.$strict>>;
|
|
3630
3697
|
scopeKinds: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
3631
3698
|
id: z.ZodOptional<z.ZodUUID>;
|
|
3632
3699
|
name: z.ZodString;
|
|
@@ -6272,6 +6339,41 @@ export declare const catalogAdoptedFactsSchema: z.ZodObject<{
|
|
|
6272
6339
|
membershipKinds: z.ZodArray<z.ZodGUID>;
|
|
6273
6340
|
assignments: z.ZodOptional<z.ZodLiteral<true>>;
|
|
6274
6341
|
}, z.core.$strict>;
|
|
6342
|
+
/**
|
|
6343
|
+
* Рівень ролі в каталозі: `global`, `everyUser`, вид скоупу чи контейнер
|
|
6344
|
+
* (спека «Споживач поза монорепо» §5.4); вид і контейнер — за id.
|
|
6345
|
+
*/
|
|
6346
|
+
export declare const catalogRoleLevelSchema: z.ZodUnion<readonly [z.ZodLiteral<"global">, z.ZodLiteral<"everyUser">, z.ZodObject<{
|
|
6347
|
+
scopeKind: z.ZodString;
|
|
6348
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
6349
|
+
container: z.ZodString;
|
|
6350
|
+
}, z.core.$strict>]>;
|
|
6351
|
+
/** Роль у спільній частині каталогу: клієнт показує `title` чи `name`. */
|
|
6352
|
+
export declare const catalogRoleSchema: z.ZodObject<{
|
|
6353
|
+
id: z.ZodString;
|
|
6354
|
+
name: z.ZodString;
|
|
6355
|
+
title: z.ZodOptional<z.ZodObject<{
|
|
6356
|
+
uk: z.ZodOptional<z.ZodString>;
|
|
6357
|
+
en: z.ZodOptional<z.ZodString>;
|
|
6358
|
+
}, z.core.$strict>>;
|
|
6359
|
+
level: z.ZodUnion<readonly [z.ZodLiteral<"global">, z.ZodLiteral<"everyUser">, z.ZodObject<{
|
|
6360
|
+
scopeKind: z.ZodString;
|
|
6361
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
6362
|
+
container: z.ZodString;
|
|
6363
|
+
}, z.core.$strict>]>;
|
|
6364
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
6365
|
+
assignable: z.ZodBoolean;
|
|
6366
|
+
fullAccess: z.ZodBoolean;
|
|
6367
|
+
}, z.core.$strict>;
|
|
6368
|
+
/** Набір прав у спільній частині каталогу. */
|
|
6369
|
+
export declare const catalogRightsSetSchema: z.ZodObject<{
|
|
6370
|
+
id: z.ZodString;
|
|
6371
|
+
name: z.ZodString;
|
|
6372
|
+
title: z.ZodOptional<z.ZodObject<{
|
|
6373
|
+
uk: z.ZodOptional<z.ZodString>;
|
|
6374
|
+
en: z.ZodOptional<z.ZodString>;
|
|
6375
|
+
}, z.core.$strict>>;
|
|
6376
|
+
}, z.core.$strict>;
|
|
6275
6377
|
/** The runtime catalog: a projection of the compiled model (P4 spec §6.3). */
|
|
6276
6378
|
export declare const runtimeCatalogSchema: z.ZodObject<{
|
|
6277
6379
|
format: z.ZodLiteral<1>;
|
|
@@ -6286,6 +6388,30 @@ export declare const runtimeCatalogSchema: z.ZodObject<{
|
|
|
6286
6388
|
membershipKinds: z.ZodArray<z.ZodGUID>;
|
|
6287
6389
|
assignments: z.ZodOptional<z.ZodLiteral<true>>;
|
|
6288
6390
|
}, z.core.$strict>>;
|
|
6391
|
+
roles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
6392
|
+
id: z.ZodString;
|
|
6393
|
+
name: z.ZodString;
|
|
6394
|
+
title: z.ZodOptional<z.ZodObject<{
|
|
6395
|
+
uk: z.ZodOptional<z.ZodString>;
|
|
6396
|
+
en: z.ZodOptional<z.ZodString>;
|
|
6397
|
+
}, z.core.$strict>>;
|
|
6398
|
+
level: z.ZodUnion<readonly [z.ZodLiteral<"global">, z.ZodLiteral<"everyUser">, z.ZodObject<{
|
|
6399
|
+
scopeKind: z.ZodString;
|
|
6400
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
6401
|
+
container: z.ZodString;
|
|
6402
|
+
}, z.core.$strict>]>;
|
|
6403
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
6404
|
+
assignable: z.ZodBoolean;
|
|
6405
|
+
fullAccess: z.ZodBoolean;
|
|
6406
|
+
}, z.core.$strict>>>;
|
|
6407
|
+
rightsSets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
6408
|
+
id: z.ZodString;
|
|
6409
|
+
name: z.ZodString;
|
|
6410
|
+
title: z.ZodOptional<z.ZodObject<{
|
|
6411
|
+
uk: z.ZodOptional<z.ZodString>;
|
|
6412
|
+
en: z.ZodOptional<z.ZodString>;
|
|
6413
|
+
}, z.core.$strict>>;
|
|
6414
|
+
}, z.core.$strict>>>;
|
|
6289
6415
|
objects: z.ZodArray<z.ZodObject<{
|
|
6290
6416
|
id: z.ZodGUID;
|
|
6291
6417
|
name: z.ZodString;
|
|
@@ -6654,6 +6780,8 @@ export type RuntimeSection = z.infer<typeof runtimeSectionSchema>;
|
|
|
6654
6780
|
export type RuntimeOperationTarget = z.infer<typeof runtimeOperationTargetSchema>;
|
|
6655
6781
|
export type RuntimeRootCreate = z.infer<typeof runtimeRootCreateSchema>;
|
|
6656
6782
|
export type RuntimeObject = z.infer<typeof runtimeObjectSchema>;
|
|
6783
|
+
export type CatalogRole = z.infer<typeof catalogRoleSchema>;
|
|
6784
|
+
export type CatalogRightsSet = z.infer<typeof catalogRightsSetSchema>;
|
|
6657
6785
|
export type RuntimeCatalog = z.infer<typeof runtimeCatalogSchema>;
|
|
6658
6786
|
export type CatalogRightsCarrier = z.infer<typeof catalogRightsCarrierSchema>;
|
|
6659
6787
|
export type CatalogRightsSubject = z.infer<typeof catalogRightsSubjectSchema>;
|
|
@@ -6676,6 +6804,30 @@ export declare const clientCatalogSchema: z.ZodObject<{
|
|
|
6676
6804
|
membershipKinds: z.ZodArray<z.ZodGUID>;
|
|
6677
6805
|
assignments: z.ZodOptional<z.ZodLiteral<true>>;
|
|
6678
6806
|
}, z.core.$strict>>;
|
|
6807
|
+
roles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
6808
|
+
id: z.ZodString;
|
|
6809
|
+
name: z.ZodString;
|
|
6810
|
+
title: z.ZodOptional<z.ZodObject<{
|
|
6811
|
+
uk: z.ZodOptional<z.ZodString>;
|
|
6812
|
+
en: z.ZodOptional<z.ZodString>;
|
|
6813
|
+
}, z.core.$strict>>;
|
|
6814
|
+
level: z.ZodUnion<readonly [z.ZodLiteral<"global">, z.ZodLiteral<"everyUser">, z.ZodObject<{
|
|
6815
|
+
scopeKind: z.ZodString;
|
|
6816
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
6817
|
+
container: z.ZodString;
|
|
6818
|
+
}, z.core.$strict>]>;
|
|
6819
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
6820
|
+
assignable: z.ZodBoolean;
|
|
6821
|
+
fullAccess: z.ZodBoolean;
|
|
6822
|
+
}, z.core.$strict>>>;
|
|
6823
|
+
rightsSets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
6824
|
+
id: z.ZodString;
|
|
6825
|
+
name: z.ZodString;
|
|
6826
|
+
title: z.ZodOptional<z.ZodObject<{
|
|
6827
|
+
uk: z.ZodOptional<z.ZodString>;
|
|
6828
|
+
en: z.ZodOptional<z.ZodString>;
|
|
6829
|
+
}, z.core.$strict>>;
|
|
6830
|
+
}, z.core.$strict>>>;
|
|
6679
6831
|
objects: z.ZodArray<z.ZodObject<{
|
|
6680
6832
|
id: z.ZodGUID;
|
|
6681
6833
|
name: z.ZodString;
|
|
@@ -8782,6 +8934,8 @@ type ReferenceRole = "attribute.ref" | "attribute.allowedType" |
|
|
|
8782
8934
|
"search.field" | "posting.movementsBlock" | "customTable.foreignKey" | "customTable.foreignKeyTarget" | "customTable.column" | "customTable.pgEnum" | "customTable.scopeColumn" | "object.scope" | "scopeKind.root" |
|
|
8783
8935
|
/** Вид скоупу в `project.storageBuckets[].scopeKind`. */
|
|
8784
8936
|
"storage.scopeKind" |
|
|
8937
|
+
/** Об'єкт чи роль у `project.selfSignUpAccepted` (прийняття самореєстрації). */
|
|
8938
|
+
"selfSignUp.accepted" |
|
|
8785
8939
|
/** Об'єкт-джерело підписки на подію. */
|
|
8786
8940
|
"eventSubscription.source" |
|
|
8787
8941
|
/** Реквізит джерела в `whenChanged` підписки. */
|
package/dist/model/index.js
CHANGED
|
@@ -1297,14 +1297,14 @@ const roleAssignedOnSchema = z.union([assignedOnSchema, z.literal("everyUser").m
|
|
|
1297
1297
|
/**
|
|
1298
1298
|
* Шапка декларацій прав: без PG-схеми, скоупу й фізичного імені — у базі
|
|
1299
1299
|
* набір і роль живуть лише в згенерованій проєкції, а в даних їх називає
|
|
1300
|
-
* UUID. `title
|
|
1301
|
-
*
|
|
1300
|
+
* UUID. `title` — необов'язкова назва для екрана призначення (без
|
|
1301
|
+
* значення за замовчуванням: хеш проєкту без неї не змінюється);
|
|
1302
|
+
* `description` відкладено (спека «Споживач поза монорепо» §5.4).
|
|
1302
1303
|
*/
|
|
1303
1304
|
const rightsDeclarationHeader = z.object(objectHeaderShape).omit({
|
|
1304
1305
|
schema: true,
|
|
1305
1306
|
scope: true,
|
|
1306
1307
|
physicalName: true,
|
|
1307
|
-
title: true,
|
|
1308
1308
|
description: true
|
|
1309
1309
|
}).shape;
|
|
1310
1310
|
const includeSchema$1 = z.array(metadataRefSchema).default([]).meta({ description: "Rights sets whose grants this declaration includes." });
|
|
@@ -2833,6 +2833,18 @@ const projectSchema = z.strictObject({
|
|
|
2833
2833
|
*/
|
|
2834
2834
|
timezone: z.string().min(1).default("UTC").meta({ description: "IANA time zone in which the platform determines day, month, quarter and year." }),
|
|
2835
2835
|
selfSignUp: z.boolean().optional().meta({ description: "Whether users may register themselves; enables the self sign-up warning and host start check." }),
|
|
2836
|
+
selfSignUpAccepted: z.strictObject({
|
|
2837
|
+
objects: z.array(z.strictObject({
|
|
2838
|
+
object: metadataRefSchema.meta({ description: "Object with publicRead authenticated accepted as open to anyone." }),
|
|
2839
|
+
published: z.literal(true).optional().meta({ description: "Accept only the published rows (the conditional publicRead); without it every row is accepted." })
|
|
2840
|
+
})).default([]).meta({ description: "Objects accepted as open to every signed-in user (publicRead authenticated)." }),
|
|
2841
|
+
grants: z.array(z.strictObject({
|
|
2842
|
+
role: metadataRefSchema.meta({ description: "Role of the everyUser level." }),
|
|
2843
|
+
object: metadataRefSchema.meta({ description: "Object of the grant." }),
|
|
2844
|
+
actions: z.array(elementNameSchema).min(1).meta({ description: "Accepted actions: standard words or custom action names." }),
|
|
2845
|
+
extent: extentSchema
|
|
2846
|
+
})).default([]).meta({ description: "Grants of everyUser roles accepted as open to anyone." })
|
|
2847
|
+
}).optional().meta({ description: "What the self sign-up warning no longer reports: it names only objects and grants open to anyone that are not listed here." }),
|
|
2836
2848
|
scopeKinds: z.array(scopeKindSchema).default([]).meta({ description: "Scope kinds of the application; leave empty for a single-tenant application." }),
|
|
2837
2849
|
accessDimensions: z.array(accessDimensionSchema).default([]).meta({ description: "Access dimensions of the application: value catalogs that grants may restrict rows by." }),
|
|
2838
2850
|
membershipSources: z.array(membershipSourceSchema).default([]).meta({ description: "Adopted tables that hold the membership of a scope kind instead of a membership catalog." }),
|
|
@@ -4010,6 +4022,32 @@ const catalogAdoptedFactsSchema = z.strictObject({
|
|
|
4010
4022
|
membershipKinds: z.array(z.guid()),
|
|
4011
4023
|
assignments: z.literal(true).optional()
|
|
4012
4024
|
});
|
|
4025
|
+
/**
|
|
4026
|
+
* Рівень ролі в каталозі: `global`, `everyUser`, вид скоупу чи контейнер
|
|
4027
|
+
* (спека «Споживач поза монорепо» §5.4); вид і контейнер — за id.
|
|
4028
|
+
*/
|
|
4029
|
+
const catalogRoleLevelSchema = z.union([
|
|
4030
|
+
z.literal("global"),
|
|
4031
|
+
z.literal("everyUser"),
|
|
4032
|
+
z.strictObject({ scopeKind: z.string() }),
|
|
4033
|
+
z.strictObject({ container: z.string() })
|
|
4034
|
+
]);
|
|
4035
|
+
/** Роль у спільній частині каталогу: клієнт показує `title` чи `name`. */
|
|
4036
|
+
const catalogRoleSchema = z.strictObject({
|
|
4037
|
+
id: z.string(),
|
|
4038
|
+
name: z.string(),
|
|
4039
|
+
title: localizedStringSchema.optional(),
|
|
4040
|
+
level: catalogRoleLevelSchema,
|
|
4041
|
+
order: z.number().int().nonnegative().optional(),
|
|
4042
|
+
assignable: z.boolean(),
|
|
4043
|
+
fullAccess: z.boolean()
|
|
4044
|
+
});
|
|
4045
|
+
/** Набір прав у спільній частині каталогу. */
|
|
4046
|
+
const catalogRightsSetSchema = z.strictObject({
|
|
4047
|
+
id: z.string(),
|
|
4048
|
+
name: z.string(),
|
|
4049
|
+
title: localizedStringSchema.optional()
|
|
4050
|
+
});
|
|
4013
4051
|
/** The runtime catalog: a projection of the compiled model (P4 spec §6.3). */
|
|
4014
4052
|
const runtimeCatalogSchema = z.strictObject({
|
|
4015
4053
|
format: z.literal(1),
|
|
@@ -4020,6 +4058,9 @@ const runtimeCatalogSchema = z.strictObject({
|
|
|
4020
4058
|
/** Проєкт дозволяє самореєстрацію: host відмовляє старту `open` без нього. */
|
|
4021
4059
|
selfSignUp: z.literal(true).optional(),
|
|
4022
4060
|
adoptedFacts: catalogAdoptedFactsSchema.optional(),
|
|
4061
|
+
/** Немає в проєкті без ролей; порядок — за `order`, далі за `name`. */
|
|
4062
|
+
roles: z.array(catalogRoleSchema).optional(),
|
|
4063
|
+
rightsSets: z.array(catalogRightsSetSchema).optional(),
|
|
4023
4064
|
objects: z.array(runtimeObjectSchema)
|
|
4024
4065
|
}).superRefine((catalog, ctx) => {
|
|
4025
4066
|
catalog.objects.forEach((object, index) => {
|
|
@@ -4053,6 +4094,8 @@ const clientCatalogSchema = z.strictObject({
|
|
|
4053
4094
|
rightsSnapshot: z.literal(true).optional(),
|
|
4054
4095
|
/** Факти прийнятих джерел свіжіють за інтервалом (П4-B §8.2). */
|
|
4055
4096
|
adoptedFacts: catalogAdoptedFactsSchema.optional(),
|
|
4097
|
+
roles: z.array(catalogRoleSchema).optional(),
|
|
4098
|
+
rightsSets: z.array(catalogRightsSetSchema).optional(),
|
|
4056
4099
|
objects: z.array(catalogEntrySchema)
|
|
4057
4100
|
}).superRefine((catalog, ctx) => {
|
|
4058
4101
|
const ids = new Set(catalog.objects.map((o) => o.id));
|
|
@@ -8702,4 +8745,4 @@ const ASSIGNED_ONCE = [
|
|
|
8702
8745
|
field: "primaryDataLanguage"
|
|
8703
8746
|
}
|
|
8704
8747
|
];
|
|
8705
|
-
export { APPLIED_SNAPSHOT_HASH_FUNCTION_NAME, ASSIGNED_ONCE, ATTRIBUTE_CASES, BATCH_MAX, CAST_TYPES, CENTRIFUGO_CHANNEL_MAX, COMMAND_CORE_ERRORS, COMMAND_ERROR_CODES, COMMAND_SETTING, CURRENT_USER_FUNCTION_NAME, CommandFailure, DATABASE_PROVIDERS, DEFAULT_MAIN_PRESENTATION, DEFAULT_SEARCH_MODE, DELETE_EVENTS, ELEMENT_ID_SEPARATOR, FILTER_DEPTH_MAX, FILTER_IN_MAX, FILTER_NODES_MAX, FILTER_OPERATORS, FUNCTIONS_FILE_SUFFIX, HEAD_READABLE_SETTINGS, HIERARCHY_ISOLATION_ERROR, INCLUDE_MAX, INTEGER_TEXT, JSONB_PAIRS_PER_CALL, KIND_REGISTRY, KNOWN_MARKER, LIMIT_REASONS, LOGICAL_TYPES, LOGIN_ROLE_PARENTS, LOGIN_ROLE_REQUEST_PURPOSES, LOGIN_ROLE_SETTINGS, MAX_PHYSICAL_NAME_BYTES, MEMBERSHIP_SET_FUNCTION, METADATA_KINDS, NO_SCOPE, OBJECT_MODULE_KEYS, OBJECT_OPERATIONS, OPERATION_EVENTS, ORDER_BY_MAX, PAYLOAD_MAX_BYTES, PINNED_SESSION_SETTINGS, PLATFORM_LOGIN_ROLES, PLATFORM_ROLES, PLATFORM_ROLES_NOT_PURPOSES, PLATFORM_SCHEMA, PLATFORM_SETTING_PREFIX, PLATFORM_STATE_TABLES, PRIVILEGED_LOGIN_REASONS, PROJECT_KEY_ORDER, PROTECTED_SESSION_SETTINGS, PROVIDER_API_ROLES, PROVIDER_EVENT_SOURCES, PROVIDER_EXPRESSION_FUNCTIONS, PROVIDER_FUNCTIONS, PROVIDER_IDENTITY_SOURCES, PROVIDER_LOGIN_ROLES, PROVIDER_OWNER_ROLES, PROVIDER_SCHEMAS, PUBLIC_READ_PURPOSES, PUBLIC_READ_ROLES, READ_BATCH_MAX, READ_BATCH_STATEMENTS_MAX, READ_COUNT_CAP, READ_LIMIT_MAX, READ_OFFSET_MAX, RESPONSE_BUDGET_BYTES, RICH_TEXT_MAX_DEPTH, RICH_TEXT_PROFILE, RICH_TEXT_WHITESPACE, RIGHTS_CLIENT_SNAPSHOT_FUNCTION_NAME, RIGHTS_COLUMNS, RIGHTS_DELTA_SECTION, RIGHTS_DIMENSION_VALUES_MAX, RIGHTS_MAINTENANCE_SETTING, RIGHTS_REQUIRE_ERROR, ROW_VERSION_EPOCH_FUNCTION_NAME, SCHEMA_RULES, SEARCH_MODES, SEARCH_PREFIX_CHARS, SESSION_CLAIMS_SETTING, SIGNAL_INVALIDATE_FUNCTION_NAME, SIGNAL_MERGE_MODE, SIGNAL_MERGE_THRESHOLD, SIGNAL_MODE_SETTING, SIGNAL_NOTIFY_CHANNEL, SIGNAL_OUTBOX, SIGNAL_PAYLOAD_MAX_BYTES, SIGNAL_TOPIC_ALLOWED_FUNCTION_NAME, SQL_DEBT_FILE, SQL_FUNCTION_CALLERS, SQL_UNIT_CLASSES, STANDARD_ACTIONS, STORAGE_ERRORS, STORAGE_FUNCTIONS, STORAGE_MAX_BYTES, STORAGE_REASONS, STORAGE_TABLES, STRUCTURAL_PATH_WORDS, SUBSCRIPTION_EVENTS, TABULAR_LINES_MAX, TOPIC_UUID_PATTERN, USER_PLATFORM_COLUMNS, UUID_TEXT, VALUE_REASONS, WireDecodeError, WireEncodeError, ZERO_UUID, accessDimensionSchema, accessMappingSchema, accessSchema, accumulationRegisterSchema, actionRequires, appSchemaNameSchema, assignPhysicalName, assignedOnSchema, assignmentSourceSchema, attributeSchema, authorColumns, batchSchema, castTypeSchema, catalogAdoptedFactsSchema, catalogAttributeSchema, catalogEntryAttributeSchema, catalogEntrySchema, catalogEntrySectionSchema, catalogFromSnapshot, catalogIndex, catalogRightsCarrierSchema, catalogRightsExtentSchema, catalogRightsSchema, catalogRightsSubjectSchema, catalogSchema, changeSignalSchema, changesFromWire, changesToWire, channelTopic, checkRichText, chooseConstraintName, clientCatalogSchema, clipBytes, closeRequires, compositeIndexesSchema, constantSchema, customActionSchema, customActionsSchema, customTableColumnSchema, customTableSchema, dataRequestSchema, dataResponseSchema, decodeRow, decodeValues, defaultMayRepeat, defaultViolatesValueChecks, defineObjectModule, deletionMarkColumn, diffCatalogModels, documentSchema, effectiveMaxBytes, effectiveSearch, elementIdSchema, elementNameSchema, encodeAttributeValue, encodeAttributes, encodeItemValue, encodePair, encodeRow, enumValueSchema, enumerationSchema, errorFromWire, errorToWire, eventSubscriptionSchema, expectsKindLabel, extentSchema, fileObjectKey, filePlatformColumns, filterSchema, filterWithinLimits, formatMetaFile, formatProjectFile, formatSqlDebtFile, formatSqlFunctionsFile, grantEntryForm, grantEntrySchema, includeSchema, informationRegisterSchema, invalidateSignalSchema, isDate, isDateTime, isFileObjectKey, isFileObjectPrefix, isObjectOrigin, isObjectTable, isPlainObject, isRecordKeyAt, isRichTextEmpty, isScalarDefault, isSqlReservedWord, isTextEncodedType, isUuidColumn, isWithinType, jsonBytes, jsonbBuildObject, kernelHashSchema, keyColumn, keysetFilter, keysetNodesMax, kindByDir, knownFormAllowed, knownSchema, lengthLimited, lineNumberColumn, localizedStringSchema, logicalElementName, logicalObjectName, logicalTypeOf, loginRoleParentNames, makeObjectName, matchesAttributeCase, membershipSourceSchema, metadataIdSchema, metadataKindSchema, metadataRefSchema, monthColumn, namedCollections, normalDateTime, objectColumns, objectHeaderShape, objectNameSchema, objectSelectorSchema, objectTable, operationFromWire, operationSchema, operationToWire, orderBySchema, ownershipSchema, parseExpression, parsePublicRead, parseStandardElementId, parseTopic, pathFromWire, pathToWire, pgEnumSchema, pgEnumTypeName, pgTypeOf, physicalNameSchema, postsMovements, predefinedNameColumn, projectSchema, publicReadConditionalSchema, publicReadSchema, publicationCarriers, publishedColumn, qualifiedNameSchema, queryFormSchema, quoteIdent, readPartFromWire, readPartToWire, readQueryFromWire, readQuerySchema, readQueryToWire, readResultFromWire, readResultToWire, receivedChangeSchema, receivedInvalidateSchema, receivedRightsSchema, refineValueType, resourceSchema, richTextDepthOk, rightsCarrierSchema, rightsDimensionValuesSchema, rightsMemberSchema, rightsRowSchema, rightsSetSchema, rightsSignalSchema, rightsSnapshotSchema, rightsValueSchema, rightsVersionSchema, roleAssignedOnSchema, roleSchema, rowWithoutSearch, runtimeAttributeSchema, runtimeCatalogSchema, runtimeConstraintSchema, runtimeObjectSchema, runtimeOperationTargetSchema, runtimeRootCreateSchema, runtimeSectionSchema, scopeKindSchema, searchColumnName, searchNormalization, searchPrefixNormalization, searchSchema, serviceDateColumns, sessionClaimsSchema, setGrantEntrySchema, singleUuidKeyColumn, singletonColumn, sourceConditionSchema, splitKnownMarker, sqlDebtSchema, sqlFunctionDeclarationSchema, sqlFunctionsFileSchema, standardAttributeOverridesSchema, standardElementId, standardLogicalName, storageSchema, tabularParentColumn, tabularSectionSchema, toSnakeCase, truncatedPeriodExpression, updateOperationObjectSchema, userPlatformColumns, valueTypeShape, versionColumn, versionEpochSchema, versionValueSchema, walkExpr, wireChangeSchema, wireCommandErrorSchema, wireOperationSchema, wireReadPartSchema, wireReadPartsResultSchema, wireReadQuerySchema, wireReadResultSchema, wireRunResultSchema };
|
|
8748
|
+
export { APPLIED_SNAPSHOT_HASH_FUNCTION_NAME, ASSIGNED_ONCE, ATTRIBUTE_CASES, BATCH_MAX, CAST_TYPES, CENTRIFUGO_CHANNEL_MAX, COMMAND_CORE_ERRORS, COMMAND_ERROR_CODES, COMMAND_SETTING, CURRENT_USER_FUNCTION_NAME, CommandFailure, DATABASE_PROVIDERS, DEFAULT_MAIN_PRESENTATION, DEFAULT_SEARCH_MODE, DELETE_EVENTS, ELEMENT_ID_SEPARATOR, FILTER_DEPTH_MAX, FILTER_IN_MAX, FILTER_NODES_MAX, FILTER_OPERATORS, FUNCTIONS_FILE_SUFFIX, HEAD_READABLE_SETTINGS, HIERARCHY_ISOLATION_ERROR, INCLUDE_MAX, INTEGER_TEXT, JSONB_PAIRS_PER_CALL, KIND_REGISTRY, KNOWN_MARKER, LIMIT_REASONS, LOGICAL_TYPES, LOGIN_ROLE_PARENTS, LOGIN_ROLE_REQUEST_PURPOSES, LOGIN_ROLE_SETTINGS, MAX_PHYSICAL_NAME_BYTES, MEMBERSHIP_SET_FUNCTION, METADATA_KINDS, NO_SCOPE, OBJECT_MODULE_KEYS, OBJECT_OPERATIONS, OPERATION_EVENTS, ORDER_BY_MAX, PAYLOAD_MAX_BYTES, PINNED_SESSION_SETTINGS, PLATFORM_LOGIN_ROLES, PLATFORM_ROLES, PLATFORM_ROLES_NOT_PURPOSES, PLATFORM_SCHEMA, PLATFORM_SETTING_PREFIX, PLATFORM_STATE_TABLES, PRIVILEGED_LOGIN_REASONS, PROJECT_KEY_ORDER, PROTECTED_SESSION_SETTINGS, PROVIDER_API_ROLES, PROVIDER_EVENT_SOURCES, PROVIDER_EXPRESSION_FUNCTIONS, PROVIDER_FUNCTIONS, PROVIDER_IDENTITY_SOURCES, PROVIDER_LOGIN_ROLES, PROVIDER_OWNER_ROLES, PROVIDER_SCHEMAS, PUBLIC_READ_PURPOSES, PUBLIC_READ_ROLES, READ_BATCH_MAX, READ_BATCH_STATEMENTS_MAX, READ_COUNT_CAP, READ_LIMIT_MAX, READ_OFFSET_MAX, RESPONSE_BUDGET_BYTES, RICH_TEXT_MAX_DEPTH, RICH_TEXT_PROFILE, RICH_TEXT_WHITESPACE, RIGHTS_CLIENT_SNAPSHOT_FUNCTION_NAME, RIGHTS_COLUMNS, RIGHTS_DELTA_SECTION, RIGHTS_DIMENSION_VALUES_MAX, RIGHTS_MAINTENANCE_SETTING, RIGHTS_REQUIRE_ERROR, ROW_VERSION_EPOCH_FUNCTION_NAME, SCHEMA_RULES, SEARCH_MODES, SEARCH_PREFIX_CHARS, SESSION_CLAIMS_SETTING, SIGNAL_INVALIDATE_FUNCTION_NAME, SIGNAL_MERGE_MODE, SIGNAL_MERGE_THRESHOLD, SIGNAL_MODE_SETTING, SIGNAL_NOTIFY_CHANNEL, SIGNAL_OUTBOX, SIGNAL_PAYLOAD_MAX_BYTES, SIGNAL_TOPIC_ALLOWED_FUNCTION_NAME, SQL_DEBT_FILE, SQL_FUNCTION_CALLERS, SQL_UNIT_CLASSES, STANDARD_ACTIONS, STORAGE_ERRORS, STORAGE_FUNCTIONS, STORAGE_MAX_BYTES, STORAGE_REASONS, STORAGE_TABLES, STRUCTURAL_PATH_WORDS, SUBSCRIPTION_EVENTS, TABULAR_LINES_MAX, TOPIC_UUID_PATTERN, USER_PLATFORM_COLUMNS, UUID_TEXT, VALUE_REASONS, WireDecodeError, WireEncodeError, ZERO_UUID, accessDimensionSchema, accessMappingSchema, accessSchema, accumulationRegisterSchema, actionRequires, appSchemaNameSchema, assignPhysicalName, assignedOnSchema, assignmentSourceSchema, attributeSchema, authorColumns, batchSchema, castTypeSchema, catalogAdoptedFactsSchema, catalogAttributeSchema, catalogEntryAttributeSchema, catalogEntrySchema, catalogEntrySectionSchema, catalogFromSnapshot, catalogIndex, catalogRightsCarrierSchema, catalogRightsExtentSchema, catalogRightsSchema, catalogRightsSetSchema, catalogRightsSubjectSchema, catalogRoleLevelSchema, catalogRoleSchema, catalogSchema, changeSignalSchema, changesFromWire, changesToWire, channelTopic, checkRichText, chooseConstraintName, clientCatalogSchema, clipBytes, closeRequires, compositeIndexesSchema, constantSchema, customActionSchema, customActionsSchema, customTableColumnSchema, customTableSchema, dataRequestSchema, dataResponseSchema, decodeRow, decodeValues, defaultMayRepeat, defaultViolatesValueChecks, defineObjectModule, deletionMarkColumn, diffCatalogModels, documentSchema, effectiveMaxBytes, effectiveSearch, elementIdSchema, elementNameSchema, encodeAttributeValue, encodeAttributes, encodeItemValue, encodePair, encodeRow, enumValueSchema, enumerationSchema, errorFromWire, errorToWire, eventSubscriptionSchema, expectsKindLabel, extentSchema, fileObjectKey, filePlatformColumns, filterSchema, filterWithinLimits, formatMetaFile, formatProjectFile, formatSqlDebtFile, formatSqlFunctionsFile, grantEntryForm, grantEntrySchema, includeSchema, informationRegisterSchema, invalidateSignalSchema, isDate, isDateTime, isFileObjectKey, isFileObjectPrefix, isObjectOrigin, isObjectTable, isPlainObject, isRecordKeyAt, isRichTextEmpty, isScalarDefault, isSqlReservedWord, isTextEncodedType, isUuidColumn, isWithinType, jsonBytes, jsonbBuildObject, kernelHashSchema, keyColumn, keysetFilter, keysetNodesMax, kindByDir, knownFormAllowed, knownSchema, lengthLimited, lineNumberColumn, localizedStringSchema, logicalElementName, logicalObjectName, logicalTypeOf, loginRoleParentNames, makeObjectName, matchesAttributeCase, membershipSourceSchema, metadataIdSchema, metadataKindSchema, metadataRefSchema, monthColumn, namedCollections, normalDateTime, objectColumns, objectHeaderShape, objectNameSchema, objectSelectorSchema, objectTable, operationFromWire, operationSchema, operationToWire, orderBySchema, ownershipSchema, parseExpression, parsePublicRead, parseStandardElementId, parseTopic, pathFromWire, pathToWire, pgEnumSchema, pgEnumTypeName, pgTypeOf, physicalNameSchema, postsMovements, predefinedNameColumn, projectSchema, publicReadConditionalSchema, publicReadSchema, publicationCarriers, publishedColumn, qualifiedNameSchema, queryFormSchema, quoteIdent, readPartFromWire, readPartToWire, readQueryFromWire, readQuerySchema, readQueryToWire, readResultFromWire, readResultToWire, receivedChangeSchema, receivedInvalidateSchema, receivedRightsSchema, refineValueType, resourceSchema, richTextDepthOk, rightsCarrierSchema, rightsDimensionValuesSchema, rightsMemberSchema, rightsRowSchema, rightsSetSchema, rightsSignalSchema, rightsSnapshotSchema, rightsValueSchema, rightsVersionSchema, roleAssignedOnSchema, roleSchema, rowWithoutSearch, runtimeAttributeSchema, runtimeCatalogSchema, runtimeConstraintSchema, runtimeObjectSchema, runtimeOperationTargetSchema, runtimeRootCreateSchema, runtimeSectionSchema, scopeKindSchema, searchColumnName, searchNormalization, searchPrefixNormalization, searchSchema, serviceDateColumns, sessionClaimsSchema, setGrantEntrySchema, singleUuidKeyColumn, singletonColumn, sourceConditionSchema, splitKnownMarker, sqlDebtSchema, sqlFunctionDeclarationSchema, sqlFunctionsFileSchema, standardAttributeOverridesSchema, standardElementId, standardLogicalName, storageSchema, tabularParentColumn, tabularSectionSchema, toSnakeCase, truncatedPeriodExpression, updateOperationObjectSchema, userPlatformColumns, valueTypeShape, versionColumn, versionEpochSchema, versionValueSchema, walkExpr, wireChangeSchema, wireCommandErrorSchema, wireOperationSchema, wireReadPartSchema, wireReadPartsResultSchema, wireReadQuerySchema, wireReadResultSchema, wireRunResultSchema };
|
package/dist/schema/index.d.ts
CHANGED
|
@@ -1021,7 +1021,7 @@ export declare function checkOwnerAttributes(tx: ApplyTransaction, provider: Dat
|
|
|
1021
1021
|
* тримає тест, а не читання маніфесту під час виконання: ярус не звертається
|
|
1022
1022
|
* до файлової системи.
|
|
1023
1023
|
*/
|
|
1024
|
-
export declare const PLATFORM_VERSION = "0.3.0-next.
|
|
1024
|
+
export declare const PLATFORM_VERSION = "0.3.0-next.3";
|
|
1025
1025
|
/**
|
|
1026
1026
|
* Структурний ключ таблиці для множин і мап: ім'я з крапкою не злипається зі
|
|
1027
1027
|
* схемою, як злиплося б у `schema.name`. Складені ключі підоб'єктів — так
|
package/dist/schema/index.js
CHANGED
|
@@ -3893,7 +3893,7 @@ async function readSessionSearchPath(tx) {
|
|
|
3893
3893
|
* тримає тест, а не читання маніфесту під час виконання: ярус не звертається
|
|
3894
3894
|
* до файлової системи.
|
|
3895
3895
|
*/
|
|
3896
|
-
const PLATFORM_VERSION = "0.3.0-next.
|
|
3896
|
+
const PLATFORM_VERSION = "0.3.0-next.3";
|
|
3897
3897
|
// src/schema/apply/state.ts
|
|
3898
3898
|
/**
|
|
3899
3899
|
* Форма стану застосування (платформна спека §6.1). Читач приймає лише її:
|
package/dist/shell/index.d.ts
CHANGED
|
@@ -97,4 +97,16 @@ export declare function entityCardRoute(entity: EntityDescriptor): {
|
|
|
97
97
|
* route the one with `simetraList`; the path comes from the app's route tree.
|
|
98
98
|
*/
|
|
99
99
|
export declare function routerNavigation(router: AnyRouter): NavigationAdapter;
|
|
100
|
+
/**
|
|
101
|
+
* Маркер кінця гідратації (спека «Споживач поза монорепо» §5.5, T6):
|
|
102
|
+
* `<html data-hydrated="true">` ставиться раз, після того як клієнт узяв
|
|
103
|
+
* серверну розмітку під себе. Тест застосунку чекає `html[data-hydrated]`
|
|
104
|
+
* замість таймера; атрибут є й у production-збірці. Корінь застосунку кличе
|
|
105
|
+
* цю функцію в ефекті гідратації.
|
|
106
|
+
*/
|
|
107
|
+
export declare function markHydrated(doc: {
|
|
108
|
+
readonly documentElement: {
|
|
109
|
+
setAttribute(name: string, value: string): void;
|
|
110
|
+
};
|
|
111
|
+
}): void;
|
|
100
112
|
export type { EntityDescriptor, EntityListRouteOptions, SimetraApp, SimetraRouterContext };
|
package/dist/shell/index.js
CHANGED
|
@@ -145,4 +145,15 @@ function routerNavigation(router) {
|
|
|
145
145
|
}
|
|
146
146
|
};
|
|
147
147
|
}
|
|
148
|
-
|
|
148
|
+
// src/shell/hydration.ts
|
|
149
|
+
/**
|
|
150
|
+
* Маркер кінця гідратації (спека «Споживач поза монорепо» §5.5, T6):
|
|
151
|
+
* `<html data-hydrated="true">` ставиться раз, після того як клієнт узяв
|
|
152
|
+
* серверну розмітку під себе. Тест застосунку чекає `html[data-hydrated]`
|
|
153
|
+
* замість таймера; атрибут є й у production-збірці. Корінь застосунку кличе
|
|
154
|
+
* цю функцію в ефекті гідратації.
|
|
155
|
+
*/
|
|
156
|
+
function markHydrated(doc) {
|
|
157
|
+
doc.documentElement.setAttribute("data-hydrated", "true");
|
|
158
|
+
}
|
|
159
|
+
export { entityCardRoute, entityListRoute, markHydrated, routerNavigation, simetraApp };
|
package/dist/ui/index.js
CHANGED
|
@@ -421,6 +421,27 @@ const STATE_CELL_WIDTH = "var(--simetra-state-cell-width, 160px)";
|
|
|
421
421
|
const SELECTION_PANEL_HEIGHT = "var(--simetra-selection-panel-height, 32px)";
|
|
422
422
|
/** Width of the reserved selection-count slot; override with `--simetra-selection-count-width`. */
|
|
423
423
|
const SELECTION_COUNT_WIDTH = "var(--simetra-selection-count-width, 96px)";
|
|
424
|
+
// src/ui/view-markers.ts
|
|
425
|
+
/**
|
|
426
|
+
* `loading` — даних ще немає; `refreshing` — дані є, перечитуються; усе
|
|
427
|
+
* інше (`ready`, `error`, `purged`) — `ready`: подання вже не чекає даних, а
|
|
428
|
+
* причину відмови показує власний слот.
|
|
429
|
+
*/
|
|
430
|
+
function viewStateOf(status) {
|
|
431
|
+
return status === "loading" || status === "refreshing" ? status : "ready";
|
|
432
|
+
}
|
|
433
|
+
/** `pending`, коли хоч один рядок області чекає запису: стан `pending` чи `unknown`. */
|
|
434
|
+
function writesOf(rows) {
|
|
435
|
+
for (const row of rows) if (row.state === "pending" || row.state === "unknown") return "pending";
|
|
436
|
+
return "idle";
|
|
437
|
+
}
|
|
438
|
+
/** Атрибути області `[data-region="list"]` і `[data-region="card"]`. */
|
|
439
|
+
function viewMarkers(status, rows) {
|
|
440
|
+
return {
|
|
441
|
+
"data-view-state": viewStateOf(status),
|
|
442
|
+
"data-writes": writesOf(rows)
|
|
443
|
+
};
|
|
444
|
+
}
|
|
424
445
|
// src/ui/list/selection-panel.ts
|
|
425
446
|
function Button$1(props) {
|
|
426
447
|
return createElement("button", {
|
|
@@ -668,7 +689,8 @@ function ListHost(props) {
|
|
|
668
689
|
return createElement("div", {
|
|
669
690
|
"data-region": "list",
|
|
670
691
|
"data-object": object,
|
|
671
|
-
role: "grid"
|
|
692
|
+
role: "grid",
|
|
693
|
+
...viewMarkers(view.status, rows)
|
|
672
694
|
}, createElement(SelectionPanel, { view }), createElement("div", {
|
|
673
695
|
role: "row",
|
|
674
696
|
style: {
|
|
@@ -1049,7 +1071,8 @@ function CardBody(props) {
|
|
|
1049
1071
|
"data-object": object,
|
|
1050
1072
|
"data-key": id,
|
|
1051
1073
|
"data-state": row === void 0 ? void 0 : displayState(row),
|
|
1052
|
-
"data-draft": draft.state
|
|
1074
|
+
"data-draft": draft.state,
|
|
1075
|
+
...viewMarkers(card.status, row === void 0 ? [] : [row])
|
|
1053
1076
|
}, createElement("div", { "data-region": "card-status" }, createElement("span", {
|
|
1054
1077
|
"aria-live": "polite",
|
|
1055
1078
|
"data-card": "status"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "simetra",
|
|
3
|
-
"version": "0.3.0-next.
|
|
3
|
+
"version": "0.3.0-next.3",
|
|
4
4
|
"description": "Metadata-driven platform for business applications on Postgres: metamodel, compiler and schema engine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"metadata",
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
"publishConfig": {
|
|
136
136
|
"access": "public"
|
|
137
137
|
},
|
|
138
|
-
"gitHead": "
|
|
138
|
+
"gitHead": "02c584e117fd4495e4b75baa9872bb8ac54e3af0",
|
|
139
139
|
"scripts": {
|
|
140
140
|
"build": "tsc --noEmit",
|
|
141
141
|
"build:package": "tsdown",
|
|
@@ -91,6 +91,185 @@
|
|
|
91
91
|
"description": "Whether users may register themselves; enables the self sign-up warning and host start check.",
|
|
92
92
|
"type": "boolean"
|
|
93
93
|
},
|
|
94
|
+
"selfSignUpAccepted": {
|
|
95
|
+
"description": "What the self sign-up warning no longer reports: it names only objects and grants open to anyone that are not listed here.",
|
|
96
|
+
"type": "object",
|
|
97
|
+
"properties": {
|
|
98
|
+
"objects": {
|
|
99
|
+
"default": [],
|
|
100
|
+
"description": "Objects accepted as open to every signed-in user (publicRead authenticated).",
|
|
101
|
+
"type": "array",
|
|
102
|
+
"items": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"properties": {
|
|
105
|
+
"object": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"properties": {
|
|
108
|
+
"kind": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"enum": [
|
|
111
|
+
"Catalog",
|
|
112
|
+
"Document",
|
|
113
|
+
"Enumeration",
|
|
114
|
+
"InformationRegister",
|
|
115
|
+
"AccumulationRegister",
|
|
116
|
+
"Constant",
|
|
117
|
+
"CustomTable",
|
|
118
|
+
"PgEnum",
|
|
119
|
+
"EventSubscription",
|
|
120
|
+
"RightsSet",
|
|
121
|
+
"Role"
|
|
122
|
+
],
|
|
123
|
+
"description": "Kind of the referenced metadata object."
|
|
124
|
+
},
|
|
125
|
+
"name": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"pattern": "^[A-Z][A-Za-z0-9]*$",
|
|
128
|
+
"description": "Logical name of the referenced object."
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"required": [
|
|
132
|
+
"kind",
|
|
133
|
+
"name"
|
|
134
|
+
],
|
|
135
|
+
"additionalProperties": false,
|
|
136
|
+
"description": "Object with publicRead authenticated accepted as open to anyone."
|
|
137
|
+
},
|
|
138
|
+
"published": {
|
|
139
|
+
"description": "Accept only the published rows (the conditional publicRead); without it every row is accepted.",
|
|
140
|
+
"type": "boolean",
|
|
141
|
+
"const": true
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"required": [
|
|
145
|
+
"object"
|
|
146
|
+
],
|
|
147
|
+
"additionalProperties": false
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"grants": {
|
|
151
|
+
"default": [],
|
|
152
|
+
"description": "Grants of everyUser roles accepted as open to anyone.",
|
|
153
|
+
"type": "array",
|
|
154
|
+
"items": {
|
|
155
|
+
"type": "object",
|
|
156
|
+
"properties": {
|
|
157
|
+
"role": {
|
|
158
|
+
"type": "object",
|
|
159
|
+
"properties": {
|
|
160
|
+
"kind": {
|
|
161
|
+
"type": "string",
|
|
162
|
+
"enum": [
|
|
163
|
+
"Catalog",
|
|
164
|
+
"Document",
|
|
165
|
+
"Enumeration",
|
|
166
|
+
"InformationRegister",
|
|
167
|
+
"AccumulationRegister",
|
|
168
|
+
"Constant",
|
|
169
|
+
"CustomTable",
|
|
170
|
+
"PgEnum",
|
|
171
|
+
"EventSubscription",
|
|
172
|
+
"RightsSet",
|
|
173
|
+
"Role"
|
|
174
|
+
],
|
|
175
|
+
"description": "Kind of the referenced metadata object."
|
|
176
|
+
},
|
|
177
|
+
"name": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"pattern": "^[A-Z][A-Za-z0-9]*$",
|
|
180
|
+
"description": "Logical name of the referenced object."
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"required": [
|
|
184
|
+
"kind",
|
|
185
|
+
"name"
|
|
186
|
+
],
|
|
187
|
+
"additionalProperties": false,
|
|
188
|
+
"description": "Role of the everyUser level."
|
|
189
|
+
},
|
|
190
|
+
"object": {
|
|
191
|
+
"type": "object",
|
|
192
|
+
"properties": {
|
|
193
|
+
"kind": {
|
|
194
|
+
"type": "string",
|
|
195
|
+
"enum": [
|
|
196
|
+
"Catalog",
|
|
197
|
+
"Document",
|
|
198
|
+
"Enumeration",
|
|
199
|
+
"InformationRegister",
|
|
200
|
+
"AccumulationRegister",
|
|
201
|
+
"Constant",
|
|
202
|
+
"CustomTable",
|
|
203
|
+
"PgEnum",
|
|
204
|
+
"EventSubscription",
|
|
205
|
+
"RightsSet",
|
|
206
|
+
"Role"
|
|
207
|
+
],
|
|
208
|
+
"description": "Kind of the referenced metadata object."
|
|
209
|
+
},
|
|
210
|
+
"name": {
|
|
211
|
+
"type": "string",
|
|
212
|
+
"pattern": "^[A-Z][A-Za-z0-9]*$",
|
|
213
|
+
"description": "Logical name of the referenced object."
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"required": [
|
|
217
|
+
"kind",
|
|
218
|
+
"name"
|
|
219
|
+
],
|
|
220
|
+
"additionalProperties": false,
|
|
221
|
+
"description": "Object of the grant."
|
|
222
|
+
},
|
|
223
|
+
"actions": {
|
|
224
|
+
"minItems": 1,
|
|
225
|
+
"type": "array",
|
|
226
|
+
"items": {
|
|
227
|
+
"type": "string",
|
|
228
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
|
|
229
|
+
"description": "Logical element name (attribute, section, column). The casing style is checked against the project naming setting."
|
|
230
|
+
},
|
|
231
|
+
"description": "Accepted actions: standard words or custom action names."
|
|
232
|
+
},
|
|
233
|
+
"extent": {
|
|
234
|
+
"anyOf": [
|
|
235
|
+
{
|
|
236
|
+
"type": "string",
|
|
237
|
+
"const": "any"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"type": "string",
|
|
241
|
+
"const": "own"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"type": "object",
|
|
245
|
+
"properties": {
|
|
246
|
+
"dimension": {
|
|
247
|
+
"type": "string",
|
|
248
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
|
|
249
|
+
"description": "Name of a project access dimension."
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
"required": [
|
|
253
|
+
"dimension"
|
|
254
|
+
],
|
|
255
|
+
"additionalProperties": false
|
|
256
|
+
}
|
|
257
|
+
],
|
|
258
|
+
"description": "Rows the grant opens: any row, own rows, or rows with a value of an access dimension of the user."
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"required": [
|
|
262
|
+
"role",
|
|
263
|
+
"object",
|
|
264
|
+
"actions",
|
|
265
|
+
"extent"
|
|
266
|
+
],
|
|
267
|
+
"additionalProperties": false
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"additionalProperties": false
|
|
272
|
+
},
|
|
94
273
|
"scopeKinds": {
|
|
95
274
|
"default": [],
|
|
96
275
|
"description": "Scope kinds of the application; leave empty for a single-tenant application.",
|
|
@@ -17,6 +17,21 @@
|
|
|
17
17
|
"pattern": "^[A-Z][A-Za-z0-9]*$",
|
|
18
18
|
"description": "Logical object name in PascalCase."
|
|
19
19
|
},
|
|
20
|
+
"title": {
|
|
21
|
+
"description": "Human-readable title of the object.",
|
|
22
|
+
"type": "object",
|
|
23
|
+
"properties": {
|
|
24
|
+
"uk": {
|
|
25
|
+
"description": "Ukrainian text.",
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"en": {
|
|
29
|
+
"description": "English text.",
|
|
30
|
+
"type": "string"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"additionalProperties": false
|
|
34
|
+
},
|
|
20
35
|
"kind": {
|
|
21
36
|
"type": "string",
|
|
22
37
|
"const": "RightsSet",
|
|
@@ -17,6 +17,21 @@
|
|
|
17
17
|
"pattern": "^[A-Z][A-Za-z0-9]*$",
|
|
18
18
|
"description": "Logical object name in PascalCase."
|
|
19
19
|
},
|
|
20
|
+
"title": {
|
|
21
|
+
"description": "Human-readable title of the object.",
|
|
22
|
+
"type": "object",
|
|
23
|
+
"properties": {
|
|
24
|
+
"uk": {
|
|
25
|
+
"description": "Ukrainian text.",
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"en": {
|
|
29
|
+
"description": "English text.",
|
|
30
|
+
"type": "string"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"additionalProperties": false
|
|
34
|
+
},
|
|
20
35
|
"kind": {
|
|
21
36
|
"type": "string",
|
|
22
37
|
"const": "Role",
|