@squadbase/vite-server 0.0.1-build-3 → 0.0.1-build-5
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.d.ts +1 -120
- package/dist/index.js +60 -530
- package/dist/main.js +59 -260
- package/dist/types/data-source.d.ts +14 -9
- package/dist/vite-plugin.js +34 -251
- package/package.json +2 -9
- package/dist/cli/index.d.ts +0 -1
- package/dist/cli/index.js +0 -848
package/dist/index.d.ts
CHANGED
|
@@ -1,125 +1,6 @@
|
|
|
1
1
|
import * as hono_types from 'hono/types';
|
|
2
2
|
import { Hono } from 'hono';
|
|
3
3
|
|
|
4
|
-
interface DatabaseClient {
|
|
5
|
-
query(sql: string, params?: unknown[]): Promise<{
|
|
6
|
-
rows: Record<string, unknown>[];
|
|
7
|
-
}>;
|
|
8
|
-
}
|
|
9
|
-
interface ConnectionEntry {
|
|
10
|
-
connectorType: string;
|
|
11
|
-
envVars: Record<string, string>;
|
|
12
|
-
}
|
|
13
|
-
type ConnectionsMap = Record<string, ConnectionEntry>;
|
|
14
|
-
|
|
15
|
-
interface AirtableClient {
|
|
16
|
-
listRecords(tableIdOrName: string, options?: {
|
|
17
|
-
fields?: string[];
|
|
18
|
-
filterByFormula?: string;
|
|
19
|
-
maxRecords?: number;
|
|
20
|
-
sort?: {
|
|
21
|
-
field: string;
|
|
22
|
-
direction?: "asc" | "desc";
|
|
23
|
-
}[];
|
|
24
|
-
pageSize?: number;
|
|
25
|
-
offset?: string;
|
|
26
|
-
}): Promise<{
|
|
27
|
-
records: AirtableRecord[];
|
|
28
|
-
offset?: string;
|
|
29
|
-
}>;
|
|
30
|
-
getRecord(tableIdOrName: string, recordId: string): Promise<AirtableRecord>;
|
|
31
|
-
}
|
|
32
|
-
interface AirtableRecord {
|
|
33
|
-
id: string;
|
|
34
|
-
fields: Record<string, unknown>;
|
|
35
|
-
createdTime: string;
|
|
36
|
-
}
|
|
37
|
-
declare function createAirtableClient(entry: ConnectionEntry, slug: string): AirtableClient;
|
|
38
|
-
|
|
39
|
-
interface GoogleAnalyticsClient {
|
|
40
|
-
runReport(request: {
|
|
41
|
-
dateRanges: {
|
|
42
|
-
startDate: string;
|
|
43
|
-
endDate: string;
|
|
44
|
-
}[];
|
|
45
|
-
dimensions?: {
|
|
46
|
-
name: string;
|
|
47
|
-
}[];
|
|
48
|
-
metrics: {
|
|
49
|
-
name: string;
|
|
50
|
-
}[];
|
|
51
|
-
limit?: number;
|
|
52
|
-
offset?: number;
|
|
53
|
-
orderBys?: unknown[];
|
|
54
|
-
}): Promise<{
|
|
55
|
-
rows: {
|
|
56
|
-
dimensionValues: {
|
|
57
|
-
value: string;
|
|
58
|
-
}[];
|
|
59
|
-
metricValues: {
|
|
60
|
-
value: string;
|
|
61
|
-
}[];
|
|
62
|
-
}[];
|
|
63
|
-
rowCount: number;
|
|
64
|
-
}>;
|
|
65
|
-
}
|
|
66
|
-
declare function createGoogleAnalyticsClient(entry: ConnectionEntry, slug: string): GoogleAnalyticsClient;
|
|
67
|
-
|
|
68
|
-
interface KintoneClient {
|
|
69
|
-
getRecords(appId: string | number, options?: {
|
|
70
|
-
query?: string;
|
|
71
|
-
fields?: string[];
|
|
72
|
-
totalCount?: boolean;
|
|
73
|
-
}): Promise<{
|
|
74
|
-
records: Record<string, unknown>[];
|
|
75
|
-
totalCount: string | null;
|
|
76
|
-
}>;
|
|
77
|
-
getRecord(appId: string | number, recordId: string | number): Promise<{
|
|
78
|
-
record: Record<string, unknown>;
|
|
79
|
-
}>;
|
|
80
|
-
listApps(options?: {
|
|
81
|
-
ids?: (string | number)[];
|
|
82
|
-
name?: string;
|
|
83
|
-
limit?: number;
|
|
84
|
-
offset?: number;
|
|
85
|
-
}): Promise<{
|
|
86
|
-
apps: Record<string, unknown>[];
|
|
87
|
-
}>;
|
|
88
|
-
}
|
|
89
|
-
declare function createKintoneClient(entry: ConnectionEntry, slug: string): KintoneClient;
|
|
90
|
-
|
|
91
|
-
interface WixStoreClient {
|
|
92
|
-
queryProducts(options?: {
|
|
93
|
-
query?: Record<string, unknown>;
|
|
94
|
-
limit?: number;
|
|
95
|
-
offset?: number;
|
|
96
|
-
}): Promise<{
|
|
97
|
-
products: Record<string, unknown>[];
|
|
98
|
-
totalResults: number;
|
|
99
|
-
}>;
|
|
100
|
-
queryOrders(options?: {
|
|
101
|
-
query?: Record<string, unknown>;
|
|
102
|
-
limit?: number;
|
|
103
|
-
offset?: number;
|
|
104
|
-
}): Promise<{
|
|
105
|
-
orders: Record<string, unknown>[];
|
|
106
|
-
totalResults: number;
|
|
107
|
-
}>;
|
|
108
|
-
}
|
|
109
|
-
declare function createWixStoreClient(entry: ConnectionEntry, slug: string): WixStoreClient;
|
|
110
|
-
|
|
111
|
-
interface DbtClient {
|
|
112
|
-
query(graphqlQuery: string, variables?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
113
|
-
getModels(options?: {
|
|
114
|
-
limit?: number;
|
|
115
|
-
}): Promise<Record<string, unknown>[]>;
|
|
116
|
-
getModelByName(uniqueId: string): Promise<Record<string, unknown> | null>;
|
|
117
|
-
}
|
|
118
|
-
declare function createDbtClient(entry: ConnectionEntry, slug: string): DbtClient;
|
|
119
|
-
|
|
120
|
-
declare const getClient: (connectorSlug?: string, connectorType?: string) => Promise<DatabaseClient>;
|
|
121
|
-
declare const loadConnections: () => ConnectionsMap;
|
|
122
|
-
|
|
123
4
|
declare const app: Hono<hono_types.BlankEnv, hono_types.BlankSchema, "/">;
|
|
124
5
|
|
|
125
|
-
export {
|
|
6
|
+
export { app as default };
|