@ucptools/validator 1.0.0 → 1.0.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/.claude/settings.local.json +60 -0
- package/.vercel/README.txt +11 -0
- package/.vercel/project.json +1 -0
- package/dist/cli/index.d.ts +6 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +279 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/compliance/compliance-generator.d.ts +34 -0
- package/dist/compliance/compliance-generator.d.ts.map +1 -0
- package/dist/compliance/compliance-generator.js +320 -0
- package/dist/compliance/compliance-generator.js.map +1 -0
- package/dist/compliance/index.d.ts +8 -0
- package/dist/compliance/index.d.ts.map +1 -0
- package/dist/compliance/index.js +17 -0
- package/dist/compliance/index.js.map +1 -0
- package/dist/compliance/templates.d.ts +34 -0
- package/dist/compliance/templates.d.ts.map +1 -0
- package/{src/compliance/templates.ts → dist/compliance/templates.js} +117 -155
- package/dist/compliance/templates.js.map +1 -0
- package/dist/compliance/types.d.ts +64 -0
- package/dist/compliance/types.d.ts.map +1 -0
- package/dist/compliance/types.js +64 -0
- package/dist/compliance/types.js.map +1 -0
- package/dist/db/index.d.ts +11 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +63 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/schema.d.ts +444 -0
- package/dist/db/schema.d.ts.map +1 -0
- package/dist/db/schema.js +65 -0
- package/dist/db/schema.js.map +1 -0
- package/dist/feed-analyzer/feed-analyzer.d.ts +26 -0
- package/dist/feed-analyzer/feed-analyzer.d.ts.map +1 -0
- package/{src/feed-analyzer/feed-analyzer.ts → dist/feed-analyzer/feed-analyzer.js} +642 -726
- package/dist/feed-analyzer/feed-analyzer.js.map +1 -0
- package/dist/feed-analyzer/index.d.ts +8 -0
- package/dist/feed-analyzer/index.d.ts.map +1 -0
- package/dist/feed-analyzer/index.js +19 -0
- package/dist/feed-analyzer/index.js.map +1 -0
- package/dist/feed-analyzer/types.d.ts +204 -0
- package/dist/feed-analyzer/types.d.ts.map +1 -0
- package/dist/feed-analyzer/types.js +162 -0
- package/dist/feed-analyzer/types.js.map +1 -0
- package/{src/generator/index.ts → dist/generator/index.d.ts} +1 -1
- package/dist/generator/index.d.ts.map +1 -0
- package/dist/generator/index.js +13 -0
- package/dist/generator/index.js.map +1 -0
- package/dist/generator/key-generator.d.ts +24 -0
- package/dist/generator/key-generator.d.ts.map +1 -0
- package/dist/generator/key-generator.js +144 -0
- package/dist/generator/key-generator.js.map +1 -0
- package/dist/generator/profile-builder.d.ts +15 -0
- package/dist/generator/profile-builder.d.ts.map +1 -0
- package/dist/generator/profile-builder.js +338 -0
- package/dist/generator/profile-builder.js.map +1 -0
- package/dist/hosting/artifacts-generator.d.ts +10 -0
- package/dist/hosting/artifacts-generator.d.ts.map +1 -0
- package/{src/hosting/artifacts-generator.ts → dist/hosting/artifacts-generator.js} +191 -241
- package/dist/hosting/artifacts-generator.js.map +1 -0
- package/{src/hosting/index.ts → dist/hosting/index.d.ts} +1 -1
- package/dist/hosting/index.d.ts.map +1 -0
- package/dist/hosting/index.js +10 -0
- package/dist/hosting/index.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +78 -0
- package/dist/index.js.map +1 -0
- package/{src/security/index.ts → dist/security/index.d.ts} +8 -15
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +12 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/security-scanner.d.ts +10 -0
- package/dist/security/security-scanner.d.ts.map +1 -0
- package/dist/security/security-scanner.js +541 -0
- package/dist/security/security-scanner.js.map +1 -0
- package/dist/security/types.d.ts +48 -0
- package/dist/security/types.d.ts.map +1 -0
- package/dist/security/types.js +21 -0
- package/dist/security/types.js.map +1 -0
- package/dist/services/directory.d.ts +104 -0
- package/dist/services/directory.d.ts.map +1 -0
- package/dist/services/directory.js +333 -0
- package/dist/services/directory.js.map +1 -0
- package/dist/simulator/agent-simulator.d.ts +69 -0
- package/dist/simulator/agent-simulator.d.ts.map +1 -0
- package/{src/simulator/agent-simulator.ts → dist/simulator/agent-simulator.js} +650 -941
- package/dist/simulator/agent-simulator.js.map +1 -0
- package/{src/simulator/index.ts → dist/simulator/index.d.ts} +7 -7
- package/dist/simulator/index.d.ts.map +1 -0
- package/dist/simulator/index.js +23 -0
- package/dist/simulator/index.js.map +1 -0
- package/{src/simulator/types.ts → dist/simulator/types.d.ts} +145 -170
- package/dist/simulator/types.d.ts.map +1 -0
- package/dist/simulator/types.js +18 -0
- package/dist/simulator/types.js.map +1 -0
- package/dist/types/generator.d.ts +106 -0
- package/dist/types/generator.d.ts.map +1 -0
- package/dist/types/generator.js +6 -0
- package/dist/types/generator.js.map +1 -0
- package/{src/types/index.ts → dist/types/index.d.ts} +1 -1
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +23 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/ucp-profile.d.ts +103 -0
- package/dist/types/ucp-profile.d.ts.map +1 -0
- package/dist/types/ucp-profile.js +45 -0
- package/dist/types/ucp-profile.js.map +1 -0
- package/dist/types/validation.d.ts +68 -0
- package/dist/types/validation.d.ts.map +1 -0
- package/dist/types/validation.js +32 -0
- package/dist/types/validation.js.map +1 -0
- package/dist/validator/index.d.ts +26 -0
- package/dist/validator/index.d.ts.map +1 -0
- package/dist/validator/index.js +161 -0
- package/dist/validator/index.js.map +1 -0
- package/dist/validator/network-validator.d.ts +28 -0
- package/dist/validator/network-validator.d.ts.map +1 -0
- package/dist/validator/network-validator.js +319 -0
- package/dist/validator/network-validator.js.map +1 -0
- package/dist/validator/rules-validator.d.ts +11 -0
- package/dist/validator/rules-validator.d.ts.map +1 -0
- package/dist/validator/rules-validator.js +257 -0
- package/dist/validator/rules-validator.js.map +1 -0
- package/dist/validator/sdk-validator.d.ts +58 -0
- package/dist/validator/sdk-validator.d.ts.map +1 -0
- package/{src/validator/sdk-validator.ts → dist/validator/sdk-validator.js} +273 -330
- package/dist/validator/sdk-validator.js.map +1 -0
- package/dist/validator/structural-validator.d.ts +11 -0
- package/dist/validator/structural-validator.d.ts.map +1 -0
- package/dist/validator/structural-validator.js +415 -0
- package/dist/validator/structural-validator.js.map +1 -0
- package/package.json +1 -1
- package/publish-output.txt +0 -0
- package/CLAUDE.md +0 -109
- package/api/analyze-feed.js +0 -140
- package/api/badge.js +0 -185
- package/api/benchmark.js +0 -177
- package/api/directory-stats.ts +0 -29
- package/api/directory.ts +0 -73
- package/api/generate-compliance.js +0 -143
- package/api/generate-schema.js +0 -457
- package/api/generate.js +0 -132
- package/api/security-scan.js +0 -133
- package/api/simulate.js +0 -187
- package/api/tsconfig.json +0 -10
- package/api/validate.js +0 -1351
- package/apify-actor/.actor/actor.json +0 -68
- package/apify-actor/.actor/input_schema.json +0 -32
- package/apify-actor/APIFY-STORE-LISTING.md +0 -412
- package/apify-actor/Dockerfile +0 -8
- package/apify-actor/README.md +0 -166
- package/apify-actor/main.ts +0 -111
- package/apify-actor/package.json +0 -17
- package/apify-actor/src/main.js +0 -199
- package/docs/BRAND-IDENTITY.md +0 -238
- package/docs/BRAND-STYLE-GUIDE.md +0 -356
- package/drizzle/0000_black_king_cobra.sql +0 -39
- package/drizzle/meta/0000_snapshot.json +0 -309
- package/drizzle/meta/_journal.json +0 -13
- package/drizzle.config.ts +0 -10
- package/public/.well-known/ucp +0 -25
- package/public/android-chrome-192x192.png +0 -0
- package/public/android-chrome-512x512.png +0 -0
- package/public/apple-touch-icon.png +0 -0
- package/public/brand.css +0 -321
- package/public/directory.html +0 -701
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/guides/bigcommerce.html +0 -743
- package/public/guides/fastucp.html +0 -838
- package/public/guides/magento.html +0 -779
- package/public/guides/shopify.html +0 -726
- package/public/guides/squarespace.html +0 -749
- package/public/guides/wix.html +0 -747
- package/public/guides/woocommerce.html +0 -733
- package/public/index.html +0 -3835
- package/public/learn.html +0 -396
- package/public/logo.jpeg +0 -0
- package/public/og-image-icon.png +0 -0
- package/public/og-image.png +0 -0
- package/public/robots.txt +0 -6
- package/public/site.webmanifest +0 -31
- package/public/sitemap.xml +0 -69
- package/public/social/linkedin-banner-1128x191.png +0 -0
- package/public/social/temp.PNG +0 -0
- package/public/social/x-header-1500x500.png +0 -0
- package/public/verify.html +0 -410
- package/scripts/generate-favicons.js +0 -44
- package/scripts/generate-ico.js +0 -23
- package/scripts/generate-og-image.js +0 -45
- package/scripts/reset-db.ts +0 -77
- package/scripts/seed-db.ts +0 -71
- package/scripts/setup-benchmark-db.js +0 -70
- package/src/api/server.ts +0 -266
- package/src/cli/index.ts +0 -302
- package/src/compliance/compliance-generator.ts +0 -452
- package/src/compliance/index.ts +0 -28
- package/src/compliance/types.ts +0 -170
- package/src/db/index.ts +0 -28
- package/src/db/schema.ts +0 -84
- package/src/feed-analyzer/index.ts +0 -34
- package/src/feed-analyzer/types.ts +0 -354
- package/src/generator/key-generator.ts +0 -124
- package/src/generator/profile-builder.ts +0 -402
- package/src/index.ts +0 -105
- package/src/security/security-scanner.ts +0 -604
- package/src/security/types.ts +0 -55
- package/src/services/directory.ts +0 -434
- package/src/types/generator.ts +0 -140
- package/src/types/ucp-profile.ts +0 -140
- package/src/types/validation.ts +0 -89
- package/src/validator/index.ts +0 -194
- package/src/validator/network-validator.ts +0 -417
- package/src/validator/rules-validator.ts +0 -297
- package/src/validator/structural-validator.ts +0 -476
- package/tests/fixtures/non-compliant-profile.json +0 -25
- package/tests/fixtures/official-sample-profile.json +0 -75
- package/tests/integration/benchmark.test.ts +0 -207
- package/tests/integration/database.test.ts +0 -163
- package/tests/integration/directory-api.test.ts +0 -268
- package/tests/integration/simulate-api.test.ts +0 -230
- package/tests/integration/validate-api.test.ts +0 -269
- package/tests/setup.ts +0 -15
- package/tests/unit/agent-simulator.test.ts +0 -575
- package/tests/unit/compliance-generator.test.ts +0 -374
- package/tests/unit/directory-service.test.ts +0 -272
- package/tests/unit/feed-analyzer.test.ts +0 -517
- package/tests/unit/lint-suggestions.test.ts +0 -423
- package/tests/unit/official-samples.test.ts +0 -211
- package/tests/unit/pdf-report.test.ts +0 -390
- package/tests/unit/sdk-validator.test.ts +0 -531
- package/tests/unit/security-scanner.test.ts +0 -410
- package/tests/unit/validation.test.ts +0 -390
- package/vercel.json +0 -34
- package/vitest.config.ts +0 -22
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* GDPR/Privacy Compliance Generator
|
|
4
|
+
* Generates privacy policy addendums and consent language for agentic commerce
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.generateComplianceDocuments = generateComplianceDocuments;
|
|
8
|
+
exports.getAvailableRegions = getAvailableRegions;
|
|
9
|
+
exports.getLawfulBasisOptions = getLawfulBasisOptions;
|
|
10
|
+
exports.getAiPlatformOptions = getAiPlatformOptions;
|
|
11
|
+
const types_js_1 = require("./types.js");
|
|
12
|
+
const templates_js_1 = require("./templates.js");
|
|
13
|
+
/**
|
|
14
|
+
* Generate complete compliance documentation
|
|
15
|
+
*/
|
|
16
|
+
function generateComplianceDocuments(input) {
|
|
17
|
+
// Validate input
|
|
18
|
+
validateInput(input);
|
|
19
|
+
// Build list of data processors
|
|
20
|
+
const processors = buildProcessorList(input);
|
|
21
|
+
// Generate all sections
|
|
22
|
+
const aiCommerceSection = (0, templates_js_1.generateAiCommerceSection)(input.companyName, processors, input.lawfulBasis, input.regions);
|
|
23
|
+
const processorDisclosures = (0, templates_js_1.generateProcessorDisclosures)(processors, input.regions);
|
|
24
|
+
const consentLanguage = (0, templates_js_1.generateConsentLanguage)(input.companyName, input.lawfulBasis, input.includeMarketingConsent || false);
|
|
25
|
+
const marketingOptIn = input.includeMarketingConsent
|
|
26
|
+
? (0, templates_js_1.generateMarketingOptIn)(input.companyName)
|
|
27
|
+
: undefined;
|
|
28
|
+
const dataSubjectRights = (0, templates_js_1.generateDataSubjectRights)(input.companyName, input.companyEmail || 'privacy@yourcompany.com', input.dpoEmail, input.regions);
|
|
29
|
+
const trackingNotice = (0, templates_js_1.generateTrackingNotice)(input.companyName, input.regions);
|
|
30
|
+
const disclaimer = (0, templates_js_1.generateDisclaimer)();
|
|
31
|
+
// Build the full privacy addendum document
|
|
32
|
+
const privacyAddendum = buildPrivacyAddendum(input, aiCommerceSection, processorDisclosures, dataSubjectRights, trackingNotice, disclaimer);
|
|
33
|
+
// Generate embed HTML
|
|
34
|
+
const embedHtml = generateEmbedHtml(input.companyName, aiCommerceSection, processorDisclosures, dataSubjectRights, trackingNotice, disclaimer);
|
|
35
|
+
// Generate plain text
|
|
36
|
+
const plainText = generatePlainText(input.companyName, aiCommerceSection, processorDisclosures, consentLanguage, marketingOptIn, dataSubjectRights, trackingNotice, disclaimer);
|
|
37
|
+
return {
|
|
38
|
+
privacyAddendum,
|
|
39
|
+
snippets: {
|
|
40
|
+
aiCommerceSection,
|
|
41
|
+
processorDisclosures,
|
|
42
|
+
consentLanguage,
|
|
43
|
+
marketingOptIn,
|
|
44
|
+
dataSubjectRights,
|
|
45
|
+
trackingNotice,
|
|
46
|
+
},
|
|
47
|
+
embedHtml,
|
|
48
|
+
plainText,
|
|
49
|
+
generatedAt: new Date().toISOString(),
|
|
50
|
+
lawfulBasis: input.lawfulBasis,
|
|
51
|
+
regions: input.regions,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Validate generator input
|
|
56
|
+
*/
|
|
57
|
+
function validateInput(input) {
|
|
58
|
+
if (!input.companyName || input.companyName.trim() === '') {
|
|
59
|
+
throw new Error('Company name is required');
|
|
60
|
+
}
|
|
61
|
+
if (!input.regions || input.regions.length === 0) {
|
|
62
|
+
throw new Error('At least one region must be selected');
|
|
63
|
+
}
|
|
64
|
+
if (!input.platforms || input.platforms.length === 0) {
|
|
65
|
+
throw new Error('At least one AI platform must be selected');
|
|
66
|
+
}
|
|
67
|
+
if (!input.lawfulBasis) {
|
|
68
|
+
throw new Error('Lawful basis must be specified');
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Build the list of data processors from input
|
|
73
|
+
*/
|
|
74
|
+
function buildProcessorList(input) {
|
|
75
|
+
const processors = [];
|
|
76
|
+
// Add AI platform processors
|
|
77
|
+
for (const platform of input.platforms) {
|
|
78
|
+
if (platform !== 'other') {
|
|
79
|
+
processors.push(types_js_1.AI_PLATFORM_PROCESSORS[platform]);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
// Add custom processors
|
|
83
|
+
if (input.additionalProcessors) {
|
|
84
|
+
processors.push(...input.additionalProcessors);
|
|
85
|
+
}
|
|
86
|
+
return processors;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Build the full privacy addendum document
|
|
90
|
+
*/
|
|
91
|
+
function buildPrivacyAddendum(input, aiCommerceSection, processorDisclosures, dataSubjectRights, trackingNotice, disclaimer) {
|
|
92
|
+
const sections = [
|
|
93
|
+
{
|
|
94
|
+
id: 'ai-commerce',
|
|
95
|
+
title: 'AI-Powered Shopping and Agentic Commerce',
|
|
96
|
+
content: aiCommerceSection,
|
|
97
|
+
required: true,
|
|
98
|
+
applicableRegions: ['eu', 'uk', 'california', 'global'],
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: 'processors',
|
|
102
|
+
title: 'Third-Party Data Processors',
|
|
103
|
+
content: processorDisclosures,
|
|
104
|
+
required: true,
|
|
105
|
+
applicableRegions: ['eu', 'uk', 'california', 'global'],
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
id: 'rights',
|
|
109
|
+
title: 'Your Data Rights',
|
|
110
|
+
content: dataSubjectRights,
|
|
111
|
+
required: true,
|
|
112
|
+
applicableRegions: ['eu', 'uk', 'california', 'global'],
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
id: 'tracking',
|
|
116
|
+
title: 'Tracking and Cookies',
|
|
117
|
+
content: trackingNotice,
|
|
118
|
+
required: false,
|
|
119
|
+
applicableRegions: ['eu', 'uk', 'global'],
|
|
120
|
+
},
|
|
121
|
+
];
|
|
122
|
+
// Add data retention section if requested
|
|
123
|
+
if (input.includeDataRetention) {
|
|
124
|
+
const retentionYears = input.retentionPeriodYears || 7;
|
|
125
|
+
sections.push({
|
|
126
|
+
id: 'retention',
|
|
127
|
+
title: 'Data Retention',
|
|
128
|
+
content: generateDataRetentionSection(input.companyName, retentionYears, input.regions),
|
|
129
|
+
required: false,
|
|
130
|
+
applicableRegions: ['eu', 'uk', 'california', 'global'],
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
return {
|
|
134
|
+
title: `Privacy Policy Addendum: AI Commerce - ${input.companyName}`,
|
|
135
|
+
sections,
|
|
136
|
+
disclaimer,
|
|
137
|
+
generatedAt: new Date().toISOString(),
|
|
138
|
+
regions: input.regions,
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Generate data retention section
|
|
143
|
+
*/
|
|
144
|
+
function generateDataRetentionSection(companyName, retentionYears, regions) {
|
|
145
|
+
let section = `## Data Retention for AI Commerce Transactions
|
|
146
|
+
|
|
147
|
+
${companyName} retains personal data from AI agent transactions for the following periods:
|
|
148
|
+
|
|
149
|
+
| Data Category | Retention Period | Purpose |
|
|
150
|
+
|--------------|------------------|---------|
|
|
151
|
+
| Order Information | ${retentionYears} years | Legal/tax compliance, warranty claims |
|
|
152
|
+
| Transaction Records | ${retentionYears} years | Financial records, dispute resolution |
|
|
153
|
+
| Delivery Information | 2 years | Customer service, delivery issues |
|
|
154
|
+
| Communication Records | 3 years | Customer support, quality assurance |
|
|
155
|
+
| Payment Confirmations | ${retentionYears} years | Financial audit requirements |
|
|
156
|
+
|
|
157
|
+
### Retention Principles
|
|
158
|
+
|
|
159
|
+
- Data is retained only as long as necessary for the stated purposes
|
|
160
|
+
- We regularly review and delete data that is no longer needed
|
|
161
|
+
- You may request earlier deletion, subject to legal retention requirements
|
|
162
|
+
`;
|
|
163
|
+
if (regions.includes('eu') || regions.includes('uk')) {
|
|
164
|
+
section += `
|
|
165
|
+
### GDPR Storage Limitation
|
|
166
|
+
|
|
167
|
+
In accordance with Article 5(1)(e) of the GDPR, we do not keep personal data for longer than necessary. Retention periods are based on:
|
|
168
|
+
- Contractual obligations
|
|
169
|
+
- Legal requirements (tax, accounting)
|
|
170
|
+
- Legitimate business needs
|
|
171
|
+
- Applicable limitation periods for legal claims
|
|
172
|
+
`;
|
|
173
|
+
}
|
|
174
|
+
return section;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Generate embeddable HTML
|
|
178
|
+
*/
|
|
179
|
+
function generateEmbedHtml(companyName, aiCommerceSection, processorDisclosures, dataSubjectRights, trackingNotice, disclaimer) {
|
|
180
|
+
// Convert markdown to simple HTML
|
|
181
|
+
const convertMarkdown = (md) => {
|
|
182
|
+
return md
|
|
183
|
+
// Headers
|
|
184
|
+
.replace(/^### (.+)$/gm, '<h4>$1</h4>')
|
|
185
|
+
.replace(/^## (.+)$/gm, '<h3>$1</h3>')
|
|
186
|
+
.replace(/^# (.+)$/gm, '<h2>$1</h2>')
|
|
187
|
+
// Bold
|
|
188
|
+
.replace(/\*\*(.+?)\*\*/g, '<strong>$1</strong>')
|
|
189
|
+
// Lists
|
|
190
|
+
.replace(/^- (.+)$/gm, '<li>$1</li>')
|
|
191
|
+
// Blockquotes
|
|
192
|
+
.replace(/^> (.+)$/gm, '<blockquote>$1</blockquote>')
|
|
193
|
+
// Paragraphs
|
|
194
|
+
.replace(/\n\n/g, '</p><p>')
|
|
195
|
+
// Tables (basic)
|
|
196
|
+
.replace(/\|(.+)\|/g, (match) => {
|
|
197
|
+
const cells = match.split('|').filter(c => c.trim());
|
|
198
|
+
return '<tr>' + cells.map(c => `<td>${c.trim()}</td>`).join('') + '</tr>';
|
|
199
|
+
})
|
|
200
|
+
// Links
|
|
201
|
+
.replace(/\[(.+?)\]\((.+?)\)/g, '<a href="$2" target="_blank" rel="noopener">$1</a>');
|
|
202
|
+
};
|
|
203
|
+
return `<!-- AI Commerce Privacy Policy Addendum - Generated by UCP.tools -->
|
|
204
|
+
<div class="ucp-privacy-addendum">
|
|
205
|
+
<style>
|
|
206
|
+
.ucp-privacy-addendum {
|
|
207
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
208
|
+
line-height: 1.6;
|
|
209
|
+
color: #333;
|
|
210
|
+
max-width: 800px;
|
|
211
|
+
}
|
|
212
|
+
.ucp-privacy-addendum h2 { font-size: 1.5em; margin-top: 2em; border-bottom: 2px solid #2E86AB; padding-bottom: 0.5em; }
|
|
213
|
+
.ucp-privacy-addendum h3 { font-size: 1.2em; margin-top: 1.5em; color: #2E86AB; }
|
|
214
|
+
.ucp-privacy-addendum h4 { font-size: 1em; margin-top: 1em; }
|
|
215
|
+
.ucp-privacy-addendum table { width: 100%; border-collapse: collapse; margin: 1em 0; }
|
|
216
|
+
.ucp-privacy-addendum th, .ucp-privacy-addendum td { border: 1px solid #ddd; padding: 8px; text-align: left; }
|
|
217
|
+
.ucp-privacy-addendum th { background: #f5f5f5; }
|
|
218
|
+
.ucp-privacy-addendum blockquote { border-left: 4px solid #2E86AB; margin: 1em 0; padding: 0.5em 1em; background: #f9f9f9; }
|
|
219
|
+
.ucp-privacy-addendum .disclaimer { margin-top: 2em; padding: 1em; background: #fff3cd; border: 1px solid #ffc107; border-radius: 4px; font-size: 0.9em; }
|
|
220
|
+
</style>
|
|
221
|
+
|
|
222
|
+
<h2>Privacy Policy Addendum: AI Commerce</h2>
|
|
223
|
+
<p><em>Effective Date: ${new Date().toLocaleDateString()}</em></p>
|
|
224
|
+
<p>This addendum describes how ${companyName} handles personal data when you make purchases through AI shopping agents.</p>
|
|
225
|
+
|
|
226
|
+
<div class="section">
|
|
227
|
+
${convertMarkdown(aiCommerceSection)}
|
|
228
|
+
</div>
|
|
229
|
+
|
|
230
|
+
<div class="section">
|
|
231
|
+
${convertMarkdown(processorDisclosures)}
|
|
232
|
+
</div>
|
|
233
|
+
|
|
234
|
+
<div class="section">
|
|
235
|
+
${convertMarkdown(dataSubjectRights)}
|
|
236
|
+
</div>
|
|
237
|
+
|
|
238
|
+
<div class="section">
|
|
239
|
+
${convertMarkdown(trackingNotice)}
|
|
240
|
+
</div>
|
|
241
|
+
|
|
242
|
+
<div class="disclaimer">
|
|
243
|
+
${convertMarkdown(disclaimer)}
|
|
244
|
+
</div>
|
|
245
|
+
</div>
|
|
246
|
+
<!-- End AI Commerce Privacy Policy Addendum -->`;
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Generate plain text version
|
|
250
|
+
*/
|
|
251
|
+
function generatePlainText(companyName, aiCommerceSection, processorDisclosures, consentLanguage, marketingOptIn, dataSubjectRights, trackingNotice, disclaimer) {
|
|
252
|
+
const divider = '='.repeat(60);
|
|
253
|
+
let text = `${divider}
|
|
254
|
+
PRIVACY POLICY ADDENDUM: AI COMMERCE
|
|
255
|
+
${companyName}
|
|
256
|
+
Generated: ${new Date().toISOString()}
|
|
257
|
+
${divider}
|
|
258
|
+
|
|
259
|
+
${aiCommerceSection}
|
|
260
|
+
|
|
261
|
+
${divider}
|
|
262
|
+
|
|
263
|
+
${processorDisclosures}
|
|
264
|
+
|
|
265
|
+
${divider}
|
|
266
|
+
|
|
267
|
+
${consentLanguage}
|
|
268
|
+
`;
|
|
269
|
+
if (marketingOptIn) {
|
|
270
|
+
text += `
|
|
271
|
+
${divider}
|
|
272
|
+
|
|
273
|
+
${marketingOptIn}
|
|
274
|
+
`;
|
|
275
|
+
}
|
|
276
|
+
text += `
|
|
277
|
+
${divider}
|
|
278
|
+
|
|
279
|
+
${dataSubjectRights}
|
|
280
|
+
|
|
281
|
+
${divider}
|
|
282
|
+
|
|
283
|
+
${trackingNotice}
|
|
284
|
+
|
|
285
|
+
${divider}
|
|
286
|
+
|
|
287
|
+
${disclaimer}
|
|
288
|
+
`;
|
|
289
|
+
return text;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Get available regions with descriptions
|
|
293
|
+
*/
|
|
294
|
+
function getAvailableRegions() {
|
|
295
|
+
return Object.entries(types_js_1.REGION_NAMES).map(([id, name]) => ({
|
|
296
|
+
id: id,
|
|
297
|
+
name,
|
|
298
|
+
}));
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Get lawful basis options with descriptions
|
|
302
|
+
*/
|
|
303
|
+
function getLawfulBasisOptions() {
|
|
304
|
+
return Object.entries(types_js_1.LAWFUL_BASIS_DESCRIPTIONS).map(([id, info]) => ({
|
|
305
|
+
id,
|
|
306
|
+
...info,
|
|
307
|
+
}));
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Get AI platform options
|
|
311
|
+
*/
|
|
312
|
+
function getAiPlatformOptions() {
|
|
313
|
+
return [
|
|
314
|
+
{ id: 'openai', name: 'OpenAI (ChatGPT Shopping)', description: 'ChatGPT-powered shopping assistant' },
|
|
315
|
+
{ id: 'google', name: 'Google (AI Mode / Gemini)', description: 'Google AI shopping agent' },
|
|
316
|
+
{ id: 'microsoft', name: 'Microsoft (Copilot)', description: 'Microsoft Copilot checkout' },
|
|
317
|
+
{ id: 'other', name: 'Other AI Platforms', description: 'Other AI shopping agents' },
|
|
318
|
+
];
|
|
319
|
+
}
|
|
320
|
+
//# sourceMappingURL=compliance-generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compliance-generator.js","sourceRoot":"","sources":["../../src/compliance/compliance-generator.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AA4BH,kEA8FC;AAkSD,kDAKC;AAKD,sDAUC;AAKD,oDAWC;AAtbD,yCAIoB;AACpB,iDAQwB;AAExB;;GAEG;AACH,SAAgB,2BAA2B,CACzC,KAA+B;IAE/B,iBAAiB;IACjB,aAAa,CAAC,KAAK,CAAC,CAAC;IAErB,g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,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,oBAAoB,EAAE,WAAW,EAAE,0BAA0B,EAAE;KACrF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GDPR/Privacy Compliance Generator Module
|
|
3
|
+
* Generates privacy policy addendums and consent language for agentic commerce
|
|
4
|
+
*/
|
|
5
|
+
export { generateComplianceDocuments, getAvailableRegions, getLawfulBasisOptions, getAiPlatformOptions, } from './compliance-generator.js';
|
|
6
|
+
export type { ComplianceRegion, LawfulBasis, AgentPlatform, ComplianceGeneratorInput, ComplianceGeneratorOutput, ComplianceDocument, ComplianceSection, DataProcessor, } from './types.js';
|
|
7
|
+
export { AI_PLATFORM_PROCESSORS, REGION_NAMES, LAWFUL_BASIS_DESCRIPTIONS, } from './types.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/compliance/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,2BAA2B,EAC3B,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,2BAA2B,CAAC;AAEnC,YAAY,EACV,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,wBAAwB,EACxB,yBAAyB,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,GACd,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,sBAAsB,EACtB,YAAY,EACZ,yBAAyB,GAC1B,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* GDPR/Privacy Compliance Generator Module
|
|
4
|
+
* Generates privacy policy addendums and consent language for agentic commerce
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.LAWFUL_BASIS_DESCRIPTIONS = exports.REGION_NAMES = exports.AI_PLATFORM_PROCESSORS = exports.getAiPlatformOptions = exports.getLawfulBasisOptions = exports.getAvailableRegions = exports.generateComplianceDocuments = void 0;
|
|
8
|
+
var compliance_generator_js_1 = require("./compliance-generator.js");
|
|
9
|
+
Object.defineProperty(exports, "generateComplianceDocuments", { enumerable: true, get: function () { return compliance_generator_js_1.generateComplianceDocuments; } });
|
|
10
|
+
Object.defineProperty(exports, "getAvailableRegions", { enumerable: true, get: function () { return compliance_generator_js_1.getAvailableRegions; } });
|
|
11
|
+
Object.defineProperty(exports, "getLawfulBasisOptions", { enumerable: true, get: function () { return compliance_generator_js_1.getLawfulBasisOptions; } });
|
|
12
|
+
Object.defineProperty(exports, "getAiPlatformOptions", { enumerable: true, get: function () { return compliance_generator_js_1.getAiPlatformOptions; } });
|
|
13
|
+
var types_js_1 = require("./types.js");
|
|
14
|
+
Object.defineProperty(exports, "AI_PLATFORM_PROCESSORS", { enumerable: true, get: function () { return types_js_1.AI_PLATFORM_PROCESSORS; } });
|
|
15
|
+
Object.defineProperty(exports, "REGION_NAMES", { enumerable: true, get: function () { return types_js_1.REGION_NAMES; } });
|
|
16
|
+
Object.defineProperty(exports, "LAWFUL_BASIS_DESCRIPTIONS", { enumerable: true, get: function () { return types_js_1.LAWFUL_BASIS_DESCRIPTIONS; } });
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/compliance/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,qEAKmC;AAJjC,sIAAA,2BAA2B,OAAA;AAC3B,8HAAA,mBAAmB,OAAA;AACnB,gIAAA,qBAAqB,OAAA;AACrB,+HAAA,oBAAoB,OAAA;AActB,uCAIoB;AAHlB,kHAAA,sBAAsB,OAAA;AACtB,wGAAA,YAAY,OAAA;AACZ,qHAAA,yBAAyB,OAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GDPR/Privacy Compliance Templates
|
|
3
|
+
* Template content for privacy policy addendums and consent language
|
|
4
|
+
*/
|
|
5
|
+
import type { ComplianceRegion, LawfulBasis, DataProcessor } from './types.js';
|
|
6
|
+
/**
|
|
7
|
+
* Generate the AI Commerce privacy policy section
|
|
8
|
+
*/
|
|
9
|
+
export declare function generateAiCommerceSection(companyName: string, platforms: DataProcessor[], lawfulBasis: LawfulBasis, regions: ComplianceRegion[]): string;
|
|
10
|
+
/**
|
|
11
|
+
* Generate data processor disclosures
|
|
12
|
+
*/
|
|
13
|
+
export declare function generateProcessorDisclosures(processors: DataProcessor[], regions: ComplianceRegion[]): string;
|
|
14
|
+
/**
|
|
15
|
+
* Generate consent language for checkout
|
|
16
|
+
*/
|
|
17
|
+
export declare function generateConsentLanguage(companyName: string, lawfulBasis: LawfulBasis, includeMarketing: boolean): string;
|
|
18
|
+
/**
|
|
19
|
+
* Generate marketing opt-in text
|
|
20
|
+
*/
|
|
21
|
+
export declare function generateMarketingOptIn(companyName: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Generate data subject rights notice
|
|
24
|
+
*/
|
|
25
|
+
export declare function generateDataSubjectRights(companyName: string, contactEmail: string, dpoEmail: string | undefined, regions: ComplianceRegion[]): string;
|
|
26
|
+
/**
|
|
27
|
+
* Generate tracking/cookie notice for agent transactions
|
|
28
|
+
*/
|
|
29
|
+
export declare function generateTrackingNotice(companyName: string, regions: ComplianceRegion[]): string;
|
|
30
|
+
/**
|
|
31
|
+
* Generate the legal disclaimer
|
|
32
|
+
*/
|
|
33
|
+
export declare function generateDisclaimer(): string;
|
|
34
|
+
//# sourceMappingURL=templates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/compliance/templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG/E;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,aAAa,EAAE,EAC1B,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,gBAAgB,EAAE,GAC1B,MAAM,CAyDR;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,aAAa,EAAE,EAC3B,OAAO,EAAE,gBAAgB,EAAE,GAC1B,MAAM,CA+BR;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,OAAO,GACxB,MAAM,CAyCR;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAuBlE;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,OAAO,EAAE,gBAAgB,EAAE,GAC1B,MAAM,CA4DR;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,gBAAgB,EAAE,GAC1B,MAAM,CAgDR;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAgB3C"}
|