@xnetjs/data 0.0.2 → 0.0.3
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/README.md +112 -0
- package/dist/account-BZHETMC4.js +12 -0
- package/dist/auth/index.d.ts +413 -0
- package/dist/auth/index.js +102 -0
- package/dist/budget-WR2Q4YH3.js +12 -0
- package/dist/canvas-HFMMVQLD.js +10 -0
- package/dist/channel-DXDYJ3ZH.js +12 -0
- package/dist/chat-message-QUUQGXEW.js +10 -0
- package/dist/chunk-2DSDH2ZH.js +52 -0
- package/dist/chunk-337E3ZOB.js +54 -0
- package/dist/chunk-37267RSF.js +41 -0
- package/dist/chunk-3JKW6TDE.js +66 -0
- package/dist/chunk-3RB2FMMO.js +148 -0
- package/dist/{chunk-BQBPA5HS.js → chunk-4U4KBCDN.js} +16 -2
- package/dist/chunk-4UQTURCD.js +722 -0
- package/dist/chunk-54Y7QRZN.js +109 -0
- package/dist/chunk-5FHJE7RC.js +46 -0
- package/dist/chunk-64AM6JPM.js +40 -0
- package/dist/chunk-6CN53PON.js +143 -0
- package/dist/chunk-6GB7PBCR.js +40 -0
- package/dist/chunk-6OPZJ7MG.js +78 -0
- package/dist/{chunk-IDMBCRUC.js → chunk-77UDLVQY.js} +1 -1
- package/dist/chunk-7GMJOAPF.js +52 -0
- package/dist/chunk-7PDRDSFH.js +69 -0
- package/dist/chunk-C5IRSEEZ.js +69 -0
- package/dist/chunk-CHZUSBSB.js +45 -0
- package/dist/chunk-DOZJXPQ6.js +232 -0
- package/dist/chunk-DTPSTMUD.js +105 -0
- package/dist/chunk-E6S557NC.js +402 -0
- package/dist/chunk-EIQX7INF.js +45 -0
- package/dist/chunk-ENTHVNOC.js +57 -0
- package/dist/chunk-EZA5UT4Y.js +5543 -0
- package/dist/chunk-GR3NDMBY.js +76 -0
- package/dist/chunk-GWYVY2K4.js +63 -0
- package/dist/chunk-IJ675GJR.js +42 -0
- package/dist/chunk-IP4BEVVD.js +57 -0
- package/dist/chunk-J4IVJA5M.js +102 -0
- package/dist/chunk-J6EDPPH4.js +84 -0
- package/dist/{chunk-SZC345Z2.js → chunk-JESSJ5CZ.js} +1015 -1110
- package/dist/chunk-JO6Y4E5V.js +73 -0
- package/dist/chunk-KPVBKKZS.js +47 -0
- package/dist/chunk-KTJLFJEQ.js +43 -0
- package/dist/chunk-L66WXPTW.js +32 -0
- package/dist/chunk-LGD72FVD.js +48 -0
- package/dist/chunk-O64EK5FK.js +887 -0
- package/dist/chunk-PMUQACPY.js +33 -0
- package/dist/chunk-PSUJEKVV.js +1722 -0
- package/dist/chunk-QVZXXJSP.js +6122 -0
- package/dist/chunk-QWFTRZQT.js +142 -0
- package/dist/chunk-RSSZXCLL.js +51 -0
- package/dist/chunk-S4B5OPZU.js +415 -0
- package/dist/{chunk-VYR5GPJP.js → chunk-SPFKSTPT.js} +9 -3
- package/dist/chunk-U6CBYDVZ.js +50 -0
- package/dist/chunk-UDUPQKRB.js +49 -0
- package/dist/chunk-V6HZ3LF3.js +380 -0
- package/dist/chunk-WMSCEBFH.js +64 -0
- package/dist/chunk-WUR3WWQM.js +65 -0
- package/dist/chunk-XHEA5UER.js +75 -0
- package/dist/chunk-XTUGZSYQ.js +75 -0
- package/dist/chunk-XWA3CJQ6.js +45 -0
- package/dist/chunk-YEQ6LLUY.js +49 -0
- package/dist/chunk-YWN27MLD.js +47 -0
- package/dist/chunk-YXZGYLKV.js +65 -0
- package/dist/chunk-ZICIXDEE.js +54 -0
- package/dist/chunk-ZMCO3O2Z.js +70 -0
- package/dist/clone-DpbVKLUu.d.ts +2205 -0
- package/dist/comment-Y2Y3QYYI.js +10 -0
- package/dist/crm-AAJXYIJY.js +68 -0
- package/dist/dashboard-3DC6B4BJ.js +10 -0
- package/dist/database/index.d.ts +882 -0
- package/dist/database/index.js +523 -0
- package/dist/database-DRGL5UYS.js +10 -0
- package/dist/database-field-F47FY3XX.js +10 -0
- package/dist/database-row-77OXW2NF.js +10 -0
- package/dist/database-select-option-6S3TTA7A.js +10 -0
- package/dist/database-view-YW7DQG5X.js +10 -0
- package/dist/experiment-TJOAL3OH.js +10 -0
- package/dist/external-item-D654PKLI.js +14 -0
- package/dist/external-reference-K5SUJIQN.js +8 -0
- package/dist/feed-L23XTNDI.js +12 -0
- package/dist/feed-item-GSO242J6.js +12 -0
- package/dist/folder-ONKSWHUT.js +21 -0
- package/dist/game-BF7DP5JU.js +50 -0
- package/dist/grant-NNKMWXPX.js +8 -0
- package/dist/grant-expiration-cleaner-DBiNTWbD.d.ts +249 -0
- package/dist/import-batch-JMESZ4VI.js +12 -0
- package/dist/inbox-state-AN6FPCIY.js +12 -0
- package/dist/index.d.ts +224 -4548
- package/dist/index.js +2206 -4754
- package/dist/map-AUV65YS3.js +10 -0
- package/dist/media-asset-4I5YPR4R.js +8 -0
- package/dist/memory-NV6EVJBE.js +12 -0
- package/dist/metric-X7W55DLC.js +10 -0
- package/dist/milestone-JJGOGK4R.js +12 -0
- package/dist/moderation-QSUVBCNS.js +30 -0
- package/dist/observation-UZSXXGBC.js +10 -0
- package/dist/page-NI7XODS6.js +10 -0
- package/dist/posting-FZOYVGH2.js +12 -0
- package/dist/profile-42A43GES.js +8 -0
- package/dist/project-G2CTLDXY.js +10 -0
- package/dist/query-ast-CWo6_30h.d.ts +226 -0
- package/dist/reaction-VAQBVDUD.js +10 -0
- package/dist/registry-CQoN_p8U.d.ts +99 -0
- package/dist/saved-view-AOQHGHNM.js +10 -0
- package/dist/schema/index.d.ts +6182 -0
- package/dist/schema/index.js +631 -0
- package/dist/schema-extension-5BUXRDPB.js +18 -0
- package/dist/space-PZ737CIS.js +42 -0
- package/dist/space-membership-N35NRX6F.js +14 -0
- package/dist/store/index.d.ts +391 -0
- package/dist/store/index.js +135 -0
- package/dist/store-CvgiydME.d.ts +338 -0
- package/dist/sync/awareness.d.ts +69 -0
- package/dist/sync/awareness.js +20 -0
- package/dist/system-Q5I6STDC.js +38 -0
- package/dist/tag-C677GKQW.js +16 -0
- package/dist/task-WQLMPN5U.js +16 -0
- package/dist/task-view-T5S32V4L.js +10 -0
- package/dist/transaction-U3ITRGJP.js +12 -0
- package/dist/transcription-F3T23LLO.js +12 -0
- package/dist/types-Def-5Nka.d.ts +1525 -0
- package/dist/updates.d.ts +44 -0
- package/dist/updates.js +16 -0
- package/dist/user-widget-4SJJFPG5.js +8 -0
- package/dist/view-types-DSde-uT_.d.ts +316 -0
- package/package.json +32 -9
- package/dist/canvas-HSIKIQFK.js +0 -7
- package/dist/chunk-2L5ZUGG5.js +0 -53
- package/dist/chunk-4MTS5KAQ.js +0 -22
- package/dist/chunk-GZHARFKC.js +0 -25
- package/dist/chunk-WKIKJTI2.js +0 -45
- package/dist/comment-277JD7DV.js +0 -7
- package/dist/database-W3KEHLI3.js +0 -7
- package/dist/database-row-3O2QSNZN.js +0 -7
- package/dist/grant-QVZ454YC.js +0 -7
- package/dist/page-O4WTOIEO.js +0 -7
- package/dist/task-SEKAYJH7.js +0 -7
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import {
|
|
2
|
+
spaceCascadeAuthorization
|
|
3
|
+
} from "./chunk-6OPZJ7MG.js";
|
|
4
|
+
import {
|
|
5
|
+
defineSchema,
|
|
6
|
+
file,
|
|
7
|
+
number,
|
|
8
|
+
relation,
|
|
9
|
+
select,
|
|
10
|
+
text
|
|
11
|
+
} from "./chunk-O64EK5FK.js";
|
|
12
|
+
|
|
13
|
+
// src/schema/schemas/database.ts
|
|
14
|
+
var DatabaseSchema = defineSchema({
|
|
15
|
+
name: "Database",
|
|
16
|
+
namespace: "xnet://xnet.fyi/",
|
|
17
|
+
version: "2.0.0",
|
|
18
|
+
properties: {
|
|
19
|
+
/** Database title */
|
|
20
|
+
title: text({ required: true, maxLength: 500 }),
|
|
21
|
+
/** Emoji or icon URL */
|
|
22
|
+
icon: text({}),
|
|
23
|
+
/** Cover image */
|
|
24
|
+
cover: file({ accept: ["image/*"] }),
|
|
25
|
+
/** Default view type for this database */
|
|
26
|
+
defaultView: select({
|
|
27
|
+
options: [
|
|
28
|
+
{ id: "table", name: "Table" },
|
|
29
|
+
{ id: "board", name: "Board" },
|
|
30
|
+
{ id: "list", name: "List" },
|
|
31
|
+
{ id: "gallery", name: "Gallery" },
|
|
32
|
+
{ id: "calendar", name: "Calendar" },
|
|
33
|
+
{ id: "timeline", name: "Timeline" }
|
|
34
|
+
],
|
|
35
|
+
default: "table"
|
|
36
|
+
}),
|
|
37
|
+
/**
|
|
38
|
+
* Cached row count for this database.
|
|
39
|
+
* Updated on row add/delete operations.
|
|
40
|
+
* Used for query routing decisions (local vs hub).
|
|
41
|
+
*/
|
|
42
|
+
rowCount: number({ min: 0, integer: true }),
|
|
43
|
+
/**
|
|
44
|
+
* Version of the database-defined schema (semver).
|
|
45
|
+
* Bumped when fields change (see schema-utils.ts bump rules).
|
|
46
|
+
* Used to build the database schema IRI: xnet://xnet.fyi/db/<id>@<version>
|
|
47
|
+
*/
|
|
48
|
+
schemaVersion: text({ maxLength: 20 }),
|
|
49
|
+
/** Canonical home; empty = Unfiled (exploration 0169) */
|
|
50
|
+
folder: relation({ target: "xnet://xnet.fyi/Folder@1.0.0" }),
|
|
51
|
+
/** Order among folder siblings — fractional index */
|
|
52
|
+
sortKey: text({ maxLength: 500 }),
|
|
53
|
+
/** Workspace-wide labels, referenced by id (exploration 0169) */
|
|
54
|
+
tags: relation({ target: "xnet://xnet.fyi/Tag@1.0.0", multiple: true }),
|
|
55
|
+
/** Canonical SECURITY home; empty = personal/private (exploration 0179) */
|
|
56
|
+
space: relation({ target: "xnet://xnet.fyi/Space@1.0.0" }),
|
|
57
|
+
/** Per-node visibility; `inherit` defers to the Space (exploration 0179) */
|
|
58
|
+
visibility: select({
|
|
59
|
+
options: [
|
|
60
|
+
{ id: "inherit", name: "Inherit", color: "gray" },
|
|
61
|
+
{ id: "private", name: "Private", color: "gray" },
|
|
62
|
+
{ id: "unlisted", name: "Unlisted", color: "yellow" },
|
|
63
|
+
{ id: "public", name: "Public", color: "green" }
|
|
64
|
+
],
|
|
65
|
+
default: "inherit"
|
|
66
|
+
})
|
|
67
|
+
},
|
|
68
|
+
// Y.Doc used ONLY as the awareness/presence channel — no persistent state
|
|
69
|
+
document: "yjs",
|
|
70
|
+
// Inherits access from its home Space (exploration 0181/0192).
|
|
71
|
+
authorization: spaceCascadeAuthorization()
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
export {
|
|
75
|
+
DatabaseSchema
|
|
76
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {
|
|
2
|
+
spaceCascadeAuthorization
|
|
3
|
+
} from "./chunk-6OPZJ7MG.js";
|
|
4
|
+
import {
|
|
5
|
+
created,
|
|
6
|
+
createdBy,
|
|
7
|
+
date,
|
|
8
|
+
defineSchema,
|
|
9
|
+
json,
|
|
10
|
+
relation,
|
|
11
|
+
select,
|
|
12
|
+
text,
|
|
13
|
+
url
|
|
14
|
+
} from "./chunk-O64EK5FK.js";
|
|
15
|
+
|
|
16
|
+
// src/schema/schemas/external-item.ts
|
|
17
|
+
var EXTERNAL_ITEM_SCHEMA_IRI = "xnet://xnet.fyi/ExternalItem@1.0.0";
|
|
18
|
+
var EXTERNAL_ITEM_SOURCES = [
|
|
19
|
+
{ id: "github", name: "GitHub" },
|
|
20
|
+
{ id: "notion", name: "Notion" },
|
|
21
|
+
{ id: "airtable", name: "Airtable" },
|
|
22
|
+
{ id: "linear", name: "Linear" },
|
|
23
|
+
{ id: "stripe", name: "Stripe" },
|
|
24
|
+
{ id: "sentry", name: "Sentry" },
|
|
25
|
+
{ id: "pagerduty", name: "PagerDuty" },
|
|
26
|
+
{ id: "other", name: "Other" }
|
|
27
|
+
];
|
|
28
|
+
var ExternalItemSchema = defineSchema({
|
|
29
|
+
name: "ExternalItem",
|
|
30
|
+
namespace: "xnet://xnet.fyi/",
|
|
31
|
+
properties: {
|
|
32
|
+
/** Originating service. */
|
|
33
|
+
source: select({ options: EXTERNAL_ITEM_SOURCES, required: true }),
|
|
34
|
+
/** Service-specific object kind, e.g. `issue`, `pull_request`, `page`, `record`. */
|
|
35
|
+
kind: text({ required: true, maxLength: 100 }),
|
|
36
|
+
/** Stable id in the source system, used to de-duplicate re-syncs. */
|
|
37
|
+
externalId: text({ required: true, maxLength: 500 }),
|
|
38
|
+
/** Display title. */
|
|
39
|
+
title: text({ required: true, maxLength: 1e3 }),
|
|
40
|
+
/** Canonical link back to the source object. */
|
|
41
|
+
url: url({}),
|
|
42
|
+
/** Body / description text. */
|
|
43
|
+
body: text({}),
|
|
44
|
+
/** Free-form status string from the source (e.g. `open`, `closed`, `done`). */
|
|
45
|
+
status: text({ maxLength: 100 }),
|
|
46
|
+
/** When the source object was last updated (Unix ms). */
|
|
47
|
+
updatedAt: date({ includeTime: true }),
|
|
48
|
+
/** The original payload, preserved for fidelity. */
|
|
49
|
+
raw: json({}),
|
|
50
|
+
/** The home Space — drives the authorization cascade. */
|
|
51
|
+
space: relation({ target: "xnet://xnet.fyi/Space@1.0.0" }),
|
|
52
|
+
createdAt: created(),
|
|
53
|
+
createdBy: createdBy()
|
|
54
|
+
},
|
|
55
|
+
document: void 0,
|
|
56
|
+
authorization: spaceCascadeAuthorization()
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
export {
|
|
60
|
+
EXTERNAL_ITEM_SCHEMA_IRI,
|
|
61
|
+
EXTERNAL_ITEM_SOURCES,
|
|
62
|
+
ExternalItemSchema
|
|
63
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {
|
|
2
|
+
spaceCascadeAuthorization
|
|
3
|
+
} from "./chunk-6OPZJ7MG.js";
|
|
4
|
+
import {
|
|
5
|
+
created,
|
|
6
|
+
createdBy,
|
|
7
|
+
date,
|
|
8
|
+
defineSchema,
|
|
9
|
+
relation,
|
|
10
|
+
text,
|
|
11
|
+
url
|
|
12
|
+
} from "./chunk-O64EK5FK.js";
|
|
13
|
+
|
|
14
|
+
// src/schema/schemas/feed.ts
|
|
15
|
+
var FEED_SCHEMA_IRI = "xnet://xnet.fyi/Feed@1.0.0";
|
|
16
|
+
var FeedSchema = defineSchema({
|
|
17
|
+
name: "Feed",
|
|
18
|
+
namespace: "xnet://xnet.fyi/",
|
|
19
|
+
properties: {
|
|
20
|
+
/** Human-readable feed title (from the feed's <title>, or user-set). */
|
|
21
|
+
title: text({ required: true, maxLength: 500 }),
|
|
22
|
+
/** The RSS/Atom feed URL polled by the connector. */
|
|
23
|
+
feedUrl: url({ required: true }),
|
|
24
|
+
/** The feed's human-facing website, when advertised. */
|
|
25
|
+
siteUrl: url({}),
|
|
26
|
+
/** Short description of the feed. */
|
|
27
|
+
description: text({ maxLength: 2e3 }),
|
|
28
|
+
/** The home Space — drives the authorization cascade. */
|
|
29
|
+
space: relation({ target: "xnet://xnet.fyi/Space@1.0.0" }),
|
|
30
|
+
/** When this feed was last successfully polled (Unix ms). */
|
|
31
|
+
lastPolledAt: date({ includeTime: true }),
|
|
32
|
+
createdAt: created(),
|
|
33
|
+
createdBy: createdBy()
|
|
34
|
+
},
|
|
35
|
+
document: void 0,
|
|
36
|
+
authorization: spaceCascadeAuthorization()
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export {
|
|
40
|
+
FEED_SCHEMA_IRI,
|
|
41
|
+
FeedSchema
|
|
42
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import {
|
|
2
|
+
spaceCascadeAuthorization
|
|
3
|
+
} from "./chunk-6OPZJ7MG.js";
|
|
4
|
+
import {
|
|
5
|
+
date,
|
|
6
|
+
defineSchema,
|
|
7
|
+
relation,
|
|
8
|
+
select,
|
|
9
|
+
text
|
|
10
|
+
} from "./chunk-O64EK5FK.js";
|
|
11
|
+
|
|
12
|
+
// src/schema/schemas/milestone.ts
|
|
13
|
+
var MILESTONE_SCHEMA_IRI = "xnet://xnet.fyi/Milestone@1.0.0";
|
|
14
|
+
var MilestoneSchema = defineSchema({
|
|
15
|
+
name: "Milestone",
|
|
16
|
+
namespace: "xnet://xnet.fyi/",
|
|
17
|
+
properties: {
|
|
18
|
+
/** Milestone name */
|
|
19
|
+
name: text({ required: true, maxLength: 200 }),
|
|
20
|
+
/** Lifecycle status */
|
|
21
|
+
status: select({
|
|
22
|
+
options: [
|
|
23
|
+
{ id: "upcoming", name: "Upcoming", color: "gray" },
|
|
24
|
+
{ id: "active", name: "Active", color: "blue" },
|
|
25
|
+
{ id: "done", name: "Done", color: "green" },
|
|
26
|
+
{ id: "cancelled", name: "Cancelled", color: "red" }
|
|
27
|
+
],
|
|
28
|
+
default: "upcoming"
|
|
29
|
+
}),
|
|
30
|
+
/** Target completion date */
|
|
31
|
+
targetDate: date({}),
|
|
32
|
+
/** The project this milestone belongs to */
|
|
33
|
+
project: relation({ target: "xnet://xnet.fyi/Project@1.0.0", required: true }),
|
|
34
|
+
/** Order among sibling milestones — fractional index */
|
|
35
|
+
sortKey: text({ maxLength: 500 }),
|
|
36
|
+
/** Canonical SECURITY home; empty = inherits via project (exploration 0181) */
|
|
37
|
+
space: relation({ target: "xnet://xnet.fyi/Space@1.0.0" }),
|
|
38
|
+
/** Per-node visibility; `inherit` defers to the Space */
|
|
39
|
+
visibility: select({
|
|
40
|
+
options: [
|
|
41
|
+
{ id: "inherit", name: "Inherit", color: "gray" },
|
|
42
|
+
{ id: "private", name: "Private", color: "gray" },
|
|
43
|
+
{ id: "unlisted", name: "Unlisted", color: "yellow" },
|
|
44
|
+
{ id: "public", name: "Public", color: "green" }
|
|
45
|
+
],
|
|
46
|
+
default: "inherit"
|
|
47
|
+
})
|
|
48
|
+
},
|
|
49
|
+
document: "yjs",
|
|
50
|
+
// Inherits access from its home Space (exploration 0181).
|
|
51
|
+
authorization: spaceCascadeAuthorization()
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
export {
|
|
55
|
+
MILESTONE_SCHEMA_IRI,
|
|
56
|
+
MilestoneSchema
|
|
57
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import {
|
|
2
|
+
spaceCascadeAuthorization
|
|
3
|
+
} from "./chunk-6OPZJ7MG.js";
|
|
4
|
+
import {
|
|
5
|
+
date,
|
|
6
|
+
defineSchema,
|
|
7
|
+
json,
|
|
8
|
+
relation,
|
|
9
|
+
select,
|
|
10
|
+
text
|
|
11
|
+
} from "./chunk-O64EK5FK.js";
|
|
12
|
+
|
|
13
|
+
// src/schema/schemas/experiment.ts
|
|
14
|
+
var ExperimentSchema = defineSchema({
|
|
15
|
+
name: "Experiment",
|
|
16
|
+
namespace: "xnet://xnet.fyi/",
|
|
17
|
+
properties: {
|
|
18
|
+
/** Experiment title. */
|
|
19
|
+
title: text({ required: true, maxLength: 300 }),
|
|
20
|
+
/** Emoji or icon URL. */
|
|
21
|
+
icon: text({ maxLength: 500 }),
|
|
22
|
+
/**
|
|
23
|
+
* The null hypothesis — what you're trying to reject, stated up front so
|
|
24
|
+
* the verdict can be framed against it (e.g. "Magnesium has no effect on
|
|
25
|
+
* sleep latency").
|
|
26
|
+
*/
|
|
27
|
+
hypothesisNull: text({ maxLength: 1e3 }),
|
|
28
|
+
/** The alternative hypothesis — the effect you expect if the null is wrong. */
|
|
29
|
+
hypothesisAlt: text({ maxLength: 1e3 }),
|
|
30
|
+
/** Lifecycle status. */
|
|
31
|
+
status: select({
|
|
32
|
+
options: [
|
|
33
|
+
{ id: "design", name: "Design", color: "gray" },
|
|
34
|
+
{ id: "baseline", name: "Baseline", color: "blue" },
|
|
35
|
+
{ id: "intervention", name: "Intervention", color: "purple" },
|
|
36
|
+
{ id: "washout", name: "Washout", color: "yellow" },
|
|
37
|
+
{ id: "analysis", name: "Analysis", color: "orange" },
|
|
38
|
+
{ id: "concluded", name: "Concluded", color: "green" },
|
|
39
|
+
{ id: "abandoned", name: "Abandoned", color: "red" }
|
|
40
|
+
],
|
|
41
|
+
default: "design"
|
|
42
|
+
}),
|
|
43
|
+
/** Single-case experimental design (Kazdin). */
|
|
44
|
+
design: select({
|
|
45
|
+
options: [
|
|
46
|
+
{ id: "observational", name: "Observational" },
|
|
47
|
+
{ id: "AB", name: "AB (baseline \u2192 intervention)" },
|
|
48
|
+
{ id: "ABAB", name: "ABAB (reversal)" },
|
|
49
|
+
{ id: "multipleBaseline", name: "Multiple baseline" },
|
|
50
|
+
{ id: "crossover", name: "Crossover" },
|
|
51
|
+
{ id: "alternating", name: "Alternating treatments" }
|
|
52
|
+
],
|
|
53
|
+
default: "AB"
|
|
54
|
+
}),
|
|
55
|
+
/** Primary outcome — the one metric locked before the intervention starts. */
|
|
56
|
+
primaryMetric: relation({ target: "xnet://xnet.fyi/Metric@1.0.0" }),
|
|
57
|
+
/**
|
|
58
|
+
* Phase timeline: [{ label, start, end, isIntervention }]. Whole-value LWW
|
|
59
|
+
* json (like DatabaseView.filters); the phase a datapoint falls in is
|
|
60
|
+
* denormalized onto each Observation, so analysis never walks this list.
|
|
61
|
+
*/
|
|
62
|
+
phases: json({}),
|
|
63
|
+
/** Recorded outcome — empty until concluded. Never "proven". */
|
|
64
|
+
conclusion: select({
|
|
65
|
+
options: [
|
|
66
|
+
{ id: "rejectsNull", name: "Rejects the null", color: "green" },
|
|
67
|
+
{ id: "failsToRejectNull", name: "Fails to reject the null", color: "gray" },
|
|
68
|
+
{ id: "inconclusive", name: "Inconclusive", color: "yellow" }
|
|
69
|
+
]
|
|
70
|
+
}),
|
|
71
|
+
/** When the experiment began. */
|
|
72
|
+
startDate: date({}),
|
|
73
|
+
/** When the experiment ended. */
|
|
74
|
+
endDate: date({}),
|
|
75
|
+
/** Canonical home; empty = Unfiled (exploration 0169). */
|
|
76
|
+
folder: relation({ target: "xnet://xnet.fyi/Folder@1.0.0" }),
|
|
77
|
+
/** Order among folder siblings — fractional index. */
|
|
78
|
+
sortKey: text({ maxLength: 500 }),
|
|
79
|
+
/** Workspace-wide labels, referenced by id (exploration 0169). */
|
|
80
|
+
tags: relation({ target: "xnet://xnet.fyi/Tag@1.0.0", multiple: true }),
|
|
81
|
+
/** Canonical SECURITY home; empty = personal/private (exploration 0179). */
|
|
82
|
+
space: relation({ target: "xnet://xnet.fyi/Space@1.0.0" }),
|
|
83
|
+
/** Per-node visibility. Defaults to `private` (sensitive data, 0180). */
|
|
84
|
+
visibility: select({
|
|
85
|
+
options: [
|
|
86
|
+
{ id: "inherit", name: "Inherit", color: "gray" },
|
|
87
|
+
{ id: "private", name: "Private", color: "gray" },
|
|
88
|
+
{ id: "unlisted", name: "Unlisted", color: "yellow" },
|
|
89
|
+
{ id: "public", name: "Public", color: "green" }
|
|
90
|
+
],
|
|
91
|
+
default: "private"
|
|
92
|
+
})
|
|
93
|
+
},
|
|
94
|
+
document: "yjs",
|
|
95
|
+
// Collaborative protocol / journal / observations narrative
|
|
96
|
+
// Inherits access from its home Space (exploration 0181/0192).
|
|
97
|
+
authorization: spaceCascadeAuthorization()
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
export {
|
|
101
|
+
ExperimentSchema
|
|
102
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import {
|
|
2
|
+
spaceCascadeAuthorization
|
|
3
|
+
} from "./chunk-6OPZJ7MG.js";
|
|
4
|
+
import {
|
|
5
|
+
defineSchema,
|
|
6
|
+
file,
|
|
7
|
+
number,
|
|
8
|
+
relation,
|
|
9
|
+
select,
|
|
10
|
+
text
|
|
11
|
+
} from "./chunk-O64EK5FK.js";
|
|
12
|
+
|
|
13
|
+
// src/schema/schemas/transcription.ts
|
|
14
|
+
var TRANSCRIPTION_SCHEMA_IRI = "xnet://xnet.fyi/Transcription@1.0.0";
|
|
15
|
+
var TranscriptionSchema = defineSchema({
|
|
16
|
+
name: "Transcription",
|
|
17
|
+
namespace: "xnet://xnet.fyi/",
|
|
18
|
+
properties: {
|
|
19
|
+
/** The transcribed text — FTS-indexed so history is searchable. */
|
|
20
|
+
text: text({ required: true }),
|
|
21
|
+
/** Detected/used language (BCP-47-ish, e.g. "en"). */
|
|
22
|
+
language: text({ maxLength: 16 }),
|
|
23
|
+
/** Which engine produced this, e.g. "whisper" | "parakeet" | "apple" | "byo". */
|
|
24
|
+
engineId: text({ maxLength: 120 }),
|
|
25
|
+
/** Which model produced this, e.g. "parakeet-tdt-0.6b-v2". */
|
|
26
|
+
modelId: text({ maxLength: 200 }),
|
|
27
|
+
/** Length of the source audio in milliseconds. */
|
|
28
|
+
durationMs: number({ integer: true, min: 0 }),
|
|
29
|
+
/** How the dictation was triggered. */
|
|
30
|
+
source: select({
|
|
31
|
+
options: [
|
|
32
|
+
{ id: "inApp", name: "In-app field" },
|
|
33
|
+
{ id: "pushToTalk", name: "Global push-to-talk" }
|
|
34
|
+
],
|
|
35
|
+
default: "inApp"
|
|
36
|
+
}),
|
|
37
|
+
/**
|
|
38
|
+
* Optional source audio, stored as a content-addressed blob. Off by
|
|
39
|
+
* default — retained only when the user opts into keeping audio.
|
|
40
|
+
*/
|
|
41
|
+
audio: file({}),
|
|
42
|
+
/** App / field the text was inserted into (for push-to-talk history). */
|
|
43
|
+
pastedInto: text({ maxLength: 300 }),
|
|
44
|
+
/** Pin a transcript so retention never prunes it. */
|
|
45
|
+
starred: select({
|
|
46
|
+
options: [
|
|
47
|
+
{ id: "no", name: "Not starred" },
|
|
48
|
+
{ id: "yes", name: "Starred" }
|
|
49
|
+
],
|
|
50
|
+
default: "no"
|
|
51
|
+
}),
|
|
52
|
+
/** Canonical home; empty = Unfiled (exploration 0169). */
|
|
53
|
+
folder: relation({ target: "xnet://xnet.fyi/Folder@1.0.0" }),
|
|
54
|
+
/** Workspace-wide labels, referenced by id (exploration 0169). */
|
|
55
|
+
tags: relation({ target: "xnet://xnet.fyi/Tag@1.0.0", multiple: true }),
|
|
56
|
+
/** Order among siblings — fractional index. */
|
|
57
|
+
sortKey: text({ maxLength: 500 }),
|
|
58
|
+
/** Canonical SECURITY home; empty = personal/private (exploration 0179). */
|
|
59
|
+
space: relation({ target: "xnet://xnet.fyi/Space@1.0.0" }),
|
|
60
|
+
/**
|
|
61
|
+
* Per-node visibility. Defaults to `private` — a dictation may contain
|
|
62
|
+
* anything, and must never leak to public surfaces by accident (0192).
|
|
63
|
+
*/
|
|
64
|
+
visibility: select({
|
|
65
|
+
options: [
|
|
66
|
+
{ id: "inherit", name: "Inherit", color: "gray" },
|
|
67
|
+
{ id: "private", name: "Private", color: "gray" },
|
|
68
|
+
{ id: "unlisted", name: "Unlisted", color: "yellow" },
|
|
69
|
+
{ id: "public", name: "Public", color: "green" }
|
|
70
|
+
],
|
|
71
|
+
default: "private"
|
|
72
|
+
})
|
|
73
|
+
},
|
|
74
|
+
document: void 0,
|
|
75
|
+
// Owner-only by default; inherits access from its home Space when filed into
|
|
76
|
+
// one — same model as Metric, since transcripts are equally sensitive
|
|
77
|
+
// (explorations 0181/0192).
|
|
78
|
+
authorization: spaceCascadeAuthorization()
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
export {
|
|
82
|
+
TRANSCRIPTION_SCHEMA_IRI,
|
|
83
|
+
TranscriptionSchema
|
|
84
|
+
};
|