1 |
|
2 |
|
3 |
|
4 | export interface MqttRecordOptions {
|
5 | |
6 |
|
7 |
|
8 | qos?: 0 | 1 | 2;
|
9 | |
10 |
|
11 |
|
12 | retain?: boolean;
|
13 | |
14 |
|
15 |
|
16 | dup?: boolean;
|
17 | properties?: {
|
18 | payloadFormatIndicator?: number;
|
19 | messageExpiryInterval?: number;
|
20 | topicAlias?: string;
|
21 | responseTopic?: string;
|
22 | correlationData?: Buffer;
|
23 | userProperties?: Record<string, string | string[]>;
|
24 | subscriptionIdentifier?: number;
|
25 | contentType?: string;
|
26 | };
|
27 | }
|
28 |
|
29 |
|
30 |
|
31 | export declare class MqttRecord<TData = any> {
|
32 | readonly data: TData;
|
33 | options?: MqttRecordOptions;
|
34 | constructor(data: TData, options?: MqttRecordOptions);
|
35 | }
|
36 | /**
|
37 | * @publicApi
|
38 | */
|
39 | export declare class MqttRecordBuilder<TData> {
|
40 | private data?;
|
41 | private options?;
|
42 | constructor(data?: TData);
|
43 | setData(data: TData): this;
|
44 | setQoS(qos: MqttRecordOptions['qos']): this;
|
45 | setRetain(retain: MqttRecordOptions['retain']): this;
|
46 | setDup(dup: MqttRecordOptions['dup']): this;
|
47 | setProperties(properties: MqttRecordOptions['properties']): this;
|
48 | build(): MqttRecord;
|
49 | }
|