@broberg/legal 0.7.0 → 0.8.1
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 +33 -1
- package/dist/index.cjs +357 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -6
- package/dist/index.d.ts +30 -6
- package/dist/index.js +357 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/** The
|
|
2
|
-
type DocId = "terms" | "privacy" | "trust" | "dpa" | "support";
|
|
1
|
+
/** The documents (components F110). "modules" (F110.17) applies only to a platform with third-party modules. */
|
|
2
|
+
type DocId = "terms" | "privacy" | "trust" | "dpa" | "support" | "modules";
|
|
3
3
|
declare const DOC_IDS: readonly DocId[];
|
|
4
4
|
/** Danish is the master and prevails (owner, 31 Oct 2026: «Danish wins we are a danish company»). */
|
|
5
5
|
type Locale = "da" | "en";
|
|
@@ -78,8 +78,31 @@ interface ProductFacts {
|
|
|
78
78
|
conversationAnalysis: boolean;
|
|
79
79
|
/** Health data (art. 9) — only part 1–3 analysis without explicit consent. */
|
|
80
80
|
healthData: boolean;
|
|
81
|
+
/** F110.17 — only a platform with third-party modules (an App Store) sets this; the "modules" document needs it. */
|
|
82
|
+
modules?: ModuleTermsFacts;
|
|
81
83
|
}
|
|
82
|
-
|
|
84
|
+
/** The numbers and channels in the module-owner terms. The PRODUCT decides them; the text never contains them. */
|
|
85
|
+
interface ModuleTermsFacts {
|
|
86
|
+
/** Who gets what of a module's price. Must add up to 100. e.g. [{ party: "platformen", percent: 30 }, { party: "modulejeren", percent: 70 }] */
|
|
87
|
+
revenueShare: {
|
|
88
|
+
party: string;
|
|
89
|
+
percent: number;
|
|
90
|
+
}[];
|
|
91
|
+
/** The fixed operations surcharge, in the product's own words (e.g. "mindst DKK 25,00 pr. app pr. klinik pr. måned"). */
|
|
92
|
+
operationsFee: string;
|
|
93
|
+
paymentProvider: string;
|
|
94
|
+
/** e.g. "månedligt" / "monthly" */
|
|
95
|
+
payoutCadence: string;
|
|
96
|
+
guidelinesNoticeDays: number;
|
|
97
|
+
warningDeadlineDays: number;
|
|
98
|
+
guidelinesUrl: string;
|
|
99
|
+
/** Where a module owner complains (an address or a page). */
|
|
100
|
+
complaints: string;
|
|
101
|
+
/** e.g. "3 hverdage" / "3 working days" */
|
|
102
|
+
complaintsResponse: string;
|
|
103
|
+
exportDays: number;
|
|
104
|
+
}
|
|
105
|
+
type FactKey = "hosting" | "dataCategories" | "subprocessors" | "conversationAnalysis" | "moduleTerms";
|
|
83
106
|
/** The merge fields Contract Manager fills (contract-manager #5608, 31 Oct 2026). */
|
|
84
107
|
declare const PLACEHOLDERS: readonly ["customer.name", "customer.altName", "customer.cvr", "customer.companyForm", "customer.address", "customer.contact.name", "customer.contact.email", "customer.contact.phone", "provider.name", "provider.cvr", "provider.address", "provider.contact.name", "provider.contact.email", "contract.id", "contract.title", "contract.version", "contract.date", "contract.startDate"];
|
|
85
108
|
type Placeholder = (typeof PLACEHOLDERS)[number];
|
|
@@ -138,6 +161,7 @@ declare function createLibrary(sources: DocumentSource[], products: ProductFacts
|
|
|
138
161
|
doc: DocId;
|
|
139
162
|
locale: Locale;
|
|
140
163
|
product: string;
|
|
164
|
+
stale?: boolean;
|
|
141
165
|
}) => LegalDocument;
|
|
142
166
|
products: () => string[];
|
|
143
167
|
sources: () => DocumentSource[];
|
|
@@ -195,7 +219,7 @@ declare function createLegalCache(opts: LegalCacheOptions): {
|
|
|
195
219
|
*/
|
|
196
220
|
/** The one place BID's address lives in this package. */
|
|
197
221
|
declare const BID_URL = "https://id.broberg.ai";
|
|
198
|
-
type AcceptedDoc = "terms" | "dpa";
|
|
222
|
+
type AcceptedDoc = "terms" | "dpa" | "modules";
|
|
199
223
|
interface AcceptanceRecord {
|
|
200
224
|
sub: string;
|
|
201
225
|
product: string;
|
|
@@ -293,6 +317,6 @@ declare function getDocument(opts: {
|
|
|
293
317
|
facts: ProductFacts;
|
|
294
318
|
}): LegalDocument;
|
|
295
319
|
/** A finished document from a template you fetched from the API + your own facts. */
|
|
296
|
-
declare function resolveTemplate(template: DocumentSource, facts: ProductFacts): LegalDocument;
|
|
320
|
+
declare function resolveTemplate(template: DocumentSource | LegalTemplate, facts: ProductFacts): LegalDocument;
|
|
297
321
|
|
|
298
|
-
export { type AcceptanceRecord, type AcceptedDoc, BID_URL, type BidCallOptions, BidConsentError, type Block, type ConsentRecord, DEFAULT_REFRESH_MS, DOC_IDS, type DocId, type DocumentSource, EXAMPLE_FACTS, type FactKey, LEGAL_API_URL, type LegalCacheOptions, type LegalDocument, type LegalTemplate, type Locale, MASTER_LOCALE, PLACEHOLDERS, type Placeholder, type ProductFacts, type ResolvedBlock, type ResolvedSection, SOURCES, type Section, canonicalJson, createLegalCache, createLibrary, getAcceptance, getConsent, getDocument, getTemplate, listDocuments, needsReaccept, parityProblems, placeholdersIn, recordAcceptance, recordConsent, renderHtml, resolveTemplate, sha256Hex, sourceHash, templateHash, toBidHash, verifyTemplate };
|
|
322
|
+
export { type AcceptanceRecord, type AcceptedDoc, BID_URL, type BidCallOptions, BidConsentError, type Block, type ConsentRecord, DEFAULT_REFRESH_MS, DOC_IDS, type DocId, type DocumentSource, EXAMPLE_FACTS, type FactKey, LEGAL_API_URL, type LegalCacheOptions, type LegalDocument, type LegalTemplate, type Locale, MASTER_LOCALE, type ModuleTermsFacts, PLACEHOLDERS, type Placeholder, type ProductFacts, type ResolvedBlock, type ResolvedSection, SOURCES, type Section, canonicalJson, createLegalCache, createLibrary, getAcceptance, getConsent, getDocument, getTemplate, listDocuments, needsReaccept, parityProblems, placeholdersIn, recordAcceptance, recordConsent, renderHtml, resolveTemplate, sha256Hex, sourceHash, templateHash, toBidHash, verifyTemplate };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/** The
|
|
2
|
-
type DocId = "terms" | "privacy" | "trust" | "dpa" | "support";
|
|
1
|
+
/** The documents (components F110). "modules" (F110.17) applies only to a platform with third-party modules. */
|
|
2
|
+
type DocId = "terms" | "privacy" | "trust" | "dpa" | "support" | "modules";
|
|
3
3
|
declare const DOC_IDS: readonly DocId[];
|
|
4
4
|
/** Danish is the master and prevails (owner, 31 Oct 2026: «Danish wins we are a danish company»). */
|
|
5
5
|
type Locale = "da" | "en";
|
|
@@ -78,8 +78,31 @@ interface ProductFacts {
|
|
|
78
78
|
conversationAnalysis: boolean;
|
|
79
79
|
/** Health data (art. 9) — only part 1–3 analysis without explicit consent. */
|
|
80
80
|
healthData: boolean;
|
|
81
|
+
/** F110.17 — only a platform with third-party modules (an App Store) sets this; the "modules" document needs it. */
|
|
82
|
+
modules?: ModuleTermsFacts;
|
|
81
83
|
}
|
|
82
|
-
|
|
84
|
+
/** The numbers and channels in the module-owner terms. The PRODUCT decides them; the text never contains them. */
|
|
85
|
+
interface ModuleTermsFacts {
|
|
86
|
+
/** Who gets what of a module's price. Must add up to 100. e.g. [{ party: "platformen", percent: 30 }, { party: "modulejeren", percent: 70 }] */
|
|
87
|
+
revenueShare: {
|
|
88
|
+
party: string;
|
|
89
|
+
percent: number;
|
|
90
|
+
}[];
|
|
91
|
+
/** The fixed operations surcharge, in the product's own words (e.g. "mindst DKK 25,00 pr. app pr. klinik pr. måned"). */
|
|
92
|
+
operationsFee: string;
|
|
93
|
+
paymentProvider: string;
|
|
94
|
+
/** e.g. "månedligt" / "monthly" */
|
|
95
|
+
payoutCadence: string;
|
|
96
|
+
guidelinesNoticeDays: number;
|
|
97
|
+
warningDeadlineDays: number;
|
|
98
|
+
guidelinesUrl: string;
|
|
99
|
+
/** Where a module owner complains (an address or a page). */
|
|
100
|
+
complaints: string;
|
|
101
|
+
/** e.g. "3 hverdage" / "3 working days" */
|
|
102
|
+
complaintsResponse: string;
|
|
103
|
+
exportDays: number;
|
|
104
|
+
}
|
|
105
|
+
type FactKey = "hosting" | "dataCategories" | "subprocessors" | "conversationAnalysis" | "moduleTerms";
|
|
83
106
|
/** The merge fields Contract Manager fills (contract-manager #5608, 31 Oct 2026). */
|
|
84
107
|
declare const PLACEHOLDERS: readonly ["customer.name", "customer.altName", "customer.cvr", "customer.companyForm", "customer.address", "customer.contact.name", "customer.contact.email", "customer.contact.phone", "provider.name", "provider.cvr", "provider.address", "provider.contact.name", "provider.contact.email", "contract.id", "contract.title", "contract.version", "contract.date", "contract.startDate"];
|
|
85
108
|
type Placeholder = (typeof PLACEHOLDERS)[number];
|
|
@@ -138,6 +161,7 @@ declare function createLibrary(sources: DocumentSource[], products: ProductFacts
|
|
|
138
161
|
doc: DocId;
|
|
139
162
|
locale: Locale;
|
|
140
163
|
product: string;
|
|
164
|
+
stale?: boolean;
|
|
141
165
|
}) => LegalDocument;
|
|
142
166
|
products: () => string[];
|
|
143
167
|
sources: () => DocumentSource[];
|
|
@@ -195,7 +219,7 @@ declare function createLegalCache(opts: LegalCacheOptions): {
|
|
|
195
219
|
*/
|
|
196
220
|
/** The one place BID's address lives in this package. */
|
|
197
221
|
declare const BID_URL = "https://id.broberg.ai";
|
|
198
|
-
type AcceptedDoc = "terms" | "dpa";
|
|
222
|
+
type AcceptedDoc = "terms" | "dpa" | "modules";
|
|
199
223
|
interface AcceptanceRecord {
|
|
200
224
|
sub: string;
|
|
201
225
|
product: string;
|
|
@@ -293,6 +317,6 @@ declare function getDocument(opts: {
|
|
|
293
317
|
facts: ProductFacts;
|
|
294
318
|
}): LegalDocument;
|
|
295
319
|
/** A finished document from a template you fetched from the API + your own facts. */
|
|
296
|
-
declare function resolveTemplate(template: DocumentSource, facts: ProductFacts): LegalDocument;
|
|
320
|
+
declare function resolveTemplate(template: DocumentSource | LegalTemplate, facts: ProductFacts): LegalDocument;
|
|
297
321
|
|
|
298
|
-
export { type AcceptanceRecord, type AcceptedDoc, BID_URL, type BidCallOptions, BidConsentError, type Block, type ConsentRecord, DEFAULT_REFRESH_MS, DOC_IDS, type DocId, type DocumentSource, EXAMPLE_FACTS, type FactKey, LEGAL_API_URL, type LegalCacheOptions, type LegalDocument, type LegalTemplate, type Locale, MASTER_LOCALE, PLACEHOLDERS, type Placeholder, type ProductFacts, type ResolvedBlock, type ResolvedSection, SOURCES, type Section, canonicalJson, createLegalCache, createLibrary, getAcceptance, getConsent, getDocument, getTemplate, listDocuments, needsReaccept, parityProblems, placeholdersIn, recordAcceptance, recordConsent, renderHtml, resolveTemplate, sha256Hex, sourceHash, templateHash, toBidHash, verifyTemplate };
|
|
322
|
+
export { type AcceptanceRecord, type AcceptedDoc, BID_URL, type BidCallOptions, BidConsentError, type Block, type ConsentRecord, DEFAULT_REFRESH_MS, DOC_IDS, type DocId, type DocumentSource, EXAMPLE_FACTS, type FactKey, LEGAL_API_URL, type LegalCacheOptions, type LegalDocument, type LegalTemplate, type Locale, MASTER_LOCALE, type ModuleTermsFacts, PLACEHOLDERS, type Placeholder, type ProductFacts, type ResolvedBlock, type ResolvedSection, SOURCES, type Section, canonicalJson, createLegalCache, createLibrary, getAcceptance, getConsent, getDocument, getTemplate, listDocuments, needsReaccept, parityProblems, placeholdersIn, recordAcceptance, recordConsent, renderHtml, resolveTemplate, sha256Hex, sourceHash, templateHash, toBidHash, verifyTemplate };
|
package/dist/index.js
CHANGED
|
@@ -126,7 +126,7 @@ function sha256Hex(text) {
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
// src/types.ts
|
|
129
|
-
var DOC_IDS = ["terms", "privacy", "trust", "dpa", "support"];
|
|
129
|
+
var DOC_IDS = ["terms", "privacy", "trust", "dpa", "support", "modules"];
|
|
130
130
|
var MASTER_LOCALE = "da";
|
|
131
131
|
var PLACEHOLDERS = [
|
|
132
132
|
"customer.name",
|
|
@@ -172,6 +172,16 @@ function placeholdersIn(text) {
|
|
|
172
172
|
}
|
|
173
173
|
return out;
|
|
174
174
|
}
|
|
175
|
+
function moduleFacts(p) {
|
|
176
|
+
const m = p.modules;
|
|
177
|
+
if (!m) throw new Error(`product "${p.id}" has no module terms facts (ProductFacts.modules) \u2014 the "modules" document needs them`);
|
|
178
|
+
const missing = ["operationsFee", "paymentProvider", "payoutCadence", "guidelinesUrl", "complaints", "complaintsResponse"].filter((k) => !m[k]);
|
|
179
|
+
for (const k of ["guidelinesNoticeDays", "warningDeadlineDays", "exportDays"]) if (!Number.isInteger(m[k]) || m[k] < 0) missing.push(k);
|
|
180
|
+
if (missing.length) throw new Error(`product "${p.id}": module terms facts missing or invalid: ${missing.join(", ")}`);
|
|
181
|
+
const total = m.revenueShare.reduce((s, r) => s + r.percent, 0);
|
|
182
|
+
if (!m.revenueShare.length || Math.abs(total - 100) > 1e-9) throw new Error(`product "${p.id}": revenueShare must add up to 100 %, got ${total}`);
|
|
183
|
+
return m;
|
|
184
|
+
}
|
|
175
185
|
var FACT_TEMPLATES = {
|
|
176
186
|
da: {
|
|
177
187
|
hosting: (p, id) => [{ id, type: "table", head: ["Hvad", "Hvor"], rows: p.hosting.map((h) => [h.what, h.where]) }],
|
|
@@ -185,7 +195,27 @@ var FACT_TEMPLATES = {
|
|
|
185
195
|
type: "p",
|
|
186
196
|
text: p.conversationAnalysis ? `${p.name} er omfattet af afsnittet om analyse af samtaler.` : `${p.name} er ikke omfattet af afsnittet om analyse af samtaler.`
|
|
187
197
|
}
|
|
188
|
-
]
|
|
198
|
+
],
|
|
199
|
+
moduleTerms: (p, id) => {
|
|
200
|
+
const m = moduleFacts(p);
|
|
201
|
+
return [{
|
|
202
|
+
id,
|
|
203
|
+
type: "table",
|
|
204
|
+
head: ["Hvad", "G\xE6lder"],
|
|
205
|
+
rows: [
|
|
206
|
+
...m.revenueShare.map((r) => [`Andel til ${r.party}`, `${r.percent} %`]),
|
|
207
|
+
["Driftstill\xE6g", m.operationsFee],
|
|
208
|
+
["Betalingsudbyder", m.paymentProvider],
|
|
209
|
+
["Udbetaling", m.payoutCadence],
|
|
210
|
+
["Varsel ved \xE6ndrede retningslinjer", `${m.guidelinesNoticeDays} dage`],
|
|
211
|
+
["Frist ved advarsel", `${m.warningDeadlineDays} dage`],
|
|
212
|
+
["Retningslinjer", m.guidelinesUrl],
|
|
213
|
+
["Klage", m.complaints],
|
|
214
|
+
["Svarfrist p\xE5 klage", m.complaintsResponse],
|
|
215
|
+
["Eksport efter fjernelse", `${m.exportDays} dage`]
|
|
216
|
+
]
|
|
217
|
+
}];
|
|
218
|
+
}
|
|
189
219
|
},
|
|
190
220
|
en: {
|
|
191
221
|
hosting: (p, id) => [{ id, type: "table", head: ["What", "Where"], rows: p.hosting.map((h) => [h.what, h.where]) }],
|
|
@@ -199,7 +229,27 @@ var FACT_TEMPLATES = {
|
|
|
199
229
|
type: "p",
|
|
200
230
|
text: p.conversationAnalysis ? `${p.name} is covered by the section on conversation analysis.` : `${p.name} is not covered by the section on conversation analysis.`
|
|
201
231
|
}
|
|
202
|
-
]
|
|
232
|
+
],
|
|
233
|
+
moduleTerms: (p, id) => {
|
|
234
|
+
const m = moduleFacts(p);
|
|
235
|
+
return [{
|
|
236
|
+
id,
|
|
237
|
+
type: "table",
|
|
238
|
+
head: ["What", "Applies"],
|
|
239
|
+
rows: [
|
|
240
|
+
...m.revenueShare.map((r) => [`Share to ${r.party}`, `${r.percent} %`]),
|
|
241
|
+
["Operations surcharge", m.operationsFee],
|
|
242
|
+
["Payment provider", m.paymentProvider],
|
|
243
|
+
["Payout", m.payoutCadence],
|
|
244
|
+
["Notice of changed guidelines", `${m.guidelinesNoticeDays} days`],
|
|
245
|
+
["Deadline after a warning", `${m.warningDeadlineDays} days`],
|
|
246
|
+
["Guidelines", m.guidelinesUrl],
|
|
247
|
+
["Complaints", m.complaints],
|
|
248
|
+
["Response time on complaints", m.complaintsResponse],
|
|
249
|
+
["Export after removal", `${m.exportDays} days`]
|
|
250
|
+
]
|
|
251
|
+
}];
|
|
252
|
+
}
|
|
203
253
|
}
|
|
204
254
|
};
|
|
205
255
|
function resolveBlock(b, locale, product) {
|
|
@@ -243,7 +293,7 @@ function createLibrary(sources, products) {
|
|
|
243
293
|
const src = byKey.get(`${opts.doc}:${opts.locale}`) ?? byKey.get(`${opts.doc}:${MASTER_LOCALE}`);
|
|
244
294
|
if (!src) throw new Error(`no document "${opts.doc}"`);
|
|
245
295
|
const master = byKey.get(`${opts.doc}:${MASTER_LOCALE}`);
|
|
246
|
-
const stale = src.locale !== MASTER_LOCALE && (!src.translationOf || !master || src.translationOf.sourceHash !== sourceHash(master));
|
|
296
|
+
const stale = opts.stale ?? (src.locale !== MASTER_LOCALE && (!src.translationOf || !master || src.translationOf.sourceHash !== sourceHash(master)));
|
|
247
297
|
const sections = src.sections.map((s) => ({
|
|
248
298
|
id: s.id,
|
|
249
299
|
heading: s.heading,
|
|
@@ -727,6 +777,147 @@ var SUPPORT_DA = {
|
|
|
727
777
|
]
|
|
728
778
|
};
|
|
729
779
|
|
|
780
|
+
// src/content/modules.da.ts
|
|
781
|
+
var MODULES_DA = {
|
|
782
|
+
doc: "modules",
|
|
783
|
+
locale: "da",
|
|
784
|
+
title: "Vilk\xE5r for modulejere og udviklere",
|
|
785
|
+
version: "2026-11-05",
|
|
786
|
+
effectiveFrom: "2026-11-05",
|
|
787
|
+
material: true,
|
|
788
|
+
draft: false,
|
|
789
|
+
sections: [
|
|
790
|
+
{
|
|
791
|
+
id: "hvem",
|
|
792
|
+
heading: "Hvem vilk\xE5rene g\xE6lder for",
|
|
793
|
+
blocks: [
|
|
794
|
+
{ id: "hvem.p1", type: "p", text: "Vilk\xE5rene g\xE6lder for dig, der som klinik eller udvikler udgiver et modul p\xE5 platformen (\xABmodulejer\xBB). De g\xE6lder sammen med platformens almindelige vilk\xE5r. Hvor de to er forskellige, g\xE5r disse vilk\xE5r forud i alt, der handler om moduler." }
|
|
795
|
+
]
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
id: "ansvar",
|
|
799
|
+
heading: "Platformens og dit ansvar",
|
|
800
|
+
blocks: [
|
|
801
|
+
{ id: "ansvar.p1", type: "p", text: "Platformen har ansvaret for, at platformen er stabil og sikker for alle klinikker og deres patienter. Derfor har vi ret til at gribe ind over for et modul, der bryder vilk\xE5rene eller retningslinjerne, som beskrevet nedenfor." },
|
|
802
|
+
{ id: "ansvar.p2", type: "p", text: "Du har ansvaret for dit modul: at det virker som beskrevet, at det overholder retningslinjerne og g\xE6ldende lov, og at du retter fejl i det." }
|
|
803
|
+
]
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
id: "retningslinjer",
|
|
807
|
+
heading: "Retningslinjer",
|
|
808
|
+
blocks: [
|
|
809
|
+
{ id: "retningslinjer.p1", type: "p", text: "Retningslinjerne for moduler er offentlige og g\xE6lder ens for alle moduler, ogs\xE5 platformens egne. Adressen st\xE5r i tabellen under \xABTal og frister\xBB." },
|
|
810
|
+
{ id: "retningslinjer.p2", type: "p", text: "Vi \xE6ndrer kun retningslinjerne med det varsel, der st\xE5r i tabellen. En \xE6ndring, som loven kr\xE6ver, eller som retter et akut sikkerhedsproblem, kan g\xE6lde med det samme." }
|
|
811
|
+
]
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
id: "trappe",
|
|
815
|
+
heading: "N\xE5r et modul bryder retningslinjerne",
|
|
816
|
+
blocks: [
|
|
817
|
+
{ id: "trappe.p1", type: "p", text: "Vi f\xF8lger som udgangspunkt fire trin og g\xE5r kun videre til n\xE6ste trin, hvis problemet ikke bliver l\xF8st:" },
|
|
818
|
+
{
|
|
819
|
+
id: "trappe.list",
|
|
820
|
+
type: "list",
|
|
821
|
+
items: [
|
|
822
|
+
"Besked: vi g\xF8r dig opm\xE6rksom p\xE5 problemet.",
|
|
823
|
+
"Advarsel: vi beskriver, hvad der skal rettes, og giver dig fristen i tabellen.",
|
|
824
|
+
"Pause: modulet s\xE6ttes p\xE5 pause, indtil problemet er l\xF8st.",
|
|
825
|
+
"Fjernelse: modulet fjernes fra platformen."
|
|
826
|
+
]
|
|
827
|
+
},
|
|
828
|
+
{ id: "trappe.p2", type: "p", text: "Vi fort\xE6ller dig altid, hvilket trin vi er p\xE5, og hvorfor." }
|
|
829
|
+
]
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
id: "alvorligt",
|
|
833
|
+
heading: "Pause med det samme i alvorlige tilf\xE6lde",
|
|
834
|
+
blocks: [
|
|
835
|
+
{ id: "alvorligt.p1", type: "p", text: "I alvorlige tilf\xE6lde kan vi s\xE6tte et modul p\xE5 pause med det samme, uden de forudg\xE5ende trin. Det g\xE6lder, n\xE5r modulet:" },
|
|
836
|
+
{
|
|
837
|
+
id: "alvorligt.list",
|
|
838
|
+
type: "list",
|
|
839
|
+
items: [
|
|
840
|
+
"bringer patienters eller klinikkers data i fare,",
|
|
841
|
+
"har et sikkerhedshul,",
|
|
842
|
+
"g\xF8r platformen eller andre moduler ustabile, eller",
|
|
843
|
+
"indeholder eller formidler ulovligt indhold."
|
|
844
|
+
]
|
|
845
|
+
},
|
|
846
|
+
{ id: "alvorligt.p2", type: "p", text: "Et menneske hos os vurderer altid sagen, f\xF8r et modul s\xE6ttes p\xE5 pause. Vi kontakter dig straks og fort\xE6ller dig hvorfor." }
|
|
847
|
+
]
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
id: "pause",
|
|
851
|
+
heading: "Mens et modul er p\xE5 pause",
|
|
852
|
+
blocks: [
|
|
853
|
+
{
|
|
854
|
+
id: "pause.list",
|
|
855
|
+
type: "list",
|
|
856
|
+
items: [
|
|
857
|
+
"De data, modulet har gemt, bevares og kan eksporteres.",
|
|
858
|
+
"Klinikkerne betaler ikke for modulet, mens det er p\xE5 pause.",
|
|
859
|
+
"Vi giver de klinikker, der bruger modulet, besked om pausen."
|
|
860
|
+
]
|
|
861
|
+
}
|
|
862
|
+
]
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
id: "genoptag",
|
|
866
|
+
heading: "Genoptagelse",
|
|
867
|
+
blocks: [
|
|
868
|
+
{ id: "genoptag.p1", type: "p", text: "N\xE5r \xE5rsagen er rettet, og vi har kontrolleret det, genoptager vi modulet og giver dig og klinikkerne besked." }
|
|
869
|
+
]
|
|
870
|
+
},
|
|
871
|
+
{
|
|
872
|
+
id: "fjern",
|
|
873
|
+
heading: "Fjernelse",
|
|
874
|
+
blocks: [
|
|
875
|
+
{ id: "fjern.p1", type: "p", text: "Fjerner vi et modul, kan data fra modulet eksporteres inden for fristen i tabellen. Derefter slettes de." }
|
|
876
|
+
]
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
id: "klage",
|
|
880
|
+
heading: "Klage",
|
|
881
|
+
blocks: [
|
|
882
|
+
{ id: "klage.p1", type: "p", text: "Er du uenig i en beslutning om dit modul, kan du klage via kanalen i tabellen. Vi svarer inden for den svarfrist, der st\xE5r der." }
|
|
883
|
+
]
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
id: "log",
|
|
887
|
+
heading: "Alt bliver registreret",
|
|
888
|
+
blocks: [
|
|
889
|
+
{ id: "log.p1", type: "p", text: "Hvert trin, b\xE5de besked, advarsel, pause, genoptagelse og fjernelse, registreres med tidspunkt, begrundelse og hvem der traf beslutningen. Du kan f\xE5 udleveret registreringerne for dit modul." }
|
|
890
|
+
]
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
id: "penge",
|
|
894
|
+
heading: "Betaling og fordeling",
|
|
895
|
+
blocks: [
|
|
896
|
+
{ id: "penge.p1", type: "p", text: "N\xE5r en klinik betaler for dit modul, fordeles bel\xF8bet som i tabellen. Betalingen gennemf\xF8res af betalingsudbyderen i tabellen, og din andel udbetales med den rytme, der st\xE5r der." }
|
|
897
|
+
]
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
id: "tal",
|
|
901
|
+
heading: "Tal og frister",
|
|
902
|
+
blocks: [{ id: "tal.facts", type: "facts", fact: "moduleTerms" }]
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
id: "aendring",
|
|
906
|
+
heading: "\xC6ndringer af vilk\xE5rene",
|
|
907
|
+
blocks: [
|
|
908
|
+
{ id: "aendring.p1", type: "p", text: "\xC6ndrer vi vilk\xE5rene v\xE6sentligt, beder vi dig acceptere dem igen, f\xF8r de g\xE6lder for dig. Din accept registreres p\xE5 din BID-konto." }
|
|
909
|
+
]
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
id: "lov",
|
|
913
|
+
heading: "Lovvalg og sprog",
|
|
914
|
+
blocks: [
|
|
915
|
+
{ id: "lov.p1", type: "p", text: "Vilk\xE5rene er underlagt dansk ret, og tvister afg\xF8res ved de danske domstole. Er der forskel p\xE5 den danske og en oversat udgave, g\xE6lder den danske." }
|
|
916
|
+
]
|
|
917
|
+
}
|
|
918
|
+
]
|
|
919
|
+
};
|
|
920
|
+
|
|
730
921
|
// src/content/terms.en.ts
|
|
731
922
|
var TERMS_EN = {
|
|
732
923
|
doc: "terms",
|
|
@@ -1190,6 +1381,148 @@ var SUPPORT_EN = {
|
|
|
1190
1381
|
]
|
|
1191
1382
|
};
|
|
1192
1383
|
|
|
1384
|
+
// src/content/modules.en.ts
|
|
1385
|
+
var MODULES_EN = {
|
|
1386
|
+
doc: "modules",
|
|
1387
|
+
locale: "en",
|
|
1388
|
+
title: "Terms for module owners and developers",
|
|
1389
|
+
version: "2026-11-05",
|
|
1390
|
+
effectiveFrom: "2026-11-05",
|
|
1391
|
+
material: true,
|
|
1392
|
+
draft: false,
|
|
1393
|
+
translationOf: { version: "2026-11-05", sourceHash: "87ccbe3b82cec2621b15e178980adb3f1da3c1be80511d5e2e9129f6704ffdad" },
|
|
1394
|
+
sections: [
|
|
1395
|
+
{
|
|
1396
|
+
id: "hvem",
|
|
1397
|
+
heading: "Who these terms apply to",
|
|
1398
|
+
blocks: [
|
|
1399
|
+
{ id: "hvem.p1", type: "p", text: "These terms apply to you if you publish a module on the platform as a clinic or a developer (a \xABmodule owner\xBB). They apply together with the platform's general terms. Where the two differ, these terms take precedence in everything that concerns modules." }
|
|
1400
|
+
]
|
|
1401
|
+
},
|
|
1402
|
+
{
|
|
1403
|
+
id: "ansvar",
|
|
1404
|
+
heading: "The platform's responsibility and yours",
|
|
1405
|
+
blocks: [
|
|
1406
|
+
{ id: "ansvar.p1", type: "p", text: "The platform is responsible for keeping the platform stable and secure for every clinic and its patients. That is why we may act on a module that breaks these terms or the guidelines, as described below." },
|
|
1407
|
+
{ id: "ansvar.p2", type: "p", text: "You are responsible for your module: that it works as described, that it complies with the guidelines and the law, and that you fix its errors." }
|
|
1408
|
+
]
|
|
1409
|
+
},
|
|
1410
|
+
{
|
|
1411
|
+
id: "retningslinjer",
|
|
1412
|
+
heading: "Guidelines",
|
|
1413
|
+
blocks: [
|
|
1414
|
+
{ id: "retningslinjer.p1", type: "p", text: "The guidelines for modules are public and apply equally to every module, including the platform's own. Their address is in the table under \xABFigures and deadlines\xBB." },
|
|
1415
|
+
{ id: "retningslinjer.p2", type: "p", text: "We change the guidelines only with the notice stated in the table. A change required by law, or one that fixes an urgent security problem, may apply at once." }
|
|
1416
|
+
]
|
|
1417
|
+
},
|
|
1418
|
+
{
|
|
1419
|
+
id: "trappe",
|
|
1420
|
+
heading: "When a module breaks the guidelines",
|
|
1421
|
+
blocks: [
|
|
1422
|
+
{ id: "trappe.p1", type: "p", text: "As a rule we follow four steps, and we only move to the next step if the problem is not solved:" },
|
|
1423
|
+
{
|
|
1424
|
+
id: "trappe.list",
|
|
1425
|
+
type: "list",
|
|
1426
|
+
items: [
|
|
1427
|
+
"Notice: we tell you about the problem.",
|
|
1428
|
+
"Warning: we describe what must be fixed and give you the deadline in the table.",
|
|
1429
|
+
"Pause: the module is paused until the problem is solved.",
|
|
1430
|
+
"Removal: the module is removed from the platform."
|
|
1431
|
+
]
|
|
1432
|
+
},
|
|
1433
|
+
{ id: "trappe.p2", type: "p", text: "We always tell you which step we are at, and why." }
|
|
1434
|
+
]
|
|
1435
|
+
},
|
|
1436
|
+
{
|
|
1437
|
+
id: "alvorligt",
|
|
1438
|
+
heading: "Immediate pause in serious cases",
|
|
1439
|
+
blocks: [
|
|
1440
|
+
{ id: "alvorligt.p1", type: "p", text: "In serious cases we may pause a module at once, without the earlier steps. This applies when the module:" },
|
|
1441
|
+
{
|
|
1442
|
+
id: "alvorligt.list",
|
|
1443
|
+
type: "list",
|
|
1444
|
+
items: [
|
|
1445
|
+
"puts patients' or clinics' data at risk,",
|
|
1446
|
+
"has a security hole,",
|
|
1447
|
+
"makes the platform or other modules unstable, or",
|
|
1448
|
+
"contains or spreads illegal content."
|
|
1449
|
+
]
|
|
1450
|
+
},
|
|
1451
|
+
{ id: "alvorligt.p2", type: "p", text: "A person at our end always assesses the case before a module is paused. We contact you at once and tell you why." }
|
|
1452
|
+
]
|
|
1453
|
+
},
|
|
1454
|
+
{
|
|
1455
|
+
id: "pause",
|
|
1456
|
+
heading: "While a module is paused",
|
|
1457
|
+
blocks: [
|
|
1458
|
+
{
|
|
1459
|
+
id: "pause.list",
|
|
1460
|
+
type: "list",
|
|
1461
|
+
items: [
|
|
1462
|
+
"The data the module has stored is kept and can be exported.",
|
|
1463
|
+
"Clinics do not pay for the module while it is paused.",
|
|
1464
|
+
"We tell the clinics that use the module about the pause."
|
|
1465
|
+
]
|
|
1466
|
+
}
|
|
1467
|
+
]
|
|
1468
|
+
},
|
|
1469
|
+
{
|
|
1470
|
+
id: "genoptag",
|
|
1471
|
+
heading: "Resuming",
|
|
1472
|
+
blocks: [
|
|
1473
|
+
{ id: "genoptag.p1", type: "p", text: "When the cause has been fixed and we have checked it, we resume the module and tell you and the clinics." }
|
|
1474
|
+
]
|
|
1475
|
+
},
|
|
1476
|
+
{
|
|
1477
|
+
id: "fjern",
|
|
1478
|
+
heading: "Removal",
|
|
1479
|
+
blocks: [
|
|
1480
|
+
{ id: "fjern.p1", type: "p", text: "If we remove a module, its data can be exported within the deadline in the table. After that it is deleted." }
|
|
1481
|
+
]
|
|
1482
|
+
},
|
|
1483
|
+
{
|
|
1484
|
+
id: "klage",
|
|
1485
|
+
heading: "Complaints",
|
|
1486
|
+
blocks: [
|
|
1487
|
+
{ id: "klage.p1", type: "p", text: "If you disagree with a decision about your module, you can complain through the channel in the table. We answer within the response time stated there." }
|
|
1488
|
+
]
|
|
1489
|
+
},
|
|
1490
|
+
{
|
|
1491
|
+
id: "log",
|
|
1492
|
+
heading: "Everything is recorded",
|
|
1493
|
+
blocks: [
|
|
1494
|
+
{ id: "log.p1", type: "p", text: "Every step, whether notice, warning, pause, resumption or removal, is recorded with the time, the reason and who made the decision. You can have the records for your module." }
|
|
1495
|
+
]
|
|
1496
|
+
},
|
|
1497
|
+
{
|
|
1498
|
+
id: "penge",
|
|
1499
|
+
heading: "Payment and distribution",
|
|
1500
|
+
blocks: [
|
|
1501
|
+
{ id: "penge.p1", type: "p", text: "When a clinic pays for your module, the amount is divided as shown in the table. The payment is handled by the payment provider in the table, and your share is paid out at the rhythm stated there." }
|
|
1502
|
+
]
|
|
1503
|
+
},
|
|
1504
|
+
{
|
|
1505
|
+
id: "tal",
|
|
1506
|
+
heading: "Figures and deadlines",
|
|
1507
|
+
blocks: [{ id: "tal.facts", type: "facts", fact: "moduleTerms" }]
|
|
1508
|
+
},
|
|
1509
|
+
{
|
|
1510
|
+
id: "aendring",
|
|
1511
|
+
heading: "Changes to these terms",
|
|
1512
|
+
blocks: [
|
|
1513
|
+
{ id: "aendring.p1", type: "p", text: "If we change these terms materially, we ask you to accept them again before they apply to you. Your acceptance is recorded on your BID account." }
|
|
1514
|
+
]
|
|
1515
|
+
},
|
|
1516
|
+
{
|
|
1517
|
+
id: "lov",
|
|
1518
|
+
heading: "Governing law and language",
|
|
1519
|
+
blocks: [
|
|
1520
|
+
{ id: "lov.p1", type: "p", text: "These terms are governed by Danish law, and disputes are settled by the Danish courts. If the Danish and a translated version differ, the Danish version prevails." }
|
|
1521
|
+
]
|
|
1522
|
+
}
|
|
1523
|
+
]
|
|
1524
|
+
};
|
|
1525
|
+
|
|
1193
1526
|
// src/content/index.ts
|
|
1194
1527
|
var SOURCES = [
|
|
1195
1528
|
TERMS_DA,
|
|
@@ -1197,11 +1530,13 @@ var SOURCES = [
|
|
|
1197
1530
|
TRUST_DA,
|
|
1198
1531
|
DPA_DA,
|
|
1199
1532
|
SUPPORT_DA,
|
|
1533
|
+
MODULES_DA,
|
|
1200
1534
|
TERMS_EN,
|
|
1201
1535
|
PRIVACY_EN,
|
|
1202
1536
|
TRUST_EN,
|
|
1203
1537
|
DPA_EN,
|
|
1204
|
-
SUPPORT_EN
|
|
1538
|
+
SUPPORT_EN,
|
|
1539
|
+
MODULES_EN
|
|
1205
1540
|
];
|
|
1206
1541
|
|
|
1207
1542
|
// src/render.ts
|
|
@@ -1236,7 +1571,20 @@ var EXAMPLE_FACTS = {
|
|
|
1236
1571
|
{ name: "Resend", purpose: "Afsendelse af e-mail", location: "Irland", transfer: "Data Privacy Framework + standardkontrakt" }
|
|
1237
1572
|
],
|
|
1238
1573
|
conversationAnalysis: true,
|
|
1239
|
-
healthData: false
|
|
1574
|
+
healthData: false,
|
|
1575
|
+
// F110.17 — only a platform with third-party modules sets this. EXAMPLE numbers, not anyone's real terms.
|
|
1576
|
+
modules: {
|
|
1577
|
+
revenueShare: [{ party: "platformen", percent: 30 }, { party: "modulejeren", percent: 70 }],
|
|
1578
|
+
operationsFee: "Et fast m\xE5nedligt bel\xF8b pr. modul pr. klinik",
|
|
1579
|
+
paymentProvider: "Eksempel-betalingsudbyderen",
|
|
1580
|
+
payoutCadence: "m\xE5nedligt",
|
|
1581
|
+
guidelinesNoticeDays: 30,
|
|
1582
|
+
warningDeadlineDays: 14,
|
|
1583
|
+
guidelinesUrl: "https://example.test/retningslinjer",
|
|
1584
|
+
complaints: "klage@example.test",
|
|
1585
|
+
complaintsResponse: "3 hverdage",
|
|
1586
|
+
exportDays: 30
|
|
1587
|
+
}
|
|
1240
1588
|
};
|
|
1241
1589
|
|
|
1242
1590
|
// src/cache.ts
|
|
@@ -1373,7 +1721,9 @@ function getDocument(opts) {
|
|
|
1373
1721
|
}
|
|
1374
1722
|
function resolveTemplate(template, facts) {
|
|
1375
1723
|
const { doc, locale, title, version, effectiveFrom, material, draft, translationOf, sections } = template;
|
|
1376
|
-
|
|
1724
|
+
const master = SOURCES.find((s) => s.doc === doc && s.locale === MASTER_LOCALE);
|
|
1725
|
+
const stale = "stale" in template && typeof template.stale === "boolean" ? template.stale : locale !== MASTER_LOCALE && (!master || translationOf?.sourceHash !== sourceHash(master));
|
|
1726
|
+
return createLibrary([{ doc, locale, title, version, effectiveFrom, material, draft, translationOf, sections }], [facts]).getDocument({ doc, locale, product: facts.id, stale });
|
|
1377
1727
|
}
|
|
1378
1728
|
|
|
1379
1729
|
export { BID_URL, BidConsentError, DEFAULT_REFRESH_MS, DOC_IDS, EXAMPLE_FACTS, LEGAL_API_URL, MASTER_LOCALE, PLACEHOLDERS, SOURCES, canonicalJson, createLegalCache, createLibrary, getAcceptance, getConsent, getDocument, getTemplate, listDocuments, needsReaccept, parityProblems, placeholdersIn, recordAcceptance, recordConsent, renderHtml, resolveTemplate, sha256Hex, sourceHash, templateHash, toBidHash, verifyTemplate };
|