@workos-inc/node 7.80.0 → 7.81.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,6 +6,7 @@ import { OrganizationMembership, OrganizationMembershipResponse } from '../../us
|
|
|
6
6
|
import { RoleEvent, RoleEventResponse } from '../../roles/interfaces/role.interface';
|
|
7
7
|
import { OrganizationDomain, OrganizationDomainResponse } from '../../organization-domains/interfaces';
|
|
8
8
|
import { AuthenticationRadarRiskDetectedEventData, AuthenticationRadarRiskDetectedEventResponseData } from '../../user-management/interfaces/authentication-radar-risk-detected-event.interface';
|
|
9
|
+
import { ApiKey, SerializedApiKey } from '../../api-keys/interfaces';
|
|
9
10
|
export interface EventBase {
|
|
10
11
|
id: string;
|
|
11
12
|
createdAt: string;
|
|
@@ -490,7 +491,23 @@ export interface OrganizationDomainDeletedEventResponse extends EventResponseBas
|
|
|
490
491
|
event: 'organization_domain.deleted';
|
|
491
492
|
data: OrganizationDomainResponse;
|
|
492
493
|
}
|
|
493
|
-
export
|
|
494
|
-
|
|
494
|
+
export interface ApiKeyCreatedEvent extends EventBase {
|
|
495
|
+
event: 'api_key.created';
|
|
496
|
+
data: ApiKey;
|
|
497
|
+
}
|
|
498
|
+
export interface ApiKeyCreatedEventResponse extends EventResponseBase {
|
|
499
|
+
event: 'api_key.created';
|
|
500
|
+
data: SerializedApiKey;
|
|
501
|
+
}
|
|
502
|
+
export interface ApiKeyDeletedEvent extends EventBase {
|
|
503
|
+
event: 'api_key.deleted';
|
|
504
|
+
data: ApiKey;
|
|
505
|
+
}
|
|
506
|
+
export interface ApiKeyDeletedEventResponse extends EventResponseBase {
|
|
507
|
+
event: 'api_key.deleted';
|
|
508
|
+
data: SerializedApiKey;
|
|
509
|
+
}
|
|
510
|
+
export type Event = AuthenticationEmailVerificationSucceededEvent | AuthenticationMfaSucceededEvent | AuthenticationOAuthFailedEvent | AuthenticationOAuthSucceededEvent | AuthenticationSSOFailedEvent | AuthenticationSSOSucceededEvent | AuthenticationPasskeyFailedEvent | AuthenticationPasskeySucceededEvent | AuthenticationPasswordFailedEvent | AuthenticationPasswordSucceededEvent | AuthenticationMagicAuthFailedEvent | AuthenticationMagicAuthSucceededEvent | AuthenticationRadarRiskDetectedEvent | ConnectionActivatedEvent | ConnectionDeactivatedEvent | ConnectionDeletedEvent | DsyncActivatedEvent | DsyncDeactivatedEvent | DsyncDeletedEvent | DsyncGroupCreatedEvent | DsyncGroupUpdatedEvent | DsyncGroupDeletedEvent | DsyncGroupUserAddedEvent | DsyncGroupUserRemovedEvent | DsyncUserCreatedEvent | DsyncUserUpdatedEvent | DsyncUserDeletedEvent | EmailVerificationCreatedEvent | InvitationAcceptedEvent | InvitationCreatedEvent | InvitationRevokedEvent | InvitationResentEvent | MagicAuthCreatedEvent | PasswordResetCreatedEvent | PasswordResetSucceededEvent | UserCreatedEvent | UserUpdatedEvent | UserDeletedEvent | OrganizationMembershipAdded | OrganizationMembershipCreated | OrganizationMembershipDeleted | OrganizationMembershipUpdated | OrganizationMembershipRemoved | RoleCreatedEvent | RoleDeletedEvent | RoleUpdatedEvent | SessionCreatedEvent | SessionRevokedEvent | OrganizationCreatedEvent | OrganizationUpdatedEvent | OrganizationDeletedEvent | OrganizationDomainVerifiedEvent | OrganizationDomainVerificationFailedEvent | OrganizationDomainCreatedEvent | OrganizationDomainUpdatedEvent | OrganizationDomainDeletedEvent | ApiKeyCreatedEvent | ApiKeyDeletedEvent;
|
|
511
|
+
export type EventResponse = AuthenticationEmailVerificationSucceededEventResponse | AuthenticationMagicAuthFailedEventResponse | AuthenticationMagicAuthSucceededEventResponse | AuthenticationMfaSucceededEventResponse | AuthenticationOAuthFailedEventResponse | AuthenticationOAuthSucceededEventResponse | AuthenticationPasskeyFailedEventResponse | AuthenticationPasskeySucceededEventResponse | AuthenticationPasswordFailedEventResponse | AuthenticationPasswordSucceededEventResponse | AuthenticationSSOFailedEventResponse | AuthenticationSSOSucceededEventResponse | AuthenticationRadarRiskDetectedEventResponse | ConnectionActivatedEventResponse | ConnectionDeactivatedEventResponse | ConnectionDeletedEventResponse | DsyncActivatedEventResponse | DsyncDeactivatedEventResponse | DsyncDeletedEventResponse | DsyncGroupCreatedEventResponse | DsyncGroupUpdatedEventResponse | DsyncGroupDeletedEventResponse | DsyncGroupUserAddedEventResponse | DsyncGroupUserRemovedEventResponse | DsyncUserCreatedEventResponse | DsyncUserUpdatedEventResponse | DsyncUserDeletedEventResponse | EmailVerificationCreatedEventResponse | InvitationAcceptedEventResponse | InvitationCreatedEventResponse | InvitationRevokedEventResponse | InvitationResentEventResponse | MagicAuthCreatedEventResponse | PasswordResetCreatedEventResponse | PasswordResetSucceededEventResponse | UserCreatedEventResponse | UserUpdatedEventResponse | UserDeletedEventResponse | OrganizationMembershipAddedResponse | OrganizationMembershipCreatedResponse | OrganizationMembershipDeletedResponse | OrganizationMembershipUpdatedResponse | OrganizationMembershipRemovedResponse | RoleCreatedEventResponse | RoleDeletedEventResponse | RoleUpdatedEventResponse | SessionCreatedEventResponse | SessionRevokedEventResponse | OrganizationCreatedResponse | OrganizationUpdatedResponse | OrganizationDeletedResponse | OrganizationDomainVerifiedEventResponse | OrganizationDomainVerificationFailedEventResponse | OrganizationDomainCreatedEventResponse | OrganizationDomainUpdatedEventResponse | OrganizationDomainDeletedEventResponse | ApiKeyCreatedEventResponse | ApiKeyDeletedEventResponse;
|
|
495
512
|
export type EventName = Event['event'];
|
|
496
513
|
export {};
|
|
@@ -10,6 +10,7 @@ const organization_membership_serializer_1 = require("../../user-management/seri
|
|
|
10
10
|
const role_serializer_1 = require("../../user-management/serializers/role.serializer");
|
|
11
11
|
const session_serializer_1 = require("../../user-management/serializers/session.serializer");
|
|
12
12
|
const authentication_radar_risk_event_serializer_1 = require("../../user-management/serializers/authentication-radar-risk-event-serializer");
|
|
13
|
+
const api_key_serializer_1 = require("../../api-keys/serializers/api-key.serializer");
|
|
13
14
|
const deserializeEvent = (event) => {
|
|
14
15
|
const eventBase = {
|
|
15
16
|
id: event.id,
|
|
@@ -96,6 +97,9 @@ const deserializeEvent = (event) => {
|
|
|
96
97
|
case 'organization_domain.updated':
|
|
97
98
|
case 'organization_domain.deleted':
|
|
98
99
|
return Object.assign(Object.assign({}, eventBase), { event: event.event, data: (0, organization_domain_serializer_1.deserializeOrganizationDomain)(event.data) });
|
|
100
|
+
case 'api_key.created':
|
|
101
|
+
case 'api_key.deleted':
|
|
102
|
+
return Object.assign(Object.assign({}, eventBase), { event: event.event, data: (0, api_key_serializer_1.deserializeApiKey)(event.data) });
|
|
99
103
|
}
|
|
100
104
|
};
|
|
101
105
|
exports.deserializeEvent = deserializeEvent;
|
package/lib/workos.js
CHANGED
|
@@ -35,7 +35,7 @@ const actions_1 = require("./actions/actions");
|
|
|
35
35
|
const vault_1 = require("./vault/vault");
|
|
36
36
|
const conflict_exception_1 = require("./common/exceptions/conflict.exception");
|
|
37
37
|
const parse_error_1 = require("./common/exceptions/parse-error");
|
|
38
|
-
const VERSION = '7.
|
|
38
|
+
const VERSION = '7.81.0';
|
|
39
39
|
const DEFAULT_HOSTNAME = 'api.workos.com';
|
|
40
40
|
const HEADER_AUTHORIZATION = 'Authorization';
|
|
41
41
|
const HEADER_IDEMPOTENCY_KEY = 'Idempotency-Key';
|
package/package.json
CHANGED