[**Documentation**](index.md) *** [Documentation](packages.md) / Vonage Server Client # Vonage Server Client SDK for Node.js ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vonage/vonage-node-sdk/ci.yml?branch=3.x) [![Codecov](https://img.shields.io/codecov/c/github/vonage/vonage-node-sdk?label=Codecov&logo=codecov&style=flat-square)](https://codecov.io/gh/Vonage/vonage-server-sdk) ![Latest Release](https://img.shields.io/npm/v/@vonage/server-client?label=%40vonage%2Fserver-client&style=flat-square) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg?style=flat-square)](../../CODE_OF_CONDUCT.md) [![License](https://img.shields.io/npm/l/@vonage/accounts?label=License&style=flat-square)][license] Vonage This is the Vonage Server Client SDK for Node.js used to wrap the authentication headers/signatures for use with [Vonage APIs](https://www.vonage.com/). To use it you will need a Vonage account. Sign up [for free at vonage.com][signup]. For full API documentation refer to [developer.vonage.com](https://developer.vonage.com/). * [Installation](#installation) * [Usage](#usage) * [Options](#options) * [File Downloads](#file-downloads) * [Testing](#testing) ## Installation ### With NPM ```bash npm install @vonage/server-client ``` ### With Yarn ```bash yarn add @vonage/server-client ``` ## Usage To create a client, you will need to pass in a `@vonage/auth` object. ```js const { Auth } = require('@vonage/auth'); const { Client } = require('@vonage/server-client'); const vonageClient = new Client (new Auth({ apiKey: API_KEY, apiSecret: API_SECRET, applicationId: APP_ID, privateKey: PRIVATE_KEY_PATH, }), options, ); ``` You will now be able to send requests using the client: ```js const response = await vonageClient.sendGetRequest('https://rest.nexmo.com/account/numbers') ``` ### Options The constructor for the client takes in two parameters `credentials` and `options`. `credentials` is either an [`Auth`](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/auth/lib/auth.ts#L13) or an `object` containing the settings from [`AuthInterface`](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/auth/lib/types.ts#L35). `options` allows adjusting api endpoints and the request timeout. * `restHost: string` (optional) - Allows overwriting the default `https://rest.nexmo.com`. * `apiHost: string` (optional) - Allows overwriting the default `https://api.nexmo.com`. * `videoHost: string` (optional) - Allows overwriting the default `https://video.api.vonage.com`. * `timeout: int` (optional) - Set a custom timeout for requests to Vonage in milliseconds. Defaults to the standard for Node http requests, which is 120,000 ms. * `appendUserAgent: string` (optional) - Set a custom string to be added to the `user-agent` header for the request ## File Downloads When downloading files, the request needs to be built with proper security headers set. Inside this package is the `FileClient` which will handle the request. You can download a file using the File Id or the FQURL. ```js const { Auth } = require('@vonage/auth'); const { FileClient } = require('@vonage/server-client'); const fileClient = new FileClient(new Auth({ apiKey: API_KEY, apiSecret: API_SECRET, applicationId: APP_ID, privateKey: PRIVATE_KEY_PATH, }), options, ); await fileClient.downloadFile('the-file-id-or-url', '/paht/to/save'); ``` ## Testing Run: ```bash npm run test ``` [signup]: https://dashboard.nexmo.com/sign-up?utm_source=DEV_REL&utm_medium=github&utm_campaign=node-server-sdk [license]: _media/LICENSE.txt ## Enumerations ### AuthenticationType Defined in: [enums/AuthenticationType.ts:5](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/AuthenticationType.ts#L5) Enum representing the different types of authentication methods supported by the Vonage APIs. #### Enumeration Members | Enumeration Member | Value | Description | Defined in | | ------ | ------ | ------ | ------ | | `BASIC` | `"basic"` | Basic authentication using a base64-encoded string. | [enums/AuthenticationType.ts:9](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/AuthenticationType.ts#L9) | | `CIBA` | `"ciba"` | CIBA authentication | [enums/AuthenticationType.ts:35](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/AuthenticationType.ts#L35) | | `JWT` | `"jwt"` | JSON Web Token (JWT) authentication. | [enums/AuthenticationType.ts:14](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/AuthenticationType.ts#L14) | | `KEY_SECRET` | `"key_secret"` | Authentication using both API key and secret in the request body. **Deprecated** This method is deprecated. | [enums/AuthenticationType.ts:20](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/AuthenticationType.ts#L20) | | `OAUTH2` | `"oauth2"` | OAuth2 authentication. | [enums/AuthenticationType.ts:40](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/AuthenticationType.ts#L40) | | `QUERY_KEY_SECRET` | `"query_key_secret"` | Authentication using API key and secret in the query parameters. | [enums/AuthenticationType.ts:25](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/AuthenticationType.ts#L25) | | `SIGNATURE` | `"signature"` | HMAC signature-based authentication. | [enums/AuthenticationType.ts:30](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/AuthenticationType.ts#L30) | *** ### GenericErrors Defined in: [enums/GenericErrorCodes.ts:5](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/GenericErrorCodes.ts#L5) Enum representing the different types of generic error codes that might be returned by the Vonage APIs. #### Enumeration Members | Enumeration Member | Value | Description | Defined in | | ------ | ------ | ------ | ------ | | `ACCEPT_HEADER` | `"accept-header"` | The provided Accept header in the request is invalid. Invalid Accept header provided. Most Vonage APIs only send back application/json. Check the API documentation for the specific API you're working with for a complete list of supported data types. | [enums/GenericErrorCodes.ts:113](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/GenericErrorCodes.ts#L113) | | `ACCOUNT_SUSPENDED` | `"account-suspended"` | The account has been suspended. This account has been suspended. Contact support@api.vonage.com for more information. | [enums/GenericErrorCodes.ts:45](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/GenericErrorCodes.ts#L45) | | `APPLICATION_SUSPENDED` | `"application-suspended"` | The application associated with the request has been suspended. This application has been suspended. Re-enable the application or create a new application to use. | [enums/GenericErrorCodes.ts:135](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/GenericErrorCodes.ts#L135) | | `CONTENT_TYPE_HEADER` | `"content-type-header"` | The provided Content-Type header in the request is invalid. Invalid Content-Type header provided. Most Vonage APIs only accept application/ json. Check the API documentation for the specific API you're working with for a complete list of supported data types. | [enums/GenericErrorCodes.ts:121](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/GenericErrorCodes.ts#L121) | | `FORBIDDEN` | `"forbidden"` | The authenticated user does not have access to the requested resource. Your account does not have permission to perform this action. Check that you're using the correct credentials and that your account has this feature enabled. | [enums/GenericErrorCodes.ts:25](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/GenericErrorCodes.ts#L25) | | `INVALID_API_KEY` | `"invalid-api-key"` | The provided API key is invalid. The API key provided does not exist in our system, or you do not have access. Modify your request to provide a valid API key. | [enums/GenericErrorCodes.ts:64](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/GenericErrorCodes.ts#L64) | | `INVALID_ID` | `"invalid-id"` | The provided ID in the request is invalid. The ID provided does not exist in our system. Modify your request to provide a valid ID. | [enums/GenericErrorCodes.ts:91](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/GenericErrorCodes.ts#L91) | | `INVALID_IP` | `"invalid-ip"` | The request originates from an unauthorized IP address. The source IP address of the request is not in our allow list. Make a request from an allowed IP address, or add your current IP to the list of authorized addresses. | [enums/GenericErrorCodes.ts:79](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/GenericErrorCodes.ts#L79) | | `INVALID_JSON` | `"invalid-json"` | The provided JSON in the request body is invalid. The request body did not contain valid JSON. Send a JSON request body, including a Content-Type header of application/json. | [enums/GenericErrorCodes.ts:98](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/GenericErrorCodes.ts#L98) | | `INVALID_SIGNATURE` | `"invalid-signature"` | The provided signature is invalid. The signature provided did not validate. Check your signature secret and ensure you're following the correct signing process. | [enums/GenericErrorCodes.ts:71](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/GenericErrorCodes.ts#L71) | | `JWT_EXPIRED` | `"jwt-expired"` | The provided JWT has expired. The JWT provided has expired. Generate a new JWT with an expiration date in the future. | [enums/GenericErrorCodes.ts:51](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/GenericErrorCodes.ts#L51) | | `JWT_REVOKED` | `"jwt-revoked"` | The provided JWT has been revoked. The JWT provided has been revoked. Generate a new JWT using your private key. | [enums/GenericErrorCodes.ts:57](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/GenericErrorCodes.ts#L57) | | `LOW_BALANCE` | `"low-balance"` | The account has insufficient funds. This request could not be performed due to your account balance being low. Top up your account in the Vonage Dashboard. | [enums/GenericErrorCodes.ts:11](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/GenericErrorCodes.ts#L11) | | `MULTIPLE_AUTH_METHODS` | `"multiple-auth-methods"` | Multiple authentication methods were provided in the request. Provide exactly one authentication method. | [enums/GenericErrorCodes.ts:85](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/GenericErrorCodes.ts#L85) | | `NOT_FOUND` | `"not-found"` | The requested resource could not be found. The requested resource does not exist, or you do not have access to it. Check both the URI that you're requesting and your authentication credentials. | [enums/GenericErrorCodes.ts:32](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/GenericErrorCodes.ts#L32) | | `UNAUTHORIZED` | `"unauthorized"` | The provided credentials are incorrect or missing. You did not provide correct credentials. Check your authentication credentials; they can be found in the Vonage Dashboard. | [enums/GenericErrorCodes.ts:18](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/GenericErrorCodes.ts#L18) | | `UNAVAILABLE_LEGAL` | `"unavailable-legal"` | The requested service is unavailable due to legal reasons. Vonage APIs are unavailable in the following areas due to international sanctions: Sudan, Syria, Crimea, North Korea, Iran, and Cuba. | [enums/GenericErrorCodes.ts:128](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/GenericErrorCodes.ts#L128) | | `UNPROVISIONED` | `"unprovisioned"` | The account is not provisioned for the requested service. The credentials provided do not have access to the requested product. Check that your API key is correct and has been whitelisted. | [enums/GenericErrorCodes.ts:39](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/GenericErrorCodes.ts#L39) | | `WRONG_VERB` | `"wrong-verb"` | The HTTP verb used in the request is not allowed. This endpoint does not support the HTTP verb that you requested. Read the API documentation to see which verbs your desired endpoint supports. | [enums/GenericErrorCodes.ts:105](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/enums/GenericErrorCodes.ts#L105) | ## Classes ### Client Defined in: [client.ts:25](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L25) #### Extended by - [`FileClient`](#fileclient) - [`Accounts`](Vonage-Accounts.md#accounts) - [`Secrets`](Vonage-Accounts.md#secrets) - [`Applications`](Vonage-JWT.md#applications) - [`Audit`](Vonage-Audit.md#audit) - [`Conversations`](Vonage-Conversations.md#conversations) - [`Media`](Vonage-Media.md#media) - [`Meetings`](Vonage-Meetings.md#meetings) - [`Messages`](Vonage-Messages.md#messages) - [`NetworkClient`](Vonage-Network-Auth.md#networkclient) - [`NumberInsightV2`](Vonage-Number-Insights-V2.md#numberinsightv2) - [`NumberInsights`](Vonage-JWT-2.md#numberinsights) - [`Numbers`](Vonage-Numbers.md#numbers) - [`Pricing`](Vonage-Pricing.md#pricing) - [`Redact`](Vonage-Redact.md#redact) - [`SMS`](Vonage-SMS.md#sms) - [`SubAccounts`](Vonage-Subaccounts.md#subaccounts) - [`Users`](Vonage-Users.md#users) - [`Verify`](Vonage-Verify.md#verify) - [`Verify2`](Vonage-Verify-v2.md#verify2) - [`Video`](Vonage-Video.md#video) - [`Voice`](Vonage-Voice.md#voice) #### Constructors ##### Constructor ```ts new Client(credentials, options?): Client; ``` Defined in: [client.ts:57](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L57) Creates a new instance of the Client. ###### Parameters ###### credentials The authentication credentials or an authentication instance. [`AuthInterface`](Vonage-Auth.md#authinterface) | [`AuthParams`](Vonage-Auth.md#authparams) ###### options? [`ConfigParams`](#configparams) Optional configuration settings for the client. ###### Returns [`Client`](#client) #### Properties ##### auth ```ts protected auth: AuthInterface; ``` Defined in: [client.ts:44](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L44) The authentication instance responsible for generating authentication headers and query parameters. ##### authType? ```ts protected optional authType: AuthenticationType = AuthenticationType.QUERY_KEY_SECRET; ``` Defined in: [client.ts:39](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L39) The type of authentication used for the client's requests. ##### config ```ts protected config: ConfigParams; ``` Defined in: [client.ts:49](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L49) Configuration settings for the client, including default hosts for various services and other request settings. ##### transformers ```ts static transformers: object; ``` Defined in: [client.ts:29](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L29) Static property containing utility transformers. ###### camelCaseObjectKeys ```ts camelCaseObjectKeys: PartialTransformFunction; ``` ###### kebabCaseObjectKeys ```ts kebabCaseObjectKeys: PartialTransformFunction; ``` ###### omit() ```ts omit: (keys, obj) => TransformedObject; ``` Omit keys from an object. ###### Parameters ###### keys `string`[] The keys to omit. ###### obj [`ObjectToTransform`](#objecttotransform) The object from which to omit keys. ###### Returns [`TransformedObject`](#transformedobject) A new object with omitted keys. ###### snakeCaseObjectKeys ```ts snakeCaseObjectKeys: PartialTransformFunction; ``` #### Methods ##### addAuthenticationToRequest() ```ts addAuthenticationToRequest(request): Promise; ``` Defined in: [client.ts:85](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L85) Adds the appropriate authentication headers or parameters to the request based on the authentication type. ###### Parameters ###### request [`VetchOptions`](Vonage-Vetch.md#vetchoptions) The request options to which authentication needs to be added. ###### Returns `Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\> - The request options with the added authentication. ##### addBasicAuthToRequest() ```ts protected addBasicAuthToRequest(request): Promise; ``` Defined in: [client.ts:185](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L185) Adds basic authentication headers to the request. ###### Parameters ###### request [`VetchOptions`](Vonage-Vetch.md#vetchoptions) The request options to which authentication needs to be added. ###### Returns `Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\> - The request options with the added authentication. ##### addJWTToRequest() ```ts protected addJWTToRequest(request): Promise; ``` Defined in: [client.ts:170](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L170) Adds a JWT to the request. ###### Parameters ###### request [`VetchOptions`](Vonage-Vetch.md#vetchoptions) The request options to which authentication needs to be added. ###### Returns `Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\> - The request options with the added authentication. ##### addQueryKeySecretToRequest() ```ts protected addQueryKeySecretToRequest(request): Promise; ``` Defined in: [client.ts:153](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L153) Adds API key and secret to the request. ###### Parameters ###### request [`VetchOptions`](Vonage-Vetch.md#vetchoptions) The request options to which authentication needs to be added. ###### Returns `Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\> - The request options with the added authentication. ##### addQueryKeySecretToRequestBody() ```ts protected addQueryKeySecretToRequestBody(request): Promise; ``` Defined in: [client.ts:128](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L128) Adds API key and secret to the request body. ###### Parameters ###### request [`VetchOptions`](Vonage-Vetch.md#vetchoptions) The request options to which authentication needs to be added. ###### Returns `Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\> - The request options with the added authentication. ##### getConfig() ```ts getConfig(): ConfigParams; ``` Defined in: [client.ts:75](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L75) ###### Returns [`ConfigParams`](#configparams) ##### parseResponse() ```ts protected parseResponse(request, response): Promise>; ``` Defined in: [client.ts:435](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L435) Parses the response based on its content type. ###### Type Parameters ###### T `T` The expected type of the parsed response data. ###### Parameters ###### request [`VetchOptions`](Vonage-Vetch.md#vetchoptions) The request options. ###### response `Response` The raw response from the request. ###### Returns `Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\> - The parsed response. ##### prepareBody() ```ts protected prepareBody(request): undefined | string; ``` Defined in: [client.ts:405](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L405) Prepares the body for the request based on the content type. ###### Parameters ###### request [`VetchOptions`](Vonage-Vetch.md#vetchoptions) The request options. ###### Returns `undefined` \| `string` - The prepared request body as a string or undefined. ##### prepareRequest() ```ts protected prepareRequest(request): Promise; ``` Defined in: [client.ts:361](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L361) Prepares the request with necessary headers, authentication, and query parameters. ###### Parameters ###### request [`VetchOptions`](Vonage-Vetch.md#vetchoptions) The initial request options. ###### Returns `Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\> - The modified request options. ##### sendDeleteRequest() ```ts sendDeleteRequest(url): Promise>; ``` Defined in: [client.ts:200](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L200) Sends a DELETE request to the specified URL. ###### Type Parameters ###### T `T` ###### Parameters ###### url `string` The URL endpoint for the DELETE request. ###### Returns `Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\> - The response from the DELETE request. ##### sendFormSubmitRequest() ```ts sendFormSubmitRequest(url, payload?): Promise>; ``` Defined in: [client.ts:216](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L216) Sends a POST request with form data to the specified URL. ###### Type Parameters ###### T `T` ###### Parameters ###### url `string` The URL endpoint for the POST request. ###### payload? `Record`\<`string`, `undefined` \| `string`\> Optional payload containing form data to send with the POST request. ###### Returns `Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\> - The response from the POST request. ##### sendGetRequest() ```ts sendGetRequest(url, queryParams?): Promise>; ``` Defined in: [client.ts:238](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L238) Sends a GET request to the specified URL with optional query parameters. ###### Type Parameters ###### T `T` ###### Parameters ###### url `string` The URL endpoint for the GET request. ###### queryParams? Optional query parameters to append to the URL. These should be compatible with Node's URLSearchParams. ###### Returns `Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\> - The response from the GET request. ##### sendPatchRequest() ```ts sendPatchRequest(url, payload?): Promise>; ``` Defined in: [client.ts:258](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L258) Sends a PATCH request to the specified URL with an optional payload. ###### Type Parameters ###### T `T` ###### Parameters ###### url `string` The URL endpoint for the PATCH request. ###### payload? Optional payload to be sent as the body of the PATCH request. ###### Returns `Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\> - The response from the PATCH request. ##### sendPostRequest() ```ts sendPostRequest(url, payload?): Promise>; ``` Defined in: [client.ts:272](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L272) Sends a POST request to the specified URL with an optional payload. ###### Type Parameters ###### T `T` ###### Parameters ###### url `string` The URL endpoint for the POST request. ###### payload? Optional payload to be sent as the body of the POST request. ###### Returns `Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\> - The response from the POST request. ##### sendPutRequest() ```ts sendPutRequest(url, payload?): Promise>; ``` Defined in: [client.ts:286](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L286) Sends a PUT request to the specified URL with an optional payload. ###### Type Parameters ###### T `T` ###### Parameters ###### url `string` The URL endpoint for the PUT request. ###### payload? Optional payload to be sent as the body of the PUT request. ###### Returns `Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\> - The response from the PUT request. ##### sendRequest() ```ts sendRequest(request): Promise>; ``` Defined in: [client.ts:322](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L322) Sends a request adding necessary headers, handling authentication, and parsing the response. ###### Type Parameters ###### T `T` ###### Parameters ###### request [`VetchOptions`](Vonage-Vetch.md#vetchoptions) The options defining the request, including URL, method, headers, and data. ###### Returns `Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\> - The parsed response from the request. ##### sendRequestWithData() ```ts sendRequestWithData( method, url, payload?): Promise>; ``` Defined in: [client.ts:301](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L301) Sends a request with JSON-encoded data to the specified URL using the provided HTTP method. ###### Type Parameters ###### T `T` ###### Parameters ###### method The HTTP method to be used for the request (only POST, PATCH, or PUT are acceptable). [`POST`](Vonage-Vetch.md#httpmethods#post) | [`PUT`](Vonage-Vetch.md#httpmethods#put) | [`PATCH`](Vonage-Vetch.md#httpmethods#patch) ###### url `string` The URL endpoint for the request. ###### payload? Optional payload to be sent as the body of the request, JSON-encoded. ###### Returns `Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\> - The response from the request. *** ### FileClient Defined in: [fileClient.ts:16](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/fileClient.ts#L16) A client for downloading files from Vonage. #### Extends - [`Client`](#client) #### Constructors ##### Constructor ```ts new FileClient(credentials, options?): FileClient; ``` Defined in: [client.ts:57](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L57) Creates a new instance of the Client. ###### Parameters ###### credentials The authentication credentials or an authentication instance. [`AuthInterface`](Vonage-Auth.md#authinterface) | [`AuthParams`](Vonage-Auth.md#authparams) ###### options? [`ConfigParams`](#configparams) Optional configuration settings for the client. ###### Returns [`FileClient`](#fileclient) ###### Inherited from [`Client`](#client).[`constructor`](#constructor) #### Properties ##### auth ```ts protected auth: AuthInterface; ``` Defined in: [client.ts:44](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L44) The authentication instance responsible for generating authentication headers and query parameters. ###### Inherited from [`Client`](#client).[`auth`](#auth) ##### authType ```ts protected authType: AuthenticationType = AuthenticationType.JWT; ``` Defined in: [fileClient.ts:17](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/fileClient.ts#L17) The type of authentication used for the client's requests. ###### Overrides [`Client`](#client).[`authType`](#authtype) ##### config ```ts protected config: ConfigParams; ``` Defined in: [client.ts:49](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L49) Configuration settings for the client, including default hosts for various services and other request settings. ###### Inherited from [`Client`](#client).[`config`](#config) ##### saveFilePath ```ts protected saveFilePath: string = ''; ``` Defined in: [fileClient.ts:19](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/fileClient.ts#L19) ##### transformers ```ts static transformers: object; ``` Defined in: [client.ts:29](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L29) Static property containing utility transformers. ###### camelCaseObjectKeys ```ts camelCaseObjectKeys: PartialTransformFunction; ``` ###### kebabCaseObjectKeys ```ts kebabCaseObjectKeys: PartialTransformFunction; ``` ###### omit() ```ts omit: (keys, obj) => TransformedObject; ``` Omit keys from an object. ###### Parameters ###### keys `string`[] The keys to omit. ###### obj [`ObjectToTransform`](#objecttotransform) The object from which to omit keys. ###### Returns [`TransformedObject`](#transformedobject) A new object with omitted keys. ###### snakeCaseObjectKeys ```ts snakeCaseObjectKeys: PartialTransformFunction; ``` ###### Inherited from [`Client`](#client).[`transformers`](#transformers) #### Methods ##### addAuthenticationToRequest() ```ts addAuthenticationToRequest(request): Promise; ``` Defined in: [client.ts:85](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L85) Adds the appropriate authentication headers or parameters to the request based on the authentication type. ###### Parameters ###### request [`VetchOptions`](Vonage-Vetch.md#vetchoptions) The request options to which authentication needs to be added. ###### Returns `Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\> - The request options with the added authentication. ###### Inherited from [`Client`](#client).[`addAuthenticationToRequest`](#addauthenticationtorequest) ##### addBasicAuthToRequest() ```ts protected addBasicAuthToRequest(request): Promise; ``` Defined in: [client.ts:185](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L185) Adds basic authentication headers to the request. ###### Parameters ###### request [`VetchOptions`](Vonage-Vetch.md#vetchoptions) The request options to which authentication needs to be added. ###### Returns `Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\> - The request options with the added authentication. ###### Inherited from [`Client`](#client).[`addBasicAuthToRequest`](#addbasicauthtorequest) ##### addJWTToRequest() ```ts protected addJWTToRequest(request): Promise; ``` Defined in: [client.ts:170](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L170) Adds a JWT to the request. ###### Parameters ###### request [`VetchOptions`](Vonage-Vetch.md#vetchoptions) The request options to which authentication needs to be added. ###### Returns `Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\> - The request options with the added authentication. ###### Inherited from [`Client`](#client).[`addJWTToRequest`](#addjwttorequest) ##### addQueryKeySecretToRequest() ```ts protected addQueryKeySecretToRequest(request): Promise; ``` Defined in: [client.ts:153](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L153) Adds API key and secret to the request. ###### Parameters ###### request [`VetchOptions`](Vonage-Vetch.md#vetchoptions) The request options to which authentication needs to be added. ###### Returns `Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\> - The request options with the added authentication. ###### Inherited from [`Client`](#client).[`addQueryKeySecretToRequest`](#addquerykeysecrettorequest) ##### addQueryKeySecretToRequestBody() ```ts protected addQueryKeySecretToRequestBody(request): Promise; ``` Defined in: [client.ts:128](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L128) Adds API key and secret to the request body. ###### Parameters ###### request [`VetchOptions`](Vonage-Vetch.md#vetchoptions) The request options to which authentication needs to be added. ###### Returns `Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\> - The request options with the added authentication. ###### Inherited from [`Client`](#client).[`addQueryKeySecretToRequestBody`](#addquerykeysecrettorequestbody) ##### downloadFile() ```ts downloadFile(file, path): Promise; ``` Defined in: [fileClient.ts:31](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/fileClient.ts#L31) Downloads a file from Vonage and saves it to a specified path. ###### Parameters ###### file `string` The URL or ID of the file to be downloaded. ###### path `string` The path where the downloaded file should be saved. ###### Returns `Promise`\<`void`\> Resolves when the file is successfully downloaded and saved. ###### Throws Throws an error if the file could not be downloaded or saved. ##### getConfig() ```ts getConfig(): ConfigParams; ``` Defined in: [client.ts:75](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L75) ###### Returns [`ConfigParams`](#configparams) ###### Inherited from [`Client`](#client).[`getConfig`](#getconfig) ##### parseResponse() ```ts protected parseResponse(request, response): Promise>; ``` Defined in: [client.ts:435](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L435) Parses the response based on its content type. ###### Type Parameters ###### T `T` The expected type of the parsed response data. ###### Parameters ###### request [`VetchOptions`](Vonage-Vetch.md#vetchoptions) The request options. ###### response `Response` The raw response from the request. ###### Returns `Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\> - The parsed response. ###### Inherited from [`Client`](#client).[`parseResponse`](#parseresponse) ##### prepareBody() ```ts protected prepareBody(request): undefined | string; ``` Defined in: [client.ts:405](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L405) Prepares the body for the request based on the content type. ###### Parameters ###### request [`VetchOptions`](Vonage-Vetch.md#vetchoptions) The request options. ###### Returns `undefined` \| `string` - The prepared request body as a string or undefined. ###### Inherited from [`Client`](#client).[`prepareBody`](#preparebody) ##### prepareRequest() ```ts protected prepareRequest(request): Promise; ``` Defined in: [client.ts:361](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L361) Prepares the request with necessary headers, authentication, and query parameters. ###### Parameters ###### request [`VetchOptions`](Vonage-Vetch.md#vetchoptions) The initial request options. ###### Returns `Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\> - The modified request options. ###### Inherited from [`Client`](#client).[`prepareRequest`](#preparerequest) ##### sendDeleteRequest() ```ts sendDeleteRequest(url): Promise>; ``` Defined in: [client.ts:200](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L200) Sends a DELETE request to the specified URL. ###### Type Parameters ###### T `T` ###### Parameters ###### url `string` The URL endpoint for the DELETE request. ###### Returns `Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\> - The response from the DELETE request. ###### Inherited from [`Client`](#client).[`sendDeleteRequest`](#senddeleterequest) ##### sendFormSubmitRequest() ```ts sendFormSubmitRequest(url, payload?): Promise>; ``` Defined in: [client.ts:216](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L216) Sends a POST request with form data to the specified URL. ###### Type Parameters ###### T `T` ###### Parameters ###### url `string` The URL endpoint for the POST request. ###### payload? `Record`\<`string`, `undefined` \| `string`\> Optional payload containing form data to send with the POST request. ###### Returns `Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\> - The response from the POST request. ###### Inherited from [`Client`](#client).[`sendFormSubmitRequest`](#sendformsubmitrequest) ##### sendGetRequest() ```ts sendGetRequest(url, queryParams?): Promise>; ``` Defined in: [client.ts:238](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L238) Sends a GET request to the specified URL with optional query parameters. ###### Type Parameters ###### T `T` ###### Parameters ###### url `string` The URL endpoint for the GET request. ###### queryParams? Optional query parameters to append to the URL. These should be compatible with Node's URLSearchParams. ###### Returns `Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\> - The response from the GET request. ###### Inherited from [`Client`](#client).[`sendGetRequest`](#sendgetrequest) ##### sendPatchRequest() ```ts sendPatchRequest(url, payload?): Promise>; ``` Defined in: [client.ts:258](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L258) Sends a PATCH request to the specified URL with an optional payload. ###### Type Parameters ###### T `T` ###### Parameters ###### url `string` The URL endpoint for the PATCH request. ###### payload? Optional payload to be sent as the body of the PATCH request. ###### Returns `Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\> - The response from the PATCH request. ###### Inherited from [`Client`](#client).[`sendPatchRequest`](#sendpatchrequest) ##### sendPostRequest() ```ts sendPostRequest(url, payload?): Promise>; ``` Defined in: [client.ts:272](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L272) Sends a POST request to the specified URL with an optional payload. ###### Type Parameters ###### T `T` ###### Parameters ###### url `string` The URL endpoint for the POST request. ###### payload? Optional payload to be sent as the body of the POST request. ###### Returns `Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\> - The response from the POST request. ###### Inherited from [`Client`](#client).[`sendPostRequest`](#sendpostrequest) ##### sendPutRequest() ```ts sendPutRequest(url, payload?): Promise>; ``` Defined in: [client.ts:286](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L286) Sends a PUT request to the specified URL with an optional payload. ###### Type Parameters ###### T `T` ###### Parameters ###### url `string` The URL endpoint for the PUT request. ###### payload? Optional payload to be sent as the body of the PUT request. ###### Returns `Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\> - The response from the PUT request. ###### Inherited from [`Client`](#client).[`sendPutRequest`](#sendputrequest) ##### sendRequest() ```ts sendRequest(request): Promise>; ``` Defined in: [client.ts:322](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L322) Sends a request adding necessary headers, handling authentication, and parsing the response. ###### Type Parameters ###### T `T` ###### Parameters ###### request [`VetchOptions`](Vonage-Vetch.md#vetchoptions) The options defining the request, including URL, method, headers, and data. ###### Returns `Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\> - The parsed response from the request. ###### Inherited from [`Client`](#client).[`sendRequest`](#sendrequest) ##### sendRequestWithData() ```ts sendRequestWithData( method, url, payload?): Promise>; ``` Defined in: [client.ts:301](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/client.ts#L301) Sends a request with JSON-encoded data to the specified URL using the provided HTTP method. ###### Type Parameters ###### T `T` ###### Parameters ###### method The HTTP method to be used for the request (only POST, PATCH, or PUT are acceptable). [`POST`](Vonage-Vetch.md#httpmethods#post) | [`PUT`](Vonage-Vetch.md#httpmethods#put) | [`PATCH`](Vonage-Vetch.md#httpmethods#patch) ###### url `string` The URL endpoint for the request. ###### payload? Optional payload to be sent as the body of the request, JSON-encoded. ###### Returns `Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\> - The response from the request. ###### Inherited from [`Client`](#client).[`sendRequestWithData`](#sendrequestwithdata) ## Type Aliases ### AnyTransformFunction ```ts type AnyTransformFunction = | PartialTransformFunction | TransformObjectKeys | OmitFunction; ``` Defined in: [transformers.ts:32](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/transformers.ts#L32) *** ### APILink ```ts type APILink = object; ``` Defined in: [types/APILink.ts:7](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/types/APILink.ts#L7) Represents a link object in the HAL format. #### See [https://tools.ietf.org/html/rfc5988](https://tools.ietf.org/html/rfc5988) for more details on Web Linking. #### Properties ##### href ```ts href: string; ``` Defined in: [types/APILink.ts:11](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/types/APILink.ts#L11) The URL of the link. *** ### APILinks ```ts type APILinks = object; ``` Defined in: [types/APILinks.ts:9](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/types/APILinks.ts#L9) Represents a set of links in the HAL format. #### See [https://tools.ietf.org/html/draft-kelly-json-hal-08](https://tools.ietf.org/html/draft-kelly-json-hal-08) for more details on HAL format. #### Properties ##### \_links? ```ts optional _links: object; ``` Defined in: [types/APILinks.ts:13](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/types/APILinks.ts#L13) The set of links. ###### first? ```ts optional first: APILink; ``` The link for the first page of resources. ###### last? ```ts optional last: APILink; ``` The link for the last page of resources. ###### next? ```ts optional next: APILink; ``` The link for the next page of resources. ###### prev? ```ts optional prev: APILink; ``` The link for the previous page of resources. ###### self ```ts self: APILink; ``` The link for the current resource. *** ### ConfigParams ```ts type ConfigParams = object; ``` Defined in: [types/ConfigParams.ts:8](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/types/ConfigParams.ts#L8) Type defining configuration parameters for API requests. #### See [https://github.com/vonage/vetch](https://github.com/vonage/vetch) for more information on ResponseTypes. #### Properties ##### apiHost? ```ts optional apiHost: string; ``` Defined in: [types/ConfigParams.ts:17](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/types/ConfigParams.ts#L17) The host for general API requests. ##### appendUserAgent? ```ts optional appendUserAgent: string; ``` Defined in: [types/ConfigParams.ts:44](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/types/ConfigParams.ts#L44) A string to append to the User-Agent header in API requests. ##### meetingsHost? ```ts optional meetingsHost: string; ``` Defined in: [types/ConfigParams.ts:39](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/types/ConfigParams.ts#L39) The host for meetings-related API requests. ##### ~~responseType?~~ ```ts optional responseType: ResponseTypes; ``` Defined in: [types/ConfigParams.ts:29](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/types/ConfigParams.ts#L29) The desired response type for API requests. ###### Deprecated The client will now use the `content-type` header to decode the response properly ##### restHost? ```ts optional restHost: string; ``` Defined in: [types/ConfigParams.ts:12](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/types/ConfigParams.ts#L12) The host for REST API requests. ##### timeout? ```ts optional timeout: number; ``` Defined in: [types/ConfigParams.ts:34](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/types/ConfigParams.ts#L34) The maximum time, in milliseconds, to wait for API responses. ##### videoHost? ```ts optional videoHost: string; ``` Defined in: [types/ConfigParams.ts:22](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/types/ConfigParams.ts#L22) The host for video-related API requests. *** ### ObjectToTransform ```ts type ObjectToTransform = Record; ``` Defined in: [transformers.ts:8](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/transformers.ts#L8) *** ### OmitFunction() ```ts type OmitFunction = (keys, obj) => TransformedObject; ``` Defined in: [transformers.ts:27](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/transformers.ts#L27) #### Parameters ##### keys `string`[] ##### obj [`ObjectToTransform`](#objecttotransform) #### Returns [`TransformedObject`](#transformedobject) *** ### PartialTransformFunction() ```ts type PartialTransformFunction = (objectToTransform, deep?, preserve?) => TransformedObject; ``` Defined in: [transformers.ts:14](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/transformers.ts#L14) #### Parameters ##### objectToTransform [`ObjectToTransform`](#objecttotransform) ##### deep? `boolean` ##### preserve? `boolean` #### Returns [`TransformedObject`](#transformedobject) *** ### TransformedObject ```ts type TransformedObject = Record; ``` Defined in: [transformers.ts:10](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/transformers.ts#L10) *** ### TransformFunction() ```ts type TransformFunction = (key) => string; ``` Defined in: [transformers.ts:6](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/transformers.ts#L6) #### Parameters ##### key `string` #### Returns `string` *** ### TransformFunctionPartialParams ```ts type TransformFunctionPartialParams = [ObjectToTransform, boolean, boolean]; ``` Defined in: [transformers.ts:12](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/transformers.ts#L12) *** ### TransformObjectKeys() ```ts type TransformObjectKeys = (transformFn, objectToTransform, deep?, preserve?) => TransformedObject; ``` Defined in: [transformers.ts:20](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/transformers.ts#L20) #### Parameters ##### transformFn [`TransformFunction`](#transformfunction) ##### objectToTransform [`ObjectToTransform`](#objecttotransform) ##### deep? `boolean` ##### preserve? `boolean` #### Returns [`TransformedObject`](#transformedobject) ## Functions ### camelCaseObjectKeys() ```ts function camelCaseObjectKeys(...rest): TransformedObject; ``` Defined in: [transformers.ts:98](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/transformers.ts#L98) Transforms the keys of an object to camelCase. #### Parameters ##### rest ...[`TransformFunctionPartialParams`](#transformfunctionpartialparams) #### Returns [`TransformedObject`](#transformedobject) A new object with camelCased keys. *** ### kebabCaseObjectKeys() ```ts function kebabCaseObjectKeys(...rest): TransformedObject; ``` Defined in: [transformers.ts:124](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/transformers.ts#L124) Transforms the keys of an object to kebab-case. #### Parameters ##### rest ...[`TransformFunctionPartialParams`](#transformfunctionpartialparams) #### Returns [`TransformedObject`](#transformedobject) A new object with kebab-cased keys. *** ### omit() ```ts function omit(keys, obj): TransformedObject; ``` Defined in: [transformers.ts:138](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/transformers.ts#L138) Omit keys from an object. #### Parameters ##### keys `string`[] The keys to omit. ##### obj [`ObjectToTransform`](#objecttotransform) The object from which to omit keys. #### Returns [`TransformedObject`](#transformedobject) A new object with omitted keys. *** ### snakeCaseObjectKeys() ```ts function snakeCaseObjectKeys(...rest): TransformedObject; ``` Defined in: [transformers.ts:111](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/transformers.ts#L111) Transforms the keys of an object to snake_case. #### Parameters ##### rest ...[`TransformFunctionPartialParams`](#transformfunctionpartialparams) #### Returns [`TransformedObject`](#transformedobject) A new object with snake_cased keys. *** ### transformObjectKeys() ```ts function transformObjectKeys( transformFn, objectToTransform, deep?, preserve?): T; ``` Defined in: [transformers.ts:43](https://github.com/Vonage/vonage-node-sdk/blob/8ae0ebbe4f90b55bac891ec9624fbc56f991d476/packages/server-client/lib/transformers.ts#L43) Transforms the keys of an object based on a provided transformation function. #### Type Parameters ##### T `T` = [`TransformedObject`](#transformedobject) ##### O `O` = [`ObjectToTransform`](#objecttotransform) #### Parameters ##### transformFn [`TransformFunction`](#transformfunction) The function to transform the object's keys. ##### objectToTransform `O` The object whose keys are to be transformed. ##### deep? `boolean` = `false` Whether to deeply transform nested object keys. ##### preserve? `boolean` = `false` Whether to preserve the original object's keys. #### Returns `T` A new object with transformed keys.