@aurabase/aurabase-js 0.7.2 → 0.7.3
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-BPro_SCQ.d.cts → AuraClient-CO_pbnEM.d.cts} +5 -3
- package/dist/{AuraClient-BPro_SCQ.d.ts → AuraClient-CO_pbnEM.d.ts} +5 -3
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/nextjs.d.cts +1 -1
- package/dist/nextjs.d.ts +1 -1
- package/dist/react.d.cts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/ssr.d.cts +1 -1
- package/dist/ssr.d.ts +1 -1
- package/package.json +9 -9
|
@@ -23,6 +23,9 @@ import { StorageService } from '@aurabase/storage';
|
|
|
23
23
|
* const { data } = await aura.db.from('posts').eq('published', true)
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
|
+
type ValidRelationKeys<Relations> = {
|
|
27
|
+
[K in keyof Relations]: [Relations[K]] extends [never] ? never : K;
|
|
28
|
+
}[keyof Relations];
|
|
26
29
|
declare class AuraClient<Database = any, Schema extends GenericSchema = Database extends {
|
|
27
30
|
public: infer S;
|
|
28
31
|
} ? S extends GenericSchema ? S : any : any> implements AuraClientLike {
|
|
@@ -116,9 +119,8 @@ declare class AuraClient<Database = any, Schema extends GenericSchema = Database
|
|
|
116
119
|
* const { data, error } = await aura.from('posts').select('*').limit(10)
|
|
117
120
|
* ```
|
|
118
121
|
*/
|
|
119
|
-
from<TableName extends string &
|
|
120
|
-
from<ViewName extends string &
|
|
121
|
-
from(table: string): AuraQueryBuilder<any, any, any, AuraClientOptionsT>;
|
|
122
|
+
from<TableName extends string & ValidRelationKeys<Schema['Tables']>, Table extends Schema['Tables'][TableName]>(table: TableName): AuraQueryBuilder<Schema, Table, TableName, AuraClientOptionsT>;
|
|
123
|
+
from<ViewName extends string & ValidRelationKeys<Schema['Views']>, View extends Schema['Views'][ViewName]>(view: ViewName): AuraQueryBuilder<Schema, View, ViewName, AuraClientOptionsT>;
|
|
122
124
|
/**
|
|
123
125
|
* Shortcut: call a stored procedure / PostgreSQL function via RPC (Supabase-compatible API).
|
|
124
126
|
* Equivalent to `aura.db.rpc(fn, args, options)`.
|
|
@@ -23,6 +23,9 @@ import { StorageService } from '@aurabase/storage';
|
|
|
23
23
|
* const { data } = await aura.db.from('posts').eq('published', true)
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
|
+
type ValidRelationKeys<Relations> = {
|
|
27
|
+
[K in keyof Relations]: [Relations[K]] extends [never] ? never : K;
|
|
28
|
+
}[keyof Relations];
|
|
26
29
|
declare class AuraClient<Database = any, Schema extends GenericSchema = Database extends {
|
|
27
30
|
public: infer S;
|
|
28
31
|
} ? S extends GenericSchema ? S : any : any> implements AuraClientLike {
|
|
@@ -116,9 +119,8 @@ declare class AuraClient<Database = any, Schema extends GenericSchema = Database
|
|
|
116
119
|
* const { data, error } = await aura.from('posts').select('*').limit(10)
|
|
117
120
|
* ```
|
|
118
121
|
*/
|
|
119
|
-
from<TableName extends string &
|
|
120
|
-
from<ViewName extends string &
|
|
121
|
-
from(table: string): AuraQueryBuilder<any, any, any, AuraClientOptionsT>;
|
|
122
|
+
from<TableName extends string & ValidRelationKeys<Schema['Tables']>, Table extends Schema['Tables'][TableName]>(table: TableName): AuraQueryBuilder<Schema, Table, TableName, AuraClientOptionsT>;
|
|
123
|
+
from<ViewName extends string & ValidRelationKeys<Schema['Views']>, View extends Schema['Views'][ViewName]>(view: ViewName): AuraQueryBuilder<Schema, View, ViewName, AuraClientOptionsT>;
|
|
122
124
|
/**
|
|
123
125
|
* Shortcut: call a stored procedure / PostgreSQL function via RPC (Supabase-compatible API).
|
|
124
126
|
* Equivalent to `aura.db.rpc(fn, args, options)`.
|
package/dist/index.d.cts
CHANGED
|
@@ -7,7 +7,7 @@ export { FunctionsHttpError, FunctionsRelayError, FunctionsResponseType, Functio
|
|
|
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-CO_pbnEM.cjs';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Create a new Aurabase client instance.
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export { FunctionsHttpError, FunctionsRelayError, FunctionsResponseType, Functio
|
|
|
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-CO_pbnEM.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Create a new Aurabase client instance.
|
package/dist/nextjs.d.cts
CHANGED
package/dist/nextjs.d.ts
CHANGED
package/dist/react.d.cts
CHANGED
package/dist/react.d.ts
CHANGED
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-CO_pbnEM.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-CO_pbnEM.js';
|
|
4
4
|
import '@aurabase/ai';
|
|
5
5
|
import '@aurabase/auth';
|
|
6
6
|
import '@aurabase/db';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aurabase/aurabase-js",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"description": "Official JavaScript/TypeScript client for Aurabase BaaS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -77,14 +77,14 @@
|
|
|
77
77
|
"client"
|
|
78
78
|
],
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@aurabase/core": "0.7.
|
|
81
|
-
"@aurabase/auth": "0.7.
|
|
82
|
-
"@aurabase/db": "0.7.
|
|
83
|
-
"@aurabase/
|
|
84
|
-
"@aurabase/
|
|
85
|
-
"@aurabase/functions": "0.7.
|
|
86
|
-
"@aurabase/ai": "0.7.
|
|
87
|
-
"@aurabase/notifications": "0.7.
|
|
80
|
+
"@aurabase/core": "0.7.3",
|
|
81
|
+
"@aurabase/auth": "0.7.3",
|
|
82
|
+
"@aurabase/db": "0.7.3",
|
|
83
|
+
"@aurabase/realtime": "0.7.3",
|
|
84
|
+
"@aurabase/storage": "0.7.3",
|
|
85
|
+
"@aurabase/functions": "0.7.3",
|
|
86
|
+
"@aurabase/ai": "0.7.3",
|
|
87
|
+
"@aurabase/notifications": "0.7.3"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
90
|
"@types/node": "20.14.15",
|