@fabriktor/client 0.0.55 → 0.0.57
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.
|
@@ -5,14 +5,11 @@
|
|
|
5
5
|
// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
6
|
import { ColStorageCalls, ColStorageChat, ColStorageContacts, ColStorageJobs, ColStorageLocations, ColStorageMemos, ColStorageQR, ColStorageReports, ColStorageTickets, ColStorageUsers, ColStorageFeed, HTTPMethodPost, PathStorageDownload, PathStorageUpload, SvcStorage, } from "@fabriktor/schema";
|
|
7
7
|
import { requiredToken } from "../core/auth.js";
|
|
8
|
-
import { withQuery } from "../core/col.js";
|
|
8
|
+
import { queryParams, withQuery } from "../core/col.js";
|
|
9
9
|
import { newCRUDClient } from "../core/crud.js";
|
|
10
10
|
import { errInvalidArgument } from "../core/err.js";
|
|
11
11
|
import { newMultipartClient } from "../core/multipart.js";
|
|
12
12
|
import { buildPath } from "../core/path.js";
|
|
13
|
-
const queryOwnerID = "owner_id";
|
|
14
|
-
const queryUploaderID = "uploader_id";
|
|
15
|
-
const queryFullQuality = "full_quality";
|
|
16
13
|
const fileFieldName = "file";
|
|
17
14
|
const msgUploadRequiresFile = "Upload requires at least one file.";
|
|
18
15
|
export const storageCollections = [
|
|
@@ -179,11 +176,12 @@ export function newStorageClient(opts) {
|
|
|
179
176
|
}
|
|
180
177
|
function uploadPath(col, opts) {
|
|
181
178
|
return withQuery(storagePath(col, PathStorageUpload), {
|
|
182
|
-
query: {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
179
|
+
query: queryParams({
|
|
180
|
+
owner_id: opts.owner_id,
|
|
181
|
+
uploader_id: opts.uploader_id,
|
|
182
|
+
full_quality: opts.full_quality,
|
|
183
|
+
public_url: opts.public_url,
|
|
184
|
+
}),
|
|
187
185
|
});
|
|
188
186
|
}
|
|
189
187
|
function storagePath(col, action) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fabriktor/client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.57",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -17,6 +17,6 @@
|
|
|
17
17
|
"typescript": "^6.0.3"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@fabriktor/schema": "0.0.
|
|
20
|
+
"@fabriktor/schema": "0.0.38"
|
|
21
21
|
}
|
|
22
22
|
}
|