@zernio/node 0.2.536 → 0.2.537

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/index.d.mts CHANGED
@@ -10466,6 +10466,10 @@ type GetMediaPresignedUrlData = {
10466
10466
  * Optional file size in bytes for pre-validation (max 5GB)
10467
10467
  */
10468
10468
  size?: number;
10469
+ /**
10470
+ * Write the file to permanent storage instead of temporary storage. Temporary files auto-delete 7 days after upload; permanent files never expire.
10471
+ */
10472
+ permanent?: boolean;
10469
10473
  };
10470
10474
  };
10471
10475
  type GetMediaPresignedUrlResponse = ({
@@ -10474,11 +10478,11 @@ type GetMediaPresignedUrlResponse = ({
10474
10478
  */
10475
10479
  uploadUrl?: string;
10476
10480
  /**
10477
- * Public URL where the file will be accessible after upload
10481
+ * Public URL where the file will be accessible after upload. Served from the temp/ prefix by default (expires 7 days after upload) or from media/ when permanent is true.
10478
10482
  */
10479
10483
  publicUrl?: string;
10480
10484
  /**
10481
- * Storage key/path of the file
10485
+ * Storage key/path of the file. Prefixed temp/ by default, media/ when permanent is true.
10482
10486
  */
10483
10487
  key?: string;
10484
10488
  /**
package/dist/index.d.ts CHANGED
@@ -10466,6 +10466,10 @@ type GetMediaPresignedUrlData = {
10466
10466
  * Optional file size in bytes for pre-validation (max 5GB)
10467
10467
  */
10468
10468
  size?: number;
10469
+ /**
10470
+ * Write the file to permanent storage instead of temporary storage. Temporary files auto-delete 7 days after upload; permanent files never expire.
10471
+ */
10472
+ permanent?: boolean;
10469
10473
  };
10470
10474
  };
10471
10475
  type GetMediaPresignedUrlResponse = ({
@@ -10474,11 +10478,11 @@ type GetMediaPresignedUrlResponse = ({
10474
10478
  */
10475
10479
  uploadUrl?: string;
10476
10480
  /**
10477
- * Public URL where the file will be accessible after upload
10481
+ * Public URL where the file will be accessible after upload. Served from the temp/ prefix by default (expires 7 days after upload) or from media/ when permanent is true.
10478
10482
  */
10479
10483
  publicUrl?: string;
10480
10484
  /**
10481
- * Storage key/path of the file
10485
+ * Storage key/path of the file. Prefixed temp/ by default, media/ when permanent is true.
10482
10486
  */
10483
10487
  key?: string;
10484
10488
  /**
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(index_exports);
36
36
  // package.json
37
37
  var package_default = {
38
38
  name: "@zernio/node",
39
- version: "0.2.536",
39
+ version: "0.2.537",
40
40
  description: "The official Node.js library for the Zernio API",
41
41
  main: "dist/index.js",
42
42
  module: "dist/index.mjs",
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5
5
  // package.json
6
6
  var package_default = {
7
7
  name: "@zernio/node",
8
- version: "0.2.536",
8
+ version: "0.2.537",
9
9
  description: "The official Node.js library for the Zernio API",
10
10
  main: "dist/index.js",
11
11
  module: "dist/index.mjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zernio/node",
3
- "version": "0.2.536",
3
+ "version": "0.2.537",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -605,7 +605,15 @@ export const deleteAccountGroup = <ThrowOnError extends boolean = false>(options
605
605
 
606
606
  /**
607
607
  * Get upload URL
608
- * Get a presigned URL to upload files directly to cloud storage (up to 5GB). Returns an uploadUrl and publicUrl. PUT your file to the uploadUrl, then use the publicUrl in your posts.
608
+ * Get a presigned URL to upload files directly to cloud storage (up to 5GB). Returns an
609
+ * uploadUrl and publicUrl. PUT your file to the uploadUrl, then use the publicUrl in your posts.
610
+ *
611
+ * By default the file is written to temporary storage and auto-deletes 7 days after upload,
612
+ * so the publicUrl stops resolving once that window passes. Send `permanent: true` to write
613
+ * straight to permanent storage, which has no expiry: use it for anything that must stay
614
+ * reachable for longer, in particular cover and thumbnail images on posts scheduled more
615
+ * than a week out.
616
+ *
609
617
  */
610
618
  export const getMediaPresignedUrl = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetMediaPresignedUrlData, ThrowOnError>) => {
611
619
  return (options?.client ?? client).post<GetMediaPresignedUrlResponse, GetMediaPresignedUrlError, ThrowOnError>({
@@ -9642,6 +9642,10 @@ export type GetMediaPresignedUrlData = {
9642
9642
  * Optional file size in bytes for pre-validation (max 5GB)
9643
9643
  */
9644
9644
  size?: number;
9645
+ /**
9646
+ * Write the file to permanent storage instead of temporary storage. Temporary files auto-delete 7 days after upload; permanent files never expire.
9647
+ */
9648
+ permanent?: boolean;
9645
9649
  };
9646
9650
  };
9647
9651
 
@@ -9651,11 +9655,11 @@ export type GetMediaPresignedUrlResponse = ({
9651
9655
  */
9652
9656
  uploadUrl?: string;
9653
9657
  /**
9654
- * Public URL where the file will be accessible after upload
9658
+ * Public URL where the file will be accessible after upload. Served from the temp/ prefix by default (expires 7 days after upload) or from media/ when permanent is true.
9655
9659
  */
9656
9660
  publicUrl?: string;
9657
9661
  /**
9658
- * Storage key/path of the file
9662
+ * Storage key/path of the file. Prefixed temp/ by default, media/ when permanent is true.
9659
9663
  */
9660
9664
  key?: string;
9661
9665
  /**