@arkiv-network/sdk 0.5.0-dev.2 → 0.5.0-dev.4
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/chains/index.cjs +1 -1
- package/dist/chains/index.d.cts +33 -33
- package/dist/{chains-XCO31x6G.cjs → chains-DVQiGmF6.cjs} +13 -2
- package/dist/index.cjs +36 -17
- package/dist/index.d.cts +397 -3
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +397 -3
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +32 -16
- package/dist/index.js.map +1 -1
- package/dist/{payload-D3fyOBWn.d.cts → payload-CJN8fTvX.d.cts} +1 -1
- package/dist/{payload-D3fyOBWn.d.cts.map → payload-CJN8fTvX.d.cts.map} +1 -1
- package/dist/{payload-BI2NXPDf.d.ts → payload-Da9gJMG5.d.ts} +1 -1
- package/dist/{payload-BI2NXPDf.d.ts.map → payload-Da9gJMG5.d.ts.map} +1 -1
- package/dist/{payload-eB1a8vZH.cjs → payload-vwU3Rc6P.cjs} +0 -1
- package/dist/query/index.cjs +1 -4
- package/dist/query/index.d.cts +3 -16
- package/dist/query/index.d.ts +3 -16
- package/dist/query/index.js +2 -2
- package/dist/query-C0dwQYxT.d.cts +320 -0
- package/dist/query-C0dwQYxT.d.cts.map +1 -0
- package/dist/query-DybEplzd.d.ts +320 -0
- package/dist/query-DybEplzd.d.ts.map +1 -0
- package/dist/{queryBuilder-DNUwJvf0.js → queryBuilder-BkWFLc3Y.js} +121 -5
- package/dist/queryBuilder-BkWFLc3Y.js.map +1 -0
- package/dist/{queryBuilder-KrdIUVZv.cjs → queryBuilder-BozfXlzA.cjs} +125 -5
- package/dist/queryBuilder-DfetMC5Z.d.cts +317 -0
- package/dist/queryBuilder-DfetMC5Z.d.cts.map +1 -0
- package/dist/queryBuilder-XIln1aIM.d.ts +317 -0
- package/dist/queryBuilder-XIln1aIM.d.ts.map +1 -0
- package/dist/types/index.d.cts +2 -3
- package/dist/types/index.d.ts +2 -3
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.d.cts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +1 -3
- package/src/actions/public/getEntity.ts +1 -1
- package/src/actions/public/query.ts +12 -1
- package/src/clients/decorators/arkivPublic.ts +5 -5
- package/src/clients/decorators/arkivWallet.ts +2 -2
- package/src/{query/errors.ts → errors.ts} +10 -0
- package/src/index.ts +2 -2
- package/src/query/index.ts +0 -1
- package/src/query/queryResult.test.ts +1 -1
- package/src/query/queryResult.ts +1 -1
- package/src/types/index.ts +1 -0
- package/src/types/rpcSchema.ts +1 -1
- package/src/utils/arkivTransactions.ts +31 -13
- package/src/utils/logger.ts +202 -5
- package/dist/chunk-pbleEpgJ.cjs +0 -44
- package/dist/index-B801JxcV.d.ts +0 -1003
- package/dist/index-B801JxcV.d.ts.map +0 -1
- package/dist/index-DQGx5KZ6.d.cts +0 -1003
- package/dist/index-DQGx5KZ6.d.cts.map +0 -1
- package/dist/query/index.d.cts.map +0 -1
- package/dist/query/index.d.ts.map +0 -1
- package/dist/queryBuilder-DNUwJvf0.js.map +0 -1
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import { D as ArkivClient, a as Entity } from "./query-C0dwQYxT.cjs";
|
|
2
|
+
import { Hex } from "viem";
|
|
3
|
+
|
|
4
|
+
//#region src/query/predicate.d.ts
|
|
5
|
+
type PredicateType = "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "not";
|
|
6
|
+
type PredicateContainerType = "or" | "and";
|
|
7
|
+
type Predicate = {
|
|
8
|
+
type: PredicateType;
|
|
9
|
+
key: string;
|
|
10
|
+
value: string | number;
|
|
11
|
+
} | {
|
|
12
|
+
type: PredicateContainerType;
|
|
13
|
+
predicates: Predicate[];
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Creates an OR predicate
|
|
17
|
+
* @param predicates - The predicates to combine
|
|
18
|
+
* @returns The OR predicate
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* const predicates = [eq("name", "John"), eq("age", 30)]
|
|
22
|
+
* const result = or(predicates)
|
|
23
|
+
* // result = { type: "or", predicates: [eq("name", "John"), eq("age", 30)] }
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
declare function or(predicates: Predicate[]): Predicate;
|
|
27
|
+
/**
|
|
28
|
+
* Creates an AND predicate
|
|
29
|
+
* @param predicates - The predicates to combine
|
|
30
|
+
* @returns The AND predicate
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* const predicates = [eq("name", "John"), eq("age", 30)]
|
|
34
|
+
* const result = and(predicates)
|
|
35
|
+
* // result = { type: "and", predicates: [eq("name", "John"), eq("age", 30)] }
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
declare function and(predicates: Predicate[]): Predicate;
|
|
39
|
+
/**
|
|
40
|
+
* Creates an equality predicate
|
|
41
|
+
* @param key - The key to compare
|
|
42
|
+
* @param value - The value to compare
|
|
43
|
+
* @returns The equality predicate
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* const predicate = eq("name", "John")
|
|
47
|
+
* // result = { type: "eq", key: "name", value: "John" }
|
|
48
|
+
*/
|
|
49
|
+
declare function eq(key: string, value: string | number): Predicate;
|
|
50
|
+
/**
|
|
51
|
+
* Creates a not equal predicate
|
|
52
|
+
* @param key - The key to compare
|
|
53
|
+
* @param value - The value to compare
|
|
54
|
+
* @returns The not equal predicate
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* const predicate = neq("name", "John")
|
|
58
|
+
* // result = { type: "neq", key: "name", value: "John" }
|
|
59
|
+
*/
|
|
60
|
+
declare function neq(key: string, value: string | number): Predicate;
|
|
61
|
+
/**
|
|
62
|
+
* Creates a greater than predicate
|
|
63
|
+
* @param key - The key to compare
|
|
64
|
+
* @param value - The value to compare
|
|
65
|
+
* @returns The greater than predicate
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* const predicate = gt("name", "John")
|
|
69
|
+
* // result = { type: "gt", key: "name", value: "John" }
|
|
70
|
+
*/
|
|
71
|
+
declare function gt(key: string, value: string | number): Predicate;
|
|
72
|
+
/**
|
|
73
|
+
* Creates a greater than or equal predicate
|
|
74
|
+
* @param key - The key to compare
|
|
75
|
+
* @param value - The value to compare
|
|
76
|
+
* @returns The greater than or equal predicate
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* const predicate = gte("name", "John")
|
|
80
|
+
* // result = { type: "gte", key: "name", value: "John" }
|
|
81
|
+
*/
|
|
82
|
+
declare function gte(key: string, value: string | number): Predicate;
|
|
83
|
+
/**
|
|
84
|
+
* Creates a less than predicate
|
|
85
|
+
* @param key - The key to compare
|
|
86
|
+
* @param value - The value to compare
|
|
87
|
+
* @returns The less than predicate
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* const predicate = lt("name", "John")
|
|
91
|
+
* // result = { type: "lt", key: "name", value: "John" }
|
|
92
|
+
*/
|
|
93
|
+
declare function lt(key: string, value: string | number): Predicate;
|
|
94
|
+
/**
|
|
95
|
+
* Creates a less than or equal predicate
|
|
96
|
+
* @param key - The key to compare
|
|
97
|
+
* @param value - The value to compare
|
|
98
|
+
* @returns The less than or equal predicate
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* const predicate = lte("name", "John")
|
|
102
|
+
* // result = { type: "lte", key: "name", value: "John" }
|
|
103
|
+
*/
|
|
104
|
+
declare function lte(key: string, value: string | number): Predicate;
|
|
105
|
+
/**
|
|
106
|
+
* Creates a not predicate
|
|
107
|
+
* @param key - The key to compare
|
|
108
|
+
* @returns The not predicate
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* const predicate = not("name")
|
|
112
|
+
* // result = { type: "not", key: "name", value: "" }
|
|
113
|
+
*/
|
|
114
|
+
declare function not(key: string): Predicate;
|
|
115
|
+
//#endregion
|
|
116
|
+
//#region src/query/queryResult.d.ts
|
|
117
|
+
declare class QueryResult {
|
|
118
|
+
entities: Entity[];
|
|
119
|
+
private _endOfIteration;
|
|
120
|
+
private _cursor;
|
|
121
|
+
private _limit;
|
|
122
|
+
private _validAtBlock;
|
|
123
|
+
private _queryBuilder;
|
|
124
|
+
get queryBuilder(): QueryBuilder;
|
|
125
|
+
get cursor(): string | undefined;
|
|
126
|
+
constructor(entities: Entity[], queryBuilder: QueryBuilder, cursor: string | undefined, limit: number | undefined, validAtBlock: bigint | undefined);
|
|
127
|
+
next(): Promise<void>;
|
|
128
|
+
hasNextPage(): boolean;
|
|
129
|
+
}
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region src/query/queryBuilder.d.ts
|
|
132
|
+
type OrderByAttribute = {
|
|
133
|
+
name: string;
|
|
134
|
+
type: "string" | "number";
|
|
135
|
+
order: "asc" | "desc";
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* Helper function to create an ascending order by attribute
|
|
139
|
+
* @param attributeName - The name of the attribute to order by
|
|
140
|
+
* @param attributeType - The type of the attribute to order by (string or number)
|
|
141
|
+
* @returns Input for orderBy method
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* const ascAttribute = asc("name", "string")
|
|
145
|
+
*/
|
|
146
|
+
declare function asc(attributeName: string, attributeType: "string" | "number"): OrderByAttribute;
|
|
147
|
+
/**
|
|
148
|
+
* Helper function to create a descending order by attribute
|
|
149
|
+
* @param attributeName - The name of the attribute to order by
|
|
150
|
+
* @param attributeType - The type of the attribute to order by (string or number)
|
|
151
|
+
* @returns Input for orderBy method
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* const descAttribute = desc("name", "string")
|
|
155
|
+
*/
|
|
156
|
+
declare function desc(attributeName: string, attributeType: "string" | "number"): OrderByAttribute;
|
|
157
|
+
/**
|
|
158
|
+
* QueryBuilder is a helper class to build queries to the Arkiv DBChains.
|
|
159
|
+
* It can be used to fetch entities from the Arkiv DBChains. It follows the Builder pattern allowing chaining of methods.
|
|
160
|
+
* @param client - The Arkiv client
|
|
161
|
+
* @returns The QueryBuilder instance {@link QueryBuilder}
|
|
162
|
+
*/
|
|
163
|
+
declare class QueryBuilder {
|
|
164
|
+
private _client;
|
|
165
|
+
private _ownedBy;
|
|
166
|
+
private _orderBy;
|
|
167
|
+
private _validAtBlock;
|
|
168
|
+
private _withAttributes;
|
|
169
|
+
private _withMetadata;
|
|
170
|
+
private _withPayload;
|
|
171
|
+
private _limit;
|
|
172
|
+
private _cursor;
|
|
173
|
+
private _predicates;
|
|
174
|
+
constructor(client: ArkivClient);
|
|
175
|
+
/**
|
|
176
|
+
* Sets the ownedBy filter
|
|
177
|
+
* @param ownedBy - The address of the owner
|
|
178
|
+
* @returns The QueryBuilder instance
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* const builder = new QueryBuilder(client)
|
|
182
|
+
* builder.ownedBy("0x1234567890123456789012345678901234567890")
|
|
183
|
+
*/
|
|
184
|
+
ownedBy(ownedBy: Hex): this;
|
|
185
|
+
/**
|
|
186
|
+
* Sets the orderBy for the query.
|
|
187
|
+
* It can be called multiple times to order by multiple attributes.
|
|
188
|
+
* The order of the attributes is important. The first attribute is the primary order by attribute.
|
|
189
|
+
* You can use the helper functions asc() and desc() as input for this method.
|
|
190
|
+
* @param attributeName - The name of the attribute to order by
|
|
191
|
+
* @param attributeType - The type of the attribute to order by (string or number)
|
|
192
|
+
* @param order - The order to set the order by (asc or desc)
|
|
193
|
+
* @returns The QueryBuilder instance
|
|
194
|
+
*
|
|
195
|
+
* @example
|
|
196
|
+
* const builder = client.buildQuery()
|
|
197
|
+
* builder.orderBy("name", "string", "desc")
|
|
198
|
+
* builder.orderBy(asc("name", "string"))
|
|
199
|
+
* builder.orderBy(desc("name", "string"))
|
|
200
|
+
*/
|
|
201
|
+
orderBy(attributeName: string, attributeType: "string" | "number", order?: "asc" | "desc"): this;
|
|
202
|
+
/**
|
|
203
|
+
* Sets the orderBy for the query.
|
|
204
|
+
* This method takes the OrderByAttribute object as an argument and is mainly
|
|
205
|
+
* used to use the helper functions asc() and desc() to create the OrderByAttribute instances.
|
|
206
|
+
* @param orderByAttribute - The OrderByAttribute instance to set
|
|
207
|
+
* @returns The QueryBuilder instance
|
|
208
|
+
*
|
|
209
|
+
* @example
|
|
210
|
+
* const builder = new QueryBuilder(client)
|
|
211
|
+
* builder.orderBy(asc("name", "string"))
|
|
212
|
+
* builder.orderBy(desc("name", "string"))
|
|
213
|
+
*/
|
|
214
|
+
orderBy(orderByAttribute: OrderByAttribute): this;
|
|
215
|
+
/**
|
|
216
|
+
* Sets the withAttributes flag which will return the attributes for the entities if true
|
|
217
|
+
* @param withAttributes - The boolean value to set
|
|
218
|
+
* @returns The QueryBuilder instance
|
|
219
|
+
*
|
|
220
|
+
* @example
|
|
221
|
+
* const builder = new QueryBuilder(client)
|
|
222
|
+
* builder.withAttributes(true)
|
|
223
|
+
*/
|
|
224
|
+
withAttributes(withAttributes?: boolean): this;
|
|
225
|
+
/**
|
|
226
|
+
* Sets the withMetadata flag which will return the metadata (like owner, expiredAt, etc.) for the entities if true
|
|
227
|
+
* @param withMetadata - The boolean value to set
|
|
228
|
+
* @returns The QueryBuilder instance
|
|
229
|
+
*
|
|
230
|
+
* @example
|
|
231
|
+
* const builder = new QueryBuilder(client)
|
|
232
|
+
* builder.withMetadata(true)
|
|
233
|
+
*/
|
|
234
|
+
withMetadata(withMetadata?: boolean): this;
|
|
235
|
+
/**
|
|
236
|
+
* Sets the withPayload flag which will return the payload for the entities if true
|
|
237
|
+
* @param withPayload - The boolean value to set
|
|
238
|
+
* @returns The QueryBuilder instance
|
|
239
|
+
*
|
|
240
|
+
* @example
|
|
241
|
+
* const builder = new QueryBuilder(client)
|
|
242
|
+
* builder.withPayload(true)
|
|
243
|
+
*/
|
|
244
|
+
withPayload(withPayload?: boolean): this;
|
|
245
|
+
/**
|
|
246
|
+
* Sets the limit for the query
|
|
247
|
+
* @param limit - The number of entities to return
|
|
248
|
+
* @returns The QueryBuilder instance
|
|
249
|
+
*
|
|
250
|
+
* @example
|
|
251
|
+
* const builder = new QueryBuilder(client)
|
|
252
|
+
* builder.limit(10)
|
|
253
|
+
*/
|
|
254
|
+
limit(limit: number): this;
|
|
255
|
+
/**
|
|
256
|
+
* Sets the cursor for the query - it is advances setting which rather shouldn't be used manually but it is provided from query result if limit is used (pagination).
|
|
257
|
+
* @param cursor - The cursor to set which tells to RPC Query server where to start or continue the query.
|
|
258
|
+
* @returns The QueryBuilder instance
|
|
259
|
+
*
|
|
260
|
+
* @example
|
|
261
|
+
* const builder = new QueryBuilder(client)
|
|
262
|
+
* builder.offset(10)
|
|
263
|
+
*/
|
|
264
|
+
cursor(cursor: string): this;
|
|
265
|
+
/**
|
|
266
|
+
* Sets the validAtBlock for the query which tells at which block height the state we are intested.
|
|
267
|
+
* If not set, the latest block is used.
|
|
268
|
+
* @param validAtBlock - The block number to set
|
|
269
|
+
* @returns The QueryBuilder instance
|
|
270
|
+
*
|
|
271
|
+
* @example
|
|
272
|
+
* const builder = new QueryBuilder(client)
|
|
273
|
+
* builder.validAtBlock(10000)
|
|
274
|
+
*/
|
|
275
|
+
validAtBlock(validAtBlock: bigint): this;
|
|
276
|
+
/**
|
|
277
|
+
* Sets the predicates for the query limiting the results. It can be a single predicate or an array of predicates combined with 'and'.
|
|
278
|
+
* Predicates can be nested using 'or' and 'and' predicates.
|
|
279
|
+
* @param predicates - The predicates to set
|
|
280
|
+
* @returns The QueryBuilder instance
|
|
281
|
+
*
|
|
282
|
+
* @example
|
|
283
|
+
* const builder = new QueryBuilder(client)
|
|
284
|
+
* builder.where(eq("name", "John"))
|
|
285
|
+
* builder.where([eq("name", "John"), eq("age", 30)])
|
|
286
|
+
* builder.where([eq("name", "John"), or([eq("age", 30), eq("age", 31)])])
|
|
287
|
+
* builder.where([eq("name", "John"), and([eq("age", 30), eq("age", 31)])])
|
|
288
|
+
* builder.where([eq("name", "John"), or([eq("age", 30), and([eq("age", 31), eq("age", 32)])])])
|
|
289
|
+
* builder.where([eq("name", "John"), and([eq("age", 30), or([eq("age", 31), eq("age", 32)])])])
|
|
290
|
+
* builder.where([eq("name", "John"), and([eq("age", 30), or([eq("age", 31), and([eq("age", 32), eq("age", 33)])])])])
|
|
291
|
+
*/
|
|
292
|
+
where(predicates: Predicate[] | Predicate): this;
|
|
293
|
+
/**
|
|
294
|
+
* Fetches the entities from the query. Re
|
|
295
|
+
* It will return a QueryResult instance which can be used to fetch the next and previous pages.
|
|
296
|
+
* @returns The QueryResult instance {@link QueryResult}
|
|
297
|
+
*
|
|
298
|
+
* @example
|
|
299
|
+
* const builder = new QueryBuilder(client)
|
|
300
|
+
* const result = await builder.where(eq("name", "John")).fetch()
|
|
301
|
+
* // result = { entities: [Entity, Entity, Entity], next: async () => QueryResult, previous: async () => QueryResult }
|
|
302
|
+
*/
|
|
303
|
+
fetch(): Promise<QueryResult>;
|
|
304
|
+
/**
|
|
305
|
+
* Counts the entities from the query.
|
|
306
|
+
* @returns The number of entities
|
|
307
|
+
*
|
|
308
|
+
* @example
|
|
309
|
+
* const builder = new QueryBuilder(client)
|
|
310
|
+
* const result = await builder.where(eq("name", "John")).count()
|
|
311
|
+
* // result = 10
|
|
312
|
+
*/
|
|
313
|
+
count(): Promise<number>;
|
|
314
|
+
}
|
|
315
|
+
//#endregion
|
|
316
|
+
export { or as _, QueryResult as a, PredicateType as c, gt as d, gte as f, not as g, neq as h, desc as i, and as l, lte as m, QueryBuilder as n, Predicate as o, lt as p, asc as r, PredicateContainerType as s, OrderByAttribute as t, eq as u };
|
|
317
|
+
//# sourceMappingURL=queryBuilder-DfetMC5Z.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queryBuilder-DfetMC5Z.d.cts","names":[],"sources":["../src/query/predicate.ts","../src/query/queryResult.ts","../src/query/queryBuilder.ts"],"sourcesContent":[],"mappings":";;;;KAAY,aAAA;KACA,sBAAA;KAEA,SAAA;QAEA;EALA,GAAA,EAAA,MAAA;EACA,KAAA,EAAA,MAAA,GAAA,MAAA;AAEZ,CAAA,GAAY;EAEA,IAAA,EAKA,sBALA;EAKA,UAAA,EACM,SADN,EAAA;CACM;;AAclB;AAeA;AAcA;AAcA;AAcA;AAcA;AAcA;AAcA;AAaA;;iBAhHgB,EAAA,aAAe,cAAc;;AClB7C;;;;;;;;;;ACCY,iBFgCI,GAAA,CEhCY,UAAA,EFgCI,SEhCJ,EAAA,CAAA,EFgCkB,SEhClB;AAe5B;AAiBA;AAaA;;;;;;;;AAsPa,iBFrPG,EAAA,CEqPH,GAAA,EAAA,MAAA,EAAA,KAAA,EAAA,MAAA,GAAA,MAAA,CAAA,EFrP4C,SEqP5C;;;;;;;;;;;iBFvOG,GAAA,uCAA0C;;;;;;;;;;;iBAc1C,EAAA,uCAAyC;;;;;;;;;;;iBAczC,GAAA,uCAA0C;;;;;;;;;;;iBAc1C,EAAA,uCAAyC;;;;;;;;;;;iBAczC,GAAA,uCAA0C;;;;;;;;;;iBAa1C,GAAA,eAAkB;;;cClIrB,WAAA;YACD;EDRA,QAAA,eAAa;EACb,QAAA,OAAA;EAEA,QAAA,MAAS;EAET,QAAA,aAAA;EAKA,QAAA,aAAA;EACM,IAAA,YAAA,CAAA,CAAA,ECKI,YDLJ;EAAS,IAAA,MAAA,CAAA,CAAA,EAAA,MAAA,GAAA,SAAA;EAcX,WAAE,CAAA,QAAa,ECAjB,MDA+B,EAAA,EAAA,YAAS,ECCpC,YDDoC,EAAA,MAAA,EAAA,MAAA,GAAA,SAAA,EAAA,KAAA,EAAA,MAAA,GAAA,SAAA,EAAA,YAAA,EAAA,MAAA,GAAA,SAAA;EAetC,IAAA,CAAA,CAAG,ECDP,ODCO,CAAA,IAAa,CAAA;EAchB,WAAE,CAAA,CAAA,EAAA,OAAuC;AAczD;;;AApEY,KEQA,gBAAA,GFRa;EACb,IAAA,EAAA,MAAA;EAEA,IAAA,EAAA,QAAS,GAAA,QAAA;EAET,KAAA,EAAA,KAAA,GAAA,MAAA;CAKA;;;AAeZ;AAeA;AAcA;AAcA;AAcA;AAcA;AAcA;AAcgB,iBErGA,GAAA,CFqG0C,aAAS,EAAA,MAAA,EAAA,aAAA,EAAA,QAAA,GAAA,QAAA,CAAA,EErGa,gBFqGb;AAanE;;;;AClIA;;;;;AAgCY,iBCCI,IAAA,CDDJ,aAAA,EAAA,MAAA,EAAA,aAAA,EAAA,QAAA,GAAA,QAAA,CAAA,ECCqE,gBDDrE;;;;;AC/BZ;AAeA;AAiBgB,cAaH,YAAA,CAboE;EAapE,QAAA,OAAY;EAYH,QAAA,QAAA;EAcH,QAAA,QAAA;EAkCS,QAAA,aAAA;EAuIR,QAAA,eAAA;EAAc,QAAA,aAAA;EAmBrB,QAAA,YAAA;EAAA,QAAA,MAAA;EAgCA,QAAA,OAAA;EAAA,QAAA,WAAA;sBA1OS;;;;;;;;;;mBAcH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAkCS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAuIR,cAAc;;;;;;;;;;;WAmBrB,QAAA;;;;;;;;;;WAgCA"}
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import { D as ArkivClient, a as Entity } from "./query-DybEplzd.js";
|
|
2
|
+
import { Hex } from "viem";
|
|
3
|
+
|
|
4
|
+
//#region src/query/predicate.d.ts
|
|
5
|
+
type PredicateType = "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "not";
|
|
6
|
+
type PredicateContainerType = "or" | "and";
|
|
7
|
+
type Predicate = {
|
|
8
|
+
type: PredicateType;
|
|
9
|
+
key: string;
|
|
10
|
+
value: string | number;
|
|
11
|
+
} | {
|
|
12
|
+
type: PredicateContainerType;
|
|
13
|
+
predicates: Predicate[];
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Creates an OR predicate
|
|
17
|
+
* @param predicates - The predicates to combine
|
|
18
|
+
* @returns The OR predicate
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* const predicates = [eq("name", "John"), eq("age", 30)]
|
|
22
|
+
* const result = or(predicates)
|
|
23
|
+
* // result = { type: "or", predicates: [eq("name", "John"), eq("age", 30)] }
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
declare function or(predicates: Predicate[]): Predicate;
|
|
27
|
+
/**
|
|
28
|
+
* Creates an AND predicate
|
|
29
|
+
* @param predicates - The predicates to combine
|
|
30
|
+
* @returns The AND predicate
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* const predicates = [eq("name", "John"), eq("age", 30)]
|
|
34
|
+
* const result = and(predicates)
|
|
35
|
+
* // result = { type: "and", predicates: [eq("name", "John"), eq("age", 30)] }
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
declare function and(predicates: Predicate[]): Predicate;
|
|
39
|
+
/**
|
|
40
|
+
* Creates an equality predicate
|
|
41
|
+
* @param key - The key to compare
|
|
42
|
+
* @param value - The value to compare
|
|
43
|
+
* @returns The equality predicate
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* const predicate = eq("name", "John")
|
|
47
|
+
* // result = { type: "eq", key: "name", value: "John" }
|
|
48
|
+
*/
|
|
49
|
+
declare function eq(key: string, value: string | number): Predicate;
|
|
50
|
+
/**
|
|
51
|
+
* Creates a not equal predicate
|
|
52
|
+
* @param key - The key to compare
|
|
53
|
+
* @param value - The value to compare
|
|
54
|
+
* @returns The not equal predicate
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* const predicate = neq("name", "John")
|
|
58
|
+
* // result = { type: "neq", key: "name", value: "John" }
|
|
59
|
+
*/
|
|
60
|
+
declare function neq(key: string, value: string | number): Predicate;
|
|
61
|
+
/**
|
|
62
|
+
* Creates a greater than predicate
|
|
63
|
+
* @param key - The key to compare
|
|
64
|
+
* @param value - The value to compare
|
|
65
|
+
* @returns The greater than predicate
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* const predicate = gt("name", "John")
|
|
69
|
+
* // result = { type: "gt", key: "name", value: "John" }
|
|
70
|
+
*/
|
|
71
|
+
declare function gt(key: string, value: string | number): Predicate;
|
|
72
|
+
/**
|
|
73
|
+
* Creates a greater than or equal predicate
|
|
74
|
+
* @param key - The key to compare
|
|
75
|
+
* @param value - The value to compare
|
|
76
|
+
* @returns The greater than or equal predicate
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* const predicate = gte("name", "John")
|
|
80
|
+
* // result = { type: "gte", key: "name", value: "John" }
|
|
81
|
+
*/
|
|
82
|
+
declare function gte(key: string, value: string | number): Predicate;
|
|
83
|
+
/**
|
|
84
|
+
* Creates a less than predicate
|
|
85
|
+
* @param key - The key to compare
|
|
86
|
+
* @param value - The value to compare
|
|
87
|
+
* @returns The less than predicate
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* const predicate = lt("name", "John")
|
|
91
|
+
* // result = { type: "lt", key: "name", value: "John" }
|
|
92
|
+
*/
|
|
93
|
+
declare function lt(key: string, value: string | number): Predicate;
|
|
94
|
+
/**
|
|
95
|
+
* Creates a less than or equal predicate
|
|
96
|
+
* @param key - The key to compare
|
|
97
|
+
* @param value - The value to compare
|
|
98
|
+
* @returns The less than or equal predicate
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* const predicate = lte("name", "John")
|
|
102
|
+
* // result = { type: "lte", key: "name", value: "John" }
|
|
103
|
+
*/
|
|
104
|
+
declare function lte(key: string, value: string | number): Predicate;
|
|
105
|
+
/**
|
|
106
|
+
* Creates a not predicate
|
|
107
|
+
* @param key - The key to compare
|
|
108
|
+
* @returns The not predicate
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* const predicate = not("name")
|
|
112
|
+
* // result = { type: "not", key: "name", value: "" }
|
|
113
|
+
*/
|
|
114
|
+
declare function not(key: string): Predicate;
|
|
115
|
+
//#endregion
|
|
116
|
+
//#region src/query/queryResult.d.ts
|
|
117
|
+
declare class QueryResult {
|
|
118
|
+
entities: Entity[];
|
|
119
|
+
private _endOfIteration;
|
|
120
|
+
private _cursor;
|
|
121
|
+
private _limit;
|
|
122
|
+
private _validAtBlock;
|
|
123
|
+
private _queryBuilder;
|
|
124
|
+
get queryBuilder(): QueryBuilder;
|
|
125
|
+
get cursor(): string | undefined;
|
|
126
|
+
constructor(entities: Entity[], queryBuilder: QueryBuilder, cursor: string | undefined, limit: number | undefined, validAtBlock: bigint | undefined);
|
|
127
|
+
next(): Promise<void>;
|
|
128
|
+
hasNextPage(): boolean;
|
|
129
|
+
}
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region src/query/queryBuilder.d.ts
|
|
132
|
+
type OrderByAttribute = {
|
|
133
|
+
name: string;
|
|
134
|
+
type: "string" | "number";
|
|
135
|
+
order: "asc" | "desc";
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* Helper function to create an ascending order by attribute
|
|
139
|
+
* @param attributeName - The name of the attribute to order by
|
|
140
|
+
* @param attributeType - The type of the attribute to order by (string or number)
|
|
141
|
+
* @returns Input for orderBy method
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* const ascAttribute = asc("name", "string")
|
|
145
|
+
*/
|
|
146
|
+
declare function asc(attributeName: string, attributeType: "string" | "number"): OrderByAttribute;
|
|
147
|
+
/**
|
|
148
|
+
* Helper function to create a descending order by attribute
|
|
149
|
+
* @param attributeName - The name of the attribute to order by
|
|
150
|
+
* @param attributeType - The type of the attribute to order by (string or number)
|
|
151
|
+
* @returns Input for orderBy method
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* const descAttribute = desc("name", "string")
|
|
155
|
+
*/
|
|
156
|
+
declare function desc(attributeName: string, attributeType: "string" | "number"): OrderByAttribute;
|
|
157
|
+
/**
|
|
158
|
+
* QueryBuilder is a helper class to build queries to the Arkiv DBChains.
|
|
159
|
+
* It can be used to fetch entities from the Arkiv DBChains. It follows the Builder pattern allowing chaining of methods.
|
|
160
|
+
* @param client - The Arkiv client
|
|
161
|
+
* @returns The QueryBuilder instance {@link QueryBuilder}
|
|
162
|
+
*/
|
|
163
|
+
declare class QueryBuilder {
|
|
164
|
+
private _client;
|
|
165
|
+
private _ownedBy;
|
|
166
|
+
private _orderBy;
|
|
167
|
+
private _validAtBlock;
|
|
168
|
+
private _withAttributes;
|
|
169
|
+
private _withMetadata;
|
|
170
|
+
private _withPayload;
|
|
171
|
+
private _limit;
|
|
172
|
+
private _cursor;
|
|
173
|
+
private _predicates;
|
|
174
|
+
constructor(client: ArkivClient);
|
|
175
|
+
/**
|
|
176
|
+
* Sets the ownedBy filter
|
|
177
|
+
* @param ownedBy - The address of the owner
|
|
178
|
+
* @returns The QueryBuilder instance
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* const builder = new QueryBuilder(client)
|
|
182
|
+
* builder.ownedBy("0x1234567890123456789012345678901234567890")
|
|
183
|
+
*/
|
|
184
|
+
ownedBy(ownedBy: Hex): this;
|
|
185
|
+
/**
|
|
186
|
+
* Sets the orderBy for the query.
|
|
187
|
+
* It can be called multiple times to order by multiple attributes.
|
|
188
|
+
* The order of the attributes is important. The first attribute is the primary order by attribute.
|
|
189
|
+
* You can use the helper functions asc() and desc() as input for this method.
|
|
190
|
+
* @param attributeName - The name of the attribute to order by
|
|
191
|
+
* @param attributeType - The type of the attribute to order by (string or number)
|
|
192
|
+
* @param order - The order to set the order by (asc or desc)
|
|
193
|
+
* @returns The QueryBuilder instance
|
|
194
|
+
*
|
|
195
|
+
* @example
|
|
196
|
+
* const builder = client.buildQuery()
|
|
197
|
+
* builder.orderBy("name", "string", "desc")
|
|
198
|
+
* builder.orderBy(asc("name", "string"))
|
|
199
|
+
* builder.orderBy(desc("name", "string"))
|
|
200
|
+
*/
|
|
201
|
+
orderBy(attributeName: string, attributeType: "string" | "number", order?: "asc" | "desc"): this;
|
|
202
|
+
/**
|
|
203
|
+
* Sets the orderBy for the query.
|
|
204
|
+
* This method takes the OrderByAttribute object as an argument and is mainly
|
|
205
|
+
* used to use the helper functions asc() and desc() to create the OrderByAttribute instances.
|
|
206
|
+
* @param orderByAttribute - The OrderByAttribute instance to set
|
|
207
|
+
* @returns The QueryBuilder instance
|
|
208
|
+
*
|
|
209
|
+
* @example
|
|
210
|
+
* const builder = new QueryBuilder(client)
|
|
211
|
+
* builder.orderBy(asc("name", "string"))
|
|
212
|
+
* builder.orderBy(desc("name", "string"))
|
|
213
|
+
*/
|
|
214
|
+
orderBy(orderByAttribute: OrderByAttribute): this;
|
|
215
|
+
/**
|
|
216
|
+
* Sets the withAttributes flag which will return the attributes for the entities if true
|
|
217
|
+
* @param withAttributes - The boolean value to set
|
|
218
|
+
* @returns The QueryBuilder instance
|
|
219
|
+
*
|
|
220
|
+
* @example
|
|
221
|
+
* const builder = new QueryBuilder(client)
|
|
222
|
+
* builder.withAttributes(true)
|
|
223
|
+
*/
|
|
224
|
+
withAttributes(withAttributes?: boolean): this;
|
|
225
|
+
/**
|
|
226
|
+
* Sets the withMetadata flag which will return the metadata (like owner, expiredAt, etc.) for the entities if true
|
|
227
|
+
* @param withMetadata - The boolean value to set
|
|
228
|
+
* @returns The QueryBuilder instance
|
|
229
|
+
*
|
|
230
|
+
* @example
|
|
231
|
+
* const builder = new QueryBuilder(client)
|
|
232
|
+
* builder.withMetadata(true)
|
|
233
|
+
*/
|
|
234
|
+
withMetadata(withMetadata?: boolean): this;
|
|
235
|
+
/**
|
|
236
|
+
* Sets the withPayload flag which will return the payload for the entities if true
|
|
237
|
+
* @param withPayload - The boolean value to set
|
|
238
|
+
* @returns The QueryBuilder instance
|
|
239
|
+
*
|
|
240
|
+
* @example
|
|
241
|
+
* const builder = new QueryBuilder(client)
|
|
242
|
+
* builder.withPayload(true)
|
|
243
|
+
*/
|
|
244
|
+
withPayload(withPayload?: boolean): this;
|
|
245
|
+
/**
|
|
246
|
+
* Sets the limit for the query
|
|
247
|
+
* @param limit - The number of entities to return
|
|
248
|
+
* @returns The QueryBuilder instance
|
|
249
|
+
*
|
|
250
|
+
* @example
|
|
251
|
+
* const builder = new QueryBuilder(client)
|
|
252
|
+
* builder.limit(10)
|
|
253
|
+
*/
|
|
254
|
+
limit(limit: number): this;
|
|
255
|
+
/**
|
|
256
|
+
* Sets the cursor for the query - it is advances setting which rather shouldn't be used manually but it is provided from query result if limit is used (pagination).
|
|
257
|
+
* @param cursor - The cursor to set which tells to RPC Query server where to start or continue the query.
|
|
258
|
+
* @returns The QueryBuilder instance
|
|
259
|
+
*
|
|
260
|
+
* @example
|
|
261
|
+
* const builder = new QueryBuilder(client)
|
|
262
|
+
* builder.offset(10)
|
|
263
|
+
*/
|
|
264
|
+
cursor(cursor: string): this;
|
|
265
|
+
/**
|
|
266
|
+
* Sets the validAtBlock for the query which tells at which block height the state we are intested.
|
|
267
|
+
* If not set, the latest block is used.
|
|
268
|
+
* @param validAtBlock - The block number to set
|
|
269
|
+
* @returns The QueryBuilder instance
|
|
270
|
+
*
|
|
271
|
+
* @example
|
|
272
|
+
* const builder = new QueryBuilder(client)
|
|
273
|
+
* builder.validAtBlock(10000)
|
|
274
|
+
*/
|
|
275
|
+
validAtBlock(validAtBlock: bigint): this;
|
|
276
|
+
/**
|
|
277
|
+
* Sets the predicates for the query limiting the results. It can be a single predicate or an array of predicates combined with 'and'.
|
|
278
|
+
* Predicates can be nested using 'or' and 'and' predicates.
|
|
279
|
+
* @param predicates - The predicates to set
|
|
280
|
+
* @returns The QueryBuilder instance
|
|
281
|
+
*
|
|
282
|
+
* @example
|
|
283
|
+
* const builder = new QueryBuilder(client)
|
|
284
|
+
* builder.where(eq("name", "John"))
|
|
285
|
+
* builder.where([eq("name", "John"), eq("age", 30)])
|
|
286
|
+
* builder.where([eq("name", "John"), or([eq("age", 30), eq("age", 31)])])
|
|
287
|
+
* builder.where([eq("name", "John"), and([eq("age", 30), eq("age", 31)])])
|
|
288
|
+
* builder.where([eq("name", "John"), or([eq("age", 30), and([eq("age", 31), eq("age", 32)])])])
|
|
289
|
+
* builder.where([eq("name", "John"), and([eq("age", 30), or([eq("age", 31), eq("age", 32)])])])
|
|
290
|
+
* builder.where([eq("name", "John"), and([eq("age", 30), or([eq("age", 31), and([eq("age", 32), eq("age", 33)])])])])
|
|
291
|
+
*/
|
|
292
|
+
where(predicates: Predicate[] | Predicate): this;
|
|
293
|
+
/**
|
|
294
|
+
* Fetches the entities from the query. Re
|
|
295
|
+
* It will return a QueryResult instance which can be used to fetch the next and previous pages.
|
|
296
|
+
* @returns The QueryResult instance {@link QueryResult}
|
|
297
|
+
*
|
|
298
|
+
* @example
|
|
299
|
+
* const builder = new QueryBuilder(client)
|
|
300
|
+
* const result = await builder.where(eq("name", "John")).fetch()
|
|
301
|
+
* // result = { entities: [Entity, Entity, Entity], next: async () => QueryResult, previous: async () => QueryResult }
|
|
302
|
+
*/
|
|
303
|
+
fetch(): Promise<QueryResult>;
|
|
304
|
+
/**
|
|
305
|
+
* Counts the entities from the query.
|
|
306
|
+
* @returns The number of entities
|
|
307
|
+
*
|
|
308
|
+
* @example
|
|
309
|
+
* const builder = new QueryBuilder(client)
|
|
310
|
+
* const result = await builder.where(eq("name", "John")).count()
|
|
311
|
+
* // result = 10
|
|
312
|
+
*/
|
|
313
|
+
count(): Promise<number>;
|
|
314
|
+
}
|
|
315
|
+
//#endregion
|
|
316
|
+
export { or as _, QueryResult as a, PredicateType as c, gt as d, gte as f, not as g, neq as h, desc as i, and as l, lte as m, QueryBuilder as n, Predicate as o, lt as p, asc as r, PredicateContainerType as s, OrderByAttribute as t, eq as u };
|
|
317
|
+
//# sourceMappingURL=queryBuilder-XIln1aIM.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queryBuilder-XIln1aIM.d.ts","names":[],"sources":["../src/query/predicate.ts","../src/query/queryResult.ts","../src/query/queryBuilder.ts"],"sourcesContent":[],"mappings":";;;;KAAY,aAAA;KACA,sBAAA;KAEA,SAAA;QAEA;EALA,GAAA,EAAA,MAAA;EACA,KAAA,EAAA,MAAA,GAAA,MAAA;AAEZ,CAAA,GAAY;EAEA,IAAA,EAKA,sBALA;EAKA,UAAA,EACM,SADN,EAAA;CACM;;AAclB;AAeA;AAcA;AAcA;AAcA;AAcA;AAcA;AAcA;AAaA;;iBAhHgB,EAAA,aAAe,cAAc;;AClB7C;;;;;;;;;;ACCY,iBFgCI,GAAA,CEhCY,UAAA,EFgCI,SEhCJ,EAAA,CAAA,EFgCkB,SEhClB;AAe5B;AAiBA;AAaA;;;;;;;;AAsPa,iBFrPG,EAAA,CEqPH,GAAA,EAAA,MAAA,EAAA,KAAA,EAAA,MAAA,GAAA,MAAA,CAAA,EFrP4C,SEqP5C;;;;;;;;;;;iBFvOG,GAAA,uCAA0C;;;;;;;;;;;iBAc1C,EAAA,uCAAyC;;;;;;;;;;;iBAczC,GAAA,uCAA0C;;;;;;;;;;;iBAc1C,EAAA,uCAAyC;;;;;;;;;;;iBAczC,GAAA,uCAA0C;;;;;;;;;;iBAa1C,GAAA,eAAkB;;;cClIrB,WAAA;YACD;EDRA,QAAA,eAAa;EACb,QAAA,OAAA;EAEA,QAAA,MAAS;EAET,QAAA,aAAA;EAKA,QAAA,aAAA;EACM,IAAA,YAAA,CAAA,CAAA,ECKI,YDLJ;EAAS,IAAA,MAAA,CAAA,CAAA,EAAA,MAAA,GAAA,SAAA;EAcX,WAAE,CAAA,QAAa,ECAjB,MDA+B,EAAA,EAAA,YAAS,ECCpC,YDDoC,EAAA,MAAA,EAAA,MAAA,GAAA,SAAA,EAAA,KAAA,EAAA,MAAA,GAAA,SAAA,EAAA,YAAA,EAAA,MAAA,GAAA,SAAA;EAetC,IAAA,CAAA,CAAG,ECDP,ODCO,CAAA,IAAa,CAAA;EAchB,WAAE,CAAA,CAAA,EAAA,OAAuC;AAczD;;;AApEY,KEQA,gBAAA,GFRa;EACb,IAAA,EAAA,MAAA;EAEA,IAAA,EAAA,QAAS,GAAA,QAAA;EAET,KAAA,EAAA,KAAA,GAAA,MAAA;CAKA;;;AAeZ;AAeA;AAcA;AAcA;AAcA;AAcA;AAcA;AAcgB,iBErGA,GAAA,CFqG0C,aAAS,EAAA,MAAA,EAAA,aAAA,EAAA,QAAA,GAAA,QAAA,CAAA,EErGa,gBFqGb;AAanE;;;;AClIA;;;;;AAgCY,iBCCI,IAAA,CDDJ,aAAA,EAAA,MAAA,EAAA,aAAA,EAAA,QAAA,GAAA,QAAA,CAAA,ECCqE,gBDDrE;;;;;AC/BZ;AAeA;AAiBgB,cAaH,YAAA,CAboE;EAapE,QAAA,OAAY;EAYH,QAAA,QAAA;EAcH,QAAA,QAAA;EAkCS,QAAA,aAAA;EAuIR,QAAA,eAAA;EAAc,QAAA,aAAA;EAmBrB,QAAA,YAAA;EAAA,QAAA,MAAA;EAgCA,QAAA,OAAA;EAAA,QAAA,WAAA;sBA1OS;;;;;;;;;;mBAcH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAkCS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAuIR,cAAc;;;;;;;;;;;WAmBrB,QAAA;;;;;;;;;;WAgCA"}
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export { ArkivRpcSchema, Attribute, ChangeOwnershipParameters, ChangeOwnershipReturnType, CreateEntityParameters, CreateEntityReturnType, DeleteEntityParameters, DeleteEntityReturnType, Entity, ExtendEntityParameters, ExtendEntityReturnType, GetBlockTimingReturnType, MimeType, MutateEntitiesParameters, MutateEntitiesReturnType, OnEntityCreatedEvent, OnEntityDeletedEvent, OnEntityExpiredEvent, OnEntityExpiresInExtendedEvent, OnEntityOwnerChangedEvent, OnEntityUpdatedEvent, QueryOptions, QueryOptionsIncludeData, QueryOptionsOrderBy, RpcEntity, RpcIncludeData, RpcOrderByAttribute, RpcQueryOptions, TxParams, UpdateEntityParameters, UpdateEntityReturnType };
|
|
1
|
+
import { A as RpcIncludeData, C as CreateEntityReturnType, E as GetBlockTimingReturnType, M as RpcQueryOptions, N as MimeType, O as ArkivRpcSchema, S as CreateEntityParameters, T as ChangeOwnershipReturnType, _ as UpdateEntityReturnType, a as Entity, b as DeleteEntityParameters, c as OnEntityDeletedEvent, d as OnEntityOwnerChangedEvent, f as OnEntityUpdatedEvent, g as UpdateEntityParameters, h as MutateEntitiesReturnType, i as QueryReturnType, j as RpcOrderByAttribute, k as RpcEntity, l as OnEntityExpiredEvent, m as MutateEntitiesParameters, n as QueryOptionsIncludeData, o as TxParams, p as Attribute, r as QueryOptionsOrderBy, s as OnEntityCreatedEvent, t as QueryOptions, u as OnEntityExpiresInExtendedEvent, v as ExtendEntityParameters, w as ChangeOwnershipParameters, x as DeleteEntityReturnType, y as ExtendEntityReturnType } from "../query-C0dwQYxT.cjs";
|
|
2
|
+
export { ArkivRpcSchema, Attribute, ChangeOwnershipParameters, ChangeOwnershipReturnType, CreateEntityParameters, CreateEntityReturnType, DeleteEntityParameters, DeleteEntityReturnType, Entity, ExtendEntityParameters, ExtendEntityReturnType, GetBlockTimingReturnType, MimeType, MutateEntitiesParameters, MutateEntitiesReturnType, OnEntityCreatedEvent, OnEntityDeletedEvent, OnEntityExpiredEvent, OnEntityExpiresInExtendedEvent, OnEntityOwnerChangedEvent, OnEntityUpdatedEvent, QueryOptions, QueryOptionsIncludeData, QueryOptionsOrderBy, QueryReturnType, RpcEntity, RpcIncludeData, RpcOrderByAttribute, RpcQueryOptions, TxParams, UpdateEntityParameters, UpdateEntityReturnType };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export { ArkivRpcSchema, Attribute, ChangeOwnershipParameters, ChangeOwnershipReturnType, CreateEntityParameters, CreateEntityReturnType, DeleteEntityParameters, DeleteEntityReturnType, Entity, ExtendEntityParameters, ExtendEntityReturnType, GetBlockTimingReturnType, MimeType, MutateEntitiesParameters, MutateEntitiesReturnType, OnEntityCreatedEvent, OnEntityDeletedEvent, OnEntityExpiredEvent, OnEntityExpiresInExtendedEvent, OnEntityOwnerChangedEvent, OnEntityUpdatedEvent, QueryOptions, QueryOptionsIncludeData, QueryOptionsOrderBy, RpcEntity, RpcIncludeData, RpcOrderByAttribute, RpcQueryOptions, TxParams, UpdateEntityParameters, UpdateEntityReturnType };
|
|
1
|
+
import { A as RpcIncludeData, C as CreateEntityReturnType, E as GetBlockTimingReturnType, M as RpcQueryOptions, N as MimeType, O as ArkivRpcSchema, S as CreateEntityParameters, T as ChangeOwnershipReturnType, _ as UpdateEntityReturnType, a as Entity, b as DeleteEntityParameters, c as OnEntityDeletedEvent, d as OnEntityOwnerChangedEvent, f as OnEntityUpdatedEvent, g as UpdateEntityParameters, h as MutateEntitiesReturnType, i as QueryReturnType, j as RpcOrderByAttribute, k as RpcEntity, l as OnEntityExpiredEvent, m as MutateEntitiesParameters, n as QueryOptionsIncludeData, o as TxParams, p as Attribute, r as QueryOptionsOrderBy, s as OnEntityCreatedEvent, t as QueryOptions, u as OnEntityExpiresInExtendedEvent, v as ExtendEntityParameters, w as ChangeOwnershipParameters, x as DeleteEntityReturnType, y as ExtendEntityReturnType } from "../query-DybEplzd.js";
|
|
2
|
+
export { ArkivRpcSchema, Attribute, ChangeOwnershipParameters, ChangeOwnershipReturnType, CreateEntityParameters, CreateEntityReturnType, DeleteEntityParameters, DeleteEntityReturnType, Entity, ExtendEntityParameters, ExtendEntityReturnType, GetBlockTimingReturnType, MimeType, MutateEntitiesParameters, MutateEntitiesReturnType, OnEntityCreatedEvent, OnEntityDeletedEvent, OnEntityExpiredEvent, OnEntityExpiresInExtendedEvent, OnEntityOwnerChangedEvent, OnEntityUpdatedEvent, QueryOptions, QueryOptionsIncludeData, QueryOptionsOrderBy, QueryReturnType, RpcEntity, RpcIncludeData, RpcOrderByAttribute, RpcQueryOptions, TxParams, UpdateEntityParameters, UpdateEntityReturnType };
|
package/dist/utils/index.cjs
CHANGED