Skip to content

Vonage Redact

github-actions edited this page Jun 18, 2024 · 41 revisions

Vonage RedactDocs


Documentation / Vonage Redact

Vonage Redact

Enumerations

ProductType

Enum representing different product types for redaction requests.

Enumeration Members

Enumeration Member Value Description
NumberInsight "NumberInsight" Represents the Number Insight product.
SMS "SMS" Represents the SMS product.
Verify "Verify" Represents the Verify product.
VerifySDK "VerifySDK" Represents the Verify SDK product.
Voice "Voice" Represents the Voice product.

Type

Enum representing different message types for redaction requests.

Enumeration Members

Enumeration Member Value Description
INBOUND "Inbound" Represents an inbound message type.
OUTBOUND "Outbound" Represents an outbound message type.

Classes

Redact

Represents a client for the Redact API that extends the Vonage Client.

Extends

Constructors

new Redact()
new Redact(credentials, options?): Redact

Creates a new instance of the Client.

Parameters

credentials: AuthInterface | AuthParams

The authentication credentials or an authentication instance.

options?: ConfigParams

Optional configuration settings for the client.

Returns

Redact

Inherited from

Client.constructor

Source

server-client/dist/client.d.ts:30

Properties

auth
protected auth: AuthInterface;

The authentication instance responsible for generating authentication headers and query parameters.

Inherited from

Client.auth

Source

server-client/dist/client.d.ts:19

authType
protected authType: AuthenticationType = AuthenticationType.BASIC;

The authentication type used for Redact API requests.

Overrides

Client.authType

Source

redact/lib/redact.ts:11

config
protected config: ConfigParams;

Configuration settings for the client, including default hosts for various services and other request settings.

Inherited from

Client.config

Source

server-client/dist/client.d.ts:23

transformers
static transformers: __module;

Static property containing utility transformers.

Inherited from

Client.transformers

Source

server-client/dist/client.d.ts:11

Methods

addAuthenticationToRequest()
addAuthenticationToRequest(request): Promise<VetchOptions>

Adds the appropriate authentication headers or parameters to the request based on the authentication type.

Parameters

request: VetchOptions

The request options to which authentication needs to be added.

Returns

Promise<VetchOptions>

  • The request options with the added authentication.
Inherited from

Client.addAuthenticationToRequest

Source

server-client/dist/client.d.ts:37

parseResponse()
protected parseResponse<T>(request, response): Promise<VetchResponse<T>>

Parses the response based on its content type.

Type parameters

T

The expected type of the parsed response data.

Parameters

request: VetchOptions

The request options.

response: Response

The raw response from the request.

Returns

Promise<VetchResponse<T>>

  • The parsed response.
Inherited from

Client.parseResponse

Source

server-client/dist/client.d.ts:134

prepareBody()
protected prepareBody(request): undefined | string

Prepares the body for the request based on the content type.

Parameters

request: VetchOptions

The request options.

Returns

undefined | string

  • The prepared request body as a string or undefined.
Inherited from

Client.prepareBody

Source

server-client/dist/client.d.ts:124

prepareRequest()
protected prepareRequest(request): Promise<VetchOptions>

Prepares the request with necessary headers, authentication, and query parameters.

Parameters

request: VetchOptions

The initial request options.

Returns

Promise<VetchOptions>

  • The modified request options.
Inherited from

Client.prepareRequest

Source

server-client/dist/client.d.ts:117

redactMessage()
redactMessage(params): Promise<void>

Redacts a specific message using the provided parameters.

Parameters

params: TransactionParams

Parameters for redacting a message.

Returns

Promise<void>

A Promise that resolves when the redaction is successful.

Throws

If there is an error in processing the redaction request.

Source

redact/lib/redact.ts:21

sendDeleteRequest()
sendDeleteRequest<T>(url): Promise<VetchResponse<T>>

Sends a DELETE request to the specified URL.

Type parameters

T

Parameters

url: string

The URL endpoint for the DELETE request.

Returns

Promise<VetchResponse<T>>

  • The response from the DELETE request.
Inherited from

Client.sendDeleteRequest

Source

server-client/dist/client.d.ts:44

sendFormSubmitRequest()
sendFormSubmitRequest<T>(url, payload?): Promise<VetchResponse<T>>

Sends a POST request with form data to the specified URL.

Type parameters

T

Parameters

url: string

The URL endpoint for the POST request.

payload?: Record<string, string>

Optional payload containing form data to send with the POST request.

Returns

Promise<VetchResponse<T>>

  • The response from the POST request.
Inherited from

Client.sendFormSubmitRequest

Source

server-client/dist/client.d.ts:52

sendGetRequest()
sendGetRequest<T>(url, queryParams?): Promise<VetchResponse<T>>

Sends a GET request to the specified URL with optional query parameters.

Type parameters

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<T>>

  • The response from the GET request.
Inherited from

Client.sendGetRequest

Source

server-client/dist/client.d.ts:60

sendPatchRequest()
sendPatchRequest<T>(url, payload?): Promise<VetchResponse<T>>

Sends a PATCH request to the specified URL with an optional payload.

Type parameters

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<T>>

  • The response from the PATCH request.
Inherited from

Client.sendPatchRequest

Source

server-client/dist/client.d.ts:70

sendPostRequest()
sendPostRequest<T>(url, payload?): Promise<VetchResponse<T>>

Sends a POST request to the specified URL with an optional payload.

Type parameters

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<T>>

  • The response from the POST request.
Inherited from

Client.sendPostRequest

Source

server-client/dist/client.d.ts:80

sendPutRequest()
sendPutRequest<T>(url, payload?): Promise<VetchResponse<T>>

Sends a PUT request to the specified URL with an optional payload.

Type parameters

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<T>>

  • The response from the PUT request.
Inherited from

Client.sendPutRequest

Source

server-client/dist/client.d.ts:90

sendRequest()
sendRequest<T>(request): Promise<VetchResponse<T>>

Sends a request adding necessary headers, handling authentication, and parsing the response.

Type parameters

T

Parameters

request: VetchOptions

The options defining the request, including URL, method, headers, and data.

Returns

Promise<VetchResponse<T>>

  • The parsed response from the request.
Inherited from

Client.sendRequest

Source

server-client/dist/client.d.ts:110

sendRequestWithData()
sendRequestWithData<T>(
   method, 
   url, 
payload?): Promise<VetchResponse<T>>

Sends a request with JSON-encoded data to the specified URL using the provided HTTP method.

Type parameters

T

Parameters

method: POST | PUT | PATCH

The HTTP method to be used for the request (only POST, PATCH, or PUT are acceptable).

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<T>>

  • The response from the request.
Inherited from

Client.sendRequestWithData

Source

server-client/dist/client.d.ts:101

Interfaces

ErrorResponse

Represents an error response.

Properties

detail
detail: string;

A detailed description of the error.

Source

redact/lib/interfaces/response/errorResponse.ts:18

instance
instance: string;

An instance identifier associated with the error.

Source

redact/lib/interfaces/response/errorResponse.ts:23

title
title: string;

A short title or summary of the error.

Source

redact/lib/interfaces/response/errorResponse.ts:13

type
type: string;

The type of error.

Source

redact/lib/interfaces/response/errorResponse.ts:8


TransactionRequest

Represents a request to redact a specific message.

Properties

id
id: string;

The transaction ID to redact.

Source

redact/lib/interfaces/request/transactionRequest.ts:10

product
product: ProductType;

Product name that the ID provided relates to. Must be one of: sms, voice, number-insight, verify, verify-sdk, messages.

Source

redact/lib/interfaces/request/transactionRequest.ts:16

type
type: Type;

Required if redacting SMS data. Must be one of: inbound, outbound.

Source

redact/lib/interfaces/request/transactionRequest.ts:21

Type Aliases

TransactionParams

type TransactionParams: object;

Represents parameters for a transaction redaction request.

Type declaration

id
id: string;

The transaction ID to redact.

product
product: ProductType;

Product name that the ID provided relates to. Must be one of: sms, voice, number-insight, verify, verify-sdk, messages.

type
type: Type;

Required if redacting SMS data. Must be one of: inbound, outbound.

Source

redact/lib/types/transactionParams.ts:6

Clone this wiki locally