@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.
- package/README.md +250 -0
- package/docs/README.md +44 -0
- package/docs/modules/Avatar.md +606 -0
- package/docs/modules/CelestialBodies.md +1051 -0
- package/docs/modules/CelestialBodiesMetaData.md +949 -0
- package/docs/modules/CelestialSpaces.md +1051 -0
- package/docs/modules/Chapters.md +955 -0
- package/docs/modules/Competition.md +594 -0
- package/docs/modules/Cosmic.md +3653 -0
- package/docs/modules/Games.md +2619 -0
- package/docs/modules/GeoHotSpots.md +1027 -0
- package/docs/modules/GeoNFTs.md +1049 -0
- package/docs/modules/Health.md +90 -0
- package/docs/modules/Holons.md +1139 -0
- package/docs/modules/HolonsMetaData.md +949 -0
- package/docs/modules/InventoryItems.md +1071 -0
- package/docs/modules/Libraries.md +1052 -0
- package/docs/modules/Missions.md +1286 -0
- package/docs/modules/NFTs.md +1008 -0
- package/docs/modules/OAPPs.md +1190 -0
- package/docs/modules/Parks.md +1079 -0
- package/docs/modules/Plugins.md +1138 -0
- package/docs/modules/Quests.md +1941 -0
- package/docs/modules/Runtimes.md +1112 -0
- package/docs/modules/STAR.md +178 -0
- package/docs/modules/Templates.md +990 -0
- package/docs/modules/Zomes.md +1049 -0
- package/docs/modules/ZomesMetaData.md +949 -0
- package/index.d.ts +97 -0
- package/index.js +3 -0
- package/index.mjs +4 -0
- package/package.json +117 -0
- package/src/core/httpClient.js +110 -0
- package/src/core/routeHelper.js +85 -0
- package/src/core/tokenStore.js +52 -0
- package/src/core/types.d.ts +18 -0
- package/src/index.js +60 -0
- package/src/modules/Auth.d.ts +15 -0
- package/src/modules/Auth.js +62 -0
- package/src/modules/Avatar.d.ts +45 -0
- package/src/modules/Avatar.js +47 -0
- package/src/modules/CelestialBodies.d.ts +72 -0
- package/src/modules/CelestialBodies.js +65 -0
- package/src/modules/CelestialBodiesMetaData.d.ts +69 -0
- package/src/modules/CelestialBodiesMetaData.js +61 -0
- package/src/modules/CelestialSpaces.d.ts +72 -0
- package/src/modules/CelestialSpaces.js +65 -0
- package/src/modules/Chapters.d.ts +66 -0
- package/src/modules/Chapters.js +61 -0
- package/src/modules/Competition.d.ts +33 -0
- package/src/modules/Competition.js +39 -0
- package/src/modules/Cosmic.d.ts +222 -0
- package/src/modules/Cosmic.js +165 -0
- package/src/modules/Games.d.ts +171 -0
- package/src/modules/Games.js +131 -0
- package/src/modules/GeoHotSpots.d.ts +66 -0
- package/src/modules/GeoHotSpots.js +61 -0
- package/src/modules/GeoNFTs.d.ts +72 -0
- package/src/modules/GeoNFTs.js +65 -0
- package/src/modules/Health.d.ts +12 -0
- package/src/modules/Health.js +25 -0
- package/src/modules/Holons.d.ts +78 -0
- package/src/modules/Holons.js +69 -0
- package/src/modules/HolonsMetaData.d.ts +69 -0
- package/src/modules/HolonsMetaData.js +61 -0
- package/src/modules/InventoryItems.d.ts +69 -0
- package/src/modules/InventoryItems.js +63 -0
- package/src/modules/Libraries.d.ts +72 -0
- package/src/modules/Libraries.js +65 -0
- package/src/modules/Missions.d.ts +87 -0
- package/src/modules/Missions.js +75 -0
- package/src/modules/NFTs.d.ts +69 -0
- package/src/modules/NFTs.js +63 -0
- package/src/modules/OAPPs.d.ts +69 -0
- package/src/modules/OAPPs.js +61 -0
- package/src/modules/Parks.d.ts +72 -0
- package/src/modules/Parks.js +65 -0
- package/src/modules/Plugins.d.ts +78 -0
- package/src/modules/Plugins.js +69 -0
- package/src/modules/Quests.d.ts +129 -0
- package/src/modules/Quests.js +101 -0
- package/src/modules/Runtimes.d.ts +81 -0
- package/src/modules/Runtimes.js +69 -0
- package/src/modules/STAR.d.ts +18 -0
- package/src/modules/STAR.js +29 -0
- package/src/modules/Templates.d.ts +72 -0
- package/src/modules/Templates.js +63 -0
- package/src/modules/Zomes.d.ts +72 -0
- package/src/modules/Zomes.js +65 -0
- package/src/modules/ZomesMetaData.d.ts +69 -0
- package/src/modules/ZomesMetaData.js +61 -0
- package/src/modules/index.js +67 -0
|
@@ -0,0 +1,1139 @@
|
|
|
1
|
+
# Holons — `star.holons`
|
|
2
|
+
|
|
3
|
+
Source controller: [`HolonsController.cs`](https://github.com/NextGenSoftwareUK/OASIS2/blob/main/STAR%20ODK/NextGenSoftware.OASIS.STAR.WebAPI/Controllers/HolonsController.cs)
|
|
4
|
+
Route prefix: `api/holons`
|
|
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
|
+
### `activateHolon`
|
|
22
|
+
|
|
23
|
+
Activates a holon.
|
|
24
|
+
|
|
25
|
+
**POST** `api/holons/{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.holons.activateHolon({
|
|
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
|
+
### `createHolon`
|
|
71
|
+
|
|
72
|
+
Creates a new holon for the authenticated avatar.
|
|
73
|
+
|
|
74
|
+
**POST** `api/holons`
|
|
75
|
+
|
|
76
|
+
**Request**
|
|
77
|
+
|
|
78
|
+
Body type: `STARHolon`
|
|
79
|
+
|
|
80
|
+
| Field | Type |
|
|
81
|
+
| --- | --- |
|
|
82
|
+
| `HolonType` | `new HolonType` |
|
|
83
|
+
| `Holon` | `IHolon` |
|
|
84
|
+
| `HolonId` | `Guid` |
|
|
85
|
+
|
|
86
|
+
**Response**
|
|
87
|
+
|
|
88
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
89
|
+
|
|
90
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
91
|
+
|
|
92
|
+
**Example**
|
|
93
|
+
|
|
94
|
+
```js
|
|
95
|
+
const { isError, message, result } = await star.holons.createHolon({
|
|
96
|
+
holonType: /* <new HolonType> */,
|
|
97
|
+
holon: { "CreatedOASISType": { "Score": 1.0 }, "CreatedProviderType": { "Score": 1.0 }, "GlobalHolonData": { }, "InstanceSavedOnProviderType": {}, "IsChanged": true, "IsNewHolon": true, "IsSaving": true, "Original": {}, "PreviousVersionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "PreviousVersionProviderUniqueStorageKey": { "<ProviderType>": "example string" }, "ProviderMetaData": { "<ProviderType>": { "<string>": "example string" } }, "ProviderUniqueStorageKey": { "<ProviderType>": "example string" }, "Nodes": [{ "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Parent": {}, "NodeName": "example string", "NodeType": { } }], "ParentOmniverseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentOmniverse": { "GreatGrandSuperStar": { }, "Dimensions": { "EighthDimension": { }, "NinthDimension": { }, "TenthDimension": { }, "EleventhDimension": { }, "TwelfthDimension": { }, "CustomDimensions": [{ "DimensionLevel": { } }] }, "Multiverses": [{ "GrandSuperStar": { "Stars": [ /* <I> */ ] }, "Dimensions": { "FirstDimension": { "Universe": { "Dimensions": [], "GalaxyClusters": [{ "Galaxies": [{ "SuperStar": { "Stars": [{ "Luminosity": 1, "StarType": { }, "StarClassification": { }, "StarBinaryType": { } }] }, "SolarSystems": [{ "Star": {}, "Planets": [{ "Moons": [{ }] }], "Asteroids": [{ }], "Comets": [{ }], "Meteroids": [{ }] }], "Nebulas": [{ }], "Stars": [], "Planets": [], "Asteroids": [], "Comets": [], "Meteroids": [] }], "SolarSystems": [], "Stars": [], "Planets": [], "Asteroids": [], "Comets": [], "Meteroids": [], "IsSuperCluster": true }], "SolarSystems": [], "Nebulas": [], "Stars": [], "Planets": [], "Asteroids": [], "Comets": [], "Meteroids": [] } }, "SecondDimension": { "Universe": {} }, "ThirdDimension": { "UniversePrime": {}, "MagicVerse": {}, "ParallelUniverses": [] }, "FourthDimension": { "Universe": {} }, "FifthDimension": { "Universe": {} }, "SixthDimension": { "Universe": {} }, "SeventhDimension": { "Universe": {} }, "CustomDimensions": [] } }] }, "ParentMultiverseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentMultiverse": {}, "ParentUniverseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentUniverse": {}, "ParentDimensionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentDimension": {}, "DimensionLevel": {}, "SubDimensionLevel": { }, "ParentGalaxyClusterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentGalaxyCluster": {}, "ParentGalaxyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentGalaxy": {}, "ParentSolarSystemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentSolarSystem": {}, "ParentGreatGrandSuperStarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentGreatGrandSuperStar": {}, "ParentGrandSuperStarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentGrandSuperStar": {}, "ParentSuperStarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentSuperStar": {}, "ParentStarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentStar": {}, "ParentPlanetId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentPlanet": {}, "ParentMoonId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentMoon": {}, "ParentCelestialSpaceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentCelestialSpace": { "NearestStar": {}, "CelestialBodies": /* <ReadOnlyCollection<ICelestialBody>> */, "CelestialSpaces": /* <ReadOnlyCollection<ICelestialSpace>> */, "Children": /* <new ReadOnlyCollection<IHolon>> */ }, "ParentCelestialBodyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentCelestialBody": { "CelestialBodyCore": { "Holons": [], "Zomes": [{ "HoloNETClient": { "WebSocket": /* <WebSocket.WebSocket> */, "Logger": /* <ILogger> */, "HolochainVersion": { } }, "ZomeName": "example string", "Holons": [{ "GlobalHolonData": {}, "ProviderUniqueStorageKey": { "<ProviderType>": "example string" }, "ProviderMetaData": { "<ProviderType>": { "<string>": "example string" } }, "CustomKey": "example string", "IsNewHolon": true, "IsSaving": true, "PreviousVersionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "PreviousVersionProviderUniqueStorageKey": { "<ProviderType>": "example string" }, "CreatedProviderType": {}, "InstanceSavedOnProviderType": {}, "CreatedOASISType": {}, "Nodes": [], "ParentOmniverseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentOmniverse": {}, "ParentMultiverseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentMultiverse": {}, "ParentUniverseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentUniverse": {}, "ParentDimensionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentDimension": {}, "DimensionLevel": {}, "SubDimensionLevel": {}, "ParentGalaxyClusterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentGalaxyCluster": {}, "ParentGalaxyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentGalaxy": {}, "ParentSolarSystemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentSolarSystem": {}, "ParentGreatGrandSuperStarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentGreatGrandSuperStar": {}, "ParentGrandSuperStarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentGrandSuperStar": {}, "ParentSuperStarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentSuperStar": {}, "ParentStarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentStar": {}, "ParentPlanetId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentPlanet": {}, "ParentMoonId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentMoon": {}, "ParentCelestialSpaceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentCelestialSpace": {}, "ParentCelestialBodyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentCelestialBody": {}, "ParentZomeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentZome": {} }] }] }, "CurrentOrbitAngleOfParentStar": 1, "Density": 1, "DistanceFromParentStarInMetres": 1, "GravitaionalPull": 1, "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Mass": 1, "NumberActiveAvatars": 1, "NumberRegisteredAvatars": 1, "OrbitPeriod": 1, "OrbitPositionFromParentStar": 1, "ProviderUniqueStorageKey": { "<ProviderType>": "example string" }, "RotationPeriod": 1, "RotationSpeed": 1, "TiltAngle": 1, "Weight": 1 }, "ParentZomeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentZome": {} },
|
|
98
|
+
holonId: "3fa85f64-5717-4562-b3fc-2c963f66afa6"
|
|
99
|
+
});
|
|
100
|
+
if (isError) throw new Error(message);
|
|
101
|
+
console.log(result);
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Example response:
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"isError": false,
|
|
109
|
+
"message": "",
|
|
110
|
+
"result": null
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
### `createHolonWithOptions`
|
|
117
|
+
|
|
118
|
+
Creates a new holon with specified parameters.
|
|
119
|
+
|
|
120
|
+
**POST** `api/holons/create`
|
|
121
|
+
|
|
122
|
+
**Request**
|
|
123
|
+
|
|
124
|
+
Body type: `CreateHolonRequest`
|
|
125
|
+
|
|
126
|
+
| Field | Type |
|
|
127
|
+
| --- | --- |
|
|
128
|
+
| `Name` | `string` |
|
|
129
|
+
| `Description` | `string` |
|
|
130
|
+
| `HolonSubType` | `HolonType` |
|
|
131
|
+
| `SourceFolderPath` | `string` |
|
|
132
|
+
| `CreateOptions` | `ISTARNETCreateOptions<STARHolon, STARNETDNA>` |
|
|
133
|
+
|
|
134
|
+
**Response**
|
|
135
|
+
|
|
136
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
137
|
+
|
|
138
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
139
|
+
|
|
140
|
+
**Example**
|
|
141
|
+
|
|
142
|
+
```js
|
|
143
|
+
const { isError, message, result } = await star.holons.createHolonWithOptions({
|
|
144
|
+
name: "example string",
|
|
145
|
+
description: "example string",
|
|
146
|
+
holonSubType: { },
|
|
147
|
+
sourceFolderPath: "example string",
|
|
148
|
+
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>": {} } }
|
|
149
|
+
});
|
|
150
|
+
if (isError) throw new Error(message);
|
|
151
|
+
console.log(result);
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Example response:
|
|
155
|
+
|
|
156
|
+
```json
|
|
157
|
+
{
|
|
158
|
+
"isError": false,
|
|
159
|
+
"message": "",
|
|
160
|
+
"result": null
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
### `deactivateHolon`
|
|
167
|
+
|
|
168
|
+
Deactivates a holon.
|
|
169
|
+
|
|
170
|
+
**POST** `api/holons/{id}/deactivate`
|
|
171
|
+
|
|
172
|
+
Route parameters:
|
|
173
|
+
|
|
174
|
+
| Field | Type |
|
|
175
|
+
| --- | --- |
|
|
176
|
+
| `id` | `Guid` |
|
|
177
|
+
|
|
178
|
+
**Request**
|
|
179
|
+
|
|
180
|
+
Body fields:
|
|
181
|
+
|
|
182
|
+
| Field | Type |
|
|
183
|
+
| --- | --- |
|
|
184
|
+
| `version` | `int (optional)` |
|
|
185
|
+
|
|
186
|
+
**Response**
|
|
187
|
+
|
|
188
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
189
|
+
|
|
190
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
191
|
+
|
|
192
|
+
**Example**
|
|
193
|
+
|
|
194
|
+
```js
|
|
195
|
+
const { isError, message, result } = await star.holons.deactivateHolon({
|
|
196
|
+
id: '<id>',
|
|
197
|
+
version: 1
|
|
198
|
+
});
|
|
199
|
+
if (isError) throw new Error(message);
|
|
200
|
+
console.log(result);
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Example response:
|
|
204
|
+
|
|
205
|
+
```json
|
|
206
|
+
{
|
|
207
|
+
"isError": false,
|
|
208
|
+
"message": "",
|
|
209
|
+
"result": null
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
### `deleteHolon`
|
|
216
|
+
|
|
217
|
+
Deletes a holon by its unique identifier.
|
|
218
|
+
|
|
219
|
+
**DELETE** `api/holons/{id}`
|
|
220
|
+
|
|
221
|
+
Route parameters:
|
|
222
|
+
|
|
223
|
+
| Field | Type |
|
|
224
|
+
| --- | --- |
|
|
225
|
+
| `id` | `Guid` |
|
|
226
|
+
|
|
227
|
+
**Request**
|
|
228
|
+
|
|
229
|
+
No request body.
|
|
230
|
+
|
|
231
|
+
**Response**
|
|
232
|
+
|
|
233
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
234
|
+
|
|
235
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
236
|
+
|
|
237
|
+
**Example**
|
|
238
|
+
|
|
239
|
+
```js
|
|
240
|
+
const { isError, message, result } = await star.holons.deleteHolon({
|
|
241
|
+
id: '<id>'
|
|
242
|
+
});
|
|
243
|
+
if (isError) throw new Error(message);
|
|
244
|
+
console.log(result);
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Example response:
|
|
248
|
+
|
|
249
|
+
```json
|
|
250
|
+
{
|
|
251
|
+
"isError": false,
|
|
252
|
+
"message": "",
|
|
253
|
+
"result": null
|
|
254
|
+
}
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
### `downloadHolon`
|
|
260
|
+
|
|
261
|
+
Downloads a holon from the STARNET system.
|
|
262
|
+
|
|
263
|
+
**POST** `api/holons/{id}/download`
|
|
264
|
+
|
|
265
|
+
Route parameters:
|
|
266
|
+
|
|
267
|
+
| Field | Type |
|
|
268
|
+
| --- | --- |
|
|
269
|
+
| `id` | `Guid` |
|
|
270
|
+
|
|
271
|
+
**Request**
|
|
272
|
+
|
|
273
|
+
Body fields:
|
|
274
|
+
|
|
275
|
+
| Field | Type |
|
|
276
|
+
| --- | --- |
|
|
277
|
+
| `version` | `int (optional)` |
|
|
278
|
+
| `downloadPath` | `string (optional)` |
|
|
279
|
+
| `reInstall` | `bool (optional)` |
|
|
280
|
+
|
|
281
|
+
**Response**
|
|
282
|
+
|
|
283
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
284
|
+
|
|
285
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
286
|
+
|
|
287
|
+
**Example**
|
|
288
|
+
|
|
289
|
+
```js
|
|
290
|
+
const { isError, message, result } = await star.holons.downloadHolon({
|
|
291
|
+
id: '<id>',
|
|
292
|
+
version: 1,
|
|
293
|
+
downloadPath: 'example string',
|
|
294
|
+
reInstall: true
|
|
295
|
+
});
|
|
296
|
+
if (isError) throw new Error(message);
|
|
297
|
+
console.log(result);
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
Example response:
|
|
301
|
+
|
|
302
|
+
```json
|
|
303
|
+
{
|
|
304
|
+
"isError": false,
|
|
305
|
+
"message": "",
|
|
306
|
+
"result": null
|
|
307
|
+
}
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
|
|
312
|
+
### `editHolon`
|
|
313
|
+
|
|
314
|
+
Edits a holon with new DNA configuration.
|
|
315
|
+
|
|
316
|
+
**POST** `api/holons/{id}/edit`
|
|
317
|
+
|
|
318
|
+
Route parameters:
|
|
319
|
+
|
|
320
|
+
| Field | Type |
|
|
321
|
+
| --- | --- |
|
|
322
|
+
| `id` | `Guid` |
|
|
323
|
+
|
|
324
|
+
**Request**
|
|
325
|
+
|
|
326
|
+
Body type: `EditHolonRequest`
|
|
327
|
+
|
|
328
|
+
| Field | Type |
|
|
329
|
+
| --- | --- |
|
|
330
|
+
| `NewDNA` | `STARNETDNA` |
|
|
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.holons.editHolon({
|
|
342
|
+
id: '<id>',
|
|
343
|
+
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 }
|
|
344
|
+
});
|
|
345
|
+
if (isError) throw new Error(message);
|
|
346
|
+
console.log(result);
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
Example response:
|
|
350
|
+
|
|
351
|
+
```json
|
|
352
|
+
{
|
|
353
|
+
"isError": false,
|
|
354
|
+
"message": "",
|
|
355
|
+
"result": null
|
|
356
|
+
}
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
### `getAllHolons`
|
|
362
|
+
|
|
363
|
+
Retrieves all holons in the system.
|
|
364
|
+
|
|
365
|
+
**GET** `api/holons`
|
|
366
|
+
|
|
367
|
+
**Request**
|
|
368
|
+
|
|
369
|
+
No request body.
|
|
370
|
+
|
|
371
|
+
**Response**
|
|
372
|
+
|
|
373
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
374
|
+
|
|
375
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
376
|
+
|
|
377
|
+
**Example**
|
|
378
|
+
|
|
379
|
+
```js
|
|
380
|
+
const { isError, message, result } = await star.holons.getAllHolons({});
|
|
381
|
+
if (isError) throw new Error(message);
|
|
382
|
+
console.log(result);
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
Example response:
|
|
386
|
+
|
|
387
|
+
```json
|
|
388
|
+
{
|
|
389
|
+
"isError": false,
|
|
390
|
+
"message": "",
|
|
391
|
+
"result": null
|
|
392
|
+
}
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
---
|
|
396
|
+
|
|
397
|
+
### `getHolon`
|
|
398
|
+
|
|
399
|
+
Retrieves a specific holon by its unique identifier.
|
|
400
|
+
|
|
401
|
+
**GET** `api/holons/{id}`
|
|
402
|
+
|
|
403
|
+
Route parameters:
|
|
404
|
+
|
|
405
|
+
| Field | Type |
|
|
406
|
+
| --- | --- |
|
|
407
|
+
| `id` | `Guid` |
|
|
408
|
+
|
|
409
|
+
**Request**
|
|
410
|
+
|
|
411
|
+
No request body.
|
|
412
|
+
|
|
413
|
+
**Response**
|
|
414
|
+
|
|
415
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
416
|
+
|
|
417
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
418
|
+
|
|
419
|
+
**Example**
|
|
420
|
+
|
|
421
|
+
```js
|
|
422
|
+
const { isError, message, result } = await star.holons.getHolon({
|
|
423
|
+
id: '<id>'
|
|
424
|
+
});
|
|
425
|
+
if (isError) throw new Error(message);
|
|
426
|
+
console.log(result);
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
Example response:
|
|
430
|
+
|
|
431
|
+
```json
|
|
432
|
+
{
|
|
433
|
+
"isError": false,
|
|
434
|
+
"message": "",
|
|
435
|
+
"result": null
|
|
436
|
+
}
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
---
|
|
440
|
+
|
|
441
|
+
### `getHolonVersions`
|
|
442
|
+
|
|
443
|
+
Gets all versions of a specific holon.
|
|
444
|
+
|
|
445
|
+
**GET** `api/holons/{id}/versions`
|
|
446
|
+
|
|
447
|
+
Route parameters:
|
|
448
|
+
|
|
449
|
+
| Field | Type |
|
|
450
|
+
| --- | --- |
|
|
451
|
+
| `id` | `Guid` |
|
|
452
|
+
|
|
453
|
+
**Request**
|
|
454
|
+
|
|
455
|
+
No request body.
|
|
456
|
+
|
|
457
|
+
**Response**
|
|
458
|
+
|
|
459
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
460
|
+
|
|
461
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
462
|
+
|
|
463
|
+
**Example**
|
|
464
|
+
|
|
465
|
+
```js
|
|
466
|
+
const { isError, message, result } = await star.holons.getHolonVersions({
|
|
467
|
+
id: '<id>'
|
|
468
|
+
});
|
|
469
|
+
if (isError) throw new Error(message);
|
|
470
|
+
console.log(result);
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
Example response:
|
|
474
|
+
|
|
475
|
+
```json
|
|
476
|
+
{
|
|
477
|
+
"isError": false,
|
|
478
|
+
"message": "",
|
|
479
|
+
"result": null
|
|
480
|
+
}
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
---
|
|
484
|
+
|
|
485
|
+
### `getHolonsByMetadata`
|
|
486
|
+
|
|
487
|
+
Retrieves all holons that match specific metadata criteria.
|
|
488
|
+
|
|
489
|
+
**GET** `api/holons/by-metadata`
|
|
490
|
+
|
|
491
|
+
**Request**
|
|
492
|
+
|
|
493
|
+
Query parameters:
|
|
494
|
+
|
|
495
|
+
| Field | Type |
|
|
496
|
+
| --- | --- |
|
|
497
|
+
| `key` | `string` |
|
|
498
|
+
| `value` | `string` |
|
|
499
|
+
|
|
500
|
+
**Response**
|
|
501
|
+
|
|
502
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
503
|
+
|
|
504
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
505
|
+
|
|
506
|
+
**Example**
|
|
507
|
+
|
|
508
|
+
```js
|
|
509
|
+
const { isError, message, result } = await star.holons.getHolonsByMetadata({
|
|
510
|
+
key: 'example string',
|
|
511
|
+
value: 'example string'
|
|
512
|
+
});
|
|
513
|
+
if (isError) throw new Error(message);
|
|
514
|
+
console.log(result);
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
Example response:
|
|
518
|
+
|
|
519
|
+
```json
|
|
520
|
+
{
|
|
521
|
+
"isError": false,
|
|
522
|
+
"message": "",
|
|
523
|
+
"result": null
|
|
524
|
+
}
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
---
|
|
528
|
+
|
|
529
|
+
### `getHolonsByParent`
|
|
530
|
+
|
|
531
|
+
Retrieves all holons that belong to a specific parent holon.
|
|
532
|
+
|
|
533
|
+
**GET** `api/holons/by-parent/{parentId}`
|
|
534
|
+
|
|
535
|
+
Route parameters:
|
|
536
|
+
|
|
537
|
+
| Field | Type |
|
|
538
|
+
| --- | --- |
|
|
539
|
+
| `parentId` | `Guid` |
|
|
540
|
+
|
|
541
|
+
**Request**
|
|
542
|
+
|
|
543
|
+
No request body.
|
|
544
|
+
|
|
545
|
+
**Response**
|
|
546
|
+
|
|
547
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
548
|
+
|
|
549
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
550
|
+
|
|
551
|
+
**Example**
|
|
552
|
+
|
|
553
|
+
```js
|
|
554
|
+
const { isError, message, result } = await star.holons.getHolonsByParent({
|
|
555
|
+
parentId: '<parentId>'
|
|
556
|
+
});
|
|
557
|
+
if (isError) throw new Error(message);
|
|
558
|
+
console.log(result);
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
Example response:
|
|
562
|
+
|
|
563
|
+
```json
|
|
564
|
+
{
|
|
565
|
+
"isError": false,
|
|
566
|
+
"message": "",
|
|
567
|
+
"result": null
|
|
568
|
+
}
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
---
|
|
572
|
+
|
|
573
|
+
### `getHolonsByStatus`
|
|
574
|
+
|
|
575
|
+
Retrieves holons by a specific status.
|
|
576
|
+
|
|
577
|
+
**GET** `api/holons/by-status/{status}`
|
|
578
|
+
|
|
579
|
+
Route parameters:
|
|
580
|
+
|
|
581
|
+
| Field | Type |
|
|
582
|
+
| --- | --- |
|
|
583
|
+
| `status` | `string` |
|
|
584
|
+
|
|
585
|
+
**Request**
|
|
586
|
+
|
|
587
|
+
No request body.
|
|
588
|
+
|
|
589
|
+
**Response**
|
|
590
|
+
|
|
591
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
592
|
+
|
|
593
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
594
|
+
|
|
595
|
+
**Example**
|
|
596
|
+
|
|
597
|
+
```js
|
|
598
|
+
const { isError, message, result } = await star.holons.getHolonsByStatus({
|
|
599
|
+
status: '<status>'
|
|
600
|
+
});
|
|
601
|
+
if (isError) throw new Error(message);
|
|
602
|
+
console.log(result);
|
|
603
|
+
```
|
|
604
|
+
|
|
605
|
+
Example response:
|
|
606
|
+
|
|
607
|
+
```json
|
|
608
|
+
{
|
|
609
|
+
"isError": false,
|
|
610
|
+
"message": "",
|
|
611
|
+
"result": null
|
|
612
|
+
}
|
|
613
|
+
```
|
|
614
|
+
|
|
615
|
+
---
|
|
616
|
+
|
|
617
|
+
### `getHolonsByType`
|
|
618
|
+
|
|
619
|
+
Retrieves all holons of a specific type.
|
|
620
|
+
|
|
621
|
+
**GET** `api/holons/by-type/{type}`
|
|
622
|
+
|
|
623
|
+
Route parameters:
|
|
624
|
+
|
|
625
|
+
| Field | Type |
|
|
626
|
+
| --- | --- |
|
|
627
|
+
| `type` | `string` |
|
|
628
|
+
|
|
629
|
+
**Request**
|
|
630
|
+
|
|
631
|
+
No request body.
|
|
632
|
+
|
|
633
|
+
**Response**
|
|
634
|
+
|
|
635
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
636
|
+
|
|
637
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
638
|
+
|
|
639
|
+
**Example**
|
|
640
|
+
|
|
641
|
+
```js
|
|
642
|
+
const { isError, message, result } = await star.holons.getHolonsByType({
|
|
643
|
+
type: '<type>'
|
|
644
|
+
});
|
|
645
|
+
if (isError) throw new Error(message);
|
|
646
|
+
console.log(result);
|
|
647
|
+
```
|
|
648
|
+
|
|
649
|
+
Example response:
|
|
650
|
+
|
|
651
|
+
```json
|
|
652
|
+
{
|
|
653
|
+
"isError": false,
|
|
654
|
+
"message": "",
|
|
655
|
+
"result": null
|
|
656
|
+
}
|
|
657
|
+
```
|
|
658
|
+
|
|
659
|
+
---
|
|
660
|
+
|
|
661
|
+
### `loadAllHolonsForAvatar`
|
|
662
|
+
|
|
663
|
+
Loads all holons for the authenticated avatar.
|
|
664
|
+
|
|
665
|
+
**GET** `api/holons/load-all-for-avatar`
|
|
666
|
+
|
|
667
|
+
**Request**
|
|
668
|
+
|
|
669
|
+
Query parameters:
|
|
670
|
+
|
|
671
|
+
| Field | Type |
|
|
672
|
+
| --- | --- |
|
|
673
|
+
| `showAllVersions` | `bool (optional)` |
|
|
674
|
+
| `version` | `int (optional)` |
|
|
675
|
+
|
|
676
|
+
**Response**
|
|
677
|
+
|
|
678
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
679
|
+
|
|
680
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
681
|
+
|
|
682
|
+
**Example**
|
|
683
|
+
|
|
684
|
+
```js
|
|
685
|
+
const { isError, message, result } = await star.holons.loadAllHolonsForAvatar({
|
|
686
|
+
showAllVersions: true,
|
|
687
|
+
version: 1
|
|
688
|
+
});
|
|
689
|
+
if (isError) throw new Error(message);
|
|
690
|
+
console.log(result);
|
|
691
|
+
```
|
|
692
|
+
|
|
693
|
+
Example response:
|
|
694
|
+
|
|
695
|
+
```json
|
|
696
|
+
{
|
|
697
|
+
"isError": false,
|
|
698
|
+
"message": "",
|
|
699
|
+
"result": null
|
|
700
|
+
}
|
|
701
|
+
```
|
|
702
|
+
|
|
703
|
+
---
|
|
704
|
+
|
|
705
|
+
### `loadHolon`
|
|
706
|
+
|
|
707
|
+
Loads a holon by ID with optional version and holon type.
|
|
708
|
+
|
|
709
|
+
**GET** `api/holons/{id}/load`
|
|
710
|
+
|
|
711
|
+
Route parameters:
|
|
712
|
+
|
|
713
|
+
| Field | Type |
|
|
714
|
+
| --- | --- |
|
|
715
|
+
| `id` | `Guid` |
|
|
716
|
+
|
|
717
|
+
**Request**
|
|
718
|
+
|
|
719
|
+
Query parameters:
|
|
720
|
+
|
|
721
|
+
| Field | Type |
|
|
722
|
+
| --- | --- |
|
|
723
|
+
| `version` | `int (optional)` |
|
|
724
|
+
| `holonType` | `string (optional)` |
|
|
725
|
+
|
|
726
|
+
**Response**
|
|
727
|
+
|
|
728
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
729
|
+
|
|
730
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
731
|
+
|
|
732
|
+
**Example**
|
|
733
|
+
|
|
734
|
+
```js
|
|
735
|
+
const { isError, message, result } = await star.holons.loadHolon({
|
|
736
|
+
id: '<id>',
|
|
737
|
+
version: 1,
|
|
738
|
+
holonType: 'example string'
|
|
739
|
+
});
|
|
740
|
+
if (isError) throw new Error(message);
|
|
741
|
+
console.log(result);
|
|
742
|
+
```
|
|
743
|
+
|
|
744
|
+
Example response:
|
|
745
|
+
|
|
746
|
+
```json
|
|
747
|
+
{
|
|
748
|
+
"isError": false,
|
|
749
|
+
"message": "",
|
|
750
|
+
"result": null
|
|
751
|
+
}
|
|
752
|
+
```
|
|
753
|
+
|
|
754
|
+
---
|
|
755
|
+
|
|
756
|
+
### `loadHolonFromPath`
|
|
757
|
+
|
|
758
|
+
Loads a holon from source or installed folder path.
|
|
759
|
+
|
|
760
|
+
**GET** `api/holons/load-from-path`
|
|
761
|
+
|
|
762
|
+
**Request**
|
|
763
|
+
|
|
764
|
+
Query parameters:
|
|
765
|
+
|
|
766
|
+
| Field | Type |
|
|
767
|
+
| --- | --- |
|
|
768
|
+
| `path` | `string` |
|
|
769
|
+
| `holonType` | `string (optional)` |
|
|
770
|
+
|
|
771
|
+
**Response**
|
|
772
|
+
|
|
773
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
774
|
+
|
|
775
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
776
|
+
|
|
777
|
+
**Example**
|
|
778
|
+
|
|
779
|
+
```js
|
|
780
|
+
const { isError, message, result } = await star.holons.loadHolonFromPath({
|
|
781
|
+
path: 'example string',
|
|
782
|
+
holonType: 'example string'
|
|
783
|
+
});
|
|
784
|
+
if (isError) throw new Error(message);
|
|
785
|
+
console.log(result);
|
|
786
|
+
```
|
|
787
|
+
|
|
788
|
+
Example response:
|
|
789
|
+
|
|
790
|
+
```json
|
|
791
|
+
{
|
|
792
|
+
"isError": false,
|
|
793
|
+
"message": "",
|
|
794
|
+
"result": null
|
|
795
|
+
}
|
|
796
|
+
```
|
|
797
|
+
|
|
798
|
+
---
|
|
799
|
+
|
|
800
|
+
### `loadHolonFromPublished`
|
|
801
|
+
|
|
802
|
+
Loads a holon from a published file.
|
|
803
|
+
|
|
804
|
+
**GET** `api/holons/load-from-published`
|
|
805
|
+
|
|
806
|
+
**Request**
|
|
807
|
+
|
|
808
|
+
Query parameters:
|
|
809
|
+
|
|
810
|
+
| Field | Type |
|
|
811
|
+
| --- | --- |
|
|
812
|
+
| `publishedFilePath` | `string` |
|
|
813
|
+
|
|
814
|
+
**Response**
|
|
815
|
+
|
|
816
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
817
|
+
|
|
818
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
819
|
+
|
|
820
|
+
**Example**
|
|
821
|
+
|
|
822
|
+
```js
|
|
823
|
+
const { isError, message, result } = await star.holons.loadHolonFromPublished({
|
|
824
|
+
publishedFilePath: 'example string'
|
|
825
|
+
});
|
|
826
|
+
if (isError) throw new Error(message);
|
|
827
|
+
console.log(result);
|
|
828
|
+
```
|
|
829
|
+
|
|
830
|
+
Example response:
|
|
831
|
+
|
|
832
|
+
```json
|
|
833
|
+
{
|
|
834
|
+
"isError": false,
|
|
835
|
+
"message": "",
|
|
836
|
+
"result": null
|
|
837
|
+
}
|
|
838
|
+
```
|
|
839
|
+
|
|
840
|
+
---
|
|
841
|
+
|
|
842
|
+
### `loadHolonVersion`
|
|
843
|
+
|
|
844
|
+
Loads a specific version of a holon.
|
|
845
|
+
|
|
846
|
+
**GET** `api/holons/{id}/version/{version}`
|
|
847
|
+
|
|
848
|
+
Route parameters:
|
|
849
|
+
|
|
850
|
+
| Field | Type |
|
|
851
|
+
| --- | --- |
|
|
852
|
+
| `id` | `Guid` |
|
|
853
|
+
| `version` | `string` |
|
|
854
|
+
|
|
855
|
+
**Request**
|
|
856
|
+
|
|
857
|
+
No request body.
|
|
858
|
+
|
|
859
|
+
**Response**
|
|
860
|
+
|
|
861
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
862
|
+
|
|
863
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
864
|
+
|
|
865
|
+
**Example**
|
|
866
|
+
|
|
867
|
+
```js
|
|
868
|
+
const { isError, message, result } = await star.holons.loadHolonVersion({
|
|
869
|
+
id: '<id>',
|
|
870
|
+
version: '<version>'
|
|
871
|
+
});
|
|
872
|
+
if (isError) throw new Error(message);
|
|
873
|
+
console.log(result);
|
|
874
|
+
```
|
|
875
|
+
|
|
876
|
+
Example response:
|
|
877
|
+
|
|
878
|
+
```json
|
|
879
|
+
{
|
|
880
|
+
"isError": false,
|
|
881
|
+
"message": "",
|
|
882
|
+
"result": null
|
|
883
|
+
}
|
|
884
|
+
```
|
|
885
|
+
|
|
886
|
+
---
|
|
887
|
+
|
|
888
|
+
### `publishHolon`
|
|
889
|
+
|
|
890
|
+
Publishes a holon to the STARNET system.
|
|
891
|
+
|
|
892
|
+
**POST** `api/holons/{id}/publish`
|
|
893
|
+
|
|
894
|
+
Route parameters:
|
|
895
|
+
|
|
896
|
+
| Field | Type |
|
|
897
|
+
| --- | --- |
|
|
898
|
+
| `id` | `Guid` |
|
|
899
|
+
|
|
900
|
+
**Request**
|
|
901
|
+
|
|
902
|
+
Body type: `PublishRequest`
|
|
903
|
+
|
|
904
|
+
| Field | Type |
|
|
905
|
+
| --- | --- |
|
|
906
|
+
| `SourcePath` | `string` |
|
|
907
|
+
| `LaunchTarget` | `string` |
|
|
908
|
+
| `PublishPath` | `string` |
|
|
909
|
+
| `Edit` | `bool` |
|
|
910
|
+
| `RegisterOnSTARNET` | `bool` |
|
|
911
|
+
| `GenerateBinary` | `bool` |
|
|
912
|
+
| `UploadToCloud` | `bool` |
|
|
913
|
+
|
|
914
|
+
**Response**
|
|
915
|
+
|
|
916
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
917
|
+
|
|
918
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
919
|
+
|
|
920
|
+
**Example**
|
|
921
|
+
|
|
922
|
+
```js
|
|
923
|
+
const { isError, message, result } = await star.holons.publishHolon({
|
|
924
|
+
id: '<id>',
|
|
925
|
+
sourcePath: "example string",
|
|
926
|
+
launchTarget: "example string",
|
|
927
|
+
publishPath: "example string",
|
|
928
|
+
edit: true,
|
|
929
|
+
registerOnSTARNET: true,
|
|
930
|
+
generateBinary: true,
|
|
931
|
+
uploadToCloud: true
|
|
932
|
+
});
|
|
933
|
+
if (isError) throw new Error(message);
|
|
934
|
+
console.log(result);
|
|
935
|
+
```
|
|
936
|
+
|
|
937
|
+
Example response:
|
|
938
|
+
|
|
939
|
+
```json
|
|
940
|
+
{
|
|
941
|
+
"isError": false,
|
|
942
|
+
"message": "",
|
|
943
|
+
"result": null
|
|
944
|
+
}
|
|
945
|
+
```
|
|
946
|
+
|
|
947
|
+
---
|
|
948
|
+
|
|
949
|
+
### `republishHolon`
|
|
950
|
+
|
|
951
|
+
Republishes a holon to the STARNET system.
|
|
952
|
+
|
|
953
|
+
**POST** `api/holons/{id}/republish`
|
|
954
|
+
|
|
955
|
+
Route parameters:
|
|
956
|
+
|
|
957
|
+
| Field | Type |
|
|
958
|
+
| --- | --- |
|
|
959
|
+
| `id` | `Guid` |
|
|
960
|
+
|
|
961
|
+
**Request**
|
|
962
|
+
|
|
963
|
+
Body fields:
|
|
964
|
+
|
|
965
|
+
| Field | Type |
|
|
966
|
+
| --- | --- |
|
|
967
|
+
| `version` | `int (optional)` |
|
|
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.holons.republishHolon({
|
|
979
|
+
id: '<id>',
|
|
980
|
+
version: 1
|
|
981
|
+
});
|
|
982
|
+
if (isError) throw new Error(message);
|
|
983
|
+
console.log(result);
|
|
984
|
+
```
|
|
985
|
+
|
|
986
|
+
Example response:
|
|
987
|
+
|
|
988
|
+
```json
|
|
989
|
+
{
|
|
990
|
+
"isError": false,
|
|
991
|
+
"message": "",
|
|
992
|
+
"result": null
|
|
993
|
+
}
|
|
994
|
+
```
|
|
995
|
+
|
|
996
|
+
---
|
|
997
|
+
|
|
998
|
+
### `searchHolons`
|
|
999
|
+
|
|
1000
|
+
Searches holons by name or description.
|
|
1001
|
+
|
|
1002
|
+
**GET** `api/holons/search`
|
|
1003
|
+
|
|
1004
|
+
**Request**
|
|
1005
|
+
|
|
1006
|
+
Query parameters:
|
|
1007
|
+
|
|
1008
|
+
| Field | Type |
|
|
1009
|
+
| --- | --- |
|
|
1010
|
+
| `query` | `string` |
|
|
1011
|
+
|
|
1012
|
+
**Response**
|
|
1013
|
+
|
|
1014
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1015
|
+
|
|
1016
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
1017
|
+
|
|
1018
|
+
**Example**
|
|
1019
|
+
|
|
1020
|
+
```js
|
|
1021
|
+
const { isError, message, result } = await star.holons.searchHolons({
|
|
1022
|
+
query: 'example string'
|
|
1023
|
+
});
|
|
1024
|
+
if (isError) throw new Error(message);
|
|
1025
|
+
console.log(result);
|
|
1026
|
+
```
|
|
1027
|
+
|
|
1028
|
+
Example response:
|
|
1029
|
+
|
|
1030
|
+
```json
|
|
1031
|
+
{
|
|
1032
|
+
"isError": false,
|
|
1033
|
+
"message": "",
|
|
1034
|
+
"result": null
|
|
1035
|
+
}
|
|
1036
|
+
```
|
|
1037
|
+
|
|
1038
|
+
---
|
|
1039
|
+
|
|
1040
|
+
### `unpublishHolon`
|
|
1041
|
+
|
|
1042
|
+
Unpublishes a holon from the STARNET system.
|
|
1043
|
+
|
|
1044
|
+
**POST** `api/holons/{id}/unpublish`
|
|
1045
|
+
|
|
1046
|
+
Route parameters:
|
|
1047
|
+
|
|
1048
|
+
| Field | Type |
|
|
1049
|
+
| --- | --- |
|
|
1050
|
+
| `id` | `Guid` |
|
|
1051
|
+
|
|
1052
|
+
**Request**
|
|
1053
|
+
|
|
1054
|
+
Body fields:
|
|
1055
|
+
|
|
1056
|
+
| Field | Type |
|
|
1057
|
+
| --- | --- |
|
|
1058
|
+
| `version` | `int (optional)` |
|
|
1059
|
+
|
|
1060
|
+
**Response**
|
|
1061
|
+
|
|
1062
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1063
|
+
|
|
1064
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
1065
|
+
|
|
1066
|
+
**Example**
|
|
1067
|
+
|
|
1068
|
+
```js
|
|
1069
|
+
const { isError, message, result } = await star.holons.unpublishHolon({
|
|
1070
|
+
id: '<id>',
|
|
1071
|
+
version: 1
|
|
1072
|
+
});
|
|
1073
|
+
if (isError) throw new Error(message);
|
|
1074
|
+
console.log(result);
|
|
1075
|
+
```
|
|
1076
|
+
|
|
1077
|
+
Example response:
|
|
1078
|
+
|
|
1079
|
+
```json
|
|
1080
|
+
{
|
|
1081
|
+
"isError": false,
|
|
1082
|
+
"message": "",
|
|
1083
|
+
"result": null
|
|
1084
|
+
}
|
|
1085
|
+
```
|
|
1086
|
+
|
|
1087
|
+
---
|
|
1088
|
+
|
|
1089
|
+
### `updateHolon`
|
|
1090
|
+
|
|
1091
|
+
Updates an existing holon by its unique identifier.
|
|
1092
|
+
|
|
1093
|
+
**PUT** `api/holons/{id}`
|
|
1094
|
+
|
|
1095
|
+
Route parameters:
|
|
1096
|
+
|
|
1097
|
+
| Field | Type |
|
|
1098
|
+
| --- | --- |
|
|
1099
|
+
| `id` | `Guid` |
|
|
1100
|
+
|
|
1101
|
+
**Request**
|
|
1102
|
+
|
|
1103
|
+
Body type: `STARHolon`
|
|
1104
|
+
|
|
1105
|
+
| Field | Type |
|
|
1106
|
+
| --- | --- |
|
|
1107
|
+
| `HolonType` | `new HolonType` |
|
|
1108
|
+
| `Holon` | `IHolon` |
|
|
1109
|
+
| `HolonId` | `Guid` |
|
|
1110
|
+
|
|
1111
|
+
**Response**
|
|
1112
|
+
|
|
1113
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1114
|
+
|
|
1115
|
+
`result` type: `IActionResult` (not part of the request/response payload).
|
|
1116
|
+
|
|
1117
|
+
**Example**
|
|
1118
|
+
|
|
1119
|
+
```js
|
|
1120
|
+
const { isError, message, result } = await star.holons.updateHolon({
|
|
1121
|
+
id: '<id>',
|
|
1122
|
+
holonType: /* <new HolonType> */,
|
|
1123
|
+
holon: { "CreatedOASISType": { "Score": 1.0 }, "CreatedProviderType": { "Score": 1.0 }, "GlobalHolonData": { }, "InstanceSavedOnProviderType": {}, "IsChanged": true, "IsNewHolon": true, "IsSaving": true, "Original": {}, "PreviousVersionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "PreviousVersionProviderUniqueStorageKey": { "<ProviderType>": "example string" }, "ProviderMetaData": { "<ProviderType>": { "<string>": "example string" } }, "ProviderUniqueStorageKey": { "<ProviderType>": "example string" }, "Nodes": [{ "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Parent": {}, "NodeName": "example string", "NodeType": { } }], "ParentOmniverseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentOmniverse": { "GreatGrandSuperStar": { }, "Dimensions": { "EighthDimension": { }, "NinthDimension": { }, "TenthDimension": { }, "EleventhDimension": { }, "TwelfthDimension": { }, "CustomDimensions": [{ "DimensionLevel": { } }] }, "Multiverses": [{ "GrandSuperStar": { "Stars": [ /* <I> */ ] }, "Dimensions": { "FirstDimension": { "Universe": { "Dimensions": [], "GalaxyClusters": [{ "Galaxies": [{ "SuperStar": { "Stars": [{ "Luminosity": 1, "StarType": { }, "StarClassification": { }, "StarBinaryType": { } }] }, "SolarSystems": [{ "Star": {}, "Planets": [{ "Moons": [{ }] }], "Asteroids": [{ }], "Comets": [{ }], "Meteroids": [{ }] }], "Nebulas": [{ }], "Stars": [], "Planets": [], "Asteroids": [], "Comets": [], "Meteroids": [] }], "SolarSystems": [], "Stars": [], "Planets": [], "Asteroids": [], "Comets": [], "Meteroids": [], "IsSuperCluster": true }], "SolarSystems": [], "Nebulas": [], "Stars": [], "Planets": [], "Asteroids": [], "Comets": [], "Meteroids": [] } }, "SecondDimension": { "Universe": {} }, "ThirdDimension": { "UniversePrime": {}, "MagicVerse": {}, "ParallelUniverses": [] }, "FourthDimension": { "Universe": {} }, "FifthDimension": { "Universe": {} }, "SixthDimension": { "Universe": {} }, "SeventhDimension": { "Universe": {} }, "CustomDimensions": [] } }] }, "ParentMultiverseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentMultiverse": {}, "ParentUniverseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentUniverse": {}, "ParentDimensionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentDimension": {}, "DimensionLevel": {}, "SubDimensionLevel": { }, "ParentGalaxyClusterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentGalaxyCluster": {}, "ParentGalaxyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentGalaxy": {}, "ParentSolarSystemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentSolarSystem": {}, "ParentGreatGrandSuperStarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentGreatGrandSuperStar": {}, "ParentGrandSuperStarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentGrandSuperStar": {}, "ParentSuperStarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentSuperStar": {}, "ParentStarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentStar": {}, "ParentPlanetId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentPlanet": {}, "ParentMoonId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentMoon": {}, "ParentCelestialSpaceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentCelestialSpace": { "NearestStar": {}, "CelestialBodies": /* <ReadOnlyCollection<ICelestialBody>> */, "CelestialSpaces": /* <ReadOnlyCollection<ICelestialSpace>> */, "Children": /* <new ReadOnlyCollection<IHolon>> */ }, "ParentCelestialBodyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentCelestialBody": { "CelestialBodyCore": { "Holons": [], "Zomes": [{ "HoloNETClient": { "WebSocket": /* <WebSocket.WebSocket> */, "Logger": /* <ILogger> */, "HolochainVersion": { } }, "ZomeName": "example string", "Holons": [{ "GlobalHolonData": {}, "ProviderUniqueStorageKey": { "<ProviderType>": "example string" }, "ProviderMetaData": { "<ProviderType>": { "<string>": "example string" } }, "CustomKey": "example string", "IsNewHolon": true, "IsSaving": true, "PreviousVersionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "PreviousVersionProviderUniqueStorageKey": { "<ProviderType>": "example string" }, "CreatedProviderType": {}, "InstanceSavedOnProviderType": {}, "CreatedOASISType": {}, "Nodes": [], "ParentOmniverseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentOmniverse": {}, "ParentMultiverseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentMultiverse": {}, "ParentUniverseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentUniverse": {}, "ParentDimensionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentDimension": {}, "DimensionLevel": {}, "SubDimensionLevel": {}, "ParentGalaxyClusterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentGalaxyCluster": {}, "ParentGalaxyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentGalaxy": {}, "ParentSolarSystemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentSolarSystem": {}, "ParentGreatGrandSuperStarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentGreatGrandSuperStar": {}, "ParentGrandSuperStarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentGrandSuperStar": {}, "ParentSuperStarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentSuperStar": {}, "ParentStarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentStar": {}, "ParentPlanetId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentPlanet": {}, "ParentMoonId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentMoon": {}, "ParentCelestialSpaceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentCelestialSpace": {}, "ParentCelestialBodyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentCelestialBody": {}, "ParentZomeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentZome": {} }] }] }, "CurrentOrbitAngleOfParentStar": 1, "Density": 1, "DistanceFromParentStarInMetres": 1, "GravitaionalPull": 1, "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Mass": 1, "NumberActiveAvatars": 1, "NumberRegisteredAvatars": 1, "OrbitPeriod": 1, "OrbitPositionFromParentStar": 1, "ProviderUniqueStorageKey": { "<ProviderType>": "example string" }, "RotationPeriod": 1, "RotationSpeed": 1, "TiltAngle": 1, "Weight": 1 }, "ParentZomeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentZome": {} },
|
|
1124
|
+
holonId: "3fa85f64-5717-4562-b3fc-2c963f66afa6"
|
|
1125
|
+
});
|
|
1126
|
+
if (isError) throw new Error(message);
|
|
1127
|
+
console.log(result);
|
|
1128
|
+
```
|
|
1129
|
+
|
|
1130
|
+
Example response:
|
|
1131
|
+
|
|
1132
|
+
```json
|
|
1133
|
+
{
|
|
1134
|
+
"isError": false,
|
|
1135
|
+
"message": "",
|
|
1136
|
+
"result": null
|
|
1137
|
+
}
|
|
1138
|
+
```
|
|
1139
|
+
|