@oasisomniverse/web4-api 2.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 (116) hide show
  1. package/README.md +464 -0
  2. package/docs/README.md +52 -0
  3. package/docs/auth.md +89 -0
  4. package/docs/getting-started.md +129 -0
  5. package/docs/modules/Avatar.md +4160 -0
  6. package/docs/modules/Bridge.md +394 -0
  7. package/docs/modules/Chat.md +168 -0
  8. package/docs/modules/Clan.md +552 -0
  9. package/docs/modules/Competition.md +594 -0
  10. package/docs/modules/Data.md +796 -0
  11. package/docs/modules/EOSIO.md +508 -0
  12. package/docs/modules/Eggs.md +396 -0
  13. package/docs/modules/Files.md +312 -0
  14. package/docs/modules/Gifts.md +306 -0
  15. package/docs/modules/Health.md +90 -0
  16. package/docs/modules/Holochain.md +374 -0
  17. package/docs/modules/HyperDrive.md +3857 -0
  18. package/docs/modules/Karma.md +644 -0
  19. package/docs/modules/Keys.md +3303 -0
  20. package/docs/modules/Map.md +1026 -0
  21. package/docs/modules/Messaging.md +320 -0
  22. package/docs/modules/Nft.md +2216 -0
  23. package/docs/modules/OLand.md +425 -0
  24. package/docs/modules/ONET.md +442 -0
  25. package/docs/modules/ONODE.md +504 -0
  26. package/docs/modules/Provider.md +1396 -0
  27. package/docs/modules/Search.md +69 -0
  28. package/docs/modules/Seeds.md +167 -0
  29. package/docs/modules/Settings.md +533 -0
  30. package/docs/modules/Share.md +64 -0
  31. package/docs/modules/Social.md +190 -0
  32. package/docs/modules/Solana.md +150 -0
  33. package/docs/modules/Stats.md +359 -0
  34. package/docs/modules/Subscription.md +437 -0
  35. package/docs/modules/Video.md +150 -0
  36. package/docs/modules/Wallet.md +1993 -0
  37. package/index.d.ts +106 -0
  38. package/index.js +3 -0
  39. package/index.mjs +4 -0
  40. package/package.json +120 -0
  41. package/src/core/httpClient.js +110 -0
  42. package/src/core/routeHelper.js +50 -0
  43. package/src/core/tokenStore.js +52 -0
  44. package/src/core/types.d.ts +18 -0
  45. package/src/index.js +46 -0
  46. package/src/modules/Auth.d.ts +28 -0
  47. package/src/modules/Auth.js +98 -0
  48. package/src/modules/Avatar.d.ts +192 -0
  49. package/src/modules/Avatar.js +143 -0
  50. package/src/modules/Bridge.d.ts +24 -0
  51. package/src/modules/Bridge.js +35 -0
  52. package/src/modules/Cargo.js +35 -0
  53. package/src/modules/Chat.d.ts +15 -0
  54. package/src/modules/Chat.js +27 -0
  55. package/src/modules/Clan.d.ts +36 -0
  56. package/src/modules/Clan.js +41 -0
  57. package/src/modules/Competition.d.ts +33 -0
  58. package/src/modules/Competition.js +39 -0
  59. package/src/modules/Core.js +27 -0
  60. package/src/modules/Data.d.ts +36 -0
  61. package/src/modules/Data.js +41 -0
  62. package/src/modules/EOSIO.d.ts +33 -0
  63. package/src/modules/EOSIO.js +39 -0
  64. package/src/modules/Eggs.d.ts +24 -0
  65. package/src/modules/Eggs.js +33 -0
  66. package/src/modules/Files.d.ts +24 -0
  67. package/src/modules/Files.js +33 -0
  68. package/src/modules/Gifts.d.ts +24 -0
  69. package/src/modules/Gifts.js +33 -0
  70. package/src/modules/Health.d.ts +12 -0
  71. package/src/modules/Health.js +25 -0
  72. package/src/modules/Holochain.d.ts +27 -0
  73. package/src/modules/Holochain.js +35 -0
  74. package/src/modules/HyperDrive.d.ts +237 -0
  75. package/src/modules/HyperDrive.js +175 -0
  76. package/src/modules/Karma.d.ts +42 -0
  77. package/src/modules/Karma.js +45 -0
  78. package/src/modules/Keys.d.ts +183 -0
  79. package/src/modules/Keys.js +139 -0
  80. package/src/modules/Map.d.ts +75 -0
  81. package/src/modules/Map.js +65 -0
  82. package/src/modules/Messaging.d.ts +24 -0
  83. package/src/modules/Messaging.js +33 -0
  84. package/src/modules/Nft.d.ts +102 -0
  85. package/src/modules/Nft.js +85 -0
  86. package/src/modules/OAPP.js +31 -0
  87. package/src/modules/OLand.d.ts +27 -0
  88. package/src/modules/OLand.js +35 -0
  89. package/src/modules/ONET.d.ts +39 -0
  90. package/src/modules/ONET.js +43 -0
  91. package/src/modules/ONODE.d.ts +45 -0
  92. package/src/modules/ONODE.js +47 -0
  93. package/src/modules/Provider.d.ts +99 -0
  94. package/src/modules/Provider.js +83 -0
  95. package/src/modules/Search.d.ts +9 -0
  96. package/src/modules/Search.js +23 -0
  97. package/src/modules/Seeds.d.ts +15 -0
  98. package/src/modules/Seeds.js +27 -0
  99. package/src/modules/Settings.d.ts +48 -0
  100. package/src/modules/Settings.js +47 -0
  101. package/src/modules/Share.d.ts +9 -0
  102. package/src/modules/Share.js +23 -0
  103. package/src/modules/Social.d.ts +18 -0
  104. package/src/modules/Social.js +29 -0
  105. package/src/modules/Solana.d.ts +12 -0
  106. package/src/modules/Solana.js +25 -0
  107. package/src/modules/Stats.d.ts +30 -0
  108. package/src/modules/Stats.js +37 -0
  109. package/src/modules/Subscription.d.ts +36 -0
  110. package/src/modules/Subscription.js +41 -0
  111. package/src/modules/Telos.js +39 -0
  112. package/src/modules/Video.d.ts +15 -0
  113. package/src/modules/Video.js +27 -0
  114. package/src/modules/Wallet.d.ts +102 -0
  115. package/src/modules/Wallet.js +85 -0
  116. package/src/modules/index.js +79 -0
