@code.store/arcxp-sdk-ts 4.47.1 → 4.47.2
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.
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { AStory } from '../../types/story';
|
|
1
2
|
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api';
|
|
2
3
|
import type { Circulations, CreateDocumentRedirectPayload, CreateExternalRedirectPayload, CreateRedirectPayload, Document, DocumentRedirect, ExternalRedirect, Revision, Revisions, UpdateDraftRevisionPayload } from './types';
|
|
3
4
|
export declare class ArcDraft extends ArcAbstractAPI {
|
|
4
5
|
constructor(options: ArcAPIOptions);
|
|
5
6
|
generateId(id: string): Promise<string>;
|
|
7
|
+
createDocument(ans: AStory, type?: string): Promise<Document>;
|
|
6
8
|
publishDocument(id: string, type?: string): Promise<Revision>;
|
|
7
9
|
unpublishDocument(id: string, type?: string): Promise<Revision>;
|
|
8
10
|
deleteDocument(id: string, type?: string): Promise<Document>;
|
package/dist/api/draft/index.js
CHANGED
|
@@ -10,6 +10,10 @@ class ArcDraft extends abstract_api_1.ArcAbstractAPI {
|
|
|
10
10
|
const { data } = await this.client.get('/arcuuid', { params: { id } });
|
|
11
11
|
return data.id;
|
|
12
12
|
}
|
|
13
|
+
async createDocument(ans, type = 'story') {
|
|
14
|
+
const { data } = await this.client.post(`/${type}`, ans);
|
|
15
|
+
return data;
|
|
16
|
+
}
|
|
13
17
|
async publishDocument(id, type = 'story') {
|
|
14
18
|
const { data } = await this.client.post(`/${type}/${id}/revision/published`);
|
|
15
19
|
return data;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/draft/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/draft/index.ts"],"names":[],"mappings":";;;AACA,kDAAqE;AAcrE,MAAa,QAAS,SAAQ,6BAAc;IAC1C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,OAAe,EAAE,UAAkB,EAAE,OAAU;QAC/C,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAI,aAAa,OAAO,IAAI,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;QAC1F,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,OAAe,EAAE,UAAkB;QACnD,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAsC,aAAa,OAAO,IAAI,UAAU,EAAE,CAAC,CAAC;QAClH,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,mBAAmB,CAAC,EAAU,EAAE,OAAmC,EAAE,IAAI,GAAG,OAAO;QACvF,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAW,IAAI,IAAI,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,CAAC;QAC3F,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA5ED,4BA4EC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code.store/arcxp-sdk-ts",
|
|
3
|
-
"version": "4.47.
|
|
3
|
+
"version": "4.47.2",
|
|
4
4
|
"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.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
"url": "https://github.com/code-store-platform/arcxp-sdk-ts"
|
|
14
14
|
},
|
|
15
15
|
"homepage": "https://github.com/code-store-platform/arcxp-sdk-ts",
|
|
16
|
-
"files": [
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
17
19
|
"scripts": {
|
|
18
20
|
"build": "tsc",
|
|
19
21
|
"format": "npx @biomejs/biome format --write .",
|
|
@@ -25,7 +27,11 @@
|
|
|
25
27
|
"cs": "npx changeset && npx changeset version",
|
|
26
28
|
"swaggerToTypes": "npx swagger-typescript-api -p ./tmp/swagger.json -o ./tmp -n swaggerTypes.ts"
|
|
27
29
|
},
|
|
28
|
-
"keywords": [
|
|
30
|
+
"keywords": [
|
|
31
|
+
"ArcXP",
|
|
32
|
+
"SDK",
|
|
33
|
+
"Code.Store"
|
|
34
|
+
],
|
|
29
35
|
"author": "code.store",
|
|
30
36
|
"license": "MIT",
|
|
31
37
|
"dependencies": {
|