@lambda-development/erp-core 0.1.34 → 0.1.36
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/api/client.d.ts +22 -0
- package/dist/contexts/auth-context.d.ts +2 -0
- package/dist/i18n/locales/de.json.d.ts +19 -0
- package/dist/i18n/locales/en.json.d.ts +19 -0
- package/dist/i18n/locales/fr.json.d.ts +19 -0
- package/dist/index.js +1599 -1406
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/api/client.d.ts
CHANGED
|
@@ -247,6 +247,7 @@ export declare const api: {
|
|
|
247
247
|
authLogout: () => Promise<any>;
|
|
248
248
|
authMe: () => Promise<any>;
|
|
249
249
|
authChangePassword: (current_password: string, new_password: string) => Promise<any>;
|
|
250
|
+
authSetPassword: (new_password: string) => Promise<any>;
|
|
250
251
|
authInvite: (email: string, role: string) => Promise<any>;
|
|
251
252
|
authListUsers: () => Promise<any[]>;
|
|
252
253
|
authChangeRole: (userName: string, role: string) => Promise<any>;
|
|
@@ -261,6 +262,27 @@ export declare const api: {
|
|
|
261
262
|
removePublicManager: () => Promise<any>;
|
|
262
263
|
getSettings: () => Promise<Record<string, string>>;
|
|
263
264
|
updateSettings: (data: Record<string, string>) => Promise<Record<string, string>>;
|
|
265
|
+
getApiKeys: () => Promise<{
|
|
266
|
+
id: string;
|
|
267
|
+
name: string;
|
|
268
|
+
role: string;
|
|
269
|
+
key_prefix: string;
|
|
270
|
+
created_by?: string;
|
|
271
|
+
created_at?: string;
|
|
272
|
+
last_used_at?: string | null;
|
|
273
|
+
revoked: boolean;
|
|
274
|
+
}[]>;
|
|
275
|
+
createApiKey: (name: string, role: string) => Promise<{
|
|
276
|
+
id: string;
|
|
277
|
+
name: string;
|
|
278
|
+
role: string;
|
|
279
|
+
key_prefix: string;
|
|
280
|
+
token: string;
|
|
281
|
+
}>;
|
|
282
|
+
revokeApiKey: (id: string) => Promise<{
|
|
283
|
+
id: string;
|
|
284
|
+
revoked: boolean;
|
|
285
|
+
}>;
|
|
264
286
|
getDemoSpend: () => Promise<{
|
|
265
287
|
caps: {
|
|
266
288
|
global_hourly_usd: number;
|
|
@@ -4,6 +4,7 @@ export interface User {
|
|
|
4
4
|
email: string;
|
|
5
5
|
full_name: string;
|
|
6
6
|
role: "admin" | "manager" | "viewer" | "public_manager";
|
|
7
|
+
has_password?: boolean;
|
|
7
8
|
}
|
|
8
9
|
interface AuthContextValue {
|
|
9
10
|
user: User | null;
|
|
@@ -11,6 +12,7 @@ interface AuthContextValue {
|
|
|
11
12
|
login: (email: string, password: string) => Promise<User>;
|
|
12
13
|
register: (email: string, fullName: string, password: string, inviteToken?: string) => Promise<User>;
|
|
13
14
|
logout: () => Promise<void>;
|
|
15
|
+
refreshUser: () => Promise<void>;
|
|
14
16
|
}
|
|
15
17
|
export declare function AuthProvider({ children }: {
|
|
16
18
|
children: ReactNode;
|
|
@@ -187,6 +187,10 @@ declare const _default: {
|
|
|
187
187
|
"changePassword": "Passwort ändern",
|
|
188
188
|
"changingPassword": "Wird geändert...",
|
|
189
189
|
"passwordChanged": "Passwort geändert.",
|
|
190
|
+
"setPasswordTitle": "Passwort festlegen",
|
|
191
|
+
"setPasswordBody": "Ihr Konto meldet sich mit Google an. Legen Sie ein Passwort fest, um sich auch mit E-Mail und Passwort anzumelden — ein praktischer Rückfall, falls Sie den Zugang zu Ihrem Google-Konto verlieren.",
|
|
192
|
+
"setPassword": "Passwort festlegen",
|
|
193
|
+
"passwordSet": "Passwort festgelegt.",
|
|
190
194
|
"linkedAccountsTitle": "Verknüpfte Konten",
|
|
191
195
|
"linkedAccountsBody": "Verknüpfen Sie ein Google- oder Apple-Konto, um sich ohne Passwort anzumelden.",
|
|
192
196
|
"linked": "Verknüpft",
|
|
@@ -199,6 +203,21 @@ declare const _default: {
|
|
|
199
203
|
"signupBody": "Erlauben Sie es jedem, ohne Einladung ein eigenes Konto (als Betrachter) zu erstellen. Wenn deaktiviert, können neue Benutzer nur über einen Einladungslink beitreten.",
|
|
200
204
|
"signupEnabled": "Derzeit aktiviert — jeder mit der URL kann sich als Betrachter registrieren.",
|
|
201
205
|
"signupDisabled": "Derzeit deaktiviert — die Registrierung erfolgt nur per Einladung.",
|
|
206
|
+
"chatApiTitle": "Chat-API",
|
|
207
|
+
"chatApiBody": "Externen Anwendungen erlauben, über eine HTTP-API mit dem Chat-Agenten dieses ERPs zu sprechen — per Bearer-API-Schlüssel. Standardmäßig deaktiviert.",
|
|
208
|
+
"chatApiEnabled": "Derzeit aktiviert — ausgestellte Schlüssel können POST /api/v1/chat aufrufen.",
|
|
209
|
+
"chatApiDisabled": "Derzeit deaktiviert — die API liefert 404 und Schlüssel funktionieren nicht.",
|
|
210
|
+
"chatApiKeysTitle": "API-Schlüssel",
|
|
211
|
+
"chatApiTokenOnce": "Kopieren Sie diesen Token jetzt — er wird nicht erneut angezeigt.",
|
|
212
|
+
"chatApiCopy": "Kopieren",
|
|
213
|
+
"chatApiDismiss": "Schließen",
|
|
214
|
+
"chatApiRevoked": "widerrufen",
|
|
215
|
+
"chatApiRevoke": "Widerrufen",
|
|
216
|
+
"chatApiNoKeys": "Noch keine API-Schlüssel.",
|
|
217
|
+
"chatApiName": "Name",
|
|
218
|
+
"chatApiRole": "Rolle",
|
|
219
|
+
"chatApiCreate": "Schlüssel erstellen",
|
|
220
|
+
"chatApiWarn": "Ein Schlüssel handelt mit seiner gewählten Rolle. Ein Manager-Schlüssel kann per Chat Belege erstellen und stornieren — behandeln Sie ihn wie ein Passwort.",
|
|
202
221
|
"publicTitle": "Öffentlicher Zugriff (Demomodus)",
|
|
203
222
|
"publicActive": "Aktiv",
|
|
204
223
|
"publicActiveBody": "Der öffentliche Zugriff ist aktiviert. Jeder kann die Anwendung ohne Anmeldung nutzen. Alle Besucher erhalten Manager-Rechte.",
|
|
@@ -250,6 +250,10 @@ declare const _default: {
|
|
|
250
250
|
"changePassword": "Change password",
|
|
251
251
|
"changingPassword": "Changing...",
|
|
252
252
|
"passwordChanged": "Password changed.",
|
|
253
|
+
"setPasswordTitle": "Set a Password",
|
|
254
|
+
"setPasswordBody": "Your account signs in with Google. Set a password to also sign in with email and password — a handy fallback if you ever lose access to your Google account.",
|
|
255
|
+
"setPassword": "Set password",
|
|
256
|
+
"passwordSet": "Password set.",
|
|
253
257
|
"linkedAccountsTitle": "Linked Accounts",
|
|
254
258
|
"linkedAccountsBody": "Link a Google or Apple account to sign in without a password.",
|
|
255
259
|
"linked": "Linked",
|
|
@@ -262,6 +266,21 @@ declare const _default: {
|
|
|
262
266
|
"signupBody": "Allow anyone to create their own account (as a viewer) without an invite. When off, new users can only join via an invite link.",
|
|
263
267
|
"signupEnabled": "Currently enabled — anyone with the URL can register as a viewer.",
|
|
264
268
|
"signupDisabled": "Currently disabled — registration is invite-only.",
|
|
269
|
+
"chatApiTitle": "Chat API",
|
|
270
|
+
"chatApiBody": "Let external applications talk to this ERP's chat agent over an HTTP API, using Bearer API keys. Off by default.",
|
|
271
|
+
"chatApiEnabled": "Currently enabled — issued keys can call POST /api/v1/chat.",
|
|
272
|
+
"chatApiDisabled": "Currently disabled — the API returns 404 and keys don't work.",
|
|
273
|
+
"chatApiKeysTitle": "API keys",
|
|
274
|
+
"chatApiTokenOnce": "Copy this token now — it won't be shown again.",
|
|
275
|
+
"chatApiCopy": "Copy",
|
|
276
|
+
"chatApiDismiss": "Dismiss",
|
|
277
|
+
"chatApiRevoked": "revoked",
|
|
278
|
+
"chatApiRevoke": "Revoke",
|
|
279
|
+
"chatApiNoKeys": "No API keys yet.",
|
|
280
|
+
"chatApiName": "Name",
|
|
281
|
+
"chatApiRole": "Role",
|
|
282
|
+
"chatApiCreate": "Create key",
|
|
283
|
+
"chatApiWarn": "A key acts with its chosen role. A manager key can create and cancel documents through chat — treat it like a password.",
|
|
265
284
|
"publicTitle": "Public Access (Demo Mode)",
|
|
266
285
|
"publicActive": "Active",
|
|
267
286
|
"publicActiveBody": "Public access is enabled. Anyone can use the application without logging in. All visitors get manager-level permissions.",
|
|
@@ -187,6 +187,10 @@ declare const _default: {
|
|
|
187
187
|
"changePassword": "Changer le mot de passe",
|
|
188
188
|
"changingPassword": "Modification...",
|
|
189
189
|
"passwordChanged": "Mot de passe modifié.",
|
|
190
|
+
"setPasswordTitle": "Définir un mot de passe",
|
|
191
|
+
"setPasswordBody": "Votre compte se connecte avec Google. Définissez un mot de passe pour vous connecter aussi avec e-mail et mot de passe — un recours pratique si vous perdez l'accès à votre compte Google.",
|
|
192
|
+
"setPassword": "Définir le mot de passe",
|
|
193
|
+
"passwordSet": "Mot de passe défini.",
|
|
190
194
|
"linkedAccountsTitle": "Comptes liés",
|
|
191
195
|
"linkedAccountsBody": "Liez un compte Google ou Apple pour vous connecter sans mot de passe.",
|
|
192
196
|
"linked": "Lié",
|
|
@@ -199,6 +203,21 @@ declare const _default: {
|
|
|
199
203
|
"signupBody": "Permettre à quiconque de créer son propre compte (en tant que lecteur) sans invitation. Lorsque désactivé, les nouveaux utilisateurs ne peuvent rejoindre que via un lien d'invitation.",
|
|
200
204
|
"signupEnabled": "Actuellement activé — toute personne disposant de l'URL peut s'inscrire en tant que lecteur.",
|
|
201
205
|
"signupDisabled": "Actuellement désactivé — l'inscription se fait uniquement sur invitation.",
|
|
206
|
+
"chatApiTitle": "API de chat",
|
|
207
|
+
"chatApiBody": "Permettre à des applications externes de dialoguer avec l'agent de chat de cet ERP via une API HTTP, à l'aide de clés API Bearer. Désactivé par défaut.",
|
|
208
|
+
"chatApiEnabled": "Actuellement activé — les clés émises peuvent appeler POST /api/v1/chat.",
|
|
209
|
+
"chatApiDisabled": "Actuellement désactivé — l'API renvoie 404 et les clés ne fonctionnent pas.",
|
|
210
|
+
"chatApiKeysTitle": "Clés API",
|
|
211
|
+
"chatApiTokenOnce": "Copiez ce jeton maintenant — il ne sera plus affiché.",
|
|
212
|
+
"chatApiCopy": "Copier",
|
|
213
|
+
"chatApiDismiss": "Fermer",
|
|
214
|
+
"chatApiRevoked": "révoquée",
|
|
215
|
+
"chatApiRevoke": "Révoquer",
|
|
216
|
+
"chatApiNoKeys": "Aucune clé API pour l'instant.",
|
|
217
|
+
"chatApiName": "Nom",
|
|
218
|
+
"chatApiRole": "Rôle",
|
|
219
|
+
"chatApiCreate": "Créer une clé",
|
|
220
|
+
"chatApiWarn": "Une clé agit avec le rôle choisi. Une clé « manager » peut créer et annuler des documents via le chat — traitez-la comme un mot de passe.",
|
|
202
221
|
"publicTitle": "Accès public (mode démo)",
|
|
203
222
|
"publicActive": "Actif",
|
|
204
223
|
"publicActiveBody": "L'accès public est activé. N'importe qui peut utiliser l'application sans se connecter. Tous les visiteurs obtiennent des autorisations de niveau gestionnaire.",
|