@allyhub/sdk 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/define.d.ts +4 -0
- package/dist/define.js +1 -1
- package/dist/node_modules/@allyhub-next/audio/dist/node/index.d.ts +1 -1
- package/dist/node_modules/@allyhub-next/audio/dist/node/index.js +1 -1
- package/dist/node_modules/@allyhub-next/audio/dist/node/master.d.ts +4 -0
- package/dist/node_modules/@allyhub-next/audio/dist/node/master.js +1 -1
- package/dist/node_modules/@allyhub-next/audio/package.json +1 -1
- package/dist/node_modules/@allyhub-next/chart/dist/chart-xml.js +2 -2
- package/dist/node_modules/@allyhub-next/chart/dist/chart.d.ts +14 -5
- package/dist/node_modules/@allyhub-next/chart/dist/chart.js +1 -1
- package/dist/node_modules/@allyhub-next/chart/package.json +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/data/deck-code.d.ts +205 -0
- package/dist/node_modules/@allyhub-next/formats/dist/data/deck-code.js +2 -0
- package/dist/node_modules/@allyhub-next/formats/dist/data/script.d.ts +4 -1
- package/dist/node_modules/@allyhub-next/formats/dist/data/script.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/data/sheet.d.ts +248 -18
- package/dist/node_modules/@allyhub-next/formats/dist/data/sheet.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/data/slides.d.ts +1114 -91
- package/dist/node_modules/@allyhub-next/formats/dist/data/slides.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/data/website.d.ts +20 -0
- package/dist/node_modules/@allyhub-next/formats/dist/data/website.js +2 -0
- package/dist/node_modules/@allyhub-next/formats/dist/index.d.ts +4 -0
- package/dist/node_modules/@allyhub-next/formats/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/items.d.ts +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/items.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/media-type.d.ts +3 -0
- package/dist/node_modules/@allyhub-next/formats/dist/media-type.js +2 -0
- package/dist/node_modules/@allyhub-next/formats/dist/schemas.d.ts +625 -30
- package/dist/node_modules/@allyhub-next/formats/dist/schemas.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/strict.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/formats/dist/strict.js +1 -1
- package/dist/node_modules/@allyhub-next/formats/dist/zip.d.ts +17 -0
- package/dist/node_modules/@allyhub-next/formats/dist/zip.js +2 -0
- package/dist/node_modules/@allyhub-next/formats/package.json +2 -1
- package/dist/node_modules/@allyhub-next/ooxml/LICENSE +241 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/brightness.d.ts +31 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/brightness.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/color.d.ts +33 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/color.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/enums.d.ts +13 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/enums.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/ext.d.ts +79 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/ext.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/generated/enums.d.ts +132 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/generated/enums.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/generated/presets.d.ts +28 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/generated/presets.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/generated/spec.d.ts +4708 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/generated/spec.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/geometry/index.d.ts +57 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/geometry/index.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/index.d.ts +10 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/index.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/mce.d.ts +12 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/mce.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/node.d.ts +111 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/node.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/ns.d.ts +45 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/ns.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/opc.d.ts +48 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/opc.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/report.d.ts +45 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/report.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/xml.d.ts +28 -0
- package/dist/node_modules/@allyhub-next/ooxml/dist/xml.js +2 -0
- package/dist/node_modules/@allyhub-next/ooxml/package.json +26 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/account.d.ts +338 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/account.js +2 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/auth.d.ts +12 -13
- package/dist/node_modules/@allyhub-next/protocol/dist/auth.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/blobs.d.ts +35 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/blobs.js +2 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/cloud.d.ts +101 -32
- package/dist/node_modules/@allyhub-next/protocol/dist/cloud.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/editor.d.ts +89 -5
- package/dist/node_modules/@allyhub-next/protocol/dist/editor.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/files.d.ts +2 -2
- package/dist/node_modules/@allyhub-next/protocol/dist/index.d.ts +6 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/notes.d.ts +23 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/notes.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/open.d.ts +13 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/open.js +2 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/registry.d.ts +73 -59
- package/dist/node_modules/@allyhub-next/protocol/dist/registry.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/routes.d.ts +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/routes.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/shares.d.ts +115 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/shares.js +2 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/sites.d.ts +293 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/sites.js +2 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/snapshots.d.ts +377 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/snapshots.js +2 -0
- package/dist/node_modules/@allyhub-next/protocol/dist/teams.d.ts +27 -9
- package/dist/node_modules/@allyhub-next/protocol/dist/teams.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/dist/tools.d.ts +53 -14
- package/dist/node_modules/@allyhub-next/protocol/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub-next/protocol/package.json +2 -1
- package/dist/node_modules/@allyhub-next/runtimes/package.json +1 -1
- package/dist/node_modules/@allyhub-next/runtimes/schemas/runtimes.schema.json +25 -5
- package/dist/node_modules/@allyhub-next/scenery/package.json +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/api/capabilities.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/api/index.d.ts +1 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/api/index.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/api/page.d.ts +83 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/api/page.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/api/workbook.d.ts +40 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/api/workbook.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/analyse.d.ts +9 -3
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/analyse.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/coerce.d.ts +5 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/coerce.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/engine.d.ts +60 -13
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/engine.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/aggregate.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/convert.d.ts +4 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/convert.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/criteria.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/database.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/date.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/define.d.ts +27 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/define.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/delimiters.d.ts +16 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/delimiters.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/dynamic.d.ts +18 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/dynamic.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/finance.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/index.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/index.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/info.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/kernels.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/logical.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/lookup.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/maths.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/modern.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/modern.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/text.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/graph.d.ts +38 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/graph.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/indexes.d.ts +19 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/indexes.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/remote.d.ts +49 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/remote.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/server.d.ts +82 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/server.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/types.d.ts +6 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/calc/types.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/chart.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/check.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/diff.d.ts +15 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/diff.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/export.d.ts +29 -8
- package/dist/node_modules/@allyhub-next/sheet/dist/export.js +3 -4
- package/dist/node_modules/@allyhub-next/sheet/dist/file.js +2 -2
- package/dist/node_modules/@allyhub-next/sheet/dist/format.d.ts +8 -2
- package/dist/node_modules/@allyhub-next/sheet/dist/format.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/html.d.ts +52 -4
- package/dist/node_modules/@allyhub-next/sheet/dist/html.js +43 -11
- package/dist/node_modules/@allyhub-next/sheet/dist/index.d.ts +7 -3
- package/dist/node_modules/@allyhub-next/sheet/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/inspect.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/paginate.d.ts +98 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/paginate.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/structure.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/table-style.d.ts +32 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/table-style.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/table-styles.d.ts +3 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/table-styles.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/values.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/workbook.d.ts +10 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/workbook.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.d.ts +12 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/formula.d.ts +14 -4
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/formula.js +2 -2
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/functions.d.ts +11 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/functions.js +36 -16
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.d.ts +6 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.d.ts +44 -2
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.js +2 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/sax.d.ts +23 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/sax.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/styles.d.ts +2 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/styles.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/write.d.ts +6 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/write.js +1 -1
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/zip.d.ts +40 -0
- package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/zip.js +2 -0
- package/dist/node_modules/@allyhub-next/sheet/package.json +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/animation.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/api.d.ts +121 -44
- package/dist/node_modules/@allyhub-next/slides-core/dist/api.js +2 -2
- package/dist/node_modules/@allyhub-next/slides-core/dist/capabilities.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/chart-api.d.ts +50 -13
- package/dist/node_modules/@allyhub-next/slides-core/dist/chart-api.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/chart-file.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/check.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/code.d.ts +33 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/code.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/components.d.ts +31 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/components.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/enums.d.ts +188 -5
- package/dist/node_modules/@allyhub-next/slides-core/dist/enums.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/file.d.ts +43 -21
- package/dist/node_modules/@allyhub-next/slides-core/dist/file.js +3 -3
- package/dist/node_modules/@allyhub-next/slides-core/dist/identity.d.ts +17 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/identity.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/index.d.ts +5 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/lang.d.ts +6 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/lang.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/measure.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/merge.d.ts +58 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/merge.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/model.d.ts +38 -4
- package/dist/node_modules/@allyhub-next/slides-core/dist/office.d.ts +27 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/office.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/resolve.d.ts +26 -5
- package/dist/node_modules/@allyhub-next/slides-core/dist/resolve.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/script.d.ts +18 -16
- package/dist/node_modules/@allyhub-next/slides-core/dist/script.js +2 -2
- package/dist/node_modules/@allyhub-next/slides-core/dist/stage.d.ts +51 -53
- package/dist/node_modules/@allyhub-next/slides-core/dist/strict.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/units.d.ts +27 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/units.js +1 -1
- package/dist/node_modules/@allyhub-next/slides-core/dist/values.d.ts +7 -0
- package/dist/node_modules/@allyhub-next/slides-core/dist/values.js +2 -0
- package/dist/node_modules/@allyhub-next/slides-core/package.json +1 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/captions.js +6 -6
- package/dist/node_modules/@allyhub-next/video-core/dist/fact.d.ts +47 -8
- package/dist/node_modules/@allyhub-next/video-core/dist/fact.js +1 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/index.d.ts +1 -0
- package/dist/node_modules/@allyhub-next/video-core/dist/index.js +1 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/marks.d.ts +14 -0
- package/dist/node_modules/@allyhub-next/video-core/dist/marks.js +1 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/music.d.ts +2 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/piece.d.ts +11 -2
- package/dist/node_modules/@allyhub-next/video-core/dist/problem.d.ts +4 -0
- package/dist/node_modules/@allyhub-next/video-core/dist/problem.js +1 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/schema.d.ts +2 -2
- package/dist/node_modules/@allyhub-next/video-core/dist/schema.js +1 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/script.d.ts +2 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/script.js +1 -1
- package/dist/node_modules/@allyhub-next/video-core/dist/source.d.ts +7 -0
- package/dist/node_modules/@allyhub-next/video-core/dist/source.js +2 -0
- package/dist/node_modules/@allyhub-next/video-core/dist/timeline.d.ts +10 -33
- package/dist/node_modules/@allyhub-next/video-core/package.json +1 -1
- package/dist/sheets.d.ts +1 -1
- package/dist/sheets.js +1 -1
- package/dist/slides.d.ts +3 -1
- package/dist/slides.js +1 -1
- package/docs/README.md +1 -0
- package/docs/contract.md +1 -1
- package/docs/defaults.md +25 -2
- package/docs/layers.md +1 -1
- package/docs/project.md +3 -1
- package/docs/sheets.md +29 -3
- package/docs/slides.md +18 -14
- package/docs/sound.md +1 -1
- package/docs/websites.md +57 -0
- package/package.json +3 -1
|
@@ -8,10 +8,13 @@ export declare const BILLING_SUMMARY_PATH = "/api/billing/summary";
|
|
|
8
8
|
* no card saved, a Checkout still saving one, a saved method that is not a
|
|
9
9
|
* card, the card declined, the bank asking the person to confirm (3D
|
|
10
10
|
* Secure), Stripe not charging it for another reason, a top-up too small to
|
|
11
|
-
* clear its line, a top-up refunded, a payment disputed
|
|
11
|
+
* clear its line, a top-up refunded, a payment disputed, the month's limit
|
|
12
|
+
* of automatic charges reached (it starts again next month).
|
|
12
13
|
*/
|
|
13
|
-
export declare const AUTO_TOP_UP_STOPS: readonly ["no_card", "saving_card", "not_a_card", "declined", "needs_authentication", "not_charged", "under_line", "refunded", "disputed"];
|
|
14
|
+
export declare const AUTO_TOP_UP_STOPS: readonly ["no_card", "saving_card", "not_a_card", "declined", "needs_authentication", "not_charged", "under_line", "refunded", "disputed", "monthly_limit"];
|
|
14
15
|
export type AutoTopUpStop = (typeof AUTO_TOP_UP_STOPS)[number];
|
|
16
|
+
/** How often a plan is paid. */
|
|
17
|
+
export declare const BILLING_INTERVALS: readonly ["month", "year"];
|
|
15
18
|
export declare const BillingSummarySchema: z.ZodObject<{
|
|
16
19
|
credits: z.ZodNumber;
|
|
17
20
|
held: z.ZodNumber;
|
|
@@ -20,18 +23,32 @@ export declare const BillingSummarySchema: z.ZodObject<{
|
|
|
20
23
|
plan: z.ZodNullable<z.ZodObject<{
|
|
21
24
|
id: z.ZodString;
|
|
22
25
|
name: z.ZodString;
|
|
23
|
-
interval: z.ZodEnum<{
|
|
26
|
+
interval: z.ZodUnion<readonly [z.ZodEnum<{
|
|
24
27
|
month: "month";
|
|
25
28
|
year: "year";
|
|
26
|
-
}>;
|
|
29
|
+
}>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
|
|
27
30
|
status: z.ZodString;
|
|
28
31
|
renewsAt: z.ZodNullable<z.ZodISODateTime>;
|
|
29
32
|
endsAt: z.ZodNullable<z.ZodISODateTime>;
|
|
33
|
+
monthlyCredits: z.ZodDefault<z.ZodNumber>;
|
|
34
|
+
price: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
35
|
+
amountCents: z.ZodNumber;
|
|
36
|
+
currency: z.ZodString;
|
|
37
|
+
}, z.core.$strip>>>;
|
|
30
38
|
}, z.core.$strip>>;
|
|
39
|
+
allowance: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
40
|
+
total: z.ZodNumber;
|
|
41
|
+
used: z.ZodNumber;
|
|
42
|
+
renewsAt: z.ZodISODateTime;
|
|
43
|
+
}, z.core.$strip>>>;
|
|
44
|
+
bought: z.ZodDefault<z.ZodNumber>;
|
|
45
|
+
customer: z.ZodDefault<z.ZodBoolean>;
|
|
31
46
|
autoTopUp: z.ZodNullable<z.ZodObject<{
|
|
32
47
|
below: z.ZodNumber;
|
|
33
48
|
amountCents: z.ZodNumber;
|
|
34
|
-
|
|
49
|
+
monthlyLimitCents: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
50
|
+
chargedThisMonthCents: z.ZodDefault<z.ZodNumber>;
|
|
51
|
+
stopped: z.ZodNullable<z.ZodUnion<readonly [z.ZodEnum<{
|
|
35
52
|
no_card: "no_card";
|
|
36
53
|
saving_card: "saving_card";
|
|
37
54
|
not_a_card: "not_a_card";
|
|
@@ -41,7 +58,8 @@ export declare const BillingSummarySchema: z.ZodObject<{
|
|
|
41
58
|
under_line: "under_line";
|
|
42
59
|
refunded: "refunded";
|
|
43
60
|
disputed: "disputed";
|
|
44
|
-
|
|
61
|
+
monthly_limit: "monthly_limit";
|
|
62
|
+
}>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>>;
|
|
45
63
|
}, z.core.$strip>>;
|
|
46
64
|
}, z.core.$strip>;
|
|
47
65
|
export type BillingSummary = z.infer<typeof BillingSummarySchema>;
|
|
@@ -51,12 +69,14 @@ export declare const BillingPlansSchema: z.ZodObject<{
|
|
|
51
69
|
plans: z.ZodArray<z.ZodObject<{
|
|
52
70
|
id: z.ZodString;
|
|
53
71
|
name: z.ZodString;
|
|
72
|
+
family: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
73
|
+
recommended: z.ZodDefault<z.ZodBoolean>;
|
|
54
74
|
monthlyCredits: z.ZodNumber;
|
|
55
75
|
prices: z.ZodArray<z.ZodObject<{
|
|
56
|
-
interval: z.ZodEnum<{
|
|
76
|
+
interval: z.ZodUnion<readonly [z.ZodEnum<{
|
|
57
77
|
month: "month";
|
|
58
78
|
year: "year";
|
|
59
|
-
}>;
|
|
79
|
+
}>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
|
|
60
80
|
amountCents: z.ZodNumber;
|
|
61
81
|
currency: z.ZodString;
|
|
62
82
|
}, z.core.$strip>>;
|
|
@@ -66,15 +86,20 @@ export declare const BillingPlansSchema: z.ZodObject<{
|
|
|
66
86
|
creditsPerDollar: z.ZodNumber;
|
|
67
87
|
minCents: z.ZodNumber;
|
|
68
88
|
maxCents: z.ZodNumber;
|
|
89
|
+
presetsCents: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
69
90
|
}, z.core.$strip>;
|
|
70
91
|
}, z.core.$strip>;
|
|
71
92
|
export type BillingPlans = z.infer<typeof BillingPlansSchema>;
|
|
72
93
|
/** `GET ?days=30&timeZone=Asia/Shanghai`: credits spent each day, the days with none left out. */
|
|
73
94
|
export declare const BILLING_USAGE_PATH = "/api/billing/usage";
|
|
95
|
+
/** What credits are spent on: AllyHub's models, cloud tools, cloud Studio, anything else. */
|
|
96
|
+
export declare const SPEND_KINDS: readonly ["models", "tools", "studio", "other"];
|
|
97
|
+
export type SpendKind = (typeof SPEND_KINDS)[number];
|
|
74
98
|
export declare const BillingUsageSchema: z.ZodObject<{
|
|
75
99
|
days: z.ZodArray<z.ZodObject<{
|
|
76
100
|
day: z.ZodISODate;
|
|
77
101
|
credits: z.ZodNumber;
|
|
102
|
+
byKind: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
78
103
|
}, z.core.$strip>>;
|
|
79
104
|
}, z.core.$strip>;
|
|
80
105
|
export type BillingUsage = z.infer<typeof BillingUsageSchema>;
|
|
@@ -89,31 +114,75 @@ export declare const CheckoutRequestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
89
114
|
}, z.core.$strict>, z.ZodObject<{
|
|
90
115
|
topUpCents: z.ZodNumber;
|
|
91
116
|
}, z.core.$strict>]>;
|
|
92
|
-
/**
|
|
117
|
+
/**
|
|
118
|
+
* `POST`, an owner's or an admin's: Stripe's Customer Portal, at its home
|
|
119
|
+
* (the card, the billing details, invoices) or at one flow: a new card,
|
|
120
|
+
* a change of plan to confirm, the plan's cancellation; answers `{ url }`.
|
|
121
|
+
*/
|
|
93
122
|
export declare const BILLING_PORTAL_PATH = "/api/billing/portal";
|
|
123
|
+
export declare const PortalRequestSchema: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
|
|
124
|
+
flow: z.ZodEnum<{
|
|
125
|
+
home: "home";
|
|
126
|
+
payment_method: "payment_method";
|
|
127
|
+
cancel: "cancel";
|
|
128
|
+
}>;
|
|
129
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
130
|
+
flow: z.ZodLiteral<"change_plan">;
|
|
131
|
+
plan: z.ZodString;
|
|
132
|
+
interval: z.ZodEnum<{
|
|
133
|
+
month: "month";
|
|
134
|
+
year: "year";
|
|
135
|
+
}>;
|
|
136
|
+
}, z.core.$strict>]>>;
|
|
137
|
+
export type PortalRequest = z.infer<typeof PortalRequestSchema>;
|
|
138
|
+
/** `POST`, an owner's or an admin's: a plan cancelled at its period's end taken up again; answers the summary. */
|
|
139
|
+
export declare const BILLING_RESUME_PATH = "/api/billing/resume";
|
|
140
|
+
/** `GET`, an owner's or an admin's: the card charged without the person there, and where Stripe's emails go. */
|
|
141
|
+
export declare const BILLING_PAYMENT_PATH = "/api/billing/payment";
|
|
142
|
+
export declare const BillingPaymentSchema: z.ZodObject<{
|
|
143
|
+
card: z.ZodNullable<z.ZodObject<{
|
|
144
|
+
brand: z.ZodString;
|
|
145
|
+
last4: z.ZodString;
|
|
146
|
+
expMonth: z.ZodNumber;
|
|
147
|
+
expYear: z.ZodNumber;
|
|
148
|
+
}, z.core.$strip>>;
|
|
149
|
+
email: z.ZodNullable<z.ZodString>;
|
|
150
|
+
}, z.core.$strip>;
|
|
151
|
+
export type BillingPayment = z.infer<typeof BillingPaymentSchema>;
|
|
152
|
+
/** `POST { topUpCents }`, an owner's or an admin's: credits bought with the saved card at once; answers `{ credits }`, what was added. */
|
|
153
|
+
export declare const BILLING_TOP_UP_PATH = "/api/billing/top-up";
|
|
154
|
+
export declare const TopUpRequestSchema: z.ZodObject<{
|
|
155
|
+
topUpCents: z.ZodNumber;
|
|
156
|
+
}, z.core.$strict>;
|
|
157
|
+
/** `POST`, any member's: the organization's owners and admins are asked by email to add credits, at most once a day for each member. */
|
|
158
|
+
export declare const BILLING_REQUEST_PATH = "/api/billing/request";
|
|
94
159
|
/**
|
|
95
|
-
* `PUT { below, amountCents }`, an owner's or
|
|
96
|
-
* answered `{ on: true }`, or `{ saveCard: url }`,
|
|
97
|
-
* card first; `DELETE`
|
|
160
|
+
* `PUT { below, amountCents, monthlyLimitCents?, newCard? }`, an owner's or
|
|
161
|
+
* an admin's: auto top-up on, answered `{ on: true }`, or `{ saveCard: url }`,
|
|
162
|
+
* a Checkout that saves a card first (or a new one, `newCard`); `DELETE`
|
|
163
|
+
* turns it off.
|
|
98
164
|
*/
|
|
99
165
|
export declare const AUTO_TOP_UP_PATH = "/api/billing/auto-top-up";
|
|
100
166
|
export declare const AutoTopUpRequestSchema: z.ZodObject<{
|
|
101
167
|
below: z.ZodNumber;
|
|
102
168
|
amountCents: z.ZodNumber;
|
|
169
|
+
monthlyLimitCents: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
170
|
+
newCard: z.ZodOptional<z.ZodBoolean>;
|
|
103
171
|
}, z.core.$strict>;
|
|
104
|
-
/**
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
172
|
+
/**
|
|
173
|
+
* Why billing refused a request, in `error.data.reason`, for a page to say
|
|
174
|
+
* in its words, with the values it names: an amount outside a top-up's
|
|
175
|
+
* bounds (`min`, `max`, in cents), a monthly limit under the amount, a
|
|
176
|
+
* plan already bought, a plan not offered, nothing to pay with, an
|
|
177
|
+
* organization frozen by a dispute, a card that could not be charged
|
|
178
|
+
* (`why`, an auto top-up stop's), a request asked already today.
|
|
179
|
+
*/
|
|
180
|
+
export declare const BILLING_REFUSALS: readonly ["top_up_amount", "monthly_limit", "has_plan", "no_plan", "no_such_plan", "not_customer", "no_card", "frozen", "not_charged", "asked_today"];
|
|
181
|
+
export type BillingRefusal = (typeof BILLING_REFUSALS)[number];
|
|
182
|
+
/** The plan's section of Settings, where a payment that was not made comes back to. */
|
|
183
|
+
export declare const BILLING_PAGE_PATH = "/settings/plan";
|
|
184
|
+
/** Where Stripe's Checkout lands once paid: the plan's section, which follows the balance until what was paid for is there. */
|
|
185
|
+
export declare const BILLING_PAID_PATH = "/settings/plan?paid=1";
|
|
117
186
|
/** The models the organization may use. */
|
|
118
187
|
export declare const LLM_MODELS_PATH = "/api/llm/models";
|
|
119
188
|
/** Anthropic's Messages API (`POST`), streamed or not. */
|
|
@@ -127,22 +196,22 @@ export declare const ModelCatalogSchema: z.ZodObject<{
|
|
|
127
196
|
input: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
128
197
|
contextWindow: z.ZodOptional<z.ZodNumber>;
|
|
129
198
|
maxOutput: z.ZodOptional<z.ZodNumber>;
|
|
130
|
-
tier: z.ZodOptional<z.ZodEnum<{
|
|
199
|
+
tier: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
131
200
|
premium: "premium";
|
|
132
201
|
standard: "standard";
|
|
133
202
|
efficient: "efficient";
|
|
134
|
-
}>>;
|
|
203
|
+
}>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>>;
|
|
135
204
|
maker: z.ZodOptional<z.ZodString>;
|
|
136
205
|
id: z.ZodString;
|
|
137
206
|
name: z.ZodString;
|
|
138
207
|
}, z.core.$loose>>;
|
|
139
208
|
defaultModel: z.ZodString;
|
|
140
209
|
needPlan: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
141
|
-
tier: z.ZodOptional<z.ZodEnum<{
|
|
210
|
+
tier: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
142
211
|
premium: "premium";
|
|
143
212
|
standard: "standard";
|
|
144
213
|
efficient: "efficient";
|
|
145
|
-
}>>;
|
|
214
|
+
}>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>>;
|
|
146
215
|
maker: z.ZodOptional<z.ZodString>;
|
|
147
216
|
id: z.ZodString;
|
|
148
217
|
name: z.ZodString;
|
|
@@ -198,11 +267,11 @@ export declare const CALL_STATUS: readonly ["working", "completed", "failed"];
|
|
|
198
267
|
export declare const ToolCallSchema: z.ZodObject<{
|
|
199
268
|
id: z.ZodString;
|
|
200
269
|
tool: z.ZodString;
|
|
201
|
-
status: z.ZodEnum<{
|
|
202
|
-
failed: "failed";
|
|
270
|
+
status: z.ZodUnion<readonly [z.ZodEnum<{
|
|
203
271
|
working: "working";
|
|
204
272
|
completed: "completed";
|
|
205
|
-
|
|
273
|
+
failed: "failed";
|
|
274
|
+
}>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
|
|
206
275
|
output: z.ZodOptional<z.ZodUnknown>;
|
|
207
276
|
error: z.ZodOptional<z.ZodObject<{
|
|
208
277
|
kind: z.ZodString;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{z as t}from"zod";export const API_KEY_ENV="ALLYHUB_API_KEY",BILLING_SUMMARY_PATH="/api/billing/summary",AUTO_TOP_UP_STOPS=["no_card","saving_card","not_a_card","declined","needs_authentication","not_charged","under_line","refunded","disputed"],BillingSummarySchema=t.object({credits:t.number(),held:t.number(),owed:t.number(),frozen:t.string().nullable().default(null),plan:t.object({id:t.string(),name:t.string(),interval:
|
|
2
|
+
import{z as t}from"zod";import{openEnum as o}from"./open.js";export const API_KEY_ENV="ALLYHUB_API_KEY",BILLING_SUMMARY_PATH="/api/billing/summary",AUTO_TOP_UP_STOPS=["no_card","saving_card","not_a_card","declined","needs_authentication","not_charged","under_line","refunded","disputed","monthly_limit"],BILLING_INTERVALS=["month","year"],BillingSummarySchema=t.object({credits:t.number(),held:t.number(),owed:t.number(),frozen:t.string().nullable().default(null),plan:t.object({id:t.string(),name:t.string(),interval:o(BILLING_INTERVALS),status:t.string(),renewsAt:t.iso.datetime().nullable(),endsAt:t.iso.datetime().nullable(),monthlyCredits:t.number().default(0),price:t.object({amountCents:t.number(),currency:t.string()}).nullable().default(null)}).nullable(),allowance:t.object({total:t.number(),used:t.number(),renewsAt:t.iso.datetime()}).nullable().default(null),bought:t.number().default(0),customer:t.boolean().default(!1),autoTopUp:t.object({below:t.number(),amountCents:t.number(),monthlyLimitCents:t.number().nullable().default(null),chargedThisMonthCents:t.number().default(0),stopped:o(AUTO_TOP_UP_STOPS).nullable()}).nullable()}),BILLING_PLANS_PATH="/api/billing/plans",BillingPlansSchema=t.object({plans:t.array(t.object({id:t.string(),name:t.string(),family:t.string().nullable().default(null),recommended:t.boolean().default(!1),monthlyCredits:t.number(),prices:t.array(t.object({interval:o(BILLING_INTERVALS),amountCents:t.number(),currency:t.string()}))})),topUp:t.object({currency:t.string(),creditsPerDollar:t.number(),minCents:t.number(),maxCents:t.number(),presetsCents:t.array(t.number()).default([])})}),BILLING_USAGE_PATH="/api/billing/usage",SPEND_KINDS=["models","tools","studio","other"],BillingUsageSchema=t.object({days:t.array(t.object({day:t.iso.date(),credits:t.number(),byKind:t.record(t.string(),t.number()).default({})}))}),BILLING_CHECKOUT_PATH="/api/billing/checkout",CheckoutRequestSchema=t.union([t.strictObject({plan:t.string(),interval:t.enum(BILLING_INTERVALS)}),t.strictObject({topUpCents:t.number().int()})]),BILLING_PORTAL_PATH="/api/billing/portal",PortalRequestSchema=t.union([t.strictObject({flow:t.enum(["home","payment_method","cancel"])}),t.strictObject({flow:t.literal("change_plan"),plan:t.string(),interval:t.enum(BILLING_INTERVALS)})]).default({flow:"home"}),BILLING_RESUME_PATH="/api/billing/resume",BILLING_PAYMENT_PATH="/api/billing/payment",BillingPaymentSchema=t.object({card:t.object({brand:t.string(),last4:t.string(),expMonth:t.number(),expYear:t.number()}).nullable(),email:t.string().nullable()}),BILLING_TOP_UP_PATH="/api/billing/top-up",TopUpRequestSchema=t.strictObject({topUpCents:t.number().int()}),BILLING_REQUEST_PATH="/api/billing/request",AUTO_TOP_UP_PATH="/api/billing/auto-top-up",AutoTopUpRequestSchema=t.strictObject({below:t.number().nonnegative(),amountCents:t.number().int().positive(),monthlyLimitCents:t.number().int().positive().nullable().optional(),newCard:t.boolean().optional()}),BILLING_REFUSALS=["top_up_amount","monthly_limit","has_plan","no_plan","no_such_plan","not_customer","no_card","frozen","not_charged","asked_today"],BILLING_PAGE_PATH="/settings/plan",BILLING_PAID_PATH="/settings/plan?paid=1",LLM_MODELS_PATH="/api/llm/models",LLM_MESSAGES_PATH="/api/llm/v1/messages",MODEL_TIERS=["premium","standard","efficient"];const a={tier:o(MODEL_TIERS).optional(),maker:t.string().min(1).optional()};export const ModelCatalogSchema=t.object({models:t.array(t.looseObject({id:t.string().min(1),name:t.string().min(1),...a,reasoning:t.boolean().optional(),input:t.array(t.string()).optional(),contextWindow:t.number().int().positive().optional(),maxOutput:t.number().int().positive().optional()})).min(1),defaultModel:t.string().min(1),needPlan:t.array(t.looseObject({id:t.string().min(1),name:t.string().min(1),...a})).default([])}),JsonSchemaSchema=t.record(t.string(),t.unknown()),CATALOG_PATH="/api/catalog",CatalogWorkSchema=t.object({id:t.string().min(1),title:t.string().min(1),description:t.string().min(1)}),CatalogToolSchema=t.object({name:t.string().min(1),work:t.string().min(1),title:t.string().min(1),description:t.string().min(1),input:JsonSchemaSchema,output:JsonSchemaSchema,long:t.boolean()}),CatalogSchema=t.object({version:t.string().min(1),works:t.array(CatalogWorkSchema),tools:t.array(CatalogToolSchema)}),toolCallsPath=e=>`/api/tools/${encodeURIComponent(e)}/calls`,callPath=e=>`/api/calls/${encodeURIComponent(e)}`,ToolCallRequestSchema=t.strictObject({input:t.record(t.string(),t.unknown())}),CALL_STATUS=["working","completed","failed"],ToolCallSchema=t.object({id:t.string().min(1),tool:t.string().min(1),status:o(CALL_STATUS),output:t.unknown().optional(),error:t.object({kind:t.string().min(1),message:t.string().min(1)}).optional(),credits:t.number().nonnegative().optional(),pollAfterMs:t.number().int().nonnegative().optional(),createdAt:t.string(),endedAt:t.string().optional()});const i="ally://data-tool-results/";export const allyFilePath=(e,n)=>`${i}${encodeURIComponent(e)}/${encodeURIComponent(n)}`;export function parseAllyFilePath(e){if(!e.startsWith(i))return;const[n,r,...l]=e.slice(i.length).split("/");if(!(!n||!r||l.length>0))try{return{id:decodeURIComponent(n),name:decodeURIComponent(r)}}catch{return}}export const FILE_MAX_BYTES=1024*1024*1024,FILES_PATH="/api/files",FileCreateRequestSchema=t.strictObject({name:t.string().min(1).max(255),size:t.int().positive().max(FILE_MAX_BYTES),sha256:t.string().regex(/^[0-9a-f]{64}$/u),contentType:t.string().min(1).max(255)}),FileCreatedSchema=t.object({id:t.string().min(1),upload:t.object({url:t.url(),headers:t.record(t.string(),t.string())}).nullable()}),fileDonePath=e=>`${FILES_PATH}/${encodeURIComponent(e)}/done`,UploadedFileSchema=t.object({id:t.string().min(1),name:t.string()}),FileContentResponseSchema=t.object({url:t.url()}),fileContentPath=(e,n)=>`${FILES_PATH}/${encodeURIComponent(e)}/content?disposition=${n}`;
|
|
@@ -5,6 +5,26 @@ export declare const ThemeSchema: z.ZodEnum<{
|
|
|
5
5
|
light: "light";
|
|
6
6
|
dark: "dark";
|
|
7
7
|
}>;
|
|
8
|
+
/**
|
|
9
|
+
* Where the person is in an item, as its editor knows it: a video's moment
|
|
10
|
+
* (seconds) or a deck's slide (its id). The editor says it as it changes
|
|
11
|
+
* (`editor/place`), and a host that opens the item again, live or read
|
|
12
|
+
* only, opens it there (HostContext's `place`).
|
|
13
|
+
*/
|
|
14
|
+
export declare const PlaceSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
15
|
+
t: z.ZodNumber;
|
|
16
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
17
|
+
slide: z.ZodString;
|
|
18
|
+
}, z.core.$strict>]>;
|
|
19
|
+
export type Place = z.infer<typeof PlaceSchema>;
|
|
20
|
+
/** The parameters an editors' page's address says a place by: `t=` a video's seconds, `slide=` a deck's slide. */
|
|
21
|
+
export declare const PLACE_PARAMS: readonly ["t", "slide"];
|
|
22
|
+
/** A place as an editors' page's address says it; none, nothing. */
|
|
23
|
+
export declare function placeParams(place: Place | undefined): Partial<Record<(typeof PLACE_PARAMS)[number], string>>;
|
|
24
|
+
/** The place an editors' page's address says (its query, as URLSearchParams reads it), if it says a valid one. */
|
|
25
|
+
export declare function placeIn(q: {
|
|
26
|
+
get(name: string): string | null;
|
|
27
|
+
}): Place | undefined;
|
|
8
28
|
export declare const HostContextSchema: z.ZodObject<{
|
|
9
29
|
locale: z.ZodString;
|
|
10
30
|
theme: z.ZodEnum<{
|
|
@@ -17,6 +37,15 @@ export declare const HostContextSchema: z.ZodObject<{
|
|
|
17
37
|
project: z.ZodObject<{
|
|
18
38
|
name: z.ZodString;
|
|
19
39
|
}, z.core.$strict>;
|
|
40
|
+
notes: z.ZodOptional<z.ZodBoolean>;
|
|
41
|
+
audienceWindow: z.ZodOptional<z.ZodBoolean>;
|
|
42
|
+
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
43
|
+
viewer: z.ZodOptional<z.ZodBoolean>;
|
|
44
|
+
place: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
45
|
+
t: z.ZodNumber;
|
|
46
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
47
|
+
slide: z.ZodString;
|
|
48
|
+
}, z.core.$strict>]>>;
|
|
20
49
|
item: z.ZodObject<{
|
|
21
50
|
kind: z.ZodEnum<{
|
|
22
51
|
video: "video";
|
|
@@ -51,6 +80,8 @@ export declare const OpenTargetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
51
80
|
tabId: z.ZodOptional<z.ZodString>;
|
|
52
81
|
}, z.core.$strict>], "type">;
|
|
53
82
|
export type OpenTarget = z.infer<typeof OpenTargetSchema>;
|
|
83
|
+
/** The name of a show's audience window, which a host with `audienceWindow` places. */
|
|
84
|
+
export declare const AUDIENCE_WINDOW = "allyhub-audience";
|
|
54
85
|
export declare const EDITOR_STATES: readonly ["saved", "saving", "unsaved", "error"];
|
|
55
86
|
export declare const HOST_METHODS: {
|
|
56
87
|
readonly "host/context": import("./jsonrpc.js").MethodSpec<z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
|
|
@@ -65,6 +96,15 @@ export declare const HOST_METHODS: {
|
|
|
65
96
|
project: z.ZodObject<{
|
|
66
97
|
name: z.ZodString;
|
|
67
98
|
}, z.core.$strict>;
|
|
99
|
+
notes: z.ZodOptional<z.ZodBoolean>;
|
|
100
|
+
audienceWindow: z.ZodOptional<z.ZodBoolean>;
|
|
101
|
+
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
102
|
+
viewer: z.ZodOptional<z.ZodBoolean>;
|
|
103
|
+
place: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
104
|
+
t: z.ZodNumber;
|
|
105
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
106
|
+
slide: z.ZodString;
|
|
107
|
+
}, z.core.$strict>]>>;
|
|
68
108
|
item: z.ZodObject<{
|
|
69
109
|
kind: z.ZodEnum<{
|
|
70
110
|
video: "video";
|
|
@@ -116,11 +156,24 @@ export declare const HOST_METHODS: {
|
|
|
116
156
|
}>;
|
|
117
157
|
message: z.ZodOptional<z.ZodString>;
|
|
118
158
|
}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>>;
|
|
159
|
+
readonly "editor/place": import("./jsonrpc.js").MethodSpec<z.ZodObject<{
|
|
160
|
+
place: z.ZodUnion<readonly [z.ZodObject<{
|
|
161
|
+
t: z.ZodNumber;
|
|
162
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
163
|
+
slide: z.ZodString;
|
|
164
|
+
}, z.core.$strict>]>;
|
|
165
|
+
}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>>;
|
|
119
166
|
readonly "agent/ask": import("./jsonrpc.js").MethodSpec<z.ZodObject<{
|
|
120
167
|
text: z.ZodString;
|
|
121
168
|
}, z.core.$strict>, z.ZodObject<{
|
|
122
169
|
delivered: z.ZodBoolean;
|
|
123
170
|
}, z.core.$strict>>;
|
|
171
|
+
readonly "note/begin": import("./jsonrpc.js").MethodSpec<z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
|
|
172
|
+
begun: z.ZodBoolean;
|
|
173
|
+
}, z.core.$strict>>;
|
|
174
|
+
readonly "edit/request": import("./jsonrpc.js").MethodSpec<z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
|
|
175
|
+
asked: z.ZodBoolean;
|
|
176
|
+
}, z.core.$strict>>;
|
|
124
177
|
readonly "tools/call": import("./jsonrpc.js").MethodSpec<z.ZodObject<{
|
|
125
178
|
name: z.ZodString;
|
|
126
179
|
arguments: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -134,11 +187,11 @@ export declare const HOST_NOTIFICATIONS: {
|
|
|
134
187
|
}, z.core.$strict>>;
|
|
135
188
|
readonly "check/changed": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
|
|
136
189
|
status: z.ZodEnum<{
|
|
190
|
+
failed: "failed";
|
|
191
|
+
running: "running";
|
|
137
192
|
off: "off";
|
|
138
193
|
waiting: "waiting";
|
|
139
|
-
running: "running";
|
|
140
194
|
done: "done";
|
|
141
|
-
failed: "failed";
|
|
142
195
|
}>;
|
|
143
196
|
revision: z.ZodInt;
|
|
144
197
|
problems: z.ZodArray<z.ZodObject<{
|
|
@@ -171,9 +224,9 @@ export declare const HOST_NOTIFICATIONS: {
|
|
|
171
224
|
types: z.ZodArray<z.ZodString>;
|
|
172
225
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
|
|
173
226
|
state: z.ZodEnum<{
|
|
227
|
+
failed: "failed";
|
|
174
228
|
running: "running";
|
|
175
229
|
done: "done";
|
|
176
|
-
failed: "failed";
|
|
177
230
|
queued: "queued";
|
|
178
231
|
cancelled: "cancelled";
|
|
179
232
|
}>;
|
|
@@ -186,9 +239,9 @@ export declare const HOST_NOTIFICATIONS: {
|
|
|
186
239
|
jobs: z.ZodArray<z.ZodObject<{
|
|
187
240
|
file: z.ZodString;
|
|
188
241
|
status: z.ZodEnum<{
|
|
242
|
+
failed: "failed";
|
|
189
243
|
running: "running";
|
|
190
244
|
done: "done";
|
|
191
|
-
failed: "failed";
|
|
192
245
|
}>;
|
|
193
246
|
message: z.ZodString;
|
|
194
247
|
share: z.ZodOptional<z.ZodNumber>;
|
|
@@ -201,9 +254,9 @@ export declare const HOST_NOTIFICATIONS: {
|
|
|
201
254
|
version: z.ZodNullable<z.ZodString>;
|
|
202
255
|
by: z.ZodOptional<z.ZodObject<{
|
|
203
256
|
kind: z.ZodEnum<{
|
|
257
|
+
tool: "tool";
|
|
204
258
|
person: "person";
|
|
205
259
|
agent: "agent";
|
|
206
|
-
tool: "tool";
|
|
207
260
|
}>;
|
|
208
261
|
name: z.ZodString;
|
|
209
262
|
}, z.core.$strict>>;
|
|
@@ -221,6 +274,15 @@ export declare const HOST_NOTIFICATIONS: {
|
|
|
221
274
|
project: z.ZodObject<{
|
|
222
275
|
name: z.ZodString;
|
|
223
276
|
}, z.core.$strict>;
|
|
277
|
+
notes: z.ZodOptional<z.ZodBoolean>;
|
|
278
|
+
audienceWindow: z.ZodOptional<z.ZodBoolean>;
|
|
279
|
+
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
280
|
+
viewer: z.ZodOptional<z.ZodBoolean>;
|
|
281
|
+
place: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
282
|
+
t: z.ZodNumber;
|
|
283
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
284
|
+
slide: z.ZodString;
|
|
285
|
+
}, z.core.$strict>]>>;
|
|
224
286
|
item: z.ZodObject<{
|
|
225
287
|
kind: z.ZodEnum<{
|
|
226
288
|
video: "video";
|
|
@@ -263,6 +325,15 @@ export declare const EDITOR_HOST_METHODS: {
|
|
|
263
325
|
project: z.ZodObject<{
|
|
264
326
|
name: z.ZodString;
|
|
265
327
|
}, z.core.$strict>;
|
|
328
|
+
notes: z.ZodOptional<z.ZodBoolean>;
|
|
329
|
+
audienceWindow: z.ZodOptional<z.ZodBoolean>;
|
|
330
|
+
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
331
|
+
viewer: z.ZodOptional<z.ZodBoolean>;
|
|
332
|
+
place: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
333
|
+
t: z.ZodNumber;
|
|
334
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
335
|
+
slide: z.ZodString;
|
|
336
|
+
}, z.core.$strict>]>>;
|
|
266
337
|
item: z.ZodObject<{
|
|
267
338
|
kind: z.ZodEnum<{
|
|
268
339
|
video: "video";
|
|
@@ -314,11 +385,24 @@ export declare const EDITOR_HOST_METHODS: {
|
|
|
314
385
|
}>;
|
|
315
386
|
message: z.ZodOptional<z.ZodString>;
|
|
316
387
|
}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>>;
|
|
388
|
+
readonly "editor/place": import("./jsonrpc.js").MethodSpec<z.ZodObject<{
|
|
389
|
+
place: z.ZodUnion<readonly [z.ZodObject<{
|
|
390
|
+
t: z.ZodNumber;
|
|
391
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
392
|
+
slide: z.ZodString;
|
|
393
|
+
}, z.core.$strict>]>;
|
|
394
|
+
}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>>;
|
|
317
395
|
readonly "agent/ask": import("./jsonrpc.js").MethodSpec<z.ZodObject<{
|
|
318
396
|
text: z.ZodString;
|
|
319
397
|
}, z.core.$strict>, z.ZodObject<{
|
|
320
398
|
delivered: z.ZodBoolean;
|
|
321
399
|
}, z.core.$strict>>;
|
|
400
|
+
readonly "note/begin": import("./jsonrpc.js").MethodSpec<z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
|
|
401
|
+
begun: z.ZodBoolean;
|
|
402
|
+
}, z.core.$strict>>;
|
|
403
|
+
readonly "edit/request": import("./jsonrpc.js").MethodSpec<z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
|
|
404
|
+
asked: z.ZodBoolean;
|
|
405
|
+
}, z.core.$strict>>;
|
|
322
406
|
readonly "tools/call": import("./jsonrpc.js").MethodSpec<z.ZodObject<{
|
|
323
407
|
name: z.ZodString;
|
|
324
408
|
arguments: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{z as t}from"zod";import{EDITORS as
|
|
2
|
+
import{z as t}from"zod";import{EDITORS as a,KINDS as c}from"@allyhub-next/formats";import{FILE_METHODS as h,FILE_NOTIFICATIONS as l,PathSchema as n}from"./files.js";import{method as e,notification as i}from"./jsonrpc.js";import{TOOL_NOTIFICATIONS as d}from"./tools.js";export const ThemeSchema=t.enum(["light","dark"]),PlaceSchema=t.union([t.strictObject({t:t.number().nonnegative()}),t.strictObject({slide:t.string().min(1)})]),PLACE_PARAMS=["t","slide"];export function placeParams(o){return o===void 0?{}:"t"in o?{t:String(Math.round(o.t*1e3)/1e3)}:{slide:o.slide}}export function placeIn(o){const s=o.get("t"),r=PlaceSchema.safeParse(s!==null?{t:Number(s)}:{slide:o.get("slide")});return r.success?r.data:void 0}export const HostContextSchema=t.strictObject({locale:t.string().min(2),theme:ThemeSchema,agent:t.strictObject({name:t.string().min(1)}).optional(),project:t.strictObject({name:t.string().min(1)}),notes:t.boolean().optional(),audienceWindow:t.boolean().optional(),readOnly:t.boolean().optional(),viewer:t.boolean().optional(),place:PlaceSchema.optional(),item:t.strictObject({kind:t.enum(c),dir:n,entry:n}),editor:t.enum(a)}),OpenTargetSchema=t.discriminatedUnion("type",[t.strictObject({type:t.literal("file"),path:n,line:t.int().positive().optional()}),t.strictObject({type:t.literal("browser"),url:t.url({protocol:/^https?$/u}).optional(),tabId:t.string().min(1).optional()})]),AUDIENCE_WINDOW="allyhub-audience",EDITOR_STATES=["saved","saving","unsaved","error"],HOST_METHODS={"host/context":e(t.strictObject({}),HostContextSchema,"Where the editor runs."),"items/open":e(t.strictObject({target:OpenTargetSchema}),t.strictObject({}),"Shows another item, a file or a page, where the host shows things."),"storage/get":e(t.strictObject({key:t.string().min(1)}),t.strictObject({value:t.unknown()}),"What the editor kept for this person on this computer (a hand sort, what was last seen), or null."),"storage/set":e(t.strictObject({key:t.string().min(1),value:t.unknown()}),t.strictObject({}),"Keeps a value for this person on this computer; null removes it."),"editor/state":e(t.strictObject({state:t.enum(EDITOR_STATES),message:t.string().optional()}),t.strictObject({}),"Says whether what the person typed is saved."),"editor/place":e(t.strictObject({place:PlaceSchema}),t.strictObject({}),"Says where the person is in the item (a video's moment, a deck's slide), on a pause, a seek or another slide, never each frame, so the host opens it there again (HostContext's `place`)."),"agent/ask":e(t.strictObject({text:t.string().min(1)}),t.strictObject({delivered:t.boolean()}),"Puts words before the person's agent, for them to go on and send; false where no agent takes them. Never sent by itself."),"note/begin":e(t.strictObject({}),t.strictObject({begun:t.boolean()}),"Starts the host's Note mode on what is on show, as its own Note button does, so a person can mark anything up for their agent from wherever they are; false where the host has none. Sends nothing."),"edit/request":e(t.strictObject({}),t.strictObject({asked:t.boolean()}),"The person tried to change what a read-only host shows (`readOnly`): the host offers to wake the machine that changes it; false where nothing does."),"tools/call":e(t.strictObject({name:t.string().min(1),arguments:t.record(t.string(),t.unknown()).default({})}),t.strictObject({result:t.unknown()}),"Runs one of the project server's tools (tools.ts's PROJECT_TOOLS), for an editor that needs more than files (a video's preview, a still).")},HOST_NOTIFICATIONS={"host/context-changed":i(HostContextSchema,"The language, theme or agent changed."),"editor/command":i(t.strictObject({command:t.enum(["export"])}),"The host around the editor asked it to do what its own shortcut does."),...l,...d},EDITOR_HOST_METHODS={...h,...HOST_METHODS};
|
|
@@ -6,9 +6,9 @@ export declare const VersionSchema: z.ZodNullable<z.ZodString>;
|
|
|
6
6
|
/** Who changed a file, when the host knows. */
|
|
7
7
|
export declare const WriterSchema: z.ZodObject<{
|
|
8
8
|
kind: z.ZodEnum<{
|
|
9
|
+
tool: "tool";
|
|
9
10
|
person: "person";
|
|
10
11
|
agent: "agent";
|
|
11
|
-
tool: "tool";
|
|
12
12
|
}>;
|
|
13
13
|
name: z.ZodString;
|
|
14
14
|
}, z.core.$strict>;
|
|
@@ -89,9 +89,9 @@ export declare const FILE_NOTIFICATIONS: {
|
|
|
89
89
|
version: z.ZodNullable<z.ZodString>;
|
|
90
90
|
by: z.ZodOptional<z.ZodObject<{
|
|
91
91
|
kind: z.ZodEnum<{
|
|
92
|
+
tool: "tool";
|
|
92
93
|
person: "person";
|
|
93
94
|
agent: "agent";
|
|
94
|
-
tool: "tool";
|
|
95
95
|
}>;
|
|
96
96
|
name: z.ZodString;
|
|
97
97
|
}, z.core.$strict>>;
|
|
@@ -11,4 +11,10 @@ export * from "./cloud.js";
|
|
|
11
11
|
export * from "./teams.js";
|
|
12
12
|
export * from "./app.js";
|
|
13
13
|
export * from "./routes.js";
|
|
14
|
+
export * from "./blobs.js";
|
|
15
|
+
export * from "./sites.js";
|
|
16
|
+
export * from "./snapshots.js";
|
|
17
|
+
export * from "./shares.js";
|
|
18
|
+
export * from "./account.js";
|
|
19
|
+
export * from "./open.js";
|
|
14
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
export*from"./jsonrpc.js";export*from"./files.js";export*from"./editor.js";export*from"./notes.js";export*from"./tools.js";export*from"./cli.js";export*from"./auth.js";export*from"./registry.js";export*from"./runtimes.js";export*from"./cloud.js";export*from"./teams.js";export*from"./app.js";export*from"./routes.js";
|
|
2
|
+
export*from"./jsonrpc.js";export*from"./files.js";export*from"./editor.js";export*from"./notes.js";export*from"./tools.js";export*from"./cli.js";export*from"./auth.js";export*from"./registry.js";export*from"./runtimes.js";export*from"./cloud.js";export*from"./teams.js";export*from"./app.js";export*from"./routes.js";export*from"./blobs.js";export*from"./sites.js";export*from"./snapshots.js";export*from"./shares.js";export*from"./account.js";export*from"./open.js";
|
|
@@ -85,7 +85,30 @@ export type NoteElement = z.infer<typeof NoteElementSchema>;
|
|
|
85
85
|
export declare const NOTE_READY = "note/ready";
|
|
86
86
|
/** What a framed page tells the window: words for the agent's composer. */
|
|
87
87
|
export declare const AGENT_ASK = "agent/ask";
|
|
88
|
+
/** What a framed page tells the window: the person asked for Note mode. */
|
|
89
|
+
export declare const NOTE_BEGIN = "note/begin";
|
|
88
90
|
export declare const NOTE_GONE = "note/gone";
|
|
91
|
+
/**
|
|
92
|
+
* What a framed page tells the window: the person tried to change what a
|
|
93
|
+
* read-only page shows (a snapshot's), so the window offers to wake the
|
|
94
|
+
* machine (`{ method: EDIT_REQUEST }`).
|
|
95
|
+
*/
|
|
96
|
+
export declare const EDIT_REQUEST = "edit/request";
|
|
97
|
+
/**
|
|
98
|
+
* What a framed page tells the window: where the person is in an item
|
|
99
|
+
* (`editor/place`), so the window opens it there again, from a snapshot or
|
|
100
|
+
* live (`{ method: EDITOR_PLACE, item, place }`).
|
|
101
|
+
*/
|
|
102
|
+
export declare const EDITOR_PLACE = "editor/place";
|
|
103
|
+
export declare const EditorPlaceMessageSchema: z.ZodObject<{
|
|
104
|
+
method: z.ZodLiteral<"editor/place">;
|
|
105
|
+
item: z.ZodString;
|
|
106
|
+
place: z.ZodUnion<readonly [z.ZodObject<{
|
|
107
|
+
t: z.ZodNumber;
|
|
108
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
109
|
+
slide: z.ZodString;
|
|
110
|
+
}, z.core.$strict>]>;
|
|
111
|
+
}, z.core.$strip>;
|
|
89
112
|
export declare const NOTE_METHODS: {
|
|
90
113
|
readonly "note/freeze": import("./jsonrpc.js").MethodSpec<z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
|
|
91
114
|
key: z.ZodString;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{z as t}from"zod";import{pointsOf as
|
|
2
|
+
import{z as t}from"zod";import{pointsOf as n,mapShape as s,touches as i}from"@allyhub-next/formats";import{PlaceSchema as a}from"./editor.js";import{PathSchema as r}from"./files.js";import{method as e}from"./jsonrpc.js";export const NoteRectSchema=t.strictObject({x:t.number(),y:t.number(),width:t.number().nonnegative(),height:t.number().nonnegative()});const o=t.strictObject({x:t.number(),y:t.number()});export const NoteShapeSchema=t.discriminatedUnion("kind",[t.strictObject({kind:t.literal("box"),rect:NoteRectSchema}),t.strictObject({kind:t.literal("round"),rect:NoteRectSchema}),t.strictObject({kind:t.literal("arrow"),from:o,to:o}),t.strictObject({kind:t.literal("line"),points:t.array(o).min(1)})]);export{s as mapShape,n as pointsOf,i as touches};export const NoteSourceSchema=t.strictObject({path:r,line:t.int().positive().optional()}),FrozenSchema=t.strictObject({key:t.string().min(1),what:t.string(),source:NoteSourceSchema.optional()}),NotePictureSchema=t.strictObject({rect:NoteRectSchema.optional(),mime:t.string().min(1),data:t.string().min(1)}),NoteElementSchema=t.strictObject({name:t.string().min(1),source:NoteSourceSchema.optional(),text:t.string().optional()}),NOTE_READY="note/ready",AGENT_ASK="agent/ask",NOTE_BEGIN="note/begin",NOTE_GONE="note/gone",EDIT_REQUEST="edit/request",EDITOR_PLACE="editor/place",EditorPlaceMessageSchema=t.object({method:t.literal(EDITOR_PLACE),item:r,place:a}),NOTE_METHODS={"note/freeze":e(t.strictObject({}),FrozenSchema,"Stops what moves and says what is on show. Answered once it is drawn, so a page still loading is not captured empty."),"note/pictures":e(t.strictObject({page:t.boolean()}),t.strictObject({pictures:t.array(NotePictureSchema)}),"What is on show drawn better than a screenshot can, or what a screenshot cannot reach: a render's frame, a frame of its own. Laid in order over the host's screenshot."),"note/locate":e(t.strictObject({mark:NoteShapeSchema}),t.strictObject({elements:t.array(NoteElementSchema)}),"What a mark is on, while frozen: the surface alone knows what it shows, and says it in its own terms, with its file and line where it knows them. Empty is an answer: the mark's place still goes."),"note/thaw":e(t.strictObject({}),t.strictObject({}),"The person is done. Nothing starts by itself: a video that was paused stays paused.")};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** The brand an `openEnum`'s unknown word carries, so code that switches on one has to say what it does with it. */
|
|
3
|
+
export type Unknown = z.$brand<"Unknown">;
|
|
4
|
+
/**
|
|
5
|
+
* A word from a list that grows: the words this client knows, typed, and
|
|
6
|
+
* any other kept as it is, as a string branded `Unknown`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const openEnum: <const T extends readonly [string, ...string[]]>(words: T) => z.ZodUnion<readonly [z.ZodEnum<{ [k_1 in T[number]]: k_1; } extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
|
|
9
|
+
/** Whether an `openEnum`'s word is one of the words this client knows. */
|
|
10
|
+
export declare const known: <const T extends readonly string[]>(words: T, word: string) => word is T[number];
|
|
11
|
+
/** A list whose entries this client cannot read (a kind added later) are left out, not the whole list refused. */
|
|
12
|
+
export declare const readable: <S extends z.ZodType>(entry: S) => z.ZodPipe<z.ZodArray<z.ZodUnknown>, z.ZodTransform<z.core.output<S>[], unknown[]>>;
|
|
13
|
+
//# sourceMappingURL=open.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{z as r}from"zod";export const openEnum=n=>r.union([r.enum(n),r.string().min(1).brand()]),known=(n,o)=>n.includes(o),readable=n=>r.array(r.unknown()).transform(o=>o.flatMap(e=>{const a=n.safeParse(e);return a.success?[a.data]:[]}));
|