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 to 1.5.0-beta.1

3

dist-esm/src/chatClient.js

@@ -32,3 +32,2 @@ // 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), {

@@ -40,2 +39,3 @@ loggingOptions: {

this.client = new ChatApiClient(this.endpoint, Object.assign({ endpoint: this.endpoint }, internalPipelineOptions));
this.clientOptions.signalingClientOptions = Object.assign(Object.assign({}, this.clientOptions.signalingClientOptions), { resourceEndpoint: this.endpoint, gatewayApiVersion: this.client.apiVersion });
const authPolicy = createCommunicationTokenCredentialPolicy(this.tokenCredential);

@@ -67,2 +67,3 @@ this.client.pipeline.addPolicy(authPolicy);

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

@@ -69,0 +70,0 @@ return mapToCreateChatThreadResultSdkModel(result);

@@ -51,2 +51,11 @@ // 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.

@@ -53,0 +62,0 @@ * Returns the id of the created message.

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

};
const packageDetails = `azsdk-js-communication-chat/1.4.0`;
const packageDetails = `azsdk-js-communication-chat/1.5.0-beta.1`;
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-11-07";
this.apiVersion = options.apiVersion || "2023-11-15-preview";
this.chatThread = new ChatThreadImpl(this);

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

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

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

@@ -507,7 +514,7 @@ }

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

@@ -650,2 +657,9 @@ },

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

@@ -721,2 +735,9 @@ }

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

@@ -799,2 +820,9 @@ }

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

@@ -801,0 +829,0 @@ }

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

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

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

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

packageName: "@azure/communication-chat",
packageVersion: "1.4.0"
packageVersion: "1.5.0-beta.1"
});
//# sourceMappingURL=tracing.js.map

@@ -5,8 +5,9 @@ // Copyright (c) Microsoft Corporation.

export const getSignalingClient = (credential, logger, options) => {
var _a, _b;
var _a, _b, _c;
return new CommunicationSignalingClient(credential, logger, {
environment: (_a = options === null || options === void 0 ? void 0 : options.environment) !== null && _a !== void 0 ? _a : undefined,
resourceEndpoint: (_b = options === null || options === void 0 ? void 0 : options.resourceEndpoint) !== null && _b !== void 0 ? _b : undefined,
gatewayApiVersion: (_c = options === null || options === void 0 ? void 0 : options.gatewayApiVersion) !== null && _c !== void 0 ? _c : undefined,
});
};
//# sourceMappingURL=signalingClient.browser.js.map

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

export const getSignalingClient = (credential, logger, options) => {
var _a, _b;
var _a, _b, _c;
if (typeof navigator !== "undefined" && navigator.product === "ReactNative") {

@@ -12,2 +12,3 @@ // In React Native

resourceEndpoint: (_b = options === null || options === void 0 ? void 0 : options.resourceEndpoint) !== null && _b !== void 0 ? _b : undefined,
gatewayApiVersion: (_c = options === null || options === void 0 ? void 0 : options.gatewayApiVersion) !== null && _c !== void 0 ? _c : undefined,
});

@@ -14,0 +15,0 @@ }

{
"name": "@azure/communication-chat",
"version": "1.4.0",
"version": "1.5.0-beta.1",
"description": "Azure client library for Azure Communication Chat services",

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

"@azure/communication-common": "^2.2.0",
"@azure/communication-signaling": "1.0.0-beta.22",
"@azure/communication-signaling": "1.0.0-beta.23",
"@azure/core-auth": "^1.3.0",

@@ -70,0 +70,0 @@ "@azure/core-client": "^1.3.0",

@@ -55,4 +55,4 @@ /// <reference lib="esnext.asynciterable" />

/** Defines values for AttachmentType. */
export declare type ChatAttachmentType = "image" | "unknown";
/** Type of Supported Attachments. */
export declare type ChatAttachmentType = "image" | "file" | "unknown";

@@ -318,6 +318,6 @@ /**

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

@@ -352,2 +352,4 @@

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

@@ -381,2 +383,7 @@

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

@@ -496,2 +503,4 @@ * Returns the id of the created message.

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

@@ -509,2 +518,4 @@

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

@@ -669,2 +680,12 @@

/**
* 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.

@@ -671,0 +692,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 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