Northlight
SDK

API reference

Every value and type exported by @north-light/sdk, read from the TypeScript compiler.

Every export of @north-light/sdk, read from the TypeScript compiler at build time and grouped by what it is used for. Types re-exported from @north-light/api are documented with that package.

Client

Constructing a client, the options it takes, and the authentication and profile calls it exposes.

Crouter, CrouterOptions, AuthStatus, AuthStatusParams, EnsureProfileParams, AppProfile, SDK_VERSION

Runs

Starting a run, reading its status, trace and outcome, parsing a result against a schema, and watching background runs until they end.

RunStartParams, RunStartResult, RunObject, RunStatus, RunActivity, RunTrace, RunDeleteResult, RunParsedOutcome, RunParseOptions, RunParseParams, RunWatcher, RunWatchOptions, PendingRun, RunEnded, RunEnding, RunActivityEvent, RunNotice, RunNoticeError, RUN_NOTICE_SCOPE, verifyRunNotice, VerifyRunNoticeOptions

Grants

Following a person's grant to the app and reacting when it changes.

GrantWatcher, GrantWatchOptions, GrantChanged

Nodes

Creating a node, messaging it, cancelling it, and reading the outcome it reports.

NodeCreateParams, NodeOutcomeOptions, ParsedOutcome, MessageParams, CancelParams

Streaming and activity

A node's live event stream and the activity feed built on top of it.

NodeStream, NodeStreamEvent, NodeStreamEventType, NodeStreamEventListener, NodeEventsOptions, ActivityStep, DescribeTool, describeToolDefault, followActivity, RunStream, RunStreamEnd, RunEventListener, UnknownRunEvent, RunReply, RunReplyCollectOptions, RunReplyEnding, RunReplyEvent, RunReplyResult, SentRunMessage, cursorFromRequest, forwardRunEvents

Errors

The base error every failed request throws, and its status-specific subclasses.

CrouterError, BadRequestError, AuthenticationError, PermissionDeniedError, NotFoundError, ConflictError, UnprocessableEntityError, RateLimitError, InternalServerError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, RuntimeVersionError, RuntimeVersionDetails, DeadlineExceededError, DeadlineDetails, SdkErrorCode, sdkErrorCodes, mapError

Schemas and request options

Structured-output schemas, the type they produce, and the options accepted by every request.

JsonSchema, OutputSchema, SchemaOutput, RequestOptions

Files, uploads and shares

Downloading files, uploading attachments, and sharing a run with someone else.

FileDownloadOptions, Upload, UploadCreateParams, AttachmentLink, Share, ShareCreated, ShareCreateParams

Memory

Reading the person's public memories from an app's server.

MemoryDocument, MemoryGetParams, MemoryListItem, MemoryListPage, MemoryListParams

Questions

Questions a run asks the person, and the answers sent back.

Question, QuestionAnswered, QuestionFields, QuestionResponses, QuestionSlot, QuestionStatus

Custom objects and providers

Receiving a custom object's queued deliveries, and listing the tools a provider grants.

CustomObjects, CustomDeliveryStream, ReceiveOptions, ProviderToolEntry

Signing people in

The OAuth client that connects a person to the app, where connections are stored, the client on a stored connection, and how a refused connection is handled.

OAuth2Client, OAuth2Options, ConnectedCrouter, AppClient, OwnerOnly, MemoryConnectionStore, ConnectionStore, Connection, Identity, AuthorizeNonce, profileFromClaims, RefreshFailure, Refusal, RefusalKind, refusalOf, AuthorizationRefusal, authorizationRefusalOf, DEFAULT_DIRECTORY_TIMEOUT_MS, generateKeyPair, parsePrivateJwk, privateKeyFromFile

On this page