@clerk/backend 3.0.0-snapshot.v20251208202852 → 3.0.0-snapshot.v20251215203425
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/dist/api/endpoints/APIKeysApi.d.ts +23 -2
- package/dist/api/endpoints/APIKeysApi.d.ts.map +1 -1
- package/dist/api/endpoints/InstanceApi.d.ts +3 -3
- package/dist/api/endpoints/OrganizationApi.d.ts +2 -2
- package/dist/api/endpoints/SamlConnectionApi.d.ts +3 -3
- package/dist/api/endpoints/UserApi.d.ts +2 -2
- package/dist/api/resources/CommercePlan.d.ts +27 -27
- package/dist/api/resources/CommerceSubscriptionItem.d.ts +6 -6
- package/dist/api/resources/Feature.d.ts +11 -11
- package/dist/api/resources/JSON.d.ts +4 -4
- package/dist/api/resources/Organization.d.ts +23 -23
- package/dist/api/resources/OrganizationInvitation.d.ts +7 -7
- package/dist/api/resources/OrganizationMembership.d.ts +7 -7
- package/dist/api/resources/SamlConnection.d.ts +4 -4
- package/dist/api/resources/Session.d.ts +2 -2
- package/dist/api/resources/User.d.ts +4 -4
- package/dist/{chunk-XZ7V2XHT.mjs → chunk-6QDP7O5L.mjs} +34 -6
- package/dist/chunk-6QDP7O5L.mjs.map +1 -0
- package/dist/index.js +33 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/internal.js +33 -5
- package/dist/internal.js.map +1 -1
- package/dist/internal.mjs +1 -1
- package/dist/tokens/authObjects.d.ts +1 -1
- package/dist/tokens/clerkRequest.d.ts.map +1 -1
- package/dist/tokens/types.d.ts +7 -7
- package/dist/util/shared.d.ts +1 -1
- package/package.json +2 -2
- package/dist/chunk-XZ7V2XHT.mjs.map +0 -1
package/dist/index.mjs
CHANGED
package/dist/internal.js
CHANGED
|
@@ -56,7 +56,7 @@ module.exports = __toCommonJS(internal_exports);
|
|
|
56
56
|
// src/constants.ts
|
|
57
57
|
var API_URL = "https://api.clerk.com";
|
|
58
58
|
var API_VERSION = "v1";
|
|
59
|
-
var USER_AGENT = `${"@clerk/backend"}@${"3.0.0-snapshot.
|
|
59
|
+
var USER_AGENT = `${"@clerk/backend"}@${"3.0.0-snapshot.v20251215203425"}`;
|
|
60
60
|
var MAX_CACHE_LAST_UPDATED_AT_SECONDS = 5 * 60;
|
|
61
61
|
var SUPPORTED_BAPI_VERSION = "2025-11-10";
|
|
62
62
|
var Attributes = {
|
|
@@ -1023,13 +1023,36 @@ var APIKeysAPI = class extends AbstractAPI {
|
|
|
1023
1023
|
bodyParams: params
|
|
1024
1024
|
});
|
|
1025
1025
|
}
|
|
1026
|
-
async
|
|
1026
|
+
async get(apiKeyId) {
|
|
1027
|
+
this.requireId(apiKeyId);
|
|
1028
|
+
return this.request({
|
|
1029
|
+
method: "GET",
|
|
1030
|
+
path: joinPaths(basePath4, apiKeyId)
|
|
1031
|
+
});
|
|
1032
|
+
}
|
|
1033
|
+
async update(params) {
|
|
1027
1034
|
const { apiKeyId, ...bodyParams } = params;
|
|
1028
1035
|
this.requireId(apiKeyId);
|
|
1036
|
+
return this.request({
|
|
1037
|
+
method: "PATCH",
|
|
1038
|
+
path: joinPaths(basePath4, apiKeyId),
|
|
1039
|
+
bodyParams
|
|
1040
|
+
});
|
|
1041
|
+
}
|
|
1042
|
+
async delete(apiKeyId) {
|
|
1043
|
+
this.requireId(apiKeyId);
|
|
1044
|
+
return this.request({
|
|
1045
|
+
method: "DELETE",
|
|
1046
|
+
path: joinPaths(basePath4, apiKeyId)
|
|
1047
|
+
});
|
|
1048
|
+
}
|
|
1049
|
+
async revoke(params) {
|
|
1050
|
+
const { apiKeyId, revocationReason = null } = params;
|
|
1051
|
+
this.requireId(apiKeyId);
|
|
1029
1052
|
return this.request({
|
|
1030
1053
|
method: "POST",
|
|
1031
1054
|
path: joinPaths(basePath4, apiKeyId, "revoke"),
|
|
1032
|
-
bodyParams
|
|
1055
|
+
bodyParams: { revocationReason }
|
|
1033
1056
|
});
|
|
1034
1057
|
}
|
|
1035
1058
|
async getSecret(apiKeyId) {
|
|
@@ -4811,7 +4834,11 @@ var ClerkRequest = class extends Request {
|
|
|
4811
4834
|
if (origin === initialUrl.origin) {
|
|
4812
4835
|
return createClerkUrl(initialUrl);
|
|
4813
4836
|
}
|
|
4814
|
-
|
|
4837
|
+
try {
|
|
4838
|
+
return createClerkUrl(initialUrl.pathname + initialUrl.search, origin);
|
|
4839
|
+
} catch {
|
|
4840
|
+
return createClerkUrl(initialUrl);
|
|
4841
|
+
}
|
|
4815
4842
|
}
|
|
4816
4843
|
getFirstValueFromHeader(value) {
|
|
4817
4844
|
return value?.split(",")[0];
|
|
@@ -4825,7 +4852,8 @@ var ClerkRequest = class extends Request {
|
|
|
4825
4852
|
}
|
|
4826
4853
|
};
|
|
4827
4854
|
var createClerkRequest = (...args) => {
|
|
4828
|
-
|
|
4855
|
+
const isClerkRequest = args[0] && typeof args[0] === "object" && "clerkUrl" in args[0] && "cookies" in args[0];
|
|
4856
|
+
return isClerkRequest ? args[0] : new ClerkRequest(...args);
|
|
4829
4857
|
};
|
|
4830
4858
|
|
|
4831
4859
|
// src/tokens/cookie.ts
|