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