From e5ca606e3cfe4b3f6f8cf360edfb25ab48f2f6c2 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Thu, 19 Dec 2024 18:26:24 +0100 Subject: [PATCH] feat(demodata): Add demo data feature for contracts --- changelog.md | 7 ++++++ package.json | 3 ++- ts/00_commitinfo_data.ts | 2 +- ts/tspublish.json | 3 +++ ts_demodata/democontract.ts | 49 ++++++++++++++++++++++++++++++++++++ ts_demodata/index.ts | 1 + ts_demodata/plugins.ts | 5 ++++ ts_demodata/tspublish.json | 3 +++ ts_interfaces/tspublish.json | 3 +++ 9 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 ts/tspublish.json create mode 100644 ts_demodata/democontract.ts create mode 100644 ts_demodata/index.ts create mode 100644 ts_demodata/plugins.ts create mode 100644 ts_demodata/tspublish.json create mode 100644 ts_interfaces/tspublish.json diff --git a/changelog.md b/changelog.md index 2a5633a..109849c 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,12 @@ # Changelog +## 2024-12-19 - 1.1.0 - feat(demodata) +Add demo data feature for contracts + +- Introduced demo contract data for Minijob Employment Contract outlining details for employer and employee roles. +- Enhanced package.json with new export entry for demodata. +- Implemented new ts_demodata directory with sample contract representation. + ## 2024-12-19 - 1.0.11 - fix(interfaces) Fixed import path in ts_interfaces/index.ts diff --git a/package.json b/package.json index f91e482..4689f57 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "description": "A TypeScript package providing utilities for managing digital contracts with modular interfaces and business context integration.", "exports": { ".": "./ts/index.js", - "./interfaces": "./dist_ts_interfaces/index.js" + "./interfaces": "./dist_ts_interfaces/index.js", + "./demodata": "./dist_ts_demodata/index.js" }, "type": "module", "author": "Task Venture Capital GmbH", diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 0a82a03..eaaf216 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@signature.digital/tools', - version: '1.0.11', + version: '1.1.0', description: 'A TypeScript package providing utilities for managing digital contracts with modular interfaces and business context integration.' } diff --git a/ts/tspublish.json b/ts/tspublish.json new file mode 100644 index 0000000..18e67c6 --- /dev/null +++ b/ts/tspublish.json @@ -0,0 +1,3 @@ +{ + "order": 2 +} \ No newline at end of file diff --git a/ts_demodata/democontract.ts b/ts_demodata/democontract.ts new file mode 100644 index 0000000..1d8b286 --- /dev/null +++ b/ts_demodata/democontract.ts @@ -0,0 +1,49 @@ +import * as plugins from './plugins.js'; + +export const demoContract: plugins.interfaces.IPortableContract = { + "title": "Minijob Employment Contract", + "context": "This contract is for a Minijob position under German law.", + "availableRoles": [ + { + "id": "employer", + "name": "Employer", + "description": "The party offering the Minijob position." + }, + { + "id": "employee", + "name": "Employee", + "description": "The party accepting the Minijob position." + } + ], + "involvedParties": [ + { + "role": "employer", + "contact": null + }, + { + "role": "employee", + "contact": null + } + ], + "priorContracts": [], + "paragraphs": [ + { + "uniqueId": "1", + "parent": null, + "title": "Introduction", + "content": "This contract outlines the terms of employment for a Minijob position between [Employer Name] and [Employee Name]." + }, + { + "uniqueId": "2", + "parent": null, + "title": "Scope of Work", + "content": "The employee will perform the following duties: [List of Duties]." + }, + { + "uniqueId": "3", + "parent": null, + "title": "Compensation", + "content": "The employee will be compensated with a monthly salary of [Salary Amount], in accordance with Minijob regulations." + } + ] +}; \ No newline at end of file diff --git a/ts_demodata/index.ts b/ts_demodata/index.ts new file mode 100644 index 0000000..b6274cf --- /dev/null +++ b/ts_demodata/index.ts @@ -0,0 +1 @@ +export * from './democontract.js'; \ No newline at end of file diff --git a/ts_demodata/plugins.ts b/ts_demodata/plugins.ts new file mode 100644 index 0000000..a73c0ed --- /dev/null +++ b/ts_demodata/plugins.ts @@ -0,0 +1,5 @@ +import * as interfaces from '../dist_ts_interfaces/index.js'; + +export { + interfaces, +} \ No newline at end of file diff --git a/ts_demodata/tspublish.json b/ts_demodata/tspublish.json new file mode 100644 index 0000000..0133f4d --- /dev/null +++ b/ts_demodata/tspublish.json @@ -0,0 +1,3 @@ +{ + "order": 3 +} \ No newline at end of file diff --git a/ts_interfaces/tspublish.json b/ts_interfaces/tspublish.json new file mode 100644 index 0000000..5a46852 --- /dev/null +++ b/ts_interfaces/tspublish.json @@ -0,0 +1,3 @@ +{ + "order": 1 +} \ No newline at end of file