@oasisomniverse/web6-api 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +177 -0
- package/docs/README.md +24 -0
- package/docs/modules/Completion.md +124 -0
- package/docs/modules/HolonicBraid.md +137 -0
- package/docs/modules/HolonicMemory.md +268 -0
- package/docs/modules/Images.md +77 -0
- package/docs/modules/Orchestrator.md +173 -0
- package/docs/modules/ReasoningNetwork.md +254 -0
- package/index.d.ts +52 -0
- package/index.js +3 -0
- package/index.mjs +4 -0
- package/package.json +112 -0
- package/src/core/httpClient.js +110 -0
- package/src/core/routeHelper.js +85 -0
- package/src/core/tokenStore.js +52 -0
- package/src/core/types.d.ts +18 -0
- package/src/index.js +45 -0
- package/src/modules/Completion.d.ts +12 -0
- package/src/modules/Completion.js +25 -0
- package/src/modules/HolonicBraid.d.ts +12 -0
- package/src/modules/HolonicBraid.js +25 -0
- package/src/modules/HolonicMemory.d.ts +21 -0
- package/src/modules/HolonicMemory.js +31 -0
- package/src/modules/Images.d.ts +9 -0
- package/src/modules/Images.js +23 -0
- package/src/modules/Orchestrator.d.ts +15 -0
- package/src/modules/Orchestrator.js +27 -0
- package/src/modules/ReasoningNetwork.d.ts +18 -0
- package/src/modules/ReasoningNetwork.js +29 -0
- package/src/modules/index.js +25 -0
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
# HolonicMemory — `web6.holonicMemory`
|
|
2
|
+
|
|
3
|
+
Source controller: [`HolonicMemoryController.cs`](https://github.com/NextGenSoftwareUK/OASIS2/blob/main/WEB6/NextGenSoftware.OASIS.Web6.WebAPI/Controllers/HolonicMemoryController.cs)
|
|
4
|
+
Route prefix: `v1/holonic-memory`
|
|
5
|
+
5 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
|
+
### `getEarthHolon`
|
|
22
|
+
|
|
23
|
+
The Holonic BRAID fractal memory hierarchy - Session → Agent → User → Group → Neighbourhood → District → City → County → Country → Continent → Earth. Create/get holons at any level, set the membrane rule that governs what propagates upward, record memory, and trigger propagation one hop at a time.
|
|
24
|
+
|
|
25
|
+
**GET** `v1/holonic-memory/earth`
|
|
26
|
+
|
|
27
|
+
**Request**
|
|
28
|
+
|
|
29
|
+
No request body.
|
|
30
|
+
|
|
31
|
+
**Response**
|
|
32
|
+
|
|
33
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
34
|
+
|
|
35
|
+
`result` type: `HolonicMemoryHolonDto`
|
|
36
|
+
|
|
37
|
+
| Field | Type |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| `Id` | `Guid` |
|
|
40
|
+
| `Level` | `Enums.HolonicMemoryLevel` |
|
|
41
|
+
| `ParentHolonId` | `Guid` |
|
|
42
|
+
| `Name` | `string` |
|
|
43
|
+
| `MemoryItems` | `List<HolonicMemoryItem>` |
|
|
44
|
+
| `MembraneRule` | `MembraneRule` |
|
|
45
|
+
|
|
46
|
+
**Example**
|
|
47
|
+
|
|
48
|
+
```js
|
|
49
|
+
const { isError, message, result } = await web6.holonicMemory.getEarthHolon({});
|
|
50
|
+
if (isError) throw new Error(message);
|
|
51
|
+
console.log(result);
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Example response:
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"isError": false,
|
|
59
|
+
"message": "",
|
|
60
|
+
"result": { "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Level": /* <Enums.HolonicMemoryLevel> */, "ParentHolonId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Name": "example string", "MemoryItems": [{ "FieldName": "example string", "Value": "example string", "Tags": ["example string"], "CreatedUtc": "2026-01-01T00:00:00Z" }], "MembraneRule": { "FieldsAllowedToPropagate": ["example string"], "Retention": /* <Enums.RetentionPolicy> */, "WhoCanRead": [ /* <System.Guid> */ ], "TriggerCondition": "example string", "AnonymisedAggregateOnly": true } }
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
### `getOrCreateHolon`
|
|
67
|
+
|
|
68
|
+
**POST** `v1/holonic-memory/holons`
|
|
69
|
+
|
|
70
|
+
**Request**
|
|
71
|
+
|
|
72
|
+
Body fields:
|
|
73
|
+
|
|
74
|
+
| Field | Type |
|
|
75
|
+
| --- | --- |
|
|
76
|
+
| `level` | `HolonicMemoryLevel` |
|
|
77
|
+
| `name` | `string` |
|
|
78
|
+
| `parentHolonId` | `Guid` |
|
|
79
|
+
|
|
80
|
+
**Response**
|
|
81
|
+
|
|
82
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
83
|
+
|
|
84
|
+
`result` type: `HolonicMemoryHolonDto`
|
|
85
|
+
|
|
86
|
+
| Field | Type |
|
|
87
|
+
| --- | --- |
|
|
88
|
+
| `Id` | `Guid` |
|
|
89
|
+
| `Level` | `Enums.HolonicMemoryLevel` |
|
|
90
|
+
| `ParentHolonId` | `Guid` |
|
|
91
|
+
| `Name` | `string` |
|
|
92
|
+
| `MemoryItems` | `List<HolonicMemoryItem>` |
|
|
93
|
+
| `MembraneRule` | `MembraneRule` |
|
|
94
|
+
|
|
95
|
+
**Example**
|
|
96
|
+
|
|
97
|
+
```js
|
|
98
|
+
const { isError, message, result } = await web6.holonicMemory.getOrCreateHolon({
|
|
99
|
+
level: '<level>',
|
|
100
|
+
name: 'example string',
|
|
101
|
+
parentHolonId: '3fa85f64-5717-4562-b3fc-2c963f66afa6'
|
|
102
|
+
});
|
|
103
|
+
if (isError) throw new Error(message);
|
|
104
|
+
console.log(result);
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Example response:
|
|
108
|
+
|
|
109
|
+
```json
|
|
110
|
+
{
|
|
111
|
+
"isError": false,
|
|
112
|
+
"message": "",
|
|
113
|
+
"result": { "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Level": /* <Enums.HolonicMemoryLevel> */, "ParentHolonId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Name": "example string", "MemoryItems": [{ "FieldName": "example string", "Value": "example string", "Tags": ["example string"], "CreatedUtc": "2026-01-01T00:00:00Z" }], "MembraneRule": { "FieldsAllowedToPropagate": ["example string"], "Retention": /* <Enums.RetentionPolicy> */, "WhoCanRead": [ /* <System.Guid> */ ], "TriggerCondition": "example string", "AnonymisedAggregateOnly": true } }
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
### `propagate`
|
|
120
|
+
|
|
121
|
+
Propagates whatever the child holon's membrane rule permits up to its parent (a single hop).
|
|
122
|
+
|
|
123
|
+
**POST** `v1/holonic-memory/holons/{childHolonId}/propagate`
|
|
124
|
+
|
|
125
|
+
Route parameters:
|
|
126
|
+
|
|
127
|
+
| Field | Type |
|
|
128
|
+
| --- | --- |
|
|
129
|
+
| `childHolonId` | `Guid` |
|
|
130
|
+
|
|
131
|
+
**Request**
|
|
132
|
+
|
|
133
|
+
No request body.
|
|
134
|
+
|
|
135
|
+
**Response**
|
|
136
|
+
|
|
137
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
138
|
+
|
|
139
|
+
`result` type: `int`
|
|
140
|
+
|
|
141
|
+
**Example**
|
|
142
|
+
|
|
143
|
+
```js
|
|
144
|
+
const { isError, message, result } = await web6.holonicMemory.propagate({
|
|
145
|
+
childHolonId: '<childHolonId>'
|
|
146
|
+
});
|
|
147
|
+
if (isError) throw new Error(message);
|
|
148
|
+
console.log(result);
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Example response:
|
|
152
|
+
|
|
153
|
+
```json
|
|
154
|
+
{
|
|
155
|
+
"isError": false,
|
|
156
|
+
"message": "",
|
|
157
|
+
"result": 1
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
### `recordMemory`
|
|
164
|
+
|
|
165
|
+
**POST** `v1/holonic-memory/holons/{holonId}/memory`
|
|
166
|
+
|
|
167
|
+
Route parameters:
|
|
168
|
+
|
|
169
|
+
| Field | Type |
|
|
170
|
+
| --- | --- |
|
|
171
|
+
| `holonId` | `Guid` |
|
|
172
|
+
|
|
173
|
+
**Request**
|
|
174
|
+
|
|
175
|
+
Body type: `HolonicMemoryItem`
|
|
176
|
+
|
|
177
|
+
| Field | Type |
|
|
178
|
+
| --- | --- |
|
|
179
|
+
| `FieldName` | `string` |
|
|
180
|
+
| `Value` | `string` |
|
|
181
|
+
| `Tags` | `List<string>` |
|
|
182
|
+
| `CreatedUtc` | `DateTime` |
|
|
183
|
+
|
|
184
|
+
**Response**
|
|
185
|
+
|
|
186
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
187
|
+
|
|
188
|
+
`result` type: `bool`
|
|
189
|
+
|
|
190
|
+
**Example**
|
|
191
|
+
|
|
192
|
+
```js
|
|
193
|
+
const { isError, message, result } = await web6.holonicMemory.recordMemory({
|
|
194
|
+
holonId: '<holonId>',
|
|
195
|
+
fieldName: "example string",
|
|
196
|
+
value: "example string",
|
|
197
|
+
tags: ["example string"],
|
|
198
|
+
createdUtc: "2026-01-01T00:00:00Z"
|
|
199
|
+
});
|
|
200
|
+
if (isError) throw new Error(message);
|
|
201
|
+
console.log(result);
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Example response:
|
|
205
|
+
|
|
206
|
+
```json
|
|
207
|
+
{
|
|
208
|
+
"isError": false,
|
|
209
|
+
"message": "",
|
|
210
|
+
"result": true
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
### `setMembraneRule`
|
|
217
|
+
|
|
218
|
+
**PUT** `v1/holonic-memory/holons/{holonId}/membrane-rule`
|
|
219
|
+
|
|
220
|
+
Route parameters:
|
|
221
|
+
|
|
222
|
+
| Field | Type |
|
|
223
|
+
| --- | --- |
|
|
224
|
+
| `holonId` | `Guid` |
|
|
225
|
+
|
|
226
|
+
**Request**
|
|
227
|
+
|
|
228
|
+
Body type: `MembraneRule`
|
|
229
|
+
|
|
230
|
+
| Field | Type |
|
|
231
|
+
| --- | --- |
|
|
232
|
+
| `FieldsAllowedToPropagate` | `List<string>` |
|
|
233
|
+
| `Retention` | `Enums.RetentionPolicy` |
|
|
234
|
+
| `WhoCanRead` | `List<System.Guid>` |
|
|
235
|
+
| `TriggerCondition` | `string` |
|
|
236
|
+
| `AnonymisedAggregateOnly` | `bool` |
|
|
237
|
+
|
|
238
|
+
**Response**
|
|
239
|
+
|
|
240
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
241
|
+
|
|
242
|
+
`result` type: `bool`
|
|
243
|
+
|
|
244
|
+
**Example**
|
|
245
|
+
|
|
246
|
+
```js
|
|
247
|
+
const { isError, message, result } = await web6.holonicMemory.setMembraneRule({
|
|
248
|
+
holonId: '<holonId>',
|
|
249
|
+
fieldsAllowedToPropagate: ["example string"],
|
|
250
|
+
retention: /* <Enums.RetentionPolicy> */,
|
|
251
|
+
whoCanRead: [ /* <System.Guid> */ ],
|
|
252
|
+
triggerCondition: "example string",
|
|
253
|
+
anonymisedAggregateOnly: true
|
|
254
|
+
});
|
|
255
|
+
if (isError) throw new Error(message);
|
|
256
|
+
console.log(result);
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
Example response:
|
|
260
|
+
|
|
261
|
+
```json
|
|
262
|
+
{
|
|
263
|
+
"isError": false,
|
|
264
|
+
"message": "",
|
|
265
|
+
"result": true
|
|
266
|
+
}
|
|
267
|
+
```
|
|
268
|
+
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Images — `web6.images`
|
|
2
|
+
|
|
3
|
+
Source controller: [`ImagesController.cs`](https://github.com/NextGenSoftwareUK/OASIS2/blob/main/WEB6/NextGenSoftware.OASIS.Web6.WebAPI/Controllers/ImagesController.cs)
|
|
4
|
+
Route prefix: `v1/images`
|
|
5
|
+
1 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
|
+
### `generate`
|
|
22
|
+
|
|
23
|
+
Generates an image via the requested provider (StabilityAI or OpenAI). POST https://api.web6.oasisomniverse.one/v1/images/generate
|
|
24
|
+
|
|
25
|
+
**POST** `v1/images/generate`
|
|
26
|
+
|
|
27
|
+
**Request**
|
|
28
|
+
|
|
29
|
+
Body type: `ImageGenerationRequest`
|
|
30
|
+
|
|
31
|
+
| Field | Type |
|
|
32
|
+
| --- | --- |
|
|
33
|
+
| `Prompt` | `string` |
|
|
34
|
+
| `Provider` | `AIProviderType` |
|
|
35
|
+
| `Model` | `string` |
|
|
36
|
+
| `Size` | `string` |
|
|
37
|
+
| `AspectRatio` | `string` |
|
|
38
|
+
| `OutputFormat` | `string` |
|
|
39
|
+
|
|
40
|
+
**Response**
|
|
41
|
+
|
|
42
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
43
|
+
|
|
44
|
+
`result` type: `ImageGenerationResponse`
|
|
45
|
+
|
|
46
|
+
| Field | Type |
|
|
47
|
+
| --- | --- |
|
|
48
|
+
| `Provider` | `string` |
|
|
49
|
+
| `Model` | `string` |
|
|
50
|
+
| `ImageBase64` | `string` |
|
|
51
|
+
| `OutputFormat` | `string` |
|
|
52
|
+
|
|
53
|
+
**Example**
|
|
54
|
+
|
|
55
|
+
```js
|
|
56
|
+
const { isError, message, result } = await web6.images.generate({
|
|
57
|
+
prompt: "example string",
|
|
58
|
+
provider: { },
|
|
59
|
+
model: "example string",
|
|
60
|
+
size: "example string",
|
|
61
|
+
aspectRatio: "example string",
|
|
62
|
+
outputFormat: "example string"
|
|
63
|
+
});
|
|
64
|
+
if (isError) throw new Error(message);
|
|
65
|
+
console.log(result);
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Example response:
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"isError": false,
|
|
73
|
+
"message": "",
|
|
74
|
+
"result": { "Provider": "example string", "Model": "example string", "ImageBase64": "example string", "OutputFormat": "example string" }
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# Orchestrator — `web6.orchestrator`
|
|
2
|
+
|
|
3
|
+
Source controller: [`OrchestratorController.cs`](https://github.com/NextGenSoftwareUK/OASIS2/blob/main/WEB6/NextGenSoftware.OASIS.Web6.WebAPI/Controllers/OrchestratorController.cs)
|
|
4
|
+
Route prefix: `v1/orchestrators`
|
|
5
|
+
3 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
|
+
### `getAdapters`
|
|
22
|
+
|
|
23
|
+
**GET** `v1/orchestrators`
|
|
24
|
+
|
|
25
|
+
**Request**
|
|
26
|
+
|
|
27
|
+
No request body.
|
|
28
|
+
|
|
29
|
+
**Response**
|
|
30
|
+
|
|
31
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
32
|
+
|
|
33
|
+
`result` type: `OrchestratorAdapterConfig` (array)
|
|
34
|
+
|
|
35
|
+
| Field | Type |
|
|
36
|
+
| --- | --- |
|
|
37
|
+
| `Id` | `Guid` |
|
|
38
|
+
| `Name` | `string` |
|
|
39
|
+
| `Protocol` | `OrchestratorProtocolType` |
|
|
40
|
+
| `EndpointUrl` | `string` |
|
|
41
|
+
| `AuthToken` | `string` |
|
|
42
|
+
| `ExtraConfig` | `Dictionary<string, string>` |
|
|
43
|
+
|
|
44
|
+
**Example**
|
|
45
|
+
|
|
46
|
+
```js
|
|
47
|
+
const { isError, message, result } = await web6.orchestrator.getAdapters({});
|
|
48
|
+
if (isError) throw new Error(message);
|
|
49
|
+
console.log(result);
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Example response:
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"isError": false,
|
|
57
|
+
"message": "",
|
|
58
|
+
"result": [{ "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Name": "example string", "Protocol": { }, "EndpointUrl": "example string", "AuthToken": "example string", "ExtraConfig": { "<string>": "example string" } }]
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
### `invoke`
|
|
65
|
+
|
|
66
|
+
**POST** `v1/orchestrators/invoke`
|
|
67
|
+
|
|
68
|
+
**Request**
|
|
69
|
+
|
|
70
|
+
Body type: `OrchestratorInvokeRequest`
|
|
71
|
+
|
|
72
|
+
| Field | Type |
|
|
73
|
+
| --- | --- |
|
|
74
|
+
| `AdapterId` | `Guid` |
|
|
75
|
+
| `Input` | `string` |
|
|
76
|
+
| `Parameters` | `Dictionary<string, object>` |
|
|
77
|
+
|
|
78
|
+
**Response**
|
|
79
|
+
|
|
80
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
81
|
+
|
|
82
|
+
`result` type: `OrchestratorInvokeResponse`
|
|
83
|
+
|
|
84
|
+
| Field | Type |
|
|
85
|
+
| --- | --- |
|
|
86
|
+
| `AdapterName` | `string` |
|
|
87
|
+
| `Protocol` | `OrchestratorProtocolType` |
|
|
88
|
+
| `Output` | `string` |
|
|
89
|
+
| `LatencyMs` | `long` |
|
|
90
|
+
|
|
91
|
+
**Example**
|
|
92
|
+
|
|
93
|
+
```js
|
|
94
|
+
const { isError, message, result } = await web6.orchestrator.invoke({
|
|
95
|
+
adapterId: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
96
|
+
input: "example string",
|
|
97
|
+
parameters: { "<string>": {} }
|
|
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": { "AdapterName": "example string", "Protocol": { }, "Output": "example string", "LatencyMs": 1 }
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
### `registerAdapter`
|
|
116
|
+
|
|
117
|
+
Aggregates every agent protocol/orchestration framework (MCP, A2A, LangChain, AutoGen, CrewAI, Semantic Kernel, or any generic webhook) behind WEB6's unified interface. Register an external orchestrator once, then invoke it the same way you'd call any AI provider through /v1/complete.
|
|
118
|
+
|
|
119
|
+
**POST** `v1/orchestrators`
|
|
120
|
+
|
|
121
|
+
**Request**
|
|
122
|
+
|
|
123
|
+
Body type: `OrchestratorAdapterConfig`
|
|
124
|
+
|
|
125
|
+
| Field | Type |
|
|
126
|
+
| --- | --- |
|
|
127
|
+
| `Id` | `Guid` |
|
|
128
|
+
| `Name` | `string` |
|
|
129
|
+
| `Protocol` | `OrchestratorProtocolType` |
|
|
130
|
+
| `EndpointUrl` | `string` |
|
|
131
|
+
| `AuthToken` | `string` |
|
|
132
|
+
| `ExtraConfig` | `Dictionary<string, string>` |
|
|
133
|
+
|
|
134
|
+
**Response**
|
|
135
|
+
|
|
136
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
137
|
+
|
|
138
|
+
`result` type: `OrchestratorAdapterConfig`
|
|
139
|
+
|
|
140
|
+
| Field | Type |
|
|
141
|
+
| --- | --- |
|
|
142
|
+
| `Id` | `Guid` |
|
|
143
|
+
| `Name` | `string` |
|
|
144
|
+
| `Protocol` | `OrchestratorProtocolType` |
|
|
145
|
+
| `EndpointUrl` | `string` |
|
|
146
|
+
| `AuthToken` | `string` |
|
|
147
|
+
| `ExtraConfig` | `Dictionary<string, string>` |
|
|
148
|
+
|
|
149
|
+
**Example**
|
|
150
|
+
|
|
151
|
+
```js
|
|
152
|
+
const { isError, message, result } = await web6.orchestrator.registerAdapter({
|
|
153
|
+
id: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
154
|
+
name: "example string",
|
|
155
|
+
protocol: { },
|
|
156
|
+
endpointUrl: "example string",
|
|
157
|
+
authToken: "example string",
|
|
158
|
+
extraConfig: { "<string>": "example string" }
|
|
159
|
+
});
|
|
160
|
+
if (isError) throw new Error(message);
|
|
161
|
+
console.log(result);
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Example response:
|
|
165
|
+
|
|
166
|
+
```json
|
|
167
|
+
{
|
|
168
|
+
"isError": false,
|
|
169
|
+
"message": "",
|
|
170
|
+
"result": { "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Name": "example string", "Protocol": { }, "EndpointUrl": "example string", "AuthToken": "example string", "ExtraConfig": { "<string>": "example string" } }
|
|
171
|
+
}
|
|
172
|
+
```
|
|
173
|
+
|