UNPKG

@idfy/sdk

Version:
67 lines 2.28 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.IdentificationV2Service = void 0; const IdfyBaseService_1 = require("../IdfyBaseService"); const Urls_1 = require("../../infrastructure/Urls"); const APIHelper_1 = require("../../infrastructure/APIHelper"); class IdentificationV2Service extends IdfyBaseService_1.default { /** * Retrieves the details of a single identification session. * @param id */ getSession(id) { const url = `${Urls_1.default.identificationv2}/sessions/${id}`; return super.get(url); } /** * Returns a list of previously created sessions. The session data returned from this endpoint does not contain any personal information. * @param cursor * @param limit */ listSessions(cursor, limit) { const url = APIHelper_1.default.appendQueryParams(`${Urls_1.default.identificationv2}/sessions`, { cursor, limit, }); return super.get(url); } /** * Creates a new identification session. * @param idSessionCreateOptions */ createSession(idSessionCreateOptions) { const url = `${Urls_1.default.identificationv2}/sessions`; return super.post(url, idSessionCreateOptions); } /** * Invalidates the specified identification session. * @param id */ invalidateSession(id) { const url = `${Urls_1.default.identificationv2}/sessions/${id}/invalidate`; return super.post(url); } /** * Returns a list of supported languages. */ listLanguages() { const url = `${Urls_1.default.identificationv2}/languages`; return super.get(url); } /** * Returns a list of all the supported ID providers. */ listIdProviders() { const url = `${Urls_1.default.identificationv2}/id-providers`; return super.get(url); } /** * Returns a list of all the ID providers available for the requester's account. */ listIdProvidersForAccount() { const url = `${Urls_1.default.identificationv2}/id-providers/account`; return super.get(url); } } exports.IdentificationV2Service = IdentificationV2Service; //# sourceMappingURL=IdentificationV2Service.js.map