@@ -0,0 +1,796 @@
1
+ # Data — `oasis.data`
2
+
3
+ Source controller: [`DataController.cs`](https://github.com/NextGenSoftwareUK/OASIS2/blob/main/ONODE/NextGenSoftware.OASIS.API.ONODE.WebAPI/Controllers/DataController.cs)
4
+ Route prefix: `api/data`
5
+ 10 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
+ ### `deleteHolon`
22
+
23
+ Delete a holon for the given id. Set SoftDelete to true if you wish this holon to be kept (can be un-deleted later) or to false to permanently delete (cannot be recovered). Pass in the provider you wish to use. Set the autoFailOverMode to 'ON' if you wish this call to work through the the providers in the auto-failover list until it succeeds. Set it to OFF if you do not or to 'DEFAULT' to default to the global OASISDNA setting. Set the autoReplicationMode to 'ON' if you wish this call to auto-replicate to the providers in the auto-replication list. Set it to OFF if you do not or to UseGlobalDefaultInOASISDNA to 'DEFAULT' to the global OASISDNA setting. Set the autoLoadBalanceMode to 'ON' if you wish this call to use the fastest provider in your area from the auto-loadbalance list. Set it to OFF if you do not or to UseGlobalDefaultInOASISDNA to 'DEFAULT' to the global OASISDNA setting. Set the waitForAutoReplicationResult flag to true if you wish for the API to wait for the auto-replication to complete before returning the results. Set the setglobally flag to false to use these settings only for this request or true for it to be used for all future requests. Set the showDetailedSettings flag to true to view detailed settings such as the list of providers in the auto-failover, auto-replication & auto-load balance lists.
24
+
25
+ **DELETE** `api/data/delete-holon`
26
+
27
+ **Request**
28
+
29
+ Body type: `DeleteHolonRequest`
30
+
31
+ | Field | Type |
32
+ | --- | --- |
33
+ | `Id` | `Guid` |
34
+ | `SoftDelete` | `bool` |
35
+
36
+ **Response**
37
+
38
+ Standard `OASISResult` envelope (see top of this page) with:
39
+
40
+ `result` type: `IHolon`
41
+
42
+ | Field | Type |
43
+ | --- | --- |
44
+ | `CreatedOASISType` | `EnumValue<OASISType>` |
45
+ | `CreatedProviderType` | `EnumValue<ProviderType>` |
46
+ | `GlobalHolonData` | `GlobalHolonData` |
47
+ | `InstanceSavedOnProviderType` | `EnumValue<ProviderType>` |
48
+ | `IsChanged` | `bool` |
49
+ | `IsNewHolon` | `bool` |
50
+ | `IsSaving` | `bool` |
51
+ | `Original` | `IHolon` |
52
+ | `PreviousVersionId` | `Guid` |
53
+ | `PreviousVersionProviderUniqueStorageKey` | `Dictionary<ProviderType, string>` |
54
+ | `ProviderMetaData` | `Dictionary<ProviderType, Dictionary<string, string>>` |
55
+ | `ProviderUniqueStorageKey` | `Dictionary<ProviderType, string>` |
56
+ | `Nodes` | `IList<INode>` |
57
+ | `ParentOmniverseId` | `Guid` |
58
+ | `ParentOmniverse` | `IOmiverse` |
59
+ | `ParentMultiverseId` | `Guid` |
60
+ | `ParentMultiverse` | `IMultiverse` |
61
+ | `ParentUniverseId` | `Guid` |
62
+ | `ParentUniverse` | `IUniverse` |
63
+ | `ParentDimensionId` | `Guid` |
64
+ | `ParentDimension` | `IDimension` |
65
+ | `DimensionLevel` | `DimensionLevel` |
66
+ | `SubDimensionLevel` | `SubDimensionLevel` |
67
+ | `ParentGalaxyClusterId` | `Guid` |
68
+ | `ParentGalaxyCluster` | `IGalaxyCluster` |
69
+ | `ParentGalaxyId` | `Guid` |
70
+ | `ParentGalaxy` | `IGalaxy` |
71
+ | `ParentSolarSystemId` | `Guid` |
72
+ | `ParentSolarSystem` | `ISolarSystem` |
73
+ | `ParentGreatGrandSuperStarId` | `Guid` |
74
+ | `ParentGreatGrandSuperStar` | `IGreatGrandSuperStar` |
75
+ | `ParentGrandSuperStarId` | `Guid` |
76
+ | `ParentGrandSuperStar` | `IGrandSuperStar` |
77
+ | `ParentSuperStarId` | `Guid` |
78
+ | `ParentSuperStar` | `ISuperStar` |
79
+ | `ParentStarId` | `Guid` |
80
+ | `ParentStar` | `IStar` |
81
+ | `ParentPlanetId` | `Guid` |
82
+ | `ParentPlanet` | `IPlanet` |
83
+ | `ParentMoonId` | `Guid` |
84
+ | `ParentMoon` | `IMoon` |
85
+ | `ParentCelestialSpaceId` | `Guid` |
86
+ | `ParentCelestialSpace` | `ICelestialSpace` |
87
+ | `ParentCelestialBodyId` | `Guid` |
88
+ | `ParentCelestialBody` | `ICelestialBody` |
89
+ | `ParentZomeId` | `Guid` |
90
+ | `ParentZome` | `IZome` |
91
+
92
+ **Example**
93
+
94
+ ```js
95
+ const { isError, message, result } = await oasis.data.deleteHolon({
96
+ id: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
97
+ softDelete: true
98
+ });
99
+ if (isError) throw new Error(message);
100
+ console.log(result);
101
+ ```
102
+
103
+ Example response:
104
+
105
+ ```json
106
+ {
107
+ "isError": false,
108
+ "message": "",
109
+ "result": { "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": {} }
110
+ }
111
+ ```
112
+
113
+ ---
114
+
115
+ ### `loadAllHolons`
116
+
117
+ Load's all holons for the given HolonType. Use 'All' to load all holons. Set the loadChildren flag to true to load all the holon's child holon's. This defaults to true. If loadChildren is set to true, you can set the Recursive flag to true to load all the child's holon's recursively, or false to only load the first level of child holon's. This defaults to true. If loadChildren is set to true, you can set the maxChildDepth value to a custom int of how many levels down you wish to load, it defaults to 0, which means it will load to infinite depth. Set the continueOnError flag to true if you wish it to continue loading child holon's even if an error has occured, this defaults to true. Set the Version int to the version of the holon you wish to load (defaults to 0) which means the latest version. Pass in the provider you wish to use. Set the autoFailOverMode to 'ON' if you wish this call to work through the the providers in the auto-failover list until it succeeds. Set it to OFF if you do not or to 'DEFAULT' to default to the global OASISDNA setting. Set the autoReplicationMode to 'ON' if you wish this call to auto-replicate to the providers in the auto-replication list. Set it to OFF if you do not or to UseGlobalDefaultInOASISDNA to 'DEFAULT' to the global OASISDNA setting. Set the autoLoadBalanceMode to 'ON' if you wish this call to use the fastest provider in your area from the auto-loadbalance list. Set it to OFF if you do not or to UseGlobalDefaultInOASISDNA to 'DEFAULT' to the global OASISDNA setting. Set the waitForAutoReplicationResult flag to true if you wish for the API to wait for the auto-replication to complete before returning the results. Set the setglobally flag to false to use these settings only for this request or true for it to be used for all future requests. Set the showDetailedSettings flag to true to view detailed settings such as the list of providers in the auto-failover, auto-replication &amp; auto-load balance lists.
118
+
119
+ **POST** `api/data/load-all-holons`
120
+
121
+ **Request**
122
+
123
+ Body type: `LoadAllHolonsRequest`
124
+
125
+ | Field | Type |
126
+ | --- | --- |
127
+ | `HolonType` | `string` |
128
+
129
+ **Response**
130
+
131
+ Standard `OASISResult` envelope (see top of this page) with:
132
+
133
+ `result` type: `Holon` (array)
134
+
135
+ | Field | Type |
136
+ | --- | --- |
137
+ | `GlobalHolonData` | `GlobalHolonData` |
138
+ | `ProviderUniqueStorageKey` | `Dictionary<ProviderType, string>` |
139
+ | `ProviderMetaData` | `Dictionary<ProviderType, Dictionary<string, string>>` |
140
+ | `CustomKey` | `string` |
141
+ | `IsNewHolon` | `bool` |
142
+ | `IsSaving` | `bool` |
143
+ | `PreviousVersionId` | `Guid` |
144
+ | `PreviousVersionProviderUniqueStorageKey` | `Dictionary<ProviderType, string>` |
145
+ | `CreatedProviderType` | `EnumValue<ProviderType>` |
146
+ | `InstanceSavedOnProviderType` | `EnumValue<ProviderType>` |
147
+ | `CreatedOASISType` | `EnumValue<OASISType>` |
148
+ | `Nodes` | `IList<INode>` |
149
+ | `ParentOmniverseId` | `Guid` |
150
+ | `ParentOmniverse` | `IOmiverse` |
151
+ | `ParentMultiverseId` | `Guid` |
152
+ | `ParentMultiverse` | `IMultiverse` |
153
+ | `ParentUniverseId` | `Guid` |
154
+ | `ParentUniverse` | `IUniverse` |
155
+ | `ParentDimensionId` | `Guid` |
156
+ | `ParentDimension` | `IDimension` |
157
+ | `DimensionLevel` | `DimensionLevel` |
158
+ | `SubDimensionLevel` | `SubDimensionLevel` |
159
+ | `ParentGalaxyClusterId` | `Guid` |
160
+ | `ParentGalaxyCluster` | `IGalaxyCluster` |
161
+ | `ParentGalaxyId` | `Guid` |
162
+ | `ParentGalaxy` | `IGalaxy` |
163
+ | `ParentSolarSystemId` | `Guid` |
164
+ | `ParentSolarSystem` | `ISolarSystem` |
165
+ | `ParentGreatGrandSuperStarId` | `Guid` |
166
+ | `ParentGreatGrandSuperStar` | `IGreatGrandSuperStar` |
167
+ | `ParentGrandSuperStarId` | `Guid` |
168
+ | `ParentGrandSuperStar` | `IGrandSuperStar` |
169
+ | `ParentSuperStarId` | `Guid` |
170
+ | `ParentSuperStar` | `ISuperStar` |
171
+ | `ParentStarId` | `Guid` |
172
+ | `ParentStar` | `IStar` |
173
+ | `ParentPlanetId` | `Guid` |
174
+ | `ParentPlanet` | `IPlanet` |
175
+ | `ParentMoonId` | `Guid` |
176
+ | `ParentMoon` | `IMoon` |
177
+ | `ParentCelestialSpaceId` | `Guid` |
178
+ | `ParentCelestialSpace` | `ICelestialSpace` |
179
+ | `ParentCelestialBodyId` | `Guid` |
180
+ | `ParentCelestialBody` | `ICelestialBody` |
181
+ | `ParentZomeId` | `Guid` |
182
+ | `ParentZome` | `IZome` |
183
+
184
+ **Example**
185
+
186
+ ```js
187
+ const { isError, message, result } = await oasis.data.loadAllHolons({
188
+ holonType: "example string"
189
+ });
190
+ if (isError) throw new Error(message);
191
+ console.log(result);
192
+ ```
193
+
194
+ Example response:
195
+
196
+ ```json
197
+ {
198
+ "isError": false,
199
+ "message": "",
200
+ "result": [{ "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": { "Score": 1.0 }, "InstanceSavedOnProviderType": {}, "CreatedOASISType": { "Score": 1.0 }, "Nodes": [{ "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Parent": { "CreatedOASISType": {}, "CreatedProviderType": {}, "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": [], "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": [] }] }, "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": {} }, "NodeName": "example string", "NodeType": { } }], "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": {} }]
201
+ }
202
+ ```
203
+
204
+ ---
205
+
206
+ ### `loadData`
207
+
208
+ Loads custom data with the given key from the current logged in avatar.
209
+
210
+ **POST** `api/data/load-data`
211
+
212
+ **Request**
213
+
214
+ Body type: `LoadDataRequest`
215
+
216
+ | Field | Type |
217
+ | --- | --- |
218
+ | `Key` | `string` |
219
+ | `Provider` | `string` |
220
+ | `AvatarId` | `Guid?` |
221
+
222
+ **Response**
223
+
224
+ Standard `OASISResult` envelope (see top of this page) with:
225
+
226
+ `result` type: `string`
227
+
228
+ **Example**
229
+
230
+ ```js
231
+ const { isError, message, result } = await oasis.data.loadData({
232
+ key: "example string",
233
+ provider: "example string",
234
+ avatarId: "3fa85f64-5717-4562-b3fc-2c963f66afa6"
235
+ });
236
+ if (isError) throw new Error(message);
237
+ console.log(result);
238
+ ```
239
+
240
+ Example response:
241
+
242
+ ```json
243
+ {
244
+ "isError": false,
245
+ "message": "",
246
+ "result": "example string"
247
+ }
248
+ ```
249
+
250
+ ---
251
+
252
+ ### `loadFile`
253
+
254
+ Loads a file with the given id.
255
+
256
+ **POST** `api/data/load-file`
257
+
258
+ **Request**
259
+
260
+ Body type: `LoadFileRequest`
261
+
262
+ | Field | Type |
263
+ | --- | --- |
264
+ | `Id` | `Guid` |
265
+ | `Provider` | `string` |
266
+ | `AvatarId` | `Guid?` |
267
+
268
+ **Response**
269
+
270
+ Standard `OASISResult` envelope (see top of this page) with:
271
+
272
+ `result` type: `byte[]`
273
+
274
+ **Example**
275
+
276
+ ```js
277
+ const { isError, message, result } = await oasis.data.loadFile({
278
+ id: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
279
+ provider: "example string",
280
+ avatarId: "3fa85f64-5717-4562-b3fc-2c963f66afa6"
281
+ });
282
+ if (isError) throw new Error(message);
283
+ console.log(result);
284
+ ```
285
+
286
+ Example response:
287
+
288
+ ```json
289
+ {
290
+ "isError": false,
291
+ "message": "",
292
+ "result": "<base64-bytes>"
293
+ }
294
+ ```
295
+
296
+ ---
297
+
298
+ ### `loadHolon`
299
+
300
+ Load's a holon data object for the given id. Set the loadChildren flag to true to load all the holon's child holon's. This defaults to true. If loadChildren is set to true, you can set the Recursive flag to true to load all the child's holon's recursively, or false to only load the first level of child holon's. This defaults to true. If loadChildren is set to true, you can set the maxChildDepth value to a custom int of how many levels down you wish to load, it defaults to 0, which means it will load to infinite depth. Set the continueOnError flag to true if you wish it to continue loading child holon's even if an error has occured, this defaults to true. Set the Version int to the version of the holon you wish to load (defaults to 0) which means the latest version. Pass in the provider you wish to use. Set the autoFailOverMode to 'ON' if you wish this call to work through the the providers in the auto-failover list until it succeeds. Set it to OFF if you do not or to 'DEFAULT' to default to the global OASISDNA setting. Set the autoReplicationMode to 'ON' if you wish this call to auto-replicate to the providers in the auto-replication list. Set it to OFF if you do not or to UseGlobalDefaultInOASISDNA to 'DEFAULT' to the global OASISDNA setting. Set the autoLoadBalanceMode to 'ON' if you wish this call to use the fastest provider in your area from the auto-loadbalance list. Set it to OFF if you do not or to UseGlobalDefaultInOASISDNA to 'DEFAULT' to the global OASISDNA setting. Set the waitForAutoReplicationResult flag to true if you wish for the API to wait for the auto-replication to complete before returning the results. Set the setglobally flag to false to use these settings only for this request or true for it to be used for all future requests. Set the showDetailedSettings flag to true to view detailed settings such as the list of providers in the auto-failover, auto-replication &amp; auto-load balance lists.
301
+
302
+ **POST** `api/data/load-holon`
303
+
304
+ **Request**
305
+
306
+ Body type: `LoadHolonRequest`
307
+
308
+ | Field | Type |
309
+ | --- | --- |
310
+ | `HolonId` | `Guid` |
311
+ | `PreferredProvider` | `ProviderType` |
312
+ | `RequestType` | `string` |
313
+ | `Priority` | `int` |
314
+ | `ProviderTypeString` | `string` |
315
+ | `Parameters` | `System.Collections.Generic.Dictionary<string, object>` |
316
+
317
+ **Response**
318
+
319
+ Standard `OASISResult` envelope (see top of this page) with:
320
+
321
+ `result` type: `Holon`
322
+
323
+ | Field | Type |
324
+ | --- | --- |
325
+ | `GlobalHolonData` | `GlobalHolonData` |
326
+ | `ProviderUniqueStorageKey` | `Dictionary<ProviderType, string>` |
327
+ | `ProviderMetaData` | `Dictionary<ProviderType, Dictionary<string, string>>` |
328
+ | `CustomKey` | `string` |
329
+ | `IsNewHolon` | `bool` |
330
+ | `IsSaving` | `bool` |
331
+ | `PreviousVersionId` | `Guid` |
332
+ | `PreviousVersionProviderUniqueStorageKey` | `Dictionary<ProviderType, string>` |
333
+ | `CreatedProviderType` | `EnumValue<ProviderType>` |
334
+ | `InstanceSavedOnProviderType` | `EnumValue<ProviderType>` |
335
+ | `CreatedOASISType` | `EnumValue<OASISType>` |
336
+ | `Nodes` | `IList<INode>` |
337
+ | `ParentOmniverseId` | `Guid` |
338
+ | `ParentOmniverse` | `IOmiverse` |
339
+ | `ParentMultiverseId` | `Guid` |
340
+ | `ParentMultiverse` | `IMultiverse` |
341
+ | `ParentUniverseId` | `Guid` |
342
+ | `ParentUniverse` | `IUniverse` |
343
+ | `ParentDimensionId` | `Guid` |
344
+ | `ParentDimension` | `IDimension` |
345
+ | `DimensionLevel` | `DimensionLevel` |
346
+ | `SubDimensionLevel` | `SubDimensionLevel` |
347
+ | `ParentGalaxyClusterId` | `Guid` |
348
+ | `ParentGalaxyCluster` | `IGalaxyCluster` |
349
+ | `ParentGalaxyId` | `Guid` |
350
+ | `ParentGalaxy` | `IGalaxy` |
351
+ | `ParentSolarSystemId` | `Guid` |
352
+ | `ParentSolarSystem` | `ISolarSystem` |
353
+ | `ParentGreatGrandSuperStarId` | `Guid` |
354
+ | `ParentGreatGrandSuperStar` | `IGreatGrandSuperStar` |
355
+ | `ParentGrandSuperStarId` | `Guid` |
356
+ | `ParentGrandSuperStar` | `IGrandSuperStar` |
357
+ | `ParentSuperStarId` | `Guid` |
358
+ | `ParentSuperStar` | `ISuperStar` |
359
+ | `ParentStarId` | `Guid` |
360
+ | `ParentStar` | `IStar` |
361
+ | `ParentPlanetId` | `Guid` |
362
+ | `ParentPlanet` | `IPlanet` |
363
+ | `ParentMoonId` | `Guid` |
364
+ | `ParentMoon` | `IMoon` |
365
+ | `ParentCelestialSpaceId` | `Guid` |
366
+ | `ParentCelestialSpace` | `ICelestialSpace` |
367
+ | `ParentCelestialBodyId` | `Guid` |
368
+ | `ParentCelestialBody` | `ICelestialBody` |
369
+ | `ParentZomeId` | `Guid` |
370
+ | `ParentZome` | `IZome` |
371
+
372
+ **Example**
373
+
374
+ ```js
375
+ const { isError, message, result } = await oasis.data.loadHolon({
376
+ holonId: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
377
+ preferredProvider: { },
378
+ requestType: "example string",
379
+ priority: 1,
380
+ providerTypeString: "example string",
381
+ parameters: /* <System.Collections.Generic.Dictionary<string, object>> */
382
+ });
383
+ if (isError) throw new Error(message);
384
+ console.log(result);
385
+ ```
386
+
387
+ Example response:
388
+
389
+ ```json
390
+ {
391
+ "isError": false,
392
+ "message": "",
393
+ "result": { "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": { "Score": 1.0 }, "InstanceSavedOnProviderType": {}, "CreatedOASISType": { "Score": 1.0 }, "Nodes": [{ "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Parent": { "CreatedOASISType": {}, "CreatedProviderType": {}, "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": [], "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": [] }] }, "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": {} }, "NodeName": "example string", "NodeType": { } }], "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": {} }
394
+ }
395
+ ```
396
+
397
+ ---
398
+
399
+ ### `loadHolonsForParent`
400
+
401
+ Load's all holons for the given parent and the given HolonType. Use 'All' to load all holons. Set the loadChildren flag to true to load all the holon's child holon's. This defaults to true. If loadChildren is set to true, you can set the Recursive flag to true to load all the child's holon's recursively, or false to only load the first level of child holon's. This defaults to true. If loadChildren is set to true, you can set the maxChildDepth value to a custom int of how many levels down you wish to load, it defaults to 0, which means it will load to infinite depth. Set the continueOnError flag to true if you wish it to continue loading child holon's even if an error has occured, this defaults to true. Set the Version int to the version of the holon you wish to load (defaults to 0) which means the latest version. Pass in the provider you wish to use. Set the autoFailOverMode to 'ON' if you wish this call to work through the the providers in the auto-failover list until it succeeds. Set it to OFF if you do not or to 'DEFAULT' to default to the global OASISDNA setting. Set the autoReplicationMode to 'ON' if you wish this call to auto-replicate to the providers in the auto-replication list. Set it to OFF if you do not or to UseGlobalDefaultInOASISDNA to 'DEFAULT' to the global OASISDNA setting. Set the autoLoadBalanceMode to 'ON' if you wish this call to use the fastest provider in your area from the auto-loadbalance list. Set it to OFF if you do not or to UseGlobalDefaultInOASISDNA to 'DEFAULT' to the global OASISDNA setting. Set the waitForAutoReplicationResult flag to true if you wish for the API to wait for the auto-replication to complete before returning the results. Set the setglobally flag to false to use these settings only for this request or true for it to be used for all future requests. Set the showDetailedSettings flag to true to view detailed settings such as the list of providers in the auto-failover, auto-replication &amp; auto-load balance lists.
402
+
403
+ **POST** `api/data/load-holons-for-parent`
404
+
405
+ **Request**
406
+
407
+ Body type: `LoadHolonsForParentRequest`
408
+
409
+ | Field | Type |
410
+ | --- | --- |
411
+ | `Id` | `Guid` |
412
+ | `HolonType` | `string` |
413
+
414
+ **Response**
415
+
416
+ Standard `OASISResult` envelope (see top of this page) with:
417
+
418
+ `result` type: `Holon` (array)
419
+
420
+ | Field | Type |
421
+ | --- | --- |
422
+ | `GlobalHolonData` | `GlobalHolonData` |
423
+ | `ProviderUniqueStorageKey` | `Dictionary<ProviderType, string>` |
424
+ | `ProviderMetaData` | `Dictionary<ProviderType, Dictionary<string, string>>` |
425
+ | `CustomKey` | `string` |
426
+ | `IsNewHolon` | `bool` |
427
+ | `IsSaving` | `bool` |
428
+ | `PreviousVersionId` | `Guid` |
429
+ | `PreviousVersionProviderUniqueStorageKey` | `Dictionary<ProviderType, string>` |
430
+ | `CreatedProviderType` | `EnumValue<ProviderType>` |
431
+ | `InstanceSavedOnProviderType` | `EnumValue<ProviderType>` |
432
+ | `CreatedOASISType` | `EnumValue<OASISType>` |
433
+ | `Nodes` | `IList<INode>` |
434
+ | `ParentOmniverseId` | `Guid` |
435
+ | `ParentOmniverse` | `IOmiverse` |
436
+ | `ParentMultiverseId` | `Guid` |
437
+ | `ParentMultiverse` | `IMultiverse` |
438
+ | `ParentUniverseId` | `Guid` |
439
+ | `ParentUniverse` | `IUniverse` |
440
+ | `ParentDimensionId` | `Guid` |
441
+ | `ParentDimension` | `IDimension` |
442
+ | `DimensionLevel` | `DimensionLevel` |
443
+ | `SubDimensionLevel` | `SubDimensionLevel` |
444
+ | `ParentGalaxyClusterId` | `Guid` |
445
+ | `ParentGalaxyCluster` | `IGalaxyCluster` |
446
+ | `ParentGalaxyId` | `Guid` |
447
+ | `ParentGalaxy` | `IGalaxy` |
448
+ | `ParentSolarSystemId` | `Guid` |
449
+ | `ParentSolarSystem` | `ISolarSystem` |
450
+ | `ParentGreatGrandSuperStarId` | `Guid` |
451
+ | `ParentGreatGrandSuperStar` | `IGreatGrandSuperStar` |
452
+ | `ParentGrandSuperStarId` | `Guid` |
453
+ | `ParentGrandSuperStar` | `IGrandSuperStar` |
454
+ | `ParentSuperStarId` | `Guid` |
455
+ | `ParentSuperStar` | `ISuperStar` |
456
+ | `ParentStarId` | `Guid` |
457
+ | `ParentStar` | `IStar` |
458
+ | `ParentPlanetId` | `Guid` |
459
+ | `ParentPlanet` | `IPlanet` |
460
+ | `ParentMoonId` | `Guid` |
461
+ | `ParentMoon` | `IMoon` |
462
+ | `ParentCelestialSpaceId` | `Guid` |
463
+ | `ParentCelestialSpace` | `ICelestialSpace` |
464
+ | `ParentCelestialBodyId` | `Guid` |
465
+ | `ParentCelestialBody` | `ICelestialBody` |
466
+ | `ParentZomeId` | `Guid` |
467
+ | `ParentZome` | `IZome` |
468
+
469
+ **Example**
470
+
471
+ ```js
472
+ const { isError, message, result } = await oasis.data.loadHolonsForParent({
473
+ id: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
474
+ holonType: "example string"
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": [{ "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": { "Score": 1.0 }, "InstanceSavedOnProviderType": {}, "CreatedOASISType": { "Score": 1.0 }, "Nodes": [{ "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Parent": { "CreatedOASISType": {}, "CreatedProviderType": {}, "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": [], "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": [] }] }, "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": {} }, "NodeName": "example string", "NodeType": { } }], "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": {} }]
487
+ }
488
+ ```
489
+
490
+ ---
491
+
492
+ ### `saveData`
493
+
494
+ Saves custom data with a given key to the current logged in avatar.
495
+
496
+ **POST** `api/data/save-data`
497
+
498
+ **Request**
499
+
500
+ Body type: `SaveDataRequest`
501
+
502
+ | Field | Type |
503
+ | --- | --- |
504
+ | `Value` | `string` |
505
+ | `Key` | `string` |
506
+ | `AvatarId` | `Guid?` |
507
+ | `Provider` | `string` |
508
+
509
+ **Response**
510
+
511
+ Standard `OASISResult` envelope (see top of this page) with:
512
+
513
+ `result` type: `bool`
514
+
515
+ **Example**
516
+
517
+ ```js
518
+ const { isError, message, result } = await oasis.data.saveData({
519
+ value: "example string",
520
+ key: "example string",
521
+ avatarId: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
522
+ provider: "example string"
523
+ });
524
+ if (isError) throw new Error(message);
525
+ console.log(result);
526
+ ```
527
+
528
+ Example response:
529
+
530
+ ```json
531
+ {
532
+ "isError": false,
533
+ "message": "",
534
+ "result": true
535
+ }
536
+ ```
537
+
538
+ ---
539
+
540
+ ### `saveFile`
541
+
542
+ Saves a file and returns the id linked to the holon that it is stored in.
543
+
544
+ **POST** `api/data/save-file`
545
+
546
+ **Request**
547
+
548
+ Body type: `SaveFileRequest`
549
+
550
+ | Field | Type |
551
+ | --- | --- |
552
+ | `Data` | `byte[]` |
553
+ | `FileName` | `string` |
554
+ | `FileExtension` | `string` |
555
+ | `MimeType` | `string` |
556
+ | `AvatarId` | `Guid?` |
557
+ | `Provider` | `string` |
558
+
559
+ **Response**
560
+
561
+ Standard `OASISResult` envelope (see top of this page) with:
562
+
563
+ `result` type: `Guid`
564
+
565
+ **Example**
566
+
567
+ ```js
568
+ const { isError, message, result } = await oasis.data.saveFile({
569
+ data: "<base64-bytes>",
570
+ fileName: "example string",
571
+ fileExtension: "example string",
572
+ mimeType: "example string",
573
+ avatarId: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
574
+ provider: "example string"
575
+ });
576
+ if (isError) throw new Error(message);
577
+ console.log(result);
578
+ ```
579
+
580
+ Example response:
581
+
582
+ ```json
583
+ {
584
+ "isError": false,
585
+ "message": "",
586
+ "result": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
587
+ }
588
+ ```
589
+
590
+ ---
591
+
592
+ ### `saveHolon`
593
+
594
+ Save's a holon data object. Set the saveChildren flag to true to save all the holon's child holon's. This defaults to true. If saveChildren is set to true, you can set the Recursive flag to true to save all the child's holon's recursively, or false to only save the first level of child holon's. This defaults to true. If saveChildren is set to true, you can set the maxChildDepth value to a custom int of how many levels down you wish to save, it defaults to 0, which means it will save to infinite depth. Set the continueOnError flag to true if you wish it to continue saving child holon's even if an error has occured, this defaults to true. Pass in the provider you wish to use. Set the autoFailOverMode to 'ON' if you wish this call to work through the the providers in the auto-failover list until it succeeds. Set it to OFF if you do not or to 'DEFAULT' to default to the global OASISDNA setting. Set the autoReplicationMode to 'ON' if you wish this call to auto-replicate to the providers in the auto-replication list. Set it to OFF if you do not or to UseGlobalDefaultInOASISDNA to 'DEFAULT' to the global OASISDNA setting. Set the autoLoadBalanceMode to 'ON' if you wish this call to use the fastest provider in your area from the auto-loadbalance list. Set it to OFF if you do not or to UseGlobalDefaultInOASISDNA to 'DEFAULT' to the global OASISDNA setting. Set the waitForAutoReplicationResult flag to true if you wish for the API to wait for the auto-replication to complete before returning the results. Set the setglobally flag to false to use these settings only for this request or true for it to be used for all future requests. Set the showDetailedSettings flag to true to view detailed settings such as the list of providers in the auto-failover, auto-replication &amp; auto-load balance lists.
595
+
596
+ **POST** `api/data/save-holon`
597
+
598
+ **Request**
599
+
600
+ Body type: `SaveHolonRequest`
601
+
602
+ | Field | Type |
603
+ | --- | --- |
604
+ | `HolonId` | `Guid` |
605
+ | `Holon` | `object` |
606
+ | `PreferredProvider` | `ProviderType` |
607
+ | `RequestType` | `string` |
608
+ | `Priority` | `int` |
609
+ | `ProviderTypeString` | `string` |
610
+ | `Parameters` | `System.Collections.Generic.Dictionary<string, object>` |
611
+
612
+ **Response**
613
+
614
+ Standard `OASISResult` envelope (see top of this page) with:
615
+
616
+ `result` type: `IHolon`
617
+
618
+ | Field | Type |
619
+ | --- | --- |
620
+ | `CreatedOASISType` | `EnumValue<OASISType>` |
621
+ | `CreatedProviderType` | `EnumValue<ProviderType>` |
622
+ | `GlobalHolonData` | `GlobalHolonData` |
623
+ | `InstanceSavedOnProviderType` | `EnumValue<ProviderType>` |
624
+ | `IsChanged` | `bool` |
625
+ | `IsNewHolon` | `bool` |
626
+ | `IsSaving` | `bool` |
627
+ | `Original` | `IHolon` |
628
+ | `PreviousVersionId` | `Guid` |
629
+ | `PreviousVersionProviderUniqueStorageKey` | `Dictionary<ProviderType, string>` |
630
+ | `ProviderMetaData` | `Dictionary<ProviderType, Dictionary<string, string>>` |
631
+ | `ProviderUniqueStorageKey` | `Dictionary<ProviderType, string>` |
632
+ | `Nodes` | `IList<INode>` |
633
+ | `ParentOmniverseId` | `Guid` |
634
+ | `ParentOmniverse` | `IOmiverse` |
635
+ | `ParentMultiverseId` | `Guid` |
636
+ | `ParentMultiverse` | `IMultiverse` |
637
+ | `ParentUniverseId` | `Guid` |
638
+ | `ParentUniverse` | `IUniverse` |
639
+ | `ParentDimensionId` | `Guid` |
640
+ | `ParentDimension` | `IDimension` |
641
+ | `DimensionLevel` | `DimensionLevel` |
642
+ | `SubDimensionLevel` | `SubDimensionLevel` |
643
+ | `ParentGalaxyClusterId` | `Guid` |
644
+ | `ParentGalaxyCluster` | `IGalaxyCluster` |
645
+ | `ParentGalaxyId` | `Guid` |
646
+ | `ParentGalaxy` | `IGalaxy` |
647
+ | `ParentSolarSystemId` | `Guid` |
648
+ | `ParentSolarSystem` | `ISolarSystem` |
649
+ | `ParentGreatGrandSuperStarId` | `Guid` |
650
+ | `ParentGreatGrandSuperStar` | `IGreatGrandSuperStar` |
651
+ | `ParentGrandSuperStarId` | `Guid` |
652
+ | `ParentGrandSuperStar` | `IGrandSuperStar` |
653
+ | `ParentSuperStarId` | `Guid` |
654
+ | `ParentSuperStar` | `ISuperStar` |
655
+ | `ParentStarId` | `Guid` |
656
+ | `ParentStar` | `IStar` |
657
+ | `ParentPlanetId` | `Guid` |
658
+ | `ParentPlanet` | `IPlanet` |
659
+ | `ParentMoonId` | `Guid` |
660
+ | `ParentMoon` | `IMoon` |
661
+ | `ParentCelestialSpaceId` | `Guid` |
662
+ | `ParentCelestialSpace` | `ICelestialSpace` |
663
+ | `ParentCelestialBodyId` | `Guid` |
664
+ | `ParentCelestialBody` | `ICelestialBody` |
665
+ | `ParentZomeId` | `Guid` |
666
+ | `ParentZome` | `IZome` |
667
+
668
+ **Example**
669
+
670
+ ```js
671
+ const { isError, message, result } = await oasis.data.saveHolon({
672
+ holonId: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
673
+ holon: {},
674
+ preferredProvider: { },
675
+ requestType: "example string",
676
+ priority: 1,
677
+ providerTypeString: "example string",
678
+ parameters: /* <System.Collections.Generic.Dictionary<string, object>> */
679
+ });
680
+ if (isError) throw new Error(message);
681
+ console.log(result);
682
+ ```
683
+
684
+ Example response:
685
+
686
+ ```json
687
+ {
688
+ "isError": false,
689
+ "message": "",
690
+ "result": { "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": {} }
691
+ }
692
+ ```
693
+
694
+ ---
695
+
696
+ ### `saveHolonOffChain`
697
+
698
+ Save's a holon data object (meta data) to the given off-chain provider and then links its hash to the on-chain provider. Set the showDetailedSettings flag to true to view detailed settings such as the list of providers in the auto-failover, auto-replication &amp; auto-load balance lists.
699
+
700
+ **POST** `api/data/save-holon-off-chain`
701
+
702
+ **Request**
703
+
704
+ Body type: `SaveHolonRequest`
705
+
706
+ | Field | Type |
707
+ | --- | --- |
708
+ | `HolonId` | `Guid` |
709
+ | `Holon` | `object` |
710
+ | `PreferredProvider` | `ProviderType` |
711
+ | `RequestType` | `string` |
712
+ | `Priority` | `int` |
713
+ | `ProviderTypeString` | `string` |
714
+ | `Parameters` | `System.Collections.Generic.Dictionary<string, object>` |
715
+
716
+ **Response**
717
+
718
+ Standard `OASISResult` envelope (see top of this page) with:
719
+
720
+ `result` type: `Holon`
721
+
722
+ | Field | Type |
723
+ | --- | --- |
724
+ | `GlobalHolonData` | `GlobalHolonData` |
725
+ | `ProviderUniqueStorageKey` | `Dictionary<ProviderType, string>` |
726
+ | `ProviderMetaData` | `Dictionary<ProviderType, Dictionary<string, string>>` |
727
+ | `CustomKey` | `string` |
728
+ | `IsNewHolon` | `bool` |
729
+ | `IsSaving` | `bool` |
730
+ | `PreviousVersionId` | `Guid` |
731
+ | `PreviousVersionProviderUniqueStorageKey` | `Dictionary<ProviderType, string>` |
732
+ | `CreatedProviderType` | `EnumValue<ProviderType>` |
733
+ | `InstanceSavedOnProviderType` | `EnumValue<ProviderType>` |
734
+ | `CreatedOASISType` | `EnumValue<OASISType>` |
735
+ | `Nodes` | `IList<INode>` |
736
+ | `ParentOmniverseId` | `Guid` |
737
+ | `ParentOmniverse` | `IOmiverse` |
738
+ | `ParentMultiverseId` | `Guid` |
739
+ | `ParentMultiverse` | `IMultiverse` |
740
+ | `ParentUniverseId` | `Guid` |
741
+ | `ParentUniverse` | `IUniverse` |
742
+ | `ParentDimensionId` | `Guid` |
743
+ | `ParentDimension` | `IDimension` |
744
+ | `DimensionLevel` | `DimensionLevel` |
745
+ | `SubDimensionLevel` | `SubDimensionLevel` |
746
+ | `ParentGalaxyClusterId` | `Guid` |
747
+ | `ParentGalaxyCluster` | `IGalaxyCluster` |
748
+ | `ParentGalaxyId` | `Guid` |
749
+ | `ParentGalaxy` | `IGalaxy` |
750
+ | `ParentSolarSystemId` | `Guid` |
751
+ | `ParentSolarSystem` | `ISolarSystem` |
752
+ | `ParentGreatGrandSuperStarId` | `Guid` |
753
+ | `ParentGreatGrandSuperStar` | `IGreatGrandSuperStar` |
754
+ | `ParentGrandSuperStarId` | `Guid` |
755
+ | `ParentGrandSuperStar` | `IGrandSuperStar` |
756
+ | `ParentSuperStarId` | `Guid` |
757
+ | `ParentSuperStar` | `ISuperStar` |
758
+ | `ParentStarId` | `Guid` |
759
+ | `ParentStar` | `IStar` |
760
+ | `ParentPlanetId` | `Guid` |
761
+ | `ParentPlanet` | `IPlanet` |
762
+ | `ParentMoonId` | `Guid` |
763
+ | `ParentMoon` | `IMoon` |
764
+ | `ParentCelestialSpaceId` | `Guid` |
765
+ | `ParentCelestialSpace` | `ICelestialSpace` |
766
+ | `ParentCelestialBodyId` | `Guid` |
767
+ | `ParentCelestialBody` | `ICelestialBody` |
768
+ | `ParentZomeId` | `Guid` |
769
+ | `ParentZome` | `IZome` |
770
+
771
+ **Example**
772
+
773
+ ```js
774
+ const { isError, message, result } = await oasis.data.saveHolonOffChain({
775
+ holonId: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
776
+ holon: {},
777
+ preferredProvider: { },
778
+ requestType: "example string",
779
+ priority: 1,
780
+ providerTypeString: "example string",
781
+ parameters: /* <System.Collections.Generic.Dictionary<string, object>> */
782
+ });
783
+ if (isError) throw new Error(message);
784
+ console.log(result);
785
+ ```
786
+
787
+ Example response:
788
+
789
+ ```json
790
+ {
791
+ "isError": false,
792
+ "message": "",
793
+ "result": { "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": { "Score": 1.0 }, "InstanceSavedOnProviderType": {}, "CreatedOASISType": { "Score": 1.0 }, "Nodes": [{ "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Parent": { "CreatedOASISType": {}, "CreatedProviderType": {}, "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": [], "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": [] }] }, "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": {} }, "NodeName": "example string", "NodeType": { } }], "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": {} }
794
+ }
795
+ ```
796
+