deleteCustomAlarm
描述
删除自定义的告警规则。
类型
export declare class SmartAlarmAbility implements SmartDeviceAbility {
deleteCustomAlarm: (options: { bindId: number }) => Promise<[boolean, LinkageRule[]]>;
}
请求参数
参数 | 数据类型 | 说明 | 是否必填 |
---|---|---|---|
options.bindId | number | 绑定 id | 是 |
返回参数
参数 | 数据类型 | 说明 |
---|---|---|
result[0] | boolean | 删除自定义告警规则结果 |
result[1] | LinkageRule[] | 删除后的告警规则列表 |
LinkageRule
定义请查看 getCustomAlarmList#返回参数
请求示例
import { SmartAlarmAbility } from '@ray-js/panel-sdk';
const Alarm = new SmartAlarmAbility();
const result = await Alarm.deleteCustomAlarm({ bindId: 1 });
console.log('=== result: ', result);
👉 立即免费领取开发资源,体验涂鸦 MiniApp 小程序开发。
返回示例
️🚫 注意,返回示例仅供参考,其包含字段大于返回参数定义范围,请勿使用除本文返回参数定义以外的返回数据,否则可能会导致程序异常。
[
true,
[
{
"triggerRuleId": "Ecrx5Bhx4sqvUp9B",
"triggerRuleVO": {
"matchType": 1,
"offGwSync": false,
"outOfWork": 0,
"ownerId": "152952332",
"matchStatus": 0,
"ruleGenre": 2,
"offGwSyncSuccess": false,
"id": "Ecrx5Bhx4sqvUp9B",
"runtimeEnv": "prod",
"newLocalScene": false,
"coverIcon": "",
"commonField": "{}",
"name": "门磁状态",
"containDeviceDelete": false,
"conditions": [
{
"icon": "",
"orderNum": 1,
"serverProperty": "",
"enabled": true,
"uid": "ay15234251194155zQ3F",
"entitySubIds": "1",
"ruleType": 3,
"extra": "",
"expr": [
[
"$dp1",
"==",
true
]
],
"attribute": 0,
"id": "eRJ9GihAaQDL75n9vpOE",
"ruleId": "Ecrx5Bhx4sqvUp9B",
"expression": "[[\"$dp1\",\"==\",true]]",
"entityType": 1,
"entityId": "vdevo169579725602982",
"devDelMark": false,
"handleStrategy": "",
"serviceProvider": "",
"condType": 1,
"status": true
}
],
"actions": [
{
"gmtModified": 1697466697571,
"offGwSync": false,
"actionExecutor": "appPushTrigger",
"orderNum": 1,
"enabled": true,
"uid": "ay15234251194155zQ3F",
"executorProperty": {
"deviceExecuteLog": 1
},
"attribute": 0,
"id": "BVvtnjVZbx5jTcrWSJMp",
"ruleId": "Ecrx5Bhx4sqvUp9B",
"actionStrategy": "repeat",
"devDelMark": false,
"status": true
}
],
"status": true,
"gmtModified": 1697467782751,
"code": "",
"preConditions": [
{
"expr": {
"timeZoneId": "Asia/Shanghai",
"start": "00:00",
"timeInterval": "custom",
"loops": "1111111",
"end": "23:59"
},
"condType": "timeCheck",
"id": "V0ElkQ3Aia3HEWGOEXB1"
}
],
"scenarioRule": false,
"linkageType": 0,
"orderWeight": 1,
"needCleanGidSid": false,
"enabled": false,
"uid": "ay15234251194155zQ3F",
"ruleType": 3,
"isLogicRule": false,
"attribute": 32,
"boundForPanel": false,
"isAlarmIssue": false,
"stickyOnTop": false,
"boundForWiFiPanel": false,
"needValidOutOfWork": false,
"gmtCreate": 1697466697551,
"iotAutoAlarm": false,
"localLinkage": false,
"ruleSource": 0,
"auditStatus": 0,
"displayColor": "",
"forceCloudTrigger": false
},
"icon": "",
"bindExecutor": "",
"bizDomain": "miniAppPanelSDKAlarm",
"associativeEntityValue": "",
"ownerId": "152952332",
"conditionRuleId": "",
"bindId": 2899540,
"uid": "ay15234251194155zQ3F",
"enable": false,
"sourceEntityId": "vdevo169579725602982",
"name": "",
"property": "",
"id": 2899540,
"associativeEntityId": "1",
"status": true
}
]
]
👉 立即免费领取开发资源,体验涂鸦 MiniApp 小程序开发。