@oasisomniverse/web5-api 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/README.md +250 -0
  2. package/docs/README.md +44 -0
  3. package/docs/modules/Avatar.md +606 -0
  4. package/docs/modules/CelestialBodies.md +1051 -0
  5. package/docs/modules/CelestialBodiesMetaData.md +949 -0
  6. package/docs/modules/CelestialSpaces.md +1051 -0
  7. package/docs/modules/Chapters.md +955 -0
  8. package/docs/modules/Competition.md +594 -0
  9. package/docs/modules/Cosmic.md +3653 -0
  10. package/docs/modules/Games.md +2619 -0
  11. package/docs/modules/GeoHotSpots.md +1027 -0
  12. package/docs/modules/GeoNFTs.md +1049 -0
  13. package/docs/modules/Health.md +90 -0
  14. package/docs/modules/Holons.md +1139 -0
  15. package/docs/modules/HolonsMetaData.md +949 -0
  16. package/docs/modules/InventoryItems.md +1071 -0
  17. package/docs/modules/Libraries.md +1052 -0
  18. package/docs/modules/Missions.md +1286 -0
  19. package/docs/modules/NFTs.md +1008 -0
  20. package/docs/modules/OAPPs.md +1190 -0
  21. package/docs/modules/Parks.md +1079 -0
  22. package/docs/modules/Plugins.md +1138 -0
  23. package/docs/modules/Quests.md +1941 -0
  24. package/docs/modules/Runtimes.md +1112 -0
  25. package/docs/modules/STAR.md +178 -0
  26. package/docs/modules/Templates.md +990 -0
  27. package/docs/modules/Zomes.md +1049 -0
  28. package/docs/modules/ZomesMetaData.md +949 -0
  29. package/index.d.ts +97 -0
  30. package/index.js +3 -0
  31. package/index.mjs +4 -0
  32. package/package.json +117 -0
  33. package/src/core/httpClient.js +110 -0
  34. package/src/core/routeHelper.js +85 -0
  35. package/src/core/tokenStore.js +52 -0
  36. package/src/core/types.d.ts +18 -0
  37. package/src/index.js +60 -0
  38. package/src/modules/Auth.d.ts +15 -0
  39. package/src/modules/Auth.js +62 -0
  40. package/src/modules/Avatar.d.ts +45 -0
  41. package/src/modules/Avatar.js +47 -0
  42. package/src/modules/CelestialBodies.d.ts +72 -0
  43. package/src/modules/CelestialBodies.js +65 -0
  44. package/src/modules/CelestialBodiesMetaData.d.ts +69 -0
  45. package/src/modules/CelestialBodiesMetaData.js +61 -0
  46. package/src/modules/CelestialSpaces.d.ts +72 -0
  47. package/src/modules/CelestialSpaces.js +65 -0
  48. package/src/modules/Chapters.d.ts +66 -0
  49. package/src/modules/Chapters.js +61 -0
  50. package/src/modules/Competition.d.ts +33 -0
  51. package/src/modules/Competition.js +39 -0
  52. package/src/modules/Cosmic.d.ts +222 -0
  53. package/src/modules/Cosmic.js +165 -0
  54. package/src/modules/Games.d.ts +171 -0
  55. package/src/modules/Games.js +131 -0
  56. package/src/modules/GeoHotSpots.d.ts +66 -0
  57. package/src/modules/GeoHotSpots.js +61 -0
  58. package/src/modules/GeoNFTs.d.ts +72 -0
  59. package/src/modules/GeoNFTs.js +65 -0
  60. package/src/modules/Health.d.ts +12 -0
  61. package/src/modules/Health.js +25 -0
  62. package/src/modules/Holons.d.ts +78 -0
  63. package/src/modules/Holons.js +69 -0
  64. package/src/modules/HolonsMetaData.d.ts +69 -0
  65. package/src/modules/HolonsMetaData.js +61 -0
  66. package/src/modules/InventoryItems.d.ts +69 -0
  67. package/src/modules/InventoryItems.js +63 -0
  68. package/src/modules/Libraries.d.ts +72 -0
  69. package/src/modules/Libraries.js +65 -0
  70. package/src/modules/Missions.d.ts +87 -0
  71. package/src/modules/Missions.js +75 -0
  72. package/src/modules/NFTs.d.ts +69 -0
  73. package/src/modules/NFTs.js +63 -0
  74. package/src/modules/OAPPs.d.ts +69 -0
  75. package/src/modules/OAPPs.js +61 -0
  76. package/src/modules/Parks.d.ts +72 -0
  77. package/src/modules/Parks.js +65 -0
  78. package/src/modules/Plugins.d.ts +78 -0
  79. package/src/modules/Plugins.js +69 -0
  80. package/src/modules/Quests.d.ts +129 -0
  81. package/src/modules/Quests.js +101 -0
  82. package/src/modules/Runtimes.d.ts +81 -0
  83. package/src/modules/Runtimes.js +69 -0
  84. package/src/modules/STAR.d.ts +18 -0
  85. package/src/modules/STAR.js +29 -0
  86. package/src/modules/Templates.d.ts +72 -0
  87. package/src/modules/Templates.js +63 -0
  88. package/src/modules/Zomes.d.ts +72 -0
  89. package/src/modules/Zomes.js +65 -0
  90. package/src/modules/ZomesMetaData.d.ts +69 -0
  91. package/src/modules/ZomesMetaData.js +61 -0
  92. package/src/modules/index.js +67 -0
