@workos-inc/node 12.3.0 → 12.4.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
- //#region src/common/crypto/crypto-provider.ts
1
+ // src/common/crypto/crypto-provider.ts
2
2
  /**
3
3
  * Interface encapsulating the various crypto computations used by the library,
4
4
  * allowing pluggable underlying crypto implementations.
@@ -6,8 +6,7 @@
6
6
  var CryptoProvider = class {
7
7
  encoder = new TextEncoder();
8
8
  };
9
- //#endregion
10
- //#region src/common/crypto/subtle-crypto-provider.ts
9
+ // src/common/crypto/subtle-crypto-provider.ts
11
10
  /**
12
11
  * `CryptoProvider which uses the SubtleCrypto interface of the Web Crypto API.
13
12
  *
@@ -220,8 +219,7 @@ var HttpClientError = class extends Error {
220
219
  this.response = response;
221
220
  }
222
221
  };
223
- //#endregion
224
- //#region src/common/exceptions/parse-error.ts
222
+ // src/common/exceptions/parse-error.ts
225
223
  var ParseError = class extends Error {
226
224
  name = "ParseError";
227
225
  status = 500;
@@ -237,8 +235,7 @@ var ParseError = class extends Error {
237
235
  this.rawHeaders = rawHeaders;
238
236
  }
239
237
  };
240
- //#endregion
241
- //#region src/common/net/fetch-client.ts
238
+ // src/common/net/fetch-client.ts
242
239
  const DEFAULT_FETCH_TIMEOUT = 6e4;
243
240
  var FetchHttpClient = class FetchHttpClient extends HttpClient {
244
241
  baseURL;
@@ -480,8 +477,7 @@ var FetchHttpClientResponse = class FetchHttpClientResponse extends HttpClientRe
480
477
  return headersObj;
481
478
  }
482
479
  };
483
- //#endregion
484
- //#region src/common/crypto/decode-payload.ts
480
+ // src/common/crypto/decode-payload.ts
485
481
  function isBinaryPayload(payload) {
486
482
  return ArrayBuffer.isView(payload) || Object.prototype.toString.call(payload) === "[object ArrayBuffer]";
487
483
  }
@@ -493,8 +489,7 @@ function decodePayloadToString(payload) {
493
489
  }
494
490
  return JSON.stringify(payload);
495
491
  }
496
- //#endregion
497
- //#region src/common/exceptions/api-key-required.exception.ts
492
+ // src/common/exceptions/api-key-required.exception.ts
498
493
  var ApiKeyRequiredException = class extends Error {
499
494
  status = 403;
500
495
  name = "ApiKeyRequiredException";
@@ -504,8 +499,7 @@ var ApiKeyRequiredException = class extends Error {
504
499
  this.path = path;
505
500
  }
506
501
  };
507
- //#endregion
508
- //#region src/common/exceptions/generic-server.exception.ts
502
+ // src/common/exceptions/generic-server.exception.ts
509
503
  var GenericServerException = class extends Error {
510
504
  status;
511
505
  rawData;
@@ -522,8 +516,7 @@ var GenericServerException = class extends Error {
522
516
  this.code = rawData.code;
523
517
  }
524
518
  };
525
- //#endregion
526
- //#region src/common/exceptions/authentication.exception.ts
519
+ // src/common/exceptions/authentication.exception.ts
527
520
  const AUTHENTICATION_ERROR_CODES = /* @__PURE__ */ new Set([
528
521
  "email_verification_required",
529
522
  "organization_selection_required",
@@ -560,8 +553,7 @@ var AuthenticationException = class extends GenericServerException {
560
553
  this.radarChallengeId = rawData.radar_challenge_id;
561
554
  }
562
555
  };
563
- //#endregion
564
- //#region src/common/exceptions/bad-request.exception.ts
556
+ // src/common/exceptions/bad-request.exception.ts
565
557
  var BadRequestException = class extends Error {
566
558
  status = 400;
567
559
  name = "BadRequestException";
@@ -577,8 +569,7 @@ var BadRequestException = class extends Error {
577
569
  if (errors) this.errors = errors;
578
570
  }
579
571
  };
580
- //#endregion
581
- //#region src/common/exceptions/conflict.exception.ts
572
+ // src/common/exceptions/conflict.exception.ts
582
573
  var ConflictException = class extends Error {
583
574
  status = 409;
584
575
  name = "ConflictException";
@@ -593,15 +584,13 @@ var ConflictException = class extends Error {
593
584
  this.code = code;
594
585
  }
595
586
  };
596
- //#endregion
597
- //#region src/common/exceptions/no-api-key-provided.exception.ts
587
+ // src/common/exceptions/no-api-key-provided.exception.ts
598
588
  var NoApiKeyProvidedException = class extends Error {
599
589
  status = 500;
600
590
  name = "NoApiKeyProvidedException";
601
591
  message = "Missing API key. Pass it to the constructor (new WorkOS(\"sk_test_Sz3IQjepeSWaI4cMS4ms4sMuU\")) or define it in the WORKOS_API_KEY environment variable.";
602
592
  };
603
- //#endregion
604
- //#region src/common/exceptions/not-found.exception.ts
593
+ // src/common/exceptions/not-found.exception.ts
605
594
  var NotFoundException = class extends Error {
606
595
  status = 404;
607
596
  name = "NotFoundException";
@@ -615,8 +604,7 @@ var NotFoundException = class extends Error {
615
604
  this.requestID = requestID;
616
605
  }
617
606
  };
618
- //#endregion
619
- //#region src/common/exceptions/oauth.exception.ts
607
+ // src/common/exceptions/oauth.exception.ts
620
608
  var OauthException = class extends Error {
621
609
  status;
622
610
  requestID;
@@ -636,8 +624,7 @@ var OauthException = class extends Error {
636
624
  else this.message = `An error has occurred.`;
637
625
  }
638
626
  };
639
- //#endregion
640
- //#region src/common/exceptions/rate-limit-exceeded.exception.ts
627
+ // src/common/exceptions/rate-limit-exceeded.exception.ts
641
628
  var RateLimitExceededException = class extends GenericServerException {
642
629
  retryAfter;
643
630
  name = "RateLimitExceededException";
@@ -646,16 +633,14 @@ var RateLimitExceededException = class extends GenericServerException {
646
633
  this.retryAfter = retryAfter;
647
634
  }
648
635
  };
649
- //#endregion
650
- //#region src/common/exceptions/signature-verification.exception.ts
636
+ // src/common/exceptions/signature-verification.exception.ts
651
637
  var SignatureVerificationException = class extends Error {
652
638
  name = "SignatureVerificationException";
653
639
  constructor(message) {
654
640
  super(message || "Signature verification failed.");
655
641
  }
656
642
  };
657
- //#endregion
658
- //#region src/common/exceptions/unauthorized.exception.ts
643
+ // src/common/exceptions/unauthorized.exception.ts
659
644
  var UnauthorizedException = class extends Error {
660
645
  requestID;
661
646
  status = 401;
@@ -667,8 +652,7 @@ var UnauthorizedException = class extends Error {
667
652
  this.message = `Could not authorize the request. Maybe your API key is invalid?`;
668
653
  }
669
654
  };
670
- //#endregion
671
- //#region src/common/exceptions/unprocessable-entity.exception.ts
655
+ // src/common/exceptions/unprocessable-entity.exception.ts
672
656
  var UnprocessableEntityException = class extends Error {
673
657
  status = 422;
674
658
  name = "UnprocessableEntityException";
@@ -688,8 +672,7 @@ var UnprocessableEntityException = class extends Error {
688
672
  }
689
673
  }
690
674
  };
691
- //#endregion
692
- //#region src/common/crypto/signature-provider.ts
675
+ // src/common/crypto/signature-provider.ts
693
676
  var SignatureProvider = class {
694
677
  cryptoProvider;
695
678
  constructor(cryptoProvider) {
@@ -717,8 +700,7 @@ var SignatureProvider = class {
717
700
  return await this.cryptoProvider.computeHMACSignatureAsync(signedPayload, secret);
718
701
  }
719
702
  };
720
- //#endregion
721
- //#region src/common/utils/unreachable.ts
703
+ // src/common/utils/unreachable.ts
722
704
  /**
723
705
  * Indicates that code is unreachable.
724
706
  *
@@ -731,8 +713,7 @@ var SignatureProvider = class {
731
713
  const unreachable = (condition, message = `Entered unreachable code. Received '${condition}'.`) => {
732
714
  throw new TypeError(message);
733
715
  };
734
- //#endregion
735
- //#region src/organization-domains/serializers/organization-domain.serializer.ts
716
+ // src/organization-domains/serializers/organization-domain.serializer.ts
736
717
  const deserializeOrganizationDomain = (organizationDomain) => ({
737
718
  object: organizationDomain.object,
738
719
  id: organizationDomain.id,
@@ -745,8 +726,7 @@ const deserializeOrganizationDomain = (organizationDomain) => ({
745
726
  createdAt: new Date(organizationDomain.created_at),
746
727
  updatedAt: new Date(organizationDomain.updated_at)
747
728
  });
748
- //#endregion
749
- //#region src/organizations/serializers/organization.serializer.ts
729
+ // src/organizations/serializers/organization.serializer.ts
750
730
  const deserializeOrganization = (organization) => ({
751
731
  object: organization.object,
752
732
  id: organization.id,
@@ -759,8 +739,7 @@ const deserializeOrganization = (organization) => ({
759
739
  externalId: organization.external_id ?? null,
760
740
  metadata: organization.metadata ?? {}
761
741
  });
762
- //#endregion
763
- //#region src/user-management/serializers/authenticate-with-code-options.serializer.ts
742
+ // src/user-management/serializers/authenticate-with-code-options.serializer.ts
764
743
  const serializeAuthenticateWithCodeOptions = (options) => ({
765
744
  grant_type: "authorization_code",
766
745
  client_id: options.clientId,
@@ -772,8 +751,7 @@ const serializeAuthenticateWithCodeOptions = (options) => ({
772
751
  user_agent: options.userAgent,
773
752
  signals_id: options.signalsId
774
753
  });
775
- //#endregion
776
- //#region src/user-management/serializers/authenticate-with-code-and-verifier-options.serializer.ts
754
+ // src/user-management/serializers/authenticate-with-code-and-verifier-options.serializer.ts
777
755
  const serializeAuthenticateWithCodeAndVerifierOptions = (options) => ({
778
756
  grant_type: "authorization_code",
779
757
  client_id: options.clientId,
@@ -784,8 +762,7 @@ const serializeAuthenticateWithCodeAndVerifierOptions = (options) => ({
784
762
  user_agent: options.userAgent,
785
763
  signals_id: options.signalsId
786
764
  });
787
- //#endregion
788
- //#region src/user-management/serializers/authenticate-with-magic-auth-options.serializer.ts
765
+ // src/user-management/serializers/authenticate-with-magic-auth-options.serializer.ts
789
766
  const serializeAuthenticateWithMagicAuthOptions = (options) => ({
790
767
  grant_type: "urn:workos:oauth:grant-type:magic-auth:code",
791
768
  client_id: options.clientId,
@@ -799,8 +776,7 @@ const serializeAuthenticateWithMagicAuthOptions = (options) => ({
799
776
  radar_auth_attempt_id: options.radarAuthAttemptId,
800
777
  signals_id: options.signalsId
801
778
  });
802
- //#endregion
803
- //#region src/user-management/serializers/authenticate-with-radar-email-challenge-options.serializer.ts
779
+ // src/user-management/serializers/authenticate-with-radar-email-challenge-options.serializer.ts
804
780
  const serializeAuthenticateWithRadarEmailChallengeOptions = (options) => ({
805
781
  grant_type: "urn:workos:oauth:grant-type:radar-email-challenge:code",
806
782
  client_id: options.clientId,
@@ -811,8 +787,7 @@ const serializeAuthenticateWithRadarEmailChallengeOptions = (options) => ({
811
787
  ip_address: options.ipAddress,
812
788
  user_agent: options.userAgent
813
789
  });
814
- //#endregion
815
- //#region src/user-management/serializers/authenticate-with-radar-sms-challenge-options.serializer.ts
790
+ // src/user-management/serializers/authenticate-with-radar-sms-challenge-options.serializer.ts
816
791
  const serializeAuthenticateWithRadarSmsChallengeOptions = (options) => ({
817
792
  grant_type: "urn:workos:oauth:grant-type:radar-sms-challenge:code",
818
793
  client_id: options.clientId,
@@ -824,8 +799,7 @@ const serializeAuthenticateWithRadarSmsChallengeOptions = (options) => ({
824
799
  ip_address: options.ipAddress,
825
800
  user_agent: options.userAgent
826
801
  });
827
- //#endregion
828
- //#region src/user-management/serializers/authenticate-with-password-options.serializer.ts
802
+ // src/user-management/serializers/authenticate-with-password-options.serializer.ts
829
803
  const serializeAuthenticateWithPasswordOptions = (options) => ({
830
804
  grant_type: "password",
831
805
  client_id: options.clientId,
@@ -838,8 +812,7 @@ const serializeAuthenticateWithPasswordOptions = (options) => ({
838
812
  radar_auth_attempt_id: options.radarAuthAttemptId,
839
813
  signals_id: options.signalsId
840
814
  });
841
- //#endregion
842
- //#region src/user-management/serializers/authenticate-with-refresh-token.options.serializer.ts
815
+ // src/user-management/serializers/authenticate-with-refresh-token.options.serializer.ts
843
816
  const serializeAuthenticateWithRefreshTokenOptions = (options) => ({
844
817
  grant_type: "refresh_token",
845
818
  client_id: options.clientId,
@@ -849,8 +822,7 @@ const serializeAuthenticateWithRefreshTokenOptions = (options) => ({
849
822
  ip_address: options.ipAddress,
850
823
  user_agent: options.userAgent
851
824
  });
852
- //#endregion
853
- //#region src/user-management/serializers/authenticate-with-refresh-token-public-client-options.serializer.ts
825
+ // src/user-management/serializers/authenticate-with-refresh-token-public-client-options.serializer.ts
854
826
  const serializeAuthenticateWithRefreshTokenPublicClientOptions = (options) => ({
855
827
  grant_type: "refresh_token",
856
828
  client_id: options.clientId,
@@ -859,8 +831,7 @@ const serializeAuthenticateWithRefreshTokenPublicClientOptions = (options) => ({
859
831
  ip_address: options.ipAddress,
860
832
  user_agent: options.userAgent
861
833
  });
862
- //#endregion
863
- //#region src/user-management/serializers/authenticate-with-totp-options.serializer.ts
834
+ // src/user-management/serializers/authenticate-with-totp-options.serializer.ts
864
835
  const serializeAuthenticateWithTotpOptions = (options) => ({
865
836
  grant_type: "urn:workos:oauth:grant-type:mfa-totp",
866
837
  client_id: options.clientId,
@@ -871,8 +842,7 @@ const serializeAuthenticateWithTotpOptions = (options) => ({
871
842
  ip_address: options.ipAddress,
872
843
  user_agent: options.userAgent
873
844
  });
874
- //#endregion
875
- //#region src/user-management/serializers/authentication-event.serializer.ts
845
+ // src/user-management/serializers/authentication-event.serializer.ts
876
846
  const deserializeAuthenticationEventSso = (sso) => ({
877
847
  connectionId: sso.connection_id ?? null,
878
848
  organizationId: sso.organization_id ?? null,
@@ -888,11 +858,9 @@ const deserializeAuthenticationEvent = (authenticationEvent) => ({
888
858
  userAgent: authenticationEvent.user_agent,
889
859
  userId: authenticationEvent.user_id
890
860
  });
891
- //#endregion
892
- //#region src/multi-factor-auth/serializers/sms.serializer.ts
861
+ // src/multi-factor-auth/serializers/sms.serializer.ts
893
862
  const deserializeSms = (sms) => ({ phoneNumber: sms.phone_number });
894
- //#endregion
895
- //#region src/multi-factor-auth/serializers/totp.serializer.ts
863
+ // src/multi-factor-auth/serializers/totp.serializer.ts
896
864
  const deserializeTotp = (totp) => {
897
865
  return {
898
866
  issuer: totp.issuer,
@@ -908,8 +876,7 @@ const deserializeTotpWithSecrets = (totp) => {
908
876
  uri: totp.uri
909
877
  };
910
878
  };
911
- //#endregion
912
- //#region src/user-management/serializers/authentication-factor.serializer.ts
879
+ // src/user-management/serializers/authentication-factor.serializer.ts
913
880
  const deserializeFactor$1 = (factor) => ({
914
881
  object: factor.object,
915
882
  id: factor.id,
@@ -929,16 +896,14 @@ const deserializeFactorWithSecrets$1 = (factor) => ({
929
896
  totp: deserializeTotpWithSecrets(factor.totp),
930
897
  userId: factor.user_id
931
898
  });
932
- //#endregion
933
- //#region src/user-management/serializers/oauth-tokens.serializer.ts
899
+ // src/user-management/serializers/oauth-tokens.serializer.ts
934
900
  const deserializeOauthTokens = (oauthTokens) => oauthTokens ? {
935
901
  accessToken: oauthTokens.access_token,
936
902
  refreshToken: oauthTokens.refresh_token,
937
903
  expiresAt: oauthTokens.expires_at,
938
904
  scopes: oauthTokens.scopes
939
905
  } : void 0;
940
- //#endregion
941
- //#region src/user-management/serializers/user.serializer.ts
906
+ // src/user-management/serializers/user.serializer.ts
942
907
  const deserializeUser = (user) => ({
943
908
  object: user.object,
944
909
  id: user.id,
@@ -955,8 +920,7 @@ const deserializeUser = (user) => ({
955
920
  externalId: user.external_id ?? null,
956
921
  metadata: user.metadata ?? {}
957
922
  });
958
- //#endregion
959
- //#region src/user-management/serializers/authentication-response.serializer.ts
923
+ // src/user-management/serializers/authentication-response.serializer.ts
960
924
  const deserializeAuthenticationResponse = (authenticationResponse) => {
961
925
  const { user, organization_id, access_token, refresh_token, authentication_method, impersonator, oauth_tokens, ...rest } = authenticationResponse;
962
926
  return {
@@ -970,14 +934,12 @@ const deserializeAuthenticationResponse = (authenticationResponse) => {
970
934
  ...rest
971
935
  };
972
936
  };
973
- //#endregion
974
- //#region src/connect/serializers/connect-application-redirect-uri.serializer.ts
937
+ // src/connect/serializers/connect-application-redirect-uri.serializer.ts
975
938
  const deserializeConnectApplicationRedirectUri = (response) => ({
976
939
  uri: response.uri,
977
940
  default: response.default
978
941
  });
979
- //#endregion
980
- //#region src/connect/serializers/connect-application.serializer.ts
942
+ // src/connect/serializers/connect-application.serializer.ts
981
943
  const deserializeConnectApplication = (response) => {
982
944
  switch (response.application_type) {
983
945
  case "oauth": return {
@@ -1011,8 +973,7 @@ const deserializeConnectApplication = (response) => {
1011
973
  default: throw new Error(`Unknown application_type: ${response.application_type}`);
1012
974
  }
1013
975
  };
1014
- //#endregion
1015
- //#region src/user-management/serializers/authorized-connect-application.serializer.ts
976
+ // src/user-management/serializers/authorized-connect-application.serializer.ts
1016
977
  const deserializeAuthorizedConnectApplication = (response) => ({
1017
978
  object: response.object,
1018
979
  id: response.id,
@@ -1020,8 +981,7 @@ const deserializeAuthorizedConnectApplication = (response) => ({
1020
981
  oauthResource: response.oauth_resource,
1021
982
  application: deserializeConnectApplication(response.application)
1022
983
  });
1023
- //#endregion
1024
- //#region src/user-management/serializers/create-magic-auth-options.serializer.ts
984
+ // src/user-management/serializers/create-magic-auth-options.serializer.ts
1025
985
  const serializeCreateMagicAuthOptions = (options) => ({
1026
986
  email: options.email,
1027
987
  invitation_token: options.invitationToken,
@@ -1030,11 +990,9 @@ const serializeCreateMagicAuthOptions = (options) => ({
1030
990
  radar_auth_attempt_id: options.radarAuthAttemptId,
1031
991
  signals_id: options.signalsId
1032
992
  });
1033
- //#endregion
1034
- //#region src/user-management/serializers/create-password-reset-options.serializer.ts
993
+ // src/user-management/serializers/create-password-reset-options.serializer.ts
1035
994
  const serializeCreatePasswordResetOptions = (options) => ({ email: options.email });
1036
- //#endregion
1037
- //#region src/user-management/serializers/create-user-api-key-options.serializer.ts
995
+ // src/user-management/serializers/create-user-api-key-options.serializer.ts
1038
996
  function serializeCreateUserApiKeyOptions(options) {
1039
997
  return {
1040
998
  name: options.name,
@@ -1043,8 +1001,7 @@ function serializeCreateUserApiKeyOptions(options) {
1043
1001
  expires_at: options.expiresAt?.toISOString()
1044
1002
  };
1045
1003
  }
1046
- //#endregion
1047
- //#region src/user-management/serializers/email-verification.serializer.ts
1004
+ // src/user-management/serializers/email-verification.serializer.ts
1048
1005
  const deserializeEmailVerification = (emailVerification) => ({
1049
1006
  object: emailVerification.object,
1050
1007
  id: emailVerification.id,
@@ -1064,16 +1021,14 @@ const deserializeEmailVerificationEvent = (emailVerification) => ({
1064
1021
  createdAt: new Date(emailVerification.created_at),
1065
1022
  updatedAt: new Date(emailVerification.updated_at)
1066
1023
  });
1067
- //#endregion
1068
- //#region src/user-management/serializers/enroll-auth-factor-options.serializer.ts
1024
+ // src/user-management/serializers/enroll-auth-factor-options.serializer.ts
1069
1025
  const serializeEnrollAuthFactorOptions = (options) => ({
1070
1026
  type: options.type,
1071
1027
  totp_issuer: options.totpIssuer,
1072
1028
  totp_user: options.totpUser,
1073
1029
  totp_secret: options.totpSecret
1074
1030
  });
1075
- //#endregion
1076
- //#region src/user-management/serializers/invitation.serializer.ts
1031
+ // src/user-management/serializers/invitation.serializer.ts
1077
1032
  const deserializeInvitation = (invitation) => ({
1078
1033
  object: invitation.object,
1079
1034
  id: invitation.id,
@@ -1106,11 +1061,9 @@ const deserializeInvitationEvent = (invitation) => ({
1106
1061
  createdAt: new Date(invitation.created_at),
1107
1062
  updatedAt: new Date(invitation.updated_at)
1108
1063
  });
1109
- //#endregion
1110
- //#region src/user-management/serializers/list-sessions-options.serializer.ts
1064
+ // src/user-management/serializers/list-sessions-options.serializer.ts
1111
1065
  const serializeListSessionsOptions = (options) => ({ ...options });
1112
- //#endregion
1113
- //#region src/user-management/serializers/list-user-api-keys-options.serializer.ts
1066
+ // src/user-management/serializers/list-user-api-keys-options.serializer.ts
1114
1067
  function serializeListUserApiKeysOptions(options) {
1115
1068
  return {
1116
1069
  limit: options.limit,
@@ -1120,8 +1073,7 @@ function serializeListUserApiKeysOptions(options) {
1120
1073
  organization_id: options.organizationId
1121
1074
  };
1122
1075
  }
1123
- //#endregion
1124
- //#region src/user-management/serializers/magic-auth.serializer.ts
1076
+ // src/user-management/serializers/magic-auth.serializer.ts
1125
1077
  const deserializeMagicAuth = (magicAuth) => ({
1126
1078
  object: magicAuth.object,
1127
1079
  id: magicAuth.id,
@@ -1141,8 +1093,7 @@ const deserializeMagicAuthEvent = (magicAuth) => ({
1141
1093
  createdAt: new Date(magicAuth.created_at),
1142
1094
  updatedAt: new Date(magicAuth.updated_at)
1143
1095
  });
1144
- //#endregion
1145
- //#region src/user-management/serializers/password-reset.serializer.ts
1096
+ // src/user-management/serializers/password-reset.serializer.ts
1146
1097
  const deserializePasswordReset = (passwordReset) => ({
1147
1098
  object: passwordReset.object,
1148
1099
  id: passwordReset.id,
@@ -1161,14 +1112,12 @@ const deserializePasswordResetEvent = (passwordReset) => ({
1161
1112
  expiresAt: new Date(passwordReset.expires_at),
1162
1113
  createdAt: new Date(passwordReset.created_at)
1163
1114
  });
1164
- //#endregion
1165
- //#region src/user-management/serializers/reset-password-options.serializer.ts
1115
+ // src/user-management/serializers/reset-password-options.serializer.ts
1166
1116
  const serializeResetPasswordOptions = (options) => ({
1167
1117
  token: options.token,
1168
1118
  new_password: options.newPassword
1169
1119
  });
1170
- //#endregion
1171
- //#region src/user-management/serializers/session.serializer.ts
1120
+ // src/user-management/serializers/session.serializer.ts
1172
1121
  const deserializeSession = (session) => ({
1173
1122
  object: "session",
1174
1123
  id: session.id,
@@ -1184,8 +1133,7 @@ const deserializeSession = (session) => ({
1184
1133
  createdAt: new Date(session.created_at),
1185
1134
  updatedAt: new Date(session.updated_at)
1186
1135
  });
1187
- //#endregion
1188
- //#region src/user-management/serializers/create-user-options.serializer.ts
1136
+ // src/user-management/serializers/create-user-options.serializer.ts
1189
1137
  const serializeCreateUserOptions = (options) => ({
1190
1138
  email: options.email,
1191
1139
  password: options.password,
@@ -1201,8 +1149,7 @@ const serializeCreateUserOptions = (options) => ({
1201
1149
  user_agent: options.userAgent,
1202
1150
  signals_id: options.signalsId
1203
1151
  });
1204
- //#endregion
1205
- //#region src/user-management/serializers/send-radar-sms-challenge-options.serializer.ts
1152
+ // src/user-management/serializers/send-radar-sms-challenge-options.serializer.ts
1206
1153
  const serializeSendRadarSmsChallengeOptions = (options) => ({
1207
1154
  user_id: options.userId,
1208
1155
  pending_authentication_token: options.pendingAuthenticationToken,
@@ -1210,8 +1157,7 @@ const serializeSendRadarSmsChallengeOptions = (options) => ({
1210
1157
  ip_address: options.ipAddress,
1211
1158
  user_agent: options.userAgent
1212
1159
  });
1213
- //#endregion
1214
- //#region src/user-management/serializers/update-user-options.serializer.ts
1160
+ // src/user-management/serializers/update-user-options.serializer.ts
1215
1161
  const serializeUpdateUserOptions = (options) => ({
1216
1162
  email: options.email,
1217
1163
  email_verified: options.emailVerified,
@@ -1225,8 +1171,7 @@ const serializeUpdateUserOptions = (options) => ({
1225
1171
  locale: options.locale,
1226
1172
  metadata: options.metadata
1227
1173
  });
1228
- //#endregion
1229
- //#region src/user-management/serializers/user-api-key.serializer.ts
1174
+ // src/user-management/serializers/user-api-key.serializer.ts
1230
1175
  function deserializeUserApiKey(apiKey) {
1231
1176
  return {
1232
1177
  object: apiKey.object,
@@ -1245,24 +1190,21 @@ function deserializeUserApiKey(apiKey) {
1245
1190
  updatedAt: new Date(apiKey.updated_at)
1246
1191
  };
1247
1192
  }
1248
- //#endregion
1249
- //#region src/user-management/serializers/user-api-key-with-value.serializer.ts
1193
+ // src/user-management/serializers/user-api-key-with-value.serializer.ts
1250
1194
  function deserializeUserApiKeyWithValue(apiKey) {
1251
1195
  return {
1252
1196
  ...deserializeUserApiKey(apiKey),
1253
1197
  value: apiKey.value
1254
1198
  };
1255
1199
  }
1256
- //#endregion
1257
- //#region src/user-management/serializers/waitlist.serializer.ts
1200
+ // src/user-management/serializers/waitlist.serializer.ts
1258
1201
  const deserializeWaitlist = (waitlist) => ({
1259
1202
  object: waitlist.object,
1260
1203
  id: waitlist.id,
1261
1204
  createdAt: new Date(waitlist.created_at),
1262
1205
  updatedAt: new Date(waitlist.updated_at)
1263
1206
  });
1264
- //#endregion
1265
- //#region src/user-management/serializers/waitlist-entry.serializer.ts
1207
+ // src/user-management/serializers/waitlist-entry.serializer.ts
1266
1208
  const deserializeWaitlistEntry = (waitlistEntry) => ({
1267
1209
  object: waitlistEntry.object,
1268
1210
  id: waitlistEntry.id,
@@ -1274,8 +1216,7 @@ const deserializeWaitlistEntry = (waitlistEntry) => ({
1274
1216
  createdAt: new Date(waitlistEntry.created_at),
1275
1217
  updatedAt: new Date(waitlistEntry.updated_at)
1276
1218
  });
1277
- //#endregion
1278
- //#region src/user-management/serializers/waitlist-user-event.serializer.ts
1219
+ // src/user-management/serializers/waitlist-user-event.serializer.ts
1279
1220
  const deserializeWaitlistUserEvent = (data) => ({
1280
1221
  object: data.object,
1281
1222
  id: data.id,
@@ -1287,8 +1228,7 @@ const deserializeWaitlistUserEvent = (data) => ({
1287
1228
  createdAt: new Date(data.created_at),
1288
1229
  updatedAt: new Date(data.updated_at)
1289
1230
  });
1290
- //#endregion
1291
- //#region src/user-management/serializers/organization-membership.serializer.ts
1231
+ // src/user-management/serializers/organization-membership.serializer.ts
1292
1232
  const deserializeOrganizationMembership = (organizationMembership) => ({
1293
1233
  object: organizationMembership.object,
1294
1234
  id: organizationMembership.id,
@@ -1315,8 +1255,7 @@ const deserializeAuthorizationOrganizationMembership = (organizationMembership)
1315
1255
  updatedAt: new Date(organizationMembership.updated_at),
1316
1256
  customAttributes: organizationMembership.custom_attributes ?? {}
1317
1257
  });
1318
- //#endregion
1319
- //#region src/actions/serializers/action.serializer.ts
1258
+ // src/actions/serializers/action.serializer.ts
1320
1259
  const deserializeUserData = (userData) => {
1321
1260
  return {
1322
1261
  object: userData.object,
@@ -1352,8 +1291,7 @@ const deserializeAction = (actionPayload) => {
1352
1291
  };
1353
1292
  }
1354
1293
  };
1355
- //#endregion
1356
- //#region src/actions/actions.ts
1294
+ // src/actions/actions.ts
1357
1295
  var Actions = class {
1358
1296
  signatureProvider;
1359
1297
  constructor(cryptoProvider) {
@@ -1399,8 +1337,7 @@ var Actions = class {
1399
1337
  return deserializeAction(parsed);
1400
1338
  }
1401
1339
  };
1402
- //#endregion
1403
- //#region src/common/utils/pagination.ts
1340
+ // src/common/utils/pagination.ts
1404
1341
  var AutoPaginatable = class {
1405
1342
  list;
1406
1343
  apiCall;
@@ -1441,8 +1378,7 @@ var AutoPaginatable = class {
1441
1378
  return results;
1442
1379
  }
1443
1380
  };
1444
- //#endregion
1445
- //#region src/agents/serializers/agent-blueprint.serializer.ts
1381
+ // src/agents/serializers/agent-blueprint.serializer.ts
1446
1382
  function deserializeAgentBlueprint(blueprint) {
1447
1383
  return {
1448
1384
  object: blueprint.object,
@@ -1495,8 +1431,7 @@ function serializeUpdateAgentBlueprintOptions(options) {
1495
1431
  } }
1496
1432
  };
1497
1433
  }
1498
- //#endregion
1499
- //#region src/agents/serializers/agent-event.serializer.ts
1434
+ // src/agents/serializers/agent-event.serializer.ts
1500
1435
  const deserializeAgentBlueprintEvent = (data) => ({
1501
1436
  ...deserializeAgentBlueprint(data),
1502
1437
  invocableAs: { instanceTypes: data.invocable_as.instance_types }
@@ -1587,8 +1522,7 @@ const deserializeAgentRegistrationOrganizationSwitchedEvent = (data) => ({
1587
1522
  toOrganizationId: data.to_organization_id
1588
1523
  });
1589
1524
  const deserializeAgentRegistrationLifecycleEvent = (data) => ({ agentRegistrationId: data.agent_registration_id });
1590
- //#endregion
1591
- //#region src/agents/serializers/agent-instance.serializer.ts
1525
+ // src/agents/serializers/agent-instance.serializer.ts
1592
1526
  function deserializeAgentInstance(instance) {
1593
1527
  return {
1594
1528
  object: instance.object,
@@ -1611,20 +1545,17 @@ function serializeListAgentInstancesOptions(options) {
1611
1545
  order: options.order
1612
1546
  };
1613
1547
  }
1614
- //#endregion
1615
- //#region src/directory-sync/serializers/directory-metadata-user.serializer.ts
1548
+ // src/directory-sync/serializers/directory-metadata-user.serializer.ts
1616
1549
  const deserializeDirectoryMetadataUser = (response) => ({
1617
1550
  active: response.active,
1618
1551
  inactive: response.inactive
1619
1552
  });
1620
- //#endregion
1621
- //#region src/directory-sync/serializers/directory-metadata.serializer.ts
1553
+ // src/directory-sync/serializers/directory-metadata.serializer.ts
1622
1554
  const deserializeDirectoryMetadata = (response) => ({
1623
1555
  users: deserializeDirectoryMetadataUser(response.users),
1624
1556
  groups: response.groups
1625
1557
  });
1626
- //#endregion
1627
- //#region src/directory-sync/serializers/directory.serializer.ts
1558
+ // src/directory-sync/serializers/directory.serializer.ts
1628
1559
  const deserializeDirectoryState = (value) => {
1629
1560
  if (value === "linked") return "active";
1630
1561
  if (value === "unlinked") return "inactive";
@@ -1643,8 +1574,7 @@ const deserializeDirectory = (response) => ({
1643
1574
  createdAt: new Date(response.created_at),
1644
1575
  updatedAt: new Date(response.updated_at)
1645
1576
  });
1646
- //#endregion
1647
- //#region src/directory-sync/serializers/directory-group.serializer.ts
1577
+ // src/directory-sync/serializers/directory-group.serializer.ts
1648
1578
  const deserializeDirectoryGroup = (response) => ({
1649
1579
  object: response.object,
1650
1580
  id: response.id,
@@ -1656,8 +1586,7 @@ const deserializeDirectoryGroup = (response) => ({
1656
1586
  createdAt: new Date(response.created_at),
1657
1587
  updatedAt: new Date(response.updated_at)
1658
1588
  });
1659
- //#endregion
1660
- //#region src/directory-sync/serializers/directory-user.serializer.ts
1589
+ // src/directory-sync/serializers/directory-user.serializer.ts
1661
1590
  const deserializeDirectoryUser = (directoryUser) => ({
1662
1591
  object: directoryUser.object,
1663
1592
  id: directoryUser.id,
@@ -1699,8 +1628,7 @@ const deserializeUpdatedEventDirectoryUser = (directoryUser) => ({
1699
1628
  updatedAt: new Date(directoryUser.updated_at),
1700
1629
  previousAttributes: directoryUser.previous_attributes
1701
1630
  });
1702
- //#endregion
1703
- //#region src/directory-sync/serializers/event-directory.serializer.ts
1631
+ // src/directory-sync/serializers/event-directory.serializer.ts
1704
1632
  const deserializeEventDirectory = (directory) => ({
1705
1633
  object: directory.object,
1706
1634
  id: directory.id,
@@ -1727,8 +1655,7 @@ const deserializeUpdatedEventDirectoryGroup = (directoryGroup) => ({
1727
1655
  ...deserializeDirectoryGroup(directoryGroup),
1728
1656
  previousAttributes: directoryGroup.previous_attributes
1729
1657
  });
1730
- //#endregion
1731
- //#region src/directory-sync/serializers/directory-token.serializer.ts
1658
+ // src/directory-sync/serializers/directory-token.serializer.ts
1732
1659
  const deserializeDirectoryToken = (token) => ({
1733
1660
  object: token.object,
1734
1661
  id: token.id,
@@ -1737,20 +1664,17 @@ const deserializeDirectoryToken = (token) => ({
1737
1664
  tokenSuffix: token.token_suffix,
1738
1665
  createdAt: new Date(token.created_at)
1739
1666
  });
1740
- //#endregion
1741
- //#region src/organizations/serializers/create-organization-options.serializer.ts
1667
+ // src/organizations/serializers/create-organization-options.serializer.ts
1742
1668
  const serializeCreateOrganizationOptions = (options) => ({
1743
1669
  name: options.name,
1744
1670
  domain_data: options.domainData,
1745
1671
  external_id: options.externalId,
1746
1672
  metadata: options.metadata
1747
1673
  });
1748
- //#endregion
1749
- //#region src/organizations/serializers/it-contact-options.serializer.ts
1674
+ // src/organizations/serializers/it-contact-options.serializer.ts
1750
1675
  const serializeCreateItContactOptions = (options) => ({ email: options.email });
1751
1676
  const serializeInviteItContactOptions = (options) => ({ intents: options.intents });
1752
- //#endregion
1753
- //#region src/organizations/serializers/it-contact.serializer.ts
1677
+ // src/organizations/serializers/it-contact.serializer.ts
1754
1678
  const deserializeItContact = (itContact) => ({
1755
1679
  object: itContact.object,
1756
1680
  id: itContact.id,
@@ -1758,8 +1682,7 @@ const deserializeItContact = (itContact) => ({
1758
1682
  createdAt: new Date(itContact.created_at),
1759
1683
  updatedAt: new Date(itContact.updated_at)
1760
1684
  });
1761
- //#endregion
1762
- //#region src/organizations/serializers/update-organization-options.serializer.ts
1685
+ // src/organizations/serializers/update-organization-options.serializer.ts
1763
1686
  const serializeUpdateOrganizationOptions = (options) => ({
1764
1687
  name: options.name,
1765
1688
  domain_data: options.domainData,
@@ -1767,8 +1690,13 @@ const serializeUpdateOrganizationOptions = (options) => ({
1767
1690
  external_id: options.externalId,
1768
1691
  metadata: options.metadata
1769
1692
  });
1770
- //#endregion
1771
- //#region src/sso/serializers/connection.serializer.ts
1693
+ // src/sso/serializers/authorize-logout.serializer.ts
1694
+ const serializeAuthorizeLogoutOptions = (options) => ({ profile_id: options.profileId });
1695
+ const deserializeAuthorizeLogout = (response) => ({
1696
+ logoutToken: response.logout_token,
1697
+ logoutUrl: response.logout_url
1698
+ });
1699
+ // src/sso/serializers/connection.serializer.ts
1772
1700
  const deserializeConnection = (connection) => ({
1773
1701
  object: connection.object,
1774
1702
  id: connection.id,
@@ -1780,8 +1708,7 @@ const deserializeConnection = (connection) => ({
1780
1708
  createdAt: new Date(connection.created_at),
1781
1709
  updatedAt: new Date(connection.updated_at)
1782
1710
  });
1783
- //#endregion
1784
- //#region src/sso/serializers/connection-event.serializer.ts
1711
+ // src/sso/serializers/connection-event.serializer.ts
1785
1712
  const deserializeConnectionEventConnection = (connection) => ({
1786
1713
  id: connection.id,
1787
1714
  ...connection.organization_id !== void 0 && { organizationId: connection.organization_id }
@@ -1803,19 +1730,18 @@ const deserializeConnectionSamlCertificateRenewedEvent = (data) => ({
1803
1730
  },
1804
1731
  renewedAt: new Date(data.renewed_at)
1805
1732
  });
1806
- //#endregion
1807
- //#region src/sso/serializers/list-connections-options.serializer.ts
1733
+ // src/sso/serializers/list-connections-options.serializer.ts
1808
1734
  const serializeListConnectionsOptions = (options) => ({
1809
1735
  connection_type: options.connectionType,
1810
1736
  domain: options.domain,
1811
1737
  organization_id: options.organizationId,
1738
+ state: options.state,
1812
1739
  limit: options.limit,
1813
1740
  before: options.before,
1814
1741
  after: options.after,
1815
1742
  order: options.order
1816
1743
  });
1817
- //#endregion
1818
- //#region src/sso/serializers/profile.serializer.ts
1744
+ // src/sso/serializers/profile.serializer.ts
1819
1745
  const deserializeProfile = (profile) => ({
1820
1746
  object: profile.object,
1821
1747
  id: profile.id,
@@ -1833,15 +1759,13 @@ const deserializeProfile = (profile) => ({
1833
1759
  ...profile.custom_attributes !== void 0 && { customAttributes: profile.custom_attributes },
1834
1760
  rawAttributes: profile.raw_attributes
1835
1761
  });
1836
- //#endregion
1837
- //#region src/sso/serializers/profile-and-token.serializer.ts
1762
+ // src/sso/serializers/profile-and-token.serializer.ts
1838
1763
  const deserializeProfileAndToken = (profileAndToken) => ({
1839
1764
  accessToken: profileAndToken.access_token,
1840
1765
  profile: deserializeProfile(profileAndToken.profile),
1841
1766
  oauthTokens: deserializeOauthTokens(profileAndToken.oauth_tokens)
1842
1767
  });
1843
- //#endregion
1844
- //#region src/user-management/serializers/role.serializer.ts
1768
+ // src/user-management/serializers/role.serializer.ts
1845
1769
  const deserializeRoleEvent = (role) => ({
1846
1770
  object: role.object,
1847
1771
  slug: role.slug,
@@ -1850,8 +1774,7 @@ const deserializeRoleEvent = (role) => ({
1850
1774
  createdAt: new Date(role.created_at),
1851
1775
  updatedAt: new Date(role.updated_at)
1852
1776
  });
1853
- //#endregion
1854
- //#region src/user-management/serializers/authentication-radar-risk-event-serializer.ts
1777
+ // src/user-management/serializers/authentication-radar-risk-event-serializer.ts
1855
1778
  const deserializeAuthenticationRadarRiskDetectedEvent = (authenticationRadarRiskDetectedEvent) => ({
1856
1779
  authMethod: authenticationRadarRiskDetectedEvent.auth_method,
1857
1780
  action: authenticationRadarRiskDetectedEvent.action,
@@ -1862,8 +1785,7 @@ const deserializeAuthenticationRadarRiskDetectedEvent = (authenticationRadarRisk
1862
1785
  userId: authenticationRadarRiskDetectedEvent.user_id,
1863
1786
  email: authenticationRadarRiskDetectedEvent.email
1864
1787
  });
1865
- //#endregion
1866
- //#region src/api-keys/serializers/api-key.serializer.ts
1788
+ // src/api-keys/serializers/api-key.serializer.ts
1867
1789
  function deserializeApiKey(apiKey) {
1868
1790
  return {
1869
1791
  object: apiKey.object,
@@ -1882,8 +1804,7 @@ function deserializeApiKey(apiKey) {
1882
1804
  updatedAt: new Date(apiKey.updated_at)
1883
1805
  };
1884
1806
  }
1885
- //#endregion
1886
- //#region src/authorization/serializers/organization-role.serializer.ts
1807
+ // src/authorization/serializers/organization-role.serializer.ts
1887
1808
  const deserializeRole = (role) => ({
1888
1809
  object: role.object,
1889
1810
  id: role.id,
@@ -1919,8 +1840,7 @@ const deserializeOrganizationRoleEvent = (event) => ({
1919
1840
  createdAt: new Date(event.created_at),
1920
1841
  updatedAt: new Date(event.updated_at)
1921
1842
  });
1922
- //#endregion
1923
- //#region src/authorization/serializers/permission.serializer.ts
1843
+ // src/authorization/serializers/permission.serializer.ts
1924
1844
  const deserializePermission = (permission) => ({
1925
1845
  object: permission.object,
1926
1846
  id: permission.id,
@@ -1932,8 +1852,7 @@ const deserializePermission = (permission) => ({
1932
1852
  createdAt: new Date(permission.created_at),
1933
1853
  updatedAt: new Date(permission.updated_at)
1934
1854
  });
1935
- //#endregion
1936
- //#region src/feature-flags/serializers/feature-flag.serializer.ts
1855
+ // src/feature-flags/serializers/feature-flag.serializer.ts
1937
1856
  const deserializeFeatureFlag = (featureFlag) => ({
1938
1857
  object: featureFlag.object,
1939
1858
  id: featureFlag.id,
@@ -1946,8 +1865,7 @@ const deserializeFeatureFlag = (featureFlag) => ({
1946
1865
  createdAt: new Date(featureFlag.created_at),
1947
1866
  updatedAt: new Date(featureFlag.updated_at)
1948
1867
  });
1949
- //#endregion
1950
- //#region src/feature-flags/serializers/flag-rule.serializer.ts
1868
+ // src/feature-flags/serializers/flag-rule.serializer.ts
1951
1869
  const deserializeFlagRule = (rule) => ({
1952
1870
  object: rule.object,
1953
1871
  id: rule.id,
@@ -1961,8 +1879,7 @@ const deserializeFlagRule = (rule) => ({
1961
1879
  createdAt: new Date(rule.created_at),
1962
1880
  updatedAt: new Date(rule.updated_at)
1963
1881
  });
1964
- //#endregion
1965
- //#region src/feature-flags/serializers/flag-target.serializer.ts
1882
+ // src/feature-flags/serializers/flag-target.serializer.ts
1966
1883
  const deserializeTargetFields = (target) => ({
1967
1884
  object: target.object,
1968
1885
  id: target.id,
@@ -1983,8 +1900,7 @@ const deserializeFlagTargetResource = (target) => "rule_id" in target ? deserial
1983
1900
  valueType: target.value_type,
1984
1901
  value: target.value
1985
1902
  };
1986
- //#endregion
1987
- //#region src/common/serializers/feature-flag-event.serializer.ts
1903
+ // src/common/serializers/feature-flag-event.serializer.ts
1988
1904
  const deserializeFeatureFlagOwner = (owner) => owner === null ? null : {
1989
1905
  email: owner.email,
1990
1906
  firstName: owner.first_name,
@@ -2032,17 +1948,14 @@ const deserializeFeatureFlagUpdatedContext = (context) => {
2032
1948
  } } } }
2033
1949
  };
2034
1950
  };
2035
- //#endregion
2036
- //#region src/groups/serializers/create-group.serializer.ts
1951
+ // src/groups/serializers/create-group.serializer.ts
2037
1952
  const serializeCreateGroup = (model) => ({
2038
1953
  name: model.name,
2039
1954
  description: model.description ?? null
2040
1955
  });
2041
- //#endregion
2042
- //#region src/groups/serializers/create-group-membership.serializer.ts
1956
+ // src/groups/serializers/create-group-membership.serializer.ts
2043
1957
  const serializeCreateGroupMembership = (model) => ({ organization_membership_id: model.organizationMembershipId });
2044
- //#endregion
2045
- //#region src/groups/serializers/group.serializer.ts
1958
+ // src/groups/serializers/group.serializer.ts
2046
1959
  const deserializeGroup = (response) => ({
2047
1960
  object: response.object,
2048
1961
  id: response.id,
@@ -2052,14 +1965,12 @@ const deserializeGroup = (response) => ({
2052
1965
  createdAt: new Date(response.created_at),
2053
1966
  updatedAt: new Date(response.updated_at)
2054
1967
  });
2055
- //#endregion
2056
- //#region src/groups/serializers/update-group.serializer.ts
1968
+ // src/groups/serializers/update-group.serializer.ts
2057
1969
  const serializeUpdateGroup = (model) => ({
2058
1970
  name: model.name,
2059
1971
  description: model.description ?? null
2060
1972
  });
2061
- //#endregion
2062
- //#region src/vault/serializers/vault-event.serializer.ts
1973
+ // src/vault/serializers/vault-event.serializer.ts
2063
1974
  const deserializeVaultActor = (actor) => ({
2064
1975
  actorId: actor.actor_id,
2065
1976
  actorSource: actor.actor_source,
@@ -2124,14 +2035,12 @@ const deserializeVaultByokKeyDeletedEvent = (data) => ({
2124
2035
  organizationId: data.organization_id,
2125
2036
  keyProvider: data.key_provider
2126
2037
  });
2127
- //#endregion
2128
- //#region src/organization-domains/serializers/organization-domain-verification-failed.serializer.ts
2038
+ // src/organization-domains/serializers/organization-domain-verification-failed.serializer.ts
2129
2039
  const deserializeOrganizationDomainVerificationFailed = (organizationDomainVerificationFailed) => ({
2130
2040
  reason: organizationDomainVerificationFailed.reason,
2131
2041
  organizationDomain: deserializeOrganizationDomain(organizationDomainVerificationFailed.organization_domain)
2132
2042
  });
2133
- //#endregion
2134
- //#region src/actions/serializers/action-event.serializer.ts
2043
+ // src/actions/serializers/action-event.serializer.ts
2135
2044
  const deserializeActionAuthenticationDeniedEvent = (data) => ({
2136
2045
  actionEndpointId: data.action_endpoint_id,
2137
2046
  actionExecutionId: data.action_execution_id,
@@ -2153,30 +2062,26 @@ const deserializeActionUserRegistrationDeniedEvent = (data) => ({
2153
2062
  ipAddress: data.ip_address,
2154
2063
  userAgent: data.user_agent
2155
2064
  });
2156
- //#endregion
2157
- //#region src/api-keys/serializers/api-key-event.serializer.ts
2065
+ // src/api-keys/serializers/api-key-event.serializer.ts
2158
2066
  function deserializeApiKeyUpdatedEvent(data) {
2159
2067
  return {
2160
2068
  ...deserializeApiKey(data),
2161
2069
  previousAttributes: { expiresAt: data.previous_attributes.expires_at != null ? new Date(data.previous_attributes.expires_at) : null }
2162
2070
  };
2163
2071
  }
2164
- //#endregion
2165
- //#region src/radar/serializers/radar-event.serializer.ts
2072
+ // src/radar/serializers/radar-event.serializer.ts
2166
2073
  const deserializeRadarChallengeCreatedEvent = (data) => ({
2167
2074
  type: data.type,
2168
2075
  radarChallengeId: data.radar_challenge_id,
2169
2076
  userId: data.user_id,
2170
2077
  email: data.email
2171
2078
  });
2172
- //#endregion
2173
- //#region src/common/serializers/resource-export-event.serializer.ts
2079
+ // src/common/serializers/resource-export-event.serializer.ts
2174
2080
  const deserializeResourceExportEvent = (data) => ({
2175
2081
  id: data.id,
2176
2082
  resourceType: data.resource_type
2177
2083
  });
2178
- //#endregion
2179
- //#region src/common/serializers/event.serializer.ts
2084
+ // src/common/serializers/event.serializer.ts
2180
2085
  const deserializePipesConnectedAccount = (connectedAccount) => ({
2181
2086
  object: connectedAccount.object,
2182
2087
  id: connectedAccount.id,
@@ -2660,23 +2565,20 @@ function deserializeKnownEvent(event, eventBase) {
2660
2565
  default: return;
2661
2566
  }
2662
2567
  }
2663
- //#endregion
2664
- //#region src/common/serializers/list.serializer.ts
2568
+ // src/common/serializers/list.serializer.ts
2665
2569
  const deserializeList = (list, deserializer) => ({
2666
2570
  object: "list",
2667
2571
  data: list.data.map(deserializer),
2668
2572
  listMetadata: list.list_metadata
2669
2573
  });
2670
- //#endregion
2671
- //#region src/common/serializers/pagination-options.serializer.ts
2574
+ // src/common/serializers/pagination-options.serializer.ts
2672
2575
  const serializePaginationOptions = (options) => ({
2673
2576
  ...options.limit !== void 0 && { limit: options.limit },
2674
2577
  ...options.after && { after: options.after },
2675
2578
  ...options.before && { before: options.before },
2676
2579
  ...options.order && { order: options.order }
2677
2580
  });
2678
- //#endregion
2679
- //#region src/common/utils/fetch-and-deserialize.ts
2581
+ // src/common/utils/fetch-and-deserialize.ts
2680
2582
  const setDefaultOptions = (options) => {
2681
2583
  return {
2682
2584
  ...options,
@@ -2690,8 +2592,7 @@ const fetchAndDeserialize = async (workos, endpoint, deserializeFn, options, req
2690
2592
  });
2691
2593
  return deserializeList(data, deserializeFn);
2692
2594
  };
2693
- //#endregion
2694
- //#region src/webhooks/serializers/webhook-endpoint.serializer.ts
2595
+ // src/webhooks/serializers/webhook-endpoint.serializer.ts
2695
2596
  const deserializeWebhookEndpoint = (response) => ({
2696
2597
  object: response.object,
2697
2598
  id: response.id,
@@ -2702,21 +2603,18 @@ const deserializeWebhookEndpoint = (response) => ({
2702
2603
  createdAt: new Date(response.created_at),
2703
2604
  updatedAt: new Date(response.updated_at)
2704
2605
  });
2705
- //#endregion
2706
- //#region src/webhooks/serializers/create-webhook-endpoint.serializer.ts
2606
+ // src/webhooks/serializers/create-webhook-endpoint.serializer.ts
2707
2607
  const serializeCreateWebhookEndpoint = (model) => ({
2708
2608
  endpoint_url: model.endpointUrl,
2709
2609
  events: model.events
2710
2610
  });
2711
- //#endregion
2712
- //#region src/webhooks/serializers/update-webhook-endpoint.serializer.ts
2611
+ // src/webhooks/serializers/update-webhook-endpoint.serializer.ts
2713
2612
  const serializeUpdateWebhookEndpoint = (model) => ({
2714
2613
  endpoint_url: model.endpointUrl,
2715
2614
  status: model.status,
2716
2615
  events: model.events
2717
2616
  });
2718
- //#endregion
2719
- //#region src/webhooks/webhooks.ts
2617
+ // src/webhooks/webhooks.ts
2720
2618
  var Webhooks = class {
2721
2619
  workos;
2722
2620
  constructor(workos) {
@@ -2818,8 +2716,7 @@ var Webhooks = class {
2818
2716
  return JSON.parse(decodePayloadToString(payload));
2819
2717
  }
2820
2718
  };
2821
- //#endregion
2822
- //#region src/pkce/pkce.ts
2719
+ // src/pkce/pkce.ts
2823
2720
  /**
2824
2721
  * PKCE (Proof Key for Code Exchange) utilities for OAuth 2.0 public clients.
2825
2722
  *
@@ -2868,8 +2765,7 @@ var PKCE = class {
2868
2765
  return btoa(String.fromCharCode(...buffer)).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
2869
2766
  }
2870
2767
  };
2871
- //#endregion
2872
- //#region src/utils/jose.ts
2768
+ // src/utils/jose.ts
2873
2769
  let _josePromise;
2874
2770
  /**
2875
2771
  * Dynamically imports the jose library using import() to support Node.js 20.0-20.18.
@@ -2884,10 +2780,9 @@ let _josePromise;
2884
2780
  * @returns Promise that resolves to the jose module
2885
2781
  */
2886
2782
  function getJose() {
2887
- return _josePromise ??= import("./webapi-CfgZkeeN.mjs");
2783
+ return _josePromise ??= import("./webapi-CFOFAgDt.mjs");
2888
2784
  }
2889
- //#endregion
2890
- //#region src/agents/serializers/agent-instance-session.serializer.ts
2785
+ // src/agents/serializers/agent-instance-session.serializer.ts
2891
2786
  function deserializeAgentInstanceSession(session) {
2892
2787
  return {
2893
2788
  object: session.object,
@@ -2910,8 +2805,7 @@ function serializeListAgentInstanceSessionsOptions(options) {
2910
2805
  order: options.order
2911
2806
  };
2912
2807
  }
2913
- //#endregion
2914
- //#region src/agents/serializers/agent-registration.serializer.ts
2808
+ // src/agents/serializers/agent-registration.serializer.ts
2915
2809
  function deserializeAgentRegistration(registration) {
2916
2810
  return {
2917
2811
  id: registration.id,
@@ -2942,8 +2836,7 @@ function deserializeAgentRegistration(registration) {
2942
2836
  updatedAt: new Date(registration.updated_at)
2943
2837
  };
2944
2838
  }
2945
- //#endregion
2946
- //#region src/agents/serializers/agent-token.serializer.ts
2839
+ // src/agents/serializers/agent-token.serializer.ts
2947
2840
  function deserializeAgentToken(token) {
2948
2841
  return {
2949
2842
  accessToken: token.access_token,
@@ -2981,8 +2874,7 @@ function serializeMintAgentTokenOptions(options) {
2981
2874
  };
2982
2875
  }
2983
2876
  }
2984
- //#endregion
2985
- //#region src/agents/serializers/claim-attempt.serializer.ts
2877
+ // src/agents/serializers/claim-attempt.serializer.ts
2986
2878
  function serializeLinkClaimAttemptToExternalUserOptions(options) {
2987
2879
  return {
2988
2880
  type: "link_external_user",
@@ -3002,8 +2894,7 @@ function deserializeClaimAttemptResponse(response) {
3002
2894
  organizations: response.organizations
3003
2895
  };
3004
2896
  }
3005
- //#endregion
3006
- //#region src/agents/serializers/validate-agent-credential.serializer.ts
2897
+ // src/agents/serializers/validate-agent-credential.serializer.ts
3007
2898
  function serializeValidateAgentCredentialOptions(options) {
3008
2899
  return {
3009
2900
  type: options.type,
@@ -3038,8 +2929,7 @@ function deserializeAgentAccessTokenClaims(payload) {
3038
2929
  issuedAt: payload.iat
3039
2930
  };
3040
2931
  }
3041
- //#endregion
3042
- //#region src/agents/agents.ts
2932
+ // src/agents/agents.ts
3043
2933
  /**
3044
2934
  * A decoded JWT payload is only an agent credential if it carries every claim
3045
2935
  * the SDK guarantees. A token signed by the same JWKS for another purpose
@@ -3350,8 +3240,7 @@ var Agents = class {
3350
3240
  return this._jwks;
3351
3241
  }
3352
3242
  };
3353
- //#endregion
3354
- //#region src/api-keys/serializers/create-organization-api-key-options.serializer.ts
3243
+ // src/api-keys/serializers/create-organization-api-key-options.serializer.ts
3355
3244
  function serializeCreateOrganizationApiKeyOptions(options) {
3356
3245
  return {
3357
3246
  name: options.name,
@@ -3359,8 +3248,7 @@ function serializeCreateOrganizationApiKeyOptions(options) {
3359
3248
  expires_at: options.expiresAt?.toISOString()
3360
3249
  };
3361
3250
  }
3362
- //#endregion
3363
- //#region src/api-keys/serializers/created-api-key.serializer.ts
3251
+ // src/api-keys/serializers/created-api-key.serializer.ts
3364
3252
  function deserializeCreatedApiKey(apiKey) {
3365
3253
  return {
3366
3254
  object: apiKey.object,
@@ -3376,16 +3264,14 @@ function deserializeCreatedApiKey(apiKey) {
3376
3264
  updatedAt: new Date(apiKey.updated_at)
3377
3265
  };
3378
3266
  }
3379
- //#endregion
3380
- //#region src/api-keys/serializers/validate-api-key.serializer.ts
3267
+ // src/api-keys/serializers/validate-api-key.serializer.ts
3381
3268
  function deserializeValidateApiKeyResponse(response) {
3382
3269
  return {
3383
3270
  apiKey: response.api_key ? deserializeApiKey(response.api_key) : null,
3384
3271
  ...typeof response.agent_registration_id === "undefined" ? void 0 : { agentRegistrationId: response.agent_registration_id }
3385
3272
  };
3386
3273
  }
3387
- //#endregion
3388
- //#region src/api-keys/api-keys.ts
3274
+ // src/api-keys/api-keys.ts
3389
3275
  var ApiKeys = class {
3390
3276
  workos;
3391
3277
  constructor(workos) {
@@ -3456,11 +3342,9 @@ var ApiKeys = class {
3456
3342
  return deserializeCreatedApiKey(data);
3457
3343
  }
3458
3344
  };
3459
- //#endregion
3460
- //#region src/connect/serializers/external-auth-complete-response.serializer.ts
3345
+ // src/connect/serializers/external-auth-complete-response.serializer.ts
3461
3346
  const deserializeExternalAuthCompleteResponse = (response) => ({ redirectUri: response.redirect_uri });
3462
- //#endregion
3463
- //#region src/connect/serializers/token-exchange-response.serializer.ts
3347
+ // src/connect/serializers/token-exchange-response.serializer.ts
3464
3348
  const deserializeTokenExchangeResponse = (response) => ({
3465
3349
  accessToken: response.access_token,
3466
3350
  issuedTokenType: response.issued_token_type,
@@ -3468,8 +3352,7 @@ const deserializeTokenExchangeResponse = (response) => ({
3468
3352
  expiresIn: response.expires_in,
3469
3353
  ...response.scope !== void 0 && { scope: response.scope }
3470
3354
  });
3471
- //#endregion
3472
- //#region src/connect/serializers/application-credentials-list-item.serializer.ts
3355
+ // src/connect/serializers/application-credentials-list-item.serializer.ts
3473
3356
  const deserializeApplicationCredentialsListItem = (response) => ({
3474
3357
  object: response.object,
3475
3358
  id: response.id,
@@ -3478,8 +3361,7 @@ const deserializeApplicationCredentialsListItem = (response) => ({
3478
3361
  createdAt: new Date(response.created_at),
3479
3362
  updatedAt: new Date(response.updated_at)
3480
3363
  });
3481
- //#endregion
3482
- //#region src/connect/serializers/new-connect-application-secret.serializer.ts
3364
+ // src/connect/serializers/new-connect-application-secret.serializer.ts
3483
3365
  const deserializeNewConnectApplicationSecret = (response) => ({
3484
3366
  object: response.object,
3485
3367
  id: response.id,
@@ -3489,8 +3371,7 @@ const deserializeNewConnectApplicationSecret = (response) => ({
3489
3371
  updatedAt: new Date(response.updated_at),
3490
3372
  secret: response.secret
3491
3373
  });
3492
- //#endregion
3493
- //#region src/connect/serializers/user-object.serializer.ts
3374
+ // src/connect/serializers/user-object.serializer.ts
3494
3375
  const serializeUserObject = (model) => ({
3495
3376
  id: model.id,
3496
3377
  email: model.email,
@@ -3498,35 +3379,30 @@ const serializeUserObject = (model) => ({
3498
3379
  last_name: model.lastName,
3499
3380
  metadata: model.metadata
3500
3381
  });
3501
- //#endregion
3502
- //#region src/connect/serializers/user-consent-option-choice.serializer.ts
3382
+ // src/connect/serializers/user-consent-option-choice.serializer.ts
3503
3383
  const serializeUserConsentOptionChoice = (model) => ({
3504
3384
  value: model.value,
3505
3385
  label: model.label
3506
3386
  });
3507
- //#endregion
3508
- //#region src/connect/serializers/user-consent-option.serializer.ts
3387
+ // src/connect/serializers/user-consent-option.serializer.ts
3509
3388
  const serializeUserConsentOption = (model) => ({
3510
3389
  claim: model.claim,
3511
3390
  type: model.type,
3512
3391
  label: model.label,
3513
3392
  choices: model.choices.map(serializeUserConsentOptionChoice)
3514
3393
  });
3515
- //#endregion
3516
- //#region src/connect/serializers/user-management-login-request.serializer.ts
3394
+ // src/connect/serializers/user-management-login-request.serializer.ts
3517
3395
  const serializeUserManagementLoginRequest = (model) => ({
3518
3396
  external_auth_id: model.externalAuthId,
3519
3397
  user: serializeUserObject(model.user),
3520
3398
  user_consent_options: model.userConsentOptions != null ? model.userConsentOptions.map(serializeUserConsentOption) : void 0
3521
3399
  });
3522
- //#endregion
3523
- //#region src/connect/serializers/redirect-uri-input.serializer.ts
3400
+ // src/connect/serializers/redirect-uri-input.serializer.ts
3524
3401
  const serializeRedirectUriInput = (model) => ({
3525
3402
  uri: model.uri,
3526
3403
  default: model.default ?? null
3527
3404
  });
3528
- //#endregion
3529
- //#region src/connect/serializers/create-oauth-application.serializer.ts
3405
+ // src/connect/serializers/create-oauth-application.serializer.ts
3530
3406
  const serializeCreateOAuthApplication = (model) => ({
3531
3407
  name: model.name,
3532
3408
  application_type: model.applicationType,
@@ -3537,8 +3413,7 @@ const serializeCreateOAuthApplication = (model) => ({
3537
3413
  is_first_party: model.isFirstParty,
3538
3414
  organization_id: model.organizationId ?? null
3539
3415
  });
3540
- //#endregion
3541
- //#region src/connect/serializers/create-m2m-application.serializer.ts
3416
+ // src/connect/serializers/create-m2m-application.serializer.ts
3542
3417
  const serializeCreateM2MApplication = (model) => ({
3543
3418
  name: model.name,
3544
3419
  application_type: model.applicationType,
@@ -3546,19 +3421,16 @@ const serializeCreateM2MApplication = (model) => ({
3546
3421
  scopes: model.scopes ?? null,
3547
3422
  organization_id: model.organizationId
3548
3423
  });
3549
- //#endregion
3550
- //#region src/connect/serializers/update-oauth-application.serializer.ts
3424
+ // src/connect/serializers/update-oauth-application.serializer.ts
3551
3425
  const serializeUpdateOAuthApplication = (model) => ({
3552
3426
  name: model.name,
3553
3427
  description: model.description ?? null,
3554
3428
  scopes: model.scopes ?? null,
3555
3429
  redirect_uris: model.redirectUris != null ? model.redirectUris.map(serializeRedirectUriInput) : null
3556
3430
  });
3557
- //#endregion
3558
- //#region src/connect/serializers/create-application-secret.serializer.ts
3431
+ // src/connect/serializers/create-application-secret.serializer.ts
3559
3432
  const serializeCreateApplicationSecret = (_model) => ({});
3560
- //#endregion
3561
- //#region src/connect/connect.ts
3433
+ // src/connect/connect.ts
3562
3434
  const serializeListApplicationsOptions = (options) => {
3563
3435
  const wire = {
3564
3436
  limit: options.limit,
@@ -3843,8 +3715,7 @@ var Connect = class {
3843
3715
  await this.workos.delete(`/connect/client_secrets/${encodeURIComponent(id)}`);
3844
3716
  }
3845
3717
  };
3846
- //#endregion
3847
- //#region src/directory-sync/directory-sync.ts
3718
+ // src/directory-sync/directory-sync.ts
3848
3719
  const serializeListDirectoriesOptions = (options) => {
3849
3720
  const wire = {
3850
3721
  limit: options.limit,
@@ -4059,8 +3930,7 @@ var DirectorySync = class {
4059
3930
  return deserializeDirectoryGroup(data);
4060
3931
  }
4061
3932
  };
4062
- //#endregion
4063
- //#region src/events/serializers/list-event-options.serializer.ts
3933
+ // src/events/serializers/list-event-options.serializer.ts
4064
3934
  const serializeListEventOptions = (options) => ({
4065
3935
  events: options.events,
4066
3936
  organization_id: options.organizationId,
@@ -4069,8 +3939,7 @@ const serializeListEventOptions = (options) => ({
4069
3939
  limit: options.limit,
4070
3940
  after: options.after
4071
3941
  });
4072
- //#endregion
4073
- //#region src/events/events.ts
3942
+ // src/events/events.ts
4074
3943
  var Events = class {
4075
3944
  workos;
4076
3945
  constructor(workos) {
@@ -4090,8 +3959,7 @@ var Events = class {
4090
3959
  return deserializeList(data, deserializeEvent);
4091
3960
  }
4092
3961
  };
4093
- //#endregion
4094
- //#region src/common/utils/encode-path-parameter.ts
3962
+ // src/common/utils/encode-path-parameter.ts
4095
3963
  /**
4096
3964
  * Encode a caller-supplied identifier for safe interpolation into a single URL
4097
3965
  * path segment.
@@ -4127,8 +3995,7 @@ function encodePathParameter(value) {
4127
3995
  if (encoded === "." || encoded === "..") throw new TypeError("Invalid path parameter: a path parameter must not be \".\" or \"..\".");
4128
3996
  return encoded;
4129
3997
  }
4130
- //#endregion
4131
- //#region src/organizations/organizations.ts
3998
+ // src/organizations/organizations.ts
4132
3999
  var Organizations = class {
4133
4000
  workos;
4134
4001
  constructor(workos) {
@@ -4306,14 +4173,12 @@ var Organizations = class {
4306
4173
  await this.workos.post(`/organizations/${encodePathParameter(organizationId)}/it_contacts/${encodePathParameter(contactId)}/revoke`, {});
4307
4174
  }
4308
4175
  };
4309
- //#endregion
4310
- //#region src/organization-domains/serializers/create-organization-domain-options.serializer.ts
4176
+ // src/organization-domains/serializers/create-organization-domain-options.serializer.ts
4311
4177
  const serializeCreateOrganizationDomainOptions = (options) => ({
4312
4178
  domain: options.domain,
4313
4179
  organization_id: options.organizationId
4314
4180
  });
4315
- //#endregion
4316
- //#region src/organization-domains/organization-domains.ts
4181
+ // src/organization-domains/organization-domains.ts
4317
4182
  var OrganizationDomains = class {
4318
4183
  workos;
4319
4184
  constructor(workos) {
@@ -4379,8 +4244,7 @@ var OrganizationDomains = class {
4379
4244
  await this.workos.delete(`/organization_domains/${encodePathParameter(id)}`);
4380
4245
  }
4381
4246
  };
4382
- //#endregion
4383
- //#region src/passwordless/serializers/passwordless-session.serializer.ts
4247
+ // src/passwordless/serializers/passwordless-session.serializer.ts
4384
4248
  const deserializePasswordlessSession = (passwordlessSession) => ({
4385
4249
  id: passwordlessSession.id,
4386
4250
  email: passwordlessSession.email,
@@ -4388,8 +4252,7 @@ const deserializePasswordlessSession = (passwordlessSession) => ({
4388
4252
  link: passwordlessSession.link,
4389
4253
  object: passwordlessSession.object
4390
4254
  });
4391
- //#endregion
4392
- //#region src/passwordless/passwordless.ts
4255
+ // src/passwordless/passwordless.ts
4393
4256
  var Passwordless = class {
4394
4257
  workos;
4395
4258
  constructor(workos) {
@@ -4408,15 +4271,13 @@ var Passwordless = class {
4408
4271
  return data;
4409
4272
  }
4410
4273
  };
4411
- //#endregion
4412
- //#region src/pipes/serializers/data-integration-credential.serializer.ts
4274
+ // src/pipes/serializers/data-integration-credential.serializer.ts
4413
4275
  const deserializeDataIntegrationCredential = (response) => ({
4414
4276
  type: response.type,
4415
4277
  clientId: response.client_id ?? null,
4416
4278
  redactedClientSecret: response.redacted_client_secret ?? null
4417
4279
  });
4418
- //#endregion
4419
- //#region src/pipes/serializers/data-integration-installation.serializer.ts
4280
+ // src/pipes/serializers/data-integration-installation.serializer.ts
4420
4281
  const deserializeDataIntegrationInstallation = (response) => ({
4421
4282
  id: response.id,
4422
4283
  connectionRole: response.connection_role,
@@ -4426,8 +4287,7 @@ const deserializeDataIntegrationInstallation = (response) => ({
4426
4287
  organizationId: response.organization_id ?? null,
4427
4288
  apiKeyLast4: response.api_key_last_4 ?? null
4428
4289
  });
4429
- //#endregion
4430
- //#region src/pipes/serializers/data-integration-custom-provider.serializer.ts
4290
+ // src/pipes/serializers/data-integration-custom-provider.serializer.ts
4431
4291
  const deserializeDataIntegrationCustomProvider = (response) => ({
4432
4292
  name: response.name,
4433
4293
  authorizationUrl: response.authorization_url ?? null,
@@ -4441,8 +4301,7 @@ const deserializeDataIntegrationCustomProvider = (response) => ({
4441
4301
  tokenBodyContentType: response.token_body_content_type,
4442
4302
  authenticateVia: response.authenticate_via
4443
4303
  });
4444
- //#endregion
4445
- //#region src/pipes/serializers/data-integration.serializer.ts
4304
+ // src/pipes/serializers/data-integration.serializer.ts
4446
4305
  const deserializeDataIntegration = (response) => ({
4447
4306
  object: response.object,
4448
4307
  id: response.id,
@@ -4462,14 +4321,12 @@ const deserializeDataIntegration = (response) => ({
4462
4321
  createdAt: new Date(response.created_at),
4463
4322
  updatedAt: new Date(response.updated_at)
4464
4323
  });
4465
- //#endregion
4466
- //#region src/pipes/serializers/connected-account-warning.serializer.ts
4324
+ // src/pipes/serializers/connected-account-warning.serializer.ts
4467
4325
  const deserializeConnectedAccountWarning = (response) => ({
4468
4326
  code: response.code,
4469
4327
  message: response.message
4470
4328
  });
4471
- //#endregion
4472
- //#region src/pipes/serializers/connected-account.serializer.ts
4329
+ // src/pipes/serializers/connected-account.serializer.ts
4473
4330
  const deserializeConnectedAccount = (response) => ({
4474
4331
  object: response.object,
4475
4332
  id: response.id,
@@ -4491,18 +4348,15 @@ const deserializeConnectedAccount = (response) => ({
4491
4348
  updatedAt: new Date(response.updated_at),
4492
4349
  warnings: response.warnings != null ? response.warnings.map(deserializeConnectedAccountWarning) : void 0
4493
4350
  });
4494
- //#endregion
4495
- //#region src/pipes/serializers/data-integration-finish-connection-response.serializer.ts
4351
+ // src/pipes/serializers/data-integration-finish-connection-response.serializer.ts
4496
4352
  const deserializeDataIntegrationFinishConnectionResponse = (response) => ({ connectedAccount: deserializeConnectedAccount(response.connected_account) });
4497
- //#endregion
4498
- //#region src/pipes/serializers/data-integration-authorize-url-response.serializer.ts
4353
+ // src/pipes/serializers/data-integration-authorize-url-response.serializer.ts
4499
4354
  const deserializeDataIntegrationAuthorizeUrlResponse = (response) => ({
4500
4355
  url: response.url,
4501
4356
  state: response.state ?? "",
4502
4357
  completion: response.completion
4503
4358
  });
4504
- //#endregion
4505
- //#region src/pipes/serializers/data-integration-vended-credential.serializer.ts
4359
+ // src/pipes/serializers/data-integration-vended-credential.serializer.ts
4506
4360
  const deserializeDataIntegrationVendedCredential = (response) => {
4507
4361
  switch (response.auth_method) {
4508
4362
  case "oauth": return {
@@ -4534,8 +4388,7 @@ const deserializeDataIntegrationVendedCredential = (response) => {
4534
4388
  default: throw new Error("Unknown auth_method: " + String(response.auth_method));
4535
4389
  }
4536
4390
  };
4537
- //#endregion
4538
- //#region src/pipes/serializers/data-integration-credentials-response.serializer.ts
4391
+ // src/pipes/serializers/data-integration-credentials-response.serializer.ts
4539
4392
  const deserializeDataIntegrationCredentialsResponse = (response) => {
4540
4393
  switch (response.active) {
4541
4394
  case true: return {
@@ -4549,8 +4402,7 @@ const deserializeDataIntegrationCredentialsResponse = (response) => {
4549
4402
  default: throw new Error("Unknown active: " + String(response.active));
4550
4403
  }
4551
4404
  };
4552
- //#endregion
4553
- //#region src/pipes/serializers/data-integration-access-token-response-access-token.serializer.ts
4405
+ // src/pipes/serializers/data-integration-access-token-response-access-token.serializer.ts
4554
4406
  const deserializeDataIntegrationAccessTokenResponseAccessToken = (response) => ({
4555
4407
  object: response.object,
4556
4408
  accessToken: response.access_token,
@@ -4558,8 +4410,7 @@ const deserializeDataIntegrationAccessTokenResponseAccessToken = (response) => (
4558
4410
  scopes: response.scopes,
4559
4411
  missingScopes: response.missing_scopes
4560
4412
  });
4561
- //#endregion
4562
- //#region src/pipes/serializers/data-integration-access-token-response.serializer.ts
4413
+ // src/pipes/serializers/data-integration-access-token-response.serializer.ts
4563
4414
  const deserializeDataIntegrationAccessTokenResponse = (response) => {
4564
4415
  switch (response.active) {
4565
4416
  case true: return {
@@ -4573,8 +4424,7 @@ const deserializeDataIntegrationAccessTokenResponse = (response) => {
4573
4424
  default: throw new Error("Unknown active: " + String(response.active));
4574
4425
  }
4575
4426
  };
4576
- //#endregion
4577
- //#region src/pipes/serializers/data-integrations-list-response-data-connected-account.serializer.ts
4427
+ // src/pipes/serializers/data-integrations-list-response-data-connected-account.serializer.ts
4578
4428
  const deserializeDataIntegrationsListResponseDataConnectedAccount = (response) => ({
4579
4429
  object: response.object,
4580
4430
  id: response.id,
@@ -4597,8 +4447,7 @@ const deserializeDataIntegrationsListResponseDataConnectedAccount = (response) =
4597
4447
  warnings: response.warnings != null ? response.warnings.map(deserializeConnectedAccountWarning) : void 0,
4598
4448
  userlandUserId: response.userland_user_id ?? null
4599
4449
  });
4600
- //#endregion
4601
- //#region src/pipes/serializers/data-integrations-list-response-data.serializer.ts
4450
+ // src/pipes/serializers/data-integrations-list-response-data.serializer.ts
4602
4451
  const deserializeDataIntegrationsListResponseData = (response) => ({
4603
4452
  object: response.object,
4604
4453
  id: response.id,
@@ -4616,28 +4465,24 @@ const deserializeDataIntegrationsListResponseData = (response) => ({
4616
4465
  connectedAccount: response.connected_account != null ? deserializeDataIntegrationsListResponseDataConnectedAccount(response.connected_account) : null,
4617
4466
  connectedAccounts: response.connected_accounts != null ? response.connected_accounts.map(deserializeDataIntegrationsListResponseDataConnectedAccount) : void 0
4618
4467
  });
4619
- //#endregion
4620
- //#region src/pipes/serializers/data-integrations-list-response.serializer.ts
4468
+ // src/pipes/serializers/data-integrations-list-response.serializer.ts
4621
4469
  const deserializeDataIntegrationsListResponse = (response) => ({
4622
4470
  object: response.object,
4623
4471
  data: response.data.map(deserializeDataIntegrationsListResponseData)
4624
4472
  });
4625
- //#endregion
4626
- //#region src/pipes/serializers/data-integration-credentials-input.serializer.ts
4473
+ // src/pipes/serializers/data-integration-credentials-input.serializer.ts
4627
4474
  const serializeDataIntegrationCredentialsInput = (model) => ({
4628
4475
  type: model.type,
4629
4476
  client_id: model.clientId,
4630
4477
  client_secret: model.clientSecret
4631
4478
  });
4632
- //#endregion
4633
- //#region src/pipes/serializers/api-key-installation.serializer.ts
4479
+ // src/pipes/serializers/api-key-installation.serializer.ts
4634
4480
  const serializeApiKeyInstallation = (model) => ({
4635
4481
  secret: model.secret,
4636
4482
  user_id: model.userId,
4637
4483
  organization_id: model.organizationId
4638
4484
  });
4639
- //#endregion
4640
- //#region src/pipes/serializers/custom-provider-definition.serializer.ts
4485
+ // src/pipes/serializers/custom-provider-definition.serializer.ts
4641
4486
  const serializeCustomProviderDefinition = (model) => ({
4642
4487
  name: model.name,
4643
4488
  authorization_url: model.authorizationUrl,
@@ -4651,8 +4496,7 @@ const serializeCustomProviderDefinition = (model) => ({
4651
4496
  token_body_content_type: model.tokenBodyContentType,
4652
4497
  authenticate_via: model.authenticateVia
4653
4498
  });
4654
- //#endregion
4655
- //#region src/pipes/serializers/create-data-integration.serializer.ts
4499
+ // src/pipes/serializers/create-data-integration.serializer.ts
4656
4500
  const serializeCreateDataIntegration = (model) => ({
4657
4501
  provider: model.provider,
4658
4502
  ownership: model.ownership,
@@ -4665,15 +4509,13 @@ const serializeCreateDataIntegration = (model) => ({
4665
4509
  api_key: model.apiKey != null ? serializeApiKeyInstallation(model.apiKey) : void 0,
4666
4510
  custom_provider: model.customProvider != null ? serializeCustomProviderDefinition(model.customProvider) : void 0
4667
4511
  });
4668
- //#endregion
4669
- //#region src/pipes/serializers/data-integrations-finish-connection-request.serializer.ts
4512
+ // src/pipes/serializers/data-integrations-finish-connection-request.serializer.ts
4670
4513
  const serializeDataIntegrationsFinishConnectionRequest = (model) => ({
4671
4514
  connect_code: model.connectCode,
4672
4515
  code_verifier: model.codeVerifier,
4673
4516
  state: model.state
4674
4517
  });
4675
- //#endregion
4676
- //#region src/pipes/serializers/update-custom-provider-definition.serializer.ts
4518
+ // src/pipes/serializers/update-custom-provider-definition.serializer.ts
4677
4519
  const serializeUpdateCustomProviderDefinition = (model) => ({
4678
4520
  name: model.name,
4679
4521
  authorization_url: model.authorizationUrl,
@@ -4687,8 +4529,7 @@ const serializeUpdateCustomProviderDefinition = (model) => ({
4687
4529
  token_body_content_type: model.tokenBodyContentType,
4688
4530
  authenticate_via: model.authenticateVia
4689
4531
  });
4690
- //#endregion
4691
- //#region src/pipes/serializers/update-data-integration.serializer.ts
4532
+ // src/pipes/serializers/update-data-integration.serializer.ts
4692
4533
  const serializeUpdateDataIntegration = (model) => ({
4693
4534
  description: model.description,
4694
4535
  enabled: model.enabled,
@@ -4697,8 +4538,7 @@ const serializeUpdateDataIntegration = (model) => ({
4697
4538
  api_key: model.apiKey != null ? serializeApiKeyInstallation(model.apiKey) : void 0,
4698
4539
  custom_provider: model.customProvider != null ? serializeUpdateCustomProviderDefinition(model.customProvider) : void 0
4699
4540
  });
4700
- //#endregion
4701
- //#region src/pipes/serializers/data-integrations-create-api-key-connection-request.serializer.ts
4541
+ // src/pipes/serializers/data-integrations-create-api-key-connection-request.serializer.ts
4702
4542
  const serializeDataIntegrationsCreateApiKeyConnectionRequest = (model) => ({
4703
4543
  account_display_name: model.accountDisplayName,
4704
4544
  account_identifier: model.accountIdentifier,
@@ -4708,8 +4548,7 @@ const serializeDataIntegrationsCreateApiKeyConnectionRequest = (model) => ({
4708
4548
  secret: model.secret,
4709
4549
  connection_intent: model.connectionIntent
4710
4550
  });
4711
- //#endregion
4712
- //#region src/pipes/serializers/data-integrations-get-data-integration-authorize-url-request.serializer.ts
4551
+ // src/pipes/serializers/data-integrations-get-data-integration-authorize-url-request.serializer.ts
4713
4552
  const serializeDataIntegrationsGetDataIntegrationAuthorizeUrlRequest = (model) => ({
4714
4553
  account_display_name: model.accountDisplayName,
4715
4554
  user_id: model.userId,
@@ -4722,8 +4561,7 @@ const serializeDataIntegrationsGetDataIntegrationAuthorizeUrlRequest = (model) =
4722
4561
  connection_intent: model.connectionIntent,
4723
4562
  connected_account_id: model.connectedAccountId
4724
4563
  });
4725
- //#endregion
4726
- //#region src/pipes/serializers/data-integrations-create-client-credentials-connection-request.serializer.ts
4564
+ // src/pipes/serializers/data-integrations-create-client-credentials-connection-request.serializer.ts
4727
4565
  const serializeDataIntegrationsCreateClientCredentialsConnectionRequest = (model) => ({
4728
4566
  account_display_name: model.accountDisplayName,
4729
4567
  account_identifier: model.accountIdentifier,
@@ -4735,8 +4573,7 @@ const serializeDataIntegrationsCreateClientCredentialsConnectionRequest = (model
4735
4573
  config: model.config,
4736
4574
  connection_intent: model.connectionIntent
4737
4575
  });
4738
- //#endregion
4739
- //#region src/pipes/serializers/data-integrations-vend-credentials-request.serializer.ts
4576
+ // src/pipes/serializers/data-integrations-vend-credentials-request.serializer.ts
4740
4577
  const serializeDataIntegrationsVendCredentialsRequest = (model) => ({
4741
4578
  user_id: model.userId,
4742
4579
  organization_id: model.organizationId,
@@ -4744,8 +4581,7 @@ const serializeDataIntegrationsVendCredentialsRequest = (model) => ({
4744
4581
  connection_owner: model.connectionOwner,
4745
4582
  supports_multiple_connections: model.supportsMultipleConnections
4746
4583
  });
4747
- //#endregion
4748
- //#region src/pipes/serializers/data-integrations-get-user-token-request.serializer.ts
4584
+ // src/pipes/serializers/data-integrations-get-user-token-request.serializer.ts
4749
4585
  const serializeDataIntegrationsGetUserTokenRequest = (model) => ({
4750
4586
  user_id: model.userId,
4751
4587
  organization_id: model.organizationId,
@@ -4753,8 +4589,7 @@ const serializeDataIntegrationsGetUserTokenRequest = (model) => ({
4753
4589
  connection_owner: model.connectionOwner,
4754
4590
  supports_multiple_connections: model.supportsMultipleConnections
4755
4591
  });
4756
- //#endregion
4757
- //#region src/pipes/serializers/create-organization-connected-account.serializer.ts
4592
+ // src/pipes/serializers/create-organization-connected-account.serializer.ts
4758
4593
  const serializeCreateOrganizationConnectedAccount = (model) => ({
4759
4594
  account_display_name: model.accountDisplayName,
4760
4595
  account_identifier: model.accountIdentifier,
@@ -4766,8 +4601,7 @@ const serializeCreateOrganizationConnectedAccount = (model) => ({
4766
4601
  user_id: model.userId,
4767
4602
  connection_intent: model.connectionIntent
4768
4603
  });
4769
- //#endregion
4770
- //#region src/pipes/serializers/organization-connected-account.serializer.ts
4604
+ // src/pipes/serializers/organization-connected-account.serializer.ts
4771
4605
  const serializeOrganizationConnectedAccount = (model) => ({
4772
4606
  account_display_name: model.accountDisplayName,
4773
4607
  account_identifier: model.accountIdentifier,
@@ -4778,8 +4612,7 @@ const serializeOrganizationConnectedAccount = (model) => ({
4778
4612
  state: model.state,
4779
4613
  user_id: model.userId
4780
4614
  });
4781
- //#endregion
4782
- //#region src/pipes/serializers/create-connected-account.serializer.ts
4615
+ // src/pipes/serializers/create-connected-account.serializer.ts
4783
4616
  const serializeCreateConnectedAccount = (model) => ({
4784
4617
  account_display_name: model.accountDisplayName,
4785
4618
  account_identifier: model.accountIdentifier,
@@ -4790,8 +4623,7 @@ const serializeCreateConnectedAccount = (model) => ({
4790
4623
  state: model.state,
4791
4624
  connection_intent: model.connectionIntent
4792
4625
  });
4793
- //#endregion
4794
- //#region src/pipes/serializers/connected-account-input.serializer.ts
4626
+ // src/pipes/serializers/connected-account-input.serializer.ts
4795
4627
  const serializeConnectedAccountInput = (model) => ({
4796
4628
  account_display_name: model.accountDisplayName,
4797
4629
  account_identifier: model.accountIdentifier,
@@ -4801,8 +4633,7 @@ const serializeConnectedAccountInput = (model) => ({
4801
4633
  scopes: model.scopes,
4802
4634
  state: model.state
4803
4635
  });
4804
- //#endregion
4805
- //#region src/pipes/serializers/data-integrations-upsert-api-key-request.serializer.ts
4636
+ // src/pipes/serializers/data-integrations-upsert-api-key-request.serializer.ts
4806
4637
  const serializeDataIntegrationsUpsertApiKeyRequest = (model) => ({
4807
4638
  account_display_name: model.accountDisplayName,
4808
4639
  account_identifier: model.accountIdentifier,
@@ -4813,8 +4644,7 @@ const serializeDataIntegrationsUpsertApiKeyRequest = (model) => ({
4813
4644
  connection_owner: model.connectionOwner,
4814
4645
  secret: model.secret
4815
4646
  });
4816
- //#endregion
4817
- //#region src/pipes/serializers/data-integrations-upsert-client-credentials-request.serializer.ts
4647
+ // src/pipes/serializers/data-integrations-upsert-client-credentials-request.serializer.ts
4818
4648
  const serializeDataIntegrationsUpsertClientCredentialsRequest = (model) => ({
4819
4649
  account_display_name: model.accountDisplayName,
4820
4650
  account_identifier: model.accountIdentifier,
@@ -4827,8 +4657,7 @@ const serializeDataIntegrationsUpsertClientCredentialsRequest = (model) => ({
4827
4657
  client_secret: model.clientSecret,
4828
4658
  config: model.config
4829
4659
  });
4830
- //#endregion
4831
- //#region src/pipes/pipes.ts
4660
+ // src/pipes/pipes.ts
4832
4661
  var Pipes = class {
4833
4662
  workos;
4834
4663
  constructor(workos) {
@@ -5564,8 +5393,7 @@ var Pipes = class {
5564
5393
  return deserializeDataIntegrationsListResponse(data);
5565
5394
  }
5566
5395
  };
5567
- //#endregion
5568
- //#region src/radar/serializers/radar-standalone-response.serializer.ts
5396
+ // src/radar/serializers/radar-standalone-response.serializer.ts
5569
5397
  const deserializeRadarStandaloneResponse = (response) => ({
5570
5398
  verdict: response.verdict,
5571
5399
  reason: response.reason,
@@ -5573,11 +5401,9 @@ const deserializeRadarStandaloneResponse = (response) => ({
5573
5401
  control: response.control,
5574
5402
  blocklistType: response.blocklist_type
5575
5403
  });
5576
- //#endregion
5577
- //#region src/radar/serializers/radar-list-entry-already-present-response.serializer.ts
5404
+ // src/radar/serializers/radar-list-entry-already-present-response.serializer.ts
5578
5405
  const deserializeRadarListEntryAlreadyPresentResponse = (response) => ({ message: response.message });
5579
- //#endregion
5580
- //#region src/radar/serializers/radar-standalone-assess-request.serializer.ts
5406
+ // src/radar/serializers/radar-standalone-assess-request.serializer.ts
5581
5407
  const serializeRadarStandaloneAssessRequest = (model) => ({
5582
5408
  ip_address: model.ipAddress,
5583
5409
  user_agent: model.userAgent,
@@ -5585,20 +5411,16 @@ const serializeRadarStandaloneAssessRequest = (model) => ({
5585
5411
  auth_method: model.authMethod,
5586
5412
  action: model.action
5587
5413
  });
5588
- //#endregion
5589
- //#region src/radar/serializers/radar-standalone-update-radar-attempt-request.serializer.ts
5414
+ // src/radar/serializers/radar-standalone-update-radar-attempt-request.serializer.ts
5590
5415
  const serializeRadarStandaloneUpdateRadarAttemptRequest = (model) => ({
5591
5416
  challenge_status: model.challengeStatus,
5592
5417
  attempt_status: model.attemptStatus
5593
5418
  });
5594
- //#endregion
5595
- //#region src/radar/serializers/radar-standalone-update-radar-list-request.serializer.ts
5419
+ // src/radar/serializers/radar-standalone-update-radar-list-request.serializer.ts
5596
5420
  const serializeRadarStandaloneUpdateRadarListRequest = (model) => ({ entry: model.entry });
5597
- //#endregion
5598
- //#region src/radar/serializers/radar-standalone-delete-radar-list-entry-request.serializer.ts
5421
+ // src/radar/serializers/radar-standalone-delete-radar-list-entry-request.serializer.ts
5599
5422
  const serializeRadarStandaloneDeleteRadarListEntryRequest = (model) => ({ entry: model.entry });
5600
- //#endregion
5601
- //#region src/radar/radar.ts
5423
+ // src/radar/radar.ts
5602
5424
  var Radar = class {
5603
5425
  workos;
5604
5426
  constructor(workos) {
@@ -5686,8 +5508,7 @@ var Radar = class {
5686
5508
  await this.workos.deleteWithBody(`/radar/lists/${encodeURIComponent(type)}/${encodeURIComponent(action)}`, serializeRadarStandaloneDeleteRadarListEntryRequest(payload));
5687
5509
  }
5688
5510
  };
5689
- //#endregion
5690
- //#region src/admin-portal/admin-portal.ts
5511
+ // src/admin-portal/admin-portal.ts
5691
5512
  var AdminPortal = class {
5692
5513
  workos;
5693
5514
  constructor(workos) {
@@ -5742,8 +5563,7 @@ var AdminPortal = class {
5742
5563
  });
5743
5564
  }
5744
5565
  };
5745
- //#endregion
5746
- //#region src/common/utils/query-string.ts
5566
+ // src/common/utils/query-string.ts
5747
5567
  /**
5748
5568
  * Converts options to a query string.
5749
5569
  * - Arrays: scope=read&scope=write (repeat format)
@@ -5773,8 +5593,7 @@ function toQueryString(options) {
5773
5593
  function encodeRFC1738(str) {
5774
5594
  return encodeURIComponent(str).replace(/%20/g, "+").replace(/[!'*]/g, (c) => "%" + c.charCodeAt(0).toString(16).toUpperCase());
5775
5595
  }
5776
- //#endregion
5777
- //#region src/sso/sso.ts
5596
+ // src/sso/sso.ts
5778
5597
  var SSO = class {
5779
5598
  workos;
5780
5599
  constructor(workos) {
@@ -5935,9 +5754,21 @@ var SSO = class {
5935
5754
  const { data } = await this.workos.get("/sso/profile", { accessToken });
5936
5755
  return deserializeProfile(data);
5937
5756
  }
5757
+ /**
5758
+ * Logout Authorize
5759
+ *
5760
+ * Generate a logout token and URL for RP-initiated Single Logout. Redirect the user to `logoutUrl` to sign them out of the identity provider.
5761
+ * @param options - The profile to log out.
5762
+ * @returns {Promise<AuthorizeLogout>}
5763
+ * @throws {BadRequestException} 400
5764
+ * @throws {NotFoundException} 404
5765
+ */
5766
+ async authorizeLogout(options) {
5767
+ const { data } = await this.workos.post("/sso/logout/authorize", serializeAuthorizeLogoutOptions(options));
5768
+ return deserializeAuthorizeLogout(data);
5769
+ }
5938
5770
  };
5939
- //#endregion
5940
- //#region src/multi-factor-auth/serializers/challenge.serializer.ts
5771
+ // src/multi-factor-auth/serializers/challenge.serializer.ts
5941
5772
  const deserializeChallenge = (challenge) => ({
5942
5773
  object: challenge.object,
5943
5774
  id: challenge.id,
@@ -5947,8 +5778,7 @@ const deserializeChallenge = (challenge) => ({
5947
5778
  code: challenge.code,
5948
5779
  authenticationFactorId: challenge.authentication_factor_id
5949
5780
  });
5950
- //#endregion
5951
- //#region src/multi-factor-auth/serializers/factor.serializer.ts
5781
+ // src/multi-factor-auth/serializers/factor.serializer.ts
5952
5782
  const deserializeFactor = (factor) => ({
5953
5783
  object: factor.object,
5954
5784
  id: factor.id,
@@ -5967,14 +5797,12 @@ const deserializeFactorWithSecrets = (factor) => ({
5967
5797
  ...factor.sms ? { sms: deserializeSms(factor.sms) } : {},
5968
5798
  ...factor.totp ? { totp: deserializeTotpWithSecrets(factor.totp) } : {}
5969
5799
  });
5970
- //#endregion
5971
- //#region src/multi-factor-auth/serializers/verify-response.serializer.ts
5800
+ // src/multi-factor-auth/serializers/verify-response.serializer.ts
5972
5801
  const deserializeVerifyResponse = (verifyResponse) => ({
5973
5802
  challenge: deserializeChallenge(verifyResponse.challenge),
5974
5803
  valid: verifyResponse.valid
5975
5804
  });
5976
- //#endregion
5977
- //#region src/multi-factor-auth/multi-factor-auth.ts
5805
+ // src/multi-factor-auth/multi-factor-auth.ts
5978
5806
  var MultiFactorAuth = class {
5979
5807
  workos;
5980
5808
  constructor(workos) {
@@ -6090,8 +5918,7 @@ var MultiFactorAuth = class {
6090
5918
  return new AutoPaginatable(await fetchAndDeserialize(this.workos, `/user_management/users/${encodePathParameter(userId)}/auth_factors`, deserializeFactor$1, restOfOptions), (params) => fetchAndDeserialize(this.workos, `/user_management/users/${encodePathParameter(userId)}/auth_factors`, deserializeFactor$1, params), restOfOptions);
6091
5919
  }
6092
5920
  };
6093
- //#endregion
6094
- //#region src/audit-logs/serializers/audit-log-export.serializer.ts
5921
+ // src/audit-logs/serializers/audit-log-export.serializer.ts
6095
5922
  const deserializeAuditLogExport = (auditLogExport) => ({
6096
5923
  object: auditLogExport.object,
6097
5924
  id: auditLogExport.id,
@@ -6100,8 +5927,7 @@ const deserializeAuditLogExport = (auditLogExport) => ({
6100
5927
  createdAt: new Date(auditLogExport.created_at),
6101
5928
  updatedAt: new Date(auditLogExport.updated_at)
6102
5929
  });
6103
- //#endregion
6104
- //#region src/audit-logs/serializers/audit-log-export-options.serializer.ts
5930
+ // src/audit-logs/serializers/audit-log-export-options.serializer.ts
6105
5931
  const serializeAuditLogExportOptions = (options) => ({
6106
5932
  actions: options.actions,
6107
5933
  actor_names: options.actorNames,
@@ -6111,8 +5937,7 @@ const serializeAuditLogExportOptions = (options) => ({
6111
5937
  range_start: options.rangeStart.toISOString(),
6112
5938
  targets: options.targets
6113
5939
  });
6114
- //#endregion
6115
- //#region src/audit-logs/serializers/create-audit-log-event-options.serializer.ts
5940
+ // src/audit-logs/serializers/create-audit-log-event-options.serializer.ts
6116
5941
  const serializeCreateAuditLogEventOptions = (event) => ({
6117
5942
  action: event.action,
6118
5943
  version: event.version,
@@ -6125,8 +5950,7 @@ const serializeCreateAuditLogEventOptions = (event) => ({
6125
5950
  },
6126
5951
  metadata: event.metadata
6127
5952
  });
6128
- //#endregion
6129
- //#region src/audit-logs/serializers/create-audit-log-schema-options.serializer.ts
5953
+ // src/audit-logs/serializers/create-audit-log-schema-options.serializer.ts
6130
5954
  function serializeMetadata(metadata) {
6131
5955
  if (!metadata) return {};
6132
5956
  const serializedMetadata = {};
@@ -6154,8 +5978,7 @@ const serializeCreateAuditLogSchemaOptions = (schema) => ({
6154
5978
  properties: serializeMetadata(schema.metadata)
6155
5979
  } : void 0
6156
5980
  });
6157
- //#endregion
6158
- //#region src/audit-logs/serializers/create-audit-log-schema.serializer.ts
5981
+ // src/audit-logs/serializers/create-audit-log-schema.serializer.ts
6159
5982
  function deserializeMetadata(metadata) {
6160
5983
  if (!metadata || !metadata.properties) return {};
6161
5984
  const deserializedMetadata = {};
@@ -6175,14 +5998,11 @@ const deserializeAuditLogSchema = (auditLogSchema) => ({
6175
5998
  metadata: auditLogSchema.metadata ? deserializeMetadata(auditLogSchema.metadata) : void 0,
6176
5999
  createdAt: new Date(auditLogSchema.created_at)
6177
6000
  });
6178
- //#endregion
6179
- //#region src/audit-logs/serializers/audit-logs-retention.serializer.ts
6001
+ // src/audit-logs/serializers/audit-logs-retention.serializer.ts
6180
6002
  const deserializeAuditLogsRetention = (response) => ({ retentionPeriodInDays: response.retention_period_in_days ?? null });
6181
- //#endregion
6182
- //#region src/audit-logs/serializers/update-audit-logs-retention.serializer.ts
6003
+ // src/audit-logs/serializers/update-audit-logs-retention.serializer.ts
6183
6004
  const serializeUpdateAuditLogsRetention = (model) => ({ retention_period: model.retentionPeriod });
6184
- //#endregion
6185
- //#region src/audit-logs/audit-logs.ts
6005
+ // src/audit-logs/audit-logs.ts
6186
6006
  var AuditLogs = class {
6187
6007
  workos;
6188
6008
  constructor(workos) {
@@ -6293,8 +6113,7 @@ var AuditLogs = class {
6293
6113
  return new AutoPaginatable(await fetchAndDeserialize(this.workos, endpoint, deserializeAuditLogSchema, options), (params) => fetchAndDeserialize(this.workos, endpoint, deserializeAuditLogSchema, params), options);
6294
6114
  }
6295
6115
  };
6296
- //#endregion
6297
- //#region node_modules/uint8array-extras/index.js
6116
+ // node_modules/uint8array-extras/index.js
6298
6117
  const objectToString = Object.prototype.toString;
6299
6118
  const uint8ArrayStringified = "[object Uint8Array]";
6300
6119
  function isType(value, typeConstructor, typeStringified) {
@@ -6342,8 +6161,7 @@ function uint8ArrayToHex(array) {
6342
6161
  for (let index = 0; index < array.length; index++) hexString += byteToHexLookupTable[array[index]];
6343
6162
  return hexString;
6344
6163
  }
6345
- //#endregion
6346
- //#region node_modules/iron-webcrypto/index.js
6164
+ // node_modules/iron-webcrypto/index.js
6347
6165
  function losslessJsonStringify(data) {
6348
6166
  try {
6349
6167
  if (isJson(data)) {
@@ -6555,8 +6373,7 @@ async function unseal(sealed, password, options) {
6555
6373
  }, b64ToU8(encryptedB64));
6556
6374
  return (options.decode || jsonParse)(decryptedString);
6557
6375
  }
6558
- //#endregion
6559
- //#region src/common/crypto/seal.ts
6376
+ // src/common/crypto/seal.ts
6560
6377
  const VERSION_DELIMITER = "~";
6561
6378
  const CURRENT_MAJOR_VERSION = 2;
6562
6379
  function parseSeal(seal) {
@@ -6593,8 +6410,7 @@ async function unsealData(encryptedData, { password }) {
6593
6410
  else if (tokenVersion !== null) return data.persistent ?? data;
6594
6411
  return data;
6595
6412
  }
6596
- //#endregion
6597
- //#region src/user-management/serializers/session-cookie-data.serializer.ts
6413
+ // src/user-management/serializers/session-cookie-data.serializer.ts
6598
6414
  const toDate = (value) => value instanceof Date ? value : new Date(value);
6599
6415
  const deserializeSessionCookieData = (data) => {
6600
6416
  if (!data.user) return data;
@@ -6608,8 +6424,7 @@ const deserializeSessionCookieData = (data) => {
6608
6424
  }
6609
6425
  };
6610
6426
  };
6611
- //#endregion
6612
- //#region src/common/utils/env.ts
6427
+ // src/common/utils/env.ts
6613
6428
  let detectedRuntime = null;
6614
6429
  /**
6615
6430
  * Detect the current runtime environment.
@@ -6655,19 +6470,16 @@ function getEnvironmentVariable(key) {
6655
6470
  function getEnv(key, defaultValue) {
6656
6471
  return getEnvironmentVariable(key) ?? defaultValue;
6657
6472
  }
6658
- //#endregion
6659
- //#region src/user-management/interfaces/authenticate-with-session-cookie.interface.ts
6473
+ // src/user-management/interfaces/authenticate-with-session-cookie.interface.ts
6660
6474
  let AuthenticateWithSessionCookieFailureReason = /* @__PURE__ */ function(AuthenticateWithSessionCookieFailureReason) {
6661
6475
  AuthenticateWithSessionCookieFailureReason["INVALID_JWT"] = "invalid_jwt";
6662
6476
  AuthenticateWithSessionCookieFailureReason["INVALID_SESSION_COOKIE"] = "invalid_session_cookie";
6663
6477
  AuthenticateWithSessionCookieFailureReason["NO_SESSION_COOKIE_PROVIDED"] = "no_session_cookie_provided";
6664
6478
  return AuthenticateWithSessionCookieFailureReason;
6665
6479
  }({});
6666
- //#endregion
6667
- //#region src/user-management/interfaces/revoke-session-options.interface.ts
6480
+ // src/user-management/interfaces/revoke-session-options.interface.ts
6668
6481
  const serializeRevokeSessionOptions = (options) => ({ session_id: options.sessionId });
6669
- //#endregion
6670
- //#region src/user-management/serializers/authenticate-with-email-verification.serializer.ts
6482
+ // src/user-management/serializers/authenticate-with-email-verification.serializer.ts
6671
6483
  const serializeAuthenticateWithEmailVerificationOptions = (options) => ({
6672
6484
  grant_type: "urn:workos:oauth:grant-type:email-verification:code",
6673
6485
  client_id: options.clientId,
@@ -6677,8 +6489,7 @@ const serializeAuthenticateWithEmailVerificationOptions = (options) => ({
6677
6489
  ip_address: options.ipAddress,
6678
6490
  user_agent: options.userAgent
6679
6491
  });
6680
- //#endregion
6681
- //#region src/user-management/serializers/authenticate-with-organization-selection-options.serializer.ts
6492
+ // src/user-management/serializers/authenticate-with-organization-selection-options.serializer.ts
6682
6493
  const serializeAuthenticateWithOrganizationSelectionOptions = (options) => ({
6683
6494
  grant_type: "urn:workos:oauth:grant-type:organization-selection",
6684
6495
  client_id: options.clientId,
@@ -6688,16 +6499,14 @@ const serializeAuthenticateWithOrganizationSelectionOptions = (options) => ({
6688
6499
  ip_address: options.ipAddress,
6689
6500
  user_agent: options.userAgent
6690
6501
  });
6691
- //#endregion
6692
- //#region src/user-management/serializers/create-organization-membership-options.serializer.ts
6502
+ // src/user-management/serializers/create-organization-membership-options.serializer.ts
6693
6503
  const serializeCreateOrganizationMembershipOptions = (options) => ({
6694
6504
  organization_id: options.organizationId,
6695
6505
  user_id: options.userId,
6696
6506
  role_slug: options.roleSlug,
6697
6507
  role_slugs: options.roleSlugs
6698
6508
  });
6699
- //#endregion
6700
- //#region src/user-management/serializers/identity.serializer.ts
6509
+ // src/user-management/serializers/identity.serializer.ts
6701
6510
  const normalizeProvider = (provider) => {
6702
6511
  if (provider === "GithubOAuth") return "GitHubOAuth";
6703
6512
  return provider;
@@ -6711,8 +6520,7 @@ const deserializeIdentities = (identities) => {
6711
6520
  };
6712
6521
  });
6713
6522
  };
6714
- //#endregion
6715
- //#region src/user-management/serializers/list-invitations-options.serializer.ts
6523
+ // src/user-management/serializers/list-invitations-options.serializer.ts
6716
6524
  const serializeListInvitationsOptions = (options) => ({
6717
6525
  email: options.email,
6718
6526
  organization_id: options.organizationId,
@@ -6721,8 +6529,7 @@ const serializeListInvitationsOptions = (options) => ({
6721
6529
  after: options.after,
6722
6530
  order: options.order
6723
6531
  });
6724
- //#endregion
6725
- //#region src/user-management/serializers/list-organization-memberships-options.serializer.ts
6532
+ // src/user-management/serializers/list-organization-memberships-options.serializer.ts
6726
6533
  const serializeListOrganizationMembershipsOptions = (options) => ({
6727
6534
  user_id: options.userId,
6728
6535
  organization_id: options.organizationId,
@@ -6732,8 +6539,7 @@ const serializeListOrganizationMembershipsOptions = (options) => ({
6732
6539
  after: options.after,
6733
6540
  order: options.order
6734
6541
  });
6735
- //#endregion
6736
- //#region src/user-management/serializers/list-users-options.serializer.ts
6542
+ // src/user-management/serializers/list-users-options.serializer.ts
6737
6543
  const serializeListUsersOptions = (options) => ({
6738
6544
  email: options.email,
6739
6545
  organization_id: options.organizationId,
@@ -6742,11 +6548,9 @@ const serializeListUsersOptions = (options) => ({
6742
6548
  after: options.after,
6743
6549
  order: options.order
6744
6550
  });
6745
- //#endregion
6746
- //#region src/user-management/serializers/resend-invitation-options.serializer.ts
6551
+ // src/user-management/serializers/resend-invitation-options.serializer.ts
6747
6552
  const serializeResendInvitationOptions = (options) => ({ locale: options.locale });
6748
- //#endregion
6749
- //#region src/user-management/interfaces/refresh-and-seal-session-data.interface.ts
6553
+ // src/user-management/interfaces/refresh-and-seal-session-data.interface.ts
6750
6554
  let RefreshSessionFailureReason = /* @__PURE__ */ function(RefreshSessionFailureReason) {
6751
6555
  RefreshSessionFailureReason["INVALID_SESSION_COOKIE"] = "invalid_session_cookie";
6752
6556
  RefreshSessionFailureReason["NO_SESSION_COOKIE_PROVIDED"] = "no_session_cookie_provided";
@@ -6759,8 +6563,7 @@ let RefreshSessionFailureReason = /* @__PURE__ */ function(RefreshSessionFailure
6759
6563
  RefreshSessionFailureReason["NETWORK_ERROR"] = "network_error";
6760
6564
  return RefreshSessionFailureReason;
6761
6565
  }({});
6762
- //#endregion
6763
- //#region src/user-management/serializers/send-invitation-options.serializer.ts
6566
+ // src/user-management/serializers/send-invitation-options.serializer.ts
6764
6567
  const serializeSendInvitationOptions = (options) => ({
6765
6568
  email: options.email,
6766
6569
  organization_id: options.organizationId,
@@ -6769,21 +6572,18 @@ const serializeSendInvitationOptions = (options) => ({
6769
6572
  role_slug: options.roleSlug,
6770
6573
  locale: options.locale
6771
6574
  });
6772
- //#endregion
6773
- //#region src/user-management/serializers/update-organization-membership-options.serializer.ts
6575
+ // src/user-management/serializers/update-organization-membership-options.serializer.ts
6774
6576
  const serializeUpdateOrganizationMembershipOptions = (options) => ({
6775
6577
  role_slug: options.roleSlug,
6776
6578
  role_slugs: options.roleSlugs
6777
6579
  });
6778
- //#endregion
6779
- //#region src/user-management/serializers/create-waitlist-entry-options.serializer.ts
6580
+ // src/user-management/serializers/create-waitlist-entry-options.serializer.ts
6780
6581
  const serializeCreateWaitlistEntryOptions = (options) => ({
6781
6582
  email: options.email,
6782
6583
  additional_fields: options.additionalFields,
6783
6584
  send_confirmation_email: options.sendConfirmationEmail
6784
6585
  });
6785
- //#endregion
6786
- //#region src/user-management/serializers/list-waitlist-entries-options.serializer.ts
6586
+ // src/user-management/serializers/list-waitlist-entries-options.serializer.ts
6787
6587
  const serializeListWaitlistEntriesOptions = (options) => ({
6788
6588
  state: options.state,
6789
6589
  email: options.email,
@@ -6792,8 +6592,7 @@ const serializeListWaitlistEntriesOptions = (options) => ({
6792
6592
  after: options.after,
6793
6593
  order: options.order
6794
6594
  });
6795
- //#endregion
6796
- //#region src/user-management/session.ts
6595
+ // src/user-management/session.ts
6797
6596
  var CookieSession = class {
6798
6597
  userManagement;
6799
6598
  cookiePassword;
@@ -6975,8 +6774,7 @@ function getErrorStatus(error) {
6975
6774
  function isNetworkError(error) {
6976
6775
  return error instanceof TypeError || error instanceof Error && error.cause instanceof TypeError;
6977
6776
  }
6978
- //#endregion
6979
- //#region src/user-management/user-management.ts
6777
+ // src/user-management/user-management.ts
6980
6778
  var UserManagement = class UserManagement {
6981
6779
  workos;
6982
6780
  _jwks;
@@ -7985,8 +7783,7 @@ var UserManagement = class UserManagement {
7985
7783
  return `${this.workos.baseURL}/sso/jwks/${clientId}`;
7986
7784
  }
7987
7785
  };
7988
- //#endregion
7989
- //#region src/feature-flags/create-rule-with-targets-error.ts
7786
+ // src/feature-flags/create-rule-with-targets-error.ts
7990
7787
  /** A rule was created, but adding one of its targets failed. */
7991
7788
  var CreateRuleWithTargetsError = class extends Error {
7992
7789
  rule;
@@ -8000,8 +7797,7 @@ var CreateRuleWithTargetsError = class extends Error {
8000
7797
  this.failedTargetId = failedTargetId;
8001
7798
  }
8002
7799
  };
8003
- //#endregion
8004
- //#region src/feature-flags/event-emitter.ts
7800
+ // src/feature-flags/event-emitter.ts
8005
7801
  /**
8006
7802
  * Minimal, runtime-agnostic, typed event emitter.
8007
7803
  *
@@ -8075,8 +7871,7 @@ var EventEmitter = class {
8075
7871
  else this.handlers.delete(event);
8076
7872
  }
8077
7873
  };
8078
- //#endregion
8079
- //#region src/feature-flags/in-memory-store.ts
7874
+ // src/feature-flags/in-memory-store.ts
8080
7875
  var InMemoryStore = class {
8081
7876
  flags = {};
8082
7877
  swap(newFlags) {
@@ -8092,8 +7887,7 @@ var InMemoryStore = class {
8092
7887
  return Object.keys(this.flags).length;
8093
7888
  }
8094
7889
  };
8095
- //#endregion
8096
- //#region src/feature-flags/evaluator.ts
7890
+ // src/feature-flags/evaluator.ts
8097
7891
  const TARGET_TYPE_PATTERN = /^[a-z][a-z0-9_-]{0,63}$/;
8098
7892
  const TARGET_ID_PATTERN = /^[A-Za-z0-9._:-]{1,255}$/;
8099
7893
  const LEGACY_KEY_TO_TARGET_TYPE = /* @__PURE__ */ new Map([["userId", "user"], ["organizationId", "organization"]]);
@@ -8182,8 +7976,7 @@ var Evaluator = class {
8182
7976
  return normalized;
8183
7977
  }
8184
7978
  };
8185
- //#endregion
8186
- //#region src/feature-flags/payload.ts
7979
+ // src/feature-flags/payload.ts
8187
7980
  function isRecord(value) {
8188
7981
  return typeof value === "object" && value !== null && !Array.isArray(value);
8189
7982
  }
@@ -8211,8 +8004,7 @@ function parseFlagPollResponse(response) {
8211
8004
  flags: Object.fromEntries(entries)
8212
8005
  };
8213
8006
  }
8214
- //#endregion
8215
- //#region src/feature-flags/runtime-client.ts
8007
+ // src/feature-flags/runtime-client.ts
8216
8008
  const DEFAULT_POLLING_INTERVAL_MS = 3e4;
8217
8009
  const MIN_POLLING_INTERVAL_MS = 5e3;
8218
8010
  const MIN_DELAY_MS = 1e3;
@@ -8411,8 +8203,7 @@ var FeatureFlagsRuntimeClient = class extends EventEmitter {
8411
8203
  return signature(a) !== signature(b);
8412
8204
  }
8413
8205
  };
8414
- //#endregion
8415
- //#region src/feature-flags/feature-flags.ts
8206
+ // src/feature-flags/feature-flags.ts
8416
8207
  var FeatureFlags = class {
8417
8208
  workos;
8418
8209
  constructor(workos) {
@@ -8627,8 +8418,7 @@ var FeatureFlags = class {
8627
8418
  return new FeatureFlagsRuntimeClient(this.workos, options);
8628
8419
  }
8629
8420
  };
8630
- //#endregion
8631
- //#region src/groups/groups.ts
8421
+ // src/groups/groups.ts
8632
8422
  var Groups = class {
8633
8423
  workos;
8634
8424
  constructor(workos) {
@@ -8790,18 +8580,15 @@ var Groups = class {
8790
8580
  await this.workos.delete(`/organizations/${encodeURIComponent(organizationId)}/groups/${encodeURIComponent(groupId)}/organization-memberships/${encodeURIComponent(organizationMembershipId)}`);
8791
8581
  }
8792
8582
  };
8793
- //#endregion
8794
- //#region src/widgets/serializers/widget-session-token-response.serializer.ts
8583
+ // src/widgets/serializers/widget-session-token-response.serializer.ts
8795
8584
  const deserializeWidgetSessionTokenResponse = (response) => ({ token: response.token });
8796
- //#endregion
8797
- //#region src/widgets/serializers/widget-session-token.serializer.ts
8585
+ // src/widgets/serializers/widget-session-token.serializer.ts
8798
8586
  const serializeGetTokenOptions = (model) => ({
8799
8587
  organization_id: model.organizationId,
8800
8588
  user_id: model.userId,
8801
8589
  scopes: model.scopes
8802
8590
  });
8803
- //#endregion
8804
- //#region src/widgets/widgets.ts
8591
+ // src/widgets/widgets.ts
8805
8592
  var Widgets = class {
8806
8593
  workos;
8807
8594
  constructor(workos) {
@@ -8823,8 +8610,7 @@ var Widgets = class {
8823
8610
  return deserializeWidgetSessionTokenResponse(data);
8824
8611
  }
8825
8612
  };
8826
- //#endregion
8827
- //#region src/authorization/serializers/environment-role.serializer.ts
8613
+ // src/authorization/serializers/environment-role.serializer.ts
8828
8614
  const deserializeEnvironmentRole = (role) => ({
8829
8615
  object: role.object,
8830
8616
  id: role.id,
@@ -8837,50 +8623,43 @@ const deserializeEnvironmentRole = (role) => ({
8837
8623
  createdAt: new Date(role.created_at),
8838
8624
  updatedAt: new Date(role.updated_at)
8839
8625
  });
8840
- //#endregion
8841
- //#region src/authorization/serializers/create-environment-role-options.serializer.ts
8626
+ // src/authorization/serializers/create-environment-role-options.serializer.ts
8842
8627
  const serializeCreateEnvironmentRoleOptions = (options) => ({
8843
8628
  slug: options.slug,
8844
8629
  name: options.name,
8845
8630
  description: options.description,
8846
8631
  resource_type_slug: options.resourceTypeSlug
8847
8632
  });
8848
- //#endregion
8849
- //#region src/authorization/serializers/update-environment-role-options.serializer.ts
8633
+ // src/authorization/serializers/update-environment-role-options.serializer.ts
8850
8634
  const serializeUpdateEnvironmentRoleOptions = (options) => ({
8851
8635
  name: options.name,
8852
8636
  description: options.description
8853
8637
  });
8854
- //#endregion
8855
- //#region src/authorization/serializers/create-organization-role-options.serializer.ts
8638
+ // src/authorization/serializers/create-organization-role-options.serializer.ts
8856
8639
  const serializeCreateOrganizationRoleOptions = (options) => ({
8857
8640
  slug: options.slug,
8858
8641
  name: options.name,
8859
8642
  description: options.description,
8860
8643
  resource_type_slug: options.resourceTypeSlug
8861
8644
  });
8862
- //#endregion
8863
- //#region src/authorization/serializers/update-organization-role-options.serializer.ts
8645
+ // src/authorization/serializers/update-organization-role-options.serializer.ts
8864
8646
  const serializeUpdateOrganizationRoleOptions = (options) => ({
8865
8647
  name: options.name,
8866
8648
  description: options.description
8867
8649
  });
8868
- //#endregion
8869
- //#region src/authorization/serializers/create-permission-options.serializer.ts
8650
+ // src/authorization/serializers/create-permission-options.serializer.ts
8870
8651
  const serializeCreatePermissionOptions = (options) => ({
8871
8652
  slug: options.slug,
8872
8653
  name: options.name,
8873
8654
  description: options.description,
8874
8655
  resource_type_slug: options.resourceTypeSlug
8875
8656
  });
8876
- //#endregion
8877
- //#region src/authorization/serializers/update-permission-options.serializer.ts
8657
+ // src/authorization/serializers/update-permission-options.serializer.ts
8878
8658
  const serializeUpdatePermissionOptions = (options) => ({
8879
8659
  name: options.name,
8880
8660
  description: options.description
8881
8661
  });
8882
- //#endregion
8883
- //#region src/authorization/serializers/authorization-resource.serializer.ts
8662
+ // src/authorization/serializers/authorization-resource.serializer.ts
8884
8663
  const deserializeAuthorizationResource = (resource) => ({
8885
8664
  object: resource.object,
8886
8665
  id: resource.id,
@@ -8893,8 +8672,7 @@ const deserializeAuthorizationResource = (resource) => ({
8893
8672
  createdAt: new Date(resource.created_at),
8894
8673
  updatedAt: new Date(resource.updated_at)
8895
8674
  });
8896
- //#endregion
8897
- //#region src/authorization/serializers/create-authorization-resource-options.serializer.ts
8675
+ // src/authorization/serializers/create-authorization-resource-options.serializer.ts
8898
8676
  const serializeCreateResourceOptions = (options) => ({
8899
8677
  organization_id: options.organizationId,
8900
8678
  resource_type_slug: options.resourceTypeSlug,
@@ -8907,20 +8685,17 @@ const serializeCreateResourceOptions = (options) => ({
8907
8685
  parent_resource_type_slug: options.parentResourceTypeSlug
8908
8686
  }
8909
8687
  });
8910
- //#endregion
8911
- //#region src/authorization/serializers/update-authorization-resource-options.serializer.ts
8688
+ // src/authorization/serializers/update-authorization-resource-options.serializer.ts
8912
8689
  const serializeUpdateResourceOptions = (options) => ({
8913
8690
  ...options.name !== void 0 && { name: options.name },
8914
8691
  ...options.description !== void 0 && { description: options.description }
8915
8692
  });
8916
- //#endregion
8917
- //#region src/authorization/serializers/update-authorization-resource-by-external-id-options.serializer.ts
8693
+ // src/authorization/serializers/update-authorization-resource-by-external-id-options.serializer.ts
8918
8694
  const serializeUpdateResourceByExternalIdOptions = (options) => ({
8919
8695
  ...options.name !== void 0 && { name: options.name },
8920
8696
  ...options.description !== void 0 && { description: options.description }
8921
8697
  });
8922
- //#endregion
8923
- //#region src/authorization/serializers/list-authorization-resources-options.serializer.ts
8698
+ // src/authorization/serializers/list-authorization-resources-options.serializer.ts
8924
8699
  const serializeListAuthorizationResourcesOptions = (options) => ({
8925
8700
  ...options.organizationId && { organization_id: options.organizationId },
8926
8701
  ...options.resourceTypeSlug && { resource_type_slug: options.resourceTypeSlug },
@@ -8929,8 +8704,7 @@ const serializeListAuthorizationResourcesOptions = (options) => ({
8929
8704
  ...options.parentExternalId && { parent_external_id: options.parentExternalId },
8930
8705
  ...serializePaginationOptions(options)
8931
8706
  });
8932
- //#endregion
8933
- //#region src/authorization/serializers/authorization-check-options.serializer.ts
8707
+ // src/authorization/serializers/authorization-check-options.serializer.ts
8934
8708
  const serializeAuthorizationCheckOptions = (options) => ({
8935
8709
  permission_slug: options.permissionSlug,
8936
8710
  ..."resourceId" in options && { resource_id: options.resourceId },
@@ -8939,8 +8713,7 @@ const serializeAuthorizationCheckOptions = (options) => ({
8939
8713
  resource_type_slug: options.resourceTypeSlug
8940
8714
  }
8941
8715
  });
8942
- //#endregion
8943
- //#region src/authorization/serializers/list-resources-for-membership-options.serializer.ts
8716
+ // src/authorization/serializers/list-resources-for-membership-options.serializer.ts
8944
8717
  const serializeListResourcesForMembershipOptions = (options) => ({
8945
8718
  permission_slug: options.permissionSlug,
8946
8719
  ...serializePaginationOptions(options),
@@ -8950,15 +8723,13 @@ const serializeListResourcesForMembershipOptions = (options) => ({
8950
8723
  parent_resource_external_id: options.parentResourceExternalId
8951
8724
  }
8952
8725
  });
8953
- //#endregion
8954
- //#region src/authorization/serializers/list-memberships-for-resource-options.serializer.ts
8726
+ // src/authorization/serializers/list-memberships-for-resource-options.serializer.ts
8955
8727
  const serializeListMembershipsForResourceOptions = (options) => ({
8956
8728
  permission_slug: options.permissionSlug,
8957
8729
  ...options.assignment && { assignment: options.assignment },
8958
8730
  ...serializePaginationOptions(options)
8959
8731
  });
8960
- //#endregion
8961
- //#region src/authorization/serializers/role-assignment.serializer.ts
8732
+ // src/authorization/serializers/role-assignment.serializer.ts
8962
8733
  const deserializeRoleAssignment = (response) => ({
8963
8734
  object: response.object,
8964
8735
  id: response.id,
@@ -8976,22 +8747,19 @@ const deserializeRoleAssignment = (response) => ({
8976
8747
  createdAt: new Date(response.created_at),
8977
8748
  updatedAt: new Date(response.updated_at)
8978
8749
  });
8979
- //#endregion
8980
- //#region src/authorization/serializers/list-role-assignments-options.serializer.ts
8750
+ // src/authorization/serializers/list-role-assignments-options.serializer.ts
8981
8751
  const serializeListRoleAssignmentsOptions = (options) => ({
8982
8752
  ...options.resourceId && { resource_id: options.resourceId },
8983
8753
  ...options.resourceExternalId && { resource_external_id: options.resourceExternalId },
8984
8754
  ...options.resourceTypeSlug && { resource_type_slug: options.resourceTypeSlug },
8985
8755
  ...serializePaginationOptions(options)
8986
8756
  });
8987
- //#endregion
8988
- //#region src/authorization/serializers/list-role-assignments-for-resource-options.serializer.ts
8757
+ // src/authorization/serializers/list-role-assignments-for-resource-options.serializer.ts
8989
8758
  const serializeListRoleAssignmentsForResourceOptions = (options) => ({
8990
8759
  ...options.roleSlug && { role_slug: options.roleSlug },
8991
8760
  ...serializePaginationOptions(options)
8992
8761
  });
8993
- //#endregion
8994
- //#region src/authorization/serializers/assign-role-options.serializer.ts
8762
+ // src/authorization/serializers/assign-role-options.serializer.ts
8995
8763
  const serializeAssignRoleOptions = (options) => ({
8996
8764
  role_slug: options.roleSlug,
8997
8765
  ..."resourceId" in options && { resource_id: options.resourceId },
@@ -9000,8 +8768,7 @@ const serializeAssignRoleOptions = (options) => ({
9000
8768
  resource_type_slug: options.resourceTypeSlug
9001
8769
  }
9002
8770
  });
9003
- //#endregion
9004
- //#region src/authorization/serializers/remove-role-options.serializer.ts
8771
+ // src/authorization/serializers/remove-role-options.serializer.ts
9005
8772
  const serializeRemoveRoleOptions = (options) => ({
9006
8773
  role_slug: options.roleSlug,
9007
8774
  ..."resourceId" in options && { resource_id: options.resourceId },
@@ -9010,8 +8777,7 @@ const serializeRemoveRoleOptions = (options) => ({
9010
8777
  resource_type_slug: options.resourceTypeSlug
9011
8778
  }
9012
8779
  });
9013
- //#endregion
9014
- //#region src/authorization/serializers/group-role-assignment.serializer.ts
8780
+ // src/authorization/serializers/group-role-assignment.serializer.ts
9015
8781
  const deserializeGroupRoleAssignment = (response) => ({
9016
8782
  object: response.object,
9017
8783
  id: response.id,
@@ -9025,8 +8791,7 @@ const deserializeGroupRoleAssignment = (response) => ({
9025
8791
  createdAt: new Date(response.created_at),
9026
8792
  updatedAt: new Date(response.updated_at)
9027
8793
  });
9028
- //#endregion
9029
- //#region src/authorization/serializers/create-group-role-assignment-options.serializer.ts
8794
+ // src/authorization/serializers/create-group-role-assignment-options.serializer.ts
9030
8795
  const serializeCreateGroupRoleAssignmentOptions = (options) => ({
9031
8796
  role_slug: options.roleSlug,
9032
8797
  ..."resourceId" in options && { resource_id: options.resourceId },
@@ -9035,8 +8800,7 @@ const serializeCreateGroupRoleAssignmentOptions = (options) => ({
9035
8800
  resource_type_slug: options.resourceTypeSlug
9036
8801
  }
9037
8802
  });
9038
- //#endregion
9039
- //#region src/authorization/serializers/remove-group-role-assignments-options.serializer.ts
8803
+ // src/authorization/serializers/remove-group-role-assignments-options.serializer.ts
9040
8804
  const serializeRemoveGroupRoleAssignmentsOptions = (options) => ({
9041
8805
  role_slug: options.roleSlug,
9042
8806
  ..."resourceId" in options && { resource_id: options.resourceId },
@@ -9045,8 +8809,7 @@ const serializeRemoveGroupRoleAssignmentsOptions = (options) => ({
9045
8809
  resource_type_slug: options.resourceTypeSlug
9046
8810
  }
9047
8811
  });
9048
- //#endregion
9049
- //#region src/authorization/serializers/replace-group-role-assignments-options.serializer.ts
8812
+ // src/authorization/serializers/replace-group-role-assignments-options.serializer.ts
9050
8813
  const serializeEntry = (entry) => ({
9051
8814
  role_slug: entry.roleSlug,
9052
8815
  ..."resourceId" in entry && { resource_id: entry.resourceId },
@@ -9056,11 +8819,9 @@ const serializeEntry = (entry) => ({
9056
8819
  }
9057
8820
  });
9058
8821
  const serializeReplaceGroupRoleAssignmentsOptions = (options) => ({ role_assignments: options.roleAssignments.map(serializeEntry) });
9059
- //#endregion
9060
- //#region src/authorization/serializers/list-effective-permissions-options.serializer.ts
8822
+ // src/authorization/serializers/list-effective-permissions-options.serializer.ts
9061
8823
  const serializeListEffectivePermissionsOptions = (options) => ({ ...serializePaginationOptions(options) });
9062
- //#endregion
9063
- //#region src/authorization/authorization.ts
8824
+ // src/authorization/authorization.ts
9064
8825
  var Authorization = class {
9065
8826
  workos;
9066
8827
  constructor(workos) {
@@ -9962,8 +9723,7 @@ var Authorization = class {
9962
9723
  return new AutoPaginatable(await fetchAndDeserialize(this.workos, endpoint, deserializePermission, serializedOptions), (params) => fetchAndDeserialize(this.workos, endpoint, deserializePermission, params), serializedOptions);
9963
9724
  }
9964
9725
  };
9965
- //#endregion
9966
- //#region src/common/utils/leb128.ts
9726
+ // src/common/utils/leb128.ts
9967
9727
  /**
9968
9728
  * LEB128 (Little Endian Base 128) encoding for unsigned 32-bit integers.
9969
9729
  * Variable-length encoding: each byte stores 7 bits of data, bit 7 is continuation flag.
@@ -10032,28 +9792,24 @@ function validateOffset(data, offset) {
10032
9792
  function hasContinuationBit(byte) {
10033
9793
  return (byte & CONTINUATION_BIT) !== 0;
10034
9794
  }
10035
- //#endregion
10036
- //#region src/vault/serializers/create-data-key-response.serializer.ts
9795
+ // src/vault/serializers/create-data-key-response.serializer.ts
10037
9796
  const deserializeCreateDataKeyResponse = (response) => ({
10038
9797
  context: response.context,
10039
9798
  dataKey: response.data_key,
10040
9799
  encryptedKeys: response.encrypted_keys,
10041
9800
  id: response.id
10042
9801
  });
10043
- //#endregion
10044
- //#region src/vault/serializers/decrypt-response.serializer.ts
9802
+ // src/vault/serializers/decrypt-response.serializer.ts
10045
9803
  const deserializeDecryptResponse = (response) => ({
10046
9804
  dataKey: response.data_key,
10047
9805
  id: response.id
10048
9806
  });
10049
- //#endregion
10050
- //#region src/vault/serializers/actor.serializer.ts
9807
+ // src/vault/serializers/actor.serializer.ts
10051
9808
  const deserializeActor = (response) => ({
10052
9809
  id: response.id,
10053
9810
  name: response.name
10054
9811
  });
10055
- //#endregion
10056
- //#region src/vault/serializers/object-metadata.serializer.ts
9812
+ // src/vault/serializers/object-metadata.serializer.ts
10057
9813
  const deserializeObjectMetadata = (response) => ({
10058
9814
  context: response.context,
10059
9815
  environmentId: response.environment_id,
@@ -10063,23 +9819,20 @@ const deserializeObjectMetadata = (response) => ({
10063
9819
  updatedBy: deserializeActor(response.updated_by),
10064
9820
  versionId: response.version_id ?? null
10065
9821
  });
10066
- //#endregion
10067
- //#region src/vault/serializers/vault-object.serializer.ts
9822
+ // src/vault/serializers/vault-object.serializer.ts
10068
9823
  const deserializeVaultObject = (response) => ({
10069
9824
  id: response.id,
10070
9825
  metadata: deserializeObjectMetadata(response.metadata),
10071
9826
  name: response.name,
10072
9827
  value: response.value
10073
9828
  });
10074
- //#endregion
10075
- //#region src/vault/serializers/object-without-value.serializer.ts
9829
+ // src/vault/serializers/object-without-value.serializer.ts
10076
9830
  const deserializeObjectWithoutValue = (response) => ({
10077
9831
  id: response.id,
10078
9832
  metadata: deserializeObjectMetadata(response.metadata),
10079
9833
  name: response.name
10080
9834
  });
10081
- //#endregion
10082
- //#region src/vault/serializers/object-version.serializer.ts
9835
+ // src/vault/serializers/object-version.serializer.ts
10083
9836
  const deserializeObjectVersion = (response) => ({
10084
9837
  createdAt: new Date(response.created_at),
10085
9838
  currentVersion: response.current_version,
@@ -10087,52 +9840,43 @@ const deserializeObjectVersion = (response) => ({
10087
9840
  id: response.id,
10088
9841
  size: response.size ?? 0
10089
9842
  });
10090
- //#endregion
10091
- //#region src/vault/serializers/list-metadata.serializer.ts
9843
+ // src/vault/serializers/list-metadata.serializer.ts
10092
9844
  const deserializeListMetadata = (response) => ({
10093
9845
  after: response.after ?? null,
10094
9846
  before: response.before ?? null
10095
9847
  });
10096
- //#endregion
10097
- //#region src/vault/serializers/version-list-response.serializer.ts
9848
+ // src/vault/serializers/version-list-response.serializer.ts
10098
9849
  const deserializeVersionListResponse = (response) => ({
10099
9850
  data: response.data.map(deserializeObjectVersion),
10100
9851
  listMetadata: deserializeListMetadata(response.list_metadata)
10101
9852
  });
10102
- //#endregion
10103
- //#region src/vault/serializers/object-summary.serializer.ts
9853
+ // src/vault/serializers/object-summary.serializer.ts
10104
9854
  const deserializeObjectSummary = (response) => ({
10105
9855
  id: response.id,
10106
9856
  name: response.name,
10107
9857
  updatedAt: response.updated_at != null ? new Date(response.updated_at) : null
10108
9858
  });
10109
- //#endregion
10110
- //#region src/vault/serializers/create-data-key-request.serializer.ts
9859
+ // src/vault/serializers/create-data-key-request.serializer.ts
10111
9860
  const serializeCreateDataKeyRequest = (model) => ({ context: model.context });
10112
- //#endregion
10113
- //#region src/vault/serializers/decrypt-request.serializer.ts
9861
+ // src/vault/serializers/decrypt-request.serializer.ts
10114
9862
  const serializeDecryptRequest = (model) => ({ keys: model.keys });
10115
- //#endregion
10116
- //#region src/vault/serializers/rekey-request.serializer.ts
9863
+ // src/vault/serializers/rekey-request.serializer.ts
10117
9864
  const serializeRekeyRequest = (model) => ({
10118
9865
  context: model.context,
10119
9866
  encrypted_keys: model.encryptedKeys
10120
9867
  });
10121
- //#endregion
10122
- //#region src/vault/serializers/create-object-request.serializer.ts
9868
+ // src/vault/serializers/create-object-request.serializer.ts
10123
9869
  const serializeCreateObjectRequest = (model) => ({
10124
9870
  key_context: model.keyContext,
10125
9871
  name: model.name,
10126
9872
  value: model.value
10127
9873
  });
10128
- //#endregion
10129
- //#region src/vault/serializers/update-object-request.serializer.ts
9874
+ // src/vault/serializers/update-object-request.serializer.ts
10130
9875
  const serializeUpdateObjectRequest = (model) => ({
10131
9876
  value: model.value,
10132
9877
  version_check: model.versionCheck ?? null
10133
9878
  });
10134
- //#endregion
10135
- //#region src/common/utils/base64.ts
9879
+ // src/common/utils/base64.ts
10136
9880
  /**
10137
9881
  * Cross-runtime compatible base64 encoding/decoding utilities
10138
9882
  * that work in both Node.js and browser environments
@@ -10160,8 +9904,7 @@ function uint8ArrayToBase64(bytes) {
10160
9904
  } else if (typeof Buffer !== "undefined") return Buffer.from(bytes).toString("base64");
10161
9905
  else throw new Error("No base64 encoding implementation available");
10162
9906
  }
10163
- //#endregion
10164
- //#region src/vault/vault.ts
9907
+ // src/vault/vault.ts
10165
9908
  const serializeListObjectsOptions = (options) => {
10166
9909
  const wire = {
10167
9910
  limit: options.limit,
@@ -10415,11 +10158,9 @@ var Vault = class {
10415
10158
  return uint8ArrayToBase64(resultArray);
10416
10159
  }
10417
10160
  };
10418
- //#endregion
10419
- //#region package.json
10420
- var version = "12.3.0";
10421
- //#endregion
10422
- //#region src/workos.ts
10161
+ // package.json
10162
+ var version = "12.4.0";
10163
+ // src/workos.ts
10423
10164
  const DEFAULT_HOSTNAME = "api.workos.com";
10424
10165
  const HEADER_AUTHORIZATION = "Authorization";
10425
10166
  const HEADER_IDEMPOTENCY_KEY = "Idempotency-Key";
@@ -10710,8 +10451,7 @@ var WorkOS = class {
10710
10451
  }
10711
10452
  }
10712
10453
  };
10713
- //#endregion
10714
- //#region src/audit-logs/interfaces/update-audit-logs-retention-retention-period.interface.ts
10454
+ // src/audit-logs/interfaces/update-audit-logs-retention-retention-period.interface.ts
10715
10455
  const UpdateAuditLogsRetentionRetentionPeriod = {
10716
10456
  Value1Month: "1_MONTH",
10717
10457
  Value2Months: "2_MONTHS",
@@ -10735,8 +10475,7 @@ const UpdateAuditLogsRetentionRetentionPeriod = {
10735
10475
  Value9Years: "9_YEARS",
10736
10476
  Value10Years: "10_YEARS"
10737
10477
  };
10738
- //#endregion
10739
- //#region src/common/interfaces/generate-link-intent.interface.ts
10478
+ // src/common/interfaces/generate-link-intent.interface.ts
10740
10479
  const GenerateLinkIntent = {
10741
10480
  SSO: "sso",
10742
10481
  DSync: "dsync",
@@ -10746,22 +10485,19 @@ const GenerateLinkIntent = {
10746
10485
  CertificateRenewal: "certificate_renewal",
10747
10486
  BringYourOwnKey: "bring_your_own_key"
10748
10487
  };
10749
- //#endregion
10750
- //#region src/directory-sync/interfaces/directory-user-with-groups-state.interface.ts
10488
+ // src/directory-sync/interfaces/directory-user-with-groups-state.interface.ts
10751
10489
  const DirectoryUserWithGroupsState = {
10752
10490
  Active: "active",
10753
10491
  Suspended: "suspended",
10754
10492
  Inactive: "inactive"
10755
10493
  };
10756
- //#endregion
10757
- //#region src/organizations/interfaces/domain-data.interface.ts
10494
+ // src/organizations/interfaces/domain-data.interface.ts
10758
10495
  let DomainDataState = /* @__PURE__ */ function(DomainDataState) {
10759
10496
  DomainDataState["Verified"] = "verified";
10760
10497
  DomainDataState["Pending"] = "pending";
10761
10498
  return DomainDataState;
10762
10499
  }({});
10763
- //#endregion
10764
- //#region src/organizations/interfaces/it-contact-options.interface.ts
10500
+ // src/organizations/interfaces/it-contact-options.interface.ts
10765
10501
  const ItContactIntent = {
10766
10502
  SSO: "sso",
10767
10503
  DirectorySync: "directory_sync",
@@ -10769,8 +10505,7 @@ const ItContactIntent = {
10769
10505
  DomainVerification: "domain_verification",
10770
10506
  BringYourOwnKey: "bring_your_own_key"
10771
10507
  };
10772
- //#endregion
10773
- //#region src/organization-domains/interfaces/organization-domain.interface.ts
10508
+ // src/organization-domains/interfaces/organization-domain.interface.ts
10774
10509
  let OrganizationDomainState = /* @__PURE__ */ function(OrganizationDomainState) {
10775
10510
  OrganizationDomainState["Verified"] = "verified";
10776
10511
  OrganizationDomainState["Pending"] = "pending";
@@ -10783,8 +10518,7 @@ let OrganizationDomainVerificationStrategy = /* @__PURE__ */ function(Organizati
10783
10518
  OrganizationDomainVerificationStrategy["Manual"] = "manual";
10784
10519
  return OrganizationDomainVerificationStrategy;
10785
10520
  }({});
10786
- //#endregion
10787
- //#region src/sso/interfaces/connection-type.enum.ts
10521
+ // src/sso/interfaces/connection-type.enum.ts
10788
10522
  let ConnectionType = /* @__PURE__ */ function(ConnectionType) {
10789
10523
  ConnectionType["ADFSSAML"] = "ADFSSAML";
10790
10524
  ConnectionType["AdpOidc"] = "AdpOidc";
@@ -10826,12 +10560,10 @@ let ConnectionType = /* @__PURE__ */ function(ConnectionType) {
10826
10560
  ConnectionType["VMwareSAML"] = "VMwareSAML";
10827
10561
  return ConnectionType;
10828
10562
  }({});
10829
- //#endregion
10830
- //#region src/factory.ts
10563
+ // src/factory.ts
10831
10564
  function createWorkOS(options) {
10832
10565
  return new WorkOS(options);
10833
10566
  }
10834
- //#endregion
10835
10567
  export { AuthenticationException as A, SignatureVerificationException as C, NoApiKeyProvidedException as D, NotFoundException as E, SubtleCryptoProvider as F, GenericServerException as M, ApiKeyRequiredException as N, ConflictException as O, FetchHttpClient as P, UnauthorizedException as S, OauthException as T, PKCE as _, ItContactIntent as a, Actions as b, GenerateLinkIntent as c, FeatureFlagsRuntimeClient as d, CreateRuleWithTargetsError as f, AuthenticateWithSessionCookieFailureReason as g, serializeRevokeSessionOptions as h, OrganizationDomainVerificationStrategy as i, isAuthenticationErrorData as j, BadRequestException as k, UpdateAuditLogsRetentionRetentionPeriod as l, RefreshSessionFailureReason as m, ConnectionType as n, DomainDataState as o, CookieSession as p, OrganizationDomainState as r, DirectoryUserWithGroupsState as s, createWorkOS as t, WorkOS as u, Webhooks as v, RateLimitExceededException as w, UnprocessableEntityException as x, AutoPaginatable as y };
10836
10568
 
10837
- //# sourceMappingURL=factory-ND4UZ76L.mjs.map
10569
+ //# sourceMappingURL=factory-BrukHQPr.mjs.map