@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.
- package/README.md +464 -0
- package/docs/README.md +52 -0
- package/docs/auth.md +89 -0
- package/docs/getting-started.md +129 -0
- package/docs/modules/Avatar.md +4160 -0
- package/docs/modules/Bridge.md +394 -0
- package/docs/modules/Chat.md +168 -0
- package/docs/modules/Clan.md +552 -0
- package/docs/modules/Competition.md +594 -0
- package/docs/modules/Data.md +796 -0
- package/docs/modules/EOSIO.md +508 -0
- package/docs/modules/Eggs.md +396 -0
- package/docs/modules/Files.md +312 -0
- package/docs/modules/Gifts.md +306 -0
- package/docs/modules/Health.md +90 -0
- package/docs/modules/Holochain.md +374 -0
- package/docs/modules/HyperDrive.md +3857 -0
- package/docs/modules/Karma.md +644 -0
- package/docs/modules/Keys.md +3303 -0
- package/docs/modules/Map.md +1026 -0
- package/docs/modules/Messaging.md +320 -0
- package/docs/modules/Nft.md +2216 -0
- package/docs/modules/OLand.md +425 -0
- package/docs/modules/ONET.md +442 -0
- package/docs/modules/ONODE.md +504 -0
- package/docs/modules/Provider.md +1396 -0
- package/docs/modules/Search.md +69 -0
- package/docs/modules/Seeds.md +167 -0
- package/docs/modules/Settings.md +533 -0
- package/docs/modules/Share.md +64 -0
- package/docs/modules/Social.md +190 -0
- package/docs/modules/Solana.md +150 -0
- package/docs/modules/Stats.md +359 -0
- package/docs/modules/Subscription.md +437 -0
- package/docs/modules/Video.md +150 -0
- package/docs/modules/Wallet.md +1993 -0
- package/index.d.ts +106 -0
- package/index.js +3 -0
- package/index.mjs +4 -0
- package/package.json +120 -0
- package/src/core/httpClient.js +110 -0
- package/src/core/routeHelper.js +50 -0
- package/src/core/tokenStore.js +52 -0
- package/src/core/types.d.ts +18 -0
- package/src/index.js +46 -0
- package/src/modules/Auth.d.ts +28 -0
- package/src/modules/Auth.js +98 -0
- package/src/modules/Avatar.d.ts +192 -0
- package/src/modules/Avatar.js +143 -0
- package/src/modules/Bridge.d.ts +24 -0
- package/src/modules/Bridge.js +35 -0
- package/src/modules/Cargo.js +35 -0
- package/src/modules/Chat.d.ts +15 -0
- package/src/modules/Chat.js +27 -0
- package/src/modules/Clan.d.ts +36 -0
- package/src/modules/Clan.js +41 -0
- package/src/modules/Competition.d.ts +33 -0
- package/src/modules/Competition.js +39 -0
- package/src/modules/Core.js +27 -0
- package/src/modules/Data.d.ts +36 -0
- package/src/modules/Data.js +41 -0
- package/src/modules/EOSIO.d.ts +33 -0
- package/src/modules/EOSIO.js +39 -0
- package/src/modules/Eggs.d.ts +24 -0
- package/src/modules/Eggs.js +33 -0
- package/src/modules/Files.d.ts +24 -0
- package/src/modules/Files.js +33 -0
- package/src/modules/Gifts.d.ts +24 -0
- package/src/modules/Gifts.js +33 -0
- package/src/modules/Health.d.ts +12 -0
- package/src/modules/Health.js +25 -0
- package/src/modules/Holochain.d.ts +27 -0
- package/src/modules/Holochain.js +35 -0
- package/src/modules/HyperDrive.d.ts +237 -0
- package/src/modules/HyperDrive.js +175 -0
- package/src/modules/Karma.d.ts +42 -0
- package/src/modules/Karma.js +45 -0
- package/src/modules/Keys.d.ts +183 -0
- package/src/modules/Keys.js +139 -0
- package/src/modules/Map.d.ts +75 -0
- package/src/modules/Map.js +65 -0
- package/src/modules/Messaging.d.ts +24 -0
- package/src/modules/Messaging.js +33 -0
- package/src/modules/Nft.d.ts +102 -0
- package/src/modules/Nft.js +85 -0
- package/src/modules/OAPP.js +31 -0
- package/src/modules/OLand.d.ts +27 -0
- package/src/modules/OLand.js +35 -0
- package/src/modules/ONET.d.ts +39 -0
- package/src/modules/ONET.js +43 -0
- package/src/modules/ONODE.d.ts +45 -0
- package/src/modules/ONODE.js +47 -0
- package/src/modules/Provider.d.ts +99 -0
- package/src/modules/Provider.js +83 -0
- package/src/modules/Search.d.ts +9 -0
- package/src/modules/Search.js +23 -0
- package/src/modules/Seeds.d.ts +15 -0
- package/src/modules/Seeds.js +27 -0
- package/src/modules/Settings.d.ts +48 -0
- package/src/modules/Settings.js +47 -0
- package/src/modules/Share.d.ts +9 -0
- package/src/modules/Share.js +23 -0
- package/src/modules/Social.d.ts +18 -0
- package/src/modules/Social.js +29 -0
- package/src/modules/Solana.d.ts +12 -0
- package/src/modules/Solana.js +25 -0
- package/src/modules/Stats.d.ts +30 -0
- package/src/modules/Stats.js +37 -0
- package/src/modules/Subscription.d.ts +36 -0
- package/src/modules/Subscription.js +41 -0
- package/src/modules/Telos.js +39 -0
- package/src/modules/Video.d.ts +15 -0
- package/src/modules/Video.js +27 -0
- package/src/modules/Wallet.d.ts +102 -0
- package/src/modules/Wallet.js +85 -0
- package/src/modules/index.js +79 -0
|
@@ -0,0 +1,552 @@
|
|
|
1
|
+
# Clan — `oasis.clan`
|
|
2
|
+
|
|
3
|
+
Source controller: [`ClanController.cs`](https://github.com/NextGenSoftwareUK/OASIS2/blob/main/ONODE/NextGenSoftware.OASIS.API.ONODE.WebAPI/Controllers/ClanController.cs)
|
|
4
|
+
Route prefix: `api/clan`
|
|
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
|
+
### `addAvatarToClan`
|
|
22
|
+
|
|
23
|
+
Add an avatar to a clan as a member.</summary>
|
|
24
|
+
|
|
25
|
+
**POST** `api/clan/{clanId:guid}/members/{avatarId:guid}`
|
|
26
|
+
|
|
27
|
+
Route parameters:
|
|
28
|
+
|
|
29
|
+
| Field | Type |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| `clanId` | `Guid` |
|
|
32
|
+
| `avatarId` | `Guid` |
|
|
33
|
+
|
|
34
|
+
**Request**
|
|
35
|
+
|
|
36
|
+
Body fields:
|
|
37
|
+
|
|
38
|
+
| Field | Type |
|
|
39
|
+
| --- | --- |
|
|
40
|
+
| `providerType` | `ProviderType? (optional)` |
|
|
41
|
+
|
|
42
|
+
**Response**
|
|
43
|
+
|
|
44
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
45
|
+
|
|
46
|
+
`result` type: `bool`
|
|
47
|
+
|
|
48
|
+
**Example**
|
|
49
|
+
|
|
50
|
+
```js
|
|
51
|
+
const { isError, message, result } = await oasis.clan.addAvatarToClan({
|
|
52
|
+
clanId: '<clanId>',
|
|
53
|
+
avatarId: '<avatarId>',
|
|
54
|
+
providerType: '<providerType>'
|
|
55
|
+
});
|
|
56
|
+
if (isError) throw new Error(message);
|
|
57
|
+
console.log(result);
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Example response:
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"isError": false,
|
|
65
|
+
"message": "",
|
|
66
|
+
"result": true
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
### `create`
|
|
73
|
+
|
|
74
|
+
Create a new clan. The authenticated avatar becomes the owner and first member.</summary>
|
|
75
|
+
|
|
76
|
+
**POST** `api/clan`
|
|
77
|
+
|
|
78
|
+
**Request**
|
|
79
|
+
|
|
80
|
+
Body type: `CreateClanRequest`
|
|
81
|
+
|
|
82
|
+
| Field | Type |
|
|
83
|
+
| --- | --- |
|
|
84
|
+
| `Name` | `string` |
|
|
85
|
+
| `Description` | `string` |
|
|
86
|
+
|
|
87
|
+
**Response**
|
|
88
|
+
|
|
89
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
90
|
+
|
|
91
|
+
`result` type: `IClan`
|
|
92
|
+
|
|
93
|
+
| Field | Type |
|
|
94
|
+
| --- | --- |
|
|
95
|
+
| `OwnerAvatarId` | `Guid` |
|
|
96
|
+
| `MemberIds` | `IList<Guid>` |
|
|
97
|
+
| `Inventory` | `IList<IInventoryItem>` |
|
|
98
|
+
|
|
99
|
+
**Example**
|
|
100
|
+
|
|
101
|
+
```js
|
|
102
|
+
const { isError, message, result } = await oasis.clan.create({
|
|
103
|
+
name: "example string",
|
|
104
|
+
description: "example string"
|
|
105
|
+
});
|
|
106
|
+
if (isError) throw new Error(message);
|
|
107
|
+
console.log(result);
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Example response:
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"isError": false,
|
|
115
|
+
"message": "",
|
|
116
|
+
"result": { "OwnerAvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "MemberIds": ["3fa85f64-5717-4562-b3fc-2c963f66afa6"], "Inventory": [{ "Image2D": "<base64-bytes>", "Image2DURI": "https://example.com/asset.png", "ThumbnailUrl": "example string", "Object3D": "<base64-bytes>", "Object3DURI": "https://example.com/asset.png", "Quantity": 1, "Stack": true, "IsStackable": true, "GameSource": "example string", "ItemType": "example string", "NftId": "example string", "Rarity": "example string", "MaxQuantity": 1, "Weight": 1.0, "IsUsable": true, "IsTradeable": true, "OwnerAvatarId": "example string", "AcquiredOn": "2026-01-01T00:00:00Z", "LastUsedOn": "2026-01-01T00:00:00Z", "Properties": { "<string>": {} } }] }
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
### `delete`
|
|
123
|
+
|
|
124
|
+
Delete a clan. Typically only the owner may delete (idempotent if not found).</summary>
|
|
125
|
+
|
|
126
|
+
**DELETE** `api/clan/{clanId:guid}`
|
|
127
|
+
|
|
128
|
+
Route parameters:
|
|
129
|
+
|
|
130
|
+
| Field | Type |
|
|
131
|
+
| --- | --- |
|
|
132
|
+
| `clanId` | `Guid` |
|
|
133
|
+
|
|
134
|
+
**Request**
|
|
135
|
+
|
|
136
|
+
Query parameters:
|
|
137
|
+
|
|
138
|
+
| Field | Type |
|
|
139
|
+
| --- | --- |
|
|
140
|
+
| `providerType` | `ProviderType? (optional)` |
|
|
141
|
+
|
|
142
|
+
**Response**
|
|
143
|
+
|
|
144
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
145
|
+
|
|
146
|
+
`result` type: `bool`
|
|
147
|
+
|
|
148
|
+
**Example**
|
|
149
|
+
|
|
150
|
+
```js
|
|
151
|
+
const { isError, message, result } = await oasis.clan.delete({
|
|
152
|
+
clanId: '<clanId>',
|
|
153
|
+
providerType: '<providerType>'
|
|
154
|
+
});
|
|
155
|
+
if (isError) throw new Error(message);
|
|
156
|
+
console.log(result);
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Example response:
|
|
160
|
+
|
|
161
|
+
```json
|
|
162
|
+
{
|
|
163
|
+
"isError": false,
|
|
164
|
+
"message": "",
|
|
165
|
+
"result": true
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
### `getClanInventory`
|
|
172
|
+
|
|
173
|
+
Get clan treasury (inventory).</summary>
|
|
174
|
+
|
|
175
|
+
**GET** `api/clan/{clanId:guid}/inventory`
|
|
176
|
+
|
|
177
|
+
Route parameters:
|
|
178
|
+
|
|
179
|
+
| Field | Type |
|
|
180
|
+
| --- | --- |
|
|
181
|
+
| `clanId` | `Guid` |
|
|
182
|
+
|
|
183
|
+
**Request**
|
|
184
|
+
|
|
185
|
+
Query parameters:
|
|
186
|
+
|
|
187
|
+
| Field | Type |
|
|
188
|
+
| --- | --- |
|
|
189
|
+
| `providerType` | `ProviderType? (optional)` |
|
|
190
|
+
|
|
191
|
+
**Response**
|
|
192
|
+
|
|
193
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
194
|
+
|
|
195
|
+
`result` type: `IInventoryItem` (array)
|
|
196
|
+
|
|
197
|
+
| Field | Type |
|
|
198
|
+
| --- | --- |
|
|
199
|
+
| `Image2D` | `byte[]` |
|
|
200
|
+
| `Image2DURI` | `Uri` |
|
|
201
|
+
| `ThumbnailUrl` | `string` |
|
|
202
|
+
| `Object3D` | `byte[]` |
|
|
203
|
+
| `Object3DURI` | `Uri` |
|
|
204
|
+
| `Quantity` | `int` |
|
|
205
|
+
| `Stack` | `bool` |
|
|
206
|
+
| `IsStackable` | `bool` |
|
|
207
|
+
| `GameSource` | `string` |
|
|
208
|
+
| `ItemType` | `string` |
|
|
209
|
+
| `NftId` | `string` |
|
|
210
|
+
| `Rarity` | `string` |
|
|
211
|
+
| `MaxQuantity` | `int` |
|
|
212
|
+
| `Weight` | `float` |
|
|
213
|
+
| `IsUsable` | `bool` |
|
|
214
|
+
| `IsTradeable` | `bool` |
|
|
215
|
+
| `OwnerAvatarId` | `string` |
|
|
216
|
+
| `AcquiredOn` | `DateTime` |
|
|
217
|
+
| `LastUsedOn` | `DateTime` |
|
|
218
|
+
| `Properties` | `Dictionary<string, object>` |
|
|
219
|
+
|
|
220
|
+
**Example**
|
|
221
|
+
|
|
222
|
+
```js
|
|
223
|
+
const { isError, message, result } = await oasis.clan.getClanInventory({
|
|
224
|
+
clanId: '<clanId>',
|
|
225
|
+
providerType: '<providerType>'
|
|
226
|
+
});
|
|
227
|
+
if (isError) throw new Error(message);
|
|
228
|
+
console.log(result);
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Example response:
|
|
232
|
+
|
|
233
|
+
```json
|
|
234
|
+
{
|
|
235
|
+
"isError": false,
|
|
236
|
+
"message": "",
|
|
237
|
+
"result": [{ "Image2D": "<base64-bytes>", "Image2DURI": "https://example.com/asset.png", "ThumbnailUrl": "example string", "Object3D": "<base64-bytes>", "Object3DURI": "https://example.com/asset.png", "Quantity": 1, "Stack": true, "IsStackable": true, "GameSource": "example string", "ItemType": "example string", "NftId": "example string", "Rarity": "example string", "MaxQuantity": 1, "Weight": 1.0, "IsUsable": true, "IsTradeable": true, "OwnerAvatarId": "example string", "AcquiredOn": "2026-01-01T00:00:00Z", "LastUsedOn": "2026-01-01T00:00:00Z", "Properties": { "<string>": {} } }]
|
|
238
|
+
}
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
### `getMembers`
|
|
244
|
+
|
|
245
|
+
Get clan member avatar Ids.</summary>
|
|
246
|
+
|
|
247
|
+
**GET** `api/clan/{clanId:guid}/members`
|
|
248
|
+
|
|
249
|
+
Route parameters:
|
|
250
|
+
|
|
251
|
+
| Field | Type |
|
|
252
|
+
| --- | --- |
|
|
253
|
+
| `clanId` | `Guid` |
|
|
254
|
+
|
|
255
|
+
**Request**
|
|
256
|
+
|
|
257
|
+
Query parameters:
|
|
258
|
+
|
|
259
|
+
| Field | Type |
|
|
260
|
+
| --- | --- |
|
|
261
|
+
| `providerType` | `ProviderType? (optional)` |
|
|
262
|
+
|
|
263
|
+
**Response**
|
|
264
|
+
|
|
265
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
266
|
+
|
|
267
|
+
`result` type: `Guid` (array)
|
|
268
|
+
|
|
269
|
+
**Example**
|
|
270
|
+
|
|
271
|
+
```js
|
|
272
|
+
const { isError, message, result } = await oasis.clan.getMembers({
|
|
273
|
+
clanId: '<clanId>',
|
|
274
|
+
providerType: '<providerType>'
|
|
275
|
+
});
|
|
276
|
+
if (isError) throw new Error(message);
|
|
277
|
+
console.log(result);
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
Example response:
|
|
281
|
+
|
|
282
|
+
```json
|
|
283
|
+
{
|
|
284
|
+
"isError": false,
|
|
285
|
+
"message": "",
|
|
286
|
+
"result": ["3fa85f64-5717-4562-b3fc-2c963f66afa6"]
|
|
287
|
+
}
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
### `list`
|
|
293
|
+
|
|
294
|
+
List all clans, optionally filtered by owner avatar Id.</summary>
|
|
295
|
+
|
|
296
|
+
**GET** `api/clan`
|
|
297
|
+
|
|
298
|
+
**Request**
|
|
299
|
+
|
|
300
|
+
Query parameters:
|
|
301
|
+
|
|
302
|
+
| Field | Type |
|
|
303
|
+
| --- | --- |
|
|
304
|
+
| `ownerAvatarId` | `Guid? (optional)` |
|
|
305
|
+
| `providerType` | `ProviderType? (optional)` |
|
|
306
|
+
|
|
307
|
+
**Response**
|
|
308
|
+
|
|
309
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
310
|
+
|
|
311
|
+
`result` type: `IClan` (array)
|
|
312
|
+
|
|
313
|
+
| Field | Type |
|
|
314
|
+
| --- | --- |
|
|
315
|
+
| `OwnerAvatarId` | `Guid` |
|
|
316
|
+
| `MemberIds` | `IList<Guid>` |
|
|
317
|
+
| `Inventory` | `IList<IInventoryItem>` |
|
|
318
|
+
|
|
319
|
+
**Example**
|
|
320
|
+
|
|
321
|
+
```js
|
|
322
|
+
const { isError, message, result } = await oasis.clan.list({
|
|
323
|
+
ownerAvatarId: '<ownerAvatarId>',
|
|
324
|
+
providerType: '<providerType>'
|
|
325
|
+
});
|
|
326
|
+
if (isError) throw new Error(message);
|
|
327
|
+
console.log(result);
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
Example response:
|
|
331
|
+
|
|
332
|
+
```json
|
|
333
|
+
{
|
|
334
|
+
"isError": false,
|
|
335
|
+
"message": "",
|
|
336
|
+
"result": [{ "OwnerAvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "MemberIds": ["3fa85f64-5717-4562-b3fc-2c963f66afa6"], "Inventory": [{ "Image2D": "<base64-bytes>", "Image2DURI": "https://example.com/asset.png", "ThumbnailUrl": "example string", "Object3D": "<base64-bytes>", "Object3DURI": "https://example.com/asset.png", "Quantity": 1, "Stack": true, "IsStackable": true, "GameSource": "example string", "ItemType": "example string", "NftId": "example string", "Rarity": "example string", "MaxQuantity": 1, "Weight": 1.0, "IsUsable": true, "IsTradeable": true, "OwnerAvatarId": "example string", "AcquiredOn": "2026-01-01T00:00:00Z", "LastUsedOn": "2026-01-01T00:00:00Z", "Properties": { "<string>": {} } }] }]
|
|
337
|
+
}
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
### `load`
|
|
343
|
+
|
|
344
|
+
Load a clan by Id.</summary>
|
|
345
|
+
|
|
346
|
+
**GET** `api/clan/{clanId:guid}`
|
|
347
|
+
|
|
348
|
+
Route parameters:
|
|
349
|
+
|
|
350
|
+
| Field | Type |
|
|
351
|
+
| --- | --- |
|
|
352
|
+
| `clanId` | `Guid` |
|
|
353
|
+
|
|
354
|
+
**Request**
|
|
355
|
+
|
|
356
|
+
Query parameters:
|
|
357
|
+
|
|
358
|
+
| Field | Type |
|
|
359
|
+
| --- | --- |
|
|
360
|
+
| `providerType` | `ProviderType? (optional)` |
|
|
361
|
+
|
|
362
|
+
**Response**
|
|
363
|
+
|
|
364
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
365
|
+
|
|
366
|
+
`result` type: `IClan`
|
|
367
|
+
|
|
368
|
+
| Field | Type |
|
|
369
|
+
| --- | --- |
|
|
370
|
+
| `OwnerAvatarId` | `Guid` |
|
|
371
|
+
| `MemberIds` | `IList<Guid>` |
|
|
372
|
+
| `Inventory` | `IList<IInventoryItem>` |
|
|
373
|
+
|
|
374
|
+
**Example**
|
|
375
|
+
|
|
376
|
+
```js
|
|
377
|
+
const { isError, message, result } = await oasis.clan.load({
|
|
378
|
+
clanId: '<clanId>',
|
|
379
|
+
providerType: '<providerType>'
|
|
380
|
+
});
|
|
381
|
+
if (isError) throw new Error(message);
|
|
382
|
+
console.log(result);
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
Example response:
|
|
386
|
+
|
|
387
|
+
```json
|
|
388
|
+
{
|
|
389
|
+
"isError": false,
|
|
390
|
+
"message": "",
|
|
391
|
+
"result": { "OwnerAvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "MemberIds": ["3fa85f64-5717-4562-b3fc-2c963f66afa6"], "Inventory": [{ "Image2D": "<base64-bytes>", "Image2DURI": "https://example.com/asset.png", "ThumbnailUrl": "example string", "Object3D": "<base64-bytes>", "Object3DURI": "https://example.com/asset.png", "Quantity": 1, "Stack": true, "IsStackable": true, "GameSource": "example string", "ItemType": "example string", "NftId": "example string", "Rarity": "example string", "MaxQuantity": 1, "Weight": 1.0, "IsUsable": true, "IsTradeable": true, "OwnerAvatarId": "example string", "AcquiredOn": "2026-01-01T00:00:00Z", "LastUsedOn": "2026-01-01T00:00:00Z", "Properties": { "<string>": {} } }] }
|
|
392
|
+
}
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
---
|
|
396
|
+
|
|
397
|
+
### `loadByName`
|
|
398
|
+
|
|
399
|
+
Load a clan by name (case-insensitive).</summary>
|
|
400
|
+
|
|
401
|
+
**GET** `api/clan/by-name`
|
|
402
|
+
|
|
403
|
+
**Request**
|
|
404
|
+
|
|
405
|
+
Query parameters:
|
|
406
|
+
|
|
407
|
+
| Field | Type |
|
|
408
|
+
| --- | --- |
|
|
409
|
+
| `name` | `string` |
|
|
410
|
+
| `providerType` | `ProviderType? (optional)` |
|
|
411
|
+
|
|
412
|
+
**Response**
|
|
413
|
+
|
|
414
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
415
|
+
|
|
416
|
+
`result` type: `IClan`
|
|
417
|
+
|
|
418
|
+
| Field | Type |
|
|
419
|
+
| --- | --- |
|
|
420
|
+
| `OwnerAvatarId` | `Guid` |
|
|
421
|
+
| `MemberIds` | `IList<Guid>` |
|
|
422
|
+
| `Inventory` | `IList<IInventoryItem>` |
|
|
423
|
+
|
|
424
|
+
**Example**
|
|
425
|
+
|
|
426
|
+
```js
|
|
427
|
+
const { isError, message, result } = await oasis.clan.loadByName({
|
|
428
|
+
name: 'example string',
|
|
429
|
+
providerType: '<providerType>'
|
|
430
|
+
});
|
|
431
|
+
if (isError) throw new Error(message);
|
|
432
|
+
console.log(result);
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
Example response:
|
|
436
|
+
|
|
437
|
+
```json
|
|
438
|
+
{
|
|
439
|
+
"isError": false,
|
|
440
|
+
"message": "",
|
|
441
|
+
"result": { "OwnerAvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "MemberIds": ["3fa85f64-5717-4562-b3fc-2c963f66afa6"], "Inventory": [{ "Image2D": "<base64-bytes>", "Image2DURI": "https://example.com/asset.png", "ThumbnailUrl": "example string", "Object3D": "<base64-bytes>", "Object3DURI": "https://example.com/asset.png", "Quantity": 1, "Stack": true, "IsStackable": true, "GameSource": "example string", "ItemType": "example string", "NftId": "example string", "Rarity": "example string", "MaxQuantity": 1, "Weight": 1.0, "IsUsable": true, "IsTradeable": true, "OwnerAvatarId": "example string", "AcquiredOn": "2026-01-01T00:00:00Z", "LastUsedOn": "2026-01-01T00:00:00Z", "Properties": { "<string>": {} } }] }
|
|
442
|
+
}
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
---
|
|
446
|
+
|
|
447
|
+
### `removeAvatarFromClan`
|
|
448
|
+
|
|
449
|
+
Remove an avatar from a clan. Owner cannot be removed.</summary>
|
|
450
|
+
|
|
451
|
+
**DELETE** `api/clan/{clanId:guid}/members/{avatarId:guid}`
|
|
452
|
+
|
|
453
|
+
Route parameters:
|
|
454
|
+
|
|
455
|
+
| Field | Type |
|
|
456
|
+
| --- | --- |
|
|
457
|
+
| `clanId` | `Guid` |
|
|
458
|
+
| `avatarId` | `Guid` |
|
|
459
|
+
|
|
460
|
+
**Request**
|
|
461
|
+
|
|
462
|
+
Query parameters:
|
|
463
|
+
|
|
464
|
+
| Field | Type |
|
|
465
|
+
| --- | --- |
|
|
466
|
+
| `providerType` | `ProviderType? (optional)` |
|
|
467
|
+
|
|
468
|
+
**Response**
|
|
469
|
+
|
|
470
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
471
|
+
|
|
472
|
+
`result` type: `bool`
|
|
473
|
+
|
|
474
|
+
**Example**
|
|
475
|
+
|
|
476
|
+
```js
|
|
477
|
+
const { isError, message, result } = await oasis.clan.removeAvatarFromClan({
|
|
478
|
+
clanId: '<clanId>',
|
|
479
|
+
avatarId: '<avatarId>',
|
|
480
|
+
providerType: '<providerType>'
|
|
481
|
+
});
|
|
482
|
+
if (isError) throw new Error(message);
|
|
483
|
+
console.log(result);
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
Example response:
|
|
487
|
+
|
|
488
|
+
```json
|
|
489
|
+
{
|
|
490
|
+
"isError": false,
|
|
491
|
+
"message": "",
|
|
492
|
+
"result": true
|
|
493
|
+
}
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
---
|
|
497
|
+
|
|
498
|
+
### `update`
|
|
499
|
+
|
|
500
|
+
Update clan name/description. Caller should be owner (enforcement can be added).</summary>
|
|
501
|
+
|
|
502
|
+
**PUT** `api/clan/{clanId:guid}`
|
|
503
|
+
|
|
504
|
+
Route parameters:
|
|
505
|
+
|
|
506
|
+
| Field | Type |
|
|
507
|
+
| --- | --- |
|
|
508
|
+
| `clanId` | `Guid` |
|
|
509
|
+
|
|
510
|
+
**Request**
|
|
511
|
+
|
|
512
|
+
Body type: `UpdateClanRequest`
|
|
513
|
+
|
|
514
|
+
| Field | Type |
|
|
515
|
+
| --- | --- |
|
|
516
|
+
| `Name` | `string` |
|
|
517
|
+
| `Description` | `string` |
|
|
518
|
+
|
|
519
|
+
**Response**
|
|
520
|
+
|
|
521
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
522
|
+
|
|
523
|
+
`result` type: `IClan`
|
|
524
|
+
|
|
525
|
+
| Field | Type |
|
|
526
|
+
| --- | --- |
|
|
527
|
+
| `OwnerAvatarId` | `Guid` |
|
|
528
|
+
| `MemberIds` | `IList<Guid>` |
|
|
529
|
+
| `Inventory` | `IList<IInventoryItem>` |
|
|
530
|
+
|
|
531
|
+
**Example**
|
|
532
|
+
|
|
533
|
+
```js
|
|
534
|
+
const { isError, message, result } = await oasis.clan.update({
|
|
535
|
+
clanId: '<clanId>',
|
|
536
|
+
name: "example string",
|
|
537
|
+
description: "example string"
|
|
538
|
+
});
|
|
539
|
+
if (isError) throw new Error(message);
|
|
540
|
+
console.log(result);
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
Example response:
|
|
544
|
+
|
|
545
|
+
```json
|
|
546
|
+
{
|
|
547
|
+
"isError": false,
|
|
548
|
+
"message": "",
|
|
549
|
+
"result": { "OwnerAvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "MemberIds": ["3fa85f64-5717-4562-b3fc-2c963f66afa6"], "Inventory": [{ "Image2D": "<base64-bytes>", "Image2DURI": "https://example.com/asset.png", "ThumbnailUrl": "example string", "Object3D": "<base64-bytes>", "Object3DURI": "https://example.com/asset.png", "Quantity": 1, "Stack": true, "IsStackable": true, "GameSource": "example string", "ItemType": "example string", "NftId": "example string", "Rarity": "example string", "MaxQuantity": 1, "Weight": 1.0, "IsUsable": true, "IsTradeable": true, "OwnerAvatarId": "example string", "AcquiredOn": "2026-01-01T00:00:00Z", "LastUsedOn": "2026-01-01T00:00:00Z", "Properties": { "<string>": {} } }] }
|
|
550
|
+
}
|
|
551
|
+
```
|
|
552
|
+
|