@meistrari/auth-core 1.11.7 → 1.12.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
@@ -295,6 +295,49 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
295
295
  };
296
296
  };
297
297
  };
298
+ } & {
299
+ customEndpoints: {
300
+ organizations: {
301
+ apiKeys: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
302
+ query?: Record<string, any> | undefined;
303
+ fetchOptions?: FetchOptions | undefined;
304
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
305
+ id: string;
306
+ name: string | null;
307
+ start: string | null;
308
+ prefix: string | null;
309
+ referenceId: string;
310
+ configId: string | null;
311
+ refillInterval: number | null;
312
+ refillAmount: number | null;
313
+ lastRefillAt: Date | null;
314
+ enabled: boolean | null;
315
+ rateLimitEnabled: boolean | null;
316
+ rateLimitTimeWindow: number | null;
317
+ rateLimitMax: number | null;
318
+ requestCount: number | null;
319
+ remaining: number | null;
320
+ lastRequest: Date | null;
321
+ expiresAt: Date | null;
322
+ createdAt: Date;
323
+ updatedAt: Date;
324
+ permissions: string | null;
325
+ metadata: ({
326
+ user: {
327
+ id: string;
328
+ email: string;
329
+ };
330
+ workspace: {
331
+ id: string;
332
+ title: string;
333
+ };
334
+ } & Record<string, unknown>) | null;
335
+ }[], {
336
+ code?: string | undefined;
337
+ message?: string | undefined;
338
+ }, FetchOptions["throw"] extends true ? true : true>>;
339
+ };
340
+ };
298
341
  } & {
299
342
  handshake: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
300
343
  origin: string;
@@ -4963,6 +5006,38 @@ declare class ApiKeyService {
4963
5006
  limit: number | undefined;
4964
5007
  offset: number | undefined;
4965
5008
  }>;
5009
+ listOrganizationApiKeys(): Promise<{
5010
+ id: string;
5011
+ name: string | null;
5012
+ start: string | null;
5013
+ prefix: string | null;
5014
+ referenceId: string;
5015
+ configId: string | null;
5016
+ refillInterval: number | null;
5017
+ refillAmount: number | null;
5018
+ lastRefillAt: Date | null;
5019
+ enabled: boolean | null;
5020
+ rateLimitEnabled: boolean | null;
5021
+ rateLimitTimeWindow: number | null;
5022
+ rateLimitMax: number | null;
5023
+ requestCount: number | null;
5024
+ remaining: number | null;
5025
+ lastRequest: Date | null;
5026
+ expiresAt: Date | null;
5027
+ createdAt: Date;
5028
+ updatedAt: Date;
5029
+ permissions: string | null;
5030
+ metadata: ({
5031
+ user: {
5032
+ id: string;
5033
+ email: string;
5034
+ };
5035
+ workspace: {
5036
+ id: string;
5037
+ title: string;
5038
+ };
5039
+ } & Record<string, unknown>) | null;
5040
+ }[]>;
4966
5041
  updateApiKey(payload: UpdateApiKeyPayload): Promise<{
4967
5042
  metadata: Record<string, any> | null;
4968
5043
  permissions: {
package/dist/index.d.ts CHANGED
@@ -295,6 +295,49 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
295
295
  };
296
296
  };
297
297
  };
298
+ } & {
299
+ customEndpoints: {
300
+ organizations: {
301
+ apiKeys: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
302
+ query?: Record<string, any> | undefined;
303
+ fetchOptions?: FetchOptions | undefined;
304
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
305
+ id: string;
306
+ name: string | null;
307
+ start: string | null;
308
+ prefix: string | null;
309
+ referenceId: string;
310
+ configId: string | null;
311
+ refillInterval: number | null;
312
+ refillAmount: number | null;
313
+ lastRefillAt: Date | null;
314
+ enabled: boolean | null;
315
+ rateLimitEnabled: boolean | null;
316
+ rateLimitTimeWindow: number | null;
317
+ rateLimitMax: number | null;
318
+ requestCount: number | null;
319
+ remaining: number | null;
320
+ lastRequest: Date | null;
321
+ expiresAt: Date | null;
322
+ createdAt: Date;
323
+ updatedAt: Date;
324
+ permissions: string | null;
325
+ metadata: ({
326
+ user: {
327
+ id: string;
328
+ email: string;
329
+ };
330
+ workspace: {
331
+ id: string;
332
+ title: string;
333
+ };
334
+ } & Record<string, unknown>) | null;
335
+ }[], {
336
+ code?: string | undefined;
337
+ message?: string | undefined;
338
+ }, FetchOptions["throw"] extends true ? true : true>>;
339
+ };
340
+ };
298
341
  } & {
299
342
  handshake: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
300
343
  origin: string;
@@ -4963,6 +5006,38 @@ declare class ApiKeyService {
4963
5006
  limit: number | undefined;
4964
5007
  offset: number | undefined;
4965
5008
  }>;
5009
+ listOrganizationApiKeys(): Promise<{
5010
+ id: string;
5011
+ name: string | null;
5012
+ start: string | null;
5013
+ prefix: string | null;
5014
+ referenceId: string;
5015
+ configId: string | null;
5016
+ refillInterval: number | null;
5017
+ refillAmount: number | null;
5018
+ lastRefillAt: Date | null;
5019
+ enabled: boolean | null;
5020
+ rateLimitEnabled: boolean | null;
5021
+ rateLimitTimeWindow: number | null;
5022
+ rateLimitMax: number | null;
5023
+ requestCount: number | null;
5024
+ remaining: number | null;
5025
+ lastRequest: Date | null;
5026
+ expiresAt: Date | null;
5027
+ createdAt: Date;
5028
+ updatedAt: Date;
5029
+ permissions: string | null;
5030
+ metadata: ({
5031
+ user: {
5032
+ id: string;
5033
+ email: string;
5034
+ };
5035
+ workspace: {
5036
+ id: string;
5037
+ title: string;
5038
+ };
5039
+ } & Record<string, unknown>) | null;
5040
+ }[]>;
4966
5041
  updateApiKey(payload: UpdateApiKeyPayload): Promise<{
4967
5042
  metadata: Record<string, any> | null;
4968
5043
  permissions: {
package/dist/index.mjs CHANGED
@@ -7,7 +7,7 @@ import { defaultStatements } from 'better-auth/plugins/organization/access';
7
7
  import { apiKeyClient } from '@better-auth/api-key/client';
8
8
  export { APIError } from 'better-auth';
9
9
 
10
- const version = "1.11.7";
10
+ const version = "1.12.0";
11
11
 
12
12
  const statements = {
13
13
  ...defaultStatements,
@@ -778,6 +778,9 @@ class ApiKeyService {
778
778
  async listApiKeys() {
779
779
  return await this.client.apiKey.list();
780
780
  }
781
+ async listOrganizationApiKeys() {
782
+ return await this.client.customEndpoints.organizations.apiKeys();
783
+ }
781
784
  async updateApiKey(payload) {
782
785
  return await this.client.apiKey.update({
783
786
  keyId: payload.id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/auth-core",
3
- "version": "1.11.7",
3
+ "version": "1.12.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {