Refresh HiveGrid Cloud reference snapshot

This commit is contained in:
david committed 2026-08-03 15:31:14 +02:00
1 parent 5e99e14772
commit 7f88026f79
5955 files changed
+1177325 -188362

No files matched your search

@@ -38,6 +38,7 @@ export type FieldStrategy =
| "avatar-url"
| "redact"
| "sha256-prefix"
| "sha256-hex"
| "truncate-32";
export type ProfileName = "full-anonymized" | "minimal-anonymized" | "none";
@@ -73,7 +74,7 @@ export const FULL_ANONYMIZED_PROFILE: AnonymizationProfile = {
metadata: "redact",
},
ApiKey: {
name: "truncate-32",
name: "sha256-prefix",
description: "redact",
hash: "sha256-prefix",
prefix: "sha256-prefix",
@@ -91,7 +92,12 @@ export const FULL_ANONYMIZED_PROFILE: AnonymizationProfile = {
// event-shaped payload). Catches plaintext emails and identifiers
// that callers stuff in for debugging.
data: "redact",
description: "truncate-32",
description: "redact",
},
EventWebhookAttempt: {
endpoint: "url-rewrite",
message: "redact",
body: "redact",
},
Log: {
error: "redact",
@@ -101,6 +107,9 @@ export const FULL_ANONYMIZED_PROFILE: AnonymizationProfile = {
fromEmail: "email",
fromName: "full-name",
replyToEmail: "email",
subject: "redact",
htmlBody: "redact",
textBody: "redact",
},
EmailSender: {
fromEmail: "email",
@@ -112,15 +121,42 @@ export const FULL_ANONYMIZED_PROFILE: AnonymizationProfile = {
address: "email",
forwardTo: "email",
},
Email: {
messageId: "sha256-prefix",
subject: "redact",
fromEmail: "email",
fromName: "full-name",
toEmail: "email",
toName: "full-name",
textBody: "redact",
htmlBody: "redact",
},
EmailCc: {
toEmail: "email",
toName: "full-name",
},
EmailAttachment: {
name: "sha256-prefix",
content: "redact",
publicUrl: "url-rewrite",
},
OutboundEmail: {
email: "email",
fromEmail: "email",
fromName: "full-name",
toEmail: "email",
replyToEmail: "email",
subject: "truncate-32",
subject: "redact",
htmlBody: "redact",
textBody: "redact",
},
OutboundEmailClick: {
link: "url-rewrite",
},
EmailSequenceStepDelivery: {
providerMessageId: "sha256-prefix",
errorMessage: "redact",
},
TenantSubscription: {
billingProviderCustomerId: "billing-customer-id",
billingProviderSubscriptionId: "billing-subscription-id",
@@ -136,6 +172,7 @@ export const FULL_ANONYMIZED_PROFILE: AnonymizationProfile = {
apiKey: "redact",
accessToken: "redact",
refreshToken: "redact",
value: "redact",
},
Workflow: {
webhookSecret: "redact",
@@ -143,6 +180,27 @@ export const FULL_ANONYMIZED_PROFILE: AnonymizationProfile = {
WorkflowExecution: {
contextJson: "redact",
errorMessage: "redact",
input: "redact",
output: "redact",
error: "redact",
},
WorkflowBlock: {
description: "redact",
input: "redact",
},
WorkflowBlockCondition: {
value: "redact",
},
WorkflowBlockToBlock: {
condition: "redact",
},
WorkflowInputExample: {
input: "redact",
},
WorkflowBlockExecution: {
input: "redact",
output: "redact",
error: "redact",
},
DataConnection: {
accessToken: "redact",
@@ -167,18 +225,33 @@ export const FULL_ANONYMIZED_PROFILE: AnonymizationProfile = {
SupportTicket: {
// Schema fields are `subject` and `message`, not `title`/`description`
// (the previous map referenced nonexistent fields — see B7 verify).
subject: "truncate-32",
subject: "redact",
message: "redact",
fromEmail: "email",
fromUrl: "url-rewrite",
},
Portal: {
customDomain: "url-rewrite",
domain: "url-rewrite",
},
PortalUser: {
email: "email",
emailNormalized: "email",
firstName: "first-name",
lastName: "last-name",
passwordHash: "null",
privacyNoticeAcknowledgedAt: "null",
privacyNoticeAcknowledgedUrl: "null",
},
PortalSession: {
tokenHash: "sha256-prefix",
ipAddressHash: "sha256-prefix",
},
PortalToken: {
tokenHash: "sha256-hex",
requestedIpHash: "sha256-hex",
},
PortalPage: {
attributes: "redact",
},
NotificationDelivery: {
payload: "redact",
@@ -197,6 +270,55 @@ export const FULL_ANONYMIZED_PROFILE: AnonymizationProfile = {
KnowledgeBase: {
description: "redact",
},
KnowledgeBaseCategory: {
description: "redact",
},
KnowledgeBaseCategorySection: {
description: "redact",
},
KnowledgeBaseArticle: {
description: "redact",
contentDraft: "redact",
contentPublished: "redact",
contentPublishedAsText: "redact",
},
KnowledgeBaseViews: {
userAnalyticsId: "sha256-prefix",
},
KnowledgeBaseArticleViews: {
userAnalyticsId: "sha256-prefix",
},
KnowledgeBaseArticleUpvotes: {
userAnalyticsId: "sha256-prefix",
},
KnowledgeBaseArticleDownvotes: {
userAnalyticsId: "sha256-prefix",
},
AnalyticsUniqueVisitor: {
cookie: "sha256-prefix",
httpReferrer: "url-rewrite",
city: "redact",
fromUrl: "url-rewrite",
},
AnalyticsPageView: {
url: "url-rewrite",
},
AnalyticsEvent: {
label: "redact",
value: "redact",
url: "url-rewrite",
},
OnboardingSessionAction: {
value: "redact",
},
PluginUserConfig: {
configJson: "redact",
},
TenantSubscriptionProduct: {
billingProviderSubscriptionId: "billing-subscription-id",
lagoSubscriptionId: "payment-id-generic",
fromCheckoutSessionId: "payment-id-generic",
},
/**
* Global rows extracted alongside the tenant slice. These rows are
* referenced by tenant-scoped FKs and otherwise break restore into an
@@ -264,25 +386,54 @@ export interface AnonymizationContext {
}
const FIRST_NAMES = [
"Alex", "Sam", "Jordan", "Taylor", "Morgan", "Casey", "Avery", "Riley",
"Quinn", "Reese", "Skyler", "Drew", "Elliot", "Hayden", "Jamie", "Kai",
"Logan", "Parker", "Robin", "Sage", "Tatum", "River", "Phoenix", "Rowan",
"Alex",
"Sam",
"Jordan",
"Taylor",
"Morgan",
"Casey",
"Avery",
"Riley",
"Quinn",
"Reese",
"Skyler",
"Drew",
"Elliot",
"Hayden",
"Jamie",
"Kai",
"Logan",
"Parker",
"Robin",
"Sage",
"Tatum",
"River",
"Phoenix",
"Rowan",
];
const LAST_NAMES = [
"Smith", "Johnson", "Lee", "Patel", "Garcia", "Mueller", "Schmidt", "Nguyen",
"Kim", "Davis", "Brown", "Wilson", "Mendez", "Rossi", "Andersen", "Becker",
"Smith",
"Johnson",
"Lee",
"Patel",
"Garcia",
"Mueller",
"Schmidt",
"Nguyen",
"Kim",
"Davis",
"Brown",
"Wilson",
"Mendez",
"Rossi",
"Andersen",
"Becker",
];
const STREET_NAMES = [
"Main", "Oak", "Pine", "Maple", "Elm", "Cedar", "Birch", "Willow", "Cherry",
"Hauptstrasse", "Bahnhofstrasse",
];
const STREET_NAMES = ["Main", "Oak", "Pine", "Maple", "Elm", "Cedar", "Birch", "Willow", "Cherry", "Hauptstrasse", "Bahnhofstrasse"];
const CITIES = [
"Springfield", "Riverton", "Oakville", "Lakeside", "Hillview", "Mapleton",
"Pinehurst", "Bergstadt", "Seedorf",
];
const CITIES = ["Springfield", "Riverton", "Oakville", "Lakeside", "Hillview", "Mapleton", "Pinehurst", "Bergstadt", "Seedorf"];
const COUNTRIES = ["AT", "DE", "CH", "NL", "PT", "IE", "FI", "SE"];
@@ -295,7 +446,7 @@ export function anonymizeRow(
profile: AnonymizationProfile,
modelName: string,
row: Record<string, unknown>,
ctx: AnonymizationContext,
ctx: AnonymizationContext
): Record<string, unknown> {
const mapping = profile[modelName];
if (!mapping) return { ...row };
@@ -310,11 +461,7 @@ export function anonymizeRow(
}
/** Apply a single field strategy. Exported for unit tests. */
export function applyStrategy(
strategy: FieldStrategy,
value: unknown,
ctx: AnonymizationContext,
): unknown {
export function applyStrategy(strategy: FieldStrategy, value: unknown, ctx: AnonymizationContext): unknown {
switch (strategy) {
case "keep":
return value;
@@ -359,6 +506,8 @@ export function applyStrategy(
return `https://anonymized.test/avatar/${seededHex(value, ctx, 8)}.png`;
case "sha256-prefix":
return `anon-${seedHex(stringify(value), ctx).slice(0, 16)}`;
case "sha256-hex":
return seedHex(stringify(value), ctx);
case "truncate-32": {
const s = stringify(value);
return s.length > 32 ? `${s.slice(0, 29)}...` : s;