@iotopen/react-lynx 1.0.0 → 1.0.2-rc.1
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/README.md +1 -1
- package/dist/{cjs/Contexts → Contexts}/LynxClientProvider.d.ts +5 -4
- package/dist/Contexts/LynxProvider.d.ts +9 -0
- package/dist/{esm/Contexts → Contexts}/UserProvider.d.ts +2 -2
- package/dist/{esm/Contexts → Contexts}/index.d.ts +2 -2
- package/dist/{cjs/Hooks → Hooks}/index.d.ts +42 -26
- package/dist/Hooks/useCheckPermissions.d.ts +4 -0
- package/dist/{cjs/Hooks → Hooks}/useDevice.d.ts +4 -4
- package/dist/Hooks/useDevices.d.ts +9 -0
- package/dist/{esm/Hooks → Hooks}/useEdgeApp.d.ts +1 -1
- package/dist/{esm/Hooks → Hooks}/useFunction.d.ts +1 -1
- package/dist/Hooks/useFunctions.d.ts +9 -0
- package/dist/{cjs/Hooks → Hooks}/useInstallation.d.ts +1 -1
- package/dist/Hooks/useLiveInstallation.d.ts +10 -0
- package/dist/Hooks/useMQTT.d.ts +1 -0
- package/dist/Hooks/useMultiLiveInstallation.d.ts +11 -0
- package/dist/{esm/Hooks → Hooks}/useNewDevice.d.ts +4 -4
- package/dist/{esm/Hooks → Hooks}/useNewFunction.d.ts +4 -4
- package/dist/{esm/Hooks → Hooks}/useNewInstallation.d.ts +4 -4
- package/dist/{esm/Hooks → Hooks}/useNewNotificationMessage.d.ts +4 -4
- package/dist/{cjs/Hooks → Hooks}/useNewNotificationOutput.d.ts +4 -4
- package/dist/{esm/Hooks → Hooks}/useNewOAuth2Client.d.ts +4 -4
- package/dist/{esm/Hooks → Hooks}/useNewOrganization.d.ts +4 -4
- package/dist/{cjs/Hooks → Hooks}/useNewUser.d.ts +7 -8
- package/dist/{cjs/Hooks → Hooks}/useNotificationMessage.d.ts +1 -1
- package/dist/{esm/Hooks → Hooks}/useNotificationOutput.d.ts +1 -1
- package/dist/{cjs/Hooks → Hooks}/useNotificationOutputExecutor.d.ts +1 -1
- package/dist/{cjs/Hooks → Hooks}/useOAuth2Client.d.ts +2 -2
- package/dist/Hooks/useOAuth2Consent.d.ts +5 -0
- package/dist/{cjs/Hooks → Hooks}/useOrganization.d.ts +2 -2
- package/dist/{cjs/Hooks → Hooks}/useOrganizations.d.ts +3 -3
- package/dist/{esm/Hooks → Hooks}/usePahoMQTTClient.d.ts +2 -2
- package/dist/Hooks/useSimpleMQTT.d.ts +18 -0
- package/dist/{cjs/Hooks → Hooks}/useTokens.d.ts +1 -1
- package/dist/{esm/Hooks → Hooks}/useUser.d.ts +2 -2
- package/dist/{esm/Hooks → Hooks}/useUsers.d.ts +1 -1
- package/dist/cjs/index.js +1 -16
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +1427 -16
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +2 -439
- package/package.json +91 -48
- package/dist/cjs/Contexts/LynxProvider.d.ts +0 -8
- package/dist/cjs/Contexts/UserProvider.d.ts +0 -19
- package/dist/cjs/Contexts/index.d.ts +0 -3
- package/dist/cjs/Hooks/useDevices.d.ts +0 -10
- package/dist/cjs/Hooks/useEdgeApp.d.ts +0 -8
- package/dist/cjs/Hooks/useFunction.d.ts +0 -15
- package/dist/cjs/Hooks/useFunctions.d.ts +0 -10
- package/dist/cjs/Hooks/useNewDevice.d.ts +0 -12
- package/dist/cjs/Hooks/useNewFunction.d.ts +0 -12
- package/dist/cjs/Hooks/useNewInstallation.d.ts +0 -12
- package/dist/cjs/Hooks/useNewNotificationMessage.d.ts +0 -11
- package/dist/cjs/Hooks/useNewOAuth2Client.d.ts +0 -22
- package/dist/cjs/Hooks/useNewOrganization.d.ts +0 -18
- package/dist/cjs/Hooks/useNotificationOutput.d.ts +0 -10
- package/dist/cjs/Hooks/useOAuth2Consent.d.ts +0 -5
- package/dist/cjs/Hooks/usePahoMQTTClient.d.ts +0 -16
- package/dist/cjs/Hooks/useSimpleMQTT.d.ts +0 -12
- package/dist/cjs/Hooks/useUser.d.ts +0 -10
- package/dist/cjs/Hooks/useUsers.d.ts +0 -8
- package/dist/cjs/index.d.ts +0 -2
- package/dist/esm/Contexts/LynxClientProvider.d.ts +0 -14
- package/dist/esm/Contexts/LynxProvider.d.ts +0 -8
- package/dist/esm/Hooks/index.d.ts +0 -38
- package/dist/esm/Hooks/useConfiguredEdgeApps.d.ts +0 -7
- package/dist/esm/Hooks/useDevice.d.ts +0 -15
- package/dist/esm/Hooks/useDevices.d.ts +0 -10
- package/dist/esm/Hooks/useEdgeAppVersions.d.ts +0 -8
- package/dist/esm/Hooks/useEdgeApps.d.ts +0 -7
- package/dist/esm/Hooks/useFunctions.d.ts +0 -10
- package/dist/esm/Hooks/useIDTokenAlgorithms.d.ts +0 -7
- package/dist/esm/Hooks/useInstallation.d.ts +0 -9
- package/dist/esm/Hooks/useInstallationInfo.d.ts +0 -7
- package/dist/esm/Hooks/useInstallations.d.ts +0 -7
- package/dist/esm/Hooks/useMeta.d.ts +0 -15
- package/dist/esm/Hooks/useNewNotificationOutput.d.ts +0 -15
- package/dist/esm/Hooks/useNewUser.d.ts +0 -27
- package/dist/esm/Hooks/useNotificationMessage.d.ts +0 -10
- package/dist/esm/Hooks/useNotificationMessages.d.ts +0 -7
- package/dist/esm/Hooks/useNotificationOutputExecutor.d.ts +0 -8
- package/dist/esm/Hooks/useNotificationOutputExecutors.d.ts +0 -7
- package/dist/esm/Hooks/useNotificationOutputs.d.ts +0 -7
- package/dist/esm/Hooks/useOAuth2Client.d.ts +0 -10
- package/dist/esm/Hooks/useOAuth2Clients.d.ts +0 -7
- package/dist/esm/Hooks/useOAuth2Consent.d.ts +0 -5
- package/dist/esm/Hooks/useOrganization.d.ts +0 -10
- package/dist/esm/Hooks/useOrganizations.d.ts +0 -9
- package/dist/esm/Hooks/useRoles.d.ts +0 -7
- package/dist/esm/Hooks/useSimpleMQTT.d.ts +0 -12
- package/dist/esm/Hooks/useTokens.d.ts +0 -9
- package/dist/esm/index.d.ts +0 -2
- package/dist/esm/types.d.ts +0 -1
- /package/dist/{cjs/Hooks → Hooks}/useConfiguredEdgeApps.d.ts +0 -0
- /package/dist/{cjs/Hooks → Hooks}/useEdgeAppVersions.d.ts +0 -0
- /package/dist/{cjs/Hooks → Hooks}/useEdgeApps.d.ts +0 -0
- /package/dist/{cjs/Hooks → Hooks}/useIDTokenAlgorithms.d.ts +0 -0
- /package/dist/{cjs/Hooks → Hooks}/useInstallationInfo.d.ts +0 -0
- /package/dist/{cjs/Hooks → Hooks}/useInstallations.d.ts +0 -0
- /package/dist/{cjs/Hooks → Hooks}/useMeta.d.ts +0 -0
- /package/dist/{cjs/Hooks → Hooks}/useNotificationMessages.d.ts +0 -0
- /package/dist/{cjs/Hooks → Hooks}/useNotificationOutputExecutors.d.ts +0 -0
- /package/dist/{cjs/Hooks → Hooks}/useNotificationOutputs.d.ts +0 -0
- /package/dist/{cjs/Hooks → Hooks}/useOAuth2Clients.d.ts +0 -0
- /package/dist/{cjs/Hooks → Hooks}/useRoles.d.ts +0 -0
- /package/dist/{cjs/types.d.ts → types.d.ts} +0 -0
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { EmptyFunctionx, Metadata } from '@iotopen/node-lynx';
|
|
2
|
-
export type FunctionTemplate = {
|
|
3
|
-
type?: string;
|
|
4
|
-
meta?: Metadata;
|
|
5
|
-
protected_meta?: Metadata;
|
|
6
|
-
};
|
|
7
|
-
export declare const useNewFunction: (installationId: number | string, template?: FunctionTemplate) => {
|
|
8
|
-
newFunction: EmptyFunctionx;
|
|
9
|
-
setNewFunction: import("react").Dispatch<import("react").SetStateAction<EmptyFunctionx>>;
|
|
10
|
-
create: () => Promise<import("@iotopen/node-lynx").Functionx>;
|
|
11
|
-
setType: (t: string) => void;
|
|
12
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { EmptyInstallation, Metadata } from '@iotopen/node-lynx';
|
|
2
|
-
export type InstallationTemplate = {
|
|
3
|
-
name?: string;
|
|
4
|
-
notes?: string;
|
|
5
|
-
meta?: Metadata;
|
|
6
|
-
protected_meta?: Metadata;
|
|
7
|
-
};
|
|
8
|
-
export declare const useNewInstallation: (organizationId: number | string, template?: InstallationTemplate) => {
|
|
9
|
-
newInstallation: EmptyInstallation;
|
|
10
|
-
setNewInstallation: import("react").Dispatch<import("react").SetStateAction<EmptyInstallation>>;
|
|
11
|
-
create: () => Promise<import("@iotopen/node-lynx").Installation>;
|
|
12
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { EmptyNotificationMessage } from '@iotopen/node-lynx';
|
|
2
|
-
export type NotificationMessageTemplate = {
|
|
3
|
-
installation_id?: number;
|
|
4
|
-
name?: string;
|
|
5
|
-
text?: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const useNewNotificationMessage: (installationId: number | string, template?: NotificationMessageTemplate) => {
|
|
8
|
-
newNotificationMessage: EmptyNotificationMessage;
|
|
9
|
-
setNewNotificationMessage: import("react").Dispatch<import("react").SetStateAction<EmptyNotificationMessage>>;
|
|
10
|
-
create: () => Promise<import("@iotopen/node-lynx").NotificationMessage>;
|
|
11
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { EmptyOAuth2Client } from '@iotopen/node-lynx';
|
|
2
|
-
export type OAuth2ClientTemplate = {
|
|
3
|
-
name?: string;
|
|
4
|
-
trusted?: boolean;
|
|
5
|
-
allowed_scopes?: string[];
|
|
6
|
-
icon_uri?: string;
|
|
7
|
-
tos_uri?: string;
|
|
8
|
-
policy_uri?: string;
|
|
9
|
-
redirect_uris?: string[];
|
|
10
|
-
id_token_alg?: string;
|
|
11
|
-
};
|
|
12
|
-
export declare const useNewOAuth2Client: (template?: OAuth2ClientTemplate) => {
|
|
13
|
-
newClient: EmptyOAuth2Client;
|
|
14
|
-
create: () => Promise<import("@iotopen/node-lynx").OAuth2Client>;
|
|
15
|
-
setName: (name: string) => void;
|
|
16
|
-
setScope: (scopes: string[]) => void;
|
|
17
|
-
setIconURI: (uri: string) => void;
|
|
18
|
-
setTosURI: (uri: string) => void;
|
|
19
|
-
setPolicyURI: (uri: string) => void;
|
|
20
|
-
setRedirectURIs: (uris: string[]) => void;
|
|
21
|
-
setClient: import("react").Dispatch<import("react").SetStateAction<EmptyOAuth2Client>>;
|
|
22
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Address, EmptyOrganization, Metadata, OrganizationChild } from '@iotopen/node-lynx';
|
|
2
|
-
export type OrganizationTemplate = {
|
|
3
|
-
address?: Address;
|
|
4
|
-
children?: OrganizationChild[];
|
|
5
|
-
email?: string;
|
|
6
|
-
force_sms_login?: boolean;
|
|
7
|
-
phone?: string;
|
|
8
|
-
name?: string;
|
|
9
|
-
notes?: string;
|
|
10
|
-
password_valid_days?: number;
|
|
11
|
-
meta?: Metadata;
|
|
12
|
-
protected_meta?: Metadata;
|
|
13
|
-
};
|
|
14
|
-
export declare const useNewOrganization: (parentId: number | string, template?: OrganizationTemplate) => {
|
|
15
|
-
newOrganization: EmptyOrganization;
|
|
16
|
-
setNewOrganization: import("react").Dispatch<import("react").SetStateAction<EmptyOrganization>>;
|
|
17
|
-
create: () => Promise<import("@iotopen/node-lynx").Organization>;
|
|
18
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ErrorResponse, NotificationOutput } from '@iotopen/node-lynx';
|
|
2
|
-
export declare const useNotificationOutput: (installationId: number | string, notificationId: number | string) => {
|
|
3
|
-
refresh: () => void;
|
|
4
|
-
output: NotificationOutput;
|
|
5
|
-
setOutput: import("react").Dispatch<import("react").SetStateAction<NotificationOutput>>;
|
|
6
|
-
error: ErrorResponse | undefined;
|
|
7
|
-
loading: boolean;
|
|
8
|
-
remove: () => void;
|
|
9
|
-
update: () => void;
|
|
10
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import Paho, { Qos, TypedArray } from 'paho-mqtt';
|
|
2
|
-
interface MQTTHandlers {
|
|
3
|
-
onMessage?: Paho.OnMessageHandler;
|
|
4
|
-
onDelivery?: Paho.OnMessageHandler;
|
|
5
|
-
onConnected?: Paho.OnConnectHandler;
|
|
6
|
-
onDisconnect?: Paho.OnConnectionLostHandler;
|
|
7
|
-
}
|
|
8
|
-
export declare const usePahoMQTTClient: (uri: string, handlers?: MQTTHandlers, connectionOptions?: Paho.ConnectionOptions, clientId?: string) => {
|
|
9
|
-
client: import("react").MutableRefObject<Paho.Client>;
|
|
10
|
-
connected: boolean;
|
|
11
|
-
error: Paho.MQTTError | undefined;
|
|
12
|
-
sub: (topic: string, qos?: Qos) => Promise<Paho.Qos>;
|
|
13
|
-
pub: (topic: string, payload: string | TypedArray, qos?: Qos, retained?: boolean) => void;
|
|
14
|
-
unsub: (topic: string) => Promise<void>;
|
|
15
|
-
};
|
|
16
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import Paho, { Qos } from 'paho-mqtt';
|
|
2
|
-
export type Binding = (topic: string, payload: string, qos: Qos, retained: boolean) => void;
|
|
3
|
-
export declare const useSimpleMQTT: (uri?: string, username?: string, password?: string) => {
|
|
4
|
-
setSubs: (s: string[]) => void;
|
|
5
|
-
error: Paho.MQTTError | undefined;
|
|
6
|
-
connected: boolean;
|
|
7
|
-
bind: (topic: RegExp | string, binder: Binding) => void;
|
|
8
|
-
unbind: (binder: Binding) => void;
|
|
9
|
-
bindExact: (topic: string, binder: Binding) => void;
|
|
10
|
-
unbindExact: (topic: string, binder: Binding) => void;
|
|
11
|
-
pub: (topic: string, payload: string | Paho.TypedArray, qos?: Paho.Qos | undefined, retained?: boolean | undefined) => void;
|
|
12
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { User } from '@iotopen/node-lynx';
|
|
2
|
-
export declare const useUser: (userId: number | string) => {
|
|
3
|
-
loading: boolean;
|
|
4
|
-
error: Error | undefined;
|
|
5
|
-
user: User;
|
|
6
|
-
setUser: import("react").Dispatch<import("react").SetStateAction<User>>;
|
|
7
|
-
update: () => Promise<User>;
|
|
8
|
-
refresh: () => void;
|
|
9
|
-
remove: () => Promise<import("@iotopen/node-lynx").OKResponse>;
|
|
10
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Metadata, User } from '@iotopen/node-lynx';
|
|
2
|
-
export declare const useUsers: (filter?: Metadata) => {
|
|
3
|
-
users: User[];
|
|
4
|
-
setUsers: import("react").Dispatch<import("react").SetStateAction<User[]>>;
|
|
5
|
-
refresh: () => void;
|
|
6
|
-
loading: boolean;
|
|
7
|
-
error: Error | undefined;
|
|
8
|
-
};
|
package/dist/cjs/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { LynxClient } from '@iotopen/node-lynx';
|
|
3
|
-
interface lynxClientContext {
|
|
4
|
-
lynxClient: LynxClient;
|
|
5
|
-
newLynxClient: (url: string, apiKey?: string) => void;
|
|
6
|
-
}
|
|
7
|
-
interface LynxClientProviderProps {
|
|
8
|
-
children?: ReactNode;
|
|
9
|
-
url?: string;
|
|
10
|
-
apiKey?: string;
|
|
11
|
-
}
|
|
12
|
-
export declare const LynxClientProvider: ({ children, url, apiKey }: LynxClientProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export declare const useGlobalLynxClient: () => lynxClientContext;
|
|
14
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
type LynxProviderProps = {
|
|
3
|
-
apiURL?: string;
|
|
4
|
-
apiKey?: string;
|
|
5
|
-
children?: ReactNode;
|
|
6
|
-
};
|
|
7
|
-
export declare const LynxProvider: ({ children, apiURL, apiKey }: LynxProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export * from './useMeta';
|
|
2
|
-
export * from './useInstallationInfo';
|
|
3
|
-
export * from './usePahoMQTTClient';
|
|
4
|
-
export * from './useSimpleMQTT';
|
|
5
|
-
export * from './useTokens';
|
|
6
|
-
export * from './useNewFunction';
|
|
7
|
-
export * from './useFunctions';
|
|
8
|
-
export * from './useFunction';
|
|
9
|
-
export * from './useInstallation';
|
|
10
|
-
export * from './useInstallations';
|
|
11
|
-
export * from './useNewInstallation';
|
|
12
|
-
export * from './useNewDevice';
|
|
13
|
-
export * from './useDevices';
|
|
14
|
-
export * from './useDevice';
|
|
15
|
-
export * from './useConfiguredEdgeApps';
|
|
16
|
-
export * from './useEdgeApps';
|
|
17
|
-
export * from './useEdgeApp';
|
|
18
|
-
export * from './useEdgeAppVersions';
|
|
19
|
-
export * from './useNewOAuth2Client';
|
|
20
|
-
export * from './useOAuth2Client';
|
|
21
|
-
export * from './useOAuth2Clients';
|
|
22
|
-
export * from './useOAuth2Consent';
|
|
23
|
-
export * from './useIDTokenAlgorithms';
|
|
24
|
-
export * from './useOrganization';
|
|
25
|
-
export * from './useOrganizations';
|
|
26
|
-
export * from './useNewOrganization';
|
|
27
|
-
export * from './useNewUser';
|
|
28
|
-
export * from './useUsers';
|
|
29
|
-
export * from './useUser';
|
|
30
|
-
export * from './useRoles';
|
|
31
|
-
export * from './useNewNotificationMessage';
|
|
32
|
-
export * from './useNotificationMessage';
|
|
33
|
-
export * from './useNotificationMessages';
|
|
34
|
-
export * from './useNewNotificationOutput';
|
|
35
|
-
export * from './useNotificationOutput';
|
|
36
|
-
export * from './useNotificationOutputs';
|
|
37
|
-
export * from './useNotificationOutputExecutor';
|
|
38
|
-
export * from './useNotificationOutputExecutors';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Devicex, ErrorResponse, MetaObject, OKResponse } from '@iotopen/node-lynx';
|
|
2
|
-
export declare const useDevice: (installationId: number | string, deviceId: number | string) => {
|
|
3
|
-
loading: boolean;
|
|
4
|
-
error: ErrorResponse | undefined;
|
|
5
|
-
Device: Devicex;
|
|
6
|
-
setDevice: import("react").Dispatch<import("react").SetStateAction<Devicex>>;
|
|
7
|
-
update: () => Promise<Devicex>;
|
|
8
|
-
remove: () => Promise<OKResponse>;
|
|
9
|
-
setType: (t: string) => void;
|
|
10
|
-
};
|
|
11
|
-
export declare const useDeviceMeta: (installationId: number | string, deviceId?: number | string) => {
|
|
12
|
-
createMeta: (key: string, meta: MetaObject, devId?: number, silent?: boolean) => Promise<MetaObject>;
|
|
13
|
-
updateMeta: (key: string, meta: MetaObject, createMissing?: boolean, devId?: number, silent?: boolean) => Promise<MetaObject>;
|
|
14
|
-
removeMeta: (key: string, devId?: number, silent?: boolean) => Promise<MetaObject>;
|
|
15
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Devicex, EmptyDevicex, ErrorResponse, Metadata, OKResponse } from '@iotopen/node-lynx';
|
|
2
|
-
import { ObjectOrArray } from '../types';
|
|
3
|
-
export declare const useDevices: (installationId: number | string, filter?: Metadata) => {
|
|
4
|
-
loading: boolean;
|
|
5
|
-
error: ErrorResponse | undefined;
|
|
6
|
-
create: <T extends EmptyDevicex | EmptyDevicex[]>(devs: T) => ObjectOrArray<Devicex, EmptyDevicex, T>;
|
|
7
|
-
remove: <T_1 extends Devicex | Devicex[]>(devs: T_1) => ObjectOrArray<OKResponse, Devicex, T_1>;
|
|
8
|
-
devices: Devicex[];
|
|
9
|
-
refresh: () => void;
|
|
10
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { EdgeAppVersion, ErrorResponse } from '@iotopen/node-lynx';
|
|
2
|
-
export declare const useEdgeAppVersions: (appId: number | string, untagged?: boolean) => {
|
|
3
|
-
loading: boolean;
|
|
4
|
-
error: ErrorResponse | undefined;
|
|
5
|
-
versions: EdgeAppVersion[];
|
|
6
|
-
nameVersion: (name: string, hash: string) => Promise<EdgeAppVersion>;
|
|
7
|
-
refresh: () => void;
|
|
8
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { EmptyFunctionx, ErrorResponse, Functionx, Metadata, OKResponse } from '@iotopen/node-lynx';
|
|
2
|
-
import { ObjectOrArray } from '../types';
|
|
3
|
-
export declare const useFunctions: (installationId: number | string, filter?: Metadata) => {
|
|
4
|
-
loading: boolean;
|
|
5
|
-
error: ErrorResponse | undefined;
|
|
6
|
-
create: <T extends EmptyFunctionx | EmptyFunctionx[]>(fns: T) => ObjectOrArray<Functionx, EmptyFunctionx, T>;
|
|
7
|
-
remove: <T_1 extends Functionx | Functionx[]>(fns: T_1) => ObjectOrArray<OKResponse, Functionx, T_1>;
|
|
8
|
-
functions: Functionx[];
|
|
9
|
-
refresh: () => void;
|
|
10
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Installation } from '@iotopen/node-lynx';
|
|
2
|
-
export declare const useInstallation: (installationId: number | string) => {
|
|
3
|
-
installation: Installation;
|
|
4
|
-
setInstallation: import("react").Dispatch<import("react").SetStateAction<Installation>>;
|
|
5
|
-
update: () => Promise<Installation>;
|
|
6
|
-
remove: () => Promise<Installation>;
|
|
7
|
-
error: Error | undefined;
|
|
8
|
-
loading: boolean;
|
|
9
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { DependencyList } from 'react';
|
|
2
|
-
import { MetaObject, WithMeta } from '@iotopen/node-lynx';
|
|
3
|
-
export type MetaElement = MetaObject & {
|
|
4
|
-
key: string;
|
|
5
|
-
};
|
|
6
|
-
export declare const useMeta: (obj?: WithMeta, deps?: DependencyList) => {
|
|
7
|
-
metaList: MetaElement[];
|
|
8
|
-
compile: () => WithMeta;
|
|
9
|
-
addMeta: (e?: MetaElement) => void;
|
|
10
|
-
removeMeta: (idx: number) => void;
|
|
11
|
-
setMeta: (idx: number, e: MetaElement) => void;
|
|
12
|
-
setMetaKey: (idx: number, key: string) => void;
|
|
13
|
-
setMetaValue: (idx: number, value: string) => void;
|
|
14
|
-
setMetaProtected: (idx: number, value: boolean) => void;
|
|
15
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { EmptyNotificationOutput } from '@iotopen/node-lynx';
|
|
2
|
-
export type NotificationOutputTemplate = {
|
|
3
|
-
installation_id?: number;
|
|
4
|
-
name?: string;
|
|
5
|
-
notification_message_id?: number;
|
|
6
|
-
notification_output_executor_id?: number;
|
|
7
|
-
config?: {
|
|
8
|
-
[key: string]: string;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export declare const useNewNotificationOutput: (installationId: number | string, template?: NotificationOutputTemplate) => {
|
|
12
|
-
newNotificationOutput: EmptyNotificationOutput;
|
|
13
|
-
setNewNotificationOutput: import("react").Dispatch<import("react").SetStateAction<EmptyNotificationOutput>>;
|
|
14
|
-
create: () => Promise<import("@iotopen/node-lynx").NotificationOutput>;
|
|
15
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { EmptyUser } from '@iotopen/node-lynx';
|
|
2
|
-
import { Address } from '@iotopen/node-lynx/src/types';
|
|
3
|
-
export type UserTemplate = {
|
|
4
|
-
email?: string;
|
|
5
|
-
password?: string;
|
|
6
|
-
first_name?: string;
|
|
7
|
-
last_name?: string;
|
|
8
|
-
role?: number;
|
|
9
|
-
sms_login?: boolean;
|
|
10
|
-
mobile?: string;
|
|
11
|
-
note?: string;
|
|
12
|
-
organisations?: number[];
|
|
13
|
-
assigned_installations?: number[];
|
|
14
|
-
address?: Address;
|
|
15
|
-
expire_at?: number;
|
|
16
|
-
meta?: {
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
};
|
|
19
|
-
protected_meta?: {
|
|
20
|
-
[key: string]: any;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
export declare const useNewUser: (template?: UserTemplate) => {
|
|
24
|
-
newUser: EmptyUser;
|
|
25
|
-
setNewUser: import("react").Dispatch<import("react").SetStateAction<EmptyUser>>;
|
|
26
|
-
create: () => Promise<import("@iotopen/node-lynx").User>;
|
|
27
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ErrorResponse, NotificationMessage } from '@iotopen/node-lynx';
|
|
2
|
-
export declare const useNotificationMessage: (installationId: number | string, notificationId: number | string) => {
|
|
3
|
-
refresh: () => void;
|
|
4
|
-
message: NotificationMessage;
|
|
5
|
-
setMessage: import("react").Dispatch<import("react").SetStateAction<NotificationMessage>>;
|
|
6
|
-
error: ErrorResponse | undefined;
|
|
7
|
-
loading: boolean;
|
|
8
|
-
remove: () => void;
|
|
9
|
-
update: () => void;
|
|
10
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ErrorResponse, NotificationMessage } from '@iotopen/node-lynx';
|
|
2
|
-
export declare const useNotificationMessages: (installationId: number | string) => {
|
|
3
|
-
refresh: () => void;
|
|
4
|
-
notificationMessages: NotificationMessage[];
|
|
5
|
-
error: ErrorResponse | undefined;
|
|
6
|
-
loading: boolean;
|
|
7
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ErrorResponse, NotificationOutputExecutor } from '@iotopen/node-lynx';
|
|
2
|
-
export declare const useNotificationOutputExecutor: (installationId: number | string, executorId: number | string) => {
|
|
3
|
-
refresh: () => void;
|
|
4
|
-
outputExecutor: NotificationOutputExecutor;
|
|
5
|
-
setOutputExecutor: import("react").Dispatch<import("react").SetStateAction<NotificationOutputExecutor>>;
|
|
6
|
-
error: ErrorResponse | undefined;
|
|
7
|
-
loading: boolean;
|
|
8
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ErrorResponse, NotificationOutputExecutor } from '@iotopen/node-lynx';
|
|
2
|
-
export declare const useNotificationOutputExecutors: (installationId: number | string) => {
|
|
3
|
-
refresh: () => void;
|
|
4
|
-
notificationExecutors: NotificationOutputExecutor[];
|
|
5
|
-
error: ErrorResponse | undefined;
|
|
6
|
-
loading: boolean;
|
|
7
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ErrorResponse, NotificationOutput } from '@iotopen/node-lynx';
|
|
2
|
-
export declare const useNotificationOutputs: (installationId: number | string) => {
|
|
3
|
-
refresh: () => void;
|
|
4
|
-
notificationOutputs: NotificationOutput[];
|
|
5
|
-
error: ErrorResponse | undefined;
|
|
6
|
-
loading: boolean;
|
|
7
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ErrorResponse, OAuth2Client } from '@iotopen/node-lynx';
|
|
2
|
-
export declare const useOAuth2Client: (id: string) => {
|
|
3
|
-
refresh: () => void;
|
|
4
|
-
client: OAuth2Client;
|
|
5
|
-
setClient: import("react").Dispatch<import("react").SetStateAction<OAuth2Client>>;
|
|
6
|
-
error: ErrorResponse | undefined;
|
|
7
|
-
loading: boolean;
|
|
8
|
-
remove: () => Promise<import("@iotopen/node-lynx").OKResponse>;
|
|
9
|
-
update: () => Promise<OAuth2Client>;
|
|
10
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Organization } from '@iotopen/node-lynx';
|
|
2
|
-
export declare const useOrganization: (organizationId: number | string) => {
|
|
3
|
-
loading: boolean;
|
|
4
|
-
organization: Organization;
|
|
5
|
-
setOrganization: import("react").Dispatch<import("react").SetStateAction<Organization>>;
|
|
6
|
-
error: Error | undefined;
|
|
7
|
-
update: () => Promise<Organization>;
|
|
8
|
-
remove: () => Promise<import("@iotopen/node-lynx").OKResponse>;
|
|
9
|
-
refresh: () => void;
|
|
10
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ErrorResponse, MinimalOrg, Organization } from '@iotopen/node-lynx';
|
|
2
|
-
export declare const useOrganizations: <T extends boolean = false>(minimal?: T | undefined) => {
|
|
3
|
-
loading: boolean;
|
|
4
|
-
organizations: MinimalOrg<T>[];
|
|
5
|
-
setOrganizations: import("react").Dispatch<import("react").SetStateAction<MinimalOrg<T>[]>>;
|
|
6
|
-
error: ErrorResponse | undefined;
|
|
7
|
-
create: (org: Organization) => Promise<Organization>;
|
|
8
|
-
remove: (org: Organization) => Promise<import("@iotopen/node-lynx").OKResponse>;
|
|
9
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import Paho, { Qos } from 'paho-mqtt';
|
|
2
|
-
export type Binding = (topic: string, payload: string, qos: Qos, retained: boolean) => void;
|
|
3
|
-
export declare const useSimpleMQTT: (uri?: string, username?: string, password?: string) => {
|
|
4
|
-
setSubs: (s: string[]) => void;
|
|
5
|
-
error: Paho.MQTTError | undefined;
|
|
6
|
-
connected: boolean;
|
|
7
|
-
bind: (topic: RegExp | string, binder: Binding) => void;
|
|
8
|
-
unbind: (binder: Binding) => void;
|
|
9
|
-
bindExact: (topic: string, binder: Binding) => void;
|
|
10
|
-
unbindExact: (topic: string, binder: Binding) => void;
|
|
11
|
-
pub: (topic: string, payload: string | Paho.TypedArray, qos?: Paho.Qos | undefined, retained?: boolean | undefined) => void;
|
|
12
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { EmptyToken, ErrorResponse, Token } from '@iotopen/node-lynx';
|
|
2
|
-
export declare const useTokens: () => {
|
|
3
|
-
tokens: Token[];
|
|
4
|
-
remove: (token: Token) => Promise<import("@iotopen/node-lynx").OKResponse>;
|
|
5
|
-
create: (token: EmptyToken) => Promise<Token>;
|
|
6
|
-
refresh: () => void;
|
|
7
|
-
loading: boolean;
|
|
8
|
-
error: ErrorResponse | undefined;
|
|
9
|
-
};
|
package/dist/esm/index.d.ts
DELETED
package/dist/esm/types.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type ObjectOrArray<X, Y, T extends Y | Y[]> = T extends Y ? Promise<X> : Promise<PromiseSettledResult<X>[]>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|