@twin.org/dataspace-models 0.10.1-next.1 → 0.10.1-next.2

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.
@@ -44,19 +44,19 @@ let DataspaceAppDataset = class DataspaceAppDataset {
44
44
  dateModified;
45
45
  };
46
46
  __decorate([
47
- property({ type: "string", isPrimary: true }),
47
+ property({ type: "string", isPrimary: true, maxLength: 255 }),
48
48
  __metadata("design:type", String)
49
49
  ], DataspaceAppDataset.prototype, "id", void 0);
50
50
  __decorate([
51
- property({ type: "string", isSecondary: true }),
51
+ property({ type: "string", maxLength: 255, isSecondary: true }),
52
52
  __metadata("design:type", String)
53
53
  ], DataspaceAppDataset.prototype, "organizationIdentity", void 0);
54
54
  __decorate([
55
- property({ type: "string", optional: true }),
55
+ property({ type: "string", maxLength: 32, optional: true }),
56
56
  __metadata("design:type", String)
57
57
  ], DataspaceAppDataset.prototype, "tenantId", void 0);
58
58
  __decorate([
59
- property({ type: "string" }),
59
+ property({ type: "string", maxLength: 255 }),
60
60
  __metadata("design:type", String)
61
61
  ], DataspaceAppDataset.prototype, "appId", void 0);
