@azure/communication-chat 1.6.0-alpha.20240607.1 → 1.6.0-beta.2
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.
- package/dist/index.js +836 -46
- package/dist/index.js.map +1 -1
- package/dist-esm/src/chatClient.js +4 -3
- package/dist-esm/src/chatClient.js.map +1 -1
- package/dist-esm/src/chatThreadClient.js +84 -4
- package/dist-esm/src/chatThreadClient.js.map +1 -1
- package/dist-esm/src/generated/src/chatApiClient.js +2 -2
- package/dist-esm/src/generated/src/chatApiClient.js.map +1 -1
- package/dist-esm/src/generated/src/models/index.js +8 -0
- package/dist-esm/src/generated/src/models/index.js.map +1 -1
- package/dist-esm/src/generated/src/models/mappers.js +298 -30
- package/dist-esm/src/generated/src/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/src/models/parameters.js +73 -1
- package/dist-esm/src/generated/src/models/parameters.js.map +1 -1
- package/dist-esm/src/generated/src/operations/chatThread.js +98 -0
- package/dist-esm/src/generated/src/operations/chatThread.js.map +1 -1
- package/dist-esm/src/generated/src/operationsInterfaces/chatThread.js.map +1 -1
- package/dist-esm/src/generated/src/tracing.js +1 -1
- package/dist-esm/src/generated/src/tracing.js.map +1 -1
- package/dist-esm/src/models/mappers.js +82 -6
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/models.js.map +1 -1
- package/dist-esm/src/models/options.js.map +1 -1
- package/dist-esm/src/xhrHttpClient.js +186 -0
- package/dist-esm/src/xhrHttpClient.js.map +1 -0
- package/package.json +4 -4
- package/types/communication-chat.d.ts +129 -4
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT license.
|
|
3
|
+
import { AbortError } from "@azure/abort-controller";
|
|
4
|
+
import { RestError, createHttpHeaders, } from "@azure/core-rest-pipeline";
|
|
5
|
+
// Temporary workaround with local copy of XhrHttpClient
|
|
6
|
+
function isNodeReadableStream(body) {
|
|
7
|
+
return body && typeof body.pipe === "function";
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Checks if the body is a Blob or Blob-like
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export function isBlob(body) {
|
|
14
|
+
// File objects count as a type of Blob, so we want to use instanceof explicitly
|
|
15
|
+
return (typeof Blob === "function" || typeof Blob === "object") && body instanceof Blob;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Checks if the body is a ReadableStream supported by browsers
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export function isReadableStream(body) {
|
|
22
|
+
return Boolean(body &&
|
|
23
|
+
typeof body.getReader === "function" &&
|
|
24
|
+
typeof body.tee === "function");
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A HttpClient implementation that uses XMLHttpRequest to send HTTP requests.
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
class XhrHttpClient {
|
|
31
|
+
/**
|
|
32
|
+
* Makes a request over an underlying transport layer and returns the response.
|
|
33
|
+
* @param request - The request to be made.
|
|
34
|
+
*/
|
|
35
|
+
async sendRequest(request) {
|
|
36
|
+
var _a;
|
|
37
|
+
const url = new URL(request.url);
|
|
38
|
+
const isInsecure = url.protocol !== "https:";
|
|
39
|
+
if (isInsecure && !request.allowInsecureConnection) {
|
|
40
|
+
throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`);
|
|
41
|
+
}
|
|
42
|
+
const xhr = new XMLHttpRequest();
|
|
43
|
+
if (request.proxySettings) {
|
|
44
|
+
throw new Error("HTTP proxy is not supported in browser environment");
|
|
45
|
+
}
|
|
46
|
+
const abortSignal = request.abortSignal;
|
|
47
|
+
if (abortSignal) {
|
|
48
|
+
if (abortSignal.aborted) {
|
|
49
|
+
throw new AbortError("The operation was aborted.");
|
|
50
|
+
}
|
|
51
|
+
const listener = () => {
|
|
52
|
+
xhr.abort();
|
|
53
|
+
};
|
|
54
|
+
abortSignal.addEventListener("abort", listener);
|
|
55
|
+
xhr.addEventListener("readystatechange", () => {
|
|
56
|
+
if (xhr.readyState === XMLHttpRequest.DONE) {
|
|
57
|
+
abortSignal.removeEventListener("abort", listener);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
addProgressListener(xhr.upload, request.onUploadProgress);
|
|
62
|
+
addProgressListener(xhr, request.onDownloadProgress);
|
|
63
|
+
xhr.open(request.method, request.url);
|
|
64
|
+
xhr.timeout = request.timeout;
|
|
65
|
+
xhr.withCredentials = request.withCredentials;
|
|
66
|
+
for (const [name, value] of request.headers) {
|
|
67
|
+
xhr.setRequestHeader(name, value);
|
|
68
|
+
}
|
|
69
|
+
xhr.responseType = ((_a = request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.size) ? "blob" : "text";
|
|
70
|
+
const body = typeof request.body === "function" ? request.body() : request.body;
|
|
71
|
+
if (isNodeReadableStream(body) || isReadableStream(body)) {
|
|
72
|
+
throw new Error("Streams are not supported by xhrHttpClient.");
|
|
73
|
+
}
|
|
74
|
+
xhr.send(body === undefined ? null : body);
|
|
75
|
+
if (xhr.responseType === "blob") {
|
|
76
|
+
return new Promise((resolve, reject) => {
|
|
77
|
+
handleBlobResponse(xhr, request, resolve, reject);
|
|
78
|
+
rejectOnTerminalEvent(request, xhr, reject);
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
return new Promise(function (resolve, reject) {
|
|
83
|
+
xhr.addEventListener("load", () => resolve({
|
|
84
|
+
request,
|
|
85
|
+
status: xhr.status,
|
|
86
|
+
headers: parseHeaders(xhr),
|
|
87
|
+
bodyAsText: xhr.responseText,
|
|
88
|
+
}));
|
|
89
|
+
rejectOnTerminalEvent(request, xhr, reject);
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function handleBlobResponse(xhr, request, res, rej) {
|
|
95
|
+
xhr.addEventListener("readystatechange", () => {
|
|
96
|
+
var _a, _b;
|
|
97
|
+
// Resolve as soon as headers are loaded
|
|
98
|
+
if (xhr.readyState === XMLHttpRequest.HEADERS_RECEIVED) {
|
|
99
|
+
if (
|
|
100
|
+
// Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code
|
|
101
|
+
((_a = request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(Number.POSITIVE_INFINITY)) ||
|
|
102
|
+
((_b = request.streamResponseStatusCodes) === null || _b === void 0 ? void 0 : _b.has(xhr.status))) {
|
|
103
|
+
const blobBody = new Promise((resolve, reject) => {
|
|
104
|
+
xhr.addEventListener("load", () => {
|
|
105
|
+
resolve(xhr.response);
|
|
106
|
+
});
|
|
107
|
+
rejectOnTerminalEvent(request, xhr, reject);
|
|
108
|
+
});
|
|
109
|
+
res({
|
|
110
|
+
request,
|
|
111
|
+
status: xhr.status,
|
|
112
|
+
headers: parseHeaders(xhr),
|
|
113
|
+
blobBody,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
xhr.addEventListener("load", () => {
|
|
118
|
+
// xhr.response is of Blob type if the request is sent with xhr.responseType === "blob"
|
|
119
|
+
// but the status code is not one of the stream response status codes,
|
|
120
|
+
// so treat it as text and convert from Blob to text
|
|
121
|
+
if (xhr.response) {
|
|
122
|
+
xhr.response
|
|
123
|
+
.text()
|
|
124
|
+
.then((text) => {
|
|
125
|
+
res({
|
|
126
|
+
request: request,
|
|
127
|
+
status: xhr.status,
|
|
128
|
+
headers: parseHeaders(xhr),
|
|
129
|
+
bodyAsText: text,
|
|
130
|
+
});
|
|
131
|
+
return;
|
|
132
|
+
})
|
|
133
|
+
.catch((e) => {
|
|
134
|
+
rej(e);
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
res({
|
|
139
|
+
request,
|
|
140
|
+
status: xhr.status,
|
|
141
|
+
headers: parseHeaders(xhr),
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
function addProgressListener(xhr, listener) {
|
|
150
|
+
if (listener) {
|
|
151
|
+
xhr.addEventListener("progress", (rawEvent) => listener({
|
|
152
|
+
loadedBytes: rawEvent.loaded,
|
|
153
|
+
}));
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
function parseHeaders(xhr) {
|
|
157
|
+
const responseHeaders = createHttpHeaders();
|
|
158
|
+
const headerLines = xhr
|
|
159
|
+
.getAllResponseHeaders()
|
|
160
|
+
.trim()
|
|
161
|
+
.split(/[\r\n]+/);
|
|
162
|
+
for (const line of headerLines) {
|
|
163
|
+
const index = line.indexOf(":");
|
|
164
|
+
const headerName = line.slice(0, index);
|
|
165
|
+
const headerValue = line.slice(index + 2);
|
|
166
|
+
responseHeaders.set(headerName, headerValue);
|
|
167
|
+
}
|
|
168
|
+
return responseHeaders;
|
|
169
|
+
}
|
|
170
|
+
function rejectOnTerminalEvent(request, xhr, reject) {
|
|
171
|
+
xhr.addEventListener("error", () => reject(new RestError(`Failed to send request to ${request.url}`, {
|
|
172
|
+
code: RestError.REQUEST_SEND_ERROR,
|
|
173
|
+
request,
|
|
174
|
+
})));
|
|
175
|
+
const abortError = new AbortError("The operation was aborted.");
|
|
176
|
+
xhr.addEventListener("abort", () => reject(abortError));
|
|
177
|
+
xhr.addEventListener("timeout", () => reject(abortError));
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Create a new HttpClient instance for the browser environment.
|
|
181
|
+
* @internal
|
|
182
|
+
*/
|
|
183
|
+
export function createXhrHttpClient() {
|
|
184
|
+
return new XhrHttpClient();
|
|
185
|
+
}
|
|
186
|
+
//# sourceMappingURL=xhrHttpClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xhrHttpClient.js","sourceRoot":"","sources":["../../src/xhrHttpClient.ts"],"names":[],"mappings":"AAA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D,IAAI,EAAE,SAAS,CAAC,kBAAkB;QAClC,OAAO;KACR,CAAC,CACH,CACF,CAAC;IACF,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,4BAA4B,CAAC,CAAC;IAChE,GAAG,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;IACxD,GAAG,CAAC,gBAAgB,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;AAC5D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO,IAAI,aAAa,EAAE,CAAC;AAC7B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortError } from \"@azure/abort-controller\";\nimport {\n HttpClient,\n PipelineRequest,\n PipelineResponse,\n TransferProgressEvent,\n HttpHeaders,\n RestError,\n createHttpHeaders,\n} from \"@azure/core-rest-pipeline\";\n\n// Temporary workaround with local copy of XhrHttpClient\nfunction isNodeReadableStream(body: any): body is NodeJS.ReadableStream {\n return body && typeof body.pipe === \"function\";\n}\n\n/**\n * Checks if the body is a Blob or Blob-like\n * @internal\n */\nexport function isBlob(body: unknown): body is Blob {\n // File objects count as a type of Blob, so we want to use instanceof explicitly\n return (typeof Blob === \"function\" || typeof Blob === \"object\") && body instanceof Blob;\n}\n\n/**\n * Checks if the body is a ReadableStream supported by browsers\n * @internal\n */\nexport function isReadableStream(body: unknown): body is ReadableStream {\n return Boolean(\n body &&\n typeof (body as ReadableStream).getReader === \"function\" &&\n typeof (body as ReadableStream).tee === \"function\",\n );\n}\n\n/**\n * A HttpClient implementation that uses XMLHttpRequest to send HTTP requests.\n * @internal\n */\nclass XhrHttpClient implements HttpClient {\n /**\n * Makes a request over an underlying transport layer and returns the response.\n * @param request - The request to be made.\n */\n public async sendRequest(request: PipelineRequest): Promise<PipelineResponse> {\n const url = new URL(request.url);\n const isInsecure = url.protocol !== \"https:\";\n\n if (isInsecure && !request.allowInsecureConnection) {\n throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`);\n }\n\n const xhr = new XMLHttpRequest();\n\n if (request.proxySettings) {\n throw new Error(\"HTTP proxy is not supported in browser environment\");\n }\n\n const abortSignal = request.abortSignal;\n if (abortSignal) {\n if (abortSignal.aborted) {\n throw new AbortError(\"The operation was aborted.\");\n }\n\n const listener = (): void => {\n xhr.abort();\n };\n abortSignal.addEventListener(\"abort\", listener);\n xhr.addEventListener(\"readystatechange\", () => {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n abortSignal.removeEventListener(\"abort\", listener);\n }\n });\n }\n\n addProgressListener(xhr.upload, request.onUploadProgress);\n addProgressListener(xhr, request.onDownloadProgress);\n\n xhr.open(request.method, request.url);\n xhr.timeout = request.timeout;\n xhr.withCredentials = request.withCredentials;\n for (const [name, value] of request.headers) {\n xhr.setRequestHeader(name, value);\n }\n\n xhr.responseType = request.streamResponseStatusCodes?.size ? \"blob\" : \"text\";\n\n const body = typeof request.body === \"function\" ? request.body() : request.body;\n if (isNodeReadableStream(body) || isReadableStream(body)) {\n throw new Error(\"Streams are not supported by xhrHttpClient.\");\n }\n\n xhr.send(body === undefined ? null : body);\n\n if (xhr.responseType === \"blob\") {\n return new Promise((resolve, reject) => {\n handleBlobResponse(xhr, request, resolve, reject);\n rejectOnTerminalEvent(request, xhr, reject);\n });\n } else {\n return new Promise(function (resolve, reject) {\n xhr.addEventListener(\"load\", () =>\n resolve({\n request,\n status: xhr.status,\n headers: parseHeaders(xhr),\n bodyAsText: xhr.responseText,\n }),\n );\n rejectOnTerminalEvent(request, xhr, reject);\n });\n }\n }\n}\n\nfunction handleBlobResponse(\n xhr: XMLHttpRequest,\n request: PipelineRequest,\n res: (value: PipelineResponse | PromiseLike<PipelineResponse>) => void,\n rej: (reason?: any) => void,\n): void {\n xhr.addEventListener(\"readystatechange\", () => {\n // Resolve as soon as headers are loaded\n if (xhr.readyState === XMLHttpRequest.HEADERS_RECEIVED) {\n if (\n // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code\n request.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY) ||\n request.streamResponseStatusCodes?.has(xhr.status)\n ) {\n const blobBody = new Promise<Blob>((resolve, reject) => {\n xhr.addEventListener(\"load\", () => {\n resolve(xhr.response);\n });\n rejectOnTerminalEvent(request, xhr, reject);\n });\n res({\n request,\n status: xhr.status,\n headers: parseHeaders(xhr),\n blobBody,\n });\n } else {\n xhr.addEventListener(\"load\", () => {\n // xhr.response is of Blob type if the request is sent with xhr.responseType === \"blob\"\n // but the status code is not one of the stream response status codes,\n // so treat it as text and convert from Blob to text\n if (xhr.response) {\n xhr.response\n .text()\n .then((text: string) => {\n res({\n request: request,\n status: xhr.status,\n headers: parseHeaders(xhr),\n bodyAsText: text,\n });\n return;\n })\n .catch((e: any) => {\n rej(e);\n });\n } else {\n res({\n request,\n status: xhr.status,\n headers: parseHeaders(xhr),\n });\n }\n });\n }\n }\n });\n}\n\nfunction addProgressListener(\n xhr: XMLHttpRequestEventTarget,\n listener?: (progress: TransferProgressEvent) => void,\n): void {\n if (listener) {\n xhr.addEventListener(\"progress\", (rawEvent) =>\n listener({\n loadedBytes: rawEvent.loaded,\n }),\n );\n }\n}\n\nfunction parseHeaders(xhr: XMLHttpRequest): HttpHeaders {\n const responseHeaders = createHttpHeaders();\n const headerLines = xhr\n .getAllResponseHeaders()\n .trim()\n .split(/[\\r\\n]+/);\n for (const line of headerLines) {\n const index = line.indexOf(\":\");\n const headerName = line.slice(0, index);\n const headerValue = line.slice(index + 2);\n responseHeaders.set(headerName, headerValue);\n }\n return responseHeaders;\n}\n\nfunction rejectOnTerminalEvent(\n request: PipelineRequest,\n xhr: XMLHttpRequest,\n reject: (err: any) => void,\n): void {\n xhr.addEventListener(\"error\", () =>\n reject(\n new RestError(`Failed to send request to ${request.url}`, {\n code: RestError.REQUEST_SEND_ERROR,\n request,\n }),\n ),\n );\n const abortError = new AbortError(\"The operation was aborted.\");\n xhr.addEventListener(\"abort\", () => reject(abortError));\n xhr.addEventListener(\"timeout\", () => reject(abortError));\n}\n\n/**\n * Create a new HttpClient instance for the browser environment.\n * @internal\n */\nexport function createXhrHttpClient(): HttpClient {\n return new XhrHttpClient();\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure/communication-chat",
|
|
3
|
-
"version": "1.6.0-
|
|
3
|
+
"version": "1.6.0-beta.2",
|
|
4
4
|
"description": "Azure client library for Azure Communication Chat services",
|
|
5
5
|
"sdk-type": "client",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@azure/abort-controller": "^1.0.0",
|
|
66
66
|
"@azure/communication-common": "^2.3.1",
|
|
67
|
-
"@azure/communication-signaling": "1.0.0-beta.
|
|
67
|
+
"@azure/communication-signaling": "1.0.0-beta.27",
|
|
68
68
|
"@azure/core-auth": "^1.3.0",
|
|
69
69
|
"@azure/core-client": "^1.3.0",
|
|
70
70
|
"@azure/core-paging": "^1.1.1",
|
|
@@ -77,10 +77,10 @@
|
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@azure-tools/test-credential": "^1.0.0",
|
|
80
|
-
"@azure-tools/test-recorder": "^3.
|
|
80
|
+
"@azure-tools/test-recorder": "^3.5.1",
|
|
81
81
|
"@azure/communication-identity": "^1.1.0-beta.2",
|
|
82
82
|
"@azure/core-util": "^1.0.0",
|
|
83
|
-
"@azure/dev-tool": "
|
|
83
|
+
"@azure/dev-tool": "^1.0.0",
|
|
84
84
|
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
|
|
85
85
|
"@microsoft/api-extractor": "^7.31.1",
|
|
86
86
|
"@types/chai": "^4.1.6",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
/// <reference lib="esnext.asynciterable" />
|
|
2
3
|
|
|
3
4
|
import { ChatMessageDeletedEvent } from '@azure/communication-signaling';
|
|
@@ -52,7 +53,7 @@ export declare interface ChatAttachment {
|
|
|
52
53
|
previewUrl?: string;
|
|
53
54
|
}
|
|
54
55
|
|
|
55
|
-
/**
|
|
56
|
+
/** Type of Supported Attachments. */
|
|
56
57
|
export declare type ChatAttachmentType = "image" | "file" | "unknown";
|
|
57
58
|
|
|
58
59
|
/**
|
|
@@ -304,6 +305,8 @@ export declare interface ChatMessage {
|
|
|
304
305
|
editedOn?: Date;
|
|
305
306
|
/** metadata */
|
|
306
307
|
metadata?: Record<string, string>;
|
|
308
|
+
/** Policy Violation of a chat message. */
|
|
309
|
+
policyViolation?: PolicyViolation;
|
|
307
310
|
}
|
|
308
311
|
|
|
309
312
|
/** Content of a chat message. */
|
|
@@ -314,10 +317,10 @@ export declare interface ChatMessageContent {
|
|
|
314
317
|
topic?: string;
|
|
315
318
|
/** Chat message content for messages of types participantAdded or participantRemoved. */
|
|
316
319
|
participants?: ChatParticipant[];
|
|
317
|
-
/** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model must be interpreted as a union: Apart from rawId, at most one further property may be set. */
|
|
318
|
-
initiator?: CommunicationIdentifierKind;
|
|
319
320
|
/** List of attachments for this message */
|
|
320
321
|
attachments?: ChatAttachment[];
|
|
322
|
+
/** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model must be interpreted as a union: Apart from rawId, at most one further property may be set. */
|
|
323
|
+
initiator?: CommunicationIdentifierKind;
|
|
321
324
|
}
|
|
322
325
|
|
|
323
326
|
export { ChatMessageDeletedEvent }
|
|
@@ -347,8 +350,13 @@ export declare interface ChatParticipant {
|
|
|
347
350
|
displayName?: string;
|
|
348
351
|
/** Time from which the chat history is shared with the participant. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. */
|
|
349
352
|
shareHistoryTime?: Date;
|
|
353
|
+
/** metadata */
|
|
354
|
+
metadata?: Record<string, string>;
|
|
350
355
|
}
|
|
351
356
|
|
|
357
|
+
/** Data retention policy for auto deletion. */
|
|
358
|
+
export declare type ChatRetentionPolicy = ThreadCreationDateRetentionPolicy | NoneRetentionPolicy;
|
|
359
|
+
|
|
352
360
|
/**
|
|
353
361
|
* The client to do chat operations
|
|
354
362
|
*/
|
|
@@ -360,6 +368,7 @@ export declare class ChatThreadClient {
|
|
|
360
368
|
readonly threadId: string;
|
|
361
369
|
private readonly tokenCredential;
|
|
362
370
|
private readonly client;
|
|
371
|
+
private readonly xhrClient?;
|
|
363
372
|
private timeOfLastTypingRequest;
|
|
364
373
|
constructor(endpoint: string, threadId: string, credential: CommunicationTokenCredential, options?: ChatThreadClientOptions);
|
|
365
374
|
/**
|
|
@@ -374,6 +383,11 @@ export declare class ChatThreadClient {
|
|
|
374
383
|
* @param options - Operation options.
|
|
375
384
|
*/
|
|
376
385
|
updateTopic(topic: string, options?: UpdateTopicOptions): Promise<void>;
|
|
386
|
+
/**
|
|
387
|
+
* Updates a thread's properties.
|
|
388
|
+
* @param options - Operation options.
|
|
389
|
+
*/
|
|
390
|
+
updateProperties(options?: UpdateChatThreadPropertiesOptions): Promise<void>;
|
|
377
391
|
/**
|
|
378
392
|
* Sends a chat message to a thread identified by threadId.
|
|
379
393
|
* Returns the id of the created message.
|
|
@@ -450,6 +464,34 @@ export declare class ChatThreadClient {
|
|
|
450
464
|
*/
|
|
451
465
|
listReadReceipts(options?: ListReadReceiptsOptions): PagedAsyncIterableIterator<ChatMessageReadReceipt>;
|
|
452
466
|
private canPostTypingNotification;
|
|
467
|
+
/**
|
|
468
|
+
* Uploads an chat image to a thread identified by threadId.
|
|
469
|
+
* Allowed image types "jpg", "png", "gif", "heic", "webp".
|
|
470
|
+
* Returns the id of the uploaded image.
|
|
471
|
+
* @param image - Request for uploading an image.
|
|
472
|
+
* @param imageFilename - The image's file name with file extension.
|
|
473
|
+
* @param options - Operation options.
|
|
474
|
+
*/
|
|
475
|
+
uploadImage(image: ArrayBuffer | Blob, imageFilename: string, options?: UploadImageOptions): Promise<UploadChatImageResult>;
|
|
476
|
+
/**
|
|
477
|
+
* Uploads an chat image stream to a thread identified by threadId.
|
|
478
|
+
* Allowed image types "jpg", "png", "gif", "heic", "webp".
|
|
479
|
+
* Returns the id of the uploaded image.
|
|
480
|
+
* @param image - Request for uploading an image.
|
|
481
|
+
* @param imageFileName - The image's file name with file extension.
|
|
482
|
+
* @param imageBytesLength - The image's file length in bytes.
|
|
483
|
+
* @param options - Operation options.
|
|
484
|
+
*/
|
|
485
|
+
uploadImage(image: ReadableStream<Uint8Array> | NodeJS.ReadableStream, imageFileName: string, imageBytesLength: number, options?: UploadImageStreamOptions): Promise<UploadChatImageResult>;
|
|
486
|
+
/**
|
|
487
|
+
* Deletes an image identified by threadId and imageId
|
|
488
|
+
* @param imageId - The image id of the image.
|
|
489
|
+
* @param options - Operation options.
|
|
490
|
+
*/
|
|
491
|
+
deleteImage(imageId: string, options?: DeleteImageOptions): Promise<void>;
|
|
492
|
+
private supportsReadableStream;
|
|
493
|
+
private getArrayBufferFromReadableStream;
|
|
494
|
+
private getArrayBufferFromBlob;
|
|
453
495
|
}
|
|
454
496
|
|
|
455
497
|
/**
|
|
@@ -489,6 +531,12 @@ export declare interface ChatThreadProperties {
|
|
|
489
531
|
readonly createdBy?: CommunicationIdentifierKind;
|
|
490
532
|
/** The timestamp when the chat thread was deleted. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. */
|
|
491
533
|
deletedOn?: Date;
|
|
534
|
+
/** metadata */
|
|
535
|
+
metadata?: Record<string, string>;
|
|
536
|
+
/** Data retention policy for auto deletion. */
|
|
537
|
+
retentionPolicy?: ChatRetentionPolicy;
|
|
538
|
+
/** Messaging policy for a chat thread. */
|
|
539
|
+
messagingPolicy?: MessagingPolicy;
|
|
492
540
|
}
|
|
493
541
|
|
|
494
542
|
export { ChatThreadPropertiesUpdatedEvent }
|
|
@@ -501,6 +549,10 @@ export declare interface CreateChatThreadOptions extends OperationOptions {
|
|
|
501
549
|
participants?: ChatParticipant[];
|
|
502
550
|
/** If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Idempotency-Token and get back an appropriate response without the server executing the request multiple times. The value of the Idempotency-Token is an opaque string representing a client-generated, globally unique for all time, identifier for the request. It is recommended to use version 4 (random) UUIDs. */
|
|
503
551
|
idempotencyToken?: string;
|
|
552
|
+
/** metadata */
|
|
553
|
+
metadata?: Record<string, string>;
|
|
554
|
+
/** Data retention policy for auto deletion. */
|
|
555
|
+
retentionPolicy?: ChatRetentionPolicy;
|
|
504
556
|
}
|
|
505
557
|
|
|
506
558
|
/** Request payload for creating a chat thread. */
|
|
@@ -525,6 +577,11 @@ export declare interface CreateChatThreadResult {
|
|
|
525
577
|
*/
|
|
526
578
|
export declare type DeleteChatThreadOptions = OperationOptions;
|
|
527
579
|
|
|
580
|
+
/**
|
|
581
|
+
* Options to delete a chat image.
|
|
582
|
+
*/
|
|
583
|
+
export declare type DeleteImageOptions = OperationOptions;
|
|
584
|
+
|
|
528
585
|
/**
|
|
529
586
|
* Options to delete a chat message.
|
|
530
587
|
*/
|
|
@@ -571,10 +628,31 @@ export declare type ListParticipantsOptions = RestListParticipantsOptions;
|
|
|
571
628
|
*/
|
|
572
629
|
export declare type ListReadReceiptsOptions = RestListReadReceiptsOptions;
|
|
573
630
|
|
|
631
|
+
/** Messaging policy of a chat thread. */
|
|
632
|
+
export declare interface MessagingPolicy {
|
|
633
|
+
/** Boolean to track whether or not messages is restricted to only text. */
|
|
634
|
+
textOnlyChat?: boolean;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
/** No thread retention policy. */
|
|
638
|
+
export declare interface NoneRetentionPolicy {
|
|
639
|
+
/** Polymorphic discriminator, which specifies the different types this object can be */
|
|
640
|
+
kind: "none";
|
|
641
|
+
}
|
|
642
|
+
|
|
574
643
|
export { ParticipantsAddedEvent }
|
|
575
644
|
|
|
576
645
|
export { ParticipantsRemovedEvent }
|
|
577
646
|
|
|
647
|
+
/** Policy violation of a message (if applicable). */
|
|
648
|
+
export declare interface PolicyViolation {
|
|
649
|
+
/** Result of Policy Violation message. */
|
|
650
|
+
result: PolicyViolationMessageResult;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
/** Result of Policy Violation message. */
|
|
654
|
+
export declare type PolicyViolationMessageResult = "contentBlocked" | "warning";
|
|
655
|
+
|
|
578
656
|
export { ReadReceiptReceivedEvent }
|
|
579
657
|
|
|
580
658
|
/**
|
|
@@ -594,7 +672,7 @@ export declare interface RestListChatThreadsOptions extends coreClient.Operation
|
|
|
594
672
|
export declare interface RestListMessagesOptions extends coreClient.OperationOptions {
|
|
595
673
|
/** The maximum number of messages to be returned per page. */
|
|
596
674
|
maxPageSize?: number;
|
|
597
|
-
/** The earliest point in time to get messages
|
|
675
|
+
/** The earliest point in time to get messages after. The timestamp should be in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. */
|
|
598
676
|
startTime?: Date;
|
|
599
677
|
}
|
|
600
678
|
|
|
@@ -630,6 +708,8 @@ export declare interface SendMessageOptions extends OperationOptions {
|
|
|
630
708
|
type?: ChatMessageType;
|
|
631
709
|
/** Message metadata. */
|
|
632
710
|
metadata?: Record<string, string>;
|
|
711
|
+
/** Message attachments. */
|
|
712
|
+
attachments?: ChatAttachment[];
|
|
633
713
|
}
|
|
634
714
|
|
|
635
715
|
/** Details of the message to send. */
|
|
@@ -657,8 +737,28 @@ export declare interface SendTypingNotificationOptions extends OperationOptions
|
|
|
657
737
|
senderDisplayName?: string;
|
|
658
738
|
}
|
|
659
739
|
|
|
740
|
+
/** Thread retention policy based on thread creation date. */
|
|
741
|
+
export declare interface ThreadCreationDateRetentionPolicy {
|
|
742
|
+
/** Polymorphic discriminator, which specifies the different types this object can be */
|
|
743
|
+
kind: "threadCreationDate";
|
|
744
|
+
/** Indicates how many days after the thread creation the thread will be deleted. */
|
|
745
|
+
deleteThreadAfterDays: number;
|
|
746
|
+
}
|
|
747
|
+
|
|
660
748
|
export { TypingIndicatorReceivedEvent }
|
|
661
749
|
|
|
750
|
+
/**
|
|
751
|
+
* Options to update a chat thread.
|
|
752
|
+
*/
|
|
753
|
+
export declare interface UpdateChatThreadPropertiesOptions extends OperationOptions {
|
|
754
|
+
/** Thread topic. */
|
|
755
|
+
topic?: string;
|
|
756
|
+
/** Thread metadata. */
|
|
757
|
+
metadata?: Record<string, string>;
|
|
758
|
+
/** Data retention policy for auto deletion. */
|
|
759
|
+
retentionPolicy?: ChatRetentionPolicy;
|
|
760
|
+
}
|
|
761
|
+
|
|
662
762
|
/**
|
|
663
763
|
* Options to update a chat message.
|
|
664
764
|
*/
|
|
@@ -667,6 +767,8 @@ export declare interface UpdateMessageOptions extends OperationOptions {
|
|
|
667
767
|
content?: string;
|
|
668
768
|
/** Message metadata. */
|
|
669
769
|
metadata?: Record<string, string>;
|
|
770
|
+
/** Message attachments. */
|
|
771
|
+
attachments?: ChatAttachment[];
|
|
670
772
|
}
|
|
671
773
|
|
|
672
774
|
/**
|
|
@@ -675,4 +777,27 @@ export declare interface UpdateMessageOptions extends OperationOptions {
|
|
|
675
777
|
export declare interface UpdateTopicOptions extends OperationOptions {
|
|
676
778
|
}
|
|
677
779
|
|
|
780
|
+
/** Result payload for uploading an image. */
|
|
781
|
+
export declare interface UploadChatImageResult {
|
|
782
|
+
/** Id of the image. */
|
|
783
|
+
id: string;
|
|
784
|
+
/** The type of attachment. */
|
|
785
|
+
attachmentType?: ChatAttachmentType;
|
|
786
|
+
/** The name including file extension type of the attachment. */
|
|
787
|
+
name?: string;
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
/**
|
|
791
|
+
* Options to upload a chat image.
|
|
792
|
+
*/
|
|
793
|
+
export declare interface UploadImageOptions extends OperationOptions {
|
|
794
|
+
/** Image blob size in bytes. */
|
|
795
|
+
imageBytesLength?: number;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* Options to upload a chat image stream.
|
|
800
|
+
*/
|
|
801
|
+
export declare type UploadImageStreamOptions = OperationOptions;
|
|
802
|
+
|
|
678
803
|
export { }
|