Repository navigation
feat: background file imports and SaaS connections - #19
Merged
Merged
Conversation
db.imports creates an import, uploads its files (S3 multipart parts in parallel with retries, or through the API), previews the mapping with personal-data findings, starts and follows the run; importFiles does it in one call. db.connections lists the connector catalog and push templates and manages connections: create, update, delete, test, preview, sync, runs, pause, resume, field review and webhook token rotation. Both are RushDB Cloud only and listed in CLOUD_ONLY_METHODS. The HTTP clients accept a raw body for uploads.
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.
Client support for the platform's background file imports and SaaS connections (rush-db/platform#36). Both are RushDB Cloud only: in direct mode they throw
CloudOnlyErrorbefore any request is sent.Before publishing
/api/v1/imports,/connectionsand/connectors/specs.importFileswith a CSV and a gzipped NDJSON file.connections.create→test→sync→waiton a Stripe test key.rush-db/mcp-server, whose connection and import tools needdb.connectionsanddb.imports.What
db.imports:create,addFiles,removeFile;upload: an S3 multipart upload that sends parts to presigned URLs in parallel (default 4) with retries, or adirectupload of the bytes through the API;preview: column types, suggested key and links, and personal-data findings withinclude | skip | hashsuggestions;start,get,list,wait,cancel,retry,delete;importFiles, which does all of it in one call with mappings, links between files and progress.Blob/File, bytes, a webReadableStreamor a NodeReadable.db.connections:catalogandpushTemplates(Zapier, Make, n8n);list,get,create,update,delete({ deleteData });test,preview,sync,runs,pause,resume,rotateWebhookToken;fieldsprofiles a stream with personal-data findings, andreviewFieldssaves the choices as an allowlist;connectorId: 'agent') return anagentTokenonce.CLOUD_ONLY_METHODS.docs-referenceis regenerated.imports-and-connections).Testing
pnpm types:checkandpnpm buildpass.pnpm test: 140 passing, 16 skipped (the live-engine suites). That includesimports.spec.ts(13 tests, against a mocked API and S3) andconnections.spec.ts(4), anddirect-engine.spec.tschecks that every new method refuses direct mode.Notes
main, keepingmain's client binding for records and SQL paging (fix: bind transactions, records and models to the client that owns them #15).--disableGitand theblob/mainsource-link template, so the links keep their usual form.