@thatopen/services 0.34.2 → 0.34.3
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/cli.js +12 -10
- package/dist/cli.js.map +1 -1
- package/dist/core/client.d.ts +5 -0
- package/dist/core/platform-client.d.ts +8 -0
- package/dist/index.cjs.js +5 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +1870 -1858
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -7283,10 +7283,8 @@ class FlowDoc {
|
|
|
7283
7283
|
this.#filesAt = Date.now();
|
|
7284
7284
|
this.#filesListed = (async () => {
|
|
7285
7285
|
const folderId = await this.#folder(false);
|
|
7286
|
-
|
|
7287
|
-
|
|
7288
|
-
return String(where.folderId ?? where.parentFolderId ?? "") === folderId;
|
|
7289
|
-
});
|
|
7286
|
+
if (!folderId) return [];
|
|
7287
|
+
const items2 = await this.client.listFiles({ folderId, versions: true });
|
|
7290
7288
|
return items2.map((item) => ({
|
|
7291
7289
|
id: idOf$2(item),
|
|
7292
7290
|
name: String(item.name ?? ""),
|
|
@@ -7844,10 +7842,8 @@ class ProjectDocuments {
|
|
|
7844
7842
|
return void 0;
|
|
7845
7843
|
}
|
|
7846
7844
|
async #descriptorFile(folderId) {
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
return String(where.folderId ?? where.parentFolderId ?? "") === folderId;
|
|
7850
|
-
});
|
|
7845
|
+
if (!folderId) return void 0;
|
|
7846
|
+
const items2 = await this.client.listFiles({ folderId, versions: true });
|
|
7851
7847
|
const found = items2.find(
|
|
7852
7848
|
(item) => String(item.name ?? "") === DOCUMENT_FILE
|
|
7853
7849
|
);
|
|
@@ -9138,12 +9134,18 @@ class EngineServicesClient {
|
|
|
9138
9134
|
* @returns Array of file items.
|
|
9139
9135
|
*/
|
|
9140
9136
|
async listFiles(filters) {
|
|
9141
|
-
const { folderId, archived, projectId } = filters || {};
|
|
9137
|
+
const { folderId, archived, projectId, versions } = filters || {};
|
|
9142
9138
|
if (folderId) {
|
|
9143
9139
|
return await this.#requestApi(
|
|
9144
9140
|
"GET",
|
|
9145
9141
|
`${FOLDER_PATH}/${folderId}/items`,
|
|
9146
|
-
{
|
|
9142
|
+
{
|
|
9143
|
+
query: {
|
|
9144
|
+
itemType: ITEM_TYPE_FILE,
|
|
9145
|
+
archived,
|
|
9146
|
+
...versions && { showVersions: true }
|
|
9147
|
+
}
|
|
9148
|
+
}
|
|
9147
9149
|
);
|
|
9148
9150
|
}
|
|
9149
9151
|
return await this.#requestApi("GET", `${ITEM_PATH}`, {
|