@workos-inc/node 8.11.0 → 8.12.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.
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from "node:events";
1
+ import { EventEmitter } from "eventemitter3";
2
2
  //#region src/common/crypto/crypto-provider.ts
3
3
  /**
4
4
  * Interface encapsulating the various crypto computations used by the library,
@@ -1339,6 +1339,11 @@ const deserializeVaultDekDecryptedEvent = (data) => ({
1339
1339
  ...deserializeVaultActor(data),
1340
1340
  keyId: data.key_id
1341
1341
  });
1342
+ const deserializeVaultByokKeyVerificationCompletedEvent = (data) => ({
1343
+ organizationId: data.organization_id,
1344
+ keyProvider: data.key_provider,
1345
+ verified: data.verified
1346
+ });
1342
1347
  //#endregion
1343
1348
  //#region src/common/serializers/event.serializer.ts
1344
1349
  const deserializeEvent = (event) => {
@@ -1558,6 +1563,11 @@ const deserializeEvent = (event) => {
1558
1563
  event: event.event,
1559
1564
  data: deserializeVaultDekDecryptedEvent(event.data)
1560
1565
  };
1566
+ case "vault.byok_key.verification_completed": return {
1567
+ ...eventBase,
1568
+ event: event.event,
1569
+ data: deserializeVaultByokKeyVerificationCompletedEvent(event.data)
1570
+ };
1561
1571
  }
1562
1572
  };
1563
1573
  //#endregion
@@ -3827,6 +3837,10 @@ var FeatureFlagsRuntimeClient = class extends EventEmitter {
3827
3837
  clearTimeout(timeoutId);
3828
3838
  });
3829
3839
  }
3840
+ emit(event, ...args) {
3841
+ if (event === "error" && this.listenerCount(event) === 0) throw args[0] instanceof Error ? args[0] : new Error(String(args[0]));
3842
+ return super.emit(event, ...args);
3843
+ }
3830
3844
  close() {
3831
3845
  this.closed = true;
3832
3846
  this.pollAbortController?.abort();
@@ -4676,7 +4690,7 @@ function extractBunVersionFromUserAgent() {
4676
4690
  }
4677
4691
  //#endregion
4678
4692
  //#region package.json
4679
- var version = "8.11.0";
4693
+ var version = "8.12.0";
4680
4694
  //#endregion
4681
4695
  //#region src/workos.ts
4682
4696
  const DEFAULT_HOSTNAME = "api.workos.com";
@@ -5056,4 +5070,4 @@ function createWorkOS(options) {
5056
5070
  //#endregion
5057
5071
  export { ApiKeyRequiredException as A, SignatureVerificationException as C, NoApiKeyProvidedException as D, NotFoundException as E, SubtleCryptoProvider as M, BadRequestException as O, UnauthorizedException as S, OauthException as T, AutoPaginatable as _, OrganizationDomainVerificationStrategy as a, Actions as b, FeatureFlagsRuntimeClient as c, CheckResult as d, CheckOp as f, AuthenticateWithSessionCookieFailureReason as g, serializeRevokeSessionOptions as h, OrganizationDomainState as i, FetchHttpClient as j, GenericServerException as k, WarrantOp as l, RefreshSessionFailureReason as m, ConnectionType as n, DomainDataState as o, CookieSession as p, GeneratePortalLinkIntent as r, WorkOS as s, createWorkOS as t, ResourceOp as u, PKCE as v, RateLimitExceededException as w, UnprocessableEntityException as x, Webhooks as y };
5058
5072
 
5059
- //# sourceMappingURL=factory-DA0LsbEO.mjs.map
5073
+ //# sourceMappingURL=factory-Bg72Zzvy.mjs.map