@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,1138 @@
1
+ # Plugins — `star.plugins`
2
+
3
+ Source controller: [`PluginsController.cs`](https://github.com/NextGenSoftwareUK/OASIS2/blob/main/STAR%20ODK/NextGenSoftware.OASIS.STAR.WebAPI/Controllers/PluginsController.cs)
4
+ Route prefix: `api/plugins`
5
+ 24 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
+ ### `activatePlugin`
22
+
23
+ Activates a plugin.
24
+
25
+ **POST** `api/plugins/{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.plugins.activatePlugin({
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
+ ### `clonePlugin`
71
+
72
+ **POST** `api/plugins/{id}/clone`
73
+
74
+ Route parameters:
75
+
76
+ | Field | Type |
77
+ | --- | --- |
78
+ | `id` | `Guid` |
79
+
80
+ **Request**
81
+
82
+ Body type: `CloneRequest`
83
+
84
+ | Field | Type |
85
+ | --- | --- |
86
+ | `NewName` | `string` |
87
+
88
+ **Response**
89
+
90
+ Standard `OASISResult` envelope (see top of this page) with:
91
+
92
+ `result` type: `IActionResult` (not part of the request/response payload).
93
+
94
+ **Example**
95
+
96
+ ```js
97
+ const { isError, message, result } = await star.plugins.clonePlugin({
98
+ id: '<id>',
99
+ newName: "example string"
100
+ });
101
+ if (isError) throw new Error(message);
102
+ console.log(result);
103
+ ```
104
+
105
+ Example response:
106
+
107
+ ```json
108
+ {
109
+ "isError": false,
110
+ "message": "",
111
+ "result": null
112
+ }
113
+ ```
114
+
115
+ ---
116
+
117
+ ### `createPlugin`
118
+
119
+ Creates a new plugin for the authenticated avatar.
120
+
121
+ **POST** `api/plugins`
122
+
123
+ **Request**
124
+
125
+ Body type: `CreatePluginRequest`
126
+
127
+ | Field | Type |
128
+ | --- | --- |
129
+ | `Name` | `string` |
130
+ | `Description` | `string` |
131
+ | `PluginType` | `string` |
132
+ | `SourcePath` | `string` |
133
+ | `Category` | `string` |
134
+ | `Version` | `string` |
135
+
136
+ **Response**
137
+
138
+ Standard `OASISResult` envelope (see top of this page) with:
139
+
140
+ `result` type: `IActionResult` (not part of the request/response payload).
141
+
142
+ **Example**
143
+
144
+ ```js
145
+ const { isError, message, result } = await star.plugins.createPlugin({
146
+ name: "example string",
147
+ description: "example string",
148
+ pluginType: "example string",
149
+ sourcePath: "example string",
150
+ category: "example string",
151
+ version: "example string"
152
+ });
153
+ if (isError) throw new Error(message);
154
+ console.log(result);
155
+ ```
156
+
157
+ Example response:
158
+
159
+ ```json
160
+ {
161
+ "isError": false,
162
+ "message": "",
163
+ "result": null
164
+ }
165
+ ```
166
+
167
+ ---
168
+
169
+ ### `createPluginWithOptions`
170
+
171
+ Creates a new plugin with specified parameters.
172
+
173
+ **POST** `api/plugins/create`
174
+
175
+ **Request**
176
+
177
+ Body type: `CreatePluginWithOptionsRequest`
178
+
179
+ | Field | Type |
180
+ | --- | --- |
181
+ | `Name` | `string` |
182
+ | `Description` | `string` |
183
+ | `HolonSubType` | `HolonType` |
184
+ | `SourceFolderPath` | `string` |
185
+ | `CreateOptions` | `ISTARNETCreateOptions<Plugin, STARNETDNA>` |
186
+
187
+ **Response**
188
+
189
+ Standard `OASISResult` envelope (see top of this page) with:
190
+
191
+ `result` type: `IActionResult` (not part of the request/response payload).
192
+
193
+ **Example**
194
+
195
+ ```js
196
+ const { isError, message, result } = await star.plugins.createPluginWithOptions({
197
+ name: "example string",
198
+ description: "example string",
199
+ holonSubType: { },
200
+ sourceFolderPath: "example string",
201
+ 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>": {} } }
202
+ });
203
+ if (isError) throw new Error(message);
204
+ console.log(result);
205
+ ```
206
+
207
+ Example response:
208
+
209
+ ```json
210
+ {
211
+ "isError": false,
212
+ "message": "",
213
+ "result": null
214
+ }
215
+ ```
216
+
217
+ ---
218
+
219
+ ### `deactivatePlugin`
220
+
221
+ Deactivates a plugin.
222
+
223
+ **POST** `api/plugins/{id}/deactivate`
224
+
225
+ Route parameters:
226
+
227
+ | Field | Type |
228
+ | --- | --- |
229
+ | `id` | `Guid` |
230
+
231
+ **Request**
232
+
233
+ Body fields:
234
+
235
+ | Field | Type |
236
+ | --- | --- |
237
+ | `version` | `int (optional)` |
238
+
239
+ **Response**
240
+
241
+ Standard `OASISResult` envelope (see top of this page) with:
242
+
243
+ `result` type: `IActionResult` (not part of the request/response payload).
244
+
245
+ **Example**
246
+
247
+ ```js
248
+ const { isError, message, result } = await star.plugins.deactivatePlugin({
249
+ id: '<id>',
250
+ version: 1
251
+ });
252
+ if (isError) throw new Error(message);
253
+ console.log(result);
254
+ ```
255
+
256
+ Example response:
257
+
258
+ ```json
259
+ {
260
+ "isError": false,
261
+ "message": "",
262
+ "result": null
263
+ }
264
+ ```
265
+
266
+ ---
267
+
268
+ ### `deletePlugin`
269
+
270
+ **DELETE** `api/plugins/{id}`
271
+
272
+ Route parameters:
273
+
274
+ | Field | Type |
275
+ | --- | --- |
276
+ | `id` | `Guid` |
277
+
278
+ **Request**
279
+
280
+ No request body.
281
+
282
+ **Response**
283
+
284
+ Standard `OASISResult` envelope (see top of this page) with:
285
+
286
+ `result` type: `IActionResult` (not part of the request/response payload).
287
+
288
+ **Example**
289
+
290
+ ```js
291
+ const { isError, message, result } = await star.plugins.deletePlugin({
292
+ id: '<id>'
293
+ });
294
+ if (isError) throw new Error(message);
295
+ console.log(result);
296
+ ```
297
+
298
+ Example response:
299
+
300
+ ```json
301
+ {
302
+ "isError": false,
303
+ "message": "",
304
+ "result": null
305
+ }
306
+ ```
307
+
308
+ ---
309
+
310
+ ### `downloadPlugin`
311
+
312
+ Downloads a plugin from the STARNET system.
313
+
314
+ **POST** `api/plugins/{id}/download`
315
+
316
+ Route parameters:
317
+
318
+ | Field | Type |
319
+ | --- | --- |
320
+ | `id` | `Guid` |
321
+
322
+ **Request**
323
+
324
+ Body fields:
325
+
326
+ | Field | Type |
327
+ | --- | --- |
328
+ | `version` | `int (optional)` |
329
+ | `downloadPath` | `string (optional)` |
330
+ | `reInstall` | `bool (optional)` |
331
+
332
+ **Response**
333
+
334
+ Standard `OASISResult` envelope (see top of this page) with:
335
+
336
+ `result` type: `IActionResult` (not part of the request/response payload).
337
+
338
+ **Example**
339
+
340
+ ```js
341
+ const { isError, message, result } = await star.plugins.downloadPlugin({
342
+ id: '<id>',
343
+ version: 1,
344
+ downloadPath: 'example string',
345
+ reInstall: true
346
+ });
347
+ if (isError) throw new Error(message);
348
+ console.log(result);
349
+ ```
350
+
351
+ Example response:
352
+
353
+ ```json
354
+ {
355
+ "isError": false,
356
+ "message": "",
357
+ "result": null
358
+ }
359
+ ```
360
+
361
+ ---
362
+
363
+ ### `editPlugin`
364
+
365
+ Edits a plugin with new DNA configuration.
366
+
367
+ **POST** `api/plugins/{id}/edit`
368
+
369
+ Route parameters:
370
+
371
+ | Field | Type |
372
+ | --- | --- |
373
+ | `id` | `Guid` |
374
+
375
+ **Request**
376
+
377
+ Body type: `EditPluginRequest`
378
+
379
+ | Field | Type |
380
+ | --- | --- |
381
+ | `NewDNA` | `STARNETDNA` |
382
+
383
+ **Response**
384
+
385
+ Standard `OASISResult` envelope (see top of this page) with:
386
+
387
+ `result` type: `IActionResult` (not part of the request/response payload).
388
+
389
+ **Example**
390
+
391
+ ```js
392
+ const { isError, message, result } = await star.plugins.editPlugin({
393
+ id: '<id>',
394
+ 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 }
395
+ });
396
+ if (isError) throw new Error(message);
397
+ console.log(result);
398
+ ```
399
+
400
+ Example response:
401
+
402
+ ```json
403
+ {
404
+ "isError": false,
405
+ "message": "",
406
+ "result": null
407
+ }
408
+ ```
409
+
410
+ ---
411
+
412
+ ### `getAllPlugins`
413
+
414
+ Retrieves all plugins in the system.
415
+
416
+ **GET** `api/plugins`
417
+
418
+ **Request**
419
+
420
+ No request body.
421
+
422
+ **Response**
423
+
424
+ Standard `OASISResult` envelope (see top of this page) with:
425
+
426
+ `result` type: `IActionResult` (not part of the request/response payload).
427
+
428
+ **Example**
429
+
430
+ ```js
431
+ const { isError, message, result } = await star.plugins.getAllPlugins({});
432
+ if (isError) throw new Error(message);
433
+ console.log(result);
434
+ ```
435
+
436
+ Example response:
437
+
438
+ ```json
439
+ {
440
+ "isError": false,
441
+ "message": "",
442
+ "result": null
443
+ }
444
+ ```
445
+
446
+ ---
447
+
448
+ ### `getPlugin`
449
+
450
+ Retrieves a specific plugin by its unique identifier.
451
+
452
+ **GET** `api/plugins/{id}`
453
+
454
+ Route parameters:
455
+
456
+ | Field | Type |
457
+ | --- | --- |
458
+ | `id` | `Guid` |
459
+
460
+ **Request**
461
+
462
+ No request body.
463
+
464
+ **Response**
465
+
466
+ Standard `OASISResult` envelope (see top of this page) with:
467
+
468
+ `result` type: `IActionResult` (not part of the request/response payload).
469
+
470
+ **Example**
471
+
472
+ ```js
473
+ const { isError, message, result } = await star.plugins.getPlugin({
474
+ id: '<id>'
475
+ });
476
+ if (isError) throw new Error(message);
477
+ console.log(result);
478
+ ```
479
+
480
+ Example response:
481
+
482
+ ```json
483
+ {
484
+ "isError": false,
485
+ "message": "",
486
+ "result": null
487
+ }
488
+ ```
489
+
490
+ ---
491
+
492
+ ### `getPluginVersions`
493
+
494
+ Gets all versions of a specific plugin.
495
+
496
+ **GET** `api/plugins/{id}/versions`
497
+
498
+ Route parameters:
499
+
500
+ | Field | Type |
501
+ | --- | --- |
502
+ | `id` | `Guid` |
503
+
504
+ **Request**
505
+
506
+ No request body.
507
+
508
+ **Response**
509
+
510
+ Standard `OASISResult` envelope (see top of this page) with:
511
+
512
+ `result` type: `IActionResult` (not part of the request/response payload).
513
+
514
+ **Example**
515
+
516
+ ```js
517
+ const { isError, message, result } = await star.plugins.getPluginVersions({
518
+ id: '<id>'
519
+ });
520
+ if (isError) throw new Error(message);
521
+ console.log(result);
522
+ ```
523
+
524
+ Example response:
525
+
526
+ ```json
527
+ {
528
+ "isError": false,
529
+ "message": "",
530
+ "result": null
531
+ }
532
+ ```
533
+
534
+ ---
535
+
536
+ ### `getPluginsByType`
537
+
538
+ **GET** `api/plugins/by-type/{type}`
539
+
540
+ Route parameters:
541
+
542
+ | Field | Type |
543
+ | --- | --- |
544
+ | `type` | `string` |
545
+
546
+ **Request**
547
+
548
+ No request body.
549
+
550
+ **Response**
551
+
552
+ Standard `OASISResult` envelope (see top of this page) with:
553
+
554
+ `result` type: `IActionResult` (not part of the request/response payload).
555
+
556
+ **Example**
557
+
558
+ ```js
559
+ const { isError, message, result } = await star.plugins.getPluginsByType({
560
+ type: '<type>'
561
+ });
562
+ if (isError) throw new Error(message);
563
+ console.log(result);
564
+ ```
565
+
566
+ Example response:
567
+
568
+ ```json
569
+ {
570
+ "isError": false,
571
+ "message": "",
572
+ "result": null
573
+ }
574
+ ```
575
+
576
+ ---
577
+
578
+ ### `installPlugin`
579
+
580
+ **POST** `api/plugins/{id}/install`
581
+
582
+ Route parameters:
583
+
584
+ | Field | Type |
585
+ | --- | --- |
586
+ | `id` | `Guid` |
587
+
588
+ **Request**
589
+
590
+ No request body.
591
+
592
+ **Response**
593
+
594
+ Standard `OASISResult` envelope (see top of this page) with:
595
+
596
+ `result` type: `IActionResult` (not part of the request/response payload).
597
+
598
+ **Example**
599
+
600
+ ```js
601
+ const { isError, message, result } = await star.plugins.installPlugin({
602
+ id: '<id>'
603
+ });
604
+ if (isError) throw new Error(message);
605
+ console.log(result);
606
+ ```
607
+
608
+ Example response:
609
+
610
+ ```json
611
+ {
612
+ "isError": false,
613
+ "message": "",
614
+ "result": null
615
+ }
616
+ ```
617
+
618
+ ---
619
+
620
+ ### `loadAllPluginsForAvatar`
621
+
622
+ Loads all plugins for the authenticated avatar.
623
+
624
+ **GET** `api/plugins/load-all-for-avatar`
625
+
626
+ **Request**
627
+
628
+ Query parameters:
629
+
630
+ | Field | Type |
631
+ | --- | --- |
632
+ | `showAllVersions` | `bool (optional)` |
633
+ | `version` | `int (optional)` |
634
+
635
+ **Response**
636
+
637
+ Standard `OASISResult` envelope (see top of this page) with:
638
+
639
+ `result` type: `IActionResult` (not part of the request/response payload).
640
+
641
+ **Example**
642
+
643
+ ```js
644
+ const { isError, message, result } = await star.plugins.loadAllPluginsForAvatar({
645
+ showAllVersions: true,
646
+ version: 1
647
+ });
648
+ if (isError) throw new Error(message);
649
+ console.log(result);
650
+ ```
651
+
652
+ Example response:
653
+
654
+ ```json
655
+ {
656
+ "isError": false,
657
+ "message": "",
658
+ "result": null
659
+ }
660
+ ```
661
+
662
+ ---
663
+
664
+ ### `loadPlugin`
665
+
666
+ Loads a plugin by ID with optional version and holon type.
667
+
668
+ **GET** `api/plugins/{id}/load`
669
+
670
+ Route parameters:
671
+
672
+ | Field | Type |
673
+ | --- | --- |
674
+ | `id` | `Guid` |
675
+
676
+ **Request**
677
+
678
+ Query parameters:
679
+
680
+ | Field | Type |
681
+ | --- | --- |
682
+ | `version` | `int (optional)` |
683
+ | `holonType` | `string (optional)` |
684
+
685
+ **Response**
686
+
687
+ Standard `OASISResult` envelope (see top of this page) with:
688
+
689
+ `result` type: `IActionResult` (not part of the request/response payload).
690
+
691
+ **Example**
692
+
693
+ ```js
694
+ const { isError, message, result } = await star.plugins.loadPlugin({
695
+ id: '<id>',
696
+ version: 1,
697
+ holonType: 'example string'
698
+ });
699
+ if (isError) throw new Error(message);
700
+ console.log(result);
701
+ ```
702
+
703
+ Example response:
704
+
705
+ ```json
706
+ {
707
+ "isError": false,
708
+ "message": "",
709
+ "result": null
710
+ }
711
+ ```
712
+
713
+ ---
714
+
715
+ ### `loadPluginFromPath`
716
+
717
+ Loads a plugin from source or installed folder path.
718
+
719
+ **GET** `api/plugins/load-from-path`
720
+
721
+ **Request**
722
+
723
+ Query parameters:
724
+
725
+ | Field | Type |
726
+ | --- | --- |
727
+ | `path` | `string` |
728
+ | `holonType` | `string (optional)` |
729
+
730
+ **Response**
731
+
732
+ Standard `OASISResult` envelope (see top of this page) with:
733
+
734
+ `result` type: `IActionResult` (not part of the request/response payload).
735
+
736
+ **Example**
737
+
738
+ ```js
739
+ const { isError, message, result } = await star.plugins.loadPluginFromPath({
740
+ path: 'example string',
741
+ holonType: 'example string'
742
+ });
743
+ if (isError) throw new Error(message);
744
+ console.log(result);
745
+ ```
746
+
747
+ Example response:
748
+
749
+ ```json
750
+ {
751
+ "isError": false,
752
+ "message": "",
753
+ "result": null
754
+ }
755
+ ```
756
+
757
+ ---
758
+
759
+ ### `loadPluginFromPublished`
760
+
761
+ Loads a plugin from a published file.
762
+
763
+ **GET** `api/plugins/load-from-published`
764
+
765
+ **Request**
766
+
767
+ Query parameters:
768
+
769
+ | Field | Type |
770
+ | --- | --- |
771
+ | `publishedFilePath` | `string` |
772
+
773
+ **Response**
774
+
775
+ Standard `OASISResult` envelope (see top of this page) with:
776
+
777
+ `result` type: `IActionResult` (not part of the request/response payload).
778
+
779
+ **Example**
780
+
781
+ ```js
782
+ const { isError, message, result } = await star.plugins.loadPluginFromPublished({
783
+ publishedFilePath: 'example string'
784
+ });
785
+ if (isError) throw new Error(message);
786
+ console.log(result);
787
+ ```
788
+
789
+ Example response:
790
+
791
+ ```json
792
+ {
793
+ "isError": false,
794
+ "message": "",
795
+ "result": null
796
+ }
797
+ ```
798
+
799
+ ---
800
+
801
+ ### `loadPluginVersion`
802
+
803
+ Loads a specific version of a plugin.
804
+
805
+ **GET** `api/plugins/{id}/version/{version}`
806
+
807
+ Route parameters:
808
+
809
+ | Field | Type |
810
+ | --- | --- |
811
+ | `id` | `Guid` |
812
+ | `version` | `string` |
813
+
814
+ **Request**
815
+
816
+ No request body.
817
+
818
+ **Response**
819
+
820
+ Standard `OASISResult` envelope (see top of this page) with:
821
+
822
+ `result` type: `IActionResult` (not part of the request/response payload).
823
+
824
+ **Example**
825
+
826
+ ```js
827
+ const { isError, message, result } = await star.plugins.loadPluginVersion({
828
+ id: '<id>',
829
+ version: '<version>'
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
+ ### `publishPlugin`
848
+
849
+ Publishes a plugin to the STARNET system.
850
+
851
+ **POST** `api/plugins/{id}/publish`
852
+
853
+ Route parameters:
854
+
855
+ | Field | Type |
856
+ | --- | --- |
857
+ | `id` | `Guid` |
858
+
859
+ **Request**
860
+
861
+ Body type: `PublishRequest`
862
+
863
+ | Field | Type |
864
+ | --- | --- |
865
+ | `SourcePath` | `string` |
866
+ | `LaunchTarget` | `string` |
867
+ | `PublishPath` | `string` |
868
+ | `Edit` | `bool` |
869
+ | `RegisterOnSTARNET` | `bool` |
870
+ | `GenerateBinary` | `bool` |
871
+ | `UploadToCloud` | `bool` |
872
+
873
+ **Response**
874
+
875
+ Standard `OASISResult` envelope (see top of this page) with:
876
+
877
+ `result` type: `IActionResult` (not part of the request/response payload).
878
+
879
+ **Example**
880
+
881
+ ```js
882
+ const { isError, message, result } = await star.plugins.publishPlugin({
883
+ id: '<id>',
884
+ sourcePath: "example string",
885
+ launchTarget: "example string",
886
+ publishPath: "example string",
887
+ edit: true,
888
+ registerOnSTARNET: true,
889
+ generateBinary: true,
890
+ uploadToCloud: true
891
+ });
892
+ if (isError) throw new Error(message);
893
+ console.log(result);
894
+ ```
895
+
896
+ Example response:
897
+
898
+ ```json
899
+ {
900
+ "isError": false,
901
+ "message": "",
902
+ "result": null
903
+ }
904
+ ```
905
+
906
+ ---
907
+
908
+ ### `republishPlugin`
909
+
910
+ Republishes a plugin to the STARNET system.
911
+
912
+ **POST** `api/plugins/{id}/republish`
913
+
914
+ Route parameters:
915
+
916
+ | Field | Type |
917
+ | --- | --- |
918
+ | `id` | `Guid` |
919
+
920
+ **Request**
921
+
922
+ Body fields:
923
+
924
+ | Field | Type |
925
+ | --- | --- |
926
+ | `version` | `int (optional)` |
927
+
928
+ **Response**
929
+
930
+ Standard `OASISResult` envelope (see top of this page) with:
931
+
932
+ `result` type: `IActionResult` (not part of the request/response payload).
933
+
934
+ **Example**
935
+
936
+ ```js
937
+ const { isError, message, result } = await star.plugins.republishPlugin({
938
+ id: '<id>',
939
+ version: 1
940
+ });
941
+ if (isError) throw new Error(message);
942
+ console.log(result);
943
+ ```
944
+
945
+ Example response:
946
+
947
+ ```json
948
+ {
949
+ "isError": false,
950
+ "message": "",
951
+ "result": null
952
+ }
953
+ ```
954
+
955
+ ---
956
+
957
+ ### `searchPlugins`
958
+
959
+ **GET** `api/plugins/search`
960
+
961
+ **Request**
962
+
963
+ Query parameters:
964
+
965
+ | Field | Type |
966
+ | --- | --- |
967
+ | `searchTerm` | `string` |
968
+
969
+ **Response**
970
+
971
+ Standard `OASISResult` envelope (see top of this page) with:
972
+
973
+ `result` type: `IActionResult` (not part of the request/response payload).
974
+
975
+ **Example**
976
+
977
+ ```js
978
+ const { isError, message, result } = await star.plugins.searchPlugins({
979
+ searchTerm: 'example string'
980
+ });
981
+ if (isError) throw new Error(message);
982
+ console.log(result);
983
+ ```
984
+
985
+ Example response:
986
+
987
+ ```json
988
+ {
989
+ "isError": false,
990
+ "message": "",
991
+ "result": null
992
+ }
993
+ ```
994
+
995
+ ---
996
+
997
+ ### `uninstallPlugin`
998
+
999
+ **POST** `api/plugins/{id}/uninstall`
1000
+
1001
+ Route parameters:
1002
+
1003
+ | Field | Type |
1004
+ | --- | --- |
1005
+ | `id` | `Guid` |
1006
+
1007
+ **Request**
1008
+
1009
+ No request body.
1010
+
1011
+ **Response**
1012
+
1013
+ Standard `OASISResult` envelope (see top of this page) with:
1014
+
1015
+ `result` type: `IActionResult` (not part of the request/response payload).
1016
+
1017
+ **Example**
1018
+
1019
+ ```js
1020
+ const { isError, message, result } = await star.plugins.uninstallPlugin({
1021
+ id: '<id>'
1022
+ });
1023
+ if (isError) throw new Error(message);
1024
+ console.log(result);
1025
+ ```
1026
+
1027
+ Example response:
1028
+
1029
+ ```json
1030
+ {
1031
+ "isError": false,
1032
+ "message": "",
1033
+ "result": null
1034
+ }
1035
+ ```
1036
+
1037
+ ---
1038
+
1039
+ ### `unpublishPlugin`
1040
+
1041
+ Unpublishes a plugin from the STARNET system.
1042
+
1043
+ **POST** `api/plugins/{id}/unpublish`
1044
+
1045
+ Route parameters:
1046
+
1047
+ | Field | Type |
1048
+ | --- | --- |
1049
+ | `id` | `Guid` |
1050
+
1051
+ **Request**
1052
+
1053
+ Body fields:
1054
+
1055
+ | Field | Type |
1056
+ | --- | --- |
1057
+ | `version` | `int (optional)` |
1058
+
1059
+ **Response**
1060
+
1061
+ Standard `OASISResult` envelope (see top of this page) with:
1062
+
1063
+ `result` type: `IActionResult` (not part of the request/response payload).
1064
+
1065
+ **Example**
1066
+
1067
+ ```js
1068
+ const { isError, message, result } = await star.plugins.unpublishPlugin({
1069
+ id: '<id>',
1070
+ version: 1
1071
+ });
1072
+ if (isError) throw new Error(message);
1073
+ console.log(result);
1074
+ ```
1075
+
1076
+ Example response:
1077
+
1078
+ ```json
1079
+ {
1080
+ "isError": false,
1081
+ "message": "",
1082
+ "result": null
1083
+ }
1084
+ ```
1085
+
1086
+ ---
1087
+
1088
+ ### `updatePlugin`
1089
+
1090
+ **PUT** `api/plugins/{id}`
1091
+
1092
+ Route parameters:
1093
+
1094
+ | Field | Type |
1095
+ | --- | --- |
1096
+ | `id` | `Guid` |
1097
+
1098
+ **Request**
1099
+
1100
+ Body type: `UpdatePluginRequest`
1101
+
1102
+ | Field | Type |
1103
+ | --- | --- |
1104
+ | `Name` | `string?` |
1105
+ | `Description` | `string?` |
1106
+ | `Category` | `string?` |
1107
+ | `Version` | `string?` |
1108
+
1109
+ **Response**
1110
+
1111
+ Standard `OASISResult` envelope (see top of this page) with:
1112
+
1113
+ `result` type: `IActionResult` (not part of the request/response payload).
1114
+
1115
+ **Example**
1116
+
1117
+ ```js
1118
+ const { isError, message, result } = await star.plugins.updatePlugin({
1119
+ id: '<id>',
1120
+ name: "example string",
1121
+ description: "example string",
1122
+ category: "example string",
1123
+ version: "example string"
1124
+ });
1125
+ if (isError) throw new Error(message);
1126
+ console.log(result);
1127
+ ```
1128
+
1129
+ Example response:
1130
+
1131
+ ```json
1132
+ {
1133
+ "isError": false,
1134
+ "message": "",
1135
+ "result": null
1136
+ }
1137
+ ```
1138
+