Skip to content

@oneplatform/sdk


@oneplatform/sdk / OnePlatformClient

Interface: OnePlatformClient

Defined in: packages/sdk/src/client.ts:63

The fully-initialised OnePlatform API client.

Obtain an instance via createClient. Each namespace corresponds to a top-level resource group in the REST API (e.g. client.apps maps to GET /api/v1/apps).

Properties

apiKeys

readonly apiKeys: ApiKeyNamespace

Defined in: packages/sdk/src/client.ts:91

API key management — create and revoke API keys.


apps

readonly apps: AppNamespace

Defined in: packages/sdk/src/client.ts:85

Application management — CRUD, build, and deploy hosted apps.


connectors

readonly connectors: ConnectorNamespace

Defined in: packages/sdk/src/client.ts:76

Connector lifecycle management — register, test, and trigger syncs.


data

readonly data: DataNamespace

Defined in: packages/sdk/src/client.ts:70

Ontology-typed entity CRUD.

Access a resource with client.data.entity('Product') or, with generated typed clients, client.data.Product.


events

readonly events: EventNamespace

Defined in: packages/sdk/src/client.ts:82

Real-time entity event subscriptions via Server-Sent Events.


logs

readonly logs: LogNamespace

Defined in: packages/sdk/src/client.ts:97

Log and audit trail queries — stream logs and fetch audit entries.


ontologies

readonly ontologies: OntologyNamespace

Defined in: packages/sdk/src/client.ts:79

Ontology schema management — define, validate, and migrate schemas.


pipelines

readonly pipelines: PipelineNamespace

Defined in: packages/sdk/src/client.ts:73

Pipeline management — create, trigger, and monitor runs.


plugins

readonly plugins: PluginNamespace

Defined in: packages/sdk/src/client.ts:88

Plugin lifecycle management — install and configure plugins.


users

readonly users: UserNamespace

Defined in: packages/sdk/src/client.ts:94

User management (admin-only) — provision and update user accounts.

Methods

destroy()

destroy(): void

Defined in: packages/sdk/src/client.ts:119

Terminates all active SSE subscriptions and aborts in-flight requests.

The client must not be reused after calling destroy(). Create a new client instance if you need to make further requests.

Returns

void


getConfig()

getConfig(): Readonly\<ResolvedClientConfig>

Defined in: packages/sdk/src/client.ts:103

Returns the resolved options this client was constructed with. Auth tokens are redacted from the returned object.

Returns

Readonly\<ResolvedClientConfig>


ping()

ping(): Promise\<WhoAmIResponse>

Defined in: packages/sdk/src/client.ts:111

Verifies connectivity and authentication.

Calls GET /api/v1/auth/whoami and resolves with the current user identity, or throws an AuthError if the credentials are invalid.

Returns

Promise\<WhoAmIResponse>