vet-sdk-core-ts 0.4.34 → 0.4.35
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 +4 -0
- package/dist/health-dcat.d.ts +9 -5
- package/dist/health-dcat.js +13 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -21,6 +21,10 @@ federation requests. GW authentication, OpenID Federation trust resolution,
|
|
|
21
21
|
OpenID4VP verification and Dataspace Protocol exchange stay in injected
|
|
22
22
|
transports; the SDK neither exposes tenant inventories through ICA nor treats
|
|
23
23
|
the host as the tenant publisher.
|
|
24
|
+
Study publication writes the derived Dataset and its `CatalogRecord` together.
|
|
25
|
+
Withdrawal updates only that record to `archived`; it does not delete or alter
|
|
26
|
+
the ResearchStudy, eligibility/team Groups, ResearchSubjects or data-access
|
|
27
|
+
classification.
|
|
24
28
|
|
|
25
29
|
## Veterinary scheduling bundles
|
|
26
30
|
|
package/dist/health-dcat.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { buildCatalogHostAdvertisement, buildHealthDcatFederationRequest, type HealthDcatResource } from 'vet-data-utils-ts/health-dcat';
|
|
1
|
+
import { buildCatalogHostAdvertisement, buildHealthDcatFederationRequest, buildResearchStudyDatasetPublication, updateHealthDcatCatalogRecordStatus, type HealthDcatResource } from 'vet-data-utils-ts/health-dcat';
|
|
2
2
|
export type HealthDcatResourceType = HealthDcatResource['resourceType'];
|
|
3
3
|
export type HealthDcatBatchMethod = 'POST' | 'PUT';
|
|
4
4
|
/** Builds a claims-first HealthDCAT batch accepted by a product GW adapter. */
|
|
5
5
|
export declare function buildHealthDcatBatch(resources: readonly unknown[], method?: HealthDcatBatchMethod): Readonly<{
|
|
6
6
|
data: readonly Readonly<{
|
|
7
|
-
type: "Dataset-health-dcat" | "Catalog-health-dcat";
|
|
7
|
+
type: "Dataset-health-dcat" | "Catalog-health-dcat" | "CatalogRecord-health-dcat" | "Distribution-health-dcat" | "DataService-health-dcat";
|
|
8
8
|
resource: Readonly<{
|
|
9
|
-
resourceType: "Dataset" | "Catalog";
|
|
9
|
+
resourceType: "Dataset" | "Catalog" | "CatalogRecord" | "Distribution" | "DataService";
|
|
10
10
|
id: string;
|
|
11
11
|
meta: Readonly<{
|
|
12
12
|
claims: Readonly<Record<string, string | number | boolean | readonly string[]>>;
|
|
@@ -14,7 +14,7 @@ export declare function buildHealthDcatBatch(resources: readonly unknown[], meth
|
|
|
14
14
|
}>;
|
|
15
15
|
request: Readonly<{
|
|
16
16
|
method: HealthDcatBatchMethod;
|
|
17
|
-
url: `Dataset/${string}` | `Catalog/${string}`;
|
|
17
|
+
url: `Dataset/${string}` | `Catalog/${string}` | `CatalogRecord/${string}` | `Distribution/${string}` | `DataService/${string}`;
|
|
18
18
|
}>;
|
|
19
19
|
}>[];
|
|
20
20
|
}>;
|
|
@@ -22,7 +22,7 @@ export declare function buildHealthDcatBatch(resources: readonly unknown[], meth
|
|
|
22
22
|
export declare function buildHealthDcatSearch(resourceType: HealthDcatResourceType, claims?: Readonly<Record<string, unknown>>): Readonly<{
|
|
23
23
|
data: readonly Readonly<{
|
|
24
24
|
resource: Readonly<{
|
|
25
|
-
resourceType: "Dataset" | "Catalog";
|
|
25
|
+
resourceType: "Dataset" | "Catalog" | "CatalogRecord" | "Distribution" | "DataService";
|
|
26
26
|
id: string;
|
|
27
27
|
meta: Readonly<{
|
|
28
28
|
claims: Readonly<Record<string, string | number | boolean | readonly string[]>>;
|
|
@@ -58,4 +58,8 @@ export declare class HealthDcatCatalogManager {
|
|
|
58
58
|
search(resourceType: HealthDcatResourceType, claims?: Readonly<Record<string, unknown>>): Promise<readonly HealthDcatResource[]>;
|
|
59
59
|
discoverHosts(): Promise<readonly ReturnType<typeof buildCatalogHostAdvertisement>[]>;
|
|
60
60
|
federate(input: Parameters<typeof buildHealthDcatFederationRequest>[0]): Promise<unknown>;
|
|
61
|
+
/** Publishes a study-derived Dataset and its editorial record atomically in one batch. */
|
|
62
|
+
publishResearchStudyDataset(input: Parameters<typeof buildResearchStudyDatasetPublication>[0]): Promise<ReturnType<typeof buildResearchStudyDatasetPublication>>;
|
|
63
|
+
/** Updates only the CatalogRecord status; the ResearchStudy and Dataset remain intact. */
|
|
64
|
+
setResearchStudyDatasetPublicationStatus(input: Parameters<typeof updateHealthDcatCatalogRecordStatus>[0]): Promise<HealthDcatResource>;
|
|
61
65
|
}
|
package/dist/health-dcat.js
CHANGED
|
@@ -10,7 +10,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
11
|
};
|
|
12
12
|
var _HealthDcatCatalogManager_transport;
|
|
13
|
-
import { buildCatalogHostAdvertisement, buildHealthDcatFederationRequest, normalizeHealthDcatResource, } from 'vet-data-utils-ts/health-dcat';
|
|
13
|
+
import { buildCatalogHostAdvertisement, buildHealthDcatFederationRequest, buildResearchStudyDatasetPublication, updateHealthDcatCatalogRecordStatus, normalizeHealthDcatResource, } from 'vet-data-utils-ts/health-dcat';
|
|
14
14
|
/** Builds a claims-first HealthDCAT batch accepted by a product GW adapter. */
|
|
15
15
|
export function buildHealthDcatBatch(resources, method = 'POST') {
|
|
16
16
|
return Object.freeze({ data: Object.freeze(resources.map(candidate => {
|
|
@@ -82,6 +82,18 @@ export class HealthDcatCatalogManager {
|
|
|
82
82
|
const request = buildHealthDcatFederationRequest(input);
|
|
83
83
|
return __classPrivateFieldGet(this, _HealthDcatCatalogManager_transport, "f").execute(Object.freeze({ operation: 'federate', request }));
|
|
84
84
|
}
|
|
85
|
+
/** Publishes a study-derived Dataset and its editorial record atomically in one batch. */
|
|
86
|
+
async publishResearchStudyDataset(input) {
|
|
87
|
+
const publication = buildResearchStudyDatasetPublication(input);
|
|
88
|
+
await __classPrivateFieldGet(this, _HealthDcatCatalogManager_transport, "f").execute(Object.freeze({ operation: 'batch', envelope: buildHealthDcatBatch([publication.dataset, publication.record]) }));
|
|
89
|
+
return publication;
|
|
90
|
+
}
|
|
91
|
+
/** Updates only the CatalogRecord status; the ResearchStudy and Dataset remain intact. */
|
|
92
|
+
async setResearchStudyDatasetPublicationStatus(input) {
|
|
93
|
+
const record = updateHealthDcatCatalogRecordStatus(input);
|
|
94
|
+
await __classPrivateFieldGet(this, _HealthDcatCatalogManager_transport, "f").execute(Object.freeze({ operation: 'batch', envelope: buildHealthDcatBatch([record], 'PUT') }));
|
|
95
|
+
return record;
|
|
96
|
+
}
|
|
85
97
|
}
|
|
86
98
|
_HealthDcatCatalogManager_transport = new WeakMap();
|
|
87
99
|
function responseBody(value) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vet-sdk-core-ts",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.35",
|
|
4
4
|
"description": "Browser-safe VetChain core contracts and governed animal species identifiers",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Connecting Solution & Applications Ltd",
|
|
@@ -89,6 +89,6 @@
|
|
|
89
89
|
"@noble/hashes": "^2.2.0",
|
|
90
90
|
"@noble/post-quantum": "0.5.4",
|
|
91
91
|
"gdc-common-utils-ts": "2.9.10",
|
|
92
|
-
"vet-data-utils-ts": "0.5.
|
|
92
|
+
"vet-data-utils-ts": "0.5.26"
|
|
93
93
|
}
|
|
94
94
|
}
|