Conversations class
대화를 나타내는 클래스입니다.
생성자
| Conversations(Connector |
대화를 만듭니다. |
메서드
생성자 세부 정보
Conversations(ConnectorClientContext)
대화를 만듭니다.
new Conversations(client: ConnectorClientContext)
매개 변수
- client
- ConnectorClientContext
서비스 클라이언트에 대한 참조입니다.
메서드 세부 정보
createConversation(ConversationParameters, RequestOptionsBase)
새 대화를 만듭니다. 를 사용하여 이 메서드에 게시
- 대화를 만드는 봇인 봇
- 직접 메시지가 아닌 경우 IsGroup이 true로 설정됨(기본값은 false임)
- 대화에 포함할 멤버를 포함하는 배열
반환 값은 메시지 페이로드 및 REST API URI에 사용하기에 적합한 대화 ID를 포함하는 ResourceResponse입니다.
대부분의 채널은 직접 메시지 대화를 시작하는 봇의 의미 체계만 지원합니다. 이 작업을 수행하는 방법의 예는 다음과 같습니다.
const resource = await connector.conversations.createConversation({
bot,
members: [{ id: 'user1' }]
});
await connector.conversations.sendToConversation(resource.Id, ... );
function createConversation(parameters: ConversationParameters, options?: RequestOptionsBase): Promise<Models.ConversationsCreateConversationResponse>
매개 변수
- parameters
-
ConversationParameters
에서 대화를 만들 매개 변수
- options
-
RequestOptionsBase
반환
Promise<Models.ConversationsCreateConversationResponse>
Promise<Models.ConversationsCreateConversationResponse>
createConversation(ConversationParameters, RequestOptionsBase, ServiceCallback<ConversationResourceResponse>)
function createConversation(parameters: ConversationParameters, options: RequestOptionsBase, callback: ServiceCallback<ConversationResourceResponse>)
매개 변수
- parameters
-
ConversationParameters
에서 대화를 만들 매개 변수
- options
-
RequestOptionsBase
선택적 매개 변수
- callback
-
ServiceCallback<ConversationResourceResponse>
콜백
createConversation(ConversationParameters, ServiceCallback<ConversationResourceResponse>)
function createConversation(parameters: ConversationParameters, callback: ServiceCallback<ConversationResourceResponse>)
매개 변수
- parameters
-
ConversationParameters
에서 대화를 만들 매개 변수
- callback
-
ServiceCallback<ConversationResourceResponse>
콜백
deleteActivity(string, string, RequestOptionsBase)
기존 활동을 삭제합니다. 일부 채널을 사용하면 기존 활동을 삭제할 수 있으며, 성공하면 이 메서드가 지정된 활동을 제거합니다.
function deleteActivity(conversationId: string, activityId: string, options?: RequestOptionsBase): Promise<RestResponse>
매개 변수
- conversationId
-
string
대화 ID
- activityId
-
string
삭제할 activityId
- options
-
RequestOptionsBase
반환
Promise<RestResponse>
promise<msRest.RestResponse>
deleteActivity(string, string, RequestOptionsBase, ServiceCallback<void>)
function deleteActivity(conversationId: string, activityId: string, options: RequestOptionsBase, callback: ServiceCallback<void>)
매개 변수
- conversationId
-
string
대화 ID
- activityId
-
string
삭제할 activityId
- options
-
RequestOptionsBase
선택적 매개 변수
- callback
-
ServiceCallback<void>
콜백
deleteActivity(string, string, ServiceCallback<void>)
function deleteActivity(conversationId: string, activityId: string, callback: ServiceCallback<void>)
매개 변수
- conversationId
-
string
대화 ID
- activityId
-
string
삭제할 activityId
- callback
-
ServiceCallback<void>
콜백
deleteConversationMember(string, string, RequestOptionsBase)
대화에서 멤버를 삭제합니다. 이 REST API는 ConversationId 및 memberId(문자열 형식)를 사용하고 대화에서 해당 멤버를 제거합니다. 해당 멤버가 대화의 마지막 멤버인 경우 대화도 삭제됩니다.
function deleteConversationMember(conversationId: string, memberId: string, options?: RequestOptionsBase): Promise<RestResponse>
매개 변수
- conversationId
-
string
대화 ID
- memberId
-
string
이 대화에서 삭제할 멤버의 ID
- options
-
RequestOptionsBase
반환
Promise<RestResponse>
promise<msRest.RestResponse>
deleteConversationMember(string, string, RequestOptionsBase, ServiceCallback<void>)
function deleteConversationMember(conversationId: string, memberId: string, options: RequestOptionsBase, callback: ServiceCallback<void>)
매개 변수
- conversationId
-
string
대화 ID
- memberId
-
string
이 대화에서 삭제할 멤버의 ID
- options
-
RequestOptionsBase
선택적 매개 변수
- callback
-
ServiceCallback<void>
콜백
deleteConversationMember(string, string, ServiceCallback<void>)
function deleteConversationMember(conversationId: string, memberId: string, callback: ServiceCallback<void>)
매개 변수
- conversationId
-
string
대화 ID
- memberId
-
string
이 대화에서 삭제할 멤버의 ID
- callback
-
ServiceCallback<void>
콜백
getActivityMembers(string, string, RequestOptionsBase)
활동의 멤버를 열거합니다. 이 REST API는 ConversationId 및 ActivityId를 사용하여 대화에서 특정 활동의 멤버를 나타내는 ChannelAccount 개체의 배열을 반환합니다.
function getActivityMembers(conversationId: string, activityId: string, options?: RequestOptionsBase): Promise<Models.ConversationsGetActivityMembersResponse>
매개 변수
- conversationId
-
string
대화 ID
- activityId
-
string
활동 ID
- options
-
RequestOptionsBase
반환
Promise<Models.ConversationsGetActivityMembersResponse>
Promise<Models.ConversationsGetActivityMembersResponse>
getActivityMembers(string, string, RequestOptionsBase, ServiceCallback<ChannelAccount[]>)
function getActivityMembers(conversationId: string, activityId: string, options: RequestOptionsBase, callback: ServiceCallback<ChannelAccount[]>)
매개 변수
- conversationId
-
string
대화 ID
- activityId
-
string
활동 ID
- options
-
RequestOptionsBase
선택적 매개 변수
- callback
-
ServiceCallback<ChannelAccount[]>
콜백
getActivityMembers(string, string, ServiceCallback<ChannelAccount[]>)
function getActivityMembers(conversationId: string, activityId: string, callback: ServiceCallback<ChannelAccount[]>)
매개 변수
- conversationId
-
string
대화 ID
- activityId
-
string
활동 ID
- callback
-
ServiceCallback<ChannelAccount[]>
콜백
getConversationMember(string, string, RequestOptionsBase | ServiceCallback<ChannelAccount[]>, ServiceCallback<ChannelAccount[]>)
function getConversationMember(conversationId: string, memberId: string, options?: RequestOptionsBase | ServiceCallback<ChannelAccount[]>, callback?: ServiceCallback<ChannelAccount[]>): Promise<Models.ConversationsGetConversationMemberResponse>
매개 변수
- conversationId
-
string
대화 ID
- memberId
-
string
사용자에 대한 MemberId
- options
-
RequestOptionsBase | ServiceCallback<ChannelAccount[]>
선택적 매개 변수
- callback
-
ServiceCallback<ChannelAccount[]>
콜백
반환
Promise<Models.ConversationsGetConversationMemberResponse>
getConversationMembers(string, RequestOptionsBase)
대화의 멤버를 열거합니다. 이 REST API는 ConversationId를 사용하고 대화의 멤버를 나타내는 ChannelAccount 개체의 배열을 반환합니다.
function getConversationMembers(conversationId: string, options?: RequestOptionsBase): Promise<Models.ConversationsGetConversationMembersResponse>
매개 변수
- conversationId
-
string
대화 ID
- options
-
RequestOptionsBase
반환
Promise<Models.ConversationsGetConversationMembersResponse>
Promise<Models.ConversationsGetConversationMembersResponse>
getConversationMembers(string, RequestOptionsBase, ServiceCallback<ChannelAccount[]>)
function getConversationMembers(conversationId: string, options: RequestOptionsBase, callback: ServiceCallback<ChannelAccount[]>)
매개 변수
- conversationId
-
string
대화 ID
- options
-
RequestOptionsBase
선택적 매개 변수
- callback
-
ServiceCallback<ChannelAccount[]>
콜백
getConversationMembers(string, ServiceCallback<ChannelAccount[]>)
function getConversationMembers(conversationId: string, callback: ServiceCallback<ChannelAccount[]>)
매개 변수
- conversationId
-
string
대화 ID
- callback
-
ServiceCallback<ChannelAccount[]>
콜백
getConversationPagedMembers(string, ConversationsGetConversationPagedMembersOptionalParams)
대화의 멤버를 한 번에 한 페이지씩 열거합니다. 이 REST API는 ConversationId를 사용합니다. 필요에 따라 pageSize 및/또는 continuationToken을 제공할 수 있습니다. 대화의 멤버를 나타내는 ChannelAccounts 배열과 더 많은 값을 가져오는 데 사용할 수 있는 연속 토큰이 포함된 PagedMembersResult를 반환합니다.
각 호출과 함께 ChannelAccounts 레코드의 한 페이지가 반환됩니다. 페이지의 레코드 수는 채널과 호출에 따라 달라질 수 있습니다. pageSize 매개 변수를 제안으로 사용할 수 있습니다. 추가 결과가 없으면 응답에 연속 토큰이 포함되지 않습니다. 대화에 멤버가 없으면 멤버가 비어 있거나 응답에 표시되지 않습니다.
이전 요청의 연속 토큰이 있는 요청에 대한 응답은 이전 요청의 멤버를 거의 반환하지 않을 수 있습니다.
function getConversationPagedMembers(conversationId: string, options?: ConversationsGetConversationPagedMembersOptionalParams): Promise<Models.ConversationsGetConversationPagedMembersResponse>
매개 변수
- conversationId
-
string
대화 ID
반환
Promise<Models.ConversationsGetConversationPagedMembersResponse>
Promise<Models.ConversationsGetConversationPagedMembersResponse>
getConversationPagedMembers(string, ConversationsGetConversationPagedMembersOptionalParams, ServiceCallback<PagedMembersResult>)
function getConversationPagedMembers(conversationId: string, options: ConversationsGetConversationPagedMembersOptionalParams, callback: ServiceCallback<PagedMembersResult>)
매개 변수
- conversationId
-
string
대화 ID
선택적 매개 변수
- callback
-
ServiceCallback<PagedMembersResult>
콜백
getConversationPagedMembers(string, ServiceCallback<PagedMembersResult>)
function getConversationPagedMembers(conversationId: string, callback: ServiceCallback<PagedMembersResult>)
매개 변수
- conversationId
-
string
대화 ID
- callback
-
ServiceCallback<PagedMembersResult>
콜백
getConversations(ConversationsGetConversationsOptionalParams)
이 봇이 참여한 대화를 나열합니다. 건너뛰기 토큰을 사용하여 이 메서드에서 가져오기
반환 값은 ConversationMembers 배열과 건너뛰기 토큰을 포함하는 ConversationResult입니다. 건너뛰기 토큰이 비어 있지 않으면 반환할 추가 값이 있습니다. 반환된 토큰을 사용하여 이 메서드를 다시 호출하여 더 많은 값을 가져옵니다.
각 ConversationMembers 개체에는 대화의 ID와 대화의 멤버를 설명하는 ChannelAccounts 배열이 포함됩니다.
function getConversations(options?: ConversationsGetConversationsOptionalParams): Promise<Models.ConversationsGetConversationsResponse>
매개 변수
반환
Promise<Models.ConversationsGetConversationsResponse>
Promise<Models.ConversationsGetConversationsResponse>
getConversations(ConversationsGetConversationsOptionalParams, ServiceCallback<ConversationsResult>)
function getConversations(options: ConversationsGetConversationsOptionalParams, callback: ServiceCallback<ConversationsResult>)
매개 변수
선택적 매개 변수
- callback
-
ServiceCallback<ConversationsResult>
콜백
getConversations(ServiceCallback<ConversationsResult>)
function getConversations(callback: ServiceCallback<ConversationsResult>)
매개 변수
- callback
-
ServiceCallback<ConversationsResult>
콜백
replyToActivity(string, string, Partial<Activity>, RequestOptionsBase)
이 메서드를 사용하면 활동에 회신할 수 있습니다. SendToConversation()과 약간 다릅니다.
- SendToConversation(conversationId) - 채널의 타임스탬프 또는 의미 체계에 따라 대화 끝에 활동을 추가합니다.
- ReplyToActivity(conversationId,ActivityId) - 채널이 지원하는 경우 활동을 다른 활동에 대한 회신으로 추가합니다. 채널이 중첩된 회신을 지원하지 않는 경우 ReplyToActivity는 SendToConversation으로 돌아갑니다.
대화의 특정 활동에 회신할 때 ReplyToActivity를 사용합니다.
다른 모든 경우에 SendToConversation을 사용합니다.
function replyToActivity(conversationId: string, activityId: string, activity: Partial<Activity>, options?: RequestOptionsBase): Promise<Models.ConversationsReplyToActivityResponse>
매개 변수
- conversationId
-
string
대화 ID
- activityId
-
string
activityId 회신(선택 사항)
- activity
-
Partial<Activity>
보낼 활동
- options
-
RequestOptionsBase
반환
Promise<Models.ConversationsReplyToActivityResponse>
Promise<Models.ConversationsReplyToActivityResponse>
replyToActivity(string, string, Partial<Activity>, RequestOptionsBase, ServiceCallback<ResourceResponse>)
function replyToActivity(conversationId: string, activityId: string, activity: Partial<Activity>, options: RequestOptionsBase, callback: ServiceCallback<ResourceResponse>)
매개 변수
- conversationId
-
string
대화 ID
- activityId
-
string
activityId 회신(선택 사항)
- activity
-
Partial<Activity>
보낼 활동
- options
-
RequestOptionsBase
선택적 매개 변수
- callback
-
ServiceCallback<ResourceResponse>
콜백
replyToActivity(string, string, Partial<Activity>, ServiceCallback<ResourceResponse>)
function replyToActivity(conversationId: string, activityId: string, activity: Partial<Activity>, callback: ServiceCallback<ResourceResponse>)
매개 변수
- conversationId
-
string
대화 ID
- activityId
-
string
activityId 회신(선택 사항)
- activity
-
Partial<Activity>
보낼 활동
- callback
-
ServiceCallback<ResourceResponse>
콜백
sendConversationHistory(string, Transcript, RequestOptionsBase)
이 메서드를 사용하면 대화에 기록 활동을 업로드할 수 있습니다. 보낸 사람은 기록 활동에 고유한 ID와 적절한 타임스탬프가 있는지 확인해야 합니다. ID는 클라이언트에서 중복 작업을 처리하는 데 사용되며 타임스탬프는 클라이언트가 작업을 올바른 순서로 렌더링하는 데 사용됩니다.
function sendConversationHistory(conversationId: string, history: Transcript, options?: RequestOptionsBase): Promise<Models.ConversationsSendConversationHistoryResponse>
매개 변수
- conversationId
-
string
대화 ID
- history
-
Transcript
역사적인 활동
- options
-
RequestOptionsBase
반환
Promise<Models.ConversationsSendConversationHistoryResponse>
Promise<Models.ConversationsSendConversationHistoryResponse>
sendConversationHistory(string, Transcript, RequestOptionsBase, ServiceCallback<ResourceResponse>)
function sendConversationHistory(conversationId: string, history: Transcript, options: RequestOptionsBase, callback: ServiceCallback<ResourceResponse>)
매개 변수
- conversationId
-
string
대화 ID
- history
-
Transcript
역사적인 활동
- options
-
RequestOptionsBase
선택적 매개 변수
- callback
-
ServiceCallback<ResourceResponse>
콜백
sendConversationHistory(string, Transcript, ServiceCallback<ResourceResponse>)
function sendConversationHistory(conversationId: string, history: Transcript, callback: ServiceCallback<ResourceResponse>)
매개 변수
- conversationId
-
string
대화 ID
- history
-
Transcript
역사적인 활동
- callback
-
ServiceCallback<ResourceResponse>
콜백
sendToConversation(string, Partial<Activity>, RequestOptionsBase)
이 메서드를 사용하면 대화가 끝날 때까지 활동을 보낼 수 있습니다. ReplyToActivity()와 약간 다릅니다.
- SendToConversation(conversationId) - 채널의 타임스탬프 또는 의미 체계에 따라 대화 끝에 활동을 추가합니다.
- ReplyToActivity(conversationId,ActivityId) - 채널이 지원하는 경우 활동을 다른 활동에 대한 회신으로 추가합니다. 채널이 중첩된 회신을 지원하지 않는 경우 ReplyToActivity는 SendToConversation으로 돌아갑니다.
대화의 특정 활동에 회신할 때 ReplyToActivity를 사용합니다.
다른 모든 경우에 SendToConversation을 사용합니다.
function sendToConversation(conversationId: string, activity: Partial<Activity>, options?: RequestOptionsBase): Promise<Models.ConversationsSendToConversationResponse>
매개 변수
- conversationId
-
string
대화 ID
- activity
-
Partial<Activity>
보낼 활동
- options
-
RequestOptionsBase
반환
Promise<Models.ConversationsSendToConversationResponse>
Promise<Models.ConversationsSendToConversationResponse>
sendToConversation(string, Partial<Activity>, RequestOptionsBase, ServiceCallback<ResourceResponse>)
function sendToConversation(conversationId: string, activity: Partial<Activity>, options: RequestOptionsBase, callback: ServiceCallback<ResourceResponse>)
매개 변수
- conversationId
-
string
대화 ID
- activity
-
Partial<Activity>
보낼 활동
- options
-
RequestOptionsBase
선택적 매개 변수
- callback
-
ServiceCallback<ResourceResponse>
콜백
sendToConversation(string, Partial<Activity>, ServiceCallback<ResourceResponse>)
function sendToConversation(conversationId: string, activity: Partial<Activity>, callback: ServiceCallback<ResourceResponse>)
매개 변수
- conversationId
-
string
대화 ID
- activity
-
Partial<Activity>
보낼 활동
- callback
-
ServiceCallback<ResourceResponse>
콜백
updateActivity(string, string, Partial<Activity>, RequestOptionsBase)
기존 활동을 편집합니다. 일부 채널을 사용하면 기존 활동을 편집하여 봇 대화의 새 상태를 반영할 수 있습니다.
예를 들어 누군가가 "승인" 단추를 클릭한 후 단추를 제거할 수 있습니다.
function updateActivity(conversationId: string, activityId: string, activity: Partial<Activity>, options?: RequestOptionsBase): Promise<Models.ConversationsUpdateActivityResponse>
매개 변수
- conversationId
-
string
대화 ID
- activityId
-
string
업데이트할 activityId
- activity
-
Partial<Activity>
대체 작업
- options
-
RequestOptionsBase
반환
Promise<Models.ConversationsUpdateActivityResponse>
Promise<Models.ConversationsUpdateActivityResponse>
updateActivity(string, string, Partial<Activity>, RequestOptionsBase, ServiceCallback<ResourceResponse>)
function updateActivity(conversationId: string, activityId: string, activity: Partial<Activity>, options: RequestOptionsBase, callback: ServiceCallback<ResourceResponse>)
매개 변수
- conversationId
-
string
대화 ID
- activityId
-
string
업데이트할 activityId
- activity
-
Partial<Activity>
대체 작업
- options
-
RequestOptionsBase
선택적 매개 변수
- callback
-
ServiceCallback<ResourceResponse>
콜백
updateActivity(string, string, Partial<Activity>, ServiceCallback<ResourceResponse>)
function updateActivity(conversationId: string, activityId: string, activity: Partial<Activity>, callback: ServiceCallback<ResourceResponse>)
매개 변수
- conversationId
-
string
대화 ID
- activityId
-
string
업데이트할 activityId
- activity
-
Partial<Activity>
대체 작업
- callback
-
ServiceCallback<ResourceResponse>
콜백
uploadAttachment(string, AttachmentData, RequestOptionsBase)
채널의 Blob Storage에 직접 첨부 파일을 업로드합니다. 이는 엔터프라이즈를 처리할 때 규격 저장소에 데이터를 저장할 수 있기 때문에 유용합니다.
응답은 첨부 파일 API와 함께 사용하기에 적합한 AttachmentId를 포함하는 ResourceResponse입니다.
function uploadAttachment(conversationId: string, attachmentUpload: AttachmentData, options?: RequestOptionsBase): Promise<Models.ConversationsUploadAttachmentResponse>
매개 변수
- conversationId
-
string
대화 ID
- attachmentUpload
-
AttachmentData
첨부 파일 데이터
- options
-
RequestOptionsBase
반환
Promise<Models.ConversationsUploadAttachmentResponse>
Promise<Models.ConversationsUploadAttachmentResponse>
uploadAttachment(string, AttachmentData, RequestOptionsBase, ServiceCallback<ResourceResponse>)
function uploadAttachment(conversationId: string, attachmentUpload: AttachmentData, options: RequestOptionsBase, callback: ServiceCallback<ResourceResponse>)
매개 변수
- conversationId
-
string
대화 ID
- attachmentUpload
-
AttachmentData
첨부 파일 데이터
- options
-
RequestOptionsBase
선택적 매개 변수
- callback
-
ServiceCallback<ResourceResponse>
콜백
uploadAttachment(string, AttachmentData, ServiceCallback<ResourceResponse>)
function uploadAttachment(conversationId: string, attachmentUpload: AttachmentData, callback: ServiceCallback<ResourceResponse>)
매개 변수
- conversationId
-
string
대화 ID
- attachmentUpload
-
AttachmentData
첨부 파일 데이터
- callback
-
ServiceCallback<ResourceResponse>
콜백