play data-safety: write the conditional required rows (PSL_ACCOUNT_DELETION_URL from accounts.deletionUrl, PSL_SUPPORT_DATA_DELETION_BY_USER from dataSafety.partialDeletion, PSL_DATA_DELETION_URL); a rule table checks every conditional row in check, declarations and --dry before Play answers 400
This commit is contained in:
parent
c9a7f095c4
commit
97ab76e9c8
14 changed files with 295 additions and 24 deletions
|
|
@ -85,13 +85,23 @@ export interface DataSafety {
|
|||
deletionRequest: boolean;
|
||||
/** Response ids for PSL_SUPPORTED_ACCOUNT_CREATION_METHODS. Default ["PSL_ACM_NONE"] (no accounts). */
|
||||
accountCreation?: string[];
|
||||
/**
|
||||
* Play "Do you provide a way for users to request that some or all of their data is deleted, without requiring them
|
||||
* to delete their account?" (PSL_SUPPORT_DATA_DELETION_BY_USER). Play requires it once accountCreation is not
|
||||
* PSL_ACM_NONE. Only the owner knows the answer: leave it out and `check` / `play data-safety --dry` say it is missing.
|
||||
*/
|
||||
partialDeletion?: boolean;
|
||||
/** Web page for that data-only deletion (PSL_DATA_DELETION_URL, required when partialDeletion is true). Default:
|
||||
* accounts.deletionUrl, when that page also lets people delete data without deleting the account. */
|
||||
partialDeletionUrl?: string;
|
||||
/** Play data type id (e.g. "PSL_DEVICE_ID") -> usage. Types not listed are "not collected". */
|
||||
data: Record<string, DataUsage>;
|
||||
/**
|
||||
* Extra CSV rows for questions storebound does not model, appended as they are. Google does not publish every
|
||||
* question id (e.g. the delete-account URL asked when accountCreation is not PSL_ACM_NONE): export the form from
|
||||
* Play Console (App content > Data safety > Export to CSV), copy the exact ids from it, e.g.
|
||||
* { question: '<id from the export>', value: 'https://example.com/delete-account' }.
|
||||
* Extra CSV rows for questions storebound does not model, appended as they are; a row with the same question id as
|
||||
* a generated row replaces that generated question (every response row of it). Google does not publish every
|
||||
* question id: export the form from Play Console (App content > Data safety > Export to CSV), copy the exact ids
|
||||
* from it, e.g. { question: '<id from the export>', value: '...' }. The delete-account URL is generated from
|
||||
* accounts.deletionUrl (PSL_ACCOUNT_DELETION_URL).
|
||||
*/
|
||||
extra?: { question: string; response?: string; value: string; label?: string }[];
|
||||
}
|
||||
|
|
@ -874,6 +884,8 @@ export function validateConfig(c: unknown): string[] {
|
|||
if (!u.collect?.length) e.push(`dataSafety.data.${t}: at least one collection purpose`);
|
||||
if (u.shared && !u.share?.length) e.push(`dataSafety.data.${t}: shared, so it needs sharing purposes`);
|
||||
}
|
||||
if (cfg.dataSafety.partialDeletion !== undefined && typeof cfg.dataSafety.partialDeletion !== 'boolean') e.push('dataSafety.partialDeletion: true | false');
|
||||
if (cfg.dataSafety.partialDeletionUrl !== undefined && !URL_RE.test(cfg.dataSafety.partialDeletionUrl)) e.push('dataSafety.partialDeletionUrl: must be an https URL');
|
||||
for (const [i, x] of (cfg.dataSafety.extra ?? []).entries()) if (!/^[A-Z][A-Z0-9_:]+$/.test(x?.question ?? '') || typeof x.value !== 'string')
|
||||
e.push(`dataSafety.extra[${i}]: { question: "<PSL_... id from a Play Console export>", value: "..." }`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue