@arbidocs/sdk 0.4.4 → 0.4.5
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/{browser-Bdzn5DIN.d.cts → browser-5spRium9.d.cts} +3 -3
- package/dist/{browser-Bdzn5DIN.d.ts → browser-5spRium9.d.ts} +3 -3
- package/dist/browser.cjs +3 -6
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +3 -6
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +3 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -6
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -841,6 +841,8 @@ interface UploadOptions {
|
|
|
841
841
|
* ``wp_type='skill'`` AND in a ``skills/<slug>`` folder so the
|
|
842
842
|
* backend's ``SkillManager`` recognises them. */
|
|
843
843
|
wpType?: 'source' | 'skill' | 'memory' | 'artifact' | 'webpage';
|
|
844
|
+
/** Save the upload as a new immutable version of this document (`parent_ext_id` lineage). */
|
|
845
|
+
parentExtId?: string;
|
|
844
846
|
}
|
|
845
847
|
interface SkippedFile {
|
|
846
848
|
file_name: string;
|
|
@@ -2800,9 +2802,7 @@ declare class Arbi {
|
|
|
2800
2802
|
reason: string;
|
|
2801
2803
|
}[] | undefined;
|
|
2802
2804
|
}>;
|
|
2803
|
-
uploadFile: (fileData: Blob, fileName: string, options?:
|
|
2804
|
-
folder?: string;
|
|
2805
|
-
}) => Promise<UploadResult>;
|
|
2805
|
+
uploadFile: (fileData: Blob, fileName: string, options?: UploadOptions) => Promise<UploadResult>;
|
|
2806
2806
|
download: (docId: string) => Promise<Response>;
|
|
2807
2807
|
getParsedContent: (docId: string, stage: string) => Promise<Record<string, unknown>>;
|
|
2808
2808
|
getThumbnails: (docIds: string[]) => Promise<Record<string, string | null>>;
|
|
@@ -841,6 +841,8 @@ interface UploadOptions {
|
|
|
841
841
|
* ``wp_type='skill'`` AND in a ``skills/<slug>`` folder so the
|
|
842
842
|
* backend's ``SkillManager`` recognises them. */
|
|
843
843
|
wpType?: 'source' | 'skill' | 'memory' | 'artifact' | 'webpage';
|
|
844
|
+
/** Save the upload as a new immutable version of this document (`parent_ext_id` lineage). */
|
|
845
|
+
parentExtId?: string;
|
|
844
846
|
}
|
|
845
847
|
interface SkippedFile {
|
|
846
848
|
file_name: string;
|
|
@@ -2800,9 +2802,7 @@ declare class Arbi {
|
|
|
2800
2802
|
reason: string;
|
|
2801
2803
|
}[] | undefined;
|
|
2802
2804
|
}>;
|
|
2803
|
-
uploadFile: (fileData: Blob, fileName: string, options?:
|
|
2804
|
-
folder?: string;
|
|
2805
|
-
}) => Promise<UploadResult>;
|
|
2805
|
+
uploadFile: (fileData: Blob, fileName: string, options?: UploadOptions) => Promise<UploadResult>;
|
|
2806
2806
|
download: (docId: string) => Promise<Response>;
|
|
2807
2807
|
getParsedContent: (docId: string, stage: string) => Promise<Record<string, unknown>>;
|
|
2808
2808
|
getThumbnails: (docIds: string[]) => Promise<Record<string, string | null>>;
|
package/dist/browser.cjs
CHANGED
|
@@ -4479,6 +4479,7 @@ async function uploadFile(auth, fileData, fileName, options) {
|
|
|
4479
4479
|
if (options?.folder) params.set("folder", sanitizeFolderPath(options.folder));
|
|
4480
4480
|
if (options?.configExtId) params.set("config_ext_id", options.configExtId);
|
|
4481
4481
|
if (options?.wpType) params.set("wp_type", options.wpType);
|
|
4482
|
+
if (options?.parentExtId) params.set("parent_ext_id", options.parentExtId);
|
|
4482
4483
|
const qs = params.toString();
|
|
4483
4484
|
const res = await authenticatedFetch({
|
|
4484
4485
|
...auth,
|
|
@@ -4495,6 +4496,7 @@ async function uploadFiles(auth, files, options) {
|
|
|
4495
4496
|
if (options?.folder) params.set("folder", sanitizeFolderPath(options.folder));
|
|
4496
4497
|
if (options?.configExtId) params.set("config_ext_id", options.configExtId);
|
|
4497
4498
|
if (options?.wpType) params.set("wp_type", options.wpType);
|
|
4499
|
+
if (options?.parentExtId) params.set("parent_ext_id", options.parentExtId);
|
|
4498
4500
|
const qs = params.toString();
|
|
4499
4501
|
const res = await authenticatedFetch({
|
|
4500
4502
|
...auth,
|
|
@@ -6029,12 +6031,7 @@ var Arbi = class {
|
|
|
6029
6031
|
uploadFile: (fileData, fileName, options) => {
|
|
6030
6032
|
this.requireWorkspace();
|
|
6031
6033
|
return this.recovering(
|
|
6032
|
-
() => uploadFile(
|
|
6033
|
-
this.getAuthHeaders(),
|
|
6034
|
-
fileData,
|
|
6035
|
-
fileName,
|
|
6036
|
-
options?.folder ? { folder: options.folder } : void 0
|
|
6037
|
-
)
|
|
6034
|
+
() => uploadFile(this.getAuthHeaders(), fileData, fileName, options)
|
|
6038
6035
|
);
|
|
6039
6036
|
},
|
|
6040
6037
|
download: (docId) => this.recovering(() => downloadDocument(this.getAuthHeaders(), docId)),
|