@c8y/ngx-components
Version:
Angular modules for Cumulocity IoT applications
192 lines • 5.81 kB
TypeScript
import { IManagedObject } from '@c8y/client';
import { Alert } from '@c8y/ngx-components';
export interface Lwm2mManagedObject extends IManagedObject {
c8y_IsLwm2mDevice: object;
c8y_DeviceTypes: string[];
type: string;
}
export interface LWM2MPostOperationsParameters {
commands: string;
id: string;
type: string;
}
export declare enum LWM2MEndpoint {
deviceSettings = "basic",
connectivity = "connectivity",
firmware = "firmware",
servers = "servers",
bootstrap = "bootstrap"
}
export interface Lwm2mBootstrapParameters {
bindingMode?: BindingMode;
bootstrapId?: string;
bootstrapKey?: string;
bootstrapShortServerId?: number;
defaultMaximumPeriod?: number;
defaultMinimumPeriod?: number;
securityMode?: SecurityMode;
endpoint?: string;
generateBootstrapServerConfig?: boolean;
lwm2mShortServerId?: number;
serverUri?: string;
registrationLifeTime?: number;
serverPublicKey?: string;
securityInstanceOffset?: number;
publicKeyOrId?: string;
secretKey?: string;
id?: string;
}
export declare enum SecurityMode {
NO_SEC = "NO_SEC",
PSK = "PSK"
}
export declare enum Mode {
DISABLED = "DISABLED",
NO_SEC = "NO_SEC",
PSK = "PSK",
X509 = "X509",
X509_EST = "X509_USING_EST"
}
export declare enum BindingMode {
U = "U",
UQ = "UQ"
}
export declare enum BinaryEncoding {
OPAQUE = "OPAQUE",
TLV = "TLV"
}
export declare enum SerializationFormat {
TLV = "TLV",
JSON = "JSON",
CBOR = "CBOR",
TEXT = "TEXT",
OPAQUE = "OPAQUE",
SENML_JSON = "SENML_JSON",
SENML_CBOR = "SENML_CBOR"
}
export declare enum CertificateUsage {
CA_CONSTRAINT = "CA_CONSTRAINT",
SC_CONSTRAINT = "SERVICE_CERTIFICATE_CONSTRAINT",
TA_ASSERTION = "TRUST_ANCHOR_ASSERTION",
DI_CERTIFICATE = "DOMAIN_ISSUER_CERTIFICATE"
}
export declare enum FWU_DeliveryMethod {
PULL = "PULL",
PUSH = "PUSH",
BOTH = "BOTH"
}
export declare enum FWU_SupportedDeviceProtocol {
COAP = "COAP",
COAPS = "COAPS",
HTTP = "HTTP",
HTTPS = "HTTPS"
}
export declare enum FWU_ResetMechanism {
PACKAGE = "PACKAGE",
PACKAGE_URI = "PACKAGE_URI"
}
export declare enum ValidationType {
X509 = "x509certificate",
PRIVATE_KEY = "certificatePrivateKey"
}
export declare enum AutoManageAvailabilty {
YES = "1",
NO = "0"
}
export declare const agentName = "lwm2m-agent";
export declare const agentBaseUrl = "/service/lwm2m-agent";
export declare const c8y_lwm2m = "c8y_lwm2m";
export type Settings = BootstrapSettings | DeviceSettings | FirmwareSettings | ConnectivitySettings | ServerSettings | object;
export type Entity = Settings & UrlConfig;
export interface ValidationError {
error: string;
message: string;
}
export interface UrlConfig {
endpoint: LWM2MEndpoint;
id?: string;
}
export interface ServerSettings {
id: string;
uri: string;
serverId: number;
registrationLifetime: number;
defaultMinPeriod: number;
defaultMaxPeriod: number;
disableTimeout: number;
bootstrap: boolean;
storeNotifications: boolean;
bindingMode: BindingMode;
security: Security;
}
export interface Security {
mode: Mode;
x509PrivateKey?: string;
x509PrivateKeyFingerPrint?: string;
x509Certificate?: string;
x509CertificateCommonName?: string;
x509ServerCertificateName?: string;
certificateUsage?: string;
pskKey?: string;
pskId?: string;
}
export interface DeviceSettings {
endpointId: string;
awakeTime: number;
requestTimeout: number;
keepOldValuesOnOperationFail: boolean;
useTimestampResources: boolean;
binaryEncoding: BinaryEncoding;
serializationFormat: SerializationFormat;
}
export interface ConnectivitySettings {
bootstrapConnectivity: Connectivity;
serverConnectivity: Connectivity;
}
export interface Connectivity {
mode: Mode;
pskKey?: string;
pskId?: string;
}
export interface FirmwareSettings {
url: string;
resetStateMachineOnStart: boolean;
resetMethod: FWU_ResetMechanism;
supportedDeviceProtocol: FWU_SupportedDeviceProtocol;
firmwareDeliveryMethod: FWU_DeliveryMethod;
}
export interface BootstrapSettings {
bootstrapServerId: number;
securityInstanceOffset: number;
generateBootstrapServer: boolean;
}
export interface SecurityModeDictionaryObj {
name?: string | Mode;
description?: string;
label?: string;
value?: string;
useInBootstrapConnectivity: boolean;
useInServerConnectivity: boolean;
}
export declare const permissionAlert: Alert;
export declare const lwm2mRegisterDeviceStringsIncomingFromMS: {
'^Disable automated firmware update workflow$': {
gettext: "Disable automated firmware update workflow";
};
'^Disable default internal object actions$': {
gettext: "Disable default internal object actions";
};
'^Turns off the firmware update functionality over LWM2M for the given device.$': {
gettext: "Turns off the firmware update functionality over LWM2M for the given device";
};
'^Turns off automatic handling of objects 3,4 and 6$': {
gettext: "Turns off automatic handling of objects 3, 4 and 6";
};
'^Indicates the preferred content format for LWM2M-Agent to use to communicate with the device$': {
gettext: "Indicates the preferred content format for the LWM2M agent to use to communicate with the devices";
};
'^If set to true, the LWM2M agent resets the firmware state machine before initiating the actual firmware update operation.$': {
gettext: "If set to true, the LWM2M agent resets the firmware state machine before initiating the actual firmware update operation";
};
};
//# sourceMappingURL=index.d.ts.map