@oasisomniverse/web5-api 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/README.md +250 -0
  2. package/docs/README.md +44 -0
  3. package/docs/modules/Avatar.md +606 -0
  4. package/docs/modules/CelestialBodies.md +1051 -0
  5. package/docs/modules/CelestialBodiesMetaData.md +949 -0
  6. package/docs/modules/CelestialSpaces.md +1051 -0
  7. package/docs/modules/Chapters.md +955 -0
  8. package/docs/modules/Competition.md +594 -0
  9. package/docs/modules/Cosmic.md +3653 -0
  10. package/docs/modules/Games.md +2619 -0
  11. package/docs/modules/GeoHotSpots.md +1027 -0
  12. package/docs/modules/GeoNFTs.md +1049 -0
  13. package/docs/modules/Health.md +90 -0
  14. package/docs/modules/Holons.md +1139 -0
  15. package/docs/modules/HolonsMetaData.md +949 -0
  16. package/docs/modules/InventoryItems.md +1071 -0
  17. package/docs/modules/Libraries.md +1052 -0
  18. package/docs/modules/Missions.md +1286 -0
  19. package/docs/modules/NFTs.md +1008 -0
  20. package/docs/modules/OAPPs.md +1190 -0
  21. package/docs/modules/Parks.md +1079 -0
  22. package/docs/modules/Plugins.md +1138 -0
  23. package/docs/modules/Quests.md +1941 -0
  24. package/docs/modules/Runtimes.md +1112 -0
  25. package/docs/modules/STAR.md +178 -0
  26. package/docs/modules/Templates.md +990 -0
  27. package/docs/modules/Zomes.md +1049 -0
  28. package/docs/modules/ZomesMetaData.md +949 -0
  29. package/index.d.ts +97 -0
  30. package/index.js +3 -0
  31. package/index.mjs +4 -0
  32. package/package.json +117 -0
  33. package/src/core/httpClient.js +110 -0
  34. package/src/core/routeHelper.js +85 -0
  35. package/src/core/tokenStore.js +52 -0
  36. package/src/core/types.d.ts +18 -0
  37. package/src/index.js +60 -0
  38. package/src/modules/Auth.d.ts +15 -0
  39. package/src/modules/Auth.js +62 -0
  40. package/src/modules/Avatar.d.ts +45 -0
  41. package/src/modules/Avatar.js +47 -0
  42. package/src/modules/CelestialBodies.d.ts +72 -0
  43. package/src/modules/CelestialBodies.js +65 -0
  44. package/src/modules/CelestialBodiesMetaData.d.ts +69 -0
  45. package/src/modules/CelestialBodiesMetaData.js +61 -0
  46. package/src/modules/CelestialSpaces.d.ts +72 -0
  47. package/src/modules/CelestialSpaces.js +65 -0
  48. package/src/modules/Chapters.d.ts +66 -0
  49. package/src/modules/Chapters.js +61 -0
  50. package/src/modules/Competition.d.ts +33 -0
  51. package/src/modules/Competition.js +39 -0
  52. package/src/modules/Cosmic.d.ts +222 -0
  53. package/src/modules/Cosmic.js +165 -0
  54. package/src/modules/Games.d.ts +171 -0
  55. package/src/modules/Games.js +131 -0
  56. package/src/modules/GeoHotSpots.d.ts +66 -0
  57. package/src/modules/GeoHotSpots.js +61 -0
  58. package/src/modules/GeoNFTs.d.ts +72 -0
  59. package/src/modules/GeoNFTs.js +65 -0
  60. package/src/modules/Health.d.ts +12 -0
  61. package/src/modules/Health.js +25 -0
  62. package/src/modules/Holons.d.ts +78 -0
  63. package/src/modules/Holons.js +69 -0
  64. package/src/modules/HolonsMetaData.d.ts +69 -0
  65. package/src/modules/HolonsMetaData.js +61 -0
  66. package/src/modules/InventoryItems.d.ts +69 -0
  67. package/src/modules/InventoryItems.js +63 -0
  68. package/src/modules/Libraries.d.ts +72 -0
  69. package/src/modules/Libraries.js +65 -0
  70. package/src/modules/Missions.d.ts +87 -0
  71. package/src/modules/Missions.js +75 -0
  72. package/src/modules/NFTs.d.ts +69 -0
  73. package/src/modules/NFTs.js +63 -0
  74. package/src/modules/OAPPs.d.ts +69 -0
  75. package/src/modules/OAPPs.js +61 -0
  76. package/src/modules/Parks.d.ts +72 -0
  77. package/src/modules/Parks.js +65 -0
  78. package/src/modules/Plugins.d.ts +78 -0
  79. package/src/modules/Plugins.js +69 -0
  80. package/src/modules/Quests.d.ts +129 -0
  81. package/src/modules/Quests.js +101 -0
  82. package/src/modules/Runtimes.d.ts +81 -0
  83. package/src/modules/Runtimes.js +69 -0
  84. package/src/modules/STAR.d.ts +18 -0
  85. package/src/modules/STAR.js +29 -0
  86. package/src/modules/Templates.d.ts +72 -0
  87. package/src/modules/Templates.js +63 -0
  88. package/src/modules/Zomes.d.ts +72 -0
  89. package/src/modules/Zomes.js +65 -0
  90. package/src/modules/ZomesMetaData.d.ts +69 -0
  91. package/src/modules/ZomesMetaData.js +61 -0
  92. package/src/modules/index.js +67 -0
