diff --git a/data-provider-base.assetbuffer.buffer.md b/data-provider-base.assetbuffer.buffer.md new file mode 100644 index 0000000..b6ab0ed --- /dev/null +++ b/data-provider-base.assetbuffer.buffer.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@lukso/data-provider-base](./data-provider-base.md) > [AssetBuffer](./data-provider-base.assetbuffer.md) > [buffer](./data-provider-base.assetbuffer.buffer.md) + +## AssetBuffer.buffer property + +buffer Buffer - buffer to the data + +**Signature:** + +```typescript +buffer: Buffer; +``` diff --git a/data-provider-base.assetbuffer.md b/data-provider-base.assetbuffer.md new file mode 100644 index 0000000..2ac3557 --- /dev/null +++ b/data-provider-base.assetbuffer.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [@lukso/data-provider-base](./data-provider-base.md) > [AssetBuffer](./data-provider-base.assetbuffer.md) + +## AssetBuffer interface + +Manual asset buffer we can support for upload + +**Signature:** + +```typescript +interface AssetBuffer +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [buffer](./data-provider-base.assetbuffer.buffer.md) | | Buffer | buffer Buffer - buffer to the data | +| [mimeType](./data-provider-base.assetbuffer.mimetype.md) | | string | mimeType string - set mimetype for the buffer | + diff --git a/data-providers.assetbuffer.mimetype.md b/data-provider-base.assetbuffer.mimetype.md similarity index 50% rename from data-providers.assetbuffer.mimetype.md rename to data-provider-base.assetbuffer.mimetype.md index 90a1d81..7e46535 100644 --- a/data-providers.assetbuffer.mimetype.md +++ b/data-provider-base.assetbuffer.mimetype.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [AssetBuffer](./data-providers.assetbuffer.md) > [mimeType](./data-providers.assetbuffer.mimetype.md) +[Home](./index.md) > [@lukso/data-provider-base](./data-provider-base.md) > [AssetBuffer](./data-provider-base.assetbuffer.md) > [mimeType](./data-provider-base.assetbuffer.mimetype.md) ## AssetBuffer.mimeType property diff --git a/data-provider-base.authenticatedformdataprovider.getrequestoptions.md b/data-provider-base.authenticatedformdataprovider.getrequestoptions.md new file mode 100644 index 0000000..b7ace61 --- /dev/null +++ b/data-provider-base.authenticatedformdataprovider.getrequestoptions.md @@ -0,0 +1,25 @@ + + +[Home](./index.md) > [@lukso/data-provider-base](./data-provider-base.md) > [AuthenticatedFormDataProvider](./data-provider-base.authenticatedformdataprovider.md) > [getRequestOptions](./data-provider-base.authenticatedformdataprovider.getrequestoptions.md) + +## AuthenticatedFormDataProvider.getRequestOptions() method + +**Signature:** + +```typescript +getRequestOptions(dataContent: FormData, meta?: FormDataPostHeaders): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| dataContent | FormData | FormData content to be sent (ignored in this case) | +| meta | [FormDataPostHeaders](./data-provider-base.formdatapostheaders.md) | _(Optional)_ Optional additional meta data (ignored in this case) | + +**Returns:** + +Promise<[FormDataRequestOptions](./data-provider-base.formdatarequestoptions.md)> + +Attaches the headers with bearer token. + diff --git a/data-providers.authenticatedformdataprovider.gettoken.md b/data-provider-base.authenticatedformdataprovider.gettoken.md similarity index 57% rename from data-providers.authenticatedformdataprovider.gettoken.md rename to data-provider-base.authenticatedformdataprovider.gettoken.md index f9ad211..57dc48c 100644 --- a/data-providers.authenticatedformdataprovider.gettoken.md +++ b/data-provider-base.authenticatedformdataprovider.gettoken.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [AuthenticatedFormDataProvider](./data-providers.authenticatedformdataprovider.md) > [getToken](./data-providers.authenticatedformdataprovider.gettoken.md) +[Home](./index.md) > [@lukso/data-provider-base](./data-provider-base.md) > [AuthenticatedFormDataProvider](./data-provider-base.authenticatedformdataprovider.md) > [getToken](./data-provider-base.authenticatedformdataprovider.gettoken.md) ## AuthenticatedFormDataProvider.getToken() method diff --git a/data-providers.authenticatedformdataprovider.md b/data-provider-base.authenticatedformdataprovider.md similarity index 60% rename from data-providers.authenticatedformdataprovider.md rename to data-provider-base.authenticatedformdataprovider.md index 103bac8..297946f 100644 --- a/data-providers.authenticatedformdataprovider.md +++ b/data-provider-base.authenticatedformdataprovider.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [AuthenticatedFormDataProvider](./data-providers.authenticatedformdataprovider.md) +[Home](./index.md) > [@lukso/data-provider-base](./data-provider-base.md) > [AuthenticatedFormDataProvider](./data-provider-base.authenticatedformdataprovider.md) ## AuthenticatedFormDataProvider class @@ -9,9 +9,9 @@ This is a custom data provider that uses a pre-shared token to sign a short live **Signature:** ```typescript -declare class AuthenticatedFormDataProvider extends CustomHeaderFormDataProvider +declare class AuthenticatedFormDataProvider extends BaseFormDataProvider ``` -**Extends:** [CustomHeaderFormDataProvider](./data-providers.customheaderformdataprovider.md) +**Extends:** [BaseFormDataProvider](./data-provider-base.baseformdataprovider.md) ## Example @@ -37,6 +37,6 @@ and then forward the request to a pinata or other endpoint for the final upload. | Method | Modifiers | Description | | --- | --- | --- | -| [getHeaders(dataContent, meta)](./data-providers.authenticatedformdataprovider.getheaders.md) | | | -| [getToken()](./data-providers.authenticatedformdataprovider.gettoken.md) | | Exposed function in case this classes it used with an older ipfs-http-client implementation directly. | +| [getRequestOptions(dataContent, meta)](./data-provider-base.authenticatedformdataprovider.getrequestoptions.md) | | | +| [getToken()](./data-provider-base.authenticatedformdataprovider.gettoken.md) | | Exposed function in case this classes it used with an older ipfs-http-client implementation directly. | diff --git a/data-provider-base.baseformdataprovider.addmetadata.md b/data-provider-base.baseformdataprovider.addmetadata.md new file mode 100644 index 0000000..97d9c91 --- /dev/null +++ b/data-provider-base.baseformdataprovider.addmetadata.md @@ -0,0 +1,23 @@ + + +[Home](./index.md) > [@lukso/data-provider-base](./data-provider-base.md) > [BaseFormDataProvider](./data-provider-base.baseformdataprovider.md) > [addMetadata](./data-provider-base.baseformdataprovider.addmetadata.md) + +## BaseFormDataProvider.addMetadata() method + +**Signature:** + +```typescript +addMetadata(dataContent: FormData, meta?: FormDataPostHeaders): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| dataContent | FormData | | +| meta | [FormDataPostHeaders](./data-provider-base.formdatapostheaders.md) | _(Optional)_ | + +**Returns:** + +Promise<void> + diff --git a/data-providers.baseformdataprovider.getendpoint.md b/data-provider-base.baseformdataprovider.getendpoint.md similarity index 69% rename from data-providers.baseformdataprovider.getendpoint.md rename to data-provider-base.baseformdataprovider.getendpoint.md index b5707e5..30cc66d 100644 --- a/data-providers.baseformdataprovider.getendpoint.md +++ b/data-provider-base.baseformdataprovider.getendpoint.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [BaseFormDataProvider](./data-providers.baseformdataprovider.md) > [getEndpoint](./data-providers.baseformdataprovider.getendpoint.md) +[Home](./index.md) > [@lukso/data-provider-base](./data-provider-base.md) > [BaseFormDataProvider](./data-provider-base.baseformdataprovider.md) > [getEndpoint](./data-provider-base.baseformdataprovider.getendpoint.md) ## BaseFormDataProvider.getEndpoint() method diff --git a/data-providers.baseformdataprovider.getpostendpoint.md b/data-provider-base.baseformdataprovider.getpostendpoint.md similarity index 55% rename from data-providers.baseformdataprovider.getpostendpoint.md rename to data-provider-base.baseformdataprovider.getpostendpoint.md index 31edfab..0ef5fd7 100644 --- a/data-providers.baseformdataprovider.getpostendpoint.md +++ b/data-provider-base.baseformdataprovider.getpostendpoint.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [BaseFormDataProvider](./data-providers.baseformdataprovider.md) > [getPostEndpoint](./data-providers.baseformdataprovider.getpostendpoint.md) +[Home](./index.md) > [@lukso/data-provider-base](./data-provider-base.md) > [BaseFormDataProvider](./data-provider-base.baseformdataprovider.md) > [getPostEndpoint](./data-provider-base.baseformdataprovider.getpostendpoint.md) ## BaseFormDataProvider.getPostEndpoint() method diff --git a/data-provider-base.baseformdataprovider.getrequestoptions.md b/data-provider-base.baseformdataprovider.getrequestoptions.md new file mode 100644 index 0000000..5a2d43c --- /dev/null +++ b/data-provider-base.baseformdataprovider.getrequestoptions.md @@ -0,0 +1,27 @@ + + +[Home](./index.md) > [@lukso/data-provider-base](./data-provider-base.md) > [BaseFormDataProvider](./data-provider-base.baseformdataprovider.md) > [getRequestOptions](./data-provider-base.baseformdataprovider.getrequestoptions.md) + +## BaseFormDataProvider.getRequestOptions() method + +Construct options for the underlying fetch call. + +**Signature:** + +```typescript +getRequestOptions(dataContent: FormData, meta?: FormDataPostHeaders): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| dataContent | FormData | content to upload | +| meta | [FormDataPostHeaders](./data-provider-base.formdatapostheaders.md) | _(Optional)_ optional meta data | + +**Returns:** + +Promise<[FormDataRequestOptions](./data-provider-base.formdatarequestoptions.md)> + +return request options for fetch. + diff --git a/data-providers.baseformdataprovider.gettoken.md b/data-provider-base.baseformdataprovider.gettoken.md similarity index 57% rename from data-providers.baseformdataprovider.gettoken.md rename to data-provider-base.baseformdataprovider.gettoken.md index b2c0c75..dd7a6f1 100644 --- a/data-providers.baseformdataprovider.gettoken.md +++ b/data-provider-base.baseformdataprovider.gettoken.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [BaseFormDataProvider](./data-providers.baseformdataprovider.md) > [getToken](./data-providers.baseformdataprovider.gettoken.md) +[Home](./index.md) > [@lukso/data-provider-base](./data-provider-base.md) > [BaseFormDataProvider](./data-provider-base.baseformdataprovider.md) > [getToken](./data-provider-base.baseformdataprovider.gettoken.md) ## BaseFormDataProvider.getToken() method diff --git a/data-provider-base.baseformdataprovider.md b/data-provider-base.baseformdataprovider.md new file mode 100644 index 0000000..83552cf --- /dev/null +++ b/data-provider-base.baseformdataprovider.md @@ -0,0 +1,26 @@ + + +[Home](./index.md) > [@lukso/data-provider-base](./data-provider-base.md) > [BaseFormDataProvider](./data-provider-base.baseformdataprovider.md) + +## BaseFormDataProvider class + +Base data provider to upload data using a FormData POST. This is a generic class used by all the custom implementations. + +**Signature:** + +```typescript +declare class BaseFormDataProvider +``` + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [addMetadata(dataContent, meta)](./data-provider-base.baseformdataprovider.addmetadata.md) | | | +| [getEndpoint()](./data-provider-base.baseformdataprovider.getendpoint.md) | | Return the endpoint to allow this be used with an old ipfs-http-client implementation. If the proxy is running at /api/v0/add for pinning then you can use the ipfs-http-client pointed to /api/v0 and it will add /add to the end before sending the FormData to the server. This allows you to create a proxy that can be used with the ipfs-http-client. | +| [getPostEndpoint()](./data-provider-base.baseformdataprovider.getpostendpoint.md) | | Return the fetch endpoint this is going to. Must be overridden by a more specific implementation. | +| [getRequestOptions(dataContent, meta)](./data-provider-base.baseformdataprovider.getrequestoptions.md) | | Construct options for the underlying fetch call. | +| [getToken()](./data-provider-base.baseformdataprovider.gettoken.md) | | Return a token if this provider requires authentication. | +| [resolveUrl(result)](./data-provider-base.baseformdataprovider.resolveurl.md) | | Convert the upload JSON result to a URL. In most of the current cases it will read Hash or IpfsHash and return ipfs://${hash}. | +| [wrapStream(data)](./data-provider-base.baseformdataprovider.wrapstream.md) | protected | | + diff --git a/data-providers.baseformdataprovider.resolveurl.md b/data-provider-base.baseformdataprovider.resolveurl.md similarity index 66% rename from data-providers.baseformdataprovider.resolveurl.md rename to data-provider-base.baseformdataprovider.resolveurl.md index 9d97776..2018998 100644 --- a/data-providers.baseformdataprovider.resolveurl.md +++ b/data-provider-base.baseformdataprovider.resolveurl.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [BaseFormDataProvider](./data-providers.baseformdataprovider.md) > [resolveUrl](./data-providers.baseformdataprovider.resolveurl.md) +[Home](./index.md) > [@lukso/data-provider-base](./data-provider-base.md) > [BaseFormDataProvider](./data-provider-base.baseformdataprovider.md) > [resolveUrl](./data-provider-base.baseformdataprovider.resolveurl.md) ## BaseFormDataProvider.resolveUrl() method diff --git a/data-provider-base.baseformdataprovider.wrapstream.md b/data-provider-base.baseformdataprovider.wrapstream.md new file mode 100644 index 0000000..0a81c20 --- /dev/null +++ b/data-provider-base.baseformdataprovider.wrapstream.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [@lukso/data-provider-base](./data-provider-base.md) > [BaseFormDataProvider](./data-provider-base.baseformdataprovider.md) > [wrapStream](./data-provider-base.baseformdataprovider.wrapstream.md) + +## BaseFormDataProvider.wrapStream() method + +**Signature:** + +```typescript +protected wrapStream(data: any): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| data | any | | + +**Returns:** + +Promise<any> + diff --git a/data-providers.formdatapostheaders.md b/data-provider-base.formdatapostheaders.md similarity index 59% rename from data-providers.formdatapostheaders.md rename to data-provider-base.formdatapostheaders.md index d7e53b8..f590b40 100644 --- a/data-providers.formdatapostheaders.md +++ b/data-provider-base.formdatapostheaders.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [FormDataPostHeaders](./data-providers.formdatapostheaders.md) +[Home](./index.md) > [@lukso/data-provider-base](./data-provider-base.md) > [FormDataPostHeaders](./data-provider-base.formdatapostheaders.md) ## FormDataPostHeaders type diff --git a/data-providers.formdatarequestoptions.md b/data-provider-base.formdatarequestoptions.md similarity index 55% rename from data-providers.formdatarequestoptions.md rename to data-provider-base.formdatarequestoptions.md index cf5467d..f997d9e 100644 --- a/data-providers.formdatarequestoptions.md +++ b/data-provider-base.formdatarequestoptions.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [FormDataRequestOptions](./data-providers.formdatarequestoptions.md) +[Home](./index.md) > [@lukso/data-provider-base](./data-provider-base.md) > [FormDataRequestOptions](./data-provider-base.formdatarequestoptions.md) ## FormDataRequestOptions type @@ -14,7 +14,8 @@ type FormDataRequestOptions = { maxBodyLength?: number; withCredentials?: boolean; headers?: FormDataPostHeaders; + [key: string]: any; }; ``` -**References:** [FormDataPostHeaders](./data-providers.formdatapostheaders.md) +**References:** [FormDataPostHeaders](./data-provider-base.formdatapostheaders.md) diff --git a/data-provider-base.md b/data-provider-base.md new file mode 100644 index 0000000..f8305a0 --- /dev/null +++ b/data-provider-base.md @@ -0,0 +1,26 @@ + + +[Home](./index.md) > [@lukso/data-provider-base](./data-provider-base.md) + +## data-provider-base package + +## Classes + +| Class | Description | +| --- | --- | +| [AuthenticatedFormDataProvider](./data-provider-base.authenticatedformdataprovider.md) | This is a custom data provider that uses a pre-shared token to sign a short lived jwt token and send it as a bearer token to the endpoint. On the server side you can then verify the token using this kind of code: | +| [BaseFormDataProvider](./data-provider-base.baseformdataprovider.md) | Base data provider to upload data using a FormData POST. This is a generic class used by all the custom implementations. | + +## Interfaces + +| Interface | Description | +| --- | --- | +| [AssetBuffer](./data-provider-base.assetbuffer.md) | Manual asset buffer we can support for upload | + +## Type Aliases + +| Type Alias | Description | +| --- | --- | +| [FormDataPostHeaders](./data-provider-base.formdatapostheaders.md) | Type for POST headers | +| [FormDataRequestOptions](./data-provider-base.formdatarequestoptions.md) | Request options for fetch (RequestInit) | + diff --git a/data-provider-http-client.httpipfsclientdataprovider._constructor_.md b/data-provider-http-client.httpipfsclientdataprovider._constructor_.md deleted file mode 100644 index 867b742..0000000 --- a/data-provider-http-client.httpipfsclientdataprovider._constructor_.md +++ /dev/null @@ -1,20 +0,0 @@ - - -[Home](./index.md) > [@lukso/data-provider-http-client](./data-provider-http-client.md) > [HttpIPFSClientDataProvider](./data-provider-http-client.httpipfsclientdataprovider.md) > [(constructor)](./data-provider-http-client.httpipfsclientdataprovider._constructor_.md) - -## HttpIPFSClientDataProvider.(constructor) - -Construct a provider using the ipfs-http-client - -**Signature:** - -```typescript -constructor(gateway: string | URL | Options); -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| gateway | string \| URL \| Options | accepts a string, URL or options compatible for the create method | - diff --git a/data-provider-http-client.httpipfsclientdataprovider.md b/data-provider-http-client.httpipfsclientdataprovider.md deleted file mode 100644 index d02ae78..0000000 --- a/data-provider-http-client.httpipfsclientdataprovider.md +++ /dev/null @@ -1,27 +0,0 @@ - - -[Home](./index.md) > [@lukso/data-provider-http-client](./data-provider-http-client.md) > [HttpIPFSClientDataProvider](./data-provider-http-client.httpipfsclientdataprovider.md) - -## HttpIPFSClientDataProvider class - -Data provider for uploading using the ipfs-http-client directly. This is backward compatible with the previous ipfs implementation, but ipfs-http-client has been deprecated in favor of Helia see https://github.com/ipfs/js-ipfs/issues/4336 - -**Signature:** - -```typescript -declare class HttpIPFSClientDataProvider extends BaseFormDataProvider -``` -**Extends:** [BaseFormDataProvider](./data-providers.baseformdataprovider.md) - -## Constructors - -| Constructor | Modifiers | Description | -| --- | --- | --- | -| [(constructor)(gateway)](./data-provider-http-client.httpipfsclientdataprovider._constructor_.md) | | Construct a provider using the ipfs-http-client | - -## Methods - -| Method | Modifiers | Description | -| --- | --- | --- | -| [upload(data, meta)](./data-provider-http-client.httpipfsclientdataprovider.upload.md) | | This is the internal upload function compatible with the base ipfs implementation in order to make the different providers interchangeable. | - diff --git a/data-provider-http-client.httpipfsclientdataprovider.upload.md b/data-provider-http-client.httpipfsclientdataprovider.upload.md deleted file mode 100644 index 0db52e2..0000000 --- a/data-provider-http-client.httpipfsclientdataprovider.upload.md +++ /dev/null @@ -1,27 +0,0 @@ - - -[Home](./index.md) > [@lukso/data-provider-http-client](./data-provider-http-client.md) > [HttpIPFSClientDataProvider](./data-provider-http-client.httpipfsclientdataprovider.md) > [upload](./data-provider-http-client.httpipfsclientdataprovider.upload.md) - -## HttpIPFSClientDataProvider.upload() method - -This is the internal upload function compatible with the base ipfs implementation in order to make the different providers interchangeable. - -**Signature:** - -```typescript -upload(data: any, meta?: FormDataPostHeaders): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| data | any | FormData to upload | -| meta | [FormDataPostHeaders](./data-providers.formdatapostheaders.md) | _(Optional)_ Additional metadata if needed | - -**Returns:** - -Promise<string> - -the URL pointing to the uploaded data (In this case a ipfs:// URL) - diff --git a/data-provider-http-client.md b/data-provider-http-client.md deleted file mode 100644 index 1ee7835..0000000 --- a/data-provider-http-client.md +++ /dev/null @@ -1,12 +0,0 @@ - - -[Home](./index.md) > [@lukso/data-provider-http-client](./data-provider-http-client.md) - -## data-provider-http-client package - -## Classes - -| Class | Description | -| --- | --- | -| [HttpIPFSClientDataProvider](./data-provider-http-client.httpipfsclientdataprovider.md) | Data provider for uploading using the ipfs-http-client directly. This is backward compatible with the previous ipfs implementation, but ipfs-http-client has been deprecated in favor of Helia see https://github.com/ipfs/js-ipfs/issues/4336 | - diff --git a/data-provider-ipfs-http-client.ipfshttpclientprovider._constructor_.md b/data-provider-ipfs-http-client.ipfshttpclientprovider._constructor_.md new file mode 100644 index 0000000..0387d7a --- /dev/null +++ b/data-provider-ipfs-http-client.ipfshttpclientprovider._constructor_.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [@lukso/data-provider-ipfs-http-client](./data-provider-ipfs-http-client.md) > [IPFSHttpClientProvider](./data-provider-ipfs-http-client.ipfshttpclientprovider.md) > [(constructor)](./data-provider-ipfs-http-client.ipfshttpclientprovider._constructor_.md) + +## IPFSHttpClientProvider.(constructor) + +Construct a provider using the ipfs-http-client + +**Signature:** + +```typescript +constructor(gateway: string, options?: FormDataRequestOptions | undefined); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| gateway | string | accepts a string, URL or options compatible for the create method | +| options | [FormDataRequestOptions](./data-provider-base.formdatarequestoptions.md) \| undefined | _(Optional)_ | + diff --git a/data-provider-ipfs-http-client.ipfshttpclientprovider.getendpoint.md b/data-provider-ipfs-http-client.ipfshttpclientprovider.getendpoint.md new file mode 100644 index 0000000..7c2e18d --- /dev/null +++ b/data-provider-ipfs-http-client.ipfshttpclientprovider.getendpoint.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [@lukso/data-provider-ipfs-http-client](./data-provider-ipfs-http-client.md) > [IPFSHttpClientProvider](./data-provider-ipfs-http-client.ipfshttpclientprovider.md) > [getEndpoint](./data-provider-ipfs-http-client.ipfshttpclientprovider.getendpoint.md) + +## IPFSHttpClientProvider.getEndpoint() method + +**Signature:** + +```typescript +getEndpoint(): string; +``` +**Returns:** + +string + diff --git a/data-provider-ipfs-http-client.ipfshttpclientprovider.getrequestoptions.md b/data-provider-ipfs-http-client.ipfshttpclientprovider.getrequestoptions.md new file mode 100644 index 0000000..0a682cf --- /dev/null +++ b/data-provider-ipfs-http-client.ipfshttpclientprovider.getrequestoptions.md @@ -0,0 +1,23 @@ + + +[Home](./index.md) > [@lukso/data-provider-ipfs-http-client](./data-provider-ipfs-http-client.md) > [IPFSHttpClientProvider](./data-provider-ipfs-http-client.ipfshttpclientprovider.md) > [getRequestOptions](./data-provider-ipfs-http-client.ipfshttpclientprovider.getrequestoptions.md) + +## IPFSHttpClientProvider.getRequestOptions() method + +**Signature:** + +```typescript +getRequestOptions(dataContent: FormData, meta?: FormDataPostHeaders): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| dataContent | FormData | | +| meta | [FormDataPostHeaders](./data-provider-base.formdatapostheaders.md) | _(Optional)_ | + +**Returns:** + +Promise<[FormDataRequestOptions](./data-provider-base.formdatarequestoptions.md)> + diff --git a/data-provider-ipfs-http-client.ipfshttpclientprovider.md b/data-provider-ipfs-http-client.ipfshttpclientprovider.md new file mode 100644 index 0000000..ef95e25 --- /dev/null +++ b/data-provider-ipfs-http-client.ipfshttpclientprovider.md @@ -0,0 +1,29 @@ + + +[Home](./index.md) > [@lukso/data-provider-ipfs-http-client](./data-provider-ipfs-http-client.md) > [IPFSHttpClientProvider](./data-provider-ipfs-http-client.ipfshttpclientprovider.md) + +## IPFSHttpClientProvider class + +Data provider for uploading using the ipfs-http-client directly. This is backward compatible with the previous ipfs implementation, but ipfs-http-client has been deprecated in favor of Helia see https://github.com/ipfs/js-ipfs/issues/4336 + +**Signature:** + +```typescript +declare class IPFSHttpClientProvider extends BaseFormDataProvider +``` +**Extends:** [BaseFormDataProvider](./data-provider-base.baseformdataprovider.md) + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)(gateway, options)](./data-provider-ipfs-http-client.ipfshttpclientprovider._constructor_.md) | | Construct a provider using the ipfs-http-client | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [getEndpoint()](./data-provider-ipfs-http-client.ipfshttpclientprovider.getendpoint.md) | | | +| [getRequestOptions(dataContent, meta)](./data-provider-ipfs-http-client.ipfshttpclientprovider.getrequestoptions.md) | | | +| [resolveUrl(result)](./data-provider-ipfs-http-client.ipfshttpclientprovider.resolveurl.md) | | | + diff --git a/data-provider-ipfs-http-client.ipfshttpclientprovider.resolveurl.md b/data-provider-ipfs-http-client.ipfshttpclientprovider.resolveurl.md new file mode 100644 index 0000000..68406e8 --- /dev/null +++ b/data-provider-ipfs-http-client.ipfshttpclientprovider.resolveurl.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [@lukso/data-provider-ipfs-http-client](./data-provider-ipfs-http-client.md) > [IPFSHttpClientProvider](./data-provider-ipfs-http-client.ipfshttpclientprovider.md) > [resolveUrl](./data-provider-ipfs-http-client.ipfshttpclientprovider.resolveurl.md) + +## IPFSHttpClientProvider.resolveUrl() method + +**Signature:** + +```typescript +resolveUrl(result: any): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| result | any | | + +**Returns:** + +string + diff --git a/data-provider-ipfs-http-client.md b/data-provider-ipfs-http-client.md new file mode 100644 index 0000000..1491a7a --- /dev/null +++ b/data-provider-ipfs-http-client.md @@ -0,0 +1,12 @@ + + +[Home](./index.md) > [@lukso/data-provider-ipfs-http-client](./data-provider-ipfs-http-client.md) + +## data-provider-ipfs-http-client package + +## Classes + +| Class | Description | +| --- | --- | +| [IPFSHttpClientProvider](./data-provider-ipfs-http-client.ipfshttpclientprovider.md) | Data provider for uploading using the ipfs-http-client directly. This is backward compatible with the previous ipfs implementation, but ipfs-http-client has been deprecated in favor of Helia see https://github.com/ipfs/js-ipfs/issues/4336 | + diff --git a/data-provider-pinata.md b/data-provider-pinata.md index befdaf6..320c3e1 100644 --- a/data-provider-pinata.md +++ b/data-provider-pinata.md @@ -8,7 +8,7 @@ | Class | Description | | --- | --- | -| [PinataFormDataProvider](./data-provider-pinata.pinataformdataprovider.md) | Custom data provider that directly uploads to pinata It requires the pinata api key, secret key and JWT key to be set According to their documentation only api and secret should work or JWT token. However, in our tests only all three worked. | +| [PinataProvider](./data-provider-pinata.pinataprovider.md) | Custom data provider that directly uploads to pinata It requires the pinata api key, secret key and JWT key to be set According to their documentation only api and secret should work or JWT token. However, in our tests only all three worked. | ## Functions diff --git a/data-provider-pinata.pinataformdataprovider.getendpoint.md b/data-provider-pinata.pinataformdataprovider.getendpoint.md deleted file mode 100644 index 2761de4..0000000 --- a/data-provider-pinata.pinataformdataprovider.getendpoint.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [@lukso/data-provider-pinata](./data-provider-pinata.md) > [PinataFormDataProvider](./data-provider-pinata.pinataformdataprovider.md) > [getEndpoint](./data-provider-pinata.pinataformdataprovider.getendpoint.md) - -## PinataFormDataProvider.getEndpoint() method - -**Signature:** - -```typescript -getEndpoint(): string; -``` -**Returns:** - -string - diff --git a/data-provider-pinata.pinataformdataprovider.getrequestoptions.md b/data-provider-pinata.pinataformdataprovider.getrequestoptions.md deleted file mode 100644 index a1e76f1..0000000 --- a/data-provider-pinata.pinataformdataprovider.getrequestoptions.md +++ /dev/null @@ -1,23 +0,0 @@ - - -[Home](./index.md) > [@lukso/data-provider-pinata](./data-provider-pinata.md) > [PinataFormDataProvider](./data-provider-pinata.pinataformdataprovider.md) > [getRequestOptions](./data-provider-pinata.pinataformdataprovider.getrequestoptions.md) - -## PinataFormDataProvider.getRequestOptions() method - -**Signature:** - -```typescript -getRequestOptions(_dataContent: FormData, meta?: FormDataPostHeaders): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| \_dataContent | FormData | | -| meta | [FormDataPostHeaders](./data-providers.formdatapostheaders.md) | _(Optional)_ | - -**Returns:** - -Promise<[FormDataRequestOptions](./data-providers.formdatarequestoptions.md)> - diff --git a/data-provider-pinata.pinataformdataprovider.md b/data-provider-pinata.pinataformdataprovider.md deleted file mode 100644 index 6370c29..0000000 --- a/data-provider-pinata.pinataformdataprovider.md +++ /dev/null @@ -1,30 +0,0 @@ - - -[Home](./index.md) > [@lukso/data-provider-pinata](./data-provider-pinata.md) > [PinataFormDataProvider](./data-provider-pinata.pinataformdataprovider.md) - -## PinataFormDataProvider class - -Custom data provider that directly uploads to pinata It requires the pinata api key, secret key and JWT key to be set According to their documentation only api and secret should work or JWT token. However, in our tests only all three worked. - -**Signature:** - -```typescript -declare class PinataFormDataProvider extends BaseFormDataProvider -``` -**Extends:** [BaseFormDataProvider](./data-providers.baseformdataprovider.md) - -## Constructors - -| Constructor | Modifiers | Description | -| --- | --- | --- | -| [(constructor)(pinataConfig)](./data-provider-pinata.pinataformdataprovider._constructor_.md) | | Constructs a new instance of the PinataFormDataProvider class | - -## Methods - -| Method | Modifiers | Description | -| --- | --- | --- | -| [addMetadata(dataContent, meta)](./data-provider-pinata.pinataformdataprovider.addmetadata.md) | | | -| [getEndpoint()](./data-provider-pinata.pinataformdataprovider.getendpoint.md) | | | -| [getRequestOptions(\_dataContent, meta)](./data-provider-pinata.pinataformdataprovider.getrequestoptions.md) | | | -| [resolveUrl(result)](./data-provider-pinata.pinataformdataprovider.resolveurl.md) | | | - diff --git a/data-provider-pinata.pinataformdataprovider._constructor_.md b/data-provider-pinata.pinataprovider._constructor_.md similarity index 52% rename from data-provider-pinata.pinataformdataprovider._constructor_.md rename to data-provider-pinata.pinataprovider._constructor_.md index 2173a0d..e293b00 100644 --- a/data-provider-pinata.pinataformdataprovider._constructor_.md +++ b/data-provider-pinata.pinataprovider._constructor_.md @@ -1,10 +1,10 @@ -[Home](./index.md) > [@lukso/data-provider-pinata](./data-provider-pinata.md) > [PinataFormDataProvider](./data-provider-pinata.pinataformdataprovider.md) > [(constructor)](./data-provider-pinata.pinataformdataprovider._constructor_.md) +[Home](./index.md) > [@lukso/data-provider-pinata](./data-provider-pinata.md) > [PinataProvider](./data-provider-pinata.pinataprovider.md) > [(constructor)](./data-provider-pinata.pinataprovider._constructor_.md) -## PinataFormDataProvider.(constructor) +## PinataProvider.(constructor) -Constructs a new instance of the `PinataFormDataProvider` class +Constructs a new instance of the `PinataProvider` class **Signature:** diff --git a/data-provider-pinata.pinataformdataprovider.addmetadata.md b/data-provider-pinata.pinataprovider.addmetadata.md similarity index 54% rename from data-provider-pinata.pinataformdataprovider.addmetadata.md rename to data-provider-pinata.pinataprovider.addmetadata.md index c291a72..d39b532 100644 --- a/data-provider-pinata.pinataformdataprovider.addmetadata.md +++ b/data-provider-pinata.pinataprovider.addmetadata.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [@lukso/data-provider-pinata](./data-provider-pinata.md) > [PinataFormDataProvider](./data-provider-pinata.pinataformdataprovider.md) > [addMetadata](./data-provider-pinata.pinataformdataprovider.addmetadata.md) +[Home](./index.md) > [@lukso/data-provider-pinata](./data-provider-pinata.md) > [PinataProvider](./data-provider-pinata.pinataprovider.md) > [addMetadata](./data-provider-pinata.pinataprovider.addmetadata.md) -## PinataFormDataProvider.addMetadata() method +## PinataProvider.addMetadata() method **Signature:** @@ -15,7 +15,7 @@ addMetadata(dataContent: FormData, meta?: FormDataPostHeaders): Promise; | Parameter | Type | Description | | --- | --- | --- | | dataContent | FormData | | -| meta | [FormDataPostHeaders](./data-providers.formdatapostheaders.md) | _(Optional)_ | +| meta | [FormDataPostHeaders](./data-provider-base.formdatapostheaders.md) | _(Optional)_ | **Returns:** diff --git a/data-provider-pinata.pinataprovider.getendpoint.md b/data-provider-pinata.pinataprovider.getendpoint.md new file mode 100644 index 0000000..94707e2 --- /dev/null +++ b/data-provider-pinata.pinataprovider.getendpoint.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [@lukso/data-provider-pinata](./data-provider-pinata.md) > [PinataProvider](./data-provider-pinata.pinataprovider.md) > [getEndpoint](./data-provider-pinata.pinataprovider.getendpoint.md) + +## PinataProvider.getEndpoint() method + +**Signature:** + +```typescript +getEndpoint(): string; +``` +**Returns:** + +string + diff --git a/data-provider-pinata.pinataprovider.getrequestoptions.md b/data-provider-pinata.pinataprovider.getrequestoptions.md new file mode 100644 index 0000000..a302012 --- /dev/null +++ b/data-provider-pinata.pinataprovider.getrequestoptions.md @@ -0,0 +1,23 @@ + + +[Home](./index.md) > [@lukso/data-provider-pinata](./data-provider-pinata.md) > [PinataProvider](./data-provider-pinata.pinataprovider.md) > [getRequestOptions](./data-provider-pinata.pinataprovider.getrequestoptions.md) + +## PinataProvider.getRequestOptions() method + +**Signature:** + +```typescript +getRequestOptions(_dataContent: FormData, meta?: FormDataPostHeaders): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| \_dataContent | FormData | | +| meta | [FormDataPostHeaders](./data-provider-base.formdatapostheaders.md) | _(Optional)_ | + +**Returns:** + +Promise<[FormDataRequestOptions](./data-provider-base.formdatarequestoptions.md)> + diff --git a/data-provider-pinata.pinataprovider.md b/data-provider-pinata.pinataprovider.md new file mode 100644 index 0000000..5f6c607 --- /dev/null +++ b/data-provider-pinata.pinataprovider.md @@ -0,0 +1,30 @@ + + +[Home](./index.md) > [@lukso/data-provider-pinata](./data-provider-pinata.md) > [PinataProvider](./data-provider-pinata.pinataprovider.md) + +## PinataProvider class + +Custom data provider that directly uploads to pinata It requires the pinata api key, secret key and JWT key to be set According to their documentation only api and secret should work or JWT token. However, in our tests only all three worked. + +**Signature:** + +```typescript +declare class PinataProvider extends BaseFormDataProvider +``` +**Extends:** [BaseFormDataProvider](./data-provider-base.baseformdataprovider.md) + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [(constructor)(pinataConfig)](./data-provider-pinata.pinataprovider._constructor_.md) | | Constructs a new instance of the PinataProvider class | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [addMetadata(dataContent, meta)](./data-provider-pinata.pinataprovider.addmetadata.md) | | | +| [getEndpoint()](./data-provider-pinata.pinataprovider.getendpoint.md) | | | +| [getRequestOptions(\_dataContent, meta)](./data-provider-pinata.pinataprovider.getrequestoptions.md) | | | +| [resolveUrl(result)](./data-provider-pinata.pinataprovider.resolveurl.md) | | | + diff --git a/data-provider-pinata.pinataformdataprovider.resolveurl.md b/data-provider-pinata.pinataprovider.resolveurl.md similarity index 57% rename from data-provider-pinata.pinataformdataprovider.resolveurl.md rename to data-provider-pinata.pinataprovider.resolveurl.md index 535b13b..81f002d 100644 --- a/data-provider-pinata.pinataformdataprovider.resolveurl.md +++ b/data-provider-pinata.pinataprovider.resolveurl.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [@lukso/data-provider-pinata](./data-provider-pinata.md) > [PinataFormDataProvider](./data-provider-pinata.pinataformdataprovider.md) > [resolveUrl](./data-provider-pinata.pinataformdataprovider.resolveurl.md) +[Home](./index.md) > [@lukso/data-provider-pinata](./data-provider-pinata.md) > [PinataProvider](./data-provider-pinata.pinataprovider.md) > [resolveUrl](./data-provider-pinata.pinataprovider.resolveurl.md) -## PinataFormDataProvider.resolveUrl() method +## PinataProvider.resolveUrl() method **Signature:** diff --git a/data-provider-urlresolver.md b/data-provider-urlresolver.md new file mode 100644 index 0000000..128d95a --- /dev/null +++ b/data-provider-urlresolver.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@lukso/data-provider-urlresolver](./data-provider-urlresolver.md) + +## data-provider-urlresolver package + +## Classes + +| Class | Description | +| --- | --- | +| [UrlConverter](./data-provider-urlresolver.urlconverter.md) | It will relatively append pathname or hostname to the desination URL | +| [UrlResolver](./data-provider-urlresolver.urlresolver.md) | UrlResolver resolved URLs to gateway URLs. | + diff --git a/data-providers.urlconverter._constructor_.md b/data-provider-urlresolver.urlconverter._constructor_.md similarity index 62% rename from data-providers.urlconverter._constructor_.md rename to data-provider-urlresolver.urlconverter._constructor_.md index 371d966..18eb448 100644 --- a/data-providers.urlconverter._constructor_.md +++ b/data-provider-urlresolver.urlconverter._constructor_.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [UrlConverter](./data-providers.urlconverter.md) > [(constructor)](./data-providers.urlconverter._constructor_.md) +[Home](./index.md) > [@lukso/data-provider-urlresolver](./data-provider-urlresolver.md) > [UrlConverter](./data-provider-urlresolver.urlconverter.md) > [(constructor)](./data-provider-urlresolver.urlconverter._constructor_.md) ## UrlConverter.(constructor) diff --git a/data-provider-urlresolver.urlconverter.destination.md b/data-provider-urlresolver.urlconverter.destination.md new file mode 100644 index 0000000..d017283 --- /dev/null +++ b/data-provider-urlresolver.urlconverter.destination.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@lukso/data-provider-urlresolver](./data-provider-urlresolver.md) > [UrlConverter](./data-provider-urlresolver.urlconverter.md) > [destination](./data-provider-urlresolver.urlconverter.destination.md) + +## UrlConverter.destination property + +**Signature:** + +```typescript +protected destination: string; +``` diff --git a/data-provider-urlresolver.urlconverter.match.md b/data-provider-urlresolver.urlconverter.match.md new file mode 100644 index 0000000..1f78a4b --- /dev/null +++ b/data-provider-urlresolver.urlconverter.match.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@lukso/data-provider-urlresolver](./data-provider-urlresolver.md) > [UrlConverter](./data-provider-urlresolver.urlconverter.md) > [match](./data-provider-urlresolver.urlconverter.match.md) + +## UrlConverter.match property + +**Signature:** + +```typescript +protected match?: RegExp | string; +``` diff --git a/data-providers.urlconverter.md b/data-provider-urlresolver.urlconverter.md similarity index 52% rename from data-providers.urlconverter.md rename to data-provider-urlresolver.urlconverter.md index 7b4d87f..1d7f15c 100644 --- a/data-providers.urlconverter.md +++ b/data-provider-urlresolver.urlconverter.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [UrlConverter](./data-providers.urlconverter.md) +[Home](./index.md) > [@lukso/data-provider-urlresolver](./data-provider-urlresolver.md) > [UrlConverter](./data-provider-urlresolver.urlconverter.md) ## UrlConverter class @@ -29,18 +29,18 @@ output=https://some.api.gateway/something/ipfs/somewhere | Constructor | Modifiers | Description | | --- | --- | --- | -| [(constructor)(destination, match)](./data-providers.urlconverter._constructor_.md) | | Constructs a new instance of the UrlConverter class | +| [(constructor)(destination, match)](./data-provider-urlresolver.urlconverter._constructor_.md) | | Constructs a new instance of the UrlConverter class | ## Properties | Property | Modifiers | Type | Description | | --- | --- | --- | --- | -| [destination](./data-providers.urlconverter.destination.md) | protected | string | | -| [match?](./data-providers.urlconverter.match.md) | protected | RegExp \| string | _(Optional)_ | +| [destination](./data-provider-urlresolver.urlconverter.destination.md) | protected | string | | +| [match?](./data-provider-urlresolver.urlconverter.match.md) | protected | RegExp \| string | _(Optional)_ | ## Methods | Method | Modifiers | Description | | --- | --- | --- | -| [resolveUrl(match, url)](./data-providers.urlconverter.resolveurl.md) | | | +| [resolveUrl(match, url)](./data-provider-urlresolver.urlconverter.resolveurl.md) | | | diff --git a/data-providers.urlconverter.resolveurl.md b/data-provider-urlresolver.urlconverter.resolveurl.md similarity index 58% rename from data-providers.urlconverter.resolveurl.md rename to data-provider-urlresolver.urlconverter.resolveurl.md index ff209a0..f1582d1 100644 --- a/data-providers.urlconverter.resolveurl.md +++ b/data-provider-urlresolver.urlconverter.resolveurl.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [UrlConverter](./data-providers.urlconverter.md) > [resolveUrl](./data-providers.urlconverter.resolveurl.md) +[Home](./index.md) > [@lukso/data-provider-urlresolver](./data-provider-urlresolver.md) > [UrlConverter](./data-provider-urlresolver.urlconverter.md) > [resolveUrl](./data-provider-urlresolver.urlconverter.resolveurl.md) ## UrlConverter.resolveUrl() method diff --git a/data-providers.urlresolver._constructor_.md b/data-provider-urlresolver.urlresolver._constructor_.md similarity index 56% rename from data-providers.urlresolver._constructor_.md rename to data-provider-urlresolver.urlresolver._constructor_.md index a229ae8..bead915 100644 --- a/data-providers.urlresolver._constructor_.md +++ b/data-provider-urlresolver.urlresolver._constructor_.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [UrlResolver](./data-providers.urlresolver.md) > [(constructor)](./data-providers.urlresolver._constructor_.md) +[Home](./index.md) > [@lukso/data-provider-urlresolver](./data-provider-urlresolver.md) > [UrlResolver](./data-provider-urlresolver.urlresolver.md) > [(constructor)](./data-provider-urlresolver.urlresolver._constructor_.md) ## UrlResolver.(constructor) @@ -16,5 +16,5 @@ constructor(converters: Array<[string | RegExp, UrlConverter | string]>); | Parameter | Type | Description | | --- | --- | --- | -| converters | Array<\[string \| RegExp, [UrlConverter](./data-providers.urlconverter.md) \| string\]> | | +| converters | Array<\[string \| RegExp, [UrlConverter](./data-provider-urlresolver.urlconverter.md) \| string\]> | | diff --git a/data-providers.urlresolver.md b/data-provider-urlresolver.urlresolver.md similarity index 55% rename from data-providers.urlresolver.md rename to data-provider-urlresolver.urlresolver.md index dd573da..139a5dc 100644 --- a/data-providers.urlresolver.md +++ b/data-provider-urlresolver.urlresolver.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [UrlResolver](./data-providers.urlresolver.md) +[Home](./index.md) > [@lukso/data-provider-urlresolver](./data-provider-urlresolver.md) > [UrlResolver](./data-provider-urlresolver.urlresolver.md) ## UrlResolver class @@ -28,11 +28,11 @@ resolver.resolveUrl("ipfs://QmSomeHash") // https://some.api.gateway/something/i | Constructor | Modifiers | Description | | --- | --- | --- | -| [(constructor)(converters)](./data-providers.urlresolver._constructor_.md) | | Constructs a new instance of the UrlResolver class | +| [(constructor)(converters)](./data-provider-urlresolver.urlresolver._constructor_.md) | | Constructs a new instance of the UrlResolver class | ## Methods | Method | Modifiers | Description | | --- | --- | --- | -| [resolveUrl(url)](./data-providers.urlresolver.resolveurl.md) | | Resolves a URL to a gateway URL. Supports possible multiple converters transforming the URL in sequence until no converter matches. | +| [resolveUrl(url)](./data-provider-urlresolver.urlresolver.resolveurl.md) | | Resolves a URL to a gateway URL. Supports possible multiple converters transforming the URL in sequence until no converter matches. | diff --git a/data-providers.urlresolver.resolveurl.md b/data-provider-urlresolver.urlresolver.resolveurl.md similarity index 67% rename from data-providers.urlresolver.resolveurl.md rename to data-provider-urlresolver.urlresolver.resolveurl.md index 7dddc1a..e493574 100644 --- a/data-providers.urlresolver.resolveurl.md +++ b/data-provider-urlresolver.urlresolver.resolveurl.md @@ -1,6 +1,6 @@ -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [UrlResolver](./data-providers.urlresolver.md) > [resolveUrl](./data-providers.urlresolver.resolveurl.md) +[Home](./index.md) > [@lukso/data-provider-urlresolver](./data-provider-urlresolver.md) > [UrlResolver](./data-provider-urlresolver.urlresolver.md) > [resolveUrl](./data-provider-urlresolver.urlresolver.resolveurl.md) ## UrlResolver.resolveUrl() method diff --git a/data-providers.assetbuffer.buffer.md b/data-providers.assetbuffer.buffer.md deleted file mode 100644 index dcdd52f..0000000 --- a/data-providers.assetbuffer.buffer.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [AssetBuffer](./data-providers.assetbuffer.md) > [buffer](./data-providers.assetbuffer.buffer.md) - -## AssetBuffer.buffer property - -buffer Buffer - buffer to the data - -**Signature:** - -```typescript -buffer: Buffer; -``` diff --git a/data-providers.assetbuffer.md b/data-providers.assetbuffer.md deleted file mode 100644 index 011e066..0000000 --- a/data-providers.assetbuffer.md +++ /dev/null @@ -1,21 +0,0 @@ - - -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [AssetBuffer](./data-providers.assetbuffer.md) - -## AssetBuffer interface - -Manual asset buffer we can support for upload - -**Signature:** - -```typescript -interface AssetBuffer -``` - -## Properties - -| Property | Modifiers | Type | Description | -| --- | --- | --- | --- | -| [buffer](./data-providers.assetbuffer.buffer.md) | | Buffer | buffer Buffer - buffer to the data | -| [mimeType](./data-providers.assetbuffer.mimetype.md) | | string | mimeType string - set mimetype for the buffer | - diff --git a/data-providers.authenticatedformdataprovider.getheaders.md b/data-providers.authenticatedformdataprovider.getheaders.md deleted file mode 100644 index 395b576..0000000 --- a/data-providers.authenticatedformdataprovider.getheaders.md +++ /dev/null @@ -1,27 +0,0 @@ - - -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [AuthenticatedFormDataProvider](./data-providers.authenticatedformdataprovider.md) > [getHeaders](./data-providers.authenticatedformdataprovider.getheaders.md) - -## AuthenticatedFormDataProvider.getHeaders() method - -**Signature:** - -```typescript -getHeaders(dataContent: FormData, meta?: FormDataPostHeaders): Promise<{ - Authorization: string; - }>; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| dataContent | FormData | FormData content to be sent (ignored in this case) | -| meta | [FormDataPostHeaders](./data-providers.formdatapostheaders.md) | _(Optional)_ Optional additional meta data (ignored in this case) | - -**Returns:** - -Promise<{ Authorization: string; }> - -The headers to attach to the FormData POST (in this case containing bearer token) - diff --git a/data-providers.baseformdataprovider.addmetadata.md b/data-providers.baseformdataprovider.addmetadata.md deleted file mode 100644 index c28bf98..0000000 --- a/data-providers.baseformdataprovider.addmetadata.md +++ /dev/null @@ -1,23 +0,0 @@ - - -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [BaseFormDataProvider](./data-providers.baseformdataprovider.md) > [addMetadata](./data-providers.baseformdataprovider.addmetadata.md) - -## BaseFormDataProvider.addMetadata() method - -**Signature:** - -```typescript -addMetadata(dataContent: FormData$1, meta?: FormDataPostHeaders): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| dataContent | FormData$1 | | -| meta | [FormDataPostHeaders](./data-providers.formdatapostheaders.md) | _(Optional)_ | - -**Returns:** - -Promise<void> - diff --git a/data-providers.baseformdataprovider.getrequestoptions.md b/data-providers.baseformdataprovider.getrequestoptions.md deleted file mode 100644 index bf32e7c..0000000 --- a/data-providers.baseformdataprovider.getrequestoptions.md +++ /dev/null @@ -1,27 +0,0 @@ - - -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [BaseFormDataProvider](./data-providers.baseformdataprovider.md) > [getRequestOptions](./data-providers.baseformdataprovider.getrequestoptions.md) - -## BaseFormDataProvider.getRequestOptions() method - -Construct options for the underlying fetch call. - -**Signature:** - -```typescript -getRequestOptions(dataContent: FormData$1, meta?: FormDataPostHeaders): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| dataContent | FormData$1 | content to upload | -| meta | [FormDataPostHeaders](./data-providers.formdatapostheaders.md) | _(Optional)_ optional meta data | - -**Returns:** - -Promise<[FormDataRequestOptions](./data-providers.formdatarequestoptions.md)> - -return request options for fetch. - diff --git a/data-providers.baseformdataprovider.md b/data-providers.baseformdataprovider.md deleted file mode 100644 index 66eb416..0000000 --- a/data-providers.baseformdataprovider.md +++ /dev/null @@ -1,25 +0,0 @@ - - -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [BaseFormDataProvider](./data-providers.baseformdataprovider.md) - -## BaseFormDataProvider class - -Base data provider to upload data using a FormData POST. This is a generic class used by all the custom implementations. - -**Signature:** - -```typescript -declare class BaseFormDataProvider -``` - -## Methods - -| Method | Modifiers | Description | -| --- | --- | --- | -| [addMetadata(dataContent, meta)](./data-providers.baseformdataprovider.addmetadata.md) | | | -| [getEndpoint()](./data-providers.baseformdataprovider.getendpoint.md) | | Return the endpoint to allow this be used with an old ipfs-http-client implementation. If the proxy is running at /api/v0/add for pinning then you can use the ipfs-http-client pointed to /api/v0 and it will add /add to the end before sending the FormData to the server. This allows you to create a proxy that can be used with the ipfs-http-client. | -| [getPostEndpoint()](./data-providers.baseformdataprovider.getpostendpoint.md) | | Return the fetch endpoint this is going to. Must be overridden by a more specific implementation. | -| [getRequestOptions(dataContent, meta)](./data-providers.baseformdataprovider.getrequestoptions.md) | | Construct options for the underlying fetch call. | -| [getToken()](./data-providers.baseformdataprovider.gettoken.md) | | Return a token if this provider requires authentication. | -| [resolveUrl(result)](./data-providers.baseformdataprovider.resolveurl.md) | | Convert the upload JSON result to a URL. In most of the current cases it will read Hash or IpfsHash and return ipfs://${hash}. | - diff --git a/data-providers.customheaderformdataprovider._constructor_.md b/data-providers.customheaderformdataprovider._constructor_.md deleted file mode 100644 index 868c880..0000000 --- a/data-providers.customheaderformdataprovider._constructor_.md +++ /dev/null @@ -1,21 +0,0 @@ - - -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [CustomHeaderFormDataProvider](./data-providers.customheaderformdataprovider.md) > [(constructor)](./data-providers.customheaderformdataprovider._constructor_.md) - -## CustomHeaderFormDataProvider.(constructor) - -Constructs a new instance of the `CustomHeaderFormDataProvider` class - -**Signature:** - -```typescript -constructor(endpoint: string, headers: FormDataPostHeaders); -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| endpoint | string | | -| headers | [FormDataPostHeaders](./data-providers.formdatapostheaders.md) | | - diff --git a/data-providers.customheaderformdataprovider.getendpoint.md b/data-providers.customheaderformdataprovider.getendpoint.md deleted file mode 100644 index 9df98b8..0000000 --- a/data-providers.customheaderformdataprovider.getendpoint.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [CustomHeaderFormDataProvider](./data-providers.customheaderformdataprovider.md) > [getEndpoint](./data-providers.customheaderformdataprovider.getendpoint.md) - -## CustomHeaderFormDataProvider.getEndpoint() method - -**Signature:** - -```typescript -getEndpoint(): string; -``` -**Returns:** - -string - diff --git a/data-providers.customheaderformdataprovider.getheaders.md b/data-providers.customheaderformdataprovider.getheaders.md deleted file mode 100644 index c080f86..0000000 --- a/data-providers.customheaderformdataprovider.getheaders.md +++ /dev/null @@ -1,23 +0,0 @@ - - -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [CustomHeaderFormDataProvider](./data-providers.customheaderformdataprovider.md) > [getHeaders](./data-providers.customheaderformdataprovider.getheaders.md) - -## CustomHeaderFormDataProvider.getHeaders() method - -**Signature:** - -```typescript -getHeaders(dataContent: FormData, meta?: FormDataPostHeaders): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| dataContent | FormData | | -| meta | [FormDataPostHeaders](./data-providers.formdatapostheaders.md) | _(Optional)_ | - -**Returns:** - -Promise<[FormDataPostHeaders](./data-providers.formdatapostheaders.md)> - diff --git a/data-providers.customheaderformdataprovider.getrequestoptions.md b/data-providers.customheaderformdataprovider.getrequestoptions.md deleted file mode 100644 index c3eb838..0000000 --- a/data-providers.customheaderformdataprovider.getrequestoptions.md +++ /dev/null @@ -1,23 +0,0 @@ - - -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [CustomHeaderFormDataProvider](./data-providers.customheaderformdataprovider.md) > [getRequestOptions](./data-providers.customheaderformdataprovider.getrequestoptions.md) - -## CustomHeaderFormDataProvider.getRequestOptions() method - -**Signature:** - -```typescript -getRequestOptions(_dataContent: FormData, meta?: FormDataPostHeaders): Promise; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| \_dataContent | FormData | | -| meta | [FormDataPostHeaders](./data-providers.formdatapostheaders.md) | _(Optional)_ | - -**Returns:** - -Promise<[FormDataRequestOptions](./data-providers.formdatarequestoptions.md)> - diff --git a/data-providers.customheaderformdataprovider.gettoken.md b/data-providers.customheaderformdataprovider.gettoken.md deleted file mode 100644 index ee3c68c..0000000 --- a/data-providers.customheaderformdataprovider.gettoken.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [CustomHeaderFormDataProvider](./data-providers.customheaderformdataprovider.md) > [getToken](./data-providers.customheaderformdataprovider.gettoken.md) - -## CustomHeaderFormDataProvider.getToken() method - -**Signature:** - -```typescript -getToken(): Promise; -``` -**Returns:** - -Promise<string> - diff --git a/data-providers.customheaderformdataprovider.md b/data-providers.customheaderformdataprovider.md deleted file mode 100644 index 215bb62..0000000 --- a/data-providers.customheaderformdataprovider.md +++ /dev/null @@ -1,30 +0,0 @@ - - -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [CustomHeaderFormDataProvider](./data-providers.customheaderformdataprovider.md) - -## CustomHeaderFormDataProvider class - -This is a custom data provider that allows you to pass custom headers as part of the form POST request to the endpoint. One example of this is used when you secure a pinata or infura endpoint with your own private proxy accepting a bearer token for example. - -**Signature:** - -```typescript -declare class CustomHeaderFormDataProvider extends BaseFormDataProvider -``` -**Extends:** [BaseFormDataProvider](./data-providers.baseformdataprovider.md) - -## Constructors - -| Constructor | Modifiers | Description | -| --- | --- | --- | -| [(constructor)(endpoint, headers)](./data-providers.customheaderformdataprovider._constructor_.md) | | Constructs a new instance of the CustomHeaderFormDataProvider class | - -## Methods - -| Method | Modifiers | Description | -| --- | --- | --- | -| [getEndpoint()](./data-providers.customheaderformdataprovider.getendpoint.md) | | | -| [getHeaders(dataContent, meta)](./data-providers.customheaderformdataprovider.getheaders.md) | | | -| [getRequestOptions(\_dataContent, meta)](./data-providers.customheaderformdataprovider.getrequestoptions.md) | | | -| [getToken()](./data-providers.customheaderformdataprovider.gettoken.md) | | | - diff --git a/data-providers.md b/data-providers.md deleted file mode 100644 index 1191f82..0000000 --- a/data-providers.md +++ /dev/null @@ -1,29 +0,0 @@ - - -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) - -## data-providers package - -## Classes - -| Class | Description | -| --- | --- | -| [AuthenticatedFormDataProvider](./data-providers.authenticatedformdataprovider.md) | This is a custom data provider that uses a pre-shared token to sign a short lived jwt token and send it as a bearer token to the endpoint. On the server side you can then verify the token using this kind of code: | -| [BaseFormDataProvider](./data-providers.baseformdataprovider.md) | Base data provider to upload data using a FormData POST. This is a generic class used by all the custom implementations. | -| [CustomHeaderFormDataProvider](./data-providers.customheaderformdataprovider.md) | This is a custom data provider that allows you to pass custom headers as part of the form POST request to the endpoint. One example of this is used when you secure a pinata or infura endpoint with your own private proxy accepting a bearer token for example. | -| [UrlConverter](./data-providers.urlconverter.md) | It will relatively append pathname or hostname to the desination URL | -| [UrlResolver](./data-providers.urlresolver.md) | UrlResolver resolved URLs to gateway URLs. | - -## Interfaces - -| Interface | Description | -| --- | --- | -| [AssetBuffer](./data-providers.assetbuffer.md) | Manual asset buffer we can support for upload | - -## Type Aliases - -| Type Alias | Description | -| --- | --- | -| [FormDataPostHeaders](./data-providers.formdatapostheaders.md) | Type for POST headers | -| [FormDataRequestOptions](./data-providers.formdatarequestoptions.md) | Request options for fetch (RequestInit) | - diff --git a/data-providers.urlconverter.destination.md b/data-providers.urlconverter.destination.md deleted file mode 100644 index 12984b1..0000000 --- a/data-providers.urlconverter.destination.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [UrlConverter](./data-providers.urlconverter.md) > [destination](./data-providers.urlconverter.destination.md) - -## UrlConverter.destination property - -**Signature:** - -```typescript -protected destination: string; -``` diff --git a/data-providers.urlconverter.match.md b/data-providers.urlconverter.match.md deleted file mode 100644 index c324c57..0000000 --- a/data-providers.urlconverter.match.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@lukso/data-providers](./data-providers.md) > [UrlConverter](./data-providers.urlconverter.md) > [match](./data-providers.urlconverter.match.md) - -## UrlConverter.match property - -**Signature:** - -```typescript -protected match?: RegExp | string; -``` diff --git a/index.md b/index.md index 744d57e..51ab25f 100644 --- a/index.md +++ b/index.md @@ -8,7 +8,8 @@ | Package | Description | | --- | --- | -| [@lukso/data-provider-http-client](./data-provider-http-client.md) | | +| [@lukso/data-provider-base](./data-provider-base.md) | | +| [@lukso/data-provider-ipfs-http-client](./data-provider-ipfs-http-client.md) | | | [@lukso/data-provider-pinata](./data-provider-pinata.md) | | -| [@lukso/data-providers](./data-providers.md) | | +| [@lukso/data-provider-urlresolver](./data-provider-urlresolver.md) | |