CRISP partnersSDK methods

resourcesForAccountEvent()

Map an account event to resource invalidations.

Returns resource names, not balances or financial deltas. Unknown events refresh all registered resource types safely. createAccountSync applies this mapping for you.

events workflow · All SDK methods

Import and runtime

@crisp-trade/partner-sdk/realtime — browser-safe; calls your authenticated backend, never the Partner API with secret credentials.

Client setup and shared behavior

Arguments

ArgumentPresenceReleased TypeScript type
typeRequired
string

Named types are expanded under “Exact released types” below. Parameters are in call order; optional does not imply nullable.

Example

Example IDs and intent keys are illustrative. Replace them with authenticated account resources and your persisted intent. Browser route names are example routes you implement on your own backend.

import { resourcesForAccountEvent } from '@crisp-trade/partner-sdk/realtime';
const resources = resourcesForAccountEvent('balance.updated');
console.log(resources);

Returns

The exact return type is shown below; this helper does not use the ordinary HTTP response wrapper.

Return type
readonly AccountResource[]

Errors and lifecycle

Errors and retry policy. Financial uncertainty requires recovery with the original intent, never a new key. Realtime helpers must be stopped on logout/account switch.

This utility does not directly map to one HTTP request.

Exact released types

Extracted from the shipped SDK 0.13.0, not separately maintained signatures.

Full signature
resourcesForAccountEvent(type: string): readonly AccountResource[]
AccountResource
export type AccountResource = typeof accountResources[number];
CRISP Partner Documentation