@dossier-wiki/os-sdk 1.3.1-staging.1.1 → 1.3.1-staging.3.1
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/README.md +268 -6
- package/dist/service.d.ts +114 -12
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +153 -15
- package/dist/service.js.map +1 -1
- package/dist/types.d.ts +809 -4
- package/dist/types.d.ts.map +1 -1
- package/docs/REFERENCE.md +110 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -54,7 +54,7 @@ The service composes resource namespaces — call them off the root client:
|
|
|
54
54
|
| `os.channelEndpoints` | Read and manage POS terminal, page, API client, and other endpoint identities resolved during ingestion |
|
|
55
55
|
| `os.individuals` | Individual customers + nested `identificationDocuments`, `faceImages` |
|
|
56
56
|
| `os.entities` | Entity customers + nested `stakeholders` |
|
|
57
|
-
| `os.customers` | Cross-cutting per-customer: `notes`, `files`, `screening`, `riskRating
|
|
57
|
+
| `os.customers` | Cross-cutting per-customer: `notes`, `files`, `screening`, `kyc` (start, review, PDF report, evidence ZIP), `riskRating` (set an officer override / `clearOverride`), `riskAssessments` (list, submit a questionnaire, `evaluate` the risk matrix now), `expectedActivity`, `devices`, `assignment` (assign / unassign / assignMany) |
|
|
58
58
|
| `os.teams` | Domain teams: list/get/create/update/archive/delete, plus `addMembers` / `removeMembers`. Teams carry catalogue-governed `team.tags`, and `list({ tags })` filters on them |
|
|
59
59
|
| `os.accounts` | Per-customer accounts, including `freeze` / `unfreeze` |
|
|
60
60
|
| `os.counterparties` | Counterparties + nested `riskAssessments`, `files` |
|
|
@@ -71,7 +71,7 @@ The service composes resource namespaces — call them off the root client:
|
|
|
71
71
|
| `os.exchangeRates` | Push exchange rates |
|
|
72
72
|
| `os.states` | Read and atomically set, increment, or decrement resource state; read immutable change history |
|
|
73
73
|
| `os.alerts` | Raise alerts by hand (`create` — free-form, or against an optional custom alert type; org-scoped `externalRequestId` idempotency), read any alert (`get`), edit markdown `notes` (`updateNotes`), link records (`resources.list/add/remove`), plus `comments` and `attemptEvidence`. Needs the `alerts:read` / `alerts:write` API-key permissions |
|
|
74
|
-
| `os.config` | `rules` (incl. `rules.backtest` — dry-run simulation over historical or synthetic transactions), `constants`, `states`, `alertWorkflows` (one per alert type — `SCREENING`, `RULE_TRIGGER`, `CUSTOM`: list/get/save), `assignmentPolicies` (read-only legacy archive), `products`, `currencies`, `eventDefinitions`, `customAlertTypes` (org-defined alert types with a typed-field schema), `webhooks`, `tagCatalogue`, `sync`, plus org-wide `reset` |
|
|
74
|
+
| `os.config` | `rules` (incl. `rules.backtest` — dry-run simulation over historical or synthetic transactions), `constants`, `states`, `alertWorkflows` (one per alert type — `SCREENING`, `RULE_TRIGGER`, `CUSTOM`: list/get/save), `assignmentPolicies` (read-only legacy archive), `products`, `profileTemplates` (the template a customer is created against: profile fields, risk matrix, KYC workflows, creation-form setup), `currencies`, `eventDefinitions`, `customAlertTypes` (org-defined alert types with a typed-field schema), `webhooks`, `tagCatalogue`, `sync`, plus org-wide `reset` |
|
|
75
75
|
| `os.setup` | Org setup status + initialization |
|
|
76
76
|
| `os.settings` | Sync snapshots + drift |
|
|
77
77
|
| `os.reports` | On-demand PDF reports: `alert`, `customerProfile`, `counterpartyProfile`, `resourceProfile` — each resolves to the PDF bytes (`Uint8Array`); needs the `report:read` grant |
|
|
@@ -381,10 +381,270 @@ Migration:
|
|
|
381
381
|
- Use `status` for the initial customer lifecycle state. New records default to
|
|
382
382
|
`ONBOARDING`; `monitoringStatus` and `riskRating` are not create inputs.
|
|
383
383
|
|
|
384
|
+
## Profile templates & risk matrix
|
|
385
|
+
|
|
386
|
+
A **Profile Template** is to a customer what a **Product** is to an account:
|
|
387
|
+
the template it is created against. It declares the customer's typed
|
|
388
|
+
**profile fields** (`fieldConfig`, the same `TypedFieldDefinition` shape as
|
|
389
|
+
`Product.accountFieldConfig`), a **risk matrix** that computes the customer's
|
|
390
|
+
risk rating from those fields, KYC workflow bindings, and the **creation
|
|
391
|
+
setup** of the simple Add Individual / Add Entity forms. Templates live under
|
|
392
|
+
`os.config.profileTemplates` and need `config:read` / `config:write`.
|
|
393
|
+
|
|
394
|
+
```ts
|
|
395
|
+
// 1. Define a template (once, or via Tenant Sync).
|
|
396
|
+
await os.config.profileTemplates.create({
|
|
397
|
+
key: 'individual-standard', // immutable; connectors use it instead of a UUID
|
|
398
|
+
name: 'Individual — standard onboarding',
|
|
399
|
+
partyType: 'INDIVIDUAL',
|
|
400
|
+
isDefault: true, // new individuals get it when no key is sent
|
|
401
|
+
fieldConfig: [
|
|
402
|
+
{ key: 'pepStatus', displayName: 'PEP status', type: 'SINGLE_SELECT', required: false,
|
|
403
|
+
options: ['No PEP involvement', 'Former PEP', 'Domestic PEP'] },
|
|
404
|
+
{ key: 'onboardingChannel', displayName: 'Onboarding channel', type: 'SINGLE_SELECT', required: false,
|
|
405
|
+
options: ['Face to face', 'Non face to face'] },
|
|
406
|
+
],
|
|
407
|
+
riskMatrix: {
|
|
408
|
+
scale: [{ level: 'LOW', score: 1 }, { level: 'MEDIUM', score: 2 }, { level: 'HIGH', score: 3 }],
|
|
409
|
+
bands: [{ rating: 'LOW', below: 1.67 }, { rating: 'MEDIUM', below: 2.34 }, { rating: 'HIGH' }],
|
|
410
|
+
factors: [
|
|
411
|
+
{ key: 'pepStatus', label: 'PEP status', weight: 0.6, field: 'pepStatus', levels: [
|
|
412
|
+
{ option: 'No PEP involvement', level: 'LOW' },
|
|
413
|
+
{ option: 'Former PEP', level: 'MEDIUM' },
|
|
414
|
+
{ option: 'Domestic PEP', level: 'HIGH' },
|
|
415
|
+
] },
|
|
416
|
+
{ key: 'channel', label: 'Onboarding channel', weight: 0.4, field: 'onboardingChannel', levels: [
|
|
417
|
+
{ option: 'Face to face', level: 'LOW' },
|
|
418
|
+
{ option: 'Non face to face', level: 'HIGH' },
|
|
419
|
+
] },
|
|
420
|
+
],
|
|
421
|
+
escalations: [
|
|
422
|
+
{ label: 'PEP involvement', minimumRating: 'HIGH',
|
|
423
|
+
when: { field: 'factor.pepStatus.level', operator: '=', value: 'HIGH' } },
|
|
424
|
+
],
|
|
425
|
+
outcomes: [
|
|
426
|
+
{ rating: 'LOW', requiredDueDiligence: 'SDD', reviewEveryMonths: 36 },
|
|
427
|
+
{ rating: 'MEDIUM', requiredDueDiligence: 'CDD', reviewEveryMonths: 24 },
|
|
428
|
+
{ rating: 'HIGH', requiredDueDiligence: 'EDD', reviewEveryMonths: 12 },
|
|
429
|
+
],
|
|
430
|
+
},
|
|
431
|
+
});
|
|
432
|
+
|
|
433
|
+
// 2. Create a customer with profile fields (Tier A: validated against the template).
|
|
434
|
+
const customer = await os.individuals.create({
|
|
435
|
+
externalId: 'USR-10044',
|
|
436
|
+
fullName: 'Nadia Perera',
|
|
437
|
+
profileTemplateKey: 'individual-standard', // optional here: it is the default
|
|
438
|
+
fields: [
|
|
439
|
+
{ key: 'pepStatus', type: 'SINGLE_SELECT', value: 'No PEP involvement' },
|
|
440
|
+
{ key: 'onboardingChannel', type: 'SINGLE_SELECT', value: 'Non face to face' },
|
|
441
|
+
],
|
|
442
|
+
});
|
|
443
|
+
|
|
444
|
+
// 3. Read the rating. The matrix runs in the background (a few seconds after
|
|
445
|
+
// the last profile write, plus a daily sweep). `evaluate` runs it now.
|
|
446
|
+
const assessment = await os.customers.riskAssessments.evaluate(customer.id);
|
|
447
|
+
assessment.resultingRiskRating; // 'MEDIUM' (0.6 × 1 + 0.4 × 3 = 1.8)
|
|
448
|
+
assessment.compositeScore; // 1.8 — intermediate number, not the rating
|
|
449
|
+
assessment.breakdown?.factors; // input → criterion → level → score → weighted, per factor
|
|
450
|
+
assessment.requiredDueDiligence; // 'CDD'
|
|
451
|
+
assessment.nextReviewAt; // 'YYYY-MM-DD'
|
|
452
|
+
|
|
453
|
+
const latest = await os.individuals.get(customer.id);
|
|
454
|
+
latest.riskRating; // 'MEDIUM'
|
|
455
|
+
latest.riskRatingSource; // 'MATRIX'
|
|
456
|
+
latest.fields; // [{ key: 'pepStatus', type: 'SINGLE_SELECT', value: 'No PEP involvement' }, …]
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
How factors score: each factor has a **weight** (weights sum to 1) and turns
|
|
460
|
+
one profile field into points, which the weight scales into the composite.
|
|
461
|
+
Select fields give each option a level (`levels`), optionally with its own
|
|
462
|
+
`score` — points per selection, overriding the level's scale score while the
|
|
463
|
+
level still drives display and escalations. **Yes/no** (BOOLEAN) fields use
|
|
464
|
+
the options `"true"` and `"false"`. **Number and money** fields use `ranges`
|
|
465
|
+
(`{ min, max, level, score? }`, min inclusive, max exclusive, either end open,
|
|
466
|
+
no overlaps; money compares in major units of the field's currency). A
|
|
467
|
+
**multi-select** scores the selected option with the highest score. Anything
|
|
468
|
+
else uses explicit `criteria` condition trees.
|
|
469
|
+
|
|
470
|
+
```ts
|
|
471
|
+
{ key: 'expectedMonthly', label: 'Expected monthly investment', weight: 0.1,
|
|
472
|
+
field: 'expectedMonthlyInvestment', ranges: [ // a MONETARY field
|
|
473
|
+
{ max: 100_000, level: 'LOW' },
|
|
474
|
+
{ min: 100_000, max: 1_000_000, level: 'MEDIUM' },
|
|
475
|
+
{ min: 1_000_000, level: 'HIGH', score: 4 }, // own points instead of HIGH's scale score
|
|
476
|
+
] }
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
How it behaves:
|
|
480
|
+
|
|
481
|
+
- **Updates merge.** `individuals.update` / `entities.update` accept `fields`:
|
|
482
|
+
listed keys change, `{ key, type, value: null }` clears a field, unlisted
|
|
483
|
+
keys stay. Pass `profileTemplateKey` to switch template (same party type).
|
|
484
|
+
Each profile write re-scores the customer (bursts are coalesced), so a CRM
|
|
485
|
+
pushing its daily delta with `PATCH` gets a fresh rating within seconds.
|
|
486
|
+
- **Officer overrides are sticky.** `customers.riskRating.update` sets
|
|
487
|
+
`riskRatingSource: 'MANUAL'`. Matrix runs still record their computed rating
|
|
488
|
+
(`customers.riskAssessments.list`, `method: 'MATRIX'`) but never overwrite a
|
|
489
|
+
MANUAL rating. `customers.riskRating.clearOverride(customerId)` hands the
|
|
490
|
+
rating back to the matrix and resolves to the latest matrix assessment.
|
|
491
|
+
- **Assessments share one list.** `customers.riskAssessments.list` returns
|
|
492
|
+
questionnaires (`method: 'QUESTIONNAIRE'`) and matrix runs (`method:
|
|
493
|
+
'MATRIX'`, with `compositeScore`, `breakdown`, `profileTemplateVersion`,
|
|
494
|
+
`trigger`, `requiredDueDiligence`, `nextReviewAt`). A matrix run is written
|
|
495
|
+
only when its inputs or outcome change.
|
|
496
|
+
- **Webhooks.** When the matrix changes a rating, `customer.risk_changed` is
|
|
497
|
+
delivered with `source: 'risk_matrix'`, `previousRating`, `newRating`,
|
|
498
|
+
`compositeScore`, `requiredDueDiligence` and `riskAssessmentId`.
|
|
499
|
+
- **Templates are versioned.** Changing `fieldConfig`, `riskMatrix`,
|
|
500
|
+
`kycWorkflows` or the creation setup publishes a new version
|
|
501
|
+
(`profileTemplates.versions(id)`); `fieldConfig` / `riskMatrix` changes also
|
|
502
|
+
re-assess every customer on the template. `archive(id)` stops new customers
|
|
503
|
+
using it; existing customers keep it.
|
|
504
|
+
- **Creation setup.** `individualCreation` (`INDIVIDUAL` templates) or
|
|
505
|
+
`entityCreation` (`ENTITY` templates) configures the simple Add Individual /
|
|
506
|
+
Add Entity form for the template: on/off and open-by-default, external-ID
|
|
507
|
+
strategy, presets (tags + assignees), and the document or registration
|
|
508
|
+
types offered. The other party type's field is always `null` on responses
|
|
509
|
+
and a 400 on writes. A template created without one copies the org's
|
|
510
|
+
current Simple Customer Creation preference; on `update`, a value fully
|
|
511
|
+
replaces the setup and `null` clears it (the org-wide preference then
|
|
512
|
+
applies). Read shape: `SimpleCustomerCreationPreferences` /
|
|
513
|
+
`SimpleEntityCreationPreferences`; write shape:
|
|
514
|
+
`UpdateSimpleCustomerCreationPreferencesInput` /
|
|
515
|
+
`UpdateSimpleEntityCreationPreferencesInput`.
|
|
516
|
+
|
|
517
|
+
```ts
|
|
518
|
+
await os.config.profileTemplates.update(templateId, {
|
|
519
|
+
individualCreation: {
|
|
520
|
+
enabled: true,
|
|
521
|
+
openByDefault: true,
|
|
522
|
+
externalIdStrategy: 'DOCUMENT',
|
|
523
|
+
documentTypes: [{ label: 'NIC (Sri Lanka)', type: 'NATIONAL_ID', country: 'LKA' }],
|
|
524
|
+
presets: [{ label: 'General Insurance', tags: [{ label: 'General Insurance' }],
|
|
525
|
+
assignedToUserIds: [], assignedToTeamIds: [giTeamId] }],
|
|
526
|
+
allowTags: false,
|
|
527
|
+
allowAssignment: false,
|
|
528
|
+
},
|
|
529
|
+
});
|
|
530
|
+
```
|
|
531
|
+
- Profile fields are **not** readable by rules. Promote a value to a
|
|
532
|
+
`$customer.*` constant if a rule needs it.
|
|
533
|
+
|
|
534
|
+
### Derived inputs
|
|
535
|
+
|
|
536
|
+
A factor can read a value the platform derives itself instead of a profile
|
|
537
|
+
field, by setting `input` instead of `field` (`RiskMatrixDerivedInput`).
|
|
538
|
+
Nobody has to push these as picklist answers, and they re-score on their own
|
|
539
|
+
when the underlying data changes:
|
|
540
|
+
|
|
541
|
+
| `input` | Value | Score it with |
|
|
542
|
+
|---|---|---|
|
|
543
|
+
| `customer.nationality` | ISO-3 codes: an individual's nationalities, an entity's country of incorporation | `levels` per code, or `criteria` against a `$global.*` country list |
|
|
544
|
+
| `customer.productKeys` | Product keys (`syncKey`, else `externalId`) of the customer's accounts that are not closed | `levels` per product key |
|
|
545
|
+
| `customer.expectedMonthlyVolume` | The expected activity profile's monthly volume | `ranges` |
|
|
546
|
+
|
|
547
|
+
When a customer holds several values of a list input, the riskiest scores.
|
|
548
|
+
|
|
549
|
+
```ts
|
|
550
|
+
{ key: 'citizenship', label: 'Citizenship', weight: 0.05, input: 'customer.nationality', whenUnmatched: 'HIGH',
|
|
551
|
+
criteria: [
|
|
552
|
+
{ label: 'FATF grey/black list', level: 'HIGH',
|
|
553
|
+
when: { field: 'customer.nationality', operator: 'IN', value: '$global.fatfGreyBlackCountries' } },
|
|
554
|
+
{ label: 'Any other nationality', level: 'LOW',
|
|
555
|
+
when: { field: 'customer.nationality', operator: 'IS_NOT_EMPTY', value: '' } },
|
|
556
|
+
] }
|
|
557
|
+
```
|
|
558
|
+
|
|
559
|
+
Updating the `$global.fatfGreyBlackCountries` constant re-scores everyone in
|
|
560
|
+
the next daily sweep. Changes to the expected activity profile re-score at once;
|
|
561
|
+
accounts opened or closed are picked up by the daily sweep.
|
|
562
|
+
|
|
563
|
+
### Dry runs: preview and impact
|
|
564
|
+
|
|
565
|
+
Score an unsaved matrix without saving it. The draft is validated exactly as a
|
|
566
|
+
save would be (400 lists every problem), and both calls compare it with the
|
|
567
|
+
template's saved matrix evaluated on the same inputs.
|
|
568
|
+
|
|
569
|
+
```ts
|
|
570
|
+
// One customer, draft next to the saved matrix
|
|
571
|
+
const preview = await os.config.profileTemplates.previewRiskMatrix({
|
|
572
|
+
customerId, fieldConfig: draft.fieldConfig, riskMatrix: draft.riskMatrix,
|
|
573
|
+
});
|
|
574
|
+
preview.published?.finalRating; // 'HIGH'
|
|
575
|
+
preview.draft.finalRating; // 'MEDIUM'
|
|
576
|
+
|
|
577
|
+
// Every live customer on the template
|
|
578
|
+
const impact = await os.config.profileTemplates.riskMatrixImpact(templateId, {
|
|
579
|
+
fieldConfig: draft.fieldConfig, riskMatrix: draft.riskMatrix,
|
|
580
|
+
});
|
|
581
|
+
impact.changed; // customers whose rating would move
|
|
582
|
+
impact.movements; // [{ from: 'LOW', to: 'MEDIUM', count: 312 }, ...]
|
|
583
|
+
impact.customers; // who moves, rises before falls, biggest change first (at most 100)
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
Customers with an officer override are counted in `overriddenChanged`; their
|
|
587
|
+
rating would not move. Up to 5,000 customers are scored per call (`truncated`
|
|
588
|
+
says when there were more).
|
|
589
|
+
|
|
590
|
+
### KYC output mappings
|
|
591
|
+
|
|
592
|
+
A template's KYC binding can write a verified session's answers back to the
|
|
593
|
+
customer. Each mapping reads one session value and writes it to a profile field
|
|
594
|
+
(`fields.<key>`) or a customer-level constant (`$customer.<name>`). Constants
|
|
595
|
+
are the way to make a KYC answer readable by rules; profile fields never are.
|
|
596
|
+
|
|
597
|
+
```ts
|
|
598
|
+
await os.config.profileTemplates.update(templateId, {
|
|
599
|
+
kycWorkflows: [{
|
|
600
|
+
purpose: 'ONBOARDING',
|
|
601
|
+
providerConfigId,
|
|
602
|
+
workflowId: 'wf_onboarding',
|
|
603
|
+
mappings: [
|
|
604
|
+
{ source: 'form.occupation', target: 'fields.occupation',
|
|
605
|
+
valueMap: [{ from: 'Software engineer', to: 'IT / Software Professional' }] },
|
|
606
|
+
{ source: 'session.verified', target: 'fields.onboardingChannel',
|
|
607
|
+
valueMap: [{ from: 'true', to: 'Non Face to Face Clients' }], mode: 'OVERWRITE' },
|
|
608
|
+
{ source: 'person.nationality', target: '$customer.kycNationalities' },
|
|
609
|
+
],
|
|
610
|
+
}],
|
|
611
|
+
});
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
- Mappings run once, when a session of that workflow becomes verified (the
|
|
615
|
+
provider approved it, or an officer approved it in the OS).
|
|
616
|
+
- `FILL` (default) writes only an empty target; `OVERWRITE` replaces it.
|
|
617
|
+
- A value the target cannot hold (e.g. an answer that is not one of the field's
|
|
618
|
+
options) is skipped; the rest still apply.
|
|
619
|
+
- The save validates sources, targets, options and constants, and lists every
|
|
620
|
+
problem in one 400.
|
|
621
|
+
- Constant writes carry the session id as their reason in the constant history.
|
|
622
|
+
Any change re-scores the customer.
|
|
623
|
+
|
|
624
|
+
### Periodic reviews
|
|
625
|
+
|
|
626
|
+
Every matrix run keeps the customer's `nextReviewAt` (on individual and
|
|
627
|
+
entity responses) in line with the review cycle of the rating in force
|
|
628
|
+
(`outcomes[].reviewEveryMonths`). The clock starts at the first rating. A rise
|
|
629
|
+
to a rating with a shorter cycle brings the review forward; a fall leaves it
|
|
630
|
+
where it is. When the date arrives, the daily sweep opens a Task labelled
|
|
631
|
+
`periodic-review`, assigned to the customer's assignees, due on the review
|
|
632
|
+
date and linked to the customer. Closing that Task (done or cancelled)
|
|
633
|
+
restarts the clock from that day.
|
|
634
|
+
|
|
635
|
+
### Override disagreement
|
|
636
|
+
|
|
637
|
+
While an officer override is in force, the matrix keeps scoring. When its
|
|
638
|
+
rating moves away from the override, the customer's assignees get a
|
|
639
|
+
notification ("The risk matrix disagrees with an officer-set rating"). It is
|
|
640
|
+
sent once per change, not on every run.
|
|
641
|
+
|
|
642
|
+
Spec: [`docs/specs/profile-templates/README.md`](../../docs/specs/profile-templates/README.md).
|
|
643
|
+
|
|
384
644
|
## Tenant sync — config-as-code (BREAKING in v0.7.0)
|
|
385
645
|
|
|
386
646
|
`os.config.sync` drives declarative tenant config (products, constants, event
|
|
387
|
-
definitions, webhooks, rules, currencies, and tenant behaviour settings). You build a `SyncConfig` and the
|
|
647
|
+
definitions, webhooks, rules, currencies, profile templates, and tenant behaviour settings). You build a `SyncConfig` and the
|
|
388
648
|
**server** validates, diffs, and applies it — clients hold no diff/apply logic.
|
|
389
649
|
This backs the `dossiers-sync` CLI.
|
|
390
650
|
|
|
@@ -447,12 +707,14 @@ const { tokens } = await os.config.tagCatalogue.palette(); // valid `color` valu
|
|
|
447
707
|
> accepted. Product DTOs no longer carry `metadata` — use `otherProperties`
|
|
448
708
|
> instead.
|
|
449
709
|
|
|
450
|
-
Accounts, products, and event ingestion accept the platform's Typed Fields
|
|
710
|
+
Accounts, products, customers, and event ingestion accept the platform's Typed Fields
|
|
451
711
|
primitive — a typed key/value bag (`fields`) plus an untyped escape hatch
|
|
452
712
|
(`otherProperties`). Collection fields are explicit: `LIST` is open-ended,
|
|
453
713
|
while `SINGLE_SELECT` and `MULTI_SELECT` are constrained by the declared
|
|
454
|
-
`options` on the parent schema (`Product.accountFieldConfig
|
|
455
|
-
`EventDefinition.properties`). Legacy `SET`
|
|
714
|
+
`options` on the parent schema (`Product.accountFieldConfig`,
|
|
715
|
+
`ProfileTemplate.fieldConfig` or `EventDefinition.properties`). Legacy `SET`
|
|
716
|
+
remains supported but is deprecated. Customer `fields` are always Tier A — see
|
|
717
|
+
[Profile templates & risk matrix](#profile-templates--risk-matrix).
|
|
456
718
|
|
|
457
719
|
```ts
|
|
458
720
|
import type { TypedFieldValueInput } from '@dossier-wiki/os-sdk';
|
package/dist/service.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AlertWorkflowVersion, RestoreAlertWorkflowInput, AlertWorkflowExperienceSettings, SaveAlertWorkflowExperienceInput, AlertWorkflowSettings, SaveAlertWorkflowInput, WorkflowAlertType } from "./types.js";
|
|
2
|
-
import type { AccountResponseDto, AddFaceImageDto, AlertResourceDto, AlertResourceRefDto, AlertResponseDto, CreateCustomAlertDto, CreateCustomAlertTypeDto, CustomAlertTypeResponseDto, UpdateAlertNotesDto, UpdateCustomAlertTypeDto, TagFieldKey, TagCatalogueEntry, TagGroup, TagGroupInput, UpdateTagGroupInput, RegroupReport, TagCatalogueEntryInput, UpdateTagCatalogueEntryInput, ApiKeyResponseDto, ArchiveIdentificationDocumentInput, BulkCurrencyStatusInput, BulkUpsertOtherInformationInput, CustomerOtherInformationEntry, BulkCurrencyStatusResponseDto, CommentResourceType, ConfirmUploadDto, ConfirmedMatchDto, ConstantResponseDto, ChangeResourceStateInput, CreateStateDefinitionInput, CounterpartyResponseDto, CreateAccountDto, CreateApiKeyDto, CreateConstantDto, CreateCounterpartyDto, CreateCurrencyInput, CreateEntityInput, CreateEventDefinitionDto, CreateIdentificationDocumentInput, CreateIndividualInput, CreateNoteDto, CreateProductDto, CreateRiskAssessmentDto, CreateCustomerRiskAssessmentDto, CreateRuleDto, CreateStakeholderDto, CreateWebhookDto, CurrencyResponseDto, CursorPaginationQuery, DeleteConstantQuery, DeleteIdentificationDocumentResponse, DeviceResponseDto, DeviceMergeResponseDto, MergeDeviceDto, DeviceSummaryDto, EntityResponseDto, EntityCreatedResponseDto, CreateCustomerOptions, EventDefinitionResponseDto, ExpectedActivityResponseDto, FileResponseDto, GetCustomerQuery, IdentificationDocument, IndividualResponseDto, IndividualCreatedResponseDto, IngestEventDto, IngestEventResponse, IngestTransactionAsyncResponse, IngestTransactionAttemptDto, IngestTransactionAttemptResponse, ListTransactionAttemptsInput, TransactionAttemptDto, TransactionAttemptPage, AlertAttemptEvidence, TenantBehaviorSettings, UpdateTenantBehaviorSettingsInput, IngestTransactionDto, IngestTransactionResponse, InitializeSetupDto, InvitationDetailsDto, LinkCounterpartyDto, MergeCounterpartiesDto, ListAccountsResponse, ListCounterpartiesResponse, ListCurrenciesQuery, ListEntitiesResponse, ListIdentificationDocumentsQuery, ListIndividualsResponse, NoteResponseDto, PatchTransactionStatusDto, TransactionResponseDto, PaymentInstrumentDto, CreatePaymentInstrumentDto, UpdatePaymentInstrumentDto, LinkPaymentInstrumentAccountDto, LinkPaymentInstrumentCustomerDto, PaymentInstrumentAccountRelationshipDto, PaymentInstrumentCustomerRelationshipDto, PlatformComment, PlatformConfirmUploadDto, PlatformConfirmUploadResponseDto, PlatformCreateCommentDto, PlatformRequestUploadUrlDto, PlatformUpdateCommentDto, PlatformUploadUrlResponseDto, ProductResponseDto, PushExchangeRatesDto, PushExchangeRatesResponseDto, RegisterDeviceDto, RequestUploadUrlDto, ResetConfigResponseDto, ResetMemberPasswordDto, RiskAssessmentResponseDto, CustomerRiskAssessmentResponseDto, RuleResponseDto, RuleVersionResponseDto, RuleAnalyticsResponseDto, ScreeningResultDto, ScreeningHistoryEntryDto, StartKycSessionResponseDto, KycSessionDto, ScreeningMatchResultDto, SimulateRulesDto, SimulationReportDto, SetupInitializeResponseDto, SetupStatusDto, StakeholderResponseDto, SyncSnapshotDto, SyncDriftDto, CreateSyncSnapshotInput, SyncKeyQuery, ListConstantsQuery, ResourceStateDto, ResourceStateHistoryDto, StateDefinitionDto, StateResourceType, SyncConfig, SyncValidationResult, SyncPlanResult, SyncApplyResult, SyncExportQuery, TokenResponseDto, TransitionIdentificationDocumentStatusInput, UploadUrlResponseDto, UpdateAccountDto, UpdateConstantDto, UpdateCounterpartyDto, UpdateCurrencyInput, UpdateDeviceTrustDto, UpdateEntityDto, UpdateEventDefinitionDto, UpdateExpectedActivityDto, UpdateFaceImageDto, UpdateIdentificationDocumentDto, UpdateIdentificationDocumentInput, UpdateIndividualDto, UpdateNoteDto, UpsertOtherInformationValueInput, UpdateProductDto, UpdateRiskRatingDto, UpdateCustomerStatusDto, UpdateCustomerStatusResponse, ArchiveCustomerDto, ArchiveCustomerResponse, UpdateRuleDto, UpdateStakeholderDto, UpdateWebhookDto, WebhookResponseDto, BulkCustomListImportResultDto, CreateCustomScreeningListInput, CustomListEntryDto, CustomListEntryInput, CustomListEntryListResponse, CustomScreeningListDto, CustomScreeningListListResponse, UpdateCustomListEntryInput, UpdateCustomScreeningListInput, AssignmentPolicyResponseDto, CreateAssignmentPolicyDto, UpdateAssignmentPolicyDto, ReorderAssignmentPoliciesDto, TeamRefDto, TeamDto, CreateTeamDto, UpdateTeamDto, TeamMemberIdsDto, CustomerAssignmentInput, BulkCustomerAssignmentInput, CustomerAssignmentResponse, BulkCustomerAssignmentResult, SessionDto, UpdateSessionDto, ChannelEndpointDto, UpdateChannelEndpointDto, Branch, BranchListResponse, CreateBranchInput, UpdateBranchInput, Employee, EmployeeListResponse, CreateEmployeeInput, UpdateEmployeeInput, CreateRiskSignalInput, ListRiskSignalsQuery, RiskSignal, RiskSignalListResponse, PartyRelationship, PartyRelationshipPartyType, PartyRelationshipType, CreatePartyRelationshipInput, CreatePartyRelationshipTypeInput } from './types.js';
|
|
2
|
+
import type { AccountResponseDto, AddFaceImageDto, AlertResourceDto, AlertResourceRefDto, AlertResponseDto, CreateCustomAlertDto, CreateCustomAlertTypeDto, CustomAlertTypeResponseDto, UpdateAlertNotesDto, UpdateCustomAlertTypeDto, TagFieldKey, TagCatalogueEntry, TagGroup, TagGroupInput, UpdateTagGroupInput, RegroupReport, TagCatalogueEntryInput, UpdateTagCatalogueEntryInput, ApiKeyResponseDto, ArchiveIdentificationDocumentInput, BulkCurrencyStatusInput, BulkUpsertOtherInformationInput, CustomerOtherInformationEntry, BulkCurrencyStatusResponseDto, CommentResourceType, ConfirmUploadDto, ConfirmedMatchDto, ConstantResponseDto, ChangeResourceStateInput, CreateStateDefinitionInput, CounterpartyResponseDto, CreateAccountDto, CreateApiKeyDto, CreateConstantDto, CreateCounterpartyDto, CreateCurrencyInput, CreateEntityInput, CreateEventDefinitionDto, CreateIdentificationDocumentInput, CreateIndividualInput, CreateNoteDto, CreateProductDto, CreateRiskAssessmentDto, CreateCustomerRiskAssessmentDto, CreateRuleDto, CreateStakeholderDto, CreateWebhookDto, CurrencyResponseDto, CursorPaginationQuery, DeleteConstantQuery, DeleteIdentificationDocumentResponse, DeviceResponseDto, DeviceMergeResponseDto, MergeDeviceDto, DeviceSummaryDto, EntityResponseDto, EntityCreatedResponseDto, CreateCustomerOptions, EventDefinitionResponseDto, ExpectedActivityResponseDto, FileResponseDto, GetCustomerQuery, IdentificationDocument, IndividualResponseDto, IndividualCreatedResponseDto, IngestEventDto, IngestEventResponse, IngestTransactionAsyncResponse, IngestTransactionAttemptDto, IngestTransactionAttemptResponse, ListTransactionAttemptsInput, TransactionAttemptDto, TransactionAttemptPage, AlertAttemptEvidence, TenantBehaviorSettings, UpdateTenantBehaviorSettingsInput, IngestTransactionDto, IngestTransactionResponse, InitializeSetupDto, InvitationDetailsDto, LinkCounterpartyDto, MergeCounterpartiesDto, ListAccountsResponse, ListCounterpartiesResponse, ListCurrenciesQuery, ListEntitiesResponse, ListIdentificationDocumentsQuery, ListIndividualsResponse, NoteResponseDto, PatchTransactionStatusDto, TransactionResponseDto, PaymentInstrumentDto, CreatePaymentInstrumentDto, UpdatePaymentInstrumentDto, LinkPaymentInstrumentAccountDto, LinkPaymentInstrumentCustomerDto, PaymentInstrumentAccountRelationshipDto, PaymentInstrumentCustomerRelationshipDto, PlatformComment, PlatformConfirmUploadDto, PlatformConfirmUploadResponseDto, PlatformCreateCommentDto, PlatformRequestUploadUrlDto, PlatformUpdateCommentDto, PlatformUploadUrlResponseDto, ProductResponseDto, PushExchangeRatesDto, PushExchangeRatesResponseDto, RegisterDeviceDto, RequestUploadUrlDto, ResetConfigResponseDto, ResetMemberPasswordDto, RiskAssessmentResponseDto, CustomerRiskAssessmentResponseDto, RuleResponseDto, RuleVersionResponseDto, RuleAnalyticsResponseDto, ScreeningResultDto, ScreeningHistoryEntryDto, StartKycSessionInput, StartKycSessionResponseDto, ReviewKycSessionInput, KycSessionDto, ScreeningMatchResultDto, SimulateRulesDto, SimulationReportDto, SetupInitializeResponseDto, SetupStatusDto, StakeholderResponseDto, SyncSnapshotDto, SyncDriftDto, CreateSyncSnapshotInput, SyncKeyQuery, ListConstantsQuery, ResourceStateDto, ResourceStateHistoryDto, StateDefinitionDto, StateResourceType, SyncConfig, SyncValidationResult, SyncPlanResult, SyncApplyResult, SyncExportQuery, TokenResponseDto, TransitionIdentificationDocumentStatusInput, UploadUrlResponseDto, UpdateAccountDto, UpdateConstantDto, UpdateCounterpartyDto, UpdateCurrencyInput, UpdateDeviceTrustDto, UpdateEntityDto, UpdateEventDefinitionDto, UpdateExpectedActivityDto, UpdateFaceImageDto, UpdateIdentificationDocumentDto, UpdateIdentificationDocumentInput, UpdateIndividualDto, UpdateNoteDto, UpsertOtherInformationValueInput, UpdateProductDto, UpdateRiskRatingDto, UpdateRiskRatingResponseDto, ProfileTemplate, ProfileTemplateVersion, ListProfileTemplatesQuery, CreateProfileTemplateInput, UpdateProfileTemplateInput, PreviewRiskMatrixInput, RiskMatrixImpactInput, RiskMatrixPreview, RiskMatrixImpact, UpdateCustomerStatusDto, UpdateCustomerStatusResponse, ArchiveCustomerDto, ArchiveCustomerResponse, UpdateRuleDto, UpdateStakeholderDto, UpdateWebhookDto, WebhookResponseDto, BulkCustomListImportResultDto, CreateCustomScreeningListInput, CustomListEntryDto, CustomListEntryInput, CustomListEntryListResponse, CustomScreeningListDto, CustomScreeningListListResponse, UpdateCustomListEntryInput, UpdateCustomScreeningListInput, AssignmentPolicyResponseDto, CreateAssignmentPolicyDto, UpdateAssignmentPolicyDto, ReorderAssignmentPoliciesDto, TeamRefDto, TeamDto, CreateTeamDto, UpdateTeamDto, TeamMemberIdsDto, CustomerAssignmentInput, BulkCustomerAssignmentInput, CustomerAssignmentResponse, BulkCustomerAssignmentResult, SessionDto, UpdateSessionDto, ChannelEndpointDto, UpdateChannelEndpointDto, Branch, BranchListResponse, CreateBranchInput, UpdateBranchInput, Employee, EmployeeListResponse, CreateEmployeeInput, UpdateEmployeeInput, CreateRiskSignalInput, ListRiskSignalsQuery, RiskSignal, RiskSignalListResponse, PartyRelationship, PartyRelationshipPartyType, PartyRelationshipType, CreatePartyRelationshipInput, CreatePartyRelationshipTypeInput } from './types.js';
|
|
3
3
|
export interface DossiersOSAPIServiceOptions {
|
|
4
4
|
/** Base URL of the OS API host, e.g. `https://sandbox-os.dossiers.wiki`. The `/v1` prefix is added by the SDK. */
|
|
5
5
|
baseUrl: string;
|
|
@@ -18,7 +18,7 @@ type RequestOptions = {
|
|
|
18
18
|
query?: Record<string, unknown> | object;
|
|
19
19
|
};
|
|
20
20
|
type RequestFn = <T>(method: HttpMethod, path: string, opts?: RequestOptions) => Promise<T>;
|
|
21
|
-
type BinaryRequestFn = (path: string) => Promise<Uint8Array>;
|
|
21
|
+
type BinaryRequestFn = (path: string, accept?: string) => Promise<Uint8Array>;
|
|
22
22
|
export declare class DossiersOSAPIService {
|
|
23
23
|
private readonly apiKey;
|
|
24
24
|
private readonly baseUrl;
|
|
@@ -54,7 +54,7 @@ export declare class DossiersOSAPIService {
|
|
|
54
54
|
readonly partyRelationships: PartyRelationshipsResource;
|
|
55
55
|
constructor(options: DossiersOSAPIServiceOptions);
|
|
56
56
|
private request;
|
|
57
|
-
/** GET a binary body (PDF reports). Errors are parsed the same way as JSON requests. */
|
|
57
|
+
/** GET a binary body (PDF reports, ZIP bundles). Errors are parsed the same way as JSON requests. */
|
|
58
58
|
private requestBinary;
|
|
59
59
|
}
|
|
60
60
|
export declare class PartyRelationshipsResource {
|
|
@@ -184,7 +184,7 @@ export declare class CustomersResource {
|
|
|
184
184
|
readonly expectedActivity: CustomerExpectedActivityResource;
|
|
185
185
|
readonly devices: CustomerDevicesResource;
|
|
186
186
|
readonly assignment: CustomerAssignmentResource;
|
|
187
|
-
constructor(req: RequestFn);
|
|
187
|
+
constructor(req: RequestFn, getBinary: BinaryRequestFn);
|
|
188
188
|
/**
|
|
189
189
|
* `POST /v1/customers/{customerId}/archive` — archive a customer
|
|
190
190
|
* (organization owner/admin only, irreversible). Frees the customer's
|
|
@@ -289,13 +289,18 @@ export declare class CustomerScreeningResource {
|
|
|
289
289
|
*/
|
|
290
290
|
export declare class CustomerKycResource {
|
|
291
291
|
private readonly req;
|
|
292
|
-
|
|
292
|
+
private readonly getBinary;
|
|
293
|
+
constructor(req: RequestFn, getBinary: BinaryRequestFn);
|
|
293
294
|
/**
|
|
294
|
-
* `POST /v1/customers/{customerId}/kyc/sessions` — start a KYC session
|
|
295
|
-
*
|
|
296
|
-
*
|
|
295
|
+
* `POST /v1/customers/{customerId}/kyc/sessions` — start a KYC session.
|
|
296
|
+
* Hand the returned `sessionUrl` to the customer.
|
|
297
|
+
*
|
|
298
|
+
* `input.providerConfigId` picks the KYC provider (required when the
|
|
299
|
+
* organization has several enabled — the API answers 400 otherwise);
|
|
300
|
+
* `input.workflowId` picks the provider workflow (defaults to the
|
|
301
|
+
* provider's configured default workflow, then the provider's own).
|
|
297
302
|
*/
|
|
298
|
-
start(customerId: string): Promise<StartKycSessionResponseDto>;
|
|
303
|
+
start(customerId: string, input?: StartKycSessionInput): Promise<StartKycSessionResponseDto>;
|
|
299
304
|
/**
|
|
300
305
|
* `GET /v1/customers/{customerId}/kyc/sessions` — list a customer's KYC
|
|
301
306
|
* sessions, newest first.
|
|
@@ -307,8 +312,33 @@ export declare class CustomerKycResource {
|
|
|
307
312
|
*/
|
|
308
313
|
refresh(customerId: string, sessionId: string): Promise<KycSessionDto>;
|
|
309
314
|
/**
|
|
310
|
-
* `
|
|
311
|
-
*
|
|
315
|
+
* `POST /v1/customers/{customerId}/kyc/sessions/{sessionId}/review` —
|
|
316
|
+
* approve or reject a finished session (status `IN_REVIEW`, `VERIFIED` or
|
|
317
|
+
* `FAILED`). The decision is the verdict of record; rejecting requires a
|
|
318
|
+
* `reason`. Needs the `customer:update` permission.
|
|
319
|
+
*/
|
|
320
|
+
review(customerId: string, sessionId: string, input: ReviewKycSessionInput): Promise<KycSessionDto>;
|
|
321
|
+
/**
|
|
322
|
+
* `GET /v1/customers/{customerId}/kyc/sessions/{sessionId}/report` — the
|
|
323
|
+
* session as a PDF: summary, officer review, findings, each step's evidence
|
|
324
|
+
* (cropped document pages, faces, liveness frames, form answers), checks and
|
|
325
|
+
* claimed-vs-document comparison. Built from the record the OS holds, so it
|
|
326
|
+
* works after the provider has deleted its copy. Requires `report:read`;
|
|
327
|
+
* records a `report.generated` activity on the customer.
|
|
328
|
+
*/
|
|
329
|
+
report(customerId: string, sessionId: string): Promise<Uint8Array>;
|
|
330
|
+
/**
|
|
331
|
+
* `GET /v1/customers/{customerId}/kyc/sessions/{sessionId}/evidence` — a ZIP
|
|
332
|
+
* with the PDF report (`report.pdf`), every archived evidence file at full
|
|
333
|
+
* resolution (`evidence/`, including liveness video) and the raw data
|
|
334
|
+
* (`data/verification.json`, `data/session.json`,
|
|
335
|
+
* `data/provider-session.json`). Requires `report:read`.
|
|
336
|
+
*/
|
|
337
|
+
evidenceBundle(customerId: string, sessionId: string): Promise<Uint8Array>;
|
|
338
|
+
/**
|
|
339
|
+
* `DELETE /v1/customers/{customerId}/kyc/sessions/{sessionId}` — cancel a
|
|
340
|
+
* session that never finished and remove the local record. Finished
|
|
341
|
+
* sessions are kept as compliance records (the API answers 400).
|
|
312
342
|
*/
|
|
313
343
|
delete(customerId: string, sessionId: string): Promise<{
|
|
314
344
|
deletedId: string;
|
|
@@ -317,7 +347,21 @@ export declare class CustomerKycResource {
|
|
|
317
347
|
export declare class CustomerRiskRatingResource {
|
|
318
348
|
private readonly req;
|
|
319
349
|
constructor(req: RequestFn);
|
|
320
|
-
|
|
350
|
+
/**
|
|
351
|
+
* `PUT /v1/customers/{customerId}/risk-rating` — set the rating by hand.
|
|
352
|
+
* It becomes a sticky officer override (`riskRatingSource: 'MANUAL'`): a
|
|
353
|
+
* Profile Template's risk matrix keeps recording its computed rating but
|
|
354
|
+
* never overwrites this one until `clearOverride` is called.
|
|
355
|
+
*/
|
|
356
|
+
update(customerId: string, input: UpdateRiskRatingDto): Promise<UpdateRiskRatingResponseDto>;
|
|
357
|
+
/**
|
|
358
|
+
* `DELETE /v1/customers/{customerId}/risk-rating/override` — clear an
|
|
359
|
+
* officer override and hand the rating back to the risk matrix: the matrix
|
|
360
|
+
* runs now and its computed rating applies (`riskRatingSource: 'MATRIX'`).
|
|
361
|
+
* Resolves to the latest matrix assessment. 400 when the customer has no
|
|
362
|
+
* Profile Template with a risk matrix.
|
|
363
|
+
*/
|
|
364
|
+
clearOverride(customerId: string): Promise<CustomerRiskAssessmentResponseDto>;
|
|
321
365
|
}
|
|
322
366
|
export declare class CustomerStatusResource {
|
|
323
367
|
private readonly req;
|
|
@@ -333,6 +377,14 @@ export declare class CustomerRiskAssessmentsResource {
|
|
|
333
377
|
constructor(req: RequestFn);
|
|
334
378
|
list(customerId: string): Promise<CustomerRiskAssessmentResponseDto[]>;
|
|
335
379
|
create(customerId: string, input: CreateCustomerRiskAssessmentDto): Promise<CustomerRiskAssessmentResponseDto>;
|
|
380
|
+
/**
|
|
381
|
+
* `POST /v1/customers/{customerId}/risk-assessments/evaluate` — run the
|
|
382
|
+
* customer's Profile Template risk matrix now (trigger `MANUAL`). Resolves
|
|
383
|
+
* to the latest matrix assessment (`method: 'MATRIX'`). The customer's
|
|
384
|
+
* rating changes unless an officer override is in force. 400 when the
|
|
385
|
+
* customer has no Profile Template with a risk matrix.
|
|
386
|
+
*/
|
|
387
|
+
evaluate(customerId: string): Promise<CustomerRiskAssessmentResponseDto>;
|
|
336
388
|
}
|
|
337
389
|
export declare class CustomerExpectedActivityResource {
|
|
338
390
|
private readonly req;
|
|
@@ -689,6 +741,7 @@ export declare class ConfigResource {
|
|
|
689
741
|
readonly states: ConfigStatesResource;
|
|
690
742
|
readonly assignmentPolicies: ConfigAssignmentPoliciesResource;
|
|
691
743
|
readonly products: ConfigProductsResource;
|
|
744
|
+
readonly profileTemplates: ConfigProfileTemplatesResource;
|
|
692
745
|
readonly currencies: ConfigCurrenciesResource;
|
|
693
746
|
readonly eventDefinitions: ConfigEventDefinitionsResource;
|
|
694
747
|
readonly customAlertTypes: ConfigCustomAlertTypesResource;
|
|
@@ -923,6 +976,55 @@ export declare class ConfigProductsResource {
|
|
|
923
976
|
/** Unarchive (ARCHIVED → LIVE). */
|
|
924
977
|
unarchive(id: string): Promise<LifecycleResult>;
|
|
925
978
|
}
|
|
979
|
+
/**
|
|
980
|
+
* Profile Templates — `/v1/config/profile-templates`. The template a customer
|
|
981
|
+
* is created against: typed profile fields, a risk matrix that computes the
|
|
982
|
+
* customer's risk rating, KYC workflow bindings, and the creation setup of
|
|
983
|
+
* the Add Individual / Add Entity forms (Customer → Profile Template
|
|
984
|
+
* parallels Account → Product). Requires `config:read` / `config:write`.
|
|
985
|
+
*/
|
|
986
|
+
export declare class ConfigProfileTemplatesResource {
|
|
987
|
+
private readonly req;
|
|
988
|
+
constructor(req: RequestFn);
|
|
989
|
+
/** Live templates (pass `includeArchived: true` for all), grouped by party type, default first. */
|
|
990
|
+
list(query?: ListProfileTemplatesQuery): Promise<ProfileTemplate[]>;
|
|
991
|
+
get(id: string): Promise<ProfileTemplate>;
|
|
992
|
+
/** Look a template up by its immutable `key`. 404 when no template has that key. */
|
|
993
|
+
getByKey(key: string): Promise<ProfileTemplate>;
|
|
994
|
+
/** Published versions, newest first. Every version is an immutable snapshot. */
|
|
995
|
+
versions(id: string): Promise<ProfileTemplateVersion[]>;
|
|
996
|
+
/**
|
|
997
|
+
* Create a template (version 1). 400 lists every validation problem at
|
|
998
|
+
* once (weights, unlevelled options, unknown fields or factors, duplicate
|
|
999
|
+
* workflow purposes); 409 when the `key` is taken.
|
|
1000
|
+
*/
|
|
1001
|
+
create(input: CreateProfileTemplateInput): Promise<ProfileTemplate>;
|
|
1002
|
+
/**
|
|
1003
|
+
* Partial update. Changing `fieldConfig`, `riskMatrix`, `kycWorkflows` or
|
|
1004
|
+
* the creation setup (`individualCreation` / `entityCreation`) publishes a
|
|
1005
|
+
* new version; only `fieldConfig` / `riskMatrix` changes re-assess the
|
|
1006
|
+
* template's customers.
|
|
1007
|
+
*/
|
|
1008
|
+
update(id: string, input: UpdateProfileTemplateInput): Promise<ProfileTemplate>;
|
|
1009
|
+
/**
|
|
1010
|
+
* `DELETE /v1/config/profile-templates/{id}` — archive (there is no hard
|
|
1011
|
+
* delete). Existing customers keep the template and keep being rated by
|
|
1012
|
+
* its matrix; new customers cannot use it. Clears `isDefault`. Idempotent.
|
|
1013
|
+
*/
|
|
1014
|
+
archive(id: string): Promise<ProfileTemplate>;
|
|
1015
|
+
/**
|
|
1016
|
+
* Score one customer under an unsaved risk matrix, next to its template's
|
|
1017
|
+
* saved matrix on the same inputs. Nothing is saved. 400 lists every
|
|
1018
|
+
* problem with the draft, as a save would.
|
|
1019
|
+
*/
|
|
1020
|
+
previewRiskMatrix(input: PreviewRiskMatrixInput): Promise<RiskMatrixPreview>;
|
|
1021
|
+
/**
|
|
1022
|
+
* What saving an unsaved risk matrix would do to every live customer on
|
|
1023
|
+
* the template: rating distribution before and after, movements, and the
|
|
1024
|
+
* customers who move. Nothing is saved.
|
|
1025
|
+
*/
|
|
1026
|
+
riskMatrixImpact(id: string, input: RiskMatrixImpactInput): Promise<RiskMatrixImpact>;
|
|
1027
|
+
}
|
|
926
1028
|
export declare class ConfigCurrenciesResource {
|
|
927
1029
|
private readonly req;
|
|
928
1030
|
constructor(req: RequestFn);
|