export type PersonRelatedTransaction = {status?: string | undefined, tguid?: string | undefined, pguid?: string | undefined, operation?: ('UNKNOWN' | 'CONNECT' | 'DISCONNECT' | 'AUTHENTICATE' | 'ENROLL' | 'EXTERNAL_AUTHENTICATE' | 'BATCH_ENROLL' | 'REGISTER_SEARCH' | 'SEARCH' | 'DELETE' | 'GET_RESULT' | 'CLOSE_SESSION' | 'GET_PERSON' | 'FILTER' | 'COUNT_ANOMALIES' | 'FIND_ANOMALIES' | 'GET_ANOMALY' | 'ASSIGN_ANOMALY' | 'UNASSIGN_ANOMALY' | 'TRUST_ENROLL' | 'GET_TRANSACTION' | 'CHANGE_PRIORITY' | 'ADD_TO_REFERENCE' | 'REMOVE_FROM_REFERENCE' | 'REMOVE_KEYS' | 'GET_PEOPLE_TRANSACTIONS' | 'ANOMALY_ENROLL' | 'GET_EXCEPTION_RESULT' | 'QUALITY_ANALYSIS' | 'FILTER_TRANSACTION' | 'REGISTER_ENROLL' | 'STOP_SERVICE' | 'REGISTER_UL_BIOMETRIC' | 'REMOVE_UL_BIOMETRIC' | 'UPDATE_PERSON_BIOMETRIC' | 'DISABLE_PERSON_TRANSACTION' | 'TREAT_EXCEPTION' | 'TREAT_ANOMALY') | undefined}; export type JsonNotification = {operation?: ('UNKNOWN' | 'CONNECT' | 'DISCONNECT' | 'AUTHENTICATE' | 'ENROLL' | 'EXTERNAL_AUTHENTICATE' | 'BATCH_ENROLL' | 'REGISTER_SEARCH' | 'SEARCH' | 'DELETE' | 'GET_RESULT' | 'CLOSE_SESSION' | 'GET_PERSON' | 'FILTER' | 'COUNT_ANOMALIES' | 'FIND_ANOMALIES' | 'GET_ANOMALY' | 'ASSIGN_ANOMALY' | 'UNASSIGN_ANOMALY' | 'TRUST_ENROLL' | 'GET_TRANSACTION' | 'CHANGE_PRIORITY' | 'ADD_TO_REFERENCE' | 'REMOVE_FROM_REFERENCE' | 'REMOVE_KEYS' | 'GET_PEOPLE_TRANSACTIONS' | 'ANOMALY_ENROLL' | 'GET_EXCEPTION_RESULT' | 'QUALITY_ANALYSIS' | 'FILTER_TRANSACTION' | 'REGISTER_ENROLL' | 'STOP_SERVICE' | 'REGISTER_UL_BIOMETRIC' | 'REMOVE_UL_BIOMETRIC' | 'UPDATE_PERSON_BIOMETRIC' | 'DISABLE_PERSON_TRANSACTION' | 'TREAT_EXCEPTION' | 'TREAT_ANOMALY') | undefined, tguid?: string | undefined, status?: string | undefined, sender?: string | undefined, uguid?: string | undefined, additionalData?: {[key: string]: string} | undefined, relatedTransactions?: Array | undefined}; export type NotifyRequest = {data?: JsonNotification | undefined}; export type CreateApiOperationsNotifyArgs = {body: NotifyRequest}; export type CreateApiOperationsNotifyOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * notify * * POST /operations/notify */ export const createApiOperationsNotify = async (args: CreateApiOperationsNotifyArgs, options?: CreateApiOperationsNotifyOptions) => { const {baseUrl = "http://:8085/gbds/v2", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json;charset=UTF-8") headers.set('accept', "*/*") const url = `${baseUrl.replace(/\/+$/, '')}/operations/notify${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };