pinata 2.1.0 → 2.1.2

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
@@ -102,7 +102,7 @@ type FileListQuery = {
102
102
  };
103
103
  type PinQueueQuery = {
104
104
  sort?: "ASC" | "DSC";
105
- status?: "prechecking" | "retrieving" | "expired" | "over_free_limit" | "over_max_size" | "invalid_object" | "bad_host_node";
105
+ status?: "prechecking" | "retrieving" | "expired" | "backfilled" | "over_free_limit" | "over_max_size" | "invalid_object" | "bad_host_node";
106
106
  cid?: string;
107
107
  limit?: number;
108
108
  pageToken?: string;
@@ -641,7 +641,7 @@ declare class FilterQueue {
641
641
  private readonly MINUTE_IN_MS;
642
642
  constructor(config: PinataConfig | undefined);
643
643
  cid(cid: string): FilterQueue;
644
- status(status: "prechecking" | "retrieving" | "expired" | "over_free_limit" | "over_max_size" | "invalid_object" | "bad_host_node"): FilterQueue;
644
+ status(status: "prechecking" | "retrieving" | "expired" | "backfilled" | "over_free_limit" | "over_max_size" | "invalid_object" | "bad_host_node"): FilterQueue;
645
645
  pageLimit(limit: number): FilterQueue;
646
646
  pageToken(pageToken: string): FilterQueue;
647
647
  private fetchPage;
@@ -714,8 +714,8 @@ declare class PublicUpload {
714
714
  config: PinataConfig | undefined;
715
715
  constructor(config?: PinataConfig);
716
716
  updateConfig(newConfig: PinataConfig): void;
717
- file(file: FileObject, options?: UploadOptions): UploadBuilder<UploadResponse>;
718
- fileArray(files: FileObject[], options?: UploadOptions): UploadBuilder<UploadResponse>;
717
+ file(file: File, options?: UploadOptions): UploadBuilder<UploadResponse>;
718
+ fileArray(files: File[], options?: UploadOptions): UploadBuilder<UploadResponse>;
719
719
  base64(base64String: string, options?: UploadOptions): UploadBuilder<UploadResponse>;
720
720
  url(url: string, options?: UploadOptions): UploadBuilder<UploadResponse>;
721
721
  json(data: object, options?: UploadOptions): UploadBuilder<UploadResponse>;
package/dist/index.d.ts CHANGED
@@ -102,7 +102,7 @@ type FileListQuery = {
102
102
  };
103
103
  type PinQueueQuery = {
104
104
  sort?: "ASC" | "DSC";
105
- status?: "prechecking" | "retrieving" | "expired" | "over_free_limit" | "over_max_size" | "invalid_object" | "bad_host_node";
105
+ status?: "prechecking" | "retrieving" | "expired" | "backfilled" | "over_free_limit" | "over_max_size" | "invalid_object" | "bad_host_node";
106
106
  cid?: string;
107
107
  limit?: number;
108
108
  pageToken?: string;
@@ -641,7 +641,7 @@ declare class FilterQueue {
641
641
  private readonly MINUTE_IN_MS;
642
642
  constructor(config: PinataConfig | undefined);
643
643
  cid(cid: string): FilterQueue;
644
- status(status: "prechecking" | "retrieving" | "expired" | "over_free_limit" | "over_max_size" | "invalid_object" | "bad_host_node"): FilterQueue;
644
+ status(status: "prechecking" | "retrieving" | "expired" | "backfilled" | "over_free_limit" | "over_max_size" | "invalid_object" | "bad_host_node"): FilterQueue;
645
645
  pageLimit(limit: number): FilterQueue;
646
646
  pageToken(pageToken: string): FilterQueue;
647
647
  private fetchPage;
@@ -714,8 +714,8 @@ declare class PublicUpload {
714
714
  config: PinataConfig | undefined;
715
715
  constructor(config?: PinataConfig);
716
716
  updateConfig(newConfig: PinataConfig): void;
717
- file(file: FileObject, options?: UploadOptions): UploadBuilder<UploadResponse>;
718
- fileArray(files: FileObject[], options?: UploadOptions): UploadBuilder<UploadResponse>;
717
+ file(file: File, options?: UploadOptions): UploadBuilder<UploadResponse>;
718
+ fileArray(files: File[], options?: UploadOptions): UploadBuilder<UploadResponse>;
719
719
  base64(base64String: string, options?: UploadOptions): UploadBuilder<UploadResponse>;
720
720
  url(url: string, options?: UploadOptions): UploadBuilder<UploadResponse>;
721
721
  json(data: object, options?: UploadOptions): UploadBuilder<UploadResponse>;
package/dist/index.js CHANGED
@@ -1213,7 +1213,7 @@ var vectorizeQuery = async (config, options) => {
1213
1213
  throw new PinataError(`No files returned in query to fetch`);
1214
1214
  }
1215
1215
  const cid = resData.matches[0].cid;
1216
- const fileRes = await getCid(config, cid, void 0);
1216
+ const fileRes = await getCid(config, cid, "files");
1217
1217
  return fileRes;
1218
1218
  }
1219
1219
  return resData;