@azure/communication-chat 1.3.2-alpha.20230515.1 → 1.3.2-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.
@@ -1 +1 @@
1
- {"version":3,"file":"signalingClient.browser.js","sourceRoot":"","sources":["../../../src/signaling/signalingClient.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,4BAA4B,EAAmB,MAAM,gCAAgC,CAAC;AAK/F,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,UAAwC,EACxC,MAAmB,EACnB,OAAgC,EACH,EAAE;;IAC/B,OAAO,IAAI,4BAA4B,CAAC,UAAU,EAAE,MAAM,EAAE;QAC1D,WAAW,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,mCAAI,SAAS;KAC/C,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { CommunicationSignalingClient, SignalingClient } from \"@azure/communication-signaling\";\nimport { CommunicationTokenCredential } from \"@azure/communication-common\";\nimport { AzureLogger } from \"@azure/logger\";\nimport { SignalingClientOptions } from \"./signalingClient\";\n\nexport const getSignalingClient = (\n credential: CommunicationTokenCredential,\n logger: AzureLogger,\n options?: SignalingClientOptions\n): SignalingClient | undefined => {\n return new CommunicationSignalingClient(credential, logger, {\n environment: options?.environment ?? undefined,\n });\n};\n"]}
1
+ {"version":3,"file":"signalingClient.browser.js","sourceRoot":"","sources":["../../../src/signaling/signalingClient.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,4BAA4B,EAAmB,MAAM,gCAAgC,CAAC;AAK/F,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,UAAwC,EACxC,MAAmB,EACnB,OAAgC,EACH,EAAE;;IAC/B,OAAO,IAAI,4BAA4B,CAAC,UAAU,EAAE,MAAM,EAAE;QAC1D,WAAW,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,mCAAI,SAAS;QAC9C,gBAAgB,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,mCAAI,SAAS;KACzD,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { CommunicationSignalingClient, SignalingClient } from \"@azure/communication-signaling\";\nimport { CommunicationTokenCredential } from \"@azure/communication-common\";\nimport { AzureLogger } from \"@azure/logger\";\nimport { SignalingClientOptions } from \"./signalingClient\";\n\nexport const getSignalingClient = (\n credential: CommunicationTokenCredential,\n logger: AzureLogger,\n options?: SignalingClientOptions\n): SignalingClient | undefined => {\n return new CommunicationSignalingClient(credential, logger, {\n environment: options?.environment ?? undefined,\n resourceEndpoint: options?.resourceEndpoint ?? undefined,\n });\n};\n"]}
@@ -2,11 +2,12 @@
2
2
  // Licensed under the MIT license.
3
3
  import { CommunicationSignalingClient } from "@azure/communication-signaling";
