@dossier-wiki/os-sdk 1.5.0 → 1.6.0-staging.769

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/REFERENCE.md CHANGED
@@ -14,6 +14,38 @@ new DossiersOSAPIService({ baseUrl, apiKey, fetch? })
14
14
  | `apiKey` | `string` | Required. Long-lived JWT issued by `POST /v1/auth/keys`. |
15
15
  | `fetch` | `typeof fetch` | Optional. Inject for testing. |
16
16
 
17
+ ## Listing, filtering and sorting
18
+
19
+ `individuals.list`, `entities.list`, `accounts.list`, `counterparties.list`,
20
+ `transactions.list` and `alerts.list` share one shape: `{ data, pagination: { nextCursor, totalCount } }`.
21
+ Pass `pagination.nextCursor` back as `cursor` until it is `null`; `limit` is 1 to 100 (default 25).
22
+
23
+ Every filter is optional, and a call with none returns what it always has (newest
24
+ first). Array filters match any of their values and are sent as repeated query
25
+ parameters; separate filters must all match. Timestamps are ISO 8601 strings.
26
+ `totalCount` counts the rows that match the filters.
27
+
28
+ `sortBy` takes the fields listed on each query type (`ListIndividualsQuery`,
29
+ `ListCustomersQuery`, `ListAccountsQuery`, `ListCounterpartiesQuery`,
30
+ `ListTransactionsQuery`, `ListAlertsQuery`); an unknown field is a 400.
31
+ `sortOrder` is `asc` or `desc` (default `desc`). Rows with no value for the sort
32
+ field come last in either direction, and cursors stay valid across the walk.
33
+
34
+ ```ts
35
+ const highRisk = await os.individuals.list({
36
+ riskRating: ['HIGH', 'CRITICAL'],
37
+ country: ['LKA'],
38
+ sortBy: 'riskRating',
39
+ });
40
+
41
+ let cursor: string | undefined;
42
+ do {
43
+ const page = await os.transactions.list({ customerId, status: ['COMPLETE'], sortBy: 'baseAmount', cursor });
44
+ // ...
45
+ cursor = page.pagination.nextCursor ?? undefined;
46
+ } while (cursor);
47
+ ```
48
+
17
49
  ## Resource map
18
50
 
19
51
  ### `sessions` and `channelEndpoints`
@@ -41,7 +73,7 @@ the recorded event-time bounds.
41
73
 
42
74
  | Method | Endpoint |
43
75
  | --- | --- |
44
- | `list(query?)` | `GET /v1/customers/individuals` |
76
+ | `list(query?)` | `GET /v1/customers/individuals` — filters and sort: `ListIndividualsQuery` (status, riskRating, search, country, kycStatus, createdFrom/To, hasActiveAlerts, assignedToUserId, archived) |
45
77
  | `create(input)` | `POST /v1/customers/individuals` |
46
78
  | `get(customerId, query?)` | `GET /v1/customers/individuals/{customerId}` |
47
79
  | `update(customerId, input)` | `PATCH /v1/customers/individuals/{customerId}` |
@@ -91,7 +123,7 @@ whenever both are supplied. Prefer the canonical names in new integrations.
91
123
 
92
124
  | Method | Endpoint |
93
125
  | --- | --- |
94
- | `list(query?)` | `GET /v1/customers/entities` |
126
+ | `list(query?)` | `GET /v1/customers/entities` — filters and sort: `ListCustomersQuery` (as individuals, without `kycStatus`) |
95
127
  | `create(input)` | `POST /v1/customers/entities` |
96
128
  | `get(customerId, query?)` | `GET /v1/customers/entities/{customerId}` |
97
129
  | `update(customerId, input)` | `PATCH /v1/customers/entities/{customerId}` |
@@ -305,7 +337,7 @@ Teams carry catalogue-governed tags under the `team.tags` field-key. `create` an
305
337
 
306
338
  | Method | Endpoint |
307
339
  | --- | --- |
308
- | `list(customerId, query?)` | `GET .../accounts` |
340
+ | `list(customerId, query?)` | `GET .../accounts` — filters and sort: `ListAccountsQuery` (productId, accountCategory, accountType, status, search) |
309
341
  | `create(customerId, input)` | `POST .../accounts` |
310
342
  | `get(customerId, accountId)` | `GET .../accounts/{accountId}` |
311
343
  | `update(customerId, accountId, input)` | `PATCH .../accounts/{accountId}` |
@@ -316,7 +348,7 @@ Teams carry catalogue-governed tags under the `team.tags` field-key. `create` an
316
348
 
317
349
  | Method | Endpoint |
318
350
  | --- | --- |
319
- | `list(query?)` | `GET /v1/counterparties` |
351
+ | `list(query?)` | `GET /v1/counterparties` — filters and sort: `ListCounterpartiesQuery` (customerId, identity, classification, riskRating, country, isHighRiskJurisdiction, isSanctionedEntity, hasActiveAlerts, search) |
320
352
  | `create(input)` | `POST /v1/counterparties` |
321
353
  | `get(id)` | `GET /v1/counterparties/{id}` |
322
354
  | `update(id, input)` | `PATCH /v1/counterparties/{id}` |
@@ -360,8 +392,16 @@ relationship at `validTo` (or the server's current time); it does not delete it.
360
392
  | --- | --- |
361
393
  | `ingest(input)` | `POST /v1/transactions` |
362
394
  | `patchStatus(input)` | `PATCH /v1/transactions` |
395
+ | `list(query?)` | `GET /v1/transactions` — `TransactionResponseDto` rows, most recently executed first; filters and sort: `ListTransactionsQuery` |
363
396
  | `get(reference, { by? })` | `GET /v1/transactions/{transactionId}` — returns `TransactionResponseDto`; `by: 'id'` looks up the internal UUID |
364
397
 
398
+ `list` filters on executedFrom/To, base amount in minor units
399
+ (`baseAmountMinMinor` / `baseAmountMaxMinor`), account, customer (both include
400
+ the receiving side of internal transfers), counterparty, payment instrument,
401
+ channel endpoint, institution, kind, status, direction, currency, country,
402
+ isFlagged and search. There is no origin-amount filter: amounts in different
403
+ currencies do not compare. It needs the same API-key permission as `ingest`.
404
+
365
405
  `ingest` accepts canonical `paymentInstrument` identity by internal ID,
366
406
  integration `externalId`, or typed fingerprint. Transaction resolution creates
367
407
  a Payment Instrument on a deterministic miss. `transaction.channel` may include
@@ -409,6 +449,7 @@ retention is independent of source-attempt cleanup.
409
449
  | Method | Endpoint |
410
450
  | --- | --- |
411
451
  | `create(input)` | `POST /v1/alerts` |
452
+ | `list(query?)` | `GET /v1/alerts` — flat rows without `resources`, newest first; filters and sort: `ListAlertsQuery` (status, type, riskLevel, ruleIds, customerId, counterpartyId, assignedToUserId, assignedToTeamIds, createdFrom/To, search) |
412
453
  | `get(alertId)` | `GET /v1/alerts/{alertId}` |
413
454
  | `updateNotes(alertId, { notes })` | `PATCH /v1/alerts/{alertId}/notes` |
414
455
  | `resources.list(alertId)` | `GET /v1/alerts/{alertId}/resources` |
@@ -523,8 +564,8 @@ organization, rejected with 400 on a duplicate), `email`, `jobTitle`,
523
564
  `orgMemberId`. `update` additionally accepts `metadata`.
524
565
 
525
566
  `list` returns `EmployeeListResponse` — `data` plus the connection shape
526
- (`edges`, `pageInfo`, `meta`). The endpoint declares `cursor` / `limit`, but
527
- the server currently resolves its own paging defaults (first page, 50 records).
567
+ (`edges`, `pageInfo`, `meta`). It pages with `limit` (default 25) and `cursor`:
568
+ pass the previous page's `pageInfo.endCursor` while `pageInfo.hasNextPage` is true.
528
569
 
529
570
  ### `branches`
530
571
 
@@ -542,7 +583,7 @@ act; also an attachable resource for Events and Risk Signals.
542
583
  organization), `code`, `country`, `city`, `institutionId` and `status`
543
584
  (`ACTIVE` | `INACTIVE` | `CLOSED`, default `ACTIVE`). `update` additionally
544
585
  accepts `metadata`. `list` returns `BranchListResponse` with the same shape and
545
- the same paging caveat as `employees`.
586
+ the same paging as `employees`.
546
587
 
547
588
  ### `exchangeRates`
548
589
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dossier-wiki/os-sdk",
3
- "version": "1.5.0",
3
+ "version": "1.6.0-staging.769",
4
4
  "description": "TypeScript SDK for the Dossiers OS API — customers, accounts, transactions, rules, screening, and configuration.",
5
5
  "license": "MIT",
6
6
  "type": "module",