@dossier-wiki/os-sdk 0.1.1 → 1.3.0
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 +488 -7
- package/dist/alert-workflow-types.d.ts +113 -0
- package/dist/alert-workflow-types.d.ts.map +1 -0
- package/dist/alert-workflow-types.js +2 -0
- package/dist/alert-workflow-types.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/service.d.ts +660 -10
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +962 -79
- package/dist/service.js.map +1 -1
- package/dist/types.d.ts +2760 -132
- package/dist/types.d.ts.map +1 -1
- package/docs/REFERENCE.md +488 -3
- package/package.json +1 -1
package/dist/service.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
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, 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
3
|
export interface DossiersOSAPIServiceOptions {
|
|
3
4
|
/** Base URL of the OS API host, e.g. `https://sandbox-os.dossiers.wiki`. The `/v1` prefix is added by the SDK. */
|
|
4
5
|
baseUrl: string;
|
|
@@ -17,6 +18,7 @@ type RequestOptions = {
|
|
|
17
18
|
query?: Record<string, unknown> | object;
|
|
18
19
|
};
|
|
19
20
|
type RequestFn = <T>(method: HttpMethod, path: string, opts?: RequestOptions) => Promise<T>;
|
|
21
|
+
type BinaryRequestFn = (path: string) => Promise<Uint8Array>;
|
|
20
22
|
export declare class DossiersOSAPIService {
|
|
21
23
|
private readonly apiKey;
|
|
22
24
|
private readonly baseUrl;
|
|
@@ -28,17 +30,41 @@ export declare class DossiersOSAPIService {
|
|
|
28
30
|
readonly accounts: AccountsResource;
|
|
29
31
|
readonly counterparties: CounterpartiesResource;
|
|
30
32
|
readonly devices: DevicesResource;
|
|
33
|
+
readonly paymentInstruments: PaymentInstrumentsResource;
|
|
34
|
+
readonly sessions: SessionsResource;
|
|
35
|
+
readonly channelEndpoints: ChannelEndpointsResource;
|
|
31
36
|
readonly transactions: TransactionsResource;
|
|
37
|
+
readonly transactionAttempts: TransactionAttemptsResource;
|
|
38
|
+
readonly behaviorSettings: BehaviorSettingsResource;
|
|
32
39
|
readonly events: EventsResource;
|
|
40
|
+
readonly riskSignals: RiskSignalsResource;
|
|
41
|
+
readonly employees: EmployeesResource;
|
|
42
|
+
readonly branches: BranchesResource;
|
|
33
43
|
readonly exchangeRates: ExchangeRatesResource;
|
|
44
|
+
readonly states: StatesResource;
|
|
34
45
|
readonly identificationDocuments: IdentificationDocumentsResource;
|
|
35
46
|
readonly alerts: AlertsResource;
|
|
36
47
|
readonly platform: PlatformResource;
|
|
37
48
|
readonly config: ConfigResource;
|
|
38
49
|
readonly setup: SetupResource;
|
|
39
50
|
readonly settings: SettingsResource;
|
|
51
|
+
readonly customLists: CustomListsResource;
|
|
52
|
+
readonly teams: TeamsResource;
|
|
53
|
+
readonly reports: ReportsResource;
|
|
54
|
+
readonly partyRelationships: PartyRelationshipsResource;
|
|
40
55
|
constructor(options: DossiersOSAPIServiceOptions);
|
|
41
56
|
private request;
|
|
57
|
+
/** GET a binary body (PDF reports). Errors are parsed the same way as JSON requests. */
|
|
58
|
+
private requestBinary;
|
|
59
|
+
}
|
|
60
|
+
export declare class PartyRelationshipsResource {
|
|
61
|
+
private readonly req;
|
|
62
|
+
constructor(req: RequestFn);
|
|
63
|
+
listTypes(): Promise<PartyRelationshipType[]>;
|
|
64
|
+
createType(input: CreatePartyRelationshipTypeInput): Promise<PartyRelationshipType>;
|
|
65
|
+
list(partyType: PartyRelationshipPartyType, partyId: string): Promise<PartyRelationship[]>;
|
|
66
|
+
create(input: CreatePartyRelationshipInput): Promise<PartyRelationship>;
|
|
67
|
+
end(id: string): Promise<PartyRelationship>;
|
|
42
68
|
}
|
|
43
69
|
/**
|
|
44
70
|
* Scoped view of `/v1/platform/v1/comments` for a single resourceType.
|
|
@@ -89,7 +115,12 @@ export declare class IndividualsResource {
|
|
|
89
115
|
readonly otherInformation: CustomerOtherInformationResource;
|
|
90
116
|
constructor(req: RequestFn);
|
|
91
117
|
list(query?: CursorPaginationQuery): Promise<ListIndividualsResponse>;
|
|
92
|
-
|
|
118
|
+
/**
|
|
119
|
+
* `POST /v1/customers/individuals` — create an individual. Pass
|
|
120
|
+
* `{ screening: 'sync' }` to run the INITIAL screening before the call
|
|
121
|
+
* returns; the result and its matches then arrive under `screening`.
|
|
122
|
+
*/
|
|
123
|
+
create(input: CreateIndividualInput, options?: CreateCustomerOptions): Promise<IndividualCreatedResponseDto>;
|
|
93
124
|
get(customerId: string, query?: GetCustomerQuery): Promise<IndividualResponseDto>;
|
|
94
125
|
update(customerId: string, input: UpdateIndividualDto): Promise<IndividualResponseDto>;
|
|
95
126
|
}
|
|
@@ -118,7 +149,12 @@ export declare class EntitiesResource {
|
|
|
118
149
|
readonly otherInformation: CustomerOtherInformationResource;
|
|
119
150
|
constructor(req: RequestFn);
|
|
120
151
|
list(query?: CursorPaginationQuery): Promise<ListEntitiesResponse>;
|
|
121
|
-
|
|
152
|
+
/**
|
|
153
|
+
* `POST /v1/customers/entities` — create an entity. Pass
|
|
154
|
+
* `{ screening: 'sync' }` to run the INITIAL screening before the call
|
|
155
|
+
* returns; the result and its matches then arrive under `screening`.
|
|
156
|
+
*/
|
|
157
|
+
create(input: CreateEntityInput, options?: CreateCustomerOptions): Promise<EntityCreatedResponseDto>;
|
|
122
158
|
get(customerId: string, query?: GetCustomerQuery): Promise<EntityResponseDto>;
|
|
123
159
|
update(customerId: string, input: UpdateEntityDto): Promise<EntityResponseDto>;
|
|
124
160
|
}
|
|
@@ -137,14 +173,62 @@ export declare class EntityIdentificationDocumentsResource {
|
|
|
137
173
|
create(customerId: string, input: CreateIdentificationDocumentInput): Promise<IdentificationDocument>;
|
|
138
174
|
}
|
|
139
175
|
export declare class CustomersResource {
|
|
176
|
+
private readonly req;
|
|
140
177
|
readonly notes: CustomerNotesResource;
|
|
141
178
|
readonly files: CustomerFilesResource;
|
|
142
179
|
readonly screening: CustomerScreeningResource;
|
|
180
|
+
readonly kyc: CustomerKycResource;
|
|
143
181
|
readonly riskRating: CustomerRiskRatingResource;
|
|
144
|
-
readonly
|
|
182
|
+
readonly status: CustomerStatusResource;
|
|
183
|
+
readonly riskAssessments: CustomerRiskAssessmentsResource;
|
|
145
184
|
readonly expectedActivity: CustomerExpectedActivityResource;
|
|
146
185
|
readonly devices: CustomerDevicesResource;
|
|
186
|
+
readonly assignment: CustomerAssignmentResource;
|
|
147
187
|
constructor(req: RequestFn);
|
|
188
|
+
/**
|
|
189
|
+
* `POST /v1/customers/{customerId}/archive` — archive a customer
|
|
190
|
+
* (organization owner/admin only, irreversible). Frees the customer's
|
|
191
|
+
* external ID for reuse and makes the record read-only.
|
|
192
|
+
*/
|
|
193
|
+
archive(customerId: string, input?: ArchiveCustomerDto): Promise<ArchiveCustomerResponse>;
|
|
194
|
+
}
|
|
195
|
+
export declare class CustomerAssignmentResource {
|
|
196
|
+
private readonly req;
|
|
197
|
+
constructor(req: RequestFn);
|
|
198
|
+
/**
|
|
199
|
+
* `POST /v1/customers/{customerId}/assignment` — add users/teams to a
|
|
200
|
+
* customer's standing assignment (additive; never silently removes).
|
|
201
|
+
*/
|
|
202
|
+
assign(customerId: string, input: CustomerAssignmentInput): Promise<CustomerAssignmentResponse>;
|
|
203
|
+
/**
|
|
204
|
+
* `DELETE /v1/customers/{customerId}/assignment` — remove users/teams from
|
|
205
|
+
* a customer's standing assignment.
|
|
206
|
+
*/
|
|
207
|
+
unassign(customerId: string, input: CustomerAssignmentInput): Promise<CustomerAssignmentResponse>;
|
|
208
|
+
/**
|
|
209
|
+
* `POST /v1/customers/assignment` — assign many customers to the same
|
|
210
|
+
* users/teams. Customers that already carry the target are skipped.
|
|
211
|
+
*/
|
|
212
|
+
assignMany(input: BulkCustomerAssignmentInput): Promise<BulkCustomerAssignmentResult>;
|
|
213
|
+
}
|
|
214
|
+
export declare class TeamsResource {
|
|
215
|
+
private readonly req;
|
|
216
|
+
constructor(req: RequestFn);
|
|
217
|
+
/**
|
|
218
|
+
* Active teams. `tags` is an any-of filter over the team's `team.tags`
|
|
219
|
+
* catalogue values (repeated as `?tags=a&tags=b`).
|
|
220
|
+
*/
|
|
221
|
+
list(query?: {
|
|
222
|
+
search?: string;
|
|
223
|
+
tags?: string[];
|
|
224
|
+
}): Promise<TeamRefDto[]>;
|
|
225
|
+
get(id: string): Promise<TeamDto>;
|
|
226
|
+
create(input: CreateTeamDto): Promise<TeamDto>;
|
|
227
|
+
update(id: string, input: UpdateTeamDto): Promise<TeamDto>;
|
|
228
|
+
archive(id: string): Promise<TeamDto>;
|
|
229
|
+
delete(id: string): Promise<boolean>;
|
|
230
|
+
addMembers(id: string, input: TeamMemberIdsDto): Promise<TeamDto>;
|
|
231
|
+
removeMembers(id: string, input: TeamMemberIdsDto): Promise<TeamDto>;
|
|
148
232
|
}
|
|
149
233
|
export declare class CustomerNotesResource {
|
|
150
234
|
private readonly req;
|
|
@@ -167,18 +251,88 @@ export declare class CustomerScreeningResource {
|
|
|
167
251
|
private readonly req;
|
|
168
252
|
constructor(req: RequestFn);
|
|
169
253
|
trigger(customerId: string): Promise<ScreeningResultDto>;
|
|
254
|
+
/**
|
|
255
|
+
* `GET /v1/customers/{customerId}/screening-history` — every screening run
|
|
256
|
+
* for the customer, most recent first. `limit` caps the number of entries
|
|
257
|
+
* returned (default 50 server-side).
|
|
258
|
+
*/
|
|
259
|
+
listHistory(customerId: string, params?: {
|
|
260
|
+
limit?: number;
|
|
261
|
+
}): Promise<ScreeningHistoryEntryDto[]>;
|
|
262
|
+
/**
|
|
263
|
+
* `GET /v1/customers/{customerId}/screening-history/latest` — the most
|
|
264
|
+
* recent screening run, or `null` if the customer has never been screened.
|
|
265
|
+
*/
|
|
266
|
+
getLast(customerId: string): Promise<ScreeningHistoryEntryDto | null>;
|
|
267
|
+
/**
|
|
268
|
+
* `GET /v1/customers/{customerId}/screening-results` — every match for the
|
|
269
|
+
* customer with its current disposition (true positives = `CONFIRMED`,
|
|
270
|
+
* false positives = `FALSE_POSITIVE`, plus undecided `PENDING`, which
|
|
271
|
+
* also covers matches a workflow reviewer marked inconclusive). Pass
|
|
272
|
+
* `disposition` to filter (e.g. `['CONFIRMED', 'FALSE_POSITIVE']`).
|
|
273
|
+
*/
|
|
274
|
+
listResults(customerId: string, params?: {
|
|
275
|
+
disposition?: Array<'PENDING' | 'CONFIRMED' | 'FALSE_POSITIVE'>;
|
|
276
|
+
}): Promise<ScreeningMatchResultDto[]>;
|
|
277
|
+
/**
|
|
278
|
+
* `GET /v1/customers/{customerId}/confirmed-matches` — confirmed
|
|
279
|
+
* (true-positive) matches only. Alias for `listResults` filtered to
|
|
280
|
+
* `CONFIRMED`, kept for backwards compatibility.
|
|
281
|
+
*/
|
|
170
282
|
listConfirmedMatches(customerId: string): Promise<ConfirmedMatchDto[]>;
|
|
171
283
|
}
|
|
284
|
+
/**
|
|
285
|
+
* KYC verification sessions for a customer. A session is an asynchronous,
|
|
286
|
+
* customer-driven flow: `start()` returns a hosted `sessionUrl` the customer
|
|
287
|
+
* visits; completion arrives out-of-band (provider webhook) or can be pulled
|
|
288
|
+
* with `refresh()`.
|
|
289
|
+
*/
|
|
290
|
+
export declare class CustomerKycResource {
|
|
291
|
+
private readonly req;
|
|
292
|
+
constructor(req: RequestFn);
|
|
293
|
+
/**
|
|
294
|
+
* `POST /v1/customers/{customerId}/kyc/sessions` — start a KYC session with
|
|
295
|
+
* the organization's active provider. Hand the returned `sessionUrl` to the
|
|
296
|
+
* customer.
|
|
297
|
+
*/
|
|
298
|
+
start(customerId: string): Promise<StartKycSessionResponseDto>;
|
|
299
|
+
/**
|
|
300
|
+
* `GET /v1/customers/{customerId}/kyc/sessions` — list a customer's KYC
|
|
301
|
+
* sessions, newest first.
|
|
302
|
+
*/
|
|
303
|
+
list(customerId: string): Promise<KycSessionDto[]>;
|
|
304
|
+
/**
|
|
305
|
+
* `POST /v1/customers/{customerId}/kyc/sessions/{sessionId}/refresh` — pull
|
|
306
|
+
* the latest provider state for a session and persist it.
|
|
307
|
+
*/
|
|
308
|
+
refresh(customerId: string, sessionId: string): Promise<KycSessionDto>;
|
|
309
|
+
/**
|
|
310
|
+
* `DELETE /v1/customers/{customerId}/kyc/sessions/{sessionId}` — cancel the
|
|
311
|
+
* session at the provider and remove the local record.
|
|
312
|
+
*/
|
|
313
|
+
delete(customerId: string, sessionId: string): Promise<{
|
|
314
|
+
deletedId: string;
|
|
315
|
+
}>;
|
|
316
|
+
}
|
|
172
317
|
export declare class CustomerRiskRatingResource {
|
|
173
318
|
private readonly req;
|
|
174
319
|
constructor(req: RequestFn);
|
|
175
320
|
update(customerId: string, input: UpdateRiskRatingDto): Promise<IndividualResponseDto | EntityResponseDto>;
|
|
176
321
|
}
|
|
177
|
-
export declare class
|
|
322
|
+
export declare class CustomerStatusResource {
|
|
178
323
|
private readonly req;
|
|
179
324
|
constructor(req: RequestFn);
|
|
180
|
-
|
|
181
|
-
|
|
325
|
+
/**
|
|
326
|
+
* `PUT /v1/customers/{customerId}/status` — transition a customer's lifecycle
|
|
327
|
+
* status. Emits a `customer.status_changed` webhook.
|
|
328
|
+
*/
|
|
329
|
+
update(customerId: string, input: UpdateCustomerStatusDto): Promise<UpdateCustomerStatusResponse>;
|
|
330
|
+
}
|
|
331
|
+
export declare class CustomerRiskAssessmentsResource {
|
|
332
|
+
private readonly req;
|
|
333
|
+
constructor(req: RequestFn);
|
|
334
|
+
list(customerId: string): Promise<CustomerRiskAssessmentResponseDto[]>;
|
|
335
|
+
create(customerId: string, input: CreateCustomerRiskAssessmentDto): Promise<CustomerRiskAssessmentResponseDto>;
|
|
182
336
|
}
|
|
183
337
|
export declare class CustomerExpectedActivityResource {
|
|
184
338
|
private readonly req;
|
|
@@ -233,6 +387,34 @@ export declare class DevicesResource {
|
|
|
233
387
|
readonly comments: ResourceCommentsProxy;
|
|
234
388
|
constructor(req: RequestFn);
|
|
235
389
|
get(deviceId: string): Promise<DeviceResponseDto>;
|
|
390
|
+
/** Canonicalize the source device into the target without deleting history. */
|
|
391
|
+
merge(targetDeviceId: string, input: MergeDeviceDto): Promise<DeviceMergeResponseDto>;
|
|
392
|
+
}
|
|
393
|
+
export declare class PaymentInstrumentsResource {
|
|
394
|
+
private readonly req;
|
|
395
|
+
constructor(req: RequestFn);
|
|
396
|
+
list(): Promise<PaymentInstrumentDto[]>;
|
|
397
|
+
get(id: string): Promise<PaymentInstrumentDto>;
|
|
398
|
+
create(input: CreatePaymentInstrumentDto): Promise<PaymentInstrumentDto>;
|
|
399
|
+
update(id: string, input: UpdatePaymentInstrumentDto): Promise<PaymentInstrumentDto>;
|
|
400
|
+
linkAccount(id: string, input: LinkPaymentInstrumentAccountDto): Promise<PaymentInstrumentAccountRelationshipDto>;
|
|
401
|
+
unlinkAccount(id: string, relationshipId: string, validTo?: string): Promise<PaymentInstrumentAccountRelationshipDto>;
|
|
402
|
+
linkCustomer(id: string, input: LinkPaymentInstrumentCustomerDto): Promise<PaymentInstrumentCustomerRelationshipDto>;
|
|
403
|
+
unlinkCustomer(id: string, relationshipId: string, validTo?: string): Promise<PaymentInstrumentCustomerRelationshipDto>;
|
|
404
|
+
}
|
|
405
|
+
export declare class SessionsResource {
|
|
406
|
+
private readonly req;
|
|
407
|
+
constructor(req: RequestFn);
|
|
408
|
+
list(): Promise<SessionDto[]>;
|
|
409
|
+
get(id: string): Promise<SessionDto>;
|
|
410
|
+
update(id: string, input: UpdateSessionDto): Promise<SessionDto>;
|
|
411
|
+
}
|
|
412
|
+
export declare class ChannelEndpointsResource {
|
|
413
|
+
private readonly req;
|
|
414
|
+
constructor(req: RequestFn);
|
|
415
|
+
list(): Promise<ChannelEndpointDto[]>;
|
|
416
|
+
get(id: string): Promise<ChannelEndpointDto>;
|
|
417
|
+
update(id: string, input: UpdateChannelEndpointDto): Promise<ChannelEndpointDto>;
|
|
236
418
|
}
|
|
237
419
|
export declare class TransactionsResource {
|
|
238
420
|
private readonly req;
|
|
@@ -242,22 +424,174 @@ export declare class TransactionsResource {
|
|
|
242
424
|
ingest(input: IngestTransactionDto): Promise<IngestTransactionResponse | IngestTransactionAsyncResponse>;
|
|
243
425
|
/** `PATCH /v1/transactions` — patch a transaction's terminal status. */
|
|
244
426
|
patchStatus(input: PatchTransactionStatusDto): Promise<unknown>;
|
|
427
|
+
/**
|
|
428
|
+
* Read back a stored transaction. By default `reference` is your own
|
|
429
|
+
* `transactionId`; pass `{ by: 'id' }` to look up the internal UUID
|
|
430
|
+
* returned by `ingest()`.
|
|
431
|
+
*/
|
|
432
|
+
get(reference: string, opts?: {
|
|
433
|
+
by?: 'transactionId' | 'id';
|
|
434
|
+
}): Promise<TransactionResponseDto>;
|
|
435
|
+
}
|
|
436
|
+
export declare class TransactionAttemptsResource {
|
|
437
|
+
private readonly req;
|
|
438
|
+
constructor(req: RequestFn);
|
|
439
|
+
/**
|
|
440
|
+
* `POST /v1/transaction-attempts` — retain a failed, blocked, or unknown
|
|
441
|
+
* operation as behavioural history. This does not trigger rule evaluation.
|
|
442
|
+
*/
|
|
443
|
+
ingest(input: IngestTransactionAttemptDto): Promise<IngestTransactionAttemptResponse>;
|
|
444
|
+
/** List retained attempts using an opaque, stable cursor. Requires `config:read`. */
|
|
445
|
+
list(input?: ListTransactionAttemptsInput): Promise<TransactionAttemptPage>;
|
|
446
|
+
/** Read one retained attempt by its database id. Requires `config:read`. */
|
|
447
|
+
get(id: string): Promise<TransactionAttemptDto>;
|
|
448
|
+
}
|
|
449
|
+
export declare class BehaviorSettingsResource {
|
|
450
|
+
private readonly req;
|
|
451
|
+
constructor(req: RequestFn);
|
|
452
|
+
get(): Promise<TenantBehaviorSettings>;
|
|
453
|
+
update(input: UpdateTenantBehaviorSettingsInput): Promise<TenantBehaviorSettings>;
|
|
245
454
|
}
|
|
246
455
|
export declare class EventsResource {
|
|
247
456
|
private readonly req;
|
|
248
457
|
constructor(req: RequestFn);
|
|
458
|
+
/**
|
|
459
|
+
* `POST /v1/events` — store a behavioral event.
|
|
460
|
+
*
|
|
461
|
+
* Every event is about exactly one resource: pass
|
|
462
|
+
* `resource: { type, id }`. A bare top-level `customerId` is still
|
|
463
|
+
* accepted as the legacy spelling of `resource: { type: 'CUSTOMER', id }`,
|
|
464
|
+
* and `resource` wins when both are present; an event naming neither is
|
|
465
|
+
* rejected with 400.
|
|
466
|
+
*
|
|
467
|
+
* Supply `input.eventId` (your unique identifier) to make retries safe:
|
|
468
|
+
* resubmitting the same `eventId` returns the original stored event with
|
|
469
|
+
* `cached: true` instead of creating a duplicate. Idempotency covers the
|
|
470
|
+
* event's Risk Signals too — a replay echoes the same `riskSignalIds`
|
|
471
|
+
* rather than emitting a second set.
|
|
472
|
+
*
|
|
473
|
+
* The response carries the resolved `resource` and the `riskSignalIds`
|
|
474
|
+
* emitted by the event definition's `riskSignalEffects`.
|
|
475
|
+
*/
|
|
249
476
|
ingest(input: IngestEventDto): Promise<IngestEventResponse>;
|
|
250
477
|
}
|
|
478
|
+
/**
|
|
479
|
+
* Risk Signals — time-decaying evidence attached to one resource.
|
|
480
|
+
*
|
|
481
|
+
* A Risk Signal is evidence, **not** an Alert: adding one creates no alert, no
|
|
482
|
+
* notification, no assignment and no task, and does not change the resource's
|
|
483
|
+
* Risk Rating. Rules read the aggregate effective weight and decide for
|
|
484
|
+
* themselves.
|
|
485
|
+
*/
|
|
486
|
+
export declare class RiskSignalsResource {
|
|
487
|
+
private readonly req;
|
|
488
|
+
constructor(req: RequestFn);
|
|
489
|
+
/**
|
|
490
|
+
* `POST /v1/risk-signals` — attach a piece of evidence to one resource.
|
|
491
|
+
*
|
|
492
|
+
* The signal records the strength it had at `occurredAt` and how fast that
|
|
493
|
+
* strength halves, so weight 40 with half-life `P7D` reads 20 after seven
|
|
494
|
+
* days and 10 after fourteen.
|
|
495
|
+
*
|
|
496
|
+
* Supply `externalId` to make retries safe — resubmitting the same
|
|
497
|
+
* `externalId` returns the original signal instead of adding a second one.
|
|
498
|
+
*
|
|
499
|
+
* The server sets the source to `MANUAL` and captures the authenticated
|
|
500
|
+
* actor; a caller cannot claim a signal came from an Event or a Rule.
|
|
501
|
+
*/
|
|
502
|
+
create(input: CreateRiskSignalInput): Promise<RiskSignal>;
|
|
503
|
+
/**
|
|
504
|
+
* `GET /v1/risk-signals` — read a resource's Risk Signals with their
|
|
505
|
+
* decayed weights, plus the aggregate effective weight.
|
|
506
|
+
*
|
|
507
|
+
* The aggregate is computed as of `asOf` (defaulting to server time) — it
|
|
508
|
+
* is not a cached score column on the resource, so a historical `asOf`
|
|
509
|
+
* returns what the resource looked like at that moment.
|
|
510
|
+
*
|
|
511
|
+
* `type` and `sourceType` filter which records contribute. They never
|
|
512
|
+
* change how far a contributing signal has decayed: age is always measured
|
|
513
|
+
* to `asOf`.
|
|
514
|
+
*/
|
|
515
|
+
list(query: ListRiskSignalsQuery): Promise<RiskSignalListResponse>;
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Employees — people acting inside the financial institution's ecosystem.
|
|
519
|
+
*
|
|
520
|
+
* Monitored domain data, distinct from Dossiers organization members: an
|
|
521
|
+
* Employee need not have a Dossiers login, and an Employee id is never an
|
|
522
|
+
* org-member id. Employees are an attachable resource for Events and Risk
|
|
523
|
+
* Signals.
|
|
524
|
+
*/
|
|
525
|
+
export declare class EmployeesResource {
|
|
526
|
+
private readonly req;
|
|
527
|
+
constructor(req: RequestFn);
|
|
528
|
+
/**
|
|
529
|
+
* `GET /v1/employees`.
|
|
530
|
+
*
|
|
531
|
+
* The endpoint declares `cursor` / `limit`, but the server currently
|
|
532
|
+
* resolves its own paging defaults (first page, 50 records) — treat paging
|
|
533
|
+
* as server-defaulted rather than caller-controlled.
|
|
534
|
+
*/
|
|
535
|
+
list(query?: {
|
|
536
|
+
cursor?: string;
|
|
537
|
+
limit?: number;
|
|
538
|
+
}): Promise<EmployeeListResponse>;
|
|
539
|
+
get(id: string): Promise<Employee>;
|
|
540
|
+
/**
|
|
541
|
+
* `POST /v1/employees`. `externalEmployeeId` must be unique within the
|
|
542
|
+
* organization; a duplicate is rejected with 400.
|
|
543
|
+
*/
|
|
544
|
+
create(input: CreateEmployeeInput): Promise<Employee>;
|
|
545
|
+
update(id: string, input: UpdateEmployeeInput): Promise<Employee>;
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Branches — the institution's own physical or organizational units, through
|
|
549
|
+
* which Employees act. Like Employee, an attachable resource for Events and
|
|
550
|
+
* Risk Signals.
|
|
551
|
+
*/
|
|
552
|
+
export declare class BranchesResource {
|
|
553
|
+
private readonly req;
|
|
554
|
+
constructor(req: RequestFn);
|
|
555
|
+
/**
|
|
556
|
+
* `GET /v1/branches`.
|
|
557
|
+
*
|
|
558
|
+
* The endpoint declares `cursor` / `limit`, but the server currently
|
|
559
|
+
* resolves its own paging defaults (first page, 50 records) — treat paging
|
|
560
|
+
* as server-defaulted rather than caller-controlled.
|
|
561
|
+
*/
|
|
562
|
+
list(query?: {
|
|
563
|
+
cursor?: string;
|
|
564
|
+
limit?: number;
|
|
565
|
+
}): Promise<BranchListResponse>;
|
|
566
|
+
get(id: string): Promise<Branch>;
|
|
567
|
+
/**
|
|
568
|
+
* `POST /v1/branches`. `externalBranchId` must be unique within the
|
|
569
|
+
* organization.
|
|
570
|
+
*/
|
|
571
|
+
create(input: CreateBranchInput): Promise<Branch>;
|
|
572
|
+
update(id: string, input: UpdateBranchInput): Promise<Branch>;
|
|
573
|
+
}
|
|
251
574
|
export declare class ExchangeRatesResource {
|
|
252
575
|
private readonly req;
|
|
253
576
|
constructor(req: RequestFn);
|
|
254
577
|
push(input: PushExchangeRatesDto): Promise<PushExchangeRatesResponseDto>;
|
|
255
578
|
}
|
|
579
|
+
/**
|
|
580
|
+
* First-class identification-documents resource — independent of the customer
|
|
581
|
+
* collection a document belongs to. For customer-scoped list/create, see
|
|
582
|
+
* `customers.identificationDocuments` or the proxies on `individuals` / `entities`.
|
|
583
|
+
*/
|
|
256
584
|
export declare class IdentificationDocumentsResource {
|
|
257
585
|
private readonly req;
|
|
258
586
|
readonly comments: ResourceCommentsProxy;
|
|
259
587
|
constructor(req: RequestFn);
|
|
260
588
|
get(id: string): Promise<IdentificationDocument>;
|
|
589
|
+
/**
|
|
590
|
+
* Correct captured document fields (name, number, DOB, addresses, …).
|
|
591
|
+
* Captured fields are frozen while the document is `APPROVED` (400) —
|
|
592
|
+
* `transition` it back to `PENDING` first. `notes`/`tags`/`attachments`
|
|
593
|
+
* stay editable in any status.
|
|
594
|
+
*/
|
|
261
595
|
update(id: string, input: UpdateIdentificationDocumentInput): Promise<IdentificationDocument>;
|
|
262
596
|
/** Hard-delete an identification document. Returns `{ deletedId }`. */
|
|
263
597
|
delete(id: string): Promise<DeleteIdentificationDocumentResponse>;
|
|
@@ -268,10 +602,49 @@ export declare class IdentificationDocumentsResource {
|
|
|
268
602
|
/** Transition status — `rejectionNarrative` is required when `status=REJECTED`. */
|
|
269
603
|
transition(id: string, input: TransitionIdentificationDocumentStatusInput): Promise<IdentificationDocument>;
|
|
270
604
|
}
|
|
605
|
+
/**
|
|
606
|
+
* Alerts. Screening and rule-trigger alerts are produced by the platform and
|
|
607
|
+
* delivered via webhooks; **custom alerts** are raised here against an
|
|
608
|
+
* org-defined Custom Alert Type (`config.customAlertTypes`). Every alert type
|
|
609
|
+
* supports markdown notes, linked resources and comments.
|
|
610
|
+
*
|
|
611
|
+
* Requires the `alerts:read` / `alerts:write` API-key permissions.
|
|
612
|
+
*/
|
|
271
613
|
export declare class AlertsResource {
|
|
614
|
+
private readonly req;
|
|
272
615
|
readonly comments: ResourceCommentsProxy;
|
|
616
|
+
readonly resources: AlertResourcesProxy;
|
|
617
|
+
constructor(req: RequestFn);
|
|
618
|
+
/**
|
|
619
|
+
* Raise an alert by hand. `alertType` is optional: with one, `fields` are
|
|
620
|
+
* validated against the type's schema; without one the alert is free-form
|
|
621
|
+
* and `fields` are self-declaring. Re-sending the same `externalRequestId`
|
|
622
|
+
* returns the existing alert (201 either way) — the key is scoped per
|
|
623
|
+
* organization.
|
|
624
|
+
*/
|
|
625
|
+
create(input: CreateCustomAlertDto): Promise<AlertResponseDto>;
|
|
626
|
+
/** Flat view of any alert, with its linked resources. */
|
|
627
|
+
get(alertId: string): Promise<AlertResponseDto>;
|
|
628
|
+
/** Replace the alert's markdown notes (any alert type). */
|
|
629
|
+
updateNotes(alertId: string, input: UpdateAlertNotesDto): Promise<AlertResponseDto>;
|
|
630
|
+
/** Immutable attempt facts captured when attempt-history rules contributed to an alert. */
|
|
631
|
+
attemptEvidence(alertId: string): Promise<AlertAttemptEvidence[]>;
|
|
632
|
+
}
|
|
633
|
+
/** Resources linked to an alert — `/v1/alerts/{id}/resources`. */
|
|
634
|
+
export declare class AlertResourcesProxy {
|
|
635
|
+
private readonly req;
|
|
273
636
|
constructor(req: RequestFn);
|
|
637
|
+
list(alertId: string): Promise<AlertResourceDto[]>;
|
|
638
|
+
/** Idempotent on (resourceType, resourceId): re-linking returns the existing link. */
|
|
639
|
+
add(alertId: string, input: AlertResourceRefDto): Promise<AlertResourceDto>;
|
|
640
|
+
/** `alertResourceId` is the link id from `list` / `add`, not the target's id. */
|
|
641
|
+
remove(alertId: string, alertResourceId: string): Promise<void>;
|
|
274
642
|
}
|
|
643
|
+
/**
|
|
644
|
+
* Cross-resource primitives (`/v1/platform/v1/*`). Polymorphic comments and
|
|
645
|
+
* file uploads keyed by `resourceType` + `resourceId`. Most callers should
|
|
646
|
+
* prefer the per-resource proxies (e.g. `sdk.individuals.comments`).
|
|
647
|
+
*/
|
|
275
648
|
export declare class PlatformResource {
|
|
276
649
|
readonly comments: PlatformCommentsResource;
|
|
277
650
|
readonly files: PlatformFilesResource;
|
|
@@ -306,21 +679,59 @@ export declare class ConfigResource {
|
|
|
306
679
|
private readonly req;
|
|
307
680
|
readonly rules: ConfigRulesResource;
|
|
308
681
|
readonly constants: ConfigConstantsResource;
|
|
682
|
+
readonly alertWorkflows: ConfigAlertWorkflowsResource;
|
|
683
|
+
/** @deprecated Read-only archive. Use alertWorkflows for assignment. */
|
|
684
|
+
readonly states: ConfigStatesResource;
|
|
685
|
+
readonly assignmentPolicies: ConfigAssignmentPoliciesResource;
|
|
309
686
|
readonly products: ConfigProductsResource;
|
|
310
687
|
readonly currencies: ConfigCurrenciesResource;
|
|
311
688
|
readonly eventDefinitions: ConfigEventDefinitionsResource;
|
|
689
|
+
readonly customAlertTypes: ConfigCustomAlertTypesResource;
|
|
312
690
|
readonly webhooks: ConfigWebhooksResource;
|
|
691
|
+
readonly tagCatalogue: ConfigTagCatalogueResource;
|
|
692
|
+
readonly tagGroups: ConfigTagGroupsResource;
|
|
693
|
+
readonly sync: ConfigSyncResource;
|
|
313
694
|
constructor(req: RequestFn);
|
|
314
695
|
/** `DELETE /v1/config/reset` — clear all org config (destructive). */
|
|
315
696
|
reset(): Promise<ResetConfigResponseDto>;
|
|
316
697
|
}
|
|
698
|
+
/**
|
|
699
|
+
* Tenant sync (config-as-code). The client loads + merges local config files
|
|
700
|
+
* into a `SyncConfig` and the server validates / diffs / applies it against the
|
|
701
|
+
* live tenant. Backs the `dossiers-sync` CLI.
|
|
702
|
+
*/
|
|
703
|
+
export declare class ConfigSyncResource {
|
|
704
|
+
private readonly req;
|
|
705
|
+
constructor(req: RequestFn);
|
|
706
|
+
/** Validate a config (schema + cross-references). No writes. */
|
|
707
|
+
validate(config: SyncConfig): Promise<SyncValidationResult>;
|
|
708
|
+
/** Diff a config against live state — advisory preview, no writes. */
|
|
709
|
+
plan(config: SyncConfig): Promise<SyncPlanResult>;
|
|
710
|
+
/** Validate, diff, and apply a config to the live tenant. */
|
|
711
|
+
apply(config: SyncConfig): Promise<SyncApplyResult>;
|
|
712
|
+
/** Serialize the live tenant config back into a `SyncConfig` (import / pull). */
|
|
713
|
+
export(query?: SyncExportQuery): Promise<SyncConfig>;
|
|
714
|
+
}
|
|
317
715
|
export declare class ConfigRulesResource {
|
|
318
716
|
private readonly req;
|
|
319
717
|
constructor(req: RequestFn);
|
|
320
718
|
list(query?: SyncKeyQuery): Promise<RuleResponseDto[]>;
|
|
321
719
|
create(input: CreateRuleDto): Promise<RuleResponseDto>;
|
|
322
720
|
getBySyncKey(syncKey: string): Promise<RuleResponseDto>;
|
|
721
|
+
/**
|
|
722
|
+
* Dry-run rule simulation (spec v0 rules §11 backtest + synthetic
|
|
723
|
+
* source). Read-only: nothing is persisted and no actions execute —
|
|
724
|
+
* the response summarises what WOULD have happened. Requires only
|
|
725
|
+
* `config:read`.
|
|
726
|
+
*/
|
|
727
|
+
backtest(input: SimulateRulesDto): Promise<SimulationReportDto>;
|
|
323
728
|
get(id: string): Promise<RuleResponseDto>;
|
|
729
|
+
/** List a rule's definitional version history, newest first (audit trail). */
|
|
730
|
+
versions(id: string): Promise<RuleVersionResponseDto[]>;
|
|
731
|
+
/** Get a single rule version by its version number. */
|
|
732
|
+
getVersion(id: string, version: number): Promise<RuleVersionResponseDto>;
|
|
733
|
+
/** Compute-on-read alert analytics for a rule: disposition breakdown + precision. */
|
|
734
|
+
analytics(id: string): Promise<RuleAnalyticsResponseDto>;
|
|
324
735
|
update(id: string, input: UpdateRuleDto): Promise<RuleResponseDto>;
|
|
325
736
|
/**
|
|
326
737
|
* Tombstones the rule. The rule must already be in ARCHIVED lifecycle;
|
|
@@ -332,17 +743,154 @@ export declare class ConfigRulesResource {
|
|
|
332
743
|
archive(id: string): Promise<RuleResponseDto>;
|
|
333
744
|
/** Unarchive (ARCHIVED → LIVE). Validates outbound references first. */
|
|
334
745
|
unarchive(id: string, targetStatus?: string): Promise<RuleResponseDto>;
|
|
746
|
+
/**
|
|
747
|
+
* Roll the rule back to a previous version. Forward-only: re-applies the
|
|
748
|
+
* target version's definition through the validated update path and mints a
|
|
749
|
+
* new version. Returns 409 if the restored definition no longer resolves
|
|
750
|
+
* (e.g. a tombstoned reference), 403 for system rules.
|
|
751
|
+
*/
|
|
752
|
+
rollback(id: string, toVersion: number, reason?: string): Promise<RuleResponseDto>;
|
|
753
|
+
}
|
|
754
|
+
/**
|
|
755
|
+
* One workflow per alert type. Stages control assignment and review requirements;
|
|
756
|
+
* routers choose paths. Requires config:read / config:write.
|
|
757
|
+
*/
|
|
758
|
+
export declare class ConfigAlertWorkflowsResource {
|
|
759
|
+
private readonly req;
|
|
760
|
+
constructor(req: RequestFn);
|
|
761
|
+
/** Organization-wide choice; defaults to SIMPLE until Defined workflows is selected. */
|
|
762
|
+
getExperience(): Promise<AlertWorkflowExperienceSettings>;
|
|
763
|
+
/** Requires config:write. Changes only the behavior of newly created alerts. */
|
|
764
|
+
saveExperience(input: SaveAlertWorkflowExperienceInput): Promise<AlertWorkflowExperienceSettings>;
|
|
765
|
+
/** Requires config:read. Returns one workflow per alert type. */
|
|
766
|
+
list(): Promise<AlertWorkflowSettings[]>;
|
|
767
|
+
/** Newest publication first. A null definition cannot be restored. Requires config:read. */
|
|
768
|
+
versions(alertType: WorkflowAlertType): Promise<AlertWorkflowVersion[]>;
|
|
769
|
+
/** Replaces the draft with a saved version. Publishing is a separate operation; existing alerts are unchanged. */
|
|
770
|
+
restore(alertType: WorkflowAlertType, input: RestoreAlertWorkflowInput): Promise<AlertWorkflowSettings>;
|
|
771
|
+
get(alertType: WorkflowAlertType): Promise<AlertWorkflowSettings>;
|
|
772
|
+
/** Requires config:write. Use revision from get(); publish=false only updates the draft. */
|
|
773
|
+
save(alertType: WorkflowAlertType, input: SaveAlertWorkflowInput): Promise<AlertWorkflowSettings>;
|
|
774
|
+
}
|
|
775
|
+
/** Read-only legacy policies. New alert assignment runs through alertWorkflows. */
|
|
776
|
+
export declare class ConfigAssignmentPoliciesResource {
|
|
777
|
+
private readonly req;
|
|
778
|
+
constructor(req: RequestFn);
|
|
779
|
+
/** List policies in evaluation order. */
|
|
780
|
+
list(): Promise<AssignmentPolicyResponseDto[]>;
|
|
781
|
+
/** Create a policy (appended at the end of the evaluation order). */
|
|
782
|
+
/** @deprecated Returns HTTP 410. Use config.alertWorkflows.save() to configure stage assignment. */
|
|
783
|
+
create(input: CreateAssignmentPolicyDto): Promise<AssignmentPolicyResponseDto>;
|
|
784
|
+
getBySyncKey(syncKey: string): Promise<AssignmentPolicyResponseDto | {
|
|
785
|
+
found: false;
|
|
786
|
+
}>;
|
|
787
|
+
get(id: string): Promise<AssignmentPolicyResponseDto>;
|
|
788
|
+
/** @deprecated Returns HTTP 410. Use config.alertWorkflows.save() to configure stage assignment. */
|
|
789
|
+
update(id: string, input: UpdateAssignmentPolicyDto): Promise<AssignmentPolicyResponseDto>;
|
|
790
|
+
/** Reorder: pass EVERY policy id in the desired order; priorities are reassigned 1..n. */
|
|
791
|
+
/** @deprecated Returns HTTP 410. Use config.alertWorkflows.save() to configure stage assignment. */
|
|
792
|
+
reorder(input: ReorderAssignmentPoliciesDto): Promise<AssignmentPolicyResponseDto[]>;
|
|
793
|
+
/** @deprecated Returns HTTP 410. Use config.alertWorkflows.save() to configure stage assignment. */
|
|
794
|
+
delete(id: string): Promise<void>;
|
|
335
795
|
}
|
|
336
796
|
export declare class ConfigConstantsResource {
|
|
337
797
|
private readonly req;
|
|
338
798
|
constructor(req: RequestFn);
|
|
339
|
-
list(query?:
|
|
799
|
+
list(query?: ListConstantsQuery): Promise<ConstantResponseDto[]>;
|
|
340
800
|
create(input: CreateConstantDto): Promise<ConstantResponseDto>;
|
|
341
801
|
getBySyncKey(syncKey: string): Promise<ConstantResponseDto>;
|
|
342
802
|
get(id: string): Promise<ConstantResponseDto>;
|
|
343
803
|
update(id: string, input: UpdateConstantDto): Promise<ConstantResponseDto>;
|
|
344
804
|
delete(id: string, query?: DeleteConstantQuery): Promise<void>;
|
|
345
805
|
}
|
|
806
|
+
export declare class ConfigStatesResource {
|
|
807
|
+
private readonly req;
|
|
808
|
+
constructor(req: RequestFn);
|
|
809
|
+
list(): Promise<StateDefinitionDto[]>;
|
|
810
|
+
create(input: CreateStateDefinitionInput): Promise<StateDefinitionDto>;
|
|
811
|
+
}
|
|
812
|
+
export declare class StatesResource {
|
|
813
|
+
private readonly req;
|
|
814
|
+
constructor(req: RequestFn);
|
|
815
|
+
change(input: ChangeResourceStateInput): Promise<ResourceStateDto>;
|
|
816
|
+
get(resourceType: StateResourceType, resourceId: string, name: string): Promise<ResourceStateDto | null>;
|
|
817
|
+
history(resourceType: StateResourceType, resourceId: string, name: string, limit?: number): Promise<ResourceStateHistoryDto[]>;
|
|
818
|
+
}
|
|
819
|
+
/**
|
|
820
|
+
* Tag catalogue — per-org, per-field tag vocabulary plus enforcement. Backs
|
|
821
|
+
* every `TagValue[]` resource tag field. Under `strict` enforcement, writes
|
|
822
|
+
* carrying off-catalogue values are rejected (422).
|
|
823
|
+
*/
|
|
824
|
+
export declare class ConfigTagCatalogueResource {
|
|
825
|
+
private readonly req;
|
|
826
|
+
constructor(req: RequestFn);
|
|
827
|
+
/** List catalogue entries, optionally filtered by field-key. */
|
|
828
|
+
list(query?: {
|
|
829
|
+
fieldKey?: TagFieldKey;
|
|
830
|
+
includeArchived?: boolean;
|
|
831
|
+
}): Promise<TagCatalogueEntry[]>;
|
|
832
|
+
/**
|
|
833
|
+
* The fixed colour palette. Served by the API so the token list isn't
|
|
834
|
+
* duplicated (and left to drift) in every client.
|
|
835
|
+
*/
|
|
836
|
+
palette(): Promise<{
|
|
837
|
+
tokens: string[];
|
|
838
|
+
}>;
|
|
839
|
+
create(input: TagCatalogueEntryInput): Promise<TagCatalogueEntry>;
|
|
840
|
+
update(id: string, input: UpdateTagCatalogueEntryInput): Promise<TagCatalogueEntry>;
|
|
841
|
+
/** Archive an entry (hidden from pickers but kept for unarchive/history). */
|
|
842
|
+
archive(id: string): Promise<TagCatalogueEntry>;
|
|
843
|
+
/** Hard-delete an entry. Existing assignments keep their snapshot label/value. */
|
|
844
|
+
delete(id: string): Promise<void>;
|
|
845
|
+
/** Re-sync denormalised assignment labels from the catalogue. */
|
|
846
|
+
backfill(fieldKey: TagFieldKey): Promise<{
|
|
847
|
+
rewritten: number;
|
|
848
|
+
}>;
|
|
849
|
+
}
|
|
850
|
+
/**
|
|
851
|
+
* Tag groups — the facet layer over the catalogue. A group owns a namespace, so
|
|
852
|
+
* its member tags are stored as `<group>:<tag>` and a group is recoverable from
|
|
853
|
+
* a tag value by splitting on the first colon.
|
|
854
|
+
*/
|
|
855
|
+
export declare class ConfigTagGroupsResource {
|
|
856
|
+
private readonly req;
|
|
857
|
+
constructor(req: RequestFn);
|
|
858
|
+
list(query?: {
|
|
859
|
+
fieldKey?: TagFieldKey;
|
|
860
|
+
includeArchived?: boolean;
|
|
861
|
+
}): Promise<TagGroup[]>;
|
|
862
|
+
create(input: TagGroupInput): Promise<TagGroup>;
|
|
863
|
+
update(id: string, input: UpdateTagGroupInput): Promise<TagGroup>;
|
|
864
|
+
/** Archive a group. Its tags keep their namespaced values. */
|
|
865
|
+
archive(id: string): Promise<TagGroup>;
|
|
866
|
+
/** Hard-delete. Rejected while the group still owns tags — archive instead. */
|
|
867
|
+
delete(id: string): Promise<void>;
|
|
868
|
+
/** Records holding more than one tag from this group — the SINGLE pre-flight. */
|
|
869
|
+
cardinalityConflicts(id: string): Promise<{
|
|
870
|
+
total: number;
|
|
871
|
+
sample: {
|
|
872
|
+
resourceId: string;
|
|
873
|
+
count: number;
|
|
874
|
+
}[];
|
|
875
|
+
}>;
|
|
876
|
+
/**
|
|
877
|
+
* Move tags into (or out of, with `groupId: null`) a group.
|
|
878
|
+
*
|
|
879
|
+
* This changes each tag's stored VALUE, so it also rewrites assignments,
|
|
880
|
+
* rule condition operands, and assignment-policy routing tables. Run it
|
|
881
|
+
* with `dryRun: true` first — the report is identical, nothing is written.
|
|
882
|
+
*/
|
|
883
|
+
regroup(input: {
|
|
884
|
+
entryIds: string[];
|
|
885
|
+
groupId?: string | null;
|
|
886
|
+
dryRun?: boolean;
|
|
887
|
+
}): Promise<RegroupReport>;
|
|
888
|
+
}
|
|
889
|
+
/**
|
|
890
|
+
* Lifecycle-result shape returned by archive/unarchive endpoints across
|
|
891
|
+
* adopters. Subset of the resource row sufficient for UI feedback after a
|
|
892
|
+
* transition.
|
|
893
|
+
*/
|
|
346
894
|
export interface LifecycleResult {
|
|
347
895
|
id: string;
|
|
348
896
|
lifecycle: 'LIVE' | 'ARCHIVED' | 'TOMBSTONED';
|
|
@@ -378,6 +926,36 @@ export declare class ConfigCurrenciesResource {
|
|
|
378
926
|
get(id: string): Promise<CurrencyResponseDto>;
|
|
379
927
|
update(id: string, input: UpdateCurrencyInput): Promise<CurrencyResponseDto>;
|
|
380
928
|
bulkUpdateStatus(input: BulkCurrencyStatusInput): Promise<BulkCurrencyStatusResponseDto>;
|
|
929
|
+
/** Archive a currency (LIVE → ARCHIVED). Also disables it. */
|
|
930
|
+
archive(id: string): Promise<CurrencyResponseDto>;
|
|
931
|
+
/** Tombstone a currency (terminal). Archive-first required — 409 if LIVE. */
|
|
932
|
+
delete(id: string): Promise<CurrencyResponseDto>;
|
|
933
|
+
}
|
|
934
|
+
/**
|
|
935
|
+
* Org-defined alert types for custom alerts — `/v1/config/custom-alert-types`.
|
|
936
|
+
* Requires `config:read` / `config:write`. Follows the canonical lifecycle:
|
|
937
|
+
* archive (blocked while alerts of the type are OPEN) → tombstone.
|
|
938
|
+
*/
|
|
939
|
+
export declare class ConfigCustomAlertTypesResource {
|
|
940
|
+
private readonly req;
|
|
941
|
+
constructor(req: RequestFn);
|
|
942
|
+
list(query?: {
|
|
943
|
+
lifecycle?: 'LIVE' | 'ARCHIVED' | 'TOMBSTONED' | 'ALL';
|
|
944
|
+
}): Promise<CustomAlertTypeResponseDto[]>;
|
|
945
|
+
create(input: CreateCustomAlertTypeDto): Promise<CustomAlertTypeResponseDto>;
|
|
946
|
+
/** Returns `{ found: false }` when no type has that name. */
|
|
947
|
+
getByName(name: string): Promise<CustomAlertTypeResponseDto | {
|
|
948
|
+
found: false;
|
|
949
|
+
}>;
|
|
950
|
+
get(id: string): Promise<CustomAlertTypeResponseDto>;
|
|
951
|
+
/** Schema edits apply to alerts raised afterwards; existing alerts are not re-validated. */
|
|
952
|
+
update(id: string, input: UpdateCustomAlertTypeDto): Promise<CustomAlertTypeResponseDto>;
|
|
953
|
+
/** Tombstones the type. Archive-first enforced. */
|
|
954
|
+
delete(id: string): Promise<void>;
|
|
955
|
+
/** LIVE → ARCHIVED. 409 while any alert of this type is OPEN. */
|
|
956
|
+
archive(id: string): Promise<CustomAlertTypeResponseDto>;
|
|
957
|
+
/** ARCHIVED → LIVE. */
|
|
958
|
+
unarchive(id: string): Promise<CustomAlertTypeResponseDto>;
|
|
381
959
|
}
|
|
382
960
|
export declare class ConfigEventDefinitionsResource {
|
|
383
961
|
private readonly req;
|
|
@@ -422,8 +1000,6 @@ export declare class SetupResource {
|
|
|
422
1000
|
export declare class SettingsResource {
|
|
423
1001
|
private readonly req;
|
|
424
1002
|
constructor(req: RequestFn);
|
|
425
|
-
/** Download the live tenant.sync.json zip. Use snapshots for audit-grade records. */
|
|
426
|
-
getSyncExport(): Promise<SyncExportDto>;
|
|
427
1003
|
/** List every captured snapshot for the tenant, newest first. */
|
|
428
1004
|
listSyncSnapshots(): Promise<SyncSnapshotDto[]>;
|
|
429
1005
|
/** Detect whether the live config has drifted from the latest snapshot. */
|
|
@@ -436,5 +1012,79 @@ export declare class SettingsResource {
|
|
|
436
1012
|
/** Download a specific snapshot as a zip archive (tenant.sync.json + README.md). */
|
|
437
1013
|
downloadSyncSnapshot(id: string): Promise<unknown>;
|
|
438
1014
|
}
|
|
1015
|
+
/**
|
|
1016
|
+
* Custom screening lists — tenant-managed lists (internal blocklists, exited
|
|
1017
|
+
* customers, local regulator lists) checked by every screening run alongside
|
|
1018
|
+
* external providers. Requires `config:read` / `config:write` API-key scope.
|
|
1019
|
+
*/
|
|
1020
|
+
export declare class CustomListsResource {
|
|
1021
|
+
private readonly req;
|
|
1022
|
+
constructor(req: RequestFn);
|
|
1023
|
+
/** `GET /v1/screening/custom-lists` — lists, LIVE only by default. */
|
|
1024
|
+
list(params?: {
|
|
1025
|
+
lifecycle?: 'LIVE' | 'ARCHIVED' | 'ALL';
|
|
1026
|
+
enabled?: boolean;
|
|
1027
|
+
search?: string;
|
|
1028
|
+
page?: number;
|
|
1029
|
+
pageSize?: number;
|
|
1030
|
+
}): Promise<CustomScreeningListListResponse>;
|
|
1031
|
+
/** `POST /v1/screening/custom-lists` — create a list. */
|
|
1032
|
+
create(input: CreateCustomScreeningListInput): Promise<CustomScreeningListDto>;
|
|
1033
|
+
/** `GET /v1/screening/custom-lists/{listId}`. */
|
|
1034
|
+
get(listId: string): Promise<CustomScreeningListDto>;
|
|
1035
|
+
/** `PATCH /v1/screening/custom-lists/{listId}` — name / description / enabled / tags. */
|
|
1036
|
+
update(listId: string, input: UpdateCustomScreeningListInput): Promise<CustomScreeningListDto>;
|
|
1037
|
+
/**
|
|
1038
|
+
* `POST /v1/screening/custom-lists/{listId}/archive` — archived lists are
|
|
1039
|
+
* read-only and excluded from screening.
|
|
1040
|
+
*/
|
|
1041
|
+
archive(listId: string): Promise<CustomScreeningListDto>;
|
|
1042
|
+
/** `POST /v1/screening/custom-lists/{listId}/unarchive`. */
|
|
1043
|
+
unarchive(listId: string): Promise<CustomScreeningListDto>;
|
|
1044
|
+
/** `GET /v1/screening/custom-lists/{listId}/entries`. */
|
|
1045
|
+
listEntries(listId: string, params?: {
|
|
1046
|
+
search?: string;
|
|
1047
|
+
page?: number;
|
|
1048
|
+
pageSize?: number;
|
|
1049
|
+
}): Promise<CustomListEntryListResponse>;
|
|
1050
|
+
/** `POST /v1/screening/custom-lists/{listId}/entries` — add a single entry. */
|
|
1051
|
+
createEntry(listId: string, input: CustomListEntryInput): Promise<CustomListEntryDto>;
|
|
1052
|
+
/**
|
|
1053
|
+
* `POST /v1/screening/custom-lists/{listId}/entries/bulk` — import up to
|
|
1054
|
+
* 500 rows per request. Invalid rows are rejected per-row (with reasons)
|
|
1055
|
+
* while valid rows proceed; rows carrying `externalRef` upsert instead of
|
|
1056
|
+
* duplicating, so re-importing a refreshed CSV is safe.
|
|
1057
|
+
*/
|
|
1058
|
+
bulkCreateEntries(listId: string, rows: CustomListEntryInput[]): Promise<BulkCustomListImportResultDto>;
|
|
1059
|
+
/** `PATCH /v1/screening/custom-lists/{listId}/entries/{entryId}`. */
|
|
1060
|
+
updateEntry(listId: string, entryId: string, input: UpdateCustomListEntryInput): Promise<CustomListEntryDto>;
|
|
1061
|
+
/** `DELETE /v1/screening/custom-lists/{listId}/entries/{entryId}`. */
|
|
1062
|
+
deleteEntry(listId: string, entryId: string): Promise<{
|
|
1063
|
+
deleted: boolean;
|
|
1064
|
+
}>;
|
|
1065
|
+
}
|
|
1066
|
+
/**
|
|
1067
|
+
* On-demand PDF reports (`/v1/reports/...`). Each method resolves to the raw
|
|
1068
|
+
* PDF bytes; write them to disk or hand them to a download response. Requires
|
|
1069
|
+
* the `report:read` grant. Generating a report records a `report.generated`
|
|
1070
|
+
* activity on the subject record.
|
|
1071
|
+
*/
|
|
1072
|
+
export declare class ReportsResource {
|
|
1073
|
+
private readonly getBinary;
|
|
1074
|
+
constructor(getBinary: BinaryRequestFn);
|
|
1075
|
+
/** Alert case file: facts, subject customer, matches / rule triggers, comments, activity. */
|
|
1076
|
+
alert(alertId: string): Promise<Uint8Array>;
|
|
1077
|
+
/** Customer profile: identity, documents, accounts, risk, screening, totals, alerts. */
|
|
1078
|
+
customerProfile(customerId: string): Promise<Uint8Array>;
|
|
1079
|
+
/** Counterparty profile: classification, identifiers, payment methods, totals. */
|
|
1080
|
+
counterpartyProfile(counterpartyId: string): Promise<Uint8Array>;
|
|
1081
|
+
/**
|
|
1082
|
+
* Generic profile for any other registered resource type (`ACCOUNT`,
|
|
1083
|
+
* `DEVICE`, `INSTITUTION`, `PRODUCT`, `TASK`, …). `ALERT`, `CUSTOMER` and
|
|
1084
|
+
* `COUNTERPARTY` are rejected with 400 — use the dedicated methods.
|
|
1085
|
+
*/
|
|
1086
|
+
resourceProfile(resourceType: ReportResourceType, resourceId: string): Promise<Uint8Array>;
|
|
1087
|
+
}
|
|
1088
|
+
export type ReportResourceType = 'ACCOUNT' | 'TRANSACTION' | 'TASK' | 'DEVICE' | 'PRODUCT' | 'IDENTIFICATION_DOCUMENT' | 'INSTITUTION' | 'CONSTANT' | 'WEBHOOK' | (string & {});
|
|
439
1089
|
export {};
|
|
440
1090
|
//# sourceMappingURL=service.d.ts.map
|