@lumeweb/pinner 0.1.1 → 0.1.3

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 (163) hide show
  1. package/README.md +162 -0
  2. package/dist/esm/_virtual/{rolldown_runtime.js → _rolldown/runtime.js} +2 -2
  3. package/dist/esm/adapters/pinata/index.d.ts +1 -4
  4. package/dist/esm/adapters/pinata/legacy/adapter.d.ts +0 -1
  5. package/dist/esm/adapters/pinata/legacy/adapter.js +42 -1
  6. package/dist/esm/adapters/pinata/legacy/adapter.js.map +1 -1
  7. package/dist/esm/adapters/pinata/shared/index.d.ts +1 -2
  8. package/dist/esm/adapters/pinata/v2/adapter-interface.d.ts +0 -1
  9. package/dist/esm/adapters/pinata/v2/adapter.d.ts +0 -1
  10. package/dist/esm/adapters/pinata/v2/adapter.js +3 -3
  11. package/dist/esm/adapters/pinata/v2/adapter.js.map +1 -1
  12. package/dist/esm/api/generated/schemas/iPNSKeyListResponse.d.ts +46 -0
  13. package/dist/esm/api/generated/schemas/iPNSKeyListResponseResponse.d.ts +10 -0
  14. package/dist/esm/api/generated/schemas/iPNSKeyRequest.d.ts +43 -0
  15. package/dist/esm/api/generated/schemas/iPNSKeyResponse.d.ts +46 -0
  16. package/dist/esm/api/generated/schemas/iPNSPublishRequest.d.ts +44 -0
  17. package/dist/esm/api/generated/schemas/iPNSPublishResponse.d.ts +46 -0
  18. package/dist/esm/api/generated/schemas/iPNSResolveResponse.d.ts +47 -0
  19. package/dist/esm/api/generated/schemas/sSLStatusInfo.d.ts +45 -0
  20. package/dist/esm/api/generated/schemas/websiteConfigResponse.d.ts +43 -0
  21. package/dist/esm/api/generated/schemas/websiteItem.d.ts +23 -0
  22. package/dist/esm/api/generated/schemas/websiteItemResponse.d.ts +10 -0
  23. package/dist/esm/api/generated/schemas/websiteRequest.d.ts +45 -0
  24. package/dist/esm/api/generated/schemas/websiteResponse.d.ts +23 -0
  25. package/dist/esm/api/generated/schemas/websiteUpdateRequest.d.ts +45 -0
  26. package/dist/esm/api/generated/schemas/websiteValidateResponse.d.ts +45 -0
  27. package/dist/esm/api/ipns.d.ts +28 -0
  28. package/dist/esm/api/ipns.js +83 -0
  29. package/dist/esm/api/ipns.js.map +1 -0
  30. package/dist/esm/api/websites.d.ts +48 -0
  31. package/dist/esm/api/websites.js +168 -0
  32. package/dist/esm/api/websites.js.map +1 -0
  33. package/dist/esm/blockstore/unstorage-base.d.ts +4 -1
  34. package/dist/esm/blockstore/unstorage-base.js +3 -3
  35. package/dist/esm/blockstore/unstorage-base.js.map +1 -1
  36. package/dist/esm/blockstore/unstorage.d.ts +3 -31
  37. package/dist/esm/blockstore/unstorage.js +2 -2
  38. package/dist/esm/blockstore/unstorage.js.map +1 -1
  39. package/dist/esm/encoder/base64.js.map +1 -1
  40. package/dist/esm/encoder/csv/row-formatter.js.map +1 -1
  41. package/dist/esm/encoder/csv.js.map +1 -1
  42. package/dist/esm/encoder/json.js.map +1 -1
  43. package/dist/esm/encoder/text.js.map +1 -1
  44. package/dist/esm/encoder/url.js.map +1 -1
  45. package/dist/esm/index.d.ts +3 -3
  46. package/dist/esm/index.js +3 -1
  47. package/dist/esm/pin/client.js +3 -2
  48. package/dist/esm/pin/client.js.map +1 -1
  49. package/dist/esm/pinner.d.ts +12 -0
  50. package/dist/esm/pinner.js +18 -0
  51. package/dist/esm/pinner.js.map +1 -1
  52. package/dist/esm/types/pin.d.ts +0 -1
  53. package/dist/esm/types/type-guards.d.ts +0 -1
  54. package/dist/esm/types/upload.d.ts +0 -1
  55. package/dist/esm/upload/base-upload.js +3 -3
  56. package/dist/esm/upload/base-upload.js.map +1 -1
  57. package/dist/esm/upload/builder.d.ts +0 -1
  58. package/dist/esm/upload/car.js +3 -3
  59. package/dist/esm/upload/car.js.map +1 -1
  60. package/dist/esm/upload/manager.js +5 -5
  61. package/dist/esm/upload/manager.js.map +1 -1
  62. package/dist/esm/upload/normalize.js +1 -1
  63. package/dist/esm/upload/normalize.js.map +1 -1
  64. package/dist/esm/utils/stream.d.ts +0 -3
  65. package/dist/esm/utils/tus-patch.js +2 -2
  66. package/dist/esm/utils/tus-patch.js.map +1 -1
  67. package/dist/esm/utils/validation.js.map +1 -1
  68. package/package.json +33 -32
  69. package/dist/cjs/_virtual/rolldown_runtime.cjs +0 -29
  70. package/dist/cjs/adapters/pinata/index.cjs +0 -6
  71. package/dist/cjs/adapters/pinata/legacy/adapter.cjs +0 -83
  72. package/dist/cjs/adapters/pinata/legacy/adapter.cjs.map +0 -1
  73. package/dist/cjs/adapters/pinata/legacy/adapter.d.cts +0 -74
  74. package/dist/cjs/adapters/pinata/legacy/index.cjs +0 -1
  75. package/dist/cjs/adapters/pinata/shared/index.cjs +0 -1
  76. package/dist/cjs/adapters/pinata/shared/types.d.cts +0 -218
  77. package/dist/cjs/adapters/pinata/shared/utils.cjs +0 -83
  78. package/dist/cjs/adapters/pinata/shared/utils.cjs.map +0 -1
  79. package/dist/cjs/adapters/pinata/v2/adapter-interface.d.cts +0 -198
  80. package/dist/cjs/adapters/pinata/v2/adapter.cjs +0 -636
  81. package/dist/cjs/adapters/pinata/v2/adapter.cjs.map +0 -1
  82. package/dist/cjs/adapters/pinata/v2/adapter.d.cts +0 -17
  83. package/dist/cjs/adapters/pinata/v2/index.cjs +0 -1
  84. package/dist/cjs/adapters/pinata/v2/types.d.cts +0 -308
  85. package/dist/cjs/blockstore/index.cjs +0 -2
  86. package/dist/cjs/blockstore/unstorage-base.cjs +0 -240
  87. package/dist/cjs/blockstore/unstorage-base.cjs.map +0 -1
  88. package/dist/cjs/blockstore/unstorage-base.d.cts +0 -23
  89. package/dist/cjs/blockstore/unstorage.cjs +0 -39
  90. package/dist/cjs/blockstore/unstorage.cjs.map +0 -1
  91. package/dist/cjs/blockstore/unstorage.d.cts +0 -36
  92. package/dist/cjs/config.d.cts +0 -51
  93. package/dist/cjs/encoder/base64.cjs +0 -38
  94. package/dist/cjs/encoder/base64.cjs.map +0 -1
  95. package/dist/cjs/encoder/csv/csv-formatter.cjs +0 -81
  96. package/dist/cjs/encoder/csv/csv-formatter.cjs.map +0 -1
  97. package/dist/cjs/encoder/csv/field-formatter.cjs +0 -76
  98. package/dist/cjs/encoder/csv/field-formatter.cjs.map +0 -1
  99. package/dist/cjs/encoder/csv/row-formatter.cjs +0 -159
  100. package/dist/cjs/encoder/csv/row-formatter.cjs.map +0 -1
  101. package/dist/cjs/encoder/csv.cjs +0 -44
  102. package/dist/cjs/encoder/csv.cjs.map +0 -1
  103. package/dist/cjs/encoder/error.cjs +0 -19
  104. package/dist/cjs/encoder/error.cjs.map +0 -1
  105. package/dist/cjs/encoder/index.cjs +0 -6
  106. package/dist/cjs/encoder/json.cjs +0 -36
  107. package/dist/cjs/encoder/json.cjs.map +0 -1
  108. package/dist/cjs/encoder/text.cjs +0 -35
  109. package/dist/cjs/encoder/text.cjs.map +0 -1
  110. package/dist/cjs/encoder/url.cjs +0 -39
  111. package/dist/cjs/encoder/url.cjs.map +0 -1
  112. package/dist/cjs/errors/index.cjs +0 -104
  113. package/dist/cjs/errors/index.cjs.map +0 -1
  114. package/dist/cjs/errors/index.d.cts +0 -47
  115. package/dist/cjs/index.cjs +0 -44
  116. package/dist/cjs/index.d.cts +0 -16
  117. package/dist/cjs/pin/client.cjs +0 -98
  118. package/dist/cjs/pin/client.cjs.map +0 -1
  119. package/dist/cjs/pin/index.cjs +0 -1
  120. package/dist/cjs/pinner.cjs +0 -132
  121. package/dist/cjs/pinner.cjs.map +0 -1
  122. package/dist/cjs/pinner.d.cts +0 -81
  123. package/dist/cjs/types/constants.cjs +0 -39
  124. package/dist/cjs/types/constants.cjs.map +0 -1
  125. package/dist/cjs/types/mime-types.cjs +0 -11
  126. package/dist/cjs/types/mime-types.cjs.map +0 -1
  127. package/dist/cjs/types/mime-types.d.cts +0 -7
  128. package/dist/cjs/types/pin.d.cts +0 -78
  129. package/dist/cjs/types/type-guards.cjs +0 -20
  130. package/dist/cjs/types/type-guards.cjs.map +0 -1
  131. package/dist/cjs/types/type-guards.d.cts +0 -15
  132. package/dist/cjs/types/upload.cjs +0 -18
  133. package/dist/cjs/types/upload.cjs.map +0 -1
  134. package/dist/cjs/types/upload.d.cts +0 -189
  135. package/dist/cjs/upload/base-upload.cjs +0 -135
  136. package/dist/cjs/upload/base-upload.cjs.map +0 -1
  137. package/dist/cjs/upload/builder.cjs +0 -174
  138. package/dist/cjs/upload/builder.cjs.map +0 -1
  139. package/dist/cjs/upload/builder.d.cts +0 -60
  140. package/dist/cjs/upload/car.cjs +0 -129
  141. package/dist/cjs/upload/car.cjs.map +0 -1
  142. package/dist/cjs/upload/car.d.cts +0 -19
  143. package/dist/cjs/upload/constants.cjs +0 -9
  144. package/dist/cjs/upload/constants.cjs.map +0 -1
  145. package/dist/cjs/upload/index.cjs +0 -8
  146. package/dist/cjs/upload/manager.cjs +0 -249
  147. package/dist/cjs/upload/manager.cjs.map +0 -1
  148. package/dist/cjs/upload/manager.d.cts +0 -35
  149. package/dist/cjs/upload/normalize.cjs +0 -28
  150. package/dist/cjs/upload/normalize.cjs.map +0 -1
  151. package/dist/cjs/upload/tus-upload.cjs +0 -74
  152. package/dist/cjs/upload/tus-upload.cjs.map +0 -1
  153. package/dist/cjs/upload/xhr-upload.cjs +0 -41
  154. package/dist/cjs/upload/xhr-upload.cjs.map +0 -1
  155. package/dist/cjs/utils/env.cjs +0 -12
  156. package/dist/cjs/utils/env.cjs.map +0 -1
  157. package/dist/cjs/utils/stream.cjs +0 -141
  158. package/dist/cjs/utils/stream.cjs.map +0 -1
  159. package/dist/cjs/utils/stream.d.cts +0 -23
  160. package/dist/cjs/utils/tus-patch.cjs +0 -50
  161. package/dist/cjs/utils/tus-patch.cjs.map +0 -1
  162. package/dist/cjs/utils/validation.cjs +0 -62
  163. package/dist/cjs/utils/validation.cjs.map +0 -1
