|
100 | 100 | from ..models import PromptAsset |
101 | 101 | from ..models import PromptAssetCreate |
102 | 102 | from ..models import PromptAssetEntityListing |
| 103 | +from ..models import PromptAssetUpload |
103 | 104 | from ..models import PromptEntityListing |
104 | 105 | from ..models import RegisterArchitectExportJob |
105 | 106 | from ..models import RegisterArchitectExportJobResponse |
@@ -8959,6 +8960,90 @@ def post_architect_prompt_history(self, prompt_id: str, **kwargs) -> 'Operation' |
8959 | 8960 | callback=params.get('callback')) |
8960 | 8961 | return response |
8961 | 8962 |
|
| 8963 | + def post_architect_prompt_resource_uploads(self, prompt_id: str, language_code: str, **kwargs) -> 'PromptAssetUpload': |
| 8964 | + """ |
| 8965 | + Creates a presigned URL for uploading a user prompt file |
| 8966 | + |
| 8967 | + |
| 8968 | + This method makes a synchronous HTTP request by default. To make an |
| 8969 | + asynchronous HTTP request, please define a `callback` function |
| 8970 | + to be invoked when receiving the response. |
| 8971 | + >>> def callback_function(response): |
| 8972 | + >>> pprint(response) |
| 8973 | + >>> |
| 8974 | + >>> thread = api.post_architect_prompt_resource_uploads(prompt_id, language_code, callback=callback_function) |
| 8975 | + |
| 8976 | + :param callback function: The callback function |
| 8977 | + for asynchronous request. (optional) |
| 8978 | + :param str prompt_id: Prompt ID (required) |
| 8979 | + :param str language_code: Language (required) |
| 8980 | + :return: PromptAssetUpload |
| 8981 | + If the method is called asynchronously, |
| 8982 | + returns the request thread. |
| 8983 | + """ |
| 8984 | + |
| 8985 | + all_params = ['prompt_id', 'language_code'] |
| 8986 | + all_params.append('callback') |
| 8987 | + |
| 8988 | + params = locals() |
| 8989 | + for key, val in iteritems(params['kwargs']): |
| 8990 | + if key not in all_params: |
| 8991 | + raise TypeError( |
| 8992 | + "Got an unexpected keyword argument '%s'" |
| 8993 | + " to method post_architect_prompt_resource_uploads" % key |
| 8994 | + ) |
| 8995 | + params[key] = val |
| 8996 | + del params['kwargs'] |
| 8997 | + |
| 8998 | + # verify the required parameter 'prompt_id' is set |
| 8999 | + if ('prompt_id' not in params) or (params['prompt_id'] is None): |
| 9000 | + raise ValueError("Missing the required parameter `prompt_id` when calling `post_architect_prompt_resource_uploads`") |
| 9001 | + # verify the required parameter 'language_code' is set |
| 9002 | + if ('language_code' not in params) or (params['language_code'] is None): |
| 9003 | + raise ValueError("Missing the required parameter `language_code` when calling `post_architect_prompt_resource_uploads`") |
| 9004 | + |
| 9005 | + |
| 9006 | + resource_path = '/api/v2/architect/prompts/{promptId}/resources/{languageCode}/uploads'.replace('{format}', 'json') |
| 9007 | + path_params = {} |
| 9008 | + if 'prompt_id' in params: |
| 9009 | + path_params['promptId'] = params['prompt_id'] |
| 9010 | + if 'language_code' in params: |
| 9011 | + path_params['languageCode'] = params['language_code'] |
| 9012 | + |
| 9013 | + query_params = {} |
| 9014 | + |
| 9015 | + header_params = {} |
| 9016 | + |
| 9017 | + form_params = [] |
| 9018 | + local_var_files = {} |
| 9019 | + |
| 9020 | + body_params = None |
| 9021 | + |
| 9022 | + # HTTP header `Accept` |
| 9023 | + header_params['Accept'] = self.api_client.\ |
| 9024 | + select_header_accept(['application/json']) |
| 9025 | + if not header_params['Accept']: |
| 9026 | + del header_params['Accept'] |
| 9027 | + |
| 9028 | + # HTTP header `Content-Type` |
| 9029 | + header_params['Content-Type'] = self.api_client.\ |
| 9030 | + select_header_content_type(['application/json']) |
| 9031 | + |
| 9032 | + # Authentication setting |
| 9033 | + auth_settings = ['PureCloud OAuth'] |
| 9034 | + |
| 9035 | + response = self.api_client.call_api(resource_path, 'POST', |
| 9036 | + path_params, |
| 9037 | + query_params, |
| 9038 | + header_params, |
| 9039 | + body=body_params, |
| 9040 | + post_params=form_params, |
| 9041 | + files=local_var_files, |
| 9042 | + response_type='PromptAssetUpload', |
| 9043 | + auth_settings=auth_settings, |
| 9044 | + callback=params.get('callback')) |
| 9045 | + return response |
| 9046 | + |
8962 | 9047 | def post_architect_prompt_resources(self, prompt_id: str, body: 'PromptAssetCreate', **kwargs) -> 'PromptAsset': |
8963 | 9048 | """ |
8964 | 9049 | Create a new user prompt resource |
@@ -9355,6 +9440,90 @@ def post_architect_systemprompt_history(self, prompt_id: str, **kwargs) -> 'Oper |
9355 | 9440 | callback=params.get('callback')) |
9356 | 9441 | return response |
9357 | 9442 |
|
| 9443 | + def post_architect_systemprompt_resource_uploads(self, prompt_id: str, language_code: str, **kwargs) -> 'PromptAssetUpload': |
| 9444 | + """ |
| 9445 | + Creates a presigned URL for uploading a system prompt file |
| 9446 | + |
| 9447 | + |
| 9448 | + This method makes a synchronous HTTP request by default. To make an |
| 9449 | + asynchronous HTTP request, please define a `callback` function |
| 9450 | + to be invoked when receiving the response. |
| 9451 | + >>> def callback_function(response): |
| 9452 | + >>> pprint(response) |
| 9453 | + >>> |
| 9454 | + >>> thread = api.post_architect_systemprompt_resource_uploads(prompt_id, language_code, callback=callback_function) |
| 9455 | + |
| 9456 | + :param callback function: The callback function |
| 9457 | + for asynchronous request. (optional) |
| 9458 | + :param str prompt_id: Prompt ID (required) |
| 9459 | + :param str language_code: Language (required) |
| 9460 | + :return: PromptAssetUpload |
| 9461 | + If the method is called asynchronously, |
| 9462 | + returns the request thread. |
| 9463 | + """ |
| 9464 | + |
| 9465 | + all_params = ['prompt_id', 'language_code'] |
| 9466 | + all_params.append('callback') |
| 9467 | + |
| 9468 | + params = locals() |
| 9469 | + for key, val in iteritems(params['kwargs']): |
| 9470 | + if key not in all_params: |
| 9471 | + raise TypeError( |
| 9472 | + "Got an unexpected keyword argument '%s'" |
| 9473 | + " to method post_architect_systemprompt_resource_uploads" % key |
| 9474 | + ) |
| 9475 | + params[key] = val |
| 9476 | + del params['kwargs'] |
| 9477 | + |
| 9478 | + # verify the required parameter 'prompt_id' is set |
| 9479 | + if ('prompt_id' not in params) or (params['prompt_id'] is None): |
| 9480 | + raise ValueError("Missing the required parameter `prompt_id` when calling `post_architect_systemprompt_resource_uploads`") |
| 9481 | + # verify the required parameter 'language_code' is set |
| 9482 | + if ('language_code' not in params) or (params['language_code'] is None): |
| 9483 | + raise ValueError("Missing the required parameter `language_code` when calling `post_architect_systemprompt_resource_uploads`") |
| 9484 | + |
| 9485 | + |
| 9486 | + resource_path = '/api/v2/architect/systemprompts/{promptId}/resources/{languageCode}/uploads'.replace('{format}', 'json') |
| 9487 | + path_params = {} |
| 9488 | + if 'prompt_id' in params: |
| 9489 | + path_params['promptId'] = params['prompt_id'] |
| 9490 | + if 'language_code' in params: |
| 9491 | + path_params['languageCode'] = params['language_code'] |
| 9492 | + |
| 9493 | + query_params = {} |
| 9494 | + |
| 9495 | + header_params = {} |
| 9496 | + |
| 9497 | + form_params = [] |
| 9498 | + local_var_files = {} |
| 9499 | + |
| 9500 | + body_params = None |
| 9501 | + |
| 9502 | + # HTTP header `Accept` |
| 9503 | + header_params['Accept'] = self.api_client.\ |
| 9504 | + select_header_accept(['application/json']) |
| 9505 | + if not header_params['Accept']: |
| 9506 | + del header_params['Accept'] |
| 9507 | + |
| 9508 | + # HTTP header `Content-Type` |
| 9509 | + header_params['Content-Type'] = self.api_client.\ |
| 9510 | + select_header_content_type(['application/json']) |
| 9511 | + |
| 9512 | + # Authentication setting |
| 9513 | + auth_settings = ['PureCloud OAuth'] |
| 9514 | + |
| 9515 | + response = self.api_client.call_api(resource_path, 'POST', |
| 9516 | + path_params, |
| 9517 | + query_params, |
| 9518 | + header_params, |
| 9519 | + body=body_params, |
| 9520 | + post_params=form_params, |
| 9521 | + files=local_var_files, |
| 9522 | + response_type='PromptAssetUpload', |
| 9523 | + auth_settings=auth_settings, |
| 9524 | + callback=params.get('callback')) |
| 9525 | + return response |
| 9526 | + |
9358 | 9527 | def post_architect_systemprompt_resources(self, prompt_id: str, body: 'SystemPromptAsset', **kwargs) -> 'SystemPromptAsset': |
9359 | 9528 | """ |
9360 | 9529 | Create system prompt resource override. |
|
0 commit comments