@meistrari/auth-core 2.4.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1418,7 +1418,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1418
1418
  getActions: ($fetch: better_auth_client.BetterFetch) => {
1419
1419
  customEndpoints: {
1420
1420
  organizations: {
1421
- apiKeys: () => Promise<ApiKeyWithoutSecret[]>;
1421
+ apiKeys: (organizationId?: string) => Promise<ApiKeyWithoutSecret[]>;
1422
1422
  };
1423
1423
  teams: {
1424
1424
  members: (teamId: string) => Promise<TeamMembersResponse>;
@@ -6123,11 +6123,12 @@ declare class ApiKeyService {
6123
6123
  offset: number | undefined;
6124
6124
  }>;
6125
6125
  /**
6126
- * Lists all API keys belonging to the active organization.
6126
+ * Lists all API keys belonging to an organization.
6127
6127
  *
6128
+ * @param organizationId - Defaults to the active organization. Only global admins may select another organization.
6128
6129
  * @returns An array of API keys (without secret key values)
6129
6130
  */
6130
- listOrganizationApiKeys(): Promise<ApiKeyWithoutSecret[]>;
6131
+ listOrganizationApiKeys(organizationId?: string): Promise<ApiKeyWithoutSecret[]>;
6131
6132
  /**
6132
6133
  * Updates an existing API key.
6133
6134
  *
package/dist/index.d.ts CHANGED
@@ -1418,7 +1418,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1418
1418
  getActions: ($fetch: better_auth_client.BetterFetch) => {
1419
1419
  customEndpoints: {
1420
1420
  organizations: {
1421
- apiKeys: () => Promise<ApiKeyWithoutSecret[]>;
1421
+ apiKeys: (organizationId?: string) => Promise<ApiKeyWithoutSecret[]>;
1422
1422
  };
1423
1423
  teams: {
1424
1424
  members: (teamId: string) => Promise<TeamMembersResponse>;
@@ -6123,11 +6123,12 @@ declare class ApiKeyService {
6123
6123
  offset: number | undefined;
6124
6124
  }>;
6125
6125
  /**
6126
- * Lists all API keys belonging to the active organization.
6126
+ * Lists all API keys belonging to an organization.
6127
6127
  *
6128
+ * @param organizationId - Defaults to the active organization. Only global admins may select another organization.
6128
6129
  * @returns An array of API keys (without secret key values)
6129
6130
  */
6130
- listOrganizationApiKeys(): Promise<ApiKeyWithoutSecret[]>;
6131
+ listOrganizationApiKeys(organizationId?: string): Promise<ApiKeyWithoutSecret[]>;
6131
6132
  /**
6132
6133
  * Updates an existing API key.
6133
6134
  *
package/dist/index.mjs CHANGED
@@ -21,7 +21,7 @@ function isTokenExpired(token, expiresInMs) {
21
21
  return nowInSeconds > expirationTime;
22
22
  }
23
23
 
24
- const version = "2.4.0";
24
+ const version = "2.5.0";
25
25
 
26
26
  function parsedEnumValues(schema) {
27
27
  return Object.fromEntries(
@@ -373,8 +373,8 @@ function customEndpointsPluginClient() {
373
373
  getActions: ($fetch) => ({
374
374
  customEndpoints: {
375
375
  organizations: {
376
- apiKeys: async () => {
377
- return await $fetch("/custom-endpoints/organizations/api-keys");
376
+ apiKeys: async (organizationId) => {
377
+ return await $fetch("/custom-endpoints/organizations/api-keys", organizationId === void 0 ? void 0 : { query: { organizationId } });
378
378
  }
379
379
  },
380
380
  teams: {
@@ -2223,12 +2223,13 @@ class ApiKeyService {
2223
2223
  return await this.client.apiKey.list();
2224
2224
  }
2225
2225
  /**
2226
- * Lists all API keys belonging to the active organization.
2226
+ * Lists all API keys belonging to an organization.
2227
2227
  *
2228
+ * @param organizationId - Defaults to the active organization. Only global admins may select another organization.
2228
2229
  * @returns An array of API keys (without secret key values)
2229
2230
  */
2230
- async listOrganizationApiKeys() {
2231
- return await this.client.customEndpoints.organizations.apiKeys();
2231
+ async listOrganizationApiKeys(organizationId) {
2232
+ return await this.client.customEndpoints.organizations.apiKeys(organizationId);
2232
2233
  }
2233
2234
  /**
2234
2235
  * Updates an existing API key.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/auth-core",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {