@transai/connector-runner-mqtt 0.24.0 → 0.26.0
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.
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ConnectorRuntimeSDK, ConnectorSDKInterface, BaseConnectorConfig, ConnectorInterface, ActionInterface, KafkaCallbackResponse, XodJobType } from '@transai/connector-runtime-sdk';
|
|
2
2
|
import { MqttConfig } from './types';
|
|
3
|
-
export interface
|
|
3
|
+
export interface SingleMqttConfig extends BaseConnectorConfig, MqttConfig {
|
|
4
4
|
}
|
|
5
|
-
export interface
|
|
5
|
+
export interface MultipleMqttConfig extends BaseConnectorConfig, Record<string, unknown> {
|
|
6
6
|
servers: Array<MqttConfig>;
|
|
7
7
|
}
|
|
8
|
-
export declare class ConnectorRunnerMqtt extends ConnectorRuntimeSDK<
|
|
8
|
+
export declare class ConnectorRunnerMqtt extends ConnectorRuntimeSDK<SingleMqttConfig | MultipleMqttConfig> {
|
|
9
9
|
#private;
|
|
10
10
|
readonly CONNECTOR_INSTANCE: string;
|
|
11
11
|
constructor(connector: ConnectorInterface, connectorSDK: ConnectorSDKInterface);
|
|
@@ -2,7 +2,7 @@ export interface BambuTray {
|
|
|
2
2
|
bed_temp: string;
|
|
3
3
|
bed_temp_type: string;
|
|
4
4
|
cali_idx: number;
|
|
5
|
-
cols: string
|
|
5
|
+
cols: Array<string>;
|
|
6
6
|
ctype: number;
|
|
7
7
|
drying_temp: string;
|
|
8
8
|
drying_time: string;
|
|
@@ -30,10 +30,10 @@ export interface BambuAmsUnit {
|
|
|
30
30
|
id: string;
|
|
31
31
|
info: string;
|
|
32
32
|
temp: string;
|
|
33
|
-
tray: BambuTray
|
|
33
|
+
tray: Array<BambuTray>;
|
|
34
34
|
}
|
|
35
35
|
export interface BambuAms {
|
|
36
|
-
ams: BambuAmsUnit
|
|
36
|
+
ams: Array<BambuAmsUnit>;
|
|
37
37
|
ams_exist_bits: string;
|
|
38
38
|
ams_exist_bits_raw: string;
|
|
39
39
|
cali_id: number;
|
|
@@ -65,16 +65,16 @@ export interface BambuAirductPart {
|
|
|
65
65
|
state: number;
|
|
66
66
|
}
|
|
67
67
|
export interface BambuAirductMode {
|
|
68
|
-
ctrl: number
|
|
68
|
+
ctrl: Array<number>;
|
|
69
69
|
modeId: number;
|
|
70
|
-
off: number
|
|
70
|
+
off: Array<number>;
|
|
71
71
|
}
|
|
72
72
|
export interface BambuAirduct {
|
|
73
73
|
modeCur: number;
|
|
74
74
|
modeFunc: number;
|
|
75
|
-
modeList: BambuAirductMode
|
|
75
|
+
modeList: Array<BambuAirductMode>;
|
|
76
76
|
modeVisable: number;
|
|
77
|
-
parts: BambuAirductPart
|
|
77
|
+
parts: Array<BambuAirductPart>;
|
|
78
78
|
subFunc: number;
|
|
79
79
|
subMode: number;
|
|
80
80
|
subVisable: number;
|
|
@@ -109,7 +109,7 @@ export interface BambuExtTool {
|
|
|
109
109
|
type: string;
|
|
110
110
|
}
|
|
111
111
|
export interface BambuExtruderInfo {
|
|
112
|
-
filam_bak: unknown
|
|
112
|
+
filam_bak: Array<unknown>;
|
|
113
113
|
hnow: number;
|
|
114
114
|
hpre: number;
|
|
115
115
|
htar: number;
|
|
@@ -122,7 +122,7 @@ export interface BambuExtruderInfo {
|
|
|
122
122
|
temp: number;
|
|
123
123
|
}
|
|
124
124
|
export interface BambuExtruder {
|
|
125
|
-
info: BambuExtruderInfo
|
|
125
|
+
info: Array<BambuExtruderInfo>;
|
|
126
126
|
state: number;
|
|
127
127
|
}
|
|
128
128
|
export interface BambuLaser {
|
|
@@ -141,7 +141,7 @@ export interface BambuNozzleInfo {
|
|
|
141
141
|
}
|
|
142
142
|
export interface BambuNozzle {
|
|
143
143
|
exist: number;
|
|
144
|
-
info: BambuNozzleInfo
|
|
144
|
+
info: Array<BambuNozzleInfo>;
|
|
145
145
|
src_id: number;
|
|
146
146
|
state: number;
|
|
147
147
|
tar_id: number;
|
|
@@ -178,7 +178,7 @@ export interface BambuNetInfo {
|
|
|
178
178
|
}
|
|
179
179
|
export interface BambuNet {
|
|
180
180
|
conf: number;
|
|
181
|
-
info: BambuNetInfo
|
|
181
|
+
info: Array<BambuNetInfo>;
|
|
182
182
|
}
|
|
183
183
|
export interface BambuIpcam {
|
|
184
184
|
agora_service: string;
|
|
@@ -202,7 +202,7 @@ export interface BambuJobStage {
|
|
|
202
202
|
}
|
|
203
203
|
export interface BambuJob {
|
|
204
204
|
cur_stage: BambuJobStage;
|
|
205
|
-
stage: unknown
|
|
205
|
+
stage: Array<unknown>;
|
|
206
206
|
}
|
|
207
207
|
export interface BambuLightsReport {
|
|
208
208
|
mode: string;
|
|
@@ -270,7 +270,7 @@ export interface BambuPrint {
|
|
|
270
270
|
big_fan2_speed: string;
|
|
271
271
|
cali_version: number;
|
|
272
272
|
canvas_id: number;
|
|
273
|
-
care: BambuCare
|
|
273
|
+
care: Array<BambuCare>;
|
|
274
274
|
cfg: string;
|
|
275
275
|
command: string;
|
|
276
276
|
cooling_fan_speed: string;
|
|
@@ -287,7 +287,7 @@ export interface BambuPrint {
|
|
|
287
287
|
gcode_file_prepare_percent: string;
|
|
288
288
|
gcode_state: string;
|
|
289
289
|
heatbreak_fan_speed: string;
|
|
290
|
-
hms: BambuHms
|
|
290
|
+
hms: Array<BambuHms>;
|
|
291
291
|
home_flag: number;
|
|
292
292
|
hw_switch_state: number;
|
|
293
293
|
info: {
|
|
@@ -299,8 +299,8 @@ export interface BambuPrint {
|
|
|
299
299
|
job_id: string;
|
|
300
300
|
lan_task_id: string;
|
|
301
301
|
layer_num: number;
|
|
302
|
-
lights_report: BambuLightsReport
|
|
303
|
-
mapping: unknown
|
|
302
|
+
lights_report: Array<BambuLightsReport>;
|
|
303
|
+
mapping: Array<unknown>;
|
|
304
304
|
mc_action: number;
|
|
305
305
|
mc_err: number;
|
|
306
306
|
mc_percent: number;
|
|
@@ -334,14 +334,14 @@ export interface BambuPrint {
|
|
|
334
334
|
queue_sts: number;
|
|
335
335
|
queue_total: number;
|
|
336
336
|
remain_time: number;
|
|
337
|
-
s_obj: unknown
|
|
337
|
+
s_obj: Array<unknown>;
|
|
338
338
|
sdcard: boolean;
|
|
339
339
|
sequence_id: string;
|
|
340
340
|
spd_lvl: number;
|
|
341
341
|
spd_mag: number;
|
|
342
342
|
stat: string;
|
|
343
343
|
state: number;
|
|
344
|
-
stg: unknown
|
|
344
|
+
stg: Array<unknown>;
|
|
345
345
|
stg_cd: number;
|
|
346
346
|
stg_cur: number;
|
|
347
347
|
subtask_id: string;
|
|
@@ -351,13 +351,12 @@ export interface BambuPrint {
|
|
|
351
351
|
upgrade_state: BambuUpgradeState;
|
|
352
352
|
upload: BambuUpload;
|
|
353
353
|
ver: string;
|
|
354
|
-
vir_slot: BambuTray
|
|
354
|
+
vir_slot: Array<BambuTray>;
|
|
355
355
|
wifi_signal: string;
|
|
356
356
|
xcam: BambuXcam;
|
|
357
357
|
xcam_status: string;
|
|
358
358
|
}
|
|
359
|
-
export
|
|
360
|
-
}
|
|
359
|
+
export type FilteredBambuPrint = Pick<BambuPrint, '3D' | 'ams' | 'ams_status' | 'ams_rfid_status' | 'bed_temper' | 'bed_target_temper' | 'big_fan1_speed' | 'big_fan2_speed' | 'care' | 'command' | 'cooling_fan_speed' | 'device' | 'err' | 'fail_reason' | 'fan_gear' | 'file' | 'gcode_file' | 'gcode_file_prepare_percent' | 'gcode_state' | 'ipcam' | 'job' | 'lights_report' | 'nozzle_diameter' | 'nozzle_target_temper' | 'nozzle_temper' | 'nozzle_type' | 'percent' | 'print_error' | 'print_gcode_action' | 'print_real_action' | 'print_type' | 'profile_id' | 'project_id' | 'total_layer_num' | 'vir_slot' | 'xcam' | 'xcam_status'>;
|
|
361
360
|
export interface BambuStatusPayload {
|
|
362
361
|
print: BambuPrint;
|
|
363
362
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transai/connector-runner-mqtt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
"email": "samen@transai.com",
|
|
11
11
|
"url": "https://transai.com"
|
|
12
12
|
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"handlebars": "^4.7",
|
|
15
|
+
"handlebars-helpers": "^0.10",
|
|
16
|
+
"mqtt": "^5.10"
|
|
17
|
+
},
|
|
13
18
|
"type": "commonjs",
|
|
14
19
|
"main": "./index.cjs",
|
|
15
20
|
"typings": "./index.d.ts"
|