@aglyn/aglyn 1.0.0-beta.220 → 1.0.0-beta.222
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/package.json +15 -11
- package/src/lib/app-utils/agent-openapi.js +1 -1
- package/src/lib/app-utils/agent-openapi.js.map +1 -1
- package/src/lib/app-utils/analytics-events.d.ts +3 -2
- package/src/lib/app-utils/analytics-events.js +3 -2
- package/src/lib/app-utils/analytics-events.js.map +1 -1
- package/src/lib/app-utils/api-plugins.d.ts +30 -0
- package/src/lib/app-utils/api-plugins.js +24 -1
- package/src/lib/app-utils/api-plugins.js.map +1 -1
- package/src/lib/app-utils/author-html.d.ts +1 -1
- package/src/lib/app-utils/author-html.js.map +1 -1
- package/src/lib/app-utils/bandwidth-cap.d.ts +12 -1
- package/src/lib/app-utils/bandwidth-cap.js +17 -1
- package/src/lib/app-utils/bandwidth-cap.js.map +1 -1
- package/src/lib/app-utils/compose-reusable-components.d.ts +19 -0
- package/src/lib/app-utils/compose-reusable-components.js +116 -26
- package/src/lib/app-utils/compose-reusable-components.js.map +1 -1
- package/src/lib/app-utils/console-routes.d.ts +4 -0
- package/src/lib/app-utils/console-routes.js +3 -0
- package/src/lib/app-utils/console-routes.js.map +1 -1
- package/src/lib/app-utils/contacts.d.ts +71 -0
- package/src/lib/app-utils/contacts.js +55 -0
- package/src/lib/app-utils/contacts.js.map +1 -1
- package/src/lib/app-utils/contexts.d.ts +1 -0
- package/src/lib/app-utils/contexts.js +1 -0
- package/src/lib/app-utils/contexts.js.map +1 -1
- package/src/lib/app-utils/crm-email-templates.js +21 -4
- package/src/lib/app-utils/crm-email-templates.js.map +1 -1
- package/src/lib/app-utils/crm-kinds.d.ts +2 -0
- package/src/lib/app-utils/crm-kinds.js +1 -0
- package/src/lib/app-utils/crm-kinds.js.map +1 -1
- package/src/lib/app-utils/crm.d.ts +1199 -67
- package/src/lib/app-utils/crm.js +1951 -310
- package/src/lib/app-utils/crm.js.map +1 -1
- package/src/lib/app-utils/csv-import.d.ts +10 -38
- package/src/lib/app-utils/csv-import.js +17 -42
- package/src/lib/app-utils/csv-import.js.map +1 -1
- package/src/lib/app-utils/csv.d.ts +32 -11
- package/src/lib/app-utils/csv.js +43 -5
- package/src/lib/app-utils/csv.js.map +1 -1
- package/src/lib/app-utils/default-site.d.ts +116 -0
- package/src/lib/app-utils/default-site.js +1024 -0
- package/src/lib/app-utils/default-site.js.map +1 -0
- package/src/lib/app-utils/docs-help.generated.d.ts +23 -23
- package/src/lib/app-utils/docs-help.generated.js +47 -10
- package/src/lib/app-utils/docs-help.generated.js.map +1 -1
- package/src/lib/app-utils/docs-index.generated.js +746 -151
- package/src/lib/app-utils/docs-index.generated.js.map +1 -1
- package/src/lib/app-utils/draft-placeholders.d.ts +76 -0
- package/src/lib/app-utils/draft-placeholders.js +115 -0
- package/src/lib/app-utils/draft-placeholders.js.map +1 -0
- package/src/lib/app-utils/entity-picker-context.d.ts +19 -15
- package/src/lib/app-utils/entity-picker-context.js +4 -4
- package/src/lib/app-utils/entity-picker-context.js.map +1 -1
- package/src/lib/app-utils/expand-repeatables.d.ts +66 -10
- package/src/lib/app-utils/expand-repeatables.js +88 -14
- package/src/lib/app-utils/expand-repeatables.js.map +1 -1
- package/src/lib/app-utils/forms.d.ts +33 -22
- package/src/lib/app-utils/forms.js +47 -28
- package/src/lib/app-utils/forms.js.map +1 -1
- package/src/lib/app-utils/full-use-cost.d.ts +277 -0
- package/src/lib/app-utils/full-use-cost.js +421 -0
- package/src/lib/app-utils/full-use-cost.js.map +1 -0
- package/src/lib/app-utils/health-report.js +33 -0
- package/src/lib/app-utils/health-report.js.map +1 -1
- package/src/lib/app-utils/leaving-notice.d.ts +96 -0
- package/src/lib/app-utils/leaving-notice.js +157 -0
- package/src/lib/app-utils/leaving-notice.js.map +1 -0
- package/src/lib/app-utils/llms-txt.d.ts +20 -0
- package/src/lib/app-utils/llms-txt.js +7 -1
- package/src/lib/app-utils/llms-txt.js.map +1 -1
- package/src/lib/app-utils/media-asset-facts.d.ts +16 -1
- package/src/lib/app-utils/media-asset-facts.js +40 -13
- package/src/lib/app-utils/media-asset-facts.js.map +1 -1
- package/src/lib/app-utils/media-bandwidth.d.ts +52 -0
- package/src/lib/app-utils/media-bandwidth.js +94 -0
- package/src/lib/app-utils/media-bandwidth.js.map +1 -0
- package/src/lib/app-utils/media-ref.d.ts +241 -33
- package/src/lib/app-utils/media-ref.js +324 -43
- package/src/lib/app-utils/media-ref.js.map +1 -1
- package/src/lib/app-utils/media-src.d.ts +8 -8
- package/src/lib/app-utils/media-src.js +27 -11
- package/src/lib/app-utils/media-src.js.map +1 -1
- package/src/lib/app-utils/media-takedown-reach.d.ts +4 -1
- package/src/lib/app-utils/media-takedown-reach.js +6 -3
- package/src/lib/app-utils/media-takedown-reach.js.map +1 -1
- package/src/lib/app-utils/notifications.d.ts +1 -1
- package/src/lib/app-utils/notifications.js +2 -0
- package/src/lib/app-utils/notifications.js.map +1 -1
- package/src/lib/app-utils/operator-alerts.js +17 -0
- package/src/lib/app-utils/operator-alerts.js.map +1 -1
- package/src/lib/app-utils/organizations.d.ts +51 -2
- package/src/lib/app-utils/organizations.js +56 -3
- package/src/lib/app-utils/organizations.js.map +1 -1
- package/src/lib/app-utils/page-record-sources.d.ts +87 -0
- package/src/lib/app-utils/page-record-sources.js +53 -0
- package/src/lib/app-utils/page-record-sources.js.map +1 -0
- package/src/lib/app-utils/paid-media-source.d.ts +3 -7
- package/src/lib/app-utils/paid-media-source.js +5 -19
- package/src/lib/app-utils/paid-media-source.js.map +1 -1
- package/src/lib/app-utils/person-erasure.d.ts +5 -2
- package/src/lib/app-utils/person-erasure.js.map +1 -1
- package/src/lib/app-utils/picklists.d.ts +187 -0
- package/src/lib/app-utils/picklists.js +320 -0
- package/src/lib/app-utils/picklists.js.map +1 -0
- package/src/lib/app-utils/plan-entitlements.d.ts +220 -50
- package/src/lib/app-utils/plan-entitlements.js +309 -115
- package/src/lib/app-utils/plan-entitlements.js.map +1 -1
- package/src/lib/app-utils/realm-host-surface.generated.js +2 -0
- package/src/lib/app-utils/realm-host-surface.generated.js.map +1 -1
- package/src/lib/app-utils/release-flags.d.ts +1 -1
- package/src/lib/app-utils/release-flags.js +11 -0
- package/src/lib/app-utils/release-flags.js.map +1 -1
- package/src/lib/app-utils/rendered-widths.d.ts +121 -0
- package/src/lib/app-utils/rendered-widths.js +211 -0
- package/src/lib/app-utils/rendered-widths.js.map +1 -0
- package/src/lib/app-utils/repeat-sources.d.ts +2 -1
- package/src/lib/app-utils/repeat-sources.js.map +1 -1
- package/src/lib/app-utils/screen-link-context-value.d.ts +7 -0
- package/src/lib/app-utils/screen-link-context-value.js.map +1 -1
- package/src/lib/app-utils/screen-link-context.js +14 -2
- package/src/lib/app-utils/screen-link-context.js.map +1 -1
- package/src/lib/app-utils/screen-route.d.ts +157 -36
- package/src/lib/app-utils/screen-route.js +191 -41
- package/src/lib/app-utils/screen-route.js.map +1 -1
- package/src/lib/app-utils/seo-audit.d.ts +11 -1
- package/src/lib/app-utils/seo-audit.js +33 -13
- package/src/lib/app-utils/seo-audit.js.map +1 -1
- package/src/lib/app-utils/seo-keywords.d.ts +11 -0
- package/src/lib/app-utils/seo-keywords.js +19 -5
- package/src/lib/app-utils/seo-keywords.js.map +1 -1
- package/src/lib/app-utils/seo-page-facts.d.ts +47 -4
- package/src/lib/app-utils/seo-page-facts.js +136 -31
- package/src/lib/app-utils/seo-page-facts.js.map +1 -1
- package/src/lib/app-utils/seo-site-scan.d.ts +42 -4
- package/src/lib/app-utils/seo-site-scan.js +113 -12
- package/src/lib/app-utils/seo-site-scan.js.map +1 -1
- package/src/lib/app-utils/server.d.ts +5 -4
- package/src/lib/app-utils/server.js +14 -5
- package/src/lib/app-utils/server.js.map +1 -1
- package/src/lib/app-utils/site-icon-set.d.ts +195 -0
- package/src/lib/app-utils/site-icon-set.js +351 -0
- package/src/lib/app-utils/site-icon-set.js.map +1 -0
- package/src/lib/app-utils/site-interactions.d.ts +101 -4
- package/src/lib/app-utils/site-interactions.js +120 -4
- package/src/lib/app-utils/site-interactions.js.map +1 -1
- package/src/lib/app-utils/starter-template-nodes.d.ts +7 -0
- package/src/lib/app-utils/starter-template-nodes.js +3 -0
- package/src/lib/app-utils/starter-template-nodes.js.map +1 -1
- package/src/lib/app-utils/starter-templates.d.ts +5 -19
- package/src/lib/app-utils/starter-templates.js +5 -49
- package/src/lib/app-utils/starter-templates.js.map +1 -1
- package/src/lib/app-utils/transfer-launcher-context.d.ts +136 -0
- package/src/lib/app-utils/transfer-launcher-context.js +23 -0
- package/src/lib/app-utils/transfer-launcher-context.js.map +1 -0
- package/src/lib/app-utils/transfer-resume-import.d.ts +39 -0
- package/src/lib/app-utils/transfer-resume-import.js +128 -0
- package/src/lib/app-utils/transfer-resume-import.js.map +1 -0
- package/src/lib/app-utils/upgrade-proposal.d.ts +66 -0
- package/src/lib/app-utils/upgrade-proposal.js +95 -0
- package/src/lib/app-utils/upgrade-proposal.js.map +1 -0
- package/src/lib/app-utils/utc-month.d.ts +33 -0
- package/src/lib/app-utils/utc-month.js +35 -0
- package/src/lib/app-utils/utc-month.js.map +1 -0
- package/src/lib/app-utils/visitor-record-ceiling.d.ts +4 -4
- package/src/lib/app-utils/visitor-record-ceiling.js +4 -4
- package/src/lib/app-utils/visitor-record-ceiling.js.map +1 -1
- package/src/lib/app-utils/wire-nodes.d.ts +39 -19
- package/src/lib/app-utils/wire-nodes.js +120 -34
- package/src/lib/app-utils/wire-nodes.js.map +1 -1
- package/src/lib/data-transfer/access.d.ts +74 -0
- package/src/lib/data-transfer/access.js +93 -0
- package/src/lib/data-transfer/access.js.map +1 -0
- package/src/lib/data-transfer/derive.d.ts +246 -0
- package/src/lib/data-transfer/derive.js +1007 -0
- package/src/lib/data-transfer/derive.js.map +1 -0
- package/src/lib/data-transfer/export-file.d.ts +46 -0
- package/src/lib/data-transfer/export-file.js +146 -0
- package/src/lib/data-transfer/export-file.js.map +1 -0
- package/src/lib/data-transfer/field-catalog.d.ts +134 -0
- package/src/lib/data-transfer/field-catalog.js +278 -0
- package/src/lib/data-transfer/field-catalog.js.map +1 -0
- package/src/lib/data-transfer/header-match.d.ts +129 -0
- package/src/lib/data-transfer/header-match.js +367 -0
- package/src/lib/data-transfer/header-match.js.map +1 -0
- package/src/lib/data-transfer/index.d.ts +34 -0
- package/src/lib/data-transfer/index.js +40 -0
- package/src/lib/data-transfer/index.js.map +1 -0
- package/src/lib/data-transfer/job.d.ts +190 -0
- package/src/lib/data-transfer/job.js +229 -0
- package/src/lib/data-transfer/job.js.map +1 -0
- package/src/lib/data-transfer/lookup.d.ts +45 -0
- package/src/lib/data-transfer/lookup.js +71 -0
- package/src/lib/data-transfer/lookup.js.map +1 -0
- package/src/lib/data-transfer/match.d.ts +99 -0
- package/src/lib/data-transfer/match.js +244 -0
- package/src/lib/data-transfer/match.js.map +1 -0
- package/src/lib/data-transfer/package-plan.d.ts +205 -0
- package/src/lib/data-transfer/package-plan.js +475 -0
- package/src/lib/data-transfer/package-plan.js.map +1 -0
- package/src/lib/data-transfer/package.d.ts +181 -0
- package/src/lib/data-transfer/package.js +426 -0
- package/src/lib/data-transfer/package.js.map +1 -0
- package/src/lib/data-transfer/picklist-map.d.ts +139 -0
- package/src/lib/data-transfer/picklist-map.js +271 -0
- package/src/lib/data-transfer/picklist-map.js.map +1 -0
- package/src/lib/data-transfer/plan.d.ts +176 -0
- package/src/lib/data-transfer/plan.js +451 -0
- package/src/lib/data-transfer/plan.js.map +1 -0
- package/src/lib/data-transfer/policy.d.ts +170 -0
- package/src/lib/data-transfer/policy.js +378 -0
- package/src/lib/data-transfer/policy.js.map +1 -0
- package/src/lib/data-transfer/resource.d.ts +211 -0
- package/src/lib/data-transfer/resource.js +241 -0
- package/src/lib/data-transfer/resource.js.map +1 -0
- package/src/lib/data-transfer/review.d.ts +70 -0
- package/src/lib/data-transfer/review.js +233 -0
- package/src/lib/data-transfer/review.js.map +1 -0
- package/src/lib/data-transfer/similarity.d.ts +40 -0
- package/src/lib/data-transfer/similarity.js +106 -0
- package/src/lib/data-transfer/similarity.js.map +1 -0
- package/src/lib/data-transfer/site-package.d.ts +365 -0
- package/src/lib/data-transfer/site-package.js +1077 -0
- package/src/lib/data-transfer/site-package.js.map +1 -0
- package/src/lib/data-transfer/source.d.ts +74 -0
- package/src/lib/data-transfer/source.js +293 -0
- package/src/lib/data-transfer/source.js.map +1 -0
- package/src/lib/data-transfer/transfer-api.d.ts +898 -0
- package/src/lib/data-transfer/transfer-api.js +107 -0
- package/src/lib/data-transfer/transfer-api.js.map +1 -0
- package/src/lib/foundation/definitions/org-billing.types.d.ts +31 -0
- package/src/lib/foundation/definitions/org-billing.types.js.map +1 -1
- package/src/lib/foundation/definitions/organization.types.d.ts +42 -1
- package/src/lib/foundation/definitions/organization.types.js.map +1 -1
- package/src/lib/foundation/definitions/platform.types.d.ts +6 -4
- package/src/lib/foundation/definitions/platform.types.js.map +1 -1
- package/src/lib/foundation/index.d.ts +1 -1
- package/src/lib/foundation/index.js.map +1 -1
- package/src/lib/plugin-manager/feature-plugins.d.ts +91 -2
- package/src/lib/plugin-manager/feature-plugins.js +48 -3
- package/src/lib/plugin-manager/feature-plugins.js.map +1 -1
- package/src/lib/plugin-manager/first-party-plugins.generated.d.ts +56 -0
- package/src/lib/plugin-manager/first-party-plugins.generated.js +1132 -27
- package/src/lib/plugin-manager/first-party-plugins.generated.js.map +1 -1
- package/src/lib/plugin-manager/index.d.ts +0 -1
- package/src/lib/plugin-manager/index.js +0 -1
- package/src/lib/plugin-manager/index.js.map +1 -1
- package/src/lib/plugin-manager/interaction-recipes.d.ts +142 -0
- package/src/lib/plugin-manager/interaction-recipes.js +104 -0
- package/src/lib/plugin-manager/interaction-recipes.js.map +1 -0
- package/src/lib/plugin-manager/interaction-step-checks.d.ts +66 -0
- package/src/lib/plugin-manager/interaction-step-checks.js +86 -0
- package/src/lib/plugin-manager/interaction-step-checks.js.map +1 -0
- package/src/lib/plugin-manager/plugin-artifact-types.d.ts +235 -0
- package/src/lib/plugin-manager/plugin-artifact-types.js +99 -0
- package/src/lib/plugin-manager/plugin-artifact-types.js.map +1 -0
- package/src/lib/plugin-manager/plugin-contact-capture.d.ts +8 -0
- package/src/lib/plugin-manager/plugin-contact-capture.js.map +1 -1
- package/src/lib/plugin-manager/plugin-conversion-credit.d.ts +216 -0
- package/src/lib/plugin-manager/plugin-conversion-credit.js +91 -0
- package/src/lib/plugin-manager/plugin-conversion-credit.js.map +1 -0
- package/src/lib/plugin-manager/plugin-entity-pickers.d.ts +83 -0
- package/src/lib/plugin-manager/plugin-entity-pickers.js +87 -0
- package/src/lib/plugin-manager/plugin-entity-pickers.js.map +1 -0
- package/src/lib/plugin-manager/plugin-host-resources.d.ts +6 -0
- package/src/lib/plugin-manager/plugin-host-resources.js +6 -1
- package/src/lib/plugin-manager/plugin-host-resources.js.map +1 -1
- package/src/lib/plugin-manager/plugin-intake-gates.d.ts +75 -0
- package/src/lib/plugin-manager/plugin-intake-gates.js +49 -0
- package/src/lib/plugin-manager/plugin-intake-gates.js.map +1 -0
- package/src/lib/plugin-manager/plugin-jobs.d.ts +5 -5
- package/src/lib/plugin-manager/plugin-jobs.js +7 -7
- package/src/lib/plugin-manager/plugin-jobs.js.map +1 -1
- package/src/lib/plugin-manager/plugin-live-paths.d.ts +70 -0
- package/src/lib/plugin-manager/plugin-live-paths.js +66 -0
- package/src/lib/plugin-manager/plugin-live-paths.js.map +1 -0
- package/src/lib/plugin-manager/plugin-org-erasure.d.ts +3 -2
- package/src/lib/plugin-manager/plugin-org-erasure.js +30 -5
- package/src/lib/plugin-manager/plugin-org-erasure.js.map +1 -1
- package/src/lib/plugin-manager/plugin-person-erasure.d.ts +68 -9
- package/src/lib/plugin-manager/plugin-person-erasure.js +196 -51
- package/src/lib/plugin-manager/plugin-person-erasure.js.map +1 -1
- package/src/lib/plugin-manager/plugin-person-records.d.ts +275 -0
- package/src/lib/plugin-manager/plugin-person-records.js +107 -0
- package/src/lib/plugin-manager/plugin-person-records.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-counts.d.ts +76 -0
- package/src/lib/plugin-manager/plugin-record-counts.js +49 -0
- package/src/lib/plugin-manager/plugin-record-counts.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-email-state.d.ts +26 -0
- package/src/lib/plugin-manager/plugin-record-email-state.js +16 -0
- package/src/lib/plugin-manager/plugin-record-email-state.js.map +1 -1
- package/src/lib/plugin-manager/plugin-record-index.d.ts +10 -0
- package/src/lib/plugin-manager/plugin-record-index.js.map +1 -1
- package/src/lib/plugin-manager/plugin-record-lists.d.ts +86 -6
- package/src/lib/plugin-manager/plugin-record-lists.js +42 -5
- package/src/lib/plugin-manager/plugin-record-lists.js.map +1 -1
- package/src/lib/plugin-manager/plugin-record-origin.d.ts +79 -0
- package/src/lib/plugin-manager/plugin-record-origin.js +46 -0
- package/src/lib/plugin-manager/plugin-record-origin.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-pages.d.ts +37 -0
- package/src/lib/plugin-manager/plugin-record-pages.js +52 -0
- package/src/lib/plugin-manager/plugin-record-pages.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-timeline.d.ts +60 -0
- package/src/lib/plugin-manager/plugin-record-timeline.js +16 -0
- package/src/lib/plugin-manager/plugin-record-timeline.js.map +1 -1
- package/src/lib/plugin-manager/plugin-resource-drafts.d.ts +5 -5
- package/src/lib/plugin-manager/plugin-resource-drafts.js.map +1 -1
- package/src/lib/plugin-manager/plugin-revocations.d.ts +64 -0
- package/src/lib/plugin-manager/plugin-revocations.js +47 -0
- package/src/lib/plugin-manager/plugin-revocations.js.map +1 -0
- package/src/lib/plugin-manager/plugin-send-tallies.d.ts +69 -0
- package/src/lib/plugin-manager/plugin-send-tallies.js +45 -0
- package/src/lib/plugin-manager/plugin-send-tallies.js.map +1 -0
- package/src/lib/plugin-manager/plugin-server-steps.d.ts +170 -0
- package/src/lib/plugin-manager/plugin-server-steps.js +116 -0
- package/src/lib/plugin-manager/plugin-server-steps.js.map +1 -0
- package/src/lib/plugin-manager/plugin-site-bundle.d.ts +40 -0
- package/src/lib/plugin-manager/plugin-site-bundle.js +4 -0
- package/src/lib/plugin-manager/plugin-site-bundle.js.map +1 -1
- package/src/lib/plugin-manager/plugin-site-export.d.ts +57 -1
- package/src/lib/plugin-manager/plugin-site-export.js +23 -10
- package/src/lib/plugin-manager/plugin-site-export.js.map +1 -1
- package/src/lib/plugin-manager/plugin-sitemap-readers.d.ts +146 -0
- package/src/lib/plugin-manager/plugin-sitemap-readers.js +110 -0
- package/src/lib/plugin-manager/plugin-sitemap-readers.js.map +1 -0
- package/src/lib/plugin-manager/plugin-transfer-resources.d.ts +714 -0
- package/src/lib/plugin-manager/plugin-transfer-resources.js +443 -0
- package/src/lib/plugin-manager/plugin-transfer-resources.js.map +1 -0
- package/src/lib/plugin-manager/plugin-usage-axes.d.ts +54 -5
- package/src/lib/plugin-manager/plugin-usage-axes.js +11 -3
- package/src/lib/plugin-manager/plugin-usage-axes.js.map +1 -1
- package/src/lib/plugin-manager/plugin-user-erasure.js +9 -1
- package/src/lib/plugin-manager/plugin-user-erasure.js.map +1 -1
- package/src/lib/plugin-manager/plugin-visitor-doors.d.ts +104 -0
- package/src/lib/plugin-manager/plugin-visitor-doors.js +108 -0
- package/src/lib/plugin-manager/plugin-visitor-doors.js.map +1 -0
- package/src/lib/plugin-manager/realm-host-aglyn.generated.js +2 -0
- package/src/lib/plugin-manager/realm-host-aglyn.generated.js.map +1 -1
- package/src/lib/plugin-manager/repeat-rows.d.ts +5 -6
- package/src/lib/plugin-manager/repeat-rows.js.map +1 -1
- package/src/lib/app-utils/actions.d.ts +0 -310
- package/src/lib/app-utils/actions.js +0 -506
- package/src/lib/app-utils/actions.js.map +0 -1
- package/src/lib/app-utils/automation-placeholders.d.ts +0 -72
- package/src/lib/app-utils/automation-placeholders.js +0 -207
- package/src/lib/app-utils/automation-placeholders.js.map +0 -1
- package/src/lib/app-utils/dataset-models.d.ts +0 -339
- package/src/lib/app-utils/dataset-models.js +0 -722
- package/src/lib/app-utils/dataset-models.js.map +0 -1
- package/src/lib/app-utils/datasets.d.ts +0 -171
- package/src/lib/app-utils/datasets.js +0 -227
- package/src/lib/app-utils/datasets.js.map +0 -1
- package/src/lib/app-utils/form-abuse-ceiling.d.ts +0 -146
- package/src/lib/app-utils/form-abuse-ceiling.js +0 -158
- package/src/lib/app-utils/form-abuse-ceiling.js.map +0 -1
- package/src/lib/plugin-manager/order-fulfilment.d.ts +0 -142
- package/src/lib/plugin-manager/order-fulfilment.js +0 -104
- package/src/lib/plugin-manager/order-fulfilment.js.map +0 -1
|
@@ -0,0 +1,898 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import type { PicklistSpec, PicklistValue, PicklistValueSet } from '../app-utils/picklists';
|
|
18
|
+
import type { DerivationKind, DeriveOptions, DeriveProblemCode } from './derive';
|
|
19
|
+
import type { TransferFieldCatalog, TransferFieldGroup, TransferPresetHints, TransferResourcePreset, TransferSavedPreset } from './field-catalog';
|
|
20
|
+
import type { HeaderMatchResult, MappingProblems, TransferAliasDictionary } from './header-match';
|
|
21
|
+
import type { TransferJob, TransferJobStatus, TransferResultSummary, TransferRowResult } from './job';
|
|
22
|
+
import type { MatchKeySpec, MatchedVia, RowMatchOutcome } from './match';
|
|
23
|
+
import type { PicklistMatched, PicklistUnmatched, PicklistValueChoice } from './picklist-map';
|
|
24
|
+
import type { PlannedTransferRow, TransferPlanSummary, TransferRowVerdict, TransferWarning, TransferWarningClass } from './plan';
|
|
25
|
+
import type { TransferFieldMode, TransferLockedRule, TransferPolicy, TransferPolicyDefaults, TransferPolicySource } from './policy';
|
|
26
|
+
import type { TransferField, TransferFormat, TransferResourceDescriptor } from './resource';
|
|
27
|
+
import type { TransferCsvDelimiter, TransferSourceOptions } from './source';
|
|
28
|
+
import type { PackageDependency, PackageItemDecision, TransferPackage } from './package';
|
|
29
|
+
import type { TransferPackageDependencyChoice, TransferPackagePlanItem, TransferPackageReference, TransferPackageSummary, TransferPackageWarningClass } from './package-plan';
|
|
30
|
+
/** Where each route is served. */
|
|
31
|
+
export declare const TRANSFER_API_ROUTES: {
|
|
32
|
+
readonly fields: "/api/transfer/fields";
|
|
33
|
+
readonly upload: "/api/transfer/upload";
|
|
34
|
+
readonly analyze: "/api/transfer/analyze";
|
|
35
|
+
readonly plan: "/api/transfer/plan";
|
|
36
|
+
readonly apply: "/api/transfer/apply";
|
|
37
|
+
readonly status: "/api/transfer/status";
|
|
38
|
+
readonly undo: "/api/transfer/undo";
|
|
39
|
+
readonly export: "/api/transfer/export";
|
|
40
|
+
readonly package: "/api/transfer/package";
|
|
41
|
+
readonly jobs: "/api/transfer/jobs";
|
|
42
|
+
};
|
|
43
|
+
export type TransferApiRoute = keyof typeof TRANSFER_API_ROUTES;
|
|
44
|
+
/**
|
|
45
|
+
* The most bytes one upload request carries. A file larger than this is
|
|
46
|
+
* sent in parts (`part`, `parts`), each under the platform's request ceiling.
|
|
47
|
+
*/
|
|
48
|
+
export declare const TRANSFER_UPLOAD_PART_MAX_BYTES = 3000000;
|
|
49
|
+
/** The most bytes one file may carry, unless its resource sets a lower `limits.maxBytes`. */
|
|
50
|
+
export declare const TRANSFER_UPLOAD_MAX_BYTES = 24000000;
|
|
51
|
+
/** The most parts one upload may be sent in. */
|
|
52
|
+
export declare const TRANSFER_UPLOAD_MAX_PARTS: number;
|
|
53
|
+
/** The most rows a file may carry, unless its resource sets `limits.maxRows`. */
|
|
54
|
+
export declare const TRANSFER_DEFAULT_MAX_ROWS = 50000;
|
|
55
|
+
/** The sample rows analyze returns for the mapping step. */
|
|
56
|
+
export declare const TRANSFER_ANALYZE_SAMPLE_ROWS = 20;
|
|
57
|
+
/** The most planned rows one `plan` page returns. */
|
|
58
|
+
export declare const TRANSFER_PLAN_PAGE_MAX = 200;
|
|
59
|
+
/** The most undo conflicts one `undo` plan page returns. */
|
|
60
|
+
export declare const TRANSFER_UNDO_PAGE_MAX = 200;
|
|
61
|
+
/** The planned rows of each verdict a dry run answers with, so every filter of the review table shows rows. */
|
|
62
|
+
export declare const TRANSFER_PLAN_SAMPLE_PER_VERDICT = 50;
|
|
63
|
+
/** The most conflicts a dry run lists; the count covers every one. */
|
|
64
|
+
export declare const TRANSFER_PLAN_CONFLICTS_MAX = 500;
|
|
65
|
+
/** The rows of each match outcome analyze lists; the summary counts every row. */
|
|
66
|
+
export declare const TRANSFER_MATCH_ROWS_PER_KIND = 100;
|
|
67
|
+
/** The examples each derivation or problem keeps. */
|
|
68
|
+
export declare const TRANSFER_REVIEW_SAMPLES = 5;
|
|
69
|
+
/** A file that arrives in parts: how many, and which have landed. */
|
|
70
|
+
export interface TransferUploadState {
|
|
71
|
+
parts: number;
|
|
72
|
+
received: number[];
|
|
73
|
+
bytes: number;
|
|
74
|
+
complete: boolean;
|
|
75
|
+
}
|
|
76
|
+
/** What undo has done so far, while it runs and after. */
|
|
77
|
+
export interface TransferUndoState {
|
|
78
|
+
status: 'running' | 'done';
|
|
79
|
+
/** The next undo snapshot (chunk) to revert. */
|
|
80
|
+
chunk: number;
|
|
81
|
+
startedAt: number;
|
|
82
|
+
startedBy: string;
|
|
83
|
+
/** What happens to an edited record the decisions do not name. */
|
|
84
|
+
otherwise: TransferUndoDecision;
|
|
85
|
+
/** The person's decision per record id, kept so the sweep can finish an undo the browser left. */
|
|
86
|
+
decisions?: Record<string, TransferUndoDecision>;
|
|
87
|
+
counts: TransferUndoCounts;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* What the sweep does to a job once `retainUntil` passes: `expire` deletes
|
|
91
|
+
* a job that never wrote (and its file); `trim` clears an applied job's
|
|
92
|
+
* dry run, undo snapshots and file once its undo window has closed, keeping
|
|
93
|
+
* the job and its per-row results.
|
|
94
|
+
*/
|
|
95
|
+
export type TransferJobRetention = 'expire' | 'trim';
|
|
96
|
+
/** How long a job that never wrote is kept after it was last touched. */
|
|
97
|
+
export declare const TRANSFER_DRAFT_RETENTION_MS: number;
|
|
98
|
+
/** Undo's steps, counted. */
|
|
99
|
+
export type TransferUndoCounts = Record<'restore' | 'delete' | 'conflict' | 'nothing', number>;
|
|
100
|
+
/** Who is driving a job right now; another driver waits until it lapses. */
|
|
101
|
+
export interface TransferJobLease {
|
|
102
|
+
owner: string;
|
|
103
|
+
expiresAt: number;
|
|
104
|
+
}
|
|
105
|
+
/** A planned row that breaks one of the resource's own rules, and so fails. */
|
|
106
|
+
export interface TransferPlanInvariantFailure {
|
|
107
|
+
row: number;
|
|
108
|
+
invariant: string;
|
|
109
|
+
message: string;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* A job as `orgs/{orgId}/transferJobs/{jobId}` stores it: the core's
|
|
113
|
+
* {@link TransferJob}, and what the engine keeps between requests.
|
|
114
|
+
*/
|
|
115
|
+
export interface TransferJobRecord extends TransferJob {
|
|
116
|
+
/** Where the file is stored, once every part has landed. */
|
|
117
|
+
sourcePath?: string;
|
|
118
|
+
upload?: TransferUploadState;
|
|
119
|
+
/** How the CSV is read, as the person confirmed it at upload. */
|
|
120
|
+
read?: TransferSourceOptions;
|
|
121
|
+
/** The file's header, once analyzed. */
|
|
122
|
+
headers?: string[];
|
|
123
|
+
/** The person's choices the stored plan was built from. */
|
|
124
|
+
picklistChoices?: TransferPicklistChoices;
|
|
125
|
+
/** Field id → lookup value key → what the person chose for a value that named no record. */
|
|
126
|
+
lookupChoices?: Record<string, Record<string, TransferLookupChoice>>;
|
|
127
|
+
derive?: DeriveOptions;
|
|
128
|
+
/** The date order the person chose per field. */
|
|
129
|
+
dateOrders?: Record<string, TransferDateOrder>;
|
|
130
|
+
/** What a plugin's extra wizard steps collected, by step id. */
|
|
131
|
+
extras?: Record<string, unknown>;
|
|
132
|
+
/** Values the plan adds to the organization's picklists, by picklist id; added before the first write. */
|
|
133
|
+
picklistAdditions?: Record<string, PicklistValue[]>;
|
|
134
|
+
picklistsAdded?: boolean;
|
|
135
|
+
warnings?: TransferWarning[];
|
|
136
|
+
acknowledgementsRequired?: TransferWarningClass[];
|
|
137
|
+
matchSummary?: Record<RowMatchOutcome['kind'], number>;
|
|
138
|
+
invariantFailures?: TransferPlanInvariantFailure[];
|
|
139
|
+
invariantFailureCount?: number;
|
|
140
|
+
plannedAt?: number;
|
|
141
|
+
/** Set by the first write; a job that has written can be resumed, never re-planned. */
|
|
142
|
+
applyStartedAt?: number;
|
|
143
|
+
/** Results so far, counted. */
|
|
144
|
+
results?: TransferResultSummary;
|
|
145
|
+
lease?: TransferJobLease | null;
|
|
146
|
+
undo?: TransferUndoState;
|
|
147
|
+
/** What the sweep does once `retainUntil` passes; absent while the job is running, and once trimmed. */
|
|
148
|
+
retention?: TransferJobRetention;
|
|
149
|
+
retainUntil?: number;
|
|
150
|
+
/** When the sweep cleared the dry run, undo snapshots and file of an applied job. */
|
|
151
|
+
trimmedAt?: number;
|
|
152
|
+
/** A workspace package import's plan, as the job keeps it (`kind: 'package'`). */
|
|
153
|
+
package?: TransferPackageJobState;
|
|
154
|
+
}
|
|
155
|
+
/** What a workspace package import keeps on its job between requests. */
|
|
156
|
+
export interface TransferPackageJobState {
|
|
157
|
+
/** Where the package came from, as its manifest says. */
|
|
158
|
+
source?: string;
|
|
159
|
+
/** The resources its items belong to. */
|
|
160
|
+
resources: string[];
|
|
161
|
+
summary: TransferPackageSummary;
|
|
162
|
+
blocking: string[];
|
|
163
|
+
acknowledgementsRequired: TransferPackageWarningClass[];
|
|
164
|
+
acknowledged?: TransferPackageWarningClass[];
|
|
165
|
+
unknownKinds: string[];
|
|
166
|
+
/** The person's choices the stored plan was built from. */
|
|
167
|
+
decisions: Record<string, PackageItemDecision>;
|
|
168
|
+
dependencyChoices: Record<string, TransferPackageDependencyChoice>;
|
|
169
|
+
}
|
|
170
|
+
/** The person's date-order choice for a field whose dates read either way. */
|
|
171
|
+
export type TransferDateOrder = 'mdy' | 'dmy';
|
|
172
|
+
/** What to do with one lookup value that names no record. */
|
|
173
|
+
export type TransferLookupChoice = {
|
|
174
|
+
action: 'create';
|
|
175
|
+
} | {
|
|
176
|
+
action: 'mapTo';
|
|
177
|
+
recordId: string;
|
|
178
|
+
} | {
|
|
179
|
+
action: 'leaveBlank';
|
|
180
|
+
} | {
|
|
181
|
+
action: 'refuseRow';
|
|
182
|
+
};
|
|
183
|
+
/** Everything the person has decided that changes how rows are read. */
|
|
184
|
+
export interface TransferReadChoices {
|
|
185
|
+
/** Column → field id; a column left out is ignored. */
|
|
186
|
+
mapping: Record<number, string>;
|
|
187
|
+
/** Field id → the order its ambiguous dates are read in. */
|
|
188
|
+
dateOrders?: Record<string, TransferDateOrder>;
|
|
189
|
+
/** Field id → incoming value key → choice. */
|
|
190
|
+
picklistChoices?: Record<string, Record<string, PicklistValueChoice>>;
|
|
191
|
+
/** Field id → incoming value key → choice. */
|
|
192
|
+
lookupChoices?: Record<string, Record<string, TransferLookupChoice>>;
|
|
193
|
+
/** Match key field ids, in priority order. */
|
|
194
|
+
matchKeys?: string[];
|
|
195
|
+
}
|
|
196
|
+
/** One kind of thing a parser did to a field's cells, counted over the file. */
|
|
197
|
+
export interface TransferDerivationCount {
|
|
198
|
+
kind: DerivationKind;
|
|
199
|
+
/** The rule in a sentence, from the first occurrence. */
|
|
200
|
+
note: string;
|
|
201
|
+
count: number;
|
|
202
|
+
flagged: boolean;
|
|
203
|
+
samples: {
|
|
204
|
+
row: number;
|
|
205
|
+
from: string;
|
|
206
|
+
to: string;
|
|
207
|
+
}[];
|
|
208
|
+
}
|
|
209
|
+
/** One kind of cell a field could not read, counted over the file. */
|
|
210
|
+
export interface TransferProblemCount {
|
|
211
|
+
code: DeriveProblemCode;
|
|
212
|
+
message: string;
|
|
213
|
+
count: number;
|
|
214
|
+
samples: {
|
|
215
|
+
row: number;
|
|
216
|
+
raw: string;
|
|
217
|
+
}[];
|
|
218
|
+
}
|
|
219
|
+
/** What reading one field's cells did, over the whole file. */
|
|
220
|
+
export interface TransferDerivationSummary {
|
|
221
|
+
fieldId: string;
|
|
222
|
+
/** Cells that held a value. */
|
|
223
|
+
filled: number;
|
|
224
|
+
/** Cells read as they were. */
|
|
225
|
+
unchanged: number;
|
|
226
|
+
derivations: TransferDerivationCount[];
|
|
227
|
+
problems: TransferProblemCount[];
|
|
228
|
+
/** Cells whose day and month could be either way round; the person picks the order. */
|
|
229
|
+
ambiguousDates: number;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* A lookup column's values that name no record — or several — each with the
|
|
233
|
+
* rows that carry it and the records it may mean (AGL-3541).
|
|
234
|
+
*/
|
|
235
|
+
export interface TransferLookupReview {
|
|
236
|
+
fieldId: string;
|
|
237
|
+
/** Distinct values that named exactly one record. */
|
|
238
|
+
resolved?: number;
|
|
239
|
+
unresolved: {
|
|
240
|
+
value: string;
|
|
241
|
+
key: string;
|
|
242
|
+
count: number;
|
|
243
|
+
rows: number[];
|
|
244
|
+
suggestions: {
|
|
245
|
+
recordId: string;
|
|
246
|
+
label: string;
|
|
247
|
+
}[];
|
|
248
|
+
}[];
|
|
249
|
+
}
|
|
250
|
+
/** One row's match, for the matching step's lists. */
|
|
251
|
+
export interface TransferMatchRowView {
|
|
252
|
+
row: number;
|
|
253
|
+
outcome: RowMatchOutcome;
|
|
254
|
+
/** A name for the row, from its own cells. */
|
|
255
|
+
label?: string;
|
|
256
|
+
}
|
|
257
|
+
/** Rows against existing records under the chosen keys. */
|
|
258
|
+
export interface TransferMatchReview {
|
|
259
|
+
keys: MatchKeySpec[];
|
|
260
|
+
summary: Record<RowMatchOutcome['kind'], number>;
|
|
261
|
+
/** Rows of each outcome, at most {@link TRANSFER_MATCH_ROWS_PER_KIND} of each. */
|
|
262
|
+
rows: TransferMatchRowView[];
|
|
263
|
+
}
|
|
264
|
+
/** One field a matched record and the file disagree on. */
|
|
265
|
+
export interface TransferConflictField {
|
|
266
|
+
fieldId: string;
|
|
267
|
+
before: unknown;
|
|
268
|
+
incoming: unknown;
|
|
269
|
+
/** What the policy makes of it now. */
|
|
270
|
+
after: unknown;
|
|
271
|
+
mode: TransferFieldMode;
|
|
272
|
+
source: TransferPolicySource;
|
|
273
|
+
}
|
|
274
|
+
/** A matched row whose file values differ from values the record already has. */
|
|
275
|
+
export interface TransferConflict {
|
|
276
|
+
row: number;
|
|
277
|
+
recordId: string;
|
|
278
|
+
fields: TransferConflictField[];
|
|
279
|
+
}
|
|
280
|
+
/** A row more than one record matched. */
|
|
281
|
+
export interface TransferAmbiguity {
|
|
282
|
+
row: number;
|
|
283
|
+
via: MatchedVia;
|
|
284
|
+
recordIds: string[];
|
|
285
|
+
}
|
|
286
|
+
/** Which records an export reads. */
|
|
287
|
+
export type TransferExportScopeKind = 'selection' | 'filter' | 'all';
|
|
288
|
+
/** The records an export reads: the selected ids, the list's current filter, or every record. */
|
|
289
|
+
export type TransferExportScope = {
|
|
290
|
+
kind: 'selection';
|
|
291
|
+
ids: string[];
|
|
292
|
+
} | {
|
|
293
|
+
kind: 'filter';
|
|
294
|
+
filter: unknown;
|
|
295
|
+
} | {
|
|
296
|
+
kind: 'all';
|
|
297
|
+
};
|
|
298
|
+
/** The fields, records and format the person chose to export. */
|
|
299
|
+
export interface TransferExportChoice {
|
|
300
|
+
resource: string;
|
|
301
|
+
/** Field ids, in the file's column order. */
|
|
302
|
+
fieldIds: string[];
|
|
303
|
+
scope: TransferExportScope;
|
|
304
|
+
format: TransferFormat;
|
|
305
|
+
/** A CSV starts with a byte-order mark, for spreadsheets. */
|
|
306
|
+
bom: boolean;
|
|
307
|
+
/**
|
|
308
|
+
* The CSV column name for a field, by field id, in place of its label — a
|
|
309
|
+
* resource preset's `headers` (see `transferExportHeaders`).
|
|
310
|
+
*/
|
|
311
|
+
headers?: Readonly<Record<string, string>>;
|
|
312
|
+
}
|
|
313
|
+
/** Where a person's remembered choices live: `users/{uid}/transferPrefs/{resourceKey}`, a `TransferPrefs`. */
|
|
314
|
+
export declare const TRANSFER_PREFS_COLLECTION = "transferPrefs";
|
|
315
|
+
/** The most selected ids one export reads. */
|
|
316
|
+
export declare const TRANSFER_EXPORT_SELECTION_MAX = 10000;
|
|
317
|
+
/** The rows an export asks the resource for per page. */
|
|
318
|
+
export declare const TRANSFER_EXPORT_PAGE_ROWS = 500;
|
|
319
|
+
/**
|
|
320
|
+
* The rows an export reads ahead, before the first byte, to count a
|
|
321
|
+
* resource that cannot count itself: a file that fits is promised whole.
|
|
322
|
+
*/
|
|
323
|
+
export declare const TRANSFER_EXPORT_PREFETCH_ROWS = 5000;
|
|
324
|
+
/** The export choice a person made last, remembered per person and resource. */
|
|
325
|
+
export interface TransferExportPrefs {
|
|
326
|
+
/** A built-in preset id, a saved preset's id, or `null` for a hand-picked list. */
|
|
327
|
+
presetId: string | null;
|
|
328
|
+
fieldIds: string[];
|
|
329
|
+
format: TransferFormat;
|
|
330
|
+
/** A CSV starts with a byte-order mark, for spreadsheets. */
|
|
331
|
+
bom: boolean;
|
|
332
|
+
scope: TransferExportScopeKind;
|
|
333
|
+
}
|
|
334
|
+
/** What is remembered for one person and resource. */
|
|
335
|
+
export interface TransferPrefs {
|
|
336
|
+
export?: TransferExportPrefs;
|
|
337
|
+
/** Presets the person saved, in the order they saved them. */
|
|
338
|
+
presets: TransferSavedPreset[];
|
|
339
|
+
}
|
|
340
|
+
/** What a resource offers to import and export, as the person may see it. */
|
|
341
|
+
export interface TransferResourceInfo {
|
|
342
|
+
resource: TransferResourceDescriptor;
|
|
343
|
+
/** Every field in catalog order: standard, derived, custom, then system. */
|
|
344
|
+
fields: TransferField[];
|
|
345
|
+
/** The groups the fields are listed under, in order. */
|
|
346
|
+
groups: TransferFieldGroup[];
|
|
347
|
+
/** The keys a row may be matched on, in the default priority. */
|
|
348
|
+
matchKeys: MatchKeySpec[];
|
|
349
|
+
/** The match keys used when the person has not chosen (every key, in order, by default). */
|
|
350
|
+
defaultMatchKeys?: string[];
|
|
351
|
+
presetHints?: TransferPresetHints;
|
|
352
|
+
/** The resource's own presets, listed after the built-in ones. */
|
|
353
|
+
resourcePresets?: TransferResourcePreset[];
|
|
354
|
+
/** The owning plugin's rules, shown locked with their reasons. */
|
|
355
|
+
locked: TransferLockedRule[];
|
|
356
|
+
/**
|
|
357
|
+
* Where the resource starts the person on the Conflicts step, when it is
|
|
358
|
+
* not the core's fill blanks / leave (AGL-3548). The wizard opens on it.
|
|
359
|
+
*/
|
|
360
|
+
defaultPolicy?: TransferPolicyDefaults;
|
|
361
|
+
/** Other products' header spellings, from the owning plugin. */
|
|
362
|
+
dictionaries?: TransferAliasDictionary[];
|
|
363
|
+
prefs: TransferPrefs;
|
|
364
|
+
/** Whether the person may create a custom field from the mapping step. */
|
|
365
|
+
canCreateCustomField?: boolean;
|
|
366
|
+
}
|
|
367
|
+
/** Every request names its organization. */
|
|
368
|
+
export interface TransferOrgRequest {
|
|
369
|
+
orgId: string;
|
|
370
|
+
}
|
|
371
|
+
/** Every request after the upload names its job. */
|
|
372
|
+
export interface TransferJobRequest extends TransferOrgRequest {
|
|
373
|
+
jobId: string;
|
|
374
|
+
}
|
|
375
|
+
/** Where a job stands, for a progress bar. */
|
|
376
|
+
export interface TransferProgress {
|
|
377
|
+
status: TransferJobStatus;
|
|
378
|
+
/** The next chunk to write. */
|
|
379
|
+
chunk: number;
|
|
380
|
+
chunkCount: number;
|
|
381
|
+
rowsDone: number;
|
|
382
|
+
rowCount: number;
|
|
383
|
+
results: TransferResultSummary;
|
|
384
|
+
}
|
|
385
|
+
/** `fields`: what a resource offers. Answers for import and export alike. */
|
|
386
|
+
export interface TransferFieldsRequest extends TransferOrgRequest {
|
|
387
|
+
resource: string;
|
|
388
|
+
/** The site, for a host-scoped resource. */
|
|
389
|
+
hostId?: string | null;
|
|
390
|
+
/**
|
|
391
|
+
* The list filter an export was opened on, for a resource whose fields
|
|
392
|
+
* depend on the records read (one form's questions). An object, or ignored.
|
|
393
|
+
*/
|
|
394
|
+
filter?: unknown;
|
|
395
|
+
}
|
|
396
|
+
export interface TransferFieldsResponse extends TransferResourceInfo {
|
|
397
|
+
ok: true;
|
|
398
|
+
}
|
|
399
|
+
/** `upload`: one file, or one part of it. */
|
|
400
|
+
export interface TransferUploadRequest extends TransferOrgRequest {
|
|
401
|
+
resource: string;
|
|
402
|
+
/** The site, for a host-scoped resource. */
|
|
403
|
+
hostId?: string | null;
|
|
404
|
+
fileName: string;
|
|
405
|
+
/** Detected from the file name, then the content, when absent. */
|
|
406
|
+
format?: TransferFormat;
|
|
407
|
+
/** The file's text, or this part of it. */
|
|
408
|
+
content: string;
|
|
409
|
+
/** This part's index, from 0; omit for a file sent whole. */
|
|
410
|
+
part?: number;
|
|
411
|
+
/** How many parts the file is sent in; omit for a file sent whole. */
|
|
412
|
+
parts?: number;
|
|
413
|
+
/** The job the first part made; required on every later part. */
|
|
414
|
+
jobId?: string;
|
|
415
|
+
/** The CSV delimiter the person confirmed; detected when absent. Read from the first part. */
|
|
416
|
+
delimiter?: TransferCsvDelimiter;
|
|
417
|
+
/** `false` when the CSV's first line is a row, not names. Read from the first part. */
|
|
418
|
+
headerRow?: boolean;
|
|
419
|
+
}
|
|
420
|
+
export interface TransferUploadResponse {
|
|
421
|
+
ok: true;
|
|
422
|
+
job: TransferJobRecord;
|
|
423
|
+
/** Whether every part has landed and the file is stored. */
|
|
424
|
+
complete: boolean;
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* `analyze`: read the file and propose a mapping. Re-run with `mapping` to
|
|
428
|
+
* see the file under it: each mapped field's derivations, its picklist
|
|
429
|
+
* values, and how the rows match existing records under `matchKeys`.
|
|
430
|
+
*/
|
|
431
|
+
export interface TransferAnalyzeRequest extends TransferJobRequest, Partial<Omit<TransferReadChoices, 'mapping'>> {
|
|
432
|
+
mapping?: Record<number, string | null>;
|
|
433
|
+
}
|
|
434
|
+
/** One mapped picklist column's values against the organization's list. */
|
|
435
|
+
export interface TransferPicklistAnalysis {
|
|
436
|
+
fieldId: string;
|
|
437
|
+
picklistId: string;
|
|
438
|
+
spec: PicklistSpec;
|
|
439
|
+
set: PicklistValueSet;
|
|
440
|
+
matched: PicklistMatched[];
|
|
441
|
+
unmatched: PicklistUnmatched[];
|
|
442
|
+
/** The proposed choice for each unmatched value, by its key — shown, never applied unseen. */
|
|
443
|
+
proposals: Record<string, PicklistValueChoice>;
|
|
444
|
+
}
|
|
445
|
+
export interface TransferAnalyzeResponse {
|
|
446
|
+
ok: true;
|
|
447
|
+
job: TransferJobRecord;
|
|
448
|
+
headers: string[];
|
|
449
|
+
rowCount: number;
|
|
450
|
+
/** The first rows, as text, in column order. */
|
|
451
|
+
samples: string[][];
|
|
452
|
+
catalog: TransferFieldCatalog;
|
|
453
|
+
match: HeaderMatchResult;
|
|
454
|
+
/** The problems of the mapping analyzed (`mapping`, or the proposal). */
|
|
455
|
+
mappingProblems: MappingProblems;
|
|
456
|
+
matchKeys: MatchKeySpec[];
|
|
457
|
+
lockedRules: TransferLockedRule[];
|
|
458
|
+
picklists: TransferPicklistAnalysis[];
|
|
459
|
+
/** With `mapping`: what reading each mapped field did, over every row. */
|
|
460
|
+
derivations?: TransferDerivationSummary[];
|
|
461
|
+
/** With `mapping`: each mapped lookup column's values that name no record, with suggestions. */
|
|
462
|
+
lookups?: TransferLookupReview[];
|
|
463
|
+
/** With `mapping`: the rows against existing records. */
|
|
464
|
+
matches?: TransferMatchReview;
|
|
465
|
+
/** Record id → a name for it, for the records `matches` names. */
|
|
466
|
+
recordLabels?: Record<string, string>;
|
|
467
|
+
}
|
|
468
|
+
/** Per mapped picklist field, the choice for each unmatched value by its key. */
|
|
469
|
+
export type TransferPicklistChoices = Record<string, Record<string, PicklistValueChoice>>;
|
|
470
|
+
/** The person's choices a dry run is built from. */
|
|
471
|
+
export interface TransferPlanChoices extends Omit<TransferReadChoices, 'mapping'> {
|
|
472
|
+
/** Column → field id; `null` leaves a column out. */
|
|
473
|
+
mapping: Record<number, string | null>;
|
|
474
|
+
/** The match keys to use, by field id, in priority order; the resource's own order when absent. */
|
|
475
|
+
matchKeys?: string[];
|
|
476
|
+
/** The policy; the resource's locked rules are applied over it whatever it says. */
|
|
477
|
+
policy?: Partial<Omit<TransferPolicy, 'locked'>>;
|
|
478
|
+
picklistChoices?: TransferPicklistChoices;
|
|
479
|
+
derive?: DeriveOptions;
|
|
480
|
+
/** What a plugin's extra wizard steps collected (a consent attestation), by step id. */
|
|
481
|
+
extras?: Record<string, unknown>;
|
|
482
|
+
}
|
|
483
|
+
/** `plan`: build the dry run. */
|
|
484
|
+
export interface TransferPlanRequest extends TransferJobRequest, TransferPlanChoices {
|
|
485
|
+
action?: 'plan';
|
|
486
|
+
}
|
|
487
|
+
/** `plan` with `action: 'rows'`: one page of the stored dry run. */
|
|
488
|
+
export interface TransferPlanRowsRequest extends TransferJobRequest {
|
|
489
|
+
action: 'rows';
|
|
490
|
+
offset?: number;
|
|
491
|
+
limit?: number;
|
|
492
|
+
/** Only rows with these verdicts. */
|
|
493
|
+
verdicts?: TransferRowVerdict[];
|
|
494
|
+
}
|
|
495
|
+
export interface TransferPlanRowsPage {
|
|
496
|
+
rows: PlannedTransferRow[];
|
|
497
|
+
offset: number;
|
|
498
|
+
/** The offset of the next page, or `null` after the last. */
|
|
499
|
+
next: number | null;
|
|
500
|
+
}
|
|
501
|
+
export interface TransferPlanResponse {
|
|
502
|
+
ok: true;
|
|
503
|
+
job: TransferJobRecord;
|
|
504
|
+
summary: TransferPlanSummary;
|
|
505
|
+
warnings: TransferWarning[];
|
|
506
|
+
acknowledgementsRequired: TransferWarningClass[];
|
|
507
|
+
matchSummary: Record<RowMatchOutcome['kind'], number>;
|
|
508
|
+
invariantFailures: TransferPlanInvariantFailure[];
|
|
509
|
+
invariantFailureCount: number;
|
|
510
|
+
picklistAdditions: Record<string, PicklistValue[]>;
|
|
511
|
+
/** The first page of planned rows. */
|
|
512
|
+
rows: TransferPlanRowsPage;
|
|
513
|
+
/** Up to {@link TRANSFER_PLAN_SAMPLE_PER_VERDICT} rows of each verdict, in row order. */
|
|
514
|
+
sample: PlannedTransferRow[];
|
|
515
|
+
/** Matched rows whose file values differ from the record's, at most {@link TRANSFER_PLAN_CONFLICTS_MAX}. */
|
|
516
|
+
conflicts: TransferConflict[];
|
|
517
|
+
/** Every such row, counted. */
|
|
518
|
+
conflictCount: number;
|
|
519
|
+
/** Rows more than one record matched. */
|
|
520
|
+
ambiguous: TransferAmbiguity[];
|
|
521
|
+
/** Record id → a name for it, for the records the sample, conflicts and ambiguous rows name. */
|
|
522
|
+
recordLabels: Record<string, string>;
|
|
523
|
+
}
|
|
524
|
+
export interface TransferPlanRowsResponse {
|
|
525
|
+
ok: true;
|
|
526
|
+
rows: TransferPlanRowsPage;
|
|
527
|
+
}
|
|
528
|
+
/** `apply`: write chunks until the request's budget runs out. */
|
|
529
|
+
export interface TransferApplyRequest extends TransferJobRequest {
|
|
530
|
+
/** The warning classes the person acknowledged; required on the first call. */
|
|
531
|
+
acknowledged?: TransferWarningClass[];
|
|
532
|
+
}
|
|
533
|
+
export interface TransferApplyResponse {
|
|
534
|
+
ok: true;
|
|
535
|
+
job: TransferJobRecord;
|
|
536
|
+
progress: TransferProgress;
|
|
537
|
+
/** Every chunk is written; stop calling. */
|
|
538
|
+
done: boolean;
|
|
539
|
+
/** The results of the chunks this call wrote. */
|
|
540
|
+
results: TransferRowResult[];
|
|
541
|
+
}
|
|
542
|
+
/** `status`: where the job stands; `download: 'results'` answers the result file, `include: 'results'` adds every row's result. */
|
|
543
|
+
export interface TransferStatusRequest extends TransferJobRequest {
|
|
544
|
+
download?: 'results';
|
|
545
|
+
include?: 'results';
|
|
546
|
+
}
|
|
547
|
+
export interface TransferStatusResponse {
|
|
548
|
+
ok: true;
|
|
549
|
+
job: TransferJobRecord;
|
|
550
|
+
progress: TransferProgress;
|
|
551
|
+
undo: {
|
|
552
|
+
available: boolean;
|
|
553
|
+
/** When undo closes, or `null` before the job is applied. */
|
|
554
|
+
expiresAt: number | null;
|
|
555
|
+
state: TransferUndoState | null;
|
|
556
|
+
};
|
|
557
|
+
/** With `include: 'results'`: every written row's result, in row order. */
|
|
558
|
+
rows?: TransferRowResult[];
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* The header a result file carries with its row count, so the client can
|
|
562
|
+
* tell a whole download from a cut-off one (`exportShortfall`).
|
|
563
|
+
*/
|
|
564
|
+
export declare const TRANSFER_EXPORT_ROWS_HEADER = "X-Aglyn-Export-Rows";
|
|
565
|
+
/** The result file's columns after the file's own: what happened to the row, why, and the record. */
|
|
566
|
+
export declare const TRANSFER_RESULT_COLUMNS: readonly ["Outcome", "Reason", "Record ID"];
|
|
567
|
+
/** One row of the result file, before it is written as CSV. */
|
|
568
|
+
export interface TransferResultFileRow {
|
|
569
|
+
cells: string[];
|
|
570
|
+
result: TransferRowResult | null;
|
|
571
|
+
}
|
|
572
|
+
/** What the person decided for one record edited since the import. */
|
|
573
|
+
export type TransferUndoDecision = 'revert' | 'keep';
|
|
574
|
+
/** `undo` with `action: 'plan'`: what undo would do. Writes nothing. */
|
|
575
|
+
export interface TransferUndoPlanRequest extends TransferJobRequest {
|
|
576
|
+
action: 'plan';
|
|
577
|
+
offset?: number;
|
|
578
|
+
limit?: number;
|
|
579
|
+
}
|
|
580
|
+
/** A record edited since the import: what it holds now, and what undo would put back. */
|
|
581
|
+
export interface TransferUndoConflict {
|
|
582
|
+
row: number;
|
|
583
|
+
recordId: string;
|
|
584
|
+
/** A name for the record, from what it holds now. */
|
|
585
|
+
label?: string;
|
|
586
|
+
action: 'created' | 'updated';
|
|
587
|
+
/** The fields edited since the import. */
|
|
588
|
+
fields: string[];
|
|
589
|
+
/** Those fields as the record holds them now. */
|
|
590
|
+
current: Record<string, unknown>;
|
|
591
|
+
/** What undo would restore them to; empty for a created record (undo deletes it). */
|
|
592
|
+
restore: Record<string, unknown>;
|
|
593
|
+
}
|
|
594
|
+
export interface TransferUndoPlanResponse {
|
|
595
|
+
ok: true;
|
|
596
|
+
job: TransferJobRecord;
|
|
597
|
+
counts: TransferUndoCounts;
|
|
598
|
+
conflicts: TransferUndoConflict[];
|
|
599
|
+
offset: number;
|
|
600
|
+
next: number | null;
|
|
601
|
+
expiresAt: number | null;
|
|
602
|
+
}
|
|
603
|
+
/** `undo` with `action: 'apply'`: carry it out. Called again until `done`. */
|
|
604
|
+
export interface TransferUndoApplyRequest extends TransferJobRequest {
|
|
605
|
+
action: 'apply';
|
|
606
|
+
/** The person's decision per record id, for the conflicts the plan listed. */
|
|
607
|
+
decisions?: Record<string, TransferUndoDecision>;
|
|
608
|
+
/** For an edited record the decisions do not name — one edited after the plan was read. */
|
|
609
|
+
otherwise: TransferUndoDecision;
|
|
610
|
+
}
|
|
611
|
+
export interface TransferUndoApplyResponse {
|
|
612
|
+
ok: true;
|
|
613
|
+
job: TransferJobRecord;
|
|
614
|
+
undo: TransferUndoState;
|
|
615
|
+
done: boolean;
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* `export`: the chosen fields of the chosen records, streamed. The answer is
|
|
619
|
+
* the file (`text/csv`, `application/json` or `application/x-ndjson`) with
|
|
620
|
+
* the rows it promises in {@link TRANSFER_EXPORT_ROWS_HEADER} whenever the
|
|
621
|
+
* resource could count them before the first byte, or a
|
|
622
|
+
* {@link TransferErrorResponse}.
|
|
623
|
+
*/
|
|
624
|
+
export interface TransferExportRequest extends TransferOrgRequest, TransferExportChoice {
|
|
625
|
+
/** The site, for a host-scoped resource. */
|
|
626
|
+
hostId?: string | null;
|
|
627
|
+
}
|
|
628
|
+
/** One item a workspace holds, for the export picker. */
|
|
629
|
+
export interface TransferPackageListItem {
|
|
630
|
+
/** `<kind>/<id>`. */
|
|
631
|
+
key: string;
|
|
632
|
+
kind: string;
|
|
633
|
+
id: string;
|
|
634
|
+
name?: string;
|
|
635
|
+
/** What it names, so "include what they need" can be shown before the file is made. */
|
|
636
|
+
deps: PackageDependency[];
|
|
637
|
+
}
|
|
638
|
+
/** One package resource the workspace can move, and what it holds. */
|
|
639
|
+
export interface TransferPackageResourceList {
|
|
640
|
+
key: string;
|
|
641
|
+
label: string;
|
|
642
|
+
pluginId: string;
|
|
643
|
+
description?: string;
|
|
644
|
+
items: TransferPackageListItem[];
|
|
645
|
+
/** The resource's rules, shown with their reasons (an imported sequence is a draft). */
|
|
646
|
+
rules: TransferPackageRuleView[];
|
|
647
|
+
}
|
|
648
|
+
/** A plugin's rule an import cannot change, with why. */
|
|
649
|
+
export interface TransferPackageRuleView {
|
|
650
|
+
id: string;
|
|
651
|
+
label: string;
|
|
652
|
+
reason: string;
|
|
653
|
+
}
|
|
654
|
+
/** `action: 'list'`: the package resources the workspace can move, and their items. */
|
|
655
|
+
export interface TransferPackageListRequest extends TransferOrgRequest {
|
|
656
|
+
action: 'list';
|
|
657
|
+
/** Only these resources; every one when absent. */
|
|
658
|
+
resources?: string[];
|
|
659
|
+
}
|
|
660
|
+
export interface TransferPackageListResponse {
|
|
661
|
+
ok: true;
|
|
662
|
+
resources: TransferPackageResourceList[];
|
|
663
|
+
}
|
|
664
|
+
/**
|
|
665
|
+
* `action: 'export'`: the package file. `items` names item keys; absent,
|
|
666
|
+
* every item of `resources` (or of every resource). `dependencies` adds
|
|
667
|
+
* what the chosen items name that the workspace holds as package items.
|
|
668
|
+
*/
|
|
669
|
+
export interface TransferPackageExportRequest extends TransferOrgRequest {
|
|
670
|
+
action: 'export';
|
|
671
|
+
items?: string[];
|
|
672
|
+
resources?: string[];
|
|
673
|
+
dependencies?: boolean;
|
|
674
|
+
}
|
|
675
|
+
export interface TransferPackageExportResponse {
|
|
676
|
+
ok: true;
|
|
677
|
+
fileName: string;
|
|
678
|
+
package: TransferPackage;
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* `action: 'plan'`: what importing a package would do, writing nothing.
|
|
682
|
+
* The first call carries `package` and makes the job; later calls name
|
|
683
|
+
* `jobId` and carry the person's choices, and re-plan against the
|
|
684
|
+
* workspace as it is then.
|
|
685
|
+
*/
|
|
686
|
+
export interface TransferPackagePlanRequest extends TransferOrgRequest {
|
|
687
|
+
action: 'plan';
|
|
688
|
+
jobId?: string;
|
|
689
|
+
/** The file's parsed JSON, on the first call. */
|
|
690
|
+
package?: unknown;
|
|
691
|
+
fileName?: string;
|
|
692
|
+
decisions?: Record<string, PackageItemDecision>;
|
|
693
|
+
dependencyChoices?: Record<string, TransferPackageDependencyChoice>;
|
|
694
|
+
}
|
|
695
|
+
export interface TransferPackagePlanResponse {
|
|
696
|
+
ok: true;
|
|
697
|
+
job: TransferJobRecord;
|
|
698
|
+
items: TransferPackagePlanItem[];
|
|
699
|
+
references: TransferPackageReference[];
|
|
700
|
+
unknownKinds: string[];
|
|
701
|
+
summary: TransferPackageSummary;
|
|
702
|
+
blocking: string[];
|
|
703
|
+
acknowledgementsRequired: TransferPackageWarningClass[];
|
|
704
|
+
/** Each resource's label and rules, by resource key. */
|
|
705
|
+
resources: Record<string, {
|
|
706
|
+
label: string;
|
|
707
|
+
rules: TransferPackageRuleView[];
|
|
708
|
+
}>;
|
|
709
|
+
}
|
|
710
|
+
/** `action: 'apply'`: write the planned items. Called again until `done`. */
|
|
711
|
+
export interface TransferPackageApplyRequest extends TransferOrgRequest {
|
|
712
|
+
action: 'apply';
|
|
713
|
+
jobId: string;
|
|
714
|
+
acknowledged?: TransferPackageWarningClass[];
|
|
715
|
+
}
|
|
716
|
+
export interface TransferPackageApplyResponse {
|
|
717
|
+
ok: true;
|
|
718
|
+
job: TransferJobRecord;
|
|
719
|
+
done: boolean;
|
|
720
|
+
results: TransferRowResult[];
|
|
721
|
+
}
|
|
722
|
+
/** What undo needs to reverse one package item. */
|
|
723
|
+
export interface TransferPackageUndoEntry {
|
|
724
|
+
row: number;
|
|
725
|
+
key: string;
|
|
726
|
+
resource: string;
|
|
727
|
+
/** The id it was written under. */
|
|
728
|
+
id: string;
|
|
729
|
+
name?: string;
|
|
730
|
+
action: 'created' | 'updated';
|
|
731
|
+
/** A replaced item's content before the import. */
|
|
732
|
+
previous?: unknown;
|
|
733
|
+
previousHash?: string;
|
|
734
|
+
/** The item's content hash once written, to tell a later edit from the import's own. */
|
|
735
|
+
writtenHash?: string;
|
|
736
|
+
}
|
|
737
|
+
/** An item edited since the import: undo asks before it overwrites or deletes it. */
|
|
738
|
+
export interface TransferPackageUndoConflict {
|
|
739
|
+
row: number;
|
|
740
|
+
key: string;
|
|
741
|
+
resource: string;
|
|
742
|
+
id: string;
|
|
743
|
+
name?: string;
|
|
744
|
+
action: 'created' | 'updated';
|
|
745
|
+
}
|
|
746
|
+
/** `action: 'undoPlan'`: what undo would do. Writes nothing. */
|
|
747
|
+
export interface TransferPackageUndoPlanRequest extends TransferOrgRequest {
|
|
748
|
+
action: 'undoPlan';
|
|
749
|
+
jobId: string;
|
|
750
|
+
}
|
|
751
|
+
export interface TransferPackageUndoPlanResponse {
|
|
752
|
+
ok: true;
|
|
753
|
+
job: TransferJobRecord;
|
|
754
|
+
counts: TransferUndoCounts;
|
|
755
|
+
conflicts: TransferPackageUndoConflict[];
|
|
756
|
+
expiresAt: number | null;
|
|
757
|
+
}
|
|
758
|
+
/** `action: 'undo'`: carry undo out, each edited item as decided (`otherwise` for the rest). */
|
|
759
|
+
export interface TransferPackageUndoRequest extends TransferOrgRequest {
|
|
760
|
+
action: 'undo';
|
|
761
|
+
jobId: string;
|
|
762
|
+
/** By item id. */
|
|
763
|
+
decisions?: Record<string, TransferUndoDecision>;
|
|
764
|
+
otherwise: TransferUndoDecision;
|
|
765
|
+
}
|
|
766
|
+
export interface TransferPackageUndoResponse {
|
|
767
|
+
ok: true;
|
|
768
|
+
job: TransferJobRecord;
|
|
769
|
+
undo: TransferUndoState;
|
|
770
|
+
done: boolean;
|
|
771
|
+
}
|
|
772
|
+
/** The most jobs one page of the history holds. */
|
|
773
|
+
export declare const TRANSFER_JOBS_PAGE_MAX = 50;
|
|
774
|
+
/** `jobs`: the workspace's imports, newest first. */
|
|
775
|
+
export interface TransferJobsRequest extends TransferOrgRequest {
|
|
776
|
+
limit?: number;
|
|
777
|
+
/** The `next` of the page before. */
|
|
778
|
+
after?: number | null;
|
|
779
|
+
/** Also each site's package imports (`hosts/{hostId}/packageImports`), on the first page. */
|
|
780
|
+
sitePackages?: boolean;
|
|
781
|
+
/**
|
|
782
|
+
* Instead of the history, the caller's own unfinished imports of records
|
|
783
|
+
* (AGL-3549): every job they started that has not written anything, the
|
|
784
|
+
* ones the cleanup would expire — answered as `unfinished`.
|
|
785
|
+
*/
|
|
786
|
+
unfinished?: boolean;
|
|
787
|
+
/** Throw away one unfinished import of the caller's (`jobId`) now; answered `{ ok: true }`. */
|
|
788
|
+
action?: 'discard';
|
|
789
|
+
jobId?: string;
|
|
790
|
+
}
|
|
791
|
+
/** The most unfinished imports one answer lists. */
|
|
792
|
+
export declare const TRANSFER_UNFINISHED_IMPORTS_MAX = 50;
|
|
793
|
+
/** One of the caller's unfinished imports (AGL-3549), as Resume lists it. */
|
|
794
|
+
export interface TransferUnfinishedImportSummary {
|
|
795
|
+
jobId: string;
|
|
796
|
+
/** The resource key, naming the instance for one declared with `instances`. */
|
|
797
|
+
resource: string;
|
|
798
|
+
hostId: string | null;
|
|
799
|
+
fileName: string | null;
|
|
800
|
+
/** Where it stopped: before the dry run, after it, or failed before writing. */
|
|
801
|
+
status: 'draft' | 'analyzed' | 'planned' | 'failed';
|
|
802
|
+
/** When the person last worked on it, epoch ms. */
|
|
803
|
+
updatedAt: number;
|
|
804
|
+
/** What the resource is called. */
|
|
805
|
+
label: string;
|
|
806
|
+
}
|
|
807
|
+
/** The answer to `{ unfinished: true }`. */
|
|
808
|
+
export interface TransferUnfinishedImportsResponse {
|
|
809
|
+
ok: true;
|
|
810
|
+
unfinished: TransferUnfinishedImportSummary[];
|
|
811
|
+
}
|
|
812
|
+
/** The most package imports listed per site. */
|
|
813
|
+
export declare const TRANSFER_SITE_PACKAGE_IMPORTS_PER_SITE = 10;
|
|
814
|
+
/** One site package import (AGL-3533), as the hub's history lists it. */
|
|
815
|
+
export interface TransferSitePackageImportSummary {
|
|
816
|
+
hostId: string;
|
|
817
|
+
hostName: string | null;
|
|
818
|
+
importId: string;
|
|
819
|
+
status: 'applying' | 'applied' | 'refused' | 'failed' | 'undone';
|
|
820
|
+
actorEmail: string | null;
|
|
821
|
+
source: string | null;
|
|
822
|
+
startedAt: number;
|
|
823
|
+
appliedAt: number | null;
|
|
824
|
+
undoneAt: number | null;
|
|
825
|
+
/** Items by decision. */
|
|
826
|
+
counts: Record<string, number>;
|
|
827
|
+
items: number;
|
|
828
|
+
undo: {
|
|
829
|
+
available: boolean;
|
|
830
|
+
expiresAt: number | null;
|
|
831
|
+
};
|
|
832
|
+
error: string | null;
|
|
833
|
+
}
|
|
834
|
+
/** One import as the hub's history lists it. */
|
|
835
|
+
export interface TransferJobSummary {
|
|
836
|
+
id: string;
|
|
837
|
+
resource: string;
|
|
838
|
+
/** The resource's label, or "Package". */
|
|
839
|
+
label: string;
|
|
840
|
+
kind: TransferJob['kind'];
|
|
841
|
+
status: TransferJobStatus;
|
|
842
|
+
hostId: string | null;
|
|
843
|
+
fileName: string | null;
|
|
844
|
+
createdAt: number;
|
|
845
|
+
updatedAt: number;
|
|
846
|
+
createdBy: string;
|
|
847
|
+
/** The member's address, when the workspace still has them. */
|
|
848
|
+
createdByEmail: string | null;
|
|
849
|
+
rowCount: number;
|
|
850
|
+
results: TransferResultSummary | null;
|
|
851
|
+
appliedAt: number | null;
|
|
852
|
+
undo: {
|
|
853
|
+
available: boolean;
|
|
854
|
+
expiresAt: number | null;
|
|
855
|
+
status: TransferUndoState['status'] | null;
|
|
856
|
+
};
|
|
857
|
+
/** The per-row result file can be downloaded (`status` with `download: 'results'`). */
|
|
858
|
+
resultFile: boolean;
|
|
859
|
+
error: string | null;
|
|
860
|
+
}
|
|
861
|
+
export interface TransferJobsResponse {
|
|
862
|
+
ok: true;
|
|
863
|
+
jobs: TransferJobSummary[];
|
|
864
|
+
/** With `sitePackages`: each site's latest package imports, newest first. */
|
|
865
|
+
sitePackageImports?: TransferSitePackageImportSummary[];
|
|
866
|
+
/** The `createdAt` to ask the next page `after`, or `null` after the last. */
|
|
867
|
+
next: number | null;
|
|
868
|
+
}
|
|
869
|
+
/** Why a request was refused. */
|
|
870
|
+
export type TransferErrorCode = 'unauthenticated' | 'forbidden' | 'notFound' | 'invalid' | 'tooLarge' | 'unsupportedFormat' | 'rejectedFile' | 'state' | 'busy' | 'acknowledgementsMissing' | 'choicesNeeded' | 'undoExpired' | 'rateLimited' | 'unavailable' | 'failed'
|
|
871
|
+
/**
|
|
872
|
+
* The workspace's plan does not carry the resource's feature. Never on
|
|
873
|
+
* the wire: the route answers a {@link TransferPlanRequiredResponse}, and
|
|
874
|
+
* a client reads it as this code.
|
|
875
|
+
*/
|
|
876
|
+
| 'planRequired';
|
|
877
|
+
/** Every refusal's body. */
|
|
878
|
+
export interface TransferErrorResponse {
|
|
879
|
+
error: string;
|
|
880
|
+
code: TransferErrorCode;
|
|
881
|
+
/** What the client needs to fix it: the missing acknowledgements, the mapping problems, the open picklist values. */
|
|
882
|
+
details?: unknown;
|
|
883
|
+
}
|
|
884
|
+
/** The `reason` of a refusal for the workspace's plan — the REST API's `error.type`. */
|
|
885
|
+
export declare const TRANSFER_PLAN_REQUIRED = "plan_required";
|
|
886
|
+
/**
|
|
887
|
+
* The body of a refusal for the workspace's plan (AGL-3555), answered with
|
|
888
|
+
* 403: the flat shape every plan-gated console route answers (the CRM's
|
|
889
|
+
* `suite-gate.ts`), so a transfer route refuses a plan exactly as the
|
|
890
|
+
* owning plugin's own routes do. `code` is the plan feature
|
|
891
|
+
* (`TransferResourceDescriptor.featureFlag`, the REST `error.code`);
|
|
892
|
+
* `error` the sentence a client relays unchanged.
|
|
893
|
+
*/
|
|
894
|
+
export interface TransferPlanRequiredResponse {
|
|
895
|
+
error: string;
|
|
896
|
+
reason: typeof TRANSFER_PLAN_REQUIRED;
|
|
897
|
+
code: string;
|
|
898
|
+
}
|