62
62
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"dataspaceAppDataset.js","sourceRoot":"","sources":["../../../src/entities/dataspaceAppDataset.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEnE;;GAEG;AAEI,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC/B;;OAEG;IAEI,EAAE,CAAU;IAEnB;;OAEG;IAEI,oBAAoB,CAAU;IAErC;;;;OAIG;IAEI,QAAQ,CAAU;IAEzB;;;OAGG;IAEI,KAAK,CAAU;IAEtB;;;OAGG;IAEI,OAAO,CAA8B;IAE5C;;;OAGG;IAEI,qBAAqB,CAAU;IAEtC;;OAEG;IAEI,WAAW,CAAU;IAE5B;;OAEG;IAEI,YAAY,CAAU;CAC7B,CAAA;AAhDO;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;+CAC3B;AAMZ;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;;iEACX;AAQ9B;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACpB;AAOlB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;;kDACP;AAOf;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;;oDACD;AAOrC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kEACP;AAM/B;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,CAAC,UAAU,EAAE,CAAC;;wDAC/D;AAMrB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;;yDACrB;AApDjB,mBAAmB;IAD/B,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;GACV,mBAAmB,CAqD/B","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { entity, property, SortDirection } from \"@twin.org/entity\";\n\n/**\n * Tenant-supplied Dataset shape persisted by the Control Plane.\n */\n@entity({ version: 1 })\nexport class DataspaceAppDataset {\n\t/**\n\t * The unique identifier for the dataset.\n\t */\n\t@property({ type: \"string\", isPrimary: true })\n\tpublic id!: string;\n\n\t/**\n\t * The identity of the organization that owns this entity.\n\t */\n\t@property({ type: \"string\", isSecondary: true })\n\tpublic organizationIdentity!: string;\n\n\t/**\n\t * The tenant that owns this dataset, captured from the request context at\n\t * write time. Optional - single-tenant nodes (no `TWIN_TENANT_ENABLED`)\n\t * register datasets without a tenant context.\n\t */\n\t@property({ type: \"string\", optional: true })\n\tpublic tenantId?: string;\n\n\t/**\n\t * The dataspace app that this dataset belongs to. Matches the app's\n\t * registered name in `DataspaceAppFactory` (typically the app's URI).\n\t */\n\t@property({ type: \"string\" })\n\tpublic appId!: string;\n\n\t/**\n\t * The user-controlled JSON-LD dataset payload. Stored as an\n\t * opaque object and validated/populated at publish time.\n\t */\n\t@property({ type: \"object\", format: \"json\" })\n\tpublic dataset!: { [key: string]: unknown };\n\n\t/**\n\t * Idle window (ms) for this dataset's PULL transfers, overriding the node-level\n\t * providerTransferIdleTimeoutMs; 0 disables the idle policy for this dataset.\n\t */\n\t@property({ type: \"number\", optional: true })\n\tpublic transferIdleTimeoutMs?: number;\n\n\t/**\n\t * Creation timestamp (ISO string format).\n\t */\n\t@property({ type: \"string\", format: \"date-time\", sortDirection: SortDirection.Descending })\n\tpublic dateCreated!: string;\n\n\t/**\n\t * Last update timestamp (ISO string format).\n\t */\n\t@property({ type: \"string\", format: \"date-time\" })\n\tpublic dateModified!: string;\n}\n"]}
1
+ {"version":3,"file":"dataspaceAppDataset.js","sourceRoot":"","sources":["../../../src/entities/dataspaceAppDataset.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEnE;;GAEG;AAEI,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC/B;;OAEG;IAEI,EAAE,CAAU;IAEnB;;OAEG;IAEI,oBAAoB,CAAU;IAErC;;;;OAIG;IAEI,QAAQ,CAAU;IAEzB;;;OAGG;IAEI,KAAK,CAAU;IAEtB;;;OAGG;IAEI,OAAO,CAA8B;IAE5C;;;OAGG;IAEI,qBAAqB,CAAU;IAEtC;;OAEG;IAEI,WAAW,CAAU;IAE5B;;OAEG;IAEI,YAAY,CAAU;CAC7B,CAAA;AAhDO;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;;+CAC3C;AAMZ;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;;iEAC3B;AAQ9B;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACnC;AAOlB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;;kDACvB;AAOf;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;;oDACD;AAOrC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kEACP;AAM/B;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,CAAC,UAAU,EAAE,CAAC;;wDAC/D;AAMrB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;;yDACrB;AApDjB,mBAAmB;IAD/B,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;GACV,mBAAmB,CAqD/B","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { entity, property, SortDirection } from \"@twin.org/entity\";\n\n/**\n * Tenant-supplied Dataset shape persisted by the Control Plane.\n */\n@entity({ version: 1 })\nexport class DataspaceAppDataset {\n\t/**\n\t * The unique identifier for the dataset.\n\t */\n\t@property({ type: \"string\", isPrimary: true, maxLength: 255 })\n\tpublic id!: string;\n\n\t/**\n\t * The identity of the organization that owns this entity.\n\t */\n\t@property({ type: \"string\", maxLength: 255, isSecondary: true })\n\tpublic organizationIdentity!: string;\n\n\t/**\n\t * The tenant that owns this dataset, captured from the request context at\n\t * write time. Optional - single-tenant nodes (no `TWIN_TENANT_ENABLED`)\n\t * register datasets without a tenant context.\n\t */\n\t@property({ type: \"string\", maxLength: 32, optional: true })\n\tpublic tenantId?: string;\n\n\t/**\n\t * The dataspace app that this dataset belongs to. Matches the app's\n\t * registered name in `DataspaceAppFactory` (typically the app's URI).\n\t */\n\t@property({ type: \"string\", maxLength: 255 })\n\tpublic appId!: string;\n\n\t/**\n\t * The user-controlled JSON-LD dataset payload. Stored as an\n\t * opaque object and validated/populated at publish time.\n\t */\n\t@property({ type: \"object\", format: \"json\" })\n\tpublic dataset!: { [key: string]: unknown };\n\n\t/**\n\t * Idle window (ms) for this dataset's PULL transfers, overriding the node-level\n\t * providerTransferIdleTimeoutMs; 0 disables the idle policy for this dataset.\n\t */\n\t@property({ type: \"number\", optional: true })\n\tpublic transferIdleTimeoutMs?: number;\n\n\t/**\n\t * Creation timestamp (ISO string format).\n\t */\n\t@property({ type: \"string\", format: \"date-time\", sortDirection: SortDirection.Descending })\n\tpublic dateCreated!: string;\n\n\t/**\n\t * Last update timestamp (ISO string format).\n\t */\n\t@property({ type: \"string\", format: \"date-time\" })\n\tpublic dateModified!: string;\n}\n"]}
@@ -79,55 +79,55 @@ let TransferProcess = class TransferProcess {
79
79
  dataAddress;
80
80
  };
81
81
  __decorate([
82
- property({ type: "string", isPrimary: true }),
82
+ property({ type: "string", isPrimary: true, maxLength: 255 }),
83
83
  __metadata("design:type", String)
84
84
  ], TransferProcess.prototype, "id", void 0);
85
85
  __decorate([
86
- property({ type: "string", isSecondary: true }),
86
+ property({ type: "string", maxLength: 255, isSecondary: true }),
87
87
  __metadata("design:type", String)
88
88
  ], TransferProcess.prototype, "consumerPid", void 0);
89
89
  __decorate([
90
- property({ type: "string", isSecondary: true }),
90
+ property({ type: "string", maxLength: 255, isSecondary: true }),
91
91
  __metadata("design:type", String)
92
92
  ], TransferProcess.prototype, "providerPid", void 0);
