UNPKG

@slashid/slashid

Version:

Client SDK for the /id platform

1,166 lines (1,099 loc) 637 kB
var $gu57p$jwtdecode = require("jwt-decode"); var $gu57p$uuid = require("uuid"); var $gu57p$uaparserjs = require("ua-parser-js"); var $gu57p$compareversions = require("compare-versions"); function $parcel$export(e, n, v, s) { Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); } function $parcel$interopDefault(a) { return a && a.__esModule ? a.default : a; } $parcel$export(module.exports, "SSR", () => $d9d7e7e672047acc$export$8f376290db229087); $parcel$export(module.exports, "errors", () => $d9d7e7e672047acc$export$30f3b02011db23c0); $parcel$export(module.exports, "Errors", () => $d9d7e7e672047acc$export$b8e9cd941e8016ac); $parcel$export(module.exports, "Utils", () => $d9d7e7e672047acc$export$d2ca453b913dcdea); $parcel$export(module.exports, "SlashID", () => $f049808331031e00$export$261888861cdb8a55); $parcel$export(module.exports, "__INTERNAL_ONLY", () => $f049808331031e00$export$5f74d2b45f2a2732); $parcel$export(module.exports, "User", () => $b91ac79b1dd349ce$export$ec7121d802e738bd); $parcel$export(module.exports, "AnonymousUser", () => $78fa2d3f95f49cf7$export$97e23b13d26a722); $parcel$export(module.exports, "createAnonymousUserToken", () => $fe256265714d9f95$export$48a8ffe18f8d9950); $parcel$export(module.exports, "version", () => $6b734770ee5f97bd$export$f9582ef3c55143f); $parcel$export(module.exports, "WebAuthnAuthenticatorAttachment", () => $3adb99659e2bcaec$export$51952aaa367c79db); $parcel$export(module.exports, "PersonHandleType", () => $e0e8e14c3a6add56$export$885886f088cd0586); // TODO generate on build from git tag var $70edae2846236c84$exports = {}; $70edae2846236c84$exports = JSON.parse('{"name":"@slashid/slashid","private":false,"publishConfig":{"access":"public"},"version":"3.29.6","description":"Client SDK for the /id platform","homepage":"https://slashid.dev","author":"SlashID","license":"MIT","main":"./dist/bundle/slashid.js","module":"./dist/esmodule/slashid.esm.js","esmodule":"./dist/esmodule/slashid.esm.js","commonjs":"./dist/commonjs/slashid.cjs.js","bundle":"./dist/bundle/slashid.js","types":"./dist/types/slashid.d.ts","exports":{".":{"require":"./dist/commonjs/slashid.cjs.js","import":"./dist/esmodule/slashid.esm.js","default":"./dist/commonjs/slashid.cjs.js","types":"./dist/types/slashid.d.ts"}},"targets":{"esmodule":{"source":"src/targets/package.ts","context":"browser","isLibrary":true,"outputFormat":"esmodule","engines":{"browsers":["and_chr >= 73","chrome >= 73","and_ff >= 67","android >= 114","edge >= 79","samsung >= 11.2","safari >= 13","ios_saf >= 13.1","opera >= 60","firefox >= 67","unreleased and_chr versions","unreleased chrome versions","unreleased and_ff versions","unreleased android versions","unreleased edge versions","unreleased samsung versions","unreleased safari versions","unreleased ios_saf versions","unreleased opera versions","unreleased firefox versions"]}},"commonjs":{"source":"src/targets/package.ts","context":"node","isLibrary":true,"outputFormat":"commonjs","engines":{"node":">= 12"}},"bundle":{"source":"src/targets/bundle.ts","context":"browser","outputFormat":"global","engines":{"browsers":["> 0.5%","last 2 versions","not dead"]}},"page":{"source":"static/sdk.html","context":"browser","engines":{"browsers":["and_chr >= 73","chrome >= 73","and_ff >= 67","android >= 114","edge >= 79","samsung >= 11.2","safari >= 13","ios_saf >= 13.1","opera >= 60","firefox >= 67","unreleased and_chr versions","unreleased chrome versions","unreleased and_ff versions","unreleased android versions","unreleased edge versions","unreleased samsung versions","unreleased safari versions","unreleased ios_saf versions","unreleased opera versions","unreleased firefox versions"]}},"types":{"source":"src/targets/package.ts"}},"files":["dist/*"],"keywords":["slashid","SlashID","auth","openid","authentication","jwt","browser"],"scripts":{"clean":"rm -rf dist docs","lint":"eslint ./src --ext .ts","format":"prettier --config .prettierrc.json \'src/**/*.ts\' --write","test:ts":"tsc --project tsconfig.json --noEmit","test:unit":"jest","test:unit:watch":"jest --watch","test:unit:ci":"jest --ci","test:integration":"playwright test","build":"rm -rf dist && parcel build --no-cache && cp compat/esmodule/package.json dist/esmodule","docs":"rm -rf docs && typedoc","dist":"npm run lint && npm run build","all":"npm run dist && npm run docs","serve:all":"parcel serve \'static/*.html\' --port 8080 --no-cache","serve:example":"parcel serve static/index.html --port 8080 --no-cache","serve:jump":"parcel serve static/sdk.html --port 8080 --no-cache","serve:docs":"parcel serve docs/index.html --port 8081 --no-cache","push:docs":"aws s3 sync docs s3://slashiddoc/sdk/v$(node tools/version.js --major) && (aws cloudfront create-invalidation --distribution-id ETLBNGAAF97EN --paths \\"/*\\")","changeset":"changeset","prepublishOnly":"npm run all","publish:ci":"npm run build && changeset publish"},"devDependencies":{"@changesets/cli":"^2.28.1","@parcel/core":"2.12.0","@parcel/packager-ts":"2.12.0","@parcel/resolver-default":"^2.13.2","@parcel/transformer-babel":"2.12.0","@parcel/transformer-js":"2.12.0","@parcel/transformer-json":"2.12.0","@parcel/transformer-react-refresh-wrap":"2.12.0","@parcel/transformer-typescript-types":"2.12.0","@playwright/test":"1.42.1","@types/jest":"^28.1.7","@types/node":"~15.0.2","@types/qrcode":"^1.5.0","@types/ua-parser-js":"^0.7.39","@typescript-eslint/eslint-plugin":"^4.15.1","@typescript-eslint/parser":"^4.15.1","danger":"^11.2.6","eslint":"^7.20.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","https-proxy-agent":"^7.0.5","isomorphic-fetch":"^3.0.0","jest":"^28.1.3","jest-environment-jsdom":"^28.1.3","jest-fetch-mock":"^3.0.3","parcel":"2.12.0","prettier":"^2.7.1","ts-jest":"^28.0.8","typedoc":"^0.23.00","typedoc-plugin-mdn-links":"^2.0.0","typedoc-plugin-missing-exports":"^1.0.0","typescript":"~4.7.0"},"dependencies":{"@types/uuid":"8.3.4","compare-versions":"^6.1.0","docdash":"^1.2.0","jwt-decode":"^3.1.2","qrcode":"^1.5.1","querystring-es3":"^0.2.1","regenerator-runtime":"^0.13.9","ua-parser-js":"^1.0.37","url":"^0.11.0","uuid":"8.3.2"},"resolutions":{"@babel/runtime":"7.26.10","@babel/helpers":"7.26.10"}}'); const [$6b734770ee5f97bd$var$major, $6b734770ee5f97bd$var$minor, $6b734770ee5f97bd$var$patch] = (0, $70edae2846236c84$exports.version).split("."); const $6b734770ee5f97bd$export$f9582ef3c55143f = { major: $6b734770ee5f97bd$var$major, minor: $6b734770ee5f97bd$var$minor, patch: $6b734770ee5f97bd$var$patch, raw: (0, $70edae2846236c84$exports.version) }; /* tslint:disable */ /* eslint-disable */ /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ const $5cdab462eea9e370$export$2812a1fb15aca49c = "https://api.slashid.com".replace(/\/+$/, ""); class $5cdab462eea9e370$export$fa89be98fe0936f2 { constructor(configuration = {}){ this.configuration = configuration; } set config(configuration) { this.configuration = configuration; } get basePath() { return this.configuration.basePath != null ? this.configuration.basePath : $5cdab462eea9e370$export$2812a1fb15aca49c; } get fetchApi() { return this.configuration.fetchApi; } get middleware() { return this.configuration.middleware || []; } get queryParamsStringify() { return this.configuration.queryParamsStringify || $5cdab462eea9e370$export$ac4103b836844853; } get username() { return this.configuration.username; } get password() { return this.configuration.password; } get apiKey() { const apiKey = this.configuration.apiKey; if (apiKey) return typeof apiKey === "function" ? apiKey : ()=>apiKey; return undefined; } get accessToken() { const accessToken = this.configuration.accessToken; if (accessToken) return typeof accessToken === "function" ? accessToken : async ()=>accessToken; return undefined; } get headers() { return this.configuration.headers; } get credentials() { return this.configuration.credentials; } } const $5cdab462eea9e370$export$ac4f8128ea29c5 = new $5cdab462eea9e370$export$fa89be98fe0936f2(); class $5cdab462eea9e370$export$70edad7ad5bb3f5d { static #_ = this.jsonRegex = new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$", "i"); constructor(configuration = $5cdab462eea9e370$export$ac4f8128ea29c5){ this.configuration = configuration; this.fetchApi = async (url, init)=>{ let fetchParams = { url: url, init: init }; for (const middleware of this.middleware)if (middleware.pre) fetchParams = await middleware.pre({ fetch: this.fetchApi, ...fetchParams }) || fetchParams; let response = undefined; try { response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); } catch (e) { for (const middleware of this.middleware)if (middleware.onError) response = await middleware.onError({ fetch: this.fetchApi, url: fetchParams.url, init: fetchParams.init, error: e, response: response ? response.clone() : undefined }) || response; if (response === undefined) { if (e instanceof Error) throw new $5cdab462eea9e370$export$26e841bcf1aeb894(e, "The request failed and the interceptors did not return an alternative response"); else throw e; } } for (const middleware of this.middleware)if (middleware.post) response = await middleware.post({ fetch: this.fetchApi, url: fetchParams.url, init: fetchParams.init, response: response.clone() }) || response; return response; }; this.middleware = configuration.middleware; } withMiddleware(...middlewares) { const next = this.clone(); next.middleware = next.middleware.concat(...middlewares); return next; } withPreMiddleware(...preMiddlewares) { const middlewares = preMiddlewares.map((pre)=>({ pre: pre })); return this.withMiddleware(...middlewares); } withPostMiddleware(...postMiddlewares) { const middlewares = postMiddlewares.map((post)=>({ post: post })); return this.withMiddleware(...middlewares); } /** * Check if the given MIME is a JSON MIME. * JSON MIME examples: * application/json * application/json; charset=UTF8 * APPLICATION/JSON * application/vnd.company+json * @param mime - MIME (Multipurpose Internet Mail Extensions) * @return True if the given MIME is JSON, false otherwise. */ isJsonMime(mime) { if (!mime) return false; return $5cdab462eea9e370$export$70edad7ad5bb3f5d.jsonRegex.test(mime); } async request(context, initOverrides) { const { url: url, init: init } = await this.createFetchParams(context, initOverrides); const response = await this.fetchApi(url, init); if (response && response.status >= 200 && response.status < 300) return response; throw new $5cdab462eea9e370$export$286baf652d0b1206(response, "Response returned an error code"); } async createFetchParams(context, initOverrides) { let url = this.configuration.basePath + context.path; if (context.query !== undefined && Object.keys(context.query).length !== 0) // only add the querystring to the URL if there are query parameters. // this is done to avoid urls ending with a "?" character which buggy webservers // do not handle correctly sometimes. url += "?" + this.configuration.queryParamsStringify(context.query); const headers = Object.assign({}, this.configuration.headers, context.headers); Object.keys(headers).forEach((key)=>headers[key] === undefined ? delete headers[key] : {}); const initOverrideFn = typeof initOverrides === "function" ? initOverrides : async ()=>initOverrides; const initParams = { method: context.method, headers: headers, body: context.body, credentials: this.configuration.credentials }; const overriddenInit = { ...initParams, ...await initOverrideFn({ init: initParams, context: context }) }; const init = { ...overriddenInit, body: $5cdab462eea9e370$var$isFormData(overriddenInit.body) || overriddenInit.body instanceof URLSearchParams || $5cdab462eea9e370$var$isBlob(overriddenInit.body) ? overriddenInit.body : JSON.stringify(overriddenInit.body) }; return { url: url, init: init }; } /** * Create a shallow clone of `this` by constructing a new instance * and then shallow cloning data members. */ clone() { const constructor = this.constructor; const next = new constructor(this.configuration); next.middleware = this.middleware.slice(); return next; } } function $5cdab462eea9e370$var$isBlob(value) { return typeof Blob !== "undefined" && value instanceof Blob; } function $5cdab462eea9e370$var$isFormData(value) { return typeof FormData !== "undefined" && value instanceof FormData; } class $5cdab462eea9e370$export$286baf652d0b1206 extends Error { constructor(response, msg){ super(msg); this.response = response; this.name = "ResponseError"; } } class $5cdab462eea9e370$export$26e841bcf1aeb894 extends Error { constructor(cause, msg){ super(msg); this.cause = cause; this.name = "FetchError"; } } class $5cdab462eea9e370$export$a27bea7cdb975d70 extends Error { constructor(field, msg){ super(msg); this.field = field; this.name = "RequiredError"; } } const $5cdab462eea9e370$export$83cb526776fb323d = { csv: ",", ssv: " ", tsv: " ", pipes: "|" }; function $5cdab462eea9e370$export$f7e9f41ea797a17(json, key) { const value = json[key]; return value !== null && value !== undefined; } function $5cdab462eea9e370$export$ac4103b836844853(params, prefix = "") { return Object.keys(params).map((key)=>$5cdab462eea9e370$var$querystringSingleKey(key, params[key], prefix)).filter((part)=>part.length > 0).join("&"); } function $5cdab462eea9e370$var$querystringSingleKey(key, value, keyPrefix = "") { const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); if (value instanceof Array) { const multiValue = value.map((singleValue)=>encodeURIComponent(String(singleValue))).join(`&${encodeURIComponent(fullKey)}=`); return `${encodeURIComponent(fullKey)}=${multiValue}`; } if (value instanceof Set) { const valueAsArray = Array.from(value); return $5cdab462eea9e370$var$querystringSingleKey(key, valueAsArray, keyPrefix); } if (value instanceof Date) return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; if (value instanceof Object) return $5cdab462eea9e370$export$ac4103b836844853(value, fullKey); return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; } function $5cdab462eea9e370$export$825e789796ab7275(data, fn) { return Object.keys(data).reduce((acc, key)=>({ ...acc, [key]: fn(data[key]) }), {}); } function $5cdab462eea9e370$export$59072c3750441c02(consumes) { for (const consume of consumes){ if ("multipart/form-data" === consume.contentType) return true; } return false; } class $5cdab462eea9e370$export$9a41a2c2c33dd8d4 { constructor(raw, transformer = (jsonValue)=>jsonValue){ this.raw = raw; this.transformer = transformer; } async value() { return this.transformer(await this.raw.json()); } } class $5cdab462eea9e370$export$20446dc680588cc3 { constructor(raw){ this.raw = raw; } async value() { return undefined; } } class $5cdab462eea9e370$export$9d707f60a06b41f8 { constructor(raw){ this.raw = raw; } async value() { return await this.raw.blob(); } } class $5cdab462eea9e370$export$bf40ae8c274ef99b { constructor(raw){ this.raw = raw; } async value() { return await this.raw.text(); } } /* tslint:disable */ /* eslint-disable */ /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /* tslint:disable */ /* eslint-disable */ /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ function $193d1c870fa454a1$export$2caf5cdeee54129b(value) { let isInstance = true; isInstance = isInstance && "limit" in value; isInstance = isInstance && "offset" in value; isInstance = isInstance && "total_count" in value; return isInstance; } function $193d1c870fa454a1$export$c449262465ba2bb9(json) { return $193d1c870fa454a1$export$3fe7617ab48f3b5c(json, false); } function $193d1c870fa454a1$export$3fe7617ab48f3b5c(json, ignoreDiscriminator) { if (json === undefined || json === null) return json; return { "limit": json["limit"], "offset": json["offset"], "total_count": json["total_count"] }; } function $193d1c870fa454a1$export$9c53a26884a83ec6(value) { if (value === undefined) return undefined; if (value === null) return null; return { "limit": value.limit, "offset": value.offset, "total_count": value.total_count }; } function $02bb32d6850c0fba$export$90742f18fb91b1a8(value) { let isInstance = true; return isInstance; } function $02bb32d6850c0fba$export$70023f934842ce53(json) { return $02bb32d6850c0fba$export$9057b09091c07cb0(json, false); } function $02bb32d6850c0fba$export$9057b09091c07cb0(json, ignoreDiscriminator) { if (json === undefined || json === null) return json; return { "pagination": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "pagination") ? undefined : (0, $193d1c870fa454a1$export$c449262465ba2bb9)(json["pagination"]) }; } function $02bb32d6850c0fba$export$a688b751866cf7f3(value) { if (value === undefined) return undefined; if (value === null) return null; return { "pagination": (0, $193d1c870fa454a1$export$9c53a26884a83ec6)(value.pagination) }; } /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ function $97d6e09d6d4117f7$export$6c620df6ac3163e7(value) { let isInstance = true; return isInstance; } function $97d6e09d6d4117f7$export$9a91be5fb3879fb9(json) { return $97d6e09d6d4117f7$export$39dc308db371e81(json, false); } function $97d6e09d6d4117f7$export$39dc308db371e81(json, ignoreDiscriminator) { if (json === undefined || json === null) return json; return { "httpcode": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "httpcode") ? undefined : json["httpcode"], "message": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "message") ? undefined : json["message"] }; } function $97d6e09d6d4117f7$export$797f61dd859e886c(value) { if (value === undefined) return undefined; if (value === null) return null; return { "httpcode": value.httpcode, "message": value.message }; } function $77bec2f0d20a75b5$export$2b7c18f96ce69490(value) { let isInstance = true; return isInstance; } function $77bec2f0d20a75b5$export$53557473c48f27d7(json) { return $77bec2f0d20a75b5$export$488f61d1ca30688d(json, false); } function $77bec2f0d20a75b5$export$488f61d1ca30688d(json, ignoreDiscriminator) { if (json === undefined || json === null) return json; return { "meta": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "meta") ? undefined : (0, $02bb32d6850c0fba$export$70023f934842ce53)(json["meta"]), "errors": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "errors") ? undefined : json["errors"].map((0, $97d6e09d6d4117f7$export$9a91be5fb3879fb9)) }; } function $77bec2f0d20a75b5$export$9f307ab67ab58299(value) { if (value === undefined) return undefined; if (value === null) return null; return { "meta": (0, $02bb32d6850c0fba$export$a688b751866cf7f3)(value.meta), "errors": value.errors === undefined ? undefined : value.errors.map((0, $97d6e09d6d4117f7$export$797f61dd859e886c)) }; } /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /** * * @export */ const $68e374b59caca998$export$bb30f99621eec4fd = { AwsOrganization: "aws_organization", AwsAccount: "aws_account", Auth0Domain: "auth0_domain", Slashid: "slashid", AzureTenant: "azure_tenant", EntraTenant: "entra_tenant", GcpProject: "gcp_project", GcpOrganization: "gcp_organization", GateInstance: "gate_instance", SnowflakeAccount: "snowflake_account", OktaOrg: "okta_org", GoogleWorkspaceInstance: "google_workspace_instance", ActiveDirectory: "active_directory", PostgresInstance: "postgres_instance", KeeperAccount: "keeper_account" }; function $68e374b59caca998$export$c90756f0bdba423a(json) { return $68e374b59caca998$export$edce08ef50dc3a0c(json, false); } function $68e374b59caca998$export$edce08ef50dc3a0c(json, ignoreDiscriminator) { return json; } function $68e374b59caca998$export$f47b422e3f4b9b3e(value) { return value; } function $ebe384a620ae4fda$export$9c24dacb8ec047ba(value) { let isInstance = true; isInstance = isInstance && "id" in value; isInstance = isInstance && "source" in value; return isInstance; } function $ebe384a620ae4fda$export$a496a8e3e8eff53(json) { return $ebe384a620ae4fda$export$c4178a8104b3fef(json, false); } function $ebe384a620ae4fda$export$c4178a8104b3fef(json, ignoreDiscriminator) { if (json === undefined || json === null) return json; return { "id": json["id"], "name": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "name") ? undefined : json["name"], "source": (0, $68e374b59caca998$export$c90756f0bdba423a)(json["source"]) }; } function $ebe384a620ae4fda$export$cbbaf171df3f7f4b(value) { if (value === undefined) return undefined; if (value === null) return null; return { "id": value.id, "name": value.name, "source": (0, $68e374b59caca998$export$f47b422e3f4b9b3e)(value.source) }; } /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ function $4db4381b99d4ae14$export$e8aeeb6b229f0e49(value) { let isInstance = true; isInstance = isInstance && "id" in value; isInstance = isInstance && "organization_id" in value; isInstance = isInstance && "app_external_connection_id" in value; isInstance = isInstance && "identifier_from_source" in value; isInstance = isInstance && "external_identity_id" in value; isInstance = isInstance && "status" in value; isInstance = isInstance && "action" in value; isInstance = isInstance && "target" in value; return isInstance; } function $4db4381b99d4ae14$export$c86d3d6e3d30cc42(json) { return $4db4381b99d4ae14$export$1e3a1ec579e97cb3(json, false); } function $4db4381b99d4ae14$export$1e3a1ec579e97cb3(json, ignoreDiscriminator) { if (json === undefined || json === null) return json; return { "id": json["id"], "organization_id": json["organization_id"], "app_external_connection_id": json["app_external_connection_id"], "identifier_from_source": json["identifier_from_source"], "external_identity_id": json["external_identity_id"], "person_id": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "person_id") ? undefined : json["person_id"], "status": json["status"], "action": json["action"], "target": json["target"], "requested_at": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "requested_at") ? undefined : new Date(json["requested_at"]), "expires_at": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "expires_at") ? undefined : new Date(json["expires_at"]), "reason": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "reason") ? undefined : json["reason"], "revert_action": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "revert_action") ? undefined : json["revert_action"], "revert_action_target": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "revert_action_target") ? undefined : json["revert_action_target"], "reverted": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "reverted") ? undefined : json["reverted"] }; } function $4db4381b99d4ae14$export$cabce697ca3f5ba0(value) { if (value === undefined) return undefined; if (value === null) return null; return { "id": value.id, "organization_id": value.organization_id, "app_external_connection_id": value.app_external_connection_id, "identifier_from_source": value.identifier_from_source, "external_identity_id": value.external_identity_id, "person_id": value.person_id, "status": value.status, "action": value.action, "target": value.target, "requested_at": value.requested_at === undefined ? undefined : value.requested_at.toISOString(), "expires_at": value.expires_at === undefined ? undefined : value.expires_at.toISOString(), "reason": value.reason, "revert_action": value.revert_action, "revert_action_target": value.revert_action_target, "reverted": value.reverted }; } /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ function $2af90ec5aa9c50f2$export$82c043fe1b5e5059(value) { let isInstance = true; isInstance = isInstance && "app_external_connection_id" in value; isInstance = isInstance && "identifier_from_source" in value; return isInstance; } function $2af90ec5aa9c50f2$export$94e78b3c479e3125(json) { return $2af90ec5aa9c50f2$export$b999ce9b779710bf(json, false); } function $2af90ec5aa9c50f2$export$b999ce9b779710bf(json, ignoreDiscriminator) { if (json === undefined || json === null) return json; return { "app_external_connection_id": json["app_external_connection_id"], "identifier_from_source": json["identifier_from_source"], "person_id": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "person_id") ? undefined : json["person_id"], "action": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "action") ? undefined : json["action"], "target": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "target") ? undefined : json["target"], "valid_until": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "valid_until") ? undefined : new Date(json["valid_until"]) }; } function $2af90ec5aa9c50f2$export$ab781605b7817e64(value) { if (value === undefined) return undefined; if (value === null) return null; return { "app_external_connection_id": value.app_external_connection_id, "identifier_from_source": value.identifier_from_source, "person_id": value.person_id, "action": value.action, "target": value.target, "valid_until": value.valid_until === undefined ? undefined : value.valid_until.toISOString() }; } /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ function $af5925d557c8550d$export$295748d69f46be2e(value) { let isInstance = true; isInstance = isInstance && "id" in value; isInstance = isInstance && "organization_id" in value; isInstance = isInstance && "person_id" in value; isInstance = isInstance && "app_external_connection" in value; isInstance = isInstance && "identifier_from_source" in value; return isInstance; } function $af5925d557c8550d$export$cdcddf470e8f985e(json) { return $af5925d557c8550d$export$cdb50f870efe7dcb(json, false); } function $af5925d557c8550d$export$cdb50f870efe7dcb(json, ignoreDiscriminator) { if (json === undefined || json === null) return json; return { "id": json["id"], "organization_id": json["organization_id"], "person_id": json["person_id"], "app_external_connection": (0, $ebe384a620ae4fda$export$a496a8e3e8eff53)(json["app_external_connection"]), "description": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "description") ? undefined : json["description"], "app_url": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "app_url") ? undefined : json["app_url"], "identifier_from_source": json["identifier_from_source"], "created_at": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "created_at") ? undefined : new Date(json["created_at"]), "last_updated_at": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "last_updated_at") ? undefined : new Date(json["last_updated_at"]) }; } function $af5925d557c8550d$export$a3c2010a015bfa63(value) { if (value === undefined) return undefined; if (value === null) return null; return { "id": value.id, "organization_id": value.organization_id, "person_id": value.person_id, "app_external_connection": (0, $ebe384a620ae4fda$export$cbbaf171df3f7f4b)(value.app_external_connection), "description": value.description, "app_url": value.app_url, "identifier_from_source": value.identifier_from_source, "created_at": value.created_at === undefined ? undefined : value.created_at.toISOString(), "last_updated_at": value.last_updated_at === undefined ? undefined : value.last_updated_at.toISOString() }; } /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ function $b8187d917eb17bbf$export$2b33f63a6a4553f3(value) { let isInstance = true; return isInstance; } function $b8187d917eb17bbf$export$eaef232e23385a70(json) { return $b8187d917eb17bbf$export$637803582d27cb90(json, false); } function $b8187d917eb17bbf$export$637803582d27cb90(json, ignoreDiscriminator) { if (json === undefined || json === null) return json; return { "description": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "description") ? undefined : json["description"], "app_url": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "app_url") ? undefined : json["app_url"], "identifier_from_source": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "identifier_from_source") ? undefined : json["identifier_from_source"] }; } function $b8187d917eb17bbf$export$bcf97fbc35a59661(value) { if (value === undefined) return undefined; if (value === null) return null; return { "description": value.description, "app_url": value.app_url, "identifier_from_source": value.identifier_from_source }; } /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ function $202fe748d800477e$export$9c2d1510e8dfb302(value) { let isInstance = true; isInstance = isInstance && "app_external_connection_id" in value; isInstance = isInstance && "identifier_from_source" in value; return isInstance; } function $202fe748d800477e$export$c74a933f53f7637b(json) { return $202fe748d800477e$export$541c4a014f7a8150(json, false); } function $202fe748d800477e$export$541c4a014f7a8150(json, ignoreDiscriminator) { if (json === undefined || json === null) return json; return { "app_external_connection_id": json["app_external_connection_id"], "person_id": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "person_id") ? undefined : json["person_id"], "description": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "description") ? undefined : json["description"], "app_url": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "app_url") ? undefined : json["app_url"], "identifier_from_source": json["identifier_from_source"] }; } function $202fe748d800477e$export$713e910df504db2f(value) { if (value === undefined) return undefined; if (value === null) return null; return { "app_external_connection_id": value.app_external_connection_id, "person_id": value.person_id, "description": value.description, "app_url": value.app_url, "identifier_from_source": value.identifier_from_source }; } /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /** * * @export */ const $9e6a6cd3530e7804$export$b1f97c3099fc6872 = { UsIowa: "us-iowa", EuropeBelgium: "europe-belgium", AsiaJapan: "asia-japan", EuropeEngland: "europe-england", AustraliaSydney: "australia-sydney" }; function $9e6a6cd3530e7804$export$4599c92435bbba6e(json) { return $9e6a6cd3530e7804$export$9f38cecf57c7d495(json, false); } function $9e6a6cd3530e7804$export$9f38cecf57c7d495(json, ignoreDiscriminator) { return json; } function $9e6a6cd3530e7804$export$2ac40160f30291ff(value) { return value; } function $70c5c089c99d932c$export$35d1912a6e65a4d3(value) { let isInstance = true; return isInstance; } function $70c5c089c99d932c$export$f24df1e4bf994e2e(json) { return $70c5c089c99d932c$export$77e0f518496a5152(json, false); } function $70c5c089c99d932c$export$77e0f518496a5152(json, ignoreDiscriminator) { if (json === undefined || json === null) return json; return { "region": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "region") ? undefined : (0, $9e6a6cd3530e7804$export$4599c92435bbba6e)(json["region"]) }; } function $70c5c089c99d932c$export$da1543be29a31e9e(value) { if (value === undefined) return undefined; if (value === null) return null; return { "region": (0, $9e6a6cd3530e7804$export$2ac40160f30291ff)(value.region) }; } /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /** * * @export */ const $b363b7ab834bd8c5$export$7962c6bffc1da42 = { UiCustomization: "ui_customization", AuthnContextUpdate: "authn_context_update", Proxy: "proxy", WebauthnCreate: "webauthn_create", WebauthnGet: "webauthn_get", Nonce: "nonce", Otp: "otp", Oidc: "oidc", Saml: "saml", PasswordSet: "password_set", PasswordVerify: "password_verify", PasswordReset: "password_reset", TotpRegister: "totp_register", TotpVerify: "totp_verify" }; function $b363b7ab834bd8c5$export$7da7fa2b5d7d85f3(json) { return $b363b7ab834bd8c5$export$b1e18bb9237bd017(json, false); } function $b363b7ab834bd8c5$export$b1e18bb9237bd017(json, ignoreDiscriminator) { return json; } function $b363b7ab834bd8c5$export$e418cafec408031e(value) { return value; } /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ function $c408bfb6b4a826c7$export$bab851ae817d28dd(value) { let isInstance = true; return isInstance; } function $c408bfb6b4a826c7$export$703f66b537d92f5c(json) { return $c408bfb6b4a826c7$export$a4e33e976363db18(json, false); } function $c408bfb6b4a826c7$export$a4e33e976363db18(json, ignoreDiscriminator) { if (json === undefined || json === null) return json; return { "challenge": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "challenge") ? undefined : json["challenge"] }; } function $c408bfb6b4a826c7$export$91e7f239824ee67f(value) { if (value === undefined) return undefined; if (value === null) return null; return { "challenge": value.challenge }; } function $f5134d23b2def4ca$export$88b5d910b589cf13(value) { let isInstance = true; isInstance = isInstance && "challenge_id" in value; isInstance = isInstance && "challenge_type" in value; return isInstance; } function $f5134d23b2def4ca$export$dea5b50d6ead812(json) { return $f5134d23b2def4ca$export$fe0ec9eae36a9b35(json, false); } function $f5134d23b2def4ca$export$fe0ec9eae36a9b35(json, ignoreDiscriminator) { if (json === undefined || json === null) return json; return { "challenge_id": json["challenge_id"], "challenge_type": (0, $b363b7ab834bd8c5$export$7da7fa2b5d7d85f3)(json["challenge_type"]), "data": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "data") ? undefined : (0, $c408bfb6b4a826c7$export$703f66b537d92f5c)(json["data"]) }; } function $f5134d23b2def4ca$export$2ddc20e282619fc3(value) { if (value === undefined) return undefined; if (value === null) return null; return { "challenge_id": value.challenge_id, "challenge_type": (0, $b363b7ab834bd8c5$export$e418cafec408031e)(value.challenge_type), "data": (0, $c408bfb6b4a826c7$export$91e7f239824ee67f)(value.data) }; } /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ function $3db5004c7670a831$export$1d9a2093aa5b8546(value) { let isInstance = true; return isInstance; } function $3db5004c7670a831$export$bb8ecc995265609e(json) { return $3db5004c7670a831$export$fe08176e0964d56a(json, false); } function $3db5004c7670a831$export$fe08176e0964d56a(json, ignoreDiscriminator) { if (json === undefined || json === null) return json; return { "otp": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "otp") ? undefined : json["otp"] }; } function $3db5004c7670a831$export$6da0bcef5e0a8fdb(value) { if (value === undefined) return undefined; if (value === null) return null; return { "otp": value.otp }; } function $7f511ec3e65390ff$export$3e31be0f0b2d293a(value) { let isInstance = true; isInstance = isInstance && "challenge_id" in value; isInstance = isInstance && "challenge_type" in value; return isInstance; } function $7f511ec3e65390ff$export$1898d4ed4a0ad45e(json) { return $7f511ec3e65390ff$export$4285315b0ce1487c(json, false); } function $7f511ec3e65390ff$export$4285315b0ce1487c(json, ignoreDiscriminator) { if (json === undefined || json === null) return json; return { "challenge_id": json["challenge_id"], "challenge_type": (0, $b363b7ab834bd8c5$export$7da7fa2b5d7d85f3)(json["challenge_type"]), "data": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "data") ? undefined : (0, $3db5004c7670a831$export$bb8ecc995265609e)(json["data"]) }; } function $7f511ec3e65390ff$export$9e8a349f91c23ca8(value) { if (value === undefined) return undefined; if (value === null) return null; return { "challenge_id": value.challenge_id, "challenge_type": (0, $b363b7ab834bd8c5$export$e418cafec408031e)(value.challenge_type), "data": (0, $3db5004c7670a831$export$6da0bcef5e0a8fdb)(value.data) }; } /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ function $956987f39b6f2304$export$3e7a5827055f8c1f(value) { let isInstance = true; isInstance = isInstance && "password" in value; return isInstance; } function $956987f39b6f2304$export$531fea8f5c0d835d(json) { return $956987f39b6f2304$export$d9419205450c9d50(json, false); } function $956987f39b6f2304$export$d9419205450c9d50(json, ignoreDiscriminator) { if (json === undefined || json === null) return json; return { "password": json["password"] }; } function $956987f39b6f2304$export$b0b890df0497afa3(value) { if (value === undefined) return undefined; if (value === null) return null; return { "password": value.password }; } function $00a785ad0809c432$export$40bbbf642a3a69ad(value) { let isInstance = true; isInstance = isInstance && "challenge_id" in value; isInstance = isInstance && "challenge_type" in value; return isInstance; } function $00a785ad0809c432$export$5d2326fd568db8d0(json) { return $00a785ad0809c432$export$d45d032a25047716(json, false); } function $00a785ad0809c432$export$d45d032a25047716(json, ignoreDiscriminator) { if (json === undefined || json === null) return json; return { "challenge_id": json["challenge_id"], "challenge_type": (0, $b363b7ab834bd8c5$export$7da7fa2b5d7d85f3)(json["challenge_type"]), "data": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "data") ? undefined : (0, $956987f39b6f2304$export$531fea8f5c0d835d)(json["data"]) }; } function $00a785ad0809c432$export$7b6f5d07bfad78e9(value) { if (value === undefined) return undefined; if (value === null) return null; return { "challenge_id": value.challenge_id, "challenge_type": (0, $b363b7ab834bd8c5$export$e418cafec408031e)(value.challenge_type), "data": (0, $956987f39b6f2304$export$b0b890df0497afa3)(value.data) }; } /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ function $fc7cb65d320cb95c$export$a964533c60d268fd(value) { let isInstance = true; isInstance = isInstance && "password" in value; return isInstance; } function $fc7cb65d320cb95c$export$fe9d75047753248b(json) { return $fc7cb65d320cb95c$export$756838b7787a84f1(json, false); } function $fc7cb65d320cb95c$export$756838b7787a84f1(json, ignoreDiscriminator) { if (json === undefined || json === null) return json; return { "password": json["password"] }; } function $fc7cb65d320cb95c$export$69b7ca2907b53e3d(value) { if (value === undefined) return undefined; if (value === null) return null; return { "password": value.password }; } function $0825d888daf6fc8b$export$c8ecde44d2fa41f4(value) { let isInstance = true; isInstance = isInstance && "challenge_id" in value; isInstance = isInstance && "challenge_type" in value; return isInstance; } function $0825d888daf6fc8b$export$17063cb6a2c93912(json) { return $0825d888daf6fc8b$export$539bcbef6d641f12(json, false); } function $0825d888daf6fc8b$export$539bcbef6d641f12(json, ignoreDiscriminator) { if (json === undefined || json === null) return json; return { "challenge_id": json["challenge_id"], "challenge_type": (0, $b363b7ab834bd8c5$export$7da7fa2b5d7d85f3)(json["challenge_type"]), "data": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "data") ? undefined : (0, $fc7cb65d320cb95c$export$fe9d75047753248b)(json["data"]) }; } function $0825d888daf6fc8b$export$751a8f178b8690f0(value) { if (value === undefined) return undefined; if (value === null) return null; return { "challenge_id": value.challenge_id, "challenge_type": (0, $b363b7ab834bd8c5$export$e418cafec408031e)(value.challenge_type), "data": (0, $fc7cb65d320cb95c$export$69b7ca2907b53e3d)(value.data) }; } /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ function $03e918cd2ef512e5$export$486889bd75e3b780(value) { let isInstance = true; isInstance = isInstance && "password" in value; return isInstance; } function $03e918cd2ef512e5$export$3fe1672863804c9d(json) { return $03e918cd2ef512e5$export$f4579e3d10a997c7(json, false); } function $03e918cd2ef512e5$export$f4579e3d10a997c7(json, ignoreDiscriminator) { if (json === undefined || json === null) return json; return { "password": json["password"] }; } function $03e918cd2ef512e5$export$27fad2cccc00f212(value) { if (value === undefined) return undefined; if (value === null) return null; return { "password": value.password }; } function $c5bcd6e96f6ae639$export$52d6565f54833912(value) { let isInstance = true; isInstance = isInstance && "challenge_id" in value; isInstance = isInstance && "challenge_type" in value; return isInstance; } function $c5bcd6e96f6ae639$export$6d7d3f7497bac8da(json) { return $c5bcd6e96f6ae639$export$10d1c2ecf0d72392(json, false); } function $c5bcd6e96f6ae639$export$10d1c2ecf0d72392(json, ignoreDiscriminator) { if (json === undefined || json === null) return json; return { "challenge_id": json["challenge_id"], "challenge_type": (0, $b363b7ab834bd8c5$export$7da7fa2b5d7d85f3)(json["challenge_type"]), "data": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "data") ? undefined : (0, $03e918cd2ef512e5$export$3fe1672863804c9d)(json["data"]) }; } function $c5bcd6e96f6ae639$export$b7b281ec8692f580(value) { if (value === undefined) return undefined; if (value === null) return null; return { "challenge_id": value.challenge_id, "challenge_type": (0, $b363b7ab834bd8c5$export$e418cafec408031e)(value.challenge_type), "data": (0, $03e918cd2ef512e5$export$27fad2cccc00f212)(value.data) }; } /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /* tslint:disable */ /* eslint-disable */ /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ function $64df61297c99d9d6$export$92ceb7a6bfbf2d2d(value) { let isInstance = true; return isInstance; } function $64df61297c99d9d6$export$ef169f01af6d5676(json) { return $64df61297c99d9d6$export$54cbfb7c20102b70(json, false); } function $64df61297c99d9d6$export$54cbfb7c20102b70(json, ignoreDiscriminator) { if (json === undefined || json === null) return json; return { "otp": !(0, $5cdab462eea9e370$export$f7e9f41ea797a17)(json, "otp") ? undefined : json["otp"] }; } function $64df6