@fabriktor/client 0.0.55 → 0.0.56

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.
@@ -14,6 +14,7 @@ export type UploadStorageOptions = {
14
14
  owner_id: string;
15
15
  uploader_id?: string;
16
16
  full_quality?: boolean;
17
+ public_url?: boolean;
17
18
  files: StorageUploadFile[];
18
19
  };
19
20
  export type DownloadStorageOptions = CompletePayload<PLStorageDownload>;
@@ -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
- [queryOwnerID]: opts.owner_id,
184
- [queryUploaderID]: opts.uploader_id,
185
- [queryFullQuality]: opts.full_quality,
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.55",
3
+ "version": "0.0.56",
4
4
  "description": "![Fabriktor Logo](./img/fabriktor-character.gif)",
5
5
  "type": "module",
6
6
  "exports": {