driftsql 0.0.1 → 1.0.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/client.d.ts DELETED
@@ -1,68 +0,0 @@
1
- import { z } from 'zod';
2
- import { type ResultSet } from '@libsql/client';
3
- declare const optionsSchema: z.ZodObject<{
4
- driver: z.ZodEnum<["libsql"]>;
5
- auth: z.ZodObject<{
6
- url: z.ZodString;
7
- token: z.ZodOptional<z.ZodString>;
8
- }, "strip", z.ZodTypeAny, {
9
- url: string;
10
- token?: string | undefined;
11
- }, {
12
- url: string;
13
- token?: string | undefined;
14
- }>;
15
- }, "strip", z.ZodTypeAny, {
16
- driver: "libsql";
17
- auth: {
18
- url: string;
19
- token?: string | undefined;
20
- };
21
- }, {
22
- driver: "libsql";
23
- auth: {
24
- url: string;
25
- token?: string | undefined;
26
- };
27
- }>;
28
- type Options = z.infer<typeof optionsSchema>;
29
- export declare class DriftClient<T extends Record<string, any>> {
30
- private url;
31
- private token?;
32
- private driver;
33
- private libsqlClient?;
34
- constructor(options: Options);
35
- findMany<K extends keyof T>({ table, where, limit }: {
36
- table: K;
37
- where?: Partial<T[K]>;
38
- limit?: number;
39
- }): Promise<T[K][] | undefined>;
40
- findOne<K extends keyof T>({ table, id }: {
41
- table: K;
42
- id: any;
43
- }): Promise<T[K] | undefined>;
44
- findFirst<K extends keyof T>({ table, where }: {
45
- table: K;
46
- where: Partial<T[K]>;
47
- }): Promise<T[K] | undefined>;
48
- create<K extends keyof T>({ table, data }: {
49
- table: K;
50
- data: Partial<T[K]>;
51
- }): Promise<T[K] | undefined>;
52
- update<K extends keyof T>({ table, where, data }: {
53
- table: K;
54
- where: Partial<T[K]>;
55
- data: Partial<T[K]>;
56
- }): Promise<T[K] | undefined>;
57
- delete<K extends keyof T>({ table, where }: {
58
- table: K;
59
- where: Partial<T[K]>;
60
- }): Promise<T[K] | undefined>;
61
- deleteMany<K extends keyof T>({ table, where }: {
62
- table: K;
63
- where: Partial<T[K]>;
64
- }): Promise<T[K] | undefined>;
65
- sql(strings: TemplateStringsArray, ...values: any[]): Promise<ResultSet | undefined>;
66
- private sanitizeValue;
67
- }
68
- export {};
@@ -1,6 +0,0 @@
1
- import type { Client } from '@libsql/client';
2
- export declare function createLibsql({ table, data, libsqlClient }: {
3
- table: any;
4
- data: any;
5
- libsqlClient: Client;
6
- }): Promise<Partial<import("@libsql/client").Row>>;
@@ -1,5 +0,0 @@
1
- export declare const deleteLibsql: ({ table, where, libsqlClient }: {
2
- table: any;
3
- where: any;
4
- libsqlClient: any;
5
- }) => Promise<Partial<Record<string, any>>>;
@@ -1,5 +0,0 @@
1
- export declare const deleteManyLibsql: ({ table, where, libsqlClient }: {
2
- table: any;
3
- where: any;
4
- libsqlClient: any;
5
- }) => Promise<Partial<Record<string, any>>[]>;
@@ -1,5 +0,0 @@
1
- export declare const findFirstLibsql: ({ table, where, libsqlClient }: {
2
- table: any;
3
- where: any;
4
- libsqlClient: any;
5
- }) => Promise<Partial<Record<string, any>>>;
@@ -1,7 +0,0 @@
1
- import type { Client } from '@libsql/client';
2
- export declare const findManyLibsql: ({ table, where, limit, libsqlClient }: {
3
- table: any;
4
- where?: any;
5
- limit?: number;
6
- libsqlClient: Client;
7
- }) => Promise<Partial<import("@libsql/client").Row>[]>;
@@ -1,5 +0,0 @@
1
- export declare const findOneLibsql: ({ table, id, libsqlClient }: {
2
- table: any;
3
- id: any;
4
- libsqlClient: any;
5
- }) => Promise<Partial<Record<string, any>>>;
@@ -1,6 +0,0 @@
1
- export declare const updateLibsql: ({ table, where, data, libsqlClient }: {
2
- table: any;
3
- where: any;
4
- data: any;
5
- libsqlClient: any;
6
- }) => Promise<Partial<Record<string, any>>>;
@@ -1 +0,0 @@
1
- export declare const cleanSqlRows: <T extends Record<string, any>>(rows: T[]) => Partial<T>[];
package/dist/main.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import { DriftClient } from './client';
2
- export { DriftClient };