Socket
Socket
Sign inDemoInstall

@azure/communication-chat

Package Overview
Dependencies
Maintainers
2
Versions
260
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.6.0-beta.1 to 1.6.0-beta.2

4

dist-esm/src/generated/src/chatApiClient.js

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

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

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

// Assigning values to Constant parameters
this.apiVersion = options.apiVersion || "2024-03-15-preview";
this.apiVersion = options.apiVersion || "2024-06-05-preview";
this.chatThread = new ChatThreadImpl(this);

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

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

},
policyViolation: {
serializedName: "policyViolation",
type: {
name: "Composite",
className: "PolicyViolation",
},
},
},

@@ -582,2 +589,18 @@ },

};
export const PolicyViolation = {
type: {
name: "Composite",
className: "PolicyViolation",
modelProperties: {
state: {
serializedName: "state",
required: true,
type: {
name: "Enum",
allowedValues: ["contentBlocked", "warning"],
},
},
},
},
};
export const UpdateChatMessageRequest = {

@@ -829,5 +852,26 @@ type: {

},
messagingPolicy: {
serializedName: "messagingPolicy",
type: {
name: "Composite",
className: "MessagingPolicy",
},
},
},
},
};
export const MessagingPolicy = {
type: {
name: "Composite",
className: "MessagingPolicy",
modelProperties: {
textOnlyChat: {
serializedName: "textOnlyChat",
type: {
name: "Boolean",
},
},
},
},
};
export const ChatThreadsItemCollection = {

@@ -834,0 +878,0 @@ type: {

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

mapper: {
defaultValue: "2024-03-15-preview",
defaultValue: "2024-06-05-preview",
isConstant: true,

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

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

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

@@ -98,6 +98,16 @@ // Copyright (c) Microsoft Corporation.

* @internal
*/
export const mapToChatPolicyViolationSdkModel = (policyVolation) => {
const { state } = policyVolation;
const result = {
result: state,
};
return result;
};
/**
* @internal
* Mapping chat message REST model to chat message SDK model
*/
export const mapToChatMessageSdkModel = (chatMessage) => {
const { content, senderCommunicationIdentifier } = chatMessage, otherChatMessage = __rest(chatMessage, ["content", "senderCommunicationIdentifier"]);
const { content, senderCommunicationIdentifier, policyViolation } = chatMessage, otherChatMessage = __rest(chatMessage, ["content", "senderCommunicationIdentifier", "policyViolation"]);
let result = Object.assign({}, otherChatMessage);

@@ -111,2 +121,5 @@ if (content) {

}
if (policyViolation) {
result = Object.assign(Object.assign({}, result), { policyViolation: mapToChatPolicyViolationSdkModel(policyViolation) });
}
return result;

@@ -113,0 +126,0 @@ };

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

@@ -15,7 +15,7 @@ "sdk-type": "client",

"build:test": "tsc -p . && dev-tool run bundle",
"build": "npm run clean && tsc -p . && dev-tool run bundle && api-extractor run --local",
"build": "npm run clean && tsc -p . && dev-tool run bundle && dev-tool run extract-api",
"check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
"clean": "rimraf --glob dist dist-* temp types *.tgz *.log",
"execute:samples": "dev-tool samples run samples-dev",
"extract-api": "tsc -p . && api-extractor run --local",
"extract-api": "tsc -p . && dev-tool run extract-api",
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",

@@ -68,3 +68,3 @@ "generate:client": "autorest --typescript ./swagger/README.md && rushx format",

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

@@ -82,3 +82,3 @@ "@azure/core-client": "^1.3.0",

"@azure-tools/test-credential": "^1.0.0",
"@azure-tools/test-recorder": "^3.0.0",
"@azure-tools/test-recorder": "^3.5.1",
"@azure/communication-identity": "^1.1.0-beta.2",

@@ -111,3 +111,3 @@ "@azure/core-util": "^1.0.0",

"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"rimraf": "^5.0.5",

@@ -117,4 +117,3 @@ "sinon": "^17.0.0",

"util": "^0.12.1",
"ts-node": "^10.0.0",
"esm": "^3.2.18"
"ts-node": "^10.0.0"
},

@@ -121,0 +120,0 @@ "//metadata": {

@@ -308,2 +308,4 @@ /// <reference types="node" />

metadata?: Record<string, string>;
/** Policy Violation of a chat message. */
policyViolation?: PolicyViolation;
}

@@ -537,2 +539,4 @@

retentionPolicy?: ChatRetentionPolicy;
/** Messaging policy for a chat thread. */
messagingPolicy?: MessagingPolicy;
}

@@ -629,2 +633,8 @@

/** Messaging policy of a chat thread. */
export declare interface MessagingPolicy {
/** Boolean to track whether or not messages is restricted to only text. */
textOnlyChat?: boolean;
}
/** No thread retention policy. */

@@ -640,2 +650,11 @@ export declare interface NoneRetentionPolicy {

/** Policy violation of a message (if applicable). */
export declare interface PolicyViolation {
/** Result of Policy Violation message. */
result: PolicyViolationMessageResult;
}
/** Result of Policy Violation message. */
export declare type PolicyViolationMessageResult = "contentBlocked" | "warning";
export { ReadReceiptReceivedEvent }

@@ -642,0 +661,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 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