@workos-inc/node 12.3.0 → 12.4.1
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.
- package/lib/{factory-ND4UZ76L.mjs → factory-D4TQZOWl.mjs} +338 -593
- package/lib/factory-D4TQZOWl.mjs.map +1 -0
- package/lib/{factory-xvKEp07N.d.cts → factory-D5AfaGZn.d.cts} +444 -909
- package/lib/{factory-BurShrC1.cjs → factory-Eg0FV6MT.cjs} +338 -593
- package/lib/factory-Eg0FV6MT.cjs.map +1 -0
- package/lib/{factory-xvKEp07N.d.mts → factory-rQgzNO-3.d.mts} +87 -909
- package/lib/index.cjs +52 -103
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +2 -442
- package/lib/index.d.mts +2 -85
- package/lib/index.mjs +52 -103
- package/lib/index.mjs.map +1 -1
- package/lib/index.worker.cjs +2 -3
- package/lib/index.worker.d.cts +2 -5
- package/lib/index.worker.d.mts +2 -5
- package/lib/index.worker.mjs +2 -3
- package/lib/{webapi-CfgZkeeN.mjs → webapi-CFOFAgDt.mjs} +256 -299
- package/lib/webapi-CFOFAgDt.mjs.map +1 -0
- package/lib/{webapi-MD5xmNba.cjs → webapi-rpGT44g1.cjs} +256 -299
- package/lib/webapi-rpGT44g1.cjs.map +1 -0
- package/package.json +2 -2
- package/lib/factory-BurShrC1.cjs.map +0 -1
- package/lib/factory-ND4UZ76L.mjs.map +0 -1
- package/lib/webapi-CfgZkeeN.mjs.map +0 -1
- package/lib/webapi-MD5xmNba.cjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
1771
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,26 @@ let _josePromise;
|
|
|
2884
2780
|
* @returns Promise that resolves to the jose module
|
|
2885
2781
|
*/
|
|
2886
2782
|
function getJose() {
|
|
2887
|
-
return _josePromise ??= Promise.resolve().then(() => require("./webapi-
|
|
2783
|
+
return _josePromise ??= Promise.resolve().then(() => require("./webapi-rpGT44g1.cjs"));
|
|
2784
|
+
}
|
|
2785
|
+
const ALLOWED_JWT_ALGORITHMS = [
|
|
2786
|
+
"RS256",
|
|
2787
|
+
"ES256",
|
|
2788
|
+
"ES384",
|
|
2789
|
+
"ES512",
|
|
2790
|
+
"EdDSA",
|
|
2791
|
+
"Ed25519"
|
|
2792
|
+
];
|
|
2793
|
+
/**
|
|
2794
|
+
* Whether a jose error means the presented token is invalid, as opposed to
|
|
2795
|
+
* a failure to verify it at all. Network errors, JWKS timeouts and crypto
|
|
2796
|
+
* failures propagate so they surface as errors rather than as rejected tokens.
|
|
2797
|
+
*/
|
|
2798
|
+
function isJwtValidationError(e) {
|
|
2799
|
+
if (!(e instanceof Error) || !("code" in e) || typeof e.code !== "string") return false;
|
|
2800
|
+
return e.code.startsWith("ERR_JWT_") || e.code.startsWith("ERR_JWS_") || e.code === "ERR_JWKS_NO_MATCHING_KEY" || e.code === "ERR_JWKS_MULTIPLE_MATCHING_KEYS" || e.code === "ERR_JOSE_NOT_SUPPORTED" || e.code === "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
2888
2801
|
}
|
|
2889
|
-
|
|
2890
|
-
//#region src/agents/serializers/agent-instance-session.serializer.ts
|
|
2802
|
+
// src/agents/serializers/agent-instance-session.serializer.ts
|
|
2891
2803
|
function deserializeAgentInstanceSession(session) {
|
|
2892
2804
|
return {
|
|
2893
2805
|
object: session.object,
|
|
@@ -2910,8 +2822,7 @@ function serializeListAgentInstanceSessionsOptions(options) {
|
|
|
2910
2822
|
order: options.order
|
|
2911
2823
|
};
|
|
2912
2824
|
}
|
|
2913
|
-
|
|
2914
|
-
//#region src/agents/serializers/agent-registration.serializer.ts
|
|
2825
|
+
// src/agents/serializers/agent-registration.serializer.ts
|
|
2915
2826
|
function deserializeAgentRegistration(registration) {
|
|
2916
2827
|
return {
|
|
2917
2828
|
id: registration.id,
|
|
@@ -2942,8 +2853,7 @@ function deserializeAgentRegistration(registration) {
|
|
|
2942
2853
|
updatedAt: new Date(registration.updated_at)
|
|
2943
2854
|
};
|
|
2944
2855
|
}
|
|
2945
|
-
|
|
2946
|
-
//#region src/agents/serializers/agent-token.serializer.ts
|
|
2856
|
+
// src/agents/serializers/agent-token.serializer.ts
|
|
2947
2857
|
function deserializeAgentToken(token) {
|
|
2948
2858
|
return {
|
|
2949
2859
|
accessToken: token.access_token,
|
|
@@ -2981,8 +2891,7 @@ function serializeMintAgentTokenOptions(options) {
|
|
|
2981
2891
|
};
|
|
2982
2892
|
}
|
|
2983
2893
|
}
|
|
2984
|
-
|
|
2985
|
-
//#region src/agents/serializers/claim-attempt.serializer.ts
|
|
2894
|
+
// src/agents/serializers/claim-attempt.serializer.ts
|
|
2986
2895
|
function serializeLinkClaimAttemptToExternalUserOptions(options) {
|
|
2987
2896
|
return {
|
|
2988
2897
|
type: "link_external_user",
|
|
@@ -3002,8 +2911,7 @@ function deserializeClaimAttemptResponse(response) {
|
|
|
3002
2911
|
organizations: response.organizations
|
|
3003
2912
|
};
|
|
3004
2913
|
}
|
|
3005
|
-
|
|
3006
|
-
//#region src/agents/serializers/validate-agent-credential.serializer.ts
|
|
2914
|
+
// src/agents/serializers/validate-agent-credential.serializer.ts
|
|
3007
2915
|
function serializeValidateAgentCredentialOptions(options) {
|
|
3008
2916
|
return {
|
|
3009
2917
|
type: options.type,
|
|
@@ -3038,8 +2946,7 @@ function deserializeAgentAccessTokenClaims(payload) {
|
|
|
3038
2946
|
issuedAt: payload.iat
|
|
3039
2947
|
};
|
|
3040
2948
|
}
|
|
3041
|
-
|
|
3042
|
-
//#region src/agents/agents.ts
|
|
2949
|
+
// src/agents/agents.ts
|
|
3043
2950
|
/**
|
|
3044
2951
|
* A decoded JWT payload is only an agent credential if it carries every claim
|
|
3045
2952
|
* the SDK guarantees. A token signed by the same JWKS for another purpose
|
|
@@ -3333,12 +3240,15 @@ var Agents = class {
|
|
|
3333
3240
|
const { jwtVerify } = await getJose();
|
|
3334
3241
|
const jwks = await this.getJWKS();
|
|
3335
3242
|
try {
|
|
3336
|
-
const { payload } = await jwtVerify(credential, jwks, {
|
|
3243
|
+
const { payload } = await jwtVerify(credential, jwks, {
|
|
3244
|
+
algorithms: ALLOWED_JWT_ALGORITHMS,
|
|
3245
|
+
audience: audience ?? this.workos.clientId
|
|
3246
|
+
});
|
|
3337
3247
|
if (!hasRequiredAgentClaims(payload)) return null;
|
|
3338
3248
|
if (payload.exp * 1e3 <= Date.now()) return null;
|
|
3339
3249
|
return deserializeAgentAccessTokenClaims(payload);
|
|
3340
3250
|
} catch (e) {
|
|
3341
|
-
if (
|
|
3251
|
+
if (isJwtValidationError(e)) return null;
|
|
3342
3252
|
throw e;
|
|
3343
3253
|
}
|
|
3344
3254
|
}
|
|
@@ -3350,8 +3260,7 @@ var Agents = class {
|
|
|
3350
3260
|
return this._jwks;
|
|
3351
3261
|
}
|
|
3352
3262
|
};
|
|
3353
|
-
|
|
3354
|
-
//#region src/api-keys/serializers/create-organization-api-key-options.serializer.ts
|
|
3263
|
+
// src/api-keys/serializers/create-organization-api-key-options.serializer.ts
|
|
3355
3264
|
function serializeCreateOrganizationApiKeyOptions(options) {
|
|
3356
3265
|
return {
|
|
3357
3266
|
name: options.name,
|
|
@@ -3359,8 +3268,7 @@ function serializeCreateOrganizationApiKeyOptions(options) {
|
|
|
3359
3268
|
expires_at: options.expiresAt?.toISOString()
|
|
3360
3269
|
};
|
|
3361
3270
|
}
|
|
3362
|
-
|
|
3363
|
-
//#region src/api-keys/serializers/created-api-key.serializer.ts
|
|
3271
|
+
// src/api-keys/serializers/created-api-key.serializer.ts
|
|
3364
3272
|
function deserializeCreatedApiKey(apiKey) {
|
|
3365
3273
|
return {
|
|
3366
3274
|
object: apiKey.object,
|
|
@@ -3376,16 +3284,14 @@ function deserializeCreatedApiKey(apiKey) {
|
|
|
3376
3284
|
updatedAt: new Date(apiKey.updated_at)
|
|
3377
3285
|
};
|
|
3378
3286
|
}
|
|
3379
|
-
|
|
3380
|
-
//#region src/api-keys/serializers/validate-api-key.serializer.ts
|
|
3287
|
+
// src/api-keys/serializers/validate-api-key.serializer.ts
|
|
3381
3288
|
function deserializeValidateApiKeyResponse(response) {
|
|
3382
3289
|
return {
|
|
3383
3290
|
apiKey: response.api_key ? deserializeApiKey(response.api_key) : null,
|
|
3384
3291
|
...typeof response.agent_registration_id === "undefined" ? void 0 : { agentRegistrationId: response.agent_registration_id }
|
|
3385
3292
|
};
|
|
3386
3293
|
}
|
|
3387
|
-
|
|
3388
|
-
//#region src/api-keys/api-keys.ts
|
|
3294
|
+
// src/api-keys/api-keys.ts
|
|
3389
3295
|
var ApiKeys = class {
|
|
3390
3296
|
workos;
|
|
3391
3297
|
constructor(workos) {
|
|
@@ -3456,11 +3362,9 @@ var ApiKeys = class {
|
|
|
3456
3362
|
return deserializeCreatedApiKey(data);
|
|
3457
3363
|
}
|
|
3458
3364
|
};
|
|
3459
|
-
|
|
3460
|
-
//#region src/connect/serializers/external-auth-complete-response.serializer.ts
|
|
3365
|
+
// src/connect/serializers/external-auth-complete-response.serializer.ts
|
|
3461
3366
|
const deserializeExternalAuthCompleteResponse = (response) => ({ redirectUri: response.redirect_uri });
|
|
3462
|
-
|
|
3463
|
-
//#region src/connect/serializers/token-exchange-response.serializer.ts
|
|
3367
|
+
// src/connect/serializers/token-exchange-response.serializer.ts
|
|
3464
3368
|
const deserializeTokenExchangeResponse = (response) => ({
|
|
3465
3369
|
accessToken: response.access_token,
|
|
3466
3370
|
issuedTokenType: response.issued_token_type,
|
|
@@ -3468,8 +3372,7 @@ const deserializeTokenExchangeResponse = (response) => ({
|
|
|
3468
3372
|
expiresIn: response.expires_in,
|
|
3469
3373
|
...response.scope !== void 0 && { scope: response.scope }
|
|
3470
3374
|
});
|
|
3471
|
-
|
|
3472
|
-
//#region src/connect/serializers/application-credentials-list-item.serializer.ts
|
|
3375
|
+
// src/connect/serializers/application-credentials-list-item.serializer.ts
|
|
3473
3376
|
const deserializeApplicationCredentialsListItem = (response) => ({
|
|
3474
3377
|
object: response.object,
|
|
3475
3378
|
id: response.id,
|
|
@@ -3478,8 +3381,7 @@ const deserializeApplicationCredentialsListItem = (response) => ({
|
|
|
3478
3381
|
createdAt: new Date(response.created_at),
|
|
3479
3382
|
updatedAt: new Date(response.updated_at)
|
|
3480
3383
|
});
|
|
3481
|
-
|
|
3482
|
-
//#region src/connect/serializers/new-connect-application-secret.serializer.ts
|
|
3384
|
+
// src/connect/serializers/new-connect-application-secret.serializer.ts
|
|
3483
3385
|
const deserializeNewConnectApplicationSecret = (response) => ({
|
|
3484
3386
|
object: response.object,
|
|
3485
3387
|
id: response.id,
|
|
@@ -3489,8 +3391,7 @@ const deserializeNewConnectApplicationSecret = (response) => ({
|
|
|
3489
3391
|
updatedAt: new Date(response.updated_at),
|
|
3490
3392
|
secret: response.secret
|
|
3491
3393
|
});
|
|
3492
|
-
|
|
3493
|
-
//#region src/connect/serializers/user-object.serializer.ts
|
|
3394
|
+
// src/connect/serializers/user-object.serializer.ts
|
|
3494
3395
|
const serializeUserObject = (model) => ({
|
|
3495
3396
|
id: model.id,
|
|
3496
3397
|
email: model.email,
|
|
@@ -3498,35 +3399,30 @@ const serializeUserObject = (model) => ({
|
|
|
3498
3399
|
last_name: model.lastName,
|
|
3499
3400
|
metadata: model.metadata
|
|
3500
3401
|
});
|
|
3501
|
-
|
|
3502
|
-
//#region src/connect/serializers/user-consent-option-choice.serializer.ts
|
|
3402
|
+
// src/connect/serializers/user-consent-option-choice.serializer.ts
|
|
3503
3403
|
const serializeUserConsentOptionChoice = (model) => ({
|
|
3504
3404
|
value: model.value,
|
|
3505
3405
|
label: model.label
|
|
3506
3406
|
});
|
|
3507
|
-
|
|
3508
|
-
//#region src/connect/serializers/user-consent-option.serializer.ts
|
|
3407
|
+
// src/connect/serializers/user-consent-option.serializer.ts
|
|
3509
3408
|
const serializeUserConsentOption = (model) => ({
|
|
3510
3409
|
claim: model.claim,
|
|
3511
3410
|
type: model.type,
|
|
3512
3411
|
label: model.label,
|
|
3513
3412
|
choices: model.choices.map(serializeUserConsentOptionChoice)
|
|
3514
3413
|
});
|
|
3515
|
-
|
|
3516
|
-
//#region src/connect/serializers/user-management-login-request.serializer.ts
|
|
3414
|
+
// src/connect/serializers/user-management-login-request.serializer.ts
|
|
3517
3415
|
const serializeUserManagementLoginRequest = (model) => ({
|
|
3518
3416
|
external_auth_id: model.externalAuthId,
|
|
3519
3417
|
user: serializeUserObject(model.user),
|
|
3520
3418
|
user_consent_options: model.userConsentOptions != null ? model.userConsentOptions.map(serializeUserConsentOption) : void 0
|
|
3521
3419
|
});
|
|
3522
|
-
|
|
3523
|
-
//#region src/connect/serializers/redirect-uri-input.serializer.ts
|
|
3420
|
+
// src/connect/serializers/redirect-uri-input.serializer.ts
|
|
3524
3421
|
const serializeRedirectUriInput = (model) => ({
|
|
3525
3422
|
uri: model.uri,
|
|
3526
3423
|
default: model.default ?? null
|
|
3527
3424
|
});
|
|
3528
|
-
|
|
3529
|
-
//#region src/connect/serializers/create-oauth-application.serializer.ts
|
|
3425
|
+
// src/connect/serializers/create-oauth-application.serializer.ts
|
|
3530
3426
|
const serializeCreateOAuthApplication = (model) => ({
|
|
3531
3427
|
name: model.name,
|
|
3532
3428
|
application_type: model.applicationType,
|
|
@@ -3537,8 +3433,7 @@ const serializeCreateOAuthApplication = (model) => ({
|
|
|
3537
3433
|
is_first_party: model.isFirstParty,
|
|
3538
3434
|
organization_id: model.organizationId ?? null
|
|
3539
3435
|
});
|
|
3540
|
-
|
|
3541
|
-
//#region src/connect/serializers/create-m2m-application.serializer.ts
|
|
3436
|
+
// src/connect/serializers/create-m2m-application.serializer.ts
|
|
3542
3437
|
const serializeCreateM2MApplication = (model) => ({
|
|
3543
3438
|
name: model.name,
|
|
3544
3439
|
application_type: model.applicationType,
|
|
@@ -3546,19 +3441,16 @@ const serializeCreateM2MApplication = (model) => ({
|
|
|
3546
3441
|
scopes: model.scopes ?? null,
|
|
3547
3442
|
organization_id: model.organizationId
|
|
3548
3443
|
});
|
|
3549
|
-
|
|
3550
|
-
//#region src/connect/serializers/update-oauth-application.serializer.ts
|
|
3444
|
+
// src/connect/serializers/update-oauth-application.serializer.ts
|
|
3551
3445
|
const serializeUpdateOAuthApplication = (model) => ({
|
|
3552
3446
|
name: model.name,
|
|
3553
3447
|
description: model.description ?? null,
|
|
3554
3448
|
scopes: model.scopes ?? null,
|
|
3555
3449
|
redirect_uris: model.redirectUris != null ? model.redirectUris.map(serializeRedirectUriInput) : null
|
|
3556
3450
|
});
|
|
3557
|
-
|
|
3558
|
-
//#region src/connect/serializers/create-application-secret.serializer.ts
|
|
3451
|
+
// src/connect/serializers/create-application-secret.serializer.ts
|
|
3559
3452
|
const serializeCreateApplicationSecret = (_model) => ({});
|
|
3560
|
-
|
|
3561
|
-
//#region src/connect/connect.ts
|
|
3453
|
+
// src/connect/connect.ts
|
|
3562
3454
|
const serializeListApplicationsOptions = (options) => {
|
|
3563
3455
|
const wire = {
|
|
3564
3456
|
limit: options.limit,
|
|
@@ -3843,8 +3735,7 @@ var Connect = class {
|
|
|
3843
3735
|
await this.workos.delete(`/connect/client_secrets/${encodeURIComponent(id)}`);
|
|
3844
3736
|
}
|
|
3845
3737
|
};
|
|
3846
|
-
|
|
3847
|
-
//#region src/directory-sync/directory-sync.ts
|
|
3738
|
+
// src/directory-sync/directory-sync.ts
|
|
3848
3739
|
const serializeListDirectoriesOptions = (options) => {
|
|
3849
3740
|
const wire = {
|
|
3850
3741
|
limit: options.limit,
|
|
@@ -4059,8 +3950,7 @@ var DirectorySync = class {
|
|
|
4059
3950
|
return deserializeDirectoryGroup(data);
|
|
4060
3951
|
}
|
|
4061
3952
|
};
|
|
4062
|
-
|
|
4063
|
-
//#region src/events/serializers/list-event-options.serializer.ts
|
|
3953
|
+
// src/events/serializers/list-event-options.serializer.ts
|
|
4064
3954
|
const serializeListEventOptions = (options) => ({
|
|
4065
3955
|
events: options.events,
|
|
4066
3956
|
organization_id: options.organizationId,
|
|
@@ -4069,8 +3959,7 @@ const serializeListEventOptions = (options) => ({
|
|
|
4069
3959
|
limit: options.limit,
|
|
4070
3960
|
after: options.after
|
|
4071
3961
|
});
|
|
4072
|
-
|
|
4073
|
-
//#region src/events/events.ts
|
|
3962
|
+
// src/events/events.ts
|
|
4074
3963
|
var Events = class {
|
|
4075
3964
|
workos;
|
|
4076
3965
|
constructor(workos) {
|
|
@@ -4090,8 +3979,7 @@ var Events = class {
|
|
|
4090
3979
|
return deserializeList(data, deserializeEvent);
|
|
4091
3980
|
}
|
|
4092
3981
|
};
|
|
4093
|
-
|
|
4094
|
-
//#region src/common/utils/encode-path-parameter.ts
|
|
3982
|
+
// src/common/utils/encode-path-parameter.ts
|
|
4095
3983
|
/**
|
|
4096
3984
|
* Encode a caller-supplied identifier for safe interpolation into a single URL
|
|
4097
3985
|
* path segment.
|
|
@@ -4127,8 +4015,7 @@ function encodePathParameter(value) {
|
|
|
4127
4015
|
if (encoded === "." || encoded === "..") throw new TypeError("Invalid path parameter: a path parameter must not be \".\" or \"..\".");
|
|
4128
4016
|
return encoded;
|
|
4129
4017
|
}
|
|
4130
|
-
|
|
4131
|
-
//#region src/organizations/organizations.ts
|
|
4018
|
+
// src/organizations/organizations.ts
|
|
4132
4019
|
var Organizations = class {
|
|
4133
4020
|
workos;
|
|
4134
4021
|
constructor(workos) {
|
|
@@ -4306,14 +4193,12 @@ var Organizations = class {
|
|
|
4306
4193
|
await this.workos.post(`/organizations/${encodePathParameter(organizationId)}/it_contacts/${encodePathParameter(contactId)}/revoke`, {});
|
|
4307
4194
|
}
|
|
4308
4195
|
};
|
|
4309
|
-
|
|
4310
|
-
//#region src/organization-domains/serializers/create-organization-domain-options.serializer.ts
|
|
4196
|
+
// src/organization-domains/serializers/create-organization-domain-options.serializer.ts
|
|
4311
4197
|
const serializeCreateOrganizationDomainOptions = (options) => ({
|
|
4312
4198
|
domain: options.domain,
|
|
4313
4199
|
organization_id: options.organizationId
|
|
4314
4200
|
});
|
|
4315
|
-
|
|
4316
|
-
//#region src/organization-domains/organization-domains.ts
|
|
4201
|
+
// src/organization-domains/organization-domains.ts
|
|
4317
4202
|
var OrganizationDomains = class {
|
|
4318
4203
|
workos;
|
|
4319
4204
|
constructor(workos) {
|
|
@@ -4379,8 +4264,7 @@ var OrganizationDomains = class {
|
|
|
4379
4264
|
await this.workos.delete(`/organization_domains/${encodePathParameter(id)}`);
|
|
4380
4265
|
}
|
|
4381
4266
|
};
|
|
4382
|
-
|
|
4383
|
-
//#region src/passwordless/serializers/passwordless-session.serializer.ts
|
|
4267
|
+
// src/passwordless/serializers/passwordless-session.serializer.ts
|
|
4384
4268
|
const deserializePasswordlessSession = (passwordlessSession) => ({
|
|
4385
4269
|
id: passwordlessSession.id,
|
|
4386
4270
|
email: passwordlessSession.email,
|
|
@@ -4388,8 +4272,7 @@ const deserializePasswordlessSession = (passwordlessSession) => ({
|
|
|
4388
4272
|
link: passwordlessSession.link,
|
|
4389
4273
|
object: passwordlessSession.object
|
|
4390
4274
|
});
|
|
4391
|
-
|
|
4392
|
-
//#region src/passwordless/passwordless.ts
|
|
4275
|
+
// src/passwordless/passwordless.ts
|
|
4393
4276
|
var Passwordless = class {
|
|
4394
4277
|
workos;
|
|
4395
4278
|
constructor(workos) {
|
|
@@ -4408,15 +4291,13 @@ var Passwordless = class {
|
|
|
4408
4291
|
return data;
|
|
4409
4292
|
}
|
|
4410
4293
|
};
|
|
4411
|
-
|
|
4412
|
-
//#region src/pipes/serializers/data-integration-credential.serializer.ts
|
|
4294
|
+
// src/pipes/serializers/data-integration-credential.serializer.ts
|
|
4413
4295
|
const deserializeDataIntegrationCredential = (response) => ({
|
|
4414
4296
|
type: response.type,
|
|
4415
4297
|
clientId: response.client_id ?? null,
|
|
4416
4298
|
redactedClientSecret: response.redacted_client_secret ?? null
|
|
4417
4299
|
});
|
|
4418
|
-
|
|
4419
|
-
//#region src/pipes/serializers/data-integration-installation.serializer.ts
|
|
4300
|
+
// src/pipes/serializers/data-integration-installation.serializer.ts
|
|
4420
4301
|
const deserializeDataIntegrationInstallation = (response) => ({
|
|
4421
4302
|
id: response.id,
|
|
4422
4303
|
connectionRole: response.connection_role,
|
|
@@ -4426,8 +4307,7 @@ const deserializeDataIntegrationInstallation = (response) => ({
|
|
|
4426
4307
|
organizationId: response.organization_id ?? null,
|
|
4427
4308
|
apiKeyLast4: response.api_key_last_4 ?? null
|
|
4428
4309
|
});
|
|
4429
|
-
|
|
4430
|
-
//#region src/pipes/serializers/data-integration-custom-provider.serializer.ts
|
|
4310
|
+
// src/pipes/serializers/data-integration-custom-provider.serializer.ts
|
|
4431
4311
|
const deserializeDataIntegrationCustomProvider = (response) => ({
|
|
4432
4312
|
name: response.name,
|
|
4433
4313
|
authorizationUrl: response.authorization_url ?? null,
|
|
@@ -4441,8 +4321,7 @@ const deserializeDataIntegrationCustomProvider = (response) => ({
|
|
|
4441
4321
|
tokenBodyContentType: response.token_body_content_type,
|
|
4442
4322
|
authenticateVia: response.authenticate_via
|
|
4443
4323
|
});
|
|
4444
|
-
|
|
4445
|
-
//#region src/pipes/serializers/data-integration.serializer.ts
|
|
4324
|
+
// src/pipes/serializers/data-integration.serializer.ts
|
|
4446
4325
|
const deserializeDataIntegration = (response) => ({
|
|
4447
4326
|
object: response.object,
|
|
4448
4327
|
id: response.id,
|
|
@@ -4462,14 +4341,12 @@ const deserializeDataIntegration = (response) => ({
|
|
|
4462
4341
|
createdAt: new Date(response.created_at),
|
|
4463
4342
|
updatedAt: new Date(response.updated_at)
|
|
4464
4343
|
});
|
|
4465
|
-
|
|
4466
|
-
//#region src/pipes/serializers/connected-account-warning.serializer.ts
|
|
4344
|
+
// src/pipes/serializers/connected-account-warning.serializer.ts
|
|
4467
4345
|
const deserializeConnectedAccountWarning = (response) => ({
|
|
4468
4346
|
code: response.code,
|
|
4469
4347
|
message: response.message
|
|
4470
4348
|
});
|
|
4471
|
-
|
|
4472
|
-
//#region src/pipes/serializers/connected-account.serializer.ts
|
|
4349
|
+
// src/pipes/serializers/connected-account.serializer.ts
|
|
4473
4350
|
const deserializeConnectedAccount = (response) => ({
|
|
4474
4351
|
object: response.object,
|
|
4475
4352
|
id: response.id,
|
|
@@ -4491,18 +4368,15 @@ const deserializeConnectedAccount = (response) => ({
|
|
|
4491
4368
|
updatedAt: new Date(response.updated_at),
|
|
4492
4369
|
warnings: response.warnings != null ? response.warnings.map(deserializeConnectedAccountWarning) : void 0
|
|
4493
4370
|
});
|
|
4494
|
-
|
|
4495
|
-
//#region src/pipes/serializers/data-integration-finish-connection-response.serializer.ts
|
|
4371
|
+
// src/pipes/serializers/data-integration-finish-connection-response.serializer.ts
|
|
4496
4372
|
const deserializeDataIntegrationFinishConnectionResponse = (response) => ({ connectedAccount: deserializeConnectedAccount(response.connected_account) });
|
|
4497
|
-
|
|
4498
|
-
//#region src/pipes/serializers/data-integration-authorize-url-response.serializer.ts
|
|
4373
|
+
// src/pipes/serializers/data-integration-authorize-url-response.serializer.ts
|
|
4499
4374
|
const deserializeDataIntegrationAuthorizeUrlResponse = (response) => ({
|
|
4500
4375
|
url: response.url,
|
|
4501
4376
|
state: response.state ?? "",
|
|
4502
4377
|
completion: response.completion
|
|
4503
4378
|
});
|
|
4504
|
-
|
|
4505
|
-
//#region src/pipes/serializers/data-integration-vended-credential.serializer.ts
|
|
4379
|
+
// src/pipes/serializers/data-integration-vended-credential.serializer.ts
|
|
4506
4380
|
const deserializeDataIntegrationVendedCredential = (response) => {
|
|
4507
4381
|
switch (response.auth_method) {
|
|
4508
4382
|
case "oauth": return {
|
|
@@ -4534,8 +4408,7 @@ const deserializeDataIntegrationVendedCredential = (response) => {
|
|
|
4534
4408
|
default: throw new Error("Unknown auth_method: " + String(response.auth_method));
|
|
4535
4409
|
}
|
|
4536
4410
|
};
|
|
4537
|
-
|
|
4538
|
-
//#region src/pipes/serializers/data-integration-credentials-response.serializer.ts
|
|
4411
|
+
// src/pipes/serializers/data-integration-credentials-response.serializer.ts
|
|
4539
4412
|
const deserializeDataIntegrationCredentialsResponse = (response) => {
|
|
4540
4413
|
switch (response.active) {
|
|
4541
4414
|
case true: return {
|
|
@@ -4549,8 +4422,7 @@ const deserializeDataIntegrationCredentialsResponse = (response) => {
|
|
|
4549
4422
|
default: throw new Error("Unknown active: " + String(response.active));
|
|
4550
4423
|
}
|
|
4551
4424
|
};
|
|
4552
|
-
|
|
4553
|
-
//#region src/pipes/serializers/data-integration-access-token-response-access-token.serializer.ts
|
|
4425
|
+
// src/pipes/serializers/data-integration-access-token-response-access-token.serializer.ts
|
|
4554
4426
|
const deserializeDataIntegrationAccessTokenResponseAccessToken = (response) => ({
|
|
4555
4427
|
object: response.object,
|
|
4556
4428
|
accessToken: response.access_token,
|
|
@@ -4558,8 +4430,7 @@ const deserializeDataIntegrationAccessTokenResponseAccessToken = (response) => (
|
|
|
4558
4430
|
scopes: response.scopes,
|
|
4559
4431
|
missingScopes: response.missing_scopes
|
|
4560
4432
|
});
|
|
4561
|
-
|
|
4562
|
-
//#region src/pipes/serializers/data-integration-access-token-response.serializer.ts
|
|
4433
|
+
// src/pipes/serializers/data-integration-access-token-response.serializer.ts
|
|
4563
4434
|
const deserializeDataIntegrationAccessTokenResponse = (response) => {
|
|
4564
4435
|
switch (response.active) {
|
|
4565
4436
|
case true: return {
|
|
@@ -4573,8 +4444,7 @@ const deserializeDataIntegrationAccessTokenResponse = (response) => {
|
|
|
4573
4444
|
default: throw new Error("Unknown active: " + String(response.active));
|
|
4574
4445
|
}
|
|
4575
4446
|
};
|
|
4576
|
-
|
|
4577
|
-
//#region src/pipes/serializers/data-integrations-list-response-data-connected-account.serializer.ts
|
|
4447
|
+
// src/pipes/serializers/data-integrations-list-response-data-connected-account.serializer.ts
|
|
4578
4448
|
const deserializeDataIntegrationsListResponseDataConnectedAccount = (response) => ({
|
|
4579
4449
|
object: response.object,
|
|
4580
4450
|
id: response.id,
|
|
@@ -4597,8 +4467,7 @@ const deserializeDataIntegrationsListResponseDataConnectedAccount = (response) =
|
|
|
4597
4467
|
warnings: response.warnings != null ? response.warnings.map(deserializeConnectedAccountWarning) : void 0,
|
|
4598
4468
|
userlandUserId: response.userland_user_id ?? null
|
|
4599
4469
|
});
|
|
4600
|
-
|
|
4601
|
-
//#region src/pipes/serializers/data-integrations-list-response-data.serializer.ts
|
|
4470
|
+
// src/pipes/serializers/data-integrations-list-response-data.serializer.ts
|
|
4602
4471
|
const deserializeDataIntegrationsListResponseData = (response) => ({
|
|
4603
4472
|
object: response.object,
|
|
4604
4473
|
id: response.id,
|
|
@@ -4616,28 +4485,24 @@ const deserializeDataIntegrationsListResponseData = (response) => ({
|
|
|
4616
4485
|
connectedAccount: response.connected_account != null ? deserializeDataIntegrationsListResponseDataConnectedAccount(response.connected_account) : null,
|
|
4617
4486
|
connectedAccounts: response.connected_accounts != null ? response.connected_accounts.map(deserializeDataIntegrationsListResponseDataConnectedAccount) : void 0
|
|
4618
4487
|
});
|
|
4619
|
-
|
|
4620
|
-
//#region src/pipes/serializers/data-integrations-list-response.serializer.ts
|
|
4488
|
+
// src/pipes/serializers/data-integrations-list-response.serializer.ts
|
|
4621
4489
|
const deserializeDataIntegrationsListResponse = (response) => ({
|
|
4622
4490
|
object: response.object,
|
|
4623
4491
|
data: response.data.map(deserializeDataIntegrationsListResponseData)
|
|
4624
4492
|
});
|
|
4625
|
-
|
|
4626
|
-
//#region src/pipes/serializers/data-integration-credentials-input.serializer.ts
|
|
4493
|
+
// src/pipes/serializers/data-integration-credentials-input.serializer.ts
|
|
4627
4494
|
const serializeDataIntegrationCredentialsInput = (model) => ({
|
|
4628
4495
|
type: model.type,
|
|
4629
4496
|
client_id: model.clientId,
|
|
4630
4497
|
client_secret: model.clientSecret
|
|
4631
4498
|
});
|
|
4632
|
-
|
|
4633
|
-
//#region src/pipes/serializers/api-key-installation.serializer.ts
|
|
4499
|
+
// src/pipes/serializers/api-key-installation.serializer.ts
|
|
4634
4500
|
const serializeApiKeyInstallation = (model) => ({
|
|
4635
4501
|
secret: model.secret,
|
|
4636
4502
|
user_id: model.userId,
|
|
4637
4503
|
organization_id: model.organizationId
|
|
4638
4504
|
});
|
|
4639
|
-
|
|
4640
|
-
//#region src/pipes/serializers/custom-provider-definition.serializer.ts
|
|
4505
|
+
// src/pipes/serializers/custom-provider-definition.serializer.ts
|
|
4641
4506
|
const serializeCustomProviderDefinition = (model) => ({
|
|
4642
4507
|
name: model.name,
|
|
4643
4508
|
authorization_url: model.authorizationUrl,
|
|
@@ -4651,8 +4516,7 @@ const serializeCustomProviderDefinition = (model) => ({
|
|
|
4651
4516
|
token_body_content_type: model.tokenBodyContentType,
|
|
4652
4517
|
authenticate_via: model.authenticateVia
|
|
4653
4518
|
});
|
|
4654
|
-
|
|
4655
|
-
//#region src/pipes/serializers/create-data-integration.serializer.ts
|
|
4519
|
+
// src/pipes/serializers/create-data-integration.serializer.ts
|
|
4656
4520
|
const serializeCreateDataIntegration = (model) => ({
|
|
4657
4521
|
provider: model.provider,
|
|
4658
4522
|
ownership: model.ownership,
|
|
@@ -4665,15 +4529,13 @@ const serializeCreateDataIntegration = (model) => ({
|
|
|
4665
4529
|
api_key: model.apiKey != null ? serializeApiKeyInstallation(model.apiKey) : void 0,
|
|
4666
4530
|
custom_provider: model.customProvider != null ? serializeCustomProviderDefinition(model.customProvider) : void 0
|
|
4667
4531
|
});
|
|
4668
|
-
|
|
4669
|
-
//#region src/pipes/serializers/data-integrations-finish-connection-request.serializer.ts
|
|
4532
|
+
// src/pipes/serializers/data-integrations-finish-connection-request.serializer.ts
|
|
4670
4533
|
const serializeDataIntegrationsFinishConnectionRequest = (model) => ({
|
|
4671
4534
|
connect_code: model.connectCode,
|
|
4672
4535
|
code_verifier: model.codeVerifier,
|
|
4673
4536
|
state: model.state
|
|
4674
4537
|
});
|
|
4675
|
-
|
|
4676
|
-
//#region src/pipes/serializers/update-custom-provider-definition.serializer.ts
|
|
4538
|
+
// src/pipes/serializers/update-custom-provider-definition.serializer.ts
|
|
4677
4539
|
const serializeUpdateCustomProviderDefinition = (model) => ({
|
|
4678
4540
|
name: model.name,
|
|
4679
4541
|
authorization_url: model.authorizationUrl,
|
|
@@ -4687,8 +4549,7 @@ const serializeUpdateCustomProviderDefinition = (model) => ({
|
|
|
4687
4549
|
token_body_content_type: model.tokenBodyContentType,
|
|
4688
4550
|
authenticate_via: model.authenticateVia
|
|
4689
4551
|
});
|
|
4690
|
-
|
|
4691
|
-
//#region src/pipes/serializers/update-data-integration.serializer.ts
|
|
4552
|
+
// src/pipes/serializers/update-data-integration.serializer.ts
|
|
4692
4553
|
const serializeUpdateDataIntegration = (model) => ({
|
|
4693
4554
|
description: model.description,
|
|
4694
4555
|
enabled: model.enabled,
|
|
@@ -4697,8 +4558,7 @@ const serializeUpdateDataIntegration = (model) => ({
|
|
|
4697
4558
|
api_key: model.apiKey != null ? serializeApiKeyInstallation(model.apiKey) : void 0,
|
|
4698
4559
|
custom_provider: model.customProvider != null ? serializeUpdateCustomProviderDefinition(model.customProvider) : void 0
|
|
4699
4560
|
});
|
|
4700
|
-
|
|
4701
|
-
//#region src/pipes/serializers/data-integrations-create-api-key-connection-request.serializer.ts
|
|
4561
|
+
// src/pipes/serializers/data-integrations-create-api-key-connection-request.serializer.ts
|
|
4702
4562
|
const serializeDataIntegrationsCreateApiKeyConnectionRequest = (model) => ({
|
|
4703
4563
|
account_display_name: model.accountDisplayName,
|
|
4704
4564
|
account_identifier: model.accountIdentifier,
|
|
@@ -4708,8 +4568,7 @@ const serializeDataIntegrationsCreateApiKeyConnectionRequest = (model) => ({
|
|
|
4708
4568
|
secret: model.secret,
|
|
4709
4569
|
connection_intent: model.connectionIntent
|
|
4710
4570
|
});
|
|
4711
|
-
|
|
4712
|
-
//#region src/pipes/serializers/data-integrations-get-data-integration-authorize-url-request.serializer.ts
|
|
4571
|
+
// src/pipes/serializers/data-integrations-get-data-integration-authorize-url-request.serializer.ts
|
|
4713
4572
|
const serializeDataIntegrationsGetDataIntegrationAuthorizeUrlRequest = (model) => ({
|
|
4714
4573
|
account_display_name: model.accountDisplayName,
|
|
4715
4574
|
user_id: model.userId,
|
|
@@ -4722,8 +4581,7 @@ const serializeDataIntegrationsGetDataIntegrationAuthorizeUrlRequest = (model) =
|
|
|
4722
4581
|
connection_intent: model.connectionIntent,
|
|
4723
4582
|
connected_account_id: model.connectedAccountId
|
|
4724
4583
|
});
|
|
4725
|
-
|
|
4726
|
-
//#region src/pipes/serializers/data-integrations-create-client-credentials-connection-request.serializer.ts
|
|
4584
|
+
// src/pipes/serializers/data-integrations-create-client-credentials-connection-request.serializer.ts
|
|
4727
4585
|
const serializeDataIntegrationsCreateClientCredentialsConnectionRequest = (model) => ({
|
|
4728
4586
|
account_display_name: model.accountDisplayName,
|
|
4729
4587
|
account_identifier: model.accountIdentifier,
|
|
@@ -4735,8 +4593,7 @@ const serializeDataIntegrationsCreateClientCredentialsConnectionRequest = (model
|
|
|
4735
4593
|
config: model.config,
|
|
4736
4594
|
connection_intent: model.connectionIntent
|
|
4737
4595
|
});
|
|
4738
|
-
|
|
4739
|
-
//#region src/pipes/serializers/data-integrations-vend-credentials-request.serializer.ts
|
|
4596
|
+
// src/pipes/serializers/data-integrations-vend-credentials-request.serializer.ts
|
|
4740
4597
|
const serializeDataIntegrationsVendCredentialsRequest = (model) => ({
|
|
4741
4598
|
user_id: model.userId,
|
|
4742
4599
|
organization_id: model.organizationId,
|
|
@@ -4744,8 +4601,7 @@ const serializeDataIntegrationsVendCredentialsRequest = (model) => ({
|
|
|
4744
4601
|
connection_owner: model.connectionOwner,
|
|
4745
4602
|
supports_multiple_connections: model.supportsMultipleConnections
|
|
4746
4603
|
});
|
|
4747
|
-
|
|
4748
|
-
//#region src/pipes/serializers/data-integrations-get-user-token-request.serializer.ts
|
|
4604
|
+
// src/pipes/serializers/data-integrations-get-user-token-request.serializer.ts
|
|
4749
4605
|
const serializeDataIntegrationsGetUserTokenRequest = (model) => ({
|
|
4750
4606
|
user_id: model.userId,
|
|
4751
4607
|
organization_id: model.organizationId,
|
|
@@ -4753,8 +4609,7 @@ const serializeDataIntegrationsGetUserTokenRequest = (model) => ({
|
|
|
4753
4609
|
connection_owner: model.connectionOwner,
|
|
4754
4610
|
supports_multiple_connections: model.supportsMultipleConnections
|
|
4755
4611
|
});
|
|
4756
|
-
|
|
4757
|
-
//#region src/pipes/serializers/create-organization-connected-account.serializer.ts
|
|
4612
|
+
// src/pipes/serializers/create-organization-connected-account.serializer.ts
|
|
4758
4613
|
const serializeCreateOrganizationConnectedAccount = (model) => ({
|
|
4759
4614
|
account_display_name: model.accountDisplayName,
|
|
4760
4615
|
account_identifier: model.accountIdentifier,
|
|
@@ -4766,8 +4621,7 @@ const serializeCreateOrganizationConnectedAccount = (model) => ({
|
|
|
4766
4621
|
user_id: model.userId,
|
|
4767
4622
|
connection_intent: model.connectionIntent
|
|
4768
4623
|
});
|
|
4769
|
-
|
|
4770
|
-
//#region src/pipes/serializers/organization-connected-account.serializer.ts
|
|
4624
|
+
// src/pipes/serializers/organization-connected-account.serializer.ts
|
|
4771
4625
|
const serializeOrganizationConnectedAccount = (model) => ({
|
|
4772
4626
|
account_display_name: model.accountDisplayName,
|
|
4773
4627
|
account_identifier: model.accountIdentifier,
|
|
@@ -4778,8 +4632,7 @@ const serializeOrganizationConnectedAccount = (model) => ({
|
|
|
4778
4632
|
state: model.state,
|
|
4779
4633
|
user_id: model.userId
|
|
4780
4634
|
});
|
|
4781
|
-
|
|
4782
|
-
//#region src/pipes/serializers/create-connected-account.serializer.ts
|
|
4635
|
+
// src/pipes/serializers/create-connected-account.serializer.ts
|
|
4783
4636
|
const serializeCreateConnectedAccount = (model) => ({
|
|
4784
4637
|
account_display_name: model.accountDisplayName,
|
|
4785
4638
|
account_identifier: model.accountIdentifier,
|
|
@@ -4790,8 +4643,7 @@ const serializeCreateConnectedAccount = (model) => ({
|
|
|
4790
4643
|
state: model.state,
|
|
4791
4644
|
connection_intent: model.connectionIntent
|
|
4792
4645
|
});
|
|
4793
|
-
|
|
4794
|
-
//#region src/pipes/serializers/connected-account-input.serializer.ts
|
|
4646
|
+
// src/pipes/serializers/connected-account-input.serializer.ts
|
|
4795
4647
|
const serializeConnectedAccountInput = (model) => ({
|
|
4796
4648
|
account_display_name: model.accountDisplayName,
|
|
4797
4649
|
account_identifier: model.accountIdentifier,
|
|
@@ -4801,8 +4653,7 @@ const serializeConnectedAccountInput = (model) => ({
|
|
|
4801
4653
|
scopes: model.scopes,
|
|
4802
4654
|
state: model.state
|
|
4803
4655
|
});
|
|
4804
|
-
|
|
4805
|
-
//#region src/pipes/serializers/data-integrations-upsert-api-key-request.serializer.ts
|
|
4656
|
+
// src/pipes/serializers/data-integrations-upsert-api-key-request.serializer.ts
|
|
4806
4657
|
const serializeDataIntegrationsUpsertApiKeyRequest = (model) => ({
|
|
4807
4658
|
account_display_name: model.accountDisplayName,
|
|
4808
4659
|
account_identifier: model.accountIdentifier,
|
|
@@ -4813,8 +4664,7 @@ const serializeDataIntegrationsUpsertApiKeyRequest = (model) => ({
|
|
|
4813
4664
|
connection_owner: model.connectionOwner,
|
|
4814
4665
|
secret: model.secret
|
|
4815
4666
|
});
|
|
4816
|
-
|
|
4817
|
-
//#region src/pipes/serializers/data-integrations-upsert-client-credentials-request.serializer.ts
|
|
4667
|
+
// src/pipes/serializers/data-integrations-upsert-client-credentials-request.serializer.ts
|
|
4818
4668
|
const serializeDataIntegrationsUpsertClientCredentialsRequest = (model) => ({
|
|
4819
4669
|
account_display_name: model.accountDisplayName,
|
|
4820
4670
|
account_identifier: model.accountIdentifier,
|
|
@@ -4827,8 +4677,7 @@ const serializeDataIntegrationsUpsertClientCredentialsRequest = (model) => ({
|
|
|
4827
4677
|
client_secret: model.clientSecret,
|
|
4828
4678
|
config: model.config
|
|
4829
4679
|
});
|
|
4830
|
-
|
|
4831
|
-
//#region src/pipes/pipes.ts
|
|
4680
|
+
// src/pipes/pipes.ts
|
|
4832
4681
|
var Pipes = class {
|
|
4833
4682
|
workos;
|
|
4834
4683
|
constructor(workos) {
|
|
@@ -5564,8 +5413,7 @@ var Pipes = class {
|
|
|
5564
5413
|
return deserializeDataIntegrationsListResponse(data);
|
|
5565
5414
|
}
|
|
5566
5415
|
};
|
|
5567
|
-
|
|
5568
|
-
//#region src/radar/serializers/radar-standalone-response.serializer.ts
|
|
5416
|
+
// src/radar/serializers/radar-standalone-response.serializer.ts
|
|
5569
5417
|
const deserializeRadarStandaloneResponse = (response) => ({
|
|
5570
5418
|
verdict: response.verdict,
|
|
5571
5419
|
reason: response.reason,
|
|
@@ -5573,11 +5421,9 @@ const deserializeRadarStandaloneResponse = (response) => ({
|
|
|
5573
5421
|
control: response.control,
|
|
5574
5422
|
blocklistType: response.blocklist_type
|
|
5575
5423
|
});
|
|
5576
|
-
|
|
5577
|
-
//#region src/radar/serializers/radar-list-entry-already-present-response.serializer.ts
|
|
5424
|
+
// src/radar/serializers/radar-list-entry-already-present-response.serializer.ts
|
|
5578
5425
|
const deserializeRadarListEntryAlreadyPresentResponse = (response) => ({ message: response.message });
|
|
5579
|
-
|
|
5580
|
-
//#region src/radar/serializers/radar-standalone-assess-request.serializer.ts
|
|
5426
|
+
// src/radar/serializers/radar-standalone-assess-request.serializer.ts
|
|
5581
5427
|
const serializeRadarStandaloneAssessRequest = (model) => ({
|
|
5582
5428
|
ip_address: model.ipAddress,
|
|
5583
5429
|
user_agent: model.userAgent,
|
|
@@ -5585,20 +5431,16 @@ const serializeRadarStandaloneAssessRequest = (model) => ({
|
|
|
5585
5431
|
auth_method: model.authMethod,
|
|
5586
5432
|
action: model.action
|
|
5587
5433
|
});
|
|
5588
|
-
|
|
5589
|
-
//#region src/radar/serializers/radar-standalone-update-radar-attempt-request.serializer.ts
|
|
5434
|
+
// src/radar/serializers/radar-standalone-update-radar-attempt-request.serializer.ts
|
|
5590
5435
|
const serializeRadarStandaloneUpdateRadarAttemptRequest = (model) => ({
|
|
5591
5436
|
challenge_status: model.challengeStatus,
|
|
5592
5437
|
attempt_status: model.attemptStatus
|
|
5593
5438
|
});
|
|
5594
|
-
|
|
5595
|
-
//#region src/radar/serializers/radar-standalone-update-radar-list-request.serializer.ts
|
|
5439
|
+
// src/radar/serializers/radar-standalone-update-radar-list-request.serializer.ts
|
|
5596
5440
|
const serializeRadarStandaloneUpdateRadarListRequest = (model) => ({ entry: model.entry });
|
|
5597
|
-
|
|
5598
|
-
//#region src/radar/serializers/radar-standalone-delete-radar-list-entry-request.serializer.ts
|
|
5441
|
+
// src/radar/serializers/radar-standalone-delete-radar-list-entry-request.serializer.ts
|
|
5599
5442
|
const serializeRadarStandaloneDeleteRadarListEntryRequest = (model) => ({ entry: model.entry });
|
|
5600
|
-
|
|
5601
|
-
//#region src/radar/radar.ts
|
|
5443
|
+
// src/radar/radar.ts
|
|
5602
5444
|
var Radar = class {
|
|
5603
5445
|
workos;
|
|
5604
5446
|
constructor(workos) {
|
|
@@ -5686,8 +5528,7 @@ var Radar = class {
|
|
|
5686
5528
|
await this.workos.deleteWithBody(`/radar/lists/${encodeURIComponent(type)}/${encodeURIComponent(action)}`, serializeRadarStandaloneDeleteRadarListEntryRequest(payload));
|
|
5687
5529
|
}
|
|
5688
5530
|
};
|
|
5689
|
-
|
|
5690
|
-
//#region src/admin-portal/admin-portal.ts
|
|
5531
|
+
// src/admin-portal/admin-portal.ts
|
|
5691
5532
|
var AdminPortal = class {
|
|
5692
5533
|
workos;
|
|
5693
5534
|
constructor(workos) {
|
|
@@ -5742,8 +5583,7 @@ var AdminPortal = class {
|
|
|
5742
5583
|
});
|
|
5743
5584
|
}
|
|
5744
5585
|
};
|
|
5745
|
-
|
|
5746
|
-
//#region src/common/utils/query-string.ts
|
|
5586
|
+
// src/common/utils/query-string.ts
|
|
5747
5587
|
/**
|
|
5748
5588
|
* Converts options to a query string.
|
|
5749
5589
|
* - Arrays: scope=read&scope=write (repeat format)
|
|
@@ -5773,8 +5613,7 @@ function toQueryString(options) {
|
|
|
5773
5613
|
function encodeRFC1738(str) {
|
|
5774
5614
|
return encodeURIComponent(str).replace(/%20/g, "+").replace(/[!'*]/g, (c) => "%" + c.charCodeAt(0).toString(16).toUpperCase());
|
|
5775
5615
|
}
|
|
5776
|
-
|
|
5777
|
-
//#region src/sso/sso.ts
|
|
5616
|
+
// src/sso/sso.ts
|
|
5778
5617
|
var SSO = class {
|
|
5779
5618
|
workos;
|
|
5780
5619
|
constructor(workos) {
|
|
@@ -5935,9 +5774,21 @@ var SSO = class {
|
|
|
5935
5774
|
const { data } = await this.workos.get("/sso/profile", { accessToken });
|
|
5936
5775
|
return deserializeProfile(data);
|
|
5937
5776
|
}
|
|
5777
|
+
/**
|
|
5778
|
+
* Logout Authorize
|
|
5779
|
+
*
|
|
5780
|
+
* Generate a logout token and URL for RP-initiated Single Logout. Redirect the user to `logoutUrl` to sign them out of the identity provider.
|
|
5781
|
+
* @param options - The profile to log out.
|
|
5782
|
+
* @returns {Promise<AuthorizeLogout>}
|
|
5783
|
+
* @throws {BadRequestException} 400
|
|
5784
|
+
* @throws {NotFoundException} 404
|
|
5785
|
+
*/
|
|
5786
|
+
async authorizeLogout(options) {
|
|
5787
|
+
const { data } = await this.workos.post("/sso/logout/authorize", serializeAuthorizeLogoutOptions(options));
|
|
5788
|
+
return deserializeAuthorizeLogout(data);
|
|
5789
|
+
}
|
|
5938
5790
|
};
|
|
5939
|
-
|
|
5940
|
-
//#region src/multi-factor-auth/serializers/challenge.serializer.ts
|
|
5791
|
+
// src/multi-factor-auth/serializers/challenge.serializer.ts
|
|
5941
5792
|
const deserializeChallenge = (challenge) => ({
|
|
5942
5793
|
object: challenge.object,
|
|
5943
5794
|
id: challenge.id,
|
|
@@ -5947,8 +5798,7 @@ const deserializeChallenge = (challenge) => ({
|
|
|
5947
5798
|
code: challenge.code,
|
|
5948
5799
|
authenticationFactorId: challenge.authentication_factor_id
|
|
5949
5800
|
});
|
|
5950
|
-
|
|
5951
|
-
//#region src/multi-factor-auth/serializers/factor.serializer.ts
|
|
5801
|
+
// src/multi-factor-auth/serializers/factor.serializer.ts
|
|
5952
5802
|
const deserializeFactor = (factor) => ({
|
|
5953
5803
|
object: factor.object,
|
|
5954
5804
|
id: factor.id,
|
|
@@ -5967,14 +5817,12 @@ const deserializeFactorWithSecrets = (factor) => ({
|
|
|
5967
5817
|
...factor.sms ? { sms: deserializeSms(factor.sms) } : {},
|
|
5968
5818
|
...factor.totp ? { totp: deserializeTotpWithSecrets(factor.totp) } : {}
|
|
5969
5819
|
});
|
|
5970
|
-
|
|
5971
|
-
//#region src/multi-factor-auth/serializers/verify-response.serializer.ts
|
|
5820
|
+
// src/multi-factor-auth/serializers/verify-response.serializer.ts
|
|
5972
5821
|
const deserializeVerifyResponse = (verifyResponse) => ({
|
|
5973
5822
|
challenge: deserializeChallenge(verifyResponse.challenge),
|
|
5974
5823
|
valid: verifyResponse.valid
|
|
5975
5824
|
});
|
|
5976
|
-
|
|
5977
|
-
//#region src/multi-factor-auth/multi-factor-auth.ts
|
|
5825
|
+
// src/multi-factor-auth/multi-factor-auth.ts
|
|
5978
5826
|
var MultiFactorAuth = class {
|
|
5979
5827
|
workos;
|
|
5980
5828
|
constructor(workos) {
|
|
@@ -6090,8 +5938,7 @@ var MultiFactorAuth = class {
|
|
|
6090
5938
|
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
5939
|
}
|
|
6092
5940
|
};
|
|
6093
|
-
|
|
6094
|
-
//#region src/audit-logs/serializers/audit-log-export.serializer.ts
|
|
5941
|
+
// src/audit-logs/serializers/audit-log-export.serializer.ts
|
|
6095
5942
|
const deserializeAuditLogExport = (auditLogExport) => ({
|
|
6096
5943
|
object: auditLogExport.object,
|
|
6097
5944
|
id: auditLogExport.id,
|
|
@@ -6100,8 +5947,7 @@ const deserializeAuditLogExport = (auditLogExport) => ({
|
|
|
6100
5947
|
createdAt: new Date(auditLogExport.created_at),
|
|
6101
5948
|
updatedAt: new Date(auditLogExport.updated_at)
|
|
6102
5949
|
});
|
|
6103
|
-
|
|
6104
|
-
//#region src/audit-logs/serializers/audit-log-export-options.serializer.ts
|
|
5950
|
+
// src/audit-logs/serializers/audit-log-export-options.serializer.ts
|
|
6105
5951
|
const serializeAuditLogExportOptions = (options) => ({
|
|
6106
5952
|
actions: options.actions,
|
|
6107
5953
|
actor_names: options.actorNames,
|
|
@@ -6111,8 +5957,7 @@ const serializeAuditLogExportOptions = (options) => ({
|
|
|
6111
5957
|
range_start: options.rangeStart.toISOString(),
|
|
6112
5958
|
targets: options.targets
|
|
6113
5959
|
});
|
|
6114
|
-
|
|
6115
|
-
//#region src/audit-logs/serializers/create-audit-log-event-options.serializer.ts
|
|
5960
|
+
// src/audit-logs/serializers/create-audit-log-event-options.serializer.ts
|
|
6116
5961
|
const serializeCreateAuditLogEventOptions = (event) => ({
|
|
6117
5962
|
action: event.action,
|
|
6118
5963
|
version: event.version,
|
|
@@ -6125,8 +5970,7 @@ const serializeCreateAuditLogEventOptions = (event) => ({
|
|
|
6125
5970
|
},
|
|
6126
5971
|
metadata: event.metadata
|
|
6127
5972
|
});
|
|
6128
|
-
|
|
6129
|
-
//#region src/audit-logs/serializers/create-audit-log-schema-options.serializer.ts
|
|
5973
|
+
// src/audit-logs/serializers/create-audit-log-schema-options.serializer.ts
|
|
6130
5974
|
function serializeMetadata(metadata) {
|
|
6131
5975
|
if (!metadata) return {};
|
|
6132
5976
|
const serializedMetadata = {};
|
|
@@ -6154,8 +5998,7 @@ const serializeCreateAuditLogSchemaOptions = (schema) => ({
|
|
|
6154
5998
|
properties: serializeMetadata(schema.metadata)
|
|
6155
5999
|
} : void 0
|
|
6156
6000
|
});
|
|
6157
|
-
|
|
6158
|
-
//#region src/audit-logs/serializers/create-audit-log-schema.serializer.ts
|
|
6001
|
+
// src/audit-logs/serializers/create-audit-log-schema.serializer.ts
|
|
6159
6002
|
function deserializeMetadata(metadata) {
|
|
6160
6003
|
if (!metadata || !metadata.properties) return {};
|
|
6161
6004
|
const deserializedMetadata = {};
|
|
@@ -6175,14 +6018,11 @@ const deserializeAuditLogSchema = (auditLogSchema) => ({
|
|
|
6175
6018
|
metadata: auditLogSchema.metadata ? deserializeMetadata(auditLogSchema.metadata) : void 0,
|
|
6176
6019
|
createdAt: new Date(auditLogSchema.created_at)
|
|
6177
6020
|
});
|
|
6178
|
-
|
|
6179
|
-
//#region src/audit-logs/serializers/audit-logs-retention.serializer.ts
|
|
6021
|
+
// src/audit-logs/serializers/audit-logs-retention.serializer.ts
|
|
6180
6022
|
const deserializeAuditLogsRetention = (response) => ({ retentionPeriodInDays: response.retention_period_in_days ?? null });
|
|
6181
|
-
|
|
6182
|
-
//#region src/audit-logs/serializers/update-audit-logs-retention.serializer.ts
|
|
6023
|
+
// src/audit-logs/serializers/update-audit-logs-retention.serializer.ts
|
|
6183
6024
|
const serializeUpdateAuditLogsRetention = (model) => ({ retention_period: model.retentionPeriod });
|
|
6184
|
-
|
|
6185
|
-
//#region src/audit-logs/audit-logs.ts
|
|
6025
|
+
// src/audit-logs/audit-logs.ts
|
|
6186
6026
|
var AuditLogs = class {
|
|
6187
6027
|
workos;
|
|
6188
6028
|
constructor(workos) {
|
|
@@ -6293,8 +6133,7 @@ var AuditLogs = class {
|
|
|
6293
6133
|
return new AutoPaginatable(await fetchAndDeserialize(this.workos, endpoint, deserializeAuditLogSchema, options), (params) => fetchAndDeserialize(this.workos, endpoint, deserializeAuditLogSchema, params), options);
|
|
6294
6134
|
}
|
|
6295
6135
|
};
|
|
6296
|
-
|
|
6297
|
-
//#region node_modules/uint8array-extras/index.js
|
|
6136
|
+
// node_modules/uint8array-extras/index.js
|
|
6298
6137
|
const objectToString = Object.prototype.toString;
|
|
6299
6138
|
const uint8ArrayStringified = "[object Uint8Array]";
|
|
6300
6139
|
function isType(value, typeConstructor, typeStringified) {
|
|
@@ -6342,8 +6181,7 @@ function uint8ArrayToHex(array) {
|
|
|
6342
6181
|
for (let index = 0; index < array.length; index++) hexString += byteToHexLookupTable[array[index]];
|
|
6343
6182
|
return hexString;
|
|
6344
6183
|
}
|
|
6345
|
-
|
|
6346
|
-
//#region node_modules/iron-webcrypto/index.js
|
|
6184
|
+
// node_modules/iron-webcrypto/index.js
|
|
6347
6185
|
function losslessJsonStringify(data) {
|
|
6348
6186
|
try {
|
|
6349
6187
|
if (isJson(data)) {
|
|
@@ -6555,8 +6393,7 @@ async function unseal(sealed, password, options) {
|
|
|
6555
6393
|
}, b64ToU8(encryptedB64));
|
|
6556
6394
|
return (options.decode || jsonParse)(decryptedString);
|
|
6557
6395
|
}
|
|
6558
|
-
|
|
6559
|
-
//#region src/common/crypto/seal.ts
|
|
6396
|
+
// src/common/crypto/seal.ts
|
|
6560
6397
|
const VERSION_DELIMITER = "~";
|
|
6561
6398
|
const CURRENT_MAJOR_VERSION = 2;
|
|
6562
6399
|
function parseSeal(seal) {
|
|
@@ -6593,8 +6430,7 @@ async function unsealData(encryptedData, { password }) {
|
|
|
6593
6430
|
else if (tokenVersion !== null) return data.persistent ?? data;
|
|
6594
6431
|
return data;
|
|
6595
6432
|
}
|
|
6596
|
-
|
|
6597
|
-
//#region src/user-management/serializers/session-cookie-data.serializer.ts
|
|
6433
|
+
// src/user-management/serializers/session-cookie-data.serializer.ts
|
|
6598
6434
|
const toDate = (value) => value instanceof Date ? value : new Date(value);
|
|
6599
6435
|
const deserializeSessionCookieData = (data) => {
|
|
6600
6436
|
if (!data.user) return data;
|
|
@@ -6608,8 +6444,7 @@ const deserializeSessionCookieData = (data) => {
|
|
|
6608
6444
|
}
|
|
6609
6445
|
};
|
|
6610
6446
|
};
|
|
6611
|
-
|
|
6612
|
-
//#region src/common/utils/env.ts
|
|
6447
|
+
// src/common/utils/env.ts
|
|
6613
6448
|
let detectedRuntime = null;
|
|
6614
6449
|
/**
|
|
6615
6450
|
* Detect the current runtime environment.
|
|
@@ -6655,19 +6490,16 @@ function getEnvironmentVariable(key) {
|
|
|
6655
6490
|
function getEnv(key, defaultValue) {
|
|
6656
6491
|
return getEnvironmentVariable(key) ?? defaultValue;
|
|
6657
6492
|
}
|
|
6658
|
-
|
|
6659
|
-
//#region src/user-management/interfaces/authenticate-with-session-cookie.interface.ts
|
|
6493
|
+
// src/user-management/interfaces/authenticate-with-session-cookie.interface.ts
|
|
6660
6494
|
let AuthenticateWithSessionCookieFailureReason = /* @__PURE__ */ function(AuthenticateWithSessionCookieFailureReason) {
|
|
6661
6495
|
AuthenticateWithSessionCookieFailureReason["INVALID_JWT"] = "invalid_jwt";
|
|
6662
6496
|
AuthenticateWithSessionCookieFailureReason["INVALID_SESSION_COOKIE"] = "invalid_session_cookie";
|
|
6663
6497
|
AuthenticateWithSessionCookieFailureReason["NO_SESSION_COOKIE_PROVIDED"] = "no_session_cookie_provided";
|
|
6664
6498
|
return AuthenticateWithSessionCookieFailureReason;
|
|
6665
6499
|
}({});
|
|
6666
|
-
|
|
6667
|
-
//#region src/user-management/interfaces/revoke-session-options.interface.ts
|
|
6500
|
+
// src/user-management/interfaces/revoke-session-options.interface.ts
|
|
6668
6501
|
const serializeRevokeSessionOptions = (options) => ({ session_id: options.sessionId });
|
|
6669
|
-
|
|
6670
|
-
//#region src/user-management/serializers/authenticate-with-email-verification.serializer.ts
|
|
6502
|
+
// src/user-management/serializers/authenticate-with-email-verification.serializer.ts
|
|
6671
6503
|
const serializeAuthenticateWithEmailVerificationOptions = (options) => ({
|
|
6672
6504
|
grant_type: "urn:workos:oauth:grant-type:email-verification:code",
|
|
6673
6505
|
client_id: options.clientId,
|
|
@@ -6677,8 +6509,7 @@ const serializeAuthenticateWithEmailVerificationOptions = (options) => ({
|
|
|
6677
6509
|
ip_address: options.ipAddress,
|
|
6678
6510
|
user_agent: options.userAgent
|
|
6679
6511
|
});
|
|
6680
|
-
|
|
6681
|
-
//#region src/user-management/serializers/authenticate-with-organization-selection-options.serializer.ts
|
|
6512
|
+
// src/user-management/serializers/authenticate-with-organization-selection-options.serializer.ts
|
|
6682
6513
|
const serializeAuthenticateWithOrganizationSelectionOptions = (options) => ({
|
|
6683
6514
|
grant_type: "urn:workos:oauth:grant-type:organization-selection",
|
|
6684
6515
|
client_id: options.clientId,
|
|
@@ -6688,16 +6519,14 @@ const serializeAuthenticateWithOrganizationSelectionOptions = (options) => ({
|
|
|
6688
6519
|
ip_address: options.ipAddress,
|
|
6689
6520
|
user_agent: options.userAgent
|
|
6690
6521
|
});
|
|
6691
|
-
|
|
6692
|
-
//#region src/user-management/serializers/create-organization-membership-options.serializer.ts
|
|
6522
|
+
// src/user-management/serializers/create-organization-membership-options.serializer.ts
|
|
6693
6523
|
const serializeCreateOrganizationMembershipOptions = (options) => ({
|
|
6694
6524
|
organization_id: options.organizationId,
|
|
6695
6525
|
user_id: options.userId,
|
|
6696
6526
|
role_slug: options.roleSlug,
|
|
6697
6527
|
role_slugs: options.roleSlugs
|
|
6698
6528
|
});
|
|
6699
|
-
|
|
6700
|
-
//#region src/user-management/serializers/identity.serializer.ts
|
|
6529
|
+
// src/user-management/serializers/identity.serializer.ts
|
|
6701
6530
|
const normalizeProvider = (provider) => {
|
|
6702
6531
|
if (provider === "GithubOAuth") return "GitHubOAuth";
|
|
6703
6532
|
return provider;
|
|
@@ -6711,8 +6540,7 @@ const deserializeIdentities = (identities) => {
|
|
|
6711
6540
|
};
|
|
6712
6541
|
});
|
|
6713
6542
|
};
|
|
6714
|
-
|
|
6715
|
-
//#region src/user-management/serializers/list-invitations-options.serializer.ts
|
|
6543
|
+
// src/user-management/serializers/list-invitations-options.serializer.ts
|
|
6716
6544
|
const serializeListInvitationsOptions = (options) => ({
|
|
6717
6545
|
email: options.email,
|
|
6718
6546
|
organization_id: options.organizationId,
|
|
@@ -6721,8 +6549,7 @@ const serializeListInvitationsOptions = (options) => ({
|
|
|
6721
6549
|
after: options.after,
|
|
6722
6550
|
order: options.order
|
|
6723
6551
|
});
|
|
6724
|
-
|
|
6725
|
-
//#region src/user-management/serializers/list-organization-memberships-options.serializer.ts
|
|
6552
|
+
// src/user-management/serializers/list-organization-memberships-options.serializer.ts
|
|
6726
6553
|
const serializeListOrganizationMembershipsOptions = (options) => ({
|
|
6727
6554
|
user_id: options.userId,
|
|
6728
6555
|
organization_id: options.organizationId,
|
|
@@ -6732,8 +6559,7 @@ const serializeListOrganizationMembershipsOptions = (options) => ({
|
|
|
6732
6559
|
after: options.after,
|
|
6733
6560
|
order: options.order
|
|
6734
6561
|
});
|
|
6735
|
-
|
|
6736
|
-
//#region src/user-management/serializers/list-users-options.serializer.ts
|
|
6562
|
+
// src/user-management/serializers/list-users-options.serializer.ts
|
|
6737
6563
|
const serializeListUsersOptions = (options) => ({
|
|
6738
6564
|
email: options.email,
|
|
6739
6565
|
organization_id: options.organizationId,
|
|
@@ -6742,11 +6568,9 @@ const serializeListUsersOptions = (options) => ({
|
|
|
6742
6568
|
after: options.after,
|
|
6743
6569
|
order: options.order
|
|
6744
6570
|
});
|
|
6745
|
-
|
|
6746
|
-
//#region src/user-management/serializers/resend-invitation-options.serializer.ts
|
|
6571
|
+
// src/user-management/serializers/resend-invitation-options.serializer.ts
|
|
6747
6572
|
const serializeResendInvitationOptions = (options) => ({ locale: options.locale });
|
|
6748
|
-
|
|
6749
|
-
//#region src/user-management/interfaces/refresh-and-seal-session-data.interface.ts
|
|
6573
|
+
// src/user-management/interfaces/refresh-and-seal-session-data.interface.ts
|
|
6750
6574
|
let RefreshSessionFailureReason = /* @__PURE__ */ function(RefreshSessionFailureReason) {
|
|
6751
6575
|
RefreshSessionFailureReason["INVALID_SESSION_COOKIE"] = "invalid_session_cookie";
|
|
6752
6576
|
RefreshSessionFailureReason["NO_SESSION_COOKIE_PROVIDED"] = "no_session_cookie_provided";
|
|
@@ -6759,8 +6583,7 @@ let RefreshSessionFailureReason = /* @__PURE__ */ function(RefreshSessionFailure
|
|
|
6759
6583
|
RefreshSessionFailureReason["NETWORK_ERROR"] = "network_error";
|
|
6760
6584
|
return RefreshSessionFailureReason;
|
|
6761
6585
|
}({});
|
|
6762
|
-
|
|
6763
|
-
//#region src/user-management/serializers/send-invitation-options.serializer.ts
|
|
6586
|
+
// src/user-management/serializers/send-invitation-options.serializer.ts
|
|
6764
6587
|
const serializeSendInvitationOptions = (options) => ({
|
|
6765
6588
|
email: options.email,
|
|
6766
6589
|
organization_id: options.organizationId,
|
|
@@ -6769,21 +6592,18 @@ const serializeSendInvitationOptions = (options) => ({
|
|
|
6769
6592
|
role_slug: options.roleSlug,
|
|
6770
6593
|
locale: options.locale
|
|
6771
6594
|
});
|
|
6772
|
-
|
|
6773
|
-
//#region src/user-management/serializers/update-organization-membership-options.serializer.ts
|
|
6595
|
+
// src/user-management/serializers/update-organization-membership-options.serializer.ts
|
|
6774
6596
|
const serializeUpdateOrganizationMembershipOptions = (options) => ({
|
|
6775
6597
|
role_slug: options.roleSlug,
|
|
6776
6598
|
role_slugs: options.roleSlugs
|
|
6777
6599
|
});
|
|
6778
|
-
|
|
6779
|
-
//#region src/user-management/serializers/create-waitlist-entry-options.serializer.ts
|
|
6600
|
+
// src/user-management/serializers/create-waitlist-entry-options.serializer.ts
|
|
6780
6601
|
const serializeCreateWaitlistEntryOptions = (options) => ({
|
|
6781
6602
|
email: options.email,
|
|
6782
6603
|
additional_fields: options.additionalFields,
|
|
6783
6604
|
send_confirmation_email: options.sendConfirmationEmail
|
|
6784
6605
|
});
|
|
6785
|
-
|
|
6786
|
-
//#region src/user-management/serializers/list-waitlist-entries-options.serializer.ts
|
|
6606
|
+
// src/user-management/serializers/list-waitlist-entries-options.serializer.ts
|
|
6787
6607
|
const serializeListWaitlistEntriesOptions = (options) => ({
|
|
6788
6608
|
state: options.state,
|
|
6789
6609
|
email: options.email,
|
|
@@ -6792,8 +6612,7 @@ const serializeListWaitlistEntriesOptions = (options) => ({
|
|
|
6792
6612
|
after: options.after,
|
|
6793
6613
|
order: options.order
|
|
6794
6614
|
});
|
|
6795
|
-
|
|
6796
|
-
//#region src/user-management/session.ts
|
|
6615
|
+
// src/user-management/session.ts
|
|
6797
6616
|
var CookieSession = class {
|
|
6798
6617
|
userManagement;
|
|
6799
6618
|
cookiePassword;
|
|
@@ -6975,8 +6794,7 @@ function getErrorStatus(error) {
|
|
|
6975
6794
|
function isNetworkError(error) {
|
|
6976
6795
|
return error instanceof TypeError || error instanceof Error && error.cause instanceof TypeError;
|
|
6977
6796
|
}
|
|
6978
|
-
|
|
6979
|
-
//#region src/user-management/user-management.ts
|
|
6797
|
+
// src/user-management/user-management.ts
|
|
6980
6798
|
var UserManagement = class UserManagement {
|
|
6981
6799
|
workos;
|
|
6982
6800
|
_jwks;
|
|
@@ -7329,23 +7147,16 @@ var UserManagement = class UserManagement {
|
|
|
7329
7147
|
const { jwtVerify } = await getJose();
|
|
7330
7148
|
if (!jwks) throw new Error("Must provide clientId to initialize JWKS");
|
|
7331
7149
|
try {
|
|
7332
|
-
const { payload } = await jwtVerify(accessToken, jwks,
|
|
7150
|
+
const { payload } = await jwtVerify(accessToken, jwks, {
|
|
7151
|
+
algorithms: ALLOWED_JWT_ALGORITHMS,
|
|
7152
|
+
...this.issuer ? { issuer: this.issuer } : {}
|
|
7153
|
+
});
|
|
7333
7154
|
return payload;
|
|
7334
7155
|
} catch (e) {
|
|
7335
|
-
if (
|
|
7156
|
+
if (isJwtValidationError(e)) return null;
|
|
7336
7157
|
throw e;
|
|
7337
7158
|
}
|
|
7338
7159
|
}
|
|
7339
|
-
/**
|
|
7340
|
-
* Whether a jose error means the presented token is invalid, as opposed to
|
|
7341
|
-
* a failure to verify it at all. Network errors, JWKS timeouts and crypto
|
|
7342
|
-
* failures propagate so they surface as errors rather than as rejected
|
|
7343
|
-
* tokens.
|
|
7344
|
-
*/
|
|
7345
|
-
static isJwtValidationError(e) {
|
|
7346
|
-
if (!(e instanceof Error) || !("code" in e) || typeof e.code !== "string") return false;
|
|
7347
|
-
return e.code.startsWith("ERR_JWT_") || e.code.startsWith("ERR_JWS_") || e.code === "ERR_JWKS_NO_MATCHING_KEY" || e.code === "ERR_JWKS_MULTIPLE_MATCHING_KEYS" || e.code === "ERR_JOSE_NOT_SUPPORTED" || e.code === "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
7348
|
-
}
|
|
7349
7160
|
async prepareAuthenticationResponse({ authenticationResponse, session }) {
|
|
7350
7161
|
if (session?.sealSession) {
|
|
7351
7162
|
if (!this.workos.key) throw new Error("Session sealing requires server-side usage with an API key. Public clients should store tokens directly (e.g., secure storage on mobile, keychain on desktop).");
|
|
@@ -7985,8 +7796,7 @@ var UserManagement = class UserManagement {
|
|
|
7985
7796
|
return `${this.workos.baseURL}/sso/jwks/${clientId}`;
|
|
7986
7797
|
}
|
|
7987
7798
|
};
|
|
7988
|
-
|
|
7989
|
-
//#region src/feature-flags/create-rule-with-targets-error.ts
|
|
7799
|
+
// src/feature-flags/create-rule-with-targets-error.ts
|
|
7990
7800
|
/** A rule was created, but adding one of its targets failed. */
|
|
7991
7801
|
var CreateRuleWithTargetsError = class extends Error {
|
|
7992
7802
|
rule;
|
|
@@ -8000,8 +7810,7 @@ var CreateRuleWithTargetsError = class extends Error {
|
|
|
8000
7810
|
this.failedTargetId = failedTargetId;
|
|
8001
7811
|
}
|
|
8002
7812
|
};
|
|
8003
|
-
|
|
8004
|
-
//#region src/feature-flags/event-emitter.ts
|
|
7813
|
+
// src/feature-flags/event-emitter.ts
|
|
8005
7814
|
/**
|
|
8006
7815
|
* Minimal, runtime-agnostic, typed event emitter.
|
|
8007
7816
|
*
|
|
@@ -8075,8 +7884,7 @@ var EventEmitter = class {
|
|
|
8075
7884
|
else this.handlers.delete(event);
|
|
8076
7885
|
}
|
|
8077
7886
|
};
|
|
8078
|
-
|
|
8079
|
-
//#region src/feature-flags/in-memory-store.ts
|
|
7887
|
+
// src/feature-flags/in-memory-store.ts
|
|
8080
7888
|
var InMemoryStore = class {
|
|
8081
7889
|
flags = {};
|
|
8082
7890
|
swap(newFlags) {
|
|
@@ -8092,8 +7900,7 @@ var InMemoryStore = class {
|
|
|
8092
7900
|
return Object.keys(this.flags).length;
|
|
8093
7901
|
}
|
|
8094
7902
|
};
|
|
8095
|
-
|
|
8096
|
-
//#region src/feature-flags/evaluator.ts
|
|
7903
|
+
// src/feature-flags/evaluator.ts
|
|
8097
7904
|
const TARGET_TYPE_PATTERN = /^[a-z][a-z0-9_-]{0,63}$/;
|
|
8098
7905
|
const TARGET_ID_PATTERN = /^[A-Za-z0-9._:-]{1,255}$/;
|
|
8099
7906
|
const LEGACY_KEY_TO_TARGET_TYPE = /* @__PURE__ */ new Map([["userId", "user"], ["organizationId", "organization"]]);
|
|
@@ -8182,8 +7989,7 @@ var Evaluator = class {
|
|
|
8182
7989
|
return normalized;
|
|
8183
7990
|
}
|
|
8184
7991
|
};
|
|
8185
|
-
|
|
8186
|
-
//#region src/feature-flags/payload.ts
|
|
7992
|
+
// src/feature-flags/payload.ts
|
|
8187
7993
|
function isRecord(value) {
|
|
8188
7994
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
8189
7995
|
}
|
|
@@ -8211,8 +8017,7 @@ function parseFlagPollResponse(response) {
|
|
|
8211
8017
|
flags: Object.fromEntries(entries)
|
|
8212
8018
|
};
|
|
8213
8019
|
}
|
|
8214
|
-
|
|
8215
|
-
//#region src/feature-flags/runtime-client.ts
|
|
8020
|
+
// src/feature-flags/runtime-client.ts
|
|
8216
8021
|
const DEFAULT_POLLING_INTERVAL_MS = 3e4;
|
|
8217
8022
|
const MIN_POLLING_INTERVAL_MS = 5e3;
|
|
8218
8023
|
const MIN_DELAY_MS = 1e3;
|
|
@@ -8411,8 +8216,7 @@ var FeatureFlagsRuntimeClient = class extends EventEmitter {
|
|
|
8411
8216
|
return signature(a) !== signature(b);
|
|
8412
8217
|
}
|
|
8413
8218
|
};
|
|
8414
|
-
|
|
8415
|
-
//#region src/feature-flags/feature-flags.ts
|
|
8219
|
+
// src/feature-flags/feature-flags.ts
|
|
8416
8220
|
var FeatureFlags = class {
|
|
8417
8221
|
workos;
|
|
8418
8222
|
constructor(workos) {
|
|
@@ -8627,8 +8431,7 @@ var FeatureFlags = class {
|
|
|
8627
8431
|
return new FeatureFlagsRuntimeClient(this.workos, options);
|
|
8628
8432
|
}
|
|
8629
8433
|
};
|
|
8630
|
-
|
|
8631
|
-
//#region src/groups/groups.ts
|
|
8434
|
+
// src/groups/groups.ts
|
|
8632
8435
|
var Groups = class {
|
|
8633
8436
|
workos;
|
|
8634
8437
|
constructor(workos) {
|
|
@@ -8790,18 +8593,15 @@ var Groups = class {
|
|
|
8790
8593
|
await this.workos.delete(`/organizations/${encodeURIComponent(organizationId)}/groups/${encodeURIComponent(groupId)}/organization-memberships/${encodeURIComponent(organizationMembershipId)}`);
|
|
8791
8594
|
}
|
|
8792
8595
|
};
|
|
8793
|
-
|
|
8794
|
-
//#region src/widgets/serializers/widget-session-token-response.serializer.ts
|
|
8596
|
+
// src/widgets/serializers/widget-session-token-response.serializer.ts
|
|
8795
8597
|
const deserializeWidgetSessionTokenResponse = (response) => ({ token: response.token });
|
|
8796
|
-
|
|
8797
|
-
//#region src/widgets/serializers/widget-session-token.serializer.ts
|
|
8598
|
+
// src/widgets/serializers/widget-session-token.serializer.ts
|
|
8798
8599
|
const serializeGetTokenOptions = (model) => ({
|
|
8799
8600
|
organization_id: model.organizationId,
|
|
8800
8601
|
user_id: model.userId,
|
|
8801
8602
|
scopes: model.scopes
|
|
8802
8603
|
});
|
|
8803
|
-
|
|
8804
|
-
//#region src/widgets/widgets.ts
|
|
8604
|
+
// src/widgets/widgets.ts
|
|
8805
8605
|
var Widgets = class {
|
|
8806
8606
|
workos;
|
|
8807
8607
|
constructor(workos) {
|
|
@@ -8823,8 +8623,7 @@ var Widgets = class {
|
|
|
8823
8623
|
return deserializeWidgetSessionTokenResponse(data);
|
|
8824
8624
|
}
|
|
8825
8625
|
};
|
|
8826
|
-
|
|
8827
|
-
//#region src/authorization/serializers/environment-role.serializer.ts
|
|
8626
|
+
// src/authorization/serializers/environment-role.serializer.ts
|
|
8828
8627
|
const deserializeEnvironmentRole = (role) => ({
|
|
8829
8628
|
object: role.object,
|
|
8830
8629
|
id: role.id,
|
|
@@ -8837,50 +8636,43 @@ const deserializeEnvironmentRole = (role) => ({
|
|
|
8837
8636
|
createdAt: new Date(role.created_at),
|
|
8838
8637
|
updatedAt: new Date(role.updated_at)
|
|
8839
8638
|
});
|
|
8840
|
-
|
|
8841
|
-
//#region src/authorization/serializers/create-environment-role-options.serializer.ts
|
|
8639
|
+
// src/authorization/serializers/create-environment-role-options.serializer.ts
|
|
8842
8640
|
const serializeCreateEnvironmentRoleOptions = (options) => ({
|
|
8843
8641
|
slug: options.slug,
|
|
8844
8642
|
name: options.name,
|
|
8845
8643
|
description: options.description,
|
|
8846
8644
|
resource_type_slug: options.resourceTypeSlug
|
|
8847
8645
|
});
|
|
8848
|
-
|
|
8849
|
-
//#region src/authorization/serializers/update-environment-role-options.serializer.ts
|
|
8646
|
+
// src/authorization/serializers/update-environment-role-options.serializer.ts
|
|
8850
8647
|
const serializeUpdateEnvironmentRoleOptions = (options) => ({
|
|
8851
8648
|
name: options.name,
|
|
8852
8649
|
description: options.description
|
|
8853
8650
|
});
|
|
8854
|
-
|
|
8855
|
-
//#region src/authorization/serializers/create-organization-role-options.serializer.ts
|
|
8651
|
+
// src/authorization/serializers/create-organization-role-options.serializer.ts
|
|
8856
8652
|
const serializeCreateOrganizationRoleOptions = (options) => ({
|
|
8857
8653
|
slug: options.slug,
|
|
8858
8654
|
name: options.name,
|
|
8859
8655
|
description: options.description,
|
|
8860
8656
|
resource_type_slug: options.resourceTypeSlug
|
|
8861
8657
|
});
|
|
8862
|
-
|
|
8863
|
-
//#region src/authorization/serializers/update-organization-role-options.serializer.ts
|
|
8658
|
+
// src/authorization/serializers/update-organization-role-options.serializer.ts
|
|
8864
8659
|
const serializeUpdateOrganizationRoleOptions = (options) => ({
|
|
8865
8660
|
name: options.name,
|
|
8866
8661
|
description: options.description
|
|
8867
8662
|
});
|
|
8868
|
-
|
|
8869
|
-
//#region src/authorization/serializers/create-permission-options.serializer.ts
|
|
8663
|
+
// src/authorization/serializers/create-permission-options.serializer.ts
|
|
8870
8664
|
const serializeCreatePermissionOptions = (options) => ({
|
|
8871
8665
|
slug: options.slug,
|
|
8872
8666
|
name: options.name,
|
|
8873
8667
|
description: options.description,
|
|
8874
8668
|
resource_type_slug: options.resourceTypeSlug
|
|
8875
8669
|
});
|
|
8876
|
-
|
|
8877
|
-
//#region src/authorization/serializers/update-permission-options.serializer.ts
|
|
8670
|
+
// src/authorization/serializers/update-permission-options.serializer.ts
|
|
8878
8671
|
const serializeUpdatePermissionOptions = (options) => ({
|
|
8879
8672
|
name: options.name,
|
|
8880
8673
|
description: options.description
|
|
8881
8674
|
});
|
|
8882
|
-
|
|
8883
|
-
//#region src/authorization/serializers/authorization-resource.serializer.ts
|
|
8675
|
+
// src/authorization/serializers/authorization-resource.serializer.ts
|
|
8884
8676
|
const deserializeAuthorizationResource = (resource) => ({
|
|
8885
8677
|
object: resource.object,
|
|
8886
8678
|
id: resource.id,
|
|
@@ -8893,8 +8685,7 @@ const deserializeAuthorizationResource = (resource) => ({
|
|
|
8893
8685
|
createdAt: new Date(resource.created_at),
|
|
8894
8686
|
updatedAt: new Date(resource.updated_at)
|
|
8895
8687
|
});
|
|
8896
|
-
|
|
8897
|
-
//#region src/authorization/serializers/create-authorization-resource-options.serializer.ts
|
|
8688
|
+
// src/authorization/serializers/create-authorization-resource-options.serializer.ts
|
|
8898
8689
|
const serializeCreateResourceOptions = (options) => ({
|
|
8899
8690
|
organization_id: options.organizationId,
|
|
8900
8691
|
resource_type_slug: options.resourceTypeSlug,
|
|
@@ -8907,20 +8698,17 @@ const serializeCreateResourceOptions = (options) => ({
|
|
|
8907
8698
|
parent_resource_type_slug: options.parentResourceTypeSlug
|
|
8908
8699
|
}
|
|
8909
8700
|
});
|
|
8910
|
-
|
|
8911
|
-
//#region src/authorization/serializers/update-authorization-resource-options.serializer.ts
|
|
8701
|
+
// src/authorization/serializers/update-authorization-resource-options.serializer.ts
|
|
8912
8702
|
const serializeUpdateResourceOptions = (options) => ({
|
|
8913
8703
|
...options.name !== void 0 && { name: options.name },
|
|
8914
8704
|
...options.description !== void 0 && { description: options.description }
|
|
8915
8705
|
});
|
|
8916
|
-
|
|
8917
|
-
//#region src/authorization/serializers/update-authorization-resource-by-external-id-options.serializer.ts
|
|
8706
|
+
// src/authorization/serializers/update-authorization-resource-by-external-id-options.serializer.ts
|
|
8918
8707
|
const serializeUpdateResourceByExternalIdOptions = (options) => ({
|
|
8919
8708
|
...options.name !== void 0 && { name: options.name },
|
|
8920
8709
|
...options.description !== void 0 && { description: options.description }
|
|
8921
8710
|
});
|
|
8922
|
-
|
|
8923
|
-
//#region src/authorization/serializers/list-authorization-resources-options.serializer.ts
|
|
8711
|
+
// src/authorization/serializers/list-authorization-resources-options.serializer.ts
|
|
8924
8712
|
const serializeListAuthorizationResourcesOptions = (options) => ({
|
|
8925
8713
|
...options.organizationId && { organization_id: options.organizationId },
|
|
8926
8714
|
...options.resourceTypeSlug && { resource_type_slug: options.resourceTypeSlug },
|
|
@@ -8929,8 +8717,7 @@ const serializeListAuthorizationResourcesOptions = (options) => ({
|
|
|
8929
8717
|
...options.parentExternalId && { parent_external_id: options.parentExternalId },
|
|
8930
8718
|
...serializePaginationOptions(options)
|
|
8931
8719
|
});
|
|
8932
|
-
|
|
8933
|
-
//#region src/authorization/serializers/authorization-check-options.serializer.ts
|
|
8720
|
+
// src/authorization/serializers/authorization-check-options.serializer.ts
|
|
8934
8721
|
const serializeAuthorizationCheckOptions = (options) => ({
|
|
8935
8722
|
permission_slug: options.permissionSlug,
|
|
8936
8723
|
..."resourceId" in options && { resource_id: options.resourceId },
|
|
@@ -8939,8 +8726,7 @@ const serializeAuthorizationCheckOptions = (options) => ({
|
|
|
8939
8726
|
resource_type_slug: options.resourceTypeSlug
|
|
8940
8727
|
}
|
|
8941
8728
|
});
|
|
8942
|
-
|
|
8943
|
-
//#region src/authorization/serializers/list-resources-for-membership-options.serializer.ts
|
|
8729
|
+
// src/authorization/serializers/list-resources-for-membership-options.serializer.ts
|
|
8944
8730
|
const serializeListResourcesForMembershipOptions = (options) => ({
|
|
8945
8731
|
permission_slug: options.permissionSlug,
|
|
8946
8732
|
...serializePaginationOptions(options),
|
|
@@ -8950,15 +8736,13 @@ const serializeListResourcesForMembershipOptions = (options) => ({
|
|
|
8950
8736
|
parent_resource_external_id: options.parentResourceExternalId
|
|
8951
8737
|
}
|
|
8952
8738
|
});
|
|
8953
|
-
|
|
8954
|
-
//#region src/authorization/serializers/list-memberships-for-resource-options.serializer.ts
|
|
8739
|
+
// src/authorization/serializers/list-memberships-for-resource-options.serializer.ts
|
|
8955
8740
|
const serializeListMembershipsForResourceOptions = (options) => ({
|
|
8956
8741
|
permission_slug: options.permissionSlug,
|
|
8957
8742
|
...options.assignment && { assignment: options.assignment },
|
|
8958
8743
|
...serializePaginationOptions(options)
|
|
8959
8744
|
});
|
|
8960
|
-
|
|
8961
|
-
//#region src/authorization/serializers/role-assignment.serializer.ts
|
|
8745
|
+
// src/authorization/serializers/role-assignment.serializer.ts
|
|
8962
8746
|
const deserializeRoleAssignment = (response) => ({
|
|
8963
8747
|
object: response.object,
|
|
8964
8748
|
id: response.id,
|
|
@@ -8976,22 +8760,19 @@ const deserializeRoleAssignment = (response) => ({
|
|
|
8976
8760
|
createdAt: new Date(response.created_at),
|
|
8977
8761
|
updatedAt: new Date(response.updated_at)
|
|
8978
8762
|
});
|
|
8979
|
-
|
|
8980
|
-
//#region src/authorization/serializers/list-role-assignments-options.serializer.ts
|
|
8763
|
+
// src/authorization/serializers/list-role-assignments-options.serializer.ts
|
|
8981
8764
|
const serializeListRoleAssignmentsOptions = (options) => ({
|
|
8982
8765
|
...options.resourceId && { resource_id: options.resourceId },
|
|
8983
8766
|
...options.resourceExternalId && { resource_external_id: options.resourceExternalId },
|
|
8984
8767
|
...options.resourceTypeSlug && { resource_type_slug: options.resourceTypeSlug },
|
|
8985
8768
|
...serializePaginationOptions(options)
|
|
8986
8769
|
});
|
|
8987
|
-
|
|
8988
|
-
//#region src/authorization/serializers/list-role-assignments-for-resource-options.serializer.ts
|
|
8770
|
+
// src/authorization/serializers/list-role-assignments-for-resource-options.serializer.ts
|
|
8989
8771
|
const serializeListRoleAssignmentsForResourceOptions = (options) => ({
|
|
8990
8772
|
...options.roleSlug && { role_slug: options.roleSlug },
|
|
8991
8773
|
...serializePaginationOptions(options)
|
|
8992
8774
|
});
|
|
8993
|
-
|
|
8994
|
-
//#region src/authorization/serializers/assign-role-options.serializer.ts
|
|
8775
|
+
// src/authorization/serializers/assign-role-options.serializer.ts
|
|
8995
8776
|
const serializeAssignRoleOptions = (options) => ({
|
|
8996
8777
|
role_slug: options.roleSlug,
|
|
8997
8778
|
..."resourceId" in options && { resource_id: options.resourceId },
|
|
@@ -9000,8 +8781,7 @@ const serializeAssignRoleOptions = (options) => ({
|
|
|
9000
8781
|
resource_type_slug: options.resourceTypeSlug
|
|
9001
8782
|
}
|
|
9002
8783
|
});
|
|
9003
|
-
|
|
9004
|
-
//#region src/authorization/serializers/remove-role-options.serializer.ts
|
|
8784
|
+
// src/authorization/serializers/remove-role-options.serializer.ts
|
|
9005
8785
|
const serializeRemoveRoleOptions = (options) => ({
|
|
9006
8786
|
role_slug: options.roleSlug,
|
|
9007
8787
|
..."resourceId" in options && { resource_id: options.resourceId },
|
|
@@ -9010,8 +8790,7 @@ const serializeRemoveRoleOptions = (options) => ({
|
|
|
9010
8790
|
resource_type_slug: options.resourceTypeSlug
|
|
9011
8791
|
}
|
|
9012
8792
|
});
|
|
9013
|
-
|
|
9014
|
-
//#region src/authorization/serializers/group-role-assignment.serializer.ts
|
|
8793
|
+
// src/authorization/serializers/group-role-assignment.serializer.ts
|
|
9015
8794
|
const deserializeGroupRoleAssignment = (response) => ({
|
|
9016
8795
|
object: response.object,
|
|
9017
8796
|
id: response.id,
|
|
@@ -9025,8 +8804,7 @@ const deserializeGroupRoleAssignment = (response) => ({
|
|
|
9025
8804
|
createdAt: new Date(response.created_at),
|
|
9026
8805
|
updatedAt: new Date(response.updated_at)
|
|
9027
8806
|
});
|
|
9028
|
-
|
|
9029
|
-
//#region src/authorization/serializers/create-group-role-assignment-options.serializer.ts
|
|
8807
|
+
// src/authorization/serializers/create-group-role-assignment-options.serializer.ts
|
|
9030
8808
|
const serializeCreateGroupRoleAssignmentOptions = (options) => ({
|
|
9031
8809
|
role_slug: options.roleSlug,
|
|
9032
8810
|
..."resourceId" in options && { resource_id: options.resourceId },
|
|
@@ -9035,8 +8813,7 @@ const serializeCreateGroupRoleAssignmentOptions = (options) => ({
|
|
|
9035
8813
|
resource_type_slug: options.resourceTypeSlug
|
|
9036
8814
|
}
|
|
9037
8815
|
});
|
|
9038
|
-
|
|
9039
|
-
//#region src/authorization/serializers/remove-group-role-assignments-options.serializer.ts
|
|
8816
|
+
// src/authorization/serializers/remove-group-role-assignments-options.serializer.ts
|
|
9040
8817
|
const serializeRemoveGroupRoleAssignmentsOptions = (options) => ({
|
|
9041
8818
|
role_slug: options.roleSlug,
|
|
9042
8819
|
..."resourceId" in options && { resource_id: options.resourceId },
|
|
@@ -9045,8 +8822,7 @@ const serializeRemoveGroupRoleAssignmentsOptions = (options) => ({
|
|
|
9045
8822
|
resource_type_slug: options.resourceTypeSlug
|
|
9046
8823
|
}
|
|
9047
8824
|
});
|
|
9048
|
-
|
|
9049
|
-
//#region src/authorization/serializers/replace-group-role-assignments-options.serializer.ts
|
|
8825
|
+
// src/authorization/serializers/replace-group-role-assignments-options.serializer.ts
|
|
9050
8826
|
const serializeEntry = (entry) => ({
|
|
9051
8827
|
role_slug: entry.roleSlug,
|
|
9052
8828
|
..."resourceId" in entry && { resource_id: entry.resourceId },
|
|
@@ -9056,11 +8832,9 @@ const serializeEntry = (entry) => ({
|
|
|
9056
8832
|
}
|
|
9057
8833
|
});
|
|
9058
8834
|
const serializeReplaceGroupRoleAssignmentsOptions = (options) => ({ role_assignments: options.roleAssignments.map(serializeEntry) });
|
|
9059
|
-
|
|
9060
|
-
//#region src/authorization/serializers/list-effective-permissions-options.serializer.ts
|
|
8835
|
+
// src/authorization/serializers/list-effective-permissions-options.serializer.ts
|
|
9061
8836
|
const serializeListEffectivePermissionsOptions = (options) => ({ ...serializePaginationOptions(options) });
|
|
9062
|
-
|
|
9063
|
-
//#region src/authorization/authorization.ts
|
|
8837
|
+
// src/authorization/authorization.ts
|
|
9064
8838
|
var Authorization = class {
|
|
9065
8839
|
workos;
|
|
9066
8840
|
constructor(workos) {
|
|
@@ -9962,8 +9736,7 @@ var Authorization = class {
|
|
|
9962
9736
|
return new AutoPaginatable(await fetchAndDeserialize(this.workos, endpoint, deserializePermission, serializedOptions), (params) => fetchAndDeserialize(this.workos, endpoint, deserializePermission, params), serializedOptions);
|
|
9963
9737
|
}
|
|
9964
9738
|
};
|
|
9965
|
-
|
|
9966
|
-
//#region src/common/utils/leb128.ts
|
|
9739
|
+
// src/common/utils/leb128.ts
|
|
9967
9740
|
/**
|
|
9968
9741
|
* LEB128 (Little Endian Base 128) encoding for unsigned 32-bit integers.
|
|
9969
9742
|
* Variable-length encoding: each byte stores 7 bits of data, bit 7 is continuation flag.
|
|
@@ -10032,28 +9805,24 @@ function validateOffset(data, offset) {
|
|
|
10032
9805
|
function hasContinuationBit(byte) {
|
|
10033
9806
|
return (byte & CONTINUATION_BIT) !== 0;
|
|
10034
9807
|
}
|
|
10035
|
-
|
|
10036
|
-
//#region src/vault/serializers/create-data-key-response.serializer.ts
|
|
9808
|
+
// src/vault/serializers/create-data-key-response.serializer.ts
|
|
10037
9809
|
const deserializeCreateDataKeyResponse = (response) => ({
|
|
10038
9810
|
context: response.context,
|
|
10039
9811
|
dataKey: response.data_key,
|
|
10040
9812
|
encryptedKeys: response.encrypted_keys,
|
|
10041
9813
|
id: response.id
|
|
10042
9814
|
});
|
|
10043
|
-
|
|
10044
|
-
//#region src/vault/serializers/decrypt-response.serializer.ts
|
|
9815
|
+
// src/vault/serializers/decrypt-response.serializer.ts
|
|
10045
9816
|
const deserializeDecryptResponse = (response) => ({
|
|
10046
9817
|
dataKey: response.data_key,
|
|
10047
9818
|
id: response.id
|
|
10048
9819
|
});
|
|
10049
|
-
|
|
10050
|
-
//#region src/vault/serializers/actor.serializer.ts
|
|
9820
|
+
// src/vault/serializers/actor.serializer.ts
|
|
10051
9821
|
const deserializeActor = (response) => ({
|
|
10052
9822
|
id: response.id,
|
|
10053
9823
|
name: response.name
|
|
10054
9824
|
});
|
|
10055
|
-
|
|
10056
|
-
//#region src/vault/serializers/object-metadata.serializer.ts
|
|
9825
|
+
// src/vault/serializers/object-metadata.serializer.ts
|
|
10057
9826
|
const deserializeObjectMetadata = (response) => ({
|
|
10058
9827
|
context: response.context,
|
|
10059
9828
|
environmentId: response.environment_id,
|
|
@@ -10063,23 +9832,20 @@ const deserializeObjectMetadata = (response) => ({
|
|
|
10063
9832
|
updatedBy: deserializeActor(response.updated_by),
|
|
10064
9833
|
versionId: response.version_id ?? null
|
|
10065
9834
|
});
|
|
10066
|
-
|
|
10067
|
-
//#region src/vault/serializers/vault-object.serializer.ts
|
|
9835
|
+
// src/vault/serializers/vault-object.serializer.ts
|
|
10068
9836
|
const deserializeVaultObject = (response) => ({
|
|
10069
9837
|
id: response.id,
|
|
10070
9838
|
metadata: deserializeObjectMetadata(response.metadata),
|
|
10071
9839
|
name: response.name,
|
|
10072
9840
|
value: response.value
|
|
10073
9841
|
});
|
|
10074
|
-
|
|
10075
|
-
//#region src/vault/serializers/object-without-value.serializer.ts
|
|
9842
|
+
// src/vault/serializers/object-without-value.serializer.ts
|
|
10076
9843
|
const deserializeObjectWithoutValue = (response) => ({
|
|
10077
9844
|
id: response.id,
|
|
10078
9845
|
metadata: deserializeObjectMetadata(response.metadata),
|
|
10079
9846
|
name: response.name
|
|
10080
9847
|
});
|
|
10081
|
-
|
|
10082
|
-
//#region src/vault/serializers/object-version.serializer.ts
|
|
9848
|
+
// src/vault/serializers/object-version.serializer.ts
|
|
10083
9849
|
const deserializeObjectVersion = (response) => ({
|
|
10084
9850
|
createdAt: new Date(response.created_at),
|
|
10085
9851
|
currentVersion: response.current_version,
|
|
@@ -10087,52 +9853,43 @@ const deserializeObjectVersion = (response) => ({
|
|
|
10087
9853
|
id: response.id,
|
|
10088
9854
|
size: response.size ?? 0
|
|
10089
9855
|
});
|
|
10090
|
-
|
|
10091
|
-
//#region src/vault/serializers/list-metadata.serializer.ts
|
|
9856
|
+
// src/vault/serializers/list-metadata.serializer.ts
|
|
10092
9857
|
const deserializeListMetadata = (response) => ({
|
|
10093
9858
|
after: response.after ?? null,
|
|
10094
9859
|
before: response.before ?? null
|
|
10095
9860
|
});
|
|
10096
|
-
|
|
10097
|
-
//#region src/vault/serializers/version-list-response.serializer.ts
|
|
9861
|
+
// src/vault/serializers/version-list-response.serializer.ts
|
|
10098
9862
|
const deserializeVersionListResponse = (response) => ({
|
|
10099
9863
|
data: response.data.map(deserializeObjectVersion),
|
|
10100
9864
|
listMetadata: deserializeListMetadata(response.list_metadata)
|
|
10101
9865
|
});
|
|
10102
|
-
|
|
10103
|
-
//#region src/vault/serializers/object-summary.serializer.ts
|
|
9866
|
+
// src/vault/serializers/object-summary.serializer.ts
|
|
10104
9867
|
const deserializeObjectSummary = (response) => ({
|
|
10105
9868
|
id: response.id,
|
|
10106
9869
|
name: response.name,
|
|
10107
9870
|
updatedAt: response.updated_at != null ? new Date(response.updated_at) : null
|
|
10108
9871
|
});
|
|
10109
|
-
|
|
10110
|
-
//#region src/vault/serializers/create-data-key-request.serializer.ts
|
|
9872
|
+
// src/vault/serializers/create-data-key-request.serializer.ts
|
|
10111
9873
|
const serializeCreateDataKeyRequest = (model) => ({ context: model.context });
|
|
10112
|
-
|
|
10113
|
-
//#region src/vault/serializers/decrypt-request.serializer.ts
|
|
9874
|
+
// src/vault/serializers/decrypt-request.serializer.ts
|
|
10114
9875
|
const serializeDecryptRequest = (model) => ({ keys: model.keys });
|
|
10115
|
-
|
|
10116
|
-
//#region src/vault/serializers/rekey-request.serializer.ts
|
|
9876
|
+
// src/vault/serializers/rekey-request.serializer.ts
|
|
10117
9877
|
const serializeRekeyRequest = (model) => ({
|
|
10118
9878
|
context: model.context,
|
|
10119
9879
|
encrypted_keys: model.encryptedKeys
|
|
10120
9880
|
});
|
|
10121
|
-
|
|
10122
|
-
//#region src/vault/serializers/create-object-request.serializer.ts
|
|
9881
|
+
// src/vault/serializers/create-object-request.serializer.ts
|
|
10123
9882
|
const serializeCreateObjectRequest = (model) => ({
|
|
10124
9883
|
key_context: model.keyContext,
|
|
10125
9884
|
name: model.name,
|
|
10126
9885
|
value: model.value
|
|
10127
9886
|
});
|
|
10128
|
-
|
|
10129
|
-
//#region src/vault/serializers/update-object-request.serializer.ts
|
|
9887
|
+
// src/vault/serializers/update-object-request.serializer.ts
|
|
10130
9888
|
const serializeUpdateObjectRequest = (model) => ({
|
|
10131
9889
|
value: model.value,
|
|
10132
9890
|
version_check: model.versionCheck ?? null
|
|
10133
9891
|
});
|
|
10134
|
-
|
|
10135
|
-
//#region src/common/utils/base64.ts
|
|
9892
|
+
// src/common/utils/base64.ts
|
|
10136
9893
|
/**
|
|
10137
9894
|
* Cross-runtime compatible base64 encoding/decoding utilities
|
|
10138
9895
|
* that work in both Node.js and browser environments
|
|
@@ -10160,8 +9917,7 @@ function uint8ArrayToBase64(bytes) {
|
|
|
10160
9917
|
} else if (typeof Buffer !== "undefined") return Buffer.from(bytes).toString("base64");
|
|
10161
9918
|
else throw new Error("No base64 encoding implementation available");
|
|
10162
9919
|
}
|
|
10163
|
-
|
|
10164
|
-
//#region src/vault/vault.ts
|
|
9920
|
+
// src/vault/vault.ts
|
|
10165
9921
|
const serializeListObjectsOptions = (options) => {
|
|
10166
9922
|
const wire = {
|
|
10167
9923
|
limit: options.limit,
|
|
@@ -10415,11 +10171,9 @@ var Vault = class {
|
|
|
10415
10171
|
return uint8ArrayToBase64(resultArray);
|
|
10416
10172
|
}
|
|
10417
10173
|
};
|
|
10418
|
-
|
|
10419
|
-
|
|
10420
|
-
|
|
10421
|
-
//#endregion
|
|
10422
|
-
//#region src/workos.ts
|
|
10174
|
+
// package.json
|
|
10175
|
+
var version = "12.4.1";
|
|
10176
|
+
// src/workos.ts
|
|
10423
10177
|
const DEFAULT_HOSTNAME = "api.workos.com";
|
|
10424
10178
|
const HEADER_AUTHORIZATION = "Authorization";
|
|
10425
10179
|
const HEADER_IDEMPOTENCY_KEY = "Idempotency-Key";
|
|
@@ -10710,8 +10464,7 @@ var WorkOS = class {
|
|
|
10710
10464
|
}
|
|
10711
10465
|
}
|
|
10712
10466
|
};
|
|
10713
|
-
|
|
10714
|
-
//#region src/audit-logs/interfaces/update-audit-logs-retention-retention-period.interface.ts
|
|
10467
|
+
// src/audit-logs/interfaces/update-audit-logs-retention-retention-period.interface.ts
|
|
10715
10468
|
const UpdateAuditLogsRetentionRetentionPeriod = {
|
|
10716
10469
|
Value1Month: "1_MONTH",
|
|
10717
10470
|
Value2Months: "2_MONTHS",
|
|
@@ -10735,8 +10488,7 @@ const UpdateAuditLogsRetentionRetentionPeriod = {
|
|
|
10735
10488
|
Value9Years: "9_YEARS",
|
|
10736
10489
|
Value10Years: "10_YEARS"
|
|
10737
10490
|
};
|
|
10738
|
-
|
|
10739
|
-
//#region src/common/interfaces/generate-link-intent.interface.ts
|
|
10491
|
+
// src/common/interfaces/generate-link-intent.interface.ts
|
|
10740
10492
|
const GenerateLinkIntent = {
|
|
10741
10493
|
SSO: "sso",
|
|
10742
10494
|
DSync: "dsync",
|
|
@@ -10746,22 +10498,19 @@ const GenerateLinkIntent = {
|
|
|
10746
10498
|
CertificateRenewal: "certificate_renewal",
|
|
10747
10499
|
BringYourOwnKey: "bring_your_own_key"
|
|
10748
10500
|
};
|
|
10749
|
-
|
|
10750
|
-
//#region src/directory-sync/interfaces/directory-user-with-groups-state.interface.ts
|
|
10501
|
+
// src/directory-sync/interfaces/directory-user-with-groups-state.interface.ts
|
|
10751
10502
|
const DirectoryUserWithGroupsState = {
|
|
10752
10503
|
Active: "active",
|
|
10753
10504
|
Suspended: "suspended",
|
|
10754
10505
|
Inactive: "inactive"
|
|
10755
10506
|
};
|
|
10756
|
-
|
|
10757
|
-
//#region src/organizations/interfaces/domain-data.interface.ts
|
|
10507
|
+
// src/organizations/interfaces/domain-data.interface.ts
|
|
10758
10508
|
let DomainDataState = /* @__PURE__ */ function(DomainDataState) {
|
|
10759
10509
|
DomainDataState["Verified"] = "verified";
|
|
10760
10510
|
DomainDataState["Pending"] = "pending";
|
|
10761
10511
|
return DomainDataState;
|
|
10762
10512
|
}({});
|
|
10763
|
-
|
|
10764
|
-
//#region src/organizations/interfaces/it-contact-options.interface.ts
|
|
10513
|
+
// src/organizations/interfaces/it-contact-options.interface.ts
|
|
10765
10514
|
const ItContactIntent = {
|
|
10766
10515
|
SSO: "sso",
|
|
10767
10516
|
DirectorySync: "directory_sync",
|
|
@@ -10769,8 +10518,7 @@ const ItContactIntent = {
|
|
|
10769
10518
|
DomainVerification: "domain_verification",
|
|
10770
10519
|
BringYourOwnKey: "bring_your_own_key"
|
|
10771
10520
|
};
|
|
10772
|
-
|
|
10773
|
-
//#region src/organization-domains/interfaces/organization-domain.interface.ts
|
|
10521
|
+
// src/organization-domains/interfaces/organization-domain.interface.ts
|
|
10774
10522
|
let OrganizationDomainState = /* @__PURE__ */ function(OrganizationDomainState) {
|
|
10775
10523
|
OrganizationDomainState["Verified"] = "verified";
|
|
10776
10524
|
OrganizationDomainState["Pending"] = "pending";
|
|
@@ -10783,8 +10531,7 @@ let OrganizationDomainVerificationStrategy = /* @__PURE__ */ function(Organizati
|
|
|
10783
10531
|
OrganizationDomainVerificationStrategy["Manual"] = "manual";
|
|
10784
10532
|
return OrganizationDomainVerificationStrategy;
|
|
10785
10533
|
}({});
|
|
10786
|
-
|
|
10787
|
-
//#region src/sso/interfaces/connection-type.enum.ts
|
|
10534
|
+
// src/sso/interfaces/connection-type.enum.ts
|
|
10788
10535
|
let ConnectionType = /* @__PURE__ */ function(ConnectionType) {
|
|
10789
10536
|
ConnectionType["ADFSSAML"] = "ADFSSAML";
|
|
10790
10537
|
ConnectionType["AdpOidc"] = "AdpOidc";
|
|
@@ -10826,12 +10573,10 @@ let ConnectionType = /* @__PURE__ */ function(ConnectionType) {
|
|
|
10826
10573
|
ConnectionType["VMwareSAML"] = "VMwareSAML";
|
|
10827
10574
|
return ConnectionType;
|
|
10828
10575
|
}({});
|
|
10829
|
-
|
|
10830
|
-
//#region src/factory.ts
|
|
10576
|
+
// src/factory.ts
|
|
10831
10577
|
function createWorkOS(options) {
|
|
10832
10578
|
return new WorkOS(options);
|
|
10833
10579
|
}
|
|
10834
|
-
//#endregion
|
|
10835
10580
|
Object.defineProperty(exports, "Actions", {
|
|
10836
10581
|
enumerable: true,
|
|
10837
10582
|
get: function() {
|
|
@@ -11043,4 +10788,4 @@ Object.defineProperty(exports, "serializeRevokeSessionOptions", {
|
|
|
11043
10788
|
}
|
|
11044
10789
|
});
|
|
11045
10790
|
|
|
11046
|
-
//# sourceMappingURL=factory-
|
|
10791
|
+
//# sourceMappingURL=factory-Eg0FV6MT.cjs.map
|