@code.store/arcxp-sdk-ts 5.1.6 → 5.1.8
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 +1 -0
- package/dist/index.cjs +10 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -5
- package/dist/index.js.map +1 -1
- package/dist/lib/platform/index.d.ts +1 -1
- package/dist/lib/platform/node.d.ts +6 -3
- package/package.json +8 -10
package/dist/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
2
|
import * as rateLimit from 'axios-rate-limit';
|
|
3
3
|
import axiosRetry from 'axios-retry';
|
|
4
|
+
import fs from 'node:fs';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
import FormData from 'form-data';
|
|
4
7
|
import * as ws from 'ws';
|
|
5
8
|
import encode from 'base32-encode';
|
|
6
9
|
import { v5 } from 'uuid';
|
|
@@ -221,6 +224,10 @@ class ArcDraft extends ArcAbstractAPI {
|
|
|
221
224
|
const { data } = await this.client.get(`/redirect/${website}/${websiteUrl}`);
|
|
222
225
|
return data;
|
|
223
226
|
}
|
|
227
|
+
async deleteRedirect(website, websiteUrl) {
|
|
228
|
+
const { data } = await this.client.delete(`/redirect/${website}/${websiteUrl}`);
|
|
229
|
+
return data;
|
|
230
|
+
}
|
|
224
231
|
async updateDraftRevision(id, payload, type = 'story') {
|
|
225
232
|
const { data } = await this.client.put(`/${type}/${id}/revision/draft`, payload);
|
|
226
233
|
return data;
|
|
@@ -271,12 +278,10 @@ class ArcIdentity extends ArcAbstractAPI {
|
|
|
271
278
|
}
|
|
272
279
|
}
|
|
273
280
|
|
|
274
|
-
const importNodeModule = async (moduleId) => await import(moduleId);
|
|
275
281
|
const modules = {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
form_data: () => importNodeModule('form-data'),
|
|
282
|
+
fs: () => Promise.resolve(fs),
|
|
283
|
+
path: () => Promise.resolve(path),
|
|
284
|
+
form_data: () => Promise.resolve(FormData),
|
|
280
285
|
};
|
|
281
286
|
|
|
282
287
|
var platform = {
|