@aurabase/aurabase-js 0.5.4 → 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.
- package/dist/{AuraClient-5jDiXjrO.d.cts → AuraClient-BWdcX_k0.d.cts} +33 -0
- package/dist/{AuraClient-5jDiXjrO.d.ts → AuraClient-BWdcX_k0.d.ts} +33 -0
- package/dist/index.cjs +45 -0
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +34 -1
- package/dist/nextjs.cjs +33 -0
- package/dist/nextjs.d.cts +1 -1
- package/dist/nextjs.d.ts +1 -1
- package/dist/nextjs.js +33 -0
- package/dist/react.d.cts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/ssr.cjs +33 -0
- package/dist/ssr.d.cts +1 -1
- package/dist/ssr.d.ts +1 -1
- package/dist/ssr.js +33 -0
- package/package.json +9 -9
|
@@ -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;
|
|
@@ -268,10 +301,22 @@ Object.defineProperty(exports, "QueryBuilder", {
|
|
|
268
301
|
enumerable: true,
|
|
269
302
|
get: function () { return db.QueryBuilder; }
|
|
270
303
|
});
|
|
304
|
+
Object.defineProperty(exports, "FunctionsHttpError", {
|
|
305
|
+
enumerable: true,
|
|
306
|
+
get: function () { return functions.FunctionsHttpError; }
|
|
307
|
+
});
|
|
308
|
+
Object.defineProperty(exports, "FunctionsRelayError", {
|
|
309
|
+
enumerable: true,
|
|
310
|
+
get: function () { return functions.FunctionsRelayError; }
|
|
311
|
+
});
|
|
271
312
|
Object.defineProperty(exports, "FunctionsService", {
|
|
272
313
|
enumerable: true,
|
|
273
314
|
get: function () { return functions.FunctionsService; }
|
|
274
315
|
});
|
|
316
|
+
Object.defineProperty(exports, "isRelayStatus", {
|
|
317
|
+
enumerable: true,
|
|
318
|
+
get: function () { return functions.isRelayStatus; }
|
|
319
|
+
});
|
|
275
320
|
Object.defineProperty(exports, "NotificationsAdminService", {
|
|
276
321
|
enumerable: true,
|
|
277
322
|
get: function () { return notifications.NotificationsAdminService; }
|
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
|
-
export { FunctionsService } from '@aurabase/functions';
|
|
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-
|
|
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
|
-
export { FunctionsService } from '@aurabase/functions';
|
|
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-
|
|
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
|
@@ -7,7 +7,7 @@ export { AuraError, BaseAuthStore, LocalAuthStore, isAuraError } from '@aurabase
|
|
|
7
7
|
import { DatabaseService } from '@aurabase/db';
|
|
8
8
|
export { DatabaseService, QueryBuilder } from '@aurabase/db';
|
|
9
9
|
import { FunctionsService } from '@aurabase/functions';
|
|
10
|
-
export { FunctionsService } from '@aurabase/functions';
|
|
10
|
+
export { FunctionsHttpError, FunctionsRelayError, FunctionsService, isRelayStatus } from '@aurabase/functions';
|
|
11
11
|
import { NotificationsService } from '@aurabase/notifications';
|
|
12
12
|
export { NotificationsAdminService, NotificationsService } from '@aurabase/notifications';
|
|
13
13
|
import { RealtimeService } from '@aurabase/realtime';
|
|
@@ -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
package/dist/nextjs.d.ts
CHANGED
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
package/dist/react.d.ts
CHANGED
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-
|
|
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-
|
|
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.
|
|
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/
|
|
80
|
-
"@aurabase/
|
|
81
|
-
"@aurabase/
|
|
82
|
-
"@aurabase/
|
|
83
|
-
"@aurabase/
|
|
84
|
-
"@aurabase/
|
|
85
|
-
"@aurabase/
|
|
86
|
-
"@aurabase/
|
|
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",
|