Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/late-terms-apply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@transcend-io/cli': major
---

Port the multi-identifier preference upload workflow into the monorepo CLI.

This adds `consent configure-preference-upload`, moves `upload-preferences` to the schema-backed parallel worker flow, and includes the supporting receipts state, preference upload skill, and reconcile script.
429 changes: 429 additions & 0 deletions .cursor/skills/preference-data-upload/SKILL.md

Large diffs are not rendered by default.

94 changes: 71 additions & 23 deletions packages/cli/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { buildCommand } from '@stricli/core';
import { ScopeName } from '@transcend-io/privacy-types';

import {
createAuthParameter,
createSombraAuthParameter,
createTranscendUrlParameter,
} from '../../../lib/cli/common-parameters.js';

export const configurePreferenceUploadCommand = buildCommand({
loader: async () => {
const { configurePreferenceUpload } = await import('./impl.js');
return configurePreferenceUpload;
},
parameters: {
flags: {
auth: createAuthParameter({
scopes: [ScopeName.ViewPreferenceStoreSettings, ScopeName.ViewRequestIdentitySettings],
}),
sombraAuth: createSombraAuthParameter(),
transcendUrl: createTranscendUrlParameter(),
directory: {
kind: 'parsed',
parse: String,
brief: 'Path to the directory of CSV files to scan for column headers and unique values',
},
schemaFilePath: {
kind: 'parsed',
parse: String,
brief:
'Path to the config JSON file. Defaults to <directory>/../preference-upload-schema.json',
optional: true,
},
partition: {
kind: 'parsed',
parse: String,
brief: 'The partition key for the preference store',
},
},
},
docs: {
brief: 'Interactively configure the column mapping for preference CSV uploads',
fullDescription: `Interactively configure the column mapping for preference CSV uploads.

Scans ALL CSV files in the given directory to discover every column header
and every unique value per column, then walks through an interactive editor
to build the full mapping config (identifiers, ignored columns, timestamp,
purposes/preferences and their value mappings).

The resulting config JSON is reused by 'upload-preferences' so subsequent
uploads run fully non-interactively.`,
},
});
Loading
Loading