@pinata/sdk 1.1.20 → 1.1.24

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.
Files changed (40) hide show
  1. package/README.md +3 -3
  2. package/lib/pinata-sdk.js +358 -1
  3. package/lib/pinata-sdk.min.js +1 -1
  4. package/package.json +5 -2
  5. package/src/commands/data/pinList/pinList.js +7 -0
  6. package/src/commands/data/pinList/queryBuilder.js +11 -0
  7. package/src/commands/data/testAuthentication.js +6 -0
  8. package/src/commands/data/userPinnedDataTotal.js +6 -0
  9. package/src/commands/pinning/hashMetadata.js +8 -0
  10. package/src/commands/pinning/hashPinPolicy.js +8 -0
  11. package/src/commands/pinning/pinByHash.js +8 -0
  12. package/src/commands/pinning/pinFileToIPFS.js +11 -3
  13. package/src/commands/pinning/pinFromFS.js +8 -0
  14. package/src/commands/pinning/pinJSONToIPFS.js +8 -0
  15. package/src/commands/pinning/pinJobs/pinJobs.js +7 -0
  16. package/src/commands/pinning/pinJobs/queryBuilder.js +6 -0
  17. package/src/commands/pinning/unpin.js +7 -0
  18. package/src/commands/pinning/userPinPolicy.js +7 -0
  19. package/src/index.js +227 -0
  20. package/src/util/validators.js +21 -0
  21. package/test/commands/pinning/pinFileToIPFS.test.js +16 -3
  22. package/tsconfig.json +23 -0
  23. package/types/commands/data/pinList/pinList.d.ts +8 -0
  24. package/types/commands/data/pinList/queryBuilder.d.ts +7 -0
  25. package/types/commands/data/testAuthentication.d.ts +7 -0
  26. package/types/commands/data/userPinnedDataTotal.d.ts +7 -0
  27. package/types/commands/pinning/hashMetadata.d.ts +9 -0
  28. package/types/commands/pinning/hashPinPolicy.d.ts +9 -0
  29. package/types/commands/pinning/pinByHash.d.ts +9 -0
  30. package/types/commands/pinning/pinFileToIPFS.d.ts +9 -0
  31. package/types/commands/pinning/pinFromFS.d.ts +9 -0
  32. package/types/commands/pinning/pinJSONToIPFS.d.ts +9 -0
  33. package/types/commands/pinning/pinJobs/pinJobs.d.ts +8 -0
  34. package/types/commands/pinning/pinJobs/queryBuilder.d.ts +7 -0
  35. package/types/commands/pinning/unpin.d.ts +8 -0
  36. package/types/commands/pinning/userPinPolicy.d.ts +8 -0
  37. package/types/constants.d.ts +1 -0
  38. package/types/index.d.ts +362 -0
  39. package/types/util/errorResponse.d.ts +1 -0
  40. package/types/util/validators.d.ts +26 -0
package/README.md CHANGED
@@ -153,7 +153,7 @@ Adds a hash to Pinata's pin queue to be pinned asynchronously. For the synchrono
153
153
  * `pinataMetadata` (optional): A JSON object with [optional metadata](#metadata-anchor) for the hash being pinned
154
154
  * `pinataOptions`
155
155
  * `hostNodes` (optional): An array of [multiaddresses for nodes](#hostNode-anchor) that are currently hosting the content to be pinned
156
- * `newPinPolicy` A JSON object with a new [Pin Policy](#pinPolicies-anchor) for the hash.
156
+ * `customPinPolicy` A JSON object with a new [Pin Policy](#pinPolicies-anchor) for the hash.
157
157
  #### Response
158
158
  ```
159
159
  {
@@ -203,7 +203,7 @@ pinata.pinByHash('yourHashHere', options).then((result) => {
203
203
 
204
204
  <a name="pinFileToIPFS-anchor"></a>
205
205
  ### `pinFileToIPFS`
206
- Send a file to to Pinata for direct pinning to IPFS.
206
+ Send a file to Pinata for direct pinning to IPFS.
207
207
 
208
208
  ##### `pinata.pinFileToIPFS(readableStream, options)`
209
209
  ##### Params
@@ -352,7 +352,7 @@ pinata.pinJobs('yourHashHere', filters).then((result) => {
352
352
 
353
353
  <a name="pinJSONToIPFS-anchor"></a>
354
354
  ### `pinJSONToIPFS`
355
- Send JSON to to Pinata for direct pinning to IPFS.
355
+ Send JSON to Pinata for direct pinning to IPFS.
356
356
 
357
357
  ##### `pinata.pinJSONToIPFS(body, options)`
358
358
  ##### Params