Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "git",
"url": "https://github.com/PropelAuth/node"
},
"version": "2.1.7",
"version": "2.1.8",
"license": "MIT",
"keywords": [
"auth",
Expand Down
4 changes: 2 additions & 2 deletions src/api/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
UpdateUserPasswordException,
} from "../exceptions"
import { httpRequest } from "../http"
import { User, UserMetadata } from "../user"
import { CreatedUser, UserMetadata } from "../user"
import { formatQueryParameters, isValidId, parseSnakeCaseToCamelCase } from "../utils"

const ENDPOINT_PATH = "/api/backend/v1/user"
Expand Down Expand Up @@ -187,7 +187,7 @@ export function createUser(
authUrl: URL,
integrationApiKey: string,
createUserRequest: CreateUserRequest
): Promise<User> {
): Promise<CreatedUser> {
const request = {
email: createUserRequest.email,
email_confirmed: createUserRequest.emailConfirmed,
Expand Down
3 changes: 2 additions & 1 deletion src/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ import {
ApiKeyResultPage,
ApiKeyValidation,
CreatedOrg,
CreatedUser,
InternalUser,
Org,
OrgApiKeyValidation,
Expand Down Expand Up @@ -199,7 +200,7 @@ export function initBaseAuth(opts: BaseAuthOptions) {
return fetchUsersInOrg(authUrl, integrationApiKey, usersInOrgQuery)
}

function createUserWrapper(createUserRequest: CreateUserRequest): Promise<User> {
function createUserWrapper(createUserRequest: CreateUserRequest): Promise<CreatedUser> {
return createUser(authUrl, integrationApiKey, createUserRequest)
}

Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export {
} from "./exceptions"
export {
CreatedOrg,
CreatedUser,
InternalOrgMemberInfo,
InternalUser,
Org,
Expand Down
4 changes: 4 additions & 0 deletions src/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ export type CreatedOrg = {
name: string,
}

export type CreatedUser = {
userId: string,
}

export type UserMetadata = {
userId: string

Expand Down