PermuteDocs
Go to Permute

Developers

Changelog

SDK and public API releases, with changes and upgrade guidance for developers building on Permute.

0.6.0: App resource grants

Inspect and manage app permissions with client.apps.listGrants() and client.apps.setGrant(). Grants use the existing resource permission model, including read/write/admin levels, resource-type wildcards, table scope, and expiry. Each app request must satisfy both the app’s grants and the signed-in user’s permissions. Grant changes apply without republishing (including to existing sessions).

typescript
// Use a trusted management client, never an API key in browser code.
await client.apps.setGrant(appId, databaseId, { level: 'read' });
await client.apps.setGrant(appId, actionId, { level: 'write' });
const grants = await client.apps.listGrants(appId);

// Revoke the app's access to this database.
await client.apps.setGrant(appId, databaseId, { level: null });

Breaking authoring change: remove sourceIds from client.apps.saveSite() requests and deployApp() options. Approve source read grants instead. Browser query requests still use sourceIds to select data; their interface is unchanged. Action bindings still pin exact revisions and require separate invocation grants. Publishing or restoring an app never creates permissions.

Adding grants requires app admin and the corresponding permission-management authority for the target. App sessions support queries and action invocation; grants alone do not enable other API routes. See the app grants guide for approval and revocation.

bash
bun add @permute/sdk@^0.6.0

0.5.0: Deploy a build directory

The new @permute/sdk/deploy entry for Node and Bun validates a local build, uploads its files, saves a draft, and publishes through the existing versioning API. It preserves omitted source and action bindings, checks concurrent changes, and requires an explicit draft ref before replacing unpublished work. Identical published builds return changed: false without uploads or writes (including unchanged bindings).

typescript
import { deployApp } from '@permute/sdk/deploy';

const result = await deployApp(client, { appId, directory: './dist' });
console.log(result.url, result.revisionId, result.changed);

Build locally and wait for app hosting to become live before calling the helper. It does not provision hosting or retry mutations. See the app deployment guide for draft conflicts, publication recovery, and retaining an uncertain action request across sign-in or a newer app release. Existing SDK entry points remain compatible.

bash
bun add @permute/sdk@^0.5.0

0.4.0: Hosted apps, business actions, and schema versions

Deploy static frontends with client.apps: upload compiled files, save a complete manifest, and publish through client.revisions. Visitors use Permute sign-in. The new @permute/sdk/app browser entry queries declared sources and invokes pinned action revisions using that session (no API key in browser code). See the app guide.

Author and invoke typed handlers with client.actions, including approved database table and connector bindings. Actions have their own drafts, publication, and invocation permissions. Follow the business action guide for creation through execution and retry rules.

Database changes when upgrading from 0.3.x

Read and save complete table definitions with client.databases.definition() and client.databases.saveDefinition(), then publish through client.revisions. Published schemas support adding tables; existing tables cannot be changed or removed. Schema history does not include record data.

Breaking behavior: client.databases.createTable() now saves a draft and returns its revisionId. Publish the database before using the table. Direct client.databases.transact() calls require database admin permission; use an approved business action for delegated writes. The database guide includes the save and publish sequence.

Write syncs and query timings

Configure destinations, capture previews, publish, pause, and inspect delivery with client.writeSyncs. Publishing an approved preview starts external delivery and enables scheduled captures. See the write sync guide. Query responses also include timing details for source validation, initialization, loading, and SQL execution.

Inspect sources with client.sources.listTables() and client.sources.describeTable() before writing queries. Generated provider types and Providers constants now include TikTok Ads.

bash
bun add @permute/sdk@^0.4.0

0.3.0: Hosted connector setup and SDK constants

Create customer connection links with client.connectorSessions.create() and check completion with client.connectorSessions.get(). Select a provider with constants such as Providers.HUBSPOT, or pass only connectorId to reconnect an existing source. See the hosted connector setup guide.

Breaking change: context constant names

The CONTEXT export is renamed to Context, and its keys are now uppercase. Update imports and references when upgrading from 0.2.x (for example, CONTEXT.QuickBooks becomes Context.QUICKBOOKS, and CONTEXT.HubSpot becomes Context.HUBSPOT). The old export is removed; string values and stored dataset context are unchanged.

typescript
import { Context, Providers } from '@permute/sdk';

const dataset = await client.datasets.create({
  type: 'custom',
  key: 'quickbooks',
  name: 'QuickBooks',
  context: [Context.QUICKBOOKS],
});

const session = await client.connectorSessions.create({
  provider: Providers.QUICKBOOKS,
});

Context names dataset context identifiers; Providers selects connector providers. Dataset context still accepts other string identifiers.

0.2.0: Databases, Data Flows, and business context

This SDK release adds managed database access and tools to author, run, and publish data workflows. Business context and revision controls are also available through the public API (subject to your API key’s permissions).

Managed databases

Use client.databases to create and inspect databases, define tables, read records, and submit transactions that insert, update, or delete records. Database creation requires an eligible Enterprise plan and database creation admin permission. Provisioning is asynchronous; read the database status before using it. Updates and deletes require the record’s version token to reject stale writes.

Data Flows and operations

Create Data Flows, connect their processing steps, and save operation code through client.dataFlows and client.operations. Run drafts and inspect completed output before publishing. Operations also support schedules and pause/resume controls; pausing preserves the schedule, and scheduling does not publish draft code. Follow the Data Flow guide for a complete example.

Facts and skills

Manage organization facts with client.facts, including business definitions, formulas, and baselines. Use client.skills for shared workspace instructions and client.organizationSkills for shared organization instructions. Facts require an organization-scoped request. The business context guide covers both interfaces.

Revision controls and dashboard source

Use client.revisions to inspect saved history, read earlier revisions, restore drafts, and publish supported resources. Check the returned capabilities before restoring or publishing; Data Flow roots support publication but have no graph history. Restoring an operation does not run or publish it. See the restore and publish guide.

Read and replace an existing dashboard’s TSX source through client.dashboards. Dashboard source saves take effect immediately. Pass the returned revision and data run on writes so newer edits are protected.

Upgrade to 0.2.0

Install the release with:

bash
bun add @permute/sdk@0.2.0

This release adds client methods to the 0.1.2 SDK. New authoring methods require the current revision or version token where specified. On a 409 conflict, read the latest state and reconcile your changes before retrying. Check the API reference for each method’s permissions and request fields.

0.1.2: Dataset downloads and deletion

Added dataset download and deletion methods. This is the last published version before the changelog began; earlier releases are listed in the npm version history.