zitejs 0.9.43 → 0.9.45
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/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/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/schedules/index.d.ts +16 -0
- package/dist/cjs/sync/index.d.ts +4 -0
- package/dist/cjs/sync/index.js +15 -0
- package/dist/cjs/sync/lib.d.ts +55 -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/sync/index.d.ts +1 -0
- package/dist/esm/sync/index.js +1 -0
- package/package.json +4 -4
|
@@ -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>;
|
|
@@ -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>;
|