@@ -0,0 +1,1071 @@
1
+ # InventoryItems — `star.inventoryItems`
2
+
3
+ Source controller: [`InventoryItemsController.cs`](https://github.com/NextGenSoftwareUK/OASIS2/blob/main/STAR%20ODK/NextGenSoftware.OASIS.STAR.WebAPI/Controllers/InventoryItemsController.cs)
4
+ Route prefix: `api/inventoryItems`
5
+ 21 operation(s).
6
+
7
+ Every method takes a single args object: any key matching a `{token}` in the route is substituted into the URL; everything else becomes the query string (GET/DELETE) or JSON body (POST/PUT). Every call resolves to the standard OASIS envelope:
8
+
9
+ ```ts
10
+ {
11
+ isError: boolean;
12
+ isWarning: boolean;
13
+ message: string;
14
+ errorCode?: string;
15
+ result: T; // see each endpoint's Response section below
16
+ }
17
+ ```
18
+
19
+ ## Operations
20
+
21
+ ### `activateInventoryItem`
22
+
23
+ Activates an inventory item.
24
+
25
+ **POST** `api/inventoryItems/{id}/activate`
26
+
27
+ Route parameters:
28
+
29
+ | Field | Type |
30
+ | --- | --- |
31
+ | `id` | `Guid` |
32
+
33
+ **Request**
34
+
35
+ Body fields:
36
+
37
+ | Field | Type |
38
+ | --- | --- |
39
+ | `version` | `int (optional)` |
40
+
41
+ **Response**
42
+
43
+ Standard `OASISResult` envelope (see top of this page) with:
44
+
45
+ `result` type: `IActionResult` (not part of the request/response payload).
46
+
47
+ **Example**
48
+
49
+ ```js
50
+ const { isError, message, result } = await star.inventoryItems.activateInventoryItem({
51
+ id: '<id>',
52
+ version: 1
53
+ });
54
+ if (isError) throw new Error(message);
55
+ console.log(result);
56
+ ```
57
+
58
+ Example response:
59
+
60
+ ```json
61
+ {
62
+ "isError": false,
63
+ "message": "",
64
+ "result": null
65
+ }
66
+ ```
67
+
68
+ ---
69
+
70
+ ### `createInventoryItem`
71
+
72
+ Creates a new inventory item for the authenticated avatar.
73
+
74
+ **POST** `api/inventoryItems`
75
+
76
+ **Request**
77
+
78
+ Body type: `InventoryItem`
79
+
80
+ | Field | Type |
81
+ | --- | --- |
82
+ | `Image2D` | `byte[]` |
83
+ | `Image2DURI` | `Uri` |
84
+ | `ThumbnailUrl` | `string` |
85
+ | `Object3D` | `byte[]` |
86
+ | `Object3DURI` | `Uri` |
87
+ | `Quantity` | `int` |
88
+ | `Stack` | `bool` |
89
+ | `GameSource` | `string` |
90
+ | `ItemType` | `string` |
91
+ | `NftId` | `string` |
92
+ | `InventoryItemType` | `InventoryItemType` |
93
+ | `Rarity` | `string` |
94
+ | `MaxQuantity` | `int` |
95
+ | `Weight` | `float` |
96
+ | `IsUsable` | `bool` |
97
+ | `IsTradeable` | `bool` |
98
+ | `OwnerAvatarId` | `string` |
99
+ | `AcquiredOn` | `DateTime` |
100
+ | `LastUsedOn` | `DateTime` |
101
+ | `Properties` | `Dictionary<string, object>` |
102
+
103
+ **Response**
104
+
105
+ Standard `OASISResult` envelope (see top of this page) with:
106
+
107
+ `result` type: `IActionResult` (not part of the request/response payload).
108
+
109
+ **Example**
110
+
111
+ ```js
112
+ const { isError, message, result } = await star.inventoryItems.createInventoryItem({
113
+ image2D: "<base64-bytes>",
114
+ image2DURI: "https://example.com/asset.png",
115
+ thumbnailUrl: "example string",
116
+ object3D: "<base64-bytes>",
117
+ object3DURI: "https://example.com/asset.png",
118
+ quantity: 1,
119
+ stack: true,
120
+ gameSource: "example string",
121
+ itemType: "example string",
122
+ nftId: "example string",
123
+ inventoryItemType: { },
124
+ rarity: "example string",
125
+ maxQuantity: 1,
126
+ weight: 1.0,
127
+ isUsable: true,
128
+ isTradeable: true,
129
+ ownerAvatarId: "example string",
130
+ acquiredOn: "2026-01-01T00:00:00Z",
131
+ lastUsedOn: "2026-01-01T00:00:00Z",
132
+ properties: { "<string>": {} }
133
+ });
134
+ if (isError) throw new Error(message);
135
+ console.log(result);
136
+ ```
137
+
138
+ Example response:
139
+
140
+ ```json
141
+ {
142
+ "isError": false,
143
+ "message": "",
144
+ "result": null
145
+ }
146
+ ```
147
+
148
+ ---
149
+
150
+ ### `createInventoryItemWithOptions`
151
+
152
+ Creates a new inventory item with specified parameters.
153
+
154
+ **POST** `api/inventoryItems/create`
155
+
156
+ **Request**
157
+
158
+ Body type: `CreateInventoryItemRequest`
159
+
160
+ | Field | Type |
161
+ | --- | --- |
162
+ | `Name` | `string` |
163
+ | `Description` | `string` |
164
+ | `HolonSubType` | `HolonType` |
165
+ | `SourceFolderPath` | `string` |
166
+ | `CreateOptions` | `ISTARNETCreateOptions<InventoryItem, STARNETDNA>?` |
167
+
168
+ **Response**
169
+
170
+ Standard `OASISResult` envelope (see top of this page) with:
171
+
172
+ `result` type: `IActionResult` (not part of the request/response payload).
173
+
174
+ **Example**
175
+
176
+ ```js
177
+ const { isError, message, result } = await star.inventoryItems.createInventoryItemWithOptions({
178
+ name: "example string",
179
+ description: "example string",
180
+ holonSubType: { },
181
+ sourceFolderPath: "example string",
182
+ createOptions: { "STARNETHolon": /* <T1> */, "STARNETDNA": /* <T2> */, "MetaTagMappings": { "MetaHolonTags": [{ "HolonName": "example string", "HolonType": { }, "NodeName": "example string", "NodeType": { "Score": 1.0 }, "MetaTag": "example string" }], "MetaTags": { "<string>": "example string" } }, "CheckIfSourcePathExists": true, "CustomCreateParams": { "<string>": {} } }
183
+ });
184
+ if (isError) throw new Error(message);
185
+ console.log(result);
186
+ ```
187
+
188
+ Example response:
189
+
190
+ ```json
191
+ {
192
+ "isError": false,
193
+ "message": "",
194
+ "result": null
195
+ }
196
+ ```
197
+
198
+ ---
199
+
200
+ ### `deactivateInventoryItem`
201
+
202
+ Deactivates an inventory item.
203
+
204
+ **POST** `api/inventoryItems/{id}/deactivate`
205
+
206
+ Route parameters:
207
+
208
+ | Field | Type |
209
+ | --- | --- |
210
+ | `id` | `Guid` |
211
+
212
+ **Request**
213
+
214
+ Body fields:
215
+
216
+ | Field | Type |
217
+ | --- | --- |
218
+ | `version` | `int (optional)` |
219
+
220
+ **Response**
221
+
222
+ Standard `OASISResult` envelope (see top of this page) with:
223
+
224
+ `result` type: `IActionResult` (not part of the request/response payload).
225
+
226
+ **Example**
227
+
228
+ ```js
229
+ const { isError, message, result } = await star.inventoryItems.deactivateInventoryItem({
230
+ id: '<id>',
231
+ version: 1
232
+ });
233
+ if (isError) throw new Error(message);
234
+ console.log(result);
235
+ ```
236
+
237
+ Example response:
238
+
239
+ ```json
240
+ {
241
+ "isError": false,
242
+ "message": "",
243
+ "result": null
244
+ }
245
+ ```
246
+
247
+ ---
248
+
249
+ ### `deleteInventoryItem`
250
+
251
+ **DELETE** `api/inventoryItems/{id}`
252
+
253
+ Route parameters:
254
+
255
+ | Field | Type |
256
+ | --- | --- |
257
+ | `id` | `Guid` |
258
+
259
+ **Request**
260
+
261
+ No request body.
262
+
263
+ **Response**
264
+
265
+ Standard `OASISResult` envelope (see top of this page) with:
266
+
267
+ `result` type: `IActionResult` (not part of the request/response payload).
268
+
269
+ **Example**
270
+
271
+ ```js
272
+ const { isError, message, result } = await star.inventoryItems.deleteInventoryItem({
273
+ id: '<id>'
274
+ });
275
+ if (isError) throw new Error(message);
276
+ console.log(result);
277
+ ```
278
+
279
+ Example response:
280
+
281
+ ```json
282
+ {
283
+ "isError": false,
284
+ "message": "",
285
+ "result": null
286
+ }
287
+ ```
288
+
289
+ ---
290
+
291
+ ### `downloadInventoryItem`
292
+
293
+ Downloads an inventory item from the STARNET system.
294
+
295
+ **POST** `api/inventoryItems/{id}/download`
296
+
297
+ Route parameters:
298
+
299
+ | Field | Type |
300
+ | --- | --- |
301
+ | `id` | `Guid` |
302
+
303
+ **Request**
304
+
305
+ Body fields:
306
+
307
+ | Field | Type |
308
+ | --- | --- |
309
+ | `version` | `int (optional)` |
310
+ | `downloadPath` | `string (optional)` |
311
+ | `reInstall` | `bool (optional)` |
312
+
313
+ **Response**
314
+
315
+ Standard `OASISResult` envelope (see top of this page) with:
316
+
317
+ `result` type: `IActionResult` (not part of the request/response payload).
318
+
319
+ **Example**
320
+
321
+ ```js
322
+ const { isError, message, result } = await star.inventoryItems.downloadInventoryItem({
323
+ id: '<id>',
324
+ version: 1,
325
+ downloadPath: 'example string',
326
+ reInstall: true
327
+ });
328
+ if (isError) throw new Error(message);
329
+ console.log(result);
330
+ ```
331
+
332
+ Example response:
333
+
334
+ ```json
335
+ {
336
+ "isError": false,
337
+ "message": "",
338
+ "result": null
339
+ }
340
+ ```
341
+
342
+ ---
343
+
344
+ ### `editInventoryItem`
345
+
346
+ Edits an inventory item with new DNA configuration.
347
+
348
+ **POST** `api/inventoryItems/{id}/edit`
349
+
350
+ Route parameters:
351
+
352
+ | Field | Type |
353
+ | --- | --- |
354
+ | `id` | `Guid` |
355
+
356
+ **Request**
357
+
358
+ Body type: `EditInventoryItemRequest`
359
+
360
+ | Field | Type |
361
+ | --- | --- |
362
+ | `NewDNA` | `STARNETDNA` |
363
+
364
+ **Response**
365
+
366
+ Standard `OASISResult` envelope (see top of this page) with:
367
+
368
+ `result` type: `IActionResult` (not part of the request/response payload).
369
+
370
+ **Example**
371
+
372
+ ```js
373
+ const { isError, message, result } = await star.inventoryItems.editInventoryItem({
374
+ id: '<id>',
375
+ newDNA: { "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Name": "example string", "Description": "example string", "STARNETHolonType": "example string", "STARNETCategory": {}, "STARNETSubCategory": {}, "Dependencies": { "OAPPs": [{ "Type": { }, "HolonId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "STARNETHolonId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Name": "example string", "Description": "example string", "Version": "example string", "VersionSequence": 1, "Install": true, "InstallMode": { }, "InstalledFrom": "example string", "InstalledTo": "example string" }], "Runtimes": [], "Libraries": [], "Templates": [], "NFTs": [], "NFTCollections": [], "GeoNFTs": [], "GeoNFTCollections": [], "GeoHotSpots": [], "Quests": [], "Missions": [], "Chapters": [], "InventoryItems": [], "CelestialSpaces": [], "CelestialBodies": [], "Zomes": [], "Holons": [], "CelestialBodiesMetaDataDNA": [], "ZomesMetaDataDNA": [], "HolonsMetaDataDNA": [] }, "MetaData": { "<string>": {} }, "MetaHolonTagMappings": /* <>> */, "MetaTagMappings": { "<string>": "example string" }, "CreatedByAvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "CreatedByAvatarUsername": "example string", "CreatedOn": "2026-01-01T00:00:00Z", "SourcePath": "example string", "PublishedPath": "example string", "PublishedByAvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "PublishedByAvatarUsername": "example string", "PublishedOn": "2026-01-01T00:00:00Z", "LaunchTarget": "example string", "ModifiedByAvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ModifiedByAvatarUsername": "example string", "ModifiedOn": "2026-01-01T00:00:00Z", "PublishedOnSTARNET": true, "PublishedToCloud": true, "PublishedToPinata": true, "PinataIPFSHash": "example string", "PublishedProviderType": "example string", "FileSize": 1, "Version": "example string", "OASISRuntimeVersion": "example string", "OASISAPIVersion": "example string", "COSMICVersion": "example string", "STARRuntimeVersion": "example string", "STARODKVersion": "example string", "STARAPIVersion": "example string", "STARNETVersion": "example string", "DotNetVersion": "example string", "VersionSequence": 1, "Downloads": 1, "Installs": 1, "TotalDownloads": 1, "TotalInstalls": 1, "NumberOfVersions": 1 }
376
+ });
377
+ if (isError) throw new Error(message);
378
+ console.log(result);
379
+ ```
380
+
381
+ Example response:
382
+
383
+ ```json
384
+ {
385
+ "isError": false,
386
+ "message": "",
387
+ "result": null
388
+ }
389
+ ```
390
+
391
+ ---
392
+
393
+ ### `getAllInventoryItems`
394
+
395
+ Retrieves all inventory items in the system.
396
+
397
+ **GET** `api/inventoryItems`
398
+
399
+ **Request**
400
+
401
+ No request body.
402
+
403
+ **Response**
404
+
405
+ Standard `OASISResult` envelope (see top of this page) with:
406
+
407
+ `result` type: `IActionResult` (not part of the request/response payload).
408
+
409
+ **Example**
410
+
411
+ ```js
412
+ const { isError, message, result } = await star.inventoryItems.getAllInventoryItems({});
413
+ if (isError) throw new Error(message);
414
+ console.log(result);
415
+ ```
416
+
417
+ Example response:
418
+
419
+ ```json
420
+ {
421
+ "isError": false,
422
+ "message": "",
423
+ "result": null
424
+ }
425
+ ```
426
+
427
+ ---
428
+
429
+ ### `getInventoryItem`
430
+
431
+ Retrieves a specific inventory item by its unique identifier.
432
+
433
+ **GET** `api/inventoryItems/{id}`
434
+
435
+ Route parameters:
436
+
437
+ | Field | Type |
438
+ | --- | --- |
439
+ | `id` | `Guid` |
440
+
441
+ **Request**
442
+
443
+ No request body.
444
+
445
+ **Response**
446
+
447
+ Standard `OASISResult` envelope (see top of this page) with:
448
+
449
+ `result` type: `IActionResult` (not part of the request/response payload).
450
+
451
+ **Example**
452
+
453
+ ```js
454
+ const { isError, message, result } = await star.inventoryItems.getInventoryItem({
455
+ id: '<id>'
456
+ });
457
+ if (isError) throw new Error(message);
458
+ console.log(result);
459
+ ```
460
+
461
+ Example response:
462
+
463
+ ```json
464
+ {
465
+ "isError": false,
466
+ "message": "",
467
+ "result": null
468
+ }
469
+ ```
470
+
471
+ ---
472
+
473
+ ### `getInventoryItemVersions`
474
+
475
+ Gets all versions of a specific inventory item.
476
+
477
+ **GET** `api/inventoryItems/{id}/versions`
478
+
479
+ Route parameters:
480
+
481
+ | Field | Type |
482
+ | --- | --- |
483
+ | `id` | `Guid` |
484
+
485
+ **Request**
486
+
487
+ No request body.
488
+
489
+ **Response**
490
+
491
+ Standard `OASISResult` envelope (see top of this page) with:
492
+
493
+ `result` type: `IActionResult` (not part of the request/response payload).
494
+
495
+ **Example**
496
+
497
+ ```js
498
+ const { isError, message, result } = await star.inventoryItems.getInventoryItemVersions({
499
+ id: '<id>'
500
+ });
501
+ if (isError) throw new Error(message);
502
+ console.log(result);
503
+ ```
504
+
505
+ Example response:
506
+
507
+ ```json
508
+ {
509
+ "isError": false,
510
+ "message": "",
511
+ "result": null
512
+ }
513
+ ```
514
+
515
+ ---
516
+
517
+ ### `getInventoryItemsByAvatar`
518
+
519
+ **GET** `api/inventoryItems/by-avatar/{avatarId}`
520
+
521
+ Route parameters:
522
+
523
+ | Field | Type |
524
+ | --- | --- |
525
+ | `avatarId` | `Guid` |
526
+
527
+ **Request**
528
+
529
+ No request body.
530
+
531
+ **Response**
532
+
533
+ Standard `OASISResult` envelope (see top of this page) with:
534
+
535
+ `result` type: `IActionResult` (not part of the request/response payload).
536
+
537
+ **Example**
538
+
539
+ ```js
540
+ const { isError, message, result } = await star.inventoryItems.getInventoryItemsByAvatar({
541
+ avatarId: '<avatarId>'
542
+ });
543
+ if (isError) throw new Error(message);
544
+ console.log(result);
545
+ ```
546
+
547
+ Example response:
548
+
549
+ ```json
550
+ {
551
+ "isError": false,
552
+ "message": "",
553
+ "result": null
554
+ }
555
+ ```
556
+
557
+ ---
558
+
559
+ ### `loadAllInventoryItemsForAvatar`
560
+
561
+ Loads all inventory items for the authenticated avatar.
562
+
563
+ **GET** `api/inventoryItems/load-all-for-avatar`
564
+
565
+ **Request**
566
+
567
+ Query parameters:
568
+
569
+ | Field | Type |
570
+ | --- | --- |
571
+ | `showAllVersions` | `bool (optional)` |
572
+ | `version` | `int (optional)` |
573
+
574
+ **Response**
575
+
576
+ Standard `OASISResult` envelope (see top of this page) with:
577
+
578
+ `result` type: `IActionResult` (not part of the request/response payload).
579
+
580
+ **Example**
581
+
582
+ ```js
583
+ const { isError, message, result } = await star.inventoryItems.loadAllInventoryItemsForAvatar({
584
+ showAllVersions: true,
585
+ version: 1
586
+ });
587
+ if (isError) throw new Error(message);
588
+ console.log(result);
589
+ ```
590
+
591
+ Example response:
592
+
593
+ ```json
594
+ {
595
+ "isError": false,
596
+ "message": "",
597
+ "result": null
598
+ }
599
+ ```
600
+
601
+ ---
602
+
603
+ ### `loadInventoryItem`
604
+
605
+ Loads an inventory item by ID with optional version and holon type.
606
+
607
+ **GET** `api/inventoryItems/{id}/load`
608
+
609
+ Route parameters:
610
+
611
+ | Field | Type |
612
+ | --- | --- |
613
+ | `id` | `Guid` |
614
+
615
+ **Request**
616
+
617
+ Query parameters:
618
+
619
+ | Field | Type |
620
+ | --- | --- |
621
+ | `version` | `int (optional)` |
622
+ | `holonType` | `string (optional)` |
623
+
624
+ **Response**
625
+
626
+ Standard `OASISResult` envelope (see top of this page) with:
627
+
628
+ `result` type: `IActionResult` (not part of the request/response payload).
629
+
630
+ **Example**
631
+
632
+ ```js
633
+ const { isError, message, result } = await star.inventoryItems.loadInventoryItem({
634
+ id: '<id>',
635
+ version: 1,
636
+ holonType: 'example string'
637
+ });
638
+ if (isError) throw new Error(message);
639
+ console.log(result);
640
+ ```
641
+
642
+ Example response:
643
+
644
+ ```json
645
+ {
646
+ "isError": false,
647
+ "message": "",
648
+ "result": null
649
+ }
650
+ ```
651
+
652
+ ---
653
+
654
+ ### `loadInventoryItemFromPath`
655
+
656
+ Loads an inventory item from source or installed folder path.
657
+
658
+ **GET** `api/inventoryItems/load-from-path`
659
+
660
+ **Request**
661
+
662
+ Query parameters:
663
+
664
+ | Field | Type |
665
+ | --- | --- |
666
+ | `path` | `string` |
667
+ | `holonType` | `string (optional)` |
668
+
669
+ **Response**
670
+
671
+ Standard `OASISResult` envelope (see top of this page) with:
672
+
673
+ `result` type: `IActionResult` (not part of the request/response payload).
674
+
675
+ **Example**
676
+
677
+ ```js
678
+ const { isError, message, result } = await star.inventoryItems.loadInventoryItemFromPath({
679
+ path: 'example string',
680
+ holonType: 'example string'
681
+ });
682
+ if (isError) throw new Error(message);
683
+ console.log(result);
684
+ ```
685
+
686
+ Example response:
687
+
688
+ ```json
689
+ {
690
+ "isError": false,
691
+ "message": "",
692
+ "result": null
693
+ }
694
+ ```
695
+
696
+ ---
697
+
698
+ ### `loadInventoryItemFromPublished`
699
+
700
+ Loads an inventory item from a published file.
701
+
702
+ **GET** `api/inventoryItems/load-from-published`
703
+
704
+ **Request**
705
+
706
+ Query parameters:
707
+
708
+ | Field | Type |
709
+ | --- | --- |
710
+ | `publishedFilePath` | `string` |
711
+
712
+ **Response**
713
+
714
+ Standard `OASISResult` envelope (see top of this page) with:
715
+
716
+ `result` type: `IActionResult` (not part of the request/response payload).
717
+
718
+ **Example**
719
+
720
+ ```js
721
+ const { isError, message, result } = await star.inventoryItems.loadInventoryItemFromPublished({
722
+ publishedFilePath: 'example string'
723
+ });
724
+ if (isError) throw new Error(message);
725
+ console.log(result);
726
+ ```
727
+
728
+ Example response:
729
+
730
+ ```json
731
+ {
732
+ "isError": false,
733
+ "message": "",
734
+ "result": null
735
+ }
736
+ ```
737
+
738
+ ---
739
+
740
+ ### `loadInventoryItemVersion`
741
+
742
+ Loads a specific version of an inventory item.
743
+
744
+ **GET** `api/inventoryItems/{id}/version/{version}`
745
+
746
+ Route parameters:
747
+
748
+ | Field | Type |
749
+ | --- | --- |
750
+ | `id` | `Guid` |
751
+ | `version` | `string` |
752
+
753
+ **Request**
754
+
755
+ No request body.
756
+
757
+ **Response**
758
+
759
+ Standard `OASISResult` envelope (see top of this page) with:
760
+
761
+ `result` type: `IActionResult` (not part of the request/response payload).
762
+
763
+ **Example**
764
+
765
+ ```js
766
+ const { isError, message, result } = await star.inventoryItems.loadInventoryItemVersion({
767
+ id: '<id>',
768
+ version: '<version>'
769
+ });
770
+ if (isError) throw new Error(message);
771
+ console.log(result);
772
+ ```
773
+
774
+ Example response:
775
+
776
+ ```json
777
+ {
778
+ "isError": false,
779
+ "message": "",
780
+ "result": null
781
+ }
782
+ ```
783
+
784
+ ---
785
+
786
+ ### `publishInventoryItem`
787
+
788
+ Publishes an inventory item to the STARNET system.
789
+
790
+ **POST** `api/inventoryItems/{id}/publish`
791
+
792
+ Route parameters:
793
+
794
+ | Field | Type |
795
+ | --- | --- |
796
+ | `id` | `Guid` |
797
+
798
+ **Request**
799
+
800
+ Body type: `PublishRequest`
801
+
802
+ | Field | Type |
803
+ | --- | --- |
804
+ | `SourcePath` | `string` |
805
+ | `LaunchTarget` | `string` |
806
+ | `PublishPath` | `string` |
807
+ | `Edit` | `bool` |
808
+ | `RegisterOnSTARNET` | `bool` |
809
+ | `GenerateBinary` | `bool` |
810
+ | `UploadToCloud` | `bool` |
811
+
812
+ **Response**
813
+
814
+ Standard `OASISResult` envelope (see top of this page) with:
815
+
816
+ `result` type: `IActionResult` (not part of the request/response payload).
817
+
818
+ **Example**
819
+
820
+ ```js
821
+ const { isError, message, result } = await star.inventoryItems.publishInventoryItem({
822
+ id: '<id>',
823
+ sourcePath: "example string",
824
+ launchTarget: "example string",
825
+ publishPath: "example string",
826
+ edit: true,
827
+ registerOnSTARNET: true,
828
+ generateBinary: true,
829
+ uploadToCloud: true
830
+ });
831
+ if (isError) throw new Error(message);
832
+ console.log(result);
833
+ ```
834
+
835
+ Example response:
836
+
837
+ ```json
838
+ {
839
+ "isError": false,
840
+ "message": "",
841
+ "result": null
842
+ }
843
+ ```
844
+
845
+ ---
846
+
847
+ ### `republishInventoryItem`
848
+
849
+ Republishes an inventory item to the STARNET system.
850
+
851
+ **POST** `api/inventoryItems/{id}/republish`
852
+
853
+ Route parameters:
854
+
855
+ | Field | Type |
856
+ | --- | --- |
857
+ | `id` | `Guid` |
858
+
859
+ **Request**
860
+
861
+ Body fields:
862
+
863
+ | Field | Type |
864
+ | --- | --- |
865
+ | `version` | `int (optional)` |
866
+
867
+ **Response**
868
+
869
+ Standard `OASISResult` envelope (see top of this page) with:
870
+
871
+ `result` type: `IActionResult` (not part of the request/response payload).
872
+
873
+ **Example**
874
+
875
+ ```js
876
+ const { isError, message, result } = await star.inventoryItems.republishInventoryItem({
877
+ id: '<id>',
878
+ version: 1
879
+ });
880
+ if (isError) throw new Error(message);
881
+ console.log(result);
882
+ ```
883
+
884
+ Example response:
885
+
886
+ ```json
887
+ {
888
+ "isError": false,
889
+ "message": "",
890
+ "result": null
891
+ }
892
+ ```
893
+
894
+ ---
895
+
896
+ ### `searchInventoryItems`
897
+
898
+ Searches for inventory items based on the provided search criteria.
899
+
900
+ **POST** `api/inventoryItems/search`
901
+
902
+ **Request**
903
+
904
+ Body type: `SearchRequest`
905
+
906
+ | Field | Type |
907
+ | --- | --- |
908
+ | `SearchTerm` | `string` |
909
+ | `Filters` | `Dictionary<string, object>` |
910
+
911
+ **Response**
912
+
913
+ Standard `OASISResult` envelope (see top of this page) with:
914
+
915
+ `result` type: `IActionResult` (not part of the request/response payload).
916
+
917
+ **Example**
918
+
919
+ ```js
920
+ const { isError, message, result } = await star.inventoryItems.searchInventoryItems({
921
+ searchTerm: "example string",
922
+ filters: { "<string>": {} }
923
+ });
924
+ if (isError) throw new Error(message);
925
+ console.log(result);
926
+ ```
927
+
928
+ Example response:
929
+
930
+ ```json
931
+ {
932
+ "isError": false,
933
+ "message": "",
934
+ "result": null
935
+ }
936
+ ```
937
+
938
+ ---
939
+
940
+ ### `unpublishInventoryItem`
941
+
942
+ Unpublishes an inventory item from the STARNET system.
943
+
944
+ **POST** `api/inventoryItems/{id}/unpublish`
945
+
946
+ Route parameters:
947
+
948
+ | Field | Type |
949
+ | --- | --- |
950
+ | `id` | `Guid` |
951
+
952
+ **Request**
953
+
954
+ Body fields:
955
+
956
+ | Field | Type |
957
+ | --- | --- |
958
+ | `version` | `int (optional)` |
959
+
960
+ **Response**
961
+
962
+ Standard `OASISResult` envelope (see top of this page) with:
963
+
964
+ `result` type: `IActionResult` (not part of the request/response payload).
965
+
966
+ **Example**
967
+
968
+ ```js
969
+ const { isError, message, result } = await star.inventoryItems.unpublishInventoryItem({
970
+ id: '<id>',
971
+ version: 1
972
+ });
973
+ if (isError) throw new Error(message);
974
+ console.log(result);
975
+ ```
976
+
977
+ Example response:
978
+
979
+ ```json
980
+ {
981
+ "isError": false,
982
+ "message": "",
983
+ "result": null
984
+ }
985
+ ```
986
+
987
+ ---
988
+
989
+ ### `updateInventoryItem`
990
+
991
+ **PUT** `api/inventoryItems/{id}`
992
+
993
+ Route parameters:
994
+
995
+ | Field | Type |
996
+ | --- | --- |
997
+ | `id` | `Guid` |
998
+
999
+ **Request**
1000
+
1001
+ Body type: `InventoryItem`
1002
+
1003
+ | Field | Type |
1004
+ | --- | --- |
1005
+ | `Image2D` | `byte[]` |
1006
+ | `Image2DURI` | `Uri` |
1007
+ | `ThumbnailUrl` | `string` |
1008
+ | `Object3D` | `byte[]` |
1009
+ | `Object3DURI` | `Uri` |
1010
+ | `Quantity` | `int` |
1011
+ | `Stack` | `bool` |
1012
+ | `GameSource` | `string` |
1013
+ | `ItemType` | `string` |
1014
+ | `NftId` | `string` |
1015
+ | `InventoryItemType` | `InventoryItemType` |
1016
+ | `Rarity` | `string` |
1017
+ | `MaxQuantity` | `int` |
1018
+ | `Weight` | `float` |
1019
+ | `IsUsable` | `bool` |
1020
+ | `IsTradeable` | `bool` |
1021
+ | `OwnerAvatarId` | `string` |
1022
+ | `AcquiredOn` | `DateTime` |
1023
+ | `LastUsedOn` | `DateTime` |
1024
+ | `Properties` | `Dictionary<string, object>` |
1025
+
1026
+ **Response**
1027
+
1028
+ Standard `OASISResult` envelope (see top of this page) with:
1029
+
1030
+ `result` type: `IActionResult` (not part of the request/response payload).
1031
+
1032
+ **Example**
1033
+
1034
+ ```js
1035
+ const { isError, message, result } = await star.inventoryItems.updateInventoryItem({
1036
+ id: '<id>',
1037
+ image2D: "<base64-bytes>",
1038
+ image2DURI: "https://example.com/asset.png",
1039
+ thumbnailUrl: "example string",
1040
+ object3D: "<base64-bytes>",
1041
+ object3DURI: "https://example.com/asset.png",
1042
+ quantity: 1,
1043
+ stack: true,
1044
+ gameSource: "example string",
1045
+ itemType: "example string",
1046
+ nftId: "example string",
1047
+ inventoryItemType: { },
1048
+ rarity: "example string",
1049
+ maxQuantity: 1,
1050
+ weight: 1.0,
1051
+ isUsable: true,
1052
+ isTradeable: true,
1053
+ ownerAvatarId: "example string",
1054
+ acquiredOn: "2026-01-01T00:00:00Z",
1055
+ lastUsedOn: "2026-01-01T00:00:00Z",
1056
+ properties: { "<string>": {} }
1057
+ });
1058
+ if (isError) throw new Error(message);
1059
+ console.log(result);
1060
+ ```
1061
+
1062
+ Example response:
1063
+
1064
+ ```json
1065
+ {
1066
+ "isError": false,
1067
+ "message": "",
1068
+ "result": null
1069
+ }
1070
+ ```
1071
+