0.3.0 • Published 3 years ago
node-tonic v0.3.0
Node Tonic
A Tonic API wrapper for Node.js
Usage
Installation
npm install node-tonic
or yarn add node-tonic
Creating a client
import Tonic from 'node-tonic';
const tonic = new Tonic({
apiKey: 'XXXXXXXX', // your API key
basePath: 'https://base-tonic-url', // base api url
});
Types
The types are automatically generated from the REST API docs using openapi-typescript package. You can regenerate types by running
npm run generate:types
API
Here is a list of all the Tonic.ai API endpoints along with the corresponding library method. We have not yet implemented all the endpoints in the Tonic REST API. If an endpoint you need is missing please consider submitting a pull request. Reference for the endpoints is available in the API docs.
Endpoint | Client Method |
---|---|
Accounts | |
/accounts/passwordchange | Not Implemented |
/accounts/passwordreset | Not Implemented |
/Accounts | Not Implemented |
Auth | |
/Auth/login | Not Implemented |
/Auth/token_refresh | Not Implemented |
/Auth/apikeys | Not Implemented |
/Auth/apikeys/{id} | Not Implemented |
Collection | |
/Collection | getCollectionNames |
/Collection/full | getCollections |
Comments | |
/Comments | Not Implemented |
/Comments/{commentId} | Not Implemented |
DataSource | |
/DataSource | getDataSource |
/DataSource/minimal | getDataSourceMinimal |
/DataSource/source_db | Not Implemented |
/DataSource/destination_db | Not Implemented |
/DataSource/spark_connection_info | Not Implemented |
/DataSource/delete_fkupload | Not Implemented |
/DataSource/delete_clientkey | Not Implemented |
/DataSource/delete_clientcert | Not Implemented |
/DataSource/delete_rootcert | Not Implemented |
/DataSource/delete_gbqserviceaccount | Not Implemented |
GenerateData | |
/GenerateData | getDataGenerationJobs |
/GenerateData/jobs/{databaseScanId} | getDataGenerationJob |
/GenerateData/start | startDataGenerationJob |
/GenerateData/cancel | cancelDataGenerationJob |
Groups | |
/Groups | Not Implemented |
/Groups/cleanup | Not Implemented |
PiiReport | |
/PiiReport/most_recent_active_or_completed_status | getMostRecentActiveOrCompletedPiiReport |
/PiiReport/cancel | cancelPiiReport |
/PiiReport/start | startPiiReport |
/PiiReport | getPiiReport |
Privacy | |
/Privacy/history | getPrivacyHistory |
/Privacy/privacyforcolumns | getPrivacyForColumns |
/Privacy/piitypeforcolumns | getPiiTypeForColumns |
/Privacy/ignore | ignorePrivacy |
/Privacy/set | setPrivacy |
/Privacy/suggestions | getPrivacySuggestions |
SchemaDiff | |
/SchemaDiff | getSchemaDiff |
/SchemaDiff/resolve | resolveSchemaDiff |
/SchemaDiff/resolve_multiple | resolveMultipleSchemaDiffs |
Table | |
/Table | Not Implemented |
/Table/relationships | Not Implemented |
Users | |
/Users | Not Implemented |
UserSettings | |
/UserSettings | getUserSettings, updateUserSettings |
Version | |
/Version | getVersion |
Webhook | |
/Webhook | Not Implemented |
/Webhook/{webhookId} | Not Implemented |
/Webhook/test | Not Implemented |
Workspace | |
/Workspace | Not Implemented |
/Workspace/{workspaceId}/status | Not Implemented |
/Workspace/{workspaceId} | Not Implemented |
/Workspace/{workspaceId}/replacements/{schema}/{table} | Not Implemented |
/Workspace/{workspaceId}/update_replacements/{schema}/{table} | Not Implemented |
/Workspace/{workspaceId}/rename | Not Implemented |
/Workspace/{workspaceId}/transfer | Not Implemented |
/Workspace/{workspaceId}/copy | Not Implemented |
/Workspace/{workspaceId}/{schema}/{table} | Not Implemented |
/Workspace/{workspaceId}/bulk_table_mode | Not Implemented |
/Workspace/{workspaceId}/shares | Not Implemented |
/Workspace/{workspaceId}/shares/{workspaceShareId} | Not Implemented |
/Workspace/{workspaceId}/users | Not Implemented |
/Workspace/{workspaceId}/subset | Not Implemented |
Contributing
Development
- Clone this repo
npm install
- Build package with
npm run build
or turn on watch mode withnpm run watch
Testing
npm run test
Building
npm run build
If you need to clear the build cache run npm run clean
Publishing
- Update the version in
package.json
- Add a
CHANGELOG
entry - Add reference for new method(s) in this file in the API section
- Commit your changes
- Run
npm pack --dry-run
to see what will be published - Run
npm publish