4
4
  export const getSignalingClient = (credential, logger, options) => {
5
- var _a;
5
+ var _a, _b;
6
6
  if (typeof navigator !== "undefined" && navigator.product === "ReactNative") {
7
7
  // In React Native
8
8
  return new CommunicationSignalingClient(credential, logger, {
9
9
  environment: (_a = options === null || options === void 0 ? void 0 : options.environment) !== null && _a !== void 0 ? _a : undefined,
10
+ resourceEndpoint: (_b = options === null || options === void 0 ? void 0 : options.resourceEndpoint) !== null && _b !== void 0 ? _b : undefined,
10
11
  });
11
12
  }
12
13
  // In node js
@@ -1 +1 @@
1
- {"version":3,"file":"signalingClient.js","sourceRoot":"","sources":["../../../src/signaling/signalingClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,4BAA4B,EAAmB,MAAM,gCAAgC,CAAC;AAQ/F,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,UAAwC,EACxC,MAAmB,EACnB,OAAgC,EACH,EAAE;;IAC/B,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,SAAS,CAAC,OAAO,KAAK,aAAa,EAAE;QAC3E,kBAAkB;QAClB,OAAO,IAAI,4BAA4B,CAAC,UAAU,EAAE,MAAM,EAAE;YAC1D,WAAW,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,mCAAI,SAAS;SAC/C,CAAC,CAAC;KACJ;IAED,aAAa;IACb,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { CommunicationSignalingClient, SignalingClient } from \"@azure/communication-signaling\";\nimport { CommunicationTokenCredential } from \"@azure/communication-common\";\nimport { AzureLogger } from \"@azure/logger\";\n\nexport interface SignalingClientOptions {\n environment?: string;\n}\n\nexport const getSignalingClient = (\n credential: CommunicationTokenCredential,\n logger: AzureLogger,\n options?: SignalingClientOptions\n): SignalingClient | undefined => {\n if (typeof navigator !== \"undefined\" && navigator.product === \"ReactNative\") {\n // In React Native\n return new CommunicationSignalingClient(credential, logger, {\n environment: options?.environment ?? undefined,\n });\n }\n\n // In node js\n return undefined;\n};\n"]}
1
+ {"version":3,"file":"signalingClient.js","sourceRoot":"","sources":["../../../src/signaling/signalingClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,4BAA4B,EAAmB,MAAM,gCAAgC,CAAC;AAS/F,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,UAAwC,EACxC,MAAmB,EACnB,OAAgC,EACH,EAAE;;IAC/B,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,SAAS,CAAC,OAAO,KAAK,aAAa,EAAE;QAC3E,kBAAkB;QAClB,OAAO,IAAI,4BAA4B,CAAC,UAAU,EAAE,MAAM,EAAE;YAC1D,WAAW,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,mCAAI,SAAS;YAC9C,gBAAgB,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,mCAAI,SAAS;SACzD,CAAC,CAAC;KACJ;IAED,aAAa;IACb,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { CommunicationSignalingClient, SignalingClient } from \"@azure/communication-signaling\";\nimport { CommunicationTokenCredential } from \"@azure/communication-common\";\nimport { AzureLogger } from \"@azure/logger\";\n\nexport interface SignalingClientOptions {\n environment?: string;\n resourceEndpoint?: string;\n}\n\nexport const getSignalingClient = (\n credential: CommunicationTokenCredential,\n logger: AzureLogger,\n options?: SignalingClientOptions\n): SignalingClient | undefined => {\n if (typeof navigator !== \"undefined\" && navigator.product === \"ReactNative\") {\n // In React Native\n return new CommunicationSignalingClient(credential, logger, {\n environment: options?.environment ?? undefined,\n resourceEndpoint: options?.resourceEndpoint ?? undefined,\n });\n }\n\n // In node js\n return undefined;\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/communication-chat",
3
- "version": "1.3.2-alpha.20230515.1",
3
+ "version": "1.3.2-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.2.0",
67
- "@azure/communication-signaling": "1.0.0-beta.16",
67
+ "@azure/communication-signaling": "1.0.0-beta.18",
68
68
  "@azure/core-auth": "^1.3.0",
69
69
  "@azure/core-client": "^1.3.0",
70
70
  "@azure/core-paging": "^1.1.1",
@@ -80,8 +80,8 @@
80
80
  "@azure-tools/test-recorder": "^3.0.0",
81
81
  "@azure/communication-identity": "^1.1.0-beta.2",
82
82
  "@azure/core-util": "^1.0.0",
83
- "@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb",
84
- "@azure/eslint-plugin-azure-sdk": ">=3.0.0-alpha <3.0.0-alphb",
83
+ "@azure/dev-tool": "^1.0.0",
84
+ "@azure/eslint-plugin-azure-sdk": "^3.0.0",
85
85
  "@microsoft/api-extractor": "^7.31.1",
86
86
  "@types/chai": "^4.1.6",
87
87
  "@types/mocha": "^7.0.2",
@@ -110,7 +110,7 @@
110
110
  "prettier": "^2.5.1",
111
111
  "rimraf": "^3.0.0",
112
112
  "sinon": "^9.0.2",
113
- "typescript": "~5.0.0",
113
+ "typescript": "~4.8.0",
114
114
  "util": "^0.12.1"
115
115
  },
116
116
  "//metadata": {
@@ -38,6 +38,25 @@ export declare interface AddParticipantsRequest {
38
38
  participants: ChatParticipant[];
39
39
  }
40
40
 
41
+ /** Type of Supported Attachments. */
42
+ export declare type AttachmentType = "teamsInlineImage" | "teamsImage" | "file";
43
+
44
+ /** An attachment in a chat message. */
45
+ export declare interface ChatAttachment {
46
+ /** Id of the attachment */
47
+ id: string;
48
+ /** The type of attachment. */
49
+ attachmentType: AttachmentType;
50
+ /** The type of content of the attachment, if available */
51
+ contentType?: string;
52
+ /** The name of the attachment content. */
53
+ name?: string;
54
+ /** The URL where the attachment can be downloaded */
55
+ url: string;
56
+ /** The URL where the preview of attachment can be downloaded */
57
+ previewUrl?: string;
58
+ }
59
+
41
60
  /**
42
61
  * The client to do chat operations
43
62
  */
@@ -297,6 +316,8 @@ export declare interface ChatMessageContent {
297
316
  topic?: string;
298
317
  /** Chat message content for messages of types participantAdded or participantRemoved. */
299
318
  participants?: ChatParticipant[];
319
+ /** List of attachments for this message */
320
+ attachments?: ChatAttachment[];
300
321
  /** 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. */
301
322
  initiator?: CommunicationIdentifierKind;
302
323
  }