diff --git a/CHANGELOG.md b/CHANGELOG.md index b0221b4..1b017e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 3.1.1 + +* small naming update for data removal endpoints + ## 3.1.0 * added data removal endpoints diff --git a/package-lock.json b/package-lock.json index fca90e2..de04106 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "postmark", - "version": "3.1.0", + "version": "3.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "postmark", - "version": "3.1.0", + "version": "3.1.1", "license": "MIT", "dependencies": { "axios": "^0.25.0" diff --git a/package.json b/package.json index 6ff7c4c..2b08a0a 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "sending", "transactional" ], - "version": "3.1.0", + "version": "3.1.1", "author": "Igor Balos", "contributors": [ "Igor Balos", diff --git a/src/client/AccountClient.ts b/src/client/AccountClient.ts index fce07f0..83bc676 100644 --- a/src/client/AccountClient.ts +++ b/src/client/AccountClient.ts @@ -26,7 +26,7 @@ import { UpdateServerRequest, UpdateSignatureRequest, - CreateDataRemovalRequest, + DataRemovalRequest, DataRemovalStatus } from "./models"; @@ -311,7 +311,7 @@ export default class AccountClient extends BaseClient { * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation. * @returns A promise that will complete when the API responds (or an error occurs). */ - public createDataRemoval(options: CreateDataRemovalRequest, callback?: Callback): Promise { + public requestDataRemoval(options: DataRemovalRequest, callback?: Callback): Promise { return this.processRequestWithBody(ClientOptions.HttpMethod.POST, "/data-removals", options, callback); } @@ -322,7 +322,7 @@ export default class AccountClient extends BaseClient { * @param callback - If the callback is provided, it will be passed to the resulting promise as a continuation. * @returns A promise that will complete when the API responds (or an error occurs). */ - public getDataRemoval(id: number, callback?: Callback): Promise { + public getDataRemovalStatus(id: number, callback?: Callback): Promise { return this.processRequestWithoutBody(ClientOptions.HttpMethod.GET, `/data-removals/${id}`, {}, callback); } } diff --git a/src/client/models/data_removal/DataRemovals.ts b/src/client/models/data_removal/DataRemovals.ts index 98b7907..84576fe 100644 --- a/src/client/models/data_removal/DataRemovals.ts +++ b/src/client/models/data_removal/DataRemovals.ts @@ -9,7 +9,7 @@ export interface DataRemovalStatus { } -export class CreateDataRemovalRequest { +export class DataRemovalRequest { public RequestedBy: string; public RequestedFor: string; public NotifyWhenCompleted: boolean; diff --git a/test/integration/DataRemoval.test.ts b/test/integration/DataRemoval.test.ts index 4c54f75..bc1ebf2 100644 --- a/test/integration/DataRemoval.test.ts +++ b/test/integration/DataRemoval.test.ts @@ -13,7 +13,7 @@ describe("DataRemoval", () => { const fromAddress: any = process.env.SENDER_EMAIL_ADDRESS; it("createDataRemoval", async () => { - const dataRemovalStatus:DataRemovalStatus = await client.createDataRemoval({ + const dataRemovalStatus:DataRemovalStatus = await client.requestDataRemoval({ RequestedBy: fromAddress.toString(), RequestedFor: 'test@example.com', NotifyWhenCompleted: false}) @@ -23,13 +23,13 @@ describe("DataRemoval", () => { }); it("getDataRemoval", async () => { - let dataRemovalStatus: DataRemovalStatus = await client.createDataRemoval({ + let dataRemovalStatus: DataRemovalStatus = await client.requestDataRemoval({ RequestedBy: fromAddress.toString(), RequestedFor: 'test@example.com', NotifyWhenCompleted: false}) const dataRemovalStatusId:number = dataRemovalStatus.ID; - dataRemovalStatus = await client.getDataRemoval(dataRemovalStatusId); + dataRemovalStatus = await client.getDataRemovalStatus(dataRemovalStatusId); expect(dataRemovalStatus.ID).to.eq(dataRemovalStatusId) }); });