antchain-bot 1.11.57__tar.gz → 1.12.1__tar.gz

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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: antchain_bot
3
- Version: 1.11.57
3
+ Version: 1.12.1
4
4
  Summary: Ant Chain BOT SDK Library for Python
5
5
  Home-page: https://github.com/alipay/antchain-openapi-prod-sdk
6
6
  Author: Ant Chain SDK
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: antchain-bot
3
- Version: 1.11.57
3
+ Version: 1.12.1
4
4
  Summary: Ant Chain BOT SDK Library for Python
5
5
  Home-page: https://github.com/alipay/antchain-openapi-prod-sdk
6
6
  Author: Ant Chain SDK
@@ -0,0 +1 @@
1
+ __version__ = '1.12.1'
@@ -135,7 +135,7 @@ class Client:
135
135
  'req_msg_id': AntchainUtils.get_nonce(),
136
136
  'access_key': self._access_key_id,
137
137
  'base_sdk_version': 'TeaSDK-2.0',
138
- 'sdk_version': '1.11.57',
138
+ 'sdk_version': '1.12.1',
139
139
  '_prod_code': 'BOT',
140
140
  '_prod_channel': 'undefined'
141
141
  }
@@ -239,7 +239,7 @@ class Client:
239
239
  'req_msg_id': AntchainUtils.get_nonce(),
240
240
  'access_key': self._access_key_id,
241
241
  'base_sdk_version': 'TeaSDK-2.0',
242
- 'sdk_version': '1.11.57',
242
+ 'sdk_version': '1.12.1',
243
243
  '_prod_code': 'BOT',
244
244
  '_prod_channel': 'undefined'
245
245
  }
@@ -7683,6 +7683,62 @@ class Client:
7683
7683
  await self.do_request_async('1.0', 'blockchain.bot.device.customerthingservice.exec', 'HTTPS', 'POST', f'/gateway.do', TeaCore.to_map(request), headers, runtime)
7684
7684
  )
7685
7685
 
7686
+ def exec_device_usertopic(
7687
+ self,
7688
+ request: bot_models.ExecDeviceUsertopicRequest,
7689
+ ) -> bot_models.ExecDeviceUsertopicResponse:
7690
+ """
7691
+ Description: 在指定设备上对自定义topic 远程下发消息
7692
+ Summary: 自定义topic远程调用
7693
+ """
7694
+ runtime = util_models.RuntimeOptions()
7695
+ headers = {}
7696
+ return self.exec_device_usertopic_ex(request, headers, runtime)
7697
+
7698
+ async def exec_device_usertopic_async(
7699
+ self,
7700
+ request: bot_models.ExecDeviceUsertopicRequest,
7701
+ ) -> bot_models.ExecDeviceUsertopicResponse:
7702
+ """
7703
+ Description: 在指定设备上对自定义topic 远程下发消息
7704
+ Summary: 自定义topic远程调用
7705
+ """
7706
+ runtime = util_models.RuntimeOptions()
7707
+ headers = {}
7708
+ return await self.exec_device_usertopic_ex_async(request, headers, runtime)
7709
+
7710
+ def exec_device_usertopic_ex(
7711
+ self,
7712
+ request: bot_models.ExecDeviceUsertopicRequest,
7713
+ headers: Dict[str, str],
7714
+ runtime: util_models.RuntimeOptions,
7715
+ ) -> bot_models.ExecDeviceUsertopicResponse:
7716
+ """
7717
+ Description: 在指定设备上对自定义topic 远程下发消息
7718
+ Summary: 自定义topic远程调用
7719
+ """
7720
+ UtilClient.validate_model(request)
7721
+ return TeaCore.from_map(
7722
+ bot_models.ExecDeviceUsertopicResponse(),
7723
+ self.do_request('1.0', 'blockchain.bot.device.usertopic.exec', 'HTTPS', 'POST', f'/gateway.do', TeaCore.to_map(request), headers, runtime)
7724
+ )
7725
+
7726
+ async def exec_device_usertopic_ex_async(
7727
+ self,
7728
+ request: bot_models.ExecDeviceUsertopicRequest,
7729
+ headers: Dict[str, str],
7730
+ runtime: util_models.RuntimeOptions,
7731
+ ) -> bot_models.ExecDeviceUsertopicResponse:
7732
+ """
7733
+ Description: 在指定设备上对自定义topic 远程下发消息
7734
+ Summary: 自定义topic远程调用
7735
+ """
7736
+ UtilClient.validate_model(request)
7737
+ return TeaCore.from_map(
7738
+ bot_models.ExecDeviceUsertopicResponse(),
7739
+ await self.do_request_async('1.0', 'blockchain.bot.device.usertopic.exec', 'HTTPS', 'POST', f'/gateway.do', TeaCore.to_map(request), headers, runtime)
7740
+ )
7741
+
7686
7742
  def query_iotplatform_purchaseorder(
7687
7743
  self,
7688
7744
  request: bot_models.QueryIotplatformPurchaseorderRequest,
@@ -27336,6 +27336,152 @@ class ExecDeviceCustomerthingserviceResponse(TeaModel):
27336
27336
  return self
27337
27337
 
27338
27338
 
27339
+ class ExecDeviceUsertopicRequest(TeaModel):
27340
+ def __init__(
27341
+ self,
27342
+ auth_token: str = None,
27343
+ product_instance_id: str = None,
27344
+ device_did: str = None,
27345
+ signature: str = None,
27346
+ topic_identifer: str = None,
27347
+ user_topic_cmd_type: str = None,
27348
+ cmd_content: str = None,
27349
+ biz_scene: str = None,
27350
+ ):
27351
+ # OAuth模式下的授权token
27352
+ self.auth_token = auth_token
27353
+ self.product_instance_id = product_instance_id
27354
+ # 设备did
27355
+ self.device_did = device_did
27356
+ # 使用Hmac-SHA256 哈希算法对对deviceDid进行加签, key 为deviceSecret
27357
+ # Hmac-SHA256(deviceDid,deviceSecret)
27358
+ self.signature = signature
27359
+ # 自定义topic名称
27360
+ self.topic_identifer = topic_identifer
27361
+ # FORWARD
27362
+ self.user_topic_cmd_type = user_topic_cmd_type
27363
+ # 指令内容
27364
+ self.cmd_content = cmd_content
27365
+ # 业务场景
27366
+ self.biz_scene = biz_scene
27367
+
27368
+ def validate(self):
27369
+ self.validate_required(self.device_did, 'device_did')
27370
+ self.validate_required(self.signature, 'signature')
27371
+ self.validate_required(self.topic_identifer, 'topic_identifer')
27372
+ self.validate_required(self.user_topic_cmd_type, 'user_topic_cmd_type')
27373
+ self.validate_required(self.cmd_content, 'cmd_content')
27374
+ self.validate_required(self.biz_scene, 'biz_scene')
27375
+
27376
+ def to_map(self):
27377
+ _map = super().to_map()
27378
+ if _map is not None:
27379
+ return _map
27380
+
27381
+ result = dict()
27382
+ if self.auth_token is not None:
27383
+ result['auth_token'] = self.auth_token
27384
+ if self.product_instance_id is not None:
27385
+ result['product_instance_id'] = self.product_instance_id
27386
+ if self.device_did is not None:
27387
+ result['device_did'] = self.device_did
27388
+ if self.signature is not None:
27389
+ result['signature'] = self.signature
27390
+ if self.topic_identifer is not None:
27391
+ result['topic_identifer'] = self.topic_identifer
27392
+ if self.user_topic_cmd_type is not None:
27393
+ result['user_topic_cmd_type'] = self.user_topic_cmd_type
27394
+ if self.cmd_content is not None:
27395
+ result['cmd_content'] = self.cmd_content
27396
+ if self.biz_scene is not None:
27397
+ result['biz_scene'] = self.biz_scene
27398
+ return result
27399
+
27400
+ def from_map(self, m: dict = None):
27401
+ m = m or dict()
27402
+ if m.get('auth_token') is not None:
27403
+ self.auth_token = m.get('auth_token')
27404
+ if m.get('product_instance_id') is not None:
27405
+ self.product_instance_id = m.get('product_instance_id')
27406
+ if m.get('device_did') is not None:
27407
+ self.device_did = m.get('device_did')
27408
+ if m.get('signature') is not None:
27409
+ self.signature = m.get('signature')
27410
+ if m.get('topic_identifer') is not None:
27411
+ self.topic_identifer = m.get('topic_identifer')
27412
+ if m.get('user_topic_cmd_type') is not None:
27413
+ self.user_topic_cmd_type = m.get('user_topic_cmd_type')
27414
+ if m.get('cmd_content') is not None:
27415
+ self.cmd_content = m.get('cmd_content')
27416
+ if m.get('biz_scene') is not None:
27417
+ self.biz_scene = m.get('biz_scene')
27418
+ return self
27419
+
27420
+
27421
+ class ExecDeviceUsertopicResponse(TeaModel):
27422
+ def __init__(
27423
+ self,
27424
+ req_msg_id: str = None,
27425
+ result_code: str = None,
27426
+ result_msg: str = None,
27427
+ success: bool = None,
27428
+ result: str = None,
27429
+ message_id: str = None,
27430
+ ):
27431
+ # 请求唯一ID,用于链路跟踪和问题排查
27432
+ self.req_msg_id = req_msg_id
27433
+ # 结果码,一般OK表示调用成功
27434
+ self.result_code = result_code
27435
+ # 异常信息的文本描述
27436
+ self.result_msg = result_msg
27437
+ #
27438
+ # 接口调用结果
27439
+ self.success = success
27440
+ # 调用返回结果
27441
+ self.result = result
27442
+ # 云端向设备下发服务调用的消息ID
27443
+ self.message_id = message_id
27444
+
27445
+ def validate(self):
27446
+ pass
27447
+
27448
+ def to_map(self):
27449
+ _map = super().to_map()
27450
+ if _map is not None:
27451
+ return _map
27452
+
27453
+ result = dict()
27454
+ if self.req_msg_id is not None:
27455
+ result['req_msg_id'] = self.req_msg_id
27456
+ if self.result_code is not None:
27457
+ result['result_code'] = self.result_code
27458
+ if self.result_msg is not None:
27459
+ result['result_msg'] = self.result_msg
27460
+ if self.success is not None:
27461
+ result['success'] = self.success
27462
+ if self.result is not None:
27463
+ result['result'] = self.result
27464
+ if self.message_id is not None:
27465
+ result['message_id'] = self.message_id
27466
+ return result
27467
+
27468
+ def from_map(self, m: dict = None):
27469
+ m = m or dict()
27470
+ if m.get('req_msg_id') is not None:
27471
+ self.req_msg_id = m.get('req_msg_id')
27472
+ if m.get('result_code') is not None:
27473
+ self.result_code = m.get('result_code')
27474
+ if m.get('result_msg') is not None:
27475
+ self.result_msg = m.get('result_msg')
27476
+ if m.get('success') is not None:
27477
+ self.success = m.get('success')
27478
+ if m.get('result') is not None:
27479
+ self.result = m.get('result')
27480
+ if m.get('message_id') is not None:
27481
+ self.message_id = m.get('message_id')
27482
+ return self
27483
+
27484
+
27339
27485
  class QueryIotplatformPurchaseorderRequest(TeaModel):
27340
27486
  def __init__(
27341
27487
  self,
@@ -24,7 +24,7 @@ from setuptools import setup, find_packages
24
24
  """
25
25
  setup module for antchain_bot.
26
26
 
27
- Created on 25/11/2024
27
+ Created on 16/12/2024
28
28
 
29
29
  @author: Ant Chain SDK
30
30
  """
@@ -1 +0,0 @@
1
- __version__ = '1.11.57'
File without changes
File without changes
File without changes