@@ -0,0 +1,43 @@
1
+ //#region src/api/generated/schemas/iPNSKeyRequest.d.ts
2
+ /**
3
+ * Generated by orval v8.10.0 🍺
4
+ * Do not edit manually.
5
+ * Portal IPFS Plugin API
6
+ *
7
+ ## Portal IPFS Plugin API
8
+
9
+ A comprehensive API for IPFS content management, including pinning services, file operations, IPNS key management, and website hosting.
10
+
11
+ ### IPFS Pinning Service API Compatibility
12
+
13
+ This API is fully compatible with the [IPFS Pinning Service API specification](https://github.com/ipfs/pinning-services-api-spec), an implementation-agnostic API standard for pinning service providers. This ensures interoperability with existing IPFS pinning clients and tools.
14
+
15
+ ### Features
16
+
17
+ - **Pinning**: Add, list, update, and remove pinned content
18
+ - **Content**: Upload files, retrieve IPFS content, and manage metadata
19
+ - **IPNS**: Manage IPNS keys and publish content
20
+ - **Files**: Browse and manage pinned files with directory navigation
21
+ - **Websites**: Create and manage website hosting with DNS and SSL automation
22
+
23
+ ### Authentication
24
+
25
+ All API endpoints require authentication using JWT tokens obtained from the Portal authentication service.
26
+
27
+ ### Rate Limiting
28
+
29
+ API requests are rate-limited based on user account tier. See Portal documentation for current limits.
30
+
31
+ ### Documentation
32
+
33
+ For detailed API usage examples and integration guides, visit the Portal documentation website.
34
+
35
+ * OpenAPI spec version: 1.0.0
36
+ */
37
+ interface IPNSKeyRequest {
38
+ key?: string;
39
+ name: string;
40
+ }
41
+ //#endregion
42
+ export { IPNSKeyRequest };
43
+ //# sourceMappingURL=iPNSKeyRequest.d.ts.map
@@ -0,0 +1,46 @@
1
+ //#region src/api/generated/schemas/iPNSKeyResponse.d.ts
2
+ /**
3
+ * Generated by orval v8.10.0 🍺
4
+ * Do not edit manually.
5
+ * Portal IPFS Plugin API
6
+ *
7
+ ## Portal IPFS Plugin API
8
+
9
+ A comprehensive API for IPFS content management, including pinning services, file operations, IPNS key management, and website hosting.
10
+
11
+ ### IPFS Pinning Service API Compatibility
12
+
13
+ This API is fully compatible with the [IPFS Pinning Service API specification](https://github.com/ipfs/pinning-services-api-spec), an implementation-agnostic API standard for pinning service providers. This ensures interoperability with existing IPFS pinning clients and tools.
14
+
15
+ ### Features
16
+
17
+ - **Pinning**: Add, list, update, and remove pinned content
18
+ - **Content**: Upload files, retrieve IPFS content, and manage metadata
19
+ - **IPNS**: Manage IPNS keys and publish content
20
+ - **Files**: Browse and manage pinned files with directory navigation
21
+ - **Websites**: Create and manage website hosting with DNS and SSL automation
22
+
23
+ ### Authentication
24
+
25
+ All API endpoints require authentication using JWT tokens obtained from the Portal authentication service.
26
+
27
+ ### Rate Limiting
28
+
29
+ API requests are rate-limited based on user account tier. See Portal documentation for current limits.
30
+
31
+ ### Documentation
32
+
33
+ For detailed API usage examples and integration guides, visit the Portal documentation website.
34
+
35
+ * OpenAPI spec version: 1.0.0
36
+ */
37
+ interface IPNSKeyResponse {
38
+ created: string;
39
+ id: number;
40
+ ipns_name: string;
41
+ name: string;
42
+ peer_id: string;
43
+ }
44
+ //#endregion
45
+ export { IPNSKeyResponse };
46
+ //# sourceMappingURL=iPNSKeyResponse.d.ts.map
@@ -0,0 +1,44 @@
1
+ //#region src/api/generated/schemas/iPNSPublishRequest.d.ts
2
+ /**
3
+ * Generated by orval v8.10.0 🍺
4
+ * Do not edit manually.
5
+ * Portal IPFS Plugin API
6
+ *
7
+ ## Portal IPFS Plugin API
8
+
9
+ A comprehensive API for IPFS content management, including pinning services, file operations, IPNS key management, and website hosting.
10
+
11
+ ### IPFS Pinning Service API Compatibility
12
+
13
+ This API is fully compatible with the [IPFS Pinning Service API specification](https://github.com/ipfs/pinning-services-api-spec), an implementation-agnostic API standard for pinning service providers. This ensures interoperability with existing IPFS pinning clients and tools.
14
+
15
+ ### Features
16
+
17
+ - **Pinning**: Add, list, update, and remove pinned content
18
+ - **Content**: Upload files, retrieve IPFS content, and manage metadata
19
+ - **IPNS**: Manage IPNS keys and publish content
20
+ - **Files**: Browse and manage pinned files with directory navigation
21
+ - **Websites**: Create and manage website hosting with DNS and SSL automation
22
+
23
+ ### Authentication
24
+
25
+ All API endpoints require authentication using JWT tokens obtained from the Portal authentication service.
26
+
27
+ ### Rate Limiting
28
+
29
+ API requests are rate-limited based on user account tier. See Portal documentation for current limits.
30
+
31
+ ### Documentation
32
+
33
+ For detailed API usage examples and integration guides, visit the Portal documentation website.
34
+
35
+ * OpenAPI spec version: 1.0.0
36
+ */
37
+ interface IPNSPublishRequest {
38
+ cid: string;
39
+ key_id: number;
40
+ ttl?: string;
41
+ }
42
+ //#endregion
43
+ export { IPNSPublishRequest };
44
+ //# sourceMappingURL=iPNSPublishRequest.d.ts.map
@@ -0,0 +1,46 @@
1
+ //#region src/api/generated/schemas/iPNSPublishResponse.d.ts
2
+ /**
3
+ * Generated by orval v8.10.0 🍺
4
+ * Do not edit manually.
5
+ * Portal IPFS Plugin API
6
+ *
7
+ ## Portal IPFS Plugin API
8
+
9
+ A comprehensive API for IPFS content management, including pinning services, file operations, IPNS key management, and website hosting.
10
+
11
+ ### IPFS Pinning Service API Compatibility
12
+
13
+ This API is fully compatible with the [IPFS Pinning Service API specification](https://github.com/ipfs/pinning-services-api-spec), an implementation-agnostic API standard for pinning service providers. This ensures interoperability with existing IPFS pinning clients and tools.
14
+
15
+ ### Features
16
+
17
+ - **Pinning**: Add, list, update, and remove pinned content
18
+ - **Content**: Upload files, retrieve IPFS content, and manage metadata
19
+ - **IPNS**: Manage IPNS keys and publish content
20
+ - **Files**: Browse and manage pinned files with directory navigation
21
+ - **Websites**: Create and manage website hosting with DNS and SSL automation
22
+
23
+ ### Authentication
24
+
25
+ All API endpoints require authentication using JWT tokens obtained from the Portal authentication service.
26
+
27
+ ### Rate Limiting
28
+
29
+ API requests are rate-limited based on user account tier. See Portal documentation for current limits.
30
+
31
+ ### Documentation
32
+
33
+ For detailed API usage examples and integration guides, visit the Portal documentation website.
34
+
35
+ * OpenAPI spec version: 1.0.0
36
+ */
37
+ interface IPNSPublishResponse {
38
+ name: string;
39
+ published: string;
40
+ sequence: number;
41
+ validity: string;
42
+ value: string;
43
+ }
44
+ //#endregion
45
+ export { IPNSPublishResponse };
46
+ //# sourceMappingURL=iPNSPublishResponse.d.ts.map
@@ -0,0 +1,47 @@
1
+ //#region src/api/generated/schemas/iPNSResolveResponse.d.ts
2
+ /**
3
+ * Generated by orval v8.10.0 🍺
4
+ * Do not edit manually.
5
+ * Portal IPFS Plugin API
6
+ *
7
+ ## Portal IPFS Plugin API
8
+
9
+ A comprehensive API for IPFS content management, including pinning services, file operations, IPNS key management, and website hosting.
10
+
11
+ ### IPFS Pinning Service API Compatibility
12
+
13
+ This API is fully compatible with the [IPFS Pinning Service API specification](https://github.com/ipfs/pinning-services-api-spec), an implementation-agnostic API standard for pinning service providers. This ensures interoperability with existing IPFS pinning clients and tools.
14
+
15
+ ### Features
16
+
17
+ - **Pinning**: Add, list, update, and remove pinned content
18
+ - **Content**: Upload files, retrieve IPFS content, and manage metadata
19
+ - **IPNS**: Manage IPNS keys and publish content
20
+ - **Files**: Browse and manage pinned files with directory navigation
21
+ - **Websites**: Create and manage website hosting with DNS and SSL automation
22
+
23
+ ### Authentication
24
+
25
+ All API endpoints require authentication using JWT tokens obtained from the Portal authentication service.
26
+
27
+ ### Rate Limiting
28
+
29
+ API requests are rate-limited based on user account tier. See Portal documentation for current limits.
30
+
31
+ ### Documentation
32
+
33
+ For detailed API usage examples and integration guides, visit the Portal documentation website.
34
+
35
+ * OpenAPI spec version: 1.0.0
36
+ */
37
+ interface IPNSResolveResponse {
38
+ expired: boolean;
39
+ expires: string;
40
+ name: string;
41
+ path: string;
42
+ sequence: number;
43
+ value: string;
44
+ }
45
+ //#endregion
46
+ export { IPNSResolveResponse };
47
+ //# sourceMappingURL=iPNSResolveResponse.d.ts.map
@@ -0,0 +1,45 @@
1
+ //#region src/api/generated/schemas/sSLStatusInfo.d.ts
2
+ /**
3
+ * Generated by orval v8.10.0 🍺
4
+ * Do not edit manually.
5
+ * Portal IPFS Plugin API
6
+ *
7
+ ## Portal IPFS Plugin API
8
+
9
+ A comprehensive API for IPFS content management, including pinning services, file operations, IPNS key management, and website hosting.
10
+
11
+ ### IPFS Pinning Service API Compatibility
12
+
13
+ This API is fully compatible with the [IPFS Pinning Service API specification](https://github.com/ipfs/pinning-services-api-spec), an implementation-agnostic API standard for pinning service providers. This ensures interoperability with existing IPFS pinning clients and tools.
14
+
15
+ ### Features
16
+
17
+ - **Pinning**: Add, list, update, and remove pinned content
18
+ - **Content**: Upload files, retrieve IPFS content, and manage metadata
19
+ - **IPNS**: Manage IPNS keys and publish content
20
+ - **Files**: Browse and manage pinned files with directory navigation
21
+ - **Websites**: Create and manage website hosting with DNS and SSL automation
22
+
23
+ ### Authentication
24
+
25
+ All API endpoints require authentication using JWT tokens obtained from the Portal authentication service.
26
+
27
+ ### Rate Limiting
28
+
29
+ API requests are rate-limited based on user account tier. See Portal documentation for current limits.
30
+
31
+ ### Documentation
32
+
33
+ For detailed API usage examples and integration guides, visit the Portal documentation website.
34
+
35
+ * OpenAPI spec version: 1.0.0
36
+ */
37
+ interface SSLStatusInfo {
38
+ error?: string;
39
+ issued_at?: string;
40
+ last_updated_at?: string;
41
+ status: string;
42
+ }
43
+ //#endregion
44
+ export { SSLStatusInfo };
45
+ //# sourceMappingURL=sSLStatusInfo.d.ts.map
@@ -0,0 +1,43 @@
1
+ //#region src/api/generated/schemas/websiteConfigResponse.d.ts
2
+ /**
3
+ * Generated by orval v8.10.0 🍺
4
+ * Do not edit manually.
5
+ * Portal IPFS Plugin API
6
+ *
7
+ ## Portal IPFS Plugin API
8
+
9
+ A comprehensive API for IPFS content management, including pinning services, file operations, IPNS key management, and website hosting.
10
+
11
+ ### IPFS Pinning Service API Compatibility
12
+
13
+ This API is fully compatible with the [IPFS Pinning Service API specification](https://github.com/ipfs/pinning-services-api-spec), an implementation-agnostic API standard for pinning service providers. This ensures interoperability with existing IPFS pinning clients and tools.
14
+
15
+ ### Features
16
+
17
+ - **Pinning**: Add, list, update, and remove pinned content
18
+ - **Content**: Upload files, retrieve IPFS content, and manage metadata
19
+ - **IPNS**: Manage IPNS keys and publish content
20
+ - **Files**: Browse and manage pinned files with directory navigation
21
+ - **Websites**: Create and manage website hosting with DNS and SSL automation
22
+
23
+ ### Authentication
24
+
25
+ All API endpoints require authentication using JWT tokens obtained from the Portal authentication service.
26
+
27
+ ### Rate Limiting
28
+
29
+ API requests are rate-limited based on user account tier. See Portal documentation for current limits.
30
+
31
+ ### Documentation
32
+
33
+ For detailed API usage examples and integration guides, visit the Portal documentation website.
34
+
35
+ * OpenAPI spec version: 1.0.0
36
+ */
37
+ interface WebsiteConfigResponse {
38
+ gateway_domain?: string;
39
+ nameservers?: string[];
40
+ }
41
+ //#endregion
42
+ export { WebsiteConfigResponse };
43
+ //# sourceMappingURL=websiteConfigResponse.d.ts.map
@@ -0,0 +1,23 @@
1
+ import { SSLStatusInfo } from "./sSLStatusInfo.js";
2
+
3
+ //#region src/api/generated/schemas/websiteItem.d.ts
4
+ interface WebsiteItem {
5
+ created: string;
6
+ dns_hosting_enabled: boolean;
7
+ dns_zone_id?: number;
8
+ domain: string;
9
+ expired: boolean;
10
+ gateway_domain?: string;
11
+ id: number;
12
+ last_checked_at?: string;
13
+ ssl?: SSLStatusInfo;
14
+ status: string;
15
+ target_hash: string;
16
+ target_type: string;
17
+ updated: string;
18
+ validation_expires_at?: string;
19
+ validation_token: string;
20
+ }
21
+ //#endregion
22
+ export { WebsiteItem };
23
+ //# sourceMappingURL=websiteItem.d.ts.map
@@ -0,0 +1,10 @@
1
+ import { WebsiteItem } from "./websiteItem.js";
2
+
3
+ //#region src/api/generated/schemas/websiteItemResponse.d.ts
4
+ interface WebsiteItemResponse {
5
+ data: WebsiteItem[];
6
+ total: number;
7
+ }
8
+ //#endregion
9
+ export { WebsiteItemResponse };
10
+ //# sourceMappingURL=websiteItemResponse.d.ts.map
@@ -0,0 +1,45 @@
1
+ //#region src/api/generated/schemas/websiteRequest.d.ts
2
+ /**
3
+ * Generated by orval v8.10.0 🍺
4
+ * Do not edit manually.
5
+ * Portal IPFS Plugin API
6
+ *
7
+ ## Portal IPFS Plugin API
8
+
9
+ A comprehensive API for IPFS content management, including pinning services, file operations, IPNS key management, and website hosting.
10
+
11
+ ### IPFS Pinning Service API Compatibility
12
+
13
+ This API is fully compatible with the [IPFS Pinning Service API specification](https://github.com/ipfs/pinning-services-api-spec), an implementation-agnostic API standard for pinning service providers. This ensures interoperability with existing IPFS pinning clients and tools.
14
+
15
+ ### Features
16
+
17
+ - **Pinning**: Add, list, update, and remove pinned content
18
+ - **Content**: Upload files, retrieve IPFS content, and manage metadata
19
+ - **IPNS**: Manage IPNS keys and publish content
20
+ - **Files**: Browse and manage pinned files with directory navigation
21
+ - **Websites**: Create and manage website hosting with DNS and SSL automation
22
+
23
+ ### Authentication
24
+
25
+ All API endpoints require authentication using JWT tokens obtained from the Portal authentication service.
26
+
27
+ ### Rate Limiting
28
+
29
+ API requests are rate-limited based on user account tier. See Portal documentation for current limits.
30
+
31
+ ### Documentation
32
+
33
+ For detailed API usage examples and integration guides, visit the Portal documentation website.
34
+
35
+ * OpenAPI spec version: 1.0.0
36
+ */
37
+ interface WebsiteRequest {
38
+ dns_hosting_enabled?: boolean;
39
+ domain: string;
40
+ target_hash: string;
41
+ target_type: string;
42
+ }
43
+ //#endregion
44
+ export { WebsiteRequest };
45
+ //# sourceMappingURL=websiteRequest.d.ts.map
@@ -0,0 +1,23 @@
1
+ import { SSLStatusInfo } from "./sSLStatusInfo.js";
2
+
3
+ //#region src/api/generated/schemas/websiteResponse.d.ts
4
+ interface WebsiteResponse {
5
+ created: string;
6
+ dns_hosting_enabled: boolean;
7
+ dns_zone_id?: number;
8
+ domain: string;
9
+ expired: boolean;
10
+ gateway_domain?: string;
11
+ id: number;
12
+ last_checked_at?: string;
13
+ ssl?: SSLStatusInfo;
14
+ status: string;
15
+ target_hash: string;
16
+ target_type: string;
17
+ updated: string;
18
+ validation_expires_at?: string;
19
+ validation_token: string;
20
+ }
21
+ //#endregion
22
+ export { WebsiteResponse };
23
+ //# sourceMappingURL=websiteResponse.d.ts.map
@@ -0,0 +1,45 @@
1
+ //#region src/api/generated/schemas/websiteUpdateRequest.d.ts
2
+ /**
3
+ * Generated by orval v8.10.0 🍺
4
+ * Do not edit manually.
5
+ * Portal IPFS Plugin API
6
+ *
7
+ ## Portal IPFS Plugin API
8
+
9
+ A comprehensive API for IPFS content management, including pinning services, file operations, IPNS key management, and website hosting.
10
+
11
+ ### IPFS Pinning Service API Compatibility
12
+
13
+ This API is fully compatible with the [IPFS Pinning Service API specification](https://github.com/ipfs/pinning-services-api-spec), an implementation-agnostic API standard for pinning service providers. This ensures interoperability with existing IPFS pinning clients and tools.
14
+
15
+ ### Features
16
+
17
+ - **Pinning**: Add, list, update, and remove pinned content
18
+ - **Content**: Upload files, retrieve IPFS content, and manage metadata
19
+ - **IPNS**: Manage IPNS keys and publish content
20
+ - **Files**: Browse and manage pinned files with directory navigation
21
+ - **Websites**: Create and manage website hosting with DNS and SSL automation
22
+
23
+ ### Authentication
24
+
25
+ All API endpoints require authentication using JWT tokens obtained from the Portal authentication service.
26
+
27
+ ### Rate Limiting
28
+
29
+ API requests are rate-limited based on user account tier. See Portal documentation for current limits.
30
+
31
+ ### Documentation
32
+
33
+ For detailed API usage examples and integration guides, visit the Portal documentation website.
34
+
35
+ * OpenAPI spec version: 1.0.0
36
+ */
37
+ interface WebsiteUpdateRequest {
38
+ dns_hosting_enabled?: boolean;
39
+ domain?: string;
40
+ target_hash?: string;
41
+ target_type?: string;
42
+ }
43
+ //#endregion
44
+ export { WebsiteUpdateRequest };
45
+ //# sourceMappingURL=websiteUpdateRequest.d.ts.map
@@ -0,0 +1,45 @@
1
+ //#region src/api/generated/schemas/websiteValidateResponse.d.ts
2
+ /**
3
+ * Generated by orval v8.10.0 🍺
4
+ * Do not edit manually.
5
+ * Portal IPFS Plugin API
6
+ *
7
+ ## Portal IPFS Plugin API
8
+
9
+ A comprehensive API for IPFS content management, including pinning services, file operations, IPNS key management, and website hosting.
10
+
11
+ ### IPFS Pinning Service API Compatibility
12
+
13
+ This API is fully compatible with the [IPFS Pinning Service API specification](https://github.com/ipfs/pinning-services-api-spec), an implementation-agnostic API standard for pinning service providers. This ensures interoperability with existing IPFS pinning clients and tools.
14
+
15
+ ### Features
16
+
17
+ - **Pinning**: Add, list, update, and remove pinned content
18
+ - **Content**: Upload files, retrieve IPFS content, and manage metadata
19
+ - **IPNS**: Manage IPNS keys and publish content
20
+ - **Files**: Browse and manage pinned files with directory navigation
21
+ - **Websites**: Create and manage website hosting with DNS and SSL automation
22
+
23
+ ### Authentication
24
+
25
+ All API endpoints require authentication using JWT tokens obtained from the Portal authentication service.
26
+
27
+ ### Rate Limiting
28
+
29
+ API requests are rate-limited based on user account tier. See Portal documentation for current limits.
30
+
31
+ ### Documentation
32
+
33
+ For detailed API usage examples and integration guides, visit the Portal documentation website.
34
+
35
+ * OpenAPI spec version: 1.0.0
36
+ */
37
+ interface WebsiteValidateResponse {
38
+ domain: string;
39
+ id: number;
40
+ message: string;
41
+ valid: boolean;
42
+ }
43
+ //#endregion
44
+ export { WebsiteValidateResponse };
45
+ //# sourceMappingURL=websiteValidateResponse.d.ts.map
@@ -0,0 +1,28 @@
1
+ import { PinnerConfig } from "../config.js";
2
+ import { IPNSKeyListResponseResponse } from "./generated/schemas/iPNSKeyListResponseResponse.js";
3
+ import { IPNSKeyRequest } from "./generated/schemas/iPNSKeyRequest.js";
4
+ import { IPNSKeyResponse } from "./generated/schemas/iPNSKeyResponse.js";
5
+ import { IPNSPublishRequest } from "./generated/schemas/iPNSPublishRequest.js";
6
+ import { IPNSPublishResponse } from "./generated/schemas/iPNSPublishResponse.js";
7
+ import { IPNSResolveResponse } from "./generated/schemas/iPNSResolveResponse.js";
8
+
9
+ //#region src/api/ipns.d.ts
10
+ interface IpnsClientOptions {
11
+ signal?: AbortSignal;
12
+ }
13
+ declare class IpnsClient {
14
+ private config;
15
+ constructor(config: PinnerConfig);
16
+ private getEndpoint;
17
+ private request;
18
+ listKeys(options?: IpnsClientOptions): Promise<IPNSKeyListResponseResponse>;
19
+ getKey(id: number, options?: IpnsClientOptions): Promise<IPNSKeyResponse>;
20
+ createKey(request: IPNSKeyRequest, options?: IpnsClientOptions): Promise<IPNSKeyResponse>;
21
+ deleteKey(id: number, options?: IpnsClientOptions): Promise<void>;
22
+ publish(request: IPNSPublishRequest, options?: IpnsClientOptions): Promise<IPNSPublishResponse>;
23
+ republish(name: string, options?: IpnsClientOptions): Promise<void>;
24
+ resolve(name: string, options?: IpnsClientOptions): Promise<IPNSResolveResponse>;
25
+ }
26
+ //#endregion
27
+ export { IpnsClient };
28
+ //# sourceMappingURL=ipns.d.ts.map
@@ -0,0 +1,83 @@
1
+ import { AuthenticationError, ConfigurationError, NetworkError, NotFoundError, ValidationError } from "../errors/index.js";
2
+ import ky, { HTTPError } from "ky";
3
+
4
+ //#region src/api/ipns.ts
5
+ var IpnsClient = class {
6
+ config;
7
+ constructor(config) {
8
+ if (!config.jwt) throw new ConfigurationError("JWT token is required");
9
+ this.config = config;
10
+ }
11
+ getEndpoint() {
12
+ return this.config.endpoint ?? "https://ipfs.pinner.xyz";
13
+ }
14
+ async request(path, options) {
15
+ if (!this.config.jwt) throw new ConfigurationError("JWT token is required");
16
+ try {
17
+ const response = await ky(path, {
18
+ prefix: this.getEndpoint(),
19
+ headers: {
20
+ Authorization: `Bearer ${this.config.jwt}`,
21
+ "Content-Type": "application/json"
22
+ },
23
+ ...options
24
+ });
25
+ if (response.status === 204) return;
26
+ const text = await response.text();
27
+ if (!text) return;
28
+ return JSON.parse(text);
29
+ } catch (error) {
30
+ if (error instanceof HTTPError) {
31
+ const status = error.response.status;
32
+ const body = await error.response.json().catch(() => ({}));
33
+ if (status === 401) throw new AuthenticationError(body.error || "Authentication failed");
34
+ if (status === 403) throw new AuthenticationError(body.error || "Access forbidden");
35
+ if (status === 404) throw new NotFoundError(body.error || "Resource not found");
36
+ if (status === 400) throw new ValidationError(body.error || "Invalid request");
37
+ throw new NetworkError(body.error || `HTTP error: ${status}`, status);
38
+ }
39
+ if (error instanceof Error) throw new NetworkError(error.message);
40
+ throw new NetworkError("Unknown error occurred");
41
+ }
42
+ }
43
+ async listKeys(options) {
44
+ return this.request("api/ipns/keys", { signal: options?.signal });
45
+ }
46
+ async getKey(id, options) {
47
+ return this.request(`api/ipns/keys/${id}`, { signal: options?.signal });
48
+ }
49
+ async createKey(request, options) {
50
+ return this.request("api/ipns/keys", {
51
+ method: "POST",
52
+ body: JSON.stringify(request),
53
+ signal: options?.signal
54
+ });
55
+ }
56
+ async deleteKey(id, options) {
57
+ await this.request(`api/ipns/keys/${id}`, {
58
+ method: "DELETE",
59
+ signal: options?.signal
60
+ });
61
+ }
62
+ async publish(request, options) {
63
+ return this.request("api/ipns/publish", {
64
+ method: "POST",
65
+ body: JSON.stringify(request),
66
+ signal: options?.signal
67
+ });
68
+ }
69
+ async republish(name, options) {
70
+ await this.request("api/ipns/republish", {
71
+ method: "POST",
72
+ body: JSON.stringify({ name }),
73
+ signal: options?.signal
74
+ });
75
+ }
76
+ async resolve(name, options) {
77
+ return this.request(`api/ipns/resolve/${name}`, { signal: options?.signal });
78
+ }
79
+ };
80
+
81
+ //#endregion
82
+ export { IpnsClient };
83
+ //# sourceMappingURL=ipns.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ipns.js","names":[],"sources":["../../../src/api/ipns.ts"],"sourcesContent":["import ky, { HTTPError } from \"ky\";\nimport type { PinnerConfig } from \"../config\";\nimport type {\n IPNSKeyListResponseResponse,\n IPNSKeyRequest,\n IPNSKeyResponse,\n IPNSPublishRequest,\n IPNSPublishResponse,\n IPNSResolveResponse,\n} from \"./generated/schemas/index\";\nimport {\n ConfigurationError,\n AuthenticationError,\n NotFoundError,\n NetworkError,\n ValidationError,\n} from \"@/errors\";\n\nexport interface IpnsClientOptions {\n signal?: AbortSignal;\n}\n\nexport class IpnsClient {\n private config: PinnerConfig;\n\n constructor(config: PinnerConfig) {\n if (!config.jwt) {\n throw new ConfigurationError(\"JWT token is required\");\n }\n this.config = config;\n }\n\n private getEndpoint(): string {\n return this.config.endpoint ?? \"https://ipfs.pinner.xyz\";\n }\n\n private async request<T>(\n path: string,\n options?: RequestInit & { signal?: AbortSignal },\n ): Promise<T> {\n if (!this.config.jwt) {\n throw new ConfigurationError(\"JWT token is required\");\n }\n\n try {\n const response = await ky(path, {\n prefix: this.getEndpoint(),\n headers: {\n Authorization: `Bearer ${this.config.jwt}`,\n \"Content-Type\": \"application/json\",\n },\n ...options,\n });\n\n if (response.status === 204) {\n return undefined as T;\n }\n\n const text = await response.text();\n if (!text) {\n return undefined as T;\n }\n\n return JSON.parse(text) as T;\n } catch (error) {\n if (error instanceof HTTPError) {\n const status = error.response.status;\n const body = await error.response.json().catch(() => ({}));\n\n if (status === 401) {\n throw new AuthenticationError(\n body.error || \"Authentication failed\",\n );\n }\n if (status === 403) {\n throw new AuthenticationError(\n body.error || \"Access forbidden\",\n );\n }\n if (status === 404) {\n throw new NotFoundError(body.error || \"Resource not found\");\n }\n if (status === 400) {\n throw new ValidationError(body.error || \"Invalid request\");\n }\n\n throw new NetworkError(\n body.error || `HTTP error: ${status}`,\n status,\n );\n }\n\n if (error instanceof Error) {\n throw new NetworkError(error.message);\n }\n\n throw new NetworkError(\"Unknown error occurred\");\n }\n }\n\n async listKeys(options?: IpnsClientOptions): Promise<IPNSKeyListResponseResponse> {\n return this.request<IPNSKeyListResponseResponse>(\"api/ipns/keys\", {\n signal: options?.signal,\n });\n }\n\n async getKey(id: number, options?: IpnsClientOptions): Promise<IPNSKeyResponse> {\n return this.request<IPNSKeyResponse>(`api/ipns/keys/${id}`, {\n signal: options?.signal,\n });\n }\n\n async createKey(\n request: IPNSKeyRequest,\n options?: IpnsClientOptions,\n ): Promise<IPNSKeyResponse> {\n return this.request<IPNSKeyResponse>(\"api/ipns/keys\", {\n method: \"POST\",\n body: JSON.stringify(request),\n signal: options?.signal,\n });\n }\n\n async deleteKey(id: number, options?: IpnsClientOptions): Promise<void> {\n await this.request<void>(`api/ipns/keys/${id}`, {\n method: \"DELETE\",\n signal: options?.signal,\n });\n }\n\n async publish(\n request: IPNSPublishRequest,\n options?: IpnsClientOptions,\n ): Promise<IPNSPublishResponse> {\n return this.request<IPNSPublishResponse>(\"api/ipns/publish\", {\n method: \"POST\",\n body: JSON.stringify(request),\n signal: options?.signal,\n });\n }\n\n async republish(\n name: string,\n options?: IpnsClientOptions,\n ): Promise<void> {\n await this.request<void>(\"api/ipns/republish\", {\n method: \"POST\",\n body: JSON.stringify({ name }),\n signal: options?.signal,\n });\n }\n\n async resolve(\n name: string,\n options?: IpnsClientOptions,\n ): Promise<IPNSResolveResponse> {\n return this.request<IPNSResolveResponse>(`api/ipns/resolve/${name}`, {\n signal: options?.signal,\n });\n }\n}\n"],"mappings":";;;;AAsBA,IAAa,aAAb,MAAwB;CACtB,AAAQ;CAER,YAAY,QAAsB;AAChC,MAAI,CAAC,OAAO,IACV,OAAM,IAAI,mBAAmB,wBAAwB;AAEvD,OAAK,SAAS;;CAGhB,AAAQ,cAAsB;AAC5B,SAAO,KAAK,OAAO,YAAY;;CAGjC,MAAc,QACZ,MACA,SACY;AACZ,MAAI,CAAC,KAAK,OAAO,IACf,OAAM,IAAI,mBAAmB,wBAAwB;AAGvD,MAAI;GACF,MAAM,WAAW,MAAM,GAAG,MAAM;IAC9B,QAAQ,KAAK,aAAa;IAC1B,SAAS;KACP,eAAe,UAAU,KAAK,OAAO;KACrC,gBAAgB;KACjB;IACD,GAAG;IACJ,CAAC;AAEF,OAAI,SAAS,WAAW,IACtB;GAGF,MAAM,OAAO,MAAM,SAAS,MAAM;AAClC,OAAI,CAAC,KACH;AAGF,UAAO,KAAK,MAAM,KAAK;WAChB,OAAO;AACd,OAAI,iBAAiB,WAAW;IAC9B,MAAM,SAAS,MAAM,SAAS;IAC9B,MAAM,OAAO,MAAM,MAAM,SAAS,MAAM,CAAC,aAAa,EAAE,EAAE;AAE1D,QAAI,WAAW,IACb,OAAM,IAAI,oBACR,KAAK,SAAS,wBACf;AAEH,QAAI,WAAW,IACb,OAAM,IAAI,oBACR,KAAK,SAAS,mBACf;AAEH,QAAI,WAAW,IACb,OAAM,IAAI,cAAc,KAAK,SAAS,qBAAqB;AAE7D,QAAI,WAAW,IACb,OAAM,IAAI,gBAAgB,KAAK,SAAS,kBAAkB;AAG5D,UAAM,IAAI,aACR,KAAK,SAAS,eAAe,UAC7B,OACD;;AAGH,OAAI,iBAAiB,MACnB,OAAM,IAAI,aAAa,MAAM,QAAQ;AAGvC,SAAM,IAAI,aAAa,yBAAyB;;;CAIpD,MAAM,SAAS,SAAmE;AAChF,SAAO,KAAK,QAAqC,iBAAiB,EAChE,QAAQ,SAAS,QAClB,CAAC;;CAGJ,MAAM,OAAO,IAAY,SAAuD;AAC9E,SAAO,KAAK,QAAyB,iBAAiB,MAAM,EAC1D,QAAQ,SAAS,QAClB,CAAC;;CAGJ,MAAM,UACJ,SACA,SAC0B;AAC1B,SAAO,KAAK,QAAyB,iBAAiB;GACpD,QAAQ;GACR,MAAM,KAAK,UAAU,QAAQ;GAC7B,QAAQ,SAAS;GAClB,CAAC;;CAGJ,MAAM,UAAU,IAAY,SAA4C;AACtE,QAAM,KAAK,QAAc,iBAAiB,MAAM;GAC9C,QAAQ;GACR,QAAQ,SAAS;GAClB,CAAC;;CAGJ,MAAM,QACJ,SACA,SAC8B;AAC9B,SAAO,KAAK,QAA6B,oBAAoB;GAC3D,QAAQ;GACR,MAAM,KAAK,UAAU,QAAQ;GAC7B,QAAQ,SAAS;GAClB,CAAC;;CAGJ,MAAM,UACJ,MACA,SACe;AACf,QAAM,KAAK,QAAc,sBAAsB;GAC7C,QAAQ;GACR,MAAM,KAAK,UAAU,EAAE,MAAM,CAAC;GAC9B,QAAQ,SAAS;GAClB,CAAC;;CAGJ,MAAM,QACJ,MACA,SAC8B;AAC9B,SAAO,KAAK,QAA6B,oBAAoB,QAAQ,EACnE,QAAQ,SAAS,QAClB,CAAC"}