/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { investigationsCreateIdentityLookup } from "../funcs/investigationsCreateIdentityLookup.js"; import { investigationsGetCustomerIdentification } from "../funcs/investigationsGetCustomerIdentification.js"; import { investigationsGetInvestigation } from "../funcs/investigationsGetInvestigation.js"; import { investigationsGetWatchlistItem } from "../funcs/investigationsGetWatchlistItem.js"; import { investigationsLinkDocuments } from "../funcs/investigationsLinkDocuments.js"; import { investigationsListInvestigations } from "../funcs/investigationsListInvestigations.js"; import { investigationsUpdateInvestigation } from "../funcs/investigationsUpdateInvestigation.js"; import { investigationsVerifyIdentityLookup } from "../funcs/investigationsVerifyIdentityLookup.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class Investigations extends ClientSDK { /** * Get Investigations * * @remarks * Use this endpoint to get the current state of an investigation by request reference UUID. */ async getInvestigation( investigationId: string, options?: RequestOptions, ): Promise { return unwrapAsync(investigationsGetInvestigation( this, investigationId, options, )); } /** * Update Investigation * * @remarks * Use this endpoint to update the details of an investigation by request reference UUID. */ async updateInvestigation( investigationUpdate: components.InvestigationUpdate, investigationId: string, updateMask?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(investigationsUpdateInvestigation( this, investigationUpdate, investigationId, updateMask, options, )); } /** * List Investigations * * @remarks * Use this endpoint to retrieve a list of investigation summaries based on optional search parameters */ async listInvestigations( pageSize?: number | undefined, pageToken?: string | undefined, filter?: string | undefined, orderBy?: string | undefined, options?: RequestOptions, ): Promise< PageIterator< operations.InvestigationServiceListInvestigationsResponse, { cursor: string } > > { return unwrapResultIterator(investigationsListInvestigations( this, pageSize, pageToken, filter, orderBy, options, )); } /** * Link Documents * * @remarks * Use this endpoint to update identity verification document IDs. */ async linkDocuments( linkDocumentsRequestCreate: components.LinkDocumentsRequestCreate, investigationId: string, options?: RequestOptions, ): Promise { return unwrapAsync(investigationsLinkDocuments( this, linkDocumentsRequestCreate, investigationId, options, )); } /** * Get Watchlist Item * * @remarks * Gets the details of the watchlist profile by the watchlist_id and watchlist_item_id, returned as part of an investigation's watchlist screening process. The response returns the details of the specific watchlist profile that matched the screened identity. Clients can refer to these properties when adjudicating potential watchlist matches. Watchlist_id must equal DOWJONES or DNDB */ async getWatchlistItem( watchlistId: string, itemId: string, options?: RequestOptions, ): Promise { return unwrapAsync(investigationsGetWatchlistItem( this, watchlistId, itemId, options, )); } /** * Get Identity Verification * * @remarks * Gets a CustomerIdentification by CustomerIdentification ID. */ async getCustomerIdentification( correspondentId: string, customerIdentificationId: string, view?: | operations.CustomerIdentificationResultServiceGetCustomerIdentificationQueryParamView | undefined, options?: RequestOptions, ): Promise< operations.CustomerIdentificationResultServiceGetCustomerIdentificationResponse > { return unwrapAsync(investigationsGetCustomerIdentification( this, correspondentId, customerIdentificationId, view, options, )); } /** * Create Identity Lookup * * @remarks * Creates a new identity lookup and initiates verification process */ async createIdentityLookup( identityLookupCreate: components.IdentityLookupCreate, correspondentId: string, options?: RequestOptions, ): Promise { return unwrapAsync(investigationsCreateIdentityLookup( this, identityLookupCreate, correspondentId, options, )); } /** * Verify Identity Lookup * * @remarks * Verifies an identity lookup with the provided verification code */ async verifyIdentityLookup( verifyIdentityLookupRequestCreate: components.VerifyIdentityLookupRequestCreate, correspondentId: string, identityLookupId: string, options?: RequestOptions, ): Promise { return unwrapAsync(investigationsVerifyIdentityLookup( this, verifyIdentityLookupRequestCreate, correspondentId, identityLookupId, options, )); } }