Comparing version 1.1.1 to 1.1.2
@@ -77,9 +77,9 @@ 'use strict'; | ||
Client.prototype.getInvitedUsers = | ||
function(starting_after_id, limit, cb) { | ||
Client.prototype.getPendingUsers = | ||
function(request, cb) { | ||
return this._authenticatedRequest({ | ||
path: 'users/invites', | ||
path: 'users/pending', | ||
params: { | ||
starting_after_id: starting_after_id || null, | ||
limit: limit || null, | ||
starting_after_id: request['starting_after_id'] || null, | ||
limit: request['limit'] || null, | ||
}, | ||
@@ -86,0 +86,0 @@ },'GET', cb); |
@@ -28,3 +28,3 @@ 'use strict'; | ||
const handleApiResponse = function(resolve, reject, res) { | ||
if (res.status === 200) { | ||
if (res.status === 200 || res.status === 201) { | ||
return resolve(res.data); | ||
@@ -31,0 +31,0 @@ } else { |
{ | ||
"name": "stytch", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "A wrapper for the Stytch API", | ||
@@ -5,0 +5,0 @@ "main": "lib/stytch.js", |
@@ -41,3 +41,3 @@ declare module 'stytch' { | ||
interface InvitedUser { | ||
interface PendingUser { | ||
user_id: string; | ||
@@ -85,4 +85,9 @@ name: Name; | ||
interface GetInvitedUsersResponse extends BaseResponse { | ||
users: InvitedUser[]; | ||
interface GetPendingUsersRequest { | ||
starting_after_id?: string; | ||
limit?: bigint; | ||
} | ||
interface GetPendingUsersResponse extends BaseResponse { | ||
users: PendingUser[]; | ||
has_more: boolean; | ||
@@ -187,5 +192,7 @@ starting_after_id: string; | ||
updateUser( | ||
user_id: string, | ||
request: UpdateUserRequest | ||
): Promise<UpdateUserResponse>; | ||
updateUser( | ||
user_id: string, | ||
request: UpdateUserRequest, | ||
@@ -203,11 +210,12 @@ cb: Callback<UpdateUserResponse>, | ||
getInvitedUsers( | ||
starting_after_id: string, | ||
limit: bigint | ||
): Promise<GetInvitedUsersResponse>; | ||
getInvitedUsers( | ||
starting_after_id: string, | ||
limit: bigint, | ||
cb: Callback<GetInvitedUsersResponse>, | ||
getPendingUsers( | ||
request?: GetPendingUsersRequest, | ||
): Promise<GetPendingUsersResponse>; | ||
getPendingUsers( | ||
request: GetPendingUsersRequest, | ||
cb: Callback<GetPendingUsersResponse>, | ||
): void; | ||
getPendingUsers( | ||
cb: Callback<GetPendingUsersResponse>, | ||
): void; | ||
@@ -214,0 +222,0 @@ deleteUserEmail( |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
489
18194
11