Skip to content

Commit cf54c72

Browse files
committed
add redirect api
1 parent 4aabd4e commit cf54c72

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @code.store/arcxp-sdk-ts
22

3+
## 5.1.8
4+
5+
### Patch Changes
6+
7+
- DraftAPI.deleteRedirect added
8+
39
## 5.1.7
410

511
### Patch Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@code.store/arcxp-sdk-ts",
3-
"version": "5.1.7",
3+
"version": "5.1.8",
44
"description": "A strongly typed set of ArcXP API's and utilities reduce the amount of work required to develop with ArcXP, starting with reducing the boilerplate code you have to write.",
55
"type": "module",
66
"main": "./dist/index.js",

src/api/draft/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@ export class ArcDraft extends ArcAbstractAPI {
8585
return data;
8686
}
8787

88+
async deleteRedirect(website: string, websiteUrl: string) {
89+
const { data } = await this.client.delete<ExternalRedirect | DocumentRedirect>(
90+
`/redirect/${website}/${websiteUrl}`
91+
);
92+
return data;
93+
}
94+
8895
async updateDraftRevision(id: string, payload: UpdateDraftRevisionPayload, type = 'story') {
8996
const { data } = await this.client.put<Revision>(`/${type}/${id}/revision/draft`, payload);
9097
return data;

0 commit comments

Comments
 (0)