- App.tsx: full navigation (Auth stack + Main tabs with 5 screens) - Auth: LoginScreen, RegisterScreen, ForgotPasswordScreen - HomeScreen: dashboard with IoT metrics, weather widget, alerts, quick actions, sensors - MapScreen: interactive map with layer toggles (6 layers) - MarketplaceScreen: categories (6), products (5), search - ChatScreen: AI chat with quick prompts (4), bot responses - ProfileScreen: user info, stats, menu (9 items), logout - AlertsScreen: alert list with severity, acknowledge - SensorsScreen: sensor list with type filters (6 types), search - ZonesScreen: zone cards with stats - SettingsScreen: language picker (FR/EN/ES/DE), privacy, about - Stores: iotStore (sensors, zones, alerts), notificationStore, uiStore + i18n - Hooks: useSensors, useAlerts, useNotifications, useLocation - Components: Card, Button, LoadingSpinner, ErrorBoundary, Header - Services: iotService, notificationService (with axios API client) - Utils: formatters (temp, AQI, noise, dates), validators (email, password, IBAN) - Theme: colors.ts with full design system (Blue Ocean palette) - Ditto: fixed MongoDB connection, new JWT secrets, official gateway image
51 lines
2.1 KiB
TypeScript
51 lines
2.1 KiB
TypeScript
import { uninstall } from './certificate-authority';
|
|
import { UserInterface } from './user-interface';
|
|
export { uninstall };
|
|
export interface Options {
|
|
/** Return the CA certificate data? */
|
|
getCaBuffer?: boolean;
|
|
/** Return the path to the CA certificate? */
|
|
getCaPath?: boolean;
|
|
/** If `certutil` is not installed already (for updating nss databases; e.g. firefox), do not attempt to install it */
|
|
skipCertutilInstall?: boolean;
|
|
/** Do not update your systems host file with the domain name of the certificate */
|
|
skipHostsFile?: boolean;
|
|
/** User interface hooks */
|
|
ui?: UserInterface;
|
|
}
|
|
interface ICaBuffer {
|
|
ca: Buffer;
|
|
}
|
|
interface ICaPath {
|
|
caPath: string;
|
|
}
|
|
interface IDomainData {
|
|
key: Buffer;
|
|
cert: Buffer;
|
|
}
|
|
type IReturnCa<O extends Options> = O['getCaBuffer'] extends true ? ICaBuffer : false;
|
|
type IReturnCaPath<O extends Options> = O['getCaPath'] extends true ? ICaPath : false;
|
|
type IReturnData<O extends Options = {}> = (IDomainData) & (IReturnCa<O>) & (IReturnCaPath<O>);
|
|
/**
|
|
* Request an SSL certificate for the given app name signed by the devcert root
|
|
* certificate authority. If devcert has previously generated a certificate for
|
|
* that app name on this machine, it will reuse that certificate.
|
|
*
|
|
* If this is the first time devcert is being run on this machine, it will
|
|
* generate and attempt to install a root certificate authority.
|
|
*
|
|
* Returns a promise that resolves with { key, cert }, where `key` and `cert`
|
|
* are Buffers with the contents of the certificate private key and certificate
|
|
* file, respectively
|
|
*
|
|
* If `options.getCaBuffer` is true, return value will include the ca certificate data
|
|
* as { ca: Buffer }
|
|
*
|
|
* If `options.getCaPath` is true, return value will include the ca certificate path
|
|
* as { caPath: string }
|
|
*/
|
|
export declare function certificateFor<O extends Options>(domain: string, options?: O): Promise<IReturnData<O>>;
|
|
export declare function hasCertificateFor(domain: string): boolean;
|
|
export declare function configuredDomains(): string[];
|
|
export declare function removeDomain(domain: string): void;
|