Socket
Socket
Sign inDemoInstall

@workos-inc/node

Package Overview
Dependencies
Maintainers
6
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@workos-inc/node - npm Package Compare versions

Comparing version 7.12.0 to 7.13.0

lib/user-management/fixtures/identity.json

2

lib/user-management/user-management.d.ts

@@ -17,2 +17,3 @@ import { WorkOS } from '../workos';

import { UpdateOrganizationMembershipOptions } from './interfaces/update-organization-membership-options.interface';
import { Identity } from './interfaces/identity.interface';
export declare class UserManagement {

@@ -60,2 +61,3 @@ private readonly workos;

deleteUser(userId: string): Promise<void>;
getUserIdentities(userId: string): Promise<Identity[]>;
getOrganizationMembership(organizationMembershipId: string): Promise<OrganizationMembership>;

@@ -62,0 +64,0 @@ listOrganizationMemberships(options: ListOrganizationMembershipsOptions): Promise<AutoPaginatable<OrganizationMembership>>;

@@ -40,2 +40,3 @@ "use strict";

const update_organization_membership_options_serializer_1 = require("./serializers/update-organization-membership-options.serializer");
const identity_serializer_1 = require("./serializers/identity.serializer");
const toQueryString = (options) => {

@@ -207,2 +208,11 @@ const searchParams = new URLSearchParams();

}
getUserIdentities(userId) {
return __awaiter(this, void 0, void 0, function* () {
if (!userId) {
throw new TypeError(`Incomplete arguments. Need to specify 'userId'.`);
}
const { data } = yield this.workos.get(`/user_management/users/${userId}/identities`);
return (0, identity_serializer_1.deserializeIdentities)(data);
});
}
getOrganizationMembership(organizationMembershipId) {

@@ -209,0 +219,0 @@ return __awaiter(this, void 0, void 0, function* () {

@@ -29,2 +29,3 @@ "use strict";

const user_json_1 = __importDefault(require("./fixtures/user.json"));
const identity_json_1 = __importDefault(require("./fixtures/identity.json"));
const workos = new workos_1.WorkOS('sk_test_Sz3IQjepeSWaI4cMS4ms4sMuU');

@@ -620,2 +621,21 @@ const userId = 'user_01H5JQDV7R7ATEYZDEG0W5PRYS';

});
describe('getUserIdentities', () => {
it('sends a Get User Identities request', () => __awaiter(void 0, void 0, void 0, function* () {
(0, test_utils_1.fetchOnce)(identity_json_1.default);
const resp = yield workos.userManagement.getUserIdentities(userId);
expect((0, test_utils_1.fetchURL)()).toContain(`/user_management/users/${userId}/identities`);
expect(resp).toMatchObject([
{
idpId: '108872335',
type: 'OAuth',
provider: 'GithubOAuth',
},
{
idpId: '111966195055680542408',
type: 'OAuth',
provider: 'GoogleOAuth',
},
]);
}));
});
describe('getOrganizationMembership', () => {

@@ -622,0 +642,0 @@ it('sends a Get OrganizationMembership request', () => __awaiter(void 0, void 0, void 0, function* () {

2

lib/workos.js

@@ -29,3 +29,3 @@ "use strict";

const fetch_client_1 = require("./common/net/fetch-client");
const VERSION = '7.12.0';
const VERSION = '7.13.0';
const DEFAULT_HOSTNAME = 'api.workos.com';

@@ -32,0 +32,0 @@ class WorkOS {

{
"version": "7.12.0",
"version": "7.13.0",
"name": "@workos-inc/node",

@@ -4,0 +4,0 @@ "author": "WorkOS",

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