示例#1
0
 async def create_app_goods_service_conversation_with_options_async(
     self,
     request: dingtalkapp_market__1__0_models.
     CreateAppGoodsServiceConversationRequest,
     headers: dingtalkapp_market__1__0_models.
     CreateAppGoodsServiceConversationHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkapp_market__1__0_models.CreateAppGoodsServiceConversationResponse:
     UtilClient.validate_model(request)
     body = {}
     if not UtilClient.is_unset(request.isv_user_id):
         body['isvUserId'] = request.isv_user_id
     if not UtilClient.is_unset(request.order_id):
         body['orderId'] = request.order_id
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalkapp_market__1__0_models.
         CreateAppGoodsServiceConversationResponse(), await
         self.do_roarequest_async('CreateAppGoodsServiceConversation',
                                  'appMarket_1.0', 'HTTP', 'POST', 'AK',
                                  f'/v1.0/appMarket/orders/serviceGroups',
                                  'json', req, runtime))
示例#2
0
 def query_positions_with_options(
     self,
     request: dingtalkhrm__1__0_models.QueryPositionsRequest,
     headers: dingtalkhrm__1__0_models.QueryPositionsHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkhrm__1__0_models.QueryPositionsResponse:
     UtilClient.validate_model(request)
     query = {}
     if not UtilClient.is_unset(request.max_results):
         query['maxResults'] = request.max_results
     if not UtilClient.is_unset(request.next_token):
         query['nextToken'] = request.next_token
     body = {}
     if not UtilClient.is_unset(request.in_category_ids):
         body['inCategoryIds'] = request.in_category_ids
     if not UtilClient.is_unset(request.in_position_ids):
         body['inPositionIds'] = request.in_position_ids
     if not UtilClient.is_unset(request.position_name):
         body['positionName'] = request.position_name
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers,
         query=OpenApiUtilClient.query(query),
         body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalkhrm__1__0_models.QueryPositionsResponse(),
         self.do_roarequest('QueryPositions', 'hrm_1.0', 'HTTP', 'POST',
                            'AK', f'/v1.0/hrm/positions/query', 'json', req,
                            runtime))
示例#3
0
 async def push_official_account_message_with_options_async(
     self,
     request: dingtalkdingmi__1__0_models.PushOfficialAccountMessageRequest,
     headers: dingtalkdingmi__1__0_models.PushOfficialAccountMessageHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkdingmi__1__0_models.PushOfficialAccountMessageResponse:
     UtilClient.validate_model(request)
     body = {}
     if not UtilClient.is_unset(request.ding_corp_id):
         body['dingCorpId'] = request.ding_corp_id
     if not UtilClient.is_unset(request.user_id):
         body['userId'] = request.user_id
     if not UtilClient.is_unset(request.msg_key):
         body['msgKey'] = request.msg_key
     if not UtilClient.is_unset(request.msg_param):
         body['msgParam'] = request.msg_param
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalkdingmi__1__0_models.PushOfficialAccountMessageResponse(),
         await self.do_roarequest_async(
             'PushOfficialAccountMessage', 'dingmi_1.0', 'HTTP', 'POST',
             'AK', f'/v1.0/dingmi/officialAccounts/robots/oToMessages/send',
             'json', req, runtime))
示例#4
0
 async def batch_create_with_options_async(
     self,
     request: dingtalkedu__1__0_models.BatchCreateRequest,
     headers: dingtalkedu__1__0_models.BatchCreateHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkedu__1__0_models.BatchCreateResponse:
     UtilClient.validate_model(request)
     body = {}
     if not UtilClient.is_unset(request.card_biz_code):
         body['cardBizCode'] = request.card_biz_code
     if not UtilClient.is_unset(request.data):
         body['data'] = request.data
     if not UtilClient.is_unset(request.identifier):
         body['identifier'] = request.identifier
     if not UtilClient.is_unset(request.source_type):
         body['sourceType'] = request.source_type
     if not UtilClient.is_unset(request.userid):
         body['userid'] = request.userid
     if not UtilClient.is_unset(request.ding_corp_id):
         body['dingCorpId'] = request.ding_corp_id
     if not UtilClient.is_unset(request.js_version):
         body['jsVersion'] = request.js_version
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalkedu__1__0_models.BatchCreateResponse(), await
         self.do_roarequest_async('BatchCreate', 'edu_1.0', 'HTTP', 'POST',
                                  'AK', f'/v1.0/edu/cards', 'json', req,
                                  runtime))
示例#5
0
 async def user_task_report_with_options_async(
     self,
     request: dingtalkapp_market__1__0_models.UserTaskReportRequest,
     headers: dingtalkapp_market__1__0_models.UserTaskReportHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkapp_market__1__0_models.UserTaskReportResponse:
     UtilClient.validate_model(request)
     body = {}
     if not UtilClient.is_unset(request.ding_corp_id):
         body['dingCorpId'] = request.ding_corp_id
     if not UtilClient.is_unset(request.task_tag):
         body['taskTag'] = request.task_tag
     if not UtilClient.is_unset(request.operate_date):
         body['operateDate'] = request.operate_date
     if not UtilClient.is_unset(request.userid):
         body['userid'] = request.userid
     if not UtilClient.is_unset(request.biz_no):
         body['bizNo'] = request.biz_no
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalkapp_market__1__0_models.UserTaskReportResponse(), await
         self.do_roarequest_async('UserTaskReport', 'appMarket_1.0', 'HTTP',
                                  'POST', 'AK', f'/v1.0/appMarket/tasks',
                                  'boolean', req, runtime))
示例#6
0
 async def list_avaiable_version_with_options_async(
     self,
     request: dingtalkminiapp__1__0_models.ListAvaiableVersionRequest,
     headers: dingtalkminiapp__1__0_models.ListAvaiableVersionHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkminiapp__1__0_models.ListAvaiableVersionResponse:
     UtilClient.validate_model(request)
     body = {}
     if not UtilClient.is_unset(request.bundle_id):
         body['bundleId'] = request.bundle_id
     if not UtilClient.is_unset(request.mini_app_id):
         body['miniAppId'] = request.mini_app_id
     if not UtilClient.is_unset(request.page_num):
         body['pageNum'] = request.page_num
     if not UtilClient.is_unset(request.page_size):
         body['pageSize'] = request.page_size
     if not UtilClient.is_unset(request.version_type_set):
         body['versionTypeSet'] = request.version_type_set
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalkminiapp__1__0_models.ListAvaiableVersionResponse(), await
         self.do_roarequest_async('ListAvaiableVersion', 'miniapp_1.0',
                                  'HTTP', 'POST', 'AK',
                                  f'/v1.0/miniapp/apps/versions/query',
                                  'json', req, runtime))
示例#7
0
 async def create_mini_app_with_options_async(
     self,
     request: dingtalkminiapp__1__0_models.CreateMiniAppRequest,
     headers: dingtalkminiapp__1__0_models.CreateMiniAppHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkminiapp__1__0_models.CreateMiniAppResponse:
     UtilClient.validate_model(request)
     body = {}
     if not UtilClient.is_unset(request.biz_id):
         body['bizId'] = request.biz_id
     if not UtilClient.is_unset(request.biz_type):
         body['bizType'] = request.biz_type
     if not UtilClient.is_unset(request.desc):
         body['desc'] = request.desc
     if not UtilClient.is_unset(request.icon):
         body['icon'] = request.icon
     if not UtilClient.is_unset(request.name):
         body['name'] = request.name
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalkminiapp__1__0_models.CreateMiniAppResponse(), await
         self.do_roarequest_async('CreateMiniApp', 'miniapp_1.0', 'HTTP',
                                  'POST', 'AK', f'/v1.0/miniapp/apps',
                                  'json', req, runtime))
