/** * @file democontract.ts * @description Demo contract showcasing the comprehensive contract interface * A Minijob Employment Contract under German law */ import * as plugins from './plugins.js'; /** * Demo Minijob Employment Contract * Demonstrates all major features of the IPortableContract interface */ export const demoContract: plugins.interfaces.IPortableContract = { // ============================================================================ // CORE IDENTITY // ============================================================================ id: '550e8400-e29b-41d4-a716-446655440000', title: 'Minijob Employment Contract', context: 'Employment agreement for a Minijob (geringfügige Beschäftigung) position under German law, subject to § 8 SGB IV regulations.', // ============================================================================ // METADATA // ============================================================================ metadata: { contractNumber: 'EMP-2024-001', category: 'employment', contractType: 'employment_minijob', language: 'de', additionalLanguages: ['en'], bindingLanguage: 'de', governingLaw: { country: 'DE', applicableLaws: ['BGB', 'TzBfG', 'MiLoG', 'ArbZG', 'SGB IV § 8'], disputeJurisdiction: 'Arbeitsgericht Bremen', disputeResolution: 'litigation', }, tags: ['minijob', 'part-time', 'german-law'], relatedContractIds: [], confidentialityLevel: 'confidential', customFields: { department: 'Operations', costCenter: 'CC-100', }, }, // ============================================================================ // ROLES // ============================================================================ availableRoles: [ { id: 'employer', name: 'Arbeitgeber', description: 'The party offering the Minijob position.', category: 'party', signatureRequired: true, defaultSigningOrder: 1, legalCapacity: 'representative', notifyOnChanges: true, notifyOnComments: true, displayColor: '#1a73e8', minParties: 1, maxParties: 1, }, { id: 'employee', name: 'Arbeitnehmer', description: 'The party accepting the Minijob position.', category: 'party', signatureRequired: true, defaultSigningOrder: 2, legalCapacity: 'individual', notifyOnChanges: true, notifyOnComments: true, displayColor: '#34a853', minParties: 1, maxParties: 1, }, ], // ============================================================================ // INVOLVED PARTIES // ============================================================================ involvedParties: [ { partyId: 'party-employer-001', roleId: 'employer', contact: { type: 'company', name: 'Demo GmbH', description: 'A demonstration company for contract examples', address: { streetName: 'Musterstraße', houseNumber: '123', postalCode: '28195', city: 'Bremen', country: 'Germany', }, status: 'active', registrationDetails: { vatId: 'DE123456789', registrationId: 'HRB 12345', registrationName: 'Handelsregister Bremen', }, }, partyRole: 'signer', signingOrder: 1, signingDependency: 'none', dependsOnParties: [], signature: { status: 'pending', }, actingAsProxy: true, legalProxy: { type: 'company_representative', representedEntity: { type: 'company', name: 'Demo GmbH', description: 'A demonstration company', address: { streetName: 'Musterstraße', houseNumber: '123', postalCode: '28195', city: 'Bremen', country: 'Germany', }, status: 'active', registrationDetails: { vatId: 'DE123456789', registrationId: 'HRB 12345', registrationName: 'Handelsregister Bremen', }, }, position: 'Geschäftsführer', authorityScope: 'Full authority to enter into employment contracts', }, deliveryEmail: 'hr@demo-gmbh.example', preferredLanguage: 'de', remindersSent: 0, totalViews: 0, metadata: {}, }, { partyId: 'party-employee-001', roleId: 'employee', contact: { type: 'person', name: 'Max', surname: 'Mustermann', salutation: 'Mr', sex: 'male', description: 'Employee', address: { streetName: 'Beispielweg', houseNumber: '42', postalCode: '28199', city: 'Bremen', country: 'Germany', }, email: 'max.mustermann@example.com', phone: '+49 421 1234567', }, partyRole: 'signer', signingOrder: 2, signingDependency: 'sequential', dependsOnParties: ['party-employer-001'], signature: { status: 'pending', }, actingAsProxy: false, deliveryEmail: 'max.mustermann@example.com', preferredLanguage: 'de', remindersSent: 0, totalViews: 0, metadata: {}, }, ], // ============================================================================ // PARAGRAPHS // ============================================================================ paragraphs: [ { uniqueId: 'para-preamble', parentId: null, title: 'Vertragsparteien', content: 'Zwischen\n\n**{{employer_name}}**\n{{employer_address}}\nvertreten durch {{employer_representative}}\n\n– nachfolgend „Arbeitgeber" genannt –\n\nund\n\n**{{employee_name}}**\n{{employee_address}}\n\n– nachfolgend „Arbeitnehmer" genannt –\n\nwird folgender Arbeitsvertrag für eine geringfügig entlohnte Beschäftigung (Minijob) geschlossen:', sectionType: 'preamble', numbering: undefined, order: 0, depth: 0, required: true, isEditable: false, variables: [ { variableId: 'employer_name', name: 'Employer Name', type: 'party_name', required: true, source: { type: 'party_field', path: 'involvedParties[0].contact.name' } }, { variableId: 'employer_address', name: 'Employer Address', type: 'party_address', required: true, source: { type: 'party_field', path: 'involvedParties[0].contact.address' } }, { variableId: 'employer_representative', name: 'Employer Representative', type: 'text', required: true }, { variableId: 'employee_name', name: 'Employee Name', type: 'party_name', required: true, source: { type: 'party_field', path: 'involvedParties[1].contact.name' } }, { variableId: 'employee_address', name: 'Employee Address', type: 'party_address', required: true, source: { type: 'party_field', path: 'involvedParties[1].contact.address' } }, ], conditions: [], legalReferences: [], translations: { en: { title: 'Contracting Parties', content: 'Between\n\n**{{employer_name}}**\n{{employer_address}}\nrepresented by {{employer_representative}}\n\n– hereinafter referred to as "Employer" –\n\nand\n\n**{{employee_name}}**\n{{employee_address}}\n\n– hereinafter referred to as "Employee" –\n\nthe following employment contract for marginal employment (Minijob) is concluded:', }, }, crossReferences: [], attachmentReferences: [], jurisdictions: ['DE'], tags: [], aiGenerated: false, }, { uniqueId: 'para-1', parentId: null, title: '§ 1 Beginn und Dauer des Arbeitsverhältnisses', content: '(1) Das Arbeitsverhältnis beginnt am {{start_date}}.\n\n(2) Das Arbeitsverhältnis wird auf unbestimmte Zeit geschlossen.\n\n(3) Die ersten {{probation_months}} Monate gelten als Probezeit, während der das Arbeitsverhältnis von beiden Seiten mit einer Frist von zwei Wochen gekündigt werden kann.', sectionType: 'clause', numbering: '1', order: 1, depth: 0, required: true, isEditable: true, variables: [ { variableId: 'start_date', name: 'Start Date', type: 'date', required: true, format: { dateFormat: 'DD.MM.YYYY' } }, { variableId: 'probation_months', name: 'Probation Period (Months)', type: 'number', required: true, defaultValue: 6, validation: { min: 0, max: 6 } }, ], conditions: [], legalReferences: [ { type: 'statute', citation: '§ 622 BGB', jurisdiction: 'DE' }, ], translations: { en: { title: '§ 1 Commencement and Duration of Employment', content: '(1) The employment relationship begins on {{start_date}}.\n\n(2) The employment relationship is concluded for an indefinite period.\n\n(3) The first {{probation_months}} months are considered a probationary period, during which either party may terminate the employment with two weeks\' notice.', }, }, crossReferences: [], attachmentReferences: [], jurisdictions: ['DE'], tags: ['duration', 'probation'], aiGenerated: false, }, { uniqueId: 'para-2', parentId: null, title: '§ 2 Tätigkeit und Arbeitsort', content: '(1) Der Arbeitnehmer wird als {{job_title}} eingestellt.\n\n(2) Der Arbeitsort ist {{work_location}}.\n\n(3) Der Arbeitgeber ist berechtigt, dem Arbeitnehmer im Rahmen des Direktionsrechts auch andere zumutbare Tätigkeiten zuzuweisen.', sectionType: 'clause', numbering: '2', order: 2, depth: 0, required: true, isEditable: true, variables: [ { variableId: 'job_title', name: 'Job Title', type: 'text', required: true }, { variableId: 'work_location', name: 'Work Location', type: 'text', required: true }, ], conditions: [], legalReferences: [], translations: { en: { title: '§ 2 Duties and Place of Work', content: '(1) The employee is employed as {{job_title}}.\n\n(2) The place of work is {{work_location}}.\n\n(3) The employer is entitled to assign other reasonable duties to the employee within the scope of the right of direction.', }, }, crossReferences: [], attachmentReferences: [], jurisdictions: ['DE'], tags: ['duties', 'location'], aiGenerated: false, }, { uniqueId: 'para-3', parentId: null, title: '§ 3 Arbeitszeit', content: '(1) Die regelmäßige wöchentliche Arbeitszeit beträgt {{weekly_hours}} Stunden.\n\n(2) Die Verteilung der Arbeitszeit wird vom Arbeitgeber nach billigem Ermessen festgelegt.\n\n(3) Der Arbeitnehmer verpflichtet sich, auf Anordnung des Arbeitgebers Mehrarbeit zu leisten, soweit dies gesetzlich zulässig ist.', sectionType: 'clause', numbering: '3', order: 3, depth: 0, required: true, isEditable: true, variables: [ { variableId: 'weekly_hours', name: 'Weekly Hours', type: 'number', required: true, defaultValue: 10, validation: { min: 1, max: 20 } }, ], conditions: [], legalReferences: [ { type: 'statute', citation: 'ArbZG', jurisdiction: 'DE' }, ], translations: { en: { title: '§ 3 Working Hours', content: '(1) The regular weekly working time is {{weekly_hours}} hours.\n\n(2) The distribution of working time is determined by the employer at their reasonable discretion.\n\n(3) The employee undertakes to work overtime upon instruction by the employer, insofar as this is legally permissible.', }, }, crossReferences: [], attachmentReferences: [], jurisdictions: ['DE'], tags: ['working-hours'], aiGenerated: false, }, { uniqueId: 'para-4', parentId: null, title: '§ 4 Vergütung', content: '(1) Der Arbeitnehmer erhält eine monatliche Bruttovergütung von {{monthly_salary}} EUR.\n\n(2) Die Vergütung wird jeweils zum Monatsende auf das vom Arbeitnehmer angegebene Konto überwiesen.\n\n(3) Die Vergütung bleibt im Rahmen der Minijob-Verdienstgrenze (§ 8 SGB IV).', sectionType: 'clause', numbering: '4', order: 4, depth: 0, required: true, isEditable: true, variables: [ { variableId: 'monthly_salary', name: 'Monthly Salary (EUR)', type: 'currency', required: true, defaultValue: 520, validation: { max: 538 } }, ], conditions: [], legalReferences: [ { type: 'statute', citation: '§ 8 SGB IV', jurisdiction: 'DE' }, { type: 'statute', citation: 'MiLoG', jurisdiction: 'DE' }, ], translations: { en: { title: '§ 4 Compensation', content: '(1) The employee receives a gross monthly compensation of {{monthly_salary}} EUR.\n\n(2) The compensation is transferred to the account specified by the employee at the end of each month.\n\n(3) The compensation remains within the Minijob earnings limit (§ 8 SGB IV).', }, }, crossReferences: [], attachmentReferences: [], jurisdictions: ['DE'], tags: ['compensation', 'salary'], aiGenerated: false, }, { uniqueId: 'para-5', parentId: null, title: '§ 5 Urlaub', content: '(1) Der Arbeitnehmer hat Anspruch auf bezahlten Erholungsurlaub entsprechend der gesetzlichen Bestimmungen.\n\n(2) Bei einer {{work_days_per_week}}-Tage-Woche beträgt der Jahresurlaubsanspruch {{vacation_days}} Arbeitstage.', sectionType: 'clause', numbering: '5', order: 5, depth: 0, required: true, isEditable: true, variables: [ { variableId: 'work_days_per_week', name: 'Work Days per Week', type: 'number', required: true, defaultValue: 2 }, { variableId: 'vacation_days', name: 'Vacation Days per Year', type: 'number', required: true, source: { type: 'calculated', formula: 'Math.ceil(work_days_per_week * 4)' } }, ], conditions: [], legalReferences: [ { type: 'statute', citation: 'BUrlG', jurisdiction: 'DE' }, ], translations: { en: { title: '§ 5 Vacation', content: '(1) The employee is entitled to paid vacation in accordance with statutory provisions.\n\n(2) For a {{work_days_per_week}}-day work week, the annual vacation entitlement is {{vacation_days}} working days.', }, }, crossReferences: [], attachmentReferences: [], jurisdictions: ['DE'], tags: ['vacation', 'leave'], aiGenerated: false, }, { uniqueId: 'para-6', parentId: null, title: '§ 6 Kündigung', content: '(1) Nach Ablauf der Probezeit kann das Arbeitsverhältnis mit einer Frist von vier Wochen zum Fünfzehnten oder zum Ende eines Kalendermonats gekündigt werden.\n\n(2) Die Kündigung bedarf der Schriftform.', sectionType: 'clause', numbering: '6', order: 6, depth: 0, required: true, isEditable: true, variables: [], conditions: [], legalReferences: [ { type: 'statute', citation: '§ 622 BGB', jurisdiction: 'DE' }, ], translations: { en: { title: '§ 6 Termination', content: '(1) After the probationary period, the employment relationship may be terminated with four weeks\' notice to the 15th or the end of a calendar month.\n\n(2) Termination must be in writing.', }, }, crossReferences: ['para-1'], attachmentReferences: [], jurisdictions: ['DE'], tags: ['termination', 'notice'], aiGenerated: false, }, { uniqueId: 'para-signature', parentId: null, title: 'Unterschriften', content: 'Mit ihrer Unterschrift bestätigen die Parteien, dass sie diesen Vertrag gelesen und verstanden haben und sich an dessen Bedingungen gebunden fühlen.\n\n{{signature_location}}, den {{signature_date}}', sectionType: 'signature_block', order: 7, depth: 0, required: true, isEditable: false, variables: [ { variableId: 'signature_location', name: 'Signature Location', type: 'text', required: true, defaultValue: 'Bremen' }, { variableId: 'signature_date', name: 'Signature Date', type: 'date', required: true, source: { type: 'manual' } }, ], conditions: [], legalReferences: [], translations: { en: { title: 'Signatures', content: 'By signing, the parties confirm that they have read and understood this contract and agree to be bound by its terms.\n\n{{signature_location}}, {{signature_date}}', }, }, crossReferences: [], attachmentReferences: [], jurisdictions: ['DE'], tags: ['signatures'], aiGenerated: false, }, ], // ============================================================================ // VARIABLES (Global) // ============================================================================ variables: [], // ============================================================================ // SIGNATURE FIELDS // ============================================================================ signatureFields: [], // ============================================================================ // FINANCIAL TERMS // ============================================================================ financialTerms: { totalValue: { amount: 520, currency: 'EUR', includesTax: false, }, paymentSchedule: [ { paymentId: 'salary-monthly', description: 'Monthly Salary', amount: { amount: 520, currency: 'EUR', includesTax: false }, dueDate: 0, frequency: 'monthly', isFinalPayment: false, status: 'pending', }, ], paymentMethods: ['bank_transfer'], paymentDueDays: 0, depositRefundable: false, billingRates: [], interestRates: {}, penalties: [], }, // ============================================================================ // TIME TERMS // ============================================================================ timeTerms: { isIndefinite: true, commencementConditions: ['Signed by both parties'], milestones: [], deadlines: [], noticePeriods: { termination: { duration: { value: 4, unit: 'weeks' }, effectivePoint: 'end_of_month', form: 'written', }, }, keyDates: [], }, // ============================================================================ // OBLIGATION TERMS // ============================================================================ obligationTerms: { deliverables: [], serviceLevels: [], quantities: [], obligations: [ { obligationId: 'work-performance', type: 'performance', description: 'Employee shall perform duties as assigned by employer', obligorPartyId: 'party-employee-001', beneficiaryPartyId: 'party-employer-001', recurring: true, priority: 'high', status: 'pending', }, { obligationId: 'salary-payment', type: 'payment', description: 'Employer shall pay monthly salary', obligorPartyId: 'party-employer-001', beneficiaryPartyId: 'party-employee-001', recurring: true, frequency: 'monthly', priority: 'high', status: 'pending', }, ], warranties: [], representations: [], insuranceRequirements: [], complianceRequirements: ['Minijob regulations (§ 8 SGB IV)', 'Minimum wage (MiLoG)'], }, // ============================================================================ // DOCUMENTS // ============================================================================ priorContracts: [], attachments: [], // ============================================================================ // VERSIONING // ============================================================================ versionHistory: { contractId: '550e8400-e29b-41d4-a716-446655440000', currentVersionId: 'version-001', currentVersion: { major: 1, minor: 0, patch: 0 }, versions: [ { id: 'version-001', version: { major: 1, minor: 0, patch: 0 }, versionString: '1.0.0', type: 'draft', createdAt: Date.now(), createdBy: 'system', createdByDisplayName: 'System', changes: [], contentHash: '', tags: ['initial'], isAmendment: false, }, ], branches: [ { id: 'branch-main', name: 'main', createdAt: Date.now(), createdBy: 'system', baseVersionId: 'version-001', headVersionId: 'version-001', status: 'active', }, ], mainBranchId: 'branch-main', publishedVersions: [], amendmentVersions: [], }, // ============================================================================ // COLLABORATION // ============================================================================ collaborators: [], commentThreads: [], suggestions: [], // ============================================================================ // LIFECYCLE // ============================================================================ lifecycle: { contractId: '550e8400-e29b-41d4-a716-446655440000', currentStatus: 'draft', statusHistory: [], createdAt: Date.now(), }, // ============================================================================ // AUDIT LOG // ============================================================================ auditLog: { contractId: '550e8400-e29b-41d4-a716-446655440000', actions: [], genesisHash: 'genesis-hash-placeholder', currentHash: 'genesis-hash-placeholder', chainLength: 0, statistics: { totalActions: 0, actionsByCategory: {} as Record, uniqueUsers: [], dateRange: { earliest: 0, latest: 0 }, }, }, // ============================================================================ // TIMESTAMPS // ============================================================================ createdAt: Date.now(), createdBy: 'system', updatedAt: Date.now(), // ============================================================================ // ORGANIZATION // ============================================================================ visibility: 'private', // ============================================================================ // INTEGRATIONS // ============================================================================ integrations: { customIntegrations: {}, }, };