@twin.org/dataspace-control-plane-service 0.0.3-next.43 → 0.0.3-next.45
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/dataspaceControlPlanePolicyRequester.js +2 -2
- package/dist/es/dataspaceControlPlanePolicyRequester.js.map +1 -1
- package/dist/es/dataspaceControlPlaneService.js +10 -3
- package/dist/es/dataspaceControlPlaneService.js.map +1 -1
- package/dist/es/restEntryPoints.js +1 -2
- package/dist/es/restEntryPoints.js.map +1 -1
- package/dist/es/utils/transferErrorUtils.js +3 -3
- package/dist/es/utils/transferErrorUtils.js.map +1 -1
- package/dist/types/dataspaceControlPlanePolicyRequester.d.ts +2 -2
- package/dist/types/dataspaceControlPlaneService.d.ts +4 -0
- package/dist/types/restEntryPoints.d.ts +1 -2
- package/dist/types/utils/transferErrorUtils.d.ts +3 -3
- package/docs/changelog.md +29 -0
- package/docs/reference/classes/DataspaceControlPlanePolicyRequester.md +2 -2
- package/docs/reference/classes/DataspaceControlPlaneService.md +8 -0
- package/docs/reference/variables/restEntryPoints.md +1 -2
- package/package.json +2 -2
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { generateRestRoutesDataspaceControlPlane, tagsDataspaceControlPlane } from "./dataspaceControlPlaneRoutes.js";
|
|
2
2
|
/**
|
|
3
3
|
* Entry points for the REST API.
|
|
4
|
-
* Defines REST routes for DSP
|
|
5
|
-
* Resolver methods (IDataspaceControlPlaneResolverComponent).
|
|
4
|
+
* Defines REST routes for DSP Transfer Process and Contract Negotiation Protocol.
|
|
6
5
|
*/
|
|
7
6
|
export const restEntryPoints = [
|
|
8
7
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restEntryPoints.js","sourceRoot":"","sources":["../../src/restEntryPoints.ts"],"names":[],"mappings":"AAGA,OAAO,EACN,uCAAuC,EACvC,yBAAyB,EACzB,MAAM,kCAAkC,CAAC;AAE1C
|
|
1
|
+
{"version":3,"file":"restEntryPoints.js","sourceRoot":"","sources":["../../src/restEntryPoints.ts"],"names":[],"mappings":"AAGA,OAAO,EACN,uCAAuC,EACvC,yBAAyB,EACzB,MAAM,kCAAkC,CAAC;AAE1C;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAA2B;IACtD;QACC,IAAI,EAAE,yBAAyB;QAC/B,gBAAgB,EAAE,yBAAyB;QAC3C,IAAI,EAAE,yBAAyB;QAC/B,cAAc,EAAE,uCAAuC;KACvD;CACD,CAAC","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IRestRouteEntryPoint } from \"@twin.org/api-models\";\nimport {\n\tgenerateRestRoutesDataspaceControlPlane,\n\ttagsDataspaceControlPlane\n} from \"./dataspaceControlPlaneRoutes.js\";\n\n/**\n * Entry points for the REST API.\n * Defines REST routes for DSP Transfer Process and Contract Negotiation Protocol.\n */\nexport const restEntryPoints: IRestRouteEntryPoint[] = [\n\t{\n\t\tname: \"dataspace-control-plane\",\n\t\tdefaultBaseRoute: \"dataspace-control-plane\",\n\t\ttags: tagsDataspaceControlPlane,\n\t\tgenerateRoutes: generateRestRoutesDataspaceControlPlane\n\t}\n];\n"]}
|
|
@@ -68,9 +68,9 @@ export function isCatalogErrorName(error, errorName) {
|
|
|
68
68
|
return error.code?.includes(errorName) ?? false;
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
71
|
-
*
|
|
72
|
-
* @param error The
|
|
73
|
-
* @returns True if the
|
|
71
|
+
* Type guard that checks whether an unknown value is a DSP CatalogError.
|
|
72
|
+
* @param error The value to check.
|
|
73
|
+
* @returns True if the value has the JSON-LD type of a DSP CatalogError.
|
|
74
74
|
*/
|
|
75
75
|
export function isCatalogError(error) {
|
|
76
76
|
return getJsonLdType(error) === DataspaceProtocolCatalogTypes.CatalogError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transferErrorUtils.js","sourceRoot":"","sources":["../../../src/utils/transferErrorUtils.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAe,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EACN,6BAA6B,EAC7B,yBAAyB,EACzB,qCAAqC,EAGrC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C;;;;GAIG;AACH,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAEtC;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,wBAAwB,CACvC,KAAc,EACd,IAAqD;IAErD,MAAM,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAE3C,OAAO;QACN,UAAU,EAAE,CAAC,yBAAyB,CAAC,OAAO,CAAC;QAC/C,OAAO,EAAE,qCAAqC,CAAC,aAAa;QAC5D,WAAW,EAAE,IAAI,EAAE,WAAW,IAAI,WAAW;QAC7C,WAAW,EAAE,IAAI,EAAE,WAAW,IAAI,WAAW;QAC7C,IAAI,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE;QACpD,MAAM,EAAE,SAAS;KACjB,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,0BAA0B,CAAC,MAAe;IACzD,4BAA4B;IAC5B,IACC,EAAE,CAAC,MAAM,CAAkC,MAAM,CAAC;QAClD,MAAM,CAAC,OAAO,CAAC,KAAK,qCAAqC,CAAC,aAAa,EACtE,CAAC;QACF,gDAAgD;QAChD,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;YACjB,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3C,OAAO,eAAe,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,cAAc,CAAC,UAAU,CAAC;QAC9E,CAAC;QACD,OAAO,cAAc,CAAC,UAAU,CAAC;IAClC,CAAC;IAED,gBAAgB;IAChB,IAAI,EAAE,CAAC,MAAM,CAAS,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC7D,OAAO,eAAe,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,cAAc,CAAC,UAAU,CAAC;IACjF,CAAC;IAED,OAAO,SAAS,CAAC;AAClB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CACjC,KAAqC,EACrC,SAAiB;IAEjB,OAAO,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,SAAS,CAAC,IAAI,KAAK,CAAC;AACjD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc;IAC5C,OAAO,aAAa,CAAC,KAAK,CAAC,KAAK,6BAA6B,CAAC,YAAY,CAAC;AAC5E,CAAC","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { HttpErrorHelper } from \"@twin.org/api-models\";\nimport { BaseError, type IError, Is } from \"@twin.org/core\";\nimport { getJsonLdType } from \"@twin.org/dataspace-models\";\nimport {\n\tDataspaceProtocolCatalogTypes,\n\tDataspaceProtocolContexts,\n\tDataspaceProtocolTransferProcessTypes,\n\ttype IDataspaceProtocolCatalogError,\n\ttype IDataspaceProtocolTransferError\n} from \"@twin.org/standards-dataspace-protocol\";\nimport { HttpStatusCode } from \"@twin.org/web\";\n\n/**\n * Fallback value used when PIDs cannot be extracted from a malformed message.\n * DSP protocol requires consumerPid and providerPid in TransferError responses,\n * so we must provide a value even when the request is completely malformed.\n */\nconst UNKNOWN_PID = \"urn:dsp:unknown\";\n\n/**\n * Transform an error to DS Protocol TransferError format.\n * Used by both service and route layers to ensure consistent error responses.\n * Following the same pattern as Federated Catalogue's catalogErrorUtils.ts.\n * The code property uses semantic format \"ErrorName:message\".\n * The reason property contains the full flattened error chain for debugging.\n * @param error The error to transform.\n * @param pids Optional object containing consumerPid and/or providerPid.\n * @param pids.consumerPid Optional consumer process ID.\n * @param pids.providerPid Optional provider process ID.\n * @returns The TransferError.\n */\nexport function transformToTransferError(\n\terror: unknown,\n\tpids?: { consumerPid?: string; providerPid?: string }\n): IDataspaceProtocolTransferError {\n\tconst flattened = BaseError.flatten(error);\n\n\treturn {\n\t\t\"@context\": [DataspaceProtocolContexts.Context],\n\t\t\"@type\": DataspaceProtocolTransferProcessTypes.TransferError,\n\t\tconsumerPid: pids?.consumerPid ?? UNKNOWN_PID,\n\t\tproviderPid: pids?.providerPid ?? UNKNOWN_PID,\n\t\tcode: `${flattened[0].name}:${flattened[0].message}`,\n\t\treason: flattened\n\t};\n}\n\n/**\n * Transform the DS Protocol result to an HTTP status code.\n * Used by the routes layer to derive HTTP status from TransferError.\n *\n * @param result The result to transform.\n * @returns The transformed status code or undefined if no transformation was found or not an error.\n */\nexport function transformErrorToStatusCode(result: unknown): HttpStatusCode | undefined {\n\t// Is this a transfer error?\n\tif (\n\t\tIs.object<IDataspaceProtocolTransferError>(result) &&\n\t\tresult[\"@type\"] === DataspaceProtocolTransferProcessTypes.TransferError\n\t) {\n\t\t// Extract the error name to map to status codes\n\t\tif (result.code) {\n\t\t\tconst codePart = result.code.split(\":\")[0];\n\t\t\treturn HttpErrorHelper.ERROR_TYPE_MAP[codePart] ?? HttpStatusCode.badRequest;\n\t\t}\n\t\treturn HttpStatusCode.badRequest;\n\t}\n\n\t// Regular error\n\tif (Is.object<IError>(result) && !BaseError.isEmpty(result)) {\n\t\treturn HttpErrorHelper.ERROR_TYPE_MAP[result.name] ?? HttpStatusCode.badRequest;\n\t}\n\n\treturn undefined;\n}\n\n/**\n * Check if a CatalogError contains a specific error name in its code.\n * @param error The CatalogError to check.\n * @param errorName The error name to check for (e.g., NotFoundError.CLASS_NAME).\n * @returns True if the error code contains the specified error name.\n */\nexport function isCatalogErrorName(\n\terror: IDataspaceProtocolCatalogError,\n\terrorName: string\n): boolean {\n\treturn error.code?.includes(errorName) ?? false;\n}\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"transferErrorUtils.js","sourceRoot":"","sources":["../../../src/utils/transferErrorUtils.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAe,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EACN,6BAA6B,EAC7B,yBAAyB,EACzB,qCAAqC,EAGrC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C;;;;GAIG;AACH,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAEtC;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,wBAAwB,CACvC,KAAc,EACd,IAAqD;IAErD,MAAM,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAE3C,OAAO;QACN,UAAU,EAAE,CAAC,yBAAyB,CAAC,OAAO,CAAC;QAC/C,OAAO,EAAE,qCAAqC,CAAC,aAAa;QAC5D,WAAW,EAAE,IAAI,EAAE,WAAW,IAAI,WAAW;QAC7C,WAAW,EAAE,IAAI,EAAE,WAAW,IAAI,WAAW;QAC7C,IAAI,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE;QACpD,MAAM,EAAE,SAAS;KACjB,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,0BAA0B,CAAC,MAAe;IACzD,4BAA4B;IAC5B,IACC,EAAE,CAAC,MAAM,CAAkC,MAAM,CAAC;QAClD,MAAM,CAAC,OAAO,CAAC,KAAK,qCAAqC,CAAC,aAAa,EACtE,CAAC;QACF,gDAAgD;QAChD,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;YACjB,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3C,OAAO,eAAe,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,cAAc,CAAC,UAAU,CAAC;QAC9E,CAAC;QACD,OAAO,cAAc,CAAC,UAAU,CAAC;IAClC,CAAC;IAED,gBAAgB;IAChB,IAAI,EAAE,CAAC,MAAM,CAAS,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC7D,OAAO,eAAe,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,cAAc,CAAC,UAAU,CAAC;IACjF,CAAC;IAED,OAAO,SAAS,CAAC;AAClB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CACjC,KAAqC,EACrC,SAAiB;IAEjB,OAAO,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,SAAS,CAAC,IAAI,KAAK,CAAC;AACjD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc;IAC5C,OAAO,aAAa,CAAC,KAAK,CAAC,KAAK,6BAA6B,CAAC,YAAY,CAAC;AAC5E,CAAC","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { HttpErrorHelper } from \"@twin.org/api-models\";\nimport { BaseError, type IError, Is } from \"@twin.org/core\";\nimport { getJsonLdType } from \"@twin.org/dataspace-models\";\nimport {\n\tDataspaceProtocolCatalogTypes,\n\tDataspaceProtocolContexts,\n\tDataspaceProtocolTransferProcessTypes,\n\ttype IDataspaceProtocolCatalogError,\n\ttype IDataspaceProtocolTransferError\n} from \"@twin.org/standards-dataspace-protocol\";\nimport { HttpStatusCode } from \"@twin.org/web\";\n\n/**\n * Fallback value used when PIDs cannot be extracted from a malformed message.\n * DSP protocol requires consumerPid and providerPid in TransferError responses,\n * so we must provide a value even when the request is completely malformed.\n */\nconst UNKNOWN_PID = \"urn:dsp:unknown\";\n\n/**\n * Transform an error to DS Protocol TransferError format.\n * Used by both service and route layers to ensure consistent error responses.\n * Following the same pattern as Federated Catalogue's catalogErrorUtils.ts.\n * The code property uses semantic format \"ErrorName:message\".\n * The reason property contains the full flattened error chain for debugging.\n * @param error The error to transform.\n * @param pids Optional object containing consumerPid and/or providerPid.\n * @param pids.consumerPid Optional consumer process ID.\n * @param pids.providerPid Optional provider process ID.\n * @returns The TransferError.\n */\nexport function transformToTransferError(\n\terror: unknown,\n\tpids?: { consumerPid?: string; providerPid?: string }\n): IDataspaceProtocolTransferError {\n\tconst flattened = BaseError.flatten(error);\n\n\treturn {\n\t\t\"@context\": [DataspaceProtocolContexts.Context],\n\t\t\"@type\": DataspaceProtocolTransferProcessTypes.TransferError,\n\t\tconsumerPid: pids?.consumerPid ?? UNKNOWN_PID,\n\t\tproviderPid: pids?.providerPid ?? UNKNOWN_PID,\n\t\tcode: `${flattened[0].name}:${flattened[0].message}`,\n\t\treason: flattened\n\t};\n}\n\n/**\n * Transform the DS Protocol result to an HTTP status code.\n * Used by the routes layer to derive HTTP status from TransferError.\n *\n * @param result The result to transform.\n * @returns The transformed status code or undefined if no transformation was found or not an error.\n */\nexport function transformErrorToStatusCode(result: unknown): HttpStatusCode | undefined {\n\t// Is this a transfer error?\n\tif (\n\t\tIs.object<IDataspaceProtocolTransferError>(result) &&\n\t\tresult[\"@type\"] === DataspaceProtocolTransferProcessTypes.TransferError\n\t) {\n\t\t// Extract the error name to map to status codes\n\t\tif (result.code) {\n\t\t\tconst codePart = result.code.split(\":\")[0];\n\t\t\treturn HttpErrorHelper.ERROR_TYPE_MAP[codePart] ?? HttpStatusCode.badRequest;\n\t\t}\n\t\treturn HttpStatusCode.badRequest;\n\t}\n\n\t// Regular error\n\tif (Is.object<IError>(result) && !BaseError.isEmpty(result)) {\n\t\treturn HttpErrorHelper.ERROR_TYPE_MAP[result.name] ?? HttpStatusCode.badRequest;\n\t}\n\n\treturn undefined;\n}\n\n/**\n * Check if a CatalogError contains a specific error name in its code.\n * @param error The CatalogError to check.\n * @param errorName The error name to check for (e.g., NotFoundError.CLASS_NAME).\n * @returns True if the error code contains the specified error name.\n */\nexport function isCatalogErrorName(\n\terror: IDataspaceProtocolCatalogError,\n\terrorName: string\n): boolean {\n\treturn error.code?.includes(errorName) ?? false;\n}\n\n/**\n * Type guard that checks whether an unknown value is a DSP CatalogError.\n * @param error The value to check.\n * @returns True if the value has the JSON-LD type of a DSP CatalogError.\n */\nexport function isCatalogError(error: unknown): error is IDataspaceProtocolCatalogError {\n\treturn getJsonLdType(error) === DataspaceProtocolCatalogTypes.CatalogError;\n}\n"]}
|
|
@@ -67,14 +67,14 @@ export declare class DataspaceControlPlanePolicyRequester implements IPolicyRequ
|
|
|
67
67
|
* A policy finalisation has been sent by a provider.
|
|
68
68
|
* Called by PNP when provider sends a FinalizedEvent.
|
|
69
69
|
* @param negotiationId The id of the negotiation.
|
|
70
|
-
* @returns
|
|
70
|
+
* @returns A promise that resolves when all finalisation callbacks have been notified.
|
|
71
71
|
*/
|
|
72
72
|
finalised(negotiationId: string): Promise<void>;
|
|
73
73
|
/**
|
|
74
74
|
* A policy termination has been sent by a provider.
|
|
75
75
|
* Called by PNP when provider sends a TerminatedMessage or negotiation fails.
|
|
76
76
|
* @param negotiationId The id of the negotiation.
|
|
77
|
-
* @returns
|
|
77
|
+
* @returns A promise that resolves when all termination callbacks have been notified.
|
|
78
78
|
*/
|
|
79
79
|
terminated(negotiationId: string): Promise<void>;
|
|
80
80
|
}
|
|
@@ -49,12 +49,14 @@ export declare class DataspaceControlPlaneService implements IDataspaceControlPl
|
|
|
49
49
|
/**
|
|
50
50
|
* The service needs to be started when the application is initialized.
|
|
51
51
|
* @param nodeLoggingComponentType The node logging component type.
|
|
52
|
+
* @returns A promise that resolves when the federated catalogue is populated and the cleanup task is scheduled.
|
|
52
53
|
*/
|
|
53
54
|
start(nodeLoggingComponentType?: string): Promise<void>;
|
|
54
55
|
/**
|
|
55
56
|
* Stop the service.
|
|
56
57
|
* Removes the stalled negotiation cleanup task.
|
|
57
58
|
* @param nodeLoggingComponentType The node logging component type.
|
|
59
|
+
* @returns A promise that resolves when the cleanup task has been removed.
|
|
58
60
|
*/
|
|
59
61
|
stop(nodeLoggingComponentType?: string): Promise<void>;
|
|
60
62
|
/**
|
|
@@ -212,11 +214,13 @@ export declare class DataspaceControlPlaneService implements IDataspaceControlPl
|
|
|
212
214
|
* @param id The stored dataset id.
|
|
213
215
|
* @param appId The dataspace app this dataset belongs to.
|
|
214
216
|
* @param dataset The dataset payload.
|
|
217
|
+
* @returns A promise that resolves when the dataset has been updated in storage and the catalogue.
|
|
215
218
|
*/
|
|
216
219
|
updateAppDataset(id: string, appId: string, dataset: IDataspaceProtocolDataset): Promise<void>;
|
|
217
220
|
/**
|
|
218
221
|
* Delete a dataspace app dataset owned by the calling organization.
|
|
219
222
|
* @param id The stored app dataset id.
|
|
223
|
+
* @returns A promise that resolves when the dataset has been removed from storage and the catalogue.
|
|
220
224
|
*/
|
|
221
225
|
deleteAppDataset(id: string): Promise<void>;
|
|
222
226
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { IRestRouteEntryPoint } from "@twin.org/api-models";
|
|
2
2
|
/**
|
|
3
3
|
* Entry points for the REST API.
|
|
4
|
-
* Defines REST routes for DSP
|
|
5
|
-
* Resolver methods (IDataspaceControlPlaneResolverComponent).
|
|
4
|
+
* Defines REST routes for DSP Transfer Process and Contract Negotiation Protocol.
|
|
6
5
|
*/
|
|
7
6
|
export declare const restEntryPoints: IRestRouteEntryPoint[];
|
|
@@ -32,8 +32,8 @@ export declare function transformErrorToStatusCode(result: unknown): HttpStatusC
|
|
|
32
32
|
*/
|
|
33
33
|
export declare function isCatalogErrorName(error: IDataspaceProtocolCatalogError, errorName: string): boolean;
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
36
|
-
* @param error The
|
|
37
|
-
* @returns True if the
|
|
35
|
+
* Type guard that checks whether an unknown value is a DSP CatalogError.
|
|
36
|
+
* @param error The value to check.
|
|
37
|
+
* @returns True if the value has the JSON-LD type of a DSP CatalogError.
|
|
38
38
|
*/
|
|
39
39
|
export declare function isCatalogError(error: unknown): error is IDataspaceProtocolCatalogError;
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.45](https://github.com/iotaledger/twin-dataspace/compare/dataspace-control-plane-service-v0.0.3-next.44...dataspace-control-plane-service-v0.0.3-next.45) (2026-06-17)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* mock pnap ([35f21f8](https://github.com/iotaledger/twin-dataspace/commit/35f21f847d3fb9d2ffcb9191a18835093cd259b9))
|
|
9
|
+
* use async getStore in tests ([739531e](https://github.com/iotaledger/twin-dataspace/commit/739531e1a159f728301835cd39cf06eab7a7bf4a))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Dependencies
|
|
13
|
+
|
|
14
|
+
* The following workspace dependencies were updated
|
|
15
|
+
* dependencies
|
|
16
|
+
* @twin.org/dataspace-models bumped from 0.0.3-next.44 to 0.0.3-next.45
|
|
17
|
+
|
|
18
|
+
## [0.0.3-next.44](https://github.com/iotaledger/twin-dataspace/compare/dataspace-control-plane-service-v0.0.3-next.43...dataspace-control-plane-service-v0.0.3-next.44) (2026-06-12)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Miscellaneous Chores
|
|
22
|
+
|
|
23
|
+
* **dataspace-control-plane-service:** Synchronize repo versions
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Dependencies
|
|
27
|
+
|
|
28
|
+
* The following workspace dependencies were updated
|
|
29
|
+
* dependencies
|
|
30
|
+
* @twin.org/dataspace-models bumped from 0.0.3-next.43 to 0.0.3-next.44
|
|
31
|
+
|
|
3
32
|
## [0.0.3-next.43](https://github.com/iotaledger/twin-dataspace/compare/dataspace-control-plane-service-v0.0.3-next.42...dataspace-control-plane-service-v0.0.3-next.43) (2026-06-11)
|
|
4
33
|
|
|
5
34
|
|
|
@@ -210,7 +210,7 @@ The id of the negotiation.
|
|
|
210
210
|
|
|
211
211
|
`Promise`\<`void`\>
|
|
212
212
|
|
|
213
|
-
|
|
213
|
+
A promise that resolves when all finalisation callbacks have been notified.
|
|
214
214
|
|
|
215
215
|
#### Implementation of
|
|
216
216
|
|
|
@@ -237,7 +237,7 @@ The id of the negotiation.
|
|
|
237
237
|
|
|
238
238
|
`Promise`\<`void`\>
|
|
239
239
|
|
|
240
|
-
|
|
240
|
+
A promise that resolves when all termination callbacks have been notified.
|
|
241
241
|
|
|
242
242
|
#### Implementation of
|
|
243
243
|
|
|
@@ -186,6 +186,8 @@ The node logging component type.
|
|
|
186
186
|
|
|
187
187
|
`Promise`\<`void`\>
|
|
188
188
|
|
|
189
|
+
A promise that resolves when the federated catalogue is populated and the cleanup task is scheduled.
|
|
190
|
+
|
|
189
191
|
#### Implementation of
|
|
190
192
|
|
|
191
193
|
`IDataspaceControlPlaneComponent.start`
|
|
@@ -211,6 +213,8 @@ The node logging component type.
|
|
|
211
213
|
|
|
212
214
|
`Promise`\<`void`\>
|
|
213
215
|
|
|
216
|
+
A promise that resolves when the cleanup task has been removed.
|
|
217
|
+
|
|
214
218
|
#### Implementation of
|
|
215
219
|
|
|
216
220
|
`IDataspaceControlPlaneComponent.stop`
|
|
@@ -795,6 +799,8 @@ The dataset payload.
|
|
|
795
799
|
|
|
796
800
|
`Promise`\<`void`\>
|
|
797
801
|
|
|
802
|
+
A promise that resolves when the dataset has been updated in storage and the catalogue.
|
|
803
|
+
|
|
798
804
|
#### Implementation of
|
|
799
805
|
|
|
800
806
|
`IDataspaceControlPlaneComponent.updateAppDataset`
|
|
@@ -819,6 +825,8 @@ The stored app dataset id.
|
|
|
819
825
|
|
|
820
826
|
`Promise`\<`void`\>
|
|
821
827
|
|
|
828
|
+
A promise that resolves when the dataset has been removed from storage and the catalogue.
|
|
829
|
+
|
|
822
830
|
#### Implementation of
|
|
823
831
|
|
|
824
832
|
`IDataspaceControlPlaneComponent.deleteAppDataset`
|
|
@@ -3,5 +3,4 @@
|
|
|
3
3
|
> `const` **restEntryPoints**: `IRestRouteEntryPoint`[]
|
|
4
4
|
|
|
5
5
|
Entry points for the REST API.
|
|
6
|
-
Defines REST routes for DSP
|
|
7
|
-
Resolver methods (IDataspaceControlPlaneResolverComponent).
|
|
6
|
+
Defines REST routes for DSP Transfer Process and Contract Negotiation Protocol.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/dataspace-control-plane-service",
|
|
3
|
-
"version": "0.0.3-next.
|
|
3
|
+
"version": "0.0.3-next.45",
|
|
4
4
|
"description": "Implements agreement negotiation and transfer process lifecycle management for control plane operations.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@twin.org/context": "next",
|
|
20
20
|
"@twin.org/core": "next",
|
|
21
21
|
"@twin.org/crypto": "next",
|
|
22
|
-
"@twin.org/dataspace-models": "0.0.3-next.
|
|
22
|
+
"@twin.org/dataspace-models": "0.0.3-next.45",
|
|
23
23
|
"@twin.org/entity": "next",
|
|
24
24
|
"@twin.org/entity-storage-models": "next",
|
|
25
25
|
"@twin.org/federated-catalogue-models": "next",
|