機械翻訳について

すべての詳細を含む通知の表示

Typescriptの例を次に示します:

const frameworkProvider: IUiEventsFrameworkProvider = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('MyFirstExtensionID', 'v1');
    let notificationContext: INotificationContext = await frameworkProvider.getNotificationContext('notificationId007'); 
    const requestObject: IShowNotificationRequest = frameworkProvider.requestHelper.createPublishRequest('ShowNotification') as IShowNotificationRequest;        
requestObject.setType('error');     
requestObject.setTitle('Title');      
requestObject.setAutoTimeout(8);  
requestObject.setClosable(true);       
requestObject.setSummary('error message summary ');       
requestObject.setActions([{id: 'join', name: 'Join Call'}, {id: 'reject', name: 'Reject Call'}]);   
    notificationContext.publish(requestObject).then((message) => {
        const resp = message as INotificationOperationResponse;         
        if (Array.isArray(resp)) {
            resp.forEach((response, i) => {
                console.log(response.getContext().getNotificationId());
            });
        } else {
            console.log(resp.getResponseData().getNotificationId())
        }     
    });
JavaScriptの例を次に示します:
const frameworkProvider = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('MyFirstExtensionID', 'v1');     
    let notificationContext = await frameworkProvider.getNotificationContext('notificationId007'); 
    const requestObject = frameworkProvider.requestHelper.createPublishRequest('ShowNotification');       
	requestObject.setType('error');     
	requestObject.setTitle('Title');      
	requestObject.setAutoTimeout(8);  
	requestObject.setClosable(true);       
requestObject.setSummary('error message summary ');     
requestObject.setActions([{id: 'join', name: 'Join Call'}, {id: 'reject', name: 'Reject Call'}]);
    notificationContext.publish(requestObject).then((resp) => {
        if (Array.isArray(resp)) {
            let result;
            resp.forEach((response, i) => {
                console.log(response.getContext().getNotificationId());
            });
        } else {             
			console.log(resp.getResponseData().getNotificationId())
        }
    }).catch((err) => {
        console.log(err);
    });