@dossier-wiki/os-sdk 1.8.0-staging.855 → 1.8.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/dist/types.d.ts CHANGED
@@ -1261,6 +1261,19 @@ export interface EntityResponseDto {
1261
1261
  assignedToUserIds?: string[];
1262
1262
  assignedToTeamIds?: string[];
1263
1263
  alertCount: number;
1264
+ /**
1265
+ * Present and true when the id you looked up belongs to a merged-away
1266
+ * customer. Looked up by external ID, this is the surviving customer and
1267
+ * `mergedFrom` says what it was merged from; looked up by the internal id,
1268
+ * this is the merged-away customer and `mergedIntoId` names the survivor.
1269
+ */
1270
+ merged?: boolean;
1271
+ /** Present when the external ID you looked up belonged to a customer merged into this one. */
1272
+ mergedFrom?: MergedFrom;
1273
+ /** Present when this customer was merged away: the customer that survived. */
1274
+ mergedIntoId?: string;
1275
+ /** Present when this customer was merged away (ISO 8601). */
1276
+ mergedAt?: string;
1264
1277
  /** Operational footprint (REGISTERED office, BRANCH, WAREHOUSE, …). Read-only here;
1265
1278
  * use granular add/update/remove/verify/reject mutations on the addresses endpoint. */
1266
1279
  addresses: AddressDto[];
@@ -1614,6 +1627,19 @@ export interface IndividualResponseDto {
1614
1627
  assignedToUserIds?: string[];
1615
1628
  assignedToTeamIds?: string[];
1616
1629
  alertCount: number;
1630
+ /**
1631
+ * Present and true when the id you looked up belongs to a merged-away
1632
+ * customer. Looked up by external ID, this is the surviving customer and
1633
+ * `mergedFrom` says what it was merged from; looked up by the internal id,
1634
+ * this is the merged-away customer and `mergedIntoId` names the survivor.
1635
+ */
1636
+ merged?: boolean;
1637
+ /** Present when the external ID you looked up belonged to a customer merged into this one. */
1638
+ mergedFrom?: MergedFrom;
1639
+ /** Present when this customer was merged away: the customer that survived. */
1640
+ mergedIntoId?: string;
1641
+ /** Present when this customer was merged away (ISO 8601). */
1642
+ mergedAt?: string;
1617
1643
  identificationDocuments: IdentificationDocumentDto[];
1618
1644
  /** Postal addresses (HOME / MAILING / BILLING / WORK). Read-only here;
1619
1645
  * use granular add/update/remove/verify/reject mutations on the addresses endpoint. */
@@ -2635,6 +2661,85 @@ export interface ArchiveCustomerResponse {
2635
2661
  archivedExternalId: string | null;
2636
2662
  archivedReason: string | null;
2637
2663
  }
2664
+ /** The merged-away customer an old external ID belonged to. */
2665
+ export interface MergedFrom {
2666
+ customerId: string;
2667
+ /** The external ID you looked up. */
2668
+ externalId: string;
2669
+ /** ISO 8601. */
2670
+ mergedAt: string;
2671
+ }
2672
+ /** A detail the surviving customer can take from the duplicate. */
2673
+ export type MergeableCustomerField = 'FULL_NAME' | 'PREFERRED_NAME' | 'DATE_OF_BIRTH' | 'NATIONALITY' | 'COUNTRY_OF_RESIDENCE' | 'TAX_ID' | 'LEGAL_NAME' | 'REGISTRATION_NUMBER' | 'COUNTRY_OF_INCORPORATION' | 'DATE_OF_INCORPORATION' | 'ENTITY_TYPE';
2674
+ export interface MergeCustomersDto {
2675
+ /** The duplicate: its internal id, or `ext:<externalId>`. */
2676
+ sourceId: string;
2677
+ /** Details to take from the duplicate. The rest keep the surviving customer's value. */
2678
+ useSourceValueFor?: MergeableCustomerField[];
2679
+ /** Why these are the same customer. Recorded on both activity logs. */
2680
+ reason: string;
2681
+ }
2682
+ export interface CustomerMergeResult {
2683
+ survivingCustomerId: string;
2684
+ /** The duplicate, now archived. Its ids resolve to the surviving customer. */
2685
+ mergedCustomerId: string;
2686
+ /** ISO 8601. */
2687
+ mergedAt: string;
2688
+ /** Rows moved, by kind of record. */
2689
+ moved: Record<string, number>;
2690
+ }
2691
+ export interface CustomerMergePreview {
2692
+ transactions: number;
2693
+ alerts: number;
2694
+ /** Of `alerts`, how many are open. */
2695
+ openAlerts: number;
2696
+ accounts: number;
2697
+ identificationDocuments: number;
2698
+ files: number;
2699
+ kycSessions: number;
2700
+ comments: number;
2701
+ /** The higher of the two risk ratings. */
2702
+ survivingRiskRating?: 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL' | null;
2703
+ /** A suspended or rejected status always carries over. */
2704
+ survivingStatus: CustomerStatus;
2705
+ /** The higher of the two KYC tiers. */
2706
+ survivingKycTier: 'NO_KYC' | 'SDD' | 'CDD' | 'EDD' | 'ONGOING';
2707
+ }
2708
+ export type PotentialDuplicateMatchType = 'DOCUMENT' | 'EMAIL' | 'PHONE' | 'NAME_AND_DATE_OF_BIRTH' | 'NAME_AND_COUNTRY_OF_INCORPORATION';
2709
+ export interface PotentialDuplicateMatch {
2710
+ type: PotentialDuplicateMatchType;
2711
+ /** The other customer's value, as recorded: a document number, email, phone or name. */
2712
+ value: string;
2713
+ /** The comparison key, for `DOCUMENT` (`COUNTRY.TYPE.NUMBER`), `EMAIL` and `PHONE`. */
2714
+ normalizedValue?: string;
2715
+ /** For `DOCUMENT`: the document type. */
2716
+ documentType?: string;
2717
+ /** For `DOCUMENT`: the issuing country. */
2718
+ country?: string;
2719
+ /** For the name types: the matching date of birth or country of incorporation. */
2720
+ corroboratingValue?: string;
2721
+ }
2722
+ export interface PotentialDuplicate {
2723
+ customerId: string;
2724
+ customerName: string;
2725
+ customerType: 'INDIVIDUAL' | 'ENTITY';
2726
+ riskRating?: 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL' | null;
2727
+ /** The evidence, strongest first. */
2728
+ matches: PotentialDuplicateMatch[];
2729
+ }
2730
+ export interface ListPotentialDuplicatesResponse {
2731
+ data: PotentialDuplicate[];
2732
+ }
2733
+ export interface DismissPotentialDuplicateDto {
2734
+ /** The customer that should stop being suggested: its internal id, or `ext:<externalId>`. */
2735
+ duplicateCustomerId: string;
2736
+ /** Why these are different customers. Recorded on both activity logs. */
2737
+ reason?: string | null;
2738
+ }
2739
+ export interface DismissedPotentialDuplicate {
2740
+ customerId: string;
2741
+ duplicateCustomerId: string;
2742
+ }
2638
2743
  export interface UpdateRuleDto {
2639
2744
  /** Rule name. */
2640
2745
  name?: string;