@broberg/legal 0.8.0 → 0.9.0
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/index.cjs +17 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -2
- package/dist/index.d.ts +9 -2
- package/dist/index.js +17 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -184,6 +184,8 @@ function moduleFacts(p) {
|
|
|
184
184
|
if (!m.revenueShare.length || Math.abs(total - 100) > 1e-9) throw new Error(`product "${p.id}": revenueShare must add up to 100 %, got ${total}`);
|
|
185
185
|
return m;
|
|
186
186
|
}
|
|
187
|
+
var GOOGLE_USER_DATA_POLICY = "https://developers.google.com/terms/api-services-user-data-policy";
|
|
188
|
+
var googleLimitedUse = (name) => `${name}'s use and transfer to any other app of information received from Google APIs will adhere to the Google API Services User Data Policy (${GOOGLE_USER_DATA_POLICY}), including the Limited Use requirements.`;
|
|
187
189
|
var FACT_TEMPLATES = {
|
|
188
190
|
da: {
|
|
189
191
|
hosting: (p, id) => [{ id, type: "table", head: ["Hvad", "Hvor"], rows: p.hosting.map((h) => [h.what, h.where]) }],
|
|
@@ -198,6 +200,10 @@ var FACT_TEMPLATES = {
|
|
|
198
200
|
text: p.conversationAnalysis ? `${p.name} er omfattet af afsnittet om analyse af samtaler.` : `${p.name} er ikke omfattet af afsnittet om analyse af samtaler.`
|
|
199
201
|
}
|
|
200
202
|
],
|
|
203
|
+
googleApiLimitedUse: (p, id) => p.googleApiLimitedUse ? [
|
|
204
|
+
{ id, type: "p", text: `${p.name} henter oplysninger fra Googles API'er. Googles egen erkl\xE6ring om brugen g\xE6lder og st\xE5r her ordret:` },
|
|
205
|
+
{ id: `${id}.statement`, type: "p", text: googleLimitedUse(p.name) }
|
|
206
|
+
] : [],
|
|
201
207
|
moduleTerms: (p, id) => {
|
|
202
208
|
const m = moduleFacts(p);
|
|
203
209
|
return [{
|
|
@@ -232,6 +238,10 @@ var FACT_TEMPLATES = {
|
|
|
232
238
|
text: p.conversationAnalysis ? `${p.name} is covered by the section on conversation analysis.` : `${p.name} is not covered by the section on conversation analysis.`
|
|
233
239
|
}
|
|
234
240
|
],
|
|
241
|
+
googleApiLimitedUse: (p, id) => p.googleApiLimitedUse ? [
|
|
242
|
+
{ id, type: "p", text: `${p.name} receives information from Google APIs. Google's own statement on that use applies, verbatim:` },
|
|
243
|
+
{ id: `${id}.statement`, type: "p", text: googleLimitedUse(p.name) }
|
|
244
|
+
] : [],
|
|
235
245
|
moduleTerms: (p, id) => {
|
|
236
246
|
const m = moduleFacts(p);
|
|
237
247
|
return [{
|
|
@@ -295,7 +305,7 @@ function createLibrary(sources, products) {
|
|
|
295
305
|
const src = byKey.get(`${opts.doc}:${opts.locale}`) ?? byKey.get(`${opts.doc}:${MASTER_LOCALE}`);
|
|
296
306
|
if (!src) throw new Error(`no document "${opts.doc}"`);
|
|
297
307
|
const master = byKey.get(`${opts.doc}:${MASTER_LOCALE}`);
|
|
298
|
-
const stale = src.locale !== MASTER_LOCALE && (!src.translationOf || !master || src.translationOf.sourceHash !== sourceHash(master));
|
|
308
|
+
const stale = opts.stale ?? (src.locale !== MASTER_LOCALE && (!src.translationOf || !master || src.translationOf.sourceHash !== sourceHash(master)));
|
|
299
309
|
const sections = src.sections.map((s) => ({
|
|
300
310
|
id: s.id,
|
|
301
311
|
heading: s.heading,
|
|
@@ -483,6 +493,7 @@ var PRIVACY_DA = {
|
|
|
483
493
|
blocks: [
|
|
484
494
|
{ id: "deling.p1", type: "p", text: "Vi s\xE6lger aldrig data. Vi bruger disse databehandlere, som kun m\xE5 behandle oplysningerne efter vores instruks:" },
|
|
485
495
|
{ id: "deling.facts", type: "facts", fact: "subprocessors" },
|
|
496
|
+
{ id: "deling.google", type: "facts", fact: "googleApiLimitedUse" },
|
|
486
497
|
{ id: "deling.p2", type: "p", text: "Overf\xF8rsel uden for EU sker kun med et gyldigt overf\xF8rselsgrundlag, fx EU-Kommissionens standardkontraktbestemmelser eller EU-US Data Privacy Framework." }
|
|
487
498
|
]
|
|
488
499
|
},
|
|
@@ -1001,7 +1012,7 @@ var PRIVACY_EN = {
|
|
|
1001
1012
|
effectiveFrom: "2026-11-02",
|
|
1002
1013
|
material: false,
|
|
1003
1014
|
draft: false,
|
|
1004
|
-
translationOf: { version: "2026-11-02", sourceHash: "
|
|
1015
|
+
translationOf: { version: "2026-11-02", sourceHash: "c30a33c005888cd3dbbe62c462235fa31487f2b51821450ecb52e462578ddac6" },
|
|
1005
1016
|
sections: [
|
|
1006
1017
|
{
|
|
1007
1018
|
id: "dataansvarlig",
|
|
@@ -1084,6 +1095,7 @@ var PRIVACY_EN = {
|
|
|
1084
1095
|
blocks: [
|
|
1085
1096
|
{ id: "deling.p1", type: "p", text: "We never sell data. We use these processors, which may only process the information on our instructions:" },
|
|
1086
1097
|
{ id: "deling.facts", type: "facts", fact: "subprocessors" },
|
|
1098
|
+
{ id: "deling.google", type: "facts", fact: "googleApiLimitedUse" },
|
|
1087
1099
|
{ id: "deling.p2", type: "p", text: "Transfers outside the EU only take place with a valid transfer mechanism, e.g. the European Commission's standard contractual clauses or the EU-US Data Privacy Framework." }
|
|
1088
1100
|
]
|
|
1089
1101
|
},
|
|
@@ -1723,7 +1735,9 @@ function getDocument(opts) {
|
|
|
1723
1735
|
}
|
|
1724
1736
|
function resolveTemplate(template, facts) {
|
|
1725
1737
|
const { doc, locale, title, version, effectiveFrom, material, draft, translationOf, sections } = template;
|
|
1726
|
-
|
|
1738
|
+
const master = SOURCES.find((s) => s.doc === doc && s.locale === MASTER_LOCALE);
|
|
1739
|
+
const stale = "stale" in template && typeof template.stale === "boolean" ? template.stale : locale !== MASTER_LOCALE && (!master || translationOf?.sourceHash !== sourceHash(master));
|
|
1740
|
+
return createLibrary([{ doc, locale, title, version, effectiveFrom, material, draft, translationOf, sections }], [facts]).getDocument({ doc, locale, product: facts.id, stale });
|
|
1727
1741
|
}
|
|
1728
1742
|
|
|
1729
1743
|
exports.BID_URL = BID_URL;
|