@xyo-network/payload-mongodb 5.3.30 → 5.4.1
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 +0 -400
- package/package.json +10 -12
package/README.md
CHANGED
|
@@ -38,406 +38,6 @@ bun add {{name}}
|
|
|
38
38
|
|
|
39
39
|
See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
|
|
40
40
|
|
|
41
|
-
## Reference
|
|
42
|
-
|
|
43
|
-
### packages
|
|
44
|
-
|
|
45
|
-
### modules
|
|
46
|
-
|
|
47
|
-
### packages
|
|
48
|
-
|
|
49
|
-
### module
|
|
50
|
-
|
|
51
|
-
### packages
|
|
52
|
-
|
|
53
|
-
### mongodb
|
|
54
|
-
|
|
55
|
-
### packages
|
|
56
|
-
|
|
57
|
-
### payload
|
|
58
|
-
|
|
59
|
-
### .temp-typedoc
|
|
60
|
-
|
|
61
|
-
### functions
|
|
62
|
-
|
|
63
|
-
### <a id="boundWitnessFromDbRepresentation"></a>boundWitnessFromDbRepresentation
|
|
64
|
-
|
|
65
|
-
[**@xyo-network/payload-mongodb**](#../README)
|
|
66
|
-
|
|
67
|
-
***
|
|
68
|
-
|
|
69
|
-
```ts
|
|
70
|
-
function boundWitnessFromDbRepresentation<T>(value): WithStorageMeta<T>;
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## Type Parameters
|
|
74
|
-
|
|
75
|
-
### T
|
|
76
|
-
|
|
77
|
-
`T` *extends* `object` = \{
|
|
78
|
-
`schema`: `"network.xyo.boundwitness"` & `object`;
|
|
79
|
-
`addresses`: `Lowercase`\<`string`\> & `object` & `object`[];
|
|
80
|
-
`payload_hashes`: `BrandedHash`[];
|
|
81
|
-
`payload_schemas`: `BrandedSchema`\<`string`\>[];
|
|
82
|
-
`previous_hashes`: (`BrandedHash` \| `null`)[];
|
|
83
|
-
`$destination?`: `Lowercase`\<`string`\> & `object` & `object`;
|
|
84
|
-
`$sourceQuery?`: `BrandedHash`;
|
|
85
|
-
`$signatures`: (`BrandedHex` \| `null`)[];
|
|
86
|
-
\}
|
|
87
|
-
|
|
88
|
-
## Parameters
|
|
89
|
-
|
|
90
|
-
### value
|
|
91
|
-
|
|
92
|
-
[`BoundWitnessWithMongoMeta`](#../type-aliases/BoundWitnessWithMongoMeta)\<`T`\>
|
|
93
|
-
|
|
94
|
-
## Returns
|
|
95
|
-
|
|
96
|
-
`WithStorageMeta`\<`T`\>
|
|
97
|
-
|
|
98
|
-
### <a id="boundWitnessToDbRepresentation"></a>boundWitnessToDbRepresentation
|
|
99
|
-
|
|
100
|
-
[**@xyo-network/payload-mongodb**](#../README)
|
|
101
|
-
|
|
102
|
-
***
|
|
103
|
-
|
|
104
|
-
```ts
|
|
105
|
-
function boundWitnessToDbRepresentation<T>(bw): BoundWitnessMongoMeta<WithStorageMeta<T>>;
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
## Type Parameters
|
|
109
|
-
|
|
110
|
-
### T
|
|
111
|
-
|
|
112
|
-
`T` *extends* `object`
|
|
113
|
-
|
|
114
|
-
## Parameters
|
|
115
|
-
|
|
116
|
-
### bw
|
|
117
|
-
|
|
118
|
-
`WithStorageMeta`\<`T`\>
|
|
119
|
-
|
|
120
|
-
## Returns
|
|
121
|
-
|
|
122
|
-
[`BoundWitnessMongoMeta`](#../type-aliases/BoundWitnessMongoMeta)\<`WithStorageMeta`\<`T`\>\>
|
|
123
|
-
|
|
124
|
-
### <a id="fromDbRepresentation"></a>fromDbRepresentation
|
|
125
|
-
|
|
126
|
-
[**@xyo-network/payload-mongodb**](#../README)
|
|
127
|
-
|
|
128
|
-
***
|
|
129
|
-
|
|
130
|
-
```ts
|
|
131
|
-
function fromDbRepresentation<T>(value): WithStorageMeta<T>;
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
## Type Parameters
|
|
135
|
-
|
|
136
|
-
### T
|
|
137
|
-
|
|
138
|
-
`T` *extends* `Payload` = `Payload`
|
|
139
|
-
|
|
140
|
-
## Parameters
|
|
141
|
-
|
|
142
|
-
### value
|
|
143
|
-
|
|
144
|
-
[`PayloadWithMongoMeta`](#../type-aliases/PayloadWithMongoMeta)\<`T`\>
|
|
145
|
-
|
|
146
|
-
## Returns
|
|
147
|
-
|
|
148
|
-
`WithStorageMeta`\<`T`\>
|
|
149
|
-
|
|
150
|
-
### <a id="payloadFromDbRepresentation"></a>payloadFromDbRepresentation
|
|
151
|
-
|
|
152
|
-
[**@xyo-network/payload-mongodb**](#../README)
|
|
153
|
-
|
|
154
|
-
***
|
|
155
|
-
|
|
156
|
-
```ts
|
|
157
|
-
function payloadFromDbRepresentation<T>(value): WithStorageMeta<T>;
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
## Type Parameters
|
|
161
|
-
|
|
162
|
-
### T
|
|
163
|
-
|
|
164
|
-
`T` *extends* `Payload` = \{
|
|
165
|
-
\[`key`: `string`\]: `unknown`;
|
|
166
|
-
`schema`: `BrandedSchema`\<`string`\>;
|
|
167
|
-
\}
|
|
168
|
-
|
|
169
|
-
## Parameters
|
|
170
|
-
|
|
171
|
-
### value
|
|
172
|
-
|
|
173
|
-
[`PayloadWithMongoMeta`](#../type-aliases/PayloadWithMongoMeta)\<`T`\>
|
|
174
|
-
|
|
175
|
-
## Returns
|
|
176
|
-
|
|
177
|
-
`WithStorageMeta`\<`T`\>
|
|
178
|
-
|
|
179
|
-
### <a id="payloadToDbRepresentation"></a>payloadToDbRepresentation
|
|
180
|
-
|
|
181
|
-
[**@xyo-network/payload-mongodb**](#../README)
|
|
182
|
-
|
|
183
|
-
***
|
|
184
|
-
|
|
185
|
-
```ts
|
|
186
|
-
function payloadToDbRepresentation<T>(payload): PayloadWithMongoMeta<WithStorageMeta<T>>;
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
## Type Parameters
|
|
190
|
-
|
|
191
|
-
### T
|
|
192
|
-
|
|
193
|
-
`T` *extends* `Payload`
|
|
194
|
-
|
|
195
|
-
## Parameters
|
|
196
|
-
|
|
197
|
-
### payload
|
|
198
|
-
|
|
199
|
-
`WithStorageMeta`\<`T`\>
|
|
200
|
-
|
|
201
|
-
## Returns
|
|
202
|
-
|
|
203
|
-
[`PayloadWithMongoMeta`](#../type-aliases/PayloadWithMongoMeta)\<`WithStorageMeta`\<`T`\>\>
|
|
204
|
-
|
|
205
|
-
### <a id="toDbRepresentation"></a>toDbRepresentation
|
|
206
|
-
|
|
207
|
-
[**@xyo-network/payload-mongodb**](#../README)
|
|
208
|
-
|
|
209
|
-
***
|
|
210
|
-
|
|
211
|
-
```ts
|
|
212
|
-
function toDbRepresentation<T>(value): PayloadWithMongoMeta<WithStorageMeta<T>>;
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
## Type Parameters
|
|
216
|
-
|
|
217
|
-
### T
|
|
218
|
-
|
|
219
|
-
`T` *extends*
|
|
220
|
-
\| `Payload`
|
|
221
|
-
\| \{
|
|
222
|
-
`schema`: `"network.xyo.boundwitness"` & `object`;
|
|
223
|
-
`addresses`: `Lowercase`\<`string`\> & `object` & `object`[];
|
|
224
|
-
`payload_hashes`: `BrandedHash`[];
|
|
225
|
-
`payload_schemas`: `BrandedSchema`\<`string`\>[];
|
|
226
|
-
`previous_hashes`: (`BrandedHash` \| `null`)[];
|
|
227
|
-
`$destination?`: `Lowercase`\<`string`\> & `object` & `object`;
|
|
228
|
-
`$sourceQuery?`: `BrandedHash`;
|
|
229
|
-
`$signatures`: (`BrandedHex` \| `null`)[];
|
|
230
|
-
\}
|
|
231
|
-
|
|
232
|
-
## Parameters
|
|
233
|
-
|
|
234
|
-
### value
|
|
235
|
-
|
|
236
|
-
`WithStorageMeta`\<`T`\>
|
|
237
|
-
|
|
238
|
-
## Returns
|
|
239
|
-
|
|
240
|
-
[`PayloadWithMongoMeta`](#../type-aliases/PayloadWithMongoMeta)\<`WithStorageMeta`\<`T`\>\>
|
|
241
|
-
|
|
242
|
-
### interfaces
|
|
243
|
-
|
|
244
|
-
### <a id="PayloadMongoMeta"></a>PayloadMongoMeta
|
|
245
|
-
|
|
246
|
-
[**@xyo-network/payload-mongodb**](#../README)
|
|
247
|
-
|
|
248
|
-
***
|
|
249
|
-
|
|
250
|
-
## Extends
|
|
251
|
-
|
|
252
|
-
- `StorageMeta`
|
|
253
|
-
|
|
254
|
-
## Properties
|
|
255
|
-
|
|
256
|
-
### \_hash
|
|
257
|
-
|
|
258
|
-
```ts
|
|
259
|
-
_hash: BrandedHash;
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
### Inherited from
|
|
263
|
-
|
|
264
|
-
```ts
|
|
265
|
-
StorageMeta._hash
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
***
|
|
269
|
-
|
|
270
|
-
### \_dataHash
|
|
271
|
-
|
|
272
|
-
```ts
|
|
273
|
-
_dataHash: BrandedHash;
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
### Inherited from
|
|
277
|
-
|
|
278
|
-
```ts
|
|
279
|
-
StorageMeta._dataHash
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
***
|
|
283
|
-
|
|
284
|
-
### \_sequence
|
|
285
|
-
|
|
286
|
-
```ts
|
|
287
|
-
_sequence: LocalSequence | QualifiedSequence;
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
### Inherited from
|
|
291
|
-
|
|
292
|
-
```ts
|
|
293
|
-
StorageMeta._sequence
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
***
|
|
297
|
-
|
|
298
|
-
### \_\_archive?
|
|
299
|
-
|
|
300
|
-
```ts
|
|
301
|
-
optional __archive?: string;
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
***
|
|
305
|
-
|
|
306
|
-
### \_\_client?
|
|
307
|
-
|
|
308
|
-
```ts
|
|
309
|
-
optional __client?: string;
|
|
310
|
-
```
|
|
311
|
-
|
|
312
|
-
***
|
|
313
|
-
|
|
314
|
-
### \_\_observeDuration?
|
|
315
|
-
|
|
316
|
-
```ts
|
|
317
|
-
optional __observeDuration?: number;
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
***
|
|
321
|
-
|
|
322
|
-
### \_\_schemaValid?
|
|
323
|
-
|
|
324
|
-
```ts
|
|
325
|
-
optional __schemaValid?: boolean;
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
***
|
|
329
|
-
|
|
330
|
-
### \_\_sources?
|
|
331
|
-
|
|
332
|
-
```ts
|
|
333
|
-
optional __sources?: Payload[];
|
|
334
|
-
```
|
|
335
|
-
|
|
336
|
-
***
|
|
337
|
-
|
|
338
|
-
### \_\_timestamp
|
|
339
|
-
|
|
340
|
-
```ts
|
|
341
|
-
__timestamp: number;
|
|
342
|
-
```
|
|
343
|
-
|
|
344
|
-
***
|
|
345
|
-
|
|
346
|
-
### \_\_user\_agent?
|
|
347
|
-
|
|
348
|
-
```ts
|
|
349
|
-
optional __user_agent?: string;
|
|
350
|
-
```
|
|
351
|
-
|
|
352
|
-
### type-aliases
|
|
353
|
-
|
|
354
|
-
### <a id="BoundWitnessMongoMeta"></a>BoundWitnessMongoMeta
|
|
355
|
-
|
|
356
|
-
[**@xyo-network/payload-mongodb**](#../README)
|
|
357
|
-
|
|
358
|
-
***
|
|
359
|
-
|
|
360
|
-
```ts
|
|
361
|
-
type BoundWitnessMongoMeta<P> = PayloadWithMongoMeta<P & object>;
|
|
362
|
-
```
|
|
363
|
-
|
|
364
|
-
## Type Parameters
|
|
365
|
-
|
|
366
|
-
### P
|
|
367
|
-
|
|
368
|
-
`P` *extends* `Payload` = `Payload`
|
|
369
|
-
|
|
370
|
-
### <a id="BoundWitnessWithMongoMeta"></a>BoundWitnessWithMongoMeta
|
|
371
|
-
|
|
372
|
-
[**@xyo-network/payload-mongodb**](#../README)
|
|
373
|
-
|
|
374
|
-
***
|
|
375
|
-
|
|
376
|
-
```ts
|
|
377
|
-
type BoundWitnessWithMongoMeta<T, P> = T & BoundWitnessMongoMeta<P>;
|
|
378
|
-
```
|
|
379
|
-
|
|
380
|
-
## Type Parameters
|
|
381
|
-
|
|
382
|
-
### T
|
|
383
|
-
|
|
384
|
-
`T` *extends* `BoundWitness` = `BoundWitness`
|
|
385
|
-
|
|
386
|
-
### P
|
|
387
|
-
|
|
388
|
-
`P` *extends* [`PayloadWithPartialMongoMeta`](#PayloadWithPartialMongoMeta)\<`T`\> = [`PayloadWithPartialMongoMeta`](#PayloadWithPartialMongoMeta)\<`T`\>
|
|
389
|
-
|
|
390
|
-
### <a id="BoundWitnessWithPartialMongoMeta"></a>BoundWitnessWithPartialMongoMeta
|
|
391
|
-
|
|
392
|
-
[**@xyo-network/payload-mongodb**](#../README)
|
|
393
|
-
|
|
394
|
-
***
|
|
395
|
-
|
|
396
|
-
```ts
|
|
397
|
-
type BoundWitnessWithPartialMongoMeta<T, P> = T & Partial<BoundWitnessMongoMeta<P>>;
|
|
398
|
-
```
|
|
399
|
-
|
|
400
|
-
## Type Parameters
|
|
401
|
-
|
|
402
|
-
### T
|
|
403
|
-
|
|
404
|
-
`T` *extends* `BoundWitness` = `BoundWitness`
|
|
405
|
-
|
|
406
|
-
### P
|
|
407
|
-
|
|
408
|
-
`P` *extends* [`PayloadWithPartialMongoMeta`](#PayloadWithPartialMongoMeta)\<`T`\> = [`PayloadWithPartialMongoMeta`](#PayloadWithPartialMongoMeta)\<`T`\>
|
|
409
|
-
|
|
410
|
-
### <a id="PayloadWithMongoMeta"></a>PayloadWithMongoMeta
|
|
411
|
-
|
|
412
|
-
[**@xyo-network/payload-mongodb**](#../README)
|
|
413
|
-
|
|
414
|
-
***
|
|
415
|
-
|
|
416
|
-
```ts
|
|
417
|
-
type PayloadWithMongoMeta<T> = T & PayloadMongoMeta;
|
|
418
|
-
```
|
|
419
|
-
|
|
420
|
-
## Type Parameters
|
|
421
|
-
|
|
422
|
-
### T
|
|
423
|
-
|
|
424
|
-
`T` *extends* `Payload` = `Payload`
|
|
425
|
-
|
|
426
|
-
### <a id="PayloadWithPartialMongoMeta"></a>PayloadWithPartialMongoMeta
|
|
427
|
-
|
|
428
|
-
[**@xyo-network/payload-mongodb**](#../README)
|
|
429
|
-
|
|
430
|
-
***
|
|
431
|
-
|
|
432
|
-
```ts
|
|
433
|
-
type PayloadWithPartialMongoMeta<T> = T & Partial<PayloadMongoMeta>;
|
|
434
|
-
```
|
|
435
|
-
|
|
436
|
-
## Type Parameters
|
|
437
|
-
|
|
438
|
-
### T
|
|
439
|
-
|
|
440
|
-
`T` *extends* `Payload` = `Payload`
|
|
441
41
|
|
|
442
42
|
|
|
443
43
|
[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/payload-mongodb",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.4.1",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -36,25 +36,23 @@
|
|
|
36
36
|
"README.md"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@xyo-network/boundwitness-model": "~5.
|
|
40
|
-
"@xyo-network/payload-model": "~5.
|
|
41
|
-
"@xyo-network/payload-builder": "~5.
|
|
39
|
+
"@xyo-network/boundwitness-model": "~5.4.1",
|
|
40
|
+
"@xyo-network/payload-model": "~5.4.1",
|
|
41
|
+
"@xyo-network/payload-builder": "~5.4.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@opentelemetry/api": "^1.9.1",
|
|
45
|
-
"@xylabs/sdk-js": "^5.0.
|
|
46
|
-
"@xylabs/
|
|
47
|
-
"@xylabs/
|
|
48
|
-
"@xylabs/tsconfig": "~7.8.7",
|
|
49
|
-
"axios": "^1.14.0",
|
|
45
|
+
"@xylabs/sdk-js": "^5.0.97",
|
|
46
|
+
"@xylabs/toolchain": "~7.10.8",
|
|
47
|
+
"@xylabs/tsconfig": "~7.10.8",
|
|
50
48
|
"pako": "~2.1.0",
|
|
51
49
|
"typescript": "~5.9.3",
|
|
52
50
|
"zod": "^4.3.6",
|
|
53
|
-
"@xyo-network/hash": "~5.
|
|
54
|
-
"@xyo-network/wasm": "~5.
|
|
51
|
+
"@xyo-network/hash": "~5.4.1",
|
|
52
|
+
"@xyo-network/wasm": "~5.4.1"
|
|
55
53
|
},
|
|
56
54
|
"peerDependencies": {
|
|
57
|
-
"@xyo-network/hash": "~5.
|
|
55
|
+
"@xyo-network/hash": "~5.4"
|
|
58
56
|
},
|
|
59
57
|
"publishConfig": {
|
|
60
58
|
"access": "public"
|