Socket
Socket
Sign inDemoInstall

@azure/communication-chat

Package Overview
Dependencies
Maintainers
1
Versions
261
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/communication-chat - npm Package Compare versions

Comparing version 1.4.0-beta.2 to 1.4.0

16

dist-esm/src/chatClient.js

@@ -32,2 +32,3 @@ // Copyright (c) Microsoft Corporation.

this.clientOptions = Object.assign({}, options);
this.clientOptions.signalingClientOptions = Object.assign(Object.assign({}, this.clientOptions.signalingClientOptions), { resourceEndpoint: this.endpoint });
const internalPipelineOptions = Object.assign(Object.assign({}, options), {

@@ -41,4 +42,3 @@ loggingOptions: {

this.client.pipeline.addPolicy(authPolicy);
options.signalingClientOptions = Object.assign(Object.assign({}, options.signalingClientOptions), { resourceEndpoint: this.endpoint });
this.signalingClient = getSignalingClient(credential, logger, options.signalingClientOptions);
this.signalingClient = getSignalingClient(credential, logger, this.clientOptions.signalingClientOptions);
}

@@ -67,3 +67,2 @@ /**

participants: (_b = options.participants) === null || _b === void 0 ? void 0 : _b.map((participant) => mapToChatParticipantRestModel(participant)),
metadata: options.metadata,
}, updatedRestModelOptions);

@@ -98,12 +97,7 @@ return mapToCreateChatThreadResultSdkModel(result);

try {
for (var _d = true, _e = __asyncValues(this.listChatThreadsPage({}, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a;) {
for (var _d = true, _e = __asyncValues(this.listChatThreadsPage({}, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
_c = _f.value;
_d = false;
try {
const page = _c;
yield __await(yield* __asyncDelegator(__asyncValues(page)));
}
finally {
_d = true;
}
const page = _c;
yield __await(yield* __asyncDelegator(__asyncValues(page)));
}

@@ -110,0 +104,0 @@ }

@@ -51,11 +51,2 @@ // Copyright (c) Microsoft Corporation.

/**
* Updates a thread's properties.
* @param options - Operation options.
*/
updateProperties(options = {}) {
return tracingClient.withSpan("ChatThreadClient-UpdateProperties", options, async (updatedOptions) => {
await this.client.chatThread.updateChatThreadProperties(this.threadId, options, updatedOptions);
});
}
/**
* Sends a chat message to a thread identified by threadId.

@@ -111,12 +102,7 @@ * Returns the id of the created message.

try {
for (var _d = true, _e = __asyncValues(this.listMessagesPage({}, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a;) {
for (var _d = true, _e = __asyncValues(this.listMessagesPage({}, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
_c = _f.value;
_d = false;
try {
const page = _c;
yield __await(yield* __asyncDelegator(__asyncValues(page)));
}
finally {
_d = true;
}
const page = _c;
yield __await(yield* __asyncDelegator(__asyncValues(page)));
}

@@ -221,12 +207,7 @@ }

try {
for (var _d = true, _e = __asyncValues(this.listParticipantsPage({}, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a;) {
for (var _d = true, _e = __asyncValues(this.listParticipantsPage({}, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
_c = _f.value;
_d = false;
try {
const page = _c;
yield __await(yield* __asyncDelegator(__asyncValues(page)));
}
finally {
_d = true;
}
const page = _c;
yield __await(yield* __asyncDelegator(__asyncValues(page)));
}

@@ -339,12 +320,7 @@ }

try {
for (var _d = true, _e = __asyncValues(this.listReadReceiptsPage({}, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a;) {
for (var _d = true, _e = __asyncValues(this.listReadReceiptsPage({}, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
_c = _f.value;
_d = false;
try {
const page = _c;
yield __await(yield* __asyncDelegator(__asyncValues(page)));
}
finally {
_d = true;
}
const page = _c;
yield __await(yield* __asyncDelegator(__asyncValues(page)));
}

@@ -351,0 +327,0 @@ }

@@ -28,3 +28,3 @@ /*

};
const packageDetails = `azsdk-js-communication-chat/1.4.0-beta.1`;
const packageDetails = `azsdk-js-communication-chat/1.4.0`;
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix

@@ -40,3 +40,3 @@ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`

// Assigning values to Constant parameters
this.apiVersion = options.apiVersion || "2023-07-01-preview";
this.apiVersion = options.apiVersion || "2023-11-07";
this.chatThread = new ChatThreadImpl(this);

@@ -43,0 +43,0 @@ this.chat = new ChatImpl(this);

@@ -489,9 +489,2 @@ /*

}
},
metadata: {
serializedName: "metadata",
type: {
name: "Dictionary",
value: { type: { name: "String" } }
}
}

@@ -514,12 +507,6 @@ }

attachmentType: {
defaultValue: "image",
isConstant: true,
serializedName: "attachmentType",
required: true,
type: {
name: "Enum",
allowedValues: ["teamsInlineImage", "teamsImage", "file"]
}
},
contentType: {
serializedName: "contentType",
type: {
name: "String"

@@ -536,3 +523,2 @@ }

serializedName: "url",
required: true,
type: {

@@ -665,9 +651,2 @@ name: "String"

}
},
metadata: {
serializedName: "metadata",
type: {
name: "Dictionary",
value: { type: { name: "String" } }
}
}

@@ -743,9 +722,2 @@ }

}
},
metadata: {
serializedName: "metadata",
type: {
name: "Dictionary",
value: { type: { name: "String" } }
}
}

@@ -828,9 +800,2 @@ }

}
},
metadata: {
serializedName: "metadata",
type: {
name: "Dictionary",
value: { type: { name: "String" } }
}
}

@@ -837,0 +802,0 @@ }

@@ -62,3 +62,3 @@ /*

mapper: {
defaultValue: "2023-07-01-preview",
defaultValue: "2023-11-07",
isConstant: true,

@@ -65,0 +65,0 @@ serializedName: "api-version",

@@ -12,4 +12,4 @@ /*

packageName: "@azure/communication-chat",
packageVersion: "1.4.0-beta.1"
packageVersion: "1.4.0"
});
//# sourceMappingURL=tracing.js.map
{
"name": "@azure/communication-chat",
"version": "1.4.0-beta.2",
"version": "1.4.0",
"description": "Azure client library for Azure Communication Chat services",

@@ -59,3 +59,3 @@ "sdk-type": "client",

"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
},

@@ -67,4 +67,4 @@ "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/communication/communication-chat/",

"@azure/abort-controller": "^1.0.0",
"@azure/communication-common": "^2.3.0",
"@azure/communication-signaling": "1.0.0-beta.21",
"@azure/communication-common": "^2.2.0",
"@azure/communication-signaling": "1.0.0-beta.22",
"@azure/core-auth": "^1.3.0",

@@ -90,4 +90,4 @@ "@azure/core-client": "^1.3.0",

"@types/mocha": "^10.0.0",
"@types/node": "^14.0.0",
"@types/sinon": "^10.0.0",
"@types/node": "^18.0.0",
"@types/sinon": "^17.0.0",
"@types/uuid": "^8.0.0",

@@ -112,7 +112,7 @@ "chai": "^4.2.0",

"mocha-junit-reporter": "^2.0.0",
"nyc": "^15.0.0",
"c8": "^8.0.0",
"prettier": "^2.5.1",
"rimraf": "^3.0.0",
"sinon": "^15.0.0",
"typescript": "~5.0.0",
"sinon": "^17.0.0",
"typescript": "~5.2.0",
"util": "^0.12.1",

@@ -119,0 +119,0 @@ "ts-node": "^10.0.0",

@@ -41,5 +41,2 @@ /// <reference lib="esnext.asynciterable" />

/** Type of Supported Attachments. */
export declare type AttachmentType = "teamsInlineImage" | "teamsImage" | "file";
/** An attachment in a chat message. */

@@ -50,9 +47,7 @@ export declare interface ChatAttachment {

/** The type of attachment. */
attachmentType: AttachmentType;
/** The type of content of the attachment, if available */
contentType?: string;
attachmentType: ChatAttachmentType;
/** The name of the attachment content. */
name?: string;
/** The URL where the attachment can be downloaded */
url: string;
url?: string;
/** The URL where the preview of attachment can be downloaded */

@@ -62,2 +57,5 @@ previewUrl?: string;

/** Defines values for AttachmentType. */
export declare type ChatAttachmentType = "image" | "unknown";
/**

@@ -322,6 +320,6 @@ * The client to do chat operations

participants?: ChatParticipant[];
/** 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. */
initiator?: CommunicationIdentifierKind;
/** List of attachments for this message */
attachments?: ChatAttachment[];
/** 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. */
initiator?: CommunicationIdentifierKind;
}

@@ -356,4 +354,2 @@

shareHistoryTime?: Date;
/** metadata */
metadata?: Record<string, string>;
}

@@ -387,7 +383,2 @@

/**
* Updates a thread's properties.
* @param options - Operation options.
*/
updateProperties(options?: UpdateChatThreadPropertiesOptions): Promise<void>;
/**
* Sends a chat message to a thread identified by threadId.

@@ -507,4 +498,2 @@ * Returns the id of the created message.

deletedOn?: Date;
/** metadata */
metadata?: Record<string, string>;
}

@@ -522,4 +511,2 @@

idempotencyToken?: string;
/** metadata */
metadata?: Record<string, string>;
}

@@ -684,12 +671,2 @@

/**
* Options to update a chat thread.
*/
export declare interface UpdateChatThreadPropertiesOptions extends OperationOptions {
/** Thread topic. */
topic?: string;
/** Thread metadata. */
metadata?: Record<string, string>;
}
/**
* Options to update a chat message.

@@ -696,0 +673,0 @@ */

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc