pinata 2.2.0 → 2.2.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
@@ -5,6 +5,7 @@ type PinataConfig = {
5
5
  customHeaders?: Record<string, string>;
6
6
  endpointUrl?: string;
7
7
  uploadUrl?: string;
8
+ legacyUploadUrl?: string;
8
9
  };
9
10
 
10
11
  type AnalyticsQuery = {
@@ -125,7 +126,7 @@ type PinQueueItem = {
125
126
  };
126
127
  };
127
128
  type PinQueueResponse = {
128
- rows: PinQueueItem[];
129
+ jobs: PinQueueItem[];
129
130
  next_page_token: string;
130
131
  };
131
132
  type SwapCidOptions = {
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ type PinataConfig = {
5
5
  customHeaders?: Record<string, string>;
6
6
  endpointUrl?: string;
7
7
  uploadUrl?: string;
8
+ legacyUploadUrl?: string;
8
9
  };
9
10
 
10
11
  type AnalyticsQuery = {
@@ -125,7 +126,7 @@ type PinQueueItem = {
125
126
  };
126
127
  };
127
128
  type PinQueueResponse = {
128
- rows: PinQueueItem[];
129
+ jobs: PinQueueItem[];
129
130
  next_page_token: string;
130
131
  };
131
132
  type SwapCidOptions = {
package/dist/index.js CHANGED
@@ -3017,8 +3017,8 @@ var uploadFileArray = async (config, files, network, options) => {
3017
3017
  };
3018
3018
  }
3019
3019
  let endpoint = "https://api.pinata.cloud/pinning/pinFileToIPFS";
3020
- if (config.uploadUrl) {
3021
- endpoint = config.uploadUrl;
3020
+ if (config.legacyUploadUrl) {
3021
+ endpoint = config.legacyUploadUrl;
3022
3022
  }
3023
3023
  try {
3024
3024
  const request = await fetch(`${endpoint}`, {
@@ -4242,7 +4242,7 @@ var FilterQueue = class {
4242
4242
  async *[Symbol.asyncIterator]() {
4243
4243
  while (true) {
4244
4244
  const items = await this.fetchPage();
4245
- for (const item of items.rows) {
4245
+ for (const item of items.jobs) {
4246
4246
  yield item;
4247
4247
  }
4248
4248
  if (!this.currentPageToken) {