Socket
Socket
Sign inDemoInstall

@azure/communication-common

Package Overview
Dependencies
Maintainers
1
Versions
203
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/communication-common - npm Package Compare versions

Comparing version 2.1.1-alpha.20221020.2 to 2.2.0

20

dist-esm/src/identifierModelSerializer.js

@@ -63,2 +63,14 @@ // Copyright (c) Microsoft Corporation.

};
const getKind = (serializedIdentifier) => {
if (serializedIdentifier.communicationUser) {
return "communicationUser";
}
if (serializedIdentifier.phoneNumber) {
return "phoneNumber";
}
if (serializedIdentifier.microsoftTeamsUser) {
return "microsoftTeamsUser";
}
return "unknown";
};
/**

@@ -70,5 +82,7 @@ * @hidden

export const deserializeCommunicationIdentifier = (serializedIdentifier) => {
var _a;
assertMaximumOneNestedModel(serializedIdentifier);
const { communicationUser, microsoftTeamsUser, phoneNumber } = serializedIdentifier;
if (communicationUser) {
const kind = (_a = serializedIdentifier.kind) !== null && _a !== void 0 ? _a : getKind(serializedIdentifier);
if (kind === "communicationUser" && communicationUser) {
return {

@@ -79,3 +93,3 @@ kind: "communicationUser",

}
if (phoneNumber) {
if (kind === "phoneNumber" && phoneNumber) {
return {

@@ -87,3 +101,3 @@ kind: "phoneNumber",

}
if (microsoftTeamsUser) {
if (kind === "microsoftTeamsUser" && microsoftTeamsUser) {
return {

@@ -90,0 +104,0 @@ kind: "microsoftTeamsUser",

@@ -509,2 +509,14 @@ 'use strict';

};
const getKind = (serializedIdentifier) => {
if (serializedIdentifier.communicationUser) {
return "communicationUser";
}
if (serializedIdentifier.phoneNumber) {
return "phoneNumber";
}
if (serializedIdentifier.microsoftTeamsUser) {
return "microsoftTeamsUser";
}
return "unknown";
};
/**

@@ -516,5 +528,7 @@ * @hidden

const deserializeCommunicationIdentifier = (serializedIdentifier) => {
var _a;
assertMaximumOneNestedModel(serializedIdentifier);
const { communicationUser, microsoftTeamsUser, phoneNumber } = serializedIdentifier;
if (communicationUser) {
const kind = (_a = serializedIdentifier.kind) !== null && _a !== void 0 ? _a : getKind(serializedIdentifier);
if (kind === "communicationUser" && communicationUser) {
return {

@@ -525,3 +539,3 @@ kind: "communicationUser",

}
if (phoneNumber) {
if (kind === "phoneNumber" && phoneNumber) {
return {

@@ -533,3 +547,3 @@ kind: "phoneNumber",

}
if (microsoftTeamsUser) {
if (kind === "microsoftTeamsUser" && microsoftTeamsUser) {
return {

@@ -536,0 +550,0 @@ kind: "microsoftTeamsUser",

6

package.json
{
"name": "@azure/communication-common",
"version": "2.1.1-alpha.20221020.2",
"version": "2.2.0",
"description": "Common package for Azure Communication services.",

@@ -75,4 +75,4 @@ "sdk-type": "client",

"devDependencies": {
"@azure/eslint-plugin-azure-sdk": ">=3.0.0-alpha <3.0.0-alphb",
"@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb",
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
"@azure/dev-tool": "^1.0.0",
"@microsoft/api-extractor": "^7.31.1",

@@ -79,0 +79,0 @@ "@types/chai-as-promised": "^7.1.0",

@@ -297,2 +297,6 @@ import { AbortSignalLike } from '@azure/abort-controller';

/**
* Kind of the identifier, optional.
*/
kind?: string;
/**
* Raw Id of the identifier. Optional in requests, required in responses.

@@ -299,0 +303,0 @@ */

Sorry, the diff of this file is not supported yet

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