@supacloud/js 0.46.0 → 0.47.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.cjs +2 -2
- package/dist/index.d.cts +27 -46
- package/dist/index.d.mts +27 -46
- package/dist/index.mjs +2 -2
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -4920,14 +4920,14 @@ function createSupaCloudClient(options) {
|
|
|
4920
4920
|
invokeBackground: (functionName, submitOptions) => tasks.submit(functionName, submitOptions)
|
|
4921
4921
|
}
|
|
4922
4922
|
};
|
|
4923
|
-
|
|
4923
|
+
const withClient = (apiClient) => {
|
|
4924
4924
|
return {
|
|
4925
4925
|
...instance,
|
|
4926
4926
|
procedures: createProcedureClient(apiClient),
|
|
4927
4927
|
queryAdapter: (adapterOptions) => createQueryAdapter(apiClient, adapterOptions),
|
|
4928
4928
|
withClient
|
|
4929
4929
|
};
|
|
4930
|
-
}
|
|
4930
|
+
};
|
|
4931
4931
|
return {
|
|
4932
4932
|
...instance,
|
|
4933
4933
|
procedures: options.apiClient === undefined ? undefined : createProcedureClient(options.apiClient),
|
package/dist/index.d.cts
CHANGED
|
@@ -6,8 +6,8 @@ import { SupaCloudApiError } from "./api-error.cjs";
|
|
|
6
6
|
import { type FetchTransport } from "./bounded-rpc-fetch.cjs";
|
|
7
7
|
import { SupaCloudOAuthClientsClient } from "./oauth-clients.cjs";
|
|
8
8
|
import { SupaCloudOAuthServerClient } from "./oauth-server.cjs";
|
|
9
|
-
import { type RealtimeChannelConfig, type RealtimeTransport, type SupaCloudRealtimeChannel } from "./realtime.cjs";
|
|
10
|
-
import { type ProcedureSource, type ProceduresOf, type QueryAdapterOptions } from "@supacloud/query";
|
|
9
|
+
import { type RealtimeChannelConfig, type RealtimeTransport, type SupaCloudRealtimeChannel, type SupaCloudRealtimeAdapter } from "./realtime.cjs";
|
|
10
|
+
import { createQueryAdapter, type ProcedureSource, type ProceduresOf, type QueryAdapterOptions } from "@supacloud/query";
|
|
11
11
|
export { createProcedureClient, createQueryAdapter, createQueryKey, invalidateByTags, type QueryAdapter, type QueryAdapterOptions, } from "@supacloud/query";
|
|
12
12
|
import { type SupaCloudQueueJson, type SupaCloudQueueMessage, type SupaCloudQueueSendResult, type SupaCloudQueueIdempotentSendResult, type SupaCloudQueueMutationResult } from "./queue-rpc.cjs";
|
|
13
13
|
export { SupaCloudApiError } from "./api-error.cjs";
|
|
@@ -353,50 +353,31 @@ declare class SupaCloudQueuesClient<TClient extends SupabaseClient = SupabaseCli
|
|
|
353
353
|
create(queueName: string, options?: SupaCloudQueueCreateOptions): Promise<SupaCloudQueueInfo>;
|
|
354
354
|
drop(queueName: string): Promise<void>;
|
|
355
355
|
}
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
oauthServer: SupaCloudOAuthServerClient;
|
|
364
|
-
oauthClients: SupaCloudOAuthClientsClient;
|
|
356
|
+
type SupaCloudClientBase<TClient extends SupabaseClient> = {
|
|
357
|
+
readonly supabase: TClient;
|
|
358
|
+
readonly projectRef: string;
|
|
359
|
+
readonly managementApiUrl: string;
|
|
360
|
+
readonly auth: {
|
|
361
|
+
readonly oauthServer: SupaCloudOAuthServerClient;
|
|
362
|
+
readonly oauthClients: SupaCloudOAuthClientsClient;
|
|
365
363
|
};
|
|
366
|
-
tasks: SupaCloudTasksClient<TClient>;
|
|
367
|
-
workflows: SupaCloudWorkflowsClient<TClient>;
|
|
368
|
-
commands: SupaCloudCommandsClient<TClient>;
|
|
369
|
-
artifacts: SupaCloudArtifactsClient<TClient>;
|
|
370
|
-
queues: SupaCloudQueuesClient<TClient>;
|
|
371
|
-
realtime:
|
|
372
|
-
channel
|
|
373
|
-
queue
|
|
374
|
-
functions: {
|
|
375
|
-
invokeBackground
|
|
376
|
-
};
|
|
377
|
-
procedures: TApiClient extends ProcedureSource ? ProceduresOf<TApiClient> : undefined;
|
|
378
|
-
queryAdapter: (adapterOptions: QueryAdapterOptions) => import("@supacloud/query").QueryAdapter<TApiClient & {}>;
|
|
379
|
-
withClient: <T extends ProcedureSource>(apiClient: T) => {
|
|
380
|
-
supabase: TClient;
|
|
381
|
-
projectRef: string;
|
|
382
|
-
managementApiUrl: string;
|
|
383
|
-
auth: {
|
|
384
|
-
oauthServer: SupaCloudOAuthServerClient;
|
|
385
|
-
oauthClients: SupaCloudOAuthClientsClient;
|
|
386
|
-
};
|
|
387
|
-
tasks: SupaCloudTasksClient<TClient>;
|
|
388
|
-
workflows: SupaCloudWorkflowsClient<TClient>;
|
|
389
|
-
commands: SupaCloudCommandsClient<TClient>;
|
|
390
|
-
artifacts: SupaCloudArtifactsClient<TClient>;
|
|
391
|
-
queues: SupaCloudQueuesClient<TClient>;
|
|
392
|
-
realtime: import("./realtime.cjs").SupaCloudRealtimeAdapter;
|
|
393
|
-
channel: (topic: string, config?: RealtimeChannelConfig) => SupaCloudRealtimeChannel;
|
|
394
|
-
queue: (name: string) => SupaCloudQueueClient<TClient>;
|
|
395
|
-
functions: {
|
|
396
|
-
invokeBackground: (functionName: string, submitOptions?: SupaCloudTaskSubmitOptions) => Promise<SupaCloudTaskReceipt<unknown>>;
|
|
397
|
-
};
|
|
398
|
-
procedures: ProceduresOf<T>;
|
|
399
|
-
queryAdapter: (adapterOptions: QueryAdapterOptions) => import("@supacloud/query").QueryAdapter<T>;
|
|
400
|
-
withClient: /*elided*/ any;
|
|
364
|
+
readonly tasks: SupaCloudTasksClient<TClient>;
|
|
365
|
+
readonly workflows: SupaCloudWorkflowsClient<TClient>;
|
|
366
|
+
readonly commands: SupaCloudCommandsClient<TClient>;
|
|
367
|
+
readonly artifacts: SupaCloudArtifactsClient<TClient>;
|
|
368
|
+
readonly queues: SupaCloudQueuesClient<TClient>;
|
|
369
|
+
readonly realtime: SupaCloudRealtimeAdapter;
|
|
370
|
+
channel(topic: string, config?: RealtimeChannelConfig): SupaCloudRealtimeChannel;
|
|
371
|
+
queue(name: string): SupaCloudQueueClient<TClient>;
|
|
372
|
+
readonly functions: {
|
|
373
|
+
invokeBackground(functionName: string, submitOptions?: SupaCloudTaskSubmitOptions): Promise<SupaCloudTaskReceipt<unknown>>;
|
|
401
374
|
};
|
|
402
375
|
};
|
|
376
|
+
type SupaCloudClientWithProcedures<TClient extends SupabaseClient, TProcedures> = SupaCloudClientBase<TClient> & {
|
|
377
|
+
readonly procedures: TProcedures;
|
|
378
|
+
queryAdapter(options: QueryAdapterOptions): ReturnType<typeof createQueryAdapter>;
|
|
379
|
+
withClient<T extends ProcedureSource>(apiClient: T): SupaCloudClientWithProcedures<TClient, ProceduresOf<T>>;
|
|
380
|
+
};
|
|
381
|
+
export declare function createSupaCloudClient<TClient extends SupabaseClient = SupabaseClient, TApiClient extends ProcedureSource | undefined = undefined>(options: SupaCloudClientOptions<TClient> & {
|
|
382
|
+
apiClient?: TApiClient;
|
|
383
|
+
}): SupaCloudClientWithProcedures<TClient, TApiClient extends ProcedureSource ? ProceduresOf<TApiClient> : undefined>;
|
package/dist/index.d.mts
CHANGED
|
@@ -6,8 +6,8 @@ import { SupaCloudApiError } from "./api-error.mjs";
|
|
|
6
6
|
import { type FetchTransport } from "./bounded-rpc-fetch.mjs";
|
|
7
7
|
import { SupaCloudOAuthClientsClient } from "./oauth-clients.mjs";
|
|
8
8
|
import { SupaCloudOAuthServerClient } from "./oauth-server.mjs";
|
|
9
|
-
import { type RealtimeChannelConfig, type RealtimeTransport, type SupaCloudRealtimeChannel } from "./realtime.mjs";
|
|
10
|
-
import { type ProcedureSource, type ProceduresOf, type QueryAdapterOptions } from "@supacloud/query";
|
|
9
|
+
import { type RealtimeChannelConfig, type RealtimeTransport, type SupaCloudRealtimeChannel, type SupaCloudRealtimeAdapter } from "./realtime.mjs";
|
|
10
|
+
import { createQueryAdapter, type ProcedureSource, type ProceduresOf, type QueryAdapterOptions } from "@supacloud/query";
|
|
11
11
|
export { createProcedureClient, createQueryAdapter, createQueryKey, invalidateByTags, type QueryAdapter, type QueryAdapterOptions, } from "@supacloud/query";
|
|
12
12
|
import { type SupaCloudQueueJson, type SupaCloudQueueMessage, type SupaCloudQueueSendResult, type SupaCloudQueueIdempotentSendResult, type SupaCloudQueueMutationResult } from "./queue-rpc.mjs";
|
|
13
13
|
export { SupaCloudApiError } from "./api-error.mjs";
|
|
@@ -353,50 +353,31 @@ declare class SupaCloudQueuesClient<TClient extends SupabaseClient = SupabaseCli
|
|
|
353
353
|
create(queueName: string, options?: SupaCloudQueueCreateOptions): Promise<SupaCloudQueueInfo>;
|
|
354
354
|
drop(queueName: string): Promise<void>;
|
|
355
355
|
}
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
oauthServer: SupaCloudOAuthServerClient;
|
|
364
|
-
oauthClients: SupaCloudOAuthClientsClient;
|
|
356
|
+
type SupaCloudClientBase<TClient extends SupabaseClient> = {
|
|
357
|
+
readonly supabase: TClient;
|
|
358
|
+
readonly projectRef: string;
|
|
359
|
+
readonly managementApiUrl: string;
|
|
360
|
+
readonly auth: {
|
|
361
|
+
readonly oauthServer: SupaCloudOAuthServerClient;
|
|
362
|
+
readonly oauthClients: SupaCloudOAuthClientsClient;
|
|
365
363
|
};
|
|
366
|
-
tasks: SupaCloudTasksClient<TClient>;
|
|
367
|
-
workflows: SupaCloudWorkflowsClient<TClient>;
|
|
368
|
-
commands: SupaCloudCommandsClient<TClient>;
|
|
369
|
-
artifacts: SupaCloudArtifactsClient<TClient>;
|
|
370
|
-
queues: SupaCloudQueuesClient<TClient>;
|
|
371
|
-
realtime:
|
|
372
|
-
channel
|
|
373
|
-
queue
|
|
374
|
-
functions: {
|
|
375
|
-
invokeBackground
|
|
376
|
-
};
|
|
377
|
-
procedures: TApiClient extends ProcedureSource ? ProceduresOf<TApiClient> : undefined;
|
|
378
|
-
queryAdapter: (adapterOptions: QueryAdapterOptions) => import("@supacloud/query").QueryAdapter<TApiClient & {}>;
|
|
379
|
-
withClient: <T extends ProcedureSource>(apiClient: T) => {
|
|
380
|
-
supabase: TClient;
|
|
381
|
-
projectRef: string;
|
|
382
|
-
managementApiUrl: string;
|
|
383
|
-
auth: {
|
|
384
|
-
oauthServer: SupaCloudOAuthServerClient;
|
|
385
|
-
oauthClients: SupaCloudOAuthClientsClient;
|
|
386
|
-
};
|
|
387
|
-
tasks: SupaCloudTasksClient<TClient>;
|
|
388
|
-
workflows: SupaCloudWorkflowsClient<TClient>;
|
|
389
|
-
commands: SupaCloudCommandsClient<TClient>;
|
|
390
|
-
artifacts: SupaCloudArtifactsClient<TClient>;
|
|
391
|
-
queues: SupaCloudQueuesClient<TClient>;
|
|
392
|
-
realtime: import("./realtime.mjs").SupaCloudRealtimeAdapter;
|
|
393
|
-
channel: (topic: string, config?: RealtimeChannelConfig) => SupaCloudRealtimeChannel;
|
|
394
|
-
queue: (name: string) => SupaCloudQueueClient<TClient>;
|
|
395
|
-
functions: {
|
|
396
|
-
invokeBackground: (functionName: string, submitOptions?: SupaCloudTaskSubmitOptions) => Promise<SupaCloudTaskReceipt<unknown>>;
|
|
397
|
-
};
|
|
398
|
-
procedures: ProceduresOf<T>;
|
|
399
|
-
queryAdapter: (adapterOptions: QueryAdapterOptions) => import("@supacloud/query").QueryAdapter<T>;
|
|
400
|
-
withClient: /*elided*/ any;
|
|
364
|
+
readonly tasks: SupaCloudTasksClient<TClient>;
|
|
365
|
+
readonly workflows: SupaCloudWorkflowsClient<TClient>;
|
|
366
|
+
readonly commands: SupaCloudCommandsClient<TClient>;
|
|
367
|
+
readonly artifacts: SupaCloudArtifactsClient<TClient>;
|
|
368
|
+
readonly queues: SupaCloudQueuesClient<TClient>;
|
|
369
|
+
readonly realtime: SupaCloudRealtimeAdapter;
|
|
370
|
+
channel(topic: string, config?: RealtimeChannelConfig): SupaCloudRealtimeChannel;
|
|
371
|
+
queue(name: string): SupaCloudQueueClient<TClient>;
|
|
372
|
+
readonly functions: {
|
|
373
|
+
invokeBackground(functionName: string, submitOptions?: SupaCloudTaskSubmitOptions): Promise<SupaCloudTaskReceipt<unknown>>;
|
|
401
374
|
};
|
|
402
375
|
};
|
|
376
|
+
type SupaCloudClientWithProcedures<TClient extends SupabaseClient, TProcedures> = SupaCloudClientBase<TClient> & {
|
|
377
|
+
readonly procedures: TProcedures;
|
|
378
|
+
queryAdapter(options: QueryAdapterOptions): ReturnType<typeof createQueryAdapter>;
|
|
379
|
+
withClient<T extends ProcedureSource>(apiClient: T): SupaCloudClientWithProcedures<TClient, ProceduresOf<T>>;
|
|
380
|
+
};
|
|
381
|
+
export declare function createSupaCloudClient<TClient extends SupabaseClient = SupabaseClient, TApiClient extends ProcedureSource | undefined = undefined>(options: SupaCloudClientOptions<TClient> & {
|
|
382
|
+
apiClient?: TApiClient;
|
|
383
|
+
}): SupaCloudClientWithProcedures<TClient, TApiClient extends ProcedureSource ? ProceduresOf<TApiClient> : undefined>;
|
package/dist/index.mjs
CHANGED
|
@@ -4824,14 +4824,14 @@ function createSupaCloudClient(options) {
|
|
|
4824
4824
|
invokeBackground: (functionName, submitOptions) => tasks.submit(functionName, submitOptions)
|
|
4825
4825
|
}
|
|
4826
4826
|
};
|
|
4827
|
-
|
|
4827
|
+
const withClient = (apiClient) => {
|
|
4828
4828
|
return {
|
|
4829
4829
|
...instance,
|
|
4830
4830
|
procedures: createProcedureClient(apiClient),
|
|
4831
4831
|
queryAdapter: (adapterOptions) => createQueryAdapter(apiClient, adapterOptions),
|
|
4832
4832
|
withClient
|
|
4833
4833
|
};
|
|
4834
|
-
}
|
|
4834
|
+
};
|
|
4835
4835
|
return {
|
|
4836
4836
|
...instance,
|
|
4837
4837
|
procedures: options.apiClient === undefined ? undefined : createProcedureClient(options.apiClient),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supacloud/js",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.0",
|
|
4
4
|
"description": "Platform SDK for SupaCloud, built on top of supabase-js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -116,14 +116,14 @@
|
|
|
116
116
|
}
|
|
117
117
|
},
|
|
118
118
|
"dependencies": {
|
|
119
|
-
"@supacloud/contracts": "0.
|
|
120
|
-
"@supacloud/query": "0.
|
|
119
|
+
"@supacloud/contracts": "0.16.0",
|
|
120
|
+
"@supacloud/query": "0.6.0",
|
|
121
121
|
"rxjs": "7.8.2"
|
|
122
122
|
},
|
|
123
123
|
"devDependencies": {
|
|
124
124
|
"@types/bun": "^1.4.4",
|
|
125
125
|
"@supabase/supabase-js": "^2.118.0",
|
|
126
|
-
"typescript": "
|
|
126
|
+
"typescript": "7.1.0-beta",
|
|
127
127
|
"@tanstack/query-core": "5.105.0",
|
|
128
128
|
"@tanstack/svelte-query": "6.3.6",
|
|
129
129
|
"typebox": "1.4.3",
|