@twin.org/dataspace-models 0.0.3-next.26 → 0.0.3-next.28
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/dist/es/entities/dataspaceAppDataset.js +76 -0
- package/dist/es/entities/dataspaceAppDataset.js.map +1 -0
- package/dist/es/index.js +11 -0
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/api/controlPlane/IAppDatasetCreateRequest.js +2 -0
- package/dist/es/models/api/controlPlane/IAppDatasetCreateRequest.js.map +1 -0
- package/dist/es/models/api/controlPlane/IAppDatasetCreateResponse.js +2 -0
- package/dist/es/models/api/controlPlane/IAppDatasetCreateResponse.js.map +1 -0
- package/dist/es/models/api/controlPlane/IAppDatasetDeleteRequest.js +4 -0
- package/dist/es/models/api/controlPlane/IAppDatasetDeleteRequest.js.map +1 -0
- package/dist/es/models/api/controlPlane/IAppDatasetGetRequest.js +4 -0
- package/dist/es/models/api/controlPlane/IAppDatasetGetRequest.js.map +1 -0
- package/dist/es/models/api/controlPlane/IAppDatasetGetResponse.js +2 -0
- package/dist/es/models/api/controlPlane/IAppDatasetGetResponse.js.map +1 -0
- package/dist/es/models/api/controlPlane/IAppDatasetListRequest.js +4 -0
- package/dist/es/models/api/controlPlane/IAppDatasetListRequest.js.map +1 -0
- package/dist/es/models/api/controlPlane/IAppDatasetListResponse.js +2 -0
- package/dist/es/models/api/controlPlane/IAppDatasetListResponse.js.map +1 -0
- package/dist/es/models/api/controlPlane/IAppDatasetUpdateRequest.js +2 -0
- package/dist/es/models/api/controlPlane/IAppDatasetUpdateRequest.js.map +1 -0
- package/dist/es/models/app/IDataspaceApp.js.map +1 -1
- package/dist/es/models/controlPlane/IDataspaceAppDataset.js +2 -0
- package/dist/es/models/controlPlane/IDataspaceAppDataset.js.map +1 -0
- package/dist/es/models/controlPlane/IDataspaceControlPlaneComponent.js.map +1 -1
- package/dist/es/models/dataspaceTransferFormat.js +28 -0
- package/dist/es/models/dataspaceTransferFormat.js.map +1 -0
- package/dist/types/entities/dataspaceAppDataset.d.ts +42 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/models/api/controlPlane/IAppDatasetCreateRequest.d.ts +31 -0
- package/dist/types/models/api/controlPlane/IAppDatasetCreateResponse.d.ts +16 -0
- package/dist/types/models/api/controlPlane/IAppDatasetDeleteRequest.d.ts +14 -0
- package/dist/types/models/api/controlPlane/IAppDatasetGetRequest.d.ts +14 -0
- package/dist/types/models/api/controlPlane/IAppDatasetGetResponse.d.ts +10 -0
- package/dist/types/models/api/controlPlane/IAppDatasetListRequest.d.ts +18 -0
- package/dist/types/models/api/controlPlane/IAppDatasetListResponse.d.ts +19 -0
- package/dist/types/models/api/controlPlane/IAppDatasetUpdateRequest.d.ts +29 -0
- package/dist/types/models/app/IDataspaceApp.d.ts +9 -3
- package/dist/types/models/controlPlane/IDataspaceAppDataset.d.ts +26 -0
- package/dist/types/models/controlPlane/IDataspaceControlPlaneComponent.d.ts +42 -1
- package/dist/types/models/dataspaceTransferFormat.d.ts +28 -0
- package/docs/changelog.md +88 -68
- package/docs/reference/classes/DataspaceAppDataset.md +80 -0
- package/docs/reference/index.md +12 -0
- package/docs/reference/interfaces/IAppDatasetCreateRequest.md +37 -0
- package/docs/reference/interfaces/IAppDatasetCreateResponse.md +23 -0
- package/docs/reference/interfaces/IAppDatasetDeleteRequest.md +17 -0
- package/docs/reference/interfaces/IAppDatasetGetRequest.md +17 -0
- package/docs/reference/interfaces/IAppDatasetGetResponse.md +11 -0
- package/docs/reference/interfaces/IAppDatasetListRequest.md +23 -0
- package/docs/reference/interfaces/IAppDatasetListResponse.md +23 -0
- package/docs/reference/interfaces/IAppDatasetUpdateRequest.md +38 -0
- package/docs/reference/interfaces/IDataspaceApp.md +22 -4
- package/docs/reference/interfaces/IDataspaceAppDataset.md +43 -0
- package/docs/reference/interfaces/IDataspaceControlPlaneComponent.md +142 -0
- package/docs/reference/type-aliases/DataspaceTransferFormat.md +5 -0
- package/docs/reference/variables/DataspaceTransferFormat.md +32 -0
- package/package.json +3 -3
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Interface: IAppDatasetCreateResponse
|
|
2
|
+
|
|
3
|
+
API response from registering an app dataset.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### headers {#headers}
|
|
8
|
+
|
|
9
|
+
> **headers**: `object`
|
|
10
|
+
|
|
11
|
+
The headers of the response, including the location of the new app dataset.
|
|
12
|
+
|
|
13
|
+
#### location
|
|
14
|
+
|
|
15
|
+
> **location**: `string`
|
|
16
|
+
|
|
17
|
+
***
|
|
18
|
+
|
|
19
|
+
### statusCode {#statuscode}
|
|
20
|
+
|
|
21
|
+
> **statusCode**: `HttpStatusCode`
|
|
22
|
+
|
|
23
|
+
HTTP status code (201 on success).
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Interface: IAppDatasetDeleteRequest
|
|
2
|
+
|
|
3
|
+
API request to delete a stored app dataset record.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### pathParams {#pathparams}
|
|
8
|
+
|
|
9
|
+
> **pathParams**: `object`
|
|
10
|
+
|
|
11
|
+
Path parameters containing the stored dataset id.
|
|
12
|
+
|
|
13
|
+
#### id
|
|
14
|
+
|
|
15
|
+
> **id**: `string`
|
|
16
|
+
|
|
17
|
+
The stored dataset id.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Interface: IAppDatasetGetRequest
|
|
2
|
+
|
|
3
|
+
API request to fetch a single app dataset record.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### pathParams {#pathparams}
|
|
8
|
+
|
|
9
|
+
> **pathParams**: `object`
|
|
10
|
+
|
|
11
|
+
Path parameters containing the stored app dataset id.
|
|
12
|
+
|
|
13
|
+
#### id
|
|
14
|
+
|
|
15
|
+
> **id**: `string`
|
|
16
|
+
|
|
17
|
+
The stored app dataset id (entity primary key).
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Interface: IAppDatasetListRequest
|
|
2
|
+
|
|
3
|
+
API request to list the app datasets owned by the calling tenant.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### query? {#query}
|
|
8
|
+
|
|
9
|
+
> `optional` **query?**: `object`
|
|
10
|
+
|
|
11
|
+
Query parameters for paging. Always strings on the wire.
|
|
12
|
+
|
|
13
|
+
#### cursor?
|
|
14
|
+
|
|
15
|
+
> `optional` **cursor?**: `string`
|
|
16
|
+
|
|
17
|
+
Cursor returned from a previous list call to fetch the next page.
|
|
18
|
+
|
|
19
|
+
#### limit?
|
|
20
|
+
|
|
21
|
+
> `optional` **limit?**: `string`
|
|
22
|
+
|
|
23
|
+
Maximum number of entries to return (string-encoded; parsed on the server).
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Interface: IAppDatasetListResponse
|
|
2
|
+
|
|
3
|
+
API response listing the app datasets owned by the calling tenant.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### body {#body}
|
|
8
|
+
|
|
9
|
+
> **body**: `object`
|
|
10
|
+
|
|
11
|
+
The body of the response.
|
|
12
|
+
|
|
13
|
+
#### entities
|
|
14
|
+
|
|
15
|
+
> **entities**: [`IDataspaceAppDataset`](IDataspaceAppDataset.md)[]
|
|
16
|
+
|
|
17
|
+
The stored datasets.
|
|
18
|
+
|
|
19
|
+
#### cursor?
|
|
20
|
+
|
|
21
|
+
> `optional` **cursor?**: `string`
|
|
22
|
+
|
|
23
|
+
Cursor to fetch the next page if more entries exist.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Interface: IAppDatasetUpdateRequest
|
|
2
|
+
|
|
3
|
+
API request to update an existing app dataset record.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### pathParams {#pathparams}
|
|
8
|
+
|
|
9
|
+
> **pathParams**: `object`
|
|
10
|
+
|
|
11
|
+
Path parameters containing the stored app dataset id.
|
|
12
|
+
|
|
13
|
+
#### id
|
|
14
|
+
|
|
15
|
+
> **id**: `string`
|
|
16
|
+
|
|
17
|
+
The stored app dataset id.
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
### body {#body}
|
|
22
|
+
|
|
23
|
+
> **body**: `object`
|
|
24
|
+
|
|
25
|
+
The body of the request.
|
|
26
|
+
|
|
27
|
+
#### appId
|
|
28
|
+
|
|
29
|
+
> **appId**: `string`
|
|
30
|
+
|
|
31
|
+
The dataspace app this dataset belongs to. May change appId on
|
|
32
|
+
update if the tenant wants to retarget the dataset.
|
|
33
|
+
|
|
34
|
+
#### dataset
|
|
35
|
+
|
|
36
|
+
> **dataset**: `IDataspaceProtocolDataset`
|
|
37
|
+
|
|
38
|
+
The dataset payload.
|
|
@@ -36,17 +36,35 @@ A query that describes the set of activities handled by the App.
|
|
|
36
36
|
|
|
37
37
|
***
|
|
38
38
|
|
|
39
|
-
### datasetsHandled() {#datasetshandled}
|
|
39
|
+
### datasetsHandled()? {#datasetshandled}
|
|
40
40
|
|
|
41
|
-
> **datasetsHandled**(): `Promise`\<`IDataspaceProtocolDataset`[]\>
|
|
41
|
+
> `optional` **datasetsHandled**(`payload`, `tenantId`): `Promise`\<`IDataspaceProtocolDataset`[]\>
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
Optional override called by the Control Plane when publishing a stored dataset for this app.
|
|
44
|
+
The Control Plane always calls `populateDefaults` (e.g. `dcterms:publisher`)
|
|
45
|
+
on every dataset returned here, so apps don't need to populate publisher themselves.
|
|
46
|
+
|
|
47
|
+
#### Parameters
|
|
48
|
+
|
|
49
|
+
##### payload
|
|
50
|
+
|
|
51
|
+
`IDataspaceProtocolDataset`
|
|
52
|
+
|
|
53
|
+
The user-stored dataset payload.
|
|
54
|
+
|
|
55
|
+
##### tenantId
|
|
56
|
+
|
|
57
|
+
`string`
|
|
58
|
+
|
|
59
|
+
The owning tenant for this dataset. Empty string on
|
|
60
|
+
single-tenant nodes (no `TWIN_TENANT_ENABLED`).
|
|
44
61
|
|
|
45
62
|
#### Returns
|
|
46
63
|
|
|
47
64
|
`Promise`\<`IDataspaceProtocolDataset`[]\>
|
|
48
65
|
|
|
49
|
-
|
|
66
|
+
One or more datasets to publish to the catalogue. System-stamped
|
|
67
|
+
fields like `dcterms:publisher` may be omitted — the Control Plane fills them in.
|
|
50
68
|
|
|
51
69
|
***
|
|
52
70
|
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Interface: IDataspaceAppDataset
|
|
2
|
+
|
|
3
|
+
Stored dataset record returned by the Control Plane's dataset CRUD surface.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### id {#id}
|
|
8
|
+
|
|
9
|
+
> **id**: `string`
|
|
10
|
+
|
|
11
|
+
The stored dataset id (matches the dataset's JSON-LD `@id`).
|
|
12
|
+
|
|
13
|
+
***
|
|
14
|
+
|
|
15
|
+
### appId {#appid}
|
|
16
|
+
|
|
17
|
+
> **appId**: `string`
|
|
18
|
+
|
|
19
|
+
The dataspace app this dataset belongs to.
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
### dataset {#dataset}
|
|
24
|
+
|
|
25
|
+
> **dataset**: `IDataspaceProtocolDataset`
|
|
26
|
+
|
|
27
|
+
The dataset payload.
|
|
28
|
+
|
|
29
|
+
***
|
|
30
|
+
|
|
31
|
+
### dateCreated {#datecreated}
|
|
32
|
+
|
|
33
|
+
> **dateCreated**: `string`
|
|
34
|
+
|
|
35
|
+
Creation timestamp (ISO string).
|
|
36
|
+
|
|
37
|
+
***
|
|
38
|
+
|
|
39
|
+
### dateModified {#datemodified}
|
|
40
|
+
|
|
41
|
+
> **dateModified**: `string`
|
|
42
|
+
|
|
43
|
+
Last-modified timestamp (ISO string).
|
|
@@ -406,3 +406,145 @@ Trust payload containing authorization information (JWT, VC, etc.).
|
|
|
406
406
|
`Promise`\<`IDataspaceProtocolTransferProcess` \| `IDataspaceProtocolTransferError`\>
|
|
407
407
|
|
|
408
408
|
Transfer Process (DSP compliant) with current state, or TransferError if the operation fails.
|
|
409
|
+
|
|
410
|
+
***
|
|
411
|
+
|
|
412
|
+
### createAppDataset() {#createappdataset}
|
|
413
|
+
|
|
414
|
+
> **createAppDataset**(`id`, `appId`, `dataset`): `Promise`\<`string`\>
|
|
415
|
+
|
|
416
|
+
Register an app dataset for a dataspace app, owned by the calling tenant.
|
|
417
|
+
|
|
418
|
+
#### Parameters
|
|
419
|
+
|
|
420
|
+
##### id
|
|
421
|
+
|
|
422
|
+
`string` \| `undefined`
|
|
423
|
+
|
|
424
|
+
Optional explicit id. If omitted, derived from `dataset["@id"]`
|
|
425
|
+
or generated.
|
|
426
|
+
|
|
427
|
+
##### appId
|
|
428
|
+
|
|
429
|
+
`string`
|
|
430
|
+
|
|
431
|
+
The dataspace app this dataset belongs to (matches
|
|
432
|
+
`DataspaceAppFactory` registration name).
|
|
433
|
+
|
|
434
|
+
##### dataset
|
|
435
|
+
|
|
436
|
+
`IDataspaceProtocolDataset`
|
|
437
|
+
|
|
438
|
+
The dataset payload (may omit system-stamped fields).
|
|
439
|
+
|
|
440
|
+
#### Returns
|
|
441
|
+
|
|
442
|
+
`Promise`\<`string`\>
|
|
443
|
+
|
|
444
|
+
The resolved dataset id.
|
|
445
|
+
|
|
446
|
+
***
|
|
447
|
+
|
|
448
|
+
### getAppDataset() {#getappdataset}
|
|
449
|
+
|
|
450
|
+
> **getAppDataset**(`id`): `Promise`\<[`IDataspaceAppDataset`](IDataspaceAppDataset.md)\>
|
|
451
|
+
|
|
452
|
+
Get an app dataset record owned by the calling tenant.
|
|
453
|
+
|
|
454
|
+
#### Parameters
|
|
455
|
+
|
|
456
|
+
##### id
|
|
457
|
+
|
|
458
|
+
`string`
|
|
459
|
+
|
|
460
|
+
The stored app dataset id.
|
|
461
|
+
|
|
462
|
+
#### Returns
|
|
463
|
+
|
|
464
|
+
`Promise`\<[`IDataspaceAppDataset`](IDataspaceAppDataset.md)\>
|
|
465
|
+
|
|
466
|
+
The stored app dataset record.
|
|
467
|
+
|
|
468
|
+
***
|
|
469
|
+
|
|
470
|
+
### listAppDatasets() {#listappdatasets}
|
|
471
|
+
|
|
472
|
+
> **listAppDatasets**(`cursor?`, `limit?`): `Promise`\<\{ `entities`: [`IDataspaceAppDataset`](IDataspaceAppDataset.md)[]; `cursor?`: `string`; \}\>
|
|
473
|
+
|
|
474
|
+
List the app datasets owned by the calling tenant.
|
|
475
|
+
|
|
476
|
+
#### Parameters
|
|
477
|
+
|
|
478
|
+
##### cursor?
|
|
479
|
+
|
|
480
|
+
`string`
|
|
481
|
+
|
|
482
|
+
Optional pagination cursor.
|
|
483
|
+
|
|
484
|
+
##### limit?
|
|
485
|
+
|
|
486
|
+
`number`
|
|
487
|
+
|
|
488
|
+
Optional maximum number of entries to return.
|
|
489
|
+
|
|
490
|
+
#### Returns
|
|
491
|
+
|
|
492
|
+
`Promise`\<\{ `entities`: [`IDataspaceAppDataset`](IDataspaceAppDataset.md)[]; `cursor?`: `string`; \}\>
|
|
493
|
+
|
|
494
|
+
The stored app datasets and the next-page cursor if more exist.
|
|
495
|
+
|
|
496
|
+
***
|
|
497
|
+
|
|
498
|
+
### updateAppDataset() {#updateappdataset}
|
|
499
|
+
|
|
500
|
+
> **updateAppDataset**(`id`, `appId`, `dataset`): `Promise`\<`void`\>
|
|
501
|
+
|
|
502
|
+
Update an app dataset record owned by the calling tenant.
|
|
503
|
+
|
|
504
|
+
#### Parameters
|
|
505
|
+
|
|
506
|
+
##### id
|
|
507
|
+
|
|
508
|
+
`string`
|
|
509
|
+
|
|
510
|
+
The stored app dataset id.
|
|
511
|
+
|
|
512
|
+
##### appId
|
|
513
|
+
|
|
514
|
+
`string`
|
|
515
|
+
|
|
516
|
+
The dataspace app this dataset belongs to.
|
|
517
|
+
|
|
518
|
+
##### dataset
|
|
519
|
+
|
|
520
|
+
`IDataspaceProtocolDataset`
|
|
521
|
+
|
|
522
|
+
The dataset payload.
|
|
523
|
+
|
|
524
|
+
#### Returns
|
|
525
|
+
|
|
526
|
+
`Promise`\<`void`\>
|
|
527
|
+
|
|
528
|
+
Nothing.
|
|
529
|
+
|
|
530
|
+
***
|
|
531
|
+
|
|
532
|
+
### deleteAppDataset() {#deleteappdataset}
|
|
533
|
+
|
|
534
|
+
> **deleteAppDataset**(`id`): `Promise`\<`void`\>
|
|
535
|
+
|
|
536
|
+
Delete an app dataset record owned by the calling tenant.
|
|
537
|
+
|
|
538
|
+
#### Parameters
|
|
539
|
+
|
|
540
|
+
##### id
|
|
541
|
+
|
|
542
|
+
`string`
|
|
543
|
+
|
|
544
|
+
The stored app dataset id.
|
|
545
|
+
|
|
546
|
+
#### Returns
|
|
547
|
+
|
|
548
|
+
`Promise`\<`void`\>
|
|
549
|
+
|
|
550
|
+
Nothing.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Type Alias: DataspaceTransferFormat
|
|
2
|
+
|
|
3
|
+
> **DataspaceTransferFormat** = *typeof* [`DataspaceTransferFormat`](../variables/DataspaceTransferFormat.md)\[keyof *typeof* [`DataspaceTransferFormat`](../variables/DataspaceTransferFormat.md)\]
|
|
4
|
+
|
|
5
|
+
Type for the DataspaceTransferFormat const values.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Variable: DataspaceTransferFormat
|
|
2
|
+
|
|
3
|
+
> `const` **DataspaceTransferFormat**: `object`
|
|
4
|
+
|
|
5
|
+
TWIN transfer format identifiers used in TransferRequestMessage.format.
|
|
6
|
+
Follows the Eclipse EDC canonical pattern: DestinationType-FlowType.
|
|
7
|
+
See RFC-007 Data Transfer Profile.
|
|
8
|
+
|
|
9
|
+
## Type Declaration
|
|
10
|
+
|
|
11
|
+
### HttpProxyPull {#httpproxypull}
|
|
12
|
+
|
|
13
|
+
> `readonly` **HttpProxyPull**: `"HttpProxy-PULL"` = `"HttpProxy-PULL"`
|
|
14
|
+
|
|
15
|
+
PULL mode: consumer queries data via a bearer-token-protected endpoint.
|
|
16
|
+
Data flows: Consumer GET provider endpoint (with token).
|
|
17
|
+
|
|
18
|
+
### HttpProxyPush {#httpproxypush}
|
|
19
|
+
|
|
20
|
+
> `readonly` **HttpProxyPush**: `"HttpProxy-PUSH"` = `"HttpProxy-PUSH"`
|
|
21
|
+
|
|
22
|
+
Consumer-initiated PUSH mode: consumer supplies their /inbox endpoint in the
|
|
23
|
+
TransferRequestMessage. Provider pushes ActivityStreams objects to that endpoint.
|
|
24
|
+
Data flows: Provider POST to consumer's /inbox.
|
|
25
|
+
|
|
26
|
+
### HttpProxyPost {#httpproxypost}
|
|
27
|
+
|
|
28
|
+
> `readonly` **HttpProxyPost**: `"HttpProxy-POST"` = `"HttpProxy-POST"`
|
|
29
|
+
|
|
30
|
+
Provider-initiated PUSH mode (inverted flow): consumer supplies no dataAddress.
|
|
31
|
+
Provider returns its own /inbox URL + signed JWT. Consumer then posts data there.
|
|
32
|
+
Data flows: Consumer POST to provider's /inbox.
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/dataspace-models",
|
|
3
|
-
"version": "0.0.3-next.
|
|
3
|
+
"version": "0.0.3-next.28",
|
|
4
4
|
"description": "Defines shared entities, interfaces, and data types used by control plane and data plane components.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/
|
|
7
|
+
"url": "git+https://github.com/iotaledger/dataspace.git",
|
|
8
8
|
"directory": "packages/dataspace-models"
|
|
9
9
|
},
|
|
10
10
|
"author": "jose.cantera@iota.org",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"schemas"
|
|
57
57
|
],
|
|
58
58
|
"bugs": {
|
|
59
|
-
"url": "git+https://github.com/
|
|
59
|
+
"url": "git+https://github.com/iotaledger/dataspace/issues"
|
|
60
60
|
},
|
|
61
61
|
"homepage": "https://twindev.org"
|
|
62
62
|
}
|