@turbofy-ai/app-runtime 0.0.4 → 0.0.6
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/src/dsl.d.ts +1149 -4
- package/dist/src/dsl.js +1641 -22
- package/dist/src/generated/auth-config.d.ts +5 -0
- package/dist/src/lib/auth.d.ts +21 -0
- package/package.json +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const AUTH_ENABLED = false;
|
|
2
|
+
export declare const DEFAULT_LOCALE = "en";
|
|
3
|
+
export declare const LOCALES: string[];
|
|
4
|
+
export declare const DEFAULT_REDIRECT_BY_LOCALE: Record<string, string>;
|
|
5
|
+
export declare const LOGIN_PATH_BY_LOCALE: Record<string, string>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface IAuthResult {
|
|
2
|
+
ok: boolean;
|
|
3
|
+
error?: string;
|
|
4
|
+
/** Signup only: the account was created but needs email confirmation. */
|
|
5
|
+
needsConfirmation?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const login: (email: string, password: string) => Promise<IAuthResult>;
|
|
8
|
+
export declare const signup: (params: {
|
|
9
|
+
email: string;
|
|
10
|
+
password: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
}) => Promise<IAuthResult>;
|
|
13
|
+
export declare const confirmSignup: (email: string, code: string) => Promise<IAuthResult>;
|
|
14
|
+
export declare const logout: () => Promise<IAuthResult>;
|
|
15
|
+
/**
|
|
16
|
+
* Restrict post-auth redirects to same-site relative paths, rejecting
|
|
17
|
+
* protocol-relative URLs (e.g. //attacker.com) which also start with "/".
|
|
18
|
+
* Without a valid `next`, fall back to the app's configured post-login page for
|
|
19
|
+
* the current locale, then the locale home, then the site root.
|
|
20
|
+
*/
|
|
21
|
+
export declare function safeNextPath(next: string | undefined): string;
|