@haverstack/core 0.41.0 → 0.43.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/README.md +124 -64
- package/dist/access.d.ts +43 -47
- package/dist/access.d.ts.map +1 -1
- package/dist/access.js +66 -101
- package/dist/access.js.map +1 -1
- package/dist/{combine.d.ts → adapter/combine.d.ts} +8 -1
- package/dist/adapter/combine.d.ts.map +1 -0
- package/dist/{combine.js → adapter/combine.js} +18 -3
- package/dist/adapter/combine.js.map +1 -0
- package/dist/adapter/index.d.ts +19 -0
- package/dist/adapter/index.d.ts.map +1 -0
- package/dist/adapter/index.js +16 -0
- package/dist/adapter/index.js.map +1 -0
- package/dist/adapter/reach.d.ts +14 -0
- package/dist/adapter/reach.d.ts.map +1 -0
- package/dist/adapter/reach.js +31 -0
- package/dist/adapter/reach.js.map +1 -0
- package/dist/{sort.d.ts → adapter/sort.d.ts} +20 -20
- package/dist/adapter/sort.d.ts.map +1 -0
- package/dist/{sort.js → adapter/sort.js} +37 -27
- package/dist/adapter/sort.js.map +1 -0
- package/dist/associations/identity.d.ts +69 -0
- package/dist/associations/identity.d.ts.map +1 -0
- package/dist/associations/identity.js +174 -0
- package/dist/associations/identity.js.map +1 -0
- package/dist/associations/validation.d.ts +83 -0
- package/dist/associations/validation.d.ts.map +1 -0
- package/dist/associations/validation.js +312 -0
- package/dist/associations/validation.js.map +1 -0
- package/dist/attachment-records.d.ts +48 -0
- package/dist/attachment-records.d.ts.map +1 -0
- package/dist/attachment-records.js +52 -0
- package/dist/attachment-records.js.map +1 -0
- package/dist/collection.d.ts +178 -0
- package/dist/collection.d.ts.map +1 -0
- package/dist/collection.js +397 -0
- package/dist/collection.js.map +1 -0
- package/dist/content-match.d.ts +25 -0
- package/dist/content-match.d.ts.map +1 -0
- package/dist/content-match.js +51 -0
- package/dist/content-match.js.map +1 -0
- package/dist/content-translation.d.ts +42 -0
- package/dist/content-translation.d.ts.map +1 -0
- package/dist/content-translation.js +108 -0
- package/dist/content-translation.js.map +1 -0
- package/dist/did/did.d.ts.map +1 -0
- package/dist/{did.js → did/did.js} +3 -4
- package/dist/did/did.js.map +1 -0
- package/dist/{did-entry.d.ts → did/index.d.ts} +1 -1
- package/dist/did/index.d.ts.map +1 -0
- package/dist/{did-entry.js → did/index.js} +3 -3
- package/dist/did/index.js.map +1 -0
- package/dist/errors.d.ts +54 -66
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +58 -62
- package/dist/errors.js.map +1 -1
- package/dist/grants.d.ts +20 -44
- package/dist/grants.d.ts.map +1 -1
- package/dist/grants.js +69 -151
- package/dist/grants.js.map +1 -1
- package/dist/id.d.ts +13 -31
- package/dist/id.d.ts.map +1 -1
- package/dist/id.js +13 -31
- package/dist/id.js.map +1 -1
- package/dist/index.d.ts +13 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/dist/install.d.ts +3 -6
- package/dist/install.d.ts.map +1 -1
- package/dist/install.js +6 -10
- package/dist/install.js.map +1 -1
- package/dist/lazy.d.ts +13 -0
- package/dist/lazy.d.ts.map +1 -0
- package/dist/lazy.js +27 -0
- package/dist/lazy.js.map +1 -0
- package/dist/merge.d.ts +1 -1
- package/dist/merge.d.ts.map +1 -1
- package/dist/merge.js +6 -12
- package/dist/merge.js.map +1 -1
- package/dist/migration-steps.d.ts +102 -0
- package/dist/migration-steps.d.ts.map +1 -0
- package/dist/migration-steps.js +293 -0
- package/dist/migration-steps.js.map +1 -0
- package/dist/query-validation.d.ts +68 -121
- package/dist/query-validation.d.ts.map +1 -1
- package/dist/query-validation.js +214 -380
- package/dist/query-validation.js.map +1 -1
- package/dist/record-changes.d.ts +11 -150
- package/dist/record-changes.d.ts.map +1 -1
- package/dist/record-changes.js +14 -305
- package/dist/record-changes.js.map +1 -1
- package/dist/schema.d.ts +18 -7
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +59 -30
- package/dist/schema.js.map +1 -1
- package/dist/scoped-stack/authority-snapshot.d.ts +37 -0
- package/dist/scoped-stack/authority-snapshot.d.ts.map +1 -0
- package/dist/scoped-stack/authority-snapshot.js +49 -0
- package/dist/scoped-stack/authority-snapshot.js.map +1 -0
- package/dist/scoped-stack/authority.d.ts +169 -0
- package/dist/scoped-stack/authority.d.ts.map +1 -0
- package/dist/scoped-stack/authority.js +408 -0
- package/dist/scoped-stack/authority.js.map +1 -0
- package/dist/scoped-stack/family-policy.d.ts +59 -0
- package/dist/scoped-stack/family-policy.d.ts.map +1 -0
- package/dist/scoped-stack/family-policy.js +68 -0
- package/dist/scoped-stack/family-policy.js.map +1 -0
- package/dist/scoped-stack/scoped-stack.d.ts +318 -0
- package/dist/scoped-stack/scoped-stack.d.ts.map +1 -0
- package/dist/scoped-stack/scoped-stack.js +695 -0
- package/dist/scoped-stack/scoped-stack.js.map +1 -0
- package/dist/scoped-stack/subscription.d.ts +36 -0
- package/dist/scoped-stack/subscription.d.ts.map +1 -0
- package/dist/scoped-stack/subscription.js +69 -0
- package/dist/scoped-stack/subscription.js.map +1 -0
- package/dist/stack/arguments.d.ts +27 -0
- package/dist/stack/arguments.d.ts.map +1 -0
- package/dist/stack/arguments.js +53 -0
- package/dist/stack/arguments.js.map +1 -0
- package/dist/stack/attachments.d.ts +24 -0
- package/dist/stack/attachments.d.ts.map +1 -0
- package/dist/stack/attachments.js +113 -0
- package/dist/stack/attachments.js.map +1 -0
- package/dist/{changes.d.ts → stack/changes.d.ts} +30 -72
- package/dist/stack/changes.d.ts.map +1 -0
- package/dist/{changes.js → stack/changes.js} +40 -74
- package/dist/stack/changes.js.map +1 -0
- package/dist/stack/client.d.ts +247 -0
- package/dist/stack/client.d.ts.map +1 -0
- package/dist/stack/client.js +9 -0
- package/dist/stack/client.js.map +1 -0
- package/dist/stack/identity-bindings.d.ts.map +1 -0
- package/dist/{identity-bindings.js → stack/identity-bindings.js} +5 -14
- package/dist/stack/identity-bindings.js.map +1 -0
- package/dist/stack/install-app.d.ts +22 -0
- package/dist/stack/install-app.d.ts.map +1 -0
- package/dist/stack/install-app.js +262 -0
- package/dist/stack/install-app.js.map +1 -0
- package/dist/stack/integrity.d.ts +94 -0
- package/dist/stack/integrity.d.ts.map +1 -0
- package/dist/stack/integrity.js +268 -0
- package/dist/stack/integrity.js.map +1 -0
- package/dist/{limits.d.ts → stack/limits.d.ts} +2 -5
- package/dist/stack/limits.d.ts.map +1 -0
- package/dist/{limits.js → stack/limits.js} +3 -6
- package/dist/stack/limits.js.map +1 -0
- package/dist/stack/migrations.d.ts +59 -0
- package/dist/stack/migrations.d.ts.map +1 -0
- package/dist/stack/migrations.js +141 -0
- package/dist/stack/migrations.js.map +1 -0
- package/dist/stack/reads.d.ts +69 -0
- package/dist/stack/reads.d.ts.map +1 -0
- package/dist/stack/reads.js +141 -0
- package/dist/stack/reads.js.map +1 -0
- package/dist/stack/record-id.d.ts +35 -0
- package/dist/stack/record-id.d.ts.map +1 -0
- package/dist/stack/record-id.js +82 -0
- package/dist/stack/record-id.js.map +1 -0
- package/dist/stack/stack.d.ts +444 -0
- package/dist/stack/stack.d.ts.map +1 -0
- package/dist/stack/stack.js +1339 -0
- package/dist/stack/stack.js.map +1 -0
- package/dist/stack/system-types.d.ts +16 -0
- package/dist/stack/system-types.d.ts.map +1 -0
- package/dist/stack/system-types.js +111 -0
- package/dist/stack/system-types.js.map +1 -0
- package/dist/stack/type-grants.d.ts +20 -0
- package/dist/stack/type-grants.d.ts.map +1 -0
- package/dist/stack/type-grants.js +69 -0
- package/dist/stack/type-grants.js.map +1 -0
- package/dist/stack/write-expectation.d.ts +79 -0
- package/dist/stack/write-expectation.d.ts.map +1 -0
- package/dist/stack/write-expectation.js +71 -0
- package/dist/stack/write-expectation.js.map +1 -0
- package/dist/stack/write-gate.d.ts +23 -0
- package/dist/stack/write-gate.d.ts.map +1 -0
- package/dist/stack/write-gate.js +17 -0
- package/dist/stack/write-gate.js.map +1 -0
- package/dist/testing.d.ts +44 -33
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +180 -176
- package/dist/testing.js.map +1 -1
- package/dist/type-handle.d.ts +67 -78
- package/dist/type-handle.d.ts.map +1 -1
- package/dist/type-handle.js +44 -111
- package/dist/type-handle.js.map +1 -1
- package/dist/types/adapter.d.ts +282 -0
- package/dist/types/adapter.d.ts.map +1 -0
- package/dist/types/adapter.js +5 -0
- package/dist/types/adapter.js.map +1 -0
- package/dist/types/associations.d.ts +140 -0
- package/dist/types/associations.d.ts.map +1 -0
- package/dist/types/associations.js +6 -0
- package/dist/types/associations.js.map +1 -0
- package/dist/types/capabilities.d.ts +89 -0
- package/dist/types/capabilities.d.ts.map +1 -0
- package/dist/types/capabilities.js +5 -0
- package/dist/types/capabilities.js.map +1 -0
- package/dist/types/events.d.ts +150 -0
- package/dist/types/events.d.ts.map +1 -0
- package/dist/types/events.js +5 -0
- package/dist/types/events.js.map +1 -0
- package/dist/types/ids.d.ts +43 -0
- package/dist/types/ids.d.ts.map +1 -0
- package/dist/types/ids.js +5 -0
- package/dist/types/ids.js.map +1 -0
- package/dist/types/index.d.ts +19 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +19 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/journal.d.ts +47 -0
- package/dist/types/journal.d.ts.map +1 -0
- package/dist/types/journal.js +5 -0
- package/dist/types/journal.js.map +1 -0
- package/dist/types/query.d.ts +185 -0
- package/dist/types/query.d.ts.map +1 -0
- package/dist/types/query.js +10 -0
- package/dist/types/query.js.map +1 -0
- package/dist/types/records.d.ts +76 -0
- package/dist/types/records.d.ts.map +1 -0
- package/dist/types/records.js +5 -0
- package/dist/types/records.js.map +1 -0
- package/dist/types/schema.d.ts +74 -0
- package/dist/types/schema.d.ts.map +1 -0
- package/dist/types/schema.js +5 -0
- package/dist/types/schema.js.map +1 -0
- package/dist/types/system.d.ts +161 -0
- package/dist/types/system.d.ts.map +1 -0
- package/dist/types/system.js +32 -0
- package/dist/types/system.js.map +1 -0
- package/dist/types/tokens.d.ts +39 -0
- package/dist/types/tokens.d.ts.map +1 -0
- package/dist/types/tokens.js +5 -0
- package/dist/types/tokens.js.map +1 -0
- package/dist/validate.d.ts +31 -70
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +52 -92
- package/dist/validate.js.map +1 -1
- package/dist/{attachment-download.d.ts → wire/attachment-download.d.ts} +0 -57
- package/dist/wire/attachment-download.d.ts.map +1 -0
- package/dist/{attachment-download.js → wire/attachment-download.js} +0 -61
- package/dist/wire/attachment-download.js.map +1 -0
- package/dist/{auth.d.ts → wire/auth.d.ts} +5 -8
- package/dist/wire/auth.d.ts.map +1 -0
- package/dist/{auth.js → wire/auth.js} +5 -8
- package/dist/wire/auth.js.map +1 -0
- package/dist/{wire-body.d.ts → wire/body.d.ts} +35 -12
- package/dist/wire/body.d.ts.map +1 -0
- package/dist/{wire-body.js → wire/body.js} +74 -13
- package/dist/wire/body.js.map +1 -0
- package/dist/{wire-entry.d.ts → wire/index.d.ts} +12 -12
- package/dist/wire/index.d.ts.map +1 -0
- package/dist/{wire-entry.js → wire/index.js} +13 -17
- package/dist/wire/index.js.map +1 -0
- package/dist/wire/record.d.ts +31 -0
- package/dist/wire/record.d.ts.map +1 -0
- package/dist/{wire-record.js → wire/record.js} +7 -67
- package/dist/wire/record.js.map +1 -0
- package/dist/{wire-request.d.ts → wire/request.d.ts} +32 -49
- package/dist/wire/request.d.ts.map +1 -0
- package/dist/{wire-request.js → wire/request.js} +113 -83
- package/dist/wire/request.js.map +1 -0
- package/package.json +7 -7
- package/dist/adapter-entry.d.ts +0 -16
- package/dist/adapter-entry.d.ts.map +0 -1
- package/dist/adapter-entry.js +0 -14
- package/dist/adapter-entry.js.map +0 -1
- package/dist/attachment-download.d.ts.map +0 -1
- package/dist/attachment-download.js.map +0 -1
- package/dist/auth.d.ts.map +0 -1
- package/dist/auth.js.map +0 -1
- package/dist/changes.d.ts.map +0 -1
- package/dist/changes.js.map +0 -1
- package/dist/combine.d.ts.map +0 -1
- package/dist/combine.js.map +0 -1
- package/dist/did-entry.d.ts.map +0 -1
- package/dist/did-entry.js.map +0 -1
- package/dist/did.d.ts.map +0 -1
- package/dist/did.js.map +0 -1
- package/dist/identity-bindings.d.ts.map +0 -1
- package/dist/identity-bindings.js.map +0 -1
- package/dist/limits.d.ts.map +0 -1
- package/dist/limits.js.map +0 -1
- package/dist/record-id.d.ts +0 -70
- package/dist/record-id.d.ts.map +0 -1
- package/dist/record-id.js +0 -127
- package/dist/record-id.js.map +0 -1
- package/dist/scoped-stack.d.ts +0 -549
- package/dist/scoped-stack.d.ts.map +0 -1
- package/dist/scoped-stack.js +0 -1301
- package/dist/scoped-stack.js.map +0 -1
- package/dist/sort.d.ts.map +0 -1
- package/dist/sort.js.map +0 -1
- package/dist/stack-reads.d.ts +0 -38
- package/dist/stack-reads.d.ts.map +0 -1
- package/dist/stack-reads.js +0 -79
- package/dist/stack-reads.js.map +0 -1
- package/dist/stack.d.ts +0 -1032
- package/dist/stack.d.ts.map +0 -1
- package/dist/stack.js +0 -2337
- package/dist/stack.js.map +0 -1
- package/dist/types.d.ts +0 -1278
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -51
- package/dist/types.js.map +0 -1
- package/dist/wire-body.d.ts.map +0 -1
- package/dist/wire-body.js.map +0 -1
- package/dist/wire-entry.d.ts.map +0 -1
- package/dist/wire-entry.js.map +0 -1
- package/dist/wire-record.d.ts +0 -50
- package/dist/wire-record.d.ts.map +0 -1
- package/dist/wire-record.js.map +0 -1
- package/dist/wire-request.d.ts.map +0 -1
- package/dist/wire-request.js.map +0 -1
- /package/dist/{did.d.ts → did/did.d.ts} +0 -0
- /package/dist/{identity-bindings.d.ts → stack/identity-bindings.d.ts} +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Content predicates, evaluated in memory
|
|
3
|
+
* -------------------------------------------------------
|
|
4
|
+
* How a `content` filter value and a `contentPresent` path are matched
|
|
5
|
+
* against one content object: element-wise through arrays, with `null`
|
|
6
|
+
* standing for "no value". MemoryAdapter answers queries with it, and a
|
|
7
|
+
* collection decides a constant a migration added the same way, so a key
|
|
8
|
+
* dropped in core matches exactly what an adapter would have matched. See
|
|
9
|
+
* docs/spec/data-model.md § Nested content paths.
|
|
10
|
+
*/
|
|
11
|
+
import { parseContentFilterKey } from './query-validation.js';
|
|
12
|
+
/** An array stands for its elements; anything else stands for itself. */
|
|
13
|
+
const spreadValue = (value) => (Array.isArray(value) ? value : [value]);
|
|
14
|
+
/**
|
|
15
|
+
* Every value reachable by walking `segments`, spreading arrays at each
|
|
16
|
+
* step — the walk sqlite-shared runs in SQL, so a filter answers the same
|
|
17
|
+
* against either. Empty means the path reaches nothing, which a `null`
|
|
18
|
+
* filter value matches.
|
|
19
|
+
*/
|
|
20
|
+
export const valuesAtContentPath = (content, segments) => {
|
|
21
|
+
let current = [content];
|
|
22
|
+
for (const segment of segments) {
|
|
23
|
+
const next = [];
|
|
24
|
+
for (const value of current) {
|
|
25
|
+
for (const item of spreadValue(value)) {
|
|
26
|
+
if (typeof item !== 'object' || item === null || Array.isArray(item))
|
|
27
|
+
continue;
|
|
28
|
+
if (Object.hasOwn(item, segment))
|
|
29
|
+
next.push(item[segment]);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
current = next;
|
|
33
|
+
}
|
|
34
|
+
// The leaf spreads too, so a filter on `tags` matches a record whose
|
|
35
|
+
// `tags` array contains the value.
|
|
36
|
+
return current.flatMap(spreadValue);
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Whether `content` satisfies a `content` and `contentPresent` predicate. A
|
|
40
|
+
* `null` filter value means "field absent or null", not "match nothing":
|
|
41
|
+
* plain `===` would miss an absent field (docs/spec/data-model.md § Filter).
|
|
42
|
+
*/
|
|
43
|
+
export const matchesContent = (content, predicate) => Object.entries(predicate.content ?? {}).every(([key, value]) => {
|
|
44
|
+
const found = valuesAtContentPath(content, parseContentFilterKey(key));
|
|
45
|
+
if (value === null || value === undefined) {
|
|
46
|
+
return found.length === 0 || found.some((v) => v === null || v === undefined);
|
|
47
|
+
}
|
|
48
|
+
return found.some((v) => v === value);
|
|
49
|
+
}) &&
|
|
50
|
+
(predicate.contentPresent ?? []).every((key) => valuesAtContentPath(content, parseContentFilterKey(key)).some((v) => v !== null && v !== undefined));
|
|
51
|
+
//# sourceMappingURL=content-match.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-match.js","sourceRoot":"","sources":["../src/content-match.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAG9D,yEAAyE;AACzE,MAAM,WAAW,GAAG,CAAC,KAAc,EAAa,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;AAE5F;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,OAAgC,EAChC,QAAkB,EACP,EAAE;IACb,IAAI,OAAO,GAAc,CAAC,OAAO,CAAC,CAAC;IACnC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,IAAI,GAAc,EAAE,CAAC;QAC3B,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,KAAK,MAAM,IAAI,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;gBACtC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;oBAAE,SAAS;gBAC/E,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC;oBAAE,IAAI,CAAC,IAAI,CAAE,IAAgC,CAAC,OAAO,CAAC,CAAC,CAAC;YAC1F,CAAC;QACH,CAAC;QACD,OAAO,GAAG,IAAI,CAAC;IACjB,CAAC;IACD,qEAAqE;IACrE,mCAAmC;IACnC,OAAO,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;AACtC,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAAgC,EAAE,SAAqB,EAAW,EAAE,CACjG,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;IAC7D,MAAM,KAAK,GAAG,mBAAmB,CAAC,OAAO,EAAE,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAC;IACvE,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QAC1C,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,SAAS,CAAC,CAAC;IAChF,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC;AACxC,CAAC,CAAC;IACF,CAAC,SAAS,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAC7C,mBAAmB,CAAC,OAAO,EAAE,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAC3D,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,SAAS,CACrC,CACF,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Content queries across versions
|
|
3
|
+
* -------------------------------------------------------
|
|
4
|
+
* A collection's content filter and sort are written in its handle's
|
|
5
|
+
* shape, and an adapter matches content as stored. These functions rewrite
|
|
6
|
+
* one predicate or sort field into an older version's shape, through the
|
|
7
|
+
* field origins a migration chain declares, or say why they cannot: an arm
|
|
8
|
+
* no record at that version can match is dropped, and one that does not
|
|
9
|
+
* translate is narrowed. See docs/spec/data-model.md § Content queries
|
|
10
|
+
* across versions.
|
|
11
|
+
*/
|
|
12
|
+
import type { FieldOrigins } from './migration-steps.js';
|
|
13
|
+
import type { ContentArm, ContentSortKey, ScalarFieldKind } from './types/index.js';
|
|
14
|
+
/** No record at the version can match, so its arm is dropped without a skip. */
|
|
15
|
+
export declare const UNMATCHABLE = "unmatchable";
|
|
16
|
+
/** The version is narrowed: left out of the query, and reported if it matches the rest. */
|
|
17
|
+
export declare const UNTRANSLATABLE = "untranslatable";
|
|
18
|
+
type Untranslated = typeof UNMATCHABLE | typeof UNTRANSLATABLE;
|
|
19
|
+
/**
|
|
20
|
+
* An older version's arm, and the arms it leaves out: when two older
|
|
21
|
+
* values map to the one a key asks for, the arm asks for the first and
|
|
22
|
+
* each other one becomes a residual, which the first page probes for
|
|
23
|
+
* `skipped.older` rather than narrowing the version outright.
|
|
24
|
+
*/
|
|
25
|
+
export type TranslatedArm = {
|
|
26
|
+
arm: ContentArm;
|
|
27
|
+
residuals: ContentArm[];
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* `predicate`, written in the handle's shape, as the arm for the version
|
|
31
|
+
* `origins` describes. A key is translated by its top-level field: the
|
|
32
|
+
* rest of its path is kept, since steps reach top-level fields only.
|
|
33
|
+
*/
|
|
34
|
+
export declare const translateArm: (origins: FieldOrigins, predicate: ContentArm) => TranslatedArm | Untranslated;
|
|
35
|
+
/**
|
|
36
|
+
* What a record at the version `origins` describes orders by, for a sort
|
|
37
|
+
* on the handle's `field` of `kind`. A remapped field is narrowed, since
|
|
38
|
+
* remapped values don't keep their order.
|
|
39
|
+
*/
|
|
40
|
+
export declare const translateSortKey: (origins: FieldOrigins, field: string, kind: ScalarFieldKind | undefined) => ContentSortKey | typeof UNTRANSLATABLE;
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=content-translation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-translation.d.ts","sourceRoot":"","sources":["../src/content-translation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,KAAK,EAAe,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEpF,gFAAgF;AAChF,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,2FAA2F;AAC3F,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAE/C,KAAK,YAAY,GAAG,OAAO,WAAW,GAAG,OAAO,cAAc,CAAC;AAwB/D;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG;IAAE,GAAG,EAAE,UAAU,CAAC;IAAC,SAAS,EAAE,UAAU,EAAE,CAAA;CAAE,CAAC;AAEzE;;;;GAIG;AACH,eAAO,MAAM,YAAY,GACvB,SAAS,YAAY,EACrB,WAAW,UAAU,KACpB,aAAa,GAAG,YAmDlB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAC3B,SAAS,YAAY,EACrB,OAAO,MAAM,EACb,MAAM,eAAe,GAAG,SAAS,KAChC,cAAc,GAAG,OAAO,cAM1B,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Content queries across versions
|
|
3
|
+
* -------------------------------------------------------
|
|
4
|
+
* A collection's content filter and sort are written in its handle's
|
|
5
|
+
* shape, and an adapter matches content as stored. These functions rewrite
|
|
6
|
+
* one predicate or sort field into an older version's shape, through the
|
|
7
|
+
* field origins a migration chain declares, or say why they cannot: an arm
|
|
8
|
+
* no record at that version can match is dropped, and one that does not
|
|
9
|
+
* translate is narrowed. See docs/spec/data-model.md § Content queries
|
|
10
|
+
* across versions.
|
|
11
|
+
*/
|
|
12
|
+
import { matchesContent } from './content-match.js';
|
|
13
|
+
import { sortConstant } from './adapter/sort.js';
|
|
14
|
+
import { parseContentFilterKey } from './query-validation.js';
|
|
15
|
+
/** No record at the version can match, so its arm is dropped without a skip. */
|
|
16
|
+
export const UNMATCHABLE = 'unmatchable';
|
|
17
|
+
/** The version is narrowed: left out of the query, and reported if it matches the rest. */
|
|
18
|
+
export const UNTRANSLATABLE = 'untranslatable';
|
|
19
|
+
/**
|
|
20
|
+
* The older values a `map` sends to `value`, mapped ones first. A value no
|
|
21
|
+
* entry names maps to itself, and `map` reaches strings only.
|
|
22
|
+
*/
|
|
23
|
+
const sourcesOf = (values, value) => {
|
|
24
|
+
if (typeof value !== 'string')
|
|
25
|
+
return [value];
|
|
26
|
+
const sources = Object.keys(values).filter((from) => values[from] === value);
|
|
27
|
+
if (!Object.hasOwn(values, value))
|
|
28
|
+
sources.push(value);
|
|
29
|
+
return sources;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Whether a constant satisfies one key, decided as an adapter would decide
|
|
33
|
+
* it against a record holding the constant at `field`.
|
|
34
|
+
*/
|
|
35
|
+
const constantMatches = (field, origin, predicate) => matchesContent(origin.value === undefined ? {} : { [field]: origin.value }, predicate);
|
|
36
|
+
/**
|
|
37
|
+
* `predicate`, written in the handle's shape, as the arm for the version
|
|
38
|
+
* `origins` describes. A key is translated by its top-level field: the
|
|
39
|
+
* rest of its path is kept, since steps reach top-level fields only.
|
|
40
|
+
*/
|
|
41
|
+
export const translateArm = (origins, predicate) => {
|
|
42
|
+
const content = {};
|
|
43
|
+
const present = [];
|
|
44
|
+
let split;
|
|
45
|
+
const keys = [
|
|
46
|
+
...Object.entries(predicate.content ?? {}).map(([key, value]) => [key, value, false]),
|
|
47
|
+
...(predicate.contentPresent ?? []).map((key) => [key, undefined, true]),
|
|
48
|
+
];
|
|
49
|
+
for (const [key, value, presence] of keys) {
|
|
50
|
+
const [field, ...rest] = parseContentFilterKey(key);
|
|
51
|
+
const origin = origins.get(field);
|
|
52
|
+
if (!origin || origin.kind === 'derived')
|
|
53
|
+
return UNTRANSLATABLE;
|
|
54
|
+
if (origin.kind === 'constant') {
|
|
55
|
+
const asked = presence ? { contentPresent: [key] } : { content: { [key]: value } };
|
|
56
|
+
if (!constantMatches(field, origin, asked))
|
|
57
|
+
return UNMATCHABLE;
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
const path = [origin.field, ...rest].join('.');
|
|
61
|
+
if (presence) {
|
|
62
|
+
present.push(path);
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
// A path below a mapped field reaches no string, so only the field's
|
|
66
|
+
// own values are remapped; `null` is never one of them.
|
|
67
|
+
if (!origin.values || rest.length > 0 || value === null || value === undefined) {
|
|
68
|
+
content[path] = value;
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
const [first, ...others] = sourcesOf(origin.values, value);
|
|
72
|
+
if (first === undefined)
|
|
73
|
+
return UNMATCHABLE;
|
|
74
|
+
// One split per arm keeps the probes to one per source; two would
|
|
75
|
+
// multiply them.
|
|
76
|
+
if (others.length > 0) {
|
|
77
|
+
if (split)
|
|
78
|
+
return UNTRANSLATABLE;
|
|
79
|
+
split = { path, others };
|
|
80
|
+
}
|
|
81
|
+
content[path] = first;
|
|
82
|
+
}
|
|
83
|
+
const arm = {
|
|
84
|
+
...(Object.keys(content).length > 0 && { content }),
|
|
85
|
+
...(present.length > 0 && { contentPresent: present }),
|
|
86
|
+
};
|
|
87
|
+
const residuals = (split?.others ?? []).map((other) => ({
|
|
88
|
+
...arm,
|
|
89
|
+
content: { ...content, [split.path]: other },
|
|
90
|
+
}));
|
|
91
|
+
return { arm, residuals };
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* What a record at the version `origins` describes orders by, for a sort
|
|
95
|
+
* on the handle's `field` of `kind`. A remapped field is narrowed, since
|
|
96
|
+
* remapped values don't keep their order.
|
|
97
|
+
*/
|
|
98
|
+
export const translateSortKey = (origins, field, kind) => {
|
|
99
|
+
const origin = origins.get(field);
|
|
100
|
+
if (!origin || !kind || origin.kind === 'derived')
|
|
101
|
+
return UNTRANSLATABLE;
|
|
102
|
+
if (origin.kind === 'constant')
|
|
103
|
+
return { value: sortConstant(kind, origin.value) };
|
|
104
|
+
if (origin.values && Object.keys(origin.values).length > 0)
|
|
105
|
+
return UNTRANSLATABLE;
|
|
106
|
+
return { field: origin.field };
|
|
107
|
+
};
|
|
108
|
+
//# sourceMappingURL=content-translation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-translation.js","sourceRoot":"","sources":["../src/content-translation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAI9D,gFAAgF;AAChF,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC;AACzC,2FAA2F;AAC3F,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC;AAI/C;;;GAGG;AACH,MAAM,SAAS,GAAG,CAAC,MAAwC,EAAE,KAAc,EAAa,EAAE;IACxF,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,OAAO,GAAc,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,CAAC;IACxF,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC;QAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,eAAe,GA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AAM,UAAU,GAAG;IACvB,6BAA6B;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,+DAA+D;AAC/D,eAAO,MAAM,kBAAkB,QAAa,OAAO,CAAC,UAAU,CAM7D,CAAC;AAEF,yDAAyD;AACzD,eAAO,MAAM,gBAAgB,GAAU,WAAW,SAAS,KAAG,OAAO,CAAC,MAAM,CAM3E,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,KAAG,UAAU,GAAG,IAsBtD,CAAC;AAEF,yDAAyD;AACzD,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,KAAG,OAAsC,CAAC;AAErF,4EAA4E;AAC5E,eAAO,MAAM,mBAAmB,GAAU,KAAK,MAAM,KAAG,OAAO,CAAC,SAAS,CAIxE,CAAC;AASF;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,KAAG,OAAyC,CAAC;AAMrF,eAAO,MAAM,WAAW,GAAU,YAAY,SAAS,EAAE,MAAM,UAAU,KAAG,OAAO,CAAC,UAAU,CACP,CAAC;AAExF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAC7B,KAAK,MAAM,EACX,WAAW,UAAU,EACrB,MAAM,UAAU,KACf,OAAO,CAAC,OAAO,CAQjB,CAAC;AAUF,eAAO,MAAM,sBAAsB,GAAU,YAAY,SAAS,KAAG,OAAO,CAAC,UAAU,CAC3C,CAAC;AAE7C,eAAO,MAAM,sBAAsB,GAAU,KAAK,UAAU,KAAG,OAAO,CAAC,SAAS,CAChB,CAAC"}
|
|
@@ -153,10 +153,9 @@ export const verifyDidSignature = async (did, signature, data) => {
|
|
|
153
153
|
// Private-key export/import
|
|
154
154
|
// -------------------------------------------------------
|
|
155
155
|
//
|
|
156
|
-
// Core never stores a private key
|
|
157
|
-
//
|
|
158
|
-
//
|
|
159
|
-
// key lives is an app/UX concern, not this library's.
|
|
156
|
+
// Core never stores a private key: these let a caller persist what
|
|
157
|
+
// generateDidKeypair() returned and reconstruct it on a later run. Where
|
|
158
|
+
// the key lives is the app's concern.
|
|
160
159
|
export const exportDidPrivateKeyJwk = async (privateKey) => crypto.subtle.exportKey('jwk', privateKey);
|
|
161
160
|
export const importDidPrivateKeyJwk = async (jwk) => crypto.subtle.importKey('jwk', jwk, 'Ed25519', true, ['sign']);
|
|
162
161
|
//# sourceMappingURL=did.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"did.js","sourceRoot":"","sources":["../../src/did/did.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,0DAA0D;AAC1D,SAAS;AACT,0DAA0D;AAE1D,MAAM,OAAO,eAAgB,SAAQ,KAAK;IACxC,YAAY,OAAO,GAAG,EAAE;QACtB,KAAK,CAAC,OAAO,IAAI,cAAc,CAAC,CAAC;QACjC,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AAED,0DAA0D;AAC1D,yEAAyE;AACzE,0DAA0D;AAE1D,MAAM,eAAe,GAAG,4DAA4D,CAAC;AAErF,MAAM,eAAe,GAAG,CAAC,KAAiB,EAAU,EAAE;IACpD,IAAI,KAAK,GAAG,EAAE,CAAC;IACf,KAAK,MAAM,IAAI,IAAI,KAAK;QAAE,KAAK,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAE/D,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,OAAO,KAAK,GAAG,EAAE,EAAE,CAAC;QAClB,MAAM,SAAS,GAAG,KAAK,GAAG,GAAG,CAAC;QAC9B,KAAK,IAAI,GAAG,CAAC;QACb,GAAG,GAAG,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,GAAG,GAAG,CAAC;IACjD,CAAC;IAED,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QAC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10,4 +10,4 @@ export type { DidKeypair } from './did.js';
|
|
|
10
10
|
export { isValidDid } from './did.js';
|
|
11
11
|
export { isValidDidKey } from './did.js';
|
|
12
12
|
export { signWithDid, exportDidPrivateKeyJwk, importDidPrivateKeyJwk } from './did.js';
|
|
13
|
-
//# sourceMappingURL=
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/did/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AACnF,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAI3C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAKtC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAKzC,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* keygen and key custody, and protocol implementers verifying signatures.
|
|
7
7
|
*/
|
|
8
8
|
export { InvalidDidError, generateDidKeypair, verifyDidSignature } from './did.js';
|
|
9
|
-
// No in-repo caller:
|
|
10
|
-
//
|
|
9
|
+
// No in-repo caller: a server validates its configured owner DID with this
|
|
10
|
+
// at startup.
|
|
11
11
|
export { isValidDid } from './did.js';
|
|
12
12
|
// No in-repo caller: it exists for callers needing the did:key narrowing
|
|
13
13
|
// isValidDid()'s docstring points to — rejecting a method
|
|
@@ -17,4 +17,4 @@ export { isValidDidKey } from './did.js';
|
|
|
17
17
|
// exportDidPrivateKeyJwk() -> store -> importDidPrivateKeyJwk() ->
|
|
18
18
|
// signWithDid() as the key-custody journey an app follows.
|
|
19
19
|
export { signWithDid, exportDidPrivateKeyJwk, importDidPrivateKeyJwk } from './did.js';
|
|
20
|
-
//# sourceMappingURL=
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/did/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAGnF,2EAA2E;AAC3E,cAAc;AACd,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,yEAAyE;AACzE,0DAA0D;AAC1D,8DAA8D;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,4DAA4D;AAC5D,mEAAmE;AACnE,2DAA2D;AAC3D,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -7,17 +7,18 @@
|
|
|
7
7
|
* subclass carries its wire discriminator as an instance `code`.
|
|
8
8
|
*
|
|
9
9
|
* Several errors sit deliberately outside that root (UseAfterCloseError,
|
|
10
|
-
* InvalidAdapterError, OwnerMismatchError,
|
|
11
|
-
* modules — IdGenerationError
|
|
12
|
-
*
|
|
13
|
-
*
|
|
10
|
+
* InvalidAdapterError, OwnerMismatchError, ElementSetMovedError, ScopeUnavailableError, and — in their own
|
|
11
|
+
* modules — IdGenerationError, InvalidDidError, InvalidAuthChallengeError,
|
|
12
|
+
* StoredVersionError and MisfitError): they report a local programming error, malformed
|
|
13
|
+
* local input or an assembled topology, not a state a request can be in, so
|
|
14
|
+
* no server ever responds with one.
|
|
14
15
|
*
|
|
15
16
|
* The `Stack` prefix is reserved for the taxonomy: a class named
|
|
16
17
|
* `Stack…Error` extends StackError, and nothing else carries the prefix.
|
|
17
18
|
*/
|
|
18
19
|
import type { SchemaDriftViolation } from './schema.js';
|
|
19
20
|
import type { ValidationError } from './validate.js';
|
|
20
|
-
import type { EntityId, MissingCapability, TypeId } from './types.js';
|
|
21
|
+
import type { EntityId, MissingCapability, TypeId } from './types/index.js';
|
|
21
22
|
/**
|
|
22
23
|
* The wire-protocol discriminator vocabulary, one code per Stack-domain
|
|
23
24
|
* error class. Lives here rather than in @haverstack/wire-types because the
|
|
@@ -26,29 +27,27 @@ import type { EntityId, MissingCapability, TypeId } from './types.js';
|
|
|
26
27
|
*/
|
|
27
28
|
export type StackErrorCode = 'bad_request' | 'permission' | 'not_found' | 'conflict' | 'version_conflict' | 'validation' | 'migration' | 'schema_drift' | 'payload_too_large' | 'timeout';
|
|
28
29
|
/**
|
|
29
|
-
* Root of the
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* than a chain of class tests.
|
|
35
|
-
*
|
|
36
|
-
* Membership implies a wire mapping: every code has an entry in
|
|
37
|
-
* WIRE_ERROR_STATUS. Errors with no wire representation (IdGenerationError,
|
|
38
|
-
* InvalidDidError) deliberately stay outside this hierarchy.
|
|
39
|
-
*
|
|
40
|
-
* Subclassing adds no hierarchy beyond this root — notably
|
|
41
|
-
* StackVersionConflictError is a sibling of StackConflictError, not a
|
|
42
|
-
* subtype. See docs/spec/wire-format.md § Error responses.
|
|
30
|
+
* Root of the taxonomy: `instanceof StackError` is the one question a
|
|
31
|
+
* server's error middleware asks, and each subclass's `code` makes
|
|
32
|
+
* serialization a lookup. Every code has a WIRE_ERROR_STATUS entry.
|
|
33
|
+
* Subclasses add no hierarchy — StackVersionConflictError is a sibling of
|
|
34
|
+
* StackConflictError. See docs/spec/wire-format.md § Error responses.
|
|
43
35
|
*/
|
|
44
36
|
export declare abstract class StackError extends Error {
|
|
45
37
|
abstract readonly code: StackErrorCode;
|
|
46
38
|
}
|
|
39
|
+
export declare const ARGUMENTS_INVALID = "Invalid arguments";
|
|
40
|
+
export declare const SCHEMA_INVALID = "Schema validation failed";
|
|
41
|
+
/**
|
|
42
|
+
* `header` names what was validated — record content, or the arguments a
|
|
43
|
+
* call was given — so a refusal of `editAssociations(id, [])` doesn't read as a
|
|
44
|
+
* content failure. Only the message varies: `code` is the contract.
|
|
45
|
+
*/
|
|
47
46
|
export declare class StackValidationError extends StackError {
|
|
48
47
|
readonly errors: ValidationError[];
|
|
49
48
|
static readonly code: "validation";
|
|
50
49
|
readonly code: "validation";
|
|
51
|
-
constructor(errors: ValidationError[]);
|
|
50
|
+
constructor(errors: ValidationError[], header?: string);
|
|
52
51
|
}
|
|
53
52
|
export declare class StackMigrationError extends StackError {
|
|
54
53
|
static readonly code: "migration";
|
|
@@ -73,6 +72,12 @@ export declare class StackConflictError extends StackError {
|
|
|
73
72
|
readonly code: "conflict";
|
|
74
73
|
constructor(message: string);
|
|
75
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* The refusal a mutation of a soft-deleted record earns, from `Stack` or
|
|
77
|
+
* from inside an adapter's aspect write: one message, wherever it is asked.
|
|
78
|
+
* See docs/spec/versioning.md § Mutations are refused, not applied to a tombstone.
|
|
79
|
+
*/
|
|
80
|
+
export declare const softDeletedRefusal: (id: string) => StackConflictError;
|
|
76
81
|
/**
|
|
77
82
|
* Thrown when an `ifVersion` precondition doesn't match a record's current
|
|
78
83
|
* version. Deliberately not a StackConflictError subtype — the two have
|
|
@@ -88,37 +93,25 @@ export declare class StackVersionConflictError extends StackError {
|
|
|
88
93
|
constructor(message: string, recordId: string, expectedVersion: number, actualVersion: number);
|
|
89
94
|
}
|
|
90
95
|
/**
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
* StackValidationError, which means the request was well-formed but content
|
|
96
|
-
* failed schema validation.
|
|
97
|
-
*
|
|
98
|
-
* Naming something absent belongs here rather than under `not_found`: a
|
|
99
|
-
* request whose *type* is undefined never addressed a record, so answering
|
|
100
|
-
* 404 would say a record was missing when none was asked for.
|
|
96
|
+
* A request structurally malformed — an undecodable cursor, a malformed
|
|
97
|
+
* TypeId, unparseable search text — as opposed to StackValidationError's
|
|
98
|
+
* well-formed request with invalid content. Naming an undefined type is
|
|
99
|
+
* here, not `not_found`: no record was asked for, so none is missing.
|
|
101
100
|
*/
|
|
102
101
|
export declare class StackBadRequestError extends StackError {
|
|
103
102
|
/**
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
* A client mapping this onto an error of its own reads the name from
|
|
108
|
-
* here rather than re-deriving it from the query, which is how one
|
|
109
|
-
* rule becomes two answers that can disagree.
|
|
103
|
+
* The declared capability the query needed and the adapter lacks, or
|
|
104
|
+
* undefined when the query's own shape was wrong. A client reads it from
|
|
105
|
+
* here rather than re-deriving it, so one rule has one answer.
|
|
110
106
|
*/
|
|
111
107
|
readonly capability?: MissingCapability | undefined;
|
|
112
108
|
static readonly code: "bad_request";
|
|
113
109
|
readonly code: "bad_request";
|
|
114
110
|
constructor(message: string,
|
|
115
111
|
/**
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
* A client mapping this onto an error of its own reads the name from
|
|
120
|
-
* here rather than re-deriving it from the query, which is how one
|
|
121
|
-
* rule becomes two answers that can disagree.
|
|
112
|
+
* The declared capability the query needed and the adapter lacks, or
|
|
113
|
+
* undefined when the query's own shape was wrong. A client reads it from
|
|
114
|
+
* here rather than re-deriving it, so one rule has one answer.
|
|
122
115
|
*/
|
|
123
116
|
capability?: MissingCapability | undefined);
|
|
124
117
|
}
|
|
@@ -134,17 +127,10 @@ export declare class StackPayloadTooLargeError extends StackError {
|
|
|
134
127
|
constructor(message: string);
|
|
135
128
|
}
|
|
136
129
|
/**
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
* docs/spec/data-model.md § Capability-gated filters
|
|
141
|
-
*
|
|
142
|
-
* Never produced in-process: both SQLite engines run synchronously, so
|
|
143
|
-
* there is nothing to interrupt from inside the call. It exists so a
|
|
144
|
-
* server that bounds query time has a class to serialize, and so the app
|
|
145
|
-
* catching it can tell "too expensive, narrow it and retry" from
|
|
146
|
-
* StackBadRequestError's "malformed, don't bother retrying" — the distinction
|
|
147
|
-
* that would be lost if a timeout reused `bad_request`.
|
|
130
|
+
* A server abandoned an operation for taking too long — in practice a
|
|
131
|
+
* full-text search. Never produced in-process; it lets an app tell "too
|
|
132
|
+
* expensive, narrow and retry" from `bad_request`'s "malformed".
|
|
133
|
+
* See docs/spec/data-model.md § Capability-gated filters.
|
|
148
134
|
*/
|
|
149
135
|
export declare class StackTimeoutError extends StackError {
|
|
150
136
|
static readonly code: "timeout";
|
|
@@ -197,20 +183,22 @@ export declare class OwnerMismatchError extends Error {
|
|
|
197
183
|
constructor(expected: EntityId, actual: EntityId | undefined, where: string);
|
|
198
184
|
}
|
|
199
185
|
/**
|
|
200
|
-
* Thrown
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
*
|
|
211
|
-
*
|
|
186
|
+
* Thrown by an adapter's element-set write when the stored set no longer
|
|
187
|
+
* matches the `expectSet` it was handed. Outside the StackError taxonomy:
|
|
188
|
+
* Stack catches it and reads again, so no request ever answers with it.
|
|
189
|
+
* See docs/spec/versioning.md § Element-set writes compare the set they read.
|
|
190
|
+
*/
|
|
191
|
+
export declare class ElementSetMovedError extends Error {
|
|
192
|
+
readonly recordId: string;
|
|
193
|
+
constructor(recordId: string);
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* A scoped view asked of a stack that does not own its storage. A server
|
|
197
|
+
* scopes every request to the session that opened it, so such a stack is
|
|
198
|
+
* scoped by opening it with the session meant.
|
|
199
|
+
* See docs/spec/access-control.md § Enforcement: Stack.asEntity().
|
|
212
200
|
*/
|
|
213
|
-
export declare class
|
|
201
|
+
export declare class ScopeUnavailableError extends Error {
|
|
214
202
|
constructor(message: string);
|
|
215
203
|
}
|
|
216
204
|
//# sourceMappingURL=errors.d.ts.map
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE5E;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GACtB,aAAa,GACb,YAAY,GACZ,WAAW,GACX,UAAU,GACV,kBAAkB,GAClB,YAAY,GACZ,WAAW,GACX,cAAc,GACd,mBAAmB,GACnB,SAAS,CAAC;AAEd;;;;;;GAMG;AACH,8BAAsB,UAAW,SAAQ,KAAK;IAC5C,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;CACxC;AAGD,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AACrD,eAAO,MAAM,cAAc,6BAA6B,CAAC;AAEzD;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,UAAU;aAIhC,MAAM,EAAE,eAAe,EAAE;IAH3C,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAG,YAAY,CAAU;IAC7C,SAAkB,IAAI,eAA6B;gBAEjC,MAAM,EAAE,eAAe,EAAE,EACzC,MAAM,GAAE,MAAwB;CAKnC;AAED,qBAAa,mBAAoB,SAAQ,UAAU;IACjD,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAG,WAAW,CAAU;IAC5C,SAAkB,IAAI,cAA4B;gBACtC,OAAO,EAAE,MAAM;CAI5B;AAED,iFAAiF;AACjF,qBAAa,oBAAqB,SAAQ,UAAU;IAClD,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAG,YAAY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