@@ -0,0 +1,178 @@
1
+ # STAR — `star.sTAR`
2
+
3
+ Source controller: [`STARController.cs`](https://github.com/NextGenSoftwareUK/OASIS2/blob/main/STAR%20ODK/NextGenSoftware.OASIS.STAR.WebAPI/Controllers/STARController.cs)
4
+ Route prefix: `api/sTAR`
5
+ 4 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
+ ### `beamIn`
22
+
23
+ Beams in (authenticates) an avatar to the STAR system.
24
+
25
+ **POST** `api/sTAR/beam-in`
26
+
27
+ **Request**
28
+
29
+ Body type: `BeamInRequest`
30
+
31
+ | Field | Type |
32
+ | --- | --- |
33
+ | `Username` | `string` |
34
+ | `Password` | `string` |
35
+
36
+ **Response**
37
+
38
+ Standard `OASISResult` envelope (see top of this page) with:
39
+
40
+ `result` type: `IActionResult` (not part of the request/response payload).
41
+
42
+ **Example**
43
+
44
+ ```js
45
+ const { isError, message, result } = await star.sTAR.beamIn({
46
+ username: "example string",
47
+ password: "example string"
48
+ });
49
+ if (isError) throw new Error(message);
50
+ console.log(result);
51
+ ```
52
+
53
+ Example response:
54
+
55
+ ```json
56
+ {
57
+ "isError": false,
58
+ "message": "",
59
+ "result": null
60
+ }
61
+ ```
62
+
63
+ ---
64
+
65
+ ### `extinguishSTAR`
66
+
67
+ Extinguishes (stops) the STAR system.
68
+
69
+ **POST** `api/sTAR/extinguish`
70
+
71
+ **Request**
72
+
73
+ No request body.
74
+
75
+ **Response**
76
+
77
+ Standard `OASISResult` envelope (see top of this page) with:
78
+
79
+ `result` type: `IActionResult` (not part of the request/response payload).
80
+
81
+ **Example**
82
+
83
+ ```js
84
+ const { isError, message, result } = await star.sTAR.extinguishSTAR({});
85
+ if (isError) throw new Error(message);
86
+ console.log(result);
87
+ ```
88
+
89
+ Example response:
90
+
91
+ ```json
92
+ {
93
+ "isError": false,
94
+ "message": "",
95
+ "result": null
96
+ }
97
+ ```
98
+
99
+ ---
100
+
101
+ ### `getStatus`
102
+
103
+ Retrieves the current status of the STAR system.
104
+
105
+ **GET** `api/sTAR/status`
106
+
107
+ **Request**
108
+
109
+ No request body.
110
+
111
+ **Response**
112
+
113
+ Standard `OASISResult` envelope (see top of this page) with:
114
+
115
+ `result` type: `object`
116
+
117
+ **Example**
118
+
119
+ ```js
120
+ const { isError, message, result } = await star.sTAR.getStatus({});
121
+ if (isError) throw new Error(message);
122
+ console.log(result);
123
+ ```
124
+
125
+ Example response:
126
+
127
+ ```json
128
+ {
129
+ "isError": false,
130
+ "message": "",
131
+ "result": {}
132
+ }
133
+ ```
134
+
135
+ ---
136
+
137
+ ### `igniteSTAR`
138
+
139
+ Ignites (starts) the STAR system with optional authentication credentials.
140
+
141
+ **POST** `api/sTAR/ignite`
142
+
143
+ **Request**
144
+
145
+ Body type: `IgniteRequest`
146
+
147
+ | Field | Type |
148
+ | --- | --- |
149
+ | `UserName` | `string` |
150
+ | `Password` | `string` |
151
+
152
+ **Response**
153
+
154
+ Standard `OASISResult` envelope (see top of this page) with:
155
+
156
+ `result` type: `IActionResult` (not part of the request/response payload).
157
+
158
+ **Example**
159
+
160
+ ```js
161
+ const { isError, message, result } = await star.sTAR.igniteSTAR({
162
+ userName: "example string",
163
+ password: "example string"
164
+ });
165
+ if (isError) throw new Error(message);
166
+ console.log(result);
167
+ ```
168
+
169
+ Example response:
170
+
171
+ ```json
172
+ {
173
+ "isError": false,
174
+ "message": "",
175
+ "result": null
176
+ }
177
+ ```
178
+