Add configure-preference-upload CLI command#41
Open
michaelfarrell76 wants to merge 13 commits into
Open
Conversation
@transcend-io/cli
@transcend-io/privacy-types
@transcend-io/sdk
@transcend-io/utils
commit: |
- FileFormatState codec (schema-only CSV column mapping) - RequestUploadReceipts codec (upload progress tracking) - loadReferenceData (fetches purposes, topics, identifiers in parallel) - getPreferenceIdentifiersFromRow + getUniquePreferenceIdentifierNamesFromRow - Tests for both identifier helpers Made-with: Cursor
3 tasks
d86e008 to
9261b61
Compare
…sFromRow Made-with: Cursor
Introduces a new interactive command for configuring the column mapping for preference CSV uploads. Scans all CSV files in a directory to discover headers and unique values, then walks through an interactive wizard to build the full mapping config (identifiers, timestamps, purpose/preference value mappings, metadata). SDK additions: - FileFormatState codec (schema-only file format, no upload receipts) - RequestUploadReceipts codec - getPreferenceIdentifiersFromRow helper - loadReferenceData (fetches purposes, topics, identifiers in parallel) CLI additions: - configure-preference-upload command + implementation - parsePreferenceFileFormatFromCsv (timestamp column selection) - parsePreferenceIdentifiersInteractive (multi-identifier column mapping) - parsePreferenceAndPurposeValuesInteractive (purpose/preference value mapping) Made-with: Cursor
Extract getPreferenceIdentifiersFromRow and getUniquePreferenceIdentifierNamesFromRow into their own modules. Made-with: Cursor
…upload dir Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
…port Made-with: Cursor
… rule Made-with: Cursor
Made-with: Cursor
9261b61 to
06f3f54
Compare
…ions - Import NONE_PREFERENCE_MAP from parsePreferenceTimestampsFromCsv instead of redefining - Add @deprecated to parsePreferenceIdentifiersFromCsv (use parsePreferenceIdentifiersInteractive) - Add @deprecated to parsePreferenceAndPurposeValuesFromCsv (use parsePreferenceAndPurposeValuesInteractive) - Add @deprecated to parsePreferenceTimestampsFromCsv (use parsePreferenceFileFormatFromCsv) Made-with: Cursor
Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
transcend consent configure-preference-uploadCLI command that interactively configures the column mapping for preference CSV uploadsupload-preferencesfor fully non-interactive uploadsSDK additions
FileFormatStatecodec — schema-only file format type (identifiers, purposes, timestamps, metadata) without upload receiptsRequestUploadReceiptscodec — upload receipt tracking typegetPreferenceIdentifiersFromRow— extracts identifiers from a CSV row given a column-to-identifier mappingloadReferenceData— fetches purposes, preference topics, and identifiers from the org in parallelCLI additions
configure-preference-uploadcommand + implementationparsePreferenceFileFormatFromCsv— interactive timestamp column selection usingFileFormatStateparsePreferenceIdentifiersInteractive— multi-identifier column mapping withFileFormatStateparsePreferenceAndPurposeValuesInteractive— purpose/preference value mapping withFileFormatStateTest plan
pnpm run --dir packages/sdk build && pnpm run --dir packages/cli build)upload-preferencescommand still works (no breaking changes to existing types/exports)transcend consent configure-preference-uploadagainst a directory of CSV filesMade with Cursor