@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,320 @@
1
+ # Messaging — `oasis.messaging`
2
+
3
+ Source controller: [`MessagingController.cs`](https://github.com/NextGenSoftwareUK/OASIS2/blob/main/ONODE/NextGenSoftware.OASIS.API.ONODE.WebAPI/Controllers/MessagingController.cs)
4
+ Route prefix: `api/messaging`
5
+ 6 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
+ ### `getConversation`
22
+
23
+ Get conversation between current avatar and another avatar
24
+
25
+ **GET** `api/messaging/conversation/{otherAvatarId}`
26
+
27
+ Route parameters:
28
+
29
+ | Field | Type |
30
+ | --- | --- |
31
+ | `otherAvatarId` | `Guid` |
32
+
33
+ **Request**
34
+
35
+ Query parameters:
36
+
37
+ | Field | Type |
38
+ | --- | --- |
39
+ | `limit` | `int (optional)` |
40
+ | `offset` | `int (optional)` |
41
+
42
+ **Response**
43
+
44
+ Standard `OASISResult` envelope (see top of this page) with:
45
+
46
+ `result` type: `Message` (array)
47
+
48
+ | Field | Type |
49
+ | --- | --- |
50
+ | `Id` | `Guid` |
51
+ | `FromAvatarId` | `Guid` |
52
+ | `ToAvatarId` | `Guid` |
53
+ | `Content` | `string` |
54
+ | `MessageType` | `MessagingType` |
55
+ | `Timestamp` | `DateTime` |
56
+ | `IsRead` | `bool` |
57
+ | `ReadAt` | `DateTime?` |
58
+ | `Metadata` | `Dictionary<string, object>` |
59
+
60
+ **Example**
61
+
62
+ ```js
63
+ const { isError, message, result } = await oasis.messaging.getConversation({
64
+ otherAvatarId: '<otherAvatarId>',
65
+ limit: 1,
66
+ offset: 1
67
+ });
68
+ if (isError) throw new Error(message);
69
+ console.log(result);
70
+ ```
71
+
72
+ Example response:
73
+
74
+ ```json
75
+ {
76
+ "isError": false,
77
+ "message": "",
78
+ "result": [{ "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "FromAvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ToAvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Content": "example string", "MessageType": { }, "Timestamp": "2026-01-01T00:00:00Z", "IsRead": true, "ReadAt": "2026-01-01T00:00:00Z", "Metadata": { "<string>": {} } }]
79
+ }
80
+ ```
81
+
82
+ ---
83
+
84
+ ### `getMessages`
85
+
86
+ Get messages for the current avatar
87
+
88
+ **GET** `api/messaging/messages`
89
+
90
+ **Request**
91
+
92
+ Query parameters:
93
+
94
+ | Field | Type |
95
+ | --- | --- |
96
+ | `limit` | `int (optional)` |
97
+ | `offset` | `int (optional)` |
98
+
99
+ **Response**
100
+
101
+ Standard `OASISResult` envelope (see top of this page) with:
102
+
103
+ `result` type: `Message` (array)
104
+
105
+ | Field | Type |
106
+ | --- | --- |
107
+ | `Id` | `Guid` |
108
+ | `FromAvatarId` | `Guid` |
109
+ | `ToAvatarId` | `Guid` |
110
+ | `Content` | `string` |
111
+ | `MessageType` | `MessagingType` |
112
+ | `Timestamp` | `DateTime` |
113
+ | `IsRead` | `bool` |
114
+ | `ReadAt` | `DateTime?` |
115
+ | `Metadata` | `Dictionary<string, object>` |
116
+
117
+ **Example**
118
+
119
+ ```js
120
+ const { isError, message, result } = await oasis.messaging.getMessages({
121
+ limit: 1,
122
+ offset: 1
123
+ });
124
+ if (isError) throw new Error(message);
125
+ console.log(result);
126
+ ```
127
+
128
+ Example response:
129
+
130
+ ```json
131
+ {
132
+ "isError": false,
133
+ "message": "",
134
+ "result": [{ "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "FromAvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ToAvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Content": "example string", "MessageType": { }, "Timestamp": "2026-01-01T00:00:00Z", "IsRead": true, "ReadAt": "2026-01-01T00:00:00Z", "Metadata": { "<string>": {} } }]
135
+ }
136
+ ```
137
+
138
+ ---
139
+
140
+ ### `getNotifications`
141
+
142
+ Get notifications for the current avatar
143
+
144
+ **GET** `api/messaging/notifications`
145
+
146
+ **Request**
147
+
148
+ Query parameters:
149
+
150
+ | Field | Type |
151
+ | --- | --- |
152
+ | `limit` | `int (optional)` |
153
+ | `offset` | `int (optional)` |
154
+
155
+ **Response**
156
+
157
+ Standard `OASISResult` envelope (see top of this page) with:
158
+
159
+ `result` type: `Notification` (array)
160
+
161
+ | Field | Type |
162
+ | --- | --- |
163
+ | `Id` | `Guid` |
164
+ | `AvatarId` | `Guid` |
165
+ | `Title` | `string` |
166
+ | `Content` | `string` |
167
+ | `Type` | `NotificationType` |
168
+ | `CreatedAt` | `DateTime` |
169
+ | `IsRead` | `bool` |
170
+ | `ReadAt` | `DateTime?` |
171
+ | `Metadata` | `Dictionary<string, object>` |
172
+
173
+ **Example**
174
+
175
+ ```js
176
+ const { isError, message, result } = await oasis.messaging.getNotifications({
177
+ limit: 1,
178
+ offset: 1
179
+ });
180
+ if (isError) throw new Error(message);
181
+ console.log(result);
182
+ ```
183
+
184
+ Example response:
185
+
186
+ ```json
187
+ {
188
+ "isError": false,
189
+ "message": "",
190
+ "result": [{ "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "AvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Title": "example string", "Content": "example string", "Type": { }, "CreatedAt": "2026-01-01T00:00:00Z", "IsRead": true, "ReadAt": "2026-01-01T00:00:00Z", "Metadata": { "<string>": {} } }]
191
+ }
192
+ ```
193
+
194
+ ---
195
+
196
+ ### `markMessagesAsRead`
197
+
198
+ Mark messages as read
199
+
200
+ **POST** `api/messaging/mark-messages-read`
201
+
202
+ **Request**
203
+
204
+ Body type: `Guid` (array)
205
+
206
+ **Response**
207
+
208
+ Standard `OASISResult` envelope (see top of this page) with:
209
+
210
+ `result` type: `bool`
211
+
212
+ **Example**
213
+
214
+ ```js
215
+ const { isError, message, result } = await oasis.messaging.markMessagesAsRead({
216
+ /* ...request body fields */
217
+ });
218
+ if (isError) throw new Error(message);
219
+ console.log(result);
220
+ ```
221
+
222
+ Example response:
223
+
224
+ ```json
225
+ {
226
+ "isError": false,
227
+ "message": "",
228
+ "result": true
229
+ }
230
+ ```
231
+
232
+ ---
233
+
234
+ ### `markNotificationsAsRead`
235
+
236
+ Mark notifications as read
237
+
238
+ **POST** `api/messaging/mark-notifications-read`
239
+
240
+ **Request**
241
+
242
+ Body type: `Guid` (array)
243
+
244
+ **Response**
245
+
246
+ Standard `OASISResult` envelope (see top of this page) with:
247
+
248
+ `result` type: `bool`
249
+
250
+ **Example**
251
+
252
+ ```js
253
+ const { isError, message, result } = await oasis.messaging.markNotificationsAsRead({
254
+ /* ...request body fields */
255
+ });
256
+ if (isError) throw new Error(message);
257
+ console.log(result);
258
+ ```
259
+
260
+ Example response:
261
+
262
+ ```json
263
+ {
264
+ "isError": false,
265
+ "message": "",
266
+ "result": true
267
+ }
268
+ ```
269
+
270
+ ---
271
+
272
+ ### `sendMessageToAvatar`
273
+
274
+ Send's a message to the given avatar
275
+
276
+ **POST** `api/messaging/send-message-to-avatar/{toAvatarId}`
277
+
278
+ Route parameters:
279
+
280
+ | Field | Type |
281
+ | --- | --- |
282
+ | `toAvatarId` | `Guid` |
283
+
284
+ **Request**
285
+
286
+ Body fields:
287
+
288
+ | Field | Type |
289
+ | --- | --- |
290
+ | `content` | `string` |
291
+ | `messageType` | `MessagingType (optional)` |
292
+
293
+ **Response**
294
+
295
+ Standard `OASISResult` envelope (see top of this page) with:
296
+
297
+ `result` type: `bool`
298
+
299
+ **Example**
300
+
301
+ ```js
302
+ const { isError, message, result } = await oasis.messaging.sendMessageToAvatar({
303
+ toAvatarId: '<toAvatarId>',
304
+ content: 'example string',
305
+ messageType: '<messageType>'
306
+ });
307
+ if (isError) throw new Error(message);
308
+ console.log(result);
309
+ ```
310
+
311
+ Example response:
312
+
313
+ ```json
314
+ {
315
+ "isError": false,
316
+ "message": "",
317
+ "result": true
318
+ }
319
+ ```
320
+