@dossier-wiki/os-sdk 1.4.0 → 1.4.2-staging.5.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/dist/types.d.ts CHANGED
@@ -187,6 +187,57 @@ export type TypedFieldStored = {
187
187
  currency: string;
188
188
  precision: number;
189
189
  };
190
+ /**
191
+ * Read shape for one typed entry on responses that render the bag through
192
+ * the canonical `TypedFieldType` tag (uppercase) — e.g. customer profile
193
+ * fields (`IndividualResponseDto.fields`, `EntityResponseDto.fields`).
194
+ * Monetary entries carry pre-resolved minor units instead of `value`.
195
+ */
196
+ export type TypedFieldValue = {
197
+ key: string;
198
+ type: 'TEXT';
199
+ value: string;
200
+ } | {
201
+ key: string;
202
+ type: 'NUMBER';
203
+ value: number;
204
+ } | {
205
+ key: string;
206
+ type: 'BOOLEAN';
207
+ value: boolean;
208
+ } | {
209
+ key: string;
210
+ type: 'DATE';
211
+ value: string;
212
+ } | {
213
+ key: string;
214
+ type: 'LIST';
215
+ value: string[];
216
+ } | {
217
+ key: string;
218
+ type: 'SINGLE_SELECT';
219
+ value: string;
220
+ } | {
221
+ key: string;
222
+ type: 'MULTI_SELECT';
223
+ value: string[];
224
+ }
225
+ /** @deprecated Legacy open list. */
226
+ | {
227
+ key: string;
228
+ type: 'SET';
229
+ value: string[];
230
+ } | {
231
+ key: string;
232
+ type: 'CURRENCY';
233
+ value: string;
234
+ } | {
235
+ key: string;
236
+ type: 'MONETARY';
237
+ amountMinor: number;
238
+ currency: string;
239
+ precision: number;
240
+ };
190
241
  export interface UntypedKeyValueDto {
191
242
  key: string;
192
243
  value: unknown;
@@ -779,6 +830,18 @@ export interface CreateEntityInput {
779
830
  addresses?: AddressInputDto[];
780
831
  /** Parent entity for subsidiaries. */
781
832
  parentEntityId?: string;
833
+ /**
834
+ * Profile Template key (`ProfileTemplate.key`, e.g. `'entity-standard'`).
835
+ * Omit to use the default `ENTITY` template, if one is set. Must name a
836
+ * live template for entities.
837
+ */
838
+ profileTemplateKey?: string;
839
+ /**
840
+ * Typed profile fields declared by the profile template's `fieldConfig`
841
+ * (Tier A: unknown keys rejected, types enforced, required keys checked,
842
+ * defaults applied). Rejected when the customer ends up with no template.
843
+ */
844
+ fields?: TypedFieldValueInput[];
782
845
  }
783
846
  /** @deprecated Use `CreateEntityInput`. */
784
847
  export type CreateEntityDto = CreateEntityInput;
@@ -892,7 +955,21 @@ export interface CreateIndividualInput {
892
955
  /** @deprecated Use `phones`. Honoured only when `phones` is absent. */
893
956
  phone?: string;
894
957
  /** Override the creation timestamp (ISO 8601). For data-loading tools backfilling historical records. */
958
+ /** Skip the initial screening normally enqueued at creation, e.g. for a stakeholder screened with its entity. */
959
+ deferInitialScreening?: boolean;
895
960
  createdAt?: string;
961
+ /**
962
+ * Profile Template key (`ProfileTemplate.key`, e.g. `'individual-standard'`).
963
+ * Omit to use the default `INDIVIDUAL` template, if one is set. Must name
964
+ * a live template for individuals.
965
+ */
966
+ profileTemplateKey?: string;
967
+ /**
968
+ * Typed profile fields declared by the profile template's `fieldConfig`
969
+ * (Tier A: unknown keys rejected, types enforced, required keys checked,
970
+ * defaults applied). Rejected when the customer ends up with no template.
971
+ */
972
+ fields?: TypedFieldValueInput[];
896
973
  }
897
974
  /** @deprecated Use `CreateIndividualInput`. */
898
975
  export type CreateIndividualDto = CreateIndividualInput;
@@ -1152,6 +1229,14 @@ export interface EntityResponseDto {
1152
1229
  email?: string;
1153
1230
  phone?: string;
1154
1231
  riskRating: 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
1232
+ /** Who set `riskRating`. See `RiskRatingSource`. */
1233
+ riskRatingSource?: RiskRatingSource | null;
1234
+ /** When the next periodic review is due (YYYY-MM-DD), from the review cycle of the rating in force. */
1235
+ nextReviewAt?: string | null;
1236
+ /** Key of the customer's Profile Template; null when it has none. */
1237
+ profileTemplateKey?: string | null;
1238
+ /** Typed profile fields declared by the Profile Template. */
1239
+ fields?: TypedFieldValue[];
1155
1240
  kycTier?: 'NO_KYC' | 'SDD' | 'CDD' | 'EDD' | 'ONGOING';
1156
1241
  /**
1157
1242
  * Standing assignment — the users/teams responsible for compliance work on
@@ -1495,6 +1580,14 @@ export interface IndividualResponseDto {
1495
1580
  email?: string;
1496
1581
  phone?: string;
1497
1582
  riskRating: 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
1583
+ /** Who set `riskRating`. See `RiskRatingSource`. */
1584
+ riskRatingSource?: RiskRatingSource | null;
1585
+ /** When the next periodic review is due (YYYY-MM-DD), from the review cycle of the rating in force. */
1586
+ nextReviewAt?: string | null;
1587
+ /** Key of the customer's Profile Template; null when it has none. */
1588
+ profileTemplateKey?: string | null;
1589
+ /** Typed profile fields declared by the Profile Template. */
1590
+ fields?: TypedFieldValue[];
1498
1591
  kycTier?: 'NO_KYC' | 'SDD' | 'CDD' | 'EDD' | 'ONGOING';
1499
1592
  /**
1500
1593
  * Standing assignment — the users/teams responsible for compliance work on
@@ -2311,6 +2404,17 @@ export interface UpdateEntityDto {
2311
2404
  sourceDocumentId?: string;
2312
2405
  /** Override creation timestamp (ISO 8601). Used by data-loading tools to backfill historical entities. */
2313
2406
  createdAt?: string;
2407
+ /**
2408
+ * Switch the customer to another live `ENTITY` Profile Template. Kept
2409
+ * profile values are re-validated against the new template.
2410
+ */
2411
+ profileTemplateKey?: string;
2412
+ /**
2413
+ * Profile field changes, validated against the Profile Template. Merge
2414
+ * semantics: listed keys change, `value: null` clears a field, unlisted
2415
+ * keys stay. Required fields must still be present afterwards.
2416
+ */
2417
+ fields?: TypedFieldValueInput[];
2314
2418
  }
2315
2419
  export interface UpdateEventDefinitionDto {
2316
2420
  /** Human-readable display name. */
@@ -2385,6 +2489,17 @@ export interface UpdateIndividualDto {
2385
2489
  sourceDocumentId?: string;
2386
2490
  /** Override creation timestamp (ISO 8601). Used by data-loading tools to backfill historical customers. */
2387
2491
  createdAt?: string;
2492
+ /**
2493
+ * Switch the customer to another live `INDIVIDUAL` Profile Template. Kept
2494
+ * profile values are re-validated against the new template.
2495
+ */
2496
+ profileTemplateKey?: string;
2497
+ /**
2498
+ * Profile field changes, validated against the Profile Template. Merge
2499
+ * semantics: listed keys change, `value: null` clears a field, unlisted
2500
+ * keys stay. Required fields must still be present afterwards.
2501
+ */
2502
+ fields?: TypedFieldValueInput[];
2388
2503
  }
2389
2504
  export type CustomerOtherInformationSource = 'MANUAL' | 'IDENTIFICATION_DOCUMENT' | 'SYSTEM';
2390
2505
  export interface CustomerOtherInformationEntry {
@@ -2445,11 +2560,25 @@ export interface UpdateProductDto {
2445
2560
  /** Untyped escape hatch (Tier C). */
2446
2561
  otherProperties?: UntypedKeyValueInput[];
2447
2562
  }
2563
+ /**
2564
+ * Body for `PUT /customers/{customerId}/risk-rating`. The rating becomes a
2565
+ * sticky officer override (`riskRatingSource: 'MANUAL'`): a Profile
2566
+ * Template's risk matrix keeps recording its computed rating but never
2567
+ * overwrites this one until `customers.riskRating.clearOverride` is called.
2568
+ */
2448
2569
  export interface UpdateRiskRatingDto {
2449
2570
  riskRating: 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
2450
2571
  /** Justification for the override */
2451
2572
  justification?: string;
2452
2573
  }
2574
+ /** Response of `PUT /customers/{customerId}/risk-rating`. */
2575
+ export interface UpdateRiskRatingResponseDto {
2576
+ customerId: string;
2577
+ previousRiskRating: 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL' | null;
2578
+ currentRiskRating: 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
2579
+ justification: string | null;
2580
+ updatedAt: string;
2581
+ }
2453
2582
  /** Lifecycle status of a customer (individual or entity). */
2454
2583
  export type CustomerStatus = 'ONBOARDING' | 'IN_REVIEW' | 'ACTIVE' | 'INACTIVE' | 'SUSPENDED' | 'REJECTED';
2455
2584
  export interface UpdateCustomerStatusDto {
@@ -2760,7 +2889,42 @@ export interface DeviceResponseDto {
2760
2889
  }
2761
2890
  /** @deprecated Customer Device endpoints now return the canonical Device response. */
2762
2891
  export type DeviceSummaryDto = DeviceResponseDto;
2763
- export type CustomerRiskAssessmentResponseDto = OpaqueResponse;
2892
+ /**
2893
+ * A Customer Risk Assessment: either an analyst questionnaire
2894
+ * (`method: 'QUESTIONNAIRE'`) or a Profile Template risk matrix run
2895
+ * (`method: 'MATRIX'`). Matrix runs carry `compositeScore`, the factor-by-factor
2896
+ * `breakdown`, the template version they ran against, what triggered them,
2897
+ * and the outcome (`requiredDueDiligence`, `nextReviewAt`). For matrix runs
2898
+ * `totalScore` is `round(compositeScore × 100)` and `answers` is empty.
2899
+ */
2900
+ export interface CustomerRiskAssessmentResponseDto {
2901
+ id: string;
2902
+ customerId: string;
2903
+ completedAt: string;
2904
+ totalScore: number;
2905
+ computedRiskRating: 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
2906
+ resultingRiskRating: 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
2907
+ ratingOverridden: boolean;
2908
+ overrideJustification?: string;
2909
+ narrative?: string;
2910
+ answers: CustomerRiskAssessmentAnswerDto[];
2911
+ files?: RiskAssessmentFileDto[];
2912
+ method: RiskAssessmentMethod;
2913
+ /** Weighted composite score of a matrix run (an intermediate number, not the rating). Null for questionnaires. */
2914
+ compositeScore?: number | null;
2915
+ /** Factor-by-factor breakdown of a matrix run. Null for questionnaires. */
2916
+ breakdown?: RiskMatrixBreakdown | null;
2917
+ /** The Profile Template a matrix run evaluated. */
2918
+ profileTemplateId?: string | null;
2919
+ /** The Profile Template version a matrix run evaluated. */
2920
+ profileTemplateVersion?: number | null;
2921
+ trigger?: RiskAssessmentTrigger | null;
2922
+ /** Due diligence the matrix outcome requires. */
2923
+ requiredDueDiligence?: DueDiligenceTier | null;
2924
+ /** When the next periodic review is due (YYYY-MM-DD). */
2925
+ nextReviewAt?: string | null;
2926
+ [key: string]: unknown;
2927
+ }
2764
2928
  export type RiskAssessmentResponseDto = OpaqueResponse;
2765
2929
  export type ExpectedActivityResponseDto = OpaqueResponse;
2766
2930
  export type ScreeningResultDto = OpaqueResponse;
@@ -2953,8 +3117,50 @@ export interface IndividualCreatedResponseDto extends IndividualResponseDto {
2953
3117
  export interface EntityCreatedResponseDto extends EntityResponseDto {
2954
3118
  screening?: InitialScreeningResultDto;
2955
3119
  }
2956
- /** KYC verification status, mirroring the backend `KYCVerificationStatus` enum. */
2957
- export type KycVerificationStatus = 'VERIFIED' | 'FAILED' | 'PENDING' | 'EXPIRED';
3120
+ /**
3121
+ * KYC verification status, mirroring the backend `KYCVerificationStatus` enum.
3122
+ * `IN_REVIEW`: the customer finished and an officer must approve or reject.
3123
+ */
3124
+ export type KycVerificationStatus = 'VERIFIED' | 'FAILED' | 'PENDING' | 'IN_REVIEW' | 'EXPIRED';
3125
+ /** An officer's decision on a finished KYC session. */
3126
+ export type KycReviewDecision = 'APPROVED' | 'REJECTED';
3127
+ /**
3128
+ * Body of `POST /v1/customers/{customerId}/kyc/sessions/{sessionId}/review`.
3129
+ */
3130
+ export interface ReviewKycSessionInput {
3131
+ decision: KycReviewDecision;
3132
+ /** Internal reason, visible to officers only. Required when rejecting. */
3133
+ reason?: string | null;
3134
+ /** Email the decision to the customer's primary email address. */
3135
+ notifyCustomer?: boolean | null;
3136
+ /** Customer-facing message included in the decision email. */
3137
+ customerMessage?: string | null;
3138
+ }
3139
+ /** An officer's decision on a finished session — the verdict of record. */
3140
+ export interface KycSessionReviewDto {
3141
+ decision: KycReviewDecision;
3142
+ /** Internal reason, visible to officers only. */
3143
+ reason?: string | null;
3144
+ /** The message emailed to the customer, if they were notified. */
3145
+ customerMessage?: string | null;
3146
+ reviewerId?: string | null;
3147
+ reviewerName: string;
3148
+ /** ISO-8601 decision time. */
3149
+ reviewedAt: string;
3150
+ }
3151
+ /** Body of `POST /v1/customers/{customerId}/kyc/sessions` — both fields optional. */
3152
+ export interface StartKycSessionInput {
3153
+ /**
3154
+ * The KYC provider config to verify with. Required when the organization
3155
+ * has more than one enabled provider.
3156
+ */
3157
+ providerConfigId?: string | null;
3158
+ /**
3159
+ * The provider workflow to run. Defaults to the provider config's default
3160
+ * workflow, then the provider's own default.
3161
+ */
3162
+ workflowId?: string | null;
3163
+ }
2958
3164
  /**
2959
3165
  * Result of starting a KYC session
2960
3166
  * (`POST /v1/customers/{customerId}/kyc/sessions`). Hand `sessionUrl` to the
@@ -2965,6 +3171,12 @@ export interface StartKycSessionResponseDto {
2965
3171
  sessionId: string;
2966
3172
  /** The provider's own session id. */
2967
3173
  providerSessionId: string;
3174
+ /** The KYC provider config that runs the session. */
3175
+ providerConfigId?: string | null;
3176
+ /** The provider workflow the session runs; null = the provider's default. */
3177
+ workflowId?: string | null;
3178
+ /** Workflow name, snapshotted when the session started. */
3179
+ workflowName?: string | null;
2968
3180
  /** Hosted URL the customer visits to complete verification. */
2969
3181
  sessionUrl: string;
2970
3182
  status: KycVerificationStatus;
@@ -2981,8 +3193,14 @@ export interface KycSessionDto {
2981
3193
  id: string;
2982
3194
  customerId: string;
2983
3195
  status: KycVerificationStatus;
2984
- /** Which provider ran the session, e.g. `dossiers`. */
3196
+ /** Which provider ran the session, e.g. `dossiers` or `didit`. */
2985
3197
  provider?: string | null;
3198
+ /** The KYC provider config that ran the session. */
3199
+ providerConfigId?: string | null;
3200
+ /** The provider workflow the session ran; null = the provider's default. */
3201
+ workflowId?: string | null;
3202
+ /** Workflow name, snapshotted when the session started. */
3203
+ workflowName?: string | null;
2986
3204
  /** Hosted URL the customer visits to complete verification. */
2987
3205
  sessionUrl?: string | null;
2988
3206
  /** Per-step verification progress (provider-normalized). */
@@ -2996,6 +3214,15 @@ export interface KycSessionDto {
2996
3214
  createdAt: string;
2997
3215
  /** ISO-8601 completion time, if completed. */
2998
3216
  completedAt?: string | null;
3217
+ /** The officer's decision, once made. Once set, `status` follows it. */
3218
+ review?: KycSessionReviewDto | null;
3219
+ /** ISO-8601 time of the last reconcile with the provider. */
3220
+ syncedAt?: string | null;
3221
+ /**
3222
+ * ISO-8601 time the provider deleted or purged its copy. From then on this
3223
+ * record is the only one — the OS is the system of record for KYC sessions.
3224
+ */
3225
+ providerDeletedAt?: string | null;
2999
3226
  [key: string]: unknown;
3000
3227
  }
3001
3228
  /**
@@ -3237,9 +3464,44 @@ export interface SyncConfig {
3237
3464
  * supplied fields update only those values.
3238
3465
  */
3239
3466
  behaviorSettings?: SyncBehaviorSettingsConfig;
3467
+ /** Customer Profile Templates, keyed by the template `key` (e.g. "individual-standard"). */
3468
+ profileTemplates?: Record<string, SyncProfileTemplateConfig>;
3240
3469
  customerFieldPolicy?: Record<string, SyncCustomerFieldPolicyConfig>;
3241
3470
  accountStatusPolicy?: SyncAccountStatusPolicyConfig;
3242
3471
  }
3472
+ /**
3473
+ * A customer Profile Template in tenant sync. The template `key` lives in the
3474
+ * section key. `fieldConfig`, `riskMatrix` and `kycWorkflows` use the stored
3475
+ * shapes exactly (what export emits).
3476
+ */
3477
+ export interface SyncProfileTemplateConfig {
3478
+ name: string;
3479
+ description?: string;
3480
+ /** Immutable once created. */
3481
+ partyType: ProfileTemplatePartyType;
3482
+ /** At most one default per party type. Omitted = false. */
3483
+ isDefault?: boolean;
3484
+ /** Typed profile fields (same shape as a Product's `accountFieldConfig`). */
3485
+ fieldConfig?: TypedFieldDefinition[];
3486
+ /** Omitted or null = no matrix. */
3487
+ riskMatrix?: RiskMatrix | null;
3488
+ /**
3489
+ * KYC workflow per purpose. `providerConfigId` is an org-local KYC provider
3490
+ * config uuid, validated against the tenant at apply time.
3491
+ */
3492
+ kycWorkflows?: KycWorkflowBinding[];
3493
+ /**
3494
+ * Creation setup for an `INDIVIDUAL` template — how Add Individual creates
3495
+ * customers of it. Full replacement when present; omitted = unmanaged
3496
+ * (left as is; a new template copies the org's current preference). Give
3497
+ * every preset / document type an explicit `id`, or the server mints a
3498
+ * new one on each apply. Tags must be in the `customer.tags` catalogue;
3499
+ * preset user / team ids are org-local — both checked at apply time.
3500
+ */
3501
+ individualCreation?: UpdateSimpleCustomerCreationPreferencesInput;
3502
+ /** Same as `individualCreation`, for an `ENTITY` template (registration types, stakeholders). */
3503
+ entityCreation?: UpdateSimpleEntityCreationPreferencesInput;
3504
+ }
3243
3505
  export interface SyncBehaviorSettingsConfig {
3244
3506
  attemptRetentionDays?: number;
3245
3507
  attemptCoverage?: 'ALL' | 'SELECTIVE';
@@ -3384,6 +3646,7 @@ export interface SyncPlan {
3384
3646
  tagCatalogue: SyncDiffOp[];
3385
3647
  assignmentPolicies: SyncDiffOp[];
3386
3648
  behaviorSettings: SyncDiffOp[];
3649
+ profileTemplates: SyncDiffOp[];
3387
3650
  immutableViolations: SyncImmutableViolation[];
3388
3651
  }
3389
3652
  /** `POST /v1/config/sync/validate` response. */
@@ -4297,6 +4560,31 @@ export interface UpdateAlertNotesDto {
4297
4560
  /** Markdown. Null or empty clears the notes. */
4298
4561
  notes?: string | null;
4299
4562
  }
4563
+ /** Body of `alerts.dependencies.add`. */
4564
+ export interface AddAlertDependencyDto {
4565
+ /** The alert that must close first. Not the alert itself, and not one that already waits on it. */
4566
+ blockedByAlertId: string;
4567
+ }
4568
+ /** A "blocked by" link: `alertId` cannot be resolved or closed while `blockedByAlertId` is open. */
4569
+ export interface AlertDependencyDto {
4570
+ id: string;
4571
+ /** The alert that waits. */
4572
+ alertId: string;
4573
+ /** The alert that must close first. */
4574
+ blockedByAlertId: string;
4575
+ createdBy: {
4576
+ userId: string;
4577
+ name: string;
4578
+ };
4579
+ createdAt: string;
4580
+ }
4581
+ /** Both sides of an alert's links. Links outlive closure — check each linked alert's status to see which still block. */
4582
+ export interface AlertDependenciesResponseDto {
4583
+ /** Links on which the alert waits, oldest first. */
4584
+ blockedBy: AlertDependencyDto[];
4585
+ /** Links where the alert is the one that must close first, oldest first. */
4586
+ blocks: AlertDependencyDto[];
4587
+ }
4300
4588
  /** Flat REST view of an alert (any type). The GraphQL surface carries the rich per-type shape. */
4301
4589
  export interface AlertResponseDto {
4302
4590
  id: string;
@@ -4320,9 +4608,612 @@ export interface AlertResponseDto {
4320
4608
  disposition: string | null;
4321
4609
  dispositionReason: string | null;
4322
4610
  closedAt: string | null;
4611
+ /** True while at least one blocking alert (`alerts.dependencies`) is open; the alert cannot be resolved or closed until they close. */
4612
+ isBlocked?: boolean;
4323
4613
  createdAt: string;
4324
4614
  updatedAt: string;
4325
4615
  /** Present on `alerts.create` and `alerts.get`. */
4326
4616
  resources?: AlertResourceDto[];
4327
4617
  }
4618
+ /** Party type a Profile Template applies to (matches the customer `type`). */
4619
+ export type ProfileTemplatePartyType = 'INDIVIDUAL' | 'ENTITY';
4620
+ /** A risk level or rating — the platform's `risk_rating` vocabulary. */
4621
+ export type RiskLevel = 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
4622
+ /** The due-diligence tiers a risk matrix outcome may demand (a subset of `kycTier`). */
4623
+ export type DueDiligenceTier = 'SDD' | 'CDD' | 'EDD';
4624
+ /**
4625
+ * Who set a customer's current risk rating.
4626
+ *
4627
+ * - `MANUAL` — an officer set it (`customers.riskRating.update`, or a
4628
+ * questionnaire assessment). Sticky: the risk matrix records its computed
4629
+ * rating but never overwrites a MANUAL rating until the override is cleared
4630
+ * (`customers.riskRating.clearOverride`).
4631
+ * - `MATRIX` — computed by the customer's Profile Template risk matrix.
4632
+ * - `null` — set before Profile Templates existed (or never set).
4633
+ */
4634
+ export type RiskRatingSource = 'MANUAL' | 'MATRIX';
4635
+ /** How a customer risk assessment was produced. */
4636
+ export type RiskAssessmentMethod = 'QUESTIONNAIRE' | 'MATRIX';
4637
+ /** What made a risk matrix run. */
4638
+ export type RiskAssessmentTrigger = 'PROFILE_UPDATED' | 'KYC_SYNC' | 'SCHEDULED' | 'TEMPLATE_CHANGED' | 'MANUAL';
4639
+ /** What a template's KYC workflow is for. Only `ONBOARDING` is used today. */
4640
+ export type KycWorkflowPurpose = 'ONBOARDING' | 'ENHANCED_DUE_DILIGENCE' | 'PERIODIC_REVIEW' | 'ALERT';
4641
+ /** A provider KYC workflow a Profile Template runs for one purpose (at most one per purpose). */
4642
+ export interface KycWorkflowBinding {
4643
+ purpose: KycWorkflowPurpose;
4644
+ /** The KYC provider config the workflow belongs to. */
4645
+ providerConfigId: string;
4646
+ /** The provider's workflow id (not the composite GraphQL `KycWorkflow.id`). */
4647
+ workflowId: string;
4648
+ /** What a verified session of this workflow writes back to the customer. Applied once, on verification. */
4649
+ mappings?: KycOutputMapping[] | null;
4650
+ }
4651
+ /**
4652
+ * One KYC output mapping: a value of a verified session written to a profile
4653
+ * field or a customer-level constant.
4654
+ *
4655
+ * `source` is a session value: `form.<fieldId>` (a form answer, by the
4656
+ * workflow's form field id) or one of `person.nationality`,
4657
+ * `person.dateOfBirth`, `person.gender`, `person.placeOfBirth`,
4658
+ * `document.type`, `document.issuingCountry`, `signals.ipCountry`,
4659
+ * `signals.vpnOrTor`, `signals.disposableEmail`, `signals.disposablePhone`,
4660
+ * `session.workflowName`, `session.verified` (always true). Countries are ISO
4661
+ * 3166-1 alpha-3.
4662
+ *
4663
+ * `target` is `fields.<key>` (a TEXT, NUMBER, BOOLEAN, DATE, SINGLE_SELECT,
4664
+ * MULTI_SELECT, LIST, SET or CURRENCY profile field of the template) or
4665
+ * `$customer.<name>` (a customer-scope constant of type text, scalar,
4666
+ * number, boolean, date, currency or set). Validated when the template is
4667
+ * saved; a value the target cannot hold is skipped at run time.
4668
+ */
4669
+ export interface KycOutputMapping {
4670
+ source: string;
4671
+ target: string;
4672
+ /** Session value → target value. Matching ignores case and surrounding spaces; unmapped values pass through. */
4673
+ valueMap?: KycValueMapEntry[] | null;
4674
+ /** `FILL` (default) writes only an empty target; `OVERWRITE` replaces what is there. */
4675
+ mode?: 'FILL' | 'OVERWRITE' | null;
4676
+ }
4677
+ export interface KycValueMapEntry {
4678
+ from: string;
4679
+ to: string;
4680
+ }
4681
+ /** The item score a risk level contributes before weighting, e.g. `{ level: 'HIGH', score: 12.5 }`. */
4682
+ export interface RiskScaleEntry {
4683
+ level: RiskLevel;
4684
+ score: number;
4685
+ }
4686
+ /**
4687
+ * Composite score below `below` maps to `rating`. Bands are ascending; the
4688
+ * last band omits `below` (no upper bound).
4689
+ */
4690
+ export interface RiskBand {
4691
+ rating: RiskLevel;
4692
+ below?: number | null;
4693
+ }
4694
+ /**
4695
+ * The level one option of a select field — or of a BOOLEAN field, whose
4696
+ * options are `"true"` and `"false"` — scores.
4697
+ */
4698
+ export interface RiskOptionLevel {
4699
+ option: string;
4700
+ level: RiskLevel;
4701
+ /**
4702
+ * This option's own points, overriding the level's score from the scale.
4703
+ * The level still drives display and escalations. Non-negative.
4704
+ */
4705
+ score?: number | null;
4706
+ }
4707
+ /**
4708
+ * One band of a NUMBER or MONETARY field: `min` inclusive, `max` exclusive,
4709
+ * either end open (null/omitted). Bands may leave gaps — a value in a gap
4710
+ * scores as unmatched — but never overlap. Money compares in major units of
4711
+ * the field's own currency (no conversion).
4712
+ */
4713
+ export interface RiskRange {
4714
+ min?: number | null;
4715
+ max?: number | null;
4716
+ level: RiskLevel;
4717
+ /** This band's own points, overriding the level's score from the scale. Non-negative. */
4718
+ score?: number | null;
4719
+ }
4720
+ /** An ordered criterion of a factor; the first one whose condition holds sets the level. */
4721
+ export interface RiskCriterion {
4722
+ label: string;
4723
+ level: RiskLevel;
4724
+ /** This criterion's own points, overriding the level's score from the scale. Non-negative. */
4725
+ score?: number | null;
4726
+ /**
4727
+ * Condition tree, same grammar and operators as a rule condition tree
4728
+ * (spatial operators excluded). May read `fields.<key>` (this template's
4729
+ * profile fields), a fixed set of `customer.*` fields (`type`,
4730
+ * `kycStatus`, `country`, `entityType`, `tags`, `isHighRisk`,
4731
+ * `isWatchlisted`, and the `RiskMatrixDerivedInput`s), and `$global.*` /
4732
+ * `$customer.*` constants.
4733
+ */
4734
+ when: Record<string, unknown>;
4735
+ }
4736
+ /**
4737
+ * Inputs a risk matrix factor can read that the platform derives itself,
4738
+ * so the CRM need not push them as picklist answers:
4739
+ *
4740
+ * - `customer.nationality` — ISO-3 codes: an individual's nationalities, an
4741
+ * entity's country of incorporation (a list);
4742
+ * - `customer.productKeys` — the product key (`syncKey`, else `externalId`)
4743
+ * of every account the customer owns that is not closed (a list);
4744
+ * - `customer.expectedMonthlyVolume` — from the expected activity profile
4745
+ * (a number).
4746
+ *
4747
+ * Conditions (criteria, escalations) can read them too.
4748
+ */
4749
+ export type RiskMatrixDerivedInput = 'customer.nationality' | 'customer.productKeys' | 'customer.expectedMonthlyVolume';
4750
+ /**
4751
+ * One weighted dimension of a risk matrix. Exactly one form per factor:
4752
+ *
4753
+ * - **option map** — `field` + `levels`: a SINGLE_SELECT / MULTI_SELECT
4754
+ * profile field (every option gets a level) or a BOOLEAN field (options
4755
+ * `"true"` / `"false"`). A MULTI_SELECT scores its selected option with the
4756
+ * highest score;
4757
+ * - **range map** — `field` + `ranges`: a NUMBER or MONETARY field;
4758
+ * - **derived input** — `input` instead of `field`: a value the platform
4759
+ * derives itself (see `RiskMatrixDerivedInput`). A list input takes
4760
+ * `levels` (option = a value; when several are held the riskiest scores)
4761
+ * or `criteria`; a number takes `ranges`;
4762
+ * - **criteria** — explicit ordered condition trees, for anything else.
4763
+ *
4764
+ * Each option, band or criterion scores its level's scale score unless it
4765
+ * sets its own `score`; the factor's `weight` then scales it.
4766
+ */
4767
+ export interface RiskFactor {
4768
+ /** Stable key; escalations read the result as `factor.<key>.level`. */
4769
+ key: string;
4770
+ label: string;
4771
+ /** Share of the composite, 0 < weight ≤ 1. All factor weights sum to 1. */
4772
+ weight: number;
4773
+ /** Level when nothing matches (input missing). Defaults to the highest level in the scale. */
4774
+ whenUnmatched?: RiskLevel | null;
4775
+ /** Option- or range-map form: key of the profile field the factor reads. */
4776
+ field?: string | null;
4777
+ /** Derived-input form: the platform-derived input the factor reads instead of a profile field. */
4778
+ input?: RiskMatrixDerivedInput | null;
4779
+ /** Option-map form: the level (and optional score) each option of `field` scores. */
4780
+ levels?: RiskOptionLevel[] | null;
4781
+ /** Range-map form: the level (and optional score) each band of a number/money `field` scores. */
4782
+ ranges?: RiskRange[] | null;
4783
+ /** Explicit form: ordered criteria, first match wins. */
4784
+ criteria?: RiskCriterion[] | null;
4785
+ }
4786
+ /** A floor: when `when` holds, the final rating is at least `minimumRating`. Never lowers a rating. */
4787
+ export interface RiskEscalation {
4788
+ label: string;
4789
+ minimumRating: RiskLevel;
4790
+ /** Condition tree; may also read `factor.<key>.level` and `factor.<key>.criterion`. */
4791
+ when: Record<string, unknown>;
4792
+ }
4793
+ /** What a final rating demands. */
4794
+ export interface RiskOutcome {
4795
+ rating: RiskLevel;
4796
+ requiredDueDiligence: DueDiligenceTier;
4797
+ /** Months until the next periodic review. */
4798
+ reviewEveryMonths: number;
4799
+ }
4800
+ /**
4801
+ * A Profile Template's weighted factor model: per-factor level → item score
4802
+ * × weight → composite score → band (preliminary rating) → escalation floors
4803
+ * → final rating → outcome. Validated when the template is saved (weights sum
4804
+ * to 1, every option of a bound field levelled, every level without its own
4805
+ * score in the scale, ranges never overlap, an outcome for every reachable
4806
+ * rating, conditions read only what a matrix may).
4807
+ */
4808
+ export interface RiskMatrix {
4809
+ scale: RiskScaleEntry[];
4810
+ bands: RiskBand[];
4811
+ factors: RiskFactor[];
4812
+ escalations: RiskEscalation[];
4813
+ outcomes: RiskOutcome[];
4814
+ }
4815
+ /** A profile field (`fields.<key>`) or derived input (`customer.<input>`) a matrix run read, with its value then. */
4816
+ export interface RiskInputValue {
4817
+ path: string;
4818
+ value?: unknown;
4819
+ }
4820
+ /** One factor's result in a matrix run. */
4821
+ export interface RiskFactorResult {
4822
+ key: string;
4823
+ label: string;
4824
+ weight: number;
4825
+ /** The payload path the factor read; null for a criteria-only factor or a run stored before it was recorded. */
4826
+ path?: string | null;
4827
+ /** The value the factor read (a profile field or derived input; a list for list inputs); null when missing or the factor has no bound input. */
4828
+ input?: unknown;
4829
+ /** The matched criterion's label; null when nothing matched. */
4830
+ criterion?: string | null;
4831
+ level: RiskLevel;
4832
+ score: number;
4833
+ weighted: number;
4834
+ matched: boolean;
4835
+ }
4836
+ /** An escalation that fired in a matrix run. */
4837
+ export interface RiskEscalationResult {
4838
+ label: string;
4839
+ minimumRating: RiskLevel;
4840
+ /** The profile values its condition read. Null on runs stored before they were recorded. */
4841
+ inputs?: RiskInputValue[] | null;
4842
+ }
4843
+ /** Everything needed to reproduce a matrix rating by hand. */
4844
+ export interface RiskMatrixBreakdown {
4845
+ factors: RiskFactorResult[];
4846
+ /** The composite score — an intermediate number mapped to a rating by the bands. */
4847
+ composite: number;
4848
+ preliminaryRating: RiskLevel;
4849
+ /** Escalations that fired. */
4850
+ escalations: RiskEscalationResult[];
4851
+ /** Keys of factors scored at their fallback level because the input was missing. */
4852
+ incompleteFactors: string[];
4853
+ finalRating: RiskLevel;
4854
+ outcome?: RiskOutcome | null;
4855
+ /** Every profile value the run read (factor inputs and escalation conditions). Null on runs stored before it was recorded. */
4856
+ inputs?: RiskInputValue[] | null;
4857
+ /** The scale the run scored levels on. Null on older runs. */
4858
+ scale?: RiskScaleEntry[] | null;
4859
+ /** The bands the run placed the composite in. Null on older runs. */
4860
+ bands?: RiskBand[] | null;
4861
+ }
4862
+ /** A Profile Template as returned by `/v1/config/profile-templates`. */
4863
+ export interface ProfileTemplate {
4864
+ id: string;
4865
+ /** Immutable, org-unique key used by connectors and Tenant Sync (e.g. `individual-standard`). */
4866
+ key: string;
4867
+ name: string;
4868
+ description?: string | null;
4869
+ /** `CUSTOMER` today. */
4870
+ resourceType: string;
4871
+ partyType: ProfileTemplatePartyType;
4872
+ /** New customers of this party type get this template when none is named. */
4873
+ isDefault: boolean;
4874
+ /** Current published version. */
4875
+ version: number;
4876
+ fieldConfig: TypedFieldDefinition[];
4877
+ riskMatrix?: RiskMatrix | null;
4878
+ kycWorkflows: KycWorkflowBinding[];
4879
+ /**
4880
+ * How the Add Individual form creates customers of this template.
4881
+ * Set on `INDIVIDUAL` templates only (null on entity templates). Null on
4882
+ * an individual template means it has no setup of its own and the
4883
+ * org-wide Simple Customer Creation preference applies.
4884
+ */
4885
+ individualCreation: SimpleCustomerCreationPreferences | null;
4886
+ /** The `ENTITY` counterpart of `individualCreation` (null on individual templates). */
4887
+ entityCreation: SimpleEntityCreationPreferences | null;
4888
+ archivedAt?: string | null;
4889
+ createdAt: string;
4890
+ updatedAt: string;
4891
+ }
4892
+ /** A part of the template definition a version changed. */
4893
+ export type ProfileTemplateVersionChange = 'FIELDS' | 'RISK_MATRIX' | 'KYC_WORKFLOWS' | 'CREATION';
4894
+ /** An immutable snapshot of one published template version. */
4895
+ export interface ProfileTemplateVersion {
4896
+ version: number;
4897
+ fieldConfig: TypedFieldDefinition[];
4898
+ riskMatrix?: RiskMatrix | null;
4899
+ kycWorkflows: KycWorkflowBinding[];
4900
+ /** The version's Add Individual setup (individual templates). Null = the org-wide preference applied. */
4901
+ individualCreation: SimpleCustomerCreationPreferences | null;
4902
+ /** The version's Add Entity setup (entity templates). Null = the org-wide preference applied. */
4903
+ entityCreation: SimpleEntityCreationPreferences | null;
4904
+ /** What this version changed from the one before. Empty for version 1. */
4905
+ changes: ProfileTemplateVersionChange[];
4906
+ /** Actor who published the version. */
4907
+ createdBy: Record<string, unknown>;
4908
+ createdAt: string;
4909
+ }
4910
+ /** Body for `POST /v1/customers/profile-template-assignment`. */
4911
+ export interface AssignProfileTemplateInput {
4912
+ /** Customers to put on the template (at most 500). */
4913
+ customerIds: string[];
4914
+ /** Key of a live template. Customers of the other party type are skipped. */
4915
+ profileTemplateKey: string;
4916
+ }
4917
+ /** What a bulk template assignment did to each customer. */
4918
+ export interface ProfileTemplateAssignmentResult {
4919
+ /**
4920
+ * Customers now on the template. `missingFields` lists required profile
4921
+ * fields left empty: the customer is incomplete until a profile edit
4922
+ * fills them (any later `fields` update must include them).
4923
+ */
4924
+ assigned: {
4925
+ customerId: string;
4926
+ missingFields: string[];
4927
+ }[];
4928
+ /** Customers already on the template; left as they were. */
4929
+ unchanged: string[];
4930
+ /** Customers of the other party type, archived customers and unknown ids, with why. */
4931
+ skipped: {
4932
+ customerId: string;
4933
+ reason: string;
4934
+ }[];
4935
+ }
4936
+ /** Query for `GET /v1/config/profile-templates`. */
4937
+ export interface ListProfileTemplatesQuery {
4938
+ partyType?: ProfileTemplatePartyType;
4939
+ /** Include archived templates (default false). */
4940
+ includeArchived?: boolean;
4941
+ }
4942
+ /** Body for `POST /v1/config/profile-templates`. */
4943
+ export interface CreateProfileTemplateInput {
4944
+ /** Immutable, org-unique key: lowercase letters and digits separated by `-` or `_` (max 64). */
4945
+ key: string;
4946
+ /** Max 200 characters. */
4947
+ name: string;
4948
+ description?: string | null;
4949
+ partyType: ProfileTemplatePartyType;
4950
+ /** Make this the default for its party type; the previous default stops being default. */
4951
+ isDefault?: boolean;
4952
+ fieldConfig?: TypedFieldDefinition[];
4953
+ riskMatrix?: RiskMatrix | null;
4954
+ kycWorkflows?: KycWorkflowBinding[];
4955
+ /**
4956
+ * Creation setup for the Add Individual form. `INDIVIDUAL` templates only
4957
+ * — sending it on an entity template is a 400. Omit (or null) to copy the
4958
+ * org's current Simple Customer Creation preference.
4959
+ */
4960
+ individualCreation?: UpdateSimpleCustomerCreationPreferencesInput | null;
4961
+ /**
4962
+ * Creation setup for the Add Entity form. `ENTITY` templates only —
4963
+ * sending it on an individual template is a 400. Omit (or null) to copy
4964
+ * the org's current simple entity-creation preference.
4965
+ */
4966
+ entityCreation?: UpdateSimpleEntityCreationPreferencesInput | null;
4967
+ }
4968
+ /**
4969
+ * Body for `PATCH /v1/config/profile-templates/{id}`. `key` and `partyType`
4970
+ * are immutable. `riskMatrix: null` removes the matrix. Any change to
4971
+ * `fieldConfig`, `riskMatrix`, `kycWorkflows` or the creation setup publishes
4972
+ * a new version; only `fieldConfig` / `riskMatrix` changes re-assess the
4973
+ * template's customers. Archived templates cannot be changed.
4974
+ */
4975
+ export interface UpdateProfileTemplateInput {
4976
+ /**
4977
+ * The version this edit was based on. When the template has been saved
4978
+ * since, the update is refused with 409 instead of overwriting the newer
4979
+ * version. Send it from any read-modify-write flow.
4980
+ */
4981
+ expectedVersion?: number;
4982
+ name?: string;
4983
+ description?: string | null;
4984
+ isDefault?: boolean;
4985
+ fieldConfig?: TypedFieldDefinition[];
4986
+ riskMatrix?: RiskMatrix | null;
4987
+ kycWorkflows?: KycWorkflowBinding[];
4988
+ /**
4989
+ * Replace the Add Individual creation setup (`INDIVIDUAL` templates
4990
+ * only; 400 on an entity template). `null` clears it, so the org-wide
4991
+ * preference applies again. Omit to keep it.
4992
+ */
4993
+ individualCreation?: UpdateSimpleCustomerCreationPreferencesInput | null;
4994
+ /**
4995
+ * Replace the Add Entity creation setup (`ENTITY` templates only; 400 on
4996
+ * an individual template). `null` clears it. Omit to keep it.
4997
+ */
4998
+ entityCreation?: UpdateSimpleEntityCreationPreferencesInput | null;
4999
+ }
5000
+ /** Body for `POST /v1/config/profile-templates/{id}/risk-matrix-impact`. */
5001
+ export interface RiskMatrixImpactInput {
5002
+ /** The draft's profile fields; factors may only read these. */
5003
+ fieldConfig?: TypedFieldDefinition[];
5004
+ riskMatrix: RiskMatrix;
5005
+ }
5006
+ /** Body for `POST /v1/config/profile-templates/preview-risk-matrix`. */
5007
+ export interface PreviewRiskMatrixInput extends RiskMatrixImpactInput {
5008
+ /** The customer to score. */
5009
+ customerId: string;
5010
+ }
5011
+ /** One customer scored under a draft matrix. */
5012
+ export interface RiskMatrixPreview {
5013
+ customerId: string;
5014
+ customerName: string;
5015
+ externalId: string;
5016
+ /** The rating in force now. */
5017
+ currentRating?: RiskLevel | null;
5018
+ /** An officer override is in force, so a different computed rating would not apply. */
5019
+ overrideActive: boolean;
5020
+ /** The customer's own template's saved matrix, evaluated now; null when it has none. */
5021
+ published?: RiskMatrixBreakdown | null;
5022
+ draft: RiskMatrixBreakdown;
5023
+ }
5024
+ /** How many evaluated customers hold a rating before and after the draft. */
5025
+ export interface RiskRatingDistribution {
5026
+ rating: RiskLevel;
5027
+ before: number;
5028
+ after: number;
5029
+ }
5030
+ /** Customers moving from one rating to another; `from` is null for unrated customers. */
5031
+ export interface RiskRatingMovement {
5032
+ from?: RiskLevel | null;
5033
+ to: RiskLevel;
5034
+ count: number;
5035
+ }
5036
+ /** A customer whose rating the draft would move. */
5037
+ export interface RiskImpactCustomer {
5038
+ customerId: string;
5039
+ customerName: string;
5040
+ externalId: string;
5041
+ /** The saved matrix's rating; the current rating when the template has no matrix yet. */
5042
+ from?: RiskLevel | null;
5043
+ to: RiskLevel;
5044
+ compositeBefore?: number | null;
5045
+ compositeAfter: number;
5046
+ /** An officer override is in force: this customer's rating would not move. */
5047
+ overrideActive: boolean;
5048
+ }
5049
+ /** What saving a draft matrix would do to the live customers on its template. */
5050
+ export interface RiskMatrixImpact {
5051
+ /** Live customers on the template. */
5052
+ customerCount: number;
5053
+ evaluated: number;
5054
+ /** More customers than the dry-run limit (default 5,000); only the first `evaluated` were scored. */
5055
+ truncated: boolean;
5056
+ /** Customers whose matrix rating moves. */
5057
+ changed: number;
5058
+ /** Of those, customers with an officer override in force, whose rating stays. */
5059
+ overriddenChanged: number;
5060
+ /** Customers with a factor scored at its fallback level under the draft. */
5061
+ incomplete: number;
5062
+ failed: number;
5063
+ distribution: RiskRatingDistribution[];
5064
+ movements: RiskRatingMovement[];
5065
+ /** Customers whose rating moves, rises before falls, biggest change first (at most 100). */
5066
+ customers: RiskImpactCustomer[];
5067
+ }
5068
+ /**
5069
+ * How the simple form fills the external ID: `MANUAL` (typed by the
5070
+ * officer), `DOCUMENT` (`<type>.<country>.<number>` of the chosen ID document,
5071
+ * or `REG.<country>.<registrationNumber>` for entities — deterministic),
5072
+ * `NAME_HASH` (hash of the normalised name — deterministic), `RANDOM`.
5073
+ */
5074
+ export type SimpleCustomerExternalIdStrategy = 'MANUAL' | 'DOCUMENT' | 'NAME_HASH' | 'RANDOM';
5075
+ /** Fields a simple entity registration type can show / require. */
5076
+ export type SimpleEntityFormField = 'registrationNumber' | 'taxId' | 'dateOfIncorporation' | 'tradingNames' | 'websites' | 'stakeholders';
5077
+ /** One entry of the simple form's ID-document selector. */
5078
+ export interface SimpleCustomerDocumentType {
5079
+ id: string;
5080
+ label: string;
5081
+ /** Stored verbatim as the identification document `type`, e.g. `NATIONAL_ID`. */
5082
+ type: string;
5083
+ /** Issuing country, ISO 3166-1 alpha-3. The preselection when `countryEditable`. */
5084
+ country: string;
5085
+ /** Whether the officer may change the issuing country. */
5086
+ countryEditable: boolean;
5087
+ }
5088
+ /** One entry of the simple Add Entity form's registration-type selector. */
5089
+ export interface SimpleEntityRegistrationType {
5090
+ id: string;
5091
+ label: string;
5092
+ /** Stored verbatim as `Entity.entityType`; null leaves it unset. */
5093
+ entityType?: string | null;
5094
+ /** Country of incorporation, ISO 3166-1 alpha-3. */
5095
+ country: string;
5096
+ /** Fields displayed on this registration type's simple entity form. */
5097
+ visibleFields: SimpleEntityFormField[];
5098
+ /** Displayed fields that must be completed. */
5099
+ requiredFields: SimpleEntityFormField[];
5100
+ }
5101
+ /** A named bundle of tags + standing assignment a new customer starts with (a line of business or intake channel). */
5102
+ export interface SimpleCustomerPreset {
5103
+ id: string;
5104
+ label: string;
5105
+ tags: TagValue[];
5106
+ assignedToUserIds: string[];
5107
+ assignedToTeamIds: string[];
5108
+ }
5109
+ /** What the individual and entity simple forms have in common. */
5110
+ export interface SimpleCreationPreferencesBase {
5111
+ /** Whether the create page offers the simple mode at all. */
5112
+ enabled: boolean;
5113
+ /** Whether the create page opens in simple mode. */
5114
+ openByDefault: boolean;
5115
+ externalIdStrategy: SimpleCustomerExternalIdStrategy;
5116
+ presets: SimpleCustomerPreset[];
5117
+ /** Preset preselected on the simple form; null = none. */
5118
+ defaultPresetId?: string | null;
5119
+ /** Whether the simple form insists on a preset being chosen (when any exist). */
5120
+ requirePreset: boolean;
5121
+ /** Whether the officer may change the tags a preset applied. */
5122
+ allowTags: boolean;
5123
+ /** Whether the officer may change the assignees a preset applied. */
5124
+ allowAssignment: boolean;
5125
+ /** Whether the creating officer is added to the new customer's assignees. */
5126
+ assignCreator: boolean;
5127
+ }
5128
+ /** Creation setup of the simple Add Individual form. */
5129
+ export interface SimpleCustomerCreationPreferences extends SimpleCreationPreferencesBase {
5130
+ documentTypes: SimpleCustomerDocumentType[];
5131
+ defaultDocumentTypeId?: string | null;
5132
+ }
5133
+ /**
5134
+ * Stakeholder capture on the simple Add Entity form. Each new stakeholder is
5135
+ * created as an Individual customer (from one of `documentTypes`) and linked.
5136
+ */
5137
+ export interface SimpleEntityStakeholderPreferences {
5138
+ documentTypes: SimpleCustomerDocumentType[];
5139
+ defaultDocumentTypeId?: string | null;
5140
+ /** Whether the stakeholder row asks for an ownership percentage. */
5141
+ collectOwnership: boolean;
5142
+ collectNationality: boolean;
5143
+ collectDateOfBirth: boolean;
5144
+ }
5145
+ /** Creation setup of the simple Add Entity form. */
5146
+ export interface SimpleEntityCreationPreferences extends SimpleCreationPreferencesBase {
5147
+ registrationTypes: SimpleEntityRegistrationType[];
5148
+ defaultRegistrationTypeId?: string | null;
5149
+ stakeholders: SimpleEntityStakeholderPreferences;
5150
+ }
5151
+ export interface SimpleCustomerDocumentTypeInput {
5152
+ /** Omit to let the server mint an id for a new entry. */
5153
+ id?: string | null;
5154
+ /** 1–80 characters. */
5155
+ label: string;
5156
+ /** 1–60 characters. */
5157
+ type: string;
5158
+ /** ISO 3166-1 alpha-3. */
5159
+ country: string;
5160
+ countryEditable?: boolean | null;
5161
+ }
5162
+ export interface SimpleEntityRegistrationTypeInput {
5163
+ /** Omit to let the server mint an id for a new entry. */
5164
+ id?: string | null;
5165
+ /** 1–80 characters. */
5166
+ label: string;
5167
+ /** Max 80 characters. */
5168
+ entityType?: string | null;
5169
+ /** ISO 3166-1 alpha-3. */
5170
+ country: string;
5171
+ visibleFields?: SimpleEntityFormField[] | null;
5172
+ requiredFields?: SimpleEntityFormField[] | null;
5173
+ }
5174
+ export interface SimpleCustomerPresetInput {
5175
+ /** Omit to let the server mint an id for a new preset. */
5176
+ id?: string | null;
5177
+ /** 1–80 characters. */
5178
+ label: string;
5179
+ /** Must be in the `customer.tags` catalogue. */
5180
+ tags: TagValueInput[];
5181
+ assignedToUserIds: string[];
5182
+ assignedToTeamIds: string[];
5183
+ }
5184
+ /** Fields shared by both simple-creation inputs. A write fully replaces the setup. */
5185
+ export interface UpdateSimpleCreationPreferencesBaseInput {
5186
+ enabled: boolean;
5187
+ openByDefault: boolean;
5188
+ externalIdStrategy: SimpleCustomerExternalIdStrategy;
5189
+ /** At most 50. */
5190
+ presets: SimpleCustomerPresetInput[];
5191
+ defaultPresetId?: string | null;
5192
+ /** Defaults to false. */
5193
+ requirePreset?: boolean | null;
5194
+ allowTags: boolean;
5195
+ allowAssignment: boolean;
5196
+ /** Defaults to false. */
5197
+ assignCreator?: boolean | null;
5198
+ }
5199
+ export interface UpdateSimpleCustomerCreationPreferencesInput extends UpdateSimpleCreationPreferencesBaseInput {
5200
+ /** At most 50. */
5201
+ documentTypes: SimpleCustomerDocumentTypeInput[];
5202
+ defaultDocumentTypeId?: string | null;
5203
+ }
5204
+ export interface SimpleEntityStakeholderPreferencesInput {
5205
+ /** At most 50. */
5206
+ documentTypes: SimpleCustomerDocumentTypeInput[];
5207
+ defaultDocumentTypeId?: string | null;
5208
+ collectOwnership: boolean;
5209
+ collectNationality: boolean;
5210
+ collectDateOfBirth: boolean;
5211
+ }
5212
+ export interface UpdateSimpleEntityCreationPreferencesInput extends UpdateSimpleCreationPreferencesBaseInput {
5213
+ /** At most 50. */
5214
+ registrationTypes: SimpleEntityRegistrationTypeInput[];
5215
+ defaultRegistrationTypeId?: string | null;
5216
+ /** Omitted = the defaults. */
5217
+ stakeholders?: SimpleEntityStakeholderPreferencesInput | null;
5218
+ }
4328
5219
  //# sourceMappingURL=types.d.ts.map