@kardalum/plugin-sdk 0.19.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +211 -0
- package/README.md +19 -0
- package/dist/admin-section-registry.d.ts +16 -1
- package/dist/admin-section-registry.js +23 -0
- package/dist/built-in-editor-ids.d.ts +1 -1
- package/dist/built-in-editor-ids.js +2 -20
- package/dist/built-in-settings-schemas.d.ts +10 -0
- package/dist/built-in-settings-schemas.js +86 -0
- package/dist/built-in-value-schemas.js +35 -0
- package/dist/built-ins.js +38 -7
- package/dist/capabilities.d.ts +11 -1
- package/dist/capabilities.js +55 -3
- package/dist/cli.d.ts +66 -0
- package/dist/cli.js +22 -0
- package/dist/content-library.d.ts +85 -0
- package/dist/content-library.js +15 -0
- package/dist/content-picker/page-picker-sheet.d.ts +13 -0
- package/dist/content-picker/page-picker-sheet.js +105 -0
- package/dist/content-picker/page-tree.d.ts +25 -0
- package/dist/content-picker/page-tree.js +132 -0
- package/dist/data-type-plugin.d.ts +7 -1
- package/dist/datatype-validation.d.ts +4 -9
- package/dist/datatype-validation.js +139 -1
- package/dist/entitlement-entry.d.ts +1 -1
- package/dist/entitlement-entry.js +1 -1
- package/dist/entitlement-gate.d.ts +14 -0
- package/dist/entitlement-gate.js +64 -7
- package/dist/entitlement-plan.d.ts +6 -0
- package/dist/entitlement-plan.js +10 -0
- package/dist/entitlement-types.d.ts +36 -12
- package/dist/entitlement.d.ts +31 -4
- package/dist/entitlement.js +58 -17
- package/dist/hook-entry.d.ts +5 -0
- package/dist/hook-entry.js +30 -0
- package/dist/host-entry.d.ts +1 -1
- package/dist/host-entry.js +1 -1
- package/dist/index.d.ts +36 -4
- package/dist/index.js +50 -3
- package/dist/mail.d.ts +30 -0
- package/dist/mail.js +1 -0
- package/dist/manifest-entry.d.ts +29 -4
- package/dist/manifest-entry.js +39 -2
- package/dist/manifest-schema.d.ts +443 -29
- package/dist/manifest-schema.js +285 -23
- package/dist/manifest.d.ts +450 -51
- package/dist/manifest.js +1 -1
- package/dist/media/media-picker.js +31 -18
- package/dist/media/upload-error.d.ts +5 -1
- package/dist/media/upload-error.js +14 -2
- package/dist/media-library.d.ts +32 -0
- package/dist/media-library.js +15 -0
- package/dist/nested-field-host.d.ts +76 -0
- package/dist/nested-field-host.js +90 -0
- package/dist/notify.d.ts +12 -4
- package/dist/notify.js +1 -1
- package/dist/outbound.d.ts +47 -0
- package/dist/outbound.js +1 -0
- package/dist/plugin-context.d.ts +5 -0
- package/dist/plugin-screen-context.d.ts +112 -0
- package/dist/plugin-screen-context.js +26 -0
- package/dist/providers.d.ts +268 -0
- package/dist/providers.js +74 -0
- package/dist/read-all-pages.d.ts +5 -0
- package/dist/read-all-pages.js +3 -2
- package/dist/richtext/block-panel.js +11 -6
- package/dist/richtext/insert-menu.js +9 -6
- package/dist/richtext/style-listbox.js +6 -4
- package/dist/sdk-strings.d.ts +285 -0
- package/dist/sdk-strings.js +347 -0
- package/dist/sealing.d.ts +14 -0
- package/dist/sealing.js +1 -0
- package/dist/simple-storage-value-provider.js +24 -24
- package/dist/structured-storage-types.d.ts +309 -9
- package/dist/text-entry.d.ts +1 -0
- package/dist/text-entry.js +6 -0
- package/dist/tokens/tailwind-theme.css +5 -0
- package/dist/tokens/tokens.css +15 -3
- package/dist/tokens/tokens.json +8 -3
- package/dist/views/asset-view.js +4 -1
- package/dist/views/content-list-preview.js +3 -1
- package/dist/views/content-list-settings-view.js +11 -7
- package/dist/views/content-list-view.d.ts +5 -3
- package/dist/views/content-list-view.js +38 -34
- package/dist/views/content-picker-view.d.ts +3 -0
- package/dist/views/content-picker-view.js +143 -0
- package/dist/views/crop-view.d.ts +4 -6
- package/dist/views/crop-view.js +22 -13
- package/dist/views/date-range-view.js +4 -1
- package/dist/views/file-upload-view.d.ts +5 -7
- package/dist/views/file-upload-view.js +16 -7
- package/dist/views/group-view.d.ts +8 -0
- package/dist/views/group-view.js +123 -0
- package/dist/views/html-view.js +7 -6
- package/dist/views/image-view.js +37 -19
- package/dist/views/link-view.d.ts +3 -0
- package/dist/views/link-view.js +150 -0
- package/dist/views/options-list-view.d.ts +3 -0
- package/dist/views/options-list-view.js +104 -0
- package/dist/views/repeatable-list-view.d.ts +3 -0
- package/dist/views/repeatable-list-view.js +113 -0
- package/dist/views/rich-text-view.js +28 -13
- package/dist/views/suggest-key.d.ts +17 -0
- package/dist/views/suggest-key.js +55 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.d.ts +215 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.js +179 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.js +10 -0
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.d.ts +10 -0
- package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.js +5 -0
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.d.ts +7 -1
- package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +4 -2
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.js +27 -0
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.d.ts +65 -0
- package/node_modules/@kardalum/api-schemas/dist/capability-detail.js +126 -0
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.d.ts +115 -3
- package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +58 -11
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +57 -2
- package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +137 -0
- package/node_modules/@kardalum/api-schemas/dist/content-path.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/content-path.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/content-search.schema.d.ts +50 -0
- package/node_modules/@kardalum/api-schemas/dist/content-search.schema.js +42 -0
- package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.d.ts +37 -0
- package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.js +19 -0
- package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/content.schema.d.ts +3 -0
- package/node_modules/@kardalum/api-schemas/dist/content.schema.js +10 -0
- package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.js +86 -0
- package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +10 -5
- package/node_modules/@kardalum/api-schemas/dist/core-actions.js +7 -4
- package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.d.ts +25 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.js +8 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.js +1 -1
- package/node_modules/@kardalum/api-schemas/dist/data-type-issue.d.ts +35 -0
- package/node_modules/@kardalum/api-schemas/dist/data-type-issue.js +60 -0
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +180 -15
- package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +41 -5
- package/node_modules/@kardalum/api-schemas/dist/document-type.schema.d.ts +24 -6
- package/node_modules/@kardalum/api-schemas/dist/document-type.schema.js +90 -5
- package/node_modules/@kardalum/api-schemas/dist/form-protection.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/form-protection.js +12 -0
- package/node_modules/@kardalum/api-schemas/dist/graphql-limits.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/graphql-limits.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/held-embed-words.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/held-embed-words.js +70 -0
- package/node_modules/@kardalum/api-schemas/dist/index.d.ts +117 -41
- package/node_modules/@kardalum/api-schemas/dist/index.js +89 -26
- package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.d.ts +9 -0
- package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.js +9 -0
- package/node_modules/@kardalum/api-schemas/dist/legal-anchors.d.ts +8 -0
- package/node_modules/@kardalum/api-schemas/dist/legal-anchors.js +9 -0
- package/node_modules/@kardalum/api-schemas/dist/licensing.schema.d.ts +63 -0
- package/node_modules/@kardalum/api-schemas/dist/licensing.schema.js +54 -0
- package/node_modules/@kardalum/api-schemas/dist/mail-rules.d.ts +224 -0
- package/node_modules/@kardalum/api-schemas/dist/mail-rules.js +404 -0
- package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.d.ts +8 -0
- package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.js +4 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.d.ts +145 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.js +154 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +312 -8
- package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +43 -3
- package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.d.ts +15 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.js +14 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.d.ts +131 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.js +272 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.d.ts +84 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.js +138 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.d.ts +20 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.js +49 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.d.ts +211 -0
- package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.js +424 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.d.ts +78 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.js +27 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.d.ts +70 -0
- package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.js +43 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +22 -0
- package/node_modules/@kardalum/api-schemas/dist/media-api.schema.js +13 -1
- package/node_modules/@kardalum/api-schemas/dist/media-move.schema.d.ts +75 -0
- package/node_modules/@kardalum/api-schemas/dist/media-move.schema.js +53 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference-api.schema.d.ts +2 -2
- package/node_modules/@kardalum/api-schemas/dist/media-reference.d.ts +2 -0
- package/node_modules/@kardalum/api-schemas/dist/media-reference.js +55 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/media.schema.js +4 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.d.ts +204 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.js +370 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.d.ts +53 -0
- package/node_modules/@kardalum/api-schemas/dist/nested-validation.js +284 -0
- package/node_modules/@kardalum/api-schemas/dist/news.schema.d.ts +5 -5
- package/node_modules/@kardalum/api-schemas/dist/node-access.schema.d.ts +1 -2
- package/node_modules/@kardalum/api-schemas/dist/node-access.schema.js +1 -2
- package/node_modules/@kardalum/api-schemas/dist/notification-kinds.d.ts +145 -0
- package/node_modules/@kardalum/api-schemas/dist/notification-kinds.js +177 -0
- package/node_modules/@kardalum/api-schemas/dist/notification.schema.d.ts +258 -7
- package/node_modules/@kardalum/api-schemas/dist/notification.schema.js +96 -5
- package/node_modules/@kardalum/api-schemas/dist/page-address.d.ts +10 -0
- package/node_modules/@kardalum/api-schemas/dist/page-address.js +7 -0
- package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.d.ts +34 -0
- package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.js +60 -0
- package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.d.ts +28 -3
- package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.js +55 -8
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.d.ts +12 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.js +13 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-caller.d.ts +23 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-caller.js +16 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.d.ts +76 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.js +316 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.d.ts +42 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.js +74 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.d.ts +31 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.js +131 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +26 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +26 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +13 -5
- package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.d.ts +228 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.js +41 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.d.ts +26 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.js +55 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.d.ts +40 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.js +124 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.js +51 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.d.ts +32 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.js +102 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.d.ts +107 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.js +213 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.js +21 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.d.ts +44 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +38 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +237 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +205 -6
- package/node_modules/@kardalum/api-schemas/dist/plugin-labels.d.ts +26 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-labels.js +29 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.d.ts +32 -8
- package/node_modules/@kardalum/api-schemas/dist/plugin-locales.js +120 -14
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +335 -6
- package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +242 -2
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +16 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +34 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.d.ts +40 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.js +139 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +22 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +31 -1
- package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.d.ts +25 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.js +43 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.d.ts +107 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.js +150 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.d.ts +5 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.js +7 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-providers.d.ts +310 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-providers.js +430 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.d.ts +4 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.js +2 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.d.ts +45 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.js +99 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.d.ts +68 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.js +114 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.d.ts +342 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-settings.js +400 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.d.ts +180 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.js +612 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.d.ts +7 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.js +47 -4
- package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.d.ts +45 -0
- package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.js +197 -0
- package/node_modules/@kardalum/api-schemas/dist/plural-rules.d.ts +9 -0
- package/node_modules/@kardalum/api-schemas/dist/plural-rules.js +41 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.d.ts +41 -0
- package/node_modules/@kardalum/api-schemas/dist/public-api.schema.js +100 -12
- package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.d.ts +189 -0
- package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.js +164 -0
- package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +4 -4
- package/node_modules/@kardalum/api-schemas/dist/revenue-view.schema.js +7 -3
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.d.ts +6 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.js +82 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-text.d.ts +66 -0
- package/node_modules/@kardalum/api-schemas/dist/rich-text-text.js +497 -0
- package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.d.ts +82 -0
- package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.js +99 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.js +28 -0
- package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.d.ts +91 -1
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.d.ts +90 -8
- package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.js +59 -1
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +110 -0
- package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +34 -2
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.d.ts +384 -0
- package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.js +616 -0
- package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.d.ts +3 -3
- package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.d.ts +1 -1
- package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.js +26 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.d.ts +66 -0
- package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.js +160 -0
- package/node_modules/@kardalum/api-schemas/dist/template.schema.d.ts +1 -0
- package/node_modules/@kardalum/api-schemas/dist/template.schema.js +3 -0
- package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.js +29 -0
- package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.d.ts +13 -0
- package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.js +6 -0
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +58 -1
- package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +34 -3
- package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.d.ts +5 -1
- package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.js +4 -3
- package/node_modules/@kardalum/api-schemas/package.json +1 -0
- package/node_modules/@kardalum/design-tokens/dist/build-css.js +6 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.css +5 -0
- package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +1 -1
- package/node_modules/@kardalum/design-tokens/dist/tokens.css +15 -3
- package/node_modules/@kardalum/design-tokens/dist/tokens.d.ts +1 -1
- package/node_modules/@kardalum/design-tokens/dist/tokens.js +12 -3
- package/node_modules/@kardalum/design-tokens/dist/tokens.json +8 -3
- package/node_modules/@kardalum/design-tokens/dist/types.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +21 -2
- package/node_modules/@kardalum/plugin-package/dist/build-reference.js +8 -2
- package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +17 -10
- package/node_modules/@kardalum/plugin-package/dist/capabilities.js +355 -22
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/client-bundle.js +2 -0
- package/node_modules/@kardalum/plugin-package/dist/cms-range.d.ts +17 -0
- package/node_modules/@kardalum/plugin-package/dist/cms-range.js +353 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.js +26 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.d.ts +1 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.js +3 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.js +34 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.js +2 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.js +27 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.js +22 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/index.js +1 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.js +47 -5
- package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.d.ts +27 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.js +95 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/locales.js +9 -4
- package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.js +68 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/providers.d.ts +3 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/providers.js +298 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/registry.js +25 -4
- package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.js +91 -2
- package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.d.ts +6 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.js +140 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.d.ts +2 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.js +36 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/templates.d.ts +1 -0
- package/node_modules/@kardalum/plugin-package/dist/delivery/templates.js +21 -1
- package/node_modules/@kardalum/plugin-package/dist/delivery/types.d.ts +10 -0
- package/node_modules/@kardalum/plugin-package/dist/index.d.ts +4 -2
- package/node_modules/@kardalum/plugin-package/dist/index.js +2 -1
- package/node_modules/@kardalum/plugin-package/dist/license-verdict.d.ts +75 -0
- package/node_modules/@kardalum/plugin-package/dist/license-verdict.js +123 -0
- package/node_modules/@kardalum/ui/dist/components/switch.js +1 -1
- package/node_modules/@kardalum/ui/dist/components/tooltip.js +1 -2
- package/node_modules/@kardalum/ui/dist/components/truncated-text.d.ts +6 -1
- package/node_modules/@kardalum/ui/dist/components/truncated-text.js +5 -4
- package/package.json +12 -2
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const REFUND_REASON_MAX = 2000;
|
|
3
|
+
export declare const REFUND_NOTE_MAX = 1000;
|
|
4
|
+
export declare const WITHDRAWAL_NAME_MAX = 200;
|
|
5
|
+
export declare const REFUND_STATES: readonly ["open", "author-pending", "approved", "refunding", "refunded", "failed", "declined", "withdrawn"];
|
|
6
|
+
export type RefundState = (typeof REFUND_STATES)[number];
|
|
7
|
+
export declare const REFUND_DECIDERS: readonly ["promise", "author", "kardalum", "setting"];
|
|
8
|
+
export type RefundDecider = (typeof REFUND_DECIDERS)[number];
|
|
9
|
+
/** An invoice number is matched upper-cased and stored as entered; a key is matched as it is. */
|
|
10
|
+
export declare function referenceForMatch(reference: string): string;
|
|
11
|
+
/** The portal's "Ask for a refund" (D18). */
|
|
12
|
+
export declare const RefundAskInputSchema: z.ZodObject<{
|
|
13
|
+
licenseId: z.ZodString;
|
|
14
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$strict>;
|
|
16
|
+
export type RefundAskInput = z.infer<typeof RefundAskInputSchema>;
|
|
17
|
+
/** The buyer's Withdraw of an open or pending request (D4). */
|
|
18
|
+
export declare const RefundWithdrawInputSchema: z.ZodObject<{
|
|
19
|
+
requestId: z.ZodString;
|
|
20
|
+
}, z.core.$strict>;
|
|
21
|
+
/** The author's answer on the cases page (D4): a decline needs a note, which the buyer's email names. */
|
|
22
|
+
export declare const AuthorRefundDecisionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
23
|
+
decision: z.ZodLiteral<"agree">;
|
|
24
|
+
requestId: z.ZodString;
|
|
25
|
+
note: z.ZodOptional<z.ZodString>;
|
|
26
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
27
|
+
decision: z.ZodLiteral<"decline">;
|
|
28
|
+
requestId: z.ZodString;
|
|
29
|
+
note: z.ZodString;
|
|
30
|
+
}, z.core.$strict>], "decision">;
|
|
31
|
+
export type AuthorRefundDecision = z.infer<typeof AuthorRefundDecisionSchema>;
|
|
32
|
+
/** M32 I6b (G9): the most a person's partial refund may name, one million dollars. */
|
|
33
|
+
export declare const REFUND_AMOUNT_MAX_CENTS = 100000000;
|
|
34
|
+
/** M32 I6b (G9): a person's dollar amount ("12", "12.3", "12.34") as whole
|
|
35
|
+
* cents, or null. A linear scan: digits, at most one point, at most two
|
|
36
|
+
* decimals, at most nine whole digits, at least one cent. */
|
|
37
|
+
export declare function centsFromDollarText(text: string): number | null;
|
|
38
|
+
/** A person's actions on the operator's refunds list (D4, D13): a decision
|
|
39
|
+
* in the author's place carries the reasons; Finish the refund retries; Close with a note ends an owed sale a person finished outside. */
|
|
40
|
+
export declare const OperatorRefundActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
41
|
+
action: z.ZodLiteral<"refund">;
|
|
42
|
+
requestId: z.ZodString;
|
|
43
|
+
note: z.ZodString;
|
|
44
|
+
amountCents: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
46
|
+
action: z.ZodLiteral<"decline">;
|
|
47
|
+
requestId: z.ZodString;
|
|
48
|
+
note: z.ZodString;
|
|
49
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
50
|
+
action: z.ZodLiteral<"refund-anyway">;
|
|
51
|
+
requestId: z.ZodString;
|
|
52
|
+
note: z.ZodString;
|
|
53
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
54
|
+
action: z.ZodLiteral<"close">;
|
|
55
|
+
requestId: z.ZodString;
|
|
56
|
+
note: z.ZodString;
|
|
57
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
58
|
+
action: z.ZodLiteral<"finish">;
|
|
59
|
+
requestId: z.ZodString;
|
|
60
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
61
|
+
action: z.ZodLiteral<"finish-owed">;
|
|
62
|
+
purchaseId: z.ZodString;
|
|
63
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
64
|
+
action: z.ZodLiteral<"close-owed">;
|
|
65
|
+
purchaseId: z.ZodString;
|
|
66
|
+
note: z.ZodString;
|
|
67
|
+
markedAt: z.ZodString;
|
|
68
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
69
|
+
action: z.ZodLiteral<"close-outside">;
|
|
70
|
+
purchaseId: z.ZodString;
|
|
71
|
+
note: z.ZodString;
|
|
72
|
+
markedAt: z.ZodString;
|
|
73
|
+
markedId: z.ZodString;
|
|
74
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
75
|
+
action: z.ZodLiteral<"close-corrections">;
|
|
76
|
+
purchaseId: z.ZodString;
|
|
77
|
+
note: z.ZodString;
|
|
78
|
+
reachedCents: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
79
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
80
|
+
action: z.ZodLiteral<"correct-deduction">;
|
|
81
|
+
purchaseId: z.ZodString;
|
|
82
|
+
note: z.ZodString;
|
|
83
|
+
nonce: z.ZodString;
|
|
84
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
85
|
+
action: z.ZodLiteral<"check-corrections">;
|
|
86
|
+
purchaseId: z.ZodString;
|
|
87
|
+
}, z.core.$strict>], "action">;
|
|
88
|
+
export type OperatorRefundAction = z.infer<typeof OperatorRefundActionSchema>;
|
|
89
|
+
/** The accounts page's flag (D9): set by a person with reasons, cleared by a person. */
|
|
90
|
+
export declare const RefundFlagActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
91
|
+
action: z.ZodLiteral<"flag">;
|
|
92
|
+
developerId: z.ZodString;
|
|
93
|
+
note: z.ZodString;
|
|
94
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
95
|
+
action: z.ZodLiteral<"clear">;
|
|
96
|
+
developerId: z.ZodString;
|
|
97
|
+
}, z.core.$strict>], "action">;
|
|
98
|
+
export type RefundFlagAction = z.infer<typeof RefundFlagActionSchema>;
|
|
99
|
+
/** M32 I6 (F4, D3): the licences page's "Lift the chargeback revocation":
|
|
100
|
+
* the licence and a person's note on what reversed the bank's decision. */
|
|
101
|
+
export declare const ChargebackLiftActionSchema: z.ZodObject<{
|
|
102
|
+
licenseId: z.ZodString;
|
|
103
|
+
note: z.ZodString;
|
|
104
|
+
}, z.core.$strict>;
|
|
105
|
+
export type ChargebackLiftAction = z.infer<typeof ChargebackLiftActionSchema>;
|
|
106
|
+
/** M32 I6 (F5, D4): the accounts page's "Stop accepting purchases" and
|
|
107
|
+
* "Accept purchases again" on a flagged account. */
|
|
108
|
+
export declare const PurchasesStopActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
109
|
+
action: z.ZodLiteral<"stop">;
|
|
110
|
+
developerId: z.ZodString;
|
|
111
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
112
|
+
action: z.ZodLiteral<"resume">;
|
|
113
|
+
developerId: z.ZodString;
|
|
114
|
+
}, z.core.$strict>], "action">;
|
|
115
|
+
export type PurchasesStopAction = z.infer<typeof PurchasesStopActionSchema>;
|
|
116
|
+
/** M32 I6 (F6): the kinds of email the operator's "Emails not sent" screen
|
|
117
|
+
* lists, and what a person may do with a row of any. M32 I7 fix 2
|
|
118
|
+
* (legal-R2): "withdrawal-acknowledgement" is the withdrawal form's
|
|
119
|
+
* acknowledgement to the address the form gave. */
|
|
120
|
+
export declare const UNSENT_EMAIL_KINDS: readonly ["order-confirmation", "revocation", "withdrawal-acknowledgement"];
|
|
121
|
+
export type UnsentEmailKind = (typeof UNSENT_EMAIL_KINDS)[number];
|
|
122
|
+
export declare const UNSENT_EMAIL_ACTIONS: readonly ["resend", "sent-by-hand"];
|
|
123
|
+
export type UnsentEmailActionName = (typeof UNSENT_EMAIL_ACTIONS)[number];
|
|
124
|
+
/** M32 I6 (F6, F27): one action on one row of "Emails not sent". Both email
|
|
125
|
+
* tables' ids are uuids. `attest` is the box an order confirmation's hand
|
|
126
|
+
* mark needs; it stays optional here because the action answers a missing
|
|
127
|
+
* box with its own outcome (not-attested) rather than as an invalid form. */
|
|
128
|
+
export declare const UnsentEmailActionSchema: z.ZodObject<{
|
|
129
|
+
action: z.ZodEnum<{
|
|
130
|
+
resend: "resend";
|
|
131
|
+
"sent-by-hand": "sent-by-hand";
|
|
132
|
+
}>;
|
|
133
|
+
kind: z.ZodEnum<{
|
|
134
|
+
"order-confirmation": "order-confirmation";
|
|
135
|
+
revocation: "revocation";
|
|
136
|
+
"withdrawal-acknowledgement": "withdrawal-acknowledgement";
|
|
137
|
+
}>;
|
|
138
|
+
id: z.ZodString;
|
|
139
|
+
attest: z.ZodOptional<z.ZodLiteral<"yes">>;
|
|
140
|
+
}, z.core.$strict>;
|
|
141
|
+
export type UnsentEmailAction = z.infer<typeof UnsentEmailActionSchema>;
|
|
142
|
+
/** The no-login withdrawal form (D12): the box is the sentence "I hereby withdraw from the contract". */
|
|
143
|
+
export declare const WithdrawalFormInputSchema: z.ZodObject<{
|
|
144
|
+
name: z.ZodString;
|
|
145
|
+
email: z.ZodString;
|
|
146
|
+
reference: z.ZodString;
|
|
147
|
+
confirm: z.ZodLiteral<"yes">;
|
|
148
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
149
|
+
}, z.core.$strict>;
|
|
150
|
+
export type WithdrawalFormInput = z.infer<typeof WithdrawalFormInputSchema>;
|
|
151
|
+
/** What an author sees of a refund on their own plugin (author agreement
|
|
152
|
+
* `evidence`): the plugin, the plan, the amount, the buyer's reasons and who
|
|
153
|
+
* decided; never who bought it. Strict, so a field added to a query cannot
|
|
154
|
+
* ride along into the page. */
|
|
155
|
+
export declare const AuthorRefundRowSchema: z.ZodObject<{
|
|
156
|
+
id: z.ZodString;
|
|
157
|
+
pluginName: z.ZodString;
|
|
158
|
+
planName: z.ZodString;
|
|
159
|
+
licenceRef: z.ZodString;
|
|
160
|
+
amountCents: z.ZodNumber;
|
|
161
|
+
requestedAt: z.ZodString;
|
|
162
|
+
daysSincePurchase: z.ZodNumber;
|
|
163
|
+
downloaded: z.ZodBoolean;
|
|
164
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
165
|
+
deadlineAt: z.ZodNullable<z.ZodString>;
|
|
166
|
+
state: z.ZodEnum<{
|
|
167
|
+
refunded: "refunded";
|
|
168
|
+
open: "open";
|
|
169
|
+
failed: "failed";
|
|
170
|
+
"author-pending": "author-pending";
|
|
171
|
+
approved: "approved";
|
|
172
|
+
refunding: "refunding";
|
|
173
|
+
declined: "declined";
|
|
174
|
+
withdrawn: "withdrawn";
|
|
175
|
+
}>;
|
|
176
|
+
decidedBy: z.ZodNullable<z.ZodEnum<{
|
|
177
|
+
promise: "promise";
|
|
178
|
+
kardalum: "kardalum";
|
|
179
|
+
author: "author";
|
|
180
|
+
setting: "setting";
|
|
181
|
+
}>>;
|
|
182
|
+
decidedAt: z.ZodNullable<z.ZodString>;
|
|
183
|
+
authorNote: z.ZodNullable<z.ZodString>;
|
|
184
|
+
closedByHand: z.ZodBoolean;
|
|
185
|
+
personDecides: z.ZodBoolean;
|
|
186
|
+
partialCents: z.ZodNullable<z.ZodNumber>;
|
|
187
|
+
refundCents: z.ZodNullable<z.ZodNumber>;
|
|
188
|
+
}, z.core.$strict>;
|
|
189
|
+
export type AuthorRefundRow = z.infer<typeof AuthorRefundRowSchema>;
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { CONTRACT_CANCEL_EMAIL_MAX, CONTRACT_CANCEL_REFERENCE_MAX, isInvoiceNumber, isLicenceKeyShape } from "./contract-cancel.schema.js";
|
|
3
|
+
import { isPayoutEmail } from "./marketplace-payouts.schema.js";
|
|
4
|
+
// S367f (refund policy `how-to`, § 356a BGB): the bodies of every refund
|
|
5
|
+
// action and the no-login withdrawal form. Every check over what a person
|
|
6
|
+
// types is a length cap and a character loop, never a pattern.
|
|
7
|
+
export const REFUND_REASON_MAX = 2000;
|
|
8
|
+
export const REFUND_NOTE_MAX = 1000;
|
|
9
|
+
export const WITHDRAWAL_NAME_MAX = 200;
|
|
10
|
+
export const REFUND_STATES = ["open", "author-pending", "approved", "refunding", "refunded", "failed", "declined", "withdrawn"];
|
|
11
|
+
// M32 I6f (S14): "setting" is a decline by the listing's "not refundable after a download".
|
|
12
|
+
export const REFUND_DECIDERS = ["promise", "author", "kardalum", "setting"];
|
|
13
|
+
const uuid = z.string().uuid();
|
|
14
|
+
const reason = z.string().trim().max(REFUND_REASON_MAX);
|
|
15
|
+
const note = z.string().trim().min(1).max(REFUND_NOTE_MAX);
|
|
16
|
+
/** An invoice number is matched upper-cased and stored as entered; a key is matched as it is. */
|
|
17
|
+
export function referenceForMatch(reference) {
|
|
18
|
+
return isInvoiceNumber(reference) ? reference.toUpperCase() : reference;
|
|
19
|
+
}
|
|
20
|
+
/** The portal's "Ask for a refund" (D18). */
|
|
21
|
+
export const RefundAskInputSchema = z.object({ licenseId: uuid, reason: reason.optional() }).strict();
|
|
22
|
+
/** The buyer's Withdraw of an open or pending request (D4). */
|
|
23
|
+
export const RefundWithdrawInputSchema = z.object({ requestId: uuid }).strict();
|
|
24
|
+
/** The author's answer on the cases page (D4): a decline needs a note, which the buyer's email names. */
|
|
25
|
+
export const AuthorRefundDecisionSchema = z.discriminatedUnion("decision", [
|
|
26
|
+
z.object({ decision: z.literal("agree"), requestId: uuid, note: z.string().trim().max(REFUND_NOTE_MAX).optional() }).strict(),
|
|
27
|
+
z.object({ decision: z.literal("decline"), requestId: uuid, note }).strict(),
|
|
28
|
+
]);
|
|
29
|
+
/** M32 I6b (G9): the most a person's partial refund may name, one million dollars. */
|
|
30
|
+
export const REFUND_AMOUNT_MAX_CENTS = 100_000_000;
|
|
31
|
+
/** M32 I6b (G9): a person's dollar amount ("12", "12.3", "12.34") as whole
|
|
32
|
+
* cents, or null. A linear scan: digits, at most one point, at most two
|
|
33
|
+
* decimals, at most nine whole digits, at least one cent. */
|
|
34
|
+
export function centsFromDollarText(text) {
|
|
35
|
+
const s = text.trim();
|
|
36
|
+
if (s.length === 0 || s.length > 12)
|
|
37
|
+
return null;
|
|
38
|
+
const dot = s.indexOf(".");
|
|
39
|
+
const whole = dot === -1 ? s : s.slice(0, dot);
|
|
40
|
+
const frac = dot === -1 ? "" : s.slice(dot + 1);
|
|
41
|
+
if (whole.length === 0 || whole.length > 9 || frac.length > 2 || (dot !== -1 && frac.length === 0))
|
|
42
|
+
return null;
|
|
43
|
+
for (let i = 0; i < whole.length + frac.length; i += 1) {
|
|
44
|
+
const c = (i < whole.length ? whole : frac).charCodeAt(i < whole.length ? i : i - whole.length);
|
|
45
|
+
if (c < 48 || c > 57)
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
const cents = Number(whole) * 100 + Number(frac.padEnd(2, "0"));
|
|
49
|
+
return Number.isSafeInteger(cents) && cents >= 1 && cents <= REFUND_AMOUNT_MAX_CENTS ? cents : null;
|
|
50
|
+
}
|
|
51
|
+
/** A person's actions on the operator's refunds list (D4, D13): a decision
|
|
52
|
+
* in the author's place carries the reasons; Finish the refund retries; Close with a note ends an owed sale a person finished outside. */
|
|
53
|
+
export const OperatorRefundActionSchema = z.discriminatedUnion("action", [
|
|
54
|
+
// M32 I6b (G9): a person may refund part of the sale; no amount asks for the rest.
|
|
55
|
+
z.object({ action: z.literal("refund"), requestId: uuid, note, amountCents: z.number().int().min(1).max(REFUND_AMOUNT_MAX_CENTS).optional() }).strict(),
|
|
56
|
+
z.object({ action: z.literal("decline"), requestId: uuid, note }).strict(),
|
|
57
|
+
// M32 I6f (S14, S17): a person refunds a request the listing's setting declined, with reasons.
|
|
58
|
+
z.object({ action: z.literal("refund-anyway"), requestId: uuid, note }).strict(),
|
|
59
|
+
z.object({ action: z.literal("close"), requestId: uuid, note }).strict(),
|
|
60
|
+
z.object({ action: z.literal("finish"), requestId: uuid }).strict(),
|
|
61
|
+
z.object({ action: z.literal("finish-owed"), purchaseId: uuid }).strict(),
|
|
62
|
+
// The period's owed row of a sale: a person settles it, then closes it here
|
|
63
|
+
// with a note. M32 I6c (money-6): `markedAt` is the owed mark as the page
|
|
64
|
+
// showed it, so a Close read before the mark was cleared and set again
|
|
65
|
+
// changes nothing.
|
|
66
|
+
z.object({ action: z.literal("close-owed"), purchaseId: uuid, note, markedAt: z.string().datetime() }).strict(),
|
|
67
|
+
// M32 I6c (U8, H12): a refund made outside the product that failed and
|
|
68
|
+
// that the period's row does not cover: a person makes it again at the
|
|
69
|
+
// provider, then closes this part with a note. Fix wave C (m4): `markedId`
|
|
70
|
+
// is the failing refund's id the mark showed, checked with its time.
|
|
71
|
+
z.object({ action: z.literal("close-outside"), purchaseId: uuid, note, markedAt: z.string().datetime(), markedId: z.string().min(1).max(255) }).strict(),
|
|
72
|
+
// M32 I6c (U9): a sale whose invoice's corrections or author's ledger is
|
|
73
|
+
// not level with what reached the buyer: a person settles it, then closes
|
|
74
|
+
// the row with a note. Fix wave (money-locks-8): `reachedCents` is what
|
|
75
|
+
// reached the buyer as the page showed it, so a Close read before a later
|
|
76
|
+
// check changed the figure changes nothing.
|
|
77
|
+
z.object({ action: z.literal("close-corrections"), purchaseId: uuid, note, reachedCents: z.string().regex(/^\d{1,15}$/).transform(Number) }).strict(),
|
|
78
|
+
// M32 I6c (U9): the author's deduction brought to what reached the buyer,
|
|
79
|
+
// with a note; `nonce` is the form's own id, drawn when it rendered, so a
|
|
80
|
+
// second press posts nothing more.
|
|
81
|
+
z.object({ action: z.literal("correct-deduction"), purchaseId: uuid, note, nonce: z.string().min(1).max(64) }).strict(),
|
|
82
|
+
// Fix wave C (m1): a corrections row's provider list read again, so a row
|
|
83
|
+
// whose reached amount is unknown gets its figure.
|
|
84
|
+
z.object({ action: z.literal("check-corrections"), purchaseId: uuid }).strict(),
|
|
85
|
+
]);
|
|
86
|
+
/** The accounts page's flag (D9): set by a person with reasons, cleared by a person. */
|
|
87
|
+
export const RefundFlagActionSchema = z.discriminatedUnion("action", [
|
|
88
|
+
z.object({ action: z.literal("flag"), developerId: uuid, note }).strict(),
|
|
89
|
+
z.object({ action: z.literal("clear"), developerId: uuid }).strict(),
|
|
90
|
+
]);
|
|
91
|
+
/** M32 I6 (F4, D3): the licences page's "Lift the chargeback revocation":
|
|
92
|
+
* the licence and a person's note on what reversed the bank's decision. */
|
|
93
|
+
export const ChargebackLiftActionSchema = z.object({ licenseId: uuid, note }).strict();
|
|
94
|
+
/** M32 I6 (F5, D4): the accounts page's "Stop accepting purchases" and
|
|
95
|
+
* "Accept purchases again" on a flagged account. */
|
|
96
|
+
export const PurchasesStopActionSchema = z.discriminatedUnion("action", [
|
|
97
|
+
z.object({ action: z.literal("stop"), developerId: uuid }).strict(),
|
|
98
|
+
z.object({ action: z.literal("resume"), developerId: uuid }).strict(),
|
|
99
|
+
]);
|
|
100
|
+
/** M32 I6 (F6): the kinds of email the operator's "Emails not sent" screen
|
|
101
|
+
* lists, and what a person may do with a row of any. M32 I7 fix 2
|
|
102
|
+
* (legal-R2): "withdrawal-acknowledgement" is the withdrawal form's
|
|
103
|
+
* acknowledgement to the address the form gave. */
|
|
104
|
+
export const UNSENT_EMAIL_KINDS = ["order-confirmation", "revocation", "withdrawal-acknowledgement"];
|
|
105
|
+
export const UNSENT_EMAIL_ACTIONS = ["resend", "sent-by-hand"];
|
|
106
|
+
/** M32 I6 (F6, F27): one action on one row of "Emails not sent". Both email
|
|
107
|
+
* tables' ids are uuids. `attest` is the box an order confirmation's hand
|
|
108
|
+
* mark needs; it stays optional here because the action answers a missing
|
|
109
|
+
* box with its own outcome (not-attested) rather than as an invalid form. */
|
|
110
|
+
export const UnsentEmailActionSchema = z
|
|
111
|
+
.object({
|
|
112
|
+
action: z.enum(UNSENT_EMAIL_ACTIONS),
|
|
113
|
+
kind: z.enum(UNSENT_EMAIL_KINDS),
|
|
114
|
+
id: uuid,
|
|
115
|
+
attest: z.literal("yes").optional(),
|
|
116
|
+
})
|
|
117
|
+
.strict();
|
|
118
|
+
/** The no-login withdrawal form (D12): the box is the sentence "I hereby withdraw from the contract". */
|
|
119
|
+
export const WithdrawalFormInputSchema = z
|
|
120
|
+
.object({
|
|
121
|
+
name: z.string().trim().min(1).max(WITHDRAWAL_NAME_MAX),
|
|
122
|
+
email: z.string().trim().toLowerCase().max(CONTRACT_CANCEL_EMAIL_MAX).refine(isPayoutEmail, "Enter an email address"),
|
|
123
|
+
reference: z.string().trim().max(CONTRACT_CANCEL_REFERENCE_MAX).refine((v) => isInvoiceNumber(v) || isLicenceKeyShape(v), "Enter an invoice number or a licence key"),
|
|
124
|
+
confirm: z.literal("yes"),
|
|
125
|
+
reason: reason.optional(),
|
|
126
|
+
})
|
|
127
|
+
.strict();
|
|
128
|
+
/** What an author sees of a refund on their own plugin (author agreement
|
|
129
|
+
* `evidence`): the plugin, the plan, the amount, the buyer's reasons and who
|
|
130
|
+
* decided; never who bought it. Strict, so a field added to a query cannot
|
|
131
|
+
* ride along into the page. */
|
|
132
|
+
export const AuthorRefundRowSchema = z
|
|
133
|
+
.object({
|
|
134
|
+
id: uuid,
|
|
135
|
+
pluginName: z.string(),
|
|
136
|
+
planName: z.string(),
|
|
137
|
+
licenceRef: z.string(),
|
|
138
|
+
amountCents: z.number().int(),
|
|
139
|
+
requestedAt: z.string(),
|
|
140
|
+
daysSincePurchase: z.number().int(),
|
|
141
|
+
downloaded: z.boolean(),
|
|
142
|
+
reason: z.string().nullable(),
|
|
143
|
+
deadlineAt: z.string().nullable(),
|
|
144
|
+
state: z.enum(REFUND_STATES),
|
|
145
|
+
decidedBy: z.enum(REFUND_DECIDERS).nullable(),
|
|
146
|
+
decidedAt: z.string().nullable(),
|
|
147
|
+
authorNote: z.string().nullable(),
|
|
148
|
+
/** S367h fix wave (I2): a person closed it by hand (Close). */
|
|
149
|
+
closedByHand: z.boolean(),
|
|
150
|
+
/** M32 I6 fix wave (L1, L5): a person at Kardalum decides this request,
|
|
151
|
+
* not the author (the licence changed plan or was transferred since the
|
|
152
|
+
* sale); the author's table offers no Agree or Decline. Only the flag:
|
|
153
|
+
* never who asked or who bought. */
|
|
154
|
+
personDecides: z.boolean(),
|
|
155
|
+
/** M32 I6b (G16): the part a person at Kardalum chose to refund, in
|
|
156
|
+
* cents, or null when the request asks for the rest of the sale. */
|
|
157
|
+
partialCents: z.number().int().nullable(),
|
|
158
|
+
/** Whole-part review tells-13: the amount the refund's attempt asked of
|
|
159
|
+
* the payment provider, once one was asked (it can be less than the part
|
|
160
|
+
* a person chose: never more than the sale still lacks), else null. The
|
|
161
|
+
* buyer's card shows the same figure. */
|
|
162
|
+
refundCents: z.number().int().nullable(),
|
|
163
|
+
})
|
|
164
|
+
.strict();
|
|
@@ -14,8 +14,8 @@ export declare const BlockParamTypeSchema: z.ZodEnum<{
|
|
|
14
14
|
boolean: "boolean";
|
|
15
15
|
text: "text";
|
|
16
16
|
image: "image";
|
|
17
|
-
textarea: "textarea";
|
|
18
17
|
choice: "choice";
|
|
18
|
+
textarea: "textarea";
|
|
19
19
|
}>;
|
|
20
20
|
export type BlockParamType = z.infer<typeof BlockParamTypeSchema>;
|
|
21
21
|
export declare const BlockParamSchema: z.ZodObject<{
|
|
@@ -25,8 +25,8 @@ export declare const BlockParamSchema: z.ZodObject<{
|
|
|
25
25
|
boolean: "boolean";
|
|
26
26
|
text: "text";
|
|
27
27
|
image: "image";
|
|
28
|
-
textarea: "textarea";
|
|
29
28
|
choice: "choice";
|
|
29
|
+
textarea: "textarea";
|
|
30
30
|
}>;
|
|
31
31
|
label: z.ZodString;
|
|
32
32
|
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -42,8 +42,8 @@ export declare const BlockListingSchema: z.ZodObject<{
|
|
|
42
42
|
boolean: "boolean";
|
|
43
43
|
text: "text";
|
|
44
44
|
image: "image";
|
|
45
|
-
textarea: "textarea";
|
|
46
45
|
choice: "choice";
|
|
46
|
+
textarea: "textarea";
|
|
47
47
|
}>;
|
|
48
48
|
label: z.ZodString;
|
|
49
49
|
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -60,8 +60,8 @@ export declare const BlockListResponseSchema: z.ZodArray<z.ZodObject<{
|
|
|
60
60
|
boolean: "boolean";
|
|
61
61
|
text: "text";
|
|
62
62
|
image: "image";
|
|
63
|
-
textarea: "textarea";
|
|
64
63
|
choice: "choice";
|
|
64
|
+
textarea: "textarea";
|
|
65
65
|
}>;
|
|
66
66
|
label: z.ZodString;
|
|
67
67
|
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
// S321b (spec 3a, D1 to D4): what the marketplace portal's Revenue page
|
|
3
3
|
// reads. Months are UTC calendar months as "YYYY-MM" (D3); money is whole
|
|
4
|
-
// USD cents after refunds (D4)
|
|
4
|
+
// USD cents after refunds (D4), the net also after payment fees (M32 I6e).
|
|
5
|
+
// No field names a buyer.
|
|
5
6
|
/** "YYYY-MM" with a month from 01 to 12. A linear scan with the length
|
|
6
7
|
* checked first, never a regex (the value comes from a query string). */
|
|
7
8
|
export function isRevenueMonthKey(value) {
|
|
@@ -26,6 +27,9 @@ export const REVENUE_PLUGIN_PARAM_MAX = 214;
|
|
|
26
27
|
export const RevenuePluginParamSchema = z.string().trim().min(1).max(REVENUE_PLUGIN_PARAM_MAX);
|
|
27
28
|
const Cents = z.number().int().nonnegative();
|
|
28
29
|
const Count = z.number().int().nonnegative();
|
|
30
|
+
/** M32 I6e (PF-12): what the author keeps after payment fees. Signed: a
|
|
31
|
+
* month whose only sale was refunded counts that sale's payment fee alone. */
|
|
32
|
+
const SignedCents = z.number().int();
|
|
29
33
|
export const RevenueMonthSchema = z
|
|
30
34
|
.object({
|
|
31
35
|
month: RevenueMonthKeySchema,
|
|
@@ -35,7 +39,7 @@ export const RevenueMonthSchema = z
|
|
|
35
39
|
renewals: Count,
|
|
36
40
|
lostSubscribers: Count,
|
|
37
41
|
planChanges: Count,
|
|
38
|
-
netCents:
|
|
42
|
+
netCents: SignedCents,
|
|
39
43
|
})
|
|
40
44
|
.strict();
|
|
41
45
|
export const RevenuePlanMonthSchema = z
|
|
@@ -51,7 +55,7 @@ export const RevenuePlanMonthSchema = z
|
|
|
51
55
|
renewals: Count,
|
|
52
56
|
lostSubscribers: Count,
|
|
53
57
|
recurringCents: Cents,
|
|
54
|
-
netCents:
|
|
58
|
+
netCents: SignedCents,
|
|
55
59
|
})
|
|
56
60
|
.strict();
|
|
57
61
|
export const RevenueNowSchema = z
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const RICH_TEXT_MAX_DEPTH = 100;
|
|
2
|
+
export declare const RICH_TEXT_MAX_NODES = 20000;
|
|
3
|
+
export declare const RICH_TEXT_NODE_TYPES: readonly string[];
|
|
4
|
+
export declare const RICH_TEXT_MARK_TYPES: readonly string[];
|
|
5
|
+
export type RichTextShapeProblem = "notDocument" | "unknownNode" | "unknownMark" | "badText" | "badAttrs" | "tooDeep" | "tooLarge";
|
|
6
|
+
export declare function richTextShapeProblem(value: unknown): RichTextShapeProblem | null;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// M32 I2 (A3): the shape check a rich text value passes before it is stored. It is a stack walk
|
|
2
|
+
// over the document, never a regular expression and never recursion, so a hostile 10,000-deep
|
|
3
|
+
// value ends at `tooDeep` instead of overflowing the stack. The type lists are the node and mark
|
|
4
|
+
// types the server's TipTap renderer handles; a type outside them is refused here.
|
|
5
|
+
export const RICH_TEXT_MAX_DEPTH = 100;
|
|
6
|
+
export const RICH_TEXT_MAX_NODES = 20_000;
|
|
7
|
+
export const RICH_TEXT_NODE_TYPES = [
|
|
8
|
+
"doc",
|
|
9
|
+
"text",
|
|
10
|
+
"paragraph",
|
|
11
|
+
"heading",
|
|
12
|
+
"bulletList",
|
|
13
|
+
"orderedList",
|
|
14
|
+
"listItem",
|
|
15
|
+
"blockquote",
|
|
16
|
+
"codeBlock",
|
|
17
|
+
"horizontalRule",
|
|
18
|
+
"hardBreak",
|
|
19
|
+
"image",
|
|
20
|
+
"table",
|
|
21
|
+
"tableRow",
|
|
22
|
+
"tableHeader",
|
|
23
|
+
"tableCell",
|
|
24
|
+
"kardalumBlock",
|
|
25
|
+
];
|
|
26
|
+
export const RICH_TEXT_MARK_TYPES = ["bold", "italic", "strike", "code", "underline", "link", "textStyleClass"];
|
|
27
|
+
function isRecord(value) {
|
|
28
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
29
|
+
}
|
|
30
|
+
export function richTextShapeProblem(value) {
|
|
31
|
+
if (!isRecord(value) || value.type !== "doc")
|
|
32
|
+
return "notDocument";
|
|
33
|
+
const stack = [{ node: value, depth: 1 }];
|
|
34
|
+
let count = 0;
|
|
35
|
+
while (stack.length > 0) {
|
|
36
|
+
const { node, depth } = stack.pop();
|
|
37
|
+
if (depth > RICH_TEXT_MAX_DEPTH)
|
|
38
|
+
return "tooDeep";
|
|
39
|
+
count += 1;
|
|
40
|
+
if (count > RICH_TEXT_MAX_NODES)
|
|
41
|
+
return "tooLarge";
|
|
42
|
+
if (!isRecord(node))
|
|
43
|
+
return "unknownNode";
|
|
44
|
+
const type = node.type;
|
|
45
|
+
if (typeof type !== "string" || !RICH_TEXT_NODE_TYPES.includes(type))
|
|
46
|
+
return "unknownNode";
|
|
47
|
+
// A document opens only at the root: the editor refuses a `doc` below it.
|
|
48
|
+
if (type === "doc" && depth > 1)
|
|
49
|
+
return "unknownNode";
|
|
50
|
+
if (type === "text") {
|
|
51
|
+
if (typeof node.text !== "string" || node.content !== undefined)
|
|
52
|
+
return "badText";
|
|
53
|
+
}
|
|
54
|
+
else if (node.text !== undefined) {
|
|
55
|
+
return "badText";
|
|
56
|
+
}
|
|
57
|
+
if (node.attrs !== undefined && !isRecord(node.attrs))
|
|
58
|
+
return "badAttrs";
|
|
59
|
+
if (node.marks !== undefined) {
|
|
60
|
+
// A `marks` that is not an array cannot hold a known mark, so it answers unknownMark.
|
|
61
|
+
if (!Array.isArray(node.marks))
|
|
62
|
+
return "unknownMark";
|
|
63
|
+
for (const mark of node.marks) {
|
|
64
|
+
if (!isRecord(mark) || typeof mark.type !== "string" || !RICH_TEXT_MARK_TYPES.includes(mark.type))
|
|
65
|
+
return "unknownMark";
|
|
66
|
+
if (mark.attrs !== undefined && !isRecord(mark.attrs))
|
|
67
|
+
return "badAttrs";
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
if (node.content !== undefined) {
|
|
71
|
+
if (!Array.isArray(node.content))
|
|
72
|
+
return "unknownNode";
|
|
73
|
+
// Every node on the stack is counted when it is popped, so a value whose stacked and new
|
|
74
|
+
// children already pass the limit is refused before a long `content` array is pushed.
|
|
75
|
+
if (count + stack.length + node.content.length > RICH_TEXT_MAX_NODES)
|
|
76
|
+
return "tooLarge";
|
|
77
|
+
for (const child of node.content)
|
|
78
|
+
stack.push({ node: child, depth: depth + 1 });
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/** How many nodes (rich text) or tags (HTML) a plain text reader visits before it stops. Not the
|
|
2
|
+
* stored shape's `RICH_TEXT_MAX_NODES` (20,000): this one bounds a read of any input. */
|
|
3
|
+
export declare const RICH_TEXT_READ_NODES_MAX = 100000;
|
|
4
|
+
/** The fewest nodes or tags a reader given `maxLength` may visit, however small `maxLength` is,
|
|
5
|
+
* so a short excerpt behind a few images or empty blocks still finds its text. */
|
|
6
|
+
export declare const RICH_TEXT_READ_NODES_FLOOR = 1024;
|
|
7
|
+
/** How many characters of HTML `htmlToText` reads (2 MiB); the rest is not read. */
|
|
8
|
+
export declare const HTML_TO_TEXT_INPUT_MAX: number;
|
|
9
|
+
/** The options of `richTextToText` and `htmlToText`. */
|
|
10
|
+
export interface PlainTextOptions {
|
|
11
|
+
/** Stop once this many characters are collected. A whole number of zero or more. */
|
|
12
|
+
maxLength?: number;
|
|
13
|
+
/** Called once when the reader stopped before the end: at `maxLength`, at the node or tag
|
|
14
|
+
* cap, or (HTML) at the input cap, or (rich text) when it left out a subtree deeper than
|
|
15
|
+
* `RICH_TEXT_MAX_DEPTH`. The text read so far is still returned. */
|
|
16
|
+
onCut?: () => void;
|
|
17
|
+
}
|
|
18
|
+
/** A node of the editor's document, as far as the walkers read it. */
|
|
19
|
+
export interface RichTextNode {
|
|
20
|
+
type?: unknown;
|
|
21
|
+
text?: unknown;
|
|
22
|
+
marks?: unknown;
|
|
23
|
+
content?: unknown;
|
|
24
|
+
attrs?: Record<string, unknown>;
|
|
25
|
+
}
|
|
26
|
+
/** Whether a value can be read as a node: an object that is not an array. */
|
|
27
|
+
export declare function isRichTextNode(value: unknown): value is RichTextNode;
|
|
28
|
+
/** A node's children, or null when its `content` is not a list. */
|
|
29
|
+
export declare function richTextChildrenOf(node: RichTextNode): unknown[] | null;
|
|
30
|
+
/** The node types that end a line of plain text. */
|
|
31
|
+
export declare const RICH_TEXT_TEXT_BLOCKS: ReadonlySet<string>;
|
|
32
|
+
/**
|
|
33
|
+
* A rich text field's value as plain text, for a search index, a summary or
|
|
34
|
+
* a native text view: the text runs in order, one line per block (a table
|
|
35
|
+
* cell is a block), a line break for a hard break. No markup, no escaping
|
|
36
|
+
* (the result is text, not HTML). A bare string comes back as it is (cut to
|
|
37
|
+
* `maxLength`). Stops at `maxLength` characters, and after
|
|
38
|
+
* `RICH_TEXT_READ_NODES_MAX` nodes or 4 times `maxLength` nodes (at least
|
|
39
|
+
* `RICH_TEXT_READ_NODES_FLOOR`), whichever is fewer; leaves out what lies
|
|
40
|
+
* past `RICH_TEXT_MAX_DEPTH` levels; `onCut` hears each. Called with no
|
|
41
|
+
* options (or neither option), it reads as 0.19's `@kardalum/client` did:
|
|
42
|
+
* the same text, with no node cap.
|
|
43
|
+
*/
|
|
44
|
+
export declare function richTextToText(doc: unknown, options?: PlainTextOptions): string;
|
|
45
|
+
/**
|
|
46
|
+
* The text a reader sees in a piece of HTML, for a word count, a search index
|
|
47
|
+
* or an excerpt. One left-to-right pass, no regular expression, no DOM. A tag
|
|
48
|
+
* of an inline element (`a`, `b`, `em`, `span`, `strong` and the rest of a
|
|
49
|
+
* closed set) is no break, so `Kar<b>da</b>lum` is one word; every other tag
|
|
50
|
+
* (`br` and `img` too) reads as a line break, never at the start and never two
|
|
51
|
+
* in a row. Each run of ASCII whitespace reads as one space (none at the start
|
|
52
|
+
* of a line, before a break or at the end), as a browser shows it; a decoded
|
|
53
|
+
* ` ` stays. Comments and the contents of `script`, `style` and
|
|
54
|
+
* `template` give nothing; `<` starts a tag
|
|
55
|
+
* only before an ASCII letter, `/`, `!` or `?`, otherwise it is text.
|
|
56
|
+
* `&`, `<`, `>`, `"`, `'`, ` ` and numeric references
|
|
57
|
+
* (`'`, `'`) are decoded: a numeric reference to U+0000, a surrogate
|
|
58
|
+
* or past U+10FFFF becomes U+FFFD, and one longer than 7 decimal or 6 hex
|
|
59
|
+
* digits, or without its `;`, stays as written, as does any other named
|
|
60
|
+
* reference. Reads at most `HTML_TO_TEXT_INPUT_MAX` characters of input and
|
|
61
|
+
* stops at `maxLength` characters of output, or after `RICH_TEXT_READ_NODES_MAX`
|
|
62
|
+
* tags or 4 times `maxLength` tags (at least `RICH_TEXT_READ_NODES_FLOOR`),
|
|
63
|
+
* whichever is fewer; `onCut` hears each.
|
|
64
|
+
* Never throws for any string (a value that is not one gives "").
|
|
65
|
+
*/
|
|
66
|
+
export declare function htmlToText(html: string, options?: PlainTextOptions): string;
|