@lumeweb/pinner 0.1.13 → 0.1.14

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 (92) hide show
  1. package/dist/esm/adapters/pinata/index.d.ts +1 -1
  2. package/dist/esm/adapters/pinata/shared/index.d.ts +1 -1
  3. package/dist/esm/adapters/pinata/shared/types.d.ts +41 -1
  4. package/dist/esm/adapters/pinata/v2/adapter-interface.d.ts +4 -1
  5. package/dist/esm/adapters/pinata/v2/index.d.ts +1 -1
  6. package/dist/esm/adapters/pinata/v2/types.d.ts +58 -1
  7. package/dist/esm/api/client.d.ts +21 -0
  8. package/dist/esm/api/client.js +54 -0
  9. package/dist/esm/api/client.js.map +1 -0
  10. package/dist/esm/api/generated/content/content.msw.js +30 -37
  11. package/dist/esm/api/generated/content/content.msw.js.map +1 -1
  12. package/dist/esm/api/generated/dns/dns.msw.js +30 -44
  13. package/dist/esm/api/generated/dns/dns.msw.js.map +1 -1
  14. package/dist/esm/api/generated/files/files.msw.js +30 -33
  15. package/dist/esm/api/generated/files/files.msw.js.map +1 -1
  16. package/dist/esm/api/generated/gateway/gateway.msw.js +30 -32
  17. package/dist/esm/api/generated/gateway/gateway.msw.js.map +1 -1
  18. package/dist/esm/api/generated/internal/internal.msw.js +30 -31
  19. package/dist/esm/api/generated/internal/internal.msw.js.map +1 -1
  20. package/dist/esm/api/generated/ipns/ipns.msw.js +30 -37
  21. package/dist/esm/api/generated/ipns/ipns.msw.js.map +1 -1
  22. package/dist/esm/api/generated/pinning/pinning.msw.js +30 -35
  23. package/dist/esm/api/generated/pinning/pinning.msw.js.map +1 -1
  24. package/dist/esm/api/generated/schemas/blockMetaResponse.d.ts +29 -29
  25. package/dist/esm/api/generated/schemas/component.d.ts +29 -29
  26. package/dist/esm/api/generated/schemas/errorResponse.d.ts +29 -29
  27. package/dist/esm/api/generated/schemas/fileManagerItem.d.ts +29 -29
  28. package/dist/esm/api/generated/schemas/gatewayWebsiteResponse.d.ts +29 -29
  29. package/dist/esm/api/generated/schemas/gatewayWebsiteStatusResponse.d.ts +29 -29
  30. package/dist/esm/api/generated/schemas/getBlockMetaBatchRequest.d.ts +42 -0
  31. package/dist/esm/api/generated/schemas/iPNSKeyListResponse.d.ts +29 -29
  32. package/dist/esm/api/generated/schemas/iPNSKeyRequest.d.ts +29 -29
  33. package/dist/esm/api/generated/schemas/iPNSKeyResponse.d.ts +29 -29
  34. package/dist/esm/api/generated/schemas/iPNSPublishRequest.d.ts +29 -29
  35. package/dist/esm/api/generated/schemas/iPNSPublishResponse.d.ts +29 -29
  36. package/dist/esm/api/generated/schemas/iPNSRepublishResponse.d.ts +29 -29
  37. package/dist/esm/api/generated/schemas/iPNSResolveResponse.d.ts +29 -29
  38. package/dist/esm/api/generated/schemas/infoResponse.d.ts +29 -29
  39. package/dist/esm/api/generated/schemas/pinRequestMeta.d.ts +29 -29
  40. package/dist/esm/api/generated/schemas/pinStatusResponseInfo.d.ts +29 -29
  41. package/dist/esm/api/generated/schemas/postApiUploadBody.d.ts +42 -0
  42. package/dist/esm/api/generated/schemas/postUploadResponse.d.ts +29 -29
  43. package/dist/esm/api/generated/schemas/recordResponse.d.ts +29 -29
  44. package/dist/esm/api/generated/schemas/recordResult.d.ts +29 -29
  45. package/dist/esm/api/generated/schemas/sSLStatusInfo.d.ts +29 -29
  46. package/dist/esm/api/generated/schemas/sSLStatusUpdateRequest.d.ts +44 -0
  47. package/dist/esm/api/generated/schemas/uploadResultResponse.d.ts +29 -29
  48. package/dist/esm/api/generated/schemas/validationResponse.d.ts +29 -29
  49. package/dist/esm/api/generated/schemas/websiteConfigResponse.d.ts +29 -29
  50. package/dist/esm/api/generated/schemas/websiteRequest.d.ts +29 -29
  51. package/dist/esm/api/generated/schemas/websiteUpdateRequest.d.ts +29 -29
  52. package/dist/esm/api/generated/schemas/websiteValidateResponse.d.ts +29 -29
  53. package/dist/esm/api/generated/schemas/zoneListResponse.d.ts +29 -29
  54. package/dist/esm/api/generated/schemas/zoneResponse.d.ts +29 -29
  55. package/dist/esm/api/generated/tus/tus.msw.js +30 -34
  56. package/dist/esm/api/generated/tus/tus.msw.js.map +1 -1
  57. package/dist/esm/api/generated/websites/websites.msw.js +30 -38
  58. package/dist/esm/api/generated/websites/websites.msw.js.map +1 -1
  59. package/dist/esm/api/ipns.d.ts +47 -6
  60. package/dist/esm/api/ipns.js +46 -39
  61. package/dist/esm/api/ipns.js.map +1 -1
  62. package/dist/esm/api/websites.d.ts +57 -6
  63. package/dist/esm/api/websites.js +57 -41
  64. package/dist/esm/api/websites.js.map +1 -1
  65. package/dist/esm/auth/manager.d.ts +29 -0
  66. package/dist/esm/auth/manager.js +30 -0
  67. package/dist/esm/auth/manager.js.map +1 -0
  68. package/dist/esm/blockstore/index.d.ts +1 -1
  69. package/dist/esm/blockstore/unstorage-base.d.ts +6 -1
  70. package/dist/esm/blockstore/unstorage-base.js +9 -6
  71. package/dist/esm/blockstore/unstorage-base.js.map +1 -1
  72. package/dist/esm/index.d.ts +31 -6
  73. package/dist/esm/pin/client.js +7 -7
  74. package/dist/esm/pin/client.js.map +1 -1
  75. package/dist/esm/pinner.d.ts +22 -0
  76. package/dist/esm/pinner.js +28 -4
  77. package/dist/esm/pinner.js.map +1 -1
  78. package/dist/esm/types/pin.d.ts +42 -0
  79. package/dist/esm/upload/base-upload.js +3 -1
  80. package/dist/esm/upload/base-upload.js.map +1 -1
  81. package/dist/esm/upload/builder.d.ts +1 -1
  82. package/dist/esm/upload/car.d.ts +18 -0
  83. package/dist/esm/upload/car.js.map +1 -1
  84. package/dist/esm/upload/manager.d.ts +32 -1
  85. package/dist/esm/upload/manager.js +36 -4
  86. package/dist/esm/upload/manager.js.map +1 -1
  87. package/dist/esm/upload/normalize.js.map +1 -1
  88. package/dist/esm/upload/tus-upload.js +3 -3
  89. package/dist/esm/upload/tus-upload.js.map +1 -1
  90. package/dist/esm/upload/xhr-upload.js +1 -1
  91. package/dist/esm/upload/xhr-upload.js.map +1 -1
  92. package/package.json +17 -17
@@ -1,40 +1,40 @@
1
1
  import { faker } from "@faker-js/faker";
2
- import { HttpResponse, delay, http } from "msw";
2
+ import { HttpResponse, http } from "msw";
3
3
 
4
4
  //#region src/api/generated/websites/websites.msw.ts
5
5
  /**
6
- * Generated by orval v8.10.0 🍺
6
+ * Generated by orval v8.18.0 🍺
7
7
  * Do not edit manually.
8
8
  * Portal IPFS Plugin API
9
9
  *
10
- ## Portal IPFS Plugin API
11
-
12
- A comprehensive API for IPFS content management, including pinning services, file operations, IPNS key management, and website hosting.
13
-
14
- ### IPFS Pinning Service API Compatibility
15
-
16
- 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.
17
-
18
- ### Features
19
-
20
- - **Pinning**: Add, list, update, and remove pinned content
21
- - **Content**: Upload files, retrieve IPFS content, and manage metadata
22
- - **IPNS**: Manage IPNS keys and publish content
23
- - **Files**: Browse and manage pinned files with directory navigation
24
- - **Websites**: Create and manage website hosting with DNS and SSL automation
25
-
26
- ### Authentication
27
-
28
- All API endpoints require authentication using JWT tokens obtained from the Portal authentication service.
29
-
30
- ### Rate Limiting
31
-
32
- API requests are rate-limited based on user account tier. See Portal documentation for current limits.
33
-
34
- ### Documentation
35
-
36
- For detailed API usage examples and integration guides, visit the Portal documentation website.
37
-
10
+ * ## Portal IPFS Plugin API
11
+ *
12
+ * A comprehensive API for IPFS content management, including pinning services, file operations, IPNS key management, and website hosting.
13
+ *
14
+ * ### IPFS Pinning Service API Compatibility
15
+ *
16
+ * 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.
17
+ *
18
+ * ### Features
19
+ *
20
+ * - **Pinning**: Add, list, update, and remove pinned content
21
+ * - **Content**: Upload files, retrieve IPFS content, and manage metadata
22
+ * - **IPNS**: Manage IPNS keys and publish content
23
+ * - **Files**: Browse and manage pinned files with directory navigation
24
+ * - **Websites**: Create and manage website hosting with DNS and SSL automation
25
+ *
26
+ * ### Authentication
27
+ *
28
+ * All API endpoints require authentication using JWT tokens obtained from the Portal authentication service.
29
+ *
30
+ * ### Rate Limiting
31
+ *
32
+ * API requests are rate-limited based on user account tier. See Portal documentation for current limits.
33
+ *
34
+ * ### Documentation
35
+ *
36
+ * For detailed API usage examples and integration guides, visit the Portal documentation website.
37
+ *
38
38
  * OpenAPI spec version: 1.0.0
39
39
  */
40
40
  const getGetApiWebsitesResponseMock = (overrideResponse = {}) => ({
@@ -374,50 +374,42 @@ const getGetApiWebsitesConfigResponseMock = (overrideResponse = {}) => ({
374
374
  });
375
375
  const getGetApiWebsitesMockHandler = (overrideResponse, options) => {
376
376
  return http.get("*/api/websites", async (info) => {
377
- await delay(0);
378
377
  return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getGetApiWebsitesResponseMock(), { status: 200 });
379
378
  }, options);
380
379
  };
381
380
  const getPostApiWebsitesMockHandler = (overrideResponse, options) => {
382
381
  return http.post("*/api/websites", async (info) => {
383
- await delay(0);
384
382
  return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getPostApiWebsitesResponseMock(), { status: 200 });
385
383
  }, options);
386
384
  };
387
385
  const getGetApiWebsitesDomainSslStatusMockHandler = (overrideResponse, options) => {
388
386
  return http.get("*/api/websites/:domain/ssl-status", async (info) => {
389
- await delay(0);
390
387
  return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getGetApiWebsitesDomainSslStatusResponseMock(), { status: 200 });
391
388
  }, options);
392
389
  };
393
390
  const getDeleteApiWebsitesIdMockHandler = (overrideResponse, options) => {
394
391
  return http.delete("*/api/websites/:id", async (info) => {
395
- await delay(0);
396
392
  const resolvedBody = overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getDeleteApiWebsitesIdResponseMock();
397
393
  return resolvedBody === void 0 ? new HttpResponse(null, { status: 204 }) : HttpResponse.json(resolvedBody, { status: 200 });
398
394
  }, options);
399
395
  };
400
396
  const getGetApiWebsitesIdMockHandler = (overrideResponse, options) => {
401
397
  return http.get("*/api/websites/:id", async (info) => {
402
- await delay(0);
403
398
  return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getGetApiWebsitesIdResponseMock(), { status: 200 });
404
399
  }, options);
405
400
  };
406
401
  const getPutApiWebsitesIdMockHandler = (overrideResponse, options) => {
407
402
  return http.put("*/api/websites/:id", async (info) => {
408
- await delay(0);
409
403
  return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getPutApiWebsitesIdResponseMock(), { status: 200 });
410
404
  }, options);
411
405
  };
412
406
  const getPostApiWebsitesIdValidateMockHandler = (overrideResponse, options) => {
413
407
  return http.post("*/api/websites/:id/validate", async (info) => {
414
- await delay(0);
415
408
  return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getPostApiWebsitesIdValidateResponseMock(), { status: 200 });
416
409
  }, options);
417
410
  };
418
411
  const getGetApiWebsitesConfigMockHandler = (overrideResponse, options) => {
419
412
  return http.get("*/api/websites/config", async (info) => {
420
- await delay(0);
421
413
  return HttpResponse.json(overrideResponse !== void 0 ? typeof overrideResponse === "function" ? await overrideResponse(info) : overrideResponse : getGetApiWebsitesConfigResponseMock(), { status: 200 });
422
414
  }, options);
423
415
  };
@@ -1 +1 @@
1
- {"version":3,"file":"websites.msw.js","names":[],"sources":["../../../../../src/api/generated/websites/websites.msw.ts"],"sourcesContent":["/**\n * Generated by orval v8.10.0 🍺\n * Do not edit manually.\n * Portal IPFS Plugin API\n *\n## Portal IPFS Plugin API\n\nA comprehensive API for IPFS content management, including pinning services, file operations, IPNS key management, and website hosting.\n\n### IPFS Pinning Service API Compatibility\n\nThis 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.\n\n### Features\n\n- **Pinning**: Add, list, update, and remove pinned content\n- **Content**: Upload files, retrieve IPFS content, and manage metadata\n- **IPNS**: Manage IPNS keys and publish content\n- **Files**: Browse and manage pinned files with directory navigation\n- **Websites**: Create and manage website hosting with DNS and SSL automation\n\n### Authentication\n\nAll API endpoints require authentication using JWT tokens obtained from the Portal authentication service.\n\n### Rate Limiting\n\nAPI requests are rate-limited based on user account tier. See Portal documentation for current limits.\n\n### Documentation\n\nFor detailed API usage examples and integration guides, visit the Portal documentation website.\n\n * OpenAPI spec version: 1.0.0\n */\nimport {\n faker\n} from '@faker-js/faker';\n\nimport {\n HttpResponse,\n delay,\n http\n} from 'msw';\nimport type {\n RequestHandlerOptions\n} from 'msw';\n\nimport type {\n ErrorResponse,\n WebsiteConfigResponse,\n WebsiteItemResponse,\n WebsiteResponse,\n WebsiteValidateResponse\n} from '../schemas';\n\n\nexport const getGetApiWebsitesResponseMock = (overrideResponse: Partial<Extract<WebsiteItemResponse, object>> = {}): WebsiteItemResponse => ({data: Array.from({ length: faker.number.int({min: 1, max: 10}) }, (_, i) => i + 1).map(() => ({active_cid: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), created: faker.date.past().toISOString().slice(0, 19) + 'Z', dns_hosting_enabled: faker.datatype.boolean(), dns_zone_id: faker.helpers.arrayElement([faker.number.int(), undefined]), domain: faker.string.alpha({length: {min: 10, max: 20}}), expired: faker.datatype.boolean(), gateway_domain: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), id: faker.number.int(), ipns_key_id: faker.helpers.arrayElement([faker.number.int(), undefined]), is_subdomain: faker.datatype.boolean(), last_checked_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), ssl: faker.helpers.arrayElement([{error: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), issued_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), last_updated_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), status: faker.string.alpha({length: {min: 10, max: 20}})}, undefined]), status: faker.string.alpha({length: {min: 10, max: 20}}), target_hash: faker.string.alpha({length: {min: 10, max: 20}}), target_type: faker.string.alpha({length: {min: 10, max: 20}}), updated: faker.date.past().toISOString().slice(0, 19) + 'Z', validation_expires_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), validation_record_host: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), validation_token: faker.string.alpha({length: {min: 10, max: 20}})})), total: faker.number.int(), ...overrideResponse})\n\nexport const getPostApiWebsitesResponseMock = (overrideResponse: Partial<Extract<ErrorResponse | WebsiteResponse, object>> = {}): ErrorResponse | WebsiteResponse => (faker.helpers.arrayElement([{error: faker.string.alpha({length: {min: 10, max: 20}}), ...overrideResponse}, {active_cid: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), created: faker.date.past().toISOString().slice(0, 19) + 'Z', dns_hosting_enabled: faker.datatype.boolean(), dns_zone_id: faker.helpers.arrayElement([faker.number.int(), undefined]), domain: faker.string.alpha({length: {min: 10, max: 20}}), expired: faker.datatype.boolean(), gateway_domain: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), id: faker.number.int(), ipns_key_id: faker.helpers.arrayElement([faker.number.int(), undefined]), is_subdomain: faker.datatype.boolean(), last_checked_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), ssl: faker.helpers.arrayElement([{error: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), issued_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), last_updated_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), status: faker.string.alpha({length: {min: 10, max: 20}})}, undefined]), status: faker.string.alpha({length: {min: 10, max: 20}}), target_hash: faker.string.alpha({length: {min: 10, max: 20}}), target_type: faker.string.alpha({length: {min: 10, max: 20}}), updated: faker.date.past().toISOString().slice(0, 19) + 'Z', validation_expires_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), validation_record_host: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), validation_token: faker.string.alpha({length: {min: 10, max: 20}}), ...overrideResponse}]))\n\nexport const getGetApiWebsitesDomainSslStatusResponseMock = (overrideResponse: Partial<Extract<WebsiteResponse, object>> = {}): WebsiteResponse => ({active_cid: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), created: faker.date.past().toISOString().slice(0, 19) + 'Z', dns_hosting_enabled: faker.datatype.boolean(), dns_zone_id: faker.helpers.arrayElement([faker.number.int(), undefined]), domain: faker.string.alpha({length: {min: 10, max: 20}}), expired: faker.datatype.boolean(), gateway_domain: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), id: faker.number.int(), ipns_key_id: faker.helpers.arrayElement([faker.number.int(), undefined]), is_subdomain: faker.datatype.boolean(), last_checked_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), ssl: faker.helpers.arrayElement([{error: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), issued_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), last_updated_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), status: faker.string.alpha({length: {min: 10, max: 20}})}, undefined]), status: faker.string.alpha({length: {min: 10, max: 20}}), target_hash: faker.string.alpha({length: {min: 10, max: 20}}), target_type: faker.string.alpha({length: {min: 10, max: 20}}), updated: faker.date.past().toISOString().slice(0, 19) + 'Z', validation_expires_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), validation_record_host: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), validation_token: faker.string.alpha({length: {min: 10, max: 20}}), ...overrideResponse})\n\nexport const getDeleteApiWebsitesIdResponseMock = (overrideResponse: Partial<Extract<ErrorResponse, object>> = {}): ErrorResponse => ({error: faker.string.alpha({length: {min: 10, max: 20}}), ...overrideResponse})\n\nexport const getGetApiWebsitesIdResponseMock = (overrideResponse: Partial<Extract<WebsiteResponse, object>> = {}): WebsiteResponse => ({active_cid: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), created: faker.date.past().toISOString().slice(0, 19) + 'Z', dns_hosting_enabled: faker.datatype.boolean(), dns_zone_id: faker.helpers.arrayElement([faker.number.int(), undefined]), domain: faker.string.alpha({length: {min: 10, max: 20}}), expired: faker.datatype.boolean(), gateway_domain: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), id: faker.number.int(), ipns_key_id: faker.helpers.arrayElement([faker.number.int(), undefined]), is_subdomain: faker.datatype.boolean(), last_checked_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), ssl: faker.helpers.arrayElement([{error: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), issued_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), last_updated_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), status: faker.string.alpha({length: {min: 10, max: 20}})}, undefined]), status: faker.string.alpha({length: {min: 10, max: 20}}), target_hash: faker.string.alpha({length: {min: 10, max: 20}}), target_type: faker.string.alpha({length: {min: 10, max: 20}}), updated: faker.date.past().toISOString().slice(0, 19) + 'Z', validation_expires_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), validation_record_host: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), validation_token: faker.string.alpha({length: {min: 10, max: 20}}), ...overrideResponse})\n\nexport const getPutApiWebsitesIdResponseMock = (overrideResponse: Partial<Extract<WebsiteResponse, object>> = {}): WebsiteResponse => ({active_cid: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), created: faker.date.past().toISOString().slice(0, 19) + 'Z', dns_hosting_enabled: faker.datatype.boolean(), dns_zone_id: faker.helpers.arrayElement([faker.number.int(), undefined]), domain: faker.string.alpha({length: {min: 10, max: 20}}), expired: faker.datatype.boolean(), gateway_domain: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), id: faker.number.int(), ipns_key_id: faker.helpers.arrayElement([faker.number.int(), undefined]), is_subdomain: faker.datatype.boolean(), last_checked_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), ssl: faker.helpers.arrayElement([{error: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), issued_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), last_updated_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), status: faker.string.alpha({length: {min: 10, max: 20}})}, undefined]), status: faker.string.alpha({length: {min: 10, max: 20}}), target_hash: faker.string.alpha({length: {min: 10, max: 20}}), target_type: faker.string.alpha({length: {min: 10, max: 20}}), updated: faker.date.past().toISOString().slice(0, 19) + 'Z', validation_expires_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), validation_record_host: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), validation_token: faker.string.alpha({length: {min: 10, max: 20}}), ...overrideResponse})\n\nexport const getPostApiWebsitesIdValidateResponseMock = (overrideResponse: Partial<Extract<WebsiteValidateResponse, object>> = {}): WebsiteValidateResponse => ({domain: faker.string.alpha({length: {min: 10, max: 20}}), id: faker.number.int(), message: faker.string.alpha({length: {min: 10, max: 20}}), reason: faker.string.alpha({length: {min: 10, max: 20}}), valid: faker.datatype.boolean(), ...overrideResponse})\n\nexport const getGetApiWebsitesConfigResponseMock = (overrideResponse: Partial<Extract<WebsiteConfigResponse, object>> = {}): WebsiteConfigResponse => ({gateway_domain: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), nameservers: faker.helpers.arrayElement([Array.from({ length: faker.number.int({min: 1, max: 10}) }, (_, i) => i + 1).map(() => (faker.string.alpha({length: {min: 10, max: 20}}))), undefined]), ...overrideResponse})\n\n\nexport const getGetApiWebsitesMockHandler = (overrideResponse?: WebsiteItemResponse | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<WebsiteItemResponse> | WebsiteItemResponse), options?: RequestHandlerOptions) => {\n return http.get('*/api/websites', async (info: Parameters<Parameters<typeof http.get>[1]>[0]) => {await delay(0);\n\n\n return HttpResponse.json(overrideResponse !== undefined\n ? (typeof overrideResponse === \"function\" ? await overrideResponse(info) : overrideResponse)\n : getGetApiWebsitesResponseMock(),\n { status: 200\n })\n }, options)\n}\n\nexport const getPostApiWebsitesMockHandler = (overrideResponse?: ErrorResponse | WebsiteResponse | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<ErrorResponse | WebsiteResponse> | ErrorResponse | WebsiteResponse), options?: RequestHandlerOptions) => {\n return http.post('*/api/websites', async (info: Parameters<Parameters<typeof http.post>[1]>[0]) => {await delay(0);\n\n\n return HttpResponse.json(overrideResponse !== undefined\n ? (typeof overrideResponse === \"function\" ? await overrideResponse(info) : overrideResponse)\n : getPostApiWebsitesResponseMock(),\n { status: 200\n })\n }, options)\n}\n\nexport const getGetApiWebsitesDomainSslStatusMockHandler = (overrideResponse?: WebsiteResponse | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<WebsiteResponse> | WebsiteResponse), options?: RequestHandlerOptions) => {\n return http.get('*/api/websites/:domain/ssl-status', async (info: Parameters<Parameters<typeof http.get>[1]>[0]) => {await delay(0);\n\n\n return HttpResponse.json(overrideResponse !== undefined\n ? (typeof overrideResponse === \"function\" ? await overrideResponse(info) : overrideResponse)\n : getGetApiWebsitesDomainSslStatusResponseMock(),\n { status: 200\n })\n }, options)\n}\n\nexport const getDeleteApiWebsitesIdMockHandler = (overrideResponse?: ErrorResponse | void | ((info: Parameters<Parameters<typeof http.delete>[1]>[0]) => Promise<ErrorResponse | void> | ErrorResponse | void), options?: RequestHandlerOptions) => {\n return http.delete('*/api/websites/:id', async (info: Parameters<Parameters<typeof http.delete>[1]>[0]) => {await delay(0);\n\n const resolvedBody = overrideResponse !== undefined\n ? (typeof overrideResponse === \"function\" ? await overrideResponse(info) : overrideResponse)\n : getDeleteApiWebsitesIdResponseMock();\n return resolvedBody === undefined\n ? new HttpResponse(null, { status: 204 })\n : HttpResponse.json(resolvedBody, { status: 200 })\n }, options)\n}\n\nexport const getGetApiWebsitesIdMockHandler = (overrideResponse?: WebsiteResponse | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<WebsiteResponse> | WebsiteResponse), options?: RequestHandlerOptions) => {\n return http.get('*/api/websites/:id', async (info: Parameters<Parameters<typeof http.get>[1]>[0]) => {await delay(0);\n\n\n return HttpResponse.json(overrideResponse !== undefined\n ? (typeof overrideResponse === \"function\" ? await overrideResponse(info) : overrideResponse)\n : getGetApiWebsitesIdResponseMock(),\n { status: 200\n })\n }, options)\n}\n\nexport const getPutApiWebsitesIdMockHandler = (overrideResponse?: WebsiteResponse | ((info: Parameters<Parameters<typeof http.put>[1]>[0]) => Promise<WebsiteResponse> | WebsiteResponse), options?: RequestHandlerOptions) => {\n return http.put('*/api/websites/:id', async (info: Parameters<Parameters<typeof http.put>[1]>[0]) => {await delay(0);\n\n\n return HttpResponse.json(overrideResponse !== undefined\n ? (typeof overrideResponse === \"function\" ? await overrideResponse(info) : overrideResponse)\n : getPutApiWebsitesIdResponseMock(),\n { status: 200\n })\n }, options)\n}\n\nexport const getPostApiWebsitesIdValidateMockHandler = (overrideResponse?: WebsiteValidateResponse | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<WebsiteValidateResponse> | WebsiteValidateResponse), options?: RequestHandlerOptions) => {\n return http.post('*/api/websites/:id/validate', async (info: Parameters<Parameters<typeof http.post>[1]>[0]) => {await delay(0);\n\n\n return HttpResponse.json(overrideResponse !== undefined\n ? (typeof overrideResponse === \"function\" ? await overrideResponse(info) : overrideResponse)\n : getPostApiWebsitesIdValidateResponseMock(),\n { status: 200\n })\n }, options)\n}\n\nexport const getGetApiWebsitesConfigMockHandler = (overrideResponse?: WebsiteConfigResponse | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<WebsiteConfigResponse> | WebsiteConfigResponse), options?: RequestHandlerOptions) => {\n return http.get('*/api/websites/config', async (info: Parameters<Parameters<typeof http.get>[1]>[0]) => {await delay(0);\n\n\n return HttpResponse.json(overrideResponse !== undefined\n ? (typeof overrideResponse === \"function\" ? await overrideResponse(info) : overrideResponse)\n : getGetApiWebsitesConfigResponseMock(),\n { status: 200\n })\n }, options)\n}\nexport const getWebsitesMock = () => [\n getGetApiWebsitesMockHandler(),\n getPostApiWebsitesMockHandler(),\n getGetApiWebsitesDomainSslStatusMockHandler(),\n getDeleteApiWebsitesIdMockHandler(),\n getGetApiWebsitesIdMockHandler(),\n getPutApiWebsitesIdMockHandler(),\n getPostApiWebsitesIdValidateMockHandler(),\n getGetApiWebsitesConfigMockHandler()\n]\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDA,MAAa,iCAAiC,mBAAkE,EAAE,MAA2B;CAAC,MAAM,MAAM,KAAK,EAAE,QAAQ,MAAM,OAAO,IAAI;EAAC,KAAK;EAAG,KAAK;EAAG,CAAC,EAAE,GAAG,GAAG,MAAM,IAAI,E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C/B,6CAA6C;CAC7C,mCAAmC;CACnC,gCAAgC;CAChC,gCAAgC;CAChC,yCAAyC;CACzC,oCAAoC;CACrC"}
1
+ {"version":3,"file":"websites.msw.js","names":[],"sources":["../../../../../src/api/generated/websites/websites.msw.ts"],"sourcesContent":["/**\n * Generated by orval v8.18.0 🍺\n * Do not edit manually.\n * Portal IPFS Plugin API\n *\n * ## Portal IPFS Plugin API\n *\n * A comprehensive API for IPFS content management, including pinning services, file operations, IPNS key management, and website hosting.\n *\n * ### IPFS Pinning Service API Compatibility\n *\n * 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.\n *\n * ### Features\n *\n * - **Pinning**: Add, list, update, and remove pinned content\n * - **Content**: Upload files, retrieve IPFS content, and manage metadata\n * - **IPNS**: Manage IPNS keys and publish content\n * - **Files**: Browse and manage pinned files with directory navigation\n * - **Websites**: Create and manage website hosting with DNS and SSL automation\n *\n * ### Authentication\n *\n * All API endpoints require authentication using JWT tokens obtained from the Portal authentication service.\n *\n * ### Rate Limiting\n *\n * API requests are rate-limited based on user account tier. See Portal documentation for current limits.\n *\n * ### Documentation\n *\n * For detailed API usage examples and integration guides, visit the Portal documentation website.\n *\n * OpenAPI spec version: 1.0.0\n */\nimport {\n faker\n} from '@faker-js/faker';\n\nimport {\n HttpResponse,\n http\n} from 'msw';\nimport type {\n RequestHandlerOptions\n} from 'msw';\n\nimport type {\n ErrorResponse,\n WebsiteConfigResponse,\n WebsiteItemResponse,\n WebsiteResponse,\n WebsiteValidateResponse\n} from '../schemas';\n\n\nexport const getGetApiWebsitesResponseMock = (overrideResponse: Partial<Extract<WebsiteItemResponse, object>> = {}): WebsiteItemResponse => ({data: Array.from({ length: faker.number.int({min: 1, max: 10}) }, (_, i) => i + 1).map(() => ({active_cid: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), created: faker.date.past().toISOString().slice(0, 19) + 'Z', dns_hosting_enabled: faker.datatype.boolean(), dns_zone_id: faker.helpers.arrayElement([faker.number.int(), undefined]), domain: faker.string.alpha({length: {min: 10, max: 20}}), expired: faker.datatype.boolean(), gateway_domain: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), id: faker.number.int(), ipns_key_id: faker.helpers.arrayElement([faker.number.int(), undefined]), is_subdomain: faker.datatype.boolean(), last_checked_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), ssl: faker.helpers.arrayElement([{error: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), issued_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), last_updated_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), status: faker.string.alpha({length: {min: 10, max: 20}})}, undefined]), status: faker.string.alpha({length: {min: 10, max: 20}}), target_hash: faker.string.alpha({length: {min: 10, max: 20}}), target_type: faker.string.alpha({length: {min: 10, max: 20}}), updated: faker.date.past().toISOString().slice(0, 19) + 'Z', validation_expires_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), validation_record_host: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), validation_token: faker.string.alpha({length: {min: 10, max: 20}})})), total: faker.number.int(), ...overrideResponse})\n\nexport const getPostApiWebsitesResponseMock = (overrideResponse: Partial<Extract<ErrorResponse | WebsiteResponse, object>> = {}): ErrorResponse | WebsiteResponse => (faker.helpers.arrayElement([{error: faker.string.alpha({length: {min: 10, max: 20}}), ...overrideResponse}, {active_cid: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), created: faker.date.past().toISOString().slice(0, 19) + 'Z', dns_hosting_enabled: faker.datatype.boolean(), dns_zone_id: faker.helpers.arrayElement([faker.number.int(), undefined]), domain: faker.string.alpha({length: {min: 10, max: 20}}), expired: faker.datatype.boolean(), gateway_domain: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), id: faker.number.int(), ipns_key_id: faker.helpers.arrayElement([faker.number.int(), undefined]), is_subdomain: faker.datatype.boolean(), last_checked_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), ssl: faker.helpers.arrayElement([{error: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), issued_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), last_updated_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), status: faker.string.alpha({length: {min: 10, max: 20}})}, undefined]), status: faker.string.alpha({length: {min: 10, max: 20}}), target_hash: faker.string.alpha({length: {min: 10, max: 20}}), target_type: faker.string.alpha({length: {min: 10, max: 20}}), updated: faker.date.past().toISOString().slice(0, 19) + 'Z', validation_expires_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), validation_record_host: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), validation_token: faker.string.alpha({length: {min: 10, max: 20}}), ...overrideResponse}]))\n\nexport const getGetApiWebsitesDomainSslStatusResponseMock = (overrideResponse: Partial<Extract<WebsiteResponse, object>> = {}): WebsiteResponse => ({active_cid: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), created: faker.date.past().toISOString().slice(0, 19) + 'Z', dns_hosting_enabled: faker.datatype.boolean(), dns_zone_id: faker.helpers.arrayElement([faker.number.int(), undefined]), domain: faker.string.alpha({length: {min: 10, max: 20}}), expired: faker.datatype.boolean(), gateway_domain: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), id: faker.number.int(), ipns_key_id: faker.helpers.arrayElement([faker.number.int(), undefined]), is_subdomain: faker.datatype.boolean(), last_checked_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), ssl: faker.helpers.arrayElement([{error: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), issued_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), last_updated_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), status: faker.string.alpha({length: {min: 10, max: 20}})}, undefined]), status: faker.string.alpha({length: {min: 10, max: 20}}), target_hash: faker.string.alpha({length: {min: 10, max: 20}}), target_type: faker.string.alpha({length: {min: 10, max: 20}}), updated: faker.date.past().toISOString().slice(0, 19) + 'Z', validation_expires_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), validation_record_host: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), validation_token: faker.string.alpha({length: {min: 10, max: 20}}), ...overrideResponse})\n\nexport const getDeleteApiWebsitesIdResponseMock = (overrideResponse: Partial<Extract<ErrorResponse, object>> = {}): ErrorResponse => ({error: faker.string.alpha({length: {min: 10, max: 20}}), ...overrideResponse})\n\nexport const getGetApiWebsitesIdResponseMock = (overrideResponse: Partial<Extract<WebsiteResponse, object>> = {}): WebsiteResponse => ({active_cid: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), created: faker.date.past().toISOString().slice(0, 19) + 'Z', dns_hosting_enabled: faker.datatype.boolean(), dns_zone_id: faker.helpers.arrayElement([faker.number.int(), undefined]), domain: faker.string.alpha({length: {min: 10, max: 20}}), expired: faker.datatype.boolean(), gateway_domain: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), id: faker.number.int(), ipns_key_id: faker.helpers.arrayElement([faker.number.int(), undefined]), is_subdomain: faker.datatype.boolean(), last_checked_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), ssl: faker.helpers.arrayElement([{error: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), issued_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), last_updated_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), status: faker.string.alpha({length: {min: 10, max: 20}})}, undefined]), status: faker.string.alpha({length: {min: 10, max: 20}}), target_hash: faker.string.alpha({length: {min: 10, max: 20}}), target_type: faker.string.alpha({length: {min: 10, max: 20}}), updated: faker.date.past().toISOString().slice(0, 19) + 'Z', validation_expires_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), validation_record_host: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), validation_token: faker.string.alpha({length: {min: 10, max: 20}}), ...overrideResponse})\n\nexport const getPutApiWebsitesIdResponseMock = (overrideResponse: Partial<Extract<WebsiteResponse, object>> = {}): WebsiteResponse => ({active_cid: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), created: faker.date.past().toISOString().slice(0, 19) + 'Z', dns_hosting_enabled: faker.datatype.boolean(), dns_zone_id: faker.helpers.arrayElement([faker.number.int(), undefined]), domain: faker.string.alpha({length: {min: 10, max: 20}}), expired: faker.datatype.boolean(), gateway_domain: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), id: faker.number.int(), ipns_key_id: faker.helpers.arrayElement([faker.number.int(), undefined]), is_subdomain: faker.datatype.boolean(), last_checked_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), ssl: faker.helpers.arrayElement([{error: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), issued_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), last_updated_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), status: faker.string.alpha({length: {min: 10, max: 20}})}, undefined]), status: faker.string.alpha({length: {min: 10, max: 20}}), target_hash: faker.string.alpha({length: {min: 10, max: 20}}), target_type: faker.string.alpha({length: {min: 10, max: 20}}), updated: faker.date.past().toISOString().slice(0, 19) + 'Z', validation_expires_at: faker.helpers.arrayElement([faker.date.past().toISOString().slice(0, 19) + 'Z', undefined]), validation_record_host: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), validation_token: faker.string.alpha({length: {min: 10, max: 20}}), ...overrideResponse})\n\nexport const getPostApiWebsitesIdValidateResponseMock = (overrideResponse: Partial<Extract<WebsiteValidateResponse, object>> = {}): WebsiteValidateResponse => ({domain: faker.string.alpha({length: {min: 10, max: 20}}), id: faker.number.int(), message: faker.string.alpha({length: {min: 10, max: 20}}), reason: faker.string.alpha({length: {min: 10, max: 20}}), valid: faker.datatype.boolean(), ...overrideResponse})\n\nexport const getGetApiWebsitesConfigResponseMock = (overrideResponse: Partial<Extract<WebsiteConfigResponse, object>> = {}): WebsiteConfigResponse => ({gateway_domain: faker.helpers.arrayElement([faker.string.alpha({length: {min: 10, max: 20}}), undefined]), nameservers: faker.helpers.arrayElement([Array.from({ length: faker.number.int({min: 1, max: 10}) }, (_, i) => i + 1).map(() => (faker.string.alpha({length: {min: 10, max: 20}}))), undefined]), ...overrideResponse})\n\n\nexport const getGetApiWebsitesMockHandler = (overrideResponse?: WebsiteItemResponse | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<WebsiteItemResponse> | WebsiteItemResponse), options?: RequestHandlerOptions) => {\n return http.get('*/api/websites', async (info: Parameters<Parameters<typeof http.get>[1]>[0]) => {\n\n\n return HttpResponse.json(overrideResponse !== undefined\n ? (typeof overrideResponse === \"function\" ? await overrideResponse(info) : overrideResponse)\n : getGetApiWebsitesResponseMock(),\n { status: 200\n })\n }, options)\n}\n\nexport const getPostApiWebsitesMockHandler = (overrideResponse?: ErrorResponse | WebsiteResponse | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<ErrorResponse | WebsiteResponse> | ErrorResponse | WebsiteResponse), options?: RequestHandlerOptions) => {\n return http.post('*/api/websites', async (info: Parameters<Parameters<typeof http.post>[1]>[0]) => {\n\n\n return HttpResponse.json(overrideResponse !== undefined\n ? (typeof overrideResponse === \"function\" ? await overrideResponse(info) : overrideResponse)\n : getPostApiWebsitesResponseMock(),\n { status: 200\n })\n }, options)\n}\n\nexport const getGetApiWebsitesDomainSslStatusMockHandler = (overrideResponse?: WebsiteResponse | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<WebsiteResponse> | WebsiteResponse), options?: RequestHandlerOptions) => {\n return http.get('*/api/websites/:domain/ssl-status', async (info: Parameters<Parameters<typeof http.get>[1]>[0]) => {\n\n\n return HttpResponse.json(overrideResponse !== undefined\n ? (typeof overrideResponse === \"function\" ? await overrideResponse(info) : overrideResponse)\n : getGetApiWebsitesDomainSslStatusResponseMock(),\n { status: 200\n })\n }, options)\n}\n\nexport const getDeleteApiWebsitesIdMockHandler = (overrideResponse?: ErrorResponse | void | ((info: Parameters<Parameters<typeof http.delete>[1]>[0]) => Promise<ErrorResponse | void> | ErrorResponse | void), options?: RequestHandlerOptions) => {\n return http.delete('*/api/websites/:id', async (info: Parameters<Parameters<typeof http.delete>[1]>[0]) => {\n\n const resolvedBody = overrideResponse !== undefined\n ? (typeof overrideResponse === \"function\" ? await overrideResponse(info) : overrideResponse)\n : getDeleteApiWebsitesIdResponseMock();\n return resolvedBody === undefined\n ? new HttpResponse(null, { status: 204 })\n : HttpResponse.json(resolvedBody, { status: 200 })\n }, options)\n}\n\nexport const getGetApiWebsitesIdMockHandler = (overrideResponse?: WebsiteResponse | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<WebsiteResponse> | WebsiteResponse), options?: RequestHandlerOptions) => {\n return http.get('*/api/websites/:id', async (info: Parameters<Parameters<typeof http.get>[1]>[0]) => {\n\n\n return HttpResponse.json(overrideResponse !== undefined\n ? (typeof overrideResponse === \"function\" ? await overrideResponse(info) : overrideResponse)\n : getGetApiWebsitesIdResponseMock(),\n { status: 200\n })\n }, options)\n}\n\nexport const getPutApiWebsitesIdMockHandler = (overrideResponse?: WebsiteResponse | ((info: Parameters<Parameters<typeof http.put>[1]>[0]) => Promise<WebsiteResponse> | WebsiteResponse), options?: RequestHandlerOptions) => {\n return http.put('*/api/websites/:id', async (info: Parameters<Parameters<typeof http.put>[1]>[0]) => {\n\n\n return HttpResponse.json(overrideResponse !== undefined\n ? (typeof overrideResponse === \"function\" ? await overrideResponse(info) : overrideResponse)\n : getPutApiWebsitesIdResponseMock(),\n { status: 200\n })\n }, options)\n}\n\nexport const getPostApiWebsitesIdValidateMockHandler = (overrideResponse?: WebsiteValidateResponse | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<WebsiteValidateResponse> | WebsiteValidateResponse), options?: RequestHandlerOptions) => {\n return http.post('*/api/websites/:id/validate', async (info: Parameters<Parameters<typeof http.post>[1]>[0]) => {\n\n\n return HttpResponse.json(overrideResponse !== undefined\n ? (typeof overrideResponse === \"function\" ? await overrideResponse(info) : overrideResponse)\n : getPostApiWebsitesIdValidateResponseMock(),\n { status: 200\n })\n }, options)\n}\n\nexport const getGetApiWebsitesConfigMockHandler = (overrideResponse?: WebsiteConfigResponse | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<WebsiteConfigResponse> | WebsiteConfigResponse), options?: RequestHandlerOptions) => {\n return http.get('*/api/websites/config', async (info: Parameters<Parameters<typeof http.get>[1]>[0]) => {\n\n\n return HttpResponse.json(overrideResponse !== undefined\n ? (typeof overrideResponse === \"function\" ? await overrideResponse(info) : overrideResponse)\n : getGetApiWebsitesConfigResponseMock(),\n { status: 200\n })\n }, options)\n}\nexport const getWebsitesMock = () => [\n getGetApiWebsitesMockHandler(),\n getPostApiWebsitesMockHandler(),\n getGetApiWebsitesDomainSslStatusMockHandler(),\n getDeleteApiWebsitesIdMockHandler(),\n getGetApiWebsitesIdMockHandler(),\n getPutApiWebsitesIdMockHandler(),\n getPostApiWebsitesIdValidateMockHandler(),\n getGetApiWeb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b,MAAa,wBAAwB;CACnC,8BAA8B;CAC9B,+BAA+B;CAC/B,6CAA6C;CAC7C,mCAAmC;CACnC,gCAAgC;CAChC,gCAAgC;CAChC,yCAAyC;CACzC,oCAAoC;CACrC"}
@@ -6,24 +6,65 @@ import { IPNSPublishResponse } from "./generated/schemas/iPNSPublishResponse.js"
6
6
  import { IPNSRepublishResponse } from "./generated/schemas/iPNSRepublishResponse.js";
7
7
  import { IPNSResolveResponse } from "./generated/schemas/iPNSResolveResponse.js";
8
8
  import { PinnerConfig } from "../config.js";
9
+ import { AuthManager } from "../auth/manager.js";
10
+ import { ApiClient } from "./client.js";
9
11
 
10
12
  //#region src/api/ipns.d.ts
11
13
  interface IpnsClientOptions {
12
14
  signal?: AbortSignal;
13
15
  }
14
- declare class IpnsClient {
15
- private config;
16
- constructor(config: PinnerConfig);
17
- private getEndpoint;
18
- private request;
16
+ /**
17
+ * Client for managing IPNS keys and publishing content to IPNS names.
18
+ */
19
+ declare class IpnsClient extends ApiClient {
20
+ /**
21
+ * Create a new IpnsClient.
22
+ * @param config SDK configuration
23
+ * @param auth AuthManager for authentication
24
+ */
25
+ constructor(config: PinnerConfig, auth: AuthManager);
26
+ /**
27
+ * List all IPNS keys.
28
+ * @param options Request options
29
+ */
19
30
  listKeys(options?: IpnsClientOptions): Promise<IPNSKeyListResponseResponse>;
31
+ /**
32
+ * Get a specific IPNS key by ID.
33
+ * @param id Key ID
34
+ * @param options Request options
35
+ */
20
36
  getKey(id: number, options?: IpnsClientOptions): Promise<IPNSKeyResponse>;
37
+ /**
38
+ * Create a new IPNS key.
39
+ * @param request Key creation parameters
40
+ * @param options Request options
41
+ */
21
42
  createKey(request: IPNSKeyRequest, options?: IpnsClientOptions): Promise<IPNSKeyResponse>;
43
+ /**
44
+ * Delete an IPNS key by ID.
45
+ * @param id Key ID to delete
46
+ * @param options Request options
47
+ */
22
48
  deleteKey(id: number, options?: IpnsClientOptions): Promise<void>;
49
+ /**
50
+ * Publish content to an IPNS name.
51
+ * @param request Publishing parameters
52
+ * @param options Request options
53
+ */
23
54
  publish(request: IPNSPublishRequest, options?: IpnsClientOptions): Promise<IPNSPublishResponse>;
55
+ /**
56
+ * Republish (refresh) an existing IPNS record.
57
+ * @param id Key ID to republish
58
+ * @param options Request options
59
+ */
24
60
  republish(id: number, options?: IpnsClientOptions): Promise<IPNSRepublishResponse>;
61
+ /**
62
+ * Resolve an IPNS name to its content.
63
+ * @param name IPNS name to resolve
64
+ * @param options Request options
65
+ */
25
66
  resolve(name: string, options?: IpnsClientOptions): Promise<IPNSResolveResponse>;
26
67
  }
27
68
  //#endregion
28
- export { IpnsClient };
69
+ export { IpnsClient, IpnsClientOptions };
29
70
  //# sourceMappingURL=ipns.d.ts.map
@@ -1,51 +1,38 @@
1
- import { AuthenticationError, ConfigurationError, NetworkError, NotFoundError, ValidationError } from "../errors/index.js";
2
- import ky, { HTTPError } from "ky";
1
+ import { ApiClient } from "./client.js";
3
2
 
4
3
  //#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
- }
4
+ /**
5
+ * Client for managing IPNS keys and publishing content to IPNS names.
6
+ */
7
+ var IpnsClient = class extends ApiClient {
8
+ /**
9
+ * Create a new IpnsClient.
10
+ * @param config SDK configuration
11
+ * @param auth AuthManager for authentication
12
+ */
13
+ constructor(config, auth) {
14
+ super(auth, config.endpoint ?? "https://ipfs.pinner.xyz");
42
15
  }
16
+ /**
17
+ * List all IPNS keys.
18
+ * @param options Request options
19
+ */
43
20
  async listKeys(options) {
44
21
  return this.request("api/ipns/keys", { signal: options?.signal });
45
22
  }
23
+ /**
24
+ * Get a specific IPNS key by ID.
25
+ * @param id Key ID
26
+ * @param options Request options
27
+ */
46
28
  async getKey(id, options) {
47
29
  return this.request(`api/ipns/keys/${id}`, { signal: options?.signal });
48
30
  }
31
+ /**
32
+ * Create a new IPNS key.
33
+ * @param request Key creation parameters
34
+ * @param options Request options
35
+ */
49
36
  async createKey(request, options) {
50
37
  return this.request("api/ipns/keys", {
51
38
  method: "POST",
@@ -53,12 +40,22 @@ var IpnsClient = class {
53
40
  signal: options?.signal
54
41
  });
55
42
  }
43
+ /**
44
+ * Delete an IPNS key by ID.
45
+ * @param id Key ID to delete
46
+ * @param options Request options
47
+ */
56
48
  async deleteKey(id, options) {
57
49
  await this.request(`api/ipns/keys/${id}`, {
58
50
  method: "DELETE",
59
51
  signal: options?.signal
60
52
  });
61
53
  }
54
+ /**
55
+ * Publish content to an IPNS name.
56
+ * @param request Publishing parameters
57
+ * @param options Request options
58
+ */
62
59
  async publish(request, options) {
63
60
  return this.request("api/ipns/publish", {
64
61
  method: "POST",
@@ -66,12 +63,22 @@ var IpnsClient = class {
66
63
  signal: options?.signal
67
64
  });
68
65
  }
66
+ /**
67
+ * Republish (refresh) an existing IPNS record.
68
+ * @param id Key ID to republish
69
+ * @param options Request options
70
+ */
69
71
  async republish(id, options) {
70
72
  return this.request(`api/ipns/keys/${id}/republish`, {
71
73
  method: "POST",
72
74
  signal: options?.signal
73
75
  });
74
76
  }
77
+ /**
78
+ * Resolve an IPNS name to its content.
79
+ * @param name IPNS name to resolve
80
+ * @param options Request options
81
+ */
75
82
  async resolve(name, options) {
76
83
  return this.request(`api/ipns/resolve/${name}`, { signal: options?.signal });
77
84
  }
@@ -1 +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 IPNSRepublishResponse,\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 id: number,\n options?: IpnsClientOptions,\n ): Promise<IPNSRepublishResponse> {\n return this.request<IPNSRepublishResponse>(`api/ipns/keys/${id}/republish`, {\n method: \"POST\",\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":";;;;AA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K,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,IACA,SACgC;AAChC,SAAO,KAAK,QAA+B,iBAAiB,GAAG,aAAa;GAC1E,QAAQ;GACR,QAAQ,SAAS;GAClB,CAAC;;CAGJ,MAAM,QACJ,MACA,SAC8B;AAC9B,SAAO,KAAK,QAA6B,oBAAoB,QAAQ,EACnE,QAAQ,SAAS,QAClB,CAAC"}
1
+ {"version":3,"file":"ipns.js","names":[],"sources":["../../../src/api/ipns.ts"],"sourcesContent":["import type { PinnerConfig } from \"../config\";\nimport type { AuthManager } from \"@/auth\";\nimport { ApiClient } from \"./client\";\nimport type {\n IPNSKeyListResponseResponse,\n IPNSKeyRequest,\n IPNSKeyResponse,\n IPNSPublishRequest,\n IPNSPublishResponse,\n IPNSRepublishResponse,\n IPNSResolveResponse,\n} from \"./generated/schemas/index\";\n\nexport interface IpnsClientOptions {\n signal?: AbortSignal;\n}\n\n/**\n * Client for managing IPNS keys and publishing content to IPNS names.\n */\nexport class IpnsClient extends ApiClient {\n /**\n * Create a new IpnsClient.\n * @param config SDK configuration\n * @param auth AuthManager for authentication\n */\n constructor(config: PinnerConfig, auth: AuthManager) {\n super(auth, config.endpoint ?? \"https://ipfs.pinner.xyz\");\n }\n\n /**\n * List all IPNS keys.\n * @param options Request options\n */\n async listKeys(options?: IpnsClientOptions): Promise<IPNSKeyListResponseResponse> {\n return this.request<IPNSKeyListResponseResponse>(\"api/ipns/keys\", {\n signal: options?.signal,\n });\n }\n\n /**\n * Get a specific IPNS key by ID.\n * @param id Key ID\n * @param options Request options\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 /**\n * Create a new IPNS key.\n * @param request Key creation parameters\n * @param options Request options\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 /**\n * Delete an IPNS key by ID.\n * @param id Key ID to delete\n * @param options Request options\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 /**\n * Publish content to an IPNS name.\n * @param request Publishing parameters\n * @param options Request options\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 /**\n * Republish (refresh) an existing IPNS record.\n * @param id Key ID to republish\n * @param options Request options\n */\n async republish(\n id: number,\n options?: IpnsClientOptions,\n ): Promise<IPNSRepublishResponse> {\n return this.request<IPNSRepublishResponse>(`api/ipns/keys/${id}/republish`, {\n method: \"POST\",\n signal: options?.signal,\n });\n }\n\n /**\n * Resolve an IPNS name to its content.\n * @param name IPNS name to resolve\n * @param options Request options\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":";;;;;;AAoBA,IAAa,aAAb,cAAgC,UAAU;;;;;;CAMxC,YAAY,QAAsB,MAAmB;AACnD,QAAM,MAAM,OAAO,YAAY,0BAA0B;;;;;;CAO3D,MAAM,SAAS,SAAmE;AAChF,SAAO,KAAK,QAAqC,iBAAiB,EAChE,QAAQ,SAAS,QAClB,CAAC;;;;;;;CAQJ,MAAM,OAAO,IAAY,SAAuD;AAC9E,SAAO,KAAK,QAAyB,iBAAiB,MAAM,EAC1D,QAAQ,SAAS,QAClB,CAAC;;;;;;;CAQJ,MAAM,UACJ,SACA,SAC0B;AAC1B,SAAO,KAAK,QAAyB,iBAAiB;GACpD,QAAQ;GACR,MAAM,KAAK,UAAU,QAAQ;GAC7B,QAAQ,SAAS;GAClB,CAAC;;;;;;;CAQJ,MAAM,UAAU,IAAY,SAA4C;AACtE,QAAM,KAAK,QAAc,iBAAiB,MAAM;GAC9C,QAAQ;GACR,QAAQ,SAAS;GAClB,CAAC;;;;;;;CAQJ,MAAM,QACJ,SACA,SAC8B;AAC9B,SAAO,KAAK,QAA6B,oBAAoB;GAC3D,QAAQ;GACR,MAAM,KAAK,UAAU,QAAQ;GAC7B,QAAQ,SAAS;GAClB,CAAC;;;;;;;CAQJ,MAAM,UACJ,IACA,SACgC;AAChC,SAAO,KAAK,QAA+B,iBAAiB,GAAG,aAAa;GAC1E,QAAQ;GACR,QAAQ,SAAS;GAClB,CAAC;;;;;;;CAQJ,MAAM,QACJ,MACA,SAC8B;AAC9B,SAAO,KAAK,QAA6B,oBAAoB,QAAQ,EACnE,QAAQ,SAAS,QAClB,CAAC"}
@@ -6,6 +6,8 @@ import { WebsiteResponse } from "./generated/schemas/websiteResponse.js";
6
6
  import { WebsiteUpdateRequest } from "./generated/schemas/websiteUpdateRequest.js";
7
7
  import { WebsiteValidateResponse } from "./generated/schemas/websiteValidateResponse.js";
8
8
  import { PinnerConfig } from "../config.js";
9
+ import { AuthManager } from "../auth/manager.js";
10
+ import { ApiClient } from "./client.js";
9
11
 
10
12
  //#region src/api/websites.d.ts
11
13
  declare const WebsiteValidationReason: {
@@ -21,19 +23,68 @@ declare function isValidationReason(response: WebsiteValidateResponse | null | u
21
23
  interface WebsitesClientOptions {
22
24
  signal?: AbortSignal;
23
25
  }
24
- declare class WebsitesClient {
25
- private config;
26
- constructor(config: PinnerConfig);
27
- private getEndpoint;
28
- private request;
26
+ /**
27
+ * Client for managing websites hosted on IPFS with custom domains and SSL.
28
+ */
29
+ declare class WebsitesClient extends ApiClient {
30
+ /**
31
+ * Create a new WebsitesClient.
32
+ * @param config SDK configuration
33
+ * @param auth AuthManager for authentication
34
+ */
35
+ constructor(config: PinnerConfig, auth: AuthManager);
36
+ /**
37
+ * List all websites.
38
+ * @param options Request options
39
+ */
29
40
  listWebsites(options?: WebsitesClientOptions): Promise<WebsiteItemResponse>;
41
+ /**
42
+ * Create a new website.
43
+ * @param request Website creation parameters
44
+ * @param options Request options
45
+ */
30
46
  createWebsite(request: WebsiteRequest, options?: WebsitesClientOptions): Promise<WebsiteResponse>;
47
+ /**
48
+ * Get website details by ID.
49
+ * @param id Website ID
50
+ * @param options Request options
51
+ */
31
52
  getWebsite(id: number, options?: WebsitesClientOptions): Promise<WebsiteResponse>;
53
+ /**
54
+ * Update a website's configuration.
55
+ * @param id Website ID
56
+ * @param request Update parameters
57
+ * @param options Request options
58
+ */
32
59
  updateWebsite(id: number, request: WebsiteUpdateRequest, options?: WebsitesClientOptions): Promise<WebsiteResponse>;
60
+ /**
61
+ * Delete a website by ID.
62
+ * @param id Website ID
63
+ * @param options Request options
64
+ */
33
65
  deleteWebsite(id: number, options?: WebsitesClientOptions): Promise<void>;
66
+ /**
67
+ * Validate a website's DNS and SSL configuration.
68
+ * @param id Website ID
69
+ * @param options Request options
70
+ */
34
71
  validateWebsite(id: number, options?: WebsitesClientOptions): Promise<WebsiteValidateResponse>;
72
+ /**
73
+ * Check the SSL certificate status for a domain.
74
+ * @param domain Domain name
75
+ * @param options Request options
76
+ */
35
77
  getSSLStatus(domain: string, options?: WebsitesClientOptions): Promise<SSLStatusInfo>;
78
+ /**
79
+ * Get the global website configuration.
80
+ * @param options Request options
81
+ */
36
82
  getWebsiteConfig(options?: WebsitesClientOptions): Promise<WebsiteConfigResponse>;
83
+ /**
84
+ * Watch SSL status until provisioned, failed, or timed out.
85
+ * @param domain Domain name
86
+ * @param options Watch interval and timeout
87
+ */
37
88
  watchSSL(domain: string, options?: WatchOptions): SSLWatcher;
38
89
  }
39
90
  interface WatchOptions {
@@ -54,5 +105,5 @@ interface SSLError extends Error {
54
105
  details?: string;
55
106
  }
56
107
  //#endregion
57
- export { WebsiteValidationReason, WebsiteValidationReasonValue, WebsitesClient, getValidationReason, isValidationReason };
108
+ export { SSLCallbacks, SSLError, SSLWatcher, WatchOptions, WebsiteValidationReason, WebsiteValidationReasonValue, WebsitesClient, WebsitesClientOptions, getValidationReason, isValidationReason };
58
109
  //# sourceMappingURL=websites.d.ts.map