@arkiv-network/sdk 0.8.1-dev.1 → 0.9.0-next.2
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 +180 -61
- package/dist/chains/index.d.ts +17 -17
- package/dist/changeOwnership-Cy9gfyjN.d.cts +1160 -0
- package/dist/changeOwnership-Cy9gfyjN.d.cts.map +1 -0
- package/dist/changeOwnership-gXf-lBqI.d.ts +1160 -0
- package/dist/changeOwnership-gXf-lBqI.d.ts.map +1 -0
- package/dist/entity/index.cjs +4 -10
- package/dist/entity/index.d.cts +3 -3
- package/dist/entity/index.d.ts +3 -3
- package/dist/entity/index.js +3 -4
- package/dist/entity-BM1unrQf.cjs +41 -0
- package/dist/{entity-DJ0Gml9c.cjs → entity-BgaFJSaV.cjs} +4 -4
- package/dist/entity-CFAI1KyG.js +36 -0
- package/dist/entity-CFAI1KyG.js.map +1 -0
- package/dist/{entity-CniBgBSd.js → entity-CGqx_AU0.js} +4 -4
- package/dist/entity-CGqx_AU0.js.map +1 -0
- package/dist/{payload-AfUfSctb.d.ts → expirationTime-C7PZK49K.d.ts} +8 -37
- package/dist/expirationTime-C7PZK49K.d.ts.map +1 -0
- package/dist/expirationTime-CkIGNAg8.cjs +140 -0
- package/dist/{payload-D167BlJR.d.cts → expirationTime-DOB8V4B8.d.cts} +8 -37
- package/dist/expirationTime-DOB8V4B8.d.cts.map +1 -0
- package/dist/{expiry-Cgdb_dbq.js → expirationTime-UKPuA-LM.js} +62 -27
- package/dist/expirationTime-UKPuA-LM.js.map +1 -0
- package/dist/expiry-B48I-yTA.d.cts +40 -0
- package/dist/expiry-B48I-yTA.d.cts.map +1 -0
- package/dist/expiry-S2PUL8Hg.d.ts +40 -0
- package/dist/expiry-S2PUL8Hg.d.ts.map +1 -0
- package/dist/index-C-mMF5WZ.d.cts +735 -0
- package/dist/index-C-mMF5WZ.d.cts.map +1 -0
- package/dist/{index-BkqSnGJH.d.ts → index-C4zZqJ9S.d.ts} +5 -27
- package/dist/index-C4zZqJ9S.d.ts.map +1 -0
- package/dist/{index-CLhsFyVH.d.cts → index-CcVWYB6v.d.cts} +5 -27
- package/dist/index-CcVWYB6v.d.cts.map +1 -0
- package/dist/index-DCx2XC6S.d.ts +489 -0
- package/dist/index-DCx2XC6S.d.ts.map +1 -0
- package/dist/index-DLb7BfIw.d.ts +735 -0
- package/dist/index-DLb7BfIw.d.ts.map +1 -0
- package/dist/index-DzriOUm8.d.cts +489 -0
- package/dist/index-DzriOUm8.d.cts.map +1 -0
- package/dist/index.cjs +162 -146
- package/dist/index.d.cts +180 -133
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +180 -133
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +93 -83
- package/dist/index.js.map +1 -1
- package/dist/params-BuIrJA9a.cjs +45 -0
- package/dist/params-DDJOnsNi.js +22 -0
- package/dist/params-DDJOnsNi.js.map +1 -0
- package/dist/query/index.cjs +9 -4
- package/dist/query/index.d.cts +6 -6
- package/dist/query/index.d.ts +6 -6
- package/dist/query/index.js +4 -5
- package/dist/query-D0KtuFh2.cjs +1625 -0
- package/dist/query-DpRDozmj.js +1417 -0
- package/dist/query-DpRDozmj.js.map +1 -0
- package/dist/schema/index.cjs +46 -0
- package/dist/schema/index.d.cts +2 -0
- package/dist/schema/index.d.ts +2 -0
- package/dist/schema/index.js +3 -0
- package/dist/{attr-BXTkpnoc.cjs → schema-B9AyXcgU.cjs} +513 -246
- package/dist/{attr-tmyREHtw.js → schema-DY4sqehl.js} +427 -244
- package/dist/schema-DY4sqehl.js.map +1 -0
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.d.cts +5 -5
- package/dist/types/index.d.ts +5 -5
- package/dist/types/index.js +1 -1
- package/dist/utils/index.cjs +3 -5
- package/dist/utils/index.d.cts +3 -3
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.js +3 -3
- package/package.json +9 -12
- package/src/actions/public/getEntity.test.ts +69 -0
- package/src/actions/public/getEntity.ts +34 -20
- package/src/actions/public/predictEntityKeys.ts +8 -7
- package/src/actions/public/query.test.ts +58 -0
- package/src/actions/public/query.ts +41 -13
- package/src/actions/wallet/createEntity.ts +34 -63
- package/src/actions/wallet/executeBatch.test.ts +38 -0
- package/src/actions/wallet/executeBatch.ts +26 -9
- package/src/actions/wallet/extendEntity.ts +9 -8
- package/src/actions/wallet/patchEntity.ts +43 -52
- package/src/clients/createPublicClient.test.ts +10 -2
- package/src/clients/createWalletClient.ts +4 -1
- package/src/clients/decorators/arkivPublic.ts +123 -80
- package/src/clients/decorators/arkivWallet.ts +113 -65
- package/src/entity/create.test.ts +25 -21
- package/src/entity/expiry.ts +8 -6
- package/src/entity/flags.ts +1 -1
- package/src/entity/index.ts +2 -4
- package/src/entity/key.ts +3 -3
- package/src/entity/operations.ts +1 -1
- package/src/errors.ts +2 -11
- package/src/index.ts +18 -6
- package/src/query/builderBase.ts +166 -0
- package/src/query/countBuilder.test.ts +91 -0
- package/src/query/countBuilder.ts +67 -0
- package/src/query/engine.ts +9 -3
- package/src/query/errors.ts +24 -14
- package/src/query/expression.test.ts +129 -21
- package/src/query/expression.ts +323 -94
- package/src/query/index.ts +26 -4
- package/src/query/injection.test.ts +5 -11
- package/src/query/queryBuilder.test.ts +467 -58
- package/src/query/queryBuilder.ts +191 -98
- package/src/query/queryResult.ts +35 -9
- package/src/query/selection.test.ts +278 -24
- package/src/query/selection.ts +427 -86
- package/src/schema/attributes.test.ts +266 -0
- package/src/schema/attributes.ts +212 -0
- package/src/{attr → schema}/codec.test.ts +37 -5
- package/src/{attr → schema}/codec.ts +40 -11
- package/src/schema/column.ts +193 -0
- package/src/{attr → schema}/errors.ts +67 -10
- package/src/schema/index.ts +76 -0
- package/src/{attr → schema}/names.ts +4 -2
- package/src/schema/schema.test.ts +171 -0
- package/src/schema/schema.ts +250 -0
- package/src/{attr → schema}/types.ts +36 -30
- package/src/{attr → schema}/values.test.ts +62 -3
- package/src/{attr → schema}/values.ts +246 -65
- package/src/types/entity.test.ts +1 -44
- package/src/types/entity.ts +9 -55
- package/src/types/events.ts +1 -1
- package/src/types/index.ts +11 -4
- package/src/types/rpcSchema.ts +22 -16
- package/src/utils/arkivTransactions.test.ts +356 -116
- package/src/utils/arkivTransactions.ts +30 -38
- package/src/utils/entities.ts +10 -9
- package/src/utils/expirationTime.ts +5 -5
- package/src/utils/index.ts +0 -1
- package/src/utils/logger.test.ts +45 -0
- package/src/utils/logger.ts +5 -39
- package/src/utils/revert.test.ts +25 -0
- package/src/utils/revert.ts +28 -3
- package/dist/attr/index.cjs +0 -34
- package/dist/attr/index.d.cts +0 -2
- package/dist/attr/index.d.ts +0 -2
- package/dist/attr/index.js +0 -3
- package/dist/attr-tmyREHtw.js.map +0 -1
- package/dist/entity-B0t6sN7F.cjs +0 -71
- package/dist/entity-BIp_df9u.js +0 -67
- package/dist/entity-BIp_df9u.js.map +0 -1
- package/dist/entity-CniBgBSd.js.map +0 -1
- package/dist/expiry-BxOlvVWC.d.ts +0 -79
- package/dist/expiry-BxOlvVWC.d.ts.map +0 -1
- package/dist/expiry-CG9GhVXv.cjs +0 -135
- package/dist/expiry-Cgdb_dbq.js.map +0 -1
- package/dist/expiry-DRV29F1r.d.cts +0 -79
- package/dist/expiry-DRV29F1r.d.cts.map +0 -1
- package/dist/flags-DCD26uhe.cjs +0 -43
- package/dist/flags-DUT2gHEU.js +0 -33
- package/dist/flags-DUT2gHEU.js.map +0 -1
- package/dist/index-BkqSnGJH.d.ts.map +0 -1
- package/dist/index-C7fbakoI.d.cts +0 -278
- package/dist/index-C7fbakoI.d.cts.map +0 -1
- package/dist/index-CIcHPx2j.d.cts +0 -424
- package/dist/index-CIcHPx2j.d.cts.map +0 -1
- package/dist/index-CLhsFyVH.d.cts.map +0 -1
- package/dist/index-Cd2aaWme.d.ts +0 -424
- package/dist/index-Cd2aaWme.d.ts.map +0 -1
- package/dist/index-Cq6fa8AI.d.ts +0 -278
- package/dist/index-Cq6fa8AI.d.ts.map +0 -1
- package/dist/index-DaNeJUw8.d.ts +0 -955
- package/dist/index-DaNeJUw8.d.ts.map +0 -1
- package/dist/index-Dv16LO2s.d.cts +0 -955
- package/dist/index-Dv16LO2s.d.cts.map +0 -1
- package/dist/payload-AfUfSctb.d.ts.map +0 -1
- package/dist/payload-D167BlJR.d.cts.map +0 -1
- package/dist/payload-DE7wMztL.js +0 -92
- package/dist/payload-DE7wMztL.js.map +0 -1
- package/dist/payload-DqFweqiO.cjs +0 -108
- package/dist/query-9oojUdM7.cjs +0 -1128
- package/dist/query-Ber-lOJQ.js +0 -968
- package/dist/query-Ber-lOJQ.js.map +0 -1
- package/src/actions/public/getEntityCount.ts +0 -10
- package/src/attr/attributes.test.ts +0 -120
- package/src/attr/attributes.ts +0 -196
- package/src/attr/index.ts +0 -50
- package/src/types/mimeTypes.ts +0 -27
- package/src/utils/compression.test.ts +0 -32
- package/src/utils/compression.ts +0 -102
- package/src/utils/payload.ts +0 -36
- /package/src/{attr → schema}/decimal.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-DLb7BfIw.d.ts","names":[],"sources":["../src/schema/types.ts","../src/schema/column.ts","../src/schema/values.ts","../src/schema/schema.ts","../src/schema/attributes.ts","../src/schema/decimal.ts","../src/schema/errors.ts","../src/schema/names.ts"],"sourcesContent":[],"mappings":";;;;;;AA0BA;AAiBA;AAGA;AAMA;AAKC;AAgBD;;;;;;;AAOA;AAEA;AAIA;AAEA;AAKA;AAEA;AAEA;AAEA;AAEA;AAKY,cAhFC,QAgFS,EAAkB;EAG5B,SAAA,IAAU,EAAA,CAAA;EAClB,SAAA,GAAA,EAAA,CAAA;EACA,SAAA,GAAA,EAAA,CAAA;EACA,SAAA,IAAA,EAAA,CAAA;EACA,SAAA,GAAA,EAAA,CAAA;EACA,SAAA,OAAA,EAAA,CAAA;EACA,SAAA,KAAA,EAAA,CAAA;EACA,SAAA,GAAA,EAAA,CAAA;EACA,SAAA,IAAA,EAAA,CA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A,CPmBE,IAAA,EAAA,MAAA,CAAA,EAAA,IAAA;;AACN,iBOwBI,oBAAA,CPxBJ,IAAA,EAAA,MAAA,CAAA,EAAA,OAAA"}
|
|
@@ -0,0 +1,489 @@
|
|
|
1
|
+
import { At as ArkivClient, F as ResultOf, J as Entity, Lt as RpcSelect, R as SelectArg, W as UnknownSelection, nt as Expression, ot as RefsOf, st as SchemaRef } from "./changeOwnership-Cy9gfyjN.cjs";
|
|
2
|
+
import { O as Schema, _t as TypeTag, x as ColumnsOf } from "./index-C-mMF5WZ.cjs";
|
|
3
|
+
import { Hex } from "viem";
|
|
4
|
+
|
|
5
|
+
//#region src/query/builderBase.d.ts
|
|
6
|
+
/** The expressions in a `where` call — passed one by one, or as one array. */
|
|
7
|
+
type WhereExpressions<E extends readonly (Expression | readonly Expression[])[]> = E[number] extends infer X ? (X extends readonly Expression[] ? X[number] : X) : never;
|
|
8
|
+
/**
|
|
9
|
+
* Human-readable messages for compile-time errors when a filter does not fit the schema.
|
|
10
|
+
*/
|
|
11
|
+
type FilterProblem<R, S extends Schema> = R extends {
|
|
12
|
+
readonly name: infer N extends string;
|
|
13
|
+
readonly type: infer T extends string;
|
|
14
|
+
} ? R extends SchemaRef<S> ? never : N extends SchemaRef<S>["name"] ? `"${N}" has type ${Extract<SchemaRef<S>, {
|
|
15
|
+
name: N;
|
|
16
|
+
}>["type"]}, but is compared against a value of type ${T}` : N extends keyof ColumnsOf<S> ? ColumnsOf<S>[N]["type"] extends "bytes" ? `"${N}" is a bytes column, and bytes are never indexed, so it cannot be filtered on. Index a str, bytes32 or key derived from it instead` : `"${N}" is not indexed, so it cannot be filtered on. Declare it ${ColumnsOf<S>[N]["type"]}().indexed() to filter on it` : `"${N}" is not a column of this schema` : never;
|
|
17
|
+
/**
|
|
18
|
+
* `where`'s check that every filter fits the schema — `unknown` when it does, or when there is no
|
|
19
|
+
* schema, and otherwise an object whose one property is named after the problem. No expression has
|
|
20
|
+
* that property, so the compiler reports the sentence as the property it is missing.
|
|
21
|
+
*/
|
|
22
|
+
type FilterCheck<E extends readonly (Expression | readonly Expression[])[], TSchema> = TSchema extends Schema ? [FilterProblem<RefsOf<WhereExpressions<E>>, TSchema>] extends [infer P extends string] ? [P] extends [never] ? unknown : { [K in P]: never } : unknown : unknown;
|
|
23
|
+
/**
|
|
24
|
+
* What every query builder shares: the client, the filters — `where`, `ownedBy`, `createdBy` and a
|
|
25
|
+
* named schema's tag — and the block to read at. `client.select()` and `client.count()` build on it,
|
|
26
|
+
* so the same filters always send the same query string, whichever of them runs it.
|
|
27
|
+
*
|
|
28
|
+
* Not constructed directly: create a builder with `client.select(...)` or `client.count()`.
|
|
29
|
+
*
|
|
30
|
+
* @typeParam TSchema - The schema named with `from()`, if any, which `where` is checked against.
|
|
31
|
+
*/
|
|
32
|
+
declare abstract class QueryBuilderBase<TSchema extends Schema | undefined = undefined> {
|
|
33
|
+
protected readonly _client: ArkivClient;
|
|
34
|
+
protected _schema: Schema | undefined;
|
|
35
|
+
protected readonly _filters: Expression[];
|
|
36
|
+
protected _ownedBy: Expression | undefined;
|
|
37
|
+
protected _createdBy: Expression | undefined;
|
|
38
|
+
protected _atBlock: bigint | undefined;
|
|
39
|
+
constructor(client: ArkivClient);
|
|
40
|
+
/**
|
|
41
|
+
* This builder's state in a new builder of the same class, re-typed by the caller. Every field is
|
|
42
|
+
* carried over, so one a subclass adds is not dropped by `from()`; the filter list, which is
|
|
43
|
+
* mutated in place, is copied rather than shared.
|
|
44
|
+
*
|
|
45
|
+
* A copy, not `this` re-typed: a builder typed for one schema must never be the same object as
|
|
46
|
+
* one typed for another, or `base.from(Posts)` and `base.from(Users)` would share their state.
|
|
47
|
+
*/
|
|
48
|
+
protected copy<B extends QueryBuilderBase<Schema | undefined>>(): B;
|
|
49
|
+
/**
|
|
50
|
+
* Adds filters. Everything passed here, and across repeated calls, must hold.
|
|
51
|
+
*
|
|
52
|
+
* After `from()`, every attribute a filter names must be an indexed column of the schema,
|
|
53
|
+
* compared against a value of its type — anything else is a compile error.
|
|
54
|
+
*
|
|
55
|
+
* @param expressions - The expressions, as separate arguments or one array.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* builder.where(eq("category", "docs"))
|
|
59
|
+
* builder.where(gte("level", i32(10)), lt("level", i32(20)))
|
|
60
|
+
* builder.where(or(eq("status", "open"), not(exists("closedAt"))))
|
|
61
|
+
*/
|
|
62
|
+
where<const E extends readonly (Expression | readonly Expression[])[]>(...expressions: E & FilterCheck<E, TSchema>): this;
|
|
63
|
+
/**
|
|
64
|
+
* Restricts the query to entities this account owns — shorthand for
|
|
65
|
+
* `where(eq("$owner", addr(owner)))`. Calling it again replaces the filter.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* builder.ownedBy("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045")
|
|
69
|
+
*/
|
|
70
|
+
ownedBy(owner: Hex): this;
|
|
71
|
+
/**
|
|
72
|
+
* Restricts the query to entities this account created — shorthand for
|
|
73
|
+
* `where(eq("$creator", addr(creator)))`. Calling it again replaces the filter.
|
|
74
|
+
*
|
|
75
|
+
* The creator never changes; the owner does, so these differ after a transfer.
|
|
76
|
+
*/
|
|
77
|
+
createdBy(creator: Hex): this;
|
|
78
|
+
/**
|
|
79
|
+
* Reads the state as of a given block rather than the head. The block must be within the range
|
|
80
|
+
* the node retains.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* builder.atBlock(1_297_000n)
|
|
84
|
+
*/
|
|
85
|
+
atBlock(block: bigint): this;
|
|
86
|
+
/**
|
|
87
|
+
* The query string this builder will send — the same text the node parses: its filters,
|
|
88
|
+
* `ownedBy` and `createdBy`, and a named schema's tag, ANDed.
|
|
89
|
+
*
|
|
90
|
+
* @throws {InvalidPredicateError} If no filter has been added, or — after `from()` — a filter
|
|
91
|
+
* does not fit the schema. A named schema's own tag filter counts as a filter.
|
|
92
|
+
*/
|
|
93
|
+
toString(): string;
|
|
94
|
+
}
|
|
95
|
+
//#endregion
|
|
96
|
+
//#region src/query/countBuilder.d.ts
|
|
97
|
+
/**
|
|
98
|
+
* Builds and runs a count: how many entities a query matches, without fetching any of them.
|
|
99
|
+
*
|
|
100
|
+
* It filters exactly as `client.select()` does — {@link from}, `where`, `ownedBy`, `createdBy` and
|
|
101
|
+
* `atBlock` are the same methods, from the same base — but has nothing to select and no pages, so
|
|
102
|
+
* {@link fetch} resolves to a `bigint`. Create one with `client.count()`.
|
|
103
|
+
*
|
|
104
|
+
* To show the total next to a page of rows, use `select(...).withCount()` instead, which counts in
|
|
105
|
+
* the same request.
|
|
106
|
+
*
|
|
107
|
+
* @typeParam TSchema - The schema named with {@link from}, if any.
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* const total = await client.count().from(Posts).ownedBy(account.address).fetch()
|
|
111
|
+
*/
|
|
112
|
+
declare class CountQueryBuilder<TSchema extends Schema | undefined = undefined> extends QueryBuilderBase<TSchema> {
|
|
113
|
+
/**
|
|
114
|
+
* Counts through a schema: `where` is checked against its indexed columns, and a named schema
|
|
115
|
+
* counts only entities tagged with its name — so it needs no other filter.
|
|
116
|
+
*
|
|
117
|
+
* Returns a new builder, carrying whatever this one already holds; this one is left as it was.
|
|
118
|
+
*
|
|
119
|
+
* @throws {SchemaDefinitionError} If `schema` was not built with `defineSchema`.
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* client.count().from(Posts) // every post
|
|
123
|
+
*/
|
|
124
|
+
from<S extends Schema>(schema: S): CountQueryBuilder<S>;
|
|
125
|
+
/**
|
|
126
|
+
* Runs the count.
|
|
127
|
+
*
|
|
128
|
+
* Counts every entity the filters match at the block, whether or not it fits the schema — what
|
|
129
|
+
* `select().from(schema)` leaves out of its pages is still counted.
|
|
130
|
+
*
|
|
131
|
+
* @throws {InvalidPredicateError} If no filter has been added, or a filter does not fit the
|
|
132
|
+
* schema.
|
|
133
|
+
* @throws {QueryError} If the node rejects the query.
|
|
134
|
+
* @throws If the node returns no count — it predates the count projection.
|
|
135
|
+
*/
|
|
136
|
+
fetch(): Promise<bigint>;
|
|
137
|
+
}
|
|
138
|
+
//#endregion
|
|
139
|
+
//#region src/query/queryResult.d.ts
|
|
140
|
+
/** Fetches the page a cursor points at. */
|
|
141
|
+
type FetchPage<TEntity, TCount extends bigint | undefined> = (cursor: string) => Promise<QueryResult<TEntity, TCount>>;
|
|
142
|
+
/**
|
|
143
|
+
* One page of query results.
|
|
144
|
+
*
|
|
145
|
+
* A page is immutable: {@link next} returns the following page rather than mutating this one, so a
|
|
146
|
+
* page that has been read stays readable.
|
|
147
|
+
*
|
|
148
|
+
* @typeParam TEntity - The shape of each row, inferred from the selection by `client.select()`.
|
|
149
|
+
* @typeParam TCount - `bigint` when the query was built with `withCount()`, and `undefined` when it
|
|
150
|
+
* was not.
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* let page = await client.select({ $key: true }).where(eq("category", "docs")).limit(100).fetch()
|
|
154
|
+
* while (page.hasNextPage()) {
|
|
155
|
+
* page = await page.next()
|
|
156
|
+
* }
|
|
157
|
+
*/
|
|
158
|
+
declare class QueryResult<TEntity = Record<string, unknown>, TCount extends bigint | undefined = bigint | undefined> {
|
|
159
|
+
/** The rows on this page — flat, as the selection lays them out. */
|
|
160
|
+
readonly entities: readonly TEntity[];
|
|
161
|
+
/**
|
|
162
|
+
* The block this page was read at.
|
|
163
|
+
*
|
|
164
|
+
* Every page of one walk reads the same block — the cursor is bound to it — so results cannot
|
|
165
|
+
* shift under a paginating reader.
|
|
166
|
+
*/
|
|
167
|
+
readonly blockNumber: bigint;
|
|
168
|
+
/** The cursor for the next page, or `undefined` when this was the last one. */
|
|
169
|
+
readonly cursor: string | undefined;
|
|
170
|
+
/**
|
|
171
|
+
* How many matching entities this page left out because they did not fit the schema — always
|
|
172
|
+
* `0` without a schema, or with `.from(schema, { onMismatch: "throw" })`.
|
|
173
|
+
*
|
|
174
|
+
* Counted per page, not per walk: `entities.length + skipped` is what the node returned for this
|
|
175
|
+
* page, so a short or empty page with a cursor is explained here rather than mistaken for the
|
|
176
|
+
* end of the results.
|
|
177
|
+
*/
|
|
178
|
+
readonly skipped: number;
|
|
179
|
+
/**
|
|
180
|
+
* How many entities the query matches in all, regardless of the page size — a `bigint` when the
|
|
181
|
+
* query was built with `withCount()`, and `undefined` otherwise. Every page of one walk reads the
|
|
182
|
+
* same block, so every page carries the same count. It includes entities left out for not fitting
|
|
183
|
+
* the schema, which {@link skipped} reports per page.
|
|
184
|
+
*/
|
|
185
|
+
readonly count: TCount;
|
|
186
|
+
private readonly fetchPage;
|
|
187
|
+
constructor(entities: readonly TEntity[], blockNumber: bigint, cursor: string | undefined, skipped: number, count: TCount, fetchPage: FetchPage<TEntity, TCount>);
|
|
188
|
+
/**
|
|
189
|
+
* Whether another page follows.
|
|
190
|
+
*
|
|
191
|
+
* The node omits the cursor once nothing remains, so this is an answer rather than the guess a
|
|
192
|
+
* short final page would be — a full last page is reported correctly.
|
|
193
|
+
*/
|
|
194
|
+
hasNextPage(): boolean;
|
|
195
|
+
/**
|
|
196
|
+
* Fetches the next page.
|
|
197
|
+
*
|
|
198
|
+
* @throws {NoMoreResultsError} If this was the last page — check {@link hasNextPage} first.
|
|
199
|
+
* @throws {QueryError} If the node rejects the request; `kind === "cursor"` means the cursor
|
|
200
|
+
* expired and the walk has to start again.
|
|
201
|
+
*/
|
|
202
|
+
next(): Promise<QueryResult<TEntity, TCount>>;
|
|
203
|
+
}
|
|
204
|
+
//#endregion
|
|
205
|
+
//#region src/query/queryBuilder.d.ts
|
|
206
|
+
/**
|
|
207
|
+
* `from(schema)`'s check that every selected key is an entity field or a column — `unknown` when
|
|
208
|
+
* it holds, and an object naming the offenders, which no schema satisfies, when it does not.
|
|
209
|
+
*/
|
|
210
|
+
type SelectionCheck<TSelection, TSchema extends Schema> = [UnknownSelection<TSelection, TSchema>] extends [never] ? unknown : {
|
|
211
|
+
"selected names that are not columns of this schema": UnknownSelection<TSelection, TSchema>;
|
|
212
|
+
};
|
|
213
|
+
/**
|
|
214
|
+
* How a query through a schema treats a matching entity that does not fit the schema — one not
|
|
215
|
+
* tagged with a named schema's name, or missing a selected required column or holding one of
|
|
216
|
+
* another type. Columns the selection leaves out are not checked.
|
|
217
|
+
*/
|
|
218
|
+
type FromOptions = {
|
|
219
|
+
/**
|
|
220
|
+
* `"skip"` (the default) leaves the entity out of the page — so a page can hold fewer rows than
|
|
221
|
+
* its limit, and a page whose every entity was skipped is empty while later pages still have rows.
|
|
222
|
+
* Each page reports how many it left out as {@link QueryResult.skipped}. Arkiv is public, so
|
|
223
|
+
* anyone can write an entity that matches a query but not the schema; skipping keeps one such
|
|
224
|
+
* entity from failing every read of the others. `"throw"` fails the fetch with a
|
|
225
|
+
* {@link SchemaMismatchError} instead.
|
|
226
|
+
*/
|
|
227
|
+
onMismatch?: "throw" | "skip" | undefined;
|
|
228
|
+
};
|
|
229
|
+
/**
|
|
230
|
+
* Builds and runs a query.
|
|
231
|
+
*
|
|
232
|
+
* The selection is fixed when the builder is created and the filter is added by chaining, so the
|
|
233
|
+
* result type is known before a single predicate is written. Create one with `client.select(...)`
|
|
234
|
+
* rather than constructing it directly — that is what infers the result shape from the selection.
|
|
235
|
+
*
|
|
236
|
+
* The query returns flat rows: the selected entity fields and attributes side by side. Naming a
|
|
237
|
+
* schema with {@link from} changes what the selection means for nothing but the selected
|
|
238
|
+
* attributes — they come back typed and checked as the schema declares — and has `where` checked
|
|
239
|
+
* against it, so that filtering on a column the schema does not index, or comparing one against the
|
|
240
|
+
* wrong type, is a compile error. A named schema also restricts the query to entities tagged with
|
|
241
|
+
* its name, and leaves that tag out of the rows' `$attributes` and `$attributeSchema`.
|
|
242
|
+
*
|
|
243
|
+
* Every filter added with {@link where}, {@link ownedBy} and {@link createdBy} must hold; use
|
|
244
|
+
* {@link or} for alternatives inside one call.
|
|
245
|
+
*
|
|
246
|
+
* @typeParam TSelection - The selection, inferred by `client.select()`.
|
|
247
|
+
* @typeParam TSchema - The schema named with {@link from}, if any.
|
|
248
|
+
*
|
|
249
|
+
* @example
|
|
250
|
+
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
251
|
+
* import { dec } from "@arkiv-network/sdk/schema"
|
|
252
|
+
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
253
|
+
* import { and, eq, gt } from "@arkiv-network/sdk/query"
|
|
254
|
+
* import { http } from "viem"
|
|
255
|
+
*
|
|
256
|
+
* const client = createPublicClient({ chain: tiramisu, transport: http() })
|
|
257
|
+
*
|
|
258
|
+
* const page = await client
|
|
259
|
+
* .select({ $key: true, author: true, title: true })
|
|
260
|
+
* .from(Posts)
|
|
261
|
+
* .where(and(eq("category", "docs"), gt("score", dec("4.0"))))
|
|
262
|
+
* .limit(20)
|
|
263
|
+
* .fetch()
|
|
264
|
+
*
|
|
265
|
+
* for (const row of page.entities) console.log(row.$key, row.title.value)
|
|
266
|
+
*/
|
|
267
|
+
declare class SelectQueryBuilder<TSelection = "*", TSchema extends Schema | undefined = undefined, TCount extends bigint | undefined = undefined> extends QueryBuilderBase<TSchema> {
|
|
268
|
+
private readonly _selection;
|
|
269
|
+
private _projection;
|
|
270
|
+
private _onMismatch;
|
|
271
|
+
private _limit;
|
|
272
|
+
private _cursor;
|
|
273
|
+
private _withCount;
|
|
274
|
+
/**
|
|
275
|
+
* @throws If the selection is not `"*"` or an object, asks for nothing, or names an attribute
|
|
276
|
+
* outside the name grammar.
|
|
277
|
+
*/
|
|
278
|
+
constructor(client: ArkivClient, selection?: SelectArg);
|
|
279
|
+
/**
|
|
280
|
+
* Runs the query through a schema. The selection keeps its meaning and the rows their shape;
|
|
281
|
+
* each selected attribute becomes a column — typed as the schema declares, and checked against
|
|
282
|
+
* it — and `where` is checked against the schema's indexed columns.
|
|
283
|
+
*
|
|
284
|
+
* A named schema also filters: only entities tagged with its name match, so a query through it
|
|
285
|
+
* sees only entities written through it, and needs no other filter. The tag is how the query finds
|
|
286
|
+
* them rather than one of their attributes, so rows leave it out of `$attributes` and
|
|
287
|
+
* `$attributeSchema`. An unnamed schema types the query without filtering it — `where` alone
|
|
288
|
+
* decides which entities match.
|
|
289
|
+
*
|
|
290
|
+
* A matching entity that does not fit — a selected required column missing or of another type,
|
|
291
|
+
* or, for a named schema, a tag that does not match — is left out of the page, or fails the fetch
|
|
292
|
+
* with a {@link SchemaMismatchError} with `{ onMismatch: "throw" }`. Columns the selection leaves
|
|
293
|
+
* out are not checked.
|
|
294
|
+
*
|
|
295
|
+
* Returns a new builder, carrying whatever this one already holds; this one is left as it was.
|
|
296
|
+
*
|
|
297
|
+
* @param schema - The schema, built with `defineSchema`.
|
|
298
|
+
* @param options - How to treat entities that do not fit. {@link FromOptions}
|
|
299
|
+
* @throws {SchemaDefinitionError} If `schema` was not built with `defineSchema`.
|
|
300
|
+
* @throws If the selection names something that is neither an entity field nor a column.
|
|
301
|
+
*
|
|
302
|
+
* @example
|
|
303
|
+
* client.select({ $key: true, title: true }).from(Posts) // rows typed { $key; title }
|
|
304
|
+
* client.select().from(Posts) // every field and every column
|
|
305
|
+
* client.select().from(Posts, { onMismatch: "throw" }) // fail on entities that do not fit
|
|
306
|
+
*/
|
|
307
|
+
from<S extends Schema>(schema: S & SelectionCheck<TSelection, S>, options?: FromOptions): SelectQueryBuilder<TSelection, S, TCount>;
|
|
308
|
+
/**
|
|
309
|
+
* Sets the page size, up to the node maximum of 100. Without it the node picks the page size.
|
|
310
|
+
*
|
|
311
|
+
* @example
|
|
312
|
+
* builder.limit(100)
|
|
313
|
+
*/
|
|
314
|
+
limit(limit: number): this;
|
|
315
|
+
/**
|
|
316
|
+
* Starts from a cursor returned by an earlier page.
|
|
317
|
+
*
|
|
318
|
+
* Pagination normally goes through {@link QueryResult.next}, which carries the cursor for you;
|
|
319
|
+
* this is for resuming a walk in a later process. A cursor is bound to the query, block and
|
|
320
|
+
* selection it came from, so it must be used with an identically-built query.
|
|
321
|
+
*/
|
|
322
|
+
cursor(cursor: string): this;
|
|
323
|
+
/**
|
|
324
|
+
* Also counts every entity the query matches, regardless of the page size. Each page then carries
|
|
325
|
+
* the total as {@link QueryResult.count}, typed `bigint`, so a paginated list can show it without
|
|
326
|
+
* a second query. To count without fetching rows, use `client.count()` instead.
|
|
327
|
+
*
|
|
328
|
+
* The node counts what the filters match. Through a schema, that includes entities the pages
|
|
329
|
+
* leave out for not fitting it, so the rows of a whole walk can add up to less than the count:
|
|
330
|
+
* the difference is the sum of every page's {@link QueryResult.skipped}.
|
|
331
|
+
*
|
|
332
|
+
* @throws If, when fetched, the node returns no count — it predates the count projection.
|
|
333
|
+
*
|
|
334
|
+
* Returns a new builder, carrying whatever this one already holds; this one is left as it was.
|
|
335
|
+
*
|
|
336
|
+
* @example
|
|
337
|
+
* const page = await builder.withCount().limit(20).fetch()
|
|
338
|
+
* page.count // every match, not just these 20
|
|
339
|
+
*/
|
|
340
|
+
withCount(): SelectQueryBuilder<TSelection, TSchema, bigint>;
|
|
341
|
+
/**
|
|
342
|
+
* Runs the query and returns the first page.
|
|
343
|
+
*
|
|
344
|
+
* @throws {InvalidPredicateError} If no filter has been added, or a filter does not fit the
|
|
345
|
+
* schema.
|
|
346
|
+
* @throws If the {@link limit} is not an integer from 1 to 100.
|
|
347
|
+
* @throws {SchemaMismatchError} If, through a schema, a matching entity does not fit the selected
|
|
348
|
+
* columns or a named schema's tag, and `from()` was given `{ onMismatch: "throw" }`.
|
|
349
|
+
* @throws {QueryError} If the node rejects the query.
|
|
350
|
+
*
|
|
351
|
+
* @example
|
|
352
|
+
* const page = await client.select({ $key: true }).where(eq("category", "docs")).fetch()
|
|
353
|
+
* page.entities // this page
|
|
354
|
+
* await page.next() // the next one
|
|
355
|
+
*/
|
|
356
|
+
fetch(): Promise<QueryResult<ResultOf<TSelection, TSchema>, TCount>>;
|
|
357
|
+
private fetchFirstPage;
|
|
358
|
+
/**
|
|
359
|
+
* Walks every page, yielding one row at a time.
|
|
360
|
+
*
|
|
361
|
+
* @example
|
|
362
|
+
* for await (const row of client.select({ $key: true }).where(eq("category", "docs"))) {
|
|
363
|
+
* console.log(row.$key)
|
|
364
|
+
* }
|
|
365
|
+
*/
|
|
366
|
+
[Symbol.asyncIterator](): AsyncGenerator<ResultOf<TSelection, TSchema>>;
|
|
367
|
+
}
|
|
368
|
+
//#endregion
|
|
369
|
+
//#region src/query/engine.d.ts
|
|
370
|
+
declare const MAX_LIMIT = 100;
|
|
371
|
+
/** One `arkiv_query` call. */
|
|
372
|
+
type QueryRequest = {
|
|
373
|
+
/** The query expression, already rendered. */
|
|
374
|
+
query: string;
|
|
375
|
+
/** What to return. */
|
|
376
|
+
select: RpcSelect;
|
|
377
|
+
/** Page size, up to {@link MAX_LIMIT}. Defaults to the node's own page size. */
|
|
378
|
+
limit?: number | undefined;
|
|
379
|
+
/** Cursor from a previous page. */
|
|
380
|
+
cursor?: string | undefined;
|
|
381
|
+
/** Block height to read at. Defaults to the head. */
|
|
382
|
+
atBlock?: bigint | undefined;
|
|
383
|
+
/** Whether to also count every entity the query matches. */
|
|
384
|
+
count?: boolean | undefined;
|
|
385
|
+
};
|
|
386
|
+
/** One page of results. */
|
|
387
|
+
type QueryResponse = {
|
|
388
|
+
entities: Entity[];
|
|
389
|
+
/** The block the page was read at — the same for every page of a paginated query. */
|
|
390
|
+
blockNumber: bigint;
|
|
391
|
+
/** The cursor for the next page, or `undefined` when this was the last one. */
|
|
392
|
+
cursor: string | undefined;
|
|
393
|
+
/** How many entities the query matches, if the request asked to count them. */
|
|
394
|
+
count: bigint | undefined;
|
|
395
|
+
};
|
|
396
|
+
/**
|
|
397
|
+
* Runs one query and decodes the page it returns.
|
|
398
|
+
*
|
|
399
|
+
* @throws If `limit` is not an integer from 1 to {@link MAX_LIMIT}.
|
|
400
|
+
* @throws {QueryError} If the node rejects the query.
|
|
401
|
+
*/
|
|
402
|
+
declare function runQuery(client: ArkivClient, request: QueryRequest): Promise<QueryResponse>;
|
|
403
|
+
//#endregion
|
|
404
|
+
//#region src/query/errors.d.ts
|
|
405
|
+
/**
|
|
406
|
+
* A predicate asked for an operator the query language does not define for that type.
|
|
407
|
+
*
|
|
408
|
+
* The operator × type matrix is part of the language, not a policy: a prefix test on a type other
|
|
409
|
+
* than `str` is a **type error** at the node (a {@link QueryError} of kind `"type"`), not
|
|
410
|
+
* an empty result. Catching it here turns a round trip and an RPC error code into a stack trace
|
|
411
|
+
* pointing at the call site.
|
|
412
|
+
*
|
|
413
|
+
* | | `=` `!=` `<` `<=` `>` `>=` `BETWEEN` | `STARTSWITH` |
|
|
414
|
+
* | --- | --- | --- |
|
|
415
|
+
* | `str` | yes | yes |
|
|
416
|
+
* | every other indexable type | yes | no |
|
|
417
|
+
*/
|
|
418
|
+
declare class UnsupportedOperatorError extends Error {
|
|
419
|
+
/** The attribute the predicate names. */
|
|
420
|
+
readonly attributeName: string;
|
|
421
|
+
/** The operator, as it would have been written in the query. */
|
|
422
|
+
readonly operator: string;
|
|
423
|
+
/** The type of the value it was applied to. */
|
|
424
|
+
readonly tag: TypeTag;
|
|
425
|
+
constructor(attributeName: string, operator: string, tag: TypeTag, hint?: string);
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* A predicate or query could not be expressed in the query language for a reason other than its
|
|
429
|
+
* operator. The main causes:
|
|
430
|
+
*
|
|
431
|
+
* - a `$` name that is not a queryable system attribute — one returned in results but never
|
|
432
|
+
* indexed (`$createdAt`, `$updatedAt`, `$creationFlags`), or none at all;
|
|
433
|
+
* - a system attribute compared against the wrong type, or tested with `exists()` / `hasType()`,
|
|
434
|
+
* which on a system attribute would be constants;
|
|
435
|
+
* - a comparison against a `bytes` value, which is never indexed;
|
|
436
|
+
* - a `BETWEEN` whose bounds have different types;
|
|
437
|
+
* - a `hasType()` tag that is not an indexable type;
|
|
438
|
+
* - a combinator with nothing to combine;
|
|
439
|
+
* - a query with no filter at all — a named schema's tag counts as one;
|
|
440
|
+
* - through `.from(schema)`, a filter that does not fit the schema: a name that is not a column, a
|
|
441
|
+
* column that is not indexed, or a value of another type than the column's.
|
|
442
|
+
*/
|
|
443
|
+
declare class InvalidPredicateError extends Error {
|
|
444
|
+
/** The attribute the predicate names, where there is one. */
|
|
445
|
+
readonly attributeName: string | undefined;
|
|
446
|
+
constructor(message: string, attributeName?: string);
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* What a node rejected a query for. Part of the frozen RPC surface, so it is safe to branch on —
|
|
450
|
+
* a `"cursor"` failure means start the query again, a `"block"` failure means the node no longer
|
|
451
|
+
* retains that height, and the rest mean the query itself needs fixing.
|
|
452
|
+
*/
|
|
453
|
+
type QueryErrorKind = /** The query string does not parse. `data` locates it: `{ position, expected, got }`. */
|
|
454
|
+
"parse"
|
|
455
|
+
/** A predicate is well-formed but ill-typed — `STARTSWITH` on a type other than `str`, `BETWEEN` bounds of different types, an unknown tag. */ | "type"
|
|
456
|
+
/** A literal failed validation — an `i32` out of range, a bad EIP-55 checksum, more than 18 decimal places. */ | "literal"
|
|
457
|
+
/** A node budget was exceeded — query length, predicate count, nesting depth, bitmap operations. */ | "limits"
|
|
458
|
+
/** The cursor expired, is malformed, or belongs to a different query, block or selection. */ | "cursor"
|
|
459
|
+
/** `atBlock` is outside the range the node retains. */ | "block";
|
|
460
|
+
/**
|
|
461
|
+
* The node rejected a query.
|
|
462
|
+
*
|
|
463
|
+
* These codes are part of the frozen `arkiv_query` surface, so {@link kind} and {@link data} are
|
|
464
|
+
* stable enough to branch on — which the underlying JSON-RPC error is not, because the codes
|
|
465
|
+
* overlap Ethereum's own EIP-1474 numbering and get wrapped accordingly on the way up.
|
|
466
|
+
*
|
|
467
|
+
* @example
|
|
468
|
+
* try {
|
|
469
|
+
* await result.next()
|
|
470
|
+
* } catch (error) {
|
|
471
|
+
* if (error instanceof QueryError && error.kind === "cursor") {
|
|
472
|
+
* // The page is gone — start the query over.
|
|
473
|
+
* }
|
|
474
|
+
* }
|
|
475
|
+
*/
|
|
476
|
+
declare class QueryError extends Error {
|
|
477
|
+
/** Which failure this is. */
|
|
478
|
+
readonly kind: QueryErrorKind;
|
|
479
|
+
/** The JSON-RPC error code. */
|
|
480
|
+
readonly code: number;
|
|
481
|
+
/** The machine-readable detail the node sent, if any — e.g. `{ position, expected, got }`. */
|
|
482
|
+
readonly data: unknown;
|
|
483
|
+
/** The query string that was rejected. */
|
|
484
|
+
readonly query: string;
|
|
485
|
+
constructor(kind: QueryErrorKind, code: number, query: string, data: unknown, detail?: string);
|
|
486
|
+
}
|
|
487
|
+
//#endregion
|
|
488
|
+
export { MAX_LIMIT as a, runQuery as c, QueryResult as d, CountQueryBuilder as f, UnsupportedOperatorError as i, FromOptions as l, QueryError as n, QueryRequest as o, QueryBuilderBase as p, QueryErrorKind as r, QueryResponse as s, InvalidPredicateError as t, SelectQueryBuilder as u };
|
|
489
|
+
//# sourceMappingURL=index-DzriOUm8.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-DzriOUm8.d.cts","names":[],"sources":["../src/query/builderBase.ts","../src/query/countBuilder.ts","../src/query/queryResult.ts","../src/query/queryBuilder.ts","../src/query/engine.ts","../src/query/errors.ts"],"sourcesContent":[],"mappings":";;;;;;AAWqB,KAGhB,gBAAA,CAAA,UAAgB,SAAA,CAAqB,UAArB,GAAA,SAA2C,UAA3C,EAAA,CAAA,EAAA,CAAA,GACnB,CADmB,CAAA,MAAA,CAAA,SAAA,KAAA,EAAA,GAAA,CACU,CADV,SAAA,SAC6B,UAD7B,EAAA,GAC4C,CAD5C,CAAA,MAAA,CAAA,GACwD,CADxD,CAAA,GAAA,KAAA;;;;KAMhB,aAL0B,CAAA,CAAA,EAAA,UAKC,MALD,CAAA,GAKW,CALX,SAAA;EAAmB,SAAA,IAAA,EAAA,KAAA,WAAA,MAAA;EAAe,SAAA,IAAA,EAAA,KAAA,WAAA,MAAA;CAAY,GASzE,CATyE,SAS/D,SAT+D,CASrD,CATqD,CAAA,GAAA,KAAA,GAWvE,CAXuE,SAW7D,SAX6D,CAWnD,CAXmD,CAAA,CAAA,M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