@aglyn/aglyn 1.0.0-beta.143
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/LICENSE +201 -0
- package/README.md +11 -0
- package/package.json +66 -0
- package/src/index.d.ts +25 -0
- package/src/index.js +26 -0
- package/src/index.js.map +1 -0
- package/src/lib/aglyn.d.ts +31 -0
- package/src/lib/aglyn.js +114 -0
- package/src/lib/aglyn.js.map +1 -0
- package/src/lib/app-utils/abuse-report.d.ts +193 -0
- package/src/lib/app-utils/abuse-report.js +321 -0
- package/src/lib/app-utils/abuse-report.js.map +1 -0
- package/src/lib/app-utils/accept-negotiation.d.ts +129 -0
- package/src/lib/app-utils/accept-negotiation.js +266 -0
- package/src/lib/app-utils/accept-negotiation.js.map +1 -0
- package/src/lib/app-utils/account-emails.d.ts +263 -0
- package/src/lib/app-utils/account-emails.js +264 -0
- package/src/lib/app-utils/account-emails.js.map +1 -0
- package/src/lib/app-utils/actions.d.ts +717 -0
- package/src/lib/app-utils/actions.js +1031 -0
- package/src/lib/app-utils/actions.js.map +1 -0
- package/src/lib/app-utils/activity-presenter.d.ts +152 -0
- package/src/lib/app-utils/activity-presenter.js +326 -0
- package/src/lib/app-utils/activity-presenter.js.map +1 -0
- package/src/lib/app-utils/advertising-tag-mounts.d.ts +133 -0
- package/src/lib/app-utils/advertising-tag-mounts.js +118 -0
- package/src/lib/app-utils/advertising-tag-mounts.js.map +1 -0
- package/src/lib/app-utils/advertising-tags.d.ts +307 -0
- package/src/lib/app-utils/advertising-tags.js +525 -0
- package/src/lib/app-utils/advertising-tags.js.map +1 -0
- package/src/lib/app-utils/agent-api-catalog.d.ts +94 -0
- package/src/lib/app-utils/agent-api-catalog.js +106 -0
- package/src/lib/app-utils/agent-api-catalog.js.map +1 -0
- package/src/lib/app-utils/agent-openapi.d.ts +103 -0
- package/src/lib/app-utils/agent-openapi.js +1128 -0
- package/src/lib/app-utils/agent-openapi.js.map +1 -0
- package/src/lib/app-utils/analytics-beacon.d.ts +154 -0
- package/src/lib/app-utils/analytics-beacon.js +152 -0
- package/src/lib/app-utils/analytics-beacon.js.map +1 -0
- package/src/lib/app-utils/analytics-environment.d.ts +133 -0
- package/src/lib/app-utils/analytics-environment.js +152 -0
- package/src/lib/app-utils/analytics-environment.js.map +1 -0
- package/src/lib/app-utils/analytics-events.d.ts +744 -0
- package/src/lib/app-utils/analytics-events.js +650 -0
- package/src/lib/app-utils/analytics-events.js.map +1 -0
- package/src/lib/app-utils/analytics-link-clicks.d.ts +102 -0
- package/src/lib/app-utils/analytics-link-clicks.js +267 -0
- package/src/lib/app-utils/analytics-link-clicks.js.map +1 -0
- package/src/lib/app-utils/analytics-path-key.d.ts +46 -0
- package/src/lib/app-utils/analytics-path-key.js +46 -0
- package/src/lib/app-utils/analytics-path-key.js.map +1 -0
- package/src/lib/app-utils/api-adapter.d.ts +47 -0
- package/src/lib/app-utils/api-adapter.js +367 -0
- package/src/lib/app-utils/api-adapter.js.map +1 -0
- package/src/lib/app-utils/api-idempotency.d.ts +169 -0
- package/src/lib/app-utils/api-idempotency.js +213 -0
- package/src/lib/app-utils/api-idempotency.js.map +1 -0
- package/src/lib/app-utils/api-plugins.d.ts +210 -0
- package/src/lib/app-utils/api-plugins.js +221 -0
- package/src/lib/app-utils/api-plugins.js.map +1 -0
- package/src/lib/app-utils/assist-credits.d.ts +482 -0
- package/src/lib/app-utils/assist-credits.js +509 -0
- package/src/lib/app-utils/assist-credits.js.map +1 -0
- package/src/lib/app-utils/attribution-attribute.d.ts +34 -0
- package/src/lib/app-utils/attribution-attribute.js +34 -0
- package/src/lib/app-utils/attribution-attribute.js.map +1 -0
- package/src/lib/app-utils/attribution-guard.d.ts +130 -0
- package/src/lib/app-utils/attribution-guard.js +410 -0
- package/src/lib/app-utils/attribution-guard.js.map +1 -0
- package/src/lib/app-utils/author-css.d.ts +123 -0
- package/src/lib/app-utils/author-css.js +275 -0
- package/src/lib/app-utils/author-css.js.map +1 -0
- package/src/lib/app-utils/author-html-markdown.d.ts +31 -0
- package/src/lib/app-utils/author-html-markdown.js +497 -0
- package/src/lib/app-utils/author-html-markdown.js.map +1 -0
- package/src/lib/app-utils/author-html.d.ts +135 -0
- package/src/lib/app-utils/author-html.js +1037 -0
- package/src/lib/app-utils/author-html.js.map +1 -0
- package/src/lib/app-utils/automation-placeholders.d.ts +72 -0
- package/src/lib/app-utils/automation-placeholders.js +207 -0
- package/src/lib/app-utils/automation-placeholders.js.map +1 -0
- package/src/lib/app-utils/bandwidth-cap.d.ts +183 -0
- package/src/lib/app-utils/bandwidth-cap.js +193 -0
- package/src/lib/app-utils/bandwidth-cap.js.map +1 -0
- package/src/lib/app-utils/binding-token-catalog.d.ts +82 -0
- package/src/lib/app-utils/binding-token-catalog.js +293 -0
- package/src/lib/app-utils/binding-token-catalog.js.map +1 -0
- package/src/lib/app-utils/binding-tokens.d.ts +157 -0
- package/src/lib/app-utils/binding-tokens.js +251 -0
- package/src/lib/app-utils/binding-tokens.js.map +1 -0
- package/src/lib/app-utils/breadcrumb-json-ld.d.ts +57 -0
- package/src/lib/app-utils/breadcrumb-json-ld.js +67 -0
- package/src/lib/app-utils/breadcrumb-json-ld.js.map +1 -0
- package/src/lib/app-utils/campaign-attribution.d.ts +117 -0
- package/src/lib/app-utils/campaign-attribution.js +162 -0
- package/src/lib/app-utils/campaign-attribution.js.map +1 -0
- package/src/lib/app-utils/campaign-forwarding.d.ts +220 -0
- package/src/lib/app-utils/campaign-forwarding.js +332 -0
- package/src/lib/app-utils/campaign-forwarding.js.map +1 -0
- package/src/lib/app-utils/campaign-membership.d.ts +109 -0
- package/src/lib/app-utils/campaign-membership.js +176 -0
- package/src/lib/app-utils/campaign-membership.js.map +1 -0
- package/src/lib/app-utils/campaign-touch.d.ts +206 -0
- package/src/lib/app-utils/campaign-touch.js +326 -0
- package/src/lib/app-utils/campaign-touch.js.map +1 -0
- package/src/lib/app-utils/child-contract-compose.d.ts +28 -0
- package/src/lib/app-utils/child-contract-compose.js +140 -0
- package/src/lib/app-utils/child-contract-compose.js.map +1 -0
- package/src/lib/app-utils/child-contract.d.ts +129 -0
- package/src/lib/app-utils/child-contract.js +153 -0
- package/src/lib/app-utils/child-contract.js.map +1 -0
- package/src/lib/app-utils/collection-delete.d.ts +113 -0
- package/src/lib/app-utils/collection-delete.js +120 -0
- package/src/lib/app-utils/collection-delete.js.map +1 -0
- package/src/lib/app-utils/collection-entries.d.ts +833 -0
- package/src/lib/app-utils/collection-entries.js +1285 -0
- package/src/lib/app-utils/collection-entries.js.map +1 -0
- package/src/lib/app-utils/collection-entry-date.d.ts +129 -0
- package/src/lib/app-utils/collection-entry-date.js +183 -0
- package/src/lib/app-utils/collection-entry-date.js.map +1 -0
- package/src/lib/app-utils/collection-kind.d.ts +55 -0
- package/src/lib/app-utils/collection-kind.js +69 -0
- package/src/lib/app-utils/collection-kind.js.map +1 -0
- package/src/lib/app-utils/collection-slug.d.ts +79 -0
- package/src/lib/app-utils/collection-slug.js +70 -0
- package/src/lib/app-utils/collection-slug.js.map +1 -0
- package/src/lib/app-utils/compose-layout-nodes.d.ts +147 -0
- package/src/lib/app-utils/compose-layout-nodes.js +261 -0
- package/src/lib/app-utils/compose-layout-nodes.js.map +1 -0
- package/src/lib/app-utils/compose-layout-props.d.ts +71 -0
- package/src/lib/app-utils/compose-layout-props.js +61 -0
- package/src/lib/app-utils/compose-layout-props.js.map +1 -0
- package/src/lib/app-utils/compose-reusable-components.d.ts +504 -0
- package/src/lib/app-utils/compose-reusable-components.js +1366 -0
- package/src/lib/app-utils/compose-reusable-components.js.map +1 -0
- package/src/lib/app-utils/compress.d.ts +35 -0
- package/src/lib/app-utils/compress.js +38 -0
- package/src/lib/app-utils/compress.js.map +1 -0
- package/src/lib/app-utils/consent-banner-ui.d.ts +226 -0
- package/src/lib/app-utils/consent-banner-ui.js +583 -0
- package/src/lib/app-utils/consent-banner-ui.js.map +1 -0
- package/src/lib/app-utils/consent-groups.d.ts +189 -0
- package/src/lib/app-utils/consent-groups.js +219 -0
- package/src/lib/app-utils/consent-groups.js.map +1 -0
- package/src/lib/app-utils/consent-preferences-dialog.d.ts +58 -0
- package/src/lib/app-utils/consent-preferences-dialog.js +106 -0
- package/src/lib/app-utils/consent-preferences-dialog.js.map +1 -0
- package/src/lib/app-utils/console-record-links.d.ts +163 -0
- package/src/lib/app-utils/console-record-links.js +178 -0
- package/src/lib/app-utils/console-record-links.js.map +1 -0
- package/src/lib/app-utils/console-routes.d.ts +658 -0
- package/src/lib/app-utils/console-routes.js +489 -0
- package/src/lib/app-utils/console-routes.js.map +1 -0
- package/src/lib/app-utils/console-widget-slot-context.d.ts +46 -0
- package/src/lib/app-utils/console-widget-slot-context.js +23 -0
- package/src/lib/app-utils/console-widget-slot-context.js.map +1 -0
- package/src/lib/app-utils/contact-custom-fields.d.ts +191 -0
- package/src/lib/app-utils/contact-custom-fields.js +349 -0
- package/src/lib/app-utils/contact-custom-fields.js.map +1 -0
- package/src/lib/app-utils/contact-holder.d.ts +52 -0
- package/src/lib/app-utils/contact-holder.js +98 -0
- package/src/lib/app-utils/contact-holder.js.map +1 -0
- package/src/lib/app-utils/contact-merge.d.ts +136 -0
- package/src/lib/app-utils/contact-merge.js +379 -0
- package/src/lib/app-utils/contact-merge.js.map +1 -0
- package/src/lib/app-utils/contacts.d.ts +554 -0
- package/src/lib/app-utils/contacts.js +401 -0
- package/src/lib/app-utils/contacts.js.map +1 -0
- package/src/lib/app-utils/content-author-profile.d.ts +68 -0
- package/src/lib/app-utils/content-author-profile.js +118 -0
- package/src/lib/app-utils/content-author-profile.js.map +1 -0
- package/src/lib/app-utils/content-authors.d.ts +662 -0
- package/src/lib/app-utils/content-authors.js +771 -0
- package/src/lib/app-utils/content-authors.js.map +1 -0
- package/src/lib/app-utils/content-schema-type.d.ts +81 -0
- package/src/lib/app-utils/content-schema-type.js +87 -0
- package/src/lib/app-utils/content-schema-type.js.map +1 -0
- package/src/lib/app-utils/contexts.d.ts +35 -0
- package/src/lib/app-utils/contexts.js +35 -0
- package/src/lib/app-utils/contexts.js.map +1 -0
- package/src/lib/app-utils/create-resource-uid.d.ts +18 -0
- package/src/lib/app-utils/create-resource-uid.js +23 -0
- package/src/lib/app-utils/create-resource-uid.js.map +1 -0
- package/src/lib/app-utils/crm-booking.d.ts +75 -0
- package/src/lib/app-utils/crm-booking.js +133 -0
- package/src/lib/app-utils/crm-booking.js.map +1 -0
- package/src/lib/app-utils/crm-csv.d.ts +232 -0
- package/src/lib/app-utils/crm-csv.js +432 -0
- package/src/lib/app-utils/crm-csv.js.map +1 -0
- package/src/lib/app-utils/crm-digest.d.ts +179 -0
- package/src/lib/app-utils/crm-digest.js +271 -0
- package/src/lib/app-utils/crm-digest.js.map +1 -0
- package/src/lib/app-utils/crm-email-templates.d.ts +172 -0
- package/src/lib/app-utils/crm-email-templates.js +382 -0
- package/src/lib/app-utils/crm-email-templates.js.map +1 -0
- package/src/lib/app-utils/crm-inbound.d.ts +245 -0
- package/src/lib/app-utils/crm-inbound.js +407 -0
- package/src/lib/app-utils/crm-inbound.js.map +1 -0
- package/src/lib/app-utils/crm-kinds.d.ts +73 -0
- package/src/lib/app-utils/crm-kinds.js +92 -0
- package/src/lib/app-utils/crm-kinds.js.map +1 -0
- package/src/lib/app-utils/crm-next-activity.d.ts +107 -0
- package/src/lib/app-utils/crm-next-activity.js +140 -0
- package/src/lib/app-utils/crm-next-activity.js.map +1 -0
- package/src/lib/app-utils/crm-reports.d.ts +479 -0
- package/src/lib/app-utils/crm-reports.js +680 -0
- package/src/lib/app-utils/crm-reports.js.map +1 -0
- package/src/lib/app-utils/crm-task-reminders.d.ts +129 -0
- package/src/lib/app-utils/crm-task-reminders.js +139 -0
- package/src/lib/app-utils/crm-task-reminders.js.map +1 -0
- package/src/lib/app-utils/crm.d.ts +1546 -0
- package/src/lib/app-utils/crm.js +1814 -0
- package/src/lib/app-utils/crm.js.map +1 -0
- package/src/lib/app-utils/csp-report.d.ts +84 -0
- package/src/lib/app-utils/csp-report.js +177 -0
- package/src/lib/app-utils/csp-report.js.map +1 -0
- package/src/lib/app-utils/csv-import.d.ts +192 -0
- package/src/lib/app-utils/csv-import.js +279 -0
- package/src/lib/app-utils/csv-import.js.map +1 -0
- package/src/lib/app-utils/dataset-csv.d.ts +109 -0
- package/src/lib/app-utils/dataset-csv.js +235 -0
- package/src/lib/app-utils/dataset-csv.js.map +1 -0
- package/src/lib/app-utils/dataset-models.d.ts +194 -0
- package/src/lib/app-utils/dataset-models.js +409 -0
- package/src/lib/app-utils/dataset-models.js.map +1 -0
- package/src/lib/app-utils/dataset-query.d.ts +57 -0
- package/src/lib/app-utils/dataset-query.js +126 -0
- package/src/lib/app-utils/dataset-query.js.map +1 -0
- package/src/lib/app-utils/datasets.d.ts +136 -0
- package/src/lib/app-utils/datasets.js +177 -0
- package/src/lib/app-utils/datasets.js.map +1 -0
- package/src/lib/app-utils/decompress.d.ts +36 -0
- package/src/lib/app-utils/decompress.js +32 -0
- package/src/lib/app-utils/decompress.js.map +1 -0
- package/src/lib/app-utils/dedicated-sending-domain.d.ts +47 -0
- package/src/lib/app-utils/dedicated-sending-domain.js +114 -0
- package/src/lib/app-utils/dedicated-sending-domain.js.map +1 -0
- package/src/lib/app-utils/deferred-image.d.ts +86 -0
- package/src/lib/app-utils/deferred-image.js +83 -0
- package/src/lib/app-utils/deferred-image.js.map +1 -0
- package/src/lib/app-utils/definition-canvas-tree.d.ts +61 -0
- package/src/lib/app-utils/definition-canvas-tree.js +126 -0
- package/src/lib/app-utils/definition-canvas-tree.js.map +1 -0
- package/src/lib/app-utils/deployment-shape.d.ts +167 -0
- package/src/lib/app-utils/deployment-shape.js +238 -0
- package/src/lib/app-utils/deployment-shape.js.map +1 -0
- package/src/lib/app-utils/detect-template-placeholders.d.ts +30 -0
- package/src/lib/app-utils/detect-template-placeholders.js +53 -0
- package/src/lib/app-utils/detect-template-placeholders.js.map +1 -0
- package/src/lib/app-utils/dmca-counter-notice.d.ts +185 -0
- package/src/lib/app-utils/dmca-counter-notice.js +277 -0
- package/src/lib/app-utils/dmca-counter-notice.js.map +1 -0
- package/src/lib/app-utils/docs-deflection.d.ts +156 -0
- package/src/lib/app-utils/docs-deflection.js +547 -0
- package/src/lib/app-utils/docs-deflection.js.map +1 -0
- package/src/lib/app-utils/docs-help.d.ts +57 -0
- package/src/lib/app-utils/docs-help.generated.d.ts +303 -0
- package/src/lib/app-utils/docs-help.generated.js +867 -0
- package/src/lib/app-utils/docs-help.generated.js.map +1 -0
- package/src/lib/app-utils/docs-help.js +46 -0
- package/src/lib/app-utils/docs-help.js.map +1 -0
- package/src/lib/app-utils/docs-index.generated.d.ts +29 -0
- package/src/lib/app-utils/docs-index.generated.js +8388 -0
- package/src/lib/app-utils/docs-index.generated.js.map +1 -0
- package/src/lib/app-utils/docs-retrieval.d.ts +67 -0
- package/src/lib/app-utils/docs-retrieval.js +188 -0
- package/src/lib/app-utils/docs-retrieval.js.map +1 -0
- package/src/lib/app-utils/document-landmark.d.ts +50 -0
- package/src/lib/app-utils/document-landmark.js +100 -0
- package/src/lib/app-utils/document-landmark.js.map +1 -0
- package/src/lib/app-utils/duplicate-resource.d.ts +101 -0
- package/src/lib/app-utils/duplicate-resource.js +206 -0
- package/src/lib/app-utils/duplicate-resource.js.map +1 -0
- package/src/lib/app-utils/dynamic-list-rule.d.ts +471 -0
- package/src/lib/app-utils/dynamic-list-rule.js +914 -0
- package/src/lib/app-utils/dynamic-list-rule.js.map +1 -0
- package/src/lib/app-utils/element-animation.d.ts +200 -0
- package/src/lib/app-utils/element-animation.js +233 -0
- package/src/lib/app-utils/element-animation.js.map +1 -0
- package/src/lib/app-utils/element-hidden-style.d.ts +46 -0
- package/src/lib/app-utils/element-hidden-style.js +48 -0
- package/src/lib/app-utils/element-hidden-style.js.map +1 -0
- package/src/lib/app-utils/element-ui.d.ts +243 -0
- package/src/lib/app-utils/element-ui.js +459 -0
- package/src/lib/app-utils/element-ui.js.map +1 -0
- package/src/lib/app-utils/email-starter-policy.d.ts +160 -0
- package/src/lib/app-utils/email-starter-policy.js +327 -0
- package/src/lib/app-utils/email-starter-policy.js.map +1 -0
- package/src/lib/app-utils/email-topics.d.ts +310 -0
- package/src/lib/app-utils/email-topics.js +336 -0
- package/src/lib/app-utils/email-topics.js.map +1 -0
- package/src/lib/app-utils/enabled-plugins-context.d.ts +100 -0
- package/src/lib/app-utils/enabled-plugins-context.js +113 -0
- package/src/lib/app-utils/enabled-plugins-context.js.map +1 -0
- package/src/lib/app-utils/ensure-canvas-root.d.ts +38 -0
- package/src/lib/app-utils/ensure-canvas-root.js +61 -0
- package/src/lib/app-utils/ensure-canvas-root.js.map +1 -0
- package/src/lib/app-utils/entity-picker-context.d.ts +199 -0
- package/src/lib/app-utils/entity-picker-context.js +93 -0
- package/src/lib/app-utils/entity-picker-context.js.map +1 -0
- package/src/lib/app-utils/error-beacon.d.ts +107 -0
- package/src/lib/app-utils/error-beacon.js +296 -0
- package/src/lib/app-utils/error-beacon.js.map +1 -0
- package/src/lib/app-utils/expand-repeatables.d.ts +172 -0
- package/src/lib/app-utils/expand-repeatables.js +299 -0
- package/src/lib/app-utils/expand-repeatables.js.map +1 -0
- package/src/lib/app-utils/foreign-script.d.ts +82 -0
- package/src/lib/app-utils/foreign-script.js +102 -0
- package/src/lib/app-utils/foreign-script.js.map +1 -0
- package/src/lib/app-utils/form-abuse-ceiling.d.ts +146 -0
- package/src/lib/app-utils/form-abuse-ceiling.js +158 -0
- package/src/lib/app-utils/form-abuse-ceiling.js.map +1 -0
- package/src/lib/app-utils/form-contract.d.ts +198 -0
- package/src/lib/app-utils/form-contract.js +282 -0
- package/src/lib/app-utils/form-contract.js.map +1 -0
- package/src/lib/app-utils/form-dataset-binding.d.ts +50 -0
- package/src/lib/app-utils/form-dataset-binding.js +74 -0
- package/src/lib/app-utils/form-dataset-binding.js.map +1 -0
- package/src/lib/app-utils/forms.d.ts +727 -0
- package/src/lib/app-utils/forms.js +777 -0
- package/src/lib/app-utils/forms.js.map +1 -0
- package/src/lib/app-utils/functions.d.ts +188 -0
- package/src/lib/app-utils/functions.js +529 -0
- package/src/lib/app-utils/functions.js.map +1 -0
- package/src/lib/app-utils/guarded-version-save.d.ts +91 -0
- package/src/lib/app-utils/guarded-version-save.js +131 -0
- package/src/lib/app-utils/guarded-version-save.js.map +1 -0
- package/src/lib/app-utils/health-report.d.ts +1766 -0
- package/src/lib/app-utils/health-report.js +2072 -0
- package/src/lib/app-utils/health-report.js.map +1 -0
- package/src/lib/app-utils/host-naming.d.ts +135 -0
- package/src/lib/app-utils/host-naming.js +188 -0
- package/src/lib/app-utils/host-naming.js.map +1 -0
- package/src/lib/app-utils/host-permissions.d.ts +76 -0
- package/src/lib/app-utils/host-permissions.js +119 -0
- package/src/lib/app-utils/host-permissions.js.map +1 -0
- package/src/lib/app-utils/host-tokens.d.ts +228 -0
- package/src/lib/app-utils/host-tokens.js +304 -0
- package/src/lib/app-utils/host-tokens.js.map +1 -0
- package/src/lib/app-utils/idp-profile.d.ts +83 -0
- package/src/lib/app-utils/idp-profile.js +268 -0
- package/src/lib/app-utils/idp-profile.js.map +1 -0
- package/src/lib/app-utils/image-upload-types.d.ts +49 -0
- package/src/lib/app-utils/image-upload-types.js +86 -0
- package/src/lib/app-utils/image-upload-types.js.map +1 -0
- package/src/lib/app-utils/index.d.ts +18 -0
- package/src/lib/app-utils/index.js +23 -0
- package/src/lib/app-utils/index.js.map +1 -0
- package/src/lib/app-utils/internal-traffic.d.ts +197 -0
- package/src/lib/app-utils/internal-traffic.js +288 -0
- package/src/lib/app-utils/internal-traffic.js.map +1 -0
- package/src/lib/app-utils/lineal-order.d.ts +62 -0
- package/src/lib/app-utils/lineal-order.js +65 -0
- package/src/lib/app-utils/lineal-order.js.map +1 -0
- package/src/lib/app-utils/link-references.d.ts +36 -0
- package/src/lib/app-utils/link-references.js +89 -0
- package/src/lib/app-utils/link-references.js.map +1 -0
- package/src/lib/app-utils/link-target-search-context.d.ts +123 -0
- package/src/lib/app-utils/link-target-search-context.js +221 -0
- package/src/lib/app-utils/link-target-search-context.js.map +1 -0
- package/src/lib/app-utils/list-assignment-policy.d.ts +169 -0
- package/src/lib/app-utils/list-assignment-policy.js +170 -0
- package/src/lib/app-utils/list-assignment-policy.js.map +1 -0
- package/src/lib/app-utils/list-import.d.ts +158 -0
- package/src/lib/app-utils/list-import.js +332 -0
- package/src/lib/app-utils/list-import.js.map +1 -0
- package/src/lib/app-utils/llms-txt.d.ts +104 -0
- package/src/lib/app-utils/llms-txt.js +144 -0
- package/src/lib/app-utils/llms-txt.js.map +1 -0
- package/src/lib/app-utils/local-storage-budget.d.ts +75 -0
- package/src/lib/app-utils/local-storage-budget.js +153 -0
- package/src/lib/app-utils/local-storage-budget.js.map +1 -0
- package/src/lib/app-utils/lockdown.d.ts +698 -0
- package/src/lib/app-utils/lockdown.js +929 -0
- package/src/lib/app-utils/lockdown.js.map +1 -0
- package/src/lib/app-utils/margin-utilization.d.ts +267 -0
- package/src/lib/app-utils/margin-utilization.js +351 -0
- package/src/lib/app-utils/margin-utilization.js.map +1 -0
- package/src/lib/app-utils/markdown-lite.d.ts +297 -0
- package/src/lib/app-utils/markdown-lite.js +705 -0
- package/src/lib/app-utils/markdown-lite.js.map +1 -0
- package/src/lib/app-utils/marketing-consent.d.ts +704 -0
- package/src/lib/app-utils/marketing-consent.js +783 -0
- package/src/lib/app-utils/marketing-consent.js.map +1 -0
- package/src/lib/app-utils/marketplace-listing-visibility.d.ts +120 -0
- package/src/lib/app-utils/marketplace-listing-visibility.js +139 -0
- package/src/lib/app-utils/marketplace-listing-visibility.js.map +1 -0
- package/src/lib/app-utils/marketplace-overrides.d.ts +271 -0
- package/src/lib/app-utils/marketplace-overrides.js +462 -0
- package/src/lib/app-utils/marketplace-overrides.js.map +1 -0
- package/src/lib/app-utils/marketplace-provenance.d.ts +150 -0
- package/src/lib/app-utils/marketplace-provenance.js +136 -0
- package/src/lib/app-utils/marketplace-provenance.js.map +1 -0
- package/src/lib/app-utils/marketplace-theme.d.ts +237 -0
- package/src/lib/app-utils/marketplace-theme.js +525 -0
- package/src/lib/app-utils/marketplace-theme.js.map +1 -0
- package/src/lib/app-utils/marketplace-update-state.d.ts +119 -0
- package/src/lib/app-utils/marketplace-update-state.js +132 -0
- package/src/lib/app-utils/marketplace-update-state.js.map +1 -0
- package/src/lib/app-utils/marketplace-verification.d.ts +95 -0
- package/src/lib/app-utils/marketplace-verification.js +81 -0
- package/src/lib/app-utils/marketplace-verification.js.map +1 -0
- package/src/lib/app-utils/measure-node-map.d.ts +76 -0
- package/src/lib/app-utils/measure-node-map.js +111 -0
- package/src/lib/app-utils/measure-node-map.js.map +1 -0
- package/src/lib/app-utils/media-alt.d.ts +55 -0
- package/src/lib/app-utils/media-alt.js +58 -0
- package/src/lib/app-utils/media-alt.js.map +1 -0
- package/src/lib/app-utils/media-asset-facts.d.ts +125 -0
- package/src/lib/app-utils/media-asset-facts.js +467 -0
- package/src/lib/app-utils/media-asset-facts.js.map +1 -0
- package/src/lib/app-utils/media-cdn-scope.d.ts +65 -0
- package/src/lib/app-utils/media-cdn-scope.js +75 -0
- package/src/lib/app-utils/media-cdn-scope.js.map +1 -0
- package/src/lib/app-utils/media-folders.d.ts +161 -0
- package/src/lib/app-utils/media-folders.js +230 -0
- package/src/lib/app-utils/media-folders.js.map +1 -0
- package/src/lib/app-utils/media-metadata.d.ts +277 -0
- package/src/lib/app-utils/media-metadata.js +388 -0
- package/src/lib/app-utils/media-metadata.js.map +1 -0
- package/src/lib/app-utils/media-picker-context.d.ts +93 -0
- package/src/lib/app-utils/media-picker-context.js +26 -0
- package/src/lib/app-utils/media-picker-context.js.map +1 -0
- package/src/lib/app-utils/media-quarantine.d.ts +247 -0
- package/src/lib/app-utils/media-quarantine.js +323 -0
- package/src/lib/app-utils/media-quarantine.js.map +1 -0
- package/src/lib/app-utils/media-ref.d.ts +661 -0
- package/src/lib/app-utils/media-ref.js +1055 -0
- package/src/lib/app-utils/media-ref.js.map +1 -0
- package/src/lib/app-utils/media-takedown-reach.d.ts +126 -0
- package/src/lib/app-utils/media-takedown-reach.js +143 -0
- package/src/lib/app-utils/media-takedown-reach.js.map +1 -0
- package/src/lib/app-utils/member-email-aliases.d.ts +180 -0
- package/src/lib/app-utils/member-email-aliases.js +217 -0
- package/src/lib/app-utils/member-email-aliases.js.map +1 -0
- package/src/lib/app-utils/merge-node-sx.d.ts +47 -0
- package/src/lib/app-utils/merge-node-sx.js +123 -0
- package/src/lib/app-utils/merge-node-sx.js.map +1 -0
- package/src/lib/app-utils/name-match.d.ts +155 -0
- package/src/lib/app-utils/name-match.js +175 -0
- package/src/lib/app-utils/name-match.js.map +1 -0
- package/src/lib/app-utils/name-search.d.ts +117 -0
- package/src/lib/app-utils/name-search.js +145 -0
- package/src/lib/app-utils/name-search.js.map +1 -0
- package/src/lib/app-utils/node-capabilities.d.ts +85 -0
- package/src/lib/app-utils/node-capabilities.js +88 -0
- package/src/lib/app-utils/node-capabilities.js.map +1 -0
- package/src/lib/app-utils/node-definition-sanitizer.d.ts +164 -0
- package/src/lib/app-utils/node-definition-sanitizer.js +402 -0
- package/src/lib/app-utils/node-definition-sanitizer.js.map +1 -0
- package/src/lib/app-utils/node-identity.d.ts +47 -0
- package/src/lib/app-utils/node-identity.js +50 -0
- package/src/lib/app-utils/node-identity.js.map +1 -0
- package/src/lib/app-utils/node-interactions.d.ts +102 -0
- package/src/lib/app-utils/node-interactions.js +192 -0
- package/src/lib/app-utils/node-interactions.js.map +1 -0
- package/src/lib/app-utils/node-url-policy.d.ts +54 -0
- package/src/lib/app-utils/node-url-policy.js +72 -0
- package/src/lib/app-utils/node-url-policy.js.map +1 -0
- package/src/lib/app-utils/notifications.d.ts +71 -0
- package/src/lib/app-utils/notifications.js +101 -0
- package/src/lib/app-utils/notifications.js.map +1 -0
- package/src/lib/app-utils/onboarding-deep-link.d.ts +120 -0
- package/src/lib/app-utils/onboarding-deep-link.js +142 -0
- package/src/lib/app-utils/onboarding-deep-link.js.map +1 -0
- package/src/lib/app-utils/operator-identity.d.ts +207 -0
- package/src/lib/app-utils/operator-identity.js +186 -0
- package/src/lib/app-utils/operator-identity.js.map +1 -0
- package/src/lib/app-utils/org-billing-doc.d.ts +231 -0
- package/src/lib/app-utils/org-billing-doc.js +238 -0
- package/src/lib/app-utils/org-billing-doc.js.map +1 -0
- package/src/lib/app-utils/org-override-reason.d.ts +100 -0
- package/src/lib/app-utils/org-override-reason.js +116 -0
- package/src/lib/app-utils/org-override-reason.js.map +1 -0
- package/src/lib/app-utils/org-permissions.d.ts +194 -0
- package/src/lib/app-utils/org-permissions.js +357 -0
- package/src/lib/app-utils/org-permissions.js.map +1 -0
- package/src/lib/app-utils/org-roles.d.ts +72 -0
- package/src/lib/app-utils/org-roles.js +131 -0
- package/src/lib/app-utils/org-roles.js.map +1 -0
- package/src/lib/app-utils/organizations.d.ts +407 -0
- package/src/lib/app-utils/organizations.js +511 -0
- package/src/lib/app-utils/organizations.js.map +1 -0
- package/src/lib/app-utils/page-header-actions-context.d.ts +83 -0
- package/src/lib/app-utils/page-header-actions-context.js +58 -0
- package/src/lib/app-utils/page-header-actions-context.js.map +1 -0
- package/src/lib/app-utils/page-header-record-context.d.ts +80 -0
- package/src/lib/app-utils/page-header-record-context.js +64 -0
- package/src/lib/app-utils/page-header-record-context.js.map +1 -0
- package/src/lib/app-utils/page-markdown.d.ts +103 -0
- package/src/lib/app-utils/page-markdown.js +385 -0
- package/src/lib/app-utils/page-markdown.js.map +1 -0
- package/src/lib/app-utils/paid-media-source.d.ts +90 -0
- package/src/lib/app-utils/paid-media-source.js +184 -0
- package/src/lib/app-utils/paid-media-source.js.map +1 -0
- package/src/lib/app-utils/palette-sx.d.ts +34 -0
- package/src/lib/app-utils/palette-sx.js +150 -0
- package/src/lib/app-utils/palette-sx.js.map +1 -0
- package/src/lib/app-utils/password-policy.d.ts +47 -0
- package/src/lib/app-utils/password-policy.js +46 -0
- package/src/lib/app-utils/password-policy.js.map +1 -0
- package/src/lib/app-utils/payments-configured.d.ts +84 -0
- package/src/lib/app-utils/payments-configured.js +88 -0
- package/src/lib/app-utils/payments-configured.js.map +1 -0
- package/src/lib/app-utils/person-erasure.d.ts +126 -0
- package/src/lib/app-utils/person-erasure.js +121 -0
- package/src/lib/app-utils/person-erasure.js.map +1 -0
- package/src/lib/app-utils/person-key.d.ts +32 -0
- package/src/lib/app-utils/person-key.js +62 -0
- package/src/lib/app-utils/person-key.js.map +1 -0
- package/src/lib/app-utils/plan-entitlements.d.ts +2756 -0
- package/src/lib/app-utils/plan-entitlements.js +4085 -0
- package/src/lib/app-utils/plan-entitlements.js.map +1 -0
- package/src/lib/app-utils/platform-ad-conversions.d.ts +122 -0
- package/src/lib/app-utils/platform-ad-conversions.js +174 -0
- package/src/lib/app-utils/platform-ad-conversions.js.map +1 -0
- package/src/lib/app-utils/platform-advertising-tags.d.ts +139 -0
- package/src/lib/app-utils/platform-advertising-tags.js +203 -0
- package/src/lib/app-utils/platform-advertising-tags.js.map +1 -0
- package/src/lib/app-utils/platform-brand.d.ts +151 -0
- package/src/lib/app-utils/platform-brand.js +175 -0
- package/src/lib/app-utils/platform-brand.js.map +1 -0
- package/src/lib/app-utils/platform-consent-default.d.ts +142 -0
- package/src/lib/app-utils/platform-consent-default.js +295 -0
- package/src/lib/app-utils/platform-consent-default.js.map +1 -0
- package/src/lib/app-utils/platform-marketing-consent.d.ts +151 -0
- package/src/lib/app-utils/platform-marketing-consent.js +182 -0
- package/src/lib/app-utils/platform-marketing-consent.js.map +1 -0
- package/src/lib/app-utils/platform-marketing-host.d.ts +33 -0
- package/src/lib/app-utils/platform-marketing-host.js +97 -0
- package/src/lib/app-utils/platform-marketing-host.js.map +1 -0
- package/src/lib/app-utils/platform-visitor-consent.d.ts +252 -0
- package/src/lib/app-utils/platform-visitor-consent.js +533 -0
- package/src/lib/app-utils/platform-visitor-consent.js.map +1 -0
- package/src/lib/app-utils/plugin-api-cross-origin.d.ts +61 -0
- package/src/lib/app-utils/plugin-api-cross-origin.js +202 -0
- package/src/lib/app-utils/plugin-api-cross-origin.js.map +1 -0
- package/src/lib/app-utils/plugin-api-rate-limit.d.ts +192 -0
- package/src/lib/app-utils/plugin-api-rate-limit.js +270 -0
- package/src/lib/app-utils/plugin-api-rate-limit.js.map +1 -0
- package/src/lib/app-utils/plugin-artifact-path.d.ts +32 -0
- package/src/lib/app-utils/plugin-artifact-path.js +33 -0
- package/src/lib/app-utils/plugin-artifact-path.js.map +1 -0
- package/src/lib/app-utils/plugin-bundle-checks.d.ts +148 -0
- package/src/lib/app-utils/plugin-bundle-checks.js +989 -0
- package/src/lib/app-utils/plugin-bundle-checks.js.map +1 -0
- package/src/lib/app-utils/plugin-manifest.d.ts +516 -0
- package/src/lib/app-utils/plugin-manifest.js +687 -0
- package/src/lib/app-utils/plugin-manifest.js.map +1 -0
- package/src/lib/app-utils/published-legal-pages.d.ts +71 -0
- package/src/lib/app-utils/published-legal-pages.js +90 -0
- package/src/lib/app-utils/published-legal-pages.js.map +1 -0
- package/src/lib/app-utils/publisher-agreement.d.ts +254 -0
- package/src/lib/app-utils/publisher-agreement.js +274 -0
- package/src/lib/app-utils/publisher-agreement.js.map +1 -0
- package/src/lib/app-utils/publisher-attestation.d.ts +99 -0
- package/src/lib/app-utils/publisher-attestation.js +158 -0
- package/src/lib/app-utils/publisher-attestation.js.map +1 -0
- package/src/lib/app-utils/recipient-email-render.d.ts +216 -0
- package/src/lib/app-utils/recipient-email-render.js +221 -0
- package/src/lib/app-utils/recipient-email-render.js.map +1 -0
- package/src/lib/app-utils/redispatch-caught-error.d.ts +38 -0
- package/src/lib/app-utils/redispatch-caught-error.js +46 -0
- package/src/lib/app-utils/redispatch-caught-error.js.map +1 -0
- package/src/lib/app-utils/registering-plugin.d.ts +19 -0
- package/src/lib/app-utils/registering-plugin.js +38 -0
- package/src/lib/app-utils/registering-plugin.js.map +1 -0
- package/src/lib/app-utils/release-flags.d.ts +283 -0
- package/src/lib/app-utils/release-flags.js +518 -0
- package/src/lib/app-utils/release-flags.js.map +1 -0
- package/src/lib/app-utils/repair-canvas-nodes.d.ts +130 -0
- package/src/lib/app-utils/repair-canvas-nodes.js +298 -0
- package/src/lib/app-utils/repair-canvas-nodes.js.map +1 -0
- package/src/lib/app-utils/repeat-infringer.d.ts +166 -0
- package/src/lib/app-utils/repeat-infringer.js +188 -0
- package/src/lib/app-utils/repeat-infringer.js.map +1 -0
- package/src/lib/app-utils/repeat-sources.d.ts +115 -0
- package/src/lib/app-utils/repeat-sources.js +86 -0
- package/src/lib/app-utils/repeat-sources.js.map +1 -0
- package/src/lib/app-utils/request-geo.d.ts +114 -0
- package/src/lib/app-utils/request-geo.js +247 -0
- package/src/lib/app-utils/request-geo.js.map +1 -0
- package/src/lib/app-utils/request-ip.d.ts +213 -0
- package/src/lib/app-utils/request-ip.js +344 -0
- package/src/lib/app-utils/request-ip.js.map +1 -0
- package/src/lib/app-utils/resolve-named-tokens.d.ts +26 -0
- package/src/lib/app-utils/resolve-named-tokens.js +59 -0
- package/src/lib/app-utils/resolve-named-tokens.js.map +1 -0
- package/src/lib/app-utils/responsive-typography-sx.d.ts +77 -0
- package/src/lib/app-utils/responsive-typography-sx.js +122 -0
- package/src/lib/app-utils/responsive-typography-sx.js.map +1 -0
- package/src/lib/app-utils/reusable-component-keys.d.ts +135 -0
- package/src/lib/app-utils/reusable-component-keys.js +140 -0
- package/src/lib/app-utils/reusable-component-keys.js.map +1 -0
- package/src/lib/app-utils/reusable-prop-values.d.ts +199 -0
- package/src/lib/app-utils/reusable-prop-values.js +494 -0
- package/src/lib/app-utils/reusable-prop-values.js.map +1 -0
- package/src/lib/app-utils/safe-json-ld.d.ts +29 -0
- package/src/lib/app-utils/safe-json-ld.js +37 -0
- package/src/lib/app-utils/safe-json-ld.js.map +1 -0
- package/src/lib/app-utils/sanitize-svg.d.ts +55 -0
- package/src/lib/app-utils/sanitize-svg.js +460 -0
- package/src/lib/app-utils/sanitize-svg.js.map +1 -0
- package/src/lib/app-utils/scheme-sx.d.ts +84 -0
- package/src/lib/app-utils/scheme-sx.js +148 -0
- package/src/lib/app-utils/scheme-sx.js.map +1 -0
- package/src/lib/app-utils/scope-tokens.d.ts +249 -0
- package/src/lib/app-utils/scope-tokens.js +331 -0
- package/src/lib/app-utils/scope-tokens.js.map +1 -0
- package/src/lib/app-utils/screen-link-context-value.d.ts +57 -0
- package/src/lib/app-utils/screen-link-context-value.js +43 -0
- package/src/lib/app-utils/screen-link-context-value.js.map +1 -0
- package/src/lib/app-utils/screen-link-context.d.ts +185 -0
- package/src/lib/app-utils/screen-link-context.js +304 -0
- package/src/lib/app-utils/screen-link-context.js.map +1 -0
- package/src/lib/app-utils/screen-link-value.d.ts +269 -0
- package/src/lib/app-utils/screen-link-value.js +384 -0
- package/src/lib/app-utils/screen-link-value.js.map +1 -0
- package/src/lib/app-utils/screen-route.d.ts +669 -0
- package/src/lib/app-utils/screen-route.js +751 -0
- package/src/lib/app-utils/screen-route.js.map +1 -0
- package/src/lib/app-utils/screen-seo-fields.d.ts +37 -0
- package/src/lib/app-utils/screen-seo-fields.js +42 -0
- package/src/lib/app-utils/screen-seo-fields.js.map +1 -0
- package/src/lib/app-utils/search-indexing.d.ts +162 -0
- package/src/lib/app-utils/search-indexing.js +207 -0
- package/src/lib/app-utils/search-indexing.js.map +1 -0
- package/src/lib/app-utils/seo-listing-fields.d.ts +70 -0
- package/src/lib/app-utils/seo-listing-fields.js +75 -0
- package/src/lib/app-utils/seo-listing-fields.js.map +1 -0
- package/src/lib/app-utils/seo-locale.d.ts +119 -0
- package/src/lib/app-utils/seo-locale.js +133 -0
- package/src/lib/app-utils/seo-locale.js.map +1 -0
- package/src/lib/app-utils/seo-title-variables.d.ts +149 -0
- package/src/lib/app-utils/seo-title-variables.js +190 -0
- package/src/lib/app-utils/seo-title-variables.js.map +1 -0
- package/src/lib/app-utils/seo-title.d.ts +70 -0
- package/src/lib/app-utils/seo-title.js +117 -0
- package/src/lib/app-utils/seo-title.js.map +1 -0
- package/src/lib/app-utils/server.d.ts +174 -0
- package/src/lib/app-utils/server.js +314 -0
- package/src/lib/app-utils/server.js.map +1 -0
- package/src/lib/app-utils/site-context.d.ts +106 -0
- package/src/lib/app-utils/site-context.js +100 -0
- package/src/lib/app-utils/site-context.js.map +1 -0
- package/src/lib/app-utils/sitemap.d.ts +117 -0
- package/src/lib/app-utils/sitemap.js +183 -0
- package/src/lib/app-utils/sitemap.js.map +1 -0
- package/src/lib/app-utils/social-image.d.ts +112 -0
- package/src/lib/app-utils/social-image.js +191 -0
- package/src/lib/app-utils/social-image.js.map +1 -0
- package/src/lib/app-utils/starter-templates.d.ts +99 -0
- package/src/lib/app-utils/starter-templates.js +579 -0
- package/src/lib/app-utils/starter-templates.js.map +1 -0
- package/src/lib/app-utils/stored-nodes.d.ts +120 -0
- package/src/lib/app-utils/stored-nodes.js +174 -0
- package/src/lib/app-utils/stored-nodes.js.map +1 -0
- package/src/lib/app-utils/strip-undefined.d.ts +59 -0
- package/src/lib/app-utils/strip-undefined.js +95 -0
- package/src/lib/app-utils/strip-undefined.js.map +1 -0
- package/src/lib/app-utils/stripe-deployment-mode.d.ts +47 -0
- package/src/lib/app-utils/stripe-deployment-mode.js +70 -0
- package/src/lib/app-utils/stripe-deployment-mode.js.map +1 -0
- package/src/lib/app-utils/support-tiers.d.ts +108 -0
- package/src/lib/app-utils/support-tiers.js +201 -0
- package/src/lib/app-utils/support-tiers.js.map +1 -0
- package/src/lib/app-utils/timezone-geo-hint.d.ts +36 -0
- package/src/lib/app-utils/timezone-geo-hint.js +180 -0
- package/src/lib/app-utils/timezone-geo-hint.js.map +1 -0
- package/src/lib/app-utils/upload-cors.d.ts +155 -0
- package/src/lib/app-utils/upload-cors.js +254 -0
- package/src/lib/app-utils/upload-cors.js.map +1 -0
- package/src/lib/app-utils/upload-inspection.d.ts +159 -0
- package/src/lib/app-utils/upload-inspection.js +539 -0
- package/src/lib/app-utils/upload-inspection.js.map +1 -0
- package/src/lib/app-utils/url-slug.d.ts +40 -0
- package/src/lib/app-utils/url-slug.js +42 -0
- package/src/lib/app-utils/url-slug.js.map +1 -0
- package/src/lib/app-utils/usage-budget.d.ts +429 -0
- package/src/lib/app-utils/usage-budget.js +421 -0
- package/src/lib/app-utils/usage-budget.js.map +1 -0
- package/src/lib/app-utils/variables.d.ts +96 -0
- package/src/lib/app-utils/variables.js +233 -0
- package/src/lib/app-utils/variables.js.map +1 -0
- package/src/lib/app-utils/video-asset-facts.d.ts +61 -0
- package/src/lib/app-utils/video-asset-facts.js +70 -0
- package/src/lib/app-utils/video-asset-facts.js.map +1 -0
- package/src/lib/app-utils/video-object.d.ts +89 -0
- package/src/lib/app-utils/video-object.js +245 -0
- package/src/lib/app-utils/video-object.js.map +1 -0
- package/src/lib/app-utils/visitor-consent.d.ts +757 -0
- package/src/lib/app-utils/visitor-consent.js +981 -0
- package/src/lib/app-utils/visitor-consent.js.map +1 -0
- package/src/lib/app-utils/visitor-record-ceiling.d.ts +223 -0
- package/src/lib/app-utils/visitor-record-ceiling.js +215 -0
- package/src/lib/app-utils/visitor-record-ceiling.js.map +1 -0
- package/src/lib/app-utils/web-vitals-rum.d.ts +53 -0
- package/src/lib/app-utils/web-vitals-rum.js +278 -0
- package/src/lib/app-utils/web-vitals-rum.js.map +1 -0
- package/src/lib/app-utils/webhook-delivery.d.ts +324 -0
- package/src/lib/app-utils/webhook-delivery.js +413 -0
- package/src/lib/app-utils/webhook-delivery.js.map +1 -0
- package/src/lib/app-utils/where-used.d.ts +57 -0
- package/src/lib/app-utils/where-used.js +59 -0
- package/src/lib/app-utils/where-used.js.map +1 -0
- package/src/lib/app-utils/wistia-embed.d.ts +86 -0
- package/src/lib/app-utils/wistia-embed.js +119 -0
- package/src/lib/app-utils/wistia-embed.js.map +1 -0
- package/src/lib/app-utils/workflows.d.ts +136 -0
- package/src/lib/app-utils/workflows.js +346 -0
- package/src/lib/app-utils/workflows.js.map +1 -0
- package/src/lib/canvas-manager/canvas-manager-tree.d.ts +109 -0
- package/src/lib/canvas-manager/canvas-manager-tree.js +139 -0
- package/src/lib/canvas-manager/canvas-manager-tree.js.map +1 -0
- package/src/lib/canvas-manager/canvas-manager.d.ts +549 -0
- package/src/lib/canvas-manager/canvas-manager.js +1311 -0
- package/src/lib/canvas-manager/canvas-manager.js.map +1 -0
- package/src/lib/canvas-manager/index.d.ts +20 -0
- package/src/lib/canvas-manager/index.js +21 -0
- package/src/lib/canvas-manager/index.js.map +1 -0
- package/src/lib/canvas-manager/stores/index.d.ts +17 -0
- package/src/lib/canvas-manager/stores/index.js +18 -0
- package/src/lib/canvas-manager/stores/index.js.map +1 -0
- package/src/lib/canvas-manager/stores/node.store.d.ts +30 -0
- package/src/lib/canvas-manager/stores/node.store.js +45 -0
- package/src/lib/canvas-manager/stores/node.store.js.map +1 -0
- package/src/lib/components-manager/components-manager.d.ts +56 -0
- package/src/lib/components-manager/components-manager.js +191 -0
- package/src/lib/components-manager/components-manager.js.map +1 -0
- package/src/lib/components-manager/index.d.ts +18 -0
- package/src/lib/components-manager/index.js +19 -0
- package/src/lib/components-manager/index.js.map +1 -0
- package/src/lib/emit-manager/emit-manager.d.ts +56 -0
- package/src/lib/emit-manager/emit-manager.js +60 -0
- package/src/lib/emit-manager/emit-manager.js.map +1 -0
- package/src/lib/emit-manager/index.d.ts +18 -0
- package/src/lib/emit-manager/index.js +19 -0
- package/src/lib/emit-manager/index.js.map +1 -0
- package/src/lib/foundation/constants/_internal.d.ts +18 -0
- package/src/lib/foundation/constants/_internal.js +62 -0
- package/src/lib/foundation/constants/_internal.js.map +1 -0
- package/src/lib/foundation/constants/app.d.ts +23 -0
- package/src/lib/foundation/constants/app.js +25 -0
- package/src/lib/foundation/constants/app.js.map +1 -0
- package/src/lib/foundation/constants/canvas.d.ts +18 -0
- package/src/lib/foundation/constants/canvas.js +18 -0
- package/src/lib/foundation/constants/canvas.js.map +1 -0
- package/src/lib/foundation/constants/components.d.ts +54 -0
- package/src/lib/foundation/constants/components.js +61 -0
- package/src/lib/foundation/constants/components.js.map +1 -0
- package/src/lib/foundation/constants/shared.d.ts +50 -0
- package/src/lib/foundation/constants/shared.js +49 -0
- package/src/lib/foundation/constants/shared.js.map +1 -0
- package/src/lib/foundation/constants/symbol.d.ts +63 -0
- package/src/lib/foundation/constants/symbol.js +75 -0
- package/src/lib/foundation/constants/symbol.js.map +1 -0
- package/src/lib/foundation/definitions/components.types.d.ts +372 -0
- package/src/lib/foundation/definitions/components.types.js +180 -0
- package/src/lib/foundation/definitions/components.types.js.map +1 -0
- package/src/lib/foundation/definitions/contact.types.d.ts +73 -0
- package/src/lib/foundation/definitions/contact.types.js +107 -0
- package/src/lib/foundation/definitions/contact.types.js.map +1 -0
- package/src/lib/foundation/definitions/host-content-collections.d.ts +137 -0
- package/src/lib/foundation/definitions/host-content-collections.js +219 -0
- package/src/lib/foundation/definitions/host-content-collections.js.map +1 -0
- package/src/lib/foundation/definitions/org-billing.types.d.ts +1361 -0
- package/src/lib/foundation/definitions/org-billing.types.js +77 -0
- package/src/lib/foundation/definitions/org-billing.types.js.map +1 -0
- package/src/lib/foundation/definitions/organization.types.d.ts +307 -0
- package/src/lib/foundation/definitions/organization.types.js +42 -0
- package/src/lib/foundation/definitions/organization.types.js.map +1 -0
- package/src/lib/foundation/definitions/platform.types.d.ts +1326 -0
- package/src/lib/foundation/definitions/platform.types.js +124 -0
- package/src/lib/foundation/definitions/platform.types.js.map +1 -0
- package/src/lib/foundation/definitions/property-kinds.d.ts +189 -0
- package/src/lib/foundation/definitions/property-kinds.js +565 -0
- package/src/lib/foundation/definitions/property-kinds.js.map +1 -0
- package/src/lib/foundation/definitions/shared.d.ts +23 -0
- package/src/lib/foundation/definitions/shared.js +18 -0
- package/src/lib/foundation/definitions/shared.js.map +1 -0
- package/src/lib/foundation/definitions/write-deny-coverage.util.d.ts +249 -0
- package/src/lib/foundation/definitions/write-deny-coverage.util.js +499 -0
- package/src/lib/foundation/definitions/write-deny-coverage.util.js.map +1 -0
- package/src/lib/foundation/index.d.ts +32 -0
- package/src/lib/foundation/index.js +67 -0
- package/src/lib/foundation/index.js.map +1 -0
- package/src/lib/lifecycle.d.ts +24 -0
- package/src/lib/lifecycle.js +39 -0
- package/src/lib/lifecycle.js.map +1 -0
- package/src/lib/mst/common.d.ts +17 -0
- package/src/lib/mst/common.js +23 -0
- package/src/lib/mst/common.js.map +1 -0
- package/src/lib/mst/index.d.ts +19 -0
- package/src/lib/mst/index.js +20 -0
- package/src/lib/mst/index.js.map +1 -0
- package/src/lib/mst/json.d.ts +22 -0
- package/src/lib/mst/json.js +23 -0
- package/src/lib/mst/json.js.map +1 -0
- package/src/lib/mst/types.d.ts +20 -0
- package/src/lib/mst/types.js +18 -0
- package/src/lib/mst/types.js.map +1 -0
- package/src/lib/plugin-manager/billing-webhook-hooks.d.ts +77 -0
- package/src/lib/plugin-manager/billing-webhook-hooks.js +55 -0
- package/src/lib/plugin-manager/billing-webhook-hooks.js.map +1 -0
- package/src/lib/plugin-manager/commerce-zone-props.d.ts +172 -0
- package/src/lib/plugin-manager/commerce-zone-props.js +31 -0
- package/src/lib/plugin-manager/commerce-zone-props.js.map +1 -0
- package/src/lib/plugin-manager/custom-fields.d.ts +60 -0
- package/src/lib/plugin-manager/custom-fields.js +39 -0
- package/src/lib/plugin-manager/custom-fields.js.map +1 -0
- package/src/lib/plugin-manager/editor-sessions.d.ts +109 -0
- package/src/lib/plugin-manager/editor-sessions.js +137 -0
- package/src/lib/plugin-manager/editor-sessions.js.map +1 -0
- package/src/lib/plugin-manager/enabled-plugins.d.ts +438 -0
- package/src/lib/plugin-manager/enabled-plugins.js +403 -0
- package/src/lib/plugin-manager/enabled-plugins.js.map +1 -0
- package/src/lib/plugin-manager/feature-plugins.d.ts +1314 -0
- package/src/lib/plugin-manager/feature-plugins.js +609 -0
- package/src/lib/plugin-manager/feature-plugins.js.map +1 -0
- package/src/lib/plugin-manager/first-party-plugins.generated.d.ts +11 -0
- package/src/lib/plugin-manager/first-party-plugins.generated.js +149 -0
- package/src/lib/plugin-manager/first-party-plugins.generated.js.map +1 -0
- package/src/lib/plugin-manager/index.d.ts +42 -0
- package/src/lib/plugin-manager/index.js +46 -0
- package/src/lib/plugin-manager/index.js.map +1 -0
- package/src/lib/plugin-manager/install-presets.d.ts +93 -0
- package/src/lib/plugin-manager/install-presets.js +86 -0
- package/src/lib/plugin-manager/install-presets.js.map +1 -0
- package/src/lib/plugin-manager/media-delivery-provider.d.ts +124 -0
- package/src/lib/plugin-manager/media-delivery-provider.js +53 -0
- package/src/lib/plugin-manager/media-delivery-provider.js.map +1 -0
- package/src/lib/plugin-manager/order-fulfilment.d.ts +142 -0
- package/src/lib/plugin-manager/order-fulfilment.js +104 -0
- package/src/lib/plugin-manager/order-fulfilment.js.map +1 -0
- package/src/lib/plugin-manager/plugin-activity-actions.d.ts +122 -0
- package/src/lib/plugin-manager/plugin-activity-actions.js +140 -0
- package/src/lib/plugin-manager/plugin-activity-actions.js.map +1 -0
- package/src/lib/plugin-manager/plugin-bridge.d.ts +98 -0
- package/src/lib/plugin-manager/plugin-bridge.js +154 -0
- package/src/lib/plugin-manager/plugin-bridge.js.map +1 -0
- package/src/lib/plugin-manager/plugin-config.d.ts +148 -0
- package/src/lib/plugin-manager/plugin-config.js +228 -0
- package/src/lib/plugin-manager/plugin-config.js.map +1 -0
- package/src/lib/plugin-manager/plugin-console-crons.d.ts +139 -0
- package/src/lib/plugin-manager/plugin-console-crons.js +177 -0
- package/src/lib/plugin-manager/plugin-console-crons.js.map +1 -0
- package/src/lib/plugin-manager/plugin-contact-capture.d.ts +220 -0
- package/src/lib/plugin-manager/plugin-contact-capture.js +89 -0
- package/src/lib/plugin-manager/plugin-contact-capture.js.map +1 -0
- package/src/lib/plugin-manager/plugin-contributions.d.ts +244 -0
- package/src/lib/plugin-manager/plugin-contributions.js +283 -0
- package/src/lib/plugin-manager/plugin-contributions.js.map +1 -0
- package/src/lib/plugin-manager/plugin-entitlement-keys.d.ts +169 -0
- package/src/lib/plugin-manager/plugin-entitlement-keys.js +84 -0
- package/src/lib/plugin-manager/plugin-entitlement-keys.js.map +1 -0
- package/src/lib/plugin-manager/plugin-entitlements.d.ts +181 -0
- package/src/lib/plugin-manager/plugin-entitlements.js +188 -0
- package/src/lib/plugin-manager/plugin-entitlements.js.map +1 -0
- package/src/lib/plugin-manager/plugin-events.d.ts +145 -0
- package/src/lib/plugin-manager/plugin-events.js +79 -0
- package/src/lib/plugin-manager/plugin-events.js.map +1 -0
- package/src/lib/plugin-manager/plugin-figures.d.ts +251 -0
- package/src/lib/plugin-manager/plugin-figures.js +252 -0
- package/src/lib/plugin-manager/plugin-figures.js.map +1 -0
- package/src/lib/plugin-manager/plugin-host-collections.d.ts +146 -0
- package/src/lib/plugin-manager/plugin-host-collections.js +116 -0
- package/src/lib/plugin-manager/plugin-host-collections.js.map +1 -0
- package/src/lib/plugin-manager/plugin-jobs.d.ts +130 -0
- package/src/lib/plugin-manager/plugin-jobs.js +182 -0
- package/src/lib/plugin-manager/plugin-jobs.js.map +1 -0
- package/src/lib/plugin-manager/plugin-loader.d.ts +86 -0
- package/src/lib/plugin-manager/plugin-loader.js +223 -0
- package/src/lib/plugin-manager/plugin-loader.js.map +1 -0
- package/src/lib/plugin-manager/plugin-manager.d.ts +95 -0
- package/src/lib/plugin-manager/plugin-manager.js +343 -0
- package/src/lib/plugin-manager/plugin-manager.js.map +1 -0
- package/src/lib/plugin-manager/plugin-metered-lines.d.ts +97 -0
- package/src/lib/plugin-manager/plugin-metered-lines.js +123 -0
- package/src/lib/plugin-manager/plugin-metered-lines.js.map +1 -0
- package/src/lib/plugin-manager/plugin-org-erasure.d.ts +52 -0
- package/src/lib/plugin-manager/plugin-org-erasure.js +100 -0
- package/src/lib/plugin-manager/plugin-org-erasure.js.map +1 -0
- package/src/lib/plugin-manager/plugin-permissions.d.ts +69 -0
- package/src/lib/plugin-manager/plugin-permissions.js +77 -0
- package/src/lib/plugin-manager/plugin-permissions.js.map +1 -0
- package/src/lib/plugin-manager/plugin-person-erasure.d.ts +58 -0
- package/src/lib/plugin-manager/plugin-person-erasure.js +109 -0
- package/src/lib/plugin-manager/plugin-person-erasure.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-cards.d.ts +99 -0
- package/src/lib/plugin-manager/plugin-record-cards.js +59 -0
- package/src/lib/plugin-manager/plugin-record-cards.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-facts.d.ts +111 -0
- package/src/lib/plugin-manager/plugin-record-facts.js +51 -0
- package/src/lib/plugin-manager/plugin-record-facts.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-routes.d.ts +129 -0
- package/src/lib/plugin-manager/plugin-record-routes.js +93 -0
- package/src/lib/plugin-manager/plugin-record-routes.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-timeline.d.ts +147 -0
- package/src/lib/plugin-manager/plugin-record-timeline.js +39 -0
- package/src/lib/plugin-manager/plugin-record-timeline.js.map +1 -0
- package/src/lib/plugin-manager/plugin-resource-drafts.d.ts +137 -0
- package/src/lib/plugin-manager/plugin-resource-drafts.js +51 -0
- package/src/lib/plugin-manager/plugin-resource-drafts.js.map +1 -0
- package/src/lib/plugin-manager/plugin-services.d.ts +94 -0
- package/src/lib/plugin-manager/plugin-services.js +153 -0
- package/src/lib/plugin-manager/plugin-services.js.map +1 -0
- package/src/lib/plugin-manager/plugin-styles-ui.d.ts +71 -0
- package/src/lib/plugin-manager/plugin-styles-ui.js +80 -0
- package/src/lib/plugin-manager/plugin-styles-ui.js.map +1 -0
- package/src/lib/plugin-manager/plugin-styles.d.ts +176 -0
- package/src/lib/plugin-manager/plugin-styles.js +186 -0
- package/src/lib/plugin-manager/plugin-styles.js.map +1 -0
- package/src/lib/plugin-manager/plugin-subprocessors.d.ts +135 -0
- package/src/lib/plugin-manager/plugin-subprocessors.js +129 -0
- package/src/lib/plugin-manager/plugin-subprocessors.js.map +1 -0
- package/src/lib/plugin-manager/plugin-tax-profile.d.ts +84 -0
- package/src/lib/plugin-manager/plugin-tax-profile.js +39 -0
- package/src/lib/plugin-manager/plugin-tax-profile.js.map +1 -0
- package/src/lib/plugin-manager/plugin-user-erasure.d.ts +53 -0
- package/src/lib/plugin-manager/plugin-user-erasure.js +84 -0
- package/src/lib/plugin-manager/plugin-user-erasure.js.map +1 -0
- package/src/lib/plugin-manager/plugin-zones.d.ts +121 -0
- package/src/lib/plugin-manager/plugin-zones.js +74 -0
- package/src/lib/plugin-manager/plugin-zones.js.map +1 -0
- package/src/lib/plugin-manager/realm-plugins.d.ts +112 -0
- package/src/lib/plugin-manager/realm-plugins.js +196 -0
- package/src/lib/plugin-manager/realm-plugins.js.map +1 -0
- package/src/lib/plugin-manager/realm-server.d.ts +54 -0
- package/src/lib/plugin-manager/realm-server.js +88 -0
- package/src/lib/plugin-manager/realm-server.js.map +1 -0
- package/src/lib/plugin-manager/record-zone-props.d.ts +126 -0
- package/src/lib/plugin-manager/record-zone-props.js +31 -0
- package/src/lib/plugin-manager/record-zone-props.js.map +1 -0
- package/src/lib/plugin-manager/site-page-hooks.d.ts +102 -0
- package/src/lib/plugin-manager/site-page-hooks.js +114 -0
- package/src/lib/plugin-manager/site-page-hooks.js.map +1 -0
- package/src/lib/plugin-manager/site-runtime.d.ts +57 -0
- package/src/lib/plugin-manager/site-runtime.js +25 -0
- package/src/lib/plugin-manager/site-runtime.js.map +1 -0
- package/src/lib/plugin-manager/usage-alert-contributors.d.ts +115 -0
- package/src/lib/plugin-manager/usage-alert-contributors.js +106 -0
- package/src/lib/plugin-manager/usage-alert-contributors.js.map +1 -0
- package/src/lib/types/ast.d.ts +199 -0
- package/src/lib/types/ast.js +20 -0
- package/src/lib/types/ast.js.map +1 -0
- package/src/lib/types/index.d.ts +20 -0
- package/src/lib/types/index.js +21 -0
- package/src/lib/types/index.js.map +1 -0
- package/src/lib/types/nodes.d.ts +608 -0
- package/src/lib/types/nodes.js +28 -0
- package/src/lib/types/nodes.js.map +1 -0
- package/src/lib/types/routing.d.ts +17 -0
- package/src/lib/types/routing.js +18 -0
- package/src/lib/types/routing.js.map +1 -0
- package/src/lib/types/screen.d.ts +23 -0
- package/src/lib/types/screen.js +18 -0
- package/src/lib/types/screen.js.map +1 -0
- package/src/lib/utils.d.ts +25 -0
- package/src/lib/utils.js +42 -0
- package/src/lib/utils.js.map +1 -0
- package/src/server.d.ts +37 -0
- package/src/server.js +55 -0
- package/src/server.js.map +1 -0
|
@@ -0,0 +1,929 @@
|
|
|
1
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2026 Aglyn LLC
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/ /**
|
|
18
|
+
* Lockdown (AGL-1501): the panic button. ONE state shape and ONE resolver
|
|
19
|
+
* across four scopes — platform, org, host, user — with precedence
|
|
20
|
+
* platform > org > host > user.
|
|
21
|
+
*
|
|
22
|
+
* This module is deliberately pure: it normalizes the storage carriers into
|
|
23
|
+
* `LockdownState` and answers "is access locked, and what does the visitor
|
|
24
|
+
* see". Where the state LIVES differs per scope, because two of the four
|
|
25
|
+
* scopes already shipped and re-implementing them beside themselves is the
|
|
26
|
+
* bug class this repo keeps re-learning:
|
|
27
|
+
*
|
|
28
|
+
* - **org** — `orgs/{orgId}.suspendedAt` (AGL-202/210), extended here with
|
|
29
|
+
* `suspendedReasonCode` / `suspendedMessage` / `suspendedUntilMs`. Every
|
|
30
|
+
* existing reader of `suspendedAt` keeps working unchanged.
|
|
31
|
+
* - **host** — NEW staff-only `suspendedAt` (+ same extensions) on the host
|
|
32
|
+
* doc. Deliberately NOT `host.maintenance`: that field is CLIENT-writable
|
|
33
|
+
* (the customer's own maintenance switch, AGL-131) and must never double
|
|
34
|
+
* as a staff security control the customer could simply switch off.
|
|
35
|
+
* - **platform** — NEW `lockdowns/platform` doc (Admin-SDK read/write; the
|
|
36
|
+
* collection is staff-only in rules).
|
|
37
|
+
* - **user** — NEW `lockdowns/user--{uid}` doc carrying reason/notice,
|
|
38
|
+
* alongside the existing Firebase Auth `disabled` flag + refresh-token
|
|
39
|
+
* revocation which do the actual keying-out.
|
|
40
|
+
*
|
|
41
|
+
* The un-panic invariant lives in the SERVER verdict helper
|
|
42
|
+
* (libs/tenant/data/admin lockdown.ts): a verified `staff` claim bypasses
|
|
43
|
+
* every scope, always — a platform lockdown must never lock out the staff
|
|
44
|
+
* who can lift it. Nothing in this module may be given a way to override
|
|
45
|
+
* that.
|
|
46
|
+
*/ // Leaf imports only. `host-naming` imports nothing at all, so the DOMAIN
|
|
47
|
+
// scope's apex check cannot introduce a cycle here.
|
|
48
|
+
import { TENANT_APEX } from "./host-naming.js";
|
|
49
|
+
import { operatorContactLine } from "./operator-identity.js";
|
|
50
|
+
// Also a leaf — `platform-brand` imports nothing — so the same no-cycle
|
|
51
|
+
// argument as `host-naming` above covers it. Staff-surface copy must read
|
|
52
|
+
// the CONFIGURED brand: a self-host operator cannot edit source to rename
|
|
53
|
+
// the product (AGL-2153), and "Aglyn cannot reach the database" is a
|
|
54
|
+
// sentence their operators would be shown about their own install.
|
|
55
|
+
import { PLATFORM_BRAND_NAME } from "./platform-brand.js";
|
|
56
|
+
// The plugin-declared levers (AGL-2940). `plugin-entitlements` reaches only
|
|
57
|
+
// the plugin catalog and the permission registry, neither of which imports
|
|
58
|
+
// anything, so the leaf argument above still holds.
|
|
59
|
+
import { listPluginLockdownFeatures } from "../plugin-manager/plugin-entitlements.js";
|
|
60
|
+
/**
|
|
61
|
+
* The un-panic invariant, per feature (AGL-1510). At the PLATFORM scope a
|
|
62
|
+
* verified staff claim bypasses unconditionally — that is unchanged and not
|
|
63
|
+
* negotiable. A FEATURE lock is narrower, so the bypass is granted only
|
|
64
|
+
* where it aids incident response, and withheld where a staff action would
|
|
65
|
+
* be the very thing the lock exists to stop:
|
|
66
|
+
*
|
|
67
|
+
* - `uploads: true` — the uploads lock answers a malware report, and the
|
|
68
|
+
* staff member responding needs to upload a test asset to verify the fix
|
|
69
|
+
* before lifting the lock for everyone.
|
|
70
|
+
* - `marketplace-installs: true` — same shape: a malicious listing slipped
|
|
71
|
+
* review, and reproducing the install is part of investigating it.
|
|
72
|
+
* - `checkout: false` — a checkout lock answers a billing/Stripe bug, and a
|
|
73
|
+
* staff-created checkout session is still a real charge against a real
|
|
74
|
+
* card. There is no incident-response step that needs money to move;
|
|
75
|
+
* verification belongs in Stripe test mode.
|
|
76
|
+
* - `signups: false` — an account being created has no staff claim yet, so
|
|
77
|
+
* a bypass here could never fire honestly; declaring `false` states that
|
|
78
|
+
* rather than leaving a bypass that only a misattributed claim could use.
|
|
79
|
+
*
|
|
80
|
+
* A plugin's lever carries its own answer on its declaration.
|
|
81
|
+
*
|
|
82
|
+
* Each notice says what is paused AND what still works — a feature lock's
|
|
83
|
+
* whole point is that everything else keeps serving, and the copy must not
|
|
84
|
+
* let a narrow pause read as a wider outage. The checkout notice in
|
|
85
|
+
* particular must NEVER read as a payment failure: "your card was declined"
|
|
86
|
+
* and "we turned checkout off" are different sentences, and only one of them
|
|
87
|
+
* sends a customer to their bank.
|
|
88
|
+
*/ const CORE_LOCKDOWN_FEATURES = [
|
|
89
|
+
{
|
|
90
|
+
key: 'signups',
|
|
91
|
+
label: 'New signups',
|
|
92
|
+
staffBypass: false,
|
|
93
|
+
notice: {
|
|
94
|
+
title: 'New signups are paused',
|
|
95
|
+
body: 'New signups are temporarily paused. Existing accounts can sign in and work as usual.'
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
key: 'uploads',
|
|
100
|
+
label: 'Media uploads',
|
|
101
|
+
staffBypass: true,
|
|
102
|
+
notice: {
|
|
103
|
+
title: 'Uploads are paused',
|
|
104
|
+
body: 'Media uploads are temporarily disabled while we address an issue. Your existing media and published sites are unaffected.'
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
key: 'checkout',
|
|
109
|
+
label: 'Checkout (new subscriptions)',
|
|
110
|
+
staffBypass: false,
|
|
111
|
+
notice: {
|
|
112
|
+
title: 'Checkout is temporarily unavailable',
|
|
113
|
+
body: 'Checkout is temporarily unavailable — this is not a payment failure, and your account, subscription, and sites are unaffected. Please try again shortly.'
|
|
114
|
+
},
|
|
115
|
+
// `marketplace/checkout` creates NEW Stripe checkout sessions exactly
|
|
116
|
+
// like the billing route (AGL-1545); it is also the front door of a paid
|
|
117
|
+
// install, so it carries BOTH keys and each keeps its own bypass rule.
|
|
118
|
+
apiPaths: {
|
|
119
|
+
exact: [
|
|
120
|
+
'marketplace/checkout'
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
key: 'marketplace-installs',
|
|
126
|
+
label: 'Marketplace installs',
|
|
127
|
+
staffBypass: true,
|
|
128
|
+
notice: {
|
|
129
|
+
title: 'Marketplace installs are paused',
|
|
130
|
+
body: 'Installing from the marketplace is temporarily disabled. Everything already installed keeps working.'
|
|
131
|
+
},
|
|
132
|
+
// Installs-as-a-class, every artifact kind. `marketplace/update-artifact`
|
|
133
|
+
// re-copies a publisher's version into the org, which is an install by
|
|
134
|
+
// another name and the same vector a malicious listing would ride.
|
|
135
|
+
// Publish/review/report paths map to nothing: a marketplace incident
|
|
136
|
+
// must not stop publishers reporting or staff reviewing.
|
|
137
|
+
apiPaths: {
|
|
138
|
+
exact: [
|
|
139
|
+
'marketplace/checkout',
|
|
140
|
+
'marketplace/install',
|
|
141
|
+
'marketplace/update-artifact'
|
|
142
|
+
],
|
|
143
|
+
prefixes: [
|
|
144
|
+
'marketplace/install-'
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
];
|
|
149
|
+
/**
|
|
150
|
+
* Every lever, core first and then the plugin declarations in catalog
|
|
151
|
+
* order — the list the staff checklist renders and the writer validates
|
|
152
|
+
* against. Read live rather than snapshotted: plugin declarations arrive
|
|
153
|
+
* at module scope, which can run after any constant here was evaluated.
|
|
154
|
+
*/ export function listLockdownFeatures() {
|
|
155
|
+
return [
|
|
156
|
+
...CORE_LOCKDOWN_FEATURES,
|
|
157
|
+
...listPluginLockdownFeatures()
|
|
158
|
+
];
|
|
159
|
+
}
|
|
160
|
+
/** The keys of {@link listLockdownFeatures}, in the same order. */ export function listLockdownFeatureKeys() {
|
|
161
|
+
return listLockdownFeatures().map((feature)=>feature.key);
|
|
162
|
+
}
|
|
163
|
+
/** One lever's declaration — core or plugin — or `undefined`. */ export function lockdownFeatureDeclaration(key) {
|
|
164
|
+
if (typeof key !== 'string') return undefined;
|
|
165
|
+
return listLockdownFeatures().find((feature)=>feature.key === key);
|
|
166
|
+
}
|
|
167
|
+
export function isLockdownFeatureKey(value) {
|
|
168
|
+
return lockdownFeatureDeclaration(value) !== undefined;
|
|
169
|
+
}
|
|
170
|
+
/** Staff-surface label; the key stays the wire/API identity. */ export function lockdownFeatureLabel(key) {
|
|
171
|
+
var _ref;
|
|
172
|
+
var _lockdownFeatureDeclaration;
|
|
173
|
+
return (_ref = (_lockdownFeatureDeclaration = lockdownFeatureDeclaration(key)) == null ? void 0 : _lockdownFeatureDeclaration.label) != null ? _ref : key;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Whether a verified staff claim passes this feature's lock. A key nothing
|
|
177
|
+
* declared answers `false`: an undeclared lever has no bypass argument on
|
|
178
|
+
* record, and the safe reading of "no argument" is "no bypass".
|
|
179
|
+
*/ export function lockdownFeatureStaffBypass(key) {
|
|
180
|
+
var _lockdownFeatureDeclaration;
|
|
181
|
+
return ((_lockdownFeatureDeclaration = lockdownFeatureDeclaration(key)) == null ? void 0 : _lockdownFeatureDeclaration.staffBypass) === true;
|
|
182
|
+
}
|
|
183
|
+
const LOCKDOWN_MODE_KEYS = {
|
|
184
|
+
full: true,
|
|
185
|
+
'read-only': true
|
|
186
|
+
};
|
|
187
|
+
export const LOCKDOWN_MODES = Object.keys(LOCKDOWN_MODE_KEYS);
|
|
188
|
+
export function isLockdownMode(value) {
|
|
189
|
+
return typeof value === 'string' && value in LOCKDOWN_MODE_KEYS;
|
|
190
|
+
}
|
|
191
|
+
/** The mode of a state, with the absent-means-`full` default applied. */ export function lockdownMode(state) {
|
|
192
|
+
return (state == null ? void 0 : state.mode) === 'read-only' ? 'read-only' : 'full';
|
|
193
|
+
}
|
|
194
|
+
export function isReadOnlyLockdown(state) {
|
|
195
|
+
return lockdownMode(state) === 'read-only';
|
|
196
|
+
}
|
|
197
|
+
const LOCKDOWN_ENFORCEMENT_KEYS = {
|
|
198
|
+
standard: true,
|
|
199
|
+
takedown: true
|
|
200
|
+
};
|
|
201
|
+
export const LOCKDOWN_ENFORCEMENTS = Object.keys(LOCKDOWN_ENFORCEMENT_KEYS);
|
|
202
|
+
export function isLockdownEnforcement(value) {
|
|
203
|
+
return typeof value === 'string' && value in LOCKDOWN_ENFORCEMENT_KEYS;
|
|
204
|
+
}
|
|
205
|
+
/** Staff-surface labels; the key stays the wire/API identity. */ export const LOCKDOWN_ENFORCEMENT_LABELS = {
|
|
206
|
+
standard: `Standard — releases if ${PLATFORM_BRAND_NAME} cannot reach the database`,
|
|
207
|
+
takedown: `Takedown — keeps holding if ${PLATFORM_BRAND_NAME} cannot reach the database`
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* The enforcement class of a state, with the absent-means-`standard`
|
|
211
|
+
* default applied. Read through this, never bare — an unrecognised value
|
|
212
|
+
* must land on the fail-open default rather than on a truthiness test that
|
|
213
|
+
* would make any junk string fail closed.
|
|
214
|
+
*/ export function lockdownEnforcement(state) {
|
|
215
|
+
return (state == null ? void 0 : state.enforcement) === 'takedown' ? 'takedown' : 'standard';
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Is this the class that must survive an unreadable carrier? The ONE
|
|
219
|
+
* predicate the fail-closed path reduces to, so "what is a takedown" has a
|
|
220
|
+
* single definition rather than one per reader.
|
|
221
|
+
*/ export function isTakedownLockdown(state) {
|
|
222
|
+
return lockdownEnforcement(state) === 'takedown';
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* HTTP method → intent. The safe-method set from RFC 9110 minus TRACE (which
|
|
226
|
+
* nothing here serves): a method not on this list mutates until proven
|
|
227
|
+
* otherwise.
|
|
228
|
+
*
|
|
229
|
+
* A route whose POST is really a query (`where-used`, `plugin-impact`,
|
|
230
|
+
* validators) states `intent: 'read'` explicitly rather than being guessed at
|
|
231
|
+
* from a path.
|
|
232
|
+
*/ export function lockdownIntentForMethod(method) {
|
|
233
|
+
const normalized = typeof method === 'string' ? method.toUpperCase() : '';
|
|
234
|
+
return normalized === 'GET' || normalized === 'HEAD' || normalized === 'OPTIONS' ? 'read' : 'write';
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Does this state refuse a request of this intent? The ONE predicate every
|
|
238
|
+
* chokepoint's discrimination reduces to — a full lock refuses everything, a
|
|
239
|
+
* read-only lock refuses writes only.
|
|
240
|
+
*
|
|
241
|
+
* Note what is NOT here: the staff bypass. That lives above every read in the
|
|
242
|
+
* server verdict helper and must not acquire a second, mode-shaped copy
|
|
243
|
+
* — "staff bypass unless…" is how an un-panic invariant stops being one.
|
|
244
|
+
*/ export function lockdownBlocks(state, intent) {
|
|
245
|
+
if (!state) return false;
|
|
246
|
+
return lockdownMode(state) === 'full' || intent === 'write';
|
|
247
|
+
}
|
|
248
|
+
const LOCKDOWN_REASON_CODE_KEYS = {
|
|
249
|
+
security: true,
|
|
250
|
+
billing: true,
|
|
251
|
+
maintenance: true,
|
|
252
|
+
manual: true
|
|
253
|
+
};
|
|
254
|
+
export const LOCKDOWN_REASON_CODES = Object.keys(LOCKDOWN_REASON_CODE_KEYS);
|
|
255
|
+
export function isLockdownReasonCode(value) {
|
|
256
|
+
return typeof value === 'string' && value in LOCKDOWN_REASON_CODE_KEYS;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* `lockdowns/{id}` — the carrier for the two scopes that had none.
|
|
260
|
+
* Doc ids are scope-encoded so a lookup is a single `get`:
|
|
261
|
+
* `platform` and `user--{uid}`. Plain-number timestamps on purpose: the
|
|
262
|
+
* collection is Admin-SDK-only and converter-free, so a partial write can
|
|
263
|
+
* never run a converter that "defaults" a sibling field away (the
|
|
264
|
+
* withConverter-on-partial-writes bug class).
|
|
265
|
+
*/ export const LOCKDOWNS_COLLECTION = 'lockdowns';
|
|
266
|
+
export const PLATFORM_LOCKDOWN_DOC_ID = 'platform';
|
|
267
|
+
export const userLockdownDocId = (uid)=>`user--${uid}`;
|
|
268
|
+
/** `feature--{key}` — same collection, same rules, same audited writer. */ export const featureLockdownDocId = (feature)=>`feature--${feature}`;
|
|
269
|
+
/**
|
|
270
|
+
* `feature--{key}--org--{orgId}` — the same capability switched off for ONE
|
|
271
|
+
* workspace (AGL-2927). The carrier the staff org page's AI pause writes:
|
|
272
|
+
* a spend stop that touches neither the org's entitlements nor its plan, so
|
|
273
|
+
* lifting it restores exactly what the customer bought. Read only by the
|
|
274
|
+
* doors that carry that feature key and name the org, and never implied by
|
|
275
|
+
* the platform-wide document's absence.
|
|
276
|
+
*/ export const orgFeatureLockdownDocId = (feature, orgId)=>`feature--${feature}--org--${orgId}`;
|
|
277
|
+
/**
|
|
278
|
+
* `domain--{hostname}` — the DOMAIN scope's carrier (AGL-1513).
|
|
279
|
+
*
|
|
280
|
+
* ## Keyed on the hostname, deliberately not on the host id
|
|
281
|
+
*
|
|
282
|
+
* Every other narrow scope keys on the thing it locks: a user by uid, a host
|
|
283
|
+
* by host id. A domain lock cannot, because the incidents it exists for are
|
|
284
|
+
* exactly the ones where the domain moves. A hijacked or disputed domain gets
|
|
285
|
+
* detached and re-attached — to another site, or to another org — and a lock
|
|
286
|
+
* keyed on `hosts/{id}` would be left guarding whichever site the name has
|
|
287
|
+
* since left. Keying on the NAME means the lock follows the name, survives
|
|
288
|
+
* detach/re-attach, and can be placed on a domain that is not currently
|
|
289
|
+
* attached to anything at all, which is the state a dispute is usually
|
|
290
|
+
* resolved in.
|
|
291
|
+
*
|
|
292
|
+
* The hostname is lowercased and used verbatim; the caller is responsible for
|
|
293
|
+
* having validated it as a hostname, and the writer does. Firestore document
|
|
294
|
+
* ids may contain dots, so `example.com` needs no escaping — and the `domain--`
|
|
295
|
+
* prefix keeps the key space disjoint from `user--`/`feature--` in the shared
|
|
296
|
+
* collection.
|
|
297
|
+
*/ export const domainLockdownDocId = (hostname)=>`domain--${hostname.trim().toLowerCase()}`;
|
|
298
|
+
/** A bare hostname: labels of a-z0-9/dash, at least two of them. */ const LOCKABLE_DOMAIN_PATTERN = /^(?!-)[a-z0-9-]{1,63}(\.(?!-)[a-z0-9-]{1,63})+$/;
|
|
299
|
+
/** The DNS limit; also what keeps the document id bounded. */ export const LOCKABLE_DOMAIN_MAX = 253;
|
|
300
|
+
/**
|
|
301
|
+
* Whether `value` is a name the DOMAIN scope will accept (AGL-1513).
|
|
302
|
+
*
|
|
303
|
+
* Shared by the writer and anything that builds the doc id, so "what is a
|
|
304
|
+
* lockable name" has one definition. Two refusals matter:
|
|
305
|
+
*
|
|
306
|
+
* - **Not hostname-shaped.** The id is derived from this string, and it
|
|
307
|
+
* arrives from a staff form; `isDocumentId`-style discipline starts by
|
|
308
|
+
* not minting a document for junk in the first place.
|
|
309
|
+
* - **Inside the platform apex.** `{sub}.aglyn.app` is OUR name, and the
|
|
310
|
+
* tenant resolves that space by `subdomain` and never consults the domain
|
|
311
|
+
* scope for it — so a lock placed there would write a document that no
|
|
312
|
+
* reader ever looks at. Refusing is the difference between "you cannot do
|
|
313
|
+
* that" and a control that silently does nothing, which is the worse of
|
|
314
|
+
* the two by a distance. Taking a platform subdomain down is the HOST
|
|
315
|
+
* scope's job.
|
|
316
|
+
*/ export function isLockableDomain(value) {
|
|
317
|
+
if (typeof value !== 'string') return false;
|
|
318
|
+
const domain = value.trim().toLowerCase();
|
|
319
|
+
if (!domain || domain.length > LOCKABLE_DOMAIN_MAX) return false;
|
|
320
|
+
if (!LOCKABLE_DOMAIN_PATTERN.test(domain)) return false;
|
|
321
|
+
return domain !== TENANT_APEX && !domain.endsWith(`.${TENANT_APEX}`);
|
|
322
|
+
}
|
|
323
|
+
/** Staff-typed notice text is user-facing; keep it bounded and plain. */ export const LOCKDOWN_MESSAGE_MAX = 500;
|
|
324
|
+
/**
|
|
325
|
+
* Tolerant epoch-ms reader: Firestore `Timestamp`, `{ seconds }` JSON, a
|
|
326
|
+
* number of ms, or an ISO string — the org carrier's `suspendedAt` arrives
|
|
327
|
+
* in all of these shapes depending on which cache serialized it.
|
|
328
|
+
*/ export function toEpochMs(value) {
|
|
329
|
+
if (value == null) return undefined;
|
|
330
|
+
if (typeof value === 'number') return Number.isFinite(value) ? value : undefined;
|
|
331
|
+
if (typeof value === 'string') {
|
|
332
|
+
const parsed = Date.parse(value);
|
|
333
|
+
return Number.isNaN(parsed) ? undefined : parsed;
|
|
334
|
+
}
|
|
335
|
+
if (typeof value === 'object') {
|
|
336
|
+
var _record_seconds;
|
|
337
|
+
const record = value;
|
|
338
|
+
if (typeof record.toMillis === 'function') {
|
|
339
|
+
try {
|
|
340
|
+
return record.toMillis();
|
|
341
|
+
} catch (unused) {
|
|
342
|
+
return undefined;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
const seconds = (_record_seconds = record.seconds) != null ? _record_seconds : record._seconds;
|
|
346
|
+
if (typeof seconds === 'number' && Number.isFinite(seconds)) {
|
|
347
|
+
return seconds * 1000;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
return undefined;
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Active now? Expiry passing deactivates without any write.
|
|
354
|
+
*
|
|
355
|
+
* Typed on the only field it reads rather than on `LockdownState`, so the
|
|
356
|
+
* sibling levers built on the same field family — asset quarantine
|
|
357
|
+
* (AGL-1512) — share this definition of "expired" instead of restating it.
|
|
358
|
+
* A second copy is how two panic levers end up disagreeing about whether a
|
|
359
|
+
* window that closed one millisecond ago is still in force.
|
|
360
|
+
*/ export function isLockdownActive(state, nowMs) {
|
|
361
|
+
if (!state) return false;
|
|
362
|
+
if (typeof state.untilMs === 'number' && state.untilMs <= nowMs) return false;
|
|
363
|
+
return true;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* How long the blocking function waits on the lock read before deciding
|
|
367
|
+
* without it.
|
|
368
|
+
*
|
|
369
|
+
* Blocking functions sit on the account-creation critical path and Identity
|
|
370
|
+
* Platform gives them a bounded window, so an unbounded `get()` would hand
|
|
371
|
+
* the decision to the platform's own timeout — which refuses, after burning
|
|
372
|
+
* the whole budget and with no log saying why. Bounding it keeps the verdict
|
|
373
|
+
* here, where it can be reasoned about and recorded.
|
|
374
|
+
*/ export const SIGNUPS_CREATION_LOCK_READ_TIMEOUT_MS = 2500;
|
|
375
|
+
/**
|
|
376
|
+
* What the last COMPLETED read saw, for the life of this instance.
|
|
377
|
+
* `undefined` means no read has completed here yet — the state a cold
|
|
378
|
+
* instance starts in, and the only one that cannot hold a lock.
|
|
379
|
+
*
|
|
380
|
+
* Not a cache: it is never consulted in place of a read, only in place of
|
|
381
|
+
* one that failed, so it can never make this gate slower to notice a lift
|
|
382
|
+
* than the lift's own write.
|
|
383
|
+
*/ let lastReadSignupsLock;
|
|
384
|
+
/**
|
|
385
|
+
* Forget it. Not part of any panic path — this exists for process
|
|
386
|
+
* boundaries and for tests, where one case's lock would otherwise become the
|
|
387
|
+
* next case's refusal.
|
|
388
|
+
*/ export function resetSignupsLockMemory() {
|
|
389
|
+
lastReadSignupsLock = undefined;
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Is this state an engaged lock at `nowMs`?
|
|
393
|
+
*
|
|
394
|
+
* Deliberately stricter than `normalizeLockdownDoc`, which refuses to
|
|
395
|
+
* interpret a malformed doc and so reports NOT LOCKED. Here the document's
|
|
396
|
+
* existence is the lever: the only writer is the audited staff route, so a
|
|
397
|
+
* doc that exists at all means someone pulled it, and a field this build
|
|
398
|
+
* cannot parse must never un-pull it. An expiry that has passed deactivates
|
|
399
|
+
* with no write, matching `isLockdownActive` exactly (the sibling test pins
|
|
400
|
+
* that equivalence).
|
|
401
|
+
*/ function signupsLockEngaged(state, nowMs) {
|
|
402
|
+
if (state === null || state === undefined) return false;
|
|
403
|
+
return !(typeof state.untilMs === 'number' && state.untilMs <= nowMs);
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* Refuse this account creation?
|
|
407
|
+
*
|
|
408
|
+
* `readLock` returns the `lockdowns/feature--signups` document, or null when
|
|
409
|
+
* it does not exist. It is injected rather than imported so this decision —
|
|
410
|
+
* including its fail-open and timeout behavior — is testable without a
|
|
411
|
+
* Firestore, and so the same characters run in the function and in the test.
|
|
412
|
+
*
|
|
413
|
+
* NOT parameterized by provider, by email, or by tenant. Email/password,
|
|
414
|
+
* Google and SSO all reach Firebase Auth account creation, and a lock that
|
|
415
|
+
* discriminated between them would be a lock on one gate of three. The
|
|
416
|
+
* caller passes no identity at all, so no future edit can quietly add a
|
|
417
|
+
* carve-out here.
|
|
418
|
+
*/ export async function signupsCreationVerdict(readLock, nowMs, timeoutMs = SIGNUPS_CREATION_LOCK_READ_TIMEOUT_MS) {
|
|
419
|
+
let timer;
|
|
420
|
+
let state;
|
|
421
|
+
try {
|
|
422
|
+
state = await Promise.race([
|
|
423
|
+
readLock(),
|
|
424
|
+
new Promise((_resolve, reject)=>{
|
|
425
|
+
timer = setTimeout(()=>reject(new Error('signups lock read timed out')), timeoutMs);
|
|
426
|
+
})
|
|
427
|
+
]);
|
|
428
|
+
} catch (unused) {
|
|
429
|
+
// Nothing was learned, so the only thing that can refuse now is what an
|
|
430
|
+
// earlier read established. A remembered lock whose window has closed is
|
|
431
|
+
// dropped here rather than re-examined on every later failure.
|
|
432
|
+
if (signupsLockEngaged(lastReadSignupsLock, nowMs)) {
|
|
433
|
+
return {
|
|
434
|
+
refused: true,
|
|
435
|
+
cause: 'held'
|
|
436
|
+
};
|
|
437
|
+
}
|
|
438
|
+
lastReadSignupsLock = undefined;
|
|
439
|
+
return {
|
|
440
|
+
refused: false,
|
|
441
|
+
unreadable: true
|
|
442
|
+
};
|
|
443
|
+
} finally{
|
|
444
|
+
if (timer !== undefined) clearTimeout(timer);
|
|
445
|
+
}
|
|
446
|
+
// A completed read is the whole truth, "no document" included: it decides
|
|
447
|
+
// this account AND replaces whatever was remembered, which is how a lift
|
|
448
|
+
// takes effect.
|
|
449
|
+
lastReadSignupsLock = state != null ? state : null;
|
|
450
|
+
return signupsLockEngaged(state, nowMs) ? {
|
|
451
|
+
refused: true,
|
|
452
|
+
cause: 'locked'
|
|
453
|
+
} : {
|
|
454
|
+
refused: false
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
// #endregion signups-creation-lock
|
|
458
|
+
/**
|
|
459
|
+
* Precedence: platform > org > host > domain > user. The widest active scope wins so
|
|
460
|
+
* the notice a visitor sees names the real cause (a platform maintenance
|
|
461
|
+
* window should not read as "this account is suspended").
|
|
462
|
+
*
|
|
463
|
+
* STRICTNESS OUTRANKS WIDTH (AGL-1511). Once locks have a mode, "widest
|
|
464
|
+
* wins" alone is a security hole: a platform-wide read-only maintenance
|
|
465
|
+
* window would outrank — and therefore SOFTEN — a full security takedown on
|
|
466
|
+
* one org, quietly readmitting every visitor to the site staff just took
|
|
467
|
+
* down. So an active `full` lock is chosen first (in scope order among the
|
|
468
|
+
* full ones), and the widest read-only lock only wins when no full lock is
|
|
469
|
+
* active at all. A lock can never be relaxed by a wider, gentler one.
|
|
470
|
+
*/ export function resolveLockdown(states, nowMs) {
|
|
471
|
+
var _ref, _active_find;
|
|
472
|
+
const active = [
|
|
473
|
+
states.platform,
|
|
474
|
+
states.org,
|
|
475
|
+
states.host,
|
|
476
|
+
states.domain,
|
|
477
|
+
states.user
|
|
478
|
+
].filter((state)=>Boolean(state) && isLockdownActive(state, nowMs));
|
|
479
|
+
return (_ref = (_active_find = active.find((state)=>lockdownMode(state) === 'full')) != null ? _active_find : active[0]) != null ? _ref : null;
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* Org carrier → state. `suspendedAt` alone (every pre-lockdown suspension)
|
|
483
|
+
* normalizes to `manual` with no public message — the legacy free-text
|
|
484
|
+
* `suspendedReason` was written for staff eyes and must not leak into the
|
|
485
|
+
* visitor notice.
|
|
486
|
+
*/ export function normalizeOrgLockdown(org) {
|
|
487
|
+
if (!org || org.suspendedAt == null) return null;
|
|
488
|
+
return _extends({
|
|
489
|
+
scope: 'org'
|
|
490
|
+
}, org.suspendedMode === 'read-only' ? {
|
|
491
|
+
mode: 'read-only'
|
|
492
|
+
} : {}, org.suspendedEnforcement === 'takedown' ? {
|
|
493
|
+
enforcement: 'takedown'
|
|
494
|
+
} : {}, {
|
|
495
|
+
reason: isLockdownReasonCode(org.suspendedReasonCode) ? org.suspendedReasonCode : 'manual',
|
|
496
|
+
message: typeof org.suspendedMessage === 'string' && org.suspendedMessage ? org.suspendedMessage.slice(0, LOCKDOWN_MESSAGE_MAX) : undefined,
|
|
497
|
+
atMs: toEpochMs(org.suspendedAt),
|
|
498
|
+
untilMs: typeof org.suspendedUntilMs === 'number' && Number.isFinite(org.suspendedUntilMs) ? org.suspendedUntilMs : undefined
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
* Host carrier → state. Same field family as the org, on the host doc.
|
|
503
|
+
* `host.maintenance` is NOT consulted here — that is the customer's own
|
|
504
|
+
* switch and keeps its shipped AGL-131 path.
|
|
505
|
+
*/ export function normalizeHostLockdown(host) {
|
|
506
|
+
if (!host || host.suspendedAt == null) return null;
|
|
507
|
+
return _extends({
|
|
508
|
+
scope: 'host'
|
|
509
|
+
}, host.suspendedMode === 'read-only' ? {
|
|
510
|
+
mode: 'read-only'
|
|
511
|
+
} : {}, host.suspendedEnforcement === 'takedown' ? {
|
|
512
|
+
enforcement: 'takedown'
|
|
513
|
+
} : {}, {
|
|
514
|
+
reason: isLockdownReasonCode(host.suspendedReasonCode) ? host.suspendedReasonCode : 'manual',
|
|
515
|
+
message: typeof host.suspendedMessage === 'string' && host.suspendedMessage ? host.suspendedMessage.slice(0, LOCKDOWN_MESSAGE_MAX) : undefined,
|
|
516
|
+
atMs: toEpochMs(host.suspendedAt),
|
|
517
|
+
untilMs: typeof host.suspendedUntilMs === 'number' && Number.isFinite(host.suspendedUntilMs) ? host.suspendedUntilMs : undefined
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
/** `lockdowns/{id}` doc → state; refuses malformed docs rather than guess. */ export function normalizeLockdownDoc(doc, scope) {
|
|
521
|
+
if (!doc) return null;
|
|
522
|
+
if (!isLockdownReasonCode(doc.reason)) return null;
|
|
523
|
+
// A feature doc whose key is not (or no longer) in the enum is refused
|
|
524
|
+
// whole, matching the malformed-reason posture: the panic path does not
|
|
525
|
+
// guess, and an unknown key has no chokepoint to enforce it anyway.
|
|
526
|
+
if (scope === 'feature' && !isLockdownFeatureKey(doc.feature)) return null;
|
|
527
|
+
return _extends({
|
|
528
|
+
scope
|
|
529
|
+
}, scope === 'feature' && isLockdownFeatureKey(doc.feature) ? {
|
|
530
|
+
feature: doc.feature
|
|
531
|
+
} : {}, scope === 'feature' && typeof doc.orgId === 'string' && doc.orgId ? {
|
|
532
|
+
orgId: doc.orgId
|
|
533
|
+
} : {}, doc.mode === 'read-only' ? {
|
|
534
|
+
mode: 'read-only'
|
|
535
|
+
} : {}, doc.enforcement === 'takedown' ? {
|
|
536
|
+
enforcement: 'takedown'
|
|
537
|
+
} : {}, {
|
|
538
|
+
reason: doc.reason,
|
|
539
|
+
message: typeof doc.message === 'string' && doc.message ? doc.message.slice(0, LOCKDOWN_MESSAGE_MAX) : undefined,
|
|
540
|
+
atMs: typeof doc.atMs === 'number' ? doc.atMs : undefined,
|
|
541
|
+
untilMs: typeof doc.untilMs === 'number' && Number.isFinite(doc.untilMs) ? doc.untilMs : undefined,
|
|
542
|
+
actorUid: typeof doc.actorUid === 'string' ? doc.actorUid : undefined
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
/**
|
|
546
|
+
* `Retry-After` seconds for a 503, when the lockdown has a known end.
|
|
547
|
+
* Clamped to at least 60 so a window expiring mid-request cannot emit 0.
|
|
548
|
+
*/ export function lockdownRetryAfterSeconds(state, nowMs) {
|
|
549
|
+
if (typeof state.untilMs !== 'number') return undefined;
|
|
550
|
+
return Math.max(60, Math.ceil((state.untilMs - nowMs) / 1000));
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* The address on the visitor-facing 503, from operator configuration
|
|
554
|
+
* (AGL-2016).
|
|
555
|
+
*
|
|
556
|
+
* Was a `'support@aglyn.com'` literal read by eleven call sites below. A
|
|
557
|
+
* self-hosted site that went into lockdown therefore told *its* visitors to
|
|
558
|
+
* write to **Aglyn** about an account Aglyn has no record of and cannot
|
|
559
|
+
* restore. Unlike the abuse form this is not a legal misroute, but it is the
|
|
560
|
+
* same class of wrong answer: the only party who can lift the lock is the
|
|
561
|
+
* operator who set it.
|
|
562
|
+
*
|
|
563
|
+
* Returns `null` when unconfigured, which the notice treats as "no contact
|
|
564
|
+
* line" — the same shape `maintenance` already uses. A lockdown notice with a
|
|
565
|
+
* dangling "contact " and nothing after it would be worse than one that
|
|
566
|
+
* simply does not offer a channel the deployment does not have.
|
|
567
|
+
*/ export function lockdownSupportEmail() {
|
|
568
|
+
return operatorContactLine('support').address;
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* Per-reason visitor copy — plain and non-alarming. A staff-typed `message`
|
|
572
|
+
* replaces the body; the title and contact line stay per-reason so staff
|
|
573
|
+
* cannot accidentally strip the "how do I get out of this" affordance.
|
|
574
|
+
*/ export function lockdownNotice(state) {
|
|
575
|
+
const custom = typeof state.message === 'string' && state.message.trim() ? state.message.trim() : undefined;
|
|
576
|
+
// Feature locks carry feature-specific, honest copy (AGL-1510): what is
|
|
577
|
+
// off, and — just as important — what is NOT affected. Same convention as
|
|
578
|
+
// the per-reason copy below: a staff message replaces the body only.
|
|
579
|
+
if (state.scope === 'feature' && state.feature) {
|
|
580
|
+
return featureLockdownNotice(state.feature, custom, state.untilMs);
|
|
581
|
+
}
|
|
582
|
+
// A read-only lock refused a WRITE, and the full-lock copy would lie about
|
|
583
|
+
// it: "Access is temporarily disabled" is false on a site the reader is
|
|
584
|
+
// currently looking at (AGL-1511).
|
|
585
|
+
if (isReadOnlyLockdown(state)) {
|
|
586
|
+
return readOnlyLockdownNotice(state, custom);
|
|
587
|
+
}
|
|
588
|
+
// DOMAIN scope (AGL-1513). The site is fine and is still serving on its
|
|
589
|
+
// other addresses; this NAME is the thing that is not, and the copy says
|
|
590
|
+
// that much and no more.
|
|
591
|
+
if (state.scope === 'domain') {
|
|
592
|
+
return domainLockdownNotice(state, custom);
|
|
593
|
+
}
|
|
594
|
+
switch(state.reason){
|
|
595
|
+
case 'maintenance':
|
|
596
|
+
{
|
|
597
|
+
const until = typeof state.untilMs === 'number' ? new Date(state.untilMs).toUTCString() : undefined;
|
|
598
|
+
return {
|
|
599
|
+
title: 'Down for maintenance',
|
|
600
|
+
body: custom != null ? custom : until ? `Scheduled maintenance is in progress. Expected back by ${until}.` : 'Scheduled maintenance is in progress. Please check back shortly.'
|
|
601
|
+
};
|
|
602
|
+
}
|
|
603
|
+
case 'billing':
|
|
604
|
+
var _lockdownSupportEmail;
|
|
605
|
+
return {
|
|
606
|
+
title: 'Account on hold',
|
|
607
|
+
body: custom != null ? custom : 'This account is on hold over an unresolved billing issue. ' + 'Updating the payment method in workspace billing settings ' + 'restores access.',
|
|
608
|
+
contact: (_lockdownSupportEmail = lockdownSupportEmail()) != null ? _lockdownSupportEmail : undefined
|
|
609
|
+
};
|
|
610
|
+
case 'security':
|
|
611
|
+
var _lockdownSupportEmail1;
|
|
612
|
+
return {
|
|
613
|
+
title: 'Temporarily unavailable',
|
|
614
|
+
body: custom != null ? custom : 'Access is temporarily disabled while we investigate a security ' + 'concern.',
|
|
615
|
+
contact: (_lockdownSupportEmail1 = lockdownSupportEmail()) != null ? _lockdownSupportEmail1 : undefined
|
|
616
|
+
};
|
|
617
|
+
case 'manual':
|
|
618
|
+
default:
|
|
619
|
+
var _lockdownSupportEmail2;
|
|
620
|
+
return {
|
|
621
|
+
title: 'Temporarily unavailable',
|
|
622
|
+
body: custom != null ? custom : 'Access to this account is currently disabled.',
|
|
623
|
+
contact: (_lockdownSupportEmail2 = lockdownSupportEmail()) != null ? _lockdownSupportEmail2 : undefined
|
|
624
|
+
};
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* DOMAIN copy (AGL-1513), for a visitor who typed one particular name.
|
|
629
|
+
*
|
|
630
|
+
* ## It must never name the address that still works
|
|
631
|
+
*
|
|
632
|
+
* Every other scope's copy can afford to be helpful, because the thing being
|
|
633
|
+
* withheld is the thing the reader is entitled to. This scope exists for
|
|
634
|
+
* ownership disputes and hijacked or expired domains now pointing at us — so
|
|
635
|
+
* the person reading this notice may be precisely the party the site is being
|
|
636
|
+
* withheld from, and "try acme.aglyn.app instead" would lift the lock in one
|
|
637
|
+
* sentence. None of these bodies names the platform subdomain, and none
|
|
638
|
+
* should acquire one; the `*.aglyn.app` address is deliberately absent rather
|
|
639
|
+
* than accidentally missing.
|
|
640
|
+
*
|
|
641
|
+
* ## It also does not say whose the name is
|
|
642
|
+
*
|
|
643
|
+
* A dispute is exactly the case where we do not know, and a notice is a
|
|
644
|
+
* publication. "Not currently serving" is the whole of what we can assert
|
|
645
|
+
* without taking a side in something a registrar or a court settles.
|
|
646
|
+
*/ function domainLockdownNotice(state, custom) {
|
|
647
|
+
var _lockdownSupportEmail;
|
|
648
|
+
const title = 'This address is unavailable';
|
|
649
|
+
const contact = (_lockdownSupportEmail = lockdownSupportEmail()) != null ? _lockdownSupportEmail : undefined;
|
|
650
|
+
switch(state.reason){
|
|
651
|
+
case 'maintenance':
|
|
652
|
+
return {
|
|
653
|
+
title,
|
|
654
|
+
body: custom != null ? custom : 'This web address is temporarily not serving while maintenance ' + 'is in progress.',
|
|
655
|
+
contact
|
|
656
|
+
};
|
|
657
|
+
case 'billing':
|
|
658
|
+
return {
|
|
659
|
+
title,
|
|
660
|
+
body: custom != null ? custom : 'This web address is not currently serving over an unresolved ' + 'billing issue.',
|
|
661
|
+
contact
|
|
662
|
+
};
|
|
663
|
+
case 'security':
|
|
664
|
+
return {
|
|
665
|
+
title,
|
|
666
|
+
body: custom != null ? custom : 'This web address is not currently serving while we investigate ' + 'a report about it.',
|
|
667
|
+
contact
|
|
668
|
+
};
|
|
669
|
+
case 'manual':
|
|
670
|
+
default:
|
|
671
|
+
return {
|
|
672
|
+
title,
|
|
673
|
+
body: custom != null ? custom : 'This web address is not currently serving.',
|
|
674
|
+
contact
|
|
675
|
+
};
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
/**
|
|
679
|
+
* READ-ONLY copy (AGL-1511), for the account holder whose save just refused.
|
|
680
|
+
*
|
|
681
|
+
* The whole point of this mode is that the reader is still looking at their
|
|
682
|
+
* work while being told they cannot change it, so every sentence has to hold
|
|
683
|
+
* both halves at once: nothing is down, nothing is lost, one verb is paused.
|
|
684
|
+
* The full-lock titles ("Temporarily unavailable", "Account on hold") are
|
|
685
|
+
* flatly untrue here and would send someone to support over a fifteen-minute
|
|
686
|
+
* migration.
|
|
687
|
+
*
|
|
688
|
+
* The `until` sentence is built with the SAME `lockdownUntilSuffix` helper
|
|
689
|
+
* the feature copy uses, so `parseLockdownRefusal` strips and re-renders it
|
|
690
|
+
* in the reader's local time here too rather than showing a UTC stamp.
|
|
691
|
+
*/ function readOnlyLockdownNotice(state, custom) {
|
|
692
|
+
const window = typeof state.untilMs === 'number' ? ` ${lockdownUntilSuffix(state.untilMs)}` : '';
|
|
693
|
+
const title = 'Changes are temporarily paused';
|
|
694
|
+
switch(state.reason){
|
|
695
|
+
case 'maintenance':
|
|
696
|
+
return {
|
|
697
|
+
title,
|
|
698
|
+
body: custom != null ? custom : `Saving changes is paused while we complete scheduled maintenance. ` + `Your sites keep serving and nothing you have created is ` + `affected — changes will save again shortly.${window}`
|
|
699
|
+
};
|
|
700
|
+
case 'billing':
|
|
701
|
+
var _lockdownSupportEmail;
|
|
702
|
+
return {
|
|
703
|
+
title,
|
|
704
|
+
body: custom != null ? custom : `Saving changes is paused over an unresolved billing issue. Your ` + `sites keep serving and nothing has been deleted — updating the ` + `payment method in workspace billing settings restores ` + `editing.${window}`,
|
|
705
|
+
contact: (_lockdownSupportEmail = lockdownSupportEmail()) != null ? _lockdownSupportEmail : undefined
|
|
706
|
+
};
|
|
707
|
+
case 'security':
|
|
708
|
+
case 'manual':
|
|
709
|
+
default:
|
|
710
|
+
var _lockdownSupportEmail1;
|
|
711
|
+
return {
|
|
712
|
+
title,
|
|
713
|
+
body: custom != null ? custom : `Saving changes is paused while we work on something. Your sites ` + `keep serving and nothing you have created is affected — ` + `changes will save again shortly.${window}`,
|
|
714
|
+
contact: (_lockdownSupportEmail1 = lockdownSupportEmail()) != null ? _lockdownSupportEmail1 : undefined
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
/**
|
|
719
|
+
* VISITOR copy for a read-only refusal on a tenant site (AGL-1511).
|
|
720
|
+
*
|
|
721
|
+
* The issue's central product call: a customer's site staying up and earning
|
|
722
|
+
* is the entire reason this mode exists instead of full lockdown, so a
|
|
723
|
+
* visitor-facing write gets a polite inline pause, never a page-level 503.
|
|
724
|
+
* That decision only pays off if the words match it — a visitor shown
|
|
725
|
+
* "Temporarily unavailable" on a page that plainly loaded concludes the shop
|
|
726
|
+
* is broken and leaves, which costs the customer the sale the mode was
|
|
727
|
+
* protecting.
|
|
728
|
+
*
|
|
729
|
+
* So: no mention of maintenance windows, workspaces or accounts (none of
|
|
730
|
+
* which are the visitor's), no support address (support is the SITE
|
|
731
|
+
* owner's, not ours, and pointing a stranger at aglyn.com is worse than
|
|
732
|
+
* silent), an explicit "nothing you typed is lost", and — for checkout — the
|
|
733
|
+
* same hard rule the feature copy carries: this must never read as a
|
|
734
|
+
* declined card. A staff-typed `message` is deliberately NOT honoured here;
|
|
735
|
+
* it is written for the account holder and would land in front of strangers.
|
|
736
|
+
*/ export function lockdownPausedNotice(surface) {
|
|
737
|
+
switch(surface){
|
|
738
|
+
case 'form':
|
|
739
|
+
return {
|
|
740
|
+
title: 'Temporarily paused',
|
|
741
|
+
body: 'This form is not accepting submissions for a few minutes. ' + 'Nothing you typed has been lost — please try again shortly.'
|
|
742
|
+
};
|
|
743
|
+
case 'checkout':
|
|
744
|
+
return {
|
|
745
|
+
title: 'Checkout is temporarily paused',
|
|
746
|
+
body: 'Checkout is paused for a few minutes — this is not a payment ' + 'problem and you have not been charged. Your basket is safe; ' + 'please try again shortly.'
|
|
747
|
+
};
|
|
748
|
+
case 'cart':
|
|
749
|
+
return {
|
|
750
|
+
title: 'Temporarily paused',
|
|
751
|
+
body: 'Basket changes are paused for a few minutes. Browsing works as ' + 'normal — please try again shortly.'
|
|
752
|
+
};
|
|
753
|
+
case 'generic':
|
|
754
|
+
default:
|
|
755
|
+
return {
|
|
756
|
+
title: 'Temporarily paused',
|
|
757
|
+
body: 'This action is paused for a few minutes. Browsing works as ' + 'normal — please try again shortly.'
|
|
758
|
+
};
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
/**
|
|
762
|
+
* Per-feature visitor copy (AGL-1510), read off the lever's declaration —
|
|
763
|
+
* core or plugin — so a plugin's lever explains itself in its own words. A
|
|
764
|
+
* key nothing declared (a document written before its plugin was removed)
|
|
765
|
+
* gets the generic pause: the lock is still honored, it just cannot name
|
|
766
|
+
* what it pauses.
|
|
767
|
+
*/ function featureLockdownNotice(feature, custom, untilMs) {
|
|
768
|
+
var _ref, _ref1, _lockdownSupportEmail;
|
|
769
|
+
const window = typeof untilMs === 'number' ? ` Expected back by ${new Date(untilMs).toUTCString()}.` : '';
|
|
770
|
+
const declared = lockdownFeatureDeclaration(feature);
|
|
771
|
+
return {
|
|
772
|
+
title: (_ref = declared == null ? void 0 : declared.notice.title) != null ? _ref : 'Temporarily paused',
|
|
773
|
+
body: custom != null ? custom : `${(_ref1 = declared == null ? void 0 : declared.notice.body) != null ? _ref1 : 'This action is paused for a few minutes. Browsing works as normal — please try again shortly.'}${window}`,
|
|
774
|
+
contact: (_lockdownSupportEmail = lockdownSupportEmail()) != null ? _lockdownSupportEmail : undefined
|
|
775
|
+
};
|
|
776
|
+
}
|
|
777
|
+
/**
|
|
778
|
+
* The generic-but-honest fallback: what a client says when the server said
|
|
779
|
+
* Locked but the body told it nothing else. It must still be TRUE — "this is
|
|
780
|
+
* paused", never "something went wrong" (the failure this whole affordance
|
|
781
|
+
* exists to stop), and never the word `undefined`.
|
|
782
|
+
*/ export const LOCKDOWN_REFUSAL_FALLBACK_TITLE = 'Temporarily unavailable';
|
|
783
|
+
export const LOCKDOWN_REFUSAL_FALLBACK_MESSAGE = 'This is temporarily paused while we work on something. Nothing you have ' + 'created is affected — please try again shortly.';
|
|
784
|
+
/**
|
|
785
|
+
* The exact sentence the notice builders append to a DEFAULT body when a
|
|
786
|
+
* lock has an expiry. Built here so the client parser can strip it by exact
|
|
787
|
+
* match (same `untilMs`, same string) instead of sniffing a regex.
|
|
788
|
+
*/ function lockdownUntilSuffix(untilMs) {
|
|
789
|
+
return `Expected back by ${new Date(untilMs).toUTCString()}.`;
|
|
790
|
+
}
|
|
791
|
+
/**
|
|
792
|
+
* The expiry as a client-side, LOCAL-time line (AGL-1532). A UTC string is
|
|
793
|
+
* correct and unreadable; a customer wants to know when to come back on
|
|
794
|
+
* their own clock.
|
|
795
|
+
*/ export function formatLockdownUntil(untilMs) {
|
|
796
|
+
if (!Number.isFinite(untilMs)) return undefined;
|
|
797
|
+
const when = new Date(untilMs);
|
|
798
|
+
if (Number.isNaN(when.getTime())) return undefined;
|
|
799
|
+
const stamp = when.toLocaleString(undefined, {
|
|
800
|
+
dateStyle: 'medium',
|
|
801
|
+
timeStyle: 'short'
|
|
802
|
+
});
|
|
803
|
+
return `Expected back around ${stamp}.`;
|
|
804
|
+
}
|
|
805
|
+
/**
|
|
806
|
+
* Parse a fetch response's status + parsed JSON body into a renderable
|
|
807
|
+
* lockdown notice, or `null` when this was not a lockdown refusal
|
|
808
|
+
* (AGL-1532).
|
|
809
|
+
*
|
|
810
|
+
* ONE parser, used by every client call site a feature lock can refuse —
|
|
811
|
+
* billing checkout, marketplace installs and purchases, the AI-assist
|
|
812
|
+
* drawer. Three copies of this parsing is the second-implementation shape
|
|
813
|
+
* that lets one surface drift back to "checkout failed" while the others
|
|
814
|
+
* stay honest.
|
|
815
|
+
*
|
|
816
|
+
* Three rules, each of which a spec pins:
|
|
817
|
+
*
|
|
818
|
+
* 1. **Only 423.** A 500 — a real, unexplained failure — returns `null` so
|
|
819
|
+
* the caller keeps its generic error toast. Dressing a genuine fault as
|
|
820
|
+
* a deliberate pause is a worse lie than the one being fixed.
|
|
821
|
+
* 2. **A 423 always yields a notice.** The server said Locked; that is the
|
|
822
|
+
* honest thing to render even if the body is malformed, truncated by a
|
|
823
|
+
* proxy, or from an older deploy. Missing fields degrade to the shared
|
|
824
|
+
* per-feature copy when the body names a known feature, and to the
|
|
825
|
+
* generic-but-honest fallback otherwise.
|
|
826
|
+
* 3. **No duplicated expiry.** The default server copy already ends with a
|
|
827
|
+
* UTC "Expected back by …" sentence; that exact suffix is stripped and
|
|
828
|
+
* restated as `until` in the reader's local time. A staff-typed custom
|
|
829
|
+
* message never carries the suffix, so nothing is stripped from it.
|
|
830
|
+
*/ export function parseLockdownRefusal(status, body) {
|
|
831
|
+
var _ref, _ref1;
|
|
832
|
+
if (status !== 423) return null;
|
|
833
|
+
const payload = body && typeof body === 'object' ? body : {};
|
|
834
|
+
const feature = isLockdownFeatureKey(payload.feature) ? payload.feature : undefined;
|
|
835
|
+
const untilMs = typeof payload.untilMs === 'number' && Number.isFinite(payload.untilMs) ? payload.untilMs : undefined;
|
|
836
|
+
// A body that named a feature but lost its copy still gets the RIGHT
|
|
837
|
+
// words — the same ones the server would have sent — because that copy
|
|
838
|
+
// lives here too. Only a body naming nothing falls all the way back.
|
|
839
|
+
const derived = feature ? featureLockdownNotice(feature, undefined, untilMs) : undefined;
|
|
840
|
+
const title = typeof payload.title === 'string' && payload.title.trim() ? payload.title.trim() : (_ref = derived == null ? void 0 : derived.title) != null ? _ref : LOCKDOWN_REFUSAL_FALLBACK_TITLE;
|
|
841
|
+
let message = typeof payload.message === 'string' && payload.message.trim() ? payload.message.trim() : (_ref1 = derived == null ? void 0 : derived.body) != null ? _ref1 : LOCKDOWN_REFUSAL_FALLBACK_MESSAGE;
|
|
842
|
+
if (typeof untilMs === 'number') {
|
|
843
|
+
const suffix = lockdownUntilSuffix(untilMs);
|
|
844
|
+
if (message.endsWith(suffix)) {
|
|
845
|
+
message = message.slice(0, -suffix.length).trim();
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
const contact = typeof payload.contact === 'string' && payload.contact.trim() ? payload.contact.trim() : undefined;
|
|
849
|
+
const until = typeof untilMs === 'number' ? formatLockdownUntil(untilMs) : undefined;
|
|
850
|
+
return _extends({
|
|
851
|
+
title,
|
|
852
|
+
message
|
|
853
|
+
}, contact ? {
|
|
854
|
+
contact
|
|
855
|
+
} : {}, typeof payload.scope === 'string' ? {
|
|
856
|
+
scope: payload.scope
|
|
857
|
+
} : {}, feature ? {
|
|
858
|
+
feature
|
|
859
|
+
} : {}, isLockdownMode(payload.mode) ? {
|
|
860
|
+
mode: payload.mode
|
|
861
|
+
} : {}, typeof untilMs === 'number' ? {
|
|
862
|
+
untilMs
|
|
863
|
+
} : {}, until ? {
|
|
864
|
+
until
|
|
865
|
+
} : {});
|
|
866
|
+
}
|
|
867
|
+
/**
|
|
868
|
+
* The notice as ONE line, for surfaces whose only affordance is a snackbar
|
|
869
|
+
* (AGL-1532). The title is prefixed only when the message does not already
|
|
870
|
+
* open with it — the checkout copy leads with its own title, and "Checkout
|
|
871
|
+
* is temporarily unavailable — Checkout is temporarily unavailable — this is
|
|
872
|
+
* not a payment failure" helps nobody.
|
|
873
|
+
*/ export function lockdownRefusalText(notice) {
|
|
874
|
+
const lower = notice.message.toLowerCase();
|
|
875
|
+
const led = lower.startsWith(notice.title.toLowerCase());
|
|
876
|
+
const head = led ? notice.message : `${notice.title} — ${notice.message}`;
|
|
877
|
+
return notice.until ? `${head} ${notice.until}` : head;
|
|
878
|
+
}
|
|
879
|
+
/**
|
|
880
|
+
* Which VISITOR surface a tenant plugin-API path belongs to, for read-only
|
|
881
|
+
* pause copy (AGL-1511).
|
|
882
|
+
*
|
|
883
|
+
* The tenant dispatcher refuses every mutating method under a read-only lock
|
|
884
|
+
* regardless of path — this only chooses the WORDS, and it exists because
|
|
885
|
+
* the checkout sentence has a requirement no generic copy can carry: it must
|
|
886
|
+
* never read as a declined card. Anything unrecognised gets the neutral
|
|
887
|
+
* generic pause rather than a guess; being vague at a stranger is cheap,
|
|
888
|
+
* being wrong about their money is not.
|
|
889
|
+
*/ export function lockdownPausedSurfaceForPluginApiPath(path) {
|
|
890
|
+
if (path === 'commerce/checkout' || path === 'commerce/cart-checkout' || path === 'commerce/pos-order' || path === 'commerce/draft-order') {
|
|
891
|
+
return 'checkout';
|
|
892
|
+
}
|
|
893
|
+
if (path === 'commerce/cart' || path.startsWith('commerce/cart/')) return 'cart';
|
|
894
|
+
return 'generic';
|
|
895
|
+
}
|
|
896
|
+
/**
|
|
897
|
+
* Which feature keys gate a plugin-API dispatcher path (AGL-1510, plural
|
|
898
|
+
* since AGL-1545). Lives here (pure, beside the catalog) so the dispatcher's
|
|
899
|
+
* wiring is one call and the mapping is unit-testable without a route
|
|
900
|
+
* harness.
|
|
901
|
+
*
|
|
902
|
+
* Every lever declares the paths it gates: exact paths, and prefixes matched
|
|
903
|
+
* on a SEGMENT boundary, so `ai/generate` gates `ai/generate/section` and
|
|
904
|
+
* never `ai/generated-report`. A path several levers name is gated by all
|
|
905
|
+
* of them, each keeping its own staff-bypass rule when composed —
|
|
906
|
+
* `marketplace/checkout` carries both `checkout` and `marketplace-installs`
|
|
907
|
+
* (AGL-1545): it creates NEW Stripe checkout sessions exactly like the
|
|
908
|
+
* billing route, and it is also the front door of a paid install, so a
|
|
909
|
+
* malicious-listing incident must stop buyers PAYING for the artifact under
|
|
910
|
+
* investigation, not merely refuse the install after the money moved.
|
|
911
|
+
*
|
|
912
|
+
* A plugin's lever gates its paths by existing (AGL-2903): a door
|
|
913
|
+
* registered under a declared prefix is gated before anyone remembers to
|
|
914
|
+
* wire it, which is the reason the mapping is declared beside the lever
|
|
915
|
+
* rather than beside the route.
|
|
916
|
+
*/ export function lockdownFeaturesForPluginApiPath(path) {
|
|
917
|
+
const keys = [];
|
|
918
|
+
for (const feature of listLockdownFeatures()){
|
|
919
|
+
var _ref, _ref1;
|
|
920
|
+
var _feature_apiPaths, _feature_apiPaths1;
|
|
921
|
+
const exact = (_ref = (_feature_apiPaths = feature.apiPaths) == null ? void 0 : _feature_apiPaths.exact) != null ? _ref : [];
|
|
922
|
+
const prefixes = (_ref1 = (_feature_apiPaths1 = feature.apiPaths) == null ? void 0 : _feature_apiPaths1.prefixes) != null ? _ref1 : [];
|
|
923
|
+
const hit = exact.includes(path) || prefixes.some((prefix)=>path === prefix || path.startsWith(prefix.endsWith('/') || prefix.endsWith('-') ? prefix : `${prefix}/`));
|
|
924
|
+
if (hit && !keys.includes(feature.key)) keys.push(feature.key);
|
|
925
|
+
}
|
|
926
|
+
return keys;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
//# sourceMappingURL=lockdown.js.map
|