@openpolicy/core 0.0.4 → 0.0.6
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.d.ts +147 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +530 -240
- package/dist/index.js.map +1 -0
- package/dist/templates/terms/acceptance.d.ts +3 -0
- package/dist/templates/terms/acceptance.d.ts.map +1 -0
- package/dist/templates/terms/accounts.d.ts +3 -0
- package/dist/templates/terms/accounts.d.ts.map +1 -0
- package/dist/templates/terms/availability.d.ts +3 -0
- package/dist/templates/terms/availability.d.ts.map +1 -0
- package/dist/templates/terms/changes-to-terms.d.ts +3 -0
- package/dist/templates/terms/changes-to-terms.d.ts.map +1 -0
- package/dist/templates/terms/contact.d.ts +3 -0
- package/dist/templates/terms/contact.d.ts.map +1 -0
- package/dist/templates/terms/disclaimers.d.ts +3 -0
- package/dist/templates/terms/disclaimers.d.ts.map +1 -0
- package/dist/templates/terms/dispute-resolution.d.ts +3 -0
- package/dist/templates/terms/dispute-resolution.d.ts.map +1 -0
- package/dist/templates/terms/eligibility.d.ts +3 -0
- package/dist/templates/terms/eligibility.d.ts.map +1 -0
- package/dist/templates/terms/governing-law.d.ts +3 -0
- package/dist/templates/terms/governing-law.d.ts.map +1 -0
- package/dist/templates/terms/indemnification.d.ts +3 -0
- package/dist/templates/terms/indemnification.d.ts.map +1 -0
- package/dist/templates/terms/intellectual-property.d.ts +3 -0
- package/dist/templates/terms/intellectual-property.d.ts.map +1 -0
- package/dist/templates/terms/introduction.d.ts +3 -0
- package/dist/templates/terms/introduction.d.ts.map +1 -0
- package/dist/templates/terms/limitation-of-liability.d.ts +3 -0
- package/dist/templates/terms/limitation-of-liability.d.ts.map +1 -0
- package/dist/templates/terms/payments.d.ts +3 -0
- package/dist/templates/terms/payments.d.ts.map +1 -0
- package/dist/templates/terms/prohibited-use.d.ts +3 -0
- package/dist/templates/terms/prohibited-use.d.ts.map +1 -0
- package/dist/templates/terms/termination.d.ts +3 -0
- package/dist/templates/terms/termination.d.ts.map +1 -0
- package/dist/templates/terms/third-party-services.d.ts +3 -0
- package/dist/templates/terms/third-party-services.d.ts.map +1 -0
- package/dist/templates/terms/user-content.d.ts +3 -0
- package/dist/templates/terms/user-content.d.ts.map +1 -0
- package/dist/terms.d.ts +7 -0
- package/dist/terms.d.ts.map +1 -0
- package/dist/terms.test.d.ts +2 -0
- package/dist/terms.test.d.ts.map +1 -0
- package/dist/types.d.ts +80 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/validate-terms.d.ts +3 -0
- package/dist/validate-terms.d.ts.map +1 -0
- package/dist/validate-terms.test.d.ts +2 -0
- package/dist/validate-terms.test.d.ts.map +1 -0
- package/package.json +6 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["buildContact","buildIntroduction","SECTION_BUILDERS","buildIntroduction","buildContact"],"sources":["../src/renderers/markdown.ts","../src/renderers/html.ts","../src/templates/privacy/ccpa-supplement.ts","../src/templates/privacy/contact.ts","../src/templates/privacy/cookies.ts","../src/templates/privacy/data-collected.ts","../src/templates/privacy/data-retention.ts","../src/templates/privacy/gdpr-supplement.ts","../src/templates/privacy/introduction.ts","../src/templates/privacy/legal-basis.ts","../src/templates/privacy/third-parties.ts","../src/templates/privacy/user-rights.ts","../src/privacy.ts","../src/templates/terms/acceptance.ts","../src/templates/terms/accounts.ts","../src/templates/terms/availability.ts","../src/templates/terms/changes-to-terms.ts","../src/templates/terms/contact.ts","../src/templates/terms/disclaimers.ts","../src/templates/terms/dispute-resolution.ts","../src/templates/terms/eligibility.ts","../src/templates/terms/governing-law.ts","../src/templates/terms/indemnification.ts","../src/templates/terms/intellectual-property.ts","../src/templates/terms/introduction.ts","../src/templates/terms/limitation-of-liability.ts","../src/templates/terms/payments.ts","../src/templates/terms/prohibited-use.ts","../src/templates/terms/termination.ts","../src/templates/terms/third-party-services.ts","../src/templates/terms/user-content.ts","../src/terms.ts","../src/validate.ts","../src/validate-terms.ts","../src/index.ts"],"sourcesContent":["import type { PolicySection } from \"../types\";\n\nexport function renderMarkdown(sections: PolicySection[]): string {\n\treturn sections\n\t\t.map((section) => `## ${section.title}\\n\\n${section.body}`)\n\t\t.join(\"\\n\\n---\\n\\n\");\n}\n","import { marked } from \"marked\";\nimport type { PolicySection } from \"../types\";\nimport { renderMarkdown } from \"./markdown\";\n\nexport function renderHTML(sections: PolicySection[]): string {\n\tconst markdown = renderMarkdown(sections);\n\treturn marked(markdown) as string;\n}\n","import type { PolicySection, PrivacyPolicyConfig } from \"../../types\";\n\nexport function buildCcpaSupplement(\n\tconfig: PrivacyPolicyConfig,\n): PolicySection | null {\n\tif (!config.jurisdictions.includes(\"ca\")) return null;\n\n\treturn {\n\t\tid: \"ccpa-supplement\",\n\t\ttitle: \"California Privacy Rights (CCPA)\",\n\t\tbody: `This section applies to California residents under the California Consumer Privacy Act (CCPA) and the California Privacy Rights Act (CPRA).\n\n**Categories of Personal Information Collected:** We collect the categories of personal information described in the \"Information We Collect\" section above.\n\n**Your California Rights:**\n- **Right to Know:** You may request information about the personal information we have collected about you, including the categories of sources, the business purpose for collection, and the categories of third parties with whom we share information.\n- **Right to Delete:** You may request deletion of personal information we have collected from you, subject to certain exceptions.\n- **Right to Opt-Out:** You may opt out of the sale or sharing of your personal information.\n- **Right to Non-Discrimination:** We will not discriminate against you for exercising your California privacy rights.\n\nTo exercise your rights, contact us at ${config.company.contact}.`,\n\t};\n}\n","import type { PolicySection, PrivacyPolicyConfig } from \"../../types\";\n\nexport function buildContact(config: PrivacyPolicyConfig): PolicySection {\n\treturn {\n\t\tid: \"contact\",\n\t\ttitle: \"Contact Us\",\n\t\tbody: `If you have questions or concerns about this Privacy Policy or our data practices, please contact us:\n\n**${config.company.legalName}**\n${config.company.address}\n\nEmail: ${config.company.contact}`,\n\t};\n}\n","import type { PolicySection, PrivacyPolicyConfig } from \"../../types\";\n\nexport function buildCookies(config: PrivacyPolicyConfig): PolicySection {\n\tconst enabled: string[] = [];\n\tif (config.cookies.essential)\n\t\tenabled.push(\n\t\t\t\"**Essential cookies** — required for the service to function\",\n\t\t);\n\tif (config.cookies.analytics)\n\t\tenabled.push(\n\t\t\t\"**Analytics cookies** — help us understand how visitors interact with our service\",\n\t\t);\n\tif (config.cookies.marketing)\n\t\tenabled.push(\n\t\t\t\"**Marketing cookies** — used to deliver relevant advertisements\",\n\t\t);\n\n\tconst body =\n\t\tenabled.length > 0\n\t\t\t? `We use the following types of cookies and tracking technologies:\\n\\n${enabled.map((e) => `- ${e}`).join(\"\\n\")}`\n\t\t\t: \"We do not use cookies or tracking technologies on our service.\";\n\n\treturn {\n\t\tid: \"cookies\",\n\t\ttitle: \"Cookies and Tracking\",\n\t\tbody,\n\t};\n}\n","import type { PolicySection, PrivacyPolicyConfig } from \"../../types\";\n\nexport function buildDataCollected(config: PrivacyPolicyConfig): PolicySection {\n\tconst entries = Object.entries(config.dataCollected);\n\tconst lines = entries.map(([category, items]) => {\n\t\tconst itemList = items.map((item) => ` - ${item}`).join(\"\\n\");\n\t\treturn `**${category}:**\\n${itemList}`;\n\t});\n\n\treturn {\n\t\tid: \"data-collected\",\n\t\ttitle: \"Information We Collect\",\n\t\tbody: `We collect the following categories of information:\\n\\n${lines.join(\"\\n\\n\")}`,\n\t};\n}\n","import type { PolicySection, PrivacyPolicyConfig } from \"../../types\";\n\nexport function buildDataRetention(config: PrivacyPolicyConfig): PolicySection {\n\tconst entries = Object.entries(config.retention);\n\tconst lines = entries.map(\n\t\t([category, period]) => `- **${category}:** ${period}`,\n\t);\n\n\treturn {\n\t\tid: \"data-retention\",\n\t\ttitle: \"Data Retention\",\n\t\tbody: `We retain your information for the following periods:\\n\\n${lines.join(\"\\n\")}`,\n\t};\n}\n","import type { PolicySection, PrivacyPolicyConfig } from \"../../types\";\n\nexport function buildGdprSupplement(\n\tconfig: PrivacyPolicyConfig,\n): PolicySection | null {\n\tif (!config.jurisdictions.includes(\"eu\")) return null;\n\n\treturn {\n\t\tid: \"gdpr-supplement\",\n\t\ttitle: \"GDPR Supplemental Disclosures\",\n\t\tbody: `This section applies to individuals in the European Economic Area (EEA) under the General Data Protection Regulation (GDPR).\n\n**Data Controller:** ${config.company.legalName}, ${config.company.address}\n\n**Your GDPR Rights:** In addition to the rights listed above, you have the right to lodge a complaint with your local data protection authority if you believe we have not handled your data in accordance with applicable law.\n\n**International Transfers:** If we transfer your personal data outside the EEA, we ensure adequate safeguards are in place in accordance with GDPR requirements.`,\n\t};\n}\n","import type { PolicySection, PrivacyPolicyConfig } from \"../../types\";\n\nexport function buildIntroduction(config: PrivacyPolicyConfig): PolicySection {\n\treturn {\n\t\tid: \"introduction\",\n\t\ttitle: \"Introduction\",\n\t\tbody: `This Privacy Policy describes how ${config.company.name} (\"we\", \"us\", or \"our\") collects, uses, and shares information about you when you use our services.\n\n**Effective Date:** ${config.effectiveDate}\n\nIf you have questions about this policy, please contact us at ${config.company.contact}.`,\n\t};\n}\n","import type { PolicySection, PrivacyPolicyConfig } from \"../../types\";\n\nexport function buildLegalBasis(\n\tconfig: PrivacyPolicyConfig,\n): PolicySection | null {\n\tif (!config.jurisdictions.includes(\"eu\")) return null;\n\n\treturn {\n\t\tid: \"legal-basis\",\n\t\ttitle: \"Legal Basis for Processing\",\n\t\tbody: `We process your personal data under the following legal basis:\\n\\n${config.legalBasis}`,\n\t};\n}\n","import type { PolicySection, PrivacyPolicyConfig } from \"../../types\";\n\nexport function buildThirdParties(config: PrivacyPolicyConfig): PolicySection {\n\tconst lines = config.thirdParties.map(\n\t\t(tp) => `- **${tp.name}** — ${tp.purpose}`,\n\t);\n\n\tconst body =\n\t\tlines.length > 0\n\t\t\t? `We share data with the following third-party services:\\n\\n${lines.join(\"\\n\")}`\n\t\t\t: \"We do not share your data with third-party services.\";\n\n\treturn {\n\t\tid: \"third-parties\",\n\t\ttitle: \"Third-Party Services\",\n\t\tbody,\n\t};\n}\n","import type { PolicySection, PrivacyPolicyConfig } from \"../../types\";\n\nconst RIGHTS_LABELS: Record<string, string> = {\n\taccess: \"Right to access your personal data\",\n\trectification: \"Right to correct inaccurate data\",\n\terasure: \"Right to request deletion of your data\",\n\tportability: \"Right to receive your data in a portable format\",\n\trestriction: \"Right to restrict how we process your data\",\n\tobjection: \"Right to object to processing\",\n\topt_out_sale: \"Right to opt out of the sale of your personal information\",\n\tnon_discrimination:\n\t\t\"Right to non-discriminatory treatment for exercising your rights\",\n};\n\nexport function buildUserRights(config: PrivacyPolicyConfig): PolicySection {\n\tconst lines = config.userRights.map((right) => {\n\t\tconst label = RIGHTS_LABELS[right] ?? right;\n\t\treturn `- ${label}`;\n\t});\n\n\treturn {\n\t\tid: \"user-rights\",\n\t\ttitle: \"Your Rights\",\n\t\tbody: `You have the following rights regarding your personal data:\\n\\n${lines.join(\"\\n\")}`,\n\t};\n}\n","import { renderHTML } from \"./renderers/html\";\nimport { renderMarkdown } from \"./renderers/markdown\";\nimport { buildCcpaSupplement } from \"./templates/privacy/ccpa-supplement\";\nimport { buildContact } from \"./templates/privacy/contact\";\nimport { buildCookies } from \"./templates/privacy/cookies\";\nimport { buildDataCollected } from \"./templates/privacy/data-collected\";\nimport { buildDataRetention } from \"./templates/privacy/data-retention\";\nimport { buildGdprSupplement } from \"./templates/privacy/gdpr-supplement\";\nimport { buildIntroduction } from \"./templates/privacy/introduction\";\nimport { buildLegalBasis } from \"./templates/privacy/legal-basis\";\nimport { buildThirdParties } from \"./templates/privacy/third-parties\";\nimport { buildUserRights } from \"./templates/privacy/user-rights\";\nimport type {\n\tCompileOptions,\n\tOutputFormat,\n\tPolicySection,\n\tPrivacyPolicyConfig,\n} from \"./types\";\n\nconst SECTION_BUILDERS: ((\n\tconfig: PrivacyPolicyConfig,\n) => PolicySection | null)[] = [\n\tbuildIntroduction,\n\tbuildDataCollected,\n\tbuildLegalBasis,\n\tbuildDataRetention,\n\tbuildCookies,\n\tbuildThirdParties,\n\tbuildUserRights,\n\tbuildGdprSupplement,\n\tbuildCcpaSupplement,\n\tbuildContact,\n];\n\nexport function compilePrivacyPolicy(\n\tconfig: PrivacyPolicyConfig,\n\toptions: CompileOptions = { formats: [\"markdown\"] },\n): { format: OutputFormat; content: string; sections: PolicySection[] }[] {\n\tconst sections = SECTION_BUILDERS.map((builder) => builder(config)).filter(\n\t\t(s): s is PolicySection => s !== null,\n\t);\n\n\treturn options.formats.map((format) => {\n\t\tswitch (format) {\n\t\t\tcase \"markdown\":\n\t\t\t\treturn { format, content: renderMarkdown(sections), sections };\n\t\t\tcase \"html\":\n\t\t\t\treturn { format, content: renderHTML(sections), sections };\n\t\t\tcase \"pdf\":\n\t\t\t\tthrow new Error(\"pdf format is not yet implemented\");\n\t\t\tcase \"jsx\":\n\t\t\t\tthrow new Error(\"jsx format is not yet implemented\");\n\t\t\tdefault:\n\t\t\t\tthrow new Error(`Unsupported format: ${format}`);\n\t\t}\n\t});\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildAcceptance(config: TermsOfServiceConfig): PolicySection {\n\tconst methodList = config.acceptance.methods.map((m) => `- ${m}`).join(\"\\n\");\n\n\treturn {\n\t\tid: \"tos-acceptance\",\n\t\ttitle: \"Acceptance of Terms\",\n\t\tbody: `By accessing or using our services, you agree to be bound by these Terms. You accept these Terms by:\\n\\n${methodList}\\n\\nIf you do not agree to these Terms, you may not use our services.`,\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildAccounts(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.accounts) return null;\n\n\tconst {\n\t\tregistrationRequired,\n\t\tuserResponsibleForCredentials,\n\t\tcompanyCanTerminate,\n\t} = config.accounts;\n\n\tconst lines: string[] = [];\n\n\tif (registrationRequired) {\n\t\tlines.push(\n\t\t\t\"You must create an account to access certain features of our services. You agree to provide accurate, current, and complete information during registration.\",\n\t\t);\n\t}\n\n\tif (userResponsibleForCredentials) {\n\t\tlines.push(\n\t\t\t\"You are responsible for maintaining the confidentiality of your account credentials and for all activities that occur under your account. You must notify us immediately of any unauthorized use of your account.\",\n\t\t);\n\t}\n\n\tif (companyCanTerminate) {\n\t\tlines.push(\n\t\t\t`${config.company.name} reserves the right to suspend or terminate your account at any time, with or without notice, for any reason including violation of these Terms.`,\n\t\t);\n\t}\n\n\treturn {\n\t\tid: \"tos-accounts\",\n\t\ttitle: \"Accounts\",\n\t\tbody: lines.join(\"\\n\\n\"),\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildAvailability(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.availability) return null;\n\n\tconst lines: string[] = [];\n\n\tif (config.availability.noUptimeGuarantee) {\n\t\tlines.push(\n\t\t\t\"We do not guarantee that our services will be available at all times. Our services may be subject to interruptions, delays, or errors.\",\n\t\t);\n\t}\n\n\tif (config.availability.maintenanceWindows) {\n\t\tlines.push(`**Maintenance:** ${config.availability.maintenanceWindows}`);\n\t}\n\n\treturn {\n\t\tid: \"tos-availability\",\n\t\ttitle: \"Service Availability\",\n\t\tbody: lines.join(\"\\n\\n\"),\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildChangesToTerms(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.changesPolicy) return null;\n\n\tconst { noticeMethod, noticePeriodDays } = config.changesPolicy;\n\n\tconst periodText = noticePeriodDays\n\t\t? ` at least **${noticePeriodDays} days** before they take effect`\n\t\t: \" before they take effect\";\n\n\treturn {\n\t\tid: \"tos-changes\",\n\t\ttitle: \"Changes to These Terms\",\n\t\tbody: `We may update these Terms from time to time. We will notify you of material changes via ${noticeMethod}${periodText}. Your continued use of our services after changes become effective constitutes your acceptance of the revised Terms.`,\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildContact(config: TermsOfServiceConfig): PolicySection {\n\treturn {\n\t\tid: \"tos-contact\",\n\t\ttitle: \"Contact Us\",\n\t\tbody: `If you have any questions about these Terms, please contact us at:\n\n**${config.company.legalName}**\n${config.company.address}\n${config.company.contact}`,\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildDisclaimers(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.disclaimers) return null;\n\n\tconst lines: string[] = [];\n\n\tif (config.disclaimers.serviceProvidedAsIs) {\n\t\tlines.push(\n\t\t\t'OUR SERVICES ARE PROVIDED \"AS IS\" AND \"AS AVAILABLE\" WITHOUT WARRANTIES OF ANY KIND.',\n\t\t);\n\t}\n\n\tif (config.disclaimers.noWarranties) {\n\t\tlines.push(\n\t\t\t`${config.company.legalName} EXPRESSLY DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.`,\n\t\t);\n\t}\n\n\treturn {\n\t\tid: \"tos-disclaimers\",\n\t\ttitle: \"Disclaimer of Warranties\",\n\t\tbody: lines.join(\"\\n\\n\"),\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildDisputeResolution(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.disputeResolution) return null;\n\n\tconst { method, venue, classActionWaiver } = config.disputeResolution;\n\n\tconst methodDescriptions: Record<string, string> = {\n\t\tarbitration:\n\t\t\t\"Any disputes arising out of or relating to these Terms or our services shall be resolved by binding arbitration rather than in court.\",\n\t\tlitigation:\n\t\t\t\"Any disputes arising out of or relating to these Terms or our services shall be resolved through litigation in a court of competent jurisdiction.\",\n\t\tmediation:\n\t\t\t\"Any disputes arising out of or relating to these Terms or our services shall first be submitted to non-binding mediation before pursuing other remedies.\",\n\t};\n\n\tconst lines: string[] = [\n\t\tmethodDescriptions[method] ??\n\t\t\t\"Disputes arising out of or relating to these Terms shall be resolved as described below.\",\n\t];\n\n\tif (venue) {\n\t\tlines.push(`**Venue:** ${venue}`);\n\t}\n\n\tif (classActionWaiver) {\n\t\tlines.push(\n\t\t\t\"**Class Action Waiver:** You agree that any dispute resolution proceedings will be conducted only on an individual basis and not in a class, consolidated, or representative action.\",\n\t\t);\n\t}\n\n\treturn {\n\t\tid: \"tos-dispute-resolution\",\n\t\ttitle: \"Dispute Resolution\",\n\t\tbody: lines.join(\"\\n\\n\"),\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildEligibility(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.eligibility) return null;\n\n\tconst { minimumAge, jurisdictionRestrictions } = config.eligibility;\n\n\tlet body = `You must be at least **${minimumAge} years old** to use our services. By using our services, you represent and warrant that you meet this age requirement.`;\n\n\tif (jurisdictionRestrictions && jurisdictionRestrictions.length > 0) {\n\t\tconst list = jurisdictionRestrictions.map((r) => `- ${r}`).join(\"\\n\");\n\t\tbody += `\\n\\nOur services are not available in the following jurisdictions:\\n\\n${list}`;\n\t}\n\n\treturn {\n\t\tid: \"tos-eligibility\",\n\t\ttitle: \"Eligibility\",\n\t\tbody,\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildGoverningLaw(config: TermsOfServiceConfig): PolicySection {\n\treturn {\n\t\tid: \"tos-governing-law\",\n\t\ttitle: \"Governing Law\",\n\t\tbody: `These Terms shall be governed by and construed in accordance with the laws of **${config.governingLaw.jurisdiction}**, without regard to its conflict of law provisions.`,\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildIndemnification(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.indemnification) return null;\n\n\tconst lines: string[] = [];\n\n\tif (config.indemnification.userIndemnifiesCompany) {\n\t\tlines.push(\n\t\t\t`You agree to indemnify and hold harmless ${config.company.legalName} and its officers, directors, employees, and agents from and against any claims, liabilities, damages, losses, and expenses arising out of or in any way connected with your access to or use of our services.`,\n\t\t);\n\t}\n\n\tif (config.indemnification.scope) {\n\t\tlines.push(`**Scope:** ${config.indemnification.scope}`);\n\t}\n\n\treturn {\n\t\tid: \"tos-indemnification\",\n\t\ttitle: \"Indemnification\",\n\t\tbody: lines.join(\"\\n\\n\"),\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildIntellectualProperty(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.intellectualProperty) return null;\n\n\tconst { companyOwnsService, usersMayNotCopy } = config.intellectualProperty;\n\n\tconst lines: string[] = [];\n\n\tif (companyOwnsService) {\n\t\tlines.push(\n\t\t\t`The services and all content, features, and functionality (including but not limited to text, graphics, logos, and software) are owned by ${config.company.legalName} and are protected by intellectual property laws.`,\n\t\t);\n\t}\n\n\tif (usersMayNotCopy) {\n\t\tlines.push(\n\t\t\t\"You may not copy, modify, distribute, sell, or lease any part of our services or included software, nor may you reverse engineer or attempt to extract the source code of that software.\",\n\t\t);\n\t}\n\n\treturn {\n\t\tid: \"tos-intellectual-property\",\n\t\ttitle: \"Intellectual Property\",\n\t\tbody: lines.join(\"\\n\\n\"),\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildIntroduction(config: TermsOfServiceConfig): PolicySection {\n\tconst privacyLine = config.privacyPolicyUrl\n\t\t? `\\n\\nFor information about how we collect and use your data, please review our [Privacy Policy](${config.privacyPolicyUrl}).`\n\t\t: \"\";\n\n\treturn {\n\t\tid: \"tos-introduction\",\n\t\ttitle: \"Terms of Service\",\n\t\tbody: `These Terms of Service (\"Terms\") govern your access to and use of the services provided by ${config.company.name} (\"${config.company.name}\", \"we\", \"us\", or \"our\"). By using our services, you agree to these Terms.\n\n**Effective Date:** ${config.effectiveDate}${privacyLine}`,\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildLimitationOfLiability(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.limitationOfLiability) return null;\n\n\tconst lines: string[] = [];\n\n\tif (config.limitationOfLiability.excludesIndirectDamages) {\n\t\tlines.push(\n\t\t\t`TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, ${config.company.legalName.toUpperCase()} SHALL NOT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, OR ANY LOSS OF PROFITS OR REVENUES, WHETHER INCURRED DIRECTLY OR INDIRECTLY, OR ANY LOSS OF DATA, USE, GOODWILL, OR OTHER INTANGIBLE LOSSES.`,\n\t\t);\n\t}\n\n\tif (config.limitationOfLiability.liabilityCap) {\n\t\tlines.push(\n\t\t\t`**Liability Cap:** ${config.limitationOfLiability.liabilityCap}`,\n\t\t);\n\t}\n\n\treturn {\n\t\tid: \"tos-limitation-of-liability\",\n\t\ttitle: \"Limitation of Liability\",\n\t\tbody: lines.join(\"\\n\\n\"),\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildPayments(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.payments || !config.payments.hasPaidFeatures) return null;\n\n\tconst lines: string[] = [\n\t\t\"Some features of our services require payment. By selecting a paid plan, you agree to pay all applicable fees.\",\n\t];\n\n\tif (config.payments.refundPolicy) {\n\t\tlines.push(`**Refunds:** ${config.payments.refundPolicy}`);\n\t}\n\n\tif (config.payments.priceChangesNotice) {\n\t\tlines.push(`**Price Changes:** ${config.payments.priceChangesNotice}`);\n\t}\n\n\treturn {\n\t\tid: \"tos-payments\",\n\t\ttitle: \"Payments and Billing\",\n\t\tbody: lines.join(\"\\n\\n\"),\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildProhibitedUse(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.prohibitedUses || config.prohibitedUses.length === 0) return null;\n\n\tconst list = config.prohibitedUses.map((u) => `- ${u}`).join(\"\\n\");\n\n\treturn {\n\t\tid: \"tos-prohibited-use\",\n\t\ttitle: \"Prohibited Uses\",\n\t\tbody: `You agree not to use our services for any of the following purposes:\\n\\n${list}`,\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildTermination(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.termination) return null;\n\n\tconst { companyCanTerminate, userCanTerminate, effectOfTermination } =\n\t\tconfig.termination;\n\n\tconst lines: string[] = [];\n\n\tif (companyCanTerminate) {\n\t\tlines.push(\n\t\t\t`${config.company.name} may suspend or terminate your access to the services at any time, with or without cause, and with or without notice.`,\n\t\t);\n\t}\n\n\tif (userCanTerminate) {\n\t\tlines.push(\n\t\t\t\"You may terminate your account at any time by discontinuing use of our services or by contacting us to close your account.\",\n\t\t);\n\t}\n\n\tif (effectOfTermination) {\n\t\tlines.push(`**Effect of Termination:** ${effectOfTermination}`);\n\t}\n\n\treturn {\n\t\tid: \"tos-termination\",\n\t\ttitle: \"Termination\",\n\t\tbody: lines.join(\"\\n\\n\"),\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildThirdPartyServices(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.thirdPartyServices || config.thirdPartyServices.length === 0)\n\t\treturn null;\n\n\tconst list = config.thirdPartyServices\n\t\t.map((s) => `- **${s.name}** — ${s.purpose}`)\n\t\t.join(\"\\n\");\n\n\treturn {\n\t\tid: \"tos-third-party-services\",\n\t\ttitle: \"Third-Party Services\",\n\t\tbody: `Our services may integrate with or link to third-party services. Your use of those services is governed by their own terms and policies.\\n\\n${list}`,\n\t};\n}\n","import type { PolicySection, TermsOfServiceConfig } from \"../../types\";\n\nexport function buildUserContent(\n\tconfig: TermsOfServiceConfig,\n): PolicySection | null {\n\tif (!config.userContent) return null;\n\n\tconst {\n\t\tusersOwnContent,\n\t\tlicenseGrantedToCompany,\n\t\tlicenseDescription,\n\t\tcompanyCanRemoveContent,\n\t} = config.userContent;\n\n\tconst lines: string[] = [];\n\n\tif (usersOwnContent) {\n\t\tlines.push(\n\t\t\t'You retain ownership of any content you submit, post, or display on or through our services (\"User Content\").',\n\t\t);\n\t}\n\n\tif (licenseGrantedToCompany) {\n\t\tconst desc = licenseDescription\n\t\t\t? licenseDescription\n\t\t\t: \"a worldwide, royalty-free, non-exclusive license to use, reproduce, modify, and distribute your User Content in connection with operating and improving our services\";\n\t\tlines.push(\n\t\t\t`By submitting User Content, you grant ${config.company.name} ${desc}.`,\n\t\t);\n\t}\n\n\tif (companyCanRemoveContent) {\n\t\tlines.push(\n\t\t\t`${config.company.name} reserves the right to remove any User Content that violates these Terms or that we find objectionable, at our sole discretion.`,\n\t\t);\n\t}\n\n\treturn {\n\t\tid: \"tos-user-content\",\n\t\ttitle: \"User Content\",\n\t\tbody: lines.join(\"\\n\\n\"),\n\t};\n}\n","import { renderHTML } from \"./renderers/html\";\nimport { renderMarkdown } from \"./renderers/markdown\";\nimport { buildAcceptance } from \"./templates/terms/acceptance\";\nimport { buildAccounts } from \"./templates/terms/accounts\";\nimport { buildAvailability } from \"./templates/terms/availability\";\nimport { buildChangesToTerms } from \"./templates/terms/changes-to-terms\";\nimport { buildContact } from \"./templates/terms/contact\";\nimport { buildDisclaimers } from \"./templates/terms/disclaimers\";\nimport { buildDisputeResolution } from \"./templates/terms/dispute-resolution\";\nimport { buildEligibility } from \"./templates/terms/eligibility\";\nimport { buildGoverningLaw } from \"./templates/terms/governing-law\";\nimport { buildIndemnification } from \"./templates/terms/indemnification\";\nimport { buildIntellectualProperty } from \"./templates/terms/intellectual-property\";\nimport { buildIntroduction } from \"./templates/terms/introduction\";\nimport { buildLimitationOfLiability } from \"./templates/terms/limitation-of-liability\";\nimport { buildPayments } from \"./templates/terms/payments\";\nimport { buildProhibitedUse } from \"./templates/terms/prohibited-use\";\nimport { buildTermination } from \"./templates/terms/termination\";\nimport { buildThirdPartyServices } from \"./templates/terms/third-party-services\";\nimport { buildUserContent } from \"./templates/terms/user-content\";\nimport type {\n\tCompileOptions,\n\tOutputFormat,\n\tPolicySection,\n\tTermsOfServiceConfig,\n} from \"./types\";\n\nconst SECTION_BUILDERS: ((\n\tconfig: TermsOfServiceConfig,\n) => PolicySection | null)[] = [\n\tbuildIntroduction,\n\tbuildAcceptance,\n\tbuildEligibility,\n\tbuildAccounts,\n\tbuildProhibitedUse,\n\tbuildUserContent,\n\tbuildIntellectualProperty,\n\tbuildPayments,\n\tbuildAvailability,\n\tbuildTermination,\n\tbuildDisclaimers,\n\tbuildLimitationOfLiability,\n\tbuildIndemnification,\n\tbuildThirdPartyServices,\n\tbuildDisputeResolution,\n\tbuildGoverningLaw,\n\tbuildChangesToTerms,\n\tbuildContact,\n];\n\nexport function compileTermsOfService(\n\tconfig: TermsOfServiceConfig,\n\toptions: CompileOptions = { formats: [\"markdown\"] },\n): { format: OutputFormat; content: string; sections: PolicySection[] }[] {\n\tconst sections = SECTION_BUILDERS.map((builder) => builder(config)).filter(\n\t\t(s): s is PolicySection => s !== null,\n\t);\n\n\treturn options.formats.map((format) => {\n\t\tswitch (format) {\n\t\t\tcase \"markdown\":\n\t\t\t\treturn { format, content: renderMarkdown(sections), sections };\n\t\t\tcase \"html\":\n\t\t\t\treturn { format, content: renderHTML(sections), sections };\n\t\t\tcase \"pdf\":\n\t\t\t\tthrow new Error(\"pdf format is not yet implemented\");\n\t\t\tcase \"jsx\":\n\t\t\t\tthrow new Error(\"jsx format is not yet implemented\");\n\t\t\tdefault:\n\t\t\t\tthrow new Error(`Unsupported format: ${format}`);\n\t\t}\n\t});\n}\n","import type { PrivacyPolicyConfig, ValidationIssue } from \"./types\";\n\nexport function validatePrivacyPolicy(\n\tconfig: PrivacyPolicyConfig,\n): ValidationIssue[] {\n\tconst issues: ValidationIssue[] = [];\n\n\t// Required fields\n\tif (!config.effectiveDate)\n\t\tissues.push({ level: \"error\", message: \"effectiveDate is required\" });\n\tif (!config.company.name)\n\t\tissues.push({ level: \"error\", message: \"company.name is required\" });\n\tif (!config.company.legalName)\n\t\tissues.push({ level: \"error\", message: \"company.legalName is required\" });\n\tif (!config.company.address)\n\t\tissues.push({ level: \"error\", message: \"company.address is required\" });\n\tif (!config.company.contact)\n\t\tissues.push({ level: \"error\", message: \"company.contact is required\" });\n\tif (Object.keys(config.dataCollected).length === 0)\n\t\tissues.push({\n\t\t\tlevel: \"error\",\n\t\t\tmessage: \"dataCollected must have at least one entry\",\n\t\t});\n\tif (config.userRights.length === 0)\n\t\tissues.push({\n\t\t\tlevel: \"warning\",\n\t\t\tmessage: \"userRights is empty — consider listing applicable rights\",\n\t\t});\n\n\t// GDPR checks\n\tif (config.jurisdictions.includes(\"eu\")) {\n\t\tif (!config.legalBasis)\n\t\t\tissues.push({ level: \"error\", message: \"GDPR requires a legalBasis\" });\n\t\tfor (const right of [\n\t\t\t\"access\",\n\t\t\t\"rectification\",\n\t\t\t\"erasure\",\n\t\t\t\"portability\",\n\t\t\t\"restriction\",\n\t\t\t\"objection\",\n\t\t]) {\n\t\t\tif (!config.userRights.includes(right))\n\t\t\t\tissues.push({\n\t\t\t\t\tlevel: \"warning\",\n\t\t\t\t\tmessage: `GDPR recommends including the \"${right}\" right`,\n\t\t\t\t});\n\t\t}\n\t}\n\n\t// CCPA checks\n\tif (config.jurisdictions.includes(\"ca\")) {\n\t\tfor (const right of [\n\t\t\t\"access\",\n\t\t\t\"erasure\",\n\t\t\t\"opt_out_sale\",\n\t\t\t\"non_discrimination\",\n\t\t]) {\n\t\t\tif (!config.userRights.includes(right))\n\t\t\t\tissues.push({\n\t\t\t\t\tlevel: \"warning\",\n\t\t\t\t\tmessage: `CCPA recommends including the \"${right}\" right`,\n\t\t\t\t});\n\t\t}\n\t}\n\n\treturn issues;\n}\n","import type { TermsOfServiceConfig, ValidationIssue } from \"./types\";\n\nexport function validateTermsOfService(\n\tconfig: TermsOfServiceConfig,\n): ValidationIssue[] {\n\tconst issues: ValidationIssue[] = [];\n\n\t// Required fields\n\tif (!config.effectiveDate)\n\t\tissues.push({ level: \"error\", message: \"effectiveDate is required\" });\n\tif (!config.company.name)\n\t\tissues.push({ level: \"error\", message: \"company.name is required\" });\n\tif (!config.company.legalName)\n\t\tissues.push({ level: \"error\", message: \"company.legalName is required\" });\n\tif (!config.company.address)\n\t\tissues.push({ level: \"error\", message: \"company.address is required\" });\n\tif (!config.company.contact)\n\t\tissues.push({ level: \"error\", message: \"company.contact is required\" });\n\tif (!config.governingLaw.jurisdiction)\n\t\tissues.push({\n\t\t\tlevel: \"error\",\n\t\t\tmessage: \"governingLaw.jurisdiction is required\",\n\t\t});\n\n\t// Advisory checks\n\tif (!config.disclaimers) {\n\t\tissues.push({\n\t\t\tlevel: \"warning\",\n\t\t\tmessage:\n\t\t\t\t\"disclaimers is missing — consider adding a disclaimer of warranties\",\n\t\t});\n\t}\n\tif (!config.limitationOfLiability) {\n\t\tissues.push({\n\t\t\tlevel: \"warning\",\n\t\t\tmessage:\n\t\t\t\t\"limitationOfLiability is missing — consider adding a limitation of liability clause\",\n\t\t});\n\t}\n\tif (config.acceptance.methods.length === 0) {\n\t\tissues.push({\n\t\t\tlevel: \"warning\",\n\t\t\tmessage:\n\t\t\t\t\"acceptance.methods is empty — consider listing how users accept these Terms\",\n\t\t});\n\t}\n\n\treturn issues;\n}\n","export { compilePrivacyPolicy } from \"./privacy\";\nexport { compileTermsOfService } from \"./terms\";\nexport type {\n\tCompileOptions,\n\tDisputeResolutionMethod,\n\tJurisdiction,\n\tOutputFormat,\n\tPolicyInput,\n\tPolicySection,\n\tPrivacyPolicyConfig,\n\tTermsOfServiceConfig,\n\tValidationIssue,\n} from \"./types\";\nexport { validatePrivacyPolicy } from \"./validate\";\nexport { validateTermsOfService } from \"./validate-terms\";\n\nimport { compilePrivacyPolicy } from \"./privacy\";\nimport { compileTermsOfService } from \"./terms\";\nimport type { CompileOptions, PolicyInput } from \"./types\";\n\nexport function compilePolicy(input: PolicyInput, options?: CompileOptions) {\n\tswitch (input.type) {\n\t\tcase \"privacy\": {\n\t\t\tconst { type: _, ...config } = input;\n\t\t\treturn compilePrivacyPolicy(config, options);\n\t\t}\n\t\tcase \"terms\": {\n\t\t\tconst { type: _, ...config } = input;\n\t\t\treturn compileTermsOfService(config, options);\n\t\t}\n\t}\n}\n"],"mappings":";;AAEA,SAAgB,eAAe,UAAmC;AACjE,QAAO,SACL,KAAK,YAAY,MAAM,QAAQ,MAAM,MAAM,QAAQ,OAAO,CAC1D,KAAK,cAAc;;;;ACDtB,SAAgB,WAAW,UAAmC;AAE7D,QAAO,OADU,eAAe,SAAS,CAClB;;;;ACJxB,SAAgB,oBACf,QACuB;AACvB,KAAI,CAAC,OAAO,cAAc,SAAS,KAAK,CAAE,QAAO;AAEjD,QAAO;EACN,IAAI;EACJ,OAAO;EACP,MAAM;;;;;;;;;;yCAUiC,OAAO,QAAQ,QAAQ;EAC9D;;;;ACnBF,SAAgBA,eAAa,QAA4C;AACxE,QAAO;EACN,IAAI;EACJ,OAAO;EACP,MAAM;;IAEJ,OAAO,QAAQ,UAAU;EAC3B,OAAO,QAAQ,QAAQ;;SAEhB,OAAO,QAAQ;EACtB;;;;ACVF,SAAgB,aAAa,QAA4C;CACxE,MAAM,UAAoB,EAAE;AAC5B,KAAI,OAAO,QAAQ,UAClB,SAAQ,KACP,+DACA;AACF,KAAI,OAAO,QAAQ,UAClB,SAAQ,KACP,oFACA;AACF,KAAI,OAAO,QAAQ,UAClB,SAAQ,KACP,kEACA;AAOF,QAAO;EACN,IAAI;EACJ,OAAO;EACP,MAPA,QAAQ,SAAS,IACd,uEAAuE,QAAQ,KAAK,MAAM,KAAK,IAAI,CAAC,KAAK,KAAK,KAC9G;EAMH;;;;ACxBF,SAAgB,mBAAmB,QAA4C;AAO9E,QAAO;EACN,IAAI;EACJ,OAAO;EACP,MAAM,0DATS,OAAO,QAAQ,OAAO,cAAc,CAC9B,KAAK,CAAC,UAAU,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,eAAe,CAAC,MAAM,EAAE,oBAAoB,GAAG,aAAa,CAQ3E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/accounts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,aAAa,CAC5B,MAAM,EAAE,oBAAoB,GAC1B,aAAa,GAAG,IAAI,CAkCtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"availability.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/availability.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,iBAAiB,CAChC,MAAM,EAAE,oBAAoB,GAC1B,aAAa,GAAG,IAAI,CAoBtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changes-to-terms.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/changes-to-terms.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,mBAAmB,CAClC,MAAM,EAAE,oBAAoB,GAC1B,aAAa,GAAG,IAAI,CActB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/contact.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,YAAY,CAAC,MAAM,EAAE,oBAAoB,GAAG,aAAa,CAUxE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disclaimers.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/disclaimers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,gBAAgB,CAC/B,MAAM,EAAE,oBAAoB,GAC1B,aAAa,GAAG,IAAI,CAsBtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dispute-resolution.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/dispute-resolution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,sBAAsB,CACrC,MAAM,EAAE,oBAAoB,GAC1B,aAAa,GAAG,IAAI,CAkCtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eligibility.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/eligibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,gBAAgB,CAC/B,MAAM,EAAE,oBAAoB,GAC1B,aAAa,GAAG,IAAI,CAiBtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"governing-law.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/governing-law.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,oBAAoB,GAAG,aAAa,CAM7E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indemnification.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/indemnification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,oBAAoB,CACnC,MAAM,EAAE,oBAAoB,GAC1B,aAAa,GAAG,IAAI,CAoBtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intellectual-property.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/intellectual-property.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,yBAAyB,CACxC,MAAM,EAAE,oBAAoB,GAC1B,aAAa,GAAG,IAAI,CAwBtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"introduction.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/introduction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,oBAAoB,GAAG,aAAa,CAY7E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limitation-of-liability.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/limitation-of-liability.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,0BAA0B,CACzC,MAAM,EAAE,oBAAoB,GAC1B,aAAa,GAAG,IAAI,CAsBtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payments.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/payments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,aAAa,CAC5B,MAAM,EAAE,oBAAoB,GAC1B,aAAa,GAAG,IAAI,CAoBtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prohibited-use.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/prohibited-use.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,kBAAkB,CACjC,MAAM,EAAE,oBAAoB,GAC1B,aAAa,GAAG,IAAI,CAUtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"termination.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/termination.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,gBAAgB,CAC/B,MAAM,EAAE,oBAAoB,GAC1B,aAAa,GAAG,IAAI,CA6BtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"third-party-services.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/third-party-services.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,uBAAuB,CACtC,MAAM,EAAE,oBAAoB,GAC1B,aAAa,GAAG,IAAI,CAatB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-content.d.ts","sourceRoot":"","sources":["../../../src/templates/terms/user-content.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,gBAAgB,CAC/B,MAAM,EAAE,oBAAoB,GAC1B,aAAa,GAAG,IAAI,CAsCtB"}
|
package/dist/terms.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CompileOptions, OutputFormat, PolicySection, TermsOfServiceConfig } from "./types";
|
|
2
|
+
export declare function compileTermsOfService(config: TermsOfServiceConfig, options?: CompileOptions): {
|
|
3
|
+
format: OutputFormat;
|
|
4
|
+
content: string;
|
|
5
|
+
sections: PolicySection[];
|
|
6
|
+
}[];
|
|
7
|
+
//# sourceMappingURL=terms.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terms.d.ts","sourceRoot":"","sources":["../src/terms.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EACX,cAAc,EACd,YAAY,EACZ,aAAa,EACb,oBAAoB,EACpB,MAAM,SAAS,CAAC;AAyBjB,wBAAgB,qBAAqB,CACpC,MAAM,EAAE,oBAAoB,EAC5B,OAAO,GAAE,cAA0C,GACjD;IAAE,MAAM,EAAE,YAAY,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,aAAa,EAAE,CAAA;CAAE,EAAE,CAmBxE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terms.test.d.ts","sourceRoot":"","sources":["../src/terms.test.ts"],"names":[],"mappings":""}
|
package/dist/types.d.ts
CHANGED
|
@@ -31,9 +31,87 @@ export type PrivacyPolicyConfig = {
|
|
|
31
31
|
userRights: string[];
|
|
32
32
|
jurisdictions: Jurisdiction[];
|
|
33
33
|
};
|
|
34
|
-
export type
|
|
34
|
+
export type DisputeResolutionMethod = "arbitration" | "litigation" | "mediation";
|
|
35
|
+
export type TermsOfServiceConfig = {
|
|
36
|
+
effectiveDate: string;
|
|
37
|
+
company: {
|
|
38
|
+
name: string;
|
|
39
|
+
legalName: string;
|
|
40
|
+
address: string;
|
|
41
|
+
contact: string;
|
|
42
|
+
};
|
|
43
|
+
acceptance: {
|
|
44
|
+
methods: string[];
|
|
45
|
+
};
|
|
46
|
+
eligibility?: {
|
|
47
|
+
minimumAge: number;
|
|
48
|
+
jurisdictionRestrictions?: string[];
|
|
49
|
+
};
|
|
50
|
+
accounts?: {
|
|
51
|
+
registrationRequired: boolean;
|
|
52
|
+
userResponsibleForCredentials: boolean;
|
|
53
|
+
companyCanTerminate: boolean;
|
|
54
|
+
};
|
|
55
|
+
prohibitedUses?: string[];
|
|
56
|
+
userContent?: {
|
|
57
|
+
usersOwnContent: boolean;
|
|
58
|
+
licenseGrantedToCompany: boolean;
|
|
59
|
+
licenseDescription?: string;
|
|
60
|
+
companyCanRemoveContent: boolean;
|
|
61
|
+
};
|
|
62
|
+
intellectualProperty?: {
|
|
63
|
+
companyOwnsService: boolean;
|
|
64
|
+
usersMayNotCopy: boolean;
|
|
65
|
+
};
|
|
66
|
+
payments?: {
|
|
67
|
+
hasPaidFeatures: boolean;
|
|
68
|
+
refundPolicy?: string;
|
|
69
|
+
priceChangesNotice?: string;
|
|
70
|
+
};
|
|
71
|
+
availability?: {
|
|
72
|
+
noUptimeGuarantee: boolean;
|
|
73
|
+
maintenanceWindows?: string;
|
|
74
|
+
};
|
|
75
|
+
termination?: {
|
|
76
|
+
companyCanTerminate: boolean;
|
|
77
|
+
userCanTerminate: boolean;
|
|
78
|
+
effectOfTermination?: string;
|
|
79
|
+
};
|
|
80
|
+
disclaimers?: {
|
|
81
|
+
serviceProvidedAsIs: boolean;
|
|
82
|
+
noWarranties: boolean;
|
|
83
|
+
};
|
|
84
|
+
limitationOfLiability?: {
|
|
85
|
+
excludesIndirectDamages: boolean;
|
|
86
|
+
liabilityCap?: string;
|
|
87
|
+
};
|
|
88
|
+
indemnification?: {
|
|
89
|
+
userIndemnifiesCompany: boolean;
|
|
90
|
+
scope?: string;
|
|
91
|
+
};
|
|
92
|
+
thirdPartyServices?: {
|
|
93
|
+
name: string;
|
|
94
|
+
purpose: string;
|
|
95
|
+
}[];
|
|
96
|
+
disputeResolution?: {
|
|
97
|
+
method: DisputeResolutionMethod;
|
|
98
|
+
venue?: string;
|
|
99
|
+
classActionWaiver?: boolean;
|
|
100
|
+
};
|
|
101
|
+
governingLaw: {
|
|
102
|
+
jurisdiction: string;
|
|
103
|
+
};
|
|
104
|
+
changesPolicy?: {
|
|
105
|
+
noticeMethod: string;
|
|
106
|
+
noticePeriodDays?: number;
|
|
107
|
+
};
|
|
108
|
+
privacyPolicyUrl?: string;
|
|
109
|
+
};
|
|
110
|
+
export type PolicyInput = ({
|
|
35
111
|
type: "privacy";
|
|
36
|
-
} & PrivacyPolicyConfig
|
|
112
|
+
} & PrivacyPolicyConfig) | ({
|
|
113
|
+
type: "terms";
|
|
114
|
+
} & TermsOfServiceConfig);
|
|
37
115
|
export type ValidationIssue = {
|
|
38
116
|
level: "error" | "warning";
|
|
39
117
|
message: string;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC;AAE/D,MAAM,MAAM,cAAc,GAAG;IAAE,OAAO,EAAE,YAAY,EAAE,CAAA;CAAE,CAAC;AAEzD,MAAM,MAAM,aAAa,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,OAAO,CAAC;AAEtE,MAAM,MAAM,mBAAmB,GAAG;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,OAAO,EAAE;QAAE,SAAS,EAAE,OAAO,CAAC;QAAC,SAAS,EAAE,OAAO,CAAC;QAAC,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC;IACxE,YAAY,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAClD,UAAU,EA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ate-terms.d.ts","sourceRoot":"","sources":["../src/validate-terms.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAErE,wBAAgB,sBAAsB,CACrC,MAAM,EAAE,oBAAoB,GAC1B,eAAe,EAAE,CA4CnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-terms.test.d.ts","sourceRoot":"","sources":["../src/validate-terms.test.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openpolicy/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Core package for OpenPolicy",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,12 +20,15 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
|
-
"dev": "
|
|
24
|
-
"build": "
|
|
23
|
+
"dev": "rolldown -c --watch",
|
|
24
|
+
"build": "rolldown -c",
|
|
25
25
|
"check-types": "tsc --noEmit",
|
|
26
26
|
"test": "bun test"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@openpolicy/tooling": "workspace:*"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"marked": "^17.0.4"
|
|
30
33
|
}
|
|
31
34
|
}
|