@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,73 @@
|
|
|
1
|
+
import {
|
|
2
|
+
spaceCascadeAuthorization
|
|
3
|
+
} from "./chunk-6OPZJ7MG.js";
|
|
4
|
+
import {
|
|
5
|
+
date,
|
|
6
|
+
defineSchema,
|
|
7
|
+
json,
|
|
8
|
+
number,
|
|
9
|
+
relation,
|
|
10
|
+
select,
|
|
11
|
+
text
|
|
12
|
+
} from "./chunk-O64EK5FK.js";
|
|
13
|
+
|
|
14
|
+
// src/schema/schemas/observation.ts
|
|
15
|
+
var ObservationSchema = defineSchema({
|
|
16
|
+
name: "Observation",
|
|
17
|
+
namespace: "xnet://xnet.fyi/",
|
|
18
|
+
properties: {
|
|
19
|
+
/** The metric this datapoint measures. */
|
|
20
|
+
metric: relation({ target: "xnet://xnet.fyi/Metric@1.0.0", required: true }),
|
|
21
|
+
/**
|
|
22
|
+
* Canonical day — UTC midnight ms of the calendar day (see
|
|
23
|
+
* @xnetjs/experiments `canonicalDay`). One observation per day per metric is
|
|
24
|
+
* the norm; using `date()` gives date-aware filters + calendar binding.
|
|
25
|
+
*/
|
|
26
|
+
day: date({ required: true }),
|
|
27
|
+
/** Measured value. Booleans encode 1 (done) / 0 (not). */
|
|
28
|
+
value: number({ required: true }),
|
|
29
|
+
/** Free-text note for the datapoint (qualitative context). */
|
|
30
|
+
note: text({ maxLength: 2e3 }),
|
|
31
|
+
/** Stamped from the experiment's active phase at entry time. */
|
|
32
|
+
phase: select({
|
|
33
|
+
options: [
|
|
34
|
+
{ id: "none", name: "None" },
|
|
35
|
+
{ id: "baseline", name: "Baseline" },
|
|
36
|
+
{ id: "intervention", name: "Intervention" },
|
|
37
|
+
{ id: "washout", name: "Washout" }
|
|
38
|
+
],
|
|
39
|
+
default: "none"
|
|
40
|
+
}),
|
|
41
|
+
/** Where the value came from. */
|
|
42
|
+
source: select({
|
|
43
|
+
options: [
|
|
44
|
+
{ id: "manual", name: "Manual" },
|
|
45
|
+
{ id: "sensor", name: "Sensor" },
|
|
46
|
+
{ id: "import", name: "Import" }
|
|
47
|
+
],
|
|
48
|
+
default: "manual"
|
|
49
|
+
}),
|
|
50
|
+
/** Confounds logged for the day, e.g. ["alcohol","poor sleep"]. */
|
|
51
|
+
confounds: json({}),
|
|
52
|
+
/** Denormalized owning experiment (for fast per-experiment queries). */
|
|
53
|
+
experiment: relation({ target: "xnet://xnet.fyi/Experiment@1.0.0" }),
|
|
54
|
+
/** Canonical SECURITY home; empty = personal/private (exploration 0179). */
|
|
55
|
+
space: relation({ target: "xnet://xnet.fyi/Space@1.0.0" }),
|
|
56
|
+
/** Per-node visibility. Defaults to `private` (sensitive data, 0180). */
|
|
57
|
+
visibility: select({
|
|
58
|
+
options: [
|
|
59
|
+
{ id: "inherit", name: "Inherit", color: "gray" },
|
|
60
|
+
{ id: "private", name: "Private", color: "gray" },
|
|
61
|
+
{ id: "unlisted", name: "Unlisted", color: "yellow" },
|
|
62
|
+
{ id: "public", name: "Public", color: "green" }
|
|
63
|
+
],
|
|
64
|
+
default: "private"
|
|
65
|
+
})
|
|
66
|
+
},
|
|
67
|
+
// Inherits access from its home Space (exploration 0181/0192).
|
|
68
|
+
authorization: spaceCascadeAuthorization()
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
export {
|
|
72
|
+
ObservationSchema
|
|
73
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
spaceCascadeAuthorization
|
|
3
|
+
} from "./chunk-6OPZJ7MG.js";
|
|
4
|
+
import {
|
|
5
|
+
defineSchema,
|
|
6
|
+
relation,
|
|
7
|
+
select,
|
|
8
|
+
text
|
|
9
|
+
} from "./chunk-O64EK5FK.js";
|
|
10
|
+
|
|
11
|
+
// src/schema/schemas/canvas.ts
|
|
12
|
+
var CanvasSchema = defineSchema({
|
|
13
|
+
name: "Canvas",
|
|
14
|
+
namespace: "xnet://xnet.fyi/",
|
|
15
|
+
properties: {
|
|
16
|
+
/** Canvas title */
|
|
17
|
+
title: text({ required: true, maxLength: 500 }),
|
|
18
|
+
/** Emoji or icon URL */
|
|
19
|
+
icon: text({}),
|
|
20
|
+
/** Canonical home; empty = Unfiled (exploration 0169) */
|
|
21
|
+
folder: relation({ target: "xnet://xnet.fyi/Folder@1.0.0" }),
|
|
22
|
+
/** Order among folder siblings — fractional index */
|
|
23
|
+
sortKey: text({ maxLength: 500 }),
|
|
24
|
+
/** Workspace-wide labels, referenced by id (exploration 0169) */
|
|
25
|
+
tags: relation({ target: "xnet://xnet.fyi/Tag@1.0.0", multiple: true }),
|
|
26
|
+
/** Canonical SECURITY home; empty = personal/private (exploration 0179) */
|
|
27
|
+
space: relation({ target: "xnet://xnet.fyi/Space@1.0.0" }),
|
|
28
|
+
/** Per-node visibility; `inherit` defers to the Space (exploration 0179) */
|
|
29
|
+
visibility: select({
|
|
30
|
+
options: [
|
|
31
|
+
{ id: "inherit", name: "Inherit", color: "gray" },
|
|
32
|
+
{ id: "private", name: "Private", color: "gray" },
|
|
33
|
+
{ id: "unlisted", name: "Unlisted", color: "yellow" },
|
|
34
|
+
{ id: "public", name: "Public", color: "green" }
|
|
35
|
+
],
|
|
36
|
+
default: "inherit"
|
|
37
|
+
})
|
|
38
|
+
},
|
|
39
|
+
document: "yjs",
|
|
40
|
+
// Collaborative Y.Doc for canvas data (nodes, edges)
|
|
41
|
+
// Inherits access from its home Space (exploration 0181/0192).
|
|
42
|
+
authorization: spaceCascadeAuthorization()
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export {
|
|
46
|
+
CanvasSchema
|
|
47
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
created,
|
|
3
|
+
createdBy,
|
|
4
|
+
defineSchema,
|
|
5
|
+
json,
|
|
6
|
+
person
|
|
7
|
+
} from "./chunk-O64EK5FK.js";
|
|
8
|
+
import {
|
|
9
|
+
presets
|
|
10
|
+
} from "./chunk-JESSJ5CZ.js";
|
|
11
|
+
|
|
12
|
+
// src/schema/schemas/inbox-state.ts
|
|
13
|
+
var DEFAULT_CHANNEL_TIER = "mentions";
|
|
14
|
+
var InboxStateSchema = defineSchema({
|
|
15
|
+
name: "InboxState",
|
|
16
|
+
namespace: "xnet://xnet.fyi/",
|
|
17
|
+
properties: {
|
|
18
|
+
/** The user this state belongs to (must match createdBy) */
|
|
19
|
+
owner: person({ required: true }),
|
|
20
|
+
/** channelId → last-read watermark */
|
|
21
|
+
watermarks: json({}),
|
|
22
|
+
/** Source node IDs of explicitly acknowledged mentions */
|
|
23
|
+
ackedMentions: json({}),
|
|
24
|
+
/** Source node ID → triage state (sparse; absence = unread/read derived) */
|
|
25
|
+
items: json({}),
|
|
26
|
+
/** Notification preferences */
|
|
27
|
+
prefs: json({}),
|
|
28
|
+
createdAt: created(),
|
|
29
|
+
createdBy: createdBy()
|
|
30
|
+
},
|
|
31
|
+
document: void 0,
|
|
32
|
+
// Standalone/personal content: owner-only by default (exploration 0192).
|
|
33
|
+
authorization: presets.private()
|
|
34
|
+
});
|
|
35
|
+
function inboxStateNodeId(did) {
|
|
36
|
+
return `inbox-${did}`;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export {
|
|
40
|
+
DEFAULT_CHANNEL_TIER,
|
|
41
|
+
InboxStateSchema,
|
|
42
|
+
inboxStateNodeId
|
|
43
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defineSchema,
|
|
3
|
+
json,
|
|
4
|
+
text
|
|
5
|
+
} from "./chunk-O64EK5FK.js";
|
|
6
|
+
import {
|
|
7
|
+
presets
|
|
8
|
+
} from "./chunk-JESSJ5CZ.js";
|
|
9
|
+
|
|
10
|
+
// src/schema/schemas/user-widget.ts
|
|
11
|
+
var UserWidgetSchema = defineSchema({
|
|
12
|
+
name: "UserWidget",
|
|
13
|
+
namespace: "xnet://xnet.fyi/",
|
|
14
|
+
properties: {
|
|
15
|
+
/** Display name shown in the widget picker */
|
|
16
|
+
name: text({ required: true, maxLength: 200 }),
|
|
17
|
+
/** Short picker description */
|
|
18
|
+
description: text({ maxLength: 1e3 }),
|
|
19
|
+
/** Widget source: defines render(props) returning a SafeNode tree */
|
|
20
|
+
code: text({ required: true, maxLength: 1e5 }),
|
|
21
|
+
/** Config fields driving the auto-generated editor — whole-value LWW */
|
|
22
|
+
configFields: json({}),
|
|
23
|
+
/** Default tile size in 12-column grid units — whole-value LWW */
|
|
24
|
+
defaultSize: json({})
|
|
25
|
+
},
|
|
26
|
+
// Standalone/personal content: owner-only by default (exploration 0192).
|
|
27
|
+
authorization: presets.private()
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
UserWidgetSchema
|
|
32
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
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-item.ts
|
|
15
|
+
var FEED_ITEM_SCHEMA_IRI = "xnet://xnet.fyi/FeedItem@1.0.0";
|
|
16
|
+
var FeedItemSchema = defineSchema({
|
|
17
|
+
name: "FeedItem",
|
|
18
|
+
namespace: "xnet://xnet.fyi/",
|
|
19
|
+
properties: {
|
|
20
|
+
/** The Feed this entry came from. */
|
|
21
|
+
feed: relation({ target: "xnet://xnet.fyi/Feed@1.0.0" }),
|
|
22
|
+
/** Entry title. */
|
|
23
|
+
title: text({ required: true, maxLength: 1e3 }),
|
|
24
|
+
/** Canonical link to the entry. */
|
|
25
|
+
link: url({}),
|
|
26
|
+
/** Stable feed entry id (`<guid>`/`<id>`), used to de-duplicate re-polls. */
|
|
27
|
+
guid: text({ maxLength: 1e3 }),
|
|
28
|
+
/** Short summary / description. */
|
|
29
|
+
summary: text({ maxLength: 5e3 }),
|
|
30
|
+
/** Full content body in markdown/HTML-stripped text, when available. */
|
|
31
|
+
content: text({}),
|
|
32
|
+
/** Entry author, when advertised. */
|
|
33
|
+
author: text({ maxLength: 500 }),
|
|
34
|
+
/** When the entry was published (Unix ms). */
|
|
35
|
+
publishedAt: date({ includeTime: true }),
|
|
36
|
+
/** The home Space — drives the authorization cascade. */
|
|
37
|
+
space: relation({ target: "xnet://xnet.fyi/Space@1.0.0" }),
|
|
38
|
+
createdAt: created(),
|
|
39
|
+
createdBy: createdBy()
|
|
40
|
+
},
|
|
41
|
+
document: void 0,
|
|
42
|
+
authorization: spaceCascadeAuthorization()
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export {
|
|
46
|
+
FEED_ITEM_SCHEMA_IRI,
|
|
47
|
+
FeedItemSchema
|
|
48
|
+
};
|