@workos-inc/node 7.81.0 → 7.82.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.
@@ -10,10 +10,12 @@ import { ApiKey, SerializedApiKey } from '../../api-keys/interfaces';
10
10
  export interface EventBase {
11
11
  id: string;
12
12
  createdAt: string;
13
+ context: Record<string, unknown> | undefined;
13
14
  }
14
15
  interface EventResponseBase {
15
16
  id: string;
16
17
  created_at: string;
18
+ context?: Record<string, unknown>;
17
19
  }
18
20
  export interface AuthenticationEmailVerificationSucceededEvent extends EventBase {
19
21
  event: 'authentication.email_verification_succeeded';
@@ -15,6 +15,7 @@ const deserializeEvent = (event) => {
15
15
  const eventBase = {
16
16
  id: event.id,
17
17
  createdAt: event.created_at,
18
+ context: event.context,
18
19
  };
19
20
  switch (event.event) {
20
21
  case 'authentication.email_verification_succeeded':
@@ -22,6 +22,9 @@ describe('Event', () => {
22
22
  const event = {
23
23
  id: 'event_01234ABCD',
24
24
  createdAt: '2020-05-06 04:21:48.649164',
25
+ context: {
26
+ client_id: 'client_01234ABCD',
27
+ },
25
28
  event: 'connection.activated',
26
29
  data: {
27
30
  object: 'connection',
@@ -39,6 +42,9 @@ describe('Event', () => {
39
42
  const eventResponse = {
40
43
  id: 'event_01234ABCD',
41
44
  created_at: '2020-05-06 04:21:48.649164',
45
+ context: {
46
+ client_id: 'client_01234ABCD',
47
+ },
42
48
  event: 'connection.activated',
43
49
  data: {
44
50
  object: 'connection',
@@ -111,6 +117,7 @@ describe('Event', () => {
111
117
  const directoryUserUpdated = {
112
118
  id: 'event_01234ABCD',
113
119
  createdAt: '2020-05-06 04:21:48.649164',
120
+ context: undefined,
114
121
  event: 'dsync.user.updated',
115
122
  data: {
116
123
  object: 'directory_user',
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.81.0';
38
+ const VERSION = '7.82.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
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "7.81.0",
2
+ "version": "7.82.0",
3
3
  "name": "@workos-inc/node",
4
4
  "author": "WorkOS",
5
5
  "description": "A Node wrapper for the WorkOS API",