示例#8
0
 async def update_search_tab_with_options_async(
     self,
     tab_id: str,
     request: dingtalksearch__1__0_models.UpdateSearchTabRequest,
     headers: dingtalksearch__1__0_models.UpdateSearchTabHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalksearch__1__0_models.UpdateSearchTabResponse:
     UtilClient.validate_model(request)
     tab_id = OpenApiUtilClient.get_encode_param(tab_id)
     body = {}
     if not UtilClient.is_unset(request.name):
         body['name'] = request.name
     if not UtilClient.is_unset(request.priority):
         body['priority'] = request.priority
     if not UtilClient.is_unset(request.source):
         body['source'] = request.source
     if not UtilClient.is_unset(request.status):
         body['status'] = request.status
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalksearch__1__0_models.UpdateSearchTabResponse(), await
         self.do_roarequest_async('UpdateSearchTab', 'search_1.0', 'HTTP',
                                  'PUT', 'AK',
                                  f'/v1.0/search/tabs/{tab_id}', 'none',
                                  req, runtime))
示例#9
0
 async def batch_insert_search_item_with_options_async(
     self,
     tab_id: str,
     request: dingtalksearch__1__0_models.BatchInsertSearchItemRequest,
     headers: dingtalksearch__1__0_models.BatchInsertSearchItemHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalksearch__1__0_models.BatchInsertSearchItemResponse:
     UtilClient.validate_model(request)
     tab_id = OpenApiUtilClient.get_encode_param(tab_id)
     body = {}
     if not UtilClient.is_unset(request.search_item_models):
         body['searchItemModels'] = request.search_item_models
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalksearch__1__0_models.BatchInsertSearchItemResponse(), await
         self.do_roarequest_async(
             'BatchInsertSearchItem', 'search_1.0', 'HTTP', 'POST', 'AK',
             f'/v1.0/search/tabs/{tab_id}/items/batch', 'none', req,
             runtime))
示例#10
0
 async def add_device_video_conference_members_with_options_async(
     self,
     device_id: str,
     conference_id: str,
     request: dingtalksmart_device__1__0_models.
     AddDeviceVideoConferenceMembersRequest,
     headers: dingtalksmart_device__1__0_models.
     AddDeviceVideoConferenceMembersHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalksmart_device__1__0_models.AddDeviceVideoConferenceMembersResponse:
     UtilClient.validate_model(request)
     device_id = OpenApiUtilClient.get_encode_param(device_id)
     conference_id = OpenApiUtilClient.get_encode_param(conference_id)
     body = {}
     if not UtilClient.is_unset(request.user_ids):
         body['userIds'] = request.user_ids
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalksmart_device__1__0_models.
         AddDeviceVideoConferenceMembersResponse(), await
         self.do_roarequest_async(
             'AddDeviceVideoConferenceMembers', 'smartDevice_1.0', 'HTTP',
             'POST', 'AK',
             f'/v1.0/smartDevice/devices/{device_id}/videoConferences/{conference_id}/members',
             'none', req, runtime))
示例#11
0
 def create_search_tab_with_options(
     self,
     request: dingtalksearch__1__0_models.CreateSearchTabRequest,
     headers: dingtalksearch__1__0_models.CreateSearchTabHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalksearch__1__0_models.CreateSearchTabResponse:
     UtilClient.validate_model(request)
     body = {}
     if not UtilClient.is_unset(request.name):
         body['name'] = request.name
     if not UtilClient.is_unset(request.priority):
         body['priority'] = request.priority
     if not UtilClient.is_unset(request.source):
         body['source'] = request.source
     if not UtilClient.is_unset(request.status):
         body['status'] = request.status
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalksearch__1__0_models.CreateSearchTabResponse(),
         self.do_roarequest('CreateSearchTab', 'search_1.0', 'HTTP', 'POST',
                            'AK', f'/v1.0/search/tabs', 'json', req,
                            runtime))
示例#12
0
 def machine_users_update_with_options(
     self,
     request: dingtalksmart_device__1__0_models.MachineUsersUpdateRequest,
     headers: dingtalksmart_device__1__0_models.MachineUsersUpdateHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalksmart_device__1__0_models.MachineUsersUpdateResponse:
     UtilClient.validate_model(request)
     body = {}
     if not UtilClient.is_unset(request.add_dept_ids):
         body['addDeptIds'] = request.add_dept_ids
     if not UtilClient.is_unset(request.add_user_ids):
         body['addUserIds'] = request.add_user_ids
     if not UtilClient.is_unset(request.del_dept_ids):
         body['delDeptIds'] = request.del_dept_ids
     if not UtilClient.is_unset(request.del_user_ids):
         body['delUserIds'] = request.del_user_ids
     if not UtilClient.is_unset(request.dev_ids):
         body['devIds'] = request.dev_ids
     if not UtilClient.is_unset(request.device_ids):
         body['deviceIds'] = request.device_ids
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalksmart_device__1__0_models.MachineUsersUpdateResponse(),
         self.do_roarequest('MachineUsersUpdate', 'smartDevice_1.0', 'HTTP',
                            'PUT', 'AK',
                            f'/v1.0/smartDevice/atmachines/users', 'none',
                            req, runtime))
示例#13
0
 async def machine_manager_update_with_options_async(
     self,
     request: dingtalksmart_device__1__0_models.MachineManagerUpdateRequest,
     headers: dingtalksmart_device__1__0_models.MachineManagerUpdateHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalksmart_device__1__0_models.MachineManagerUpdateResponse:
     UtilClient.validate_model(request)
     body = {}
     if not UtilClient.is_unset(request.atm_manager_right_map):
         body['atmManagerRightMap'] = request.atm_manager_right_map
     if not UtilClient.is_unset(request.device_id):
         body['deviceId'] = request.device_id
     if not UtilClient.is_unset(request.scope_dept_ids):
         body['scopeDeptIds'] = request.scope_dept_ids
     if not UtilClient.is_unset(request.user_id):
         body['userId'] = request.user_id
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalksmart_device__1__0_models.MachineManagerUpdateResponse(),
         await
         self.do_roarequest_async('MachineManagerUpdate', 'smartDevice_1.0',
                                  'HTTP', 'PUT', 'AK',
                                  f'/v1.0/smartDevice/atmachines/managers',
                                  'none', req, runtime))
示例#14
0
 async def extract_facial_feature_with_options_async(
     self,
     request: dingtalksmart_device__1__0_models.ExtractFacialFeatureRequest,
     headers: dingtalksmart_device__1__0_models.ExtractFacialFeatureHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalksmart_device__1__0_models.ExtractFacialFeatureResponse:
     UtilClient.validate_model(request)
     body = {}
     if not UtilClient.is_unset(request.media_id):
         body['mediaId'] = request.media_id
     if not UtilClient.is_unset(request.userid):
         body['userid'] = request.userid
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalksmart_device__1__0_models.ExtractFacialFeatureResponse(),
         await self.do_roarequest_async(
             'ExtractFacialFeature', 'smartDevice_1.0', 'HTTP', 'POST',
             'AK', f'/v1.0/smartDevice/faceRecognitions/features/extract',
             'json', req, runtime))
示例#15
0
 async def create_video_conference_with_options_async(
     self,
     request: dingtalkconference__1__0_models.CreateVideoConferenceRequest,
     headers: dingtalkconference__1__0_models.CreateVideoConferenceHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkconference__1__0_models.CreateVideoConferenceResponse:
     UtilClient.validate_model(request)
     body = {}
     if not UtilClient.is_unset(request.user_id):
         body['userId'] = request.user_id
     if not UtilClient.is_unset(request.conf_title):
         body['confTitle'] = request.conf_title
     if not UtilClient.is_unset(request.invite_user_ids):
         body['inviteUserIds'] = request.invite_user_ids
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalkconference__1__0_models.CreateVideoConferenceResponse(),
         await
         self.do_roarequest_async('CreateVideoConference', 'conference_1.0',
                                  'HTTP', 'POST', 'AK',
                                  f'/v1.0/conference/videoConferences',
                                  'json', req, runtime))
示例#16
0
 async def get_user_holidays_with_options_async(
     self,
     request: dingtalkattendance__1__0_models.GetUserHolidaysRequest,
     headers: dingtalkattendance__1__0_models.GetUserHolidaysHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkattendance__1__0_models.GetUserHolidaysResponse:
     UtilClient.validate_model(request)
     body = {}
     if not UtilClient.is_unset(request.user_ids):
         body['userIds'] = request.user_ids
     if not UtilClient.is_unset(request.work_date_from):
         body['workDateFrom'] = request.work_date_from
     if not UtilClient.is_unset(request.work_date_to):
         body['workDateTo'] = request.work_date_to
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalkattendance__1__0_models.GetUserHolidaysResponse(), await
         self.do_roarequest_async('GetUserHolidays', 'attendance_1.0',
                                  'HTTP', 'POST', 'AK',
                                  f'/v1.0/attendance/holidays', 'json', req,
                                  runtime))
示例#17
0
 def invoke_html_bundle_build_with_options(
     self,
     request: dingtalkminiapp__1__0_models.InvokeHtmlBundleBuildRequest,
     headers: dingtalkminiapp__1__0_models.InvokeHtmlBundleBuildHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkminiapp__1__0_models.InvokeHtmlBundleBuildResponse:
     UtilClient.validate_model(request)
     body = {}
     if not UtilClient.is_unset(request.bundle_id):
         body['bundleId'] = request.bundle_id
     if not UtilClient.is_unset(request.mini_app_id):
         body['miniAppId'] = request.mini_app_id
     if not UtilClient.is_unset(request.version):
         body['version'] = request.version
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalkminiapp__1__0_models.InvokeHtmlBundleBuildResponse(),
         self.do_roarequest('InvokeHtmlBundleBuild', 'miniapp_1.0', 'HTTP',
                            'POST', 'AK', f'/v1.0/miniapp/h5Bundles/build',
                            'json', req, runtime))
示例#18
0
 async def create_approve_with_options_async(
     self,
     request: dingtalkattendance__1__0_models.CreateApproveRequest,
     headers: dingtalkattendance__1__0_models.CreateApproveHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkattendance__1__0_models.CreateApproveResponse:
     UtilClient.validate_model(request)
     body = {}
     if not UtilClient.is_unset(request.userid):
         body['userid'] = request.userid
     if not UtilClient.is_unset(request.tag_name):
         body['tagName'] = request.tag_name
     if not UtilClient.is_unset(request.sub_type):
         body['subType'] = request.sub_type
     if not UtilClient.is_unset(request.punch_param):
         body['punchParam'] = request.punch_param
     if not UtilClient.is_unset(request.approve_id):
         body['approveId'] = request.approve_id
     if not UtilClient.is_unset(request.op_userid):
         body['opUserid'] = request.op_userid
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalkattendance__1__0_models.CreateApproveResponse(), await
         self.do_roarequest_async('CreateApprove', 'attendance_1.0', 'HTTP',
                                  'POST', 'AK',
                                  f'/v1.0/attendance/approves', 'json', req,
                                  runtime))
示例#19
0
 async def set_extend_setting_with_options_async(
     self,
     request: dingtalkminiapp__1__0_models.SetExtendSettingRequest,
     headers: dingtalkminiapp__1__0_models.SetExtendSettingHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkminiapp__1__0_models.SetExtendSettingResponse:
     UtilClient.validate_model(request)
     body = {}
     if not UtilClient.is_unset(request.build_h5bundle):
         body['buildH5Bundle'] = request.build_h5bundle
     if not UtilClient.is_unset(request.mini_app_id):
         body['miniAppId'] = request.mini_app_id
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalkminiapp__1__0_models.SetExtendSettingResponse(), await
         self.do_roarequest_async('SetExtendSetting', 'miniapp_1.0', 'HTTP',
                                  'PUT', 'AK',
                                  f'/v1.0/miniapp/apps/settings', 'json',
                                  req, runtime))
示例#20
0
 async def create_cloud_feed_with_options_async(
     self,
     request: dingtalklive__1__0_models.CreateCloudFeedRequest,
     headers: dingtalklive__1__0_models.CreateCloudFeedHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalklive__1__0_models.CreateCloudFeedResponse:
     UtilClient.validate_model(request)
     body = {}
     if not UtilClient.is_unset(request.title):
         body['title'] = request.title
     if not UtilClient.is_unset(request.intro):
         body['intro'] = request.intro
     if not UtilClient.is_unset(request.user_id):
         body['userId'] = request.user_id
     if not UtilClient.is_unset(request.start_time):
         body['startTime'] = request.start_time
     if not UtilClient.is_unset(request.cover_url):
         body['coverUrl'] = request.cover_url
     if not UtilClient.is_unset(request.video_url):
         body['videoUrl'] = request.video_url
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalklive__1__0_models.CreateCloudFeedResponse(), await
         self.do_roarequest_async('CreateCloudFeed', 'live_1.0', 'HTTP',
                                  'POST', 'AK', f'/v1.0/live/cloudFeeds',
                                  'json', req, runtime))
示例#21
0
 async def update_version_status_with_options_async(
     self,
     request: dingtalkminiapp__1__0_models.UpdateVersionStatusRequest,
     headers: dingtalkminiapp__1__0_models.UpdateVersionStatusHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkminiapp__1__0_models.UpdateVersionStatusResponse:
     UtilClient.validate_model(request)
     body = {}
     if not UtilClient.is_unset(request.bundle_id):
         body['bundleId'] = request.bundle_id
     if not UtilClient.is_unset(request.mini_app_id):
         body['miniAppId'] = request.mini_app_id
     if not UtilClient.is_unset(request.version):
         body['version'] = request.version
     if not UtilClient.is_unset(request.version_type):
         body['versionType'] = request.version_type
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalkminiapp__1__0_models.UpdateVersionStatusResponse(), await
         self.do_roarequest_async('UpdateVersionStatus', 'miniapp_1.0',
                                  'HTTP', 'POST', 'AK',
                                  f'/v1.0/miniapp/versions/status', 'json',
                                  req, runtime))
示例#22
0
 async def stop_cloud_feed_with_options_async(
     self,
     feed_id: str,
     request: dingtalklive__1__0_models.StopCloudFeedRequest,
     headers: dingtalklive__1__0_models.StopCloudFeedHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalklive__1__0_models.StopCloudFeedResponse:
     UtilClient.validate_model(request)
     body = {}
     if not UtilClient.is_unset(request.user_id):
         body['userId'] = request.user_id
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalklive__1__0_models.StopCloudFeedResponse(), await
         self.do_roarequest_async('StopCloudFeed', 'live_1.0', 'HTTP',
                                  'POST', 'AK',
                                  f'/v1.0/live/cloudFeeds/{feed_id}/stop',
                                  'json', req, runtime))
示例#23
0
 async def batch_send_otowith_options_async(
     self,
     request: dingtalkrobot__1__0_models.BatchSendOTORequest,
     headers: dingtalkrobot__1__0_models.BatchSendOTOHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkrobot__1__0_models.BatchSendOTOResponse:
     UtilClient.validate_model(request)
     body = {}
     if not UtilClient.is_unset(request.robot_code):
         body['robotCode'] = request.robot_code
     if not UtilClient.is_unset(request.user_ids):
         body['userIds'] = request.user_ids
     if not UtilClient.is_unset(request.msg_key):
         body['msgKey'] = request.msg_key
     if not UtilClient.is_unset(request.msg_param):
         body['msgParam'] = request.msg_param
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalkrobot__1__0_models.BatchSendOTOResponse(), await
         self.do_roarequest_async('BatchSendOTO', 'robot_1.0', 'HTTP',
                                  'POST', 'AK',
                                  f'/v1.0/robot/oToMessages/batchSend',
                                  'json', req, runtime))
示例#24
0
 async def add_share_cid_list_with_options_async(
     self,
     feed_id: str,
     request: dingtalklive__1__0_models.AddShareCidListRequest,
     headers: dingtalklive__1__0_models.AddShareCidListHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalklive__1__0_models.AddShareCidListResponse:
     UtilClient.validate_model(request)
     body = {}
     if not UtilClient.is_unset(request.user_id):
         body['userId'] = request.user_id
     if not UtilClient.is_unset(request.group_ids):
         body['groupIds'] = request.group_ids
     if not UtilClient.is_unset(request.group_id_type):
         body['groupIdType'] = request.group_id_type
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalklive__1__0_models.AddShareCidListResponse(), await
         self.do_roarequest_async('AddShareCidList', 'live_1.0', 'HTTP',
                                  'POST', 'AK',
                                  f'/v1.0/live/cloudFeeds/{feed_id}/share',
                                  'json', req, runtime))
示例#25
0
 async def add_hrm_preentry_with_options_async(
     self,
     request: dingtalkhrm__1__0_models.AddHrmPreentryRequest,
     headers: dingtalkhrm__1__0_models.AddHrmPreentryHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkhrm__1__0_models.AddHrmPreentryResponse:
     UtilClient.validate_model(request)
     body = {}
     if not UtilClient.is_unset(request.agent_id):
         body['agentId'] = request.agent_id
     if not UtilClient.is_unset(request.groups):
         body['groups'] = request.groups
     if not UtilClient.is_unset(request.mobile):
         body['mobile'] = request.mobile
     if not UtilClient.is_unset(request.name):
         body['name'] = request.name
     if not UtilClient.is_unset(request.pre_entry_time):
         body['preEntryTime'] = request.pre_entry_time
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalkhrm__1__0_models.AddHrmPreentryResponse(), await
         self.do_roarequest_async('AddHrmPreentry', 'hrm_1.0', 'HTTP',
                                  'POST', 'AK', f'/v1.0/hrm/preentries',
                                  'json', req, runtime))
示例#26
0
 async def edit_feed_replay_with_options_async(
     self,
     feed_id: str,
     request: dingtalklive__1__0_models.EditFeedReplayRequest,
     headers: dingtalklive__1__0_models.EditFeedReplayHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalklive__1__0_models.EditFeedReplayResponse:
     UtilClient.validate_model(request)
     body = {}
     if not UtilClient.is_unset(request.user_id):
         body['userId'] = request.user_id
     if not UtilClient.is_unset(request.edit_start_time):
         body['editStartTime'] = request.edit_start_time
     if not UtilClient.is_unset(request.edit_end_time):
         body['editEndTime'] = request.edit_end_time
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalklive__1__0_models.EditFeedReplayResponse(), await
         self.do_roarequest_async(
             'EditFeedReplay', 'live_1.0', 'HTTP', 'POST', 'AK',
             f'/v1.0/live/openFeeds/{feed_id}/cutReplay', 'json', req,
             runtime))
示例#27
0
 async def ask_robot_with_options_async(
     self,
     request: dingtalkdingmi__1__0_models.AskRobotRequest,
     headers: dingtalkdingmi__1__0_models.AskRobotHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkdingmi__1__0_models.AskRobotResponse:
     UtilClient.validate_model(request)
     body = {}
     if not UtilClient.is_unset(request.question):
         body['question'] = request.question
     if not UtilClient.is_unset(request.ding_corp_id):
         body['dingCorpId'] = request.ding_corp_id
     if not UtilClient.is_unset(request.robot_app_key):
         body['robotAppKey'] = request.robot_app_key
     if not UtilClient.is_unset(request.session_uuid):
         body['sessionUuid'] = request.session_uuid
     if not UtilClient.is_unset(request.ding_suite_key):
         body['dingSuiteKey'] = request.ding_suite_key
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalkdingmi__1__0_models.AskRobotResponse(), await
         self.do_roarequest_async('AskRobot', 'dingmi_1.0', 'HTTP', 'POST',
                                  'AK', f'/v1.0/dingmi/robots/ask', 'json',
                                  req, runtime))
示例#28
0
 async def get_user_token_with_options_async(
     self,
     request: dingtalkoauth_2__1__0_models.GetUserTokenRequest,
     headers: Dict[str, str],
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkoauth_2__1__0_models.GetUserTokenResponse:
     UtilClient.validate_model(request)
     body = {}
     if not UtilClient.is_unset(request.client_id):
         body['clientId'] = request.client_id
     if not UtilClient.is_unset(request.client_secret):
         body['clientSecret'] = request.client_secret
     if not UtilClient.is_unset(request.code):
         body['code'] = request.code
     if not UtilClient.is_unset(request.refresh_token):
         body['refreshToken'] = request.refresh_token
     if not UtilClient.is_unset(request.grant_type):
         body['grantType'] = request.grant_type
     req = open_api_models.OpenApiRequest(
         headers=headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalkoauth_2__1__0_models.GetUserTokenResponse(), await
         self.do_roarequest_async('GetUserToken', 'oauth2_1.0', 'HTTP',
                                  'POST', 'AK',
                                  f'/v1.0/oauth2/userAccessToken', 'json',
                                  req, runtime))
示例#29
0
 def reply_robot_with_options(
     self,
     request: dingtalkdingmi__1__0_models.ReplyRobotRequest,
     headers: dingtalkdingmi__1__0_models.ReplyRobotHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkdingmi__1__0_models.ReplyRobotResponse:
     UtilClient.validate_model(request)
     body = {}
     if not UtilClient.is_unset(request.ding_corp_id):
         body['dingCorpId'] = request.ding_corp_id
     if not UtilClient.is_unset(request.proxy_message_str):
         body['proxyMessageStr'] = request.proxy_message_str
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token
     req = open_api_models.OpenApiRequest(
         headers=real_headers, body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalkdingmi__1__0_models.ReplyRobotResponse(),
         self.do_roarequest('ReplyRobot', 'dingmi_1.0', 'HTTP', 'POST',
                            'AK', f'/v1.0/dingmi/robots/reply', 'json', req,
                            runtime))
示例#30
0
 def create_schedule_with_options(self, request, headers, runtime):
     UtilClient.validate_model(request)
     body = {}
     if not UtilClient.is_unset(request.data_address):
         body['DataAddress'] = request.data_address
     if not UtilClient.is_unset(request.data_source):
         body['DataSource'] = request.data_source
     if not UtilClient.is_unset(request.ding_bot_keyword):
         body['DingBotKeyword'] = request.ding_bot_keyword
     if not UtilClient.is_unset(request.ding_bot_token):
         body['DingBotToken'] = request.ding_bot_token
     if not UtilClient.is_unset(request.name):
         body['Name'] = request.name
     if not UtilClient.is_unset(request.partition):
         body['Partition'] = request.partition
     if not UtilClient.is_unset(request.phone_number_column):
         body['PhoneNumberColumn'] = request.phone_number_column
     if not UtilClient.is_unset(request.send_time):
         body['SendTime'] = request.send_time
     if not UtilClient.is_unset(request.signature_id):
         body['SignatureID'] = request.signature_id
     if not UtilClient.is_unset(request.template_code_column):
         body['TemplateCodeColumn'] = request.template_code_column
     if not UtilClient.is_unset(request.template_id):
         body['TemplateID'] = request.template_id
     req = open_api_models.OpenApiRequest(
         headers=headers,
         body=OpenApiUtilClient.parse_to_map(body)
     )
     return TeaCore.from_map(
         pai_plugin_20210325_models.CreateScheduleResponse(),
         self.do_roarequest('CreateSchedule', '2021-03-25', 'HTTPS', 'POST', 'AK', '/api/v1/schedules', 'json', req, runtime)
     )