@code.store/arcxp-sdk-ts 5.1.8 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/draft/index.d.ts +2 -1
- package/dist/api/site/index.d.ts +1 -0
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ANS } from '../../types/index.js';
|
|
1
|
+
import type { ANS, CirculationReference } from '../../types/index.js';
|
|
2
2
|
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api.js';
|
|
3
3
|
import type { Circulations, CreateDocumentRedirectPayload, CreateExternalRedirectPayload, CreateRedirectPayload, Document, DocumentRedirect, ExternalRedirect, Revision, Revisions, UpdateDraftRevisionPayload } from './types.js';
|
|
4
4
|
export declare class ArcDraft extends ArcAbstractAPI {
|
|
@@ -11,6 +11,7 @@ export declare class ArcDraft extends ArcAbstractAPI {
|
|
|
11
11
|
getPublishedRevision(id: string, type?: string): Promise<Revision>;
|
|
12
12
|
getDraftRevision(id: string, type?: string): Promise<Revision>;
|
|
13
13
|
getCirculations(id: string, type?: string, after?: string): Promise<Circulations>;
|
|
14
|
+
deleteCirculation(id: string, website: string, type?: string): Promise<CirculationReference>;
|
|
14
15
|
getRevisions(id: string, type?: string, after?: string): Promise<Revisions>;
|
|
15
16
|
getRevision(id: string, revisionId: string, type?: string): Promise<Revision>;
|
|
16
17
|
createRedirect<P extends CreateRedirectPayload, R = P extends CreateExternalRedirectPayload ? ExternalRedirect : P extends CreateDocumentRedirectPayload ? DocumentRedirect : never>(website: string, websiteUrl: string, payload: P): Promise<R>;
|
package/dist/api/site/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export declare class ArcSite extends ArcAbstractAPI {
|
|
|
7
7
|
deleteSection(id: string, website: string): Promise<void>;
|
|
8
8
|
putSection(section: SetSectionPayload): Promise<any>;
|
|
9
9
|
getWebsites(): Promise<Website[]>;
|
|
10
|
+
deleteWebsite(website: string): Promise<Website>;
|
|
10
11
|
putLink(link: Link): Promise<Link>;
|
|
11
12
|
deleteLink(id: string, website: string): Promise<any>;
|
|
12
13
|
getLinks(params: GetLinksParams): Promise<GetLinksResponse>;
|
package/dist/index.cjs
CHANGED
|
@@ -232,6 +232,10 @@ class ArcDraft extends ArcAbstractAPI {
|
|
|
232
232
|
const { data } = await this.client.get(`/${type}/${id}/circulation`, { params: { after } });
|
|
233
233
|
return data;
|
|
234
234
|
}
|
|
235
|
+
async deleteCirculation(id, website, type = 'story') {
|
|
236
|
+
const { data } = await this.client.delete(`/${type}/${id}/circulation/${website}`);
|
|
237
|
+
return data;
|
|
238
|
+
}
|
|
235
239
|
async getRevisions(id, type = 'story', after) {
|
|
236
240
|
const { data } = await this.client.get(`/${type}/${id}/revision`, { params: { after } });
|
|
237
241
|
return data;
|
|
@@ -790,6 +794,10 @@ class ArcSite extends ArcAbstractAPI {
|
|
|
790
794
|
const { data } = await this.client.get('/website');
|
|
791
795
|
return data;
|
|
792
796
|
}
|
|
797
|
+
async deleteWebsite(website) {
|
|
798
|
+
const { data } = await this.client.delete(`/website/${website}`);
|
|
799
|
+
return data;
|
|
800
|
+
}
|
|
793
801
|
async putLink(link) {
|
|
794
802
|
const { data } = await this.client.put(`/website/${link._website}/link/${link._id}`, link);
|
|
795
803
|
return data;
|