@clerk/backend 3.0.0-snapshot.v20251208202852 → 3.0.0-snapshot.v20251211120550

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.
@@ -12,11 +12,11 @@ export declare class SamlConnection {
12
12
  */
13
13
  readonly name: string;
14
14
  /**
15
- * The domain of your organization. Sign in flows using an email with this domain will use the connection.
15
+ * The domain of your Organization. Sign in flows using an email with this domain will use the connection.
16
16
  */
17
17
  readonly domain: string;
18
18
  /**
19
- * The organization ID of the organization.
19
+ * The Organization ID of the Organization.
20
20
  */
21
21
  readonly organizationId: string | null;
22
22
  /**
@@ -97,11 +97,11 @@ export declare class SamlConnection {
97
97
  */
98
98
  name: string,
99
99
  /**
100
- * The domain of your organization. Sign in flows using an email with this domain will use the connection.
100
+ * The domain of your Organization. Sign in flows using an email with this domain will use the connection.
101
101
  */
102
102
  domain: string,
103
103
  /**
104
- * The organization ID of the organization.
104
+ * The Organization ID of the Organization.
105
105
  */
106
106
  organizationId: string | null,
107
107
  /**
@@ -111,7 +111,7 @@ export declare class Session {
111
111
  */
112
112
  readonly updatedAt: number;
113
113
  /**
114
- * The ID of the last active organization.
114
+ * The ID of the last active Organization.
115
115
  */
116
116
  readonly lastActiveOrganizationId?: string | undefined;
117
117
  /**
@@ -160,7 +160,7 @@ export declare class Session {
160
160
  */
161
161
  updatedAt: number,
162
162
  /**
163
- * The ID of the last active organization.
163
+ * The ID of the last active Organization.
164
164
  */
165
165
  lastActiveOrganizationId?: string | undefined,
166
166
  /**
@@ -116,11 +116,11 @@ export declare class User {
116
116
  */
117
117
  readonly lastActiveAt: number | null;
118
118
  /**
119
- * A boolean indicating whether the organization creation is enabled for the user or not.
119
+ * A boolean indicating whether the Organization creation is enabled for the user or not.
120
120
  */
121
121
  readonly createOrganizationEnabled: boolean;
122
122
  /**
123
- * An integer indicating the number of organizations that can be created by the user. If the value is `0`, then the user can create unlimited organizations. Default is `null`.
123
+ * An integer indicating the number of Organizations that can be created by the user. If the value is `0`, then the user can create unlimited Organizations. Default is `null`.
124
124
  */
125
125
  readonly createOrganizationsLimit: number | null;
126
126
  /**
@@ -247,11 +247,11 @@ export declare class User {
247
247
  */
248
248
  lastActiveAt: number | null,
249
249
  /**
250
- * A boolean indicating whether the organization creation is enabled for the user or not.
250
+ * A boolean indicating whether the Organization creation is enabled for the user or not.
251
251
  */
252
252
  createOrganizationEnabled: boolean,
253
253
  /**
254
- * An integer indicating the number of organizations that can be created by the user. If the value is `0`, then the user can create unlimited organizations. Default is `null`.
254
+ * An integer indicating the number of Organizations that can be created by the user. If the value is `0`, then the user can create unlimited Organizations. Default is `null`.
255
255
  */
256
256
  createOrganizationsLimit: number | null | undefined,
257
257
  /**
@@ -31,7 +31,7 @@ import {
31
31
  // src/constants.ts
32
32
  var API_URL = "https://api.clerk.com";
33
33
  var API_VERSION = "v1";
34
- var USER_AGENT = `${"@clerk/backend"}@${"3.0.0-snapshot.v20251208202852"}`;
34
+ var USER_AGENT = `${"@clerk/backend"}@${"3.0.0-snapshot.v20251211120550"}`;
35
35
  var MAX_CACHE_LAST_UPDATED_AT_SECONDS = 5 * 60;
36
36
  var SUPPORTED_BAPI_VERSION = "2025-11-10";
37
37
  var Attributes = {
@@ -542,13 +542,36 @@ var APIKeysAPI = class extends AbstractAPI {
542
542
  bodyParams: params
543
543
  });
544
544
  }
545
- async revoke(params) {
545
+ async get(apiKeyId) {
546
+ this.requireId(apiKeyId);
547
+ return this.request({
548
+ method: "GET",
549
+ path: joinPaths(basePath4, apiKeyId)
550
+ });
551
+ }
552
+ async update(params) {
546
553
  const { apiKeyId, ...bodyParams } = params;
547
554
  this.requireId(apiKeyId);
555
+ return this.request({
556
+ method: "PATCH",
557
+ path: joinPaths(basePath4, apiKeyId),
558
+ bodyParams
559
+ });
560
+ }
561
+ async delete(apiKeyId) {
562
+ this.requireId(apiKeyId);
563
+ return this.request({
564
+ method: "DELETE",
565
+ path: joinPaths(basePath4, apiKeyId)
566
+ });
567
+ }
568
+ async revoke(params) {
569
+ const { apiKeyId, revocationReason = null } = params;
570
+ this.requireId(apiKeyId);
548
571
  return this.request({
549
572
  method: "POST",
550
573
  path: joinPaths(basePath4, apiKeyId, "revoke"),
551
- bodyParams
574
+ bodyParams: { revocationReason }
552
575
  });
553
576
  }
554
577
  async getSecret(apiKeyId) {
@@ -4330,7 +4353,11 @@ var ClerkRequest = class extends Request {
4330
4353
  if (origin === initialUrl.origin) {
4331
4354
  return createClerkUrl(initialUrl);
4332
4355
  }
4333
- return createClerkUrl(initialUrl.pathname + initialUrl.search, origin);
4356
+ try {
4357
+ return createClerkUrl(initialUrl.pathname + initialUrl.search, origin);
4358
+ } catch {
4359
+ return createClerkUrl(initialUrl);
4360
+ }
4334
4361
  }
4335
4362
  getFirstValueFromHeader(value) {
4336
4363
  return value?.split(",")[0];
@@ -4766,6 +4793,9 @@ var HandshakeService = class {
4766
4793
  );
4767
4794
  url.searchParams.append(constants.QueryParameters.HandshakeReason, reason);
4768
4795
  url.searchParams.append(constants.QueryParameters.HandshakeFormat, "nonce");
4796
+ if (this.authenticateContext.sessionToken) {
4797
+ url.searchParams.append(constants.Cookies.Session, this.authenticateContext.sessionToken);
4798
+ }
4769
4799
  if (this.authenticateContext.instanceType === "development" && this.authenticateContext.devBrowserToken) {
4770
4800
  url.searchParams.append(constants.QueryParameters.DevBrowser, this.authenticateContext.devBrowserToken);
4771
4801
  }
@@ -5670,4 +5700,4 @@ export {
5670
5700
  debugRequestState,
5671
5701
  createAuthenticateRequest
5672
5702
  };
5673
- //# sourceMappingURL=chunk-XZ7V2XHT.mjs.map
5703
+ //# sourceMappingURL=chunk-4FN7VCZQ.mjs.map