Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fusionauth/typescript-client

Package Overview
Dependencies
Maintainers
3
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fusionauth/typescript-client - npm Package Compare versions

Comparing version 1.17.3 to 1.18.0

12

build/src/DefaultRESTClient.js
"use strict";
/*
* Copyright (c) 2019, FusionAuth, All Rights Reserved
* Copyright (c) 2019-2020, FusionAuth, All Rights Reserved
*

@@ -29,2 +29,3 @@ * Licensed under the Apache License, Version 2.0 (the "License");

const node_fetch_1 = require("node-fetch");
const url_1 = require("url");
/**

@@ -84,2 +85,11 @@ * @author Brett P

withFormData(body) {
const body2 = new url_1.URLSearchParams();
if (body) {
body.forEach((value, name, searchParams) => {
if (value && value.length > 0 && value != "null" && value != "undefined") {
body2.set(name, value);
}
});
body = body2;
}
this.body = body;

@@ -86,0 +96,0 @@ this.withHeader('Content-Type', 'application/x-www-form-urlencoded');

2

dist/fusionauth-typescript-client.min.js

@@ -1,1 +0,1 @@

(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.FusionAuth=f()}})(function(){var define,module,exports;return function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r}()({1:[function(require,module,exports){"use strict";function __export(e){for(var r in e)exports.hasOwnProperty(r)||(exports[r]=e[r])}Object.defineProperty(exports,"__esModule",{value:!0});var FusionAuthClient_1=require("./src/FusionAuthClient");exports.default=FusionAuthClient_1.default,__export(require("./src/FusionAuthClient")),__export(require("./src/DefaultRESTClientBuilder")),__export(require("./src/ClientResponse"))},{"./src/ClientResponse":3,"./src/DefaultRESTClientBuilder":5,"./src/FusionAuthClient":6}],2:[function(require,module,exports){(function(global){"use strict";var getGlobal=function(){if(typeof self!=="undefined"){return self}if(typeof window!=="undefined"){return window}if(typeof global!=="undefined"){return global}throw new Error("unable to locate global object")};var global=getGlobal();module.exports=exports=global.fetch;exports.default=global.fetch.bind(global);exports.Headers=global.Headers;exports.Request=global.Request;exports.Response=global.Response}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],3:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var ClientResponse=function(){function e(){}return e.prototype.wasSuccessful=function(){return this.statusCode>=200&&this.statusCode<300},e}();exports.default=ClientResponse},{}],4:[function(require,module,exports){"use strict";var __awaiter=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(i,s){function o(t){try{u(n.next(t))}catch(t){s(t)}}function a(t){try{u(n.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(o,a)}u((n=n.apply(t,e||[])).next())})},__generator=this&&this.__generator||function(t,e){var r,n,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}};Object.defineProperty(exports,"__esModule",{value:!0});var ClientResponse_1=require("./ClientResponse"),node_fetch_1=require("node-fetch"),DefaultRESTClient=function(){function t(e){this.host=e,this.headers={},this.parameters={},this.responseHandler=t.JSONResponseHandler,this.errorResponseHandler=t.ErrorJSONResponseHandler}return t.prototype.withAuthorization=function(t){return null==t?this:(this.withHeader("Authorization",t),this)},t.prototype.withUriSegment=function(t){return null==t?this:(null===this.uri&&(this.uri=""),"/"!==this.uri.charAt(this.uri.length-1)&&(this.uri+="/"),this.uri=this.uri+t,this)},t.prototype.getFullUrl=function(){return this.host+this.uri+this.getQueryString()},t.prototype.withFormData=function(t){return this.body=t,this.withHeader("Content-Type","application/x-www-form-urlencoded"),this},t.prototype.withHeader=function(t,e){return this.headers[t]=e,this},t.prototype.withJSONBody=function(t){return this.body=JSON.stringify(t),this.withHeader("Content-Type","application/json"),this},t.prototype.withMethod=function(t){return this.method=t,this},t.prototype.withUri=function(t){return this.uri=t,this},t.prototype.withParameter=function(t,e){return this.parameters[t]=e,this},t.prototype.withCredentials=function(t){return this.credentials=t,this},t.prototype.withResponseHandler=function(t){return this.responseHandler=t,this},t.prototype.withErrorResponseHandler=function(t){return this.errorResponseHandler=t,this},t.prototype.go=function(){return __awaiter(this,void 0,void 0,function(){var t,e,r;return __generator(this,function(n){switch(n.label){case 0:t=new ClientResponse_1.default,n.label=1;case 1:return n.trys.push([1,7,,8]),[4,node_fetch_1.default(this.getFullUrl(),{method:this.method,headers:this.headers,body:this.body,credentials:this.credentials})];case 2:return(e=n.sent()).ok?[4,this.responseHandler(e)]:[3,4];case 3:return[2,n.sent()];case 4:return[4,this.errorResponseHandler(e)];case 5:throw n.sent();case 6:return[3,8];case 7:if((r=n.sent())instanceof ClientResponse_1.default)throw r;throw e&&(t.statusCode=e.status),t.exception=r,t;case 8:return[2]}})})},t.prototype.getQueryString=function(){var t="";for(var e in this.parameters)t+=0===t.length?"?":"&",t+=e+"="+encodeURIComponent(this.parameters[e]);return t},t.JSONResponseHandler=function(t){return __awaiter(this,void 0,void 0,function(){var e,r,n;return __generator(this,function(i){switch(i.label){case 0:return(e=new ClientResponse_1.default).statusCode=t.status,(r=t.headers.get("content-type"))&&r.startsWith("application/json")?(n=e,[4,t.json()]):[3,2];case 1:n.response=i.sent(),i.label=2;case 2:return[2,e]}})})},t.ErrorJSONResponseHandler=function(t){return __awaiter(this,void 0,void 0,function(){var e,r,n;return __generator(this,function(i){switch(i.label){case 0:return(e=new ClientResponse_1.default).statusCode=t.status,(r=t.headers.get("content-type"))&&r.startsWith("application/json")?(n=e,[4,t.json()]):[3,2];case 1:n.exception=i.sent(),i.label=2;case 2:return[2,e]}})})},t}();exports.default=DefaultRESTClient},{"./ClientResponse":3,"node-fetch":2}],5:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var DefaultRESTClient_1=require("./DefaultRESTClient"),DefaultRESTClientBuilder=function(){function e(){}return e.prototype.build=function(e){return new DefaultRESTClient_1.default(e)},e}();exports.default=DefaultRESTClientBuilder},{"./DefaultRESTClient":4}],6:[function(require,module,exports){(function(global){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Algorithm,BreachAction,BreachedPasswordStatus,BreachMatchMode,CanonicalizationMethod,ChangePasswordReason,ClientAuthenticationMethod,ConsentStatus,ContentStatus,DeviceType,EmailSecurityType,EventLogType,EventType,ExpiryUnit,FamilyRole,GrantType,HTTPMethod,IdentityProviderType,KeyAlgorithm,KeyType,LambdaType,LoginIdType,LogoutBehavior,OAuthErrorReason,OAuthErrorType,RefreshTokenExpirationPolicy,RefreshTokenUsagePolicy,SecureGeneratorType,Sort,TokenType,TransactionType,TwoFactorDelivery,UserActionPhase,UserState,DefaultRESTClientBuilder_1=require("./DefaultRESTClientBuilder"),url_1="undefined"!=typeof window?window.window:"undefined"!=typeof global?global.window:null,FusionAuthClient=function(){function t(t,e,i){this.apiKey=t,this.host=e,this.tenantId=i,this.clientBuilder=new DefaultRESTClientBuilder_1.default}return t.prototype.setTenantId=function(t){return this.tenantId=t,this},t.prototype.setRequestCredentials=function(t){return this.credentials=t,this},t.prototype.actionUser=function(t){return this.start().withUri("/api/user/action").withJSONBody(t).withMethod("POST").go()},t.prototype.addUserToFamily=function(t,e){return this.start().withUri("/api/user/family").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.cancelAction=function(t,e){return this.start().withUri("/api/user/action").withUriSegment(t).withJSONBody(e).withMethod("DELETE").go()},t.prototype.changePassword=function(t,e){return this.start().withUri("/api/user/change-password").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.changePasswordByIdentity=function(t){return this.start().withUri("/api/user/change-password").withJSONBody(t).withMethod("POST").go()},t.prototype.commentOnUser=function(t){return this.start().withUri("/api/user/comment").withJSONBody(t).withMethod("POST").go()},t.prototype.createApplication=function(t,e){return this.start().withUri("/api/application").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createApplicationRole=function(t,e,i){return this.start().withUri("/api/application").withUriSegment(t).withUriSegment("role").withUriSegment(e).withJSONBody(i).withMethod("POST").go()},t.prototype.createAuditLog=function(t){return this.start().withUri("/api/system/audit-log").withJSONBody(t).withMethod("POST").go()},t.prototype.createConsent=function(t,e){return this.start().withUri("/api/consent").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createEmailTemplate=function(t,e){return this.start().withUri("/api/email/template").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createFamily=function(t,e){return this.start().withUri("/api/user/family").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createGroup=function(t,e){return this.start().withUri("/api/group").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createGroupMembers=function(t){return this.start().withUri("/api/group/member").withJSONBody(t).withMethod("POST").go()},t.prototype.createIdentityProvider=function(t,e){return this.start().withUri("/api/identity-provider").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createLambda=function(t,e){return this.start().withUri("/api/lambda").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createTenant=function(t,e){return this.start().withUri("/api/tenant").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createTheme=function(t,e){return this.start().withUri("/api/theme").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createUser=function(t,e){return this.start().withUri("/api/user").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createUserAction=function(t,e){return this.start().withUri("/api/user-action").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createUserActionReason=function(t,e){return this.start().withUri("/api/user-action-reason").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createUserConsent=function(t,e){return this.start().withUri("/api/user/consent").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createWebhook=function(t,e){return this.start().withUri("/api/webhook").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.deactivateApplication=function(t){return this.start().withUri("/api/application").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deactivateUser=function(t){return this.start().withUri("/api/user").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deactivateUserAction=function(t){return this.start().withUri("/api/user-action").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deactivateUsers=function(t){return this.start().withUri("/api/user/bulk").withParameter("userId",t).withParameter("dryRun",!1).withParameter("hardDelete",!1).withMethod("DELETE").go()},t.prototype.deactivateUsersByIds=function(t){return this.start().withUri("/api/user/bulk").withParameter("userId",t).withParameter("dryRun",!1).withParameter("hardDelete",!1).withMethod("DELETE").go()},t.prototype.deleteApplication=function(t){return this.start().withUri("/api/application").withUriSegment(t).withParameter("hardDelete",!0).withMethod("DELETE").go()},t.prototype.deleteApplicationRole=function(t,e){return this.start().withUri("/api/application").withUriSegment(t).withUriSegment("role").withUriSegment(e).withMethod("DELETE").go()},t.prototype.deleteConsent=function(t){return this.start().withUri("/api/consent").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deleteEmailTemplate=function(t){return this.start().withUri("/api/email/template").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deleteGroup=function(t){return this.start().withUri("/api/group").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deleteGroupMembers=function(t){return this.start().withUri("/api/group/member").withJSONBody(t).withMethod("DELETE").go()},t.prototype.deleteIdentityProvider=function(t){return this.start().withUri("/api/identity-provider").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deleteKey=function(t){return this.start().withUri("/api/key").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deleteLambda=function(t){return this.start().withUri("/api/lambda").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deleteRegistration=function(t,e){return this.start().withUri("/api/user/registration").withUriSegment(t).withUriSegment(e).withMethod("DELETE").go()},t.prototype.deleteTenant=function(t){return this.start().withUri("/api/tenant").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deleteTheme=function(t){return this.start().withUri("/api/theme").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deleteUser=function(t){return this.start().withUri("/api/user").withUriSegment(t).withParameter("hardDelete",!0).withMethod("DELETE").go()},t.prototype.deleteUserAction=function(t){return this.start().withUri("/api/user-action").withUriSegment(t).withParameter("hardDelete",!0).withMethod("DELETE").go()},t.prototype.deleteUserActionReason=function(t){return this.start().withUri("/api/user-action-reason").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deleteUsers=function(t){return this.start().withUri("/api/user/bulk").withJSONBody(t).withMethod("DELETE").go()},t.prototype.deleteUsersByQuery=function(t){return this.start().withUri("/api/user/bulk").withJSONBody(t).withMethod("DELETE").go()},t.prototype.deleteWebhook=function(t){return this.start().withUri("/api/webhook").withUriSegment(t).withMethod("DELETE").go()},t.prototype.disableTwoFactor=function(t,e){return this.start().withUri("/api/user/two-factor").withParameter("userId",t).withParameter("code",e).withMethod("DELETE").go()},t.prototype.enableTwoFactor=function(t,e){return this.start().withUri("/api/user/two-factor").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.exchangeOAuthCodeForAccessToken=function(t,e,i,r){var o=new url_1.URLSearchParams;return o.append("code",t),o.append("client_id",e),o.append("client_secret",i),o.append("grant_type","authorization_code"),o.append("redirect_uri",r),this.startAnonymous().withUri("/oauth2/token").withFormData(o).withMethod("POST").go()},t.prototype.exchangeRefreshTokenForAccessToken=function(t,e,i,r,o){var n=new url_1.URLSearchParams;return n.append("refresh_token",t),n.append("client_id",e),n.append("client_secret",i),n.append("grant_type","refresh_token"),n.append("scope",r),n.append("user_code",o),this.startAnonymous().withUri("/oauth2/token").withFormData(n).withMethod("POST").go()},t.prototype.exchangeRefreshTokenForJWT=function(t){return this.startAnonymous().withUri("/api/jwt/refresh").withJSONBody(t).withMethod("POST").go()},t.prototype.exchangeUserCredentialsForAccessToken=function(t,e,i,r,o,n){var a=new url_1.URLSearchParams;return a.append("username",t),a.append("password",e),a.append("client_id",i),a.append("client_secret",r),a.append("grant_type","password"),a.append("scope",o),a.append("user_code",n),this.startAnonymous().withUri("/oauth2/token").withFormData(a).withMethod("POST").go()},t.prototype.forgotPassword=function(t){return this.start().withUri("/api/user/forgot-password").withJSONBody(t).withMethod("POST").go()},t.prototype.generateEmailVerificationId=function(t){return this.start().withUri("/api/user/verify-email").withParameter("email",t).withParameter("sendVerifyEmail",!1).withMethod("PUT").go()},t.prototype.generateKey=function(t,e){return this.start().withUri("/api/key/generate").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.generateRegistrationVerificationId=function(t,e){return this.start().withUri("/api/user/verify-registration").withParameter("email",t).withParameter("sendVerifyPasswordEmail",!1).withParameter("applicationId",e).withMethod("PUT").go()},t.prototype.generateTwoFactorSecret=function(){return this.start().withUri("/api/two-factor/secret").withMethod("GET").go()},t.prototype.generateTwoFactorSecretUsingJWT=function(t){return this.start().withUri("/api/two-factor/secret").withAuthorization("JWT "+t).withMethod("GET").go()},t.prototype.identityProviderLogin=function(t){return this.startAnonymous().withUri("/api/identity-provider/login").withJSONBody(t).withMethod("POST").go()},t.prototype.importKey=function(t,e){return this.start().withUri("/api/key/import").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.importUsers=function(t){return this.start().withUri("/api/user/import").withJSONBody(t).withMethod("POST").go()},t.prototype.issueJWT=function(t,e,i){return this.start().withUri("/api/jwt/issue").withAuthorization("JWT "+e).withParameter("applicationId",t).withParameter("refreshToken",i).withMethod("GET").go()},t.prototype.login=function(t){return this.start().withUri("/api/login").withJSONBody(t).withMethod("POST").go()},t.prototype.loginPing=function(t,e,i){return this.start().withUri("/api/login").withUriSegment(t).withUriSegment(e).withParameter("ipAddress",i).withMethod("PUT").go()},t.prototype.logout=function(t,e){return this.startAnonymous().withHeader("Content-Type","text/plain").withUri("/api/logout").withParameter("global",t).withParameter("refreshToken",e).withMethod("POST").go()},t.prototype.lookupIdentityProvider=function(t){return this.start().withUri("/api/identity-provider/lookup").withParameter("domain",t).withMethod("GET").go()},t.prototype.modifyAction=function(t,e){return this.start().withUri("/api/user/action").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.passwordlessLogin=function(t){return this.startAnonymous().withUri("/api/passwordless/login").withJSONBody(t).withMethod("POST").go()},t.prototype.patchApplication=function(t,e){return this.start().withUri("/api/application").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.patchApplicationRole=function(t,e,i){return this.start().withUri("/api/application").withUriSegment(t).withUriSegment("role").withUriSegment(e).withJSONBody(i).withMethod("PATCH").go()},t.prototype.patchConsent=function(t,e){return this.start().withUri("/api/consent").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.patchEmailTemplate=function(t,e){return this.start().withUri("/api/email/template").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.patchGroup=function(t,e){return this.start().withUri("/api/group").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.patchIdentityProvider=function(t,e){return this.start().withUri("/api/identity-provider").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.patchIntegrations=function(t){return this.start().withUri("/api/integration").withJSONBody(t).withMethod("PATCH").go()},t.prototype.patchLambda=function(t,e){return this.start().withUri("/api/lambda").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.patchRegistration=function(t,e){return this.start().withUri("/api/user/registration").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.patchSystemConfiguration=function(t){return this.start().withUri("/api/system-configuration").withJSONBody(t).withMethod("PATCH").go()},t.prototype.patchTenant=function(t,e){return this.start().withUri("/api/tenant").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.patchTheme=function(t,e){return this.start().withUri("/api/theme").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.patchUser=function(t,e){return this.start().withUri("/api/user").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.patchUserAction=function(t,e){return this.start().withUri("/api/user-action").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.patchUserActionReason=function(t,e){return this.start().withUri("/api/user-action-reason").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.patchUserConsent=function(t,e){return this.start().withUri("/api/user/consent").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.reactivateApplication=function(t){return this.start().withUri("/api/application").withUriSegment(t).withParameter("reactivate",!0).withMethod("PUT").go()},t.prototype.reactivateUser=function(t){return this.start().withUri("/api/user").withUriSegment(t).withParameter("reactivate",!0).withMethod("PUT").go()},t.prototype.reactivateUserAction=function(t){return this.start().withUri("/api/user-action").withUriSegment(t).withParameter("reactivate",!0).withMethod("PUT").go()},t.prototype.reconcileJWT=function(t){return this.startAnonymous().withUri("/api/jwt/reconcile").withJSONBody(t).withMethod("POST").go()},t.prototype.refreshUserSearchIndex=function(){return this.start().withUri("/api/user/search").withMethod("PUT").go()},t.prototype.register=function(t,e){return this.start().withUri("/api/user/registration").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.removeUserFromFamily=function(t,e){return this.start().withUri("/api/user/family").withUriSegment(t).withUriSegment(e).withMethod("DELETE").go()},t.prototype.resendEmailVerification=function(t){return this.start().withUri("/api/user/verify-email").withParameter("email",t).withMethod("PUT").go()},t.prototype.resendRegistrationVerification=function(t,e){return this.start().withUri("/api/user/verify-registration").withParameter("email",t).withParameter("applicationId",e).withMethod("PUT").go()},t.prototype.retrieveAction=function(t){return this.start().withUri("/api/user/action").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveActions=function(t){return this.start().withUri("/api/user/action").withParameter("userId",t).withMethod("GET").go()},t.prototype.retrieveActionsPreventingLogin=function(t){return this.start().withUri("/api/user/action").withParameter("userId",t).withParameter("preventingLogin",!0).withMethod("GET").go()},t.prototype.retrieveActiveActions=function(t){return this.start().withUri("/api/user/action").withParameter("userId",t).withParameter("active",!0).withMethod("GET").go()},t.prototype.retrieveApplication=function(t){return this.start().withUri("/api/application").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveApplications=function(){return this.start().withUri("/api/application").withMethod("GET").go()},t.prototype.retrieveAuditLog=function(t){return this.start().withUri("/api/system/audit-log").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveConsent=function(t){return this.start().withUri("/api/consent").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveConsents=function(){return this.start().withUri("/api/consent").withMethod("GET").go()},t.prototype.retrieveDailyActiveReport=function(t,e,i){return this.start().withUri("/api/report/daily-active-user").withParameter("applicationId",t).withParameter("start",e).withParameter("end",i).withMethod("GET").go()},t.prototype.retrieveEmailTemplate=function(t){return this.start().withUri("/api/email/template").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveEmailTemplatePreview=function(t){return this.start().withUri("/api/email/template/preview").withJSONBody(t).withMethod("POST").go()},t.prototype.retrieveEmailTemplates=function(){return this.start().withUri("/api/email/template").withMethod("GET").go()},t.prototype.retrieveEventLog=function(t){return this.start().withUri("/api/system/event-log").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveFamilies=function(t){return this.start().withUri("/api/user/family").withParameter("userId",t).withMethod("GET").go()},t.prototype.retrieveFamilyMembersByFamilyId=function(t){return this.start().withUri("/api/user/family").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveGroup=function(t){return this.start().withUri("/api/group").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveGroups=function(){return this.start().withUri("/api/group").withMethod("GET").go()},t.prototype.retrieveIdentityProvider=function(t){return this.start().withUri("/api/identity-provider").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveIdentityProviders=function(){return this.start().withUri("/api/identity-provider").withMethod("GET").go()},t.prototype.retrieveInactiveActions=function(t){return this.start().withUri("/api/user/action").withParameter("userId",t).withParameter("active",!1).withMethod("GET").go()},t.prototype.retrieveInactiveApplications=function(){return this.start().withUri("/api/application").withParameter("inactive",!0).withMethod("GET").go()},t.prototype.retrieveInactiveUserActions=function(){return this.start().withUri("/api/user-action").withParameter("inactive",!0).withMethod("GET").go()},t.prototype.retrieveIntegration=function(){return this.start().withUri("/api/integration").withMethod("GET").go()},t.prototype.retrieveJWTPublicKey=function(t){return this.startAnonymous().withUri("/api/jwt/public-key").withParameter("kid",t).withMethod("GET").go()},t.prototype.retrieveJWTPublicKeyByApplicationId=function(t){return this.startAnonymous().withUri("/api/jwt/public-key").withParameter("applicationId",t).withMethod("GET").go()},t.prototype.retrieveJWTPublicKeys=function(){return this.startAnonymous().withUri("/api/jwt/public-key").withMethod("GET").go()},t.prototype.retrieveJsonWebKeySet=function(){return this.startAnonymous().withUri("/.well-known/jwks.json").withMethod("GET").go()},t.prototype.retrieveKey=function(t){return this.start().withUri("/api/key").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveKeys=function(){return this.start().withUri("/api/key").withMethod("GET").go()},t.prototype.retrieveLambda=function(t){return this.start().withUri("/api/lambda").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveLambdas=function(){return this.start().withUri("/api/lambda").withMethod("GET").go()},t.prototype.retrieveLambdasByType=function(t){return this.start().withUri("/api/lambda").withParameter("type",t).withMethod("GET").go()},t.prototype.retrieveLoginReport=function(t,e,i){return this.start().withUri("/api/report/login").withParameter("applicationId",t).withParameter("start",e).withParameter("end",i).withMethod("GET").go()},t.prototype.retrieveMonthlyActiveReport=function(t,e,i){return this.start().withUri("/api/report/monthly-active-user").withParameter("applicationId",t).withParameter("start",e).withParameter("end",i).withMethod("GET").go()},t.prototype.retrieveOauthConfiguration=function(t){return this.start().withUri("/api/application").withUriSegment(t).withUriSegment("oauth-configuration").withMethod("GET").go()},t.prototype.retrieveOpenIdConfiguration=function(){return this.startAnonymous().withUri("/.well-known/openid-configuration").withMethod("GET").go()},t.prototype.retrievePasswordValidationRules=function(){return this.startAnonymous().withUri("/api/tenant/password-validation-rules").withMethod("GET").go()},t.prototype.retrievePasswordValidationRulesWithTenantId=function(t){return this.startAnonymous().withUri("/api/tenant/password-validation-rules").withUriSegment(t).withMethod("GET").go()},t.prototype.retrievePendingChildren=function(t){return this.start().withUri("/api/user/family/pending").withParameter("parentEmail",t).withMethod("GET").go()},t.prototype.retrieveRecentLogins=function(t,e){return this.start().withUri("/api/user/recent-login").withParameter("offset",t).withParameter("limit",e).withMethod("GET").go()},t.prototype.retrieveRefreshTokens=function(t){return this.start().withUri("/api/jwt/refresh").withParameter("userId",t).withMethod("GET").go()},t.prototype.retrieveRegistration=function(t,e){return this.start().withUri("/api/user/registration").withUriSegment(t).withUriSegment(e).withMethod("GET").go()},t.prototype.retrieveRegistrationReport=function(t,e,i){return this.start().withUri("/api/report/registration").withParameter("applicationId",t).withParameter("start",e).withParameter("end",i).withMethod("GET").go()},t.prototype.retrieveSystemConfiguration=function(){return this.start().withUri("/api/system-configuration").withMethod("GET").go()},t.prototype.retrieveTenant=function(t){return this.start().withUri("/api/tenant").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveTenants=function(){return this.start().withUri("/api/tenant").withMethod("GET").go()},t.prototype.retrieveTheme=function(t){return this.start().withUri("/api/theme").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveThemes=function(){return this.start().withUri("/api/theme").withMethod("GET").go()},t.prototype.retrieveTotalReport=function(){return this.start().withUri("/api/report/totals").withMethod("GET").go()},t.prototype.retrieveUser=function(t){return this.start().withUri("/api/user").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveUserAction=function(t){return this.start().withUri("/api/user-action").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveUserActionReason=function(t){return this.start().withUri("/api/user-action-reason").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveUserActionReasons=function(){return this.start().withUri("/api/user-action-reason").withMethod("GET").go()},t.prototype.retrieveUserActions=function(){return this.start().withUri("/api/user-action").withMethod("GET").go()},t.prototype.retrieveUserByChangePasswordId=function(t){return this.start().withUri("/api/user").withParameter("changePasswordId",t).withMethod("GET").go()},t.prototype.retrieveUserByEmail=function(t){return this.start().withUri("/api/user").withParameter("email",t).withMethod("GET").go()},t.prototype.retrieveUserByLoginId=function(t){return this.start().withUri("/api/user").withParameter("loginId",t).withMethod("GET").go()},t.prototype.retrieveUserByUsername=function(t){return this.start().withUri("/api/user").withParameter("username",t).withMethod("GET").go()},t.prototype.retrieveUserByVerificationId=function(t){return this.start().withUri("/api/user").withParameter("verificationId",t).withMethod("GET").go()},t.prototype.retrieveUserComments=function(t){return this.start().withUri("/api/user/comment").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveUserConsent=function(t){return this.start().withUri("/api/user/consent").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveUserConsents=function(t){return this.start().withUri("/api/user/consent").withParameter("userId",t).withMethod("GET").go()},t.prototype.retrieveUserLoginReport=function(t,e,i,r){return this.start().withUri("/api/report/login").withParameter("applicationId",t).withParameter("userId",e).withParameter("start",i).withParameter("end",r).withMethod("GET").go()},t.prototype.retrieveUserLoginReportByLoginId=function(t,e,i,r){return this.start().withUri("/api/report/login").withParameter("applicationId",t).withParameter("loginId",e).withParameter("start",i).withParameter("end",r).withMethod("GET").go()},t.prototype.retrieveUserRecentLogins=function(t,e,i){return this.start().withUri("/api/user/recent-login").withParameter("userId",t).withParameter("offset",e).withParameter("limit",i).withMethod("GET").go()},t.prototype.retrieveUserUsingJWT=function(t){return this.startAnonymous().withUri("/api/user").withAuthorization("JWT "+t).withMethod("GET").go()},t.prototype.retrieveWebhook=function(t){return this.start().withUri("/api/webhook").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveWebhooks=function(){return this.start().withUri("/api/webhook").withMethod("GET").go()},t.prototype.revokeRefreshToken=function(t,e,i){return this.start().withUri("/api/jwt/refresh").withParameter("token",t).withParameter("userId",e).withParameter("applicationId",i).withMethod("DELETE").go()},t.prototype.revokeUserConsent=function(t){return this.start().withUri("/api/user/consent").withUriSegment(t).withMethod("DELETE").go()},t.prototype.searchAuditLogs=function(t){return this.start().withUri("/api/system/audit-log/search").withJSONBody(t).withMethod("POST").go()},t.prototype.searchEventLogs=function(t){return this.start().withUri("/api/system/event-log/search").withJSONBody(t).withMethod("POST").go()},t.prototype.searchLoginRecords=function(t){return this.start().withUri("/api/system/login-record/search").withJSONBody(t).withMethod("POST").go()},t.prototype.searchUsers=function(t){return this.start().withUri("/api/user/search").withParameter("ids",t).withMethod("GET").go()},t.prototype.searchUsersByIds=function(t){return this.start().withUri("/api/user/search").withParameter("ids",t).withMethod("GET").go()},t.prototype.searchUsersByQuery=function(t){return this.start().withUri("/api/user/search").withJSONBody(t).withMethod("POST").go()},t.prototype.searchUsersByQueryString=function(t){return this.start().withUri("/api/user/search").withJSONBody(t).withMethod("POST").go()},t.prototype.sendEmail=function(t,e){return this.start().withUri("/api/email/send").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.sendFamilyRequestEmail=function(t){return this.start().withUri("/api/user/family/request").withJSONBody(t).withMethod("POST").go()},t.prototype.sendPasswordlessCode=function(t){return this.startAnonymous().withUri("/api/passwordless/send").withJSONBody(t).withMethod("POST").go()},t.prototype.sendTwoFactorCode=function(t){return this.start().withUri("/api/two-factor/send").withJSONBody(t).withMethod("POST").go()},t.prototype.sendTwoFactorCodeForLogin=function(t){return this.startAnonymous().withHeader("Content-Type","text/plain").withUri("/api/two-factor/send").withUriSegment(t).withMethod("POST").go()},t.prototype.startIdentityProviderLogin=function(t){return this.start().withUri("/api/identity-provider/start").withJSONBody(t).withMethod("POST").go()},t.prototype.startPasswordlessLogin=function(t){return this.start().withUri("/api/passwordless/start").withJSONBody(t).withMethod("POST").go()},t.prototype.twoFactorLogin=function(t){return this.startAnonymous().withUri("/api/two-factor/login").withJSONBody(t).withMethod("POST").go()},t.prototype.updateApplication=function(t,e){return this.start().withUri("/api/application").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateApplicationRole=function(t,e,i){return this.start().withUri("/api/application").withUriSegment(t).withUriSegment("role").withUriSegment(e).withJSONBody(i).withMethod("PUT").go()},t.prototype.updateConsent=function(t,e){return this.start().withUri("/api/consent").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateEmailTemplate=function(t,e){return this.start().withUri("/api/email/template").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateGroup=function(t,e){return this.start().withUri("/api/group").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateIdentityProvider=function(t,e){return this.start().withUri("/api/identity-provider").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateIntegrations=function(t){return this.start().withUri("/api/integration").withJSONBody(t).withMethod("PUT").go()},t.prototype.updateKey=function(t,e){return this.start().withUri("/api/key").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateLambda=function(t,e){return this.start().withUri("/api/lambda").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateRegistration=function(t,e){return this.start().withUri("/api/user/registration").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateSystemConfiguration=function(t){return this.start().withUri("/api/system-configuration").withJSONBody(t).withMethod("PUT").go()},t.prototype.updateTenant=function(t,e){return this.start().withUri("/api/tenant").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateTheme=function(t,e){return this.start().withUri("/api/theme").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateUser=function(t,e){return this.start().withUri("/api/user").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateUserAction=function(t,e){return this.start().withUri("/api/user-action").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateUserActionReason=function(t,e){return this.start().withUri("/api/user-action-reason").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateUserConsent=function(t,e){return this.start().withUri("/api/user/consent").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateWebhook=function(t,e){return this.start().withUri("/api/webhook").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.validateDevice=function(t,e){return this.startAnonymous().withUri("/oauth2/device/validate").withParameter("user_code",t).withParameter("client_id",e).withMethod("GET").go()},t.prototype.validateJWT=function(t){return this.startAnonymous().withUri("/api/jwt/validate").withAuthorization("JWT "+t).withMethod("GET").go()},t.prototype.verifyEmail=function(t){return this.startAnonymous().withHeader("Content-Type","text/plain").withUri("/api/user/verify-email").withUriSegment(t).withMethod("POST").go()},t.prototype.verifyRegistration=function(t){return this.startAnonymous().withHeader("Content-Type","text/plain").withUri("/api/user/verify-registration").withUriSegment(t).withMethod("POST").go()},t.prototype.start=function(){return this.startAnonymous().withAuthorization(this.apiKey)},t.prototype.startAnonymous=function(){var t=this.clientBuilder.build(this.host);return null!=this.tenantId&&t.withHeader("X-FusionAuth-TenantId",this.tenantId),null!=this.credentials&&t.withCredentials(this.credentials),t},t}();exports.FusionAuthClient=FusionAuthClient,exports.default=FusionAuthClient,function(t){t.ES256="SHA256withECDSA",t.ES384="SHA384withECDSA",t.ES512="SHA512withECDSA",t.HS256="HmacSHA256",t.HS384="HmacSHA384",t.HS512="HmacSHA512",t.RS256="SHA256withRSA",t.RS384="SHA384withRSA",t.RS512="SHA512withRSA",t.none="None"}(Algorithm=exports.Algorithm||(exports.Algorithm={})),function(t){t.Off="Off",t.RecordOnly="RecordOnly",t.NotifyUser="NotifyUser",t.RequireChange="RequireChange"}(BreachAction=exports.BreachAction||(exports.BreachAction={})),function(t){t.None="None",t.ExactMatch="ExactMatch",t.SubAddressMatch="SubAddressMatch",t.PasswordOnly="PasswordOnly",t.CommonPassword="CommonPassword"}(BreachedPasswordStatus=exports.BreachedPasswordStatus||(exports.BreachedPasswordStatus={})),function(t){t.Low="Low",t.Medium="Medium",t.High="High"}(BreachMatchMode=exports.BreachMatchMode||(exports.BreachMatchMode={})),function(t){t.exclusive="exclusive",t.exclusive_with_comments="exclusive_with_comments",t.inclusive="inclusive",t.inclusive_with_comments="inclusive_with_comments"}(CanonicalizationMethod=exports.CanonicalizationMethod||(exports.CanonicalizationMethod={})),function(t){t.Administrative="Administrative",t.Breached="Breached",t.Expired="Expired",t.Validation="Validation"}(ChangePasswordReason=exports.ChangePasswordReason||(exports.ChangePasswordReason={})),function(t){t.none="none",t.client_secret_basic="client_secret_basic",t.client_secret_post="client_secret_post"}(ClientAuthenticationMethod=exports.ClientAuthenticationMethod||(exports.ClientAuthenticationMethod={})),function(t){t.Active="Active",t.Revoked="Revoked"}(ConsentStatus=exports.ConsentStatus||(exports.ConsentStatus={})),function(t){t.ACTIVE="ACTIVE",t.PENDING="PENDING",t.REJECTED="REJECTED"}(ContentStatus=exports.ContentStatus||(exports.ContentStatus={})),function(t){t.BROWSER="BROWSER",t.DESKTOP="DESKTOP",t.LAPTOP="LAPTOP",t.MOBILE="MOBILE",t.OTHER="OTHER",t.SERVER="SERVER",t.TABLET="TABLET",t.TV="TV",t.UNKNOWN="UNKNOWN"}(DeviceType=exports.DeviceType||(exports.DeviceType={})),function(t){t.NONE="NONE",t.SSL="SSL",t.TLS="TLS"}(EmailSecurityType=exports.EmailSecurityType||(exports.EmailSecurityType={})),function(t){t.Information="Information",t.Debug="Debug",t.Error="Error"}(EventLogType=exports.EventLogType||(exports.EventLogType={})),function(t){t.UserDelete="user.delete",t.UserCreate="user.create",t.UserUpdate="user.update",t.UserDeactivate="user.deactivate",t.UserBulkCreate="user.bulk.create",t.UserReactivate="user.reactivate",t.UserAction="user.action",t.JWTRefreshTokenRevoke="jwt.refresh-token.revoke",t.JWTRefresh="jwt.refresh",t.JWTPublicKeyUpdate="jwt.public-key.update",t.UserLoginSuccess="user.login.success",t.UserLoginFailed="user.login.failed",t.UserRegistrationCreate="user.registration.create",t.UserRegistrationUpdate="user.registration.update",t.UserRegistrationDelete="user.registration.delete",t.UserRegistrationVerified="user.registration.verified",t.UserEmailVerified="user.email.verified",t.UserPasswordBreach="user.password.breach",t.Test="test"}(EventType=exports.EventType||(exports.EventType={})),function(t){t.MINUTES="MINUTES",t.HOURS="HOURS",t.DAYS="DAYS",t.WEEKS="WEEKS",t.MONTHS="MONTHS",t.YEARS="YEARS"}(ExpiryUnit=exports.ExpiryUnit||(exports.ExpiryUnit={})),function(t){t.Child="Child",t.Teen="Teen",t.Adult="Adult"}(FamilyRole=exports.FamilyRole||(exports.FamilyRole={})),function(t){t.authorization_code="authorization_code",t.implicit="implicit",t.password="password",t.client_credentials="client_credentials",t.refresh_token="refresh_token",t.unknown="unknown",t.device_code="urn:ietf:params:oauth:grant-type:device_code"}(GrantType=exports.GrantType||(exports.GrantType={})),function(t){t.GET="GET",t.POST="POST",t.PUT="PUT",t.DELETE="DELETE",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.PATCH="PATCH"}(HTTPMethod=exports.HTTPMethod||(exports.HTTPMethod={})),function(t){t.ExternalJWT="ExternalJWT",t.OpenIDConnect="OpenIDConnect",t.Facebook="Facebook",t.Google="Google",t.Twitter="Twitter",t.SAMLv2="SAMLv2",t.HYPR="HYPR",t.Apple="Apple"}(IdentityProviderType=exports.IdentityProviderType||(exports.IdentityProviderType={})),function(t){t.ES256="SHA256withECDSA",t.ES384="SHA384withECDSA",t.ES512="SHA512withECDSA",t.HS256="HmacSHA256",t.HS384="HmacSHA384",t.HS512="HmacSHA512",t.RS256="SHA256withRSA",t.RS384="SHA384withRSA",t.RS512="SHA512withRSA"}(KeyAlgorithm=exports.KeyAlgorithm||(exports.KeyAlgorithm={})),function(t){t.EC="EC",t.RSA="RSA",t.HMAC="HMAC"}(KeyType=exports.KeyType||(exports.KeyType={})),function(t){t.JWTPopulate="JWTPopulate",t.OpenIDReconcile="OpenIDReconcile",t.SAMLv2Reconcile="SAMLv2Reconcile",t.SAMLv2Populate="SAMLv2Populate",t.AppleReconcile="AppleReconcile",t.ExternalJWTReconcile="ExternalJWTReconcile",t.FacebookReconcile="FacebookReconcile",t.GoogleReconcile="GoogleReconcile",t.HYPRReconcile="HYPRReconcile",t.TwitterReconcile="TwitterReconcile"}(LambdaType=exports.LambdaType||(exports.LambdaType={})),function(t){t.email="email",t.username="username"}(LoginIdType=exports.LoginIdType||(exports.LoginIdType={})),function(t){t.RedirectOnly="RedirectOnly",t.AllApplications="AllApplications"}(LogoutBehavior=exports.LogoutBehavior||(exports.LogoutBehavior={})),function(t){t.auth_code_not_found="auth_code_not_found",t.access_token_malformed="access_token_malformed",t.access_token_expired="access_token_expired",t.access_token_unavailable_for_processing="access_token_unavailable_for_processing",t.access_token_failed_processing="access_token_failed_processing",t.refresh_token_not_found="refresh_token_not_found",t.invalid_client_id="invalid_client_id",t.invalid_user_credentials="invalid_user_credentials",t.invalid_grant_type="invalid_grant_type",t.invalid_origin="invalid_origin",t.invalid_origin_opaque="invalid_origin_opaque",t.invalid_pkce_code_verifier="invalid_pkce_code_verifier",t.invalid_pkce_code_challenge="invalid_pkce_code_challenge",t.invalid_pkce_code_challenge_method="invalid_pkce_code_challenge_method",t.invalid_redirect_uri="invalid_redirect_uri",t.invalid_response_mode="invalid_response_mode",t.invalid_response_type="invalid_response_type",t.invalid_id_token_hint="invalid_id_token_hint",t.invalid_post_logout_redirect_uri="invalid_post_logout_redirect_uri",t.invalid_device_code="invalid_device_code",t.invalid_user_code="invalid_user_code",t.invalid_additional_client_id="invalid_additional_client_id",t.grant_type_disabled="grant_type_disabled",t.missing_client_id="missing_client_id",t.missing_code="missing_code",t.missing_device_code="missing_device_code",t.missing_grant_type="missing_grant_type",t.missing_redirect_uri="missing_redirect_uri",t.missing_refresh_token="missing_refresh_token",t.missing_response_type="missing_response_type",t.missing_token="missing_token",t.missing_user_code="missing_user_code",t.missing_verification_uri="missing_verification_uri",t.login_prevented="login_prevented",t.user_code_expired="user_code_expired",t.user_expired="user_expired",t.user_locked="user_locked",t.user_not_found="user_not_found",t.client_authentication_missing="client_authentication_missing",t.invalid_client_authentication_scheme="invalid_client_authentication_scheme",t.invalid_client_authentication="invalid_client_authentication",t.client_id_mismatch="client_id_mismatch",t.change_password_administrative="change_password_administrative",t.change_password_breached="change_password_breached",t.change_password_expired="change_password_expired",t.change_password_validation="change_password_validation",t.unknown="unknown"}(OAuthErrorReason=exports.OAuthErrorReason||(exports.OAuthErrorReason={})),function(t){t.invalid_request="invalid_request",t.invalid_client="invalid_client",t.invalid_grant="invalid_grant",t.invalid_token="invalid_token",t.unauthorized_client="unauthorized_client",t.invalid_scope="invalid_scope",t.server_error="server_error",t.unsupported_grant_type="unsupported_grant_type",t.unsupported_response_type="unsupported_response_type",t.change_password_required="change_password_required",t.two_factor_required="two_factor_required",t.authorization_pending="authorization_pending",t.expired_token="expired_token"}(OAuthErrorType=exports.OAuthErrorType||(exports.OAuthErrorType={})),function(t){t.Fixed="Fixed",t.SlidingWindow="SlidingWindow"}(RefreshTokenExpirationPolicy=exports.RefreshTokenExpirationPolicy||(exports.RefreshTokenExpirationPolicy={})),function(t){t.Reusable="Reusable",t.OneTimeUse="OneTimeUse"}(RefreshTokenUsagePolicy=exports.RefreshTokenUsagePolicy||(exports.RefreshTokenUsagePolicy={})),function(t){t.randomDigits="randomDigits",t.randomBytes="randomBytes",t.randomAlpha="randomAlpha",t.randomAlphaNumeric="randomAlphaNumeric"}(SecureGeneratorType=exports.SecureGeneratorType||(exports.SecureGeneratorType={})),function(t){t.asc="asc",t.desc="desc"}(Sort=exports.Sort||(exports.Sort={})),function(t){t.Bearer="Bearer",t.MAC="MAC"}(TokenType=exports.TokenType||(exports.TokenType={})),function(t){t.None="None",t.Any="Any",t.SimpleMajority="SimpleMajority",t.SuperMajority="SuperMajority",t.AbsoluteMajority="AbsoluteMajority"}(TransactionType=exports.TransactionType||(exports.TransactionType={})),function(t){t.None="None",t.TextMessage="TextMessage"}(TwoFactorDelivery=exports.TwoFactorDelivery||(exports.TwoFactorDelivery={})),function(t){t.start="start",t.modify="modify",t.cancel="cancel",t.end="end"}(UserActionPhase=exports.UserActionPhase||(exports.UserActionPhase={})),function(t){t.Authenticated="Authenticated",t.AuthenticatedNotRegistered="AuthenticatedNotRegistered"}(UserState=exports.UserState||(exports.UserState={}))}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./DefaultRESTClientBuilder":5}]},{},[1])(1)});
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.FusionAuth=f()}})(function(){var define,module,exports;return function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r}()({1:[function(require,module,exports){"use strict";function __export(e){for(var r in e)exports.hasOwnProperty(r)||(exports[r]=e[r])}Object.defineProperty(exports,"__esModule",{value:!0});var FusionAuthClient_1=require("./src/FusionAuthClient");exports.default=FusionAuthClient_1.default,__export(require("./src/FusionAuthClient")),__export(require("./src/DefaultRESTClientBuilder")),__export(require("./src/ClientResponse"))},{"./src/ClientResponse":3,"./src/DefaultRESTClientBuilder":5,"./src/FusionAuthClient":6}],2:[function(require,module,exports){(function(global){"use strict";var getGlobal=function(){if(typeof self!=="undefined"){return self}if(typeof window!=="undefined"){return window}if(typeof global!=="undefined"){return global}throw new Error("unable to locate global object")};var global=getGlobal();module.exports=exports=global.fetch;exports.default=global.fetch.bind(global);exports.Headers=global.Headers;exports.Request=global.Request;exports.Response=global.Response}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],3:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var ClientResponse=function(){function e(){}return e.prototype.wasSuccessful=function(){return this.statusCode>=200&&this.statusCode<300},e}();exports.default=ClientResponse},{}],4:[function(require,module,exports){(function(global){"use strict";var __awaiter=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(s,a)}u((r=r.apply(t,e||[])).next())})},__generator=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(exports,"__esModule",{value:!0});var ClientResponse_1=require("./ClientResponse"),node_fetch_1=require("node-fetch"),url_1="undefined"!=typeof window?window.window:"undefined"!=typeof global?global.window:null,DefaultRESTClient=function(){function t(e){this.host=e,this.headers={},this.parameters={},this.responseHandler=t.JSONResponseHandler,this.errorResponseHandler=t.ErrorJSONResponseHandler}return t.prototype.withAuthorization=function(t){return null==t?this:(this.withHeader("Authorization",t),this)},t.prototype.withUriSegment=function(t){return null==t?this:(null===this.uri&&(this.uri=""),"/"!==this.uri.charAt(this.uri.length-1)&&(this.uri+="/"),this.uri=this.uri+t,this)},t.prototype.getFullUrl=function(){return this.host+this.uri+this.getQueryString()},t.prototype.withFormData=function(t){var e=new url_1.URLSearchParams;return t&&(t.forEach(function(t,n,r){t&&t.length>0&&"null"!=t&&"undefined"!=t&&e.set(n,t)}),t=e),this.body=t,this.withHeader("Content-Type","application/x-www-form-urlencoded"),this},t.prototype.withHeader=function(t,e){return this.headers[t]=e,this},t.prototype.withJSONBody=function(t){return this.body=JSON.stringify(t),this.withHeader("Content-Type","application/json"),this},t.prototype.withMethod=function(t){return this.method=t,this},t.prototype.withUri=function(t){return this.uri=t,this},t.prototype.withParameter=function(t,e){return this.parameters[t]=e,this},t.prototype.withCredentials=function(t){return this.credentials=t,this},t.prototype.withResponseHandler=function(t){return this.responseHandler=t,this},t.prototype.withErrorResponseHandler=function(t){return this.errorResponseHandler=t,this},t.prototype.go=function(){return __awaiter(this,void 0,void 0,function(){var t,e,n;return __generator(this,function(r){switch(r.label){case 0:t=new ClientResponse_1.default,r.label=1;case 1:return r.trys.push([1,7,,8]),[4,node_fetch_1.default(this.getFullUrl(),{method:this.method,headers:this.headers,body:this.body,credentials:this.credentials})];case 2:return(e=r.sent()).ok?[4,this.responseHandler(e)]:[3,4];case 3:return[2,r.sent()];case 4:return[4,this.errorResponseHandler(e)];case 5:throw r.sent();case 6:return[3,8];case 7:if((n=r.sent())instanceof ClientResponse_1.default)throw n;throw e&&(t.statusCode=e.status),t.exception=n,t;case 8:return[2]}})})},t.prototype.getQueryString=function(){var t="";for(var e in this.parameters)t+=0===t.length?"?":"&",t+=e+"="+encodeURIComponent(this.parameters[e]);return t},t.JSONResponseHandler=function(t){return __awaiter(this,void 0,void 0,function(){var e,n,r;return __generator(this,function(i){switch(i.label){case 0:return(e=new ClientResponse_1.default).statusCode=t.status,(n=t.headers.get("content-type"))&&n.startsWith("application/json")?(r=e,[4,t.json()]):[3,2];case 1:r.response=i.sent(),i.label=2;case 2:return[2,e]}})})},t.ErrorJSONResponseHandler=function(t){return __awaiter(this,void 0,void 0,function(){var e,n,r;return __generator(this,function(i){switch(i.label){case 0:return(e=new ClientResponse_1.default).statusCode=t.status,(n=t.headers.get("content-type"))&&n.startsWith("application/json")?(r=e,[4,t.json()]):[3,2];case 1:r.exception=i.sent(),i.label=2;case 2:return[2,e]}})})},t}();exports.default=DefaultRESTClient}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./ClientResponse":3,"node-fetch":2}],5:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var DefaultRESTClient_1=require("./DefaultRESTClient"),DefaultRESTClientBuilder=function(){function e(){}return e.prototype.build=function(e){return new DefaultRESTClient_1.default(e)},e}();exports.default=DefaultRESTClientBuilder},{"./DefaultRESTClient":4}],6:[function(require,module,exports){(function(global){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Algorithm,BreachAction,BreachedPasswordStatus,BreachMatchMode,CanonicalizationMethod,ChangePasswordReason,ClientAuthenticationMethod,ConnectorType,ConsentStatus,ContentStatus,DeviceType,EmailSecurityType,EventLogType,EventType,ExpiryUnit,FamilyRole,FormControl,FormDataType,FormFieldAdminPolicy,FormType,GrantType,HTTPMethod,IdentityProviderType,KeyAlgorithm,KeyType,LambdaType,LDAPSecurityMethod,LoginIdType,LogoutBehavior,OAuthErrorReason,OAuthErrorType,RefreshTokenExpirationPolicy,RefreshTokenUsagePolicy,RegistrationType,SecureGeneratorType,Sort,TokenType,TransactionType,TwoFactorDelivery,UserActionPhase,UserState,DefaultRESTClientBuilder_1=require("./DefaultRESTClientBuilder"),url_1="undefined"!=typeof window?window.window:"undefined"!=typeof global?global.window:null,FusionAuthClient=function(){function t(t,e,i){this.apiKey=t,this.host=e,this.tenantId=i,this.clientBuilder=new DefaultRESTClientBuilder_1.default}return t.prototype.setTenantId=function(t){return this.tenantId=t,this},t.prototype.setRequestCredentials=function(t){return this.credentials=t,this},t.prototype.actionUser=function(t){return this.start().withUri("/api/user/action").withJSONBody(t).withMethod("POST").go()},t.prototype.addUserToFamily=function(t,e){return this.start().withUri("/api/user/family").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.cancelAction=function(t,e){return this.start().withUri("/api/user/action").withUriSegment(t).withJSONBody(e).withMethod("DELETE").go()},t.prototype.changePassword=function(t,e){return this.start().withUri("/api/user/change-password").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.changePasswordByIdentity=function(t){return this.start().withUri("/api/user/change-password").withJSONBody(t).withMethod("POST").go()},t.prototype.commentOnUser=function(t){return this.start().withUri("/api/user/comment").withJSONBody(t).withMethod("POST").go()},t.prototype.createApplication=function(t,e){return this.start().withUri("/api/application").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createApplicationRole=function(t,e,i){return this.start().withUri("/api/application").withUriSegment(t).withUriSegment("role").withUriSegment(e).withJSONBody(i).withMethod("POST").go()},t.prototype.createAuditLog=function(t){return this.start().withUri("/api/system/audit-log").withJSONBody(t).withMethod("POST").go()},t.prototype.createConnector=function(t,e){return this.start().withUri("/api/connector").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createConsent=function(t,e){return this.start().withUri("/api/consent").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createEmailTemplate=function(t,e){return this.start().withUri("/api/email/template").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createFamily=function(t,e){return this.start().withUri("/api/user/family").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createForm=function(t,e){return this.start().withUri("/api/form").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createFormField=function(t,e){return this.start().withUri("/api/form/field").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createGroup=function(t,e){return this.start().withUri("/api/group").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createGroupMembers=function(t){return this.start().withUri("/api/group/member").withJSONBody(t).withMethod("POST").go()},t.prototype.createIdentityProvider=function(t,e){return this.start().withUri("/api/identity-provider").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createLambda=function(t,e){return this.start().withUri("/api/lambda").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createTenant=function(t,e){return this.start().withUri("/api/tenant").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createTheme=function(t,e){return this.start().withUri("/api/theme").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createUser=function(t,e){return this.start().withUri("/api/user").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createUserAction=function(t,e){return this.start().withUri("/api/user-action").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createUserActionReason=function(t,e){return this.start().withUri("/api/user-action-reason").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createUserConsent=function(t,e){return this.start().withUri("/api/user/consent").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.createWebhook=function(t,e){return this.start().withUri("/api/webhook").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.deactivateApplication=function(t){return this.start().withUri("/api/application").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deactivateUser=function(t){return this.start().withUri("/api/user").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deactivateUserAction=function(t){return this.start().withUri("/api/user-action").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deactivateUsers=function(t){return this.start().withUri("/api/user/bulk").withParameter("userId",t).withParameter("dryRun",!1).withParameter("hardDelete",!1).withMethod("DELETE").go()},t.prototype.deactivateUsersByIds=function(t){return this.start().withUri("/api/user/bulk").withParameter("userId",t).withParameter("dryRun",!1).withParameter("hardDelete",!1).withMethod("DELETE").go()},t.prototype.deleteApplication=function(t){return this.start().withUri("/api/application").withUriSegment(t).withParameter("hardDelete",!0).withMethod("DELETE").go()},t.prototype.deleteApplicationRole=function(t,e){return this.start().withUri("/api/application").withUriSegment(t).withUriSegment("role").withUriSegment(e).withMethod("DELETE").go()},t.prototype.deleteConnector=function(t){return this.start().withUri("/api/connector").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deleteConsent=function(t){return this.start().withUri("/api/consent").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deleteEmailTemplate=function(t){return this.start().withUri("/api/email/template").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deleteForm=function(t){return this.start().withUri("/api/form").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deleteFormField=function(t){return this.start().withUri("/api/form/field").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deleteGroup=function(t){return this.start().withUri("/api/group").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deleteGroupMembers=function(t){return this.start().withUri("/api/group/member").withJSONBody(t).withMethod("DELETE").go()},t.prototype.deleteIdentityProvider=function(t){return this.start().withUri("/api/identity-provider").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deleteKey=function(t){return this.start().withUri("/api/key").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deleteLambda=function(t){return this.start().withUri("/api/lambda").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deleteRegistration=function(t,e){return this.start().withUri("/api/user/registration").withUriSegment(t).withUriSegment(e).withMethod("DELETE").go()},t.prototype.deleteTenant=function(t){return this.start().withUri("/api/tenant").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deleteTheme=function(t){return this.start().withUri("/api/theme").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deleteUser=function(t){return this.start().withUri("/api/user").withUriSegment(t).withParameter("hardDelete",!0).withMethod("DELETE").go()},t.prototype.deleteUserAction=function(t){return this.start().withUri("/api/user-action").withUriSegment(t).withParameter("hardDelete",!0).withMethod("DELETE").go()},t.prototype.deleteUserActionReason=function(t){return this.start().withUri("/api/user-action-reason").withUriSegment(t).withMethod("DELETE").go()},t.prototype.deleteUsers=function(t){return this.start().withUri("/api/user/bulk").withJSONBody(t).withMethod("DELETE").go()},t.prototype.deleteUsersByQuery=function(t){return this.start().withUri("/api/user/bulk").withJSONBody(t).withMethod("DELETE").go()},t.prototype.deleteWebhook=function(t){return this.start().withUri("/api/webhook").withUriSegment(t).withMethod("DELETE").go()},t.prototype.disableTwoFactor=function(t,e){return this.start().withUri("/api/user/two-factor").withParameter("userId",t).withParameter("code",e).withMethod("DELETE").go()},t.prototype.enableTwoFactor=function(t,e){return this.start().withUri("/api/user/two-factor").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.exchangeOAuthCodeForAccessToken=function(t,e,i,r){var o=new url_1.URLSearchParams;return o.append("code",t),o.append("client_id",e),o.append("client_secret",i),o.append("grant_type","authorization_code"),o.append("redirect_uri",r),this.startAnonymous().withUri("/oauth2/token").withFormData(o).withMethod("POST").go()},t.prototype.exchangeRefreshTokenForAccessToken=function(t,e,i,r,o){var n=new url_1.URLSearchParams;return n.append("refresh_token",t),n.append("client_id",e),n.append("client_secret",i),n.append("grant_type","refresh_token"),n.append("scope",r),n.append("user_code",o),this.startAnonymous().withUri("/oauth2/token").withFormData(n).withMethod("POST").go()},t.prototype.exchangeRefreshTokenForJWT=function(t){return this.startAnonymous().withUri("/api/jwt/refresh").withJSONBody(t).withMethod("POST").go()},t.prototype.exchangeUserCredentialsForAccessToken=function(t,e,i,r,o,n){var a=new url_1.URLSearchParams;return a.append("username",t),a.append("password",e),a.append("client_id",i),a.append("client_secret",r),a.append("grant_type","password"),a.append("scope",o),a.append("user_code",n),this.startAnonymous().withUri("/oauth2/token").withFormData(a).withMethod("POST").go()},t.prototype.forgotPassword=function(t){return this.start().withUri("/api/user/forgot-password").withJSONBody(t).withMethod("POST").go()},t.prototype.generateEmailVerificationId=function(t){return this.start().withUri("/api/user/verify-email").withParameter("email",t).withParameter("sendVerifyEmail",!1).withMethod("PUT").go()},t.prototype.generateKey=function(t,e){return this.start().withUri("/api/key/generate").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.generateRegistrationVerificationId=function(t,e){return this.start().withUri("/api/user/verify-registration").withParameter("email",t).withParameter("sendVerifyPasswordEmail",!1).withParameter("applicationId",e).withMethod("PUT").go()},t.prototype.generateTwoFactorSecret=function(){return this.start().withUri("/api/two-factor/secret").withMethod("GET").go()},t.prototype.generateTwoFactorSecretUsingJWT=function(t){return this.start().withUri("/api/two-factor/secret").withAuthorization("JWT "+t).withMethod("GET").go()},t.prototype.identityProviderLogin=function(t){return this.startAnonymous().withUri("/api/identity-provider/login").withJSONBody(t).withMethod("POST").go()},t.prototype.importKey=function(t,e){return this.start().withUri("/api/key/import").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.importUsers=function(t){return this.start().withUri("/api/user/import").withJSONBody(t).withMethod("POST").go()},t.prototype.issueJWT=function(t,e,i){return this.start().withUri("/api/jwt/issue").withAuthorization("JWT "+e).withParameter("applicationId",t).withParameter("refreshToken",i).withMethod("GET").go()},t.prototype.login=function(t){return this.start().withUri("/api/login").withJSONBody(t).withMethod("POST").go()},t.prototype.loginPing=function(t,e,i){return this.start().withUri("/api/login").withUriSegment(t).withUriSegment(e).withParameter("ipAddress",i).withMethod("PUT").go()},t.prototype.logout=function(t,e){return this.startAnonymous().withHeader("Content-Type","text/plain").withUri("/api/logout").withParameter("global",t).withParameter("refreshToken",e).withMethod("POST").go()},t.prototype.lookupIdentityProvider=function(t){return this.start().withUri("/api/identity-provider/lookup").withParameter("domain",t).withMethod("GET").go()},t.prototype.modifyAction=function(t,e){return this.start().withUri("/api/user/action").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.passwordlessLogin=function(t){return this.startAnonymous().withUri("/api/passwordless/login").withJSONBody(t).withMethod("POST").go()},t.prototype.patchApplication=function(t,e){return this.start().withUri("/api/application").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.patchApplicationRole=function(t,e,i){return this.start().withUri("/api/application").withUriSegment(t).withUriSegment("role").withUriSegment(e).withJSONBody(i).withMethod("PATCH").go()},t.prototype.patchConnector=function(t,e){return this.start().withUri("/api/connector").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.patchConsent=function(t,e){return this.start().withUri("/api/consent").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.patchEmailTemplate=function(t,e){return this.start().withUri("/api/email/template").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.patchGroup=function(t,e){return this.start().withUri("/api/group").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.patchIdentityProvider=function(t,e){return this.start().withUri("/api/identity-provider").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.patchIntegrations=function(t){return this.start().withUri("/api/integration").withJSONBody(t).withMethod("PATCH").go()},t.prototype.patchLambda=function(t,e){return this.start().withUri("/api/lambda").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.patchRegistration=function(t,e){return this.start().withUri("/api/user/registration").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.patchSystemConfiguration=function(t){return this.start().withUri("/api/system-configuration").withJSONBody(t).withMethod("PATCH").go()},t.prototype.patchTenant=function(t,e){return this.start().withUri("/api/tenant").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.patchTheme=function(t,e){return this.start().withUri("/api/theme").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.patchUser=function(t,e){return this.start().withUri("/api/user").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.patchUserAction=function(t,e){return this.start().withUri("/api/user-action").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.patchUserActionReason=function(t,e){return this.start().withUri("/api/user-action-reason").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.patchUserConsent=function(t,e){return this.start().withUri("/api/user/consent").withUriSegment(t).withJSONBody(e).withMethod("PATCH").go()},t.prototype.reactivateApplication=function(t){return this.start().withUri("/api/application").withUriSegment(t).withParameter("reactivate",!0).withMethod("PUT").go()},t.prototype.reactivateUser=function(t){return this.start().withUri("/api/user").withUriSegment(t).withParameter("reactivate",!0).withMethod("PUT").go()},t.prototype.reactivateUserAction=function(t){return this.start().withUri("/api/user-action").withUriSegment(t).withParameter("reactivate",!0).withMethod("PUT").go()},t.prototype.reconcileJWT=function(t){return this.startAnonymous().withUri("/api/jwt/reconcile").withJSONBody(t).withMethod("POST").go()},t.prototype.refreshUserSearchIndex=function(){return this.start().withUri("/api/user/search").withMethod("PUT").go()},t.prototype.register=function(t,e){return this.start().withUri("/api/user/registration").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.removeUserFromFamily=function(t,e){return this.start().withUri("/api/user/family").withUriSegment(t).withUriSegment(e).withMethod("DELETE").go()},t.prototype.resendEmailVerification=function(t){return this.start().withUri("/api/user/verify-email").withParameter("email",t).withMethod("PUT").go()},t.prototype.resendRegistrationVerification=function(t,e){return this.start().withUri("/api/user/verify-registration").withParameter("email",t).withParameter("applicationId",e).withMethod("PUT").go()},t.prototype.retrieveAction=function(t){return this.start().withUri("/api/user/action").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveActions=function(t){return this.start().withUri("/api/user/action").withParameter("userId",t).withMethod("GET").go()},t.prototype.retrieveActionsPreventingLogin=function(t){return this.start().withUri("/api/user/action").withParameter("userId",t).withParameter("preventingLogin",!0).withMethod("GET").go()},t.prototype.retrieveActiveActions=function(t){return this.start().withUri("/api/user/action").withParameter("userId",t).withParameter("active",!0).withMethod("GET").go()},t.prototype.retrieveApplication=function(t){return this.start().withUri("/api/application").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveApplications=function(){return this.start().withUri("/api/application").withMethod("GET").go()},t.prototype.retrieveAuditLog=function(t){return this.start().withUri("/api/system/audit-log").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveConnector=function(t){return this.start().withUri("/api/connector").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveConnectors=function(){return this.start().withUri("/api/connector").withMethod("GET").go()},t.prototype.retrieveConsent=function(t){return this.start().withUri("/api/consent").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveConsents=function(){return this.start().withUri("/api/consent").withMethod("GET").go()},t.prototype.retrieveDailyActiveReport=function(t,e,i){return this.start().withUri("/api/report/daily-active-user").withParameter("applicationId",t).withParameter("start",e).withParameter("end",i).withMethod("GET").go()},t.prototype.retrieveEmailTemplate=function(t){return this.start().withUri("/api/email/template").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveEmailTemplatePreview=function(t){return this.start().withUri("/api/email/template/preview").withJSONBody(t).withMethod("POST").go()},t.prototype.retrieveEmailTemplates=function(){return this.start().withUri("/api/email/template").withMethod("GET").go()},t.prototype.retrieveEventLog=function(t){return this.start().withUri("/api/system/event-log").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveFamilies=function(t){return this.start().withUri("/api/user/family").withParameter("userId",t).withMethod("GET").go()},t.prototype.retrieveFamilyMembersByFamilyId=function(t){return this.start().withUri("/api/user/family").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveForm=function(t){return this.start().withUri("/api/form").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveFormField=function(t){return this.start().withUri("/api/form/field").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveFormFields=function(){return this.start().withUri("/api/form/field").withMethod("GET").go()},t.prototype.retrieveForms=function(){return this.start().withUri("/api/form").withMethod("GET").go()},t.prototype.retrieveGroup=function(t){return this.start().withUri("/api/group").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveGroups=function(){return this.start().withUri("/api/group").withMethod("GET").go()},t.prototype.retrieveIdentityProvider=function(t){return this.start().withUri("/api/identity-provider").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveIdentityProviders=function(){return this.start().withUri("/api/identity-provider").withMethod("GET").go()},t.prototype.retrieveInactiveActions=function(t){return this.start().withUri("/api/user/action").withParameter("userId",t).withParameter("active",!1).withMethod("GET").go()},t.prototype.retrieveInactiveApplications=function(){return this.start().withUri("/api/application").withParameter("inactive",!0).withMethod("GET").go()},t.prototype.retrieveInactiveUserActions=function(){return this.start().withUri("/api/user-action").withParameter("inactive",!0).withMethod("GET").go()},t.prototype.retrieveIntegration=function(){return this.start().withUri("/api/integration").withMethod("GET").go()},t.prototype.retrieveJWTPublicKey=function(t){return this.startAnonymous().withUri("/api/jwt/public-key").withParameter("kid",t).withMethod("GET").go()},t.prototype.retrieveJWTPublicKeyByApplicationId=function(t){return this.startAnonymous().withUri("/api/jwt/public-key").withParameter("applicationId",t).withMethod("GET").go()},t.prototype.retrieveJWTPublicKeys=function(){return this.startAnonymous().withUri("/api/jwt/public-key").withMethod("GET").go()},t.prototype.retrieveJsonWebKeySet=function(){return this.startAnonymous().withUri("/.well-known/jwks.json").withMethod("GET").go()},t.prototype.retrieveKey=function(t){return this.start().withUri("/api/key").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveKeys=function(){return this.start().withUri("/api/key").withMethod("GET").go()},t.prototype.retrieveLambda=function(t){return this.start().withUri("/api/lambda").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveLambdas=function(){return this.start().withUri("/api/lambda").withMethod("GET").go()},t.prototype.retrieveLambdasByType=function(t){return this.start().withUri("/api/lambda").withParameter("type",t).withMethod("GET").go()},t.prototype.retrieveLoginReport=function(t,e,i){return this.start().withUri("/api/report/login").withParameter("applicationId",t).withParameter("start",e).withParameter("end",i).withMethod("GET").go()},t.prototype.retrieveMonthlyActiveReport=function(t,e,i){return this.start().withUri("/api/report/monthly-active-user").withParameter("applicationId",t).withParameter("start",e).withParameter("end",i).withMethod("GET").go()},t.prototype.retrieveOauthConfiguration=function(t){return this.start().withUri("/api/application").withUriSegment(t).withUriSegment("oauth-configuration").withMethod("GET").go()},t.prototype.retrieveOpenIdConfiguration=function(){return this.startAnonymous().withUri("/.well-known/openid-configuration").withMethod("GET").go()},t.prototype.retrievePasswordValidationRules=function(){return this.startAnonymous().withUri("/api/tenant/password-validation-rules").withMethod("GET").go()},t.prototype.retrievePasswordValidationRulesWithTenantId=function(t){return this.startAnonymous().withUri("/api/tenant/password-validation-rules").withUriSegment(t).withMethod("GET").go()},t.prototype.retrievePendingChildren=function(t){return this.start().withUri("/api/user/family/pending").withParameter("parentEmail",t).withMethod("GET").go()},t.prototype.retrieveRecentLogins=function(t,e){return this.start().withUri("/api/user/recent-login").withParameter("offset",t).withParameter("limit",e).withMethod("GET").go()},t.prototype.retrieveRefreshTokens=function(t){return this.start().withUri("/api/jwt/refresh").withParameter("userId",t).withMethod("GET").go()},t.prototype.retrieveRegistration=function(t,e){return this.start().withUri("/api/user/registration").withUriSegment(t).withUriSegment(e).withMethod("GET").go()},t.prototype.retrieveRegistrationReport=function(t,e,i){return this.start().withUri("/api/report/registration").withParameter("applicationId",t).withParameter("start",e).withParameter("end",i).withMethod("GET").go()},t.prototype.retrieveSystemConfiguration=function(){return this.start().withUri("/api/system-configuration").withMethod("GET").go()},t.prototype.retrieveTenant=function(t){return this.start().withUri("/api/tenant").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveTenants=function(){return this.start().withUri("/api/tenant").withMethod("GET").go()},t.prototype.retrieveTheme=function(t){return this.start().withUri("/api/theme").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveThemes=function(){return this.start().withUri("/api/theme").withMethod("GET").go()},t.prototype.retrieveTotalReport=function(){return this.start().withUri("/api/report/totals").withMethod("GET").go()},t.prototype.retrieveUser=function(t){return this.start().withUri("/api/user").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveUserAction=function(t){return this.start().withUri("/api/user-action").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveUserActionReason=function(t){return this.start().withUri("/api/user-action-reason").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveUserActionReasons=function(){return this.start().withUri("/api/user-action-reason").withMethod("GET").go()},t.prototype.retrieveUserActions=function(){return this.start().withUri("/api/user-action").withMethod("GET").go()},t.prototype.retrieveUserByChangePasswordId=function(t){return this.start().withUri("/api/user").withParameter("changePasswordId",t).withMethod("GET").go()},t.prototype.retrieveUserByEmail=function(t){return this.start().withUri("/api/user").withParameter("email",t).withMethod("GET").go()},t.prototype.retrieveUserByLoginId=function(t){return this.start().withUri("/api/user").withParameter("loginId",t).withMethod("GET").go()},t.prototype.retrieveUserByUsername=function(t){return this.start().withUri("/api/user").withParameter("username",t).withMethod("GET").go()},t.prototype.retrieveUserByVerificationId=function(t){return this.start().withUri("/api/user").withParameter("verificationId",t).withMethod("GET").go()},t.prototype.retrieveUserComments=function(t){return this.start().withUri("/api/user/comment").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveUserConsent=function(t){return this.start().withUri("/api/user/consent").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveUserConsents=function(t){return this.start().withUri("/api/user/consent").withParameter("userId",t).withMethod("GET").go()},t.prototype.retrieveUserLoginReport=function(t,e,i,r){return this.start().withUri("/api/report/login").withParameter("applicationId",t).withParameter("userId",e).withParameter("start",i).withParameter("end",r).withMethod("GET").go()},t.prototype.retrieveUserLoginReportByLoginId=function(t,e,i,r){return this.start().withUri("/api/report/login").withParameter("applicationId",t).withParameter("loginId",e).withParameter("start",i).withParameter("end",r).withMethod("GET").go()},t.prototype.retrieveUserRecentLogins=function(t,e,i){return this.start().withUri("/api/user/recent-login").withParameter("userId",t).withParameter("offset",e).withParameter("limit",i).withMethod("GET").go()},t.prototype.retrieveUserUsingJWT=function(t){return this.startAnonymous().withUri("/api/user").withAuthorization("JWT "+t).withMethod("GET").go()},t.prototype.retrieveWebhook=function(t){return this.start().withUri("/api/webhook").withUriSegment(t).withMethod("GET").go()},t.prototype.retrieveWebhooks=function(){return this.start().withUri("/api/webhook").withMethod("GET").go()},t.prototype.revokeRefreshToken=function(t,e,i){return this.start().withUri("/api/jwt/refresh").withParameter("token",t).withParameter("userId",e).withParameter("applicationId",i).withMethod("DELETE").go()},t.prototype.revokeUserConsent=function(t){return this.start().withUri("/api/user/consent").withUriSegment(t).withMethod("DELETE").go()},t.prototype.searchAuditLogs=function(t){return this.start().withUri("/api/system/audit-log/search").withJSONBody(t).withMethod("POST").go()},t.prototype.searchEventLogs=function(t){return this.start().withUri("/api/system/event-log/search").withJSONBody(t).withMethod("POST").go()},t.prototype.searchLoginRecords=function(t){return this.start().withUri("/api/system/login-record/search").withJSONBody(t).withMethod("POST").go()},t.prototype.searchUsers=function(t){return this.start().withUri("/api/user/search").withParameter("ids",t).withMethod("GET").go()},t.prototype.searchUsersByIds=function(t){return this.start().withUri("/api/user/search").withParameter("ids",t).withMethod("GET").go()},t.prototype.searchUsersByQuery=function(t){return this.start().withUri("/api/user/search").withJSONBody(t).withMethod("POST").go()},t.prototype.searchUsersByQueryString=function(t){return this.start().withUri("/api/user/search").withJSONBody(t).withMethod("POST").go()},t.prototype.sendEmail=function(t,e){return this.start().withUri("/api/email/send").withUriSegment(t).withJSONBody(e).withMethod("POST").go()},t.prototype.sendFamilyRequestEmail=function(t){return this.start().withUri("/api/user/family/request").withJSONBody(t).withMethod("POST").go()},t.prototype.sendPasswordlessCode=function(t){return this.startAnonymous().withUri("/api/passwordless/send").withJSONBody(t).withMethod("POST").go()},t.prototype.sendTwoFactorCode=function(t){return this.start().withUri("/api/two-factor/send").withJSONBody(t).withMethod("POST").go()},t.prototype.sendTwoFactorCodeForLogin=function(t){return this.startAnonymous().withHeader("Content-Type","text/plain").withUri("/api/two-factor/send").withUriSegment(t).withMethod("POST").go()},t.prototype.startIdentityProviderLogin=function(t){return this.start().withUri("/api/identity-provider/start").withJSONBody(t).withMethod("POST").go()},t.prototype.startPasswordlessLogin=function(t){return this.start().withUri("/api/passwordless/start").withJSONBody(t).withMethod("POST").go()},t.prototype.twoFactorLogin=function(t){return this.startAnonymous().withUri("/api/two-factor/login").withJSONBody(t).withMethod("POST").go()},t.prototype.updateApplication=function(t,e){return this.start().withUri("/api/application").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateApplicationRole=function(t,e,i){return this.start().withUri("/api/application").withUriSegment(t).withUriSegment("role").withUriSegment(e).withJSONBody(i).withMethod("PUT").go()},t.prototype.updateConnector=function(t,e){return this.start().withUri("/api/connector").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateConsent=function(t,e){return this.start().withUri("/api/consent").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateEmailTemplate=function(t,e){return this.start().withUri("/api/email/template").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateForm=function(t,e){return this.start().withUri("/api/form").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateFormField=function(t,e){return this.start().withUri("/api/form/field").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateGroup=function(t,e){return this.start().withUri("/api/group").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateIdentityProvider=function(t,e){return this.start().withUri("/api/identity-provider").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateIntegrations=function(t){return this.start().withUri("/api/integration").withJSONBody(t).withMethod("PUT").go()},t.prototype.updateKey=function(t,e){return this.start().withUri("/api/key").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateLambda=function(t,e){return this.start().withUri("/api/lambda").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateRegistration=function(t,e){return this.start().withUri("/api/user/registration").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateSystemConfiguration=function(t){return this.start().withUri("/api/system-configuration").withJSONBody(t).withMethod("PUT").go()},t.prototype.updateTenant=function(t,e){return this.start().withUri("/api/tenant").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateTheme=function(t,e){return this.start().withUri("/api/theme").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateUser=function(t,e){return this.start().withUri("/api/user").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateUserAction=function(t,e){return this.start().withUri("/api/user-action").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateUserActionReason=function(t,e){return this.start().withUri("/api/user-action-reason").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateUserConsent=function(t,e){return this.start().withUri("/api/user/consent").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.updateWebhook=function(t,e){return this.start().withUri("/api/webhook").withUriSegment(t).withJSONBody(e).withMethod("PUT").go()},t.prototype.validateDevice=function(t,e){return this.startAnonymous().withUri("/oauth2/device/validate").withParameter("user_code",t).withParameter("client_id",e).withMethod("GET").go()},t.prototype.validateJWT=function(t){return this.startAnonymous().withUri("/api/jwt/validate").withAuthorization("JWT "+t).withMethod("GET").go()},t.prototype.verifyEmail=function(t){return this.startAnonymous().withHeader("Content-Type","text/plain").withUri("/api/user/verify-email").withUriSegment(t).withMethod("POST").go()},t.prototype.verifyRegistration=function(t){return this.startAnonymous().withHeader("Content-Type","text/plain").withUri("/api/user/verify-registration").withUriSegment(t).withMethod("POST").go()},t.prototype.start=function(){return this.startAnonymous().withAuthorization(this.apiKey)},t.prototype.startAnonymous=function(){var t=this.clientBuilder.build(this.host);return null!=this.tenantId&&t.withHeader("X-FusionAuth-TenantId",this.tenantId),null!=this.credentials&&t.withCredentials(this.credentials),t},t}();exports.FusionAuthClient=FusionAuthClient,exports.default=FusionAuthClient,function(t){t.ES256="ES256",t.ES384="ES384",t.ES512="ES512",t.HS256="HS256",t.HS384="HS384",t.HS512="HS512",t.RS256="RS256",t.RS384="RS384",t.RS512="RS512",t.none="none"}(Algorithm=exports.Algorithm||(exports.Algorithm={})),function(t){t.Off="Off",t.RecordOnly="RecordOnly",t.NotifyUser="NotifyUser",t.RequireChange="RequireChange"}(BreachAction=exports.BreachAction||(exports.BreachAction={})),function(t){t.None="None",t.ExactMatch="ExactMatch",t.SubAddressMatch="SubAddressMatch",t.PasswordOnly="PasswordOnly",t.CommonPassword="CommonPassword"}(BreachedPasswordStatus=exports.BreachedPasswordStatus||(exports.BreachedPasswordStatus={})),function(t){t.Low="Low",t.Medium="Medium",t.High="High"}(BreachMatchMode=exports.BreachMatchMode||(exports.BreachMatchMode={})),function(t){t.exclusive="exclusive",t.exclusive_with_comments="exclusive_with_comments",t.inclusive="inclusive",t.inclusive_with_comments="inclusive_with_comments"}(CanonicalizationMethod=exports.CanonicalizationMethod||(exports.CanonicalizationMethod={})),function(t){t.Administrative="Administrative",t.Breached="Breached",t.Expired="Expired",t.Validation="Validation"}(ChangePasswordReason=exports.ChangePasswordReason||(exports.ChangePasswordReason={})),function(t){t.none="none",t.client_secret_basic="client_secret_basic",t.client_secret_post="client_secret_post"}(ClientAuthenticationMethod=exports.ClientAuthenticationMethod||(exports.ClientAuthenticationMethod={})),function(t){t.FusionAuth="FusionAuth",t.Generic="Generic",t.LDAP="LDAP"}(ConnectorType=exports.ConnectorType||(exports.ConnectorType={})),function(t){t.Active="Active",t.Revoked="Revoked"}(ConsentStatus=exports.ConsentStatus||(exports.ConsentStatus={})),function(t){t.ACTIVE="ACTIVE",t.PENDING="PENDING",t.REJECTED="REJECTED"}(ContentStatus=exports.ContentStatus||(exports.ContentStatus={})),function(t){t.BROWSER="BROWSER",t.DESKTOP="DESKTOP",t.LAPTOP="LAPTOP",t.MOBILE="MOBILE",t.OTHER="OTHER",t.SERVER="SERVER",t.TABLET="TABLET",t.TV="TV",t.UNKNOWN="UNKNOWN"}(DeviceType=exports.DeviceType||(exports.DeviceType={})),function(t){t.NONE="NONE",t.SSL="SSL",t.TLS="TLS"}(EmailSecurityType=exports.EmailSecurityType||(exports.EmailSecurityType={})),function(t){t.Information="Information",t.Debug="Debug",t.Error="Error"}(EventLogType=exports.EventLogType||(exports.EventLogType={})),function(t){t.UserDelete="user.delete",t.UserCreate="user.create",t.UserUpdate="user.update",t.UserDeactivate="user.deactivate",t.UserBulkCreate="user.bulk.create",t.UserReactivate="user.reactivate",t.UserAction="user.action",t.JWTRefreshTokenRevoke="jwt.refresh-token.revoke",t.JWTRefresh="jwt.refresh",t.JWTPublicKeyUpdate="jwt.public-key.update",t.UserLoginSuccess="user.login.success",t.UserLoginFailed="user.login.failed",t.UserRegistrationCreate="user.registration.create",t.UserRegistrationUpdate="user.registration.update",t.UserRegistrationDelete="user.registration.delete",t.UserRegistrationVerified="user.registration.verified",t.UserEmailVerified="user.email.verified",t.UserPasswordBreach="user.password.breach",t.Test="test"}(EventType=exports.EventType||(exports.EventType={})),function(t){t.MINUTES="MINUTES",t.HOURS="HOURS",t.DAYS="DAYS",t.WEEKS="WEEKS",t.MONTHS="MONTHS",t.YEARS="YEARS"}(ExpiryUnit=exports.ExpiryUnit||(exports.ExpiryUnit={})),function(t){t.Child="Child",t.Teen="Teen",t.Adult="Adult"}(FamilyRole=exports.FamilyRole||(exports.FamilyRole={})),function(t){t.checkbox="checkbox",t.number="number",t.password="password",t.radio="radio",t.select="select",t.textarea="textarea",t.text="text"}(FormControl=exports.FormControl||(exports.FormControl={})),function(t){t.bool="bool",t.consent="consent",t.date="date",t.email="email",t.number="number",t.string="string"}(FormDataType=exports.FormDataType||(exports.FormDataType={})),function(t){t.Edit="Edit",t.View="View"}(FormFieldAdminPolicy=exports.FormFieldAdminPolicy||(exports.FormFieldAdminPolicy={})),function(t){t.registration="registration"}(FormType=exports.FormType||(exports.FormType={})),function(t){t.authorization_code="authorization_code",t.implicit="implicit",t.password="password",t.client_credentials="client_credentials",t.refresh_token="refresh_token",t.unknown="unknown",t.device_code="urn:ietf:params:oauth:grant-type:device_code"}(GrantType=exports.GrantType||(exports.GrantType={})),function(t){t.GET="GET",t.POST="POST",t.PUT="PUT",t.DELETE="DELETE",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.PATCH="PATCH"}(HTTPMethod=exports.HTTPMethod||(exports.HTTPMethod={})),function(t){t.ExternalJWT="ExternalJWT",t.OpenIDConnect="OpenIDConnect",t.Facebook="Facebook",t.Google="Google",t.Twitter="Twitter",t.SAMLv2="SAMLv2",t.HYPR="HYPR",t.Apple="Apple"}(IdentityProviderType=exports.IdentityProviderType||(exports.IdentityProviderType={})),function(t){t.ES256="ES256",t.ES384="ES384",t.ES512="ES512",t.HS256="HS256",t.HS384="HS384",t.HS512="HS512",t.RS256="RS256",t.RS384="RS384",t.RS512="RS512"}(KeyAlgorithm=exports.KeyAlgorithm||(exports.KeyAlgorithm={})),function(t){t.EC="EC",t.RSA="RSA",t.HMAC="HMAC"}(KeyType=exports.KeyType||(exports.KeyType={})),function(t){t.JWTPopulate="JWTPopulate",t.OpenIDReconcile="OpenIDReconcile",t.SAMLv2Reconcile="SAMLv2Reconcile",t.SAMLv2Populate="SAMLv2Populate",t.AppleReconcile="AppleReconcile",t.ExternalJWTReconcile="ExternalJWTReconcile",t.FacebookReconcile="FacebookReconcile",t.GoogleReconcile="GoogleReconcile",t.HYPRReconcile="HYPRReconcile",t.TwitterReconcile="TwitterReconcile",t.LDAPConnectorReconcile="LDAPConnectorReconcile"}(LambdaType=exports.LambdaType||(exports.LambdaType={})),function(t){t.None="None",t.LDAPS="LDAPS",t.StartTLS="StartTLS"}(LDAPSecurityMethod=exports.LDAPSecurityMethod||(exports.LDAPSecurityMethod={})),function(t){t.email="email",t.username="username"}(LoginIdType=exports.LoginIdType||(exports.LoginIdType={})),function(t){t.RedirectOnly="RedirectOnly",t.AllApplications="AllApplications"}(LogoutBehavior=exports.LogoutBehavior||(exports.LogoutBehavior={})),function(t){t.auth_code_not_found="auth_code_not_found",t.access_token_malformed="access_token_malformed",t.access_token_expired="access_token_expired",t.access_token_unavailable_for_processing="access_token_unavailable_for_processing",t.access_token_failed_processing="access_token_failed_processing",t.refresh_token_not_found="refresh_token_not_found",t.invalid_client_id="invalid_client_id",t.invalid_user_credentials="invalid_user_credentials",t.invalid_grant_type="invalid_grant_type",t.invalid_origin="invalid_origin",t.invalid_origin_opaque="invalid_origin_opaque",t.invalid_pkce_code_verifier="invalid_pkce_code_verifier",t.invalid_pkce_code_challenge="invalid_pkce_code_challenge",t.invalid_pkce_code_challenge_method="invalid_pkce_code_challenge_method",t.invalid_redirect_uri="invalid_redirect_uri",t.invalid_response_mode="invalid_response_mode",t.invalid_response_type="invalid_response_type",t.invalid_id_token_hint="invalid_id_token_hint",t.invalid_post_logout_redirect_uri="invalid_post_logout_redirect_uri",t.invalid_device_code="invalid_device_code",t.invalid_user_code="invalid_user_code",t.invalid_additional_client_id="invalid_additional_client_id",t.grant_type_disabled="grant_type_disabled",t.missing_client_id="missing_client_id",t.missing_code="missing_code",t.missing_device_code="missing_device_code",t.missing_grant_type="missing_grant_type",t.missing_redirect_uri="missing_redirect_uri",t.missing_refresh_token="missing_refresh_token",t.missing_response_type="missing_response_type",t.missing_token="missing_token",t.missing_user_code="missing_user_code",t.missing_verification_uri="missing_verification_uri",t.login_prevented="login_prevented",t.user_code_expired="user_code_expired",t.user_expired="user_expired",t.user_locked="user_locked",t.user_not_found="user_not_found",t.client_authentication_missing="client_authentication_missing",t.invalid_client_authentication_scheme="invalid_client_authentication_scheme",t.invalid_client_authentication="invalid_client_authentication",t.client_id_mismatch="client_id_mismatch",t.change_password_administrative="change_password_administrative",t.change_password_breached="change_password_breached",t.change_password_expired="change_password_expired",t.change_password_validation="change_password_validation",t.unknown="unknown"}(OAuthErrorReason=exports.OAuthErrorReason||(exports.OAuthErrorReason={})),function(t){t.invalid_request="invalid_request",t.invalid_client="invalid_client",t.invalid_grant="invalid_grant",t.invalid_token="invalid_token",t.unauthorized_client="unauthorized_client",t.invalid_scope="invalid_scope",t.server_error="server_error",t.unsupported_grant_type="unsupported_grant_type",t.unsupported_response_type="unsupported_response_type",t.change_password_required="change_password_required",t.two_factor_required="two_factor_required",t.authorization_pending="authorization_pending",t.expired_token="expired_token"}(OAuthErrorType=exports.OAuthErrorType||(exports.OAuthErrorType={})),function(t){t.Fixed="Fixed",t.SlidingWindow="SlidingWindow"}(RefreshTokenExpirationPolicy=exports.RefreshTokenExpirationPolicy||(exports.RefreshTokenExpirationPolicy={})),function(t){t.Reusable="Reusable",t.OneTimeUse="OneTimeUse"}(RefreshTokenUsagePolicy=exports.RefreshTokenUsagePolicy||(exports.RefreshTokenUsagePolicy={})),function(t){t.basic="basic",t.advanced="advanced"}(RegistrationType=exports.RegistrationType||(exports.RegistrationType={})),function(t){t.randomDigits="randomDigits",t.randomBytes="randomBytes",t.randomAlpha="randomAlpha",t.randomAlphaNumeric="randomAlphaNumeric"}(SecureGeneratorType=exports.SecureGeneratorType||(exports.SecureGeneratorType={})),function(t){t.asc="asc",t.desc="desc"}(Sort=exports.Sort||(exports.Sort={})),function(t){t.Bearer="Bearer",t.MAC="MAC"}(TokenType=exports.TokenType||(exports.TokenType={})),function(t){t.None="None",t.Any="Any",t.SimpleMajority="SimpleMajority",t.SuperMajority="SuperMajority",t.AbsoluteMajority="AbsoluteMajority"}(TransactionType=exports.TransactionType||(exports.TransactionType={})),function(t){t.None="None",t.TextMessage="TextMessage"}(TwoFactorDelivery=exports.TwoFactorDelivery||(exports.TwoFactorDelivery={})),function(t){t.start="start",t.modify="modify",t.cancel="cancel",t.end="end"}(UserActionPhase=exports.UserActionPhase||(exports.UserActionPhase={})),function(t){t.Authenticated="Authenticated",t.AuthenticatedNotRegistered="AuthenticatedNotRegistered"}(UserState=exports.UserState||(exports.UserState={}))}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./DefaultRESTClientBuilder":5}]},{},[1])(1)});
{
"name": "@fusionauth/typescript-client",
"version": "1.17.3",
"version": "1.18.0",
"description": "A typescript implementation of the FusionAuth client.",

@@ -21,6 +21,6 @@ "main": "build/index.js",

"scripts": {
"test": "npx mocha build/test/FusionAuthClientTest.js && npx karma start",
"test": "npx mocha build/test/*.js && npx karma start",
"build-browser": "mkdir -p dist && npx browserify index.ts --standalone FusionAuth --debug -p [ tsify --target=es5 ] -t browserify-shim -o dist/fusionauth-typescript-client.js",
"build-browser-min": "mkdir -p dist && npx browserify index.ts --standalone FusionAuth --debug -p [ tsify --target=es5 ] -t browserify-shim -t uglifyify | npx uglifyjs --source-map base -o dist/fusionauth-typescript-client.min.js",
"pretest": "npx tsc && npx tsc -p test && mkdir -p dist && npx browserify test/FusionAuthClientTest.ts --debug -t envify -p [ tsify --target=es5 -p test ] -t browserify-shim -t uglifyify | npx uglifyjs --source-map base -o dist/fusionauth-typescript-client-test.min.js",
"pretest": "npx tsc && npx tsc -p test && mkdir -p dist && npx browserify test/*.ts --debug -t envify -p [ tsify --target=es5 -p test ] -t browserify-shim -t uglifyify | npx uglifyjs --source-map base -o dist/fusionauth-typescript-client-test.min.js",
"prepare": "npx tsc && npm run build-browser && npm run build-browser-min"

@@ -27,0 +27,0 @@ },

## FusionAuth TypeScript Client
![semver 2.0.0 compliant](http://img.shields.io/badge/semver-2.0.0-brightgreen.svg?style=flat-square) [![npm](https://img.shields.io/npm/v/@fusionauth/typescript-client?style=flat-square)](https://www.npmjs.com/package/@fusionauth/typescript-client)
If you're integrating FusionAuth with a Typescript application, this library will speed up your development time.
If you're integrating FusionAuth with a Typescript application, this library will speed up your development time. It also works with node and browser applications as well.

@@ -21,1 +21,6 @@ For additional information and documentation on FusionAuth refer to [https://fusionauth.io](https://fusionauth.io).

* https://fusionauth.io/docs/v1/tech/client-libraries/typescript
## Development
* Set up a fusionauth instance. (Not sure exactly how to configure, TBD.)
* `sb test`

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc