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.
OAuth
The client that signs a person in with Northlight, where connections are stored, the client on a stored connection, how a refused connection is handled, and the key helpers.
OAuth2Client, OAuth2Options, ConnectedCrouter, MemoryConnectionStore, ConnectionStore, Connection, Identity, AuthorizeNonce, profileFromClaims, refusalOf, authorizationRefusalOf, Refusal, RefusalKind, RefreshFailure, AuthorizationRefusal, generateKeyPair, parsePrivateJwk, privateKeyFromFile, DEFAULT_DIRECTORY_TIMEOUT_MS
App client
What an app reaches on a person's runtime: the namespaces of AppClient (runs, providers, files.download, memory, questions, uploads, attachments, shares, grant, health, usage and profiles.list).
Runs
Starting a run, reading its status, trace and outcome, parsing a result against a schema, streaming and replying to a run, watching background runs until they end, and run notices.
RunStartParams, RunStartResult, RunObject, RunStatus, RunActivity, RunTrace, RunDeleteResult, RunParsedOutcome, RunParseOptions, RunParseParams, JsonSchema, OutputSchema, SchemaOutput, RequestOptions, RunStream, RunStreamEnd, RunEventListener, UnknownRunEvent, RunReply, RunReplyCollectOptions, RunReplyEnding, RunReplyEvent, RunReplyResult, SentRunMessage, RunWatcher, RunWatchOptions, PendingRun, RunEnded, RunEnding, RunActivityEvent, RunNotice, RunNoticeError, RUN_NOTICE_SCOPE, verifyRunNotice, VerifyRunNoticeOptions, forwardRunEvents, cursorFromRequest, followActivity, describeToolDefault, ActivityStep, DescribeTool
Grants
Following a person's grant to the app and reacting when it changes.
Providers
Listing the tools a provider grants the app.
Files, uploads and shares
Downloading files, uploading attachments, and sharing a file with someone else.
FileDownloadOptions, Upload, UploadCreateParams, AttachmentLink, Share, ShareCreated, ShareCreateParams
Memory
Reading the person's documents 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
Errors
The base error every failed request throws, its status-specific subclasses, and the SDK version.
CrouterError, BadRequestError, AuthenticationError, PermissionDeniedError, NotFoundError, ConflictError, UnprocessableEntityError, RateLimitError, InternalServerError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, RuntimeVersionError, RuntimeVersionDetails, DeadlineExceededError, DeadlineDetails, SdkErrorCode, sdkErrorCodes, mapError, SDK_VERSION
Testing
A fake Northlight your real OAuth2Client and Crouter talk to through fetch, for tests. Imported from @north-light/sdk/testing.
FakeCloud, FAKE_TESTER_LIMIT, manualClock, ManualClock, FakeCloudOptions, FakeAccount, FakeUser, FakeTester, FakeTesterRef, FakeTesting, FakeScope, GrantPatch, FakeRefusalCode, FakeRuns, FakeRun, FakeRunParams, FakeRunEnding, FakeRunMessage, FakeQuestion, FakeNotice, RunNoticeOptions, FakeMemoryDoc, FakeProvider, FakeToolHandler, FakeAnswer, FakeCall, FakeDirectoryCall, FakeDirectoryOp, FakeInterceptOp, FakeOp, Intercept, Responder, ResponderInput