importtype { API } from'@quadrata/sdk/types';import { fetchPassportList, QuadrataEnvironment } from'@quadrata/sdk/api';typeResponseType=API.Service.FetchPassportList.Response;typeParsedResponseType=API.Service.FetchPassportList.ParsedResponse;constresponse:ResponseType=awaitfetchPassportList(// params {// required apiAccessToken:'jwt token from createAccessToken',// all filters are optional filters: {// to filter only business wallets provide 'entities'// wallets is used by default association:'wallets'||'entities',// accepts a single attribute name or array of attribute names attributeName:QuadrataAttribute.AML|| [QuadrataAttribute.AML,QuadrataAttribute.DID],// accepts a single attribute status or array of attribute statuses attributeStatus: QuadrataAttributeStatus.IN_REVIEW || [QuadrataAttributeStatus.READY, QuadrataAttributeStatus.IN_REVIEW],
// date range dateFrom:'mm-dd-yyyy', dateTo:'mm-dd-yyyy',// accepts a single wallet address or array of wallet addresses walletAddress:'0x123'|| ['0x123','0x456'],// is the application approved isApproved:true||false,// is onboarding application completed (might be in review) isOnboardCompleted:true||false,// is the application processed by Quadrata (might be denied or approved) isProcessed:true||false,// is the application rejected by Quadrata isRejected:true||false, },// optional limit for each page of data returned limit:20,// optional offset to fetch data at offset:0,// optional page to fetch data for page:1,// optional sort by// fields to sort by are:// - createdAt// - association// - emailVerifiedAt// - walletAddress sortBy: ['createdAt','desc'],// optional fetch options options: { cache:'no-cache' } },// sdk config { environment:QuadrataEnvironment.PRODUCTION });constlimit=response.data.response.limit;consttotalNumRows=response.data.response.numRows;constnumPages=response.data.resposne.numPages;constcurrentPage=response.data.response.page;constcurrentOffset=response.data.response.offset;constsortBy=response.data.response.sortBy;constwalletsForCurrentPage:ParsedResponseType=response.data.response.rows;