Official Node.js and TypeScript SDK for Sanka's hosted API and local migration lifecycle.
The official Node.js and TypeScript SDK for Sanka's hosted API and local migration lifecycle.
The SDK can be installed with either npm, pnpm, bun or yarn package managers.
npm add sanka-sdkpnpm add sanka-sdkbun add sanka-sdkyarn add sanka-sdkNote
This package is published as an ES Module (ESM) only. For applications using
CommonJS, use await import() to import and use this package.
For supported JavaScript runtimes, please consult RUNTIMES.md.
import Sanka from "sanka-sdk";
const sanka = new Sanka({
apiKey: process.env["SANKA_API_KEY"] ?? "",
});
async function run() {
const result = await sanka.ai.enrich({
objectType: "<value>",
});
console.log(result);
}
run();The hosted API client and local migration runtime are separate:
| Import | What runs | Authentication |
|---|---|---|
import Sanka from "sanka-sdk" |
Sanka's hosted HTTP API | API token |
import { SankaMigrate } from "sanka-sdk/migrate" |
A local sanka subprocess |
None |
Install sanka separately. The Node adapter does not bundle the runtime or call the hosted API.
uv tool install sanka-cliUse a runtime release that includes the extension marketplace commands and the published default DRF extension dependency.
import { SankaMigrate } from "sanka-sdk/migrate";
const migrate = new SankaMigrate({
cwd: "./django-app",
env: { DJANGO_SECRET_KEY: process.env["DJANGO_SECRET_KEY"] },
});
await migrate.extensions.marketplaces.add(
"git@github.com:sankaHQ/extensions.git",
{ name: "sanka" },
);
const extensions = await migrate.extensions.list();
console.log(extensions.data);
await migrate.extensions.add("sanka/drf-to-fastapi", {
marketplace: "sanka",
});
const scan = await migrate.scan();
for (const recommendation of scan.data.recommendations ?? []) {
console.log(
recommendation.id,
recommendation.targets,
recommendation.status,
recommendation.add_command,
);
}
const plan = await migrate.plan({
to: "fastapi",
generation: "full",
strategy: "native",
packageManager: "uv",
extensionConfig: { output: "target" },
extensionEnvironment: ["DJANGO_SECRET_KEY"],
});
const applied = await migrate.apply({ planHash: plan.data.plan_hash });
const tested = await migrate.test();
const verified = await migrate.verify();scan.data.recommendations contains typed extension IDs, versions, marketplace
names, targets, static evidence, status, and the exact add command. plan({ to })
selects one enabled extension that advertises that target. SDK calls are
non-interactive, so pass to. A missing, incompatible, or ambiguous extension
fails instead of choosing one silently. For SANKA_EXTENSION_REQUIRED, read
the same recommendation data from
error.parsedError?.details?.["recommendations"].
extensionConfig and extensionEnvironment are available on scan, plan,
apply, test, and verify. Configuration must be a plain JSON object. The
adapter snapshots and serializes it before spawning. extensionEnvironment
accepts names such as DJANGO_SECRET_KEY, not secret values. Values come from
process.env plus the constructor's env overrides and are forwarded only
when named.
await migrate.extensions.marketplaces.add("./marketplace", {
name: "third-party",
trust: true,
});
await migrate.extensions.marketplaces.list();
await migrate.extensions.marketplaces.upgrade("third-party");
await migrate.extensions.marketplaces.upgrade(); // Upgrade every marketplace.
await migrate.extensions.add("example/demo", {
marketplace: "third-party",
});
await migrate.extensions.list();
await migrate.extensions.remove("example/demo");
await migrate.extensions.marketplaces.remove("third-party");The Node adapter does not make trust or snapshot decisions. sanka
owns marketplace trust checks, immutable snapshots, artifact validation,
installed caches, and project extension locks. Adding an untrusted marketplace
requires trust: true. Upgrading reads a new immutable snapshot. Removing a
marketplace fails while a project extension still depends on it.
| Node.js method | Runtime command | Purpose |
|---|---|---|
scan() |
sanka scan ... --json |
Inspect the source and write the scan artifact |
plan() |
sanka plan ... --json |
Create a reviewable plan and plan hash |
apply() |
sanka apply ... --json |
Generate only from the supplied reviewed plan hash |
test() |
sanka test ... --json |
Prepare the generated target environment and run its tests |
verify() |
sanka verify ... --json |
Verify integrity and configured behavior |
extensions.add/list/remove |
sanka extension ... --json |
Manage project extension pins |
extensions.marketplaces.add/list/upgrade/remove |
sanka extension marketplace ... --json |
Manage immutable marketplace snapshots |
Every subprocess receives an argument array with shell: false and --json.
Invalid extension configuration or environment names throw before the process
starts. String arguments are never interpreted as shell commands.
Successful calls return a typed SankaMigrateResult only after the adapter
validates one complete sanka-cli/v1 document. It requires the matching
command, a success outcome with exit 0, object data, string-array
artifacts, limitations, and next_actions, and a string migration_state.
Failures reject with SankaMigrateError. A valid CLI failure has an error
outcome with exit 1 for a migration or verification failure, or exit 2 for
invalid usage. parsedError contains its stable code, message, and optional
details. result keeps the complete validated envelope. Missing executables,
signals, malformed JSON, unsupported schemas, command mismatches, malformed
error data, and inconsistent outcome/exit pairs fail closed without a result.
import { SankaMigrateError } from "sanka-sdk/migrate";
try {
await migrate.plan({ to: "fastapi" });
} catch (error) {
if (error instanceof SankaMigrateError) {
console.error(error.parsedError?.code, error.parsedError?.details);
console.error(error.exitCode, error.stderr);
}
}See the CLI execution model and Sanka developer documentation.
This SDK supports the following security scheme globally:
| Name | Type | Scheme | Environment Variable |
|---|---|---|---|
bearerAuth |
http | HTTP Bearer | SANKA_BEARER_AUTH |
To authenticate with the API the apiKey parameter must be set when initializing the SDK client instance. For example:
import Sanka from "sanka-sdk";
const sanka = new Sanka({
apiKey: process.env["SANKA_API_KEY"] ?? "",
});
async function run() {
const result = await sanka.ai.enrich({
objectType: "<value>",
});
console.log(result);
}
run();Available methods
- listPublicAbsencesApiV2PublicAbsencesGet - List Public Absences
- createPublicAbsenceApiV2PublicAbsencesPost - Create Public Absence
- getPublicAbsenceApiV2PublicAbsencesAbsenceIdGet - Get Public Absence
- updatePublicAbsenceApiV2PublicAbsencesAbsenceIdPut - Update Public Absence
- deletePublicAbsenceApiV2PublicAbsencesAbsenceIdDelete - Delete Public Absence
- listPublicActivityLogsApiV2PublicLogsGet - List Public Activity Logs
- listPublicApplicants - List Records
- createPublicApplicant - Create Record
- getPublicApplicant - Get Record
- updatePublicApplicant - Update Record
- archivePublicApplicant - Archive Record
- activatePublicApplicant - Activate Record
- createApprovalRequestApiV2PublicApprovalRequestsPost - Create Approval Request
- approveApprovalRequestApiV2PublicApprovalRequestsHistoryIdApprovePost - Approve Approval Request
- rejectApprovalRequestApiV2PublicApprovalRequestsHistoryIdRejectPost - Reject Approval Request
- listPublicAssociationsApiV2PublicAssociationsGet - List Public Associations
- createPublicAssociationApiV2PublicAssociationsPost - Create Public Association
- deletePublicAssociationApiV2PublicAssociationsDelete - Delete Public Association
- listPublicAttendanceRecordsApiV2PublicAttendanceRecordsGet - List Public Attendance Records
- createPublicAttendanceRecordApiV2PublicAttendanceRecordsPost - Create Public Attendance Record
- getPublicAttendanceRecordApiV2PublicAttendanceRecordsAttendanceRecordIdGet - Get Public Attendance Record
- updatePublicAttendanceRecordApiV2PublicAttendanceRecordsAttendanceRecordIdPut - Update Public Attendance Record
- deletePublicAttendanceRecordApiV2PublicAttendanceRecordsAttendanceRecordIdDelete - Delete Public Attendance Record
- list - List Public Bills
- create - Create Public Bill
- uploadPublicBillFileApiV2PublicBillsFilesPost - Upload Public Bill File
- get - Get Public Bill
- update - Update Public Bill
- delete - Delete Public Bill
- list - List Public Companies
- create - Create Public Company
- get - Get Public Company
- update - Update Public Company
- delete - Delete Public Company
- getPublicCompanyPriceTableApiV2PublicCompaniesCompanyIdPriceTableGet - Get Public Company Price Table
- updatePublicCompanyPriceTableCompanyApiV2PublicCompaniesCompanyIdPriceTableCompanyPatch - Update Public Company Price Table Company
- applyPublicCompanyPriceTableItemsApiV2PublicCompaniesCompanyIdPriceTableItemsApplyAllPost - Apply Public Company Price Table Items
- updatePublicCompanyPriceTableItemApiV2PublicCompaniesCompanyIdPriceTableItemsItemIdPatch - Update Public Company Price Table Item
- list - List Public Contacts
- create - Create Public Contact
- get - Get Public Contact
- update - Update Public Contact
- delete - Delete Public Contact
- listRecords - List Custom Object Records
- createRecord - Create Custom Object Record
- getRecord - Get Custom Object Record
- updateRecord - Update Custom Object Record
- deleteRecord - Delete Custom Object Record
- archiveRecord - Archive Custom Object Record
- activateRecord - Activate Custom Object Record
- createPublicCustomObjectRecordCompatibilityApiV2PublicRecordsCustomObjectsRecordsPost - Create Public Custom Object Record Compatibility
- updatePublicCustomObjectRecordCompatibilityApiV2PublicRecordsCustomObjectsRecordsRecordIdPost - Update Public Custom Object Record Compatibility
- archivePublicCustomObjectRecordCompatibilityApiV2PublicRecordsCustomObjectsRecordsRecordIdArchivePost - Archive Public Custom Object Record Compatibility
- list - List Public Deals
- create - Create Public Deal
- listPipelines - List Public Deal Pipelines
- get - Get Public Deal
- update - Update Public Deal
- delete - Delete Public Deal
- listFleets - List Fleets
- createFleet - Create Fleet
- getFleet - Get Fleet
- cancelFleet - Cancel Fleet
- retryFleet - Retry Fleet
- getAvailability - Cloud Availability
- uploadSource - Upload Cloud Source
- listRuns - List Cloud Runs
- createRun - Create Cloud Run
- listCertificateKeys - Cloud Certificate Keys
- getCertificate - Cloud Certificate
- revokeCertificate - Revoke Cloud Certificate
- getRun - Get Cloud Run
- cancelRun - Cancel Cloud Run
- listEvents - Cloud Run Events
- getReceipt - Cloud Run Receipt
- listArtifacts - Cloud Run Artifacts
- getArtifact - Download Cloud Artifact
- list - List Public Disbursements
- create - Create Public Disbursement
- get - Get Public Disbursement
- update - Update Public Disbursement
- delete - Delete Public Disbursement
- listPublicDisbursementAllocationsApiV2PublicDisbursementsDisbursementIdAllocationsGet - List Public Disbursement Allocations
- createPublicDisbursementAllocationApiV2PublicDisbursementsDisbursementIdAllocationsPost - Create Public Disbursement Allocation
- updatePublicDisbursementAllocationApiV2PublicDisbursementsDisbursementIdAllocationsAllocationIdPatch - Update Public Disbursement Allocation
- deletePublicDisbursementAllocationApiV2PublicDisbursementsDisbursementIdAllocationsAllocationIdDelete - Delete Public Disbursement Allocation
- listPublicEmployeesApiV2PublicEmployeesGet - List Public Employees
- list - List Public Estimates
- create - Create Public Estimate
- uploadPublicEstimateFileApiV2PublicEstimatesFilesPost - Upload Public Estimate File
- get - Get Public Estimate
- update - Update Public Estimate
- delete - Delete Public Estimate
- downloadPublicEstimatePdfApiV2PublicEstimatesEstimateIdPdfGet - Download Public Estimate Pdf
- list - List Public Expenses
- create - Create Public Expense
- uploadFile - Upload Public Expense File
- get - Get Public Expense
- update - Update Public Expense
- delete - Delete Public Expense
- listPublicExportJobsCompatApiV2PublicExportsGet - List Public Export Jobs Compat
- createPublicExportJobCompatApiV2PublicExportsPost - Create Public Export Job Compat
- getPublicExportJobCompatApiV2PublicExportsJobIdGet - Get Public Export Job Compat
- cancelPublicExportJobCompatApiV2PublicExportsJobIdCancelPost - Cancel Public Export Job Compat
- listPublicFerryDiagramsApiV2PublicFerryDiagramsGet - List Public Ferry Diagrams
- createPublicFerryDiagramApiV2PublicFerryDiagramsPost - Create Public Ferry Diagram
- getPublicFerryDiagramApiV2PublicFerryDiagramsDiagramIdGet - Get Public Ferry Diagram
- updatePublicFerryDiagramApiV2PublicFerryDiagramsDiagramIdPut - Update Public Ferry Diagram
- deletePublicFerryDiagramApiV2PublicFerryDiagramsDiagramIdDelete - Delete Public Ferry Diagram
- listPublicFerryProgramsApiV2PublicFerryProgramsGet - List Public Ferry Programs
- getPublicFerryProgramApiV2PublicFerryProgramsProgramIdGet - Get Public Ferry Program
- listPublicFerryProgramMeetingsApiV2PublicFerryProgramsProgramIdMeetingsGet - List Public Ferry Program Meetings
- createPublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsPost - Create Public Ferry Program Meeting
- updatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsMeetingIdPatch - Update Public Ferry Program Meeting
- createPublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosPost - Create Public Ferry Program Todo
- batchUpsertPublicFerryProgramTodosApiV2PublicFerryProgramsProgramIdTodosBatchUpsertPost - Batch Upsert Public Ferry Program Todos
- updatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdPatch - Update Public Ferry Program Todo
- deletePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdDelete - Delete Public Ferry Program Todo
- uploadPublicFileApiV2PublicFilesPost - Upload Public File
- listPublicImportJobsCompatApiV2PublicImportsGet - List Public Import Jobs Compat
- createPublicImportJobCompatApiV2PublicImportsPost - Create Public Import Job Compat
- getPublicImportJobCompatApiV2PublicImportsJobIdGet - Get Public Import Job Compat
- cancelPublicImportJobCompatApiV2PublicImportsJobIdCancelPost - Cancel Public Import Job Compat
- listPublicIncentivesApiV2PublicIncentivesGet - List Public Incentives
- listPublicIncentiveCompanyOptionsApiV2PublicIncentivesCompanyOptionsGet - List Public Incentive Company Options
- listPublicIncentivePlansApiV2PublicIncentivesPlansGet - List Public Incentive Plans
- createPublicIncentivePlanApiV2PublicIncentivesPlansPost - Create Public Incentive Plan
- updatePublicIncentivePlanApiV2PublicIncentivesPlansPlanIdPatch - Update Public Incentive Plan
- deletePublicIncentivePlanApiV2PublicIncentivesPlansPlanIdDelete - Delete Public Incentive Plan
- listPublicIncentiveAllocationsApiV2PublicIncentivesAllocationsGet - List Public Incentive Allocations
- replacePublicIncentiveAllocationsApiV2PublicIncentivesAllocationsPut - Replace Public Incentive Allocations
- calculatePublicIncentivesApiV2PublicIncentivesCalculatePost - Calculate Public Incentives
- approvePublicIncentivesBulkApiV2PublicIncentivesApproveBulkPost - Approve Public Incentives Bulk
- listPublicIncentiveBatchesApiV2PublicIncentivesBatchesGet - List Public Incentive Batches
- createPublicIncentiveBatchApiV2PublicIncentivesBatchesPost - Create Public Incentive Batch
- getPublicIncentiveBatchApiV2PublicIncentivesBatchesBatchIdGet - Get Public Incentive Batch
- approvePublicIncentiveBatchApiV2PublicIncentivesBatchesBatchIdApprovePost - Approve Public Incentive Batch
- markPublicIncentiveBatchPaidApiV2PublicIncentivesBatchesBatchIdMarkPaidPost - Mark Public Incentive Batch Paid
- approvePublicIncentiveApiV2PublicIncentivesIncentiveIdApprovePost - Approve Public Incentive
- listPublicInterviews - List Records
- createPublicInterview - Create Record
- getPublicInterview - Get Record
- updatePublicInterview - Update Record
- archivePublicInterview - Archive Record
- activatePublicInterview - Activate Record
- list - List Public Inventories
- create - Create Public Inventory
- get - Get Public Inventory
- update - Update Public Inventory
- delete - Delete Public Inventory
- list - List Public Inventory Transactions
- create - Create Public Inventory Transaction
- get - Get Public Inventory Transaction
- update - Update Public Inventory Transaction
- delete - Delete Public Inventory Transaction
- list - List Public Invoices
- create - Create Public Invoice
- uploadPublicInvoiceFileApiV2PublicInvoicesFilesPost - Upload Public Invoice File
- bulkUpdatePublicInvoicesApiV2PublicInvoicesBulkUpdatePost - Bulk Update Public Invoices
- listPublicOverdueInvoicesApiV2PublicInvoicesOverdueGet - List Public Overdue Invoices
- get - Get Public Invoice
- update - Update Public Invoice
- delete - Delete Public Invoice
- downloadPublicInvoicePdfApiV2PublicInvoicesInvoiceIdPdfGet - Download Public Invoice Pdf
- sendPublicInvoiceEmailApiV2PublicInvoicesInvoiceIdEmailPost - Send Public Invoice Email
- permanentDeletePublicInvoiceApiV2PublicInvoicesInvoiceIdPermanentDeleteDelete - Permanent Delete Public Invoice
- list - List Public Items
- create - Create Public Item
- get - Get Public Item
- update - Update Public Item
- delete - Delete Public Item
- listPublicJobPostings - List Records
- createPublicJobPosting - Create Record
- getPublicJobPosting - Get Record
- updatePublicJobPosting - Update Record
- archivePublicJobPosting - Archive Record
- activatePublicJobPosting - Activate Record
- listPublicJournalsApiV2PublicJournalsGet - List Journal Entries
- createPublicJournalApiV2PublicJournalsPost - Create Journal Entry
- createPublicFinancialStatementViewApiV2PublicJournalsViewsPost - Create Financial Statement View
- get - Get Journal Entry
- update - Update Journal Entry
- delete - Delete Journal Entry
- archive - Archive Journal Entry
- activate - Activate Journal Entry
- list - List Public Locations
- create - Create Public Location
- get - Get Public Location
- update - Update Public Location
- delete - Delete Public Location
- ingestClaySignalApiV2LookoutConnectorsClaySignalsPost - Ingest Clay Signal
- ingestProviderSignalApiV2LookoutConnectorsProviderSignalsPost - Ingest Provider Signal
listProviderActionsApiV2LookoutAdActionsGet- List Provider Actions⚠️ Deprecated- listProviderActionsApiV2LookoutProviderActionsGet - List Provider Actions
claimProviderActionApiV2LookoutAdActionsActionIdClaimPost- Claim Provider Action⚠️ Deprecated- claimProviderActionApiV2LookoutProviderActionsActionIdClaimPost - Claim Provider Action
completeProviderActionApiV2LookoutAdActionsActionIdCompletePost- Complete Provider Action⚠️ Deprecated- completeProviderActionApiV2LookoutProviderActionsActionIdCompletePost - Complete Provider Action
- list - List Public Meters
- create - Create Public Meter
- get - Get Public Meter
- update - Update Public Meter
- delete - Delete Public Meter
- listPublicObjectSchemasApiV2PublicObjectSchemasGet - List Public Object Schemas
- mutatePublicObjectSchemaApiV2PublicObjectSchemasPost - Mutate Public Object Schema
- list - List Public Orders
- create - Create Public Order
- bulkCreate - Bulk Create Public Orders
- uploadPublicOrderFileApiV2PublicOrdersFilesPost - Upload Public Order File
- get - Get Public Order
- update - Update Public Order
- delete - Delete Public Order
- downloadPublicOrderPdfApiV2PublicOrdersOrderIdPdfGet - Download Public Order Pdf
- list - List Public Payments
- create - Create Public Payment
- get - Get Public Payment
- update - Update Public Payment
- delete - Delete Public Payment
- downloadPublicPaymentPdfApiV2PublicPaymentsPaymentIdPdfGet - Download Public Payment Pdf
- listPublicPaymentAllocationsApiV2PublicPaymentsPaymentIdAllocationsGet - List Public Payment Allocations
- updatePublicPaymentAllocationsApiV2PublicPaymentsPaymentIdAllocationsPut - Update Public Payment Allocations
- listPublicPayrollProfilesApiV2PublicPayrollProfilesGet - List Public Payroll Profiles
- upsertPublicPayrollProfileApiV2PublicPayrollProfilesPost - Upsert Public Payroll Profile
- listPublicPayrollRunsApiV2PublicPayrollRunsGet - List Public Payroll Runs
- calculatePublicPayrollRunApiV2PublicPayrollRunsCalculatePost - Calculate Public Payroll Run
- getPublicPayrollRunApiV2PublicPayrollRunsRunIdGet - Get Public Payroll Run
- approvePublicPayrollRunApiV2PublicPayrollRunsRunIdApprovePost - Approve Public Payroll Run
- createPublicPayrollJournalEntryApiV2PublicPayrollRunsRunIdJournalEntryPost - Create Public Payroll Journal Entry
- downloadPublicPayrollPayslipPdfApiV2PublicPayrollRunsRunIdPayslipsPdfGet - Download Public Payroll Payslip Pdf
- list - List Public Projects
- create - Create Public Project
- get - Get Public Project
- update - Update Public Project
- delete - Delete Public Project
- list - List Public Developer Properties
- create - Create Public Developer Property
- get - Retrieve Public Developer Property
- update - Update Public Developer Property
- delete - Delete Public Developer Property
- create - Prospect Companies
- getCurrentIdentity - Get Current Public Developer Auth Identity
- getPublicAuthSessionApiV2PublicAuthSessionGet - Get Current Public OAuth Session
- switchPublicAuthSessionWorkspaceApiV2PublicAuthSessionSwitchWorkspacePost - Switch Current Public OAuth Session Workspace
- switchPublicAuthMcpSessionWorkspaceApiV2PublicAuthMcpSessionSwitchWorkspacePost - Switch Current Public MCP OAuth Session Workspace
- recordPublicAuthMcpToolCallApiV2PublicAuthMcpSessionToolCallLogPost - Record Public MCP Tool Call
- revokePublicAuthSessionApiV2PublicAuthSessionRevokePost - Revoke Current Public OAuth Session
- list - List Public Purchase Orders
- create - Create Public Purchase Order
- get - Get Public Purchase Order
- update - Update Public Purchase Order
- delete - Delete Public Purchase Order
- uploadPublicPurchaseOrderFileApiV2PublicPurchaseOrdersFilesPost - Upload Public Purchase Order File
- downloadPublicPurchaseOrderPdfApiV2PublicPurchaseOrdersPurchaseOrderIdPdfGet - Download Public Purchase Order Pdf
- queryPublicRecordsApiV2PublicRecordsQueryPost - Query Public Records
- aggregatePublicRecordsApiV2PublicRecordsAggregatePost - Aggregate Public Records
- list - List Public Reports
- create - Create Public Report
- get - Get Public Report
- update - Update Public Report
- delete - Delete Public Report
- list - List Public Slips
- create - Create Public Slip
- get - Get Public Slip
- update - Update Public Slip
- delete - Delete Public Slip
- downloadPublicSlipPdfApiV2PublicSlipsRevenueIdPdfGet - Download Public Slip Pdf
- listPublicApprovalRulesApiV2PublicApprovalRulesGet - List Public Approval Rules
- upsertPublicApprovalRuleApiV2PublicApprovalRulesPost - Upsert Public Approval Rule
- getPublicApprovalRuleOptionsApiV2PublicApprovalRulesOptionsGet - Get Public Approval Rule Options
- deletePublicApprovalRuleApiV2PublicApprovalRulesRuleIdDelete - Delete Public Approval Rule
- listPublicLockRulesApiV2PublicLockRulesGet - List Public Lock Rules
- upsertPublicLockRuleApiV2PublicLockRulesPost - Upsert Public Lock Rule
- getPublicLockRuleOptionsApiV2PublicLockRulesOptionsGet - Get Public Lock Rule Options
- deletePublicLockRuleApiV2PublicLockRulesRuleIdDelete - Delete Public Lock Rule
- listPublicDeliveryRulesApiV2PublicDeliveryRulesGet - List Public Delivery Rules
- upsertPublicDeliveryRuleApiV2PublicDeliveryRulesPost - Upsert Public Delivery Rule
- getPublicDeliveryRuleOptionsApiV2PublicDeliveryRulesOptionsGet - Get Public Delivery Rule Options
- deletePublicDeliveryRuleApiV2PublicDeliveryRulesRuleIdDelete - Delete Public Delivery Rule
- listPublicBuyOffersApiV2PublicBuyOffersGet - List Public Buy Offers
- list - List Public Subscriptions
- create - Create Public Subscription
- bulkUpdatePublicSubscriptionsApiV2PublicSubscriptionsBulkUpdatePost - Bulk Update Public Subscriptions
- get - Get Public Subscription
- update - Update Public Subscription
- delete - Delete Public Subscription
- listPublicTasksApiV2PublicTasksGet - List Public Tasks
- createPublicTaskApiV2PublicTasksPost - Create Public Task
- getPublicTaskApiV2PublicTasksTaskIdGet - Get Public Task
- updatePublicTaskApiV2PublicTasksTaskIdPut - Update Public Task
- deletePublicTaskApiV2PublicTasksTaskIdDelete - Delete Public Task
- list - List Public Tickets
- create - Create Public Ticket
- listPipelines - List Public Ticket Pipelines
- get - Get Public Ticket
- update - Update Public Ticket
- delete - Delete Public Ticket
- updateStatus - Update Public Ticket Status
- getPublicTransferHistoryApiV2PublicTransfersHistoryIdGet - Get Public Transfer History
- listPublicViewsApiV2PublicViewsGet - List Public Views
- createPublicViewApiV2PublicViewsPost - Create Public View
- getPublicViewApiV2PublicViewsViewIdGet - Get Public View
- updatePublicViewApiV2PublicViewsViewIdPatch - Update Public View
- deletePublicViewApiV2PublicViewsViewIdDelete - Delete Public View
- getPublicViewColumnsApiV2PublicViewsViewIdColumnsGet - Get Public View Columns
- listActions - List Public Workflow Actions Compat
- getRun - Get Public Workflow Run
- getPublicWorkflowRunNestedCompatApiV2PublicWorkflowsRunsRunIdGet - Get Public Workflow Run Nested Compat
- resolvePublicWorkflowRecordApiV2PublicWorkflowRunsResolveRecordPost - Resolve Public Workflow Record
- previewPublicWorkflowCompatApiV2PublicWorkflowRunsPreviewPost - Preview Public Workflow Compat
- previewPublicHubspotInvoiceDraftApiV2PublicInvoicesDraftsHubspotPreviewPost - Preview Public Hubspot Invoice Draft
- previewPublicFreeeInvoiceExportApiV2PublicInvoicesExportsFreeePreviewPost - Preview Public Freee Invoice Export
- previewPublicMoneyforwardInvoiceExportApiV2PublicInvoicesExportsMoneyforwardPreviewPost - Preview Public Moneyforward Invoice Export
- previewPublicHubspotEstimateDraftApiV2PublicEstimatesDraftsHubspotPreviewPost - Preview Public Hubspot Estimate Draft
- previewPublicHubspotOrderHandoffApiV2PublicOrdersHandoffsHubspotPreviewPost - Preview Public Hubspot Order Handoff
- previewPublicHubspotCommissionIncentiveApiV2PublicIncentivesCommissionHubspotPreviewPost - Preview Public Hubspot Commission Incentive
- previewPublicSalesforceQuoteReadinessApiV2PublicCpqQuoteReadinessSalesforcePreviewPost - Preview Public Salesforce Quote Readiness
- summarizePublicSalesforceQuoteReadinessApiV2PublicCpqQuoteReadinessSalesforceSummaryPost - Summarize Public Salesforce Quote Readiness
- startPublicWorkflowCompatApiV2PublicWorkflowRunsStartPost - Start Public Workflow Compat
- startPublicHubspotInvoiceDraftApiV2PublicInvoicesDraftsHubspotPost - Start Public Hubspot Invoice Draft
- startPublicFreeeInvoiceExportApiV2PublicInvoicesExportsFreeePost - Start Public Freee Invoice Export
- startPublicMoneyforwardInvoiceExportApiV2PublicInvoicesExportsMoneyforwardPost - Start Public Moneyforward Invoice Export
- startPublicHubspotEstimateDraftApiV2PublicEstimatesDraftsHubspotPost - Start Public Hubspot Estimate Draft
- startPublicHubspotOrderHandoffApiV2PublicOrdersHandoffsHubspotPost - Start Public Hubspot Order Handoff
- startPublicHubspotRevenueControlReportApiV2PublicReportsRevenueControlHubspotPost - Start Public Hubspot Revenue Control Report
- writebackPublicSalesforceQuoteReadinessApiV2PublicCpqQuoteReadinessSalesforceWritebackPost - Writeback Public Salesforce Quote Readiness
- list - List Public Workflows
- createOrUpdate - Create Public Workflow
- get - Get Public Workflow
- updatePublicWorkflowApiV2PublicWorkflowsWorkflowIdPatch - Update Public Workflow
- deletePublicWorkflowApiV2PublicWorkflowsWorkflowIdDelete - Delete Public Workflow
- runByRef - Run Public Workflow
- getPublicWorkforceOrganization - Get Public Workforce Organization
- createPublicWorkforcePosition - Create Public Workforce Position
- updatePublicWorkforcePosition - Update Public Workforce Position
- setPublicWorkforcePositionJob - Set Public Workforce Position Job
- setPublicWorkforcePositionOccupant - Set Public Workforce Position Occupant
All the methods listed above are available as standalone functions. These functions are ideal for use in applications running in the browser, serverless runtimes or other environments where application bundle size is a primary concern. When using a bundler to build your application, all unused functionality will be either excluded from the final bundle or tree-shaken away.
To read more about standalone functions, check FUNCTIONS.md.
Available standalone functions
absencesCreatePublicAbsenceApiV2PublicAbsencesPost- Create Public AbsenceabsencesDeletePublicAbsenceApiV2PublicAbsencesAbsenceIdDelete- Delete Public AbsenceabsencesGetPublicAbsenceApiV2PublicAbsencesAbsenceIdGet- Get Public AbsenceabsencesListPublicAbsencesApiV2PublicAbsencesGet- List Public AbsencesabsencesUpdatePublicAbsenceApiV2PublicAbsencesAbsenceIdPut- Update Public AbsenceactivityLogsListPublicActivityLogsApiV2PublicLogsGet- List Public Activity LogsaiEnrich- Enrich RecordaiScore- Score RecordapplicantsActivatePublicApplicant- Activate RecordapplicantsArchivePublicApplicant- Archive RecordapplicantsCreatePublicApplicant- Create RecordapplicantsGetPublicApplicant- Get RecordapplicantsListPublicApplicants- List RecordsapplicantsUpdatePublicApplicant- Update RecordapprovalRequestsApproveApprovalRequestApiV2PublicApprovalRequestsHistoryIdApprovePost- Approve Approval RequestapprovalRequestsCreateApprovalRequestApiV2PublicApprovalRequestsPost- Create Approval RequestapprovalRequestsRejectApprovalRequestApiV2PublicApprovalRequestsHistoryIdRejectPost- Reject Approval RequestassociationsCreatePublicAssociationApiV2PublicAssociationsPost- Create Public AssociationassociationsDeletePublicAssociationApiV2PublicAssociationsDelete- Delete Public AssociationassociationsListPublicAssociationsApiV2PublicAssociationsGet- List Public AssociationsattendanceRecordsCreatePublicAttendanceRecordApiV2PublicAttendanceRecordsPost- Create Public Attendance RecordattendanceRecordsDeletePublicAttendanceRecordApiV2PublicAttendanceRecordsAttendanceRecordIdDelete- Delete Public Attendance RecordattendanceRecordsGetPublicAttendanceRecordApiV2PublicAttendanceRecordsAttendanceRecordIdGet- Get Public Attendance RecordattendanceRecordsListPublicAttendanceRecordsApiV2PublicAttendanceRecordsGet- List Public Attendance RecordsattendanceRecordsUpdatePublicAttendanceRecordApiV2PublicAttendanceRecordsAttendanceRecordIdPut- Update Public Attendance RecordbillsCreate- Create Public BillbillsDelete- Delete Public BillbillsGet- Get Public BillbillsList- List Public BillsbillsUpdate- Update Public BillbillsUploadPublicBillFileApiV2PublicBillsFilesPost- Upload Public Bill FilecompaniesApplyPublicCompanyPriceTableItemsApiV2PublicCompaniesCompanyIdPriceTableItemsApplyAllPost- Apply Public Company Price Table ItemscompaniesCreate- Create Public CompanycompaniesDelete- Delete Public CompanycompaniesGet- Get Public CompanycompaniesGetPublicCompanyPriceTableApiV2PublicCompaniesCompanyIdPriceTableGet- Get Public Company Price TablecompaniesList- List Public CompaniescompaniesUpdate- Update Public CompanycompaniesUpdatePublicCompanyPriceTableCompanyApiV2PublicCompaniesCompanyIdPriceTableCompanyPatch- Update Public Company Price Table CompanycompaniesUpdatePublicCompanyPriceTableItemApiV2PublicCompaniesCompanyIdPriceTableItemsItemIdPatch- Update Public Company Price Table ItemcontactsCreate- Create Public ContactcontactsDelete- Delete Public ContactcontactsGet- Get Public ContactcontactsList- List Public ContactscontactsUpdate- Update Public ContactcustomObjectsActivateRecord- Activate Custom Object RecordcustomObjectsArchivePublicCustomObjectRecordCompatibilityApiV2PublicRecordsCustomObjectsRecordsRecordIdArchivePost- Archive Public Custom Object Record CompatibilitycustomObjectsArchiveRecord- Archive Custom Object RecordcustomObjectsCreatePublicCustomObjectRecordCompatibilityApiV2PublicRecordsCustomObjectsRecordsPost- Create Public Custom Object Record CompatibilitycustomObjectsCreateRecord- Create Custom Object RecordcustomObjectsDeleteRecord- Delete Custom Object RecordcustomObjectsGetRecord- Get Custom Object RecordcustomObjectsListRecords- List Custom Object RecordscustomObjectsUpdatePublicCustomObjectRecordCompatibilityApiV2PublicRecordsCustomObjectsRecordsRecordIdPost- Update Public Custom Object Record CompatibilitycustomObjectsUpdateRecord- Update Custom Object RecorddealsCreate- Create Public DealdealsDelete- Delete Public DealdealsGet- Get Public DealdealsList- List Public DealsdealsListPipelines- List Public Deal PipelinesdealsUpdate- Update Public DealdeveloperCloudCancelFleet- Cancel FleetdeveloperCloudCancelRun- Cancel Cloud RundeveloperCloudCreateFleet- Create FleetdeveloperCloudCreateRun- Create Cloud RundeveloperCloudGetArtifact- Download Cloud ArtifactdeveloperCloudGetAvailability- Cloud AvailabilitydeveloperCloudGetCertificate- Cloud CertificatedeveloperCloudGetFleet- Get FleetdeveloperCloudGetReceipt- Cloud Run ReceiptdeveloperCloudGetRun- Get Cloud RundeveloperCloudListArtifacts- Cloud Run ArtifactsdeveloperCloudListCertificateKeys- Cloud Certificate KeysdeveloperCloudListEvents- Cloud Run EventsdeveloperCloudListFleets- List FleetsdeveloperCloudListRuns- List Cloud RunsdeveloperCloudRetryFleet- Retry FleetdeveloperCloudRevokeCertificate- Revoke Cloud CertificatedeveloperCloudUploadSource- Upload Cloud SourcedisbursementsCreate- Create Public DisbursementdisbursementsCreatePublicDisbursementAllocationApiV2PublicDisbursementsDisbursementIdAllocationsPost- Create Public Disbursement AllocationdisbursementsDelete- Delete Public DisbursementdisbursementsDeletePublicDisbursementAllocationApiV2PublicDisbursementsDisbursementIdAllocationsAllocationIdDelete- Delete Public Disbursement AllocationdisbursementsGet- Get Public DisbursementdisbursementsList- List Public DisbursementsdisbursementsListPublicDisbursementAllocationsApiV2PublicDisbursementsDisbursementIdAllocationsGet- List Public Disbursement AllocationsdisbursementsUpdate- Update Public DisbursementdisbursementsUpdatePublicDisbursementAllocationApiV2PublicDisbursementsDisbursementIdAllocationsAllocationIdPatch- Update Public Disbursement AllocationemployeesListPublicEmployeesApiV2PublicEmployeesGet- List Public EmployeesestimatesCreate- Create Public EstimateestimatesDelete- Delete Public EstimateestimatesDownloadPublicEstimatePdfApiV2PublicEstimatesEstimateIdPdfGet- Download Public Estimate PdfestimatesGet- Get Public EstimateestimatesList- List Public EstimatesestimatesUpdate- Update Public EstimateestimatesUploadPublicEstimateFileApiV2PublicEstimatesFilesPost- Upload Public Estimate FileexpensesCreate- Create Public ExpenseexpensesDelete- Delete Public ExpenseexpensesGet- Get Public ExpenseexpensesList- List Public ExpensesexpensesUpdate- Update Public ExpenseexpensesUploadFile- Upload Public Expense FileexportsCancelPublicExportJobCompatApiV2PublicExportsJobIdCancelPost- Cancel Public Export Job CompatexportsCreatePublicExportJobCompatApiV2PublicExportsPost- Create Public Export Job CompatexportsGetPublicExportJobCompatApiV2PublicExportsJobIdGet- Get Public Export Job CompatexportsListPublicExportJobsCompatApiV2PublicExportsGet- List Public Export Jobs CompatferryDiagramsCreatePublicFerryDiagramApiV2PublicFerryDiagramsPost- Create Public Ferry DiagramferryDiagramsDeletePublicFerryDiagramApiV2PublicFerryDiagramsDiagramIdDelete- Delete Public Ferry DiagramferryDiagramsGetPublicFerryDiagramApiV2PublicFerryDiagramsDiagramIdGet- Get Public Ferry DiagramferryDiagramsListPublicFerryDiagramsApiV2PublicFerryDiagramsGet- List Public Ferry DiagramsferryDiagramsUpdatePublicFerryDiagramApiV2PublicFerryDiagramsDiagramIdPut- Update Public Ferry DiagramferryProgramsBatchUpsertPublicFerryProgramTodosApiV2PublicFerryProgramsProgramIdTodosBatchUpsertPost- Batch Upsert Public Ferry Program TodosferryProgramsCreatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsPost- Create Public Ferry Program MeetingferryProgramsCreatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosPost- Create Public Ferry Program TodoferryProgramsDeletePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdDelete- Delete Public Ferry Program TodoferryProgramsGetPublicFerryProgramApiV2PublicFerryProgramsProgramIdGet- Get Public Ferry ProgramferryProgramsListPublicFerryProgramMeetingsApiV2PublicFerryProgramsProgramIdMeetingsGet- List Public Ferry Program MeetingsferryProgramsListPublicFerryProgramsApiV2PublicFerryProgramsGet- List Public Ferry ProgramsferryProgramsUpdatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsMeetingIdPatch- Update Public Ferry Program MeetingferryProgramsUpdatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdPatch- Update Public Ferry Program TodofilesUploadPublicFileApiV2PublicFilesPost- Upload Public FileimportsCancelPublicImportJobCompatApiV2PublicImportsJobIdCancelPost- Cancel Public Import Job CompatimportsCreatePublicImportJobCompatApiV2PublicImportsPost- Create Public Import Job CompatimportsGetPublicImportJobCompatApiV2PublicImportsJobIdGet- Get Public Import Job CompatimportsListPublicImportJobsCompatApiV2PublicImportsGet- List Public Import Jobs CompatincentivesApprovePublicIncentiveApiV2PublicIncentivesIncentiveIdApprovePost- Approve Public IncentiveincentivesApprovePublicIncentiveBatchApiV2PublicIncentivesBatchesBatchIdApprovePost- Approve Public Incentive BatchincentivesApprovePublicIncentivesBulkApiV2PublicIncentivesApproveBulkPost- Approve Public Incentives BulkincentivesCalculatePublicIncentivesApiV2PublicIncentivesCalculatePost- Calculate Public IncentivesincentivesCreatePublicIncentiveBatchApiV2PublicIncentivesBatchesPost- Create Public Incentive BatchincentivesCreatePublicIncentivePlanApiV2PublicIncentivesPlansPost- Create Public Incentive PlanincentivesDeletePublicIncentivePlanApiV2PublicIncentivesPlansPlanIdDelete- Delete Public Incentive PlanincentivesGetPublicIncentiveBatchApiV2PublicIncentivesBatchesBatchIdGet- Get Public Incentive BatchincentivesListPublicIncentiveAllocationsApiV2PublicIncentivesAllocationsGet- List Public Incentive AllocationsincentivesListPublicIncentiveBatchesApiV2PublicIncentivesBatchesGet- List Public Incentive BatchesincentivesListPublicIncentiveCompanyOptionsApiV2PublicIncentivesCompanyOptionsGet- List Public Incentive Company OptionsincentivesListPublicIncentivePlansApiV2PublicIncentivesPlansGet- List Public Incentive PlansincentivesListPublicIncentivesApiV2PublicIncentivesGet- List Public IncentivesincentivesMarkPublicIncentiveBatchPaidApiV2PublicIncentivesBatchesBatchIdMarkPaidPost- Mark Public Incentive Batch PaidincentivesReplacePublicIncentiveAllocationsApiV2PublicIncentivesAllocationsPut- Replace Public Incentive AllocationsincentivesUpdatePublicIncentivePlanApiV2PublicIncentivesPlansPlanIdPatch- Update Public Incentive PlaninterviewsActivatePublicInterview- Activate RecordinterviewsArchivePublicInterview- Archive RecordinterviewsCreatePublicInterview- Create RecordinterviewsGetPublicInterview- Get RecordinterviewsListPublicInterviews- List RecordsinterviewsUpdatePublicInterview- Update RecordinventoriesCreate- Create Public InventoryinventoriesDelete- Delete Public InventoryinventoriesGet- Get Public InventoryinventoriesList- List Public InventoriesinventoriesUpdate- Update Public InventoryinventoryTransactionsCreate- Create Public Inventory TransactioninventoryTransactionsDelete- Delete Public Inventory TransactioninventoryTransactionsGet- Get Public Inventory TransactioninventoryTransactionsList- List Public Inventory TransactionsinventoryTransactionsUpdate- Update Public Inventory TransactioninvoicesBulkUpdatePublicInvoicesApiV2PublicInvoicesBulkUpdatePost- Bulk Update Public InvoicesinvoicesCreate- Create Public InvoiceinvoicesDelete- Delete Public InvoiceinvoicesDownloadPublicInvoicePdfApiV2PublicInvoicesInvoiceIdPdfGet- Download Public Invoice PdfinvoicesGet- Get Public InvoiceinvoicesList- List Public InvoicesinvoicesListPublicOverdueInvoicesApiV2PublicInvoicesOverdueGet- List Public Overdue InvoicesinvoicesPermanentDeletePublicInvoiceApiV2PublicInvoicesInvoiceIdPermanentDeleteDelete- Permanent Delete Public InvoiceinvoicesSendPublicInvoiceEmailApiV2PublicInvoicesInvoiceIdEmailPost- Send Public Invoice EmailinvoicesUpdate- Update Public InvoiceinvoicesUploadPublicInvoiceFileApiV2PublicInvoicesFilesPost- Upload Public Invoice FileitemsCreate- Create Public ItemitemsDelete- Delete Public ItemitemsGet- Get Public ItemitemsList- List Public ItemsitemsUpdate- Update Public ItemjobPostingsActivatePublicJobPosting- Activate RecordjobPostingsArchivePublicJobPosting- Archive RecordjobPostingsCreatePublicJobPosting- Create RecordjobPostingsGetPublicJobPosting- Get RecordjobPostingsListPublicJobPostings- List RecordsjobPostingsUpdatePublicJobPosting- Update RecordjournalsActivate- Activate Journal EntryjournalsArchive- Archive Journal EntryjournalsCreatePublicFinancialStatementViewApiV2PublicJournalsViewsPost- Create Financial Statement ViewjournalsCreatePublicJournalApiV2PublicJournalsPost- Create Journal EntryjournalsDelete- Delete Journal EntryjournalsGet- Get Journal EntryjournalsListPublicJournalsApiV2PublicJournalsGet- List Journal EntriesjournalsUpdate- Update Journal EntrylocationsCreate- Create Public LocationlocationsDelete- Delete Public LocationlocationsGet- Get Public LocationlocationsList- List Public LocationslocationsUpdate- Update Public LocationlookoutClaimProviderActionApiV2LookoutProviderActionsActionIdClaimPost- Claim Provider ActionlookoutCompleteProviderActionApiV2LookoutProviderActionsActionIdCompletePost- Complete Provider ActionlookoutIngestClaySignalApiV2LookoutConnectorsClaySignalsPost- Ingest Clay SignallookoutIngestProviderSignalApiV2LookoutConnectorsProviderSignalsPost- Ingest Provider SignallookoutListProviderActionsApiV2LookoutProviderActionsGet- List Provider ActionsmetersCreate- Create Public MetermetersDelete- Delete Public MetermetersGet- Get Public MetermetersList- List Public MetersmetersUpdate- Update Public MeterobjectSchemasListPublicObjectSchemasApiV2PublicObjectSchemasGet- List Public Object SchemasobjectSchemasMutatePublicObjectSchemaApiV2PublicObjectSchemasPost- Mutate Public Object SchemaordersBulkCreate- Bulk Create Public OrdersordersCreate- Create Public OrderordersDelete- Delete Public OrderordersDownloadPublicOrderPdfApiV2PublicOrdersOrderIdPdfGet- Download Public Order PdfordersGet- Get Public OrderordersList- List Public OrdersordersUpdate- Update Public OrderordersUploadPublicOrderFileApiV2PublicOrdersFilesPost- Upload Public Order FilepaymentsCreate- Create Public PaymentpaymentsDelete- Delete Public PaymentpaymentsDownloadPublicPaymentPdfApiV2PublicPaymentsPaymentIdPdfGet- Download Public Payment PdfpaymentsGet- Get Public PaymentpaymentsList- List Public PaymentspaymentsListPublicPaymentAllocationsApiV2PublicPaymentsPaymentIdAllocationsGet- List Public Payment AllocationspaymentsUpdate- Update Public PaymentpaymentsUpdatePublicPaymentAllocationsApiV2PublicPaymentsPaymentIdAllocationsPut- Update Public Payment AllocationspayrollApprovePublicPayrollRunApiV2PublicPayrollRunsRunIdApprovePost- Approve Public Payroll RunpayrollCalculatePublicPayrollRunApiV2PublicPayrollRunsCalculatePost- Calculate Public Payroll RunpayrollCreatePublicPayrollJournalEntryApiV2PublicPayrollRunsRunIdJournalEntryPost- Create Public Payroll Journal EntrypayrollDownloadPublicPayrollPayslipPdfApiV2PublicPayrollRunsRunIdPayslipsPdfGet- Download Public Payroll Payslip PdfpayrollGetPublicPayrollRunApiV2PublicPayrollRunsRunIdGet- Get Public Payroll RunpayrollListPublicPayrollProfilesApiV2PublicPayrollProfilesGet- List Public Payroll ProfilespayrollListPublicPayrollRunsApiV2PublicPayrollRunsGet- List Public Payroll RunspayrollUpsertPublicPayrollProfileApiV2PublicPayrollProfilesPost- Upsert Public Payroll ProfileprojectsCreate- Create Public ProjectprojectsDelete- Delete Public ProjectprojectsGet- Get Public ProjectprojectsList- List Public ProjectsprojectsUpdate- Update Public ProjectpropertiesCreate- Create Public Developer PropertypropertiesDelete- Delete Public Developer PropertypropertiesGet- Retrieve Public Developer PropertypropertiesList- List Public Developer PropertiespropertiesUpdate- Update Public Developer PropertyprospectCompaniesCreate- Prospect CompaniespublicAuthGetCurrentIdentity- Get Current Public Developer Auth IdentitypublicAuthGetPublicAuthSessionApiV2PublicAuthSessionGet- Get Current Public OAuth SessionpublicAuthRecordPublicAuthMcpToolCallApiV2PublicAuthMcpSessionToolCallLogPost- Record Public MCP Tool CallpublicAuthRevokePublicAuthSessionApiV2PublicAuthSessionRevokePost- Revoke Current Public OAuth SessionpublicAuthSwitchPublicAuthMcpSessionWorkspaceApiV2PublicAuthMcpSessionSwitchWorkspacePost- Switch Current Public MCP OAuth Session WorkspacepublicAuthSwitchPublicAuthSessionWorkspaceApiV2PublicAuthSessionSwitchWorkspacePost- Switch Current Public OAuth Session WorkspacepurchaseOrdersCreate- Create Public Purchase OrderpurchaseOrdersDelete- Delete Public Purchase OrderpurchaseOrdersDownloadPublicPurchaseOrderPdfApiV2PublicPurchaseOrdersPurchaseOrderIdPdfGet- Download Public Purchase Order PdfpurchaseOrdersGet- Get Public Purchase OrderpurchaseOrdersList- List Public Purchase OrderspurchaseOrdersUpdate- Update Public Purchase OrderpurchaseOrdersUploadPublicPurchaseOrderFileApiV2PublicPurchaseOrdersFilesPost- Upload Public Purchase Order FilerecordsAggregatePublicRecordsApiV2PublicRecordsAggregatePost- Aggregate Public RecordsrecordsQueryPublicRecordsApiV2PublicRecordsQueryPost- Query Public RecordsreportsCreate- Create Public ReportreportsDelete- Delete Public ReportreportsGet- Get Public ReportreportsList- List Public ReportsreportsUpdate- Update Public ReportrevenuesCreate- Create Public SliprevenuesDelete- Delete Public SliprevenuesDownloadPublicSlipPdfApiV2PublicSlipsRevenueIdPdfGet- Download Public Slip PdfrevenuesGet- Get Public SliprevenuesList- List Public SlipsrevenuesUpdate- Update Public SlipruleSettingsDeletePublicApprovalRuleApiV2PublicApprovalRulesRuleIdDelete- Delete Public Approval RuleruleSettingsDeletePublicDeliveryRuleApiV2PublicDeliveryRulesRuleIdDelete- Delete Public Delivery RuleruleSettingsDeletePublicLockRuleApiV2PublicLockRulesRuleIdDelete- Delete Public Lock RuleruleSettingsGetPublicApprovalRuleOptionsApiV2PublicApprovalRulesOptionsGet- Get Public Approval Rule OptionsruleSettingsGetPublicDeliveryRuleOptionsApiV2PublicDeliveryRulesOptionsGet- Get Public Delivery Rule OptionsruleSettingsGetPublicLockRuleOptionsApiV2PublicLockRulesOptionsGet- Get Public Lock Rule OptionsruleSettingsListPublicApprovalRulesApiV2PublicApprovalRulesGet- List Public Approval RulesruleSettingsListPublicDeliveryRulesApiV2PublicDeliveryRulesGet- List Public Delivery RulesruleSettingsListPublicLockRulesApiV2PublicLockRulesGet- List Public Lock RulesruleSettingsUpsertPublicApprovalRuleApiV2PublicApprovalRulesPost- Upsert Public Approval RuleruleSettingsUpsertPublicDeliveryRuleApiV2PublicDeliveryRulesPost- Upsert Public Delivery RuleruleSettingsUpsertPublicLockRuleApiV2PublicLockRulesPost- Upsert Public Lock RulesankaBuyListPublicBuyOffersApiV2PublicBuyOffersGet- List Public Buy OfferssubscriptionsBulkUpdatePublicSubscriptionsApiV2PublicSubscriptionsBulkUpdatePost- Bulk Update Public SubscriptionssubscriptionsCreate- Create Public SubscriptionsubscriptionsDelete- Delete Public SubscriptionsubscriptionsGet- Get Public SubscriptionsubscriptionsList- List Public SubscriptionssubscriptionsUpdate- Update Public SubscriptiontasksCreatePublicTaskApiV2PublicTasksPost- Create Public TasktasksDeletePublicTaskApiV2PublicTasksTaskIdDelete- Delete Public TasktasksGetPublicTaskApiV2PublicTasksTaskIdGet- Get Public TasktasksListPublicTasksApiV2PublicTasksGet- List Public TaskstasksUpdatePublicTaskApiV2PublicTasksTaskIdPut- Update Public TaskticketsCreate- Create Public TicketticketsDelete- Delete Public TicketticketsGet- Get Public TicketticketsList- List Public TicketsticketsListPipelines- List Public Ticket PipelinesticketsUpdate- Update Public TicketticketsUpdateStatus- Update Public Ticket StatustransfersGetPublicTransferHistoryApiV2PublicTransfersHistoryIdGet- Get Public Transfer HistoryviewsCreatePublicViewApiV2PublicViewsPost- Create Public ViewviewsDeletePublicViewApiV2PublicViewsViewIdDelete- Delete Public ViewviewsGetPublicViewApiV2PublicViewsViewIdGet- Get Public ViewviewsGetPublicViewColumnsApiV2PublicViewsViewIdColumnsGet- Get Public View ColumnsviewsListPublicViewsApiV2PublicViewsGet- List Public ViewsviewsUpdatePublicViewApiV2PublicViewsViewIdPatch- Update Public ViewworkflowActionsListActions- List Public Workflow Actions CompatworkflowRunsGetPublicWorkflowRunNestedCompatApiV2PublicWorkflowsRunsRunIdGet- Get Public Workflow Run Nested CompatworkflowRunsGetRun- Get Public Workflow RunworkflowRunsPreviewPublicFreeeInvoiceExportApiV2PublicInvoicesExportsFreeePreviewPost- Preview Public Freee Invoice ExportworkflowRunsPreviewPublicHubspotCommissionIncentiveApiV2PublicIncentivesCommissionHubspotPreviewPost- Preview Public Hubspot Commission IncentiveworkflowRunsPreviewPublicHubspotEstimateDraftApiV2PublicEstimatesDraftsHubspotPreviewPost- Preview Public Hubspot Estimate DraftworkflowRunsPreviewPublicHubspotInvoiceDraftApiV2PublicInvoicesDraftsHubspotPreviewPost- Preview Public Hubspot Invoice DraftworkflowRunsPreviewPublicHubspotOrderHandoffApiV2PublicOrdersHandoffsHubspotPreviewPost- Preview Public Hubspot Order HandoffworkflowRunsPreviewPublicMoneyforwardInvoiceExportApiV2PublicInvoicesExportsMoneyforwardPreviewPost- Preview Public Moneyforward Invoice ExportworkflowRunsPreviewPublicSalesforceQuoteReadinessApiV2PublicCpqQuoteReadinessSalesforcePreviewPost- Preview Public Salesforce Quote ReadinessworkflowRunsPreviewPublicWorkflowCompatApiV2PublicWorkflowRunsPreviewPost- Preview Public Workflow CompatworkflowRunsResolvePublicWorkflowRecordApiV2PublicWorkflowRunsResolveRecordPost- Resolve Public Workflow RecordworkflowRunsStartPublicFreeeInvoiceExportApiV2PublicInvoicesExportsFreeePost- Start Public Freee Invoice ExportworkflowRunsStartPublicHubspotEstimateDraftApiV2PublicEstimatesDraftsHubspotPost- Start Public Hubspot Estimate DraftworkflowRunsStartPublicHubspotInvoiceDraftApiV2PublicInvoicesDraftsHubspotPost- Start Public Hubspot Invoice DraftworkflowRunsStartPublicHubspotOrderHandoffApiV2PublicOrdersHandoffsHubspotPost- Start Public Hubspot Order HandoffworkflowRunsStartPublicHubspotRevenueControlReportApiV2PublicReportsRevenueControlHubspotPost- Start Public Hubspot Revenue Control ReportworkflowRunsStartPublicMoneyforwardInvoiceExportApiV2PublicInvoicesExportsMoneyforwardPost- Start Public Moneyforward Invoice ExportworkflowRunsStartPublicWorkflowCompatApiV2PublicWorkflowRunsStartPost- Start Public Workflow CompatworkflowRunsSummarizePublicSalesforceQuoteReadinessApiV2PublicCpqQuoteReadinessSalesforceSummaryPost- Summarize Public Salesforce Quote ReadinessworkflowRunsWritebackPublicSalesforceQuoteReadinessApiV2PublicCpqQuoteReadinessSalesforceWritebackPost- Writeback Public Salesforce Quote ReadinessworkflowsCreateOrUpdate- Create Public WorkflowworkflowsDeletePublicWorkflowApiV2PublicWorkflowsWorkflowIdDelete- Delete Public WorkflowworkflowsGet- Get Public WorkflowworkflowsList- List Public WorkflowsworkflowsRunByRef- Run Public WorkflowworkflowsUpdatePublicWorkflowApiV2PublicWorkflowsWorkflowIdPatch- Update Public WorkflowworkforcePlanningCreatePublicWorkforcePosition- Create Public Workforce PositionworkforcePlanningGetPublicWorkforceOrganization- Get Public Workforce OrganizationworkforcePlanningSetPublicWorkforcePositionJob- Set Public Workforce Position JobworkforcePlanningSetPublicWorkforcePositionOccupant- Set Public Workforce Position OccupantworkforcePlanningUpdatePublicWorkforcePosition- Update Public Workforce Position- Claim Provider ActionlookoutClaimProviderActionApiV2LookoutAdActionsActionIdClaimPost⚠️ Deprecated- Complete Provider ActionlookoutCompleteProviderActionApiV2LookoutAdActionsActionIdCompletePost⚠️ Deprecated- List Provider ActionslookoutListProviderActionsApiV2LookoutAdActionsGet⚠️ Deprecated
Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
import { Sanka } from "sanka-sdk";
const sanka = new Sanka({
bearerAuth: process.env["SANKA_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await sanka.absences.listPublicAbsencesApiV2PublicAbsencesGet(
{},
{
retries: {
strategy: "backoff",
backoff: {
initialInterval: 1,
maxInterval: 50,
exponent: 1.1,
maxElapsedTime: 100,
},
retryConnectionErrors: false,
},
},
);
console.log(result);
}
run();If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
import { Sanka } from "sanka-sdk";
const sanka = new Sanka({
retryConfig: {
strategy: "backoff",
backoff: {
initialInterval: 1,
maxInterval: 50,
exponent: 1.1,
maxElapsedTime: 100,
},
retryConnectionErrors: false,
},
bearerAuth: process.env["SANKA_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await sanka.absences.listPublicAbsencesApiV2PublicAbsencesGet(
{},
);
console.log(result);
}
run();SankaError is the base class for all HTTP error responses. It has the following properties:
| Property | Type | Description |
|---|---|---|
error.message |
string |
Error message |
error.statusCode |
number |
HTTP response status code eg 404 |
error.headers |
Headers |
HTTP response headers |
error.body |
string |
HTTP body. Can be empty string if no body is returned. |
error.rawResponse |
Response |
Raw HTTP response |
error.data$ |
Optional. Some errors may contain structured data. See Error Classes. |
import { Sanka } from "sanka-sdk";
import * as errors from "sanka-sdk/models/errors";
const sanka = new Sanka({
bearerAuth: process.env["SANKA_BEARER_AUTH"] ?? "",
});
async function run() {
try {
const result = await sanka.absences
.listPublicAbsencesApiV2PublicAbsencesGet({});
console.log(result);
} catch (error) {
// The base class for HTTP error responses
if (error instanceof errors.SankaError) {
console.log(error.message);
console.log(error.statusCode);
console.log(error.body);
console.log(error.headers);
// Depending on the method different errors may be thrown
if (error instanceof errors.ErrorEnvelope) {
console.log(error.data$.success); // boolean
console.log(error.data$.error); // models.ErrorBody
console.log(error.data$.meta); // models.EnvelopeMeta
}
}
}
}
run();Primary errors:
SankaError: The base class for HTTP error responses.ErrorEnvelope: Error response.
Less common errors (6)
Network errors:
ConnectionError: HTTP client was unable to make a request to a server.RequestTimeoutError: HTTP request timed out due to an AbortSignal signal.RequestAbortedError: HTTP request was aborted by the client.InvalidRequestError: Any input used to create a request is invalid.UnexpectedClientError: Unrecognised or unexpected error.
Inherit from SankaError:
ResponseValidationError: Type mismatch between the data returned from the server and the structure expected by the SDK. Seeerror.rawValuefor the raw value anderror.pretty()for a nicely formatted multi-line string.
The default server can be overridden globally by passing a URL to the serverURL: string optional parameter when initializing the SDK client instance. For example:
import { Sanka } from "sanka-sdk";
const sanka = new Sanka({
serverURL: "https://api.sanka.com",
bearerAuth: process.env["SANKA_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await sanka.absences.listPublicAbsencesApiV2PublicAbsencesGet(
{},
);
console.log(result);
}
run();The TypeScript SDK makes API calls using an HTTPClient that wraps the native
Fetch API. This
client is a thin wrapper around fetch and provides the ability to attach hooks
around the request lifecycle that can be used to modify the request or handle
errors and response.
The HTTPClient constructor takes an optional fetcher argument that can be
used to integrate a third-party HTTP client or when writing tests to mock out
the HTTP client and feed in fixtures.
The following example shows how to:
- route requests through a proxy server using undici's ProxyAgent
- use the
"beforeRequest"hook to add a custom header and a timeout to requests - use the
"requestError"hook to log errors
import { Sanka } from "sanka-sdk";
import { ProxyAgent } from "undici";
import { HTTPClient } from "sanka-sdk/lib/http";
const dispatcher = new ProxyAgent("http://proxy.example.com:8080");
const httpClient = new HTTPClient({
// 'fetcher' takes a function that has the same signature as native 'fetch'.
fetcher: (input, init) =>
// 'dispatcher' is specific to undici and not part of the standard Fetch API.
fetch(input, { ...init, dispatcher } as RequestInit),
});
httpClient.addHook("beforeRequest", (request) => {
const nextRequest = new Request(request, {
signal: request.signal || AbortSignal.timeout(5000)
});
nextRequest.headers.set("x-custom-header", "custom value");
return nextRequest;
});
httpClient.addHook("requestError", (error, request) => {
console.group("Request Error");
console.log("Reason:", `${error}`);
console.log("Endpoint:", `${request.method} ${request.url}`);
console.groupEnd();
});
const sdk = new Sanka({ httpClient: httpClient });You can setup your SDK to emit debug logs for SDK requests and responses.
You can pass a logger that matches console's interface as an SDK option.
Warning
Beware that debug logging will reveal secrets, like API tokens in headers, in log messages printed to a console or files. It's recommended to use this feature only during local development and not in production.
import { Sanka } from "sanka-sdk";
const sdk = new Sanka({ debugLogger: console });You can also enable a default debug logger by setting an environment variable SANKA_DEBUG to true.
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.
While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation. We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
SDK Created by Speakeasy
Developer Cloud release candidate: bounded execution, Repair, certificates and Fleet.