@workos-inc/node
Advanced tools
Comparing version 7.11.4 to 7.12.0
@@ -20,10 +20,2 @@ import { Impersonator, ImpersonatorResponse } from './impersonator.interface'; | ||
} | ||
export interface RefreshAuthenticationResponse { | ||
accessToken: string; | ||
refreshToken: string; | ||
} | ||
export interface RefreshAuthenticationResponseResponse { | ||
access_token: string; | ||
refresh_token: string; | ||
} | ||
export {}; |
@@ -1,3 +0,2 @@ | ||
import { AuthenticationResponse, AuthenticationResponseResponse, RefreshAuthenticationResponse, RefreshAuthenticationResponseResponse } from '../interfaces'; | ||
import { AuthenticationResponse, AuthenticationResponseResponse } from '../interfaces'; | ||
export declare const deserializeAuthenticationResponse: (authenticationResponse: AuthenticationResponseResponse) => AuthenticationResponse; | ||
export declare const deserializeRefreshAuthenticationResponse: (refreshAuthenticationResponse: RefreshAuthenticationResponseResponse) => RefreshAuthenticationResponse; |
@@ -14,3 +14,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.deserializeRefreshAuthenticationResponse = exports.deserializeAuthenticationResponse = void 0; | ||
exports.deserializeAuthenticationResponse = void 0; | ||
const user_serializer_1 = require("./user.serializer"); | ||
@@ -22,6 +22,1 @@ const deserializeAuthenticationResponse = (authenticationResponse) => { | ||
exports.deserializeAuthenticationResponse = deserializeAuthenticationResponse; | ||
const deserializeRefreshAuthenticationResponse = (refreshAuthenticationResponse) => { | ||
const { access_token, refresh_token } = refreshAuthenticationResponse, rest = __rest(refreshAuthenticationResponse, ["access_token", "refresh_token"]); | ||
return Object.assign({ accessToken: access_token, refreshToken: refresh_token }, rest); | ||
}; | ||
exports.deserializeRefreshAuthenticationResponse = deserializeRefreshAuthenticationResponse; |
import { WorkOS } from '../workos'; | ||
import { AutoPaginatable } from '../common/utils/pagination'; | ||
import { AuthenticateWithCodeOptions, AuthenticateWithMagicAuthOptions, AuthenticateWithPasswordOptions, AuthenticateWithTotpOptions, AuthenticationResponse, ResetPasswordOptions, SendPasswordResetEmailOptions, CreateUserOptions, EnrollAuthFactorOptions, ListAuthFactorsOptions, ListUsersOptions, SendMagicAuthCodeOptions, SendVerificationEmailOptions, UpdateUserOptions, User, VerifyEmailOptions, AuthenticateWithRefreshTokenOptions, RefreshAuthenticationResponse, MagicAuth, CreateMagicAuthOptions, EmailVerification, PasswordReset, CreatePasswordResetOptions } from './interfaces'; | ||
import { AuthenticateWithCodeOptions, AuthenticateWithMagicAuthOptions, AuthenticateWithPasswordOptions, AuthenticateWithTotpOptions, AuthenticationResponse, ResetPasswordOptions, SendPasswordResetEmailOptions, CreateUserOptions, EnrollAuthFactorOptions, ListAuthFactorsOptions, ListUsersOptions, SendMagicAuthCodeOptions, SendVerificationEmailOptions, UpdateUserOptions, User, VerifyEmailOptions, AuthenticateWithRefreshTokenOptions, MagicAuth, CreateMagicAuthOptions, EmailVerification, PasswordReset, CreatePasswordResetOptions } from './interfaces'; | ||
import { Challenge } from '../mfa/interfaces'; | ||
@@ -26,3 +26,3 @@ import { OrganizationMembership } from './interfaces/organization-membership.interface'; | ||
authenticateWithCode(payload: AuthenticateWithCodeOptions): Promise<AuthenticationResponse>; | ||
authenticateWithRefreshToken(payload: AuthenticateWithRefreshTokenOptions): Promise<RefreshAuthenticationResponse>; | ||
authenticateWithRefreshToken(payload: AuthenticateWithRefreshTokenOptions): Promise<AuthenticationResponse>; | ||
authenticateWithTotp(payload: AuthenticateWithTotpOptions): Promise<AuthenticationResponse>; | ||
@@ -29,0 +29,0 @@ authenticateWithEmailVerification(payload: AuthenticateWithEmailVerificationOptions): Promise<AuthenticationResponse>; |
@@ -93,3 +93,3 @@ "use strict"; | ||
const { data } = yield this.workos.post('/user_management/authenticate', (0, serializers_1.serializeAuthenticateWithRefreshTokenOptions)(Object.assign(Object.assign({}, payload), { clientSecret: this.workos.key }))); | ||
return (0, serializers_1.deserializeRefreshAuthenticationResponse)(data); | ||
return (0, serializers_1.deserializeAuthenticationResponse)(data); | ||
}); | ||
@@ -96,0 +96,0 @@ } |
@@ -231,2 +231,3 @@ "use strict"; | ||
(0, test_utils_1.fetchOnce)({ | ||
user: user_json_1.default, | ||
access_token: 'access_token', | ||
@@ -233,0 +234,0 @@ refresh_token: 'refreshToken2', |
@@ -29,3 +29,3 @@ "use strict"; | ||
const fetch_client_1 = require("./common/net/fetch-client"); | ||
const VERSION = '7.11.4'; | ||
const VERSION = '7.12.0'; | ||
const DEFAULT_HOSTNAME = 'api.workos.com'; | ||
@@ -32,0 +32,0 @@ class WorkOS { |
{ | ||
"version": "7.11.4", | ||
"version": "7.12.0", | ||
"name": "@workos-inc/node", | ||
@@ -4,0 +4,0 @@ "author": "WorkOS", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
470360
10102