@vonage/users
Advanced tools
Comparing version 1.6.1 to 1.7.0
@@ -1,2 +0,18 @@ | ||
export * from './userSort'; | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./userSort"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -0,5 +1,8 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SortOrder = void 0; | ||
/** | ||
* Enum representing the sorting order. | ||
*/ | ||
export var SortOrder; | ||
var SortOrder; | ||
(function (SortOrder) { | ||
@@ -14,3 +17,3 @@ /** | ||
SortOrder["DESC"] = "DESC"; | ||
})(SortOrder || (SortOrder = {})); | ||
})(SortOrder || (exports.SortOrder = SortOrder = {})); | ||
//# sourceMappingURL=userSort.js.map |
@@ -1,4 +0,20 @@ | ||
export * from './types'; | ||
export * from './enums'; | ||
export * from './user'; | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./types"), exports); | ||
__exportStar(require("./enums"), exports); | ||
__exportStar(require("./user"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -1,14 +0,30 @@ | ||
export * from './messengerChannel'; | ||
export * from './mmsChannel'; | ||
export * from './parameters'; | ||
export * from './pstnChannel'; | ||
export * from './requests'; | ||
export * from './responses'; | ||
export * from './sipChannel'; | ||
export * from './smsChannel'; | ||
export * from './userType'; | ||
export * from './vbcChannel'; | ||
export * from './viberChannel'; | ||
export * from './websocketChannel'; | ||
export * from './whatsappChannel'; | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./messengerChannel"), exports); | ||
__exportStar(require("./mmsChannel"), exports); | ||
__exportStar(require("./parameters"), exports); | ||
__exportStar(require("./pstnChannel"), exports); | ||
__exportStar(require("./requests"), exports); | ||
__exportStar(require("./responses"), exports); | ||
__exportStar(require("./sipChannel"), exports); | ||
__exportStar(require("./smsChannel"), exports); | ||
__exportStar(require("./userType"), exports); | ||
__exportStar(require("./vbcChannel"), exports); | ||
__exportStar(require("./viberChannel"), exports); | ||
__exportStar(require("./websocketChannel"), exports); | ||
__exportStar(require("./whatsappChannel"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,3 @@ | ||
export {}; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=messengerChannel.js.map |
@@ -1,2 +0,3 @@ | ||
export {}; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=mmsChannel.js.map |
@@ -1,2 +0,18 @@ | ||
export * from './userListParameters'; | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./userListParameters"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,3 @@ | ||
export {}; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=userListParameters.js.map |
@@ -1,2 +0,3 @@ | ||
export {}; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=pstnChannel.js.map |
@@ -1,3 +0,19 @@ | ||
export * from './userRequest'; | ||
export * from './websocketChannelRequest'; | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./userRequest"), exports); | ||
__exportStar(require("./websocketChannelRequest"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,3 @@ | ||
export {}; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=userRequest.js.map |
@@ -1,2 +0,3 @@ | ||
export {}; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=websocketChannelRequest.js.map |
@@ -1,4 +0,20 @@ | ||
export * from './userPageResponse'; | ||
export * from './userResponse'; | ||
export * from './websocketChannelResponse'; | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./userPageResponse"), exports); | ||
__exportStar(require("./userResponse"), exports); | ||
__exportStar(require("./websocketChannelResponse"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,3 @@ | ||
export {}; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=userPageResponse.js.map |
@@ -1,2 +0,3 @@ | ||
export {}; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=userResponse.js.map |
@@ -1,2 +0,3 @@ | ||
export {}; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=websocketChannelResponse.js.map |
@@ -1,2 +0,3 @@ | ||
export {}; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=sipChannel.js.map |
@@ -1,2 +0,3 @@ | ||
export {}; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=smsChannel.js.map |
@@ -1,2 +0,3 @@ | ||
export {}; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=userType.js.map |
@@ -1,2 +0,3 @@ | ||
export {}; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=vbcChannel.js.map |
@@ -1,2 +0,3 @@ | ||
export {}; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=viberChannel.js.map |
@@ -1,2 +0,3 @@ | ||
export {}; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=websocketChannel.js.map |
@@ -1,2 +0,3 @@ | ||
export {}; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=whatsappChannel.js.map |
@@ -1,5 +0,8 @@ | ||
import { AuthenticationType, Client } from '@vonage/server-client'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Users = void 0; | ||
const server_client_1 = require("@vonage/server-client"); | ||
const apiUserToUser = (apiUser) => { | ||
delete apiUser._links; | ||
const user = Client.transformers.camelCaseObjectKeys(apiUser, true); | ||
const user = server_client_1.Client.transformers.camelCaseObjectKeys(apiUser, true); | ||
if (user.properties) { | ||
@@ -25,3 +28,3 @@ user.properties.customData = apiUser.properties.custom_data; | ||
const userToAPI = (user) => { | ||
const apiUser = Client.transformers.snakeCaseObjectKeys(user, true); | ||
const apiUser = server_client_1.Client.transformers.snakeCaseObjectKeys(user, true); | ||
// preserve user properties | ||
@@ -58,4 +61,4 @@ if (user.properties?.customData) { | ||
*/ | ||
export class Users extends Client { | ||
authType = AuthenticationType.JWT; | ||
class Users extends server_client_1.Client { | ||
authType = server_client_1.AuthenticationType.JWT; | ||
/** | ||
@@ -95,3 +98,3 @@ * Retrieves a list of users, optionally paginated, based on the provided parameters. | ||
async getUserPage(params = {}) { | ||
const resp = await this.sendGetRequest(`${this.config.apiHost}/v1/users`, Client.transformers.snakeCaseObjectKeys(params, true)); | ||
const resp = await this.sendGetRequest(`${this.config.apiHost}/v1/users`, server_client_1.Client.transformers.snakeCaseObjectKeys(params, true)); | ||
return resp.data; | ||
@@ -143,2 +146,3 @@ } | ||
} | ||
exports.Users = Users; | ||
//# sourceMappingURL=user.js.map |
{ | ||
"$schema": "https://json.schemastore.org/package.json", | ||
"name": "@vonage/users", | ||
"version": "1.6.1", | ||
"version": "1.7.0", | ||
"description": "The concept of a user exists in Vonage APIs, you can associate one with a user in your own application if you choose. A user can have multiple memberships to conversations and can communicate with other users through various different mediums.", | ||
@@ -25,3 +25,2 @@ "homepage": "https://github.com/vonage/vonage-node-sdk/tree/main/packages/user#readme", | ||
], | ||
"type": "module", | ||
"main": "dist/lib/index.js", | ||
@@ -43,4 +42,4 @@ "types": "dist/lib/index.d.ts", | ||
"dependencies": { | ||
"@vonage/server-client": "^1.12.1" | ||
"@vonage/server-client": "^1.13.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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
98625
724
0
No