@xnetjs/data 0.3.0 → 0.5.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/{chunk-DWEXKD6E.js → chunk-FB63TZVI.js} +7 -1
- package/dist/{chunk-K7DOZWWT.js → chunk-GZYJDV6X.js} +9 -4
- package/dist/chunk-L7NRPLE5.js +116 -0
- package/dist/{chunk-H4GA4BBK.js → chunk-MD553LDL.js} +11 -2
- package/dist/{chunk-3RUDVTMH.js → chunk-Q67VT5XL.js} +307 -138
- package/dist/{clone-CfxzMs4w.d.ts → clone-_owA3IXN.d.ts} +9 -170
- package/dist/database/index.d.ts +3 -3
- package/dist/database/index.js +17 -3
- package/dist/{database-row-6Q6TRVE4.js → database-row-5MEIOJ52.js} +1 -1
- package/dist/{database-view-5PLSOBI2.js → database-view-DM7YCTZT.js} +1 -1
- package/dist/form-types-BlZvpDEE.d.ts +645 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +40 -12
- package/dist/meeting-LMUYTZBF.js +20 -0
- package/dist/schema/index.d.ts +191 -29
- package/dist/schema/index.js +24 -10
- package/package.json +7 -7
- package/dist/view-types-DSde-uT_.d.ts +0 -316
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-OCMSAKWV.js";
|
|
4
4
|
import {
|
|
5
5
|
defineSchema,
|
|
6
|
+
json,
|
|
6
7
|
relation,
|
|
7
8
|
text
|
|
8
9
|
} from "./chunk-EBNMV2VO.js";
|
|
@@ -28,7 +29,12 @@ var DatabaseRowSchema = defineSchema({
|
|
|
28
29
|
*
|
|
29
30
|
* @see packages/data/src/database/fractional-index.ts
|
|
30
31
|
*/
|
|
31
|
-
sortKey: text({ required: true })
|
|
32
|
+
sortKey: text({ required: true }),
|
|
33
|
+
/**
|
|
34
|
+
* Provenance for rows created by a form submission (exploration 0278):
|
|
35
|
+
* which form view, when, and the submitter's idempotency nonce.
|
|
36
|
+
*/
|
|
37
|
+
submissionMeta: json({})
|
|
32
38
|
},
|
|
33
39
|
/**
|
|
34
40
|
* Y.Doc for rich text cells.
|
|
@@ -344,10 +344,10 @@ var builtInSchemas = {
|
|
|
344
344
|
"xnet://xnet.fyi/Folder@1.0.0": () => import("./folder-6KM3KYD5.js").then((m) => m.FolderSchema),
|
|
345
345
|
"xnet://xnet.fyi/Tag@1.0.0": () => import("./tag-SKCHM3U5.js").then((m) => m.TagSchema),
|
|
346
346
|
"xnet://xnet.fyi/Database@2.0.0": () => import("./database-GIXSPZJW.js").then((m) => m.DatabaseSchema),
|
|
347
|
-
"xnet://xnet.fyi/DatabaseRow@2.0.0": () => import("./database-row-
|
|
347
|
+
"xnet://xnet.fyi/DatabaseRow@2.0.0": () => import("./database-row-5MEIOJ52.js").then((m) => m.DatabaseRowSchema),
|
|
348
348
|
"xnet://xnet.fyi/DatabaseField@1.0.0": () => import("./database-field-3EPAMZUR.js").then((m) => m.DatabaseFieldSchema),
|
|
349
349
|
"xnet://xnet.fyi/DatabaseSelectOption@1.0.0": () => import("./database-select-option-BBBJFLLH.js").then((m) => m.DatabaseSelectOptionSchema),
|
|
350
|
-
"xnet://xnet.fyi/DatabaseView@1.0.0": () => import("./database-view-
|
|
350
|
+
"xnet://xnet.fyi/DatabaseView@1.0.0": () => import("./database-view-DM7YCTZT.js").then((m) => m.DatabaseViewSchema),
|
|
351
351
|
"xnet://xnet.fyi/SchemaExtension@1.0.0": () => import("./schema-extension-LNRF2YRD.js").then((m) => m.SchemaExtensionSchema),
|
|
352
352
|
"xnet://xnet.fyi/ExtensionField@1.0.0": () => import("./schema-extension-LNRF2YRD.js").then((m) => m.ExtensionFieldSchema),
|
|
353
353
|
"xnet://xnet.fyi/Task@1.0.0": () => import("./task-7AOBP7WC.js").then((m) => m.TaskSchema),
|
|
@@ -379,6 +379,9 @@ var builtInSchemas = {
|
|
|
379
379
|
"xnet://xnet.fyi/ExternalReference@1.0.0": () => import("./external-reference-7BSFF6SA.js").then((m) => m.ExternalReferenceSchema),
|
|
380
380
|
"xnet://xnet.fyi/MediaAsset@1.0.0": () => import("./media-asset-QTCGLIZA.js").then((m) => m.MediaAssetSchema),
|
|
381
381
|
"xnet://xnet.fyi/Transcription@1.0.0": () => import("./transcription-PSCLDAGX.js").then((m) => m.TranscriptionSchema),
|
|
382
|
+
// Meeting schema pack (exploration 0279)
|
|
383
|
+
"xnet://xnet.fyi/Meeting@1.0.0": () => import("./meeting-LMUYTZBF.js").then((m) => m.MeetingSchema),
|
|
384
|
+
"xnet://xnet.fyi/MeetingTranscript@1.0.0": () => import("./meeting-LMUYTZBF.js").then((m) => m.MeetingTranscriptSchema),
|
|
382
385
|
"xnet://xnet.fyi/Canvas@1.0.0": () => import("./canvas-6WYBNH53.js").then((m) => m.CanvasSchema),
|
|
383
386
|
"xnet://xnet.fyi/Map@1.0.0": () => import("./map-RG5Y3CPC.js").then((m) => m.MapSchema),
|
|
384
387
|
"xnet://xnet.fyi/Comment@1.0.0": () => import("./comment-QSWYAQVS.js").then((m) => m.CommentSchema),
|
|
@@ -430,10 +433,10 @@ var builtInSchemas = {
|
|
|
430
433
|
"xnet://xnet.fyi/Folder": () => import("./folder-6KM3KYD5.js").then((m) => m.FolderSchema),
|
|
431
434
|
"xnet://xnet.fyi/Tag": () => import("./tag-SKCHM3U5.js").then((m) => m.TagSchema),
|
|
432
435
|
"xnet://xnet.fyi/Database": () => import("./database-GIXSPZJW.js").then((m) => m.DatabaseSchema),
|
|
433
|
-
"xnet://xnet.fyi/DatabaseRow": () => import("./database-row-
|
|
436
|
+
"xnet://xnet.fyi/DatabaseRow": () => import("./database-row-5MEIOJ52.js").then((m) => m.DatabaseRowSchema),
|
|
434
437
|
"xnet://xnet.fyi/DatabaseField": () => import("./database-field-3EPAMZUR.js").then((m) => m.DatabaseFieldSchema),
|
|
435
438
|
"xnet://xnet.fyi/DatabaseSelectOption": () => import("./database-select-option-BBBJFLLH.js").then((m) => m.DatabaseSelectOptionSchema),
|
|
436
|
-
"xnet://xnet.fyi/DatabaseView": () => import("./database-view-
|
|
439
|
+
"xnet://xnet.fyi/DatabaseView": () => import("./database-view-DM7YCTZT.js").then((m) => m.DatabaseViewSchema),
|
|
437
440
|
"xnet://xnet.fyi/SchemaExtension": () => import("./schema-extension-LNRF2YRD.js").then((m) => m.SchemaExtensionSchema),
|
|
438
441
|
"xnet://xnet.fyi/ExtensionField": () => import("./schema-extension-LNRF2YRD.js").then((m) => m.ExtensionFieldSchema),
|
|
439
442
|
"xnet://xnet.fyi/Task": () => import("./task-7AOBP7WC.js").then((m) => m.TaskSchema),
|
|
@@ -463,6 +466,8 @@ var builtInSchemas = {
|
|
|
463
466
|
"xnet://xnet.fyi/ExternalReference": () => import("./external-reference-7BSFF6SA.js").then((m) => m.ExternalReferenceSchema),
|
|
464
467
|
"xnet://xnet.fyi/MediaAsset": () => import("./media-asset-QTCGLIZA.js").then((m) => m.MediaAssetSchema),
|
|
465
468
|
"xnet://xnet.fyi/Transcription": () => import("./transcription-PSCLDAGX.js").then((m) => m.TranscriptionSchema),
|
|
469
|
+
"xnet://xnet.fyi/Meeting": () => import("./meeting-LMUYTZBF.js").then((m) => m.MeetingSchema),
|
|
470
|
+
"xnet://xnet.fyi/MeetingTranscript": () => import("./meeting-LMUYTZBF.js").then((m) => m.MeetingTranscriptSchema),
|
|
466
471
|
"xnet://xnet.fyi/Canvas": () => import("./canvas-6WYBNH53.js").then((m) => m.CanvasSchema),
|
|
467
472
|
"xnet://xnet.fyi/Map": () => import("./map-RG5Y3CPC.js").then((m) => m.MapSchema),
|
|
468
473
|
"xnet://xnet.fyi/Comment": () => import("./comment-QSWYAQVS.js").then((m) => m.CommentSchema),
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import {
|
|
2
|
+
spaceCascadeAuthorization
|
|
3
|
+
} from "./chunk-OCMSAKWV.js";
|
|
4
|
+
import {
|
|
5
|
+
defineSchema,
|
|
6
|
+
file,
|
|
7
|
+
json,
|
|
8
|
+
number,
|
|
9
|
+
relation,
|
|
10
|
+
select,
|
|
11
|
+
text
|
|
12
|
+
} from "./chunk-EBNMV2VO.js";
|
|
13
|
+
|
|
14
|
+
// src/schema/schemas/meeting.ts
|
|
15
|
+
var MEETING_SCHEMA_IRI = "xnet://xnet.fyi/Meeting@1.0.0";
|
|
16
|
+
var MEETING_TRANSCRIPT_SCHEMA_IRI = "xnet://xnet.fyi/MeetingTranscript@1.0.0";
|
|
17
|
+
var MEETING_CHANNELS = ["me", "them"];
|
|
18
|
+
var MEETING_TEMPLATE_IDS = ["generic", "1on1", "standup", "sales", "interview"];
|
|
19
|
+
var MeetingSchema = defineSchema({
|
|
20
|
+
name: "Meeting",
|
|
21
|
+
namespace: "xnet://xnet.fyi/",
|
|
22
|
+
properties: {
|
|
23
|
+
/** Meeting title — from the calendar event when available. */
|
|
24
|
+
title: text({ required: true, maxLength: 500 }),
|
|
25
|
+
/** Wall-clock start, epoch ms. */
|
|
26
|
+
startedAt: number({ integer: true, min: 0 }),
|
|
27
|
+
/** Total captured duration in milliseconds. */
|
|
28
|
+
durationMs: number({ integer: true, min: 0 }),
|
|
29
|
+
/** Enhancement template shaping the AI notes, e.g. "1on1" | "standup". */
|
|
30
|
+
templateId: text({ maxLength: 120 }),
|
|
31
|
+
/** The sibling transcript node (one per meeting). */
|
|
32
|
+
transcript: relation({ target: MEETING_TRANSCRIPT_SCHEMA_IRI }),
|
|
33
|
+
/** Calendar event this meeting came from, when detected (phase 4). */
|
|
34
|
+
calendarEventId: text({ maxLength: 300 }),
|
|
35
|
+
/** Attendee display names from the calendar, for context + attribution. */
|
|
36
|
+
attendees: json({}),
|
|
37
|
+
/** Canonical home; empty = Unfiled (exploration 0169). */
|
|
38
|
+
folder: relation({ target: "xnet://xnet.fyi/Folder@1.0.0" }),
|
|
39
|
+
/** Workspace-wide labels, referenced by id (exploration 0169). */
|
|
40
|
+
tags: relation({ target: "xnet://xnet.fyi/Tag@1.0.0", multiple: true }),
|
|
41
|
+
/** Order among siblings — fractional index. */
|
|
42
|
+
sortKey: text({ maxLength: 500 }),
|
|
43
|
+
/** Canonical SECURITY home; empty = personal/private (exploration 0179). */
|
|
44
|
+
space: relation({ target: "xnet://xnet.fyi/Space@1.0.0" }),
|
|
45
|
+
/**
|
|
46
|
+
* Per-node visibility. Defaults to `private` — a meeting may contain
|
|
47
|
+
* anything, and must never leak to a public surface by accident (0279).
|
|
48
|
+
*/
|
|
49
|
+
visibility: select({
|
|
50
|
+
options: [
|
|
51
|
+
{ id: "inherit", name: "Inherit", color: "gray" },
|
|
52
|
+
{ id: "private", name: "Private", color: "gray" },
|
|
53
|
+
{ id: "unlisted", name: "Unlisted", color: "yellow" },
|
|
54
|
+
{ id: "public", name: "Public", color: "green" }
|
|
55
|
+
],
|
|
56
|
+
default: "private"
|
|
57
|
+
})
|
|
58
|
+
},
|
|
59
|
+
document: "yjs",
|
|
60
|
+
// notes body — user bullets + AI-enhanced output
|
|
61
|
+
// Owner-only by default; inherits access from its home Space when filed into
|
|
62
|
+
// one — same model as Transcription/Metric (explorations 0181/0192).
|
|
63
|
+
authorization: spaceCascadeAuthorization()
|
|
64
|
+
});
|
|
65
|
+
var MeetingTranscriptSchema = defineSchema({
|
|
66
|
+
name: "MeetingTranscript",
|
|
67
|
+
namespace: "xnet://xnet.fyi/",
|
|
68
|
+
properties: {
|
|
69
|
+
/** The meeting this transcript belongs to. */
|
|
70
|
+
meeting: relation({ target: MEETING_SCHEMA_IRI, required: true }),
|
|
71
|
+
/**
|
|
72
|
+
* Concatenated transcript text — FTS-indexed so meetings are searchable.
|
|
73
|
+
* Rebuilt from `segments` on each batched upsert.
|
|
74
|
+
*/
|
|
75
|
+
fullText: text({}),
|
|
76
|
+
/** Timed, channel-attributed segments (me | them). */
|
|
77
|
+
segments: json({}),
|
|
78
|
+
/** Detected/used language (BCP-47-ish, e.g. "en"), when known. */
|
|
79
|
+
language: text({ maxLength: 16 }),
|
|
80
|
+
/** Which engine produced this, e.g. "parakeet-sherpa" | "whisper-cpp" | "byo". */
|
|
81
|
+
engineId: text({ maxLength: 120 }),
|
|
82
|
+
/** Which model produced this, e.g. "parakeet-tdt-0.6b-v2". */
|
|
83
|
+
modelId: text({ maxLength: 200 }),
|
|
84
|
+
/** Length of the transcribed audio in milliseconds. */
|
|
85
|
+
durationMs: number({ integer: true, min: 0 }),
|
|
86
|
+
/**
|
|
87
|
+
* Optional source audio, stored as a content-addressed blob reference.
|
|
88
|
+
* Off by default — retained only when the user opts into keeping audio
|
|
89
|
+
* (0279 privacy norm; the bytes live in BlobStore, never the change log).
|
|
90
|
+
*/
|
|
91
|
+
audio: file({}),
|
|
92
|
+
/** Canonical SECURITY home; empty = personal/private (exploration 0179). */
|
|
93
|
+
space: relation({ target: "xnet://xnet.fyi/Space@1.0.0" }),
|
|
94
|
+
/** Per-node visibility. Defaults to `private`, like the meeting itself. */
|
|
95
|
+
visibility: select({
|
|
96
|
+
options: [
|
|
97
|
+
{ id: "inherit", name: "Inherit", color: "gray" },
|
|
98
|
+
{ id: "private", name: "Private", color: "gray" },
|
|
99
|
+
{ id: "unlisted", name: "Unlisted", color: "yellow" },
|
|
100
|
+
{ id: "public", name: "Public", color: "green" }
|
|
101
|
+
],
|
|
102
|
+
default: "private"
|
|
103
|
+
})
|
|
104
|
+
},
|
|
105
|
+
document: void 0,
|
|
106
|
+
authorization: spaceCascadeAuthorization()
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
export {
|
|
110
|
+
MEETING_SCHEMA_IRI,
|
|
111
|
+
MEETING_TRANSCRIPT_SCHEMA_IRI,
|
|
112
|
+
MEETING_CHANNELS,
|
|
113
|
+
MEETING_TEMPLATE_IDS,
|
|
114
|
+
MeetingSchema,
|
|
115
|
+
MeetingTranscriptSchema
|
|
116
|
+
};
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
spaceCascadeAuthorization
|
|
3
3
|
} from "./chunk-OCMSAKWV.js";
|
|
4
4
|
import {
|
|
5
|
+
checkbox,
|
|
5
6
|
defineSchema,
|
|
6
7
|
json,
|
|
7
8
|
relation,
|
|
@@ -29,7 +30,8 @@ var DatabaseViewSchema = defineSchema({
|
|
|
29
30
|
{ id: "list", name: "List" },
|
|
30
31
|
{ id: "gallery", name: "Gallery" },
|
|
31
32
|
{ id: "calendar", name: "Calendar" },
|
|
32
|
-
{ id: "timeline", name: "Timeline" }
|
|
33
|
+
{ id: "timeline", name: "Timeline" },
|
|
34
|
+
{ id: "form", name: "Form" }
|
|
33
35
|
],
|
|
34
36
|
default: "table"
|
|
35
37
|
}),
|
|
@@ -64,7 +66,14 @@ var DatabaseViewSchema = defineSchema({
|
|
|
64
66
|
/** Start date field ID */
|
|
65
67
|
dateField: text({ maxLength: 100 }),
|
|
66
68
|
/** End date field ID */
|
|
67
|
-
endDateField: text({ maxLength: 100 })
|
|
69
|
+
endDateField: text({ maxLength: 100 }),
|
|
70
|
+
// Form specific (exploration 0278)
|
|
71
|
+
/** Form question config (FormViewConfig) — whole-object LWW */
|
|
72
|
+
formConfig: json({}),
|
|
73
|
+
/** Per-question show-if rules: fieldId -> FormFieldRule — whole-map LWW */
|
|
74
|
+
formRules: json({}),
|
|
75
|
+
/** Accepting responses toggle (form view) */
|
|
76
|
+
formAccepting: checkbox({ default: true })
|
|
68
77
|
},
|
|
69
78
|
// Inherits access from its home Space (exploration 0181/0192).
|
|
70
79
|
authorization: spaceCascadeAuthorization("database")
|