@xnetjs/data 0.0.3 → 0.1.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/account-MWNCH4GJ.js +12 -0
- package/dist/account-ledger-R2GAFJL6.js +38 -0
- package/dist/auth/index.d.ts +11 -4
- package/dist/auth/index.js +1 -1
- package/dist/budget-NN7P35XP.js +12 -0
- package/dist/canvas-6WYBNH53.js +10 -0
- package/dist/channel-AT3LQF4A.js +12 -0
- package/dist/chat-message-DSVO72B3.js +10 -0
- package/dist/{chunk-J6EDPPH4.js → chunk-2ZNJWIQG.js} +2 -2
- package/dist/{chunk-5FHJE7RC.js → chunk-3J3HILXO.js} +2 -2
- package/dist/{chunk-EZA5UT4Y.js → chunk-3RUDVTMH.js} +6 -6
- package/dist/{chunk-YEQ6LLUY.js → chunk-4EYKGTSQ.js} +2 -2
- package/dist/{chunk-L66WXPTW.js → chunk-53F4PRNC.js} +2 -2
- package/dist/{chunk-LGD72FVD.js → chunk-5EXHNXPL.js} +2 -2
- package/dist/{chunk-4U4KBCDN.js → chunk-5HC5NO57.js} +2 -2
- package/dist/{chunk-YWN27MLD.js → chunk-6KLGA6IR.js} +2 -2
- package/dist/{chunk-37267RSF.js → chunk-6OMG4I7M.js} +2 -2
- package/dist/{chunk-DOZJXPQ6.js → chunk-BQLQSWKZ.js} +2 -2
- package/dist/{chunk-V6HZ3LF3.js → chunk-BY5O6LNC.js} +1 -1
- package/dist/{chunk-64AM6JPM.js → chunk-DCTRX6II.js} +1 -1
- package/dist/{chunk-SPFKSTPT.js → chunk-DWEXKD6E.js} +2 -2
- package/dist/{chunk-O64EK5FK.js → chunk-EBNMV2VO.js} +11 -2
- package/dist/{chunk-J4IVJA5M.js → chunk-FVEACSKE.js} +2 -2
- package/dist/{chunk-XWA3CJQ6.js → chunk-GU6THOAB.js} +2 -2
- package/dist/{chunk-XTUGZSYQ.js → chunk-H4GA4BBK.js} +2 -2
- package/dist/{chunk-GR3NDMBY.js → chunk-IJ44LR7N.js} +2 -2
- package/dist/{chunk-E6S557NC.js → chunk-J4ANIXIV.js} +2 -2
- package/dist/{chunk-EIQX7INF.js → chunk-JDFNMFOZ.js} +2 -2
- package/dist/{chunk-PSUJEKVV.js → chunk-K7DOZWWT.js} +244 -155
- package/dist/{chunk-UDUPQKRB.js → chunk-KQAT4XBL.js} +2 -2
- package/dist/chunk-KQUALW4O.js +183 -0
- package/dist/{chunk-KPVBKKZS.js → chunk-LYSWLCOI.js} +2 -2
- package/dist/{chunk-YXZGYLKV.js → chunk-MBTUO3ZL.js} +2 -2
- package/dist/{chunk-7GMJOAPF.js → chunk-NI4FHG2K.js} +2 -2
- package/dist/{chunk-6OPZJ7MG.js → chunk-OCMSAKWV.js} +2 -2
- package/dist/{chunk-IP4BEVVD.js → chunk-OGJCRNGE.js} +2 -2
- package/dist/{chunk-6CN53PON.js → chunk-OPPHF3TF.js} +3 -3
- package/dist/{chunk-77UDLVQY.js → chunk-OSAWNZVM.js} +1 -1
- package/dist/{chunk-GWYVY2K4.js → chunk-PNESGUH5.js} +2 -2
- package/dist/{chunk-RSSZXCLL.js → chunk-Q3IEGH4B.js} +2 -2
- package/dist/{chunk-2DSDH2ZH.js → chunk-QJW5LDP4.js} +2 -2
- package/dist/{chunk-JESSJ5CZ.js → chunk-RL64OJJ5.js} +13 -3
- package/dist/{chunk-S4B5OPZU.js → chunk-S5RP5RKY.js} +1 -0
- package/dist/{chunk-4UQTURCD.js → chunk-S6U6TCMN.js} +2 -2
- package/dist/{chunk-C5IRSEEZ.js → chunk-SVNGSZZA.js} +2 -2
- package/dist/{chunk-ZICIXDEE.js → chunk-T5AZAOG5.js} +1 -1
- package/dist/{chunk-IJ675GJR.js → chunk-TCTZW4A6.js} +2 -2
- package/dist/{chunk-54Y7QRZN.js → chunk-U64CW73O.js} +2 -2
- package/dist/{chunk-QVZXXJSP.js → chunk-UDWKWTAX.js} +485 -81
- package/dist/{chunk-3RB2FMMO.js → chunk-UQM3G5A2.js} +2 -2
- package/dist/{chunk-ENTHVNOC.js → chunk-VQ7JHB67.js} +2 -2
- package/dist/{chunk-JO6Y4E5V.js → chunk-W7EBL7ZU.js} +2 -2
- package/dist/{chunk-WUR3WWQM.js → chunk-WEPK7SZF.js} +2 -2
- package/dist/{chunk-3JKW6TDE.js → chunk-XMSKJ5PV.js} +2 -2
- package/dist/{chunk-WMSCEBFH.js → chunk-XROI44ZP.js} +2 -2
- package/dist/{chunk-CHZUSBSB.js → chunk-Y3S5SRVM.js} +2 -2
- package/dist/{chunk-KTJLFJEQ.js → chunk-YEFKQYKA.js} +2 -2
- package/dist/{chunk-DTPSTMUD.js → chunk-YSUIXD2Y.js} +2 -2
- package/dist/{chunk-ZMCO3O2Z.js → chunk-ZCOFZY5M.js} +2 -2
- package/dist/{chunk-U6CBYDVZ.js → chunk-ZLU4Y3O2.js} +2 -2
- package/dist/{chunk-337E3ZOB.js → chunk-ZPZ7XDA6.js} +2 -2
- package/dist/{chunk-6GB7PBCR.js → chunk-ZZ6TWKGS.js} +2 -2
- package/dist/{clone-DpbVKLUu.d.ts → clone-C0Jhk2UN.d.ts} +2 -2
- package/dist/comment-QSWYAQVS.js +10 -0
- package/dist/{crm-AAJXYIJY.js → crm-L5RYAAF3.js} +5 -5
- package/dist/dashboard-JMKTTRA7.js +10 -0
- package/dist/database/index.d.ts +3 -3
- package/dist/database/index.js +11 -11
- package/dist/database-GIXSPZJW.js +10 -0
- package/dist/database-field-3EPAMZUR.js +10 -0
- package/dist/database-row-6Q6TRVE4.js +10 -0
- package/dist/database-select-option-BBBJFLLH.js +10 -0
- package/dist/database-view-5PLSOBI2.js +10 -0
- package/dist/experiment-DOVOZ34Y.js +10 -0
- package/dist/{external-item-D654PKLI.js → external-item-P2E5X7BZ.js} +5 -5
- package/dist/external-reference-7BSFF6SA.js +8 -0
- package/dist/feed-2IXHHP6O.js +12 -0
- package/dist/feed-item-DPE6LN7I.js +12 -0
- package/dist/{folder-ONKSWHUT.js → folder-6KM3KYD5.js} +3 -3
- package/dist/{game-BF7DP5JU.js → game-5AK5XWBR.js} +5 -5
- package/dist/grant-WTQSNT5A.js +8 -0
- package/dist/{grant-expiration-cleaner-DBiNTWbD.d.ts → grant-expiration-cleaner-CY6BcmlR.d.ts} +2 -2
- package/dist/import-batch-IXBJLQPJ.js +12 -0
- package/dist/{inbox-state-AN6FPCIY.js → inbox-state-E5NSVOGP.js} +3 -3
- package/dist/index.d.ts +7 -7
- package/dist/index.js +101 -55
- package/dist/map-RG5Y3CPC.js +10 -0
- package/dist/media-asset-QTCGLIZA.js +8 -0
- package/dist/{memory-NV6EVJBE.js → memory-PNRTMBZO.js} +3 -3
- package/dist/metric-65SVOX5C.js +10 -0
- package/dist/milestone-XEO6ZGDG.js +12 -0
- package/dist/{moderation-QSUVBCNS.js → moderation-FFHETMRB.js} +3 -3
- package/dist/observation-2Y3QKUXM.js +10 -0
- package/dist/page-2V27JGKJ.js +10 -0
- package/dist/posting-GBOSZCMZ.js +12 -0
- package/dist/profile-BLLDWIDK.js +8 -0
- package/dist/project-CQL5LN26.js +10 -0
- package/dist/{query-ast-CWo6_30h.d.ts → query-ast-C3m6kZYv.d.ts} +1 -1
- package/dist/reaction-T2DTJBBV.js +10 -0
- package/dist/{registry-CQoN_p8U.d.ts → registry-DunPv__d.d.ts} +1 -1
- package/dist/saved-view-4R2DBCL3.js +10 -0
- package/dist/schema/index.d.ts +320 -13
- package/dist/schema/index.js +98 -52
- package/dist/{schema-extension-5BUXRDPB.js → schema-extension-LNRF2YRD.js} +5 -5
- package/dist/{space-PZ737CIS.js → space-IJU24PBH.js} +6 -6
- package/dist/{space-membership-N35NRX6F.js → space-membership-DEUMM7NV.js} +3 -3
- package/dist/store/index.d.ts +131 -4
- package/dist/store/index.js +5 -5
- package/dist/{store-CvgiydME.d.ts → store-DtIDjk7c.d.ts} +18 -1
- package/dist/{system-Q5I6STDC.js → system-ILHCZOVO.js} +3 -3
- package/dist/{tag-C677GKQW.js → tag-SKCHM3U5.js} +3 -3
- package/dist/{task-WQLMPN5U.js → task-7AOBP7WC.js} +5 -5
- package/dist/task-view-NUGKELJP.js +10 -0
- package/dist/transaction-ZDSEGDIR.js +12 -0
- package/dist/transcription-PSCLDAGX.js +12 -0
- package/dist/{types-Def-5Nka.d.ts → types-S-BJAKyK.d.ts} +53 -2
- package/dist/user-widget-RLY2N46A.js +8 -0
- package/package.json +7 -7
- package/dist/account-BZHETMC4.js +0 -12
- package/dist/budget-WR2Q4YH3.js +0 -12
- package/dist/canvas-HFMMVQLD.js +0 -10
- package/dist/channel-DXDYJ3ZH.js +0 -12
- package/dist/chat-message-QUUQGXEW.js +0 -10
- package/dist/comment-Y2Y3QYYI.js +0 -10
- package/dist/dashboard-3DC6B4BJ.js +0 -10
- package/dist/database-DRGL5UYS.js +0 -10
- package/dist/database-field-F47FY3XX.js +0 -10
- package/dist/database-row-77OXW2NF.js +0 -10
- package/dist/database-select-option-6S3TTA7A.js +0 -10
- package/dist/database-view-YW7DQG5X.js +0 -10
- package/dist/experiment-TJOAL3OH.js +0 -10
- package/dist/external-reference-K5SUJIQN.js +0 -8
- package/dist/feed-L23XTNDI.js +0 -12
- package/dist/feed-item-GSO242J6.js +0 -12
- package/dist/grant-NNKMWXPX.js +0 -8
- package/dist/import-batch-JMESZ4VI.js +0 -12
- package/dist/map-AUV65YS3.js +0 -10
- package/dist/media-asset-4I5YPR4R.js +0 -8
- package/dist/metric-X7W55DLC.js +0 -10
- package/dist/milestone-JJGOGK4R.js +0 -12
- package/dist/observation-UZSXXGBC.js +0 -10
- package/dist/page-NI7XODS6.js +0 -10
- package/dist/posting-FZOYVGH2.js +0 -12
- package/dist/profile-42A43GES.js +0 -8
- package/dist/project-G2CTLDXY.js +0 -10
- package/dist/reaction-VAQBVDUD.js +0 -10
- package/dist/saved-view-AOQHGHNM.js +0 -10
- package/dist/task-view-T5S32V4L.js +0 -10
- package/dist/transaction-U3ITRGJP.js +0 -12
- package/dist/transcription-F3T23LLO.js +0 -12
- package/dist/user-widget-4SJJFPG5.js +0 -8
package/dist/store/index.js
CHANGED
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
sum,
|
|
50
50
|
validateQueryAST,
|
|
51
51
|
validateSavedViewDescriptor
|
|
52
|
-
} from "../chunk-
|
|
52
|
+
} from "../chunk-UDWKWTAX.js";
|
|
53
53
|
import {
|
|
54
54
|
applyNodeQueryDescriptor,
|
|
55
55
|
createNodeQueryDescriptor,
|
|
@@ -64,10 +64,10 @@ import {
|
|
|
64
64
|
sortNodeQueryResults,
|
|
65
65
|
withoutNodeQueryMaterializedView,
|
|
66
66
|
withoutNodeQueryPagination
|
|
67
|
-
} from "../chunk-
|
|
68
|
-
import "../chunk-
|
|
69
|
-
import "../chunk-
|
|
70
|
-
import "../chunk-
|
|
67
|
+
} from "../chunk-S5RP5RKY.js";
|
|
68
|
+
import "../chunk-BY5O6LNC.js";
|
|
69
|
+
import "../chunk-EBNMV2VO.js";
|
|
70
|
+
import "../chunk-RL64OJJ5.js";
|
|
71
71
|
export {
|
|
72
72
|
MemoryNodeStorageAdapter,
|
|
73
73
|
NodeStore,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as StoreAuthAPI, f as NodeStoreOptions, g as NodeStorageAdapter, C as CreateNodeOptions, h as NodeState, i as NodeId, G as GetWithMigrationOptions, M as MigratedNodeState, U as UpdateNodeOptions, L as ListNodesOptions, j as NodeQueryDescriptor, k as NodeQueryResult, T as TransactionOperation, l as TransactionResult, m as DeterministicNodeImportDraft, n as ImportDeterministicNodesOptions, o as ImportDeterministicNodesResult, p as NodeBatchWriteInput, q as NodeBatchWriteResult, S as SchemaIRI, r as NodeChange, s as MergeConflict, t as NodeChangeListener, u as NodeBatchChangeListener } from './types-
|
|
1
|
+
import { e as StoreAuthAPI, f as NodeStoreOptions, g as NodeStorageAdapter, C as CreateNodeOptions, h as NodeState, i as NodeId, G as GetWithMigrationOptions, M as MigratedNodeState, U as UpdateNodeOptions, L as ListNodesOptions, j as NodeQueryDescriptor, k as NodeQueryResult, T as TransactionOperation, l as TransactionResult, m as DeterministicNodeImportDraft, n as ImportDeterministicNodesOptions, o as ImportDeterministicNodesResult, p as NodeBatchWriteInput, q as NodeBatchWriteResult, S as SchemaIRI, r as NodeChange, s as MergeConflict, t as NodeChangeListener, u as NodeBatchChangeListener } from './types-S-BJAKyK.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* NodeStore - Event-sourced storage for Nodes
|
|
@@ -323,6 +323,23 @@ declare class NodeStore {
|
|
|
323
323
|
private assertAuthorized;
|
|
324
324
|
private canReadNode;
|
|
325
325
|
private filterReadableNodes;
|
|
326
|
+
/**
|
|
327
|
+
* Whether storage can safely materialize a view under read authorization
|
|
328
|
+
* (exploration 0226): it must both accept the read authorizer (to authorize
|
|
329
|
+
* the id list at refresh) and expose a reload-stable authorization-state
|
|
330
|
+
* version (to fingerprint cache validity). When either is missing the store
|
|
331
|
+
* falls back to the authorize-then-paginate path, which never caches.
|
|
332
|
+
*/
|
|
333
|
+
private materializedAuthSupported;
|
|
334
|
+
/**
|
|
335
|
+
* A reload-stable fingerprint of the viewer's authorization context, folded
|
|
336
|
+
* from the subject DID and the control-plane (grant) state version. Stamped
|
|
337
|
+
* onto a materialized view so any grant change forces an `'authz-changed'`
|
|
338
|
+
* refresh — the cache can never serve rows a revoked viewer may no longer
|
|
339
|
+
* read. Returns `undefined` when authorization is off (materialized views run
|
|
340
|
+
* untouched, as in the trusted single-user case).
|
|
341
|
+
*/
|
|
342
|
+
private authFingerprint;
|
|
326
343
|
private applyListPagination;
|
|
327
344
|
private getQueryFallbackReason;
|
|
328
345
|
private assertAuthorizedBatch;
|
|
@@ -15,9 +15,9 @@ import {
|
|
|
15
15
|
parseSystemNamespaceResource,
|
|
16
16
|
resolveSchemaAuthority,
|
|
17
17
|
validateSchemaDefinitionNode
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-BY5O6LNC.js";
|
|
19
|
+
import "./chunk-EBNMV2VO.js";
|
|
20
|
+
import "./chunk-RL64OJJ5.js";
|
|
21
21
|
export {
|
|
22
22
|
PresenceSummarySchema,
|
|
23
23
|
SYSTEM_NAMESPACE_KINDS,
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
TagSchema,
|
|
5
5
|
isValidTagName,
|
|
6
6
|
normalizeTagName
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-6KLGA6IR.js";
|
|
8
|
+
import "./chunk-EBNMV2VO.js";
|
|
9
|
+
import "./chunk-RL64OJJ5.js";
|
|
10
10
|
export {
|
|
11
11
|
MAX_TAG_NAME_LENGTH,
|
|
12
12
|
TAG_SCHEMA_IRI,
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
TaskSchema,
|
|
4
4
|
getTaskStatusCategory,
|
|
5
5
|
isCompletedTaskStatus
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-UQM3G5A2.js";
|
|
7
|
+
import "./chunk-OCMSAKWV.js";
|
|
8
|
+
import "./chunk-T5AZAOG5.js";
|
|
9
|
+
import "./chunk-EBNMV2VO.js";
|
|
10
|
+
import "./chunk-RL64OJJ5.js";
|
|
11
11
|
export {
|
|
12
12
|
TASK_STATUS_CATEGORIES,
|
|
13
13
|
TaskSchema,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TRANSACTION_SCHEMA_IRI,
|
|
3
|
+
TransactionSchema
|
|
4
|
+
} from "./chunk-MBTUO3ZL.js";
|
|
5
|
+
import "./chunk-OCMSAKWV.js";
|
|
6
|
+
import "./chunk-T5AZAOG5.js";
|
|
7
|
+
import "./chunk-EBNMV2VO.js";
|
|
8
|
+
import "./chunk-RL64OJJ5.js";
|
|
9
|
+
export {
|
|
10
|
+
TRANSACTION_SCHEMA_IRI,
|
|
11
|
+
TransactionSchema
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TRANSCRIPTION_SCHEMA_IRI,
|
|
3
|
+
TranscriptionSchema
|
|
4
|
+
} from "./chunk-2ZNJWIQG.js";
|
|
5
|
+
import "./chunk-OCMSAKWV.js";
|
|
6
|
+
import "./chunk-T5AZAOG5.js";
|
|
7
|
+
import "./chunk-EBNMV2VO.js";
|
|
8
|
+
import "./chunk-RL64OJJ5.js";
|
|
9
|
+
export {
|
|
10
|
+
TRANSCRIPTION_SCHEMA_IRI,
|
|
11
|
+
TranscriptionSchema
|
|
12
|
+
};
|
|
@@ -220,6 +220,15 @@ interface NodeQueryDescriptor {
|
|
|
220
220
|
spatial?: NodeQuerySpatialFilter;
|
|
221
221
|
search?: NodeQuerySearchFilter;
|
|
222
222
|
materializedView?: NodeQueryMaterializedViewOptions;
|
|
223
|
+
/**
|
|
224
|
+
* Authorization fingerprint stamped by `NodeStore` when a materialized view
|
|
225
|
+
* is read under an active read-authorization evaluator (exploration 0226).
|
|
226
|
+
* It is NOT part of the descriptor hash (it is stripped by
|
|
227
|
+
* `withoutNodeQueryMaterializedView`) — a change is reported as a distinct
|
|
228
|
+
* `'authz-changed'` refresh reason rather than `'descriptor-changed'`. Set
|
|
229
|
+
* internally by the store, never by callers.
|
|
230
|
+
*/
|
|
231
|
+
authFingerprint?: string;
|
|
223
232
|
}
|
|
224
233
|
interface NodeQueryPlanMetadata {
|
|
225
234
|
strategy: 'storage-query' | 'list-fallback' | 'auth-pushdown-candidates';
|
|
@@ -245,7 +254,7 @@ interface NodeQueryPlanMetadata {
|
|
|
245
254
|
fullTextSearchQuery?: string;
|
|
246
255
|
materializedViewId?: string;
|
|
247
256
|
materializedCacheHit?: boolean;
|
|
248
|
-
materializedRefreshReason?: 'missing' | 'descriptor-changed' | 'invalidated' | 'expired' | 'force-refresh';
|
|
257
|
+
materializedRefreshReason?: 'missing' | 'descriptor-changed' | 'authz-changed' | 'invalidated' | 'expired' | 'force-refresh';
|
|
249
258
|
materializedGeneratedAt?: number;
|
|
250
259
|
materializedInvalidatedAt?: number;
|
|
251
260
|
materializedRowCount?: number;
|
|
@@ -817,6 +826,21 @@ interface NodeState {
|
|
|
817
826
|
* Implementations can use SQLite or memory.
|
|
818
827
|
* The adapter stores Changes and materialized NodeState.
|
|
819
828
|
*/
|
|
829
|
+
/**
|
|
830
|
+
* Filters a candidate node set down to the rows the current viewer may read.
|
|
831
|
+
* Only ever removes rows. Used by adapters to authorize a materialized view's
|
|
832
|
+
* id list once, at refresh time (exploration 0226).
|
|
833
|
+
*/
|
|
834
|
+
type NodeReadAuthorizer = (nodes: NodeState[]) => Promise<NodeState[]>;
|
|
835
|
+
/**
|
|
836
|
+
* A reload-stable version of the authorization-relevant control-plane state.
|
|
837
|
+
* `count` and `maxUpdatedAt` over grants and `/sys/authz/` resources change
|
|
838
|
+
* whenever any grant is added, modified, or removed.
|
|
839
|
+
*/
|
|
840
|
+
interface AuthorizationStateVersion {
|
|
841
|
+
count: number;
|
|
842
|
+
maxUpdatedAt: number;
|
|
843
|
+
}
|
|
820
844
|
interface NodeStorageAdapter {
|
|
821
845
|
/** Open/initialize the storage connection */
|
|
822
846
|
open?(): Promise<void>;
|
|
@@ -869,6 +893,23 @@ interface NodeStorageAdapter {
|
|
|
869
893
|
listNodes(options?: ListNodesOptions): Promise<NodeState[]>;
|
|
870
894
|
countNodes(options?: CountNodesOptions): Promise<number>;
|
|
871
895
|
queryNodes?(descriptor: NodeQueryDescriptor): Promise<NodeQueryResult>;
|
|
896
|
+
/**
|
|
897
|
+
* Inject the read-authorization filter the adapter applies before persisting
|
|
898
|
+
* a materialized view's id list (exploration 0226). `NodeStore` wires this to
|
|
899
|
+
* its `filterReadableNodes` so a materialization is authorized exactly once,
|
|
900
|
+
* at refresh time, and cache hits can be served without per-row re-checks.
|
|
901
|
+
* Pass `undefined` to clear it. Optional: adapters that don't implement it
|
|
902
|
+
* simply never materialize under authorization (the store falls back to the
|
|
903
|
+
* authorize-then-paginate path).
|
|
904
|
+
*/
|
|
905
|
+
setNodeReadAuthorizer?(authorizer: NodeReadAuthorizer | undefined): void;
|
|
906
|
+
/**
|
|
907
|
+
* A cheap, reload-stable version stamp of the authorization-relevant state
|
|
908
|
+
* (grants + `/sys/authz/` resources). Folded into the materialized view's
|
|
909
|
+
* auth fingerprint so any grant change invalidates cached views across
|
|
910
|
+
* reloads. Optional; when absent the store will not materialize under authz.
|
|
911
|
+
*/
|
|
912
|
+
getAuthorizationStateVersion?(): Promise<AuthorizationStateVersion>;
|
|
872
913
|
/** Optional runtime operation counters for import diagnostics. */
|
|
873
914
|
getOperationStats?(): Promise<SQLiteOperationStats | null> | SQLiteOperationStats | null;
|
|
874
915
|
/** Reset optional runtime operation counters before a focused measurement. */
|
|
@@ -883,6 +924,16 @@ interface NodeStorageAdapter {
|
|
|
883
924
|
*/
|
|
884
925
|
getSyncCursor?(room: string): Promise<number>;
|
|
885
926
|
setSyncCursor?(room: string, lamport: number): Promise<void>;
|
|
927
|
+
/**
|
|
928
|
+
* Generic app-state key/value, stored in an FK-free table. Used for blobs
|
|
929
|
+
* that are *not* node documents (e.g. the sync registry's tracked-node set):
|
|
930
|
+
* writing those through {@link setDocumentContent} hits `yjs_state`'s
|
|
931
|
+
* `node_id → nodes(id)` foreign key and fails with SQLITE_CONSTRAINT_FOREIGNKEY
|
|
932
|
+
* (exploration 0227). Optional: callers fall back to document content when an
|
|
933
|
+
* adapter doesn't implement it.
|
|
934
|
+
*/
|
|
935
|
+
getAppState?(key: string): Promise<string | null>;
|
|
936
|
+
setAppState?(key: string, value: string): Promise<void>;
|
|
886
937
|
getDocumentContent(nodeId: NodeId): Promise<Uint8Array | null>;
|
|
887
938
|
setDocumentContent(nodeId: NodeId, content: Uint8Array): Promise<void>;
|
|
888
939
|
}
|
|
@@ -1522,4 +1573,4 @@ type InferNode<P extends Record<string, PropertyBuilder>> = {
|
|
|
1522
1573
|
createdBy: DID;
|
|
1523
1574
|
} & InferProperties<P>;
|
|
1524
1575
|
|
|
1525
|
-
export { type PropertyKey as $, createNodeId as A, type PropertyType as B, type CreateNodeOptions$1 as C, type DefinedSchema as D, type PropertyDefinition as E, type ValidationError as F, type GetWithMigrationOptions as G, type CreateNodeOptions as H, type InferCreateProps as I, type InferPropertyType as J, type InferProperties as K, type ListNodesOptions as L, type MigratedNodeState as M, type NodeQueryPageCountMode as N, type OfflineAuthPolicy as O, type PropertyBuilder as P, type InferNode as Q, type SchemaLens as R, type SchemaIRI as S, type TransactionOperation as T, type UpdateNodeOptions as U, type ValidationResult as V, type LensOperation as W, type MigrationResult as X, MigrationError as Y, LensRegistry as Z, lensRegistry as _, type Schema as a, type StoreAuthKeyManager as a$, type NodePayload as a0, type PropertyTimestamp as a1, type SetNodeOptions as a2, type ImportNodesOptions as a3, type RebuildNodeIndexesOptions as a4, type ApplyNodeBatchInput as a5, type ApplyNodeBatchResult as a6, type NodeBatchIndexMode as a7, type NodeBatchNotificationMode as a8, type NodeBatchSyncMode as a9, createNodeQueryDescriptor as aA, encodeNodeQueryCursor as aB, decodeNodeQueryCursor as aC, nodeQueryDescriptorToOptions as aD, serializeNodeQueryDescriptor as aE, matchesNodeQueryDescriptor as aF, filterNodeQueryResults as aG, sortNodeQueryResults as aH, applyNodeQueryDescriptor as aI, getNodeQuerySearchTokens as aJ, nodeQueryDescriptorNeedsBoundedReload as aK, withoutNodeQueryPagination as aL, withoutNodeQueryMaterializedView as aM, isTempId as aN, TEMP_ID_PREFIX as aO, resolveTempIds as aP, createSchemaLookup as aQ, type SchemaLookup as aR, type TempIdResolution as aS, StoreAuth as aT, GrantRateLimiter as aU, GRANT_SCHEMA_IRI as aV, isGrantActive as aW, DEFAULT_OFFLINE_POLICY as aX, mergeOfflinePolicy as aY, type StoreAuthOptions as aZ, type StoreAuthStore as a_, type NodeBatchPreflightResult as aa, type DeterministicNodeBatchWriteInput as ab, type NodeBatchWritePolicy as ac, type NodeBatchWriteTimings as ad, type CountNodesOptions as ae, type NodeQuerySpatialPoint as af, type NodeQuerySpatialRect as ag, type NodeQuerySpatialPointFields as ah, type NodeQuerySpatialRectFields as ai, type NodeQuerySpatialWindow as aj, type NodeQuerySpatialRadius as ak, type NodeQuerySpatialFilter as al, type NodeQuerySearchField as am, type NodeQuerySearchFilter as an, type NodeQueryMaterializedViewOptions as ao, type NodeQueryPageOptions as ap, type NodeQueryCursorOrderEntry as aq, type NodeQueryCursor as ar, type NodeQueryOptions as as, type NodeQueryPlanMetadata as at, type NodeQueryParityCheckMetadata as au, type ConflictResult as av, type NodeBatchChangeEvent as aw, type NodeContentCipher as ax, type ContentKeyCache as ay, type MigrationInfo as az, type ParsedSchemaIRI as b, type GrantInput as b0, type Grant as b1, StoreAuthError as b2, type StoreAuthErrorCode as b3, type GrantNode as b4, type GrantIndexStore as b5, type GrantIndexOptions as b6, type RevocationConsistency as b7, type RevocationConfig as b8, type GrantRateLimiterOptions as b9, type DocumentType as ba, DEFAULT_SCHEMA_VERSION as bb, parseSchemaIRI as bc, buildSchemaIRI as bd, normalizeSchemaIRI as be, getBaseSchemaIRI as bf, isSameSchema as bg, getSchemaVersion as bh, type
|
|
1576
|
+
export { type PropertyKey as $, createNodeId as A, type PropertyType as B, type CreateNodeOptions$1 as C, type DefinedSchema as D, type PropertyDefinition as E, type ValidationError as F, type GetWithMigrationOptions as G, type CreateNodeOptions as H, type InferCreateProps as I, type InferPropertyType as J, type InferProperties as K, type ListNodesOptions as L, type MigratedNodeState as M, type NodeQueryPageCountMode as N, type OfflineAuthPolicy as O, type PropertyBuilder as P, type InferNode as Q, type SchemaLens as R, type SchemaIRI as S, type TransactionOperation as T, type UpdateNodeOptions as U, type ValidationResult as V, type LensOperation as W, type MigrationResult as X, MigrationError as Y, LensRegistry as Z, lensRegistry as _, type Schema as a, type StoreAuthKeyManager as a$, type NodePayload as a0, type PropertyTimestamp as a1, type SetNodeOptions as a2, type ImportNodesOptions as a3, type RebuildNodeIndexesOptions as a4, type ApplyNodeBatchInput as a5, type ApplyNodeBatchResult as a6, type NodeBatchIndexMode as a7, type NodeBatchNotificationMode as a8, type NodeBatchSyncMode as a9, createNodeQueryDescriptor as aA, encodeNodeQueryCursor as aB, decodeNodeQueryCursor as aC, nodeQueryDescriptorToOptions as aD, serializeNodeQueryDescriptor as aE, matchesNodeQueryDescriptor as aF, filterNodeQueryResults as aG, sortNodeQueryResults as aH, applyNodeQueryDescriptor as aI, getNodeQuerySearchTokens as aJ, nodeQueryDescriptorNeedsBoundedReload as aK, withoutNodeQueryPagination as aL, withoutNodeQueryMaterializedView as aM, isTempId as aN, TEMP_ID_PREFIX as aO, resolveTempIds as aP, createSchemaLookup as aQ, type SchemaLookup as aR, type TempIdResolution as aS, StoreAuth as aT, GrantRateLimiter as aU, GRANT_SCHEMA_IRI as aV, isGrantActive as aW, DEFAULT_OFFLINE_POLICY as aX, mergeOfflinePolicy as aY, type StoreAuthOptions as aZ, type StoreAuthStore as a_, type NodeBatchPreflightResult as aa, type DeterministicNodeBatchWriteInput as ab, type NodeBatchWritePolicy as ac, type NodeBatchWriteTimings as ad, type CountNodesOptions as ae, type NodeQuerySpatialPoint as af, type NodeQuerySpatialRect as ag, type NodeQuerySpatialPointFields as ah, type NodeQuerySpatialRectFields as ai, type NodeQuerySpatialWindow as aj, type NodeQuerySpatialRadius as ak, type NodeQuerySpatialFilter as al, type NodeQuerySearchField as am, type NodeQuerySearchFilter as an, type NodeQueryMaterializedViewOptions as ao, type NodeQueryPageOptions as ap, type NodeQueryCursorOrderEntry as aq, type NodeQueryCursor as ar, type NodeQueryOptions as as, type NodeQueryPlanMetadata as at, type NodeQueryParityCheckMetadata as au, type ConflictResult as av, type NodeBatchChangeEvent as aw, type NodeContentCipher as ax, type ContentKeyCache as ay, type MigrationInfo as az, type ParsedSchemaIRI as b, type GrantInput as b0, type Grant as b1, StoreAuthError as b2, type StoreAuthErrorCode as b3, type GrantNode as b4, type GrantIndexStore as b5, type GrantIndexOptions as b6, type RevocationConsistency as b7, type RevocationConfig as b8, type GrantRateLimiterOptions as b9, type DocumentType as ba, DEFAULT_SCHEMA_VERSION as bb, parseSchemaIRI as bc, buildSchemaIRI as bd, normalizeSchemaIRI as be, getBaseSchemaIRI as bf, isSameSchema as bg, getSchemaVersion as bh, type NodeReadAuthorizer as bi, type AuthorizationStateVersion as bj, type OperationNodeBatchWriteInput as bk, type PropertyLookup as bl, createPropertyLookup as bm, type SortDirection as c, type SystemOrderField as d, type StoreAuthAPI as e, type NodeStoreOptions as f, type NodeStorageAdapter as g, type NodeState as h, type NodeId as i, type NodeQueryDescriptor as j, type NodeQueryResult as k, type TransactionResult as l, type DeterministicNodeImportDraft as m, type ImportDeterministicNodesOptions as n, type ImportDeterministicNodesResult as o, type NodeBatchWriteInput as p, type NodeBatchWriteResult as q, type NodeChange as r, type MergeConflict as s, type NodeChangeListener as t, type NodeBatchChangeListener as u, type NodeChangeEvent as v, GrantIndex as w, type Node as x, type DID as y, isNode as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xnetjs/data",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -57,12 +57,12 @@
|
|
|
57
57
|
"nanoid": "^5.1.6",
|
|
58
58
|
"y-protocols": "^1.0.6",
|
|
59
59
|
"yjs": "^13.6.24",
|
|
60
|
-
"@xnetjs/core": "0.0
|
|
61
|
-
"@xnetjs/crypto": "0.0
|
|
62
|
-
"@xnetjs/identity": "0.0
|
|
63
|
-
"@xnetjs/sqlite": "0.0
|
|
64
|
-
"@xnetjs/storage": "0.0
|
|
65
|
-
"@xnetjs/sync": "0.0
|
|
60
|
+
"@xnetjs/core": "0.1.0",
|
|
61
|
+
"@xnetjs/crypto": "0.1.0",
|
|
62
|
+
"@xnetjs/identity": "0.1.0",
|
|
63
|
+
"@xnetjs/sqlite": "0.1.0",
|
|
64
|
+
"@xnetjs/storage": "0.1.0",
|
|
65
|
+
"@xnetjs/sync": "0.1.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"tsup": "^8.0.0",
|
package/dist/account-BZHETMC4.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ACCOUNT_SCHEMA_IRI,
|
|
3
|
-
AccountSchema
|
|
4
|
-
} from "./chunk-3JKW6TDE.js";
|
|
5
|
-
import "./chunk-6OPZJ7MG.js";
|
|
6
|
-
import "./chunk-ZICIXDEE.js";
|
|
7
|
-
import "./chunk-O64EK5FK.js";
|
|
8
|
-
import "./chunk-JESSJ5CZ.js";
|
|
9
|
-
export {
|
|
10
|
-
ACCOUNT_SCHEMA_IRI,
|
|
11
|
-
AccountSchema
|
|
12
|
-
};
|
package/dist/budget-WR2Q4YH3.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BUDGET_SCHEMA_IRI,
|
|
3
|
-
BudgetSchema
|
|
4
|
-
} from "./chunk-337E3ZOB.js";
|
|
5
|
-
import "./chunk-6OPZJ7MG.js";
|
|
6
|
-
import "./chunk-ZICIXDEE.js";
|
|
7
|
-
import "./chunk-O64EK5FK.js";
|
|
8
|
-
import "./chunk-JESSJ5CZ.js";
|
|
9
|
-
export {
|
|
10
|
-
BUDGET_SCHEMA_IRI,
|
|
11
|
-
BudgetSchema
|
|
12
|
-
};
|
package/dist/canvas-HFMMVQLD.js
DELETED
package/dist/channel-DXDYJ3ZH.js
DELETED
package/dist/comment-Y2Y3QYYI.js
DELETED
package/dist/feed-L23XTNDI.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
FEED_ITEM_SCHEMA_IRI,
|
|
3
|
-
FeedItemSchema
|
|
4
|
-
} from "./chunk-LGD72FVD.js";
|
|
5
|
-
import "./chunk-6OPZJ7MG.js";
|
|
6
|
-
import "./chunk-ZICIXDEE.js";
|
|
7
|
-
import "./chunk-O64EK5FK.js";
|
|
8
|
-
import "./chunk-JESSJ5CZ.js";
|
|
9
|
-
export {
|
|
10
|
-
FEED_ITEM_SCHEMA_IRI,
|
|
11
|
-
FeedItemSchema
|
|
12
|
-
};
|
package/dist/grant-NNKMWXPX.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
IMPORT_BATCH_SCHEMA_IRI,
|
|
3
|
-
ImportBatchSchema
|
|
4
|
-
} from "./chunk-ENTHVNOC.js";
|
|
5
|
-
import "./chunk-6OPZJ7MG.js";
|
|
6
|
-
import "./chunk-ZICIXDEE.js";
|
|
7
|
-
import "./chunk-O64EK5FK.js";
|
|
8
|
-
import "./chunk-JESSJ5CZ.js";
|
|
9
|
-
export {
|
|
10
|
-
IMPORT_BATCH_SCHEMA_IRI,
|
|
11
|
-
ImportBatchSchema
|
|
12
|
-
};
|
package/dist/map-AUV65YS3.js
DELETED
package/dist/metric-X7W55DLC.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
MILESTONE_SCHEMA_IRI,
|
|
3
|
-
MilestoneSchema
|
|
4
|
-
} from "./chunk-IP4BEVVD.js";
|
|
5
|
-
import "./chunk-6OPZJ7MG.js";
|
|
6
|
-
import "./chunk-ZICIXDEE.js";
|
|
7
|
-
import "./chunk-O64EK5FK.js";
|
|
8
|
-
import "./chunk-JESSJ5CZ.js";
|
|
9
|
-
export {
|
|
10
|
-
MILESTONE_SCHEMA_IRI,
|
|
11
|
-
MilestoneSchema
|
|
12
|
-
};
|
package/dist/page-NI7XODS6.js
DELETED
package/dist/posting-FZOYVGH2.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
POSTING_SCHEMA_IRI,
|
|
3
|
-
PostingSchema
|
|
4
|
-
} from "./chunk-EIQX7INF.js";
|
|
5
|
-
import "./chunk-6OPZJ7MG.js";
|
|
6
|
-
import "./chunk-ZICIXDEE.js";
|
|
7
|
-
import "./chunk-O64EK5FK.js";
|
|
8
|
-
import "./chunk-JESSJ5CZ.js";
|
|
9
|
-
export {
|
|
10
|
-
POSTING_SCHEMA_IRI,
|
|
11
|
-
PostingSchema
|
|
12
|
-
};
|
package/dist/profile-42A43GES.js
DELETED
package/dist/project-G2CTLDXY.js
DELETED