zitejs 0.9.42 → 0.9.44
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/cjs/auth/config.d.ts +4 -0
- package/dist/cjs/auth/constants.d.ts +5 -0
- package/dist/cjs/auth/index.d.ts +18 -0
- package/dist/cjs/backend/index.d.ts +36 -0
- package/dist/cjs/bundle/index.d.ts +1 -0
- package/dist/cjs/bundle/index.js +9 -0
- package/dist/cjs/caller/index.d.ts +7 -0
- package/dist/cjs/check/index.d.ts +1 -0
- package/dist/cjs/cli.d.ts +2 -0
- package/dist/cjs/client/index.d.ts +1273 -0
- package/dist/cjs/dev/index.d.ts +2 -0
- package/dist/cjs/dev/index.js +37 -0
- package/dist/cjs/index.d.ts +3 -0
- package/dist/cjs/internal/env.d.ts +1 -0
- package/dist/cjs/pdf/index.d.ts +9 -0
- package/dist/cjs/runtime/index.d.ts +69 -0
- package/dist/cjs/runtime/index.js +30 -0
- package/dist/cjs/schedules/index.d.ts +16 -0
- package/dist/cjs/sync/index.d.ts +3 -0
- package/dist/cjs/sync/lib.d.ts +55 -0
- package/dist/cjs/sync/lib.js +81 -0
- package/dist/cjs/types/fields.d.ts +552 -0
- package/dist/cjs/types/index.d.ts +2 -0
- package/dist/cjs/types/tables.d.ts +1158 -0
- package/dist/cjs/upload/index.d.ts +6 -0
- package/dist/esm/bundle/index.js +9 -0
- package/dist/esm/dev/index.js +38 -1
- package/dist/esm/runtime/index.d.ts +26 -0
- package/dist/esm/runtime/index.js +29 -0
- package/dist/esm/sync/lib.d.ts +16 -0
- package/dist/esm/sync/lib.js +80 -0
- package/package.json +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const ZITE_APP_EDITOR_HOSTNAME_PREFIX = "zite-editor-";
|
|
2
|
+
export declare const ZITE_APP_ACTION_HOSTNAME_PREFIX = "zite-action-";
|
|
3
|
+
export declare const ZITE_SANDBOX_DOMAINS: readonly ["zite-dev-sandbox.com", "zite-dev-app.com", "zite-sandbox.com", "zite-app.com"];
|
|
4
|
+
export declare const USAGE_TOKEN_QUERY_PARAM = "usageToken";
|
|
5
|
+
export declare const AUTH_SDK_VERSION = "1.0.0";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type User = {
|
|
2
|
+
id: string;
|
|
3
|
+
email: string;
|
|
4
|
+
firstName?: string;
|
|
5
|
+
lastName?: string;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
export declare function useAuth(): {
|
|
9
|
+
user: User | undefined;
|
|
10
|
+
isLoading: boolean;
|
|
11
|
+
loginWithRedirect: (opts?: {
|
|
12
|
+
redirectUrl?: string;
|
|
13
|
+
initialView?: 'login' | 'signup';
|
|
14
|
+
}) => void;
|
|
15
|
+
logout: (options?: {
|
|
16
|
+
returnTo?: string;
|
|
17
|
+
}) => void;
|
|
18
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface ZiteRequestContext {
|
|
2
|
+
user: {
|
|
3
|
+
id: string;
|
|
4
|
+
email: string;
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
};
|
|
7
|
+
userId?: string;
|
|
8
|
+
organizationId?: string;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
export interface ZiteScheduledContext extends ZiteRequestContext {
|
|
12
|
+
scheduledAt: string;
|
|
13
|
+
}
|
|
14
|
+
export declare class ZiteError extends Error {
|
|
15
|
+
statusCode: number;
|
|
16
|
+
constructor(message: string, options?: {
|
|
17
|
+
statusCode?: number;
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
type SchemaLike<T> = {
|
|
21
|
+
_output: T;
|
|
22
|
+
parse: (data: unknown) => T;
|
|
23
|
+
};
|
|
24
|
+
export interface EndpointConfig<TInput = unknown, TOutput = unknown> {
|
|
25
|
+
description?: string;
|
|
26
|
+
inputSchema?: SchemaLike<TInput>;
|
|
27
|
+
outputSchema?: SchemaLike<TOutput>;
|
|
28
|
+
stream?: boolean;
|
|
29
|
+
authenticated?: boolean;
|
|
30
|
+
execute: (params: {
|
|
31
|
+
input: TInput;
|
|
32
|
+
context: ZiteRequestContext | ZiteScheduledContext;
|
|
33
|
+
}) => Promise<TOutput> | TOutput;
|
|
34
|
+
}
|
|
35
|
+
export declare function createEndpoint<TInput = unknown, TOutput = unknown>(config: EndpointConfig<TInput, TOutput>): EndpointConfig<TInput, TOutput>;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function runBundle(): Promise<void>;
|
package/dist/cjs/bundle/index.js
CHANGED
|
@@ -250,6 +250,15 @@ function createAliasPlugin(opts) {
|
|
|
250
250
|
}
|
|
251
251
|
return { path: 'zitejs/db', external: true };
|
|
252
252
|
});
|
|
253
|
+
// Resolve zitejs/integrations to .zite/integrations/airtable.ts
|
|
254
|
+
build.onResolve({ filter: /^zitejs\/integrations$/ }, () => {
|
|
255
|
+
if (opts.baseDir) {
|
|
256
|
+
const intPath = path.resolve(opts.baseDir, '.zite/integrations/airtable.ts');
|
|
257
|
+
if (fs.existsSync(intPath))
|
|
258
|
+
return { path: intPath };
|
|
259
|
+
}
|
|
260
|
+
return { path: 'zitejs/integrations', external: true };
|
|
261
|
+
});
|
|
253
262
|
// zitejs/runtime is NOT in PREBUNDLED_LIBS — it's a thin fetch()
|
|
254
263
|
// wrapper that gets bundled inline by esbuild (no special handling).
|
|
255
264
|
for (const [pkgName, modulePath] of Object.entries(PREBUNDLED_LIBS)) {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface EndpointConfig<TInput = unknown, TOutput = unknown> {
|
|
2
|
+
execute: (params: {
|
|
3
|
+
input: TInput;
|
|
4
|
+
context: unknown;
|
|
5
|
+
}) => Promise<TOutput> | TOutput;
|
|
6
|
+
}
|
|
7
|
+
export declare function createCaller<TInput, TOutput>(endpoint: EndpointConfig<TInput, TOutput>, name: string, flowId?: string): (input: TInput) => Promise<TOutput>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function runCheck(): Promise<void>;
|