Référence du SDK
Cette référence est générée depuis le code source du SDK : ses descriptions reprennent les commentaires du code, en anglais, comme les noms qu’elles décrivent. Le guide du SDK les explique en français.
Interfaces
Section intitulée « Interfaces »LexOptiClient
Section intitulée « LexOptiClient »The client: one method per operation, grouped by resource
(lexopti.clients.create, lexopti.checks.get…), typed from the API
contract. An interface, so that it is named wherever it appears.
JsonifiedClient<ContractRouterClient<typeofpublicContract>>
Propriétés
Section intitulée « Propriétés »alerts: object;get: Client<Record<never, never>, { id: string;}, { case_id: string | null; change: string | null; client_id: string; created_at: string; detail: string | null; entity_id: string; id: string; level: "simplified" | "standard" | "enhanced"; review_notes: string | null; reviewed_at: string | null; source: | "international_sanctions" | "eu_sanctions" | "french_asset_freezes" | "politically_exposed_persons" | "high_risk_countries" | "bodacc_announcements" | "bodacc_insolvency" | "company_register" | "adverse_media" | null; source_name: string; status: "pending" | "reviewed" | "dismissed" | "confirmed"; subject: string | null; url: string | null;}, Error>;list: Client<Record<never, never>, { client_id?: string; client_ids?: string; cursor?: string; limit?: number; status?: "pending" | "reviewed" | "dismissed" | "confirmed";}, { data: object[]; has_more: boolean; next_cursor: string | null;}, Error>;update: Client<Record<never, never>, { id: string; notes?: string; status: "reviewed" | "dismissed" | "confirmed";}, { case_id: string | null; change: string | null; client_id: string; created_at: string; detail: string | null; entity_id: string; id: string; level: "simplified" | "standard" | "enhanced"; review_notes: string | null; reviewed_at: string | null; source: | "international_sanctions" | "eu_sanctions" | "french_asset_freezes" | "politically_exposed_persons" | "high_risk_countries" | "bodacc_announcements" | "bodacc_insolvency" | "company_register" | "adverse_media" | null; source_name: string; status: "pending" | "reviewed" | "dismissed" | "confirmed"; subject: string | null; url: string | null;}, Error>;Hérité de
Section intitulée « Hérité de »JsonifiedClient.alerts
cases: object;create: Client<Record<never, never>, { clients: object[]; external_ref?: string; label?: string; launch_checks?: boolean; parties?: ( | { address?: { city?: string; country?: string; line?: string; postal_code?: string; }; external_ref?: string; person: { birth_city?: string; birth_country?: string; birth_date?: string; first_name: string; last_name: string; nationalities?: string[]; usage_name?: string; }; role: | "demandeur" | "defendeur" | "appelant" | "intime" | "intervenant" | "partie_adverse" | "vendeur" | "acquereur" | "cedant" | "cessionnaire" | "contrepartie" | "bailleur" | "locataire" | "preteur" | "emprunteur" | "caution" | "tiers_payeur" | "donateur" | "donataire" | "heritier_legataire" | "mandant" | "mandataire" | "representant_legal" | "intermediaire" | "associe" | "constituant" | "fiduciaire" | "beneficiaire" | "tiers" | "autre"; type: "person"; } | { address?: { city?: string; country?: string; line?: string; postal_code?: string; }; company: { legal_form?: string; name: string; rcs?: string; registration_country?: string; siren?: string; siret?: string; }; external_ref?: string; role: | "demandeur" | "defendeur" | "appelant" | "intime" | "intervenant" | "partie_adverse" | "vendeur" | "acquereur" | "cedant" | "cessionnaire" | "contrepartie" | "bailleur" | "locataire" | "preteur" | "emprunteur" | "caution" | "tiers_payeur" | "donateur" | "donataire" | "heritier_legataire" | "mandant" | "mandataire" | "representant_legal" | "intermediaire" | "associe" | "constituant" | "fiduciaire" | "beneficiaire" | "tiers" | "autre"; type: "company"; })[]; type_label?: string; types: string[];}, { analyses_launched: boolean; classification_state: "to_complete" | "in_progress" | "validated" | "revalidate"; client_id: string | null; client_ids: string[]; clients: object[]; created_at: string; credits_charged: number; external_ref: string | null; has_pending_alert: boolean; id: string; label: string | null; monitoring_enabled: boolean; parties: object[]; pending_alert_count: number; risk_level: "simplified" | "standard" | "enhanced" | null; status: "pending" | "completed" | "failed" | "running"; transaction_amount: string | null; type: string | null; type_label: string | null; types: string[]; updated_at: string; vigilance_level: "simplified" | "standard" | "enhanced" | null;}, Error>;deleteExternalRef
Section intitulée « deleteExternalRef »deleteExternalRef: Client<Record<never, never>, { id: string;}, { classification_state: "to_complete" | "in_progress" | "validated" | "revalidate"; client_id: string | null; client_ids: string[]; clients: object[]; created_at: string; external_ref: string | null; has_pending_alert: boolean; id: string; label: string | null; monitoring_enabled: boolean; parties: object[]; pending_alert_count: number; risk_level: "simplified" | "standard" | "enhanced" | null; status: "pending" | "completed" | "failed" | "running"; transaction_amount: string | null; type: string | null; type_label: string | null; types: string[]; updated_at: string; vigilance_level: "simplified" | "standard" | "enhanced" | null;}, Error>;deletePartyExternalRef
Section intitulée « deletePartyExternalRef »deletePartyExternalRef: Client<Record<never, never>, { id: string; party_id: string;}, { classification_state: "to_complete" | "in_progress" | "validated" | "revalidate"; client_id: string | null; client_ids: string[]; clients: object[]; created_at: string; external_ref: string | null; has_pending_alert: boolean; id: string; label: string | null; monitoring_enabled: boolean; parties: object[]; pending_alert_count: number; risk_level: "simplified" | "standard" | "enhanced" | null; status: "pending" | "completed" | "failed" | "running"; transaction_amount: string | null; type: string | null; type_label: string | null; types: string[]; updated_at: string; vigilance_level: "simplified" | "standard" | "enhanced" | null;}, Error>;get: Client<Record<never, never>, { id: string;}, { classification_state: "to_complete" | "in_progress" | "validated" | "revalidate"; client_id: string | null; client_ids: string[]; clients: object[]; created_at: string; external_ref: string | null; has_pending_alert: boolean; id: string; label: string | null; monitoring_enabled: boolean; parties: object[]; pending_alert_count: number; risk_level: "simplified" | "standard" | "enhanced" | null; status: "pending" | "completed" | "failed" | "running"; transaction_amount: string | null; type: string | null; type_label: string | null; types: string[]; updated_at: string; vigilance_level: "simplified" | "standard" | "enhanced" | null;}, Error>;getClassification
Section intitulée « getClassification »getClassification: Client<Record<never, never>, { id: string;}, { answers: object[]; case_id: string | null; client_id: string | null; excluded_axes: "axe5"[]; level: "simplified" | "standard" | "enhanced" | null; missing_answers: { count: number; question_ids: string[]; }; policy: { id: string; version: number; }; score: number | null; state: "to_complete" | "in_progress" | "validated" | "revalidate"; subject: "client" | "case"; validated_at: string | null; validated_by: | { channel: "app" | "embed" | "api" | "mcp" | null; user_id: string | null; } | null;}, Error>;getReport
Section intitulée « getReport »getReport: Client<Record<never, never>, { id: string;}, { case_id: string; content_type: "application/pdf"; download_url: string; excluded_axes: "axe5"[]; expires_at: string; generated_at: string; language: "fr" | "en"; sha256: string; version: string;}, Error>;launchChecks
Section intitulée « launchChecks »launchChecks: Client<Record<never, never>, { id: string;}, { checks: object[]; classification_state: "to_complete" | "in_progress" | "validated" | "revalidate"; client_id: string | null; client_ids: string[]; clients: object[]; created_at: string; external_ref: string | null; has_pending_alert: boolean; id: string; label: string | null; monitoring_enabled: boolean; parties: object[]; pending_alert_count: number; risk_level: "simplified" | "standard" | "enhanced" | null; status: "pending" | "completed" | "failed" | "running"; transaction_amount: string | null; type: string | null; type_label: string | null; types: string[]; updated_at: string; vigilance_level: "simplified" | "standard" | "enhanced" | null;}, Error>;list: Client<Record<never, never>, { client_id?: string; cursor?: string; external_ref?: string; ids?: string; limit?: number; party_external_ref?: string;}, { data: object[]; has_more: boolean; next_cursor: string | null;}, Error>;listDocuments
Section intitulée « listDocuments »listDocuments: Client<Record<never, never>, { cursor?: string; id: string; limit?: number;}, { data: object[]; has_more: boolean; next_cursor: string | null;}, Error>;preview: Client<Record<never, never>, { clients: object[]; external_ref?: string; label?: string; launch_checks?: boolean; parties?: ( | { address?: { city?: string; country?: string; line?: string; postal_code?: string; }; external_ref?: string; person: { birth_city?: string; birth_country?: string; birth_date?: string; first_name: string; last_name: string; nationalities?: string[]; usage_name?: string; }; role: | "demandeur" | "defendeur" | "appelant" | "intime" | "intervenant" | "partie_adverse" | "vendeur" | "acquereur" | "cedant" | "cessionnaire" | "contrepartie" | "bailleur" | "locataire" | "preteur" | "emprunteur" | "caution" | "tiers_payeur" | "donateur" | "donataire" | "heritier_legataire" | "mandant" | "mandataire" | "representant_legal" | "intermediaire" | "associe" | "constituant" | "fiduciaire" | "beneficiaire" | "tiers" | "autre"; type: "person"; } | { address?: { city?: string; country?: string; line?: string; postal_code?: string; }; company: { legal_form?: string; name: string; rcs?: string; registration_country?: string; siren?: string; siret?: string; }; external_ref?: string; role: | "demandeur" | "defendeur" | "appelant" | "intime" | "intervenant" | "partie_adverse" | "vendeur" | "acquereur" | "cedant" | "cessionnaire" | "contrepartie" | "bailleur" | "locataire" | "preteur" | "emprunteur" | "caution" | "tiers_payeur" | "donateur" | "donataire" | "heritier_legataire" | "mandant" | "mandataire" | "representant_legal" | "intermediaire" | "associe" | "constituant" | "fiduciaire" | "beneficiaire" | "tiers" | "autre"; type: "company"; })[]; type_label?: string; types: string[];}, { credits: { balance: number; needed: number; }; entities: number; livemode: boolean; sufficient_credits: boolean; tranches: number;}, Error>;setExternalRef
Section intitulée « setExternalRef »setExternalRef: Client<Record<never, never>, { external_ref: string; id: string;}, { classification_state: "to_complete" | "in_progress" | "validated" | "revalidate"; client_id: string | null; client_ids: string[]; clients: object[]; created_at: string; external_ref: string | null; has_pending_alert: boolean; id: string; label: string | null; monitoring_enabled: boolean; parties: object[]; pending_alert_count: number; risk_level: "simplified" | "standard" | "enhanced" | null; status: "pending" | "completed" | "failed" | "running"; transaction_amount: string | null; type: string | null; type_label: string | null; types: string[]; updated_at: string; vigilance_level: "simplified" | "standard" | "enhanced" | null;}, Error>;setPartyExternalRef
Section intitulée « setPartyExternalRef »setPartyExternalRef: Client<Record<never, never>, { external_ref: string; id: string; party_id: string;}, { classification_state: "to_complete" | "in_progress" | "validated" | "revalidate"; client_id: string | null; client_ids: string[]; clients: object[]; created_at: string; external_ref: string | null; has_pending_alert: boolean; id: string; label: string | null; monitoring_enabled: boolean; parties: object[]; pending_alert_count: number; risk_level: "simplified" | "standard" | "enhanced" | null; status: "pending" | "completed" | "failed" | "running"; transaction_amount: string | null; type: string | null; type_label: string | null; types: string[]; updated_at: string; vigilance_level: "simplified" | "standard" | "enhanced" | null;}, Error>;Hérité de
Section intitulée « Hérité de »JsonifiedClient.cases
checks: object;create: Client<Record<never, never>, { case_id?: string; client_id: string;}, { client_id: string; completed_at: string | null; created_at: string; id: string; sources: object[]; status: "completed" | "failed" | "running";}, Error>;get: Client<Record<never, never>, { id: string;}, { client_id: string; completed_at: string | null; created_at: string; id: string; sources: object[]; status: "completed" | "failed" | "running";}, Error>;list: Client<Record<never, never>, { client_id?: string; cursor?: string; limit?: number;}, { data: object[]; has_more: boolean; next_cursor: string | null;}, Error>;Hérité de
Section intitulée « Hérité de »JsonifiedClient.checks
clients: object;create: Client<Record<never, never>, | { address?: { city?: string; country?: string; line?: string; postal_code?: string; }; external_ref?: string; person: { birth_city?: string; birth_country?: string; birth_date?: string; first_name: string; last_name: string; nationalities?: string[]; usage_name?: string; }; type: "person";} | { address?: { city?: string; country?: string; line?: string; postal_code?: string; }; company: { legal_form?: string; name: string; rcs?: string; registration_country?: string; siren?: string; siret?: string; }; external_ref?: string; type: "company";}, { address: { city: string | null; country: string | null; line: string | null; postal_code: string | null; }; cases?: { data: object[]; has_more: boolean; }; classification_state?: "to_complete" | "in_progress" | "validated" | "revalidate"; company: | { legal_form: string | null; name: string | null; rcs: string | null; registration_country: string | null; siren: string | null; siret: string | null; } | null; created_at: string; external_ref: string | null; has_pending_alert: boolean; id: string; last_check?: | { completed_at: string | null; created_at: string; id: string; status: "completed" | "failed" | "running"; } | null; monitoring_enabled: boolean; name: string; open_alerts_count?: number; person: | { birth_city: string | null; birth_country: string | null; birth_date: string | null; first_name: string | null; last_name: string | null; nationalities: string[]; usage_name: string | null; } | null; preliminary_screening: | { checked_at: string | null; last_error: string | null; match_count: number | null; outcome: "no_match" | "possible_match" | null; pending: boolean; screened_at: string | null; status: "pending" | "completed" | "failed" | "unavailable"; } | null; risk_level: "simplified" | "standard" | "enhanced" | null; type: "person" | "company"; updated_at: string; vigilance_level: "simplified" | "standard" | "enhanced" | null;}, Error>;deleteExternalRef
Section intitulée « deleteExternalRef »deleteExternalRef: Client<Record<never, never>, { id: string;}, { address: { city: string | null; country: string | null; line: string | null; postal_code: string | null; }; cases?: { data: object[]; has_more: boolean; }; classification_state?: "to_complete" | "in_progress" | "validated" | "revalidate"; company: | { legal_form: string | null; name: string | null; rcs: string | null; registration_country: string | null; siren: string | null; siret: string | null; } | null; created_at: string; external_ref: string | null; has_pending_alert: boolean; id: string; last_check?: | { completed_at: string | null; created_at: string; id: string; status: "completed" | "failed" | "running"; } | null; monitoring_enabled: boolean; name: string; open_alerts_count?: number; person: | { birth_city: string | null; birth_country: string | null; birth_date: string | null; first_name: string | null; last_name: string | null; nationalities: string[]; usage_name: string | null; } | null; preliminary_screening: | { checked_at: string | null; last_error: string | null; match_count: number | null; outcome: "no_match" | "possible_match" | null; pending: boolean; screened_at: string | null; status: "pending" | "completed" | "failed" | "unavailable"; } | null; risk_level: "simplified" | "standard" | "enhanced" | null; type: "person" | "company"; updated_at: string; vigilance_level: "simplified" | "standard" | "enhanced" | null;}, Error>;get: Client<Record<never, never>, { expand?: ("cases" | "last_check" | "open_alerts_count" | "classification_state")[]; id: string;}, { address: { city: string | null; country: string | null; line: string | null; postal_code: string | null; }; cases?: { data: object[]; has_more: boolean; }; classification_state?: "to_complete" | "in_progress" | "validated" | "revalidate"; company: | { legal_form: string | null; name: string | null; rcs: string | null; registration_country: string | null; siren: string | null; siret: string | null; } | null; created_at: string; external_ref: string | null; has_pending_alert: boolean; id: string; last_check?: | { completed_at: string | null; created_at: string; id: string; status: "completed" | "failed" | "running"; } | null; monitoring_enabled: boolean; name: string; open_alerts_count?: number; person: | { birth_city: string | null; birth_country: string | null; birth_date: string | null; first_name: string | null; last_name: string | null; nationalities: string[]; usage_name: string | null; } | null; preliminary_screening: | { checked_at: string | null; last_error: string | null; match_count: number | null; outcome: "no_match" | "possible_match" | null; pending: boolean; screened_at: string | null; status: "pending" | "completed" | "failed" | "unavailable"; } | null; risk_level: "simplified" | "standard" | "enhanced" | null; type: "person" | "company"; updated_at: string; vigilance_level: "simplified" | "standard" | "enhanced" | null;}, Error>;getClassification
Section intitulée « getClassification »getClassification: Client<Record<never, never>, { id: string;}, { answers: object[]; case_id: string | null; client_id: string | null; excluded_axes: "axe5"[]; level: "simplified" | "standard" | "enhanced" | null; missing_answers: { count: number; question_ids: string[]; }; policy: { id: string; version: number; }; score: number | null; state: "to_complete" | "in_progress" | "validated" | "revalidate"; subject: "client" | "case"; validated_at: string | null; validated_by: | { channel: "app" | "embed" | "api" | "mcp" | null; user_id: string | null; } | null;}, Error>;getPreliminaryScreening
Section intitulée « getPreliminaryScreening »getPreliminaryScreening: Client<Record<never, never>, { id: string;}, { client_id: string; current: | { checked_at: string | null; error_code: string | null; id: string; lists: object[]; matches: object[]; outcome: "no_match" | "possible_match" | null; requested_at: string; screened_at: string | null; status: "pending" | "completed" | "failed" | "unavailable"; trigger: "initial" | "identity_change" | "requested" | "list_update"; } | null; latest: { checked_at: string | null; error_code: string | null; id: string; lists: object[]; matches: object[]; outcome: "no_match" | "possible_match" | null; requested_at: string; screened_at: string | null; status: "pending" | "completed" | "failed" | "unavailable"; trigger: "initial" | "identity_change" | "requested" | "list_update"; };}, Error>;list: Client<Record<never, never>, { cursor?: string; expand?: ("cases" | "last_check" | "open_alerts_count" | "classification_state")[]; external_ref?: string; ids?: string; limit?: number;}, { data: object[]; has_more: boolean; next_cursor: string | null;}, Error>;requestPreliminaryScreening
Section intitulée « requestPreliminaryScreening »requestPreliminaryScreening: Client<Record<never, never>, { id: string;}, { client_id: string; current: | { checked_at: string | null; error_code: string | null; id: string; lists: object[]; matches: object[]; outcome: "no_match" | "possible_match" | null; requested_at: string; screened_at: string | null; status: "pending" | "completed" | "failed" | "unavailable"; trigger: "initial" | "identity_change" | "requested" | "list_update"; } | null; latest: { checked_at: string | null; error_code: string | null; id: string; lists: object[]; matches: object[]; outcome: "no_match" | "possible_match" | null; requested_at: string; screened_at: string | null; status: "pending" | "completed" | "failed" | "unavailable"; trigger: "initial" | "identity_change" | "requested" | "list_update"; };}, Error>;setExternalRef
Section intitulée « setExternalRef »setExternalRef: Client<Record<never, never>, { external_ref: string; id: string;}, { address: { city: string | null; country: string | null; line: string | null; postal_code: string | null; }; cases?: { data: object[]; has_more: boolean; }; classification_state?: "to_complete" | "in_progress" | "validated" | "revalidate"; company: | { legal_form: string | null; name: string | null; rcs: string | null; registration_country: string | null; siren: string | null; siret: string | null; } | null; created_at: string; external_ref: string | null; has_pending_alert: boolean; id: string; last_check?: | { completed_at: string | null; created_at: string; id: string; status: "completed" | "failed" | "running"; } | null; monitoring_enabled: boolean; name: string; open_alerts_count?: number; person: | { birth_city: string | null; birth_country: string | null; birth_date: string | null; first_name: string | null; last_name: string | null; nationalities: string[]; usage_name: string | null; } | null; preliminary_screening: | { checked_at: string | null; last_error: string | null; match_count: number | null; outcome: "no_match" | "possible_match" | null; pending: boolean; screened_at: string | null; status: "pending" | "completed" | "failed" | "unavailable"; } | null; risk_level: "simplified" | "standard" | "enhanced" | null; type: "person" | "company"; updated_at: string; vigilance_level: "simplified" | "standard" | "enhanced" | null;}, Error>;update: Client<Record<never, never>, { address?: { city?: string | null; country?: string | null; line?: string | null; postal_code?: string | null; }; company?: { legal_form?: string | null; name?: string; rcs?: string | null; registration_country?: string | null; siren?: string | null; siret?: string | null; }; id: string; person?: { birth_city?: string | null; birth_country?: string | null; birth_date?: string | null; first_name?: string; last_name?: string; nationalities?: string[] | null; usage_name?: string | null; };}, { address: { city: string | null; country: string | null; line: string | null; postal_code: string | null; }; cases?: { data: object[]; has_more: boolean; }; classification_state?: "to_complete" | "in_progress" | "validated" | "revalidate"; company: | { legal_form: string | null; name: string | null; rcs: string | null; registration_country: string | null; siren: string | null; siret: string | null; } | null; created_at: string; external_ref: string | null; has_pending_alert: boolean; id: string; last_check?: | { completed_at: string | null; created_at: string; id: string; status: "completed" | "failed" | "running"; } | null; monitoring_enabled: boolean; name: string; open_alerts_count?: number; person: | { birth_city: string | null; birth_country: string | null; birth_date: string | null; first_name: string | null; last_name: string | null; nationalities: string[]; usage_name: string | null; } | null; preliminary_screening: | { checked_at: string | null; last_error: string | null; match_count: number | null; outcome: "no_match" | "possible_match" | null; pending: boolean; screened_at: string | null; status: "pending" | "completed" | "failed" | "unavailable"; } | null; risk_level: "simplified" | "standard" | "enhanced" | null; type: "person" | "company"; updated_at: string; vigilance_level: "simplified" | "standard" | "enhanced" | null;}, Error>;Hérité de
Section intitulée « Hérité de »JsonifiedClient.clients
deepLinks
Section intitulée « deepLinks »deepLinks: object;create: Client<Record<never, never>, { case_id?: string; client_id?: string;}, { expires_at: string; url: string;}, Error>;Hérité de
Section intitulée « Hérité de »JsonifiedClient.deepLinks
embedSessions
Section intitulée « embedSessions »embedSessions: object;create: Client<Record<never, never>, { code_challenge: string; code_challenge_method: "S256"; component: | "cases" | "clients" | "client" | "case" | "app" | "new-client" | "new-case" | "classification"; features?: string[]; origin: string;}, { code: string; expires_at: string; integration: string;}, Error>;Hérité de
Section intitulée « Hérité de »JsonifiedClient.embedSessions
enrolments
Section intitulée « enrolments »enrolments: object;cancel: Client<Record<never, never>, { id: string;}, { id: string; status: "cancelled";}, Error>;create: Client<Record<never, never>, { email: string; external_ref?: string; first_name?: string; last_name?: string; locale?: "fr" | "en"; role?: "readonly" | "member";}, { activated_at: string | null; connect_hint: string; created_at: string; email: string; enrolled_by: string | null; expires_at: string; external_ref: string | null; first_name: string | null; id: string; last_name: string | null; member_id: string | null; role: "readonly" | "member"; status: "pending" | "activated" | "expired" | "cancelled";}, Error>;list: Client<Record<never, never>, { cursor?: string; limit?: number; status?: "pending" | "activated" | "expired" | "cancelled";}, { data: object[]; has_more: boolean; next_cursor: string | null;}, Error>;Hérité de
Section intitulée « Hérité de »JsonifiedClient.enrolments
events: object;list: Client<Record<never, never>, { after?: string; cursor?: string; limit?: number; type?: | "check.completed" | "check.failed" | "client.created" | "client.updated" | "client.vigilance_level_changed" | "client.risk_level_changed" | "client.preliminary_screening_completed" | "classification.validated" | "case.created" | "case.updated" | "case.risk_level_changed" | "report.generated" | "alert.created" | "alert.resolved" | "decision.pending" | "quota.exhausted" | "subscription.inactive" | "access.revoked" | "member.enrolled" | "member.joined";}, { data: object[]; has_more: boolean; next_cursor: string | null;}, Error>;Hérité de
Section intitulée « Hérité de »JsonifiedClient.events
firms: object;create: Client<Record<never, never>, { external_ref?: string; locale?: "fr" | "en"; manager: { email: string; first_name?: string; last_name?: string; }; name: string; profession: "lawyer" | "real_estate" | "notary" | "accountant" | "other_regulated"; siren: string;}, { activated_at: string | null; claim_url: string | null; claim_url_expires_at: string | null; claimed_at: string | null; created_at: string; expires_at: string; external_ref: string | null; id: string; name: string; organization_id: string | null; profession: "lawyer" | "real_estate" | "notary" | "accountant" | "other_regulated"; siren: string; status: "pending" | "expired" | "claimed" | "voided";}, Error>;createClaimLink
Section intitulée « createClaimLink »createClaimLink: Client<Record<never, never>, { id: string;}, { activated_at: string | null; claim_url: string | null; claim_url_expires_at: string | null; claimed_at: string | null; created_at: string; expires_at: string; external_ref: string | null; id: string; name: string; organization_id: string | null; profession: "lawyer" | "real_estate" | "notary" | "accountant" | "other_regulated"; siren: string; status: "pending" | "expired" | "claimed" | "voided";}, Error>;get: Client<Record<never, never>, { id: string;}, { activated_at: string | null; claim_url: string | null; claim_url_expires_at: string | null; claimed_at: string | null; created_at: string; expires_at: string; external_ref: string | null; id: string; name: string; organization_id: string | null; profession: "lawyer" | "real_estate" | "notary" | "accountant" | "other_regulated"; siren: string; status: "pending" | "expired" | "claimed" | "voided";}, Error>;Hérité de
Section intitulée « Hérité de »JsonifiedClient.firms
members: object;list: Client<Record<never, never>, { cursor?: string; limit?: number;}, { data: object[]; has_more: boolean; next_cursor: string | null;}, Error>;Hérité de
Section intitulée « Hérité de »JsonifiedClient.members
organization
Section intitulée « organization »organization: object;get: Client<Record<never, never>, unknown, { id: string; integration: { client_id: string; delegated_mode: boolean; }; member: { role: string; user_id: string; }; name: string; sandbox: boolean;}, Error>;Hérité de
Section intitulée « Hérité de »JsonifiedClient.organization
sandboxTriggers
Section intitulée « sandboxTriggers »sandboxTriggers: object;create: Client<Record<never, never>, { client_id?: string; type: | "vigilance_alert" | "vigilance_level_change" | "quota_exhausted" | "quota_restored" | "access_revoked";}, { client_id: string | null; events: string[]; livemode: false; type: | "vigilance_alert" | "vigilance_level_change" | "quota_exhausted" | "quota_restored" | "access_revoked"; vigilance_level: "simplified" | "standard" | "enhanced" | null;}, Error>;Hérité de
Section intitulée « Hérité de »JsonifiedClient.sandboxTriggers
usage: object;get: Client<Record<never, never>, unknown, { credits: { balance: number; frozen: number; low_balance_threshold: number; }; dossiers: { active: number; paused: number; renewal_credits: number; renewals_due: number; }; read_only: boolean; subscription_active: boolean; unit: "credit";}, Error>;Hérité de
Section intitulée « Hérité de »JsonifiedClient.usage
webhookEndpoints
Section intitulée « webhookEndpoints »webhookEndpoints: object;create: Client<Record<never, never>, { description?: string; event_types: ( | "check.completed" | "check.failed" | "client.created" | "client.updated" | "client.vigilance_level_changed" | "client.risk_level_changed" | "client.preliminary_screening_completed" | "classification.validated" | "case.created" | "case.updated" | "case.risk_level_changed" | "report.generated" | "alert.created" | "alert.resolved" | "decision.pending" | "quota.exhausted" | "subscription.inactive" | "access.revoked" | "member.enrolled" | "member.joined")[]; url: string;}, { created_at: string; description: string | null; disabled_reason: "member" | "access_revoked" | "failing" | null; event_types: ( | "check.completed" | "check.failed" | "client.created" | "client.updated" | "client.vigilance_level_changed" | "client.risk_level_changed" | "client.preliminary_screening_completed" | "classification.validated" | "case.created" | "case.updated" | "case.risk_level_changed" | "report.generated" | "alert.created" | "alert.resolved" | "decision.pending" | "quota.exhausted" | "subscription.inactive" | "access.revoked" | "member.enrolled" | "member.joined")[]; id: string; secret: string; status: "enabled" | "disabled"; updated_at: string; url: string;}, Error>;delete: Client<Record<never, never>, { id: string;}, { deleted: true; id: string;}, Error>;get: Client<Record<never, never>, { id: string;}, { created_at: string; description: string | null; disabled_reason: "member" | "access_revoked" | "failing" | null; event_types: ( | "check.completed" | "check.failed" | "client.created" | "client.updated" | "client.vigilance_level_changed" | "client.risk_level_changed" | "client.preliminary_screening_completed" | "classification.validated" | "case.created" | "case.updated" | "case.risk_level_changed" | "report.generated" | "alert.created" | "alert.resolved" | "decision.pending" | "quota.exhausted" | "subscription.inactive" | "access.revoked" | "member.enrolled" | "member.joined")[]; id: string; status: "enabled" | "disabled"; updated_at: string; url: string;}, Error>;list: Client<Record<never, never>, { cursor?: string; limit?: number;}, { data: object[]; has_more: boolean; next_cursor: string | null;}, Error>;listDeliveries
Section intitulée « listDeliveries »listDeliveries: Client<Record<never, never>, { cursor?: string; id: string; limit?: number;}, { data: object[]; has_more: boolean; next_cursor: string | null;}, Error>;replayDelivery
Section intitulée « replayDelivery »replayDelivery: Client<Record<never, never>, { delivery_id: string; id: string;}, { attempts: number; completed_at: string | null; created_at: string; event_id: string | null; id: string; last_attempt_at: string | null; last_error: string | null; last_response_status: number | null; next_attempt_at: string | null; replay_of: string | null; status: "pending" | "failed" | "cancelled" | "succeeded"; type: string;}, Error>;rotateSecret
Section intitulée « rotateSecret »rotateSecret: Client<Record<never, never>, { id: string;}, { secret: string;}, Error>;test: Client<Record<never, never>, { id: string;}, { attempts: number; completed_at: string | null; created_at: string; event_id: string | null; id: string; last_attempt_at: string | null; last_error: string | null; last_response_status: number | null; next_attempt_at: string | null; replay_of: string | null; status: "pending" | "failed" | "cancelled" | "succeeded"; type: string;}, Error>;update: Client<Record<never, never>, { description?: string | null; enabled?: boolean; event_types?: ( | "check.completed" | "check.failed" | "client.created" | "client.updated" | "client.vigilance_level_changed" | "client.risk_level_changed" | "client.preliminary_screening_completed" | "classification.validated" | "case.created" | "case.updated" | "case.risk_level_changed" | "report.generated" | "alert.created" | "alert.resolved" | "decision.pending" | "quota.exhausted" | "subscription.inactive" | "access.revoked" | "member.enrolled" | "member.joined")[]; id: string; url?: string;}, { created_at: string; description: string | null; disabled_reason: "member" | "access_revoked" | "failing" | null; event_types: ( | "check.completed" | "check.failed" | "client.created" | "client.updated" | "client.vigilance_level_changed" | "client.risk_level_changed" | "client.preliminary_screening_completed" | "classification.validated" | "case.created" | "case.updated" | "case.risk_level_changed" | "report.generated" | "alert.created" | "alert.resolved" | "decision.pending" | "quota.exhausted" | "subscription.inactive" | "access.revoked" | "member.enrolled" | "member.joined")[]; id: string; status: "enabled" | "disabled"; updated_at: string; url: string;}, Error>;Hérité de
Section intitulée « Hérité de »JsonifiedClient.webhookEndpoints
LexOptiClientOptions
Section intitulée « LexOptiClientOptions »Propriétés
Section intitulée « Propriétés »accessToken
Section intitulée « accessToken »accessToken: () => string | Promise<string>;Returns the OAuth access token for each request: refresh it there when it expires (access tokens live 15 minutes).
Retourne
Section intitulée « Retourne »string | Promise<string>
baseUrl?
Section intitulée « baseUrl? »baseUrl?: string;https://app.lexopti.com/v1 unless given (sandbox, tests).
fetch?: (request) => Promise<Response>;Replaces the global fetch (tests, proxies).
Paramètres
Section intitulée « Paramètres »| Paramètre | Type |
|---|---|
request |
Request |
Retourne
Section intitulée « Retourne »Promise<Response>
locale?: "fr" | "en";fr for French service messages; English otherwise.
maxRetries?
Section intitulée « maxRetries? »maxRetries?: number;Retries of a failed request, 2 by default. Reads, deletions and
idempotent POSTs run again after a network error, a 429 or a 500, 502,
503 or 504; any other operation only after a 429 with Retry-After.
maxRetryWait?
Section intitulée « maxRetryWait? »maxRetryWait?: number;The longest Retry-After the client waits, in milliseconds (60 000 by
default): an answer asking for longer is handed back to the caller
rather than retried early.
sleep?: (milliseconds) => Promise<void>;Waits between retries; replaceable in tests.
Paramètres
Section intitulée « Paramètres »| Paramètre | Type |
|---|---|
milliseconds |
number |
Retourne
Section intitulée « Retourne »Promise<void>
Alias de type
Section intitulée « Alias de type »PartnerHint
Section intitulée « PartnerHint »type PartnerHint = z.infer<typeof partnerHintSchema>;PartnerHintInput
Section intitulée « PartnerHintInput »type PartnerHintInput = z.input<typeof partnerHintSchema>;What the partner writes: the same shape, before normalisation.
ProblemDetails
Section intitulée « ProblemDetails »type ProblemDetails = z.infer<typeof readProblemSchema>;The problem details of a failed call, as problemOf returns them.
WebhookEvent
Section intitulée « WebhookEvent »type WebhookEvent = z.infer<typeof deliverySchema> & object;A verified delivery: one of the events, the endpoint’s test
(webhook.test, whose data names the endpoint), or an event type
newer than this SDK (its type as sent). Its id is the webhook-id
header.
Déclaration de type
Section intitulée « Déclaration de type »id: string;WebhookEventType
Section intitulée « WebhookEventType »type WebhookEventType = | IntegrationEventType | typeof WEBHOOK_TEST_EVENT| string & Record<never, never>;A delivery’s type: one this SDK knows (the catalog’s, webhook.test), or
a newer one, kept as its string. LexOpti adds event types without a new
version: a delivery of a type this build does not know still verifies,
for the partner to ignore (or handle once it updates).
Variables
Section intitulée « Variables »DEFAULT_BASE_URL
Section intitulée « DEFAULT_BASE_URL »const DEFAULT_BASE_URL: "https://app.lexopti.com/v1" = "https://app.lexopti.com/v1";The production API.
PARTNER_HINT_MAX_BYTES
Section intitulée « PARTNER_HINT_MAX_BYTES »const PARTNER_HINT_MAX_BYTES: 2048 = 2048;The encoded hint’s size limit, in bytes: far above any real organization.
PARTNER_HINT_PARAM
Section intitulée « PARTNER_HINT_PARAM »const PARTNER_HINT_PARAM: "lexopti_hint" = "lexopti_hint";The authorization request parameter that carries the hint.
WEBHOOK_TEST_EVENT
Section intitulée « WEBHOOK_TEST_EVENT »const WEBHOOK_TEST_EVENT: "webhook.test" = "webhook.test";What POST /v1/webhook-endpoints/{id}/test delivers, signed like the others.
webhooks
Section intitulée « webhooks »const webhooks: object;Déclaration de type
Section intitulée « Déclaration de type »verify: (payload, headers, secret) => WebhookEvent = verifyWebhook;Verifies a LexOpti webhook (Standard Webhooks) and returns its event:
pass the raw body, the request headers and the endpoint secret
(whsec_…). Throws when the signature or the timestamp is wrong. The
event’s id is the webhook-id header: deduplicate on it.
Paramètres
Section intitulée « Paramètres »| Paramètre | Type |
|---|---|
payload |
string |
headers |
Headers | Record<string, string> |
secret |
string |
Retourne
Section intitulée « Retourne »Fonctions
Section intitulée « Fonctions »createLexOptiClient()
Section intitulée « createLexOptiClient() »function createLexOptiClient(options): LexOptiClient;A typed client of the LexOpti API. Every idempotent POST gets an
Idempotency-Key (kept across its retries); only requests safe to repeat
are retried after a failure, with jittered backoff or Retry-After. Errors are oRPC errors: problemOf(error) reads the
problem details.
Paramètres
Section intitulée « Paramètres »| Paramètre | Type |
|---|---|
options |
LexOptiClientOptions |
Retourne
Section intitulée « Retourne »decodePartnerHint()
Section intitulée « decodePartnerHint() »function decodePartnerHint(value): | { email?: string; family_name?: string; firm?: { address?: { city?: string; line1?: string; postal_code?: string; }; name?: string; phone?: string; profession?: "lawyer" | "real_estate" | "notary" | "accountant" | "other_regulated"; siren?: string; }; given_name?: string;} | null;The hint an authorization request carries, or null for anything that is not one (absent, too large, not base64url JSON, a field of the wrong shape): a bad hint never stops a sign-in, the page simply starts empty.
Paramètres
Section intitulée « Paramètres »| Paramètre | Type |
|---|---|
value |
string | null | undefined |
Retourne
Section intitulée « Retourne »| {
email?: string;
family_name?: string;
firm?: {
address?: {
city?: string;
line1?: string;
postal_code?: string;
};
name?: string;
phone?: string;
profession?: "lawyer" | "real_estate" | "notary" | "accountant" | "other_regulated";
siren?: string;
};
given_name?: string;
}
| null
encodePartnerHint()
Section intitulée « encodePartnerHint() »function encodePartnerHint(hint): string;The lexopti_hint value for an authorization request: the hint as JSON,
base64url. Throws when the hint is not valid or too large, so a partner
finds out while developing, not the member while signing up.
Paramètres
Section intitulée « Paramètres »| Paramètre | Type |
|---|---|
hint |
{ email?: string; family_name?: string; firm?: { address?: { city?: string; line1?: string; postal_code?: string; }; name?: string; phone?: string; profession?: "lawyer" | "real_estate" | "notary" | "accountant" | "other_regulated"; siren?: string; }; given_name?: string; } |
hint.email? |
string |
hint.family_name? |
string |
hint.firm? |
{ address?: { city?: string; line1?: string; postal_code?: string; }; name?: string; phone?: string; profession?: "lawyer" | "real_estate" | "notary" | "accountant" | "other_regulated"; siren?: string; } |
hint.firm.address? |
{ city?: string; line1?: string; postal_code?: string; } |
hint.firm.address.city? |
string |
hint.firm.address.line1? |
string |
hint.firm.address.postal_code? |
string |
hint.firm.name? |
string |
hint.firm.phone? |
string |
hint.firm.profession? |
"lawyer" | "real_estate" | "notary" | "accountant" | "other_regulated" |
hint.firm.siren? |
string |
hint.given_name? |
string |
Retourne
Section intitulée « Retourne »string
isEmptyPartnerHint()
Section intitulée « isEmptyPartnerHint() »function isEmptyPartnerHint(hint): boolean;Whether a hint says anything at all.
Paramètres
Section intitulée « Paramètres »| Paramètre | Type |
|---|---|
hint |
| { email?: string; family_name?: string; firm?: { address?: { city?: string; line1?: string; postal_code?: string; }; name?: string; phone?: string; profession?: "lawyer" | "real_estate" | "notary" | "accountant" | "other_regulated"; siren?: string; }; given_name?: string; } | null |
Retourne
Section intitulée « Retourne »boolean
paginate()
Section intitulée « paginate() »function paginate<Input, Item>(list, input): AsyncGenerator<Item, void, undefined>;Every item of a list, page after page:
for await (const client of paginate(lexopti.clients.list, { limit: 100 })).
Paramètres de type
Section intitulée « Paramètres de type »| Paramètre de type |
|---|
Input extends object |
Item |
Paramètres
Section intitulée « Paramètres »| Paramètre | Type |
|---|---|
list |
ListOperation<Input, Item> |
input |
Input |
Retourne
Section intitulée « Retourne »AsyncGenerator<Item, void, undefined>
Each item of each page, in the list’s order.
problemOf()
Section intitulée « problemOf() »function problemOf(error): | { cases?: object[]; code: string; detail: string; errors?: object[]; missing?: object[]; request_id?: string; status: number; title: string; type: string;} | null;The problem details (RFC 9457) of a failed call: code is stable,
branch on it; request_id names the request for LexOpti support; null
for an error that did not come from the API.
Paramètres
Section intitulée « Paramètres »| Paramètre | Type |
|---|---|
error |
unknown |
Retourne
Section intitulée « Retourne »| {
cases?: object[];
code: string;
detail: string;
errors?: object[];
missing?: object[];
request_id?: string;
status: number;
title: string;
type: string;
}
| null
verifyWebhook()
Section intitulée « verifyWebhook() »function verifyWebhook( payload, headers, secret): WebhookEvent;Verifies a LexOpti webhook (Standard Webhooks) and returns its event:
pass the raw body, the request headers and the endpoint secret
(whsec_…). Throws when the signature or the timestamp is wrong. The
event’s id is the webhook-id header: deduplicate on it.
Paramètres
Section intitulée « Paramètres »| Paramètre | Type |
|---|---|
payload |
string |
headers |
Headers | Record<string, string> |
secret |
string |