API reference
Signatures, options, and return types for the public APIs of @osdk/react, @osdk/client, @osdk/oauth, and @osdk/aip-core.
Look up the exact signature, options, and return type of each public API. Most option and return tables are generated from the TypeScript source and its JSDoc; a page says so when a table is written by hand. For walkthroughs, follow the "See also" links on each page.
@osdk/react
| API | Description |
|---|---|
OsdkProvider | Shares a client and its cache with the hooks below it. |
useOsdkObjects | Loads a list of objects of one type or interface. |
useOsdkObject | Loads one object by primary key, or observes an instance. |
useLinks | Loads the objects linked from one or more objects. |
useObjectSet | Loads a list from an ObjectSet, with set operations and pivots. |
useStableObjectSet | Keeps an ObjectSet referentially stable across renders. |
useOsdkAggregation | Runs a server-side aggregation. |
useOsdkFunction | Executes a function and caches the result. |
useOsdkFunctions | Executes several functions from one hook. |
useOsdkAction | Applies or validates an action. |
useDebouncedCallback | Debounces a callback, with cancel and flush. |
useOsdkMetadata | Fetches metadata for an object type, interface, or action. |
useOsdkClient | Returns the Client from OsdkProvider. |
useObservableClient | Returns the ObservableClient that backs the cache. |
@osdk/react/testing | TestOsdkProvider and fakeObservableClient for unit tests. |
@osdk/react/platform-apis
| API | Description |
|---|---|
useCurrentFoundryUser | Gets the signed-in user. |
useFoundryUser | Gets a user by ID. |
useFoundryUsersList | Lists users, one page at a time. |
useMarkings | Lists markings. |
useMarkingCategories | Lists marking categories. |
useUserViewMarkings | Gets the markings a user can view. |
useCbacBanner | Gets the classification banner for marking IDs. |
useCbacMarkingRestrictions | Gets implied, disallowed, and required markings. |
@osdk/client
| API | Description |
|---|---|
createClient | Creates the client for one Ontology. |
createPlatformClient | Creates a client for platform APIs only. |
ObjectSet | Filters, set operations, pivots, aggregation, paging, and subscriptions. |
Osdk.Instance | The type of a loaded object and its $ fields. |
WhereClause | Filter operators by property type. |
PalantirApiError, ActionValidationError | Errors thrown by the client. |
@osdk/oauth
| API | Description |
|---|---|
createPublicOauthClient | Browser sign-in with the authorization code flow and PKCE. |
createConfidentialOauthClient | Server-side tokens from a client ID and secret. |
createAuthlessClient | A token provider for public resources. |
@osdk/aip-core
| API | Description |
|---|---|
foundryModel | Creates a model handle for the Language Model Service. |
generateText | Generates a complete response. |
streamText | Streams a response as it is generated. |
LmsChatTransport | A ChatTransport for chat UIs. |
generateMessageId, getUIMessageText | Helpers for UIMessage conversations. |