@aurabase/aurabase-js 0.6.0 → 0.6.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.
@@ -28,9 +28,21 @@ declare class AuraClient<Database = any, Schema extends GenericSchema = Database
28
28
  } ? S extends GenericSchema ? S : any : any> implements AuraClientLike {
29
29
  /** URL du projet (`https://<slug>.aurabase.cloud`), sans barre finale. */
30
30
  readonly baseUrl: string;
31
+ /**
32
+ * Clé API du projet (`anon` ou `service_role`) envoyée dans l'en-tête `apikey` ; `null` si aucune n'a été fournie.
33
+ */
31
34
  readonly apiKey: string | null;
35
+ /**
36
+ * Fonction `fetch` utilisée pour toutes les requêtes (celle de `options.fetch`, sinon `globalThis.fetch`).
37
+ */
32
38
  readonly fetchFn: typeof globalThis.fetch;
39
+ /**
40
+ * Magasin de session (jeton d'accès, jeton de rafraîchissement, utilisateur) : mémoire, `localStorage` ou cookies selon le contexte.
41
+ */
33
42
  readonly authStore: BaseAuthStore;
43
+ /**
44
+ * Politique de reprise des requêtes de lecture (`GET`, `HEAD`) sur erreur transitoire : activée ou non, et nombre maximal de reprises.
45
+ */
34
46
  readonly retryConfig: {
35
47
  enabled: boolean;
36
48
  maxRetries: number;
@@ -64,13 +76,34 @@ declare class AuraClient<Database = any, Schema extends GenericSchema = Database
64
76
  * (React Strict Mode / HMR / tests).
65
77
  */
66
78
  dispose(): void;
79
+ /**
80
+ * Service d'authentification : inscription, connexion, session, MFA, OAuth, identités. Créé à la première utilisation.
81
+ */
67
82
  get auth(): AuthService;
83
+ /**
84
+ * API d'administration de l'authentification (utilisateurs, sessions, journal d'audit, modèles d'e-mail).
85
+ * Exige une clé `service_role` et lève une erreur dans un navigateur : utilisez `createAdminClient()` côté serveur.
86
+ */
68
87
  get authAdmin(): AuthAdminService;
88
+ /**
89
+ * Service de base de données : requêtes sur les tables et vues, appels de fonctions SQL (`rpc`), SQL brut.
90
+ */
69
91
  get db(): DatabaseService<Database, Schema>;
92
+ /**
93
+ * Service de stockage : buckets, envoi, téléchargement, URL signées et publiques, transformations d'image.
94
+ */
70
95
  get storage(): StorageService;
96
+ /** Service temps réel : canaux, changements Postgres, diffusion (`broadcast`) et présence. */
71
97
  get realtime(): RealtimeService;
98
+ /**
99
+ * Service Edge Functions : invocation, et gestion des jobs et du cron avec une clé `service_role`.
100
+ */
72
101
  get functions(): FunctionsService;
102
+ /** Service IA : conversation (`chat`), embeddings, RAG (ingestion, requêtes, espaces de noms), recherche sémantique et sessions. */
73
103
  get ai(): AiService;
104
+ /**
105
+ * Service de notifications : envoi (e-mail, SMS, push, webhook), historique, modèles et administration. Exige une clé `service_role`.
106
+ */
74
107
  get notifications(): NotificationsService;
75
108
  /**
76
109
  * Shortcut: query a database table or view (Supabase-compatible API).
@@ -28,9 +28,21 @@ declare class AuraClient<Database = any, Schema extends GenericSchema = Database
28
28
  } ? S extends GenericSchema ? S : any : any> implements AuraClientLike {
29
29
  /** URL du projet (`https://<slug>.aurabase.cloud`), sans barre finale. */
30
30
  readonly baseUrl: string;
31
+ /**
32
+ * Clé API du projet (`anon` ou `service_role`) envoyée dans l'en-tête `apikey` ; `null` si aucune n'a été fournie.
33
+ */
31
34
  readonly apiKey: string | null;
35
+ /**
36
+ * Fonction `fetch` utilisée pour toutes les requêtes (celle de `options.fetch`, sinon `globalThis.fetch`).
37
+ */
32
38
  readonly fetchFn: typeof globalThis.fetch;
39
+ /**
40
+ * Magasin de session (jeton d'accès, jeton de rafraîchissement, utilisateur) : mémoire, `localStorage` ou cookies selon le contexte.
41
+ */
33
42
  readonly authStore: BaseAuthStore;
43
+ /**
44
+ * Politique de reprise des requêtes de lecture (`GET`, `HEAD`) sur erreur transitoire : activée ou non, et nombre maximal de reprises.
45
+ */
34
46
  readonly retryConfig: {
35
47
  enabled: boolean;
36
48
  maxRetries: number;
@@ -64,13 +76,34 @@ declare class AuraClient<Database = any, Schema extends GenericSchema = Database
64
76
  * (React Strict Mode / HMR / tests).
65
77
  */
66
78
  dispose(): void;
79
+ /**
80
+ * Service d'authentification : inscription, connexion, session, MFA, OAuth, identités. Créé à la première utilisation.
81
+ */
67
82
  get auth(): AuthService;
83
+ /**
84
+ * API d'administration de l'authentification (utilisateurs, sessions, journal d'audit, modèles d'e-mail).
85
+ * Exige une clé `service_role` et lève une erreur dans un navigateur : utilisez `createAdminClient()` côté serveur.
86
+ */
68
87
  get authAdmin(): AuthAdminService;
88
+ /**
89
+ * Service de base de données : requêtes sur les tables et vues, appels de fonctions SQL (`rpc`), SQL brut.
90
+ */
69
91
  get db(): DatabaseService<Database, Schema>;
92
+ /**
93
+ * Service de stockage : buckets, envoi, téléchargement, URL signées et publiques, transformations d'image.
94
+ */
70
95
  get storage(): StorageService;
96
+ /** Service temps réel : canaux, changements Postgres, diffusion (`broadcast`) et présence. */
71
97
  get realtime(): RealtimeService;
98
+ /**
99
+ * Service Edge Functions : invocation, et gestion des jobs et du cron avec une clé `service_role`.
100
+ */
72
101
  get functions(): FunctionsService;
102
+ /** Service IA : conversation (`chat`), embeddings, RAG (ingestion, requêtes, espaces de noms), recherche sémantique et sessions. */
73
103
  get ai(): AiService;
104
+ /**
105
+ * Service de notifications : envoi (e-mail, SMS, push, webhook), historique, modèles et administration. Exige une clé `service_role`.
106
+ */
74
107
  get notifications(): NotificationsService;
75
108
  /**
76
109
  * Shortcut: query a database table or view (Supabase-compatible API).
package/dist/index.cjs CHANGED
@@ -21,9 +21,21 @@ var SERVICE_ROLE_KEY_PREFIX = "aura_sk_";
21
21
  var AuraClient = class {
22
22
  /** URL du projet (`https://<slug>.aurabase.cloud`), sans barre finale. */
23
23
  baseUrl;
24
+ /**
25
+ * Clé API du projet (`anon` ou `service_role`) envoyée dans l'en-tête `apikey` ; `null` si aucune n'a été fournie.
26
+ */
24
27
  apiKey;
28
+ /**
29
+ * Fonction `fetch` utilisée pour toutes les requêtes (celle de `options.fetch`, sinon `globalThis.fetch`).
30
+ */
25
31
  fetchFn;
32
+ /**
33
+ * Magasin de session (jeton d'accès, jeton de rafraîchissement, utilisateur) : mémoire, `localStorage` ou cookies selon le contexte.
34
+ */
26
35
  authStore;
36
+ /**
37
+ * Politique de reprise des requêtes de lecture (`GET`, `HEAD`) sur erreur transitoire : activée ou non, et nombre maximal de reprises.
38
+ */
27
39
  retryConfig;
28
40
  /** Timeout par défaut (ms) des requêtes JSON sans signal. `undefined` → défaut core (30s). */
29
41
  requestTimeoutMs;
@@ -111,6 +123,9 @@ var AuraClient = class {
111
123
  this._realtime?.disconnect();
112
124
  }
113
125
  // -- Lazy service getters ---------------------------------------------------
126
+ /**
127
+ * Service d'authentification : inscription, connexion, session, MFA, OAuth, identités. Créé à la première utilisation.
128
+ */
114
129
  get auth() {
115
130
  if (!this._auth) {
116
131
  this._auth = new auth.AuthService(this, {
@@ -130,6 +145,10 @@ var AuraClient = class {
130
145
  }
131
146
  return this._auth;
132
147
  }
148
+ /**
149
+ * API d'administration de l'authentification (utilisateurs, sessions, journal d'audit, modèles d'e-mail).
150
+ * Exige une clé `service_role` et lève une erreur dans un navigateur : utilisez `createAdminClient()` côté serveur.
151
+ */
133
152
  get authAdmin() {
134
153
  if (isBrowserContext()) {
135
154
  throw new Error(
@@ -139,26 +158,40 @@ var AuraClient = class {
139
158
  if (!this._authAdmin) this._authAdmin = new auth.AuthAdminService(this);
140
159
  return this._authAdmin;
141
160
  }
161
+ /**
162
+ * Service de base de données : requêtes sur les tables et vues, appels de fonctions SQL (`rpc`), SQL brut.
163
+ */
142
164
  get db() {
143
165
  if (!this._db) this._db = new db.DatabaseService(this);
144
166
  return this._db;
145
167
  }
168
+ /**
169
+ * Service de stockage : buckets, envoi, téléchargement, URL signées et publiques, transformations d'image.
170
+ */
146
171
  get storage() {
147
172
  if (!this._storage) this._storage = new storage.StorageService(this);
148
173
  return this._storage;
149
174
  }
175
+ /** Service temps réel : canaux, changements Postgres, diffusion (`broadcast`) et présence. */
150
176
  get realtime() {
151
177
  if (!this._realtime) this._realtime = new realtime.RealtimeService(this);
152
178
  return this._realtime;
153
179
  }
180
+ /**
181
+ * Service Edge Functions : invocation, et gestion des jobs et du cron avec une clé `service_role`.
182
+ */
154
183
  get functions() {
155
184
  if (!this._functions) this._functions = new functions.FunctionsService(this);
156
185
  return this._functions;
157
186
  }
187
+ /** Service IA : conversation (`chat`), embeddings, RAG (ingestion, requêtes, espaces de noms), recherche sémantique et sessions. */
158
188
  get ai() {
159
189
  if (!this._ai) this._ai = new ai.AiService(this);
160
190
  return this._ai;
161
191
  }
192
+ /**
193
+ * Service de notifications : envoi (e-mail, SMS, push, webhook), historique, modèles et administration. Exige une clé `service_role`.
194
+ */
162
195
  get notifications() {
163
196
  if (!this._notifications) this._notifications = new notifications.NotificationsService(this);
164
197
  return this._notifications;
package/dist/index.d.cts CHANGED
@@ -1,13 +1,13 @@
1
1
  export { AiService } from '@aurabase/ai';
2
2
  export { AuthAdminService, AuthService, isMfaChallenge } from '@aurabase/auth';
3
3
  import { AuraClientOptions } from '@aurabase/core';
4
- export { AdminCreateUserRequest, AdminUpdateUserRequest, AdminUser, AuditLogEntry, AuraClientOptions, AuraError, AuraErrorCode, AuraObservabilityEvent, AuraResponse, AuthChangePayload, AuthEvent, AuthSettings, AuthSettingsUpdate, BaseAuthStore, BatchSendResponse, BroadcastFilter, BroadcastPayload, BroadcastSendStatus, ChannelConfig, ChatMessage, ChatResponse, CountMode, CreatePgFunctionRequest, CreatePgTriggerRequest, CronJob, EmailTemplateUpdate, EmbedRequest, EmbedResponse, FileEntry, FilterOp, FunctionDef, IdentityInfo, Job, LocalAuthStore, LoginResponse, MagicLinkRequest, Meta, MfaChallenge, MfaEnrollResponse, MfaVerifyRequest, Notification, NotificationAttempt, NotificationDeadLetter, NotificationEvent, NotificationProviderLog, NotificationQueueStats, NotificationRule, NotificationSettings, NotificationStats, NotificationTemplate, NotificationTemplatePreview, OAuthProviderSetting, OAuthSignInOptions, PasswordResetRequest, PgExecutableRole, PgFunctionInfo, PgTriggerInfo, PostgresChangesFilter, PresenceFilter, PresenceInfo, PresenceState, QueryFilter, QueryOptions, RagIngestRequest, RagIngestResponse, RagRequest, RagResponse, RealtimeEvent, RealtimeListenType, RealtimeSubscribeStatus, SchemaColumn, SchemaEnum, SchemaFunction, SchemaFunctionArg, SchemaTable, SemanticSearchResult, SendNotificationRequest, SessionInfo, SignInRequest, SignUpRequest, StorageBucket, TokenPair, UpdateUserRequest, UploadResult, User, isAuraError } from '@aurabase/core';
4
+ export { AdminCreateUserRequest, AdminUpdateUserRequest, AdminUser, AuditLogEntry, AuraClientOptions, AuraError, AuraErrorCode, AuraObservabilityEvent, AuraResponse, AuthChangePayload, AuthEvent, AuthSettings, AuthSettingsUpdate, BaseAuthStore, BatchSendResponse, BroadcastFilter, BroadcastPayload, BroadcastSendStatus, ChannelConfig, ChatMessage, ChatResponse, CountMode, CreatePgFunctionRequest, CreatePgTriggerRequest, CronJob, EmailTemplateUpdate, EmbedRequest, EmbedResponse, FileEntry, FilterOp, FunctionDef, FunctionPermissions, IdentityInfo, Job, LocalAuthStore, LoginResponse, MagicLinkRequest, Meta, MfaChallenge, MfaEnrollResponse, MfaVerifyRequest, Notification, NotificationAttempt, NotificationDeadLetter, NotificationEvent, NotificationProviderLog, NotificationQueueStats, NotificationRule, NotificationSettings, NotificationStats, NotificationTemplate, NotificationTemplatePreview, OAuthProviderSetting, OAuthSignInOptions, PasswordResetRequest, PgExecutableRole, PgFunctionInfo, PgTriggerInfo, PostgresChangesFilter, PresenceFilter, PresenceInfo, PresenceState, QueryFilter, QueryOptions, RagIngestRequest, RagIngestResponse, RagRequest, RagResponse, RealtimeEvent, RealtimeListenType, RealtimeSubscribeStatus, SchemaColumn, SchemaEnum, SchemaFunction, SchemaFunctionArg, SchemaTable, SemanticSearchResult, SendNotificationRequest, SessionInfo, SignInRequest, SignUpRequest, StorageBucket, TokenPair, UpdateUserRequest, UploadResult, User, isAuraError } from '@aurabase/core';
5
5
  export { DatabaseService, QueryBuilder } from '@aurabase/db';
6
6
  export { FunctionsHttpError, FunctionsRelayError, FunctionsResponseType, FunctionsService, isRelayStatus } from '@aurabase/functions';
7
7
  export { NotificationsAdminService, NotificationsService } from '@aurabase/notifications';
8
8
  export { AuraChannel, RealtimeService } from '@aurabase/realtime';
9
9
  export { StorageBucketClient, StorageService } from '@aurabase/storage';
10
- import { A as AuraClient } from './AuraClient-5jDiXjrO.cjs';
10
+ import { A as AuraClient } from './AuraClient-BWdcX_k0.cjs';
11
11
 
12
12
  /**
13
13
  * Create a new Aurabase client instance.
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  export { AiService } from '@aurabase/ai';
2
2
  export { AuthAdminService, AuthService, isMfaChallenge } from '@aurabase/auth';
3
3
  import { AuraClientOptions } from '@aurabase/core';
4
- export { AdminCreateUserRequest, AdminUpdateUserRequest, AdminUser, AuditLogEntry, AuraClientOptions, AuraError, AuraErrorCode, AuraObservabilityEvent, AuraResponse, AuthChangePayload, AuthEvent, AuthSettings, AuthSettingsUpdate, BaseAuthStore, BatchSendResponse, BroadcastFilter, BroadcastPayload, BroadcastSendStatus, ChannelConfig, ChatMessage, ChatResponse, CountMode, CreatePgFunctionRequest, CreatePgTriggerRequest, CronJob, EmailTemplateUpdate, EmbedRequest, EmbedResponse, FileEntry, FilterOp, FunctionDef, IdentityInfo, Job, LocalAuthStore, LoginResponse, MagicLinkRequest, Meta, MfaChallenge, MfaEnrollResponse, MfaVerifyRequest, Notification, NotificationAttempt, NotificationDeadLetter, NotificationEvent, NotificationProviderLog, NotificationQueueStats, NotificationRule, NotificationSettings, NotificationStats, NotificationTemplate, NotificationTemplatePreview, OAuthProviderSetting, OAuthSignInOptions, PasswordResetRequest, PgExecutableRole, PgFunctionInfo, PgTriggerInfo, PostgresChangesFilter, PresenceFilter, PresenceInfo, PresenceState, QueryFilter, QueryOptions, RagIngestRequest, RagIngestResponse, RagRequest, RagResponse, RealtimeEvent, RealtimeListenType, RealtimeSubscribeStatus, SchemaColumn, SchemaEnum, SchemaFunction, SchemaFunctionArg, SchemaTable, SemanticSearchResult, SendNotificationRequest, SessionInfo, SignInRequest, SignUpRequest, StorageBucket, TokenPair, UpdateUserRequest, UploadResult, User, isAuraError } from '@aurabase/core';
4
+ export { AdminCreateUserRequest, AdminUpdateUserRequest, AdminUser, AuditLogEntry, AuraClientOptions, AuraError, AuraErrorCode, AuraObservabilityEvent, AuraResponse, AuthChangePayload, AuthEvent, AuthSettings, AuthSettingsUpdate, BaseAuthStore, BatchSendResponse, BroadcastFilter, BroadcastPayload, BroadcastSendStatus, ChannelConfig, ChatMessage, ChatResponse, CountMode, CreatePgFunctionRequest, CreatePgTriggerRequest, CronJob, EmailTemplateUpdate, EmbedRequest, EmbedResponse, FileEntry, FilterOp, FunctionDef, FunctionPermissions, IdentityInfo, Job, LocalAuthStore, LoginResponse, MagicLinkRequest, Meta, MfaChallenge, MfaEnrollResponse, MfaVerifyRequest, Notification, NotificationAttempt, NotificationDeadLetter, NotificationEvent, NotificationProviderLog, NotificationQueueStats, NotificationRule, NotificationSettings, NotificationStats, NotificationTemplate, NotificationTemplatePreview, OAuthProviderSetting, OAuthSignInOptions, PasswordResetRequest, PgExecutableRole, PgFunctionInfo, PgTriggerInfo, PostgresChangesFilter, PresenceFilter, PresenceInfo, PresenceState, QueryFilter, QueryOptions, RagIngestRequest, RagIngestResponse, RagRequest, RagResponse, RealtimeEvent, RealtimeListenType, RealtimeSubscribeStatus, SchemaColumn, SchemaEnum, SchemaFunction, SchemaFunctionArg, SchemaTable, SemanticSearchResult, SendNotificationRequest, SessionInfo, SignInRequest, SignUpRequest, StorageBucket, TokenPair, UpdateUserRequest, UploadResult, User, isAuraError } from '@aurabase/core';
5
5
  export { DatabaseService, QueryBuilder } from '@aurabase/db';
6
6
  export { FunctionsHttpError, FunctionsRelayError, FunctionsResponseType, FunctionsService, isRelayStatus } from '@aurabase/functions';
7
7
  export { NotificationsAdminService, NotificationsService } from '@aurabase/notifications';
8
8
  export { AuraChannel, RealtimeService } from '@aurabase/realtime';
9
9
  export { StorageBucketClient, StorageService } from '@aurabase/storage';
10
- import { A as AuraClient } from './AuraClient-5jDiXjrO.js';
10
+ import { A as AuraClient } from './AuraClient-BWdcX_k0.js';
11
11
 
12
12
  /**
13
13
  * Create a new Aurabase client instance.
package/dist/index.js CHANGED
@@ -27,9 +27,21 @@ var SERVICE_ROLE_KEY_PREFIX = "aura_sk_";
27
27
  var AuraClient = class {
28
28
  /** URL du projet (`https://<slug>.aurabase.cloud`), sans barre finale. */
29
29
  baseUrl;
30
+ /**
31
+ * Clé API du projet (`anon` ou `service_role`) envoyée dans l'en-tête `apikey` ; `null` si aucune n'a été fournie.
32
+ */
30
33
  apiKey;
34
+ /**
35
+ * Fonction `fetch` utilisée pour toutes les requêtes (celle de `options.fetch`, sinon `globalThis.fetch`).
36
+ */
31
37
  fetchFn;
38
+ /**
39
+ * Magasin de session (jeton d'accès, jeton de rafraîchissement, utilisateur) : mémoire, `localStorage` ou cookies selon le contexte.
40
+ */
32
41
  authStore;
42
+ /**
43
+ * Politique de reprise des requêtes de lecture (`GET`, `HEAD`) sur erreur transitoire : activée ou non, et nombre maximal de reprises.
44
+ */
33
45
  retryConfig;
34
46
  /** Timeout par défaut (ms) des requêtes JSON sans signal. `undefined` → défaut core (30s). */
35
47
  requestTimeoutMs;
@@ -117,6 +129,9 @@ var AuraClient = class {
117
129
  this._realtime?.disconnect();
118
130
  }
119
131
  // -- Lazy service getters ---------------------------------------------------
132
+ /**
133
+ * Service d'authentification : inscription, connexion, session, MFA, OAuth, identités. Créé à la première utilisation.
134
+ */
120
135
  get auth() {
121
136
  if (!this._auth) {
122
137
  this._auth = new AuthService(this, {
@@ -136,6 +151,10 @@ var AuraClient = class {
136
151
  }
137
152
  return this._auth;
138
153
  }
154
+ /**
155
+ * API d'administration de l'authentification (utilisateurs, sessions, journal d'audit, modèles d'e-mail).
156
+ * Exige une clé `service_role` et lève une erreur dans un navigateur : utilisez `createAdminClient()` côté serveur.
157
+ */
139
158
  get authAdmin() {
140
159
  if (isBrowserContext()) {
141
160
  throw new Error(
@@ -145,26 +164,40 @@ var AuraClient = class {
145
164
  if (!this._authAdmin) this._authAdmin = new AuthAdminService(this);
146
165
  return this._authAdmin;
147
166
  }
167
+ /**
168
+ * Service de base de données : requêtes sur les tables et vues, appels de fonctions SQL (`rpc`), SQL brut.
169
+ */
148
170
  get db() {
149
171
  if (!this._db) this._db = new DatabaseService(this);
150
172
  return this._db;
151
173
  }
174
+ /**
175
+ * Service de stockage : buckets, envoi, téléchargement, URL signées et publiques, transformations d'image.
176
+ */
152
177
  get storage() {
153
178
  if (!this._storage) this._storage = new StorageService(this);
154
179
  return this._storage;
155
180
  }
181
+ /** Service temps réel : canaux, changements Postgres, diffusion (`broadcast`) et présence. */
156
182
  get realtime() {
157
183
  if (!this._realtime) this._realtime = new RealtimeService(this);
158
184
  return this._realtime;
159
185
  }
186
+ /**
187
+ * Service Edge Functions : invocation, et gestion des jobs et du cron avec une clé `service_role`.
188
+ */
160
189
  get functions() {
161
190
  if (!this._functions) this._functions = new FunctionsService(this);
162
191
  return this._functions;
163
192
  }
193
+ /** Service IA : conversation (`chat`), embeddings, RAG (ingestion, requêtes, espaces de noms), recherche sémantique et sessions. */
164
194
  get ai() {
165
195
  if (!this._ai) this._ai = new AiService(this);
166
196
  return this._ai;
167
197
  }
198
+ /**
199
+ * Service de notifications : envoi (e-mail, SMS, push, webhook), historique, modèles et administration. Exige une clé `service_role`.
200
+ */
168
201
  get notifications() {
169
202
  if (!this._notifications) this._notifications = new NotificationsService(this);
170
203
  return this._notifications;
package/dist/nextjs.cjs CHANGED
@@ -21,9 +21,21 @@ var SERVICE_ROLE_KEY_PREFIX = "aura_sk_";
21
21
  var AuraClient = class {
22
22
  /** URL du projet (`https://<slug>.aurabase.cloud`), sans barre finale. */
23
23
  baseUrl;
24
+ /**
25
+ * Clé API du projet (`anon` ou `service_role`) envoyée dans l'en-tête `apikey` ; `null` si aucune n'a été fournie.
26
+ */
24
27
  apiKey;
28
+ /**
29
+ * Fonction `fetch` utilisée pour toutes les requêtes (celle de `options.fetch`, sinon `globalThis.fetch`).
30
+ */
25
31
  fetchFn;
32
+ /**
33
+ * Magasin de session (jeton d'accès, jeton de rafraîchissement, utilisateur) : mémoire, `localStorage` ou cookies selon le contexte.
34
+ */
26
35
  authStore;
36
+ /**
37
+ * Politique de reprise des requêtes de lecture (`GET`, `HEAD`) sur erreur transitoire : activée ou non, et nombre maximal de reprises.
38
+ */
27
39
  retryConfig;
28
40
  /** Timeout par défaut (ms) des requêtes JSON sans signal. `undefined` → défaut core (30s). */
29
41
  requestTimeoutMs;
@@ -111,6 +123,9 @@ var AuraClient = class {
111
123
  this._realtime?.disconnect();
112
124
  }
113
125
  // -- Lazy service getters ---------------------------------------------------
126
+ /**
127
+ * Service d'authentification : inscription, connexion, session, MFA, OAuth, identités. Créé à la première utilisation.
128
+ */
114
129
  get auth() {
115
130
  if (!this._auth) {
116
131
  this._auth = new auth$1.AuthService(this, {
@@ -130,6 +145,10 @@ var AuraClient = class {
130
145
  }
131
146
  return this._auth;
132
147
  }
148
+ /**
149
+ * API d'administration de l'authentification (utilisateurs, sessions, journal d'audit, modèles d'e-mail).
150
+ * Exige une clé `service_role` et lève une erreur dans un navigateur : utilisez `createAdminClient()` côté serveur.
151
+ */
133
152
  get authAdmin() {
134
153
  if (isBrowserContext()) {
135
154
  throw new Error(
@@ -139,26 +158,40 @@ var AuraClient = class {
139
158
  if (!this._authAdmin) this._authAdmin = new auth$1.AuthAdminService(this);
140
159
  return this._authAdmin;
141
160
  }
161
+ /**
162
+ * Service de base de données : requêtes sur les tables et vues, appels de fonctions SQL (`rpc`), SQL brut.
163
+ */
142
164
  get db() {
143
165
  if (!this._db) this._db = new db.DatabaseService(this);
144
166
  return this._db;
145
167
  }
168
+ /**
169
+ * Service de stockage : buckets, envoi, téléchargement, URL signées et publiques, transformations d'image.
170
+ */
146
171
  get storage() {
147
172
  if (!this._storage) this._storage = new storage.StorageService(this);
148
173
  return this._storage;
149
174
  }
175
+ /** Service temps réel : canaux, changements Postgres, diffusion (`broadcast`) et présence. */
150
176
  get realtime() {
151
177
  if (!this._realtime) this._realtime = new realtime.RealtimeService(this);
152
178
  return this._realtime;
153
179
  }
180
+ /**
181
+ * Service Edge Functions : invocation, et gestion des jobs et du cron avec une clé `service_role`.
182
+ */
154
183
  get functions() {
155
184
  if (!this._functions) this._functions = new functions.FunctionsService(this);
156
185
  return this._functions;
157
186
  }
187
+ /** Service IA : conversation (`chat`), embeddings, RAG (ingestion, requêtes, espaces de noms), recherche sémantique et sessions. */
158
188
  get ai() {
159
189
  if (!this._ai) this._ai = new ai.AiService(this);
160
190
  return this._ai;
161
191
  }
192
+ /**
193
+ * Service de notifications : envoi (e-mail, SMS, push, webhook), historique, modèles et administration. Exige une clé `service_role`.
194
+ */
162
195
  get notifications() {
163
196
  if (!this._notifications) this._notifications = new notifications.NotificationsService(this);
164
197
  return this._notifications;
package/dist/nextjs.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as AuraClient } from './AuraClient-5jDiXjrO.cjs';
1
+ import { A as AuraClient } from './AuraClient-BWdcX_k0.cjs';
2
2
  import { User, Session } from '@aurabase/core';
3
3
  import '@aurabase/ai';
4
4
  import '@aurabase/auth';
package/dist/nextjs.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as AuraClient } from './AuraClient-5jDiXjrO.js';
1
+ import { A as AuraClient } from './AuraClient-BWdcX_k0.js';
2
2
  import { User, Session } from '@aurabase/core';
3
3
  import '@aurabase/ai';
4
4
  import '@aurabase/auth';
package/dist/nextjs.js CHANGED
@@ -19,9 +19,21 @@ var SERVICE_ROLE_KEY_PREFIX = "aura_sk_";
19
19
  var AuraClient = class {
20
20
  /** URL du projet (`https://<slug>.aurabase.cloud`), sans barre finale. */
21
21
  baseUrl;
22
+ /**
23
+ * Clé API du projet (`anon` ou `service_role`) envoyée dans l'en-tête `apikey` ; `null` si aucune n'a été fournie.
24
+ */
22
25
  apiKey;
26
+ /**
27
+ * Fonction `fetch` utilisée pour toutes les requêtes (celle de `options.fetch`, sinon `globalThis.fetch`).
28
+ */
23
29
  fetchFn;
30
+ /**
31
+ * Magasin de session (jeton d'accès, jeton de rafraîchissement, utilisateur) : mémoire, `localStorage` ou cookies selon le contexte.
32
+ */
24
33
  authStore;
34
+ /**
35
+ * Politique de reprise des requêtes de lecture (`GET`, `HEAD`) sur erreur transitoire : activée ou non, et nombre maximal de reprises.
36
+ */
25
37
  retryConfig;
26
38
  /** Timeout par défaut (ms) des requêtes JSON sans signal. `undefined` → défaut core (30s). */
27
39
  requestTimeoutMs;
@@ -109,6 +121,9 @@ var AuraClient = class {
109
121
  this._realtime?.disconnect();
110
122
  }
111
123
  // -- Lazy service getters ---------------------------------------------------
124
+ /**
125
+ * Service d'authentification : inscription, connexion, session, MFA, OAuth, identités. Créé à la première utilisation.
126
+ */
112
127
  get auth() {
113
128
  if (!this._auth) {
114
129
  this._auth = new AuthService(this, {
@@ -128,6 +143,10 @@ var AuraClient = class {
128
143
  }
129
144
  return this._auth;
130
145
  }
146
+ /**
147
+ * API d'administration de l'authentification (utilisateurs, sessions, journal d'audit, modèles d'e-mail).
148
+ * Exige une clé `service_role` et lève une erreur dans un navigateur : utilisez `createAdminClient()` côté serveur.
149
+ */
131
150
  get authAdmin() {
132
151
  if (isBrowserContext()) {
133
152
  throw new Error(
@@ -137,26 +156,40 @@ var AuraClient = class {
137
156
  if (!this._authAdmin) this._authAdmin = new AuthAdminService(this);
138
157
  return this._authAdmin;
139
158
  }
159
+ /**
160
+ * Service de base de données : requêtes sur les tables et vues, appels de fonctions SQL (`rpc`), SQL brut.
161
+ */
140
162
  get db() {
141
163
  if (!this._db) this._db = new DatabaseService(this);
142
164
  return this._db;
143
165
  }
166
+ /**
167
+ * Service de stockage : buckets, envoi, téléchargement, URL signées et publiques, transformations d'image.
168
+ */
144
169
  get storage() {
145
170
  if (!this._storage) this._storage = new StorageService(this);
146
171
  return this._storage;
147
172
  }
173
+ /** Service temps réel : canaux, changements Postgres, diffusion (`broadcast`) et présence. */
148
174
  get realtime() {
149
175
  if (!this._realtime) this._realtime = new RealtimeService(this);
150
176
  return this._realtime;
151
177
  }
178
+ /**
179
+ * Service Edge Functions : invocation, et gestion des jobs et du cron avec une clé `service_role`.
180
+ */
152
181
  get functions() {
153
182
  if (!this._functions) this._functions = new FunctionsService(this);
154
183
  return this._functions;
155
184
  }
185
+ /** Service IA : conversation (`chat`), embeddings, RAG (ingestion, requêtes, espaces de noms), recherche sémantique et sessions. */
156
186
  get ai() {
157
187
  if (!this._ai) this._ai = new AiService(this);
158
188
  return this._ai;
159
189
  }
190
+ /**
191
+ * Service de notifications : envoi (e-mail, SMS, push, webhook), historique, modèles et administration. Exige une clé `service_role`.
192
+ */
160
193
  get notifications() {
161
194
  if (!this._notifications) this._notifications = new NotificationsService(this);
162
195
  return this._notifications;
package/dist/react.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { User, Session } from '@aurabase/core';
2
- import { A as AuraClient } from './AuraClient-5jDiXjrO.cjs';
2
+ import { A as AuraClient } from './AuraClient-BWdcX_k0.cjs';
3
3
  import '@aurabase/ai';
4
4
  import '@aurabase/auth';
5
5
  import '@aurabase/db';
package/dist/react.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { User, Session } from '@aurabase/core';
2
- import { A as AuraClient } from './AuraClient-5jDiXjrO.js';
2
+ import { A as AuraClient } from './AuraClient-BWdcX_k0.js';
3
3
  import '@aurabase/ai';
4
4
  import '@aurabase/auth';
5
5
  import '@aurabase/db';
package/dist/ssr.cjs CHANGED
@@ -21,9 +21,21 @@ var SERVICE_ROLE_KEY_PREFIX = "aura_sk_";
21
21
  var AuraClient = class {
22
22
  /** URL du projet (`https://<slug>.aurabase.cloud`), sans barre finale. */
23
23
  baseUrl;
24
+ /**
25
+ * Clé API du projet (`anon` ou `service_role`) envoyée dans l'en-tête `apikey` ; `null` si aucune n'a été fournie.
26
+ */
24
27
  apiKey;
28
+ /**
29
+ * Fonction `fetch` utilisée pour toutes les requêtes (celle de `options.fetch`, sinon `globalThis.fetch`).
30
+ */
25
31
  fetchFn;
32
+ /**
33
+ * Magasin de session (jeton d'accès, jeton de rafraîchissement, utilisateur) : mémoire, `localStorage` ou cookies selon le contexte.
34
+ */
26
35
  authStore;
36
+ /**
37
+ * Politique de reprise des requêtes de lecture (`GET`, `HEAD`) sur erreur transitoire : activée ou non, et nombre maximal de reprises.
38
+ */
27
39
  retryConfig;
28
40
  /** Timeout par défaut (ms) des requêtes JSON sans signal. `undefined` → défaut core (30s). */
29
41
  requestTimeoutMs;
@@ -111,6 +123,9 @@ var AuraClient = class {
111
123
  this._realtime?.disconnect();
112
124
  }
113
125
  // -- Lazy service getters ---------------------------------------------------
126
+ /**
127
+ * Service d'authentification : inscription, connexion, session, MFA, OAuth, identités. Créé à la première utilisation.
128
+ */
114
129
  get auth() {
115
130
  if (!this._auth) {
116
131
  this._auth = new auth.AuthService(this, {
@@ -130,6 +145,10 @@ var AuraClient = class {
130
145
  }
131
146
  return this._auth;
132
147
  }
148
+ /**
149
+ * API d'administration de l'authentification (utilisateurs, sessions, journal d'audit, modèles d'e-mail).
150
+ * Exige une clé `service_role` et lève une erreur dans un navigateur : utilisez `createAdminClient()` côté serveur.
151
+ */
133
152
  get authAdmin() {
134
153
  if (isBrowserContext()) {
135
154
  throw new Error(
@@ -139,26 +158,40 @@ var AuraClient = class {
139
158
  if (!this._authAdmin) this._authAdmin = new auth.AuthAdminService(this);
140
159
  return this._authAdmin;
141
160
  }
161
+ /**
162
+ * Service de base de données : requêtes sur les tables et vues, appels de fonctions SQL (`rpc`), SQL brut.
163
+ */
142
164
  get db() {
143
165
  if (!this._db) this._db = new db.DatabaseService(this);
144
166
  return this._db;
145
167
  }
168
+ /**
169
+ * Service de stockage : buckets, envoi, téléchargement, URL signées et publiques, transformations d'image.
170
+ */
146
171
  get storage() {
147
172
  if (!this._storage) this._storage = new storage.StorageService(this);
148
173
  return this._storage;
149
174
  }
175
+ /** Service temps réel : canaux, changements Postgres, diffusion (`broadcast`) et présence. */
150
176
  get realtime() {
151
177
  if (!this._realtime) this._realtime = new realtime.RealtimeService(this);
152
178
  return this._realtime;
153
179
  }
180
+ /**
181
+ * Service Edge Functions : invocation, et gestion des jobs et du cron avec une clé `service_role`.
182
+ */
154
183
  get functions() {
155
184
  if (!this._functions) this._functions = new functions.FunctionsService(this);
156
185
  return this._functions;
157
186
  }
187
+ /** Service IA : conversation (`chat`), embeddings, RAG (ingestion, requêtes, espaces de noms), recherche sémantique et sessions. */
158
188
  get ai() {
159
189
  if (!this._ai) this._ai = new ai.AiService(this);
160
190
  return this._ai;
161
191
  }
192
+ /**
193
+ * Service de notifications : envoi (e-mail, SMS, push, webhook), historique, modèles et administration. Exige une clé `service_role`.
194
+ */
162
195
  get notifications() {
163
196
  if (!this._notifications) this._notifications = new notifications.NotificationsService(this);
164
197
  return this._notifications;
package/dist/ssr.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { SerializeCookieOptions, AuraClientOptions } from '@aurabase/core';
2
2
  export { SerializeCookieOptions, parseCookieHeader, serializeCookieHeader } from '@aurabase/core';
3
- import { A as AuraClient } from './AuraClient-5jDiXjrO.cjs';
3
+ import { A as AuraClient } from './AuraClient-BWdcX_k0.cjs';
4
4
  import '@aurabase/ai';
5
5
  import '@aurabase/auth';
6
6
  import '@aurabase/db';
package/dist/ssr.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { SerializeCookieOptions, AuraClientOptions } from '@aurabase/core';
2
2
  export { SerializeCookieOptions, parseCookieHeader, serializeCookieHeader } from '@aurabase/core';
3
- import { A as AuraClient } from './AuraClient-5jDiXjrO.js';
3
+ import { A as AuraClient } from './AuraClient-BWdcX_k0.js';
4
4
  import '@aurabase/ai';
5
5
  import '@aurabase/auth';
6
6
  import '@aurabase/db';
package/dist/ssr.js CHANGED
@@ -20,9 +20,21 @@ var SERVICE_ROLE_KEY_PREFIX = "aura_sk_";
20
20
  var AuraClient = class {
21
21
  /** URL du projet (`https://<slug>.aurabase.cloud`), sans barre finale. */
22
22
  baseUrl;
23
+ /**
24
+ * Clé API du projet (`anon` ou `service_role`) envoyée dans l'en-tête `apikey` ; `null` si aucune n'a été fournie.
25
+ */
23
26
  apiKey;
27
+ /**
28
+ * Fonction `fetch` utilisée pour toutes les requêtes (celle de `options.fetch`, sinon `globalThis.fetch`).
29
+ */
24
30
  fetchFn;
31
+ /**
32
+ * Magasin de session (jeton d'accès, jeton de rafraîchissement, utilisateur) : mémoire, `localStorage` ou cookies selon le contexte.
33
+ */
25
34
  authStore;
35
+ /**
36
+ * Politique de reprise des requêtes de lecture (`GET`, `HEAD`) sur erreur transitoire : activée ou non, et nombre maximal de reprises.
37
+ */
26
38
  retryConfig;
27
39
  /** Timeout par défaut (ms) des requêtes JSON sans signal. `undefined` → défaut core (30s). */
28
40
  requestTimeoutMs;
@@ -110,6 +122,9 @@ var AuraClient = class {
110
122
  this._realtime?.disconnect();
111
123
  }
112
124
  // -- Lazy service getters ---------------------------------------------------
125
+ /**
126
+ * Service d'authentification : inscription, connexion, session, MFA, OAuth, identités. Créé à la première utilisation.
127
+ */
113
128
  get auth() {
114
129
  if (!this._auth) {
115
130
  this._auth = new AuthService(this, {
@@ -129,6 +144,10 @@ var AuraClient = class {
129
144
  }
130
145
  return this._auth;
131
146
  }
147
+ /**
148
+ * API d'administration de l'authentification (utilisateurs, sessions, journal d'audit, modèles d'e-mail).
149
+ * Exige une clé `service_role` et lève une erreur dans un navigateur : utilisez `createAdminClient()` côté serveur.
150
+ */
132
151
  get authAdmin() {
133
152
  if (isBrowserContext()) {
134
153
  throw new Error(
@@ -138,26 +157,40 @@ var AuraClient = class {
138
157
  if (!this._authAdmin) this._authAdmin = new AuthAdminService(this);
139
158
  return this._authAdmin;
140
159
  }
160
+ /**
161
+ * Service de base de données : requêtes sur les tables et vues, appels de fonctions SQL (`rpc`), SQL brut.
162
+ */
141
163
  get db() {
142
164
  if (!this._db) this._db = new DatabaseService(this);
143
165
  return this._db;
144
166
  }
167
+ /**
168
+ * Service de stockage : buckets, envoi, téléchargement, URL signées et publiques, transformations d'image.
169
+ */
145
170
  get storage() {
146
171
  if (!this._storage) this._storage = new StorageService(this);
147
172
  return this._storage;
148
173
  }
174
+ /** Service temps réel : canaux, changements Postgres, diffusion (`broadcast`) et présence. */
149
175
  get realtime() {
150
176
  if (!this._realtime) this._realtime = new RealtimeService(this);
151
177
  return this._realtime;
152
178
  }
179
+ /**
180
+ * Service Edge Functions : invocation, et gestion des jobs et du cron avec une clé `service_role`.
181
+ */
153
182
  get functions() {
154
183
  if (!this._functions) this._functions = new FunctionsService(this);
155
184
  return this._functions;
156
185
  }
186
+ /** Service IA : conversation (`chat`), embeddings, RAG (ingestion, requêtes, espaces de noms), recherche sémantique et sessions. */
157
187
  get ai() {
158
188
  if (!this._ai) this._ai = new AiService(this);
159
189
  return this._ai;
160
190
  }
191
+ /**
192
+ * Service de notifications : envoi (e-mail, SMS, push, webhook), historique, modèles et administration. Exige une clé `service_role`.
193
+ */
161
194
  get notifications() {
162
195
  if (!this._notifications) this._notifications = new NotificationsService(this);
163
196
  return this._notifications;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurabase/aurabase-js",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Official JavaScript/TypeScript client for Aurabase BaaS",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -76,14 +76,14 @@
76
76
  "client"
77
77
  ],
78
78
  "dependencies": {
79
- "@aurabase/core": "0.6.0",
80
- "@aurabase/storage": "0.6.0",
81
- "@aurabase/db": "0.6.0",
82
- "@aurabase/auth": "0.6.0",
83
- "@aurabase/functions": "0.6.0",
84
- "@aurabase/ai": "0.6.0",
85
- "@aurabase/notifications": "0.6.0",
86
- "@aurabase/realtime": "0.6.0"
79
+ "@aurabase/realtime": "0.6.1",
80
+ "@aurabase/functions": "0.6.1",
81
+ "@aurabase/ai": "0.6.1",
82
+ "@aurabase/storage": "0.6.1",
83
+ "@aurabase/notifications": "0.6.1",
84
+ "@aurabase/db": "0.6.1",
85
+ "@aurabase/core": "0.6.1",
86
+ "@aurabase/auth": "0.6.1"
87
87
  },
88
88
  "devDependencies": {
89
89
  "@types/node": "20.14.15",