93
93
  __decorate([
94
- property({ type: "string" }),
94
+ property({ type: "string", maxLength: 255 }),
95
95
  __metadata("design:type", String)
96
96
  ], TransferProcess.prototype, "agreementId", void 0);
97
97
  __decorate([
98
- property({ type: "string" }),
98
+ property({ type: "string", maxLength: 16 }),
99
99
  __metadata("design:type", String)
100
100
  ], TransferProcess.prototype, "state", void 0);
101
101
  __decorate([
102
- property({ type: "string" }),
102
+ property({ type: "string", maxLength: 255 }),
103
103
  __metadata("design:type", String)
104
104
  ], TransferProcess.prototype, "datasetId", void 0);
105
105
  __decorate([
106
- property({ type: "string" }),
106
+ property({ type: "string", maxLength: 255 }),
107
107
  __metadata("design:type", String)
108
108
  ], TransferProcess.prototype, "offerId", void 0);
109
109
  __decorate([
110
- property({ type: "string", optional: true }),
110
+ property({ type: "string", maxLength: 255, optional: true }),
111
111
  __metadata("design:type", String)
112
112
  ], TransferProcess.prototype, "consumerIdentity", void 0);
113
113
  __decorate([
114
- property({ type: "string", optional: true }),
114
+ property({ type: "string", maxLength: 255, optional: true }),
115
115
  __metadata("design:type", String)
116
116
  ], TransferProcess.prototype, "providerIdentity", void 0);
117
117
  __decorate([
118
- property({ type: "string", optional: true }),
118
+ property({ type: "string", maxLength: 128, optional: true }),
119
119
  __metadata("design:type", String)
120
120
  ], TransferProcess.prototype, "localRole", void 0);
121
121
  __decorate([
122
- property({ type: "string", optional: true }),
122
+ property({ type: "string", maxLength: 128, optional: true }),
123
123
  __metadata("design:type", String)
124
124
  ], TransferProcess.prototype, "format", void 0);
125
125
  __decorate([
126
- property({ type: "string", optional: true }),
126
+ property({ type: "string", format: "uri", optional: true }),
127
127
  __metadata("design:type", String)
128
128
  ], TransferProcess.prototype, "callbackAddress", void 0);
129
129
  __decorate([
130
- property({ type: "string" }),
130
+ property({ type: "string", maxLength: 255 }),
131
131
  __metadata("design:type", String)
132
132
  ], TransferProcess.prototype, "organizationIdentity", void 0);
133
133
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"transferProcess.js","sourceRoot":"","sources":["../../../src/entities/transferProcess.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAOnE;;;GAGG;AAEI,IAAM,eAAe,GAArB,MAAM,eAAe;IAC3B;;;OAGG;IAEI,EAAE,CAAU;IAEnB;;;OAGG;IAEI,WAAW,CAAU;IAE5B;;;OAGG;IAEI,WAAW,CAAU;IAE5B;;OAEG;IAEI,WAAW,CAAU;IAE5B;;;OAGG;IAEI,KAAK,CAA6C;IAEzD;;OAEG;IAEI,SAAS,CAAU;IAE1B;;OAEG;IAEI,OAAO,CAAU;IAExB;;OAEG;IAEI,gBAAgB,CAAU;IAEjC;;OAEG;IAEI,gBAAgB,CAAU;IAEjC;;;;OAIG;IAEI,SAAS,CAAuB;IAEvC;;OAEG;IAEI,MAAM,CAAU;IAEvB;;OAEG;IAEI,eAAe,CAAU;IAEhC;;OAEG;IAEI,oBAAoB,CAAU;IAErC;;OAEG;IAEI,WAAW,CAAU;IAE5B;;OAEG;IAEI,YAAY,CAAU;IAE7B;;;OAGG;IAEI,WAAW,CAAiC;CACnD,CAAA;AAjGO;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;2CAC3B;AAOZ;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;;oDACpB;AAOrB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;;oDACpB;AAMrB;IADN,QAAQ,CAAC,EAAE,I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3B","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { entity, property, SortDirection } from \"@twin.org/entity\";\nimport type {\n\tDataspaceProtocolTransferProcessStateType,\n\tIDataspaceProtocolDataAddress\n} from \"@twin.org/standards-dataspace-protocol\";\nimport type { TransferProcessRole } from \"../models/controlPlane/transferProcessRole.js\";\n\n/**\n * Transfer Process for shared storage between Control Plane and Data Plane.\n * This entity is the persistent representation of ITransferProcess.\n */\n@entity({ version: 1 })\nexport class TransferProcess {\n\t/**\n\t * Internal id, the primary key. Both role records of a self transfer share consumerPid and\n\t * providerPid, so only the internal id is collision-free within one partition.\n\t */\n\t@property({ type: \"string\", isPrimary: true })\n\tpublic id!: string;\n\n\t/**\n\t * Consumer Process ID from the DSP protocol.\n\t * Indexed for lookup by consumerPid.\n\t */\n\t@property({ type: \"string\", isSecondary: true })\n\tpublic consumerPid!: string;\n\n\t/**\n\t * Provider Process ID from the DSP protocol.\n\t * Indexed for lookup by providerPid.\n\t */\n\t@property({ type: \"string\", isSecondary: true })\n\tpublic providerPid!: string;\n\n\t/**\n\t * Agreement ID linking to the rights-management Agreement.\n\t */\n\t@property({ type: \"string\" })\n\tpublic agreementId!: string;\n\n\t/**\n\t * Transfer Process state from the DSP protocol.\n\t * One of: REQUESTED, STARTED, COMPLETED, SUSPENDED, TERMINATED.\n\t */\n\t@property({ type: \"string\" })\n\tpublic state!: DataspaceProtocolTransferProcessStateType;\n\n\t/**\n\t * Dataset ID for DSC resolution.\n\t */\n\t@property({ type: \"string\" })\n\tpublic datasetId!: string;\n\n\t/**\n\t * Offer ID from the original Catalog offer.\n\t */\n\t@property({ type: \"string\" })\n\tpublic offerId!: string;\n\n\t/**\n\t * Consumer identity (DID or URI).\n\t */\n\t@property({ type: \"string\", optional: true })\n\tpublic consumerIdentity?: string;\n\n\t/**\n\t * Provider identity (DID or URI).\n\t */\n\t@property({ type: \"string\", optional: true })\n\tpublic providerIdentity?: string;\n\n\t/**\n\t * This node's role in the transfer, captured at write time so state transitions and async delivery\n\t * can tell which party we are without inferring it from the matched PID (a self transfer stores two\n\t * records sharing both pids). Optional for back-compat with records written before this field existed.\n\t */\n\t@property({ type: \"string\", optional: true })\n\tpublic localRole?: TransferProcessRole;\n\n\t/**\n\t * Data format from the Dataset Distribution.\n\t */\n\t@property({ type: \"string\", optional: true })\n\tpublic format?: string;\n\n\t/**\n\t * Callback address for Consumer notifications.\n\t */\n\t@property({ type: \"string\", optional: true })\n\tpublic callbackAddress?: string;\n\n\t/**\n\t * The organization that owns this transfer process, captured from the request context at write time.\n\t */\n\t@property({ type: \"string\" })\n\tpublic organizationIdentity!: string;\n\n\t/**\n\t * Creation timestamp (ISO string format).\n\t */\n\t@property({ type: \"string\", format: \"date-time\", sortDirection: SortDirection.Descending })\n\tpublic dateCreated!: string;\n\n\t/**\n\t * Last update timestamp (ISO string format).\n\t */\n\t@property({ type: \"string\", format: \"date-time\" })\n\tpublic dateModified!: string;\n\n\t/**\n\t * Data address for the transfer (stored as JSON): the consumer's inbox for PUSH, or the\n\t * provider-built address persisted at start for PULL/POST; may expire while STARTED.\n\t */\n\t@property({ type: \"object\", format: \"json\", optional: true })\n\tpublic dataAddress?: IDataspaceProtocolDataAddress;\n}\n"]}
1
+ {"version":3,"file":"transferProcess.js","sourceRoot":"","sources":["../../../src/entities/transferProcess.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAOnE;;;GAGG;AAEI,IAAM,eAAe,GAArB,MAAM,eAAe;IAC3B;;;OAGG;IAEI,EAAE,CAAU;IAEnB;;;OAGG;IAEI,WAAW,CAAU;IAE5B;;;OAGG;IAEI,WAAW,CAAU;IAE5B;;OAEG;IAEI,WAAW,CAAU;IAE5B;;;OAGG;IAEI,KAAK,CAA6C;IAEzD;;OAEG;IAEI,SAAS,CAAU;IAE1B;;OAEG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AAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDAC5B;AAQ1B;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACtB;AAMhC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACtC;AAMhB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDAC5B;AAMzB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;;6DACR;AAM9B;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,CAAC,UAAU,EAAE,CAAC;;oDAC/D;AAMrB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;;qDACrB;AAOtB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACV;AAtGvC,eAAe;IAD3B,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;GACV,eAAe,CAuG3B","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { entity, property, SortDirection } from \"@twin.org/entity\";\nimport type {\n\tDataspaceProtocolTransferProcessStateType,\n\tIDataspaceProtocolDataAddress\n} from \"@twin.org/standards-dataspace-protocol\";\nimport type { TransferProcessRole } from \"../models/controlPlane/transferProcessRole.js\";\n\n/**\n * Transfer Process for shared storage between Control Plane and Data Plane.\n * This entity is the persistent representation of ITransferProcess.\n */\n@entity({ version: 1 })\nexport class TransferProcess {\n\t/**\n\t * Internal id, the primary key. Both role records of a self transfer share consumerPid and\n\t * providerPid, so only the internal id is collision-free within one partition.\n\t */\n\t@property({ type: \"string\", isPrimary: true, maxLength: 255 })\n\tpublic id!: string;\n\n\t/**\n\t * Consumer Process ID from the DSP protocol.\n\t * Indexed for lookup by consumerPid.\n\t */\n\t@property({ type: \"string\", maxLength: 255, isSecondary: true })\n\tpublic consumerPid!: string;\n\n\t/**\n\t * Provider Process ID from the DSP protocol.\n\t * Indexed for lookup by providerPid.\n\t */\n\t@property({ type: \"string\", maxLength: 255, isSecondary: true })\n\tpublic providerPid!: string;\n\n\t/**\n\t * Agreement ID linking to the rights-management Agreement.\n\t */\n\t@property({ type: \"string\", maxLength: 255 })\n\tpublic agreementId!: string;\n\n\t/**\n\t * Transfer Process state from the DSP protocol.\n\t * One of: REQUESTED, STARTED, COMPLETED, SUSPENDED, TERMINATED.\n\t */\n\t@property({ type: \"string\", maxLength: 16 })\n\tpublic state!: DataspaceProtocolTransferProcessStateType;\n\n\t/**\n\t * Dataset ID for DSC resolution.\n\t */\n\t@property({ type: \"string\", maxLength: 255 })\n\tpublic datasetId!: string;\n\n\t/**\n\t * Offer ID from the original Catalog offer.\n\t */\n\t@property({ type: \"string\", maxLength: 255 })\n\tpublic offerId!: string;\n\n\t/**\n\t * Consumer identity (DID or URI).\n\t */\n\t@property({ type: \"string\", maxLength: 255, optional: true })\n\tpublic consumerIdentity?: string;\n\n\t/**\n\t * Provider identity (DID or URI).\n\t */\n\t@property({ type: \"string\", maxLength: 255, optional: true })\n\tpublic providerIdentity?: string;\n\n\t/**\n\t * This node's role in the transfer, captured at write time so state transitions and async delivery\n\t * can tell which party we are without inferring it from the matched PID (a self transfer stores two\n\t * records sharing both pids). Optional for back-compat with records written before this field existed.\n\t */\n\t@property({ type: \"string\", maxLength: 128, optional: true })\n\tpublic localRole?: TransferProcessRole;\n\n\t/**\n\t * Data format from the Dataset Distribution.\n\t */\n\t@property({ type: \"string\", maxLength: 128, optional: true })\n\tpublic format?: string;\n\n\t/**\n\t * Callback address for Consumer notifications.\n\t */\n\t@property({ type: \"string\", format: \"uri\", optional: true })\n\tpublic callbackAddress?: string;\n\n\t/**\n\t * The organization that owns this transfer process, captured from the request context at write time.\n\t */\n\t@property({ type: \"string\", maxLength: 255 })\n\tpublic organizationIdentity!: string;\n\n\t/**\n\t * Creation timestamp (ISO string format).\n\t */\n\t@property({ type: \"string\", format: \"date-time\", sortDirection: SortDirection.Descending })\n\tpublic dateCreated!: string;\n\n\t/**\n\t * Last update timestamp (ISO string format).\n\t */\n\t@property({ type: \"string\", format: \"date-time\" })\n\tpublic dateModified!: string;\n\n\t/**\n\t * Data address for the transfer (stored as JSON): the consumer's inbox for PUSH, or the\n\t * provider-built address persisted at start for PULL/POST; may expire while STARTED.\n\t */\n\t@property({ type: \"object\", format: \"json\", optional: true })\n\tpublic dataAddress?: IDataspaceProtocolDataAddress;\n}\n"]}
@@ -20,7 +20,7 @@ let TransferRetrieval = class TransferRetrieval {
20
20
  dateLastRetrieved;
21
21
  };
22
22
  __decorate([
23
- property({ type: "string", isPrimary: true }),
23
+ property({ type: "string", isPrimary: true, maxLength: 255 }),
24
24
  __metadata("design:type", String)
25
25
  ], TransferRetrieval.prototype, "consumerPid", void 0);
26
26
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"transferRetrieval.js","sourceRoot":"","sources":["../../../src/entities/transferRetrieval.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;;GAGG;AAEI,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC7B;;OAEG;IAEI,WAAW,CAAU;IAE5B;;OAEG;IAEI,kBAAkB,CAAU;IAEnC;;OAEG;IAEI,iBAAiB,CAAU;CAClC,CAAA;AAbO;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;sDAClB;AAMrB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;;6DACf;AAM5B;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;;4DAChB;AAjBtB,iBAAiB;IAD7B,MAAM,EAAE;GACI,iBAAiB,CAkB7B","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { entity, property } from \"@twin.org/entity\";\n\n/**\n * Records the consumer's first successful retrieval for a transfer.\n * Written by the Data Plane, read by the Control Plane's one-shot policy sweep.\n */\n@entity()\nexport class TransferRetrieval {\n\t/**\n\t * The consumer PID of the transfer, primary key.\n\t */\n\t@property({ type: \"string\", isPrimary: true })\n\tpublic consumerPid!: string;\n\n\t/**\n\t * When the first successful retrieval happened (ISO string format).\n\t */\n\t@property({ type: \"string\", format: \"date-time\" })\n\tpublic dateFirstRetrieved!: string;\n\n\t/**\n\t * When the most recent successful retrieval happened (ISO string format).\n\t */\n\t@property({ type: \"string\", format: \"date-time\" })\n\tpublic dateLastRetrieved!: string;\n}\n"]}
1
+ {"version":3,"file":"transferRetrieval.js","sourceRoot":"","sources":["../../../src/entities/transferRetrieval.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;;GAGG;AAEI,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC7B;;OAEG;IAEI,WAAW,CAAU;IAE5B;;OAEG;IAEI,kBAAkB,CAAU;IAEnC;;OAEG;IAEI,iBAAiB,CAAU;CAClC,CAAA;AAbO;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;;sDAClC;AAMrB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;;6DACf;AAM5B;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;;4DAChB;AAjBtB,iBAAiB;IAD7B,MAAM,EAAE;GACI,iBAAiB,CAkB7B","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { entity, property } from \"@twin.org/entity\";\n\n/**\n * Records the consumer's first successful retrieval for a transfer.\n * Written by the Data Plane, read by the Control Plane's one-shot policy sweep.\n */\n@entity()\nexport class TransferRetrieval {\n\t/**\n\t * The consumer PID of the transfer, primary key.\n\t */\n\t@property({ type: \"string\", isPrimary: true, maxLength: 255 })\n\tpublic consumerPid!: string;\n\n\t/**\n\t * When the first successful retrieval happened (ISO string format).\n\t */\n\t@property({ type: \"string\", format: \"date-time\" })\n\tpublic dateFirstRetrieved!: string;\n\n\t/**\n\t * When the most recent successful retrieval happened (ISO string format).\n\t */\n\t@property({ type: \"string\", format: \"date-time\" })\n\tpublic dateLastRetrieved!: string;\n}\n"]}
package/docs/changelog.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.10.1-next.2](https://github.com/iotaledger/twin-dataspace/compare/dataspace-models-v0.10.1-next.1...dataspace-models-v0.10.1-next.2) (2026-09-18)
4
+
5
+
6
+ ### Features
7
+
8
+ * improve entity schemas ([#384](https://github.com/iotaledger/twin-dataspace/issues/384)) ([2ee1cd6](https://github.com/iotaledger/twin-dataspace/commit/2ee1cd65c0017d665c895449d8c3136c8726664a))
9
+
3
10
  ## [0.10.1-next.1](https://github.com/iotaledger/twin-dataspace/compare/dataspace-models-v0.10.1-next.0...dataspace-models-v0.10.1-next.1) (2026-09-17)
4
11
 
5
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/dataspace-models",
3
- "version": "0.10.1-next.1",
3
+ "version": "0.10.1-next.2",
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",