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