@xyo-network/payload-mongodb 5.3.24 → 5.3.26

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.
Files changed (2) hide show
  1. package/README.md +434 -10
  2. package/package.json +12 -18
package/README.md CHANGED
@@ -1,23 +1,447 @@
1
+ [![logo][]](https://xyo.network)
2
+
1
3
  # @xyo-network/payload-mongodb
2
4
 
3
- [![logo][]](https://xyo.network)
5
+ [![npm][npm-badge]][npm-link]
6
+ [![license][license-badge]][license-link]
7
+
8
+ > Primary SDK for using XYO Protocol 2.0
9
+
10
+ ## Install
11
+
12
+ Using npm:
4
13
 
5
- Version: 5.0.2
14
+ ```sh
15
+ npm install {{name}}
16
+ ```
6
17
 
7
- Primary SDK for using XYO Protocol 2.0
18
+ Using yarn:
8
19
 
9
- ## Documentation
20
+ ```sh
21
+ yarn add {{name}}
22
+ ```
10
23
 
11
- [TypeDoc Generated Documentation](https://gitbook.xyo.network/xyo-data-lab/xyo-reference/package-documentation/xyo-network__payload-mongodb)
24
+ Using pnpm:
25
+
26
+ ```sh
27
+ pnpm add {{name}}
28
+ ```
29
+
30
+ Using bun:
31
+
32
+ ```sh
33
+ bun add {{name}}
34
+ ```
12
35
 
13
- Part of [sdk-xyo-client-js](https://www.npmjs.com/package/@xyo-network/sdk-xyo-client-js)
14
36
 
15
37
  ## License
16
38
 
17
- > See the [LICENSE](LICENSE) file for license details
39
+ See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
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
18
439
 
19
- ## Credits
440
+ `T` *extends* `Payload` = `Payload`
20
441
 
21
- [Made with 🔥 and ❄️ by XYO](https://xyo.network)
22
442
 
23
- [logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
443
+ [logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
444
+ [npm-badge]: https://img.shields.io/npm/v/@xyo-network/payload-mongodb.svg
445
+ [npm-link]: https://www.npmjs.com/package/@xyo-network/payload-mongodb
446
+ [license-badge]: https://img.shields.io/npm/l/@xyo-network/payload-mongodb.svg
447
+ [license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/payload-mongodb",
3
- "version": "5.3.24",
3
+ "version": "5.3.26",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -21,7 +21,6 @@
21
21
  "type": "module",
22
22
  "exports": {
23
23
  ".": {
24
- "browser": {},
25
24
  "node": {
26
25
  "types": "./dist/node/index.d.ts",
27
26
  "default": "./dist/node/index.mjs"
@@ -29,8 +28,6 @@
29
28
  },
30
29
  "./package.json": "./package.json"
31
30
  },
32
- "module": "dist/node/index.mjs",
33
- "types": "dist/node/index.d.ts",
34
31
  "files": [
35
32
  "dist",
36
33
  "!**/*.bench.*",
@@ -39,33 +36,30 @@
39
36
  "README.md"
40
37
  ],
41
38
  "dependencies": {
42
- "@xyo-network/boundwitness-model": "~5.3.24",
43
- "@xyo-network/payload-builder": "~5.3.24",
44
- "@xyo-network/payload-model": "~5.3.24"
39
+ "@xyo-network/boundwitness-model": "~5.3.26",
40
+ "@xyo-network/payload-builder": "~5.3.26",
41
+ "@xyo-network/payload-model": "~5.3.26"
45
42
  },
46
43
  "devDependencies": {
47
44
  "@opentelemetry/api": "^1.9.1",
48
- "@types/node": "^25.5.0",
49
- "@xylabs/sdk-js": "^5.0.93",
50
- "@xylabs/ts-scripts-common": "~7.6.16",
51
- "@xylabs/ts-scripts-pnpm": "~7.6.16",
52
- "@xylabs/tsconfig": "~7.6.16",
45
+ "@types/node": "^25.5.2",
46
+ "@xylabs/sdk-js": "^5.0.94",
47
+ "@xylabs/ts-scripts-common": "~7.7.5",
48
+ "@xylabs/ts-scripts-pnpm": "~7.7.5",
49
+ "@xylabs/tsconfig": "~7.7.5",
53
50
  "acorn": "^8.16.0",
54
51
  "axios": "^1.14.0",
55
52
  "esbuild": "^0.28.0",
56
53
  "typescript": "~5.9.3",
57
54
  "zod": "^4.3.6",
58
- "@xyo-network/boundwitness-model": "~5.3.24",
59
- "@xyo-network/payload-builder": "~5.3.24",
60
- "@xyo-network/payload-model": "~5.3.24"
55
+ "@xyo-network/payload-builder": "~5.3.26",
56
+ "@xyo-network/payload-model": "~5.3.26",
57
+ "@xyo-network/boundwitness-model": "~5.3.26"
61
58
  },
62
59
  "peerDependencies": {
63
60
  "@xylabs/sdk-js": "^5",
64
61
  "zod": "^4"
65
62
  },
66
- "engines": {
67
- "node": ">=16"
68
- },
69
63
  "publishConfig": {
70
64
  "access": "public"
71
65
  }