@vonage/redact
Advanced tools
Comparing version 1.8.0 to 1.9.0
@@ -19,2 +19,1 @@ "use strict"; | ||
__exportStar(require("./type"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -0,7 +1,25 @@ | ||
/** | ||
* Enum representing different product types for redaction requests. | ||
*/ | ||
export declare enum ProductType { | ||
/** | ||
* Represents the SMS product. | ||
*/ | ||
SMS = "SMS", | ||
/** | ||
* Represents the Voice product. | ||
*/ | ||
Voice = "Voice", | ||
/** | ||
* Represents the Number Insight product. | ||
*/ | ||
NumberInsight = "NumberInsight", | ||
/** | ||
* Represents the Verify product. | ||
*/ | ||
Verify = "Verify", | ||
/** | ||
* Represents the Verify SDK product. | ||
*/ | ||
VerifySDK = "VerifySDK" | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ProductType = void 0; | ||
/** | ||
* Enum representing different product types for redaction requests. | ||
*/ | ||
var ProductType; | ||
(function (ProductType) { | ||
/** | ||
* Represents the SMS product. | ||
*/ | ||
ProductType["SMS"] = "SMS"; | ||
/** | ||
* Represents the Voice product. | ||
*/ | ||
ProductType["Voice"] = "Voice"; | ||
/** | ||
* Represents the Number Insight product. | ||
*/ | ||
ProductType["NumberInsight"] = "NumberInsight"; | ||
/** | ||
* Represents the Verify product. | ||
*/ | ||
ProductType["Verify"] = "Verify"; | ||
/** | ||
* Represents the Verify SDK product. | ||
*/ | ||
ProductType["VerifySDK"] = "VerifySDK"; | ||
})(ProductType || (exports.ProductType = ProductType = {})); | ||
//# sourceMappingURL=product.js.map |
@@ -0,4 +1,13 @@ | ||
/** | ||
* Enum representing different message types for redaction requests. | ||
*/ | ||
export declare enum Type { | ||
/** | ||
* Represents an inbound message type. | ||
*/ | ||
INBOUND = "Inbound", | ||
/** | ||
* Represents an outbound message type. | ||
*/ | ||
OUTBOUND = "Outbound" | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Type = void 0; | ||
/** | ||
* Enum representing different message types for redaction requests. | ||
*/ | ||
var Type; | ||
(function (Type) { | ||
/** | ||
* Represents an inbound message type. | ||
*/ | ||
Type["INBOUND"] = "Inbound"; | ||
/** | ||
* Represents an outbound message type. | ||
*/ | ||
Type["OUTBOUND"] = "Outbound"; | ||
})(Type || (exports.Type = Type = {})); | ||
//# sourceMappingURL=type.js.map |
@@ -21,2 +21,1 @@ "use strict"; | ||
__exportStar(require("./redact"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -19,2 +19,1 @@ "use strict"; | ||
__exportStar(require("./response/index"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -18,2 +18,1 @@ "use strict"; | ||
__exportStar(require("./transactionRequest"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -1,6 +0,19 @@ | ||
import { Type, ProductType } from '../../enums/index'; | ||
import { Type, ProductType } from '../../enums'; | ||
/** | ||
* Represents a request to redact a specific message. | ||
*/ | ||
export interface TransactionRequest { | ||
/** | ||
* The transaction ID to redact. | ||
*/ | ||
id: string; | ||
/** | ||
* Product name that the ID provided relates to. | ||
* Must be one of: sms, voice, number-insight, verify, verify-sdk, messages. | ||
*/ | ||
product: ProductType; | ||
/** | ||
* Required if redacting SMS data. Must be one of: inbound, outbound. | ||
*/ | ||
type: Type; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=transactionRequest.js.map |
@@ -0,6 +1,21 @@ | ||
/** | ||
* Represents an error response. | ||
*/ | ||
export interface ErrorResponse { | ||
/** | ||
* The type of error. | ||
*/ | ||
type: string; | ||
/** | ||
* A short title or summary of the error. | ||
*/ | ||
title: string; | ||
/** | ||
* A detailed description of the error. | ||
*/ | ||
detail: string; | ||
/** | ||
* An instance identifier associated with the error. | ||
*/ | ||
instance: string; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=errorResponse.js.map |
@@ -18,2 +18,1 @@ "use strict"; | ||
__exportStar(require("./errorResponse"), exports); | ||
//# sourceMappingURL=index.js.map |
import { Client, AuthenticationType } from '@vonage/server-client'; | ||
import { TransactionParams } from './types/index'; | ||
import { TransactionParams } from './types'; | ||
/** | ||
* Represents a client for the Redact API that extends the Vonage Client. | ||
*/ | ||
export declare class Redact extends Client { | ||
/** | ||
* The authentication type used for Redact API requests. | ||
*/ | ||
protected authType: AuthenticationType; | ||
/** | ||
* Redacts a specific message using the provided parameters. | ||
* | ||
* @param {TransactionParams} params - Parameters for redacting a message. | ||
* @return {Promise<void>} A Promise that resolves when the redaction is successful. | ||
* | ||
* @throws {Error} If there is an error in processing the redaction request. | ||
*/ | ||
redactMessage(params: TransactionParams): Promise<void>; | ||
} |
@@ -5,4 +5,21 @@ "use strict"; | ||
const server_client_1 = require("@vonage/server-client"); | ||
/** | ||
* Represents a client for the Redact API that extends the Vonage Client. | ||
*/ | ||
class Redact extends server_client_1.Client { | ||
authType = server_client_1.AuthenticationType.BASIC; | ||
constructor() { | ||
super(...arguments); | ||
/** | ||
* The authentication type used for Redact API requests. | ||
*/ | ||
this.authType = server_client_1.AuthenticationType.BASIC; | ||
} | ||
/** | ||
* Redacts a specific message using the provided parameters. | ||
* | ||
* @param {TransactionParams} params - Parameters for redacting a message. | ||
* @return {Promise<void>} A Promise that resolves when the redaction is successful. | ||
* | ||
* @throws {Error} If there is an error in processing the redaction request. | ||
*/ | ||
async redactMessage(params) { | ||
@@ -13,2 +30,1 @@ await this.sendPostRequest(`${this.config.apiHost}/v1/redact/transaction`, params); | ||
exports.Redact = Redact; | ||
//# sourceMappingURL=redact.js.map |
@@ -18,2 +18,1 @@ "use strict"; | ||
__exportStar(require("./transactionParams"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -1,6 +0,19 @@ | ||
import { Type, ProductType } from '../enums/index'; | ||
import { Type, ProductType } from '../enums'; | ||
/** | ||
* Represents parameters for a transaction redaction request. | ||
*/ | ||
export type TransactionParams = { | ||
/** | ||
* The transaction ID to redact. | ||
*/ | ||
id: string; | ||
/** | ||
* Product name that the ID provided relates to. | ||
* Must be one of: sms, voice, number-insight, verify, verify-sdk, messages. | ||
*/ | ||
product: ProductType; | ||
/** | ||
* Required if redacting SMS data. Must be one of: inbound, outbound. | ||
*/ | ||
type: Type; | ||
}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=transactionParams.js.map |
{ | ||
"$schema": "https://json.schemastore.org/package.json", | ||
"name": "@vonage/redact", | ||
"version": "1.8.0", | ||
"version": "1.9.0", | ||
"description": "Delete data from the Vonage platform.", | ||
@@ -14,3 +15,12 @@ "homepage": "https://github.com/vonage/vonage-node-sdk/tree/main/packages/redact#readme", | ||
"license": "Apache-2.0", | ||
"author": "Chuck MANCHUCK Reeves <chuck@manchuck.com>", | ||
"contributors": [ | ||
{ | ||
"name": "Chuck \"MANCHUCK\" Reeves", | ||
"url": "https://github.com/manchuck" | ||
}, | ||
{ | ||
"name": "Chris Tankersley", | ||
"url": "https://github.com/dragonmantank" | ||
} | ||
], | ||
"main": "dist/index.js", | ||
@@ -28,9 +38,10 @@ "types": "dist/index.d.ts", | ||
"clean": "npx shx rm -rf dist tsconfig.tsbuildinfo", | ||
"compile": "npx tsc --build --verbose" | ||
"compile": "npx tsc --build --verbose", | ||
"prepublishOnly": "npm run build" | ||
}, | ||
"dependencies": { | ||
"@vonage/server-client": "^1.9.0" | ||
"@vonage/server-client": "^1.10.0" | ||
}, | ||
"devDependencies": { | ||
"@vonage/auth": "^1.7.0", | ||
"@vonage/auth": "^1.8.0", | ||
"nock": "^13.3.4" | ||
@@ -37,0 +48,0 @@ }, |
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
15738
315
26