@columnus/shared 0.1.58 → 0.1.59
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/assetSettings.d.ts +0 -6
- package/dist/assetSettings.js.map +1 -1
- package/dist/index.js +10 -60
- package/dist/index.js.map +1 -1
- package/dist/schemaGenerator.d.ts +0 -19
- package/dist/schemaGenerator.js +10 -60
- package/dist/schemaGenerator.js.map +1 -1
- package/dist/syncChannel.js.map +1 -1
- package/package.json +1 -1
package/dist/assetSettings.d.ts
CHANGED
|
@@ -41,11 +41,6 @@ export type AssetRebuildStatus = {
|
|
|
41
41
|
assetsExamined: number;
|
|
42
42
|
enqueued: number;
|
|
43
43
|
};
|
|
44
|
-
export type AssetMigrationStatus = {
|
|
45
|
-
state: "idle" | "running" | "failed" | "done";
|
|
46
|
-
cursor?: string;
|
|
47
|
-
error?: string;
|
|
48
|
-
};
|
|
49
44
|
export type AssetSettings = MediaUploadCaps & {
|
|
50
45
|
familyGraphs: Partial<Record<AssetFamily, AssetRenditionNode[]>>;
|
|
51
46
|
familySchemas: Partial<Record<AssetFamily, AssetSchemaBinding[]>>;
|
|
@@ -53,7 +48,6 @@ export type AssetSettings = MediaUploadCaps & {
|
|
|
53
48
|
slots?: Partial<Record<AssetFamily, AssetSlotMapping>>;
|
|
54
49
|
/** R10: rebuild work a graph save signed up for, drained by cron. */
|
|
55
50
|
rebuildStatus?: AssetRebuildStatus;
|
|
56
|
-
migrateStatus?: AssetMigrationStatus;
|
|
57
51
|
updatedAt: number;
|
|
58
52
|
};
|
|
59
53
|
export type AssetProfile = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/assetSettings.ts"],"names":[],"mappings":";AAGO,IAAM,wBAAA,GAA2B,EAAA,GAAK,IAAA,GAAO,IAAA,GAAO;AACpD,IAAM,0BAAA,GAA6B,GAAA,GAAM,IAAA,GAAO,IAAA,GAAO;AAOvD,IAAM,yBAAA,GAA6C;AA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A,EAAO,EAAE,OAAA,EAAS,SAAA,EAAW,SAAS,SAAA;AACxC;AAOO,SAAS,oBAAA,GAAyD;AACvE,EAAA,OAAO;AAAA,IACL,GAAG,yBAAA;AAAA,IACH,YAAA,EAAc,EAAE,KAAA,EAAO,mBAAA,EAAoB;AAAA,IAC3C,eAAe,EAAC;AAAA,IAChB,KAAA,EAAO;AAAA,GACT;AACF;AAWO,SAAS,oBAAA,GAAsC;AACpD,EAAA,OAAO,EAAE,GAAG,oBAAA,EAAqB,EAAG,WAAW,CAAA,EAAE;AACnD;AASO,SAAS,wBAAA,CACd,UACA,MAAA,EAC8B;AAC9B,EAAA,IAAI,MAAA,KAAW,QAAW,OAAO,MAAA;AACjC,EAAA,MAAM,QAAA,GAAW,YAAY,oBAAA,EAAqB;AAClD,EAAA,OAAO,QAAA,CAAS,KAAA,GAAQ,MAAM,CAAA,IAAK,oBAAoB,MAAM,CAAA;AAC/D","file":"assetSettings.js","sourcesContent":["import type { AssetFamily } from \"./assetFamily.ts\";\nimport type { AssetRenditionNode } from \"./assetGraph.ts\";\n\nexport const DEFAULT_MEDIA_WARN_BYTES = 10 * 1024 * 1024 * 1024;\nexport const DEFAULT_MEDIA_REJECT_BYTES = 100 * 1024 * 1024 * 1024;\n\nexport type MediaUploadCaps = {\n warnBytes: number;\n rejectBytes: number;\n};\n\nexport const DEFAULT_MEDIA_UPLOAD_CAPS: MediaUploadCaps = {\n warnBytes: DEFAULT_MEDIA_WARN_BYTES,\n rejectBytes: DEFAULT_MEDIA_REJECT_BYTES,\n};\n\nexport type MediaUploadLimit =\n | { level: \"warn\"; message: string }\n | { level: \"reject\"; message: string };\n\nexport function formatMediaBytes(bytes: number): string {\n if (bytes < 1024) return `${bytes} B`;\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;\n if (bytes < 1024 * 1024 * 1024) return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;\n return `${(bytes / (1024 * 1024 * 1024)).toFixed(1)} GB`;\n}\n\n/** Returns a stable validation message for settings forms and server-side writes. */\nexport function mediaUploadCapsError(caps: MediaUploadCaps): string | null {\n if (!Number.isSafeInteger(caps.warnBytes) || caps.warnBytes < 0) {\n return \"Media warning limit must be a non-negative whole number of bytes\";\n }\n if (!Number.isSafeInteger(caps.rejectBytes) || caps.rejectBytes <= 0) {\n return \"Media reject limit must be a positive whole number of bytes\";\n }\n if (caps.warnBytes > caps.rejectBytes) {\n return \"Media warning limit cannot exceed the reject limit\";\n }\n return null;\n}\n\n/** Determine whether a client should ask for confirmation or reject immediately. */\nexport function mediaUploadLimit(size: number, caps: MediaUploadCaps): MediaUploadLimit | null {\n if (!Number.isSafeInteger(size) || size < 0) {\n return { level: \"reject\", message: \"Media upload size is invalid\" };\n }\n if (size > caps.rejectBytes) {\n return {\n level: \"reject\",\n message: `This file is ${formatMediaBytes(size)}. Media uploads are limited to ${formatMediaBytes(caps.rejectBytes)}.`,\n };\n }\n if (size > caps.warnBytes) {\n return {\n level: \"warn\",\n message: `This file is ${formatMediaBytes(size)}, above the ${formatMediaBytes(caps.warnBytes)} Media warning limit. Continue uploading?`,\n };\n }\n return null;\n}\n\n/** A schema table bound to a family or profile, with its required fields. */\nexport type AssetSchemaBinding = {\n schemaTable: string;\n requiredFields?: string[];\n defaultValues?: unknown;\n};\n\n/** R3: which graph node each Studio delivery slot resolves to. */\nexport type AssetSlotMapping = { compact?: string; preview?: string };\n\nexport type AssetRebuildStatus = {\n pending: { family: AssetFamily; rebuild: string[]; removed: string[] }[];\n cursor?: string | null;\n startedAt: number;\n assetsExamined: number;\n enqueued: number;\n};\n\nexport type AssetMigrationStatus = {\n state: \"idle\" | \"running\" | \"failed\" | \"done\";\n cursor?: string;\n error?: string;\n};\n\nexport type AssetSettings = MediaUploadCaps & {\n familyGraphs: Partial<Record<AssetFamily, AssetRenditionNode[]>>;\n familySchemas: Partial<Record<AssetFamily, AssetSchemaBinding[]>>;\n /** R3: Studio delivery slots → graph node id, per family. */\n slots?: Partial<Record<AssetFamily, AssetSlotMapping>>;\n /** R10: rebuild work a graph save signed up for, drained by cron. */\n rebuildStatus?: AssetRebuildStatus;\n migrateStatus?: AssetMigrationStatus;\n updatedAt: number;\n};\n\nexport type AssetProfile = {\n slug: string;\n name: string;\n families?: AssetFamily[];\n schemas: AssetSchemaBinding[];\n extraNodes: AssetRenditionNode[];\n createdAt: number;\n updatedAt: number;\n};\n\n/** G21 default image graph: preview 2000 contain WebP q80, siblings thumb 400 and thumbSm 200. */\nexport const DEFAULT_IMAGE_GRAPH: AssetRenditionNode[] = [\n { id: \"preview\", op: \"contain\", maxWidth: 2000, maxHeight: 2000, format: \"webp\", quality: 80 },\n {\n id: \"thumb\",\n parentId: \"preview\",\n op: \"contain\",\n maxWidth: 400,\n maxHeight: 400,\n format: \"webp\",\n quality: 80,\n },\n {\n id: \"thumbSm\",\n parentId: \"preview\",\n op: \"contain\",\n maxWidth: 200,\n maxHeight: 200,\n format: \"webp\",\n quality: 80,\n },\n];\n\n/** R3 seed: grid/CMS stamp/library take `thumbSm`, Media detail takes `preview`. */\nexport const DEFAULT_ASSET_SLOTS: Partial<Record<AssetFamily, AssetSlotMapping>> = {\n image: { compact: \"thumbSm\", preview: \"preview\" },\n};\n\n/**\n * The settings a tenant starts with. The component seeds a row from this and\n * the Studio form falls back to it, so a fresh tenant and an unsaved form agree\n * on what the defaults are.\n */\nexport function defaultAssetSettings(): Omit<AssetSettings, \"updatedAt\"> {\n return {\n ...DEFAULT_MEDIA_UPLOAD_CAPS,\n familyGraphs: { image: DEFAULT_IMAGE_GRAPH },\n familySchemas: {},\n slots: DEFAULT_ASSET_SLOTS,\n };\n}\n\n/**\n * What every reader should see when a tenant has never saved Media settings.\n *\n * The component seeds a row from `defaultAssetSettings`, but until something\n * writes one `getSettings` answers `null` — and a caller reading that as \"no\n * graphs, no caps\" concludes the tenant builds nothing, which is the opposite\n * of what a fresh tenant is supposed to do. `updatedAt: 0` because there is no\n * save to report.\n */\nexport function unsavedAssetSettings(): AssetSettings {\n return { ...defaultAssetSettings(), updatedAt: 0 };\n}\n\n/**\n * Slot mapping Studio/CMS should apply for a family.\n *\n * Matches the graph builder: a never-saved tenant (or a settings row with no\n * slots for that family) gets the seed defaults. An explicit empty mapping\n * `{ image: {} }` is an opt-out and stays empty so unset still means original.\n */\nexport function resolveFamilySlotMapping(\n settings: AssetSettings | null | undefined,\n family: AssetFamily | undefined,\n): AssetSlotMapping | undefined {\n if (family === undefined) return undefined;\n const resolved = settings ?? unsavedAssetSettings();\n return resolved.slots?.[family] ?? DEFAULT_ASSET_SLOTS[family];\n}\n\n/**\n * One immutable version of an asset's original, as the component stores it and\n * every reader projects it.\n *\n * The host's component-API declaration used to name only `versionId` and\n * `originalStorageId` while Media detail declared its own copy with `size` and\n * `createdAt` — two descriptions of one payload that already disagreed.\n */\nexport type AssetVersionSnapshot = {\n versionId: string;\n assetId: string;\n originalStorageId: string;\n contentType?: string;\n filename?: string;\n size: number;\n createdAt: number;\n};\n\n/** G27: one indexed placement of an asset in a tenant row. */\nexport type AssetRefRow = {\n fromTable: string;\n fromId: string;\n fieldName: string;\n /** `null` for a scalar field; the position for an array placement. */\n arrayIndex: number | null;\n};\n\n/** One attached metadata table, projected for the Media detail editor. */\nexport type AssetMetadataRow = {\n table: string;\n fields: Record<string, unknown>;\n hasStoredRow: boolean;\n requiredFields: string[];\n /** Two active bindings disagree on a default; an editor must choose (G33). */\n conflictingDefaultFields: string[];\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/assetSettings.ts"],"names":[],"mappings":";AAGO,IAAM,wBAAA,GAA2B,EAAA,GAAK,IAAA,GAAO,IAAA,GAAO;AACpD,IAAM,0BAAA,GAA6B,GAAA,GAAM,IAAA,GAAO,IAAA,GAAO;AAOvD,IAAM,yBAAA,GAA6C;AAAA,EACxD,SAAA,EAAW,wBAAA;AAAA,EACX,WAAA,EAAa;AACf;AAMO,SAAS,iBAAiB,KAAA,EAAuB;AACtD,EAAA,IAAI,KAAA,GAAQ,I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A;AAAA,IACH,YAAA,EAAc,EAAE,KAAA,EAAO,mBAAA,EAAoB;AAAA,IAC3C,eAAe,EAAC;AAAA,IAChB,KAAA,EAAO;AAAA,GACT;AACF;AAWO,SAAS,oBAAA,GAAsC;AACpD,EAAA,OAAO,EAAE,GAAG,oBAAA,EAAqB,EAAG,WAAW,CAAA,EAAE;AACnD;AASO,SAAS,wBAAA,CACd,UACA,MAAA,EAC8B;AAC9B,EAAA,IAAI,MAAA,KAAW,QAAW,OAAO,MAAA;AACjC,EAAA,MAAM,QAAA,GAAW,YAAY,oBAAA,EAAqB;AAClD,EAAA,OAAO,QAAA,CAAS,KAAA,GAAQ,MAAM,CAAA,IAAK,oBAAoB,MAAM,CAAA;AAC/D","file":"assetSettings.js","sourcesContent":["import type { AssetFamily } from \"./assetFamily.ts\";\nimport type { AssetRenditionNode } from \"./assetGraph.ts\";\n\nexport const DEFAULT_MEDIA_WARN_BYTES = 10 * 1024 * 1024 * 1024;\nexport const DEFAULT_MEDIA_REJECT_BYTES = 100 * 1024 * 1024 * 1024;\n\nexport type MediaUploadCaps = {\n warnBytes: number;\n rejectBytes: number;\n};\n\nexport const DEFAULT_MEDIA_UPLOAD_CAPS: MediaUploadCaps = {\n warnBytes: DEFAULT_MEDIA_WARN_BYTES,\n rejectBytes: DEFAULT_MEDIA_REJECT_BYTES,\n};\n\nexport type MediaUploadLimit =\n | { level: \"warn\"; message: string }\n | { level: \"reject\"; message: string };\n\nexport function formatMediaBytes(bytes: number): string {\n if (bytes < 1024) return `${bytes} B`;\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;\n if (bytes < 1024 * 1024 * 1024) return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;\n return `${(bytes / (1024 * 1024 * 1024)).toFixed(1)} GB`;\n}\n\n/** Returns a stable validation message for settings forms and server-side writes. */\nexport function mediaUploadCapsError(caps: MediaUploadCaps): string | null {\n if (!Number.isSafeInteger(caps.warnBytes) || caps.warnBytes < 0) {\n return \"Media warning limit must be a non-negative whole number of bytes\";\n }\n if (!Number.isSafeInteger(caps.rejectBytes) || caps.rejectBytes <= 0) {\n return \"Media reject limit must be a positive whole number of bytes\";\n }\n if (caps.warnBytes > caps.rejectBytes) {\n return \"Media warning limit cannot exceed the reject limit\";\n }\n return null;\n}\n\n/** Determine whether a client should ask for confirmation or reject immediately. */\nexport function mediaUploadLimit(size: number, caps: MediaUploadCaps): MediaUploadLimit | null {\n if (!Number.isSafeInteger(size) || size < 0) {\n return { level: \"reject\", message: \"Media upload size is invalid\" };\n }\n if (size > caps.rejectBytes) {\n return {\n level: \"reject\",\n message: `This file is ${formatMediaBytes(size)}. Media uploads are limited to ${formatMediaBytes(caps.rejectBytes)}.`,\n };\n }\n if (size > caps.warnBytes) {\n return {\n level: \"warn\",\n message: `This file is ${formatMediaBytes(size)}, above the ${formatMediaBytes(caps.warnBytes)} Media warning limit. Continue uploading?`,\n };\n }\n return null;\n}\n\n/** A schema table bound to a family or profile, with its required fields. */\nexport type AssetSchemaBinding = {\n schemaTable: string;\n requiredFields?: string[];\n defaultValues?: unknown;\n};\n\n/** R3: which graph node each Studio delivery slot resolves to. */\nexport type AssetSlotMapping = { compact?: string; preview?: string };\n\nexport type AssetRebuildStatus = {\n pending: { family: AssetFamily; rebuild: string[]; removed: string[] }[];\n cursor?: string | null;\n startedAt: number;\n assetsExamined: number;\n enqueued: number;\n};\n\nexport type AssetSettings = MediaUploadCaps & {\n familyGraphs: Partial<Record<AssetFamily, AssetRenditionNode[]>>;\n familySchemas: Partial<Record<AssetFamily, AssetSchemaBinding[]>>;\n /** R3: Studio delivery slots → graph node id, per family. */\n slots?: Partial<Record<AssetFamily, AssetSlotMapping>>;\n /** R10: rebuild work a graph save signed up for, drained by cron. */\n rebuildStatus?: AssetRebuildStatus;\n updatedAt: number;\n};\n\nexport type AssetProfile = {\n slug: string;\n name: string;\n families?: AssetFamily[];\n schemas: AssetSchemaBinding[];\n extraNodes: AssetRenditionNode[];\n createdAt: number;\n updatedAt: number;\n};\n\n/** G21 default image graph: preview 2000 contain WebP q80, siblings thumb 400 and thumbSm 200. */\nexport const DEFAULT_IMAGE_GRAPH: AssetRenditionNode[] = [\n { id: \"preview\", op: \"contain\", maxWidth: 2000, maxHeight: 2000, format: \"webp\", quality: 80 },\n {\n id: \"thumb\",\n parentId: \"preview\",\n op: \"contain\",\n maxWidth: 400,\n maxHeight: 400,\n format: \"webp\",\n quality: 80,\n },\n {\n id: \"thumbSm\",\n parentId: \"preview\",\n op: \"contain\",\n maxWidth: 200,\n maxHeight: 200,\n format: \"webp\",\n quality: 80,\n },\n];\n\n/** R3 seed: grid/CMS stamp/library take `thumbSm`, Media detail takes `preview`. */\nexport const DEFAULT_ASSET_SLOTS: Partial<Record<AssetFamily, AssetSlotMapping>> = {\n image: { compact: \"thumbSm\", preview: \"preview\" },\n};\n\n/**\n * The settings a tenant starts with. The component seeds a row from this and\n * the Studio form falls back to it, so a fresh tenant and an unsaved form agree\n * on what the defaults are.\n */\nexport function defaultAssetSettings(): Omit<AssetSettings, \"updatedAt\"> {\n return {\n ...DEFAULT_MEDIA_UPLOAD_CAPS,\n familyGraphs: { image: DEFAULT_IMAGE_GRAPH },\n familySchemas: {},\n slots: DEFAULT_ASSET_SLOTS,\n };\n}\n\n/**\n * What every reader should see when a tenant has never saved Media settings.\n *\n * The component seeds a row from `defaultAssetSettings`, but until something\n * writes one `getSettings` answers `null` — and a caller reading that as \"no\n * graphs, no caps\" concludes the tenant builds nothing, which is the opposite\n * of what a fresh tenant is supposed to do. `updatedAt: 0` because there is no\n * save to report.\n */\nexport function unsavedAssetSettings(): AssetSettings {\n return { ...defaultAssetSettings(), updatedAt: 0 };\n}\n\n/**\n * Slot mapping Studio/CMS should apply for a family.\n *\n * Matches the graph builder: a never-saved tenant (or a settings row with no\n * slots for that family) gets the seed defaults. An explicit empty mapping\n * `{ image: {} }` is an opt-out and stays empty so unset still means original.\n */\nexport function resolveFamilySlotMapping(\n settings: AssetSettings | null | undefined,\n family: AssetFamily | undefined,\n): AssetSlotMapping | undefined {\n if (family === undefined) return undefined;\n const resolved = settings ?? unsavedAssetSettings();\n return resolved.slots?.[family] ?? DEFAULT_ASSET_SLOTS[family];\n}\n\n/**\n * One immutable version of an asset's original, as the component stores it and\n * every reader projects it.\n *\n * The host's component-API declaration used to name only `versionId` and\n * `originalStorageId` while Media detail declared its own copy with `size` and\n * `createdAt` — two descriptions of one payload that already disagreed.\n */\nexport type AssetVersionSnapshot = {\n versionId: string;\n assetId: string;\n originalStorageId: string;\n contentType?: string;\n filename?: string;\n size: number;\n createdAt: number;\n};\n\n/** G27: one indexed placement of an asset in a tenant row. */\nexport type AssetRefRow = {\n fromTable: string;\n fromId: string;\n fieldName: string;\n /** `null` for a scalar field; the position for an array placement. */\n arrayIndex: number | null;\n};\n\n/** One attached metadata table, projected for the Media detail editor. */\nexport type AssetMetadataRow = {\n table: string;\n fields: Record<string, unknown>;\n hasStoredRow: boolean;\n requiredFields: string[];\n /** Two active bindings disagree on a default; an editor must choose (G33). */\n conflictingDefaultFields: string[];\n};\n"]}
|
package/dist/index.js
CHANGED
|
@@ -6651,9 +6651,8 @@ function generateSchemaTs(manifest, opts) {
|
|
|
6651
6651
|
const includeManifestTable = opts?.includeManifestTable ?? true;
|
|
6652
6652
|
const includeAuditTable = opts?.includeAuditTable ?? true;
|
|
6653
6653
|
const includeDisplayValuesTable = opts?.includeDisplayValuesTable ?? true;
|
|
6654
|
-
const assetFieldIds = opts?.assetFieldIds ?? "assets";
|
|
6655
6654
|
const userTables = [...manifest.tables].sort((a, b) => a.name.localeCompare(b.name));
|
|
6656
|
-
const userBody = userTables.map((t) => ` ${t.name}: ${renderTable(t
|
|
6655
|
+
const userBody = userTables.map((t) => ` ${t.name}: ${renderTable(t)},`).join("\n");
|
|
6657
6656
|
let body;
|
|
6658
6657
|
if (includeColumnusTables) {
|
|
6659
6658
|
const columnusSource = columnusTablesSource({
|
|
@@ -6669,15 +6668,14 @@ function generateSchemaTs(manifest, opts) {
|
|
|
6669
6668
|
const banner = includeColumnusTables ? BANNER : CONSUMER_BANNER;
|
|
6670
6669
|
const schemaBody = body ? `${body}
|
|
6671
6670
|
` : "";
|
|
6672
|
-
const schemaOpts = opts?.schemaValidation === false ? ", { schemaValidation: false }" : "";
|
|
6673
6671
|
return `${banner}import { defineSchema, defineTable } from "convex/server";
|
|
6674
6672
|
import { v } from "convex/values";
|
|
6675
6673
|
|
|
6676
6674
|
export default defineSchema({
|
|
6677
|
-
${schemaBody}}
|
|
6675
|
+
${schemaBody}});
|
|
6678
6676
|
`;
|
|
6679
6677
|
}
|
|
6680
|
-
function renderTable(t
|
|
6678
|
+
function renderTable(t) {
|
|
6681
6679
|
const fields = isAssetTable(t) ? [
|
|
6682
6680
|
...t.fields,
|
|
6683
6681
|
{
|
|
@@ -6688,7 +6686,7 @@ function renderTable(t, assetFieldIds) {
|
|
|
6688
6686
|
] : t.fields;
|
|
6689
6687
|
const fieldsBlock = fields.length ? `{
|
|
6690
6688
|
${fields.map((f) => {
|
|
6691
|
-
const inner = renderType(f.type
|
|
6689
|
+
const inner = renderType(f.type);
|
|
6692
6690
|
const value = f.optional ? `v.optional(${inner})` : inner;
|
|
6693
6691
|
return ` ${f.name}: ${value},`;
|
|
6694
6692
|
}).join("\n")}
|
|
@@ -6712,20 +6710,7 @@ ${fields.map((f) => {
|
|
|
6712
6710
|
}
|
|
6713
6711
|
return out;
|
|
6714
6712
|
}
|
|
6715
|
-
function
|
|
6716
|
-
const assetId = `v.id(${JSON.stringify(ASSETS_TABLE_NAME)})`;
|
|
6717
|
-
switch (assetFieldIds) {
|
|
6718
|
-
case "storage-or-assets":
|
|
6719
|
-
return `v.union(v.id("_storage"), ${assetId})`;
|
|
6720
|
-
case "assets":
|
|
6721
|
-
return assetId;
|
|
6722
|
-
default: {
|
|
6723
|
-
const _exhaustive = assetFieldIds;
|
|
6724
|
-
return _exhaustive;
|
|
6725
|
-
}
|
|
6726
|
-
}
|
|
6727
|
-
}
|
|
6728
|
-
function renderType(t, assetFieldIds) {
|
|
6713
|
+
function renderType(t) {
|
|
6729
6714
|
switch (t.kind) {
|
|
6730
6715
|
case "string":
|
|
6731
6716
|
case "markdown":
|
|
@@ -6747,62 +6732,27 @@ function renderType(t, assetFieldIds) {
|
|
|
6747
6732
|
return "v.bytes()";
|
|
6748
6733
|
case "file":
|
|
6749
6734
|
case "image":
|
|
6750
|
-
return
|
|
6735
|
+
return `v.id(${JSON.stringify(ASSETS_TABLE_NAME)})`;
|
|
6751
6736
|
case "id":
|
|
6752
6737
|
return `v.id(${JSON.stringify(t.table)})`;
|
|
6753
6738
|
case "literal":
|
|
6754
6739
|
return `v.literal(${JSON.stringify(t.value)})`;
|
|
6755
6740
|
case "array":
|
|
6756
|
-
return `v.array(${renderType(t.element
|
|
6741
|
+
return `v.array(${renderType(t.element)})`;
|
|
6757
6742
|
case "object": {
|
|
6758
6743
|
if (t.fields.length === 0) return `v.object({})`;
|
|
6759
6744
|
const inner = t.fields.map((f) => {
|
|
6760
|
-
const inner2 = renderType(f.type
|
|
6745
|
+
const inner2 = renderType(f.type);
|
|
6761
6746
|
const value = f.optional ? `v.optional(${inner2})` : inner2;
|
|
6762
6747
|
return `${f.name}: ${value}`;
|
|
6763
6748
|
}).join(", ");
|
|
6764
6749
|
return `v.object({ ${inner} })`;
|
|
6765
6750
|
}
|
|
6766
6751
|
case "union":
|
|
6767
|
-
return `v.union(${t.options.map((option) => renderType(option
|
|
6752
|
+
return `v.union(${t.options.map((option) => renderType(option)).join(", ")})`;
|
|
6768
6753
|
}
|
|
6769
6754
|
throw new Error(`unknown field kind: ${t.kind}`);
|
|
6770
6755
|
}
|
|
6771
|
-
function fieldTypeContainsFileOrImage(t) {
|
|
6772
|
-
switch (t.kind) {
|
|
6773
|
-
case "file":
|
|
6774
|
-
case "image":
|
|
6775
|
-
return true;
|
|
6776
|
-
case "array":
|
|
6777
|
-
return fieldTypeContainsFileOrImage(t.element);
|
|
6778
|
-
case "object":
|
|
6779
|
-
return t.fields.some((field) => fieldTypeContainsFileOrImage(field.type));
|
|
6780
|
-
case "union":
|
|
6781
|
-
return t.options.some(fieldTypeContainsFileOrImage);
|
|
6782
|
-
case "string":
|
|
6783
|
-
case "markdown":
|
|
6784
|
-
case "number":
|
|
6785
|
-
case "boolean":
|
|
6786
|
-
case "bigint":
|
|
6787
|
-
case "null":
|
|
6788
|
-
case "any":
|
|
6789
|
-
case "bytes":
|
|
6790
|
-
case "date":
|
|
6791
|
-
case "datetime":
|
|
6792
|
-
case "id":
|
|
6793
|
-
case "literal":
|
|
6794
|
-
return false;
|
|
6795
|
-
default: {
|
|
6796
|
-
const _exhaustive = t;
|
|
6797
|
-
return _exhaustive;
|
|
6798
|
-
}
|
|
6799
|
-
}
|
|
6800
|
-
}
|
|
6801
|
-
function manifestHasFileOrImageFields(manifest) {
|
|
6802
|
-
return manifest.tables.some(
|
|
6803
|
-
(table) => table.fields.some((field) => fieldTypeContainsFileOrImage(field.type))
|
|
6804
|
-
);
|
|
6805
|
-
}
|
|
6806
6756
|
|
|
6807
6757
|
// packages/@columnus/shared/src/schemaShrink.ts
|
|
6808
6758
|
var SHRINK_IMPACT_CAP = 500;
|
|
@@ -11544,6 +11494,6 @@ papaparse/papaparse.min.js:
|
|
|
11544
11494
|
*)
|
|
11545
11495
|
*/
|
|
11546
11496
|
|
|
11547
|
-
export { API_DELIVERY_TABLE_NAME, API_OUTBOX_TABLE_NAME, API_OUTPUTS_TABLE_NAME, API_OUTPUT_SECRETS_TABLE_NAME, API_PROFILES_TABLE_NAME, API_PROFILE_SLUG_RE, API_SYNC_ROUTES_TABLE_NAME, API_TOKENS_TABLE_NAME, API_TOKEN_PREFIX, ASSETS_TABLE_NAME, ASSET_FAMILIES, ASSET_JOB_KINDS, ASSET_JOB_LEASE_MS, ASSET_JOB_MAX_ATTEMPTS, ASSET_JOB_MAX_RECLAIMS, ASSET_JOB_STATUSES, ASSET_JOB_TIMEOUT_MS, ASSET_PROCESSING_STATUSES, ASSET_PROFILES_TABLE_NAME, ASSET_REFS_TABLE_NAME, ASSET_SETTINGS_TABLE_NAME, ASSET_VERSIONS_TABLE_NAME, AUDIT_TABLE_NAME, BFF_JSON_BODY_LIMIT_BYTES, MAX_TRANSFER_BYTES as BFF_TRANSFER_MAX_BYTES, COLUMNUS_BFF_API_PREFIX, COLUMNUS_BFF_MANAGEMENT_PREFIX, COLUMNUS_BFF_MANAGEMENT_SECRET_HEADER, COLUMNUS_BFF_PROTOCOL_VERSION, COLUMNUS_BUNDLE_VERSION, COLUMNUS_CLIPBOARD_MARKER, COLUMNUS_CLIPBOARD_VERSION, COLUMNUS_DATA_TRANSFER_VERSION, COLUMNUS_DEPLOY_INTERNAL_PREFIX, COLUMNUS_DEPLOY_OPS_PREFIX, COLUMNUS_DOC_LINK_MARKER, COLUMNUS_PREVIEW_REGISTRATION_SECRET_HEADER, DEFAULT_ASSET_SLOTS, DEFAULT_IMAGE_GRAPH, DEFAULT_MAX_SCAN_LIMIT, DEFAULT_MEDIA_REJECT_BYTES, DEFAULT_MEDIA_UPLOAD_CAPS, DEFAULT_MEDIA_WARN_BYTES, DISPLAYABLE_VECTOR_CONTENT_TYPES, DISPLAY_VALUES_TABLE_NAME, EMPTY_BLOCK_ID, EMPTY_MANIFEST, EMPTY_MARKDOWN_DOC, EMPTY_RICH_DOC, FIELD_TYPE_KIND_ICONS, FIELD_TYPE_KIND_LABELS, FIELD_TYPE_SELECT_KINDS, HOST_SCHEMA_PROFILE, INCOMING_REFS_TABLE_NAME, MANIFEST_DEPLOY_STATUSES, MANIFEST_HASH_RE, MANIFEST_TABLE_NAME, MATCH_ERROR_KEY, MAX_RENDER_MEGAPIXELS, MAX_RENDER_PIXELS, MAX_TRANSFER_BYTES, MEDIA_LIBRARY_JOURNAL_TTL_MS, OPERATION_ID_RE, OVERLAP_MESSAGE, PREDICATE_OPS, PREDICATE_VARIANTS, PREVIEW_TENANT_SLUG_RE, RECORD_TABLE_DEFAULT_FIELD_COUNT, REDACTED, REFS_RECOMPUTE_STALE_MS, RENDITION_TIMEOUT_MS, RESERVED_TABLE_NAMES, RESERVED_TENANT_SLUGS, RICH_DOC_FORMAT, RICH_DOC_VERSION, SCHEMA_DEPLOY_OPERATION_LEASE_MS, SHARE_TOKEN_ENCRYPTION_KEY_ENV, SHARE_TOKEN_PREFIX, SHRINK_CLEANUP_PAGE_SIZE, SHRINK_IMPACT_CAP, SPACES_TABLE_NAME, STALE_ENDPOINT_DEPLOY_ERROR, STUDIO_DOC_LINK_MARKER, TABLE_COLORS, TABLE_KINDS, TABLE_NAME_RE2 as TABLE_NAME_RE, TENANT_SECRETS_KEK_ENV, TENANT_SECRET_CRYPTO_VERSION, TENANT_SLUG_RE, TRANSFER_ID_RE, VECTOR_FILE_ACCEPT, addRef, anyTenantSlugFromHost, apiProfileSlugToConvexModuleSegment, apiProfileSnapshotSchema, apiProfileToShareScopes, apiProfilesSchema, apiTableAccessSchema, apiTokenPrefix, applyDisplayIdResolution, applyImportRowIdResolution, assertApiProfileSlug, assertAssetSlotsResolve, assertPatchesHaveEditorAccess, assertProfileSlugUnchanged, assertProposalAccess, assertShareLinkTypeConsistency, assertShareOperation, assertTableKindsImmutable, assetBindingSchema, assetBuildsRenditions, assetFamilyForContentType, assetJobFailureOutcome, assetJobKey, assetJobLeaseExpired, assetJobReclaimOutcome, assetJobRetryDelayMs, assetMatchesProfileScope, assetSlotView, attachBffCleanupIdentity, authConfigIssuerFromProcessEnv, betterAuthTrustedOrigins, betweenToIndexBound, bffActiveOperationMetaSchema, bffErrorCodeSchema, bffErrorResponseSchema, bffHealthResponseSchema, bffPrepareOperationSchema, bffPrepareOperationTypeSchema, bffPrepareRequestSchema, bffPreparedBodyEnvelopeSchema, bffPreparedTenantSchema, bffPreviewRegisterRequestSchema, bffPreviewRemoveRequestSchema, bffSchemaDeployRequestSchema, bffSchemaDeployResponseSchema, bffTransferCommitRequestSchema, bffTransferCommitResponseSchema, bffTransferCreateResponseSchema, bffTransferScopeRequestSchema, bffTransferUploadResponseSchema, blocksForBlockNoteDisplay, briefFieldTypeLabel, buildCleanupTasks, buildCsvRows, buildCsvRowsForColumns, buildImportCommitRows, buildRecordTablePreload, buildRefRequestsFromFieldValues, buildRefRequestsFromTableRows, buildShareWizardInput, buildShrinkImpactPreview, buildSpaceExport, canCreateFormReferences, canProposeInsert, canProposeOperation, canSearchFormReferences, canonicalManifestTablesJson, canonicalRichFieldJson, childRenditionNodes, ciPreviewDeployName, clampQuerySchema, clampQueryValidator, classifyPhase, cleanupStateValidator, coerceCsvValue, collectAssetIds, collectAssetIdsFromRow, collectExportDisplayIdRefs, collectFilterRefIds, collectIdReferenceClosure, collectIdsFromField, collectIdsFromValues, collectImportDisplayIds, collectImportRowDisplayIds, collectMatchDisplayIdRefs, collectQueryRefIds, collectRecordLinkIds, collectRecordLinkIdsFromBlocks, collectReferencedIds, collectRichDocAssetIds, compareOrdered, computeManifestAccessHash, computeManifestHash, computeProposalFieldDiff, computeProposalRecordDiff, computeRefGraphFingerprint, computeShrinkPlan, convexCloudToSiteUrl, convexDeploymentSlugFromUrl, convexSiteToCloudUrl, convexSiteUrlFromProcessEnv, coolifyHostnameFromEnv, createCleanupState, createOperationId, createRandomId, createTransferId, csvHasIdColumn, cycleQueryOrder, dataTransferManifestSchema, dateInputValue, dateTimeInputValue, decryptShareToken, decryptTenantSecret, defaultAssetSettings, defaultMatchColumn, defaultProdDeployUrl, defaultRecordTableFieldNames, defaultValueForType, deployHealthResponseSchema, deployInternalSchemaDeployPayloadSchema, deployInternalSchemaDeployResponseSchema, deployInternalTransferCommitPayloadSchema, deployInternalTransferCreateResponseSchema, deployInternalTransferExportPayloadSchema, deployInternalTransferImportPreparePayloadSchema, deriveConvexDeploymentFromCloudUrl, deriveListMeta, derivePreviewDeployBuildUrl, derivePreviewStudioDeployUrl, describeFieldType, discretionaryRecordTableFieldNames, displayTemplatesSchema, docsSeedSyncEmailFromEnv, documentMatchesPredicate, documentMatchesPredicates, documentMatchesSyncChannel, documentMatchesSyncClamp, editorAccessEnabled, editorAccessToShareScopes, effectiveQueryFieldType, eligibleReferencedParents, emptyCleanupStats, emptyParagraphBlock, emptyToUndefined, encryptShareToken, encryptTenantSecret, extractError, extractPlainText, extractTrustedHostname, fallbackIdLabel, fallbackPreviewLabel, fieldByName, fieldDisplayName, fieldOpSupport, fieldSchema, fieldSupportsSort, fieldTypeHasOutgoingRefs, fieldTypeKindIconName, fieldTypeKindLabel, fieldTypeSchema, fieldValuesEqual, filterChangedPatchFields, findDuplicateIdentifier, findOverlappingProposalIds, findProposalIdsOverlappingTarget, findSearchIndex, findShareScopeConflicts, findTableAccess, findTemplateRefsToRemovedFields, findUnsatisfiablePredicates, focalObjectPosition, formatCanonicalFieldType, formatDateCell, formatDateTimeCell, formatDisplayPreviewText, formatEditorSummaryFieldType, formatErdCompactFieldType, formatEscapeShortcut, formatFilterEqDisplayValue, formatIdShort, formatMatchLabelFieldType, formatMediaBytes, formatModEnterShortcut, formatModShortcut, formatNumericDate, formatPrimitivePreview, formatRecordTableCellText, formatRecordTableQuerySummary, formatShrinkImpactLine, generateApiToken, generateDisplayValuesTs, generateSchemaTs, generateShareToken, generateTenantSecretsKekBase64, guestSearchableScopes, guestVisibleScopes, hasIdentifierCollision, hasSchemaDeployOperationLeaseExpired, hashApiToken, hashShareToken, hostFromForwardedHeader, hostnameFromHostHeader, idListMeta, importStagingId, indexSchema, inferDefaultGuestView, inferIdentifier, inferUniqueIdentifier, isApiProfileSlug, isApiTokenFormat, isAssetFamily, isAssetTable, isBlockNoteContent, isBlockNoteEnvelope, isCiPreviewBuild, isClassifiedKey, isCompleteBetween, isConvexJwt, isDisplayableVectorContentType, isEditableKind, isEmptyQuery, isExtractableFamily, isFileArrayFieldType, isFileFieldType, isFormSubmissionScope, isHttpUrl, isImageFieldPickable, isImageFieldType, isInlinePrimitive, isJwtExpired, isLoopbackDeployServiceUrl, isManifestDeployStatus, isManifestHash, isMarkdownField, isOperationId, isPlaceholderManagementSiteUrl, isPreviewStudioHost, isPrimaryShareScope, isPrimitiveKind, isProdDeployServiceUrl, isProtectedTransferTable, isRadixOverlayOpen, isRangeOp, isRasterRenditionSource, isRecoverableDeployError, isReferenceFieldType, isReferenceOnlyScope, isRefsRecomputeInFlight, isReservedTenantSlug, isSchemaDeployOperationBlocking, isSchemaDeployPhaseActive, isStaleEndpointDeployError, isStorageFieldType, isSystemField, isTextScalarKind, isTransferId, isTypingInEditor, isValidAssetId, isValidIdentifier, isValidMarkdownDocJson, isValidPreviewTenantSlug, isValidRichFieldJson, isValidTenantSlug, isVectorContentType, listAccessKindSchema, listMetaOrderSchema, listMetaSchema, listPageKindSchema, listTablesWithRefGraphChanges, looksLikeId, makePredicate, manifestHasFileOrImageFields, manifestHashSchema, manifestSchema, manifestTablesUseFileStorage, mapsFromAssetDisplayRows, matchColumnsForTable, matchEscape, matchKeyFromColumn, matchModEnter, matchModShiftShortcut, matchModShortcut, matchSave, matchToggleEditMode, matchUndoRedo, matchesBetween, matchesDeployCompletion, maxScanLimitValidator, mediaUploadCapsError, mediaUploadLimit, mergeDraftErdLayoutIntoCanonical, mergeErdLayouts, mergeProposedRecord, mergeQuery, mergeReferenceScopes, mergeStagingPendingEdits, modKeyLabel, newProvisionalRowId, nextAssetJobWakeAt, normalizeConvexUrl, normalizeDisplayFocal, normalizeDisplayTemplateBody, normalizeManifestDisplayTemplates, normalizeManifestForShrink, normalizeMarkdownField, normalizeMatchKeyFromCsvRow, normalizeMatchKeyFromValue, normalizePreviewDeployName, normalizeRichField, normalizeShareScopes, opAllowedForType, operationIdSchema, parseClampQuery, parseColumnusClipboard, parseCsvText, parseDateCsv, parseDateInput, parseDateTimeInput, parseDocLinkHref, parseErdLayoutOrEmpty, parseErdLayoutOrThrow, parseGitSha, parseImportPaste, parseQuery, parseQueryJson, parseRecordTableFieldsJson, parseRecordTableQueryJson, parseRichDocBlocks, parseShareTokenEncryptionKey, parseTenantSecretsKek, parseTrustedSiteUrls, patchIsStale, patchMergeImportRow, pendingRebuildsForSave, pickProposalFields, planGraphDelta, planMergedQuery, planProposalPatches, planQuery, planStudioBoot, postLoginRedirectPath, postprocessDocLinksInBlocks, predicateOpLabel, predicateOpSchema, predicateSchema, predicateValidator, predicatesEqual, prepareProposalPatchesForAccept, prepareShrinkSave, preprocessDocLinksInBlocks, preprocessDocLinksInMarkdown, previewImportMerge, previewSlugFromHost, primaryTrustedSiteUrl, profileSlugChangeError, profileTableAccesses, promoteErdLayoutOnSave, proposalDiffFieldNames, proposalOverlapsAny, proposeApiExportName, provisionalRowKey, pruneErdLayout, publicRenditionUrlKeys, queriesEqual, queryArgValidator, queryErrorCodeSchema, queryHasActiveConstraints, queryOrderSchema, queryPredicateFieldNames, querySchema, querySearchSchema, queryValidator, readApiAnyApiPath, readApiQueryExportName, readApiQueryModuleSegment, readConvexSiteUrlEnv, readTenantSecretsKekFromEnv, reconcileStagingMatchState, redactForLogs, redactString, refFieldsForTable, referencedTargetIds, refsMapToRequests, renderPixelCapError, renditionNodeFingerprint, renditionPlan, replaceProvisionalReferences, residualClampPredicates, resolveAssetGraph, resolveAssetSlotDisplay, resolveAuthConfigIssuerFromEnv, resolveBffManagementSiteUrl, resolveChannelMembershipOp, resolveConvexSiteUrl, resolveConvexSiteUrlFromEnv, resolveFamilySlotMapping, resolveGuestCapabilities, resolveGuestLinkCapabilities, resolveGuestScopeCapabilities, resolveImportMatches, resolvePreloadedLabel, resolvePreviewBranch, resolvePreviewPrId, resolveQueryFieldType, resolveRecordTableVisibleFields, resolveRuntimeDeployServiceUrl, resolveRuntimeManagementSiteUrl, resolveSyncDeployUrl, resolveSyncMembershipOp, resolveTrustedAuthOrigin, revalidateStagingRow, richContentPlainText, rollupProcessingStatus, rootRenditionNodes, runAcceptProposalBatch, safePostLoginPath, safeStringify, sanitizePreviewDeployName, savedTableByName, schemaDeployPhaseSchema, scopesToWizardInput, searchIndexSchema, secretsEqual, serializeColumnusClipboard, serializeCsvValue, serializeDateCsv, serializeDateTimeCsv, serializeErdLayout, setQueryOrder, setQueryOrderDirection, setQueryOrderField, shareScopeAccessMode, shareScopeToTableAccess, shareTokenPrefix, shareTypeDefaultScopes, shouldExpectConvexAuth, shrinkPlanIsEmpty, signInViaEmailOtp, singleHeaderHostValue, slugifyApiProfileName, snapshotBaseFields, sortDocuments, sortableQueryFields, stagingRowToImportRow, stagingRowsToGridRows, stringifyQuery, stringifyRecordTableFields, stringifyRecordTableQuery, stringifyRichDoc, stripAnsi, stripSystemFields, suggestIndexFields, summarizePreparedEnvelope, syncChannelForTable, syncClampPredicates, syncEnabledTables, tableAccessToShareScope, tableColorSchema, tableDisplayName, tableKind, tableKindSchema, tableSchema, tablesWithOutgoingRefs, takeRangeBound, tenantPublicHost, tenantSlugFromHost, toDocumentId, transferIdSchema, transferOperationSchema, transferSessionRecordSchema, transferSessionStateSchema, truncateDisplay, unionTableNames, uniqueIdentifier, unparseCsv, unsavedAssetSettings, useDebouncedCommit, useDebouncedValue, useModifierHeld, validateClipboardColumns, validateDataTransferManifest, validateDisplayTemplates, validateFieldValue, validateImportRow, validatePatch, validatePreviewSourceCommit, validateQueryForTable, validateRenditionNodes, wrapPlainTextAsRichDoc };
|
|
11497
|
+
export { API_DELIVERY_TABLE_NAME, API_OUTBOX_TABLE_NAME, API_OUTPUTS_TABLE_NAME, API_OUTPUT_SECRETS_TABLE_NAME, API_PROFILES_TABLE_NAME, API_PROFILE_SLUG_RE, API_SYNC_ROUTES_TABLE_NAME, API_TOKENS_TABLE_NAME, API_TOKEN_PREFIX, ASSETS_TABLE_NAME, ASSET_FAMILIES, ASSET_JOB_KINDS, ASSET_JOB_LEASE_MS, ASSET_JOB_MAX_ATTEMPTS, ASSET_JOB_MAX_RECLAIMS, ASSET_JOB_STATUSES, ASSET_JOB_TIMEOUT_MS, ASSET_PROCESSING_STATUSES, ASSET_PROFILES_TABLE_NAME, ASSET_REFS_TABLE_NAME, ASSET_SETTINGS_TABLE_NAME, ASSET_VERSIONS_TABLE_NAME, AUDIT_TABLE_NAME, BFF_JSON_BODY_LIMIT_BYTES, MAX_TRANSFER_BYTES as BFF_TRANSFER_MAX_BYTES, COLUMNUS_BFF_API_PREFIX, COLUMNUS_BFF_MANAGEMENT_PREFIX, COLUMNUS_BFF_MANAGEMENT_SECRET_HEADER, COLUMNUS_BFF_PROTOCOL_VERSION, COLUMNUS_BUNDLE_VERSION, COLUMNUS_CLIPBOARD_MARKER, COLUMNUS_CLIPBOARD_VERSION, COLUMNUS_DATA_TRANSFER_VERSION, COLUMNUS_DEPLOY_INTERNAL_PREFIX, COLUMNUS_DEPLOY_OPS_PREFIX, COLUMNUS_DOC_LINK_MARKER, COLUMNUS_PREVIEW_REGISTRATION_SECRET_HEADER, DEFAULT_ASSET_SLOTS, DEFAULT_IMAGE_GRAPH, DEFAULT_MAX_SCAN_LIMIT, DEFAULT_MEDIA_REJECT_BYTES, DEFAULT_MEDIA_UPLOAD_CAPS, DEFAULT_MEDIA_WARN_BYTES, DISPLAYABLE_VECTOR_CONTENT_TYPES, DISPLAY_VALUES_TABLE_NAME, EMPTY_BLOCK_ID, EMPTY_MANIFEST, EMPTY_MARKDOWN_DOC, EMPTY_RICH_DOC, FIELD_TYPE_KIND_ICONS, FIELD_TYPE_KIND_LABELS, FIELD_TYPE_SELECT_KINDS, HOST_SCHEMA_PROFILE, INCOMING_REFS_TABLE_NAME, MANIFEST_DEPLOY_STATUSES, MANIFEST_HASH_RE, MANIFEST_TABLE_NAME, MATCH_ERROR_KEY, MAX_RENDER_MEGAPIXELS, MAX_RENDER_PIXELS, MAX_TRANSFER_BYTES, MEDIA_LIBRARY_JOURNAL_TTL_MS, OPERATION_ID_RE, OVERLAP_MESSAGE, PREDICATE_OPS, PREDICATE_VARIANTS, PREVIEW_TENANT_SLUG_RE, RECORD_TABLE_DEFAULT_FIELD_COUNT, REDACTED, REFS_RECOMPUTE_STALE_MS, RENDITION_TIMEOUT_MS, RESERVED_TABLE_NAMES, RESERVED_TENANT_SLUGS, RICH_DOC_FORMAT, RICH_DOC_VERSION, SCHEMA_DEPLOY_OPERATION_LEASE_MS, SHARE_TOKEN_ENCRYPTION_KEY_ENV, SHARE_TOKEN_PREFIX, SHRINK_CLEANUP_PAGE_SIZE, SHRINK_IMPACT_CAP, SPACES_TABLE_NAME, STALE_ENDPOINT_DEPLOY_ERROR, STUDIO_DOC_LINK_MARKER, TABLE_COLORS, TABLE_KINDS, TABLE_NAME_RE2 as TABLE_NAME_RE, TENANT_SECRETS_KEK_ENV, TENANT_SECRET_CRYPTO_VERSION, TENANT_SLUG_RE, TRANSFER_ID_RE, VECTOR_FILE_ACCEPT, addRef, anyTenantSlugFromHost, apiProfileSlugToConvexModuleSegment, apiProfileSnapshotSchema, apiProfileToShareScopes, apiProfilesSchema, apiTableAccessSchema, apiTokenPrefix, applyDisplayIdResolution, applyImportRowIdResolution, assertApiProfileSlug, assertAssetSlotsResolve, assertPatchesHaveEditorAccess, assertProfileSlugUnchanged, assertProposalAccess, assertShareLinkTypeConsistency, assertShareOperation, assertTableKindsImmutable, assetBindingSchema, assetBuildsRenditions, assetFamilyForContentType, assetJobFailureOutcome, assetJobKey, assetJobLeaseExpired, assetJobReclaimOutcome, assetJobRetryDelayMs, assetMatchesProfileScope, assetSlotView, attachBffCleanupIdentity, authConfigIssuerFromProcessEnv, betterAuthTrustedOrigins, betweenToIndexBound, bffActiveOperationMetaSchema, bffErrorCodeSchema, bffErrorResponseSchema, bffHealthResponseSchema, bffPrepareOperationSchema, bffPrepareOperationTypeSchema, bffPrepareRequestSchema, bffPreparedBodyEnvelopeSchema, bffPreparedTenantSchema, bffPreviewRegisterRequestSchema, bffPreviewRemoveRequestSchema, bffSchemaDeployRequestSchema, bffSchemaDeployResponseSchema, bffTransferCommitRequestSchema, bffTransferCommitResponseSchema, bffTransferCreateResponseSchema, bffTransferScopeRequestSchema, bffTransferUploadResponseSchema, blocksForBlockNoteDisplay, briefFieldTypeLabel, buildCleanupTasks, buildCsvRows, buildCsvRowsForColumns, buildImportCommitRows, buildRecordTablePreload, buildRefRequestsFromFieldValues, buildRefRequestsFromTableRows, buildShareWizardInput, buildShrinkImpactPreview, buildSpaceExport, canCreateFormReferences, canProposeInsert, canProposeOperation, canSearchFormReferences, canonicalManifestTablesJson, canonicalRichFieldJson, childRenditionNodes, ciPreviewDeployName, clampQuerySchema, clampQueryValidator, classifyPhase, cleanupStateValidator, coerceCsvValue, collectAssetIds, collectAssetIdsFromRow, collectExportDisplayIdRefs, collectFilterRefIds, collectIdReferenceClosure, collectIdsFromField, collectIdsFromValues, collectImportDisplayIds, collectImportRowDisplayIds, collectMatchDisplayIdRefs, collectQueryRefIds, collectRecordLinkIds, collectRecordLinkIdsFromBlocks, collectReferencedIds, collectRichDocAssetIds, compareOrdered, computeManifestAccessHash, computeManifestHash, computeProposalFieldDiff, computeProposalRecordDiff, computeRefGraphFingerprint, computeShrinkPlan, convexCloudToSiteUrl, convexDeploymentSlugFromUrl, convexSiteToCloudUrl, convexSiteUrlFromProcessEnv, coolifyHostnameFromEnv, createCleanupState, createOperationId, createRandomId, createTransferId, csvHasIdColumn, cycleQueryOrder, dataTransferManifestSchema, dateInputValue, dateTimeInputValue, decryptShareToken, decryptTenantSecret, defaultAssetSettings, defaultMatchColumn, defaultProdDeployUrl, defaultRecordTableFieldNames, defaultValueForType, deployHealthResponseSchema, deployInternalSchemaDeployPayloadSchema, deployInternalSchemaDeployResponseSchema, deployInternalTransferCommitPayloadSchema, deployInternalTransferCreateResponseSchema, deployInternalTransferExportPayloadSchema, deployInternalTransferImportPreparePayloadSchema, deriveConvexDeploymentFromCloudUrl, deriveListMeta, derivePreviewDeployBuildUrl, derivePreviewStudioDeployUrl, describeFieldType, discretionaryRecordTableFieldNames, displayTemplatesSchema, docsSeedSyncEmailFromEnv, documentMatchesPredicate, documentMatchesPredicates, documentMatchesSyncChannel, documentMatchesSyncClamp, editorAccessEnabled, editorAccessToShareScopes, effectiveQueryFieldType, eligibleReferencedParents, emptyCleanupStats, emptyParagraphBlock, emptyToUndefined, encryptShareToken, encryptTenantSecret, extractError, extractPlainText, extractTrustedHostname, fallbackIdLabel, fallbackPreviewLabel, fieldByName, fieldDisplayName, fieldOpSupport, fieldSchema, fieldSupportsSort, fieldTypeHasOutgoingRefs, fieldTypeKindIconName, fieldTypeKindLabel, fieldTypeSchema, fieldValuesEqual, filterChangedPatchFields, findDuplicateIdentifier, findOverlappingProposalIds, findProposalIdsOverlappingTarget, findSearchIndex, findShareScopeConflicts, findTableAccess, findTemplateRefsToRemovedFields, findUnsatisfiablePredicates, focalObjectPosition, formatCanonicalFieldType, formatDateCell, formatDateTimeCell, formatDisplayPreviewText, formatEditorSummaryFieldType, formatErdCompactFieldType, formatEscapeShortcut, formatFilterEqDisplayValue, formatIdShort, formatMatchLabelFieldType, formatMediaBytes, formatModEnterShortcut, formatModShortcut, formatNumericDate, formatPrimitivePreview, formatRecordTableCellText, formatRecordTableQuerySummary, formatShrinkImpactLine, generateApiToken, generateDisplayValuesTs, generateSchemaTs, generateShareToken, generateTenantSecretsKekBase64, guestSearchableScopes, guestVisibleScopes, hasIdentifierCollision, hasSchemaDeployOperationLeaseExpired, hashApiToken, hashShareToken, hostFromForwardedHeader, hostnameFromHostHeader, idListMeta, importStagingId, indexSchema, inferDefaultGuestView, inferIdentifier, inferUniqueIdentifier, isApiProfileSlug, isApiTokenFormat, isAssetFamily, isAssetTable, isBlockNoteContent, isBlockNoteEnvelope, isCiPreviewBuild, isClassifiedKey, isCompleteBetween, isConvexJwt, isDisplayableVectorContentType, isEditableKind, isEmptyQuery, isExtractableFamily, isFileArrayFieldType, isFileFieldType, isFormSubmissionScope, isHttpUrl, isImageFieldPickable, isImageFieldType, isInlinePrimitive, isJwtExpired, isLoopbackDeployServiceUrl, isManifestDeployStatus, isManifestHash, isMarkdownField, isOperationId, isPlaceholderManagementSiteUrl, isPreviewStudioHost, isPrimaryShareScope, isPrimitiveKind, isProdDeployServiceUrl, isProtectedTransferTable, isRadixOverlayOpen, isRangeOp, isRasterRenditionSource, isRecoverableDeployError, isReferenceFieldType, isReferenceOnlyScope, isRefsRecomputeInFlight, isReservedTenantSlug, isSchemaDeployOperationBlocking, isSchemaDeployPhaseActive, isStaleEndpointDeployError, isStorageFieldType, isSystemField, isTextScalarKind, isTransferId, isTypingInEditor, isValidAssetId, isValidIdentifier, isValidMarkdownDocJson, isValidPreviewTenantSlug, isValidRichFieldJson, isValidTenantSlug, isVectorContentType, listAccessKindSchema, listMetaOrderSchema, listMetaSchema, listPageKindSchema, listTablesWithRefGraphChanges, looksLikeId, makePredicate, manifestHashSchema, manifestSchema, manifestTablesUseFileStorage, mapsFromAssetDisplayRows, matchColumnsForTable, matchEscape, matchKeyFromColumn, matchModEnter, matchModShiftShortcut, matchModShortcut, matchSave, matchToggleEditMode, matchUndoRedo, matchesBetween, matchesDeployCompletion, maxScanLimitValidator, mediaUploadCapsError, mediaUploadLimit, mergeDraftErdLayoutIntoCanonical, mergeErdLayouts, mergeProposedRecord, mergeQuery, mergeReferenceScopes, mergeStagingPendingEdits, modKeyLabel, newProvisionalRowId, nextAssetJobWakeAt, normalizeConvexUrl, normalizeDisplayFocal, normalizeDisplayTemplateBody, normalizeManifestDisplayTemplates, normalizeManifestForShrink, normalizeMarkdownField, normalizeMatchKeyFromCsvRow, normalizeMatchKeyFromValue, normalizePreviewDeployName, normalizeRichField, normalizeShareScopes, opAllowedForType, operationIdSchema, parseClampQuery, parseColumnusClipboard, parseCsvText, parseDateCsv, parseDateInput, parseDateTimeInput, parseDocLinkHref, parseErdLayoutOrEmpty, parseErdLayoutOrThrow, parseGitSha, parseImportPaste, parseQuery, parseQueryJson, parseRecordTableFieldsJson, parseRecordTableQueryJson, parseRichDocBlocks, parseShareTokenEncryptionKey, parseTenantSecretsKek, parseTrustedSiteUrls, patchIsStale, patchMergeImportRow, pendingRebuildsForSave, pickProposalFields, planGraphDelta, planMergedQuery, planProposalPatches, planQuery, planStudioBoot, postLoginRedirectPath, postprocessDocLinksInBlocks, predicateOpLabel, predicateOpSchema, predicateSchema, predicateValidator, predicatesEqual, prepareProposalPatchesForAccept, prepareShrinkSave, preprocessDocLinksInBlocks, preprocessDocLinksInMarkdown, previewImportMerge, previewSlugFromHost, primaryTrustedSiteUrl, profileSlugChangeError, profileTableAccesses, promoteErdLayoutOnSave, proposalDiffFieldNames, proposalOverlapsAny, proposeApiExportName, provisionalRowKey, pruneErdLayout, publicRenditionUrlKeys, queriesEqual, queryArgValidator, queryErrorCodeSchema, queryHasActiveConstraints, queryOrderSchema, queryPredicateFieldNames, querySchema, querySearchSchema, queryValidator, readApiAnyApiPath, readApiQueryExportName, readApiQueryModuleSegment, readConvexSiteUrlEnv, readTenantSecretsKekFromEnv, reconcileStagingMatchState, redactForLogs, redactString, refFieldsForTable, referencedTargetIds, refsMapToRequests, renderPixelCapError, renditionNodeFingerprint, renditionPlan, replaceProvisionalReferences, residualClampPredicates, resolveAssetGraph, resolveAssetSlotDisplay, resolveAuthConfigIssuerFromEnv, resolveBffManagementSiteUrl, resolveChannelMembershipOp, resolveConvexSiteUrl, resolveConvexSiteUrlFromEnv, resolveFamilySlotMapping, resolveGuestCapabilities, resolveGuestLinkCapabilities, resolveGuestScopeCapabilities, resolveImportMatches, resolvePreloadedLabel, resolvePreviewBranch, resolvePreviewPrId, resolveQueryFieldType, resolveRecordTableVisibleFields, resolveRuntimeDeployServiceUrl, resolveRuntimeManagementSiteUrl, resolveSyncDeployUrl, resolveSyncMembershipOp, resolveTrustedAuthOrigin, revalidateStagingRow, richContentPlainText, rollupProcessingStatus, rootRenditionNodes, runAcceptProposalBatch, safePostLoginPath, safeStringify, sanitizePreviewDeployName, savedTableByName, schemaDeployPhaseSchema, scopesToWizardInput, searchIndexSchema, secretsEqual, serializeColumnusClipboard, serializeCsvValue, serializeDateCsv, serializeDateTimeCsv, serializeErdLayout, setQueryOrder, setQueryOrderDirection, setQueryOrderField, shareScopeAccessMode, shareScopeToTableAccess, shareTokenPrefix, shareTypeDefaultScopes, shouldExpectConvexAuth, shrinkPlanIsEmpty, signInViaEmailOtp, singleHeaderHostValue, slugifyApiProfileName, snapshotBaseFields, sortDocuments, sortableQueryFields, stagingRowToImportRow, stagingRowsToGridRows, stringifyQuery, stringifyRecordTableFields, stringifyRecordTableQuery, stringifyRichDoc, stripAnsi, stripSystemFields, suggestIndexFields, summarizePreparedEnvelope, syncChannelForTable, syncClampPredicates, syncEnabledTables, tableAccessToShareScope, tableColorSchema, tableDisplayName, tableKind, tableKindSchema, tableSchema, tablesWithOutgoingRefs, takeRangeBound, tenantPublicHost, tenantSlugFromHost, toDocumentId, transferIdSchema, transferOperationSchema, transferSessionRecordSchema, transferSessionStateSchema, truncateDisplay, unionTableNames, uniqueIdentifier, unparseCsv, unsavedAssetSettings, useDebouncedCommit, useDebouncedValue, useModifierHeld, validateClipboardColumns, validateDataTransferManifest, validateDisplayTemplates, validateFieldValue, validateImportRow, validatePatch, validatePreviewSourceCommit, validateQueryForTable, validateRenditionNodes, wrapPlainTextAsRichDoc };
|
|
11548
11498
|
//# sourceMappingURL=index.js.map
|
|
11549
11499
|
//# sourceMappingURL=index.js.map
|