Skip to content

Commit

Permalink
deploy: b23ad8c
Browse files Browse the repository at this point in the history
  • Loading branch information
richtera committed Feb 5, 2024
1 parent cd75527 commit 1b080f7
Show file tree
Hide file tree
Showing 62 changed files with 448 additions and 506 deletions.
13 changes: 13 additions & 0 deletions data-provider-base.assetbuffer.buffer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@lukso/data-provider-base](./data-provider-base.md) &gt; [AssetBuffer](./data-provider-base.assetbuffer.md) &gt; [buffer](./data-provider-base.assetbuffer.buffer.md)

## AssetBuffer.buffer property

buffer Buffer - buffer to the data

**Signature:**

```typescript
buffer: Buffer;
```
21 changes: 21 additions & 0 deletions data-provider-base.assetbuffer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@lukso/data-provider-base](./data-provider-base.md) &gt; [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 |

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@lukso/data-providers](./data-providers.md) &gt; [AssetBuffer](./data-providers.assetbuffer.md) &gt; [mimeType](./data-providers.assetbuffer.mimetype.md)
[Home](./index.md) &gt; [@lukso/data-provider-base](./data-provider-base.md) &gt; [AssetBuffer](./data-provider-base.assetbuffer.md) &gt; [mimeType](./data-provider-base.assetbuffer.mimetype.md)

## AssetBuffer.mimeType property

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@lukso/data-provider-base](./data-provider-base.md) &gt; [AuthenticatedFormDataProvider](./data-provider-base.authenticatedformdataprovider.md) &gt; [getRequestOptions](./data-provider-base.authenticatedformdataprovider.getrequestoptions.md)

## AuthenticatedFormDataProvider.getRequestOptions() method

**Signature:**

```typescript
getRequestOptions(dataContent: FormData, meta?: FormDataPostHeaders): Promise<FormDataRequestOptions>;
```

## 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&lt;[FormDataRequestOptions](./data-provider-base.formdatarequestoptions.md)<!-- -->&gt;

Attaches the headers with bearer token.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@lukso/data-providers](./data-providers.md) &gt; [AuthenticatedFormDataProvider](./data-providers.authenticatedformdataprovider.md) &gt; [getToken](./data-providers.authenticatedformdataprovider.gettoken.md)
[Home](./index.md) &gt; [@lukso/data-provider-base](./data-provider-base.md) &gt; [AuthenticatedFormDataProvider](./data-provider-base.authenticatedformdataprovider.md) &gt; [getToken](./data-provider-base.authenticatedformdataprovider.gettoken.md)

## AuthenticatedFormDataProvider.getToken() method

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@lukso/data-providers](./data-providers.md) &gt; [AuthenticatedFormDataProvider](./data-providers.authenticatedformdataprovider.md)
[Home](./index.md) &gt; [@lukso/data-provider-base](./data-provider-base.md) &gt; [AuthenticatedFormDataProvider](./data-provider-base.authenticatedformdataprovider.md)

## AuthenticatedFormDataProvider class

Expand All @@ -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
Expand All @@ -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. |

23 changes: 23 additions & 0 deletions data-provider-base.baseformdataprovider.addmetadata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@lukso/data-provider-base](./data-provider-base.md) &gt; [BaseFormDataProvider](./data-provider-base.baseformdataprovider.md) &gt; [addMetadata](./data-provider-base.baseformdataprovider.addmetadata.md)

## BaseFormDataProvider.addMetadata() method

**Signature:**

```typescript
addMetadata(dataContent: FormData, meta?: FormDataPostHeaders): Promise<void>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| dataContent | FormData | |
| meta | [FormDataPostHeaders](./data-provider-base.formdatapostheaders.md) | _(Optional)_ |

**Returns:**

Promise&lt;void&gt;

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@lukso/data-providers](./data-providers.md) &gt; [BaseFormDataProvider](./data-providers.baseformdataprovider.md) &gt; [getEndpoint](./data-providers.baseformdataprovider.getendpoint.md)
[Home](./index.md) &gt; [@lukso/data-provider-base](./data-provider-base.md) &gt; [BaseFormDataProvider](./data-provider-base.baseformdataprovider.md) &gt; [getEndpoint](./data-provider-base.baseformdataprovider.getendpoint.md)

## BaseFormDataProvider.getEndpoint() method

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@lukso/data-providers](./data-providers.md) &gt; [BaseFormDataProvider](./data-providers.baseformdataprovider.md) &gt; [getPostEndpoint](./data-providers.baseformdataprovider.getpostendpoint.md)
[Home](./index.md) &gt; [@lukso/data-provider-base](./data-provider-base.md) &gt; [BaseFormDataProvider](./data-provider-base.baseformdataprovider.md) &gt; [getPostEndpoint](./data-provider-base.baseformdataprovider.getpostendpoint.md)

## BaseFormDataProvider.getPostEndpoint() method

Expand Down
27 changes: 27 additions & 0 deletions data-provider-base.baseformdataprovider.getrequestoptions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@lukso/data-provider-base](./data-provider-base.md) &gt; [BaseFormDataProvider](./data-provider-base.baseformdataprovider.md) &gt; [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<FormDataRequestOptions>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| dataContent | FormData | content to upload |
| meta | [FormDataPostHeaders](./data-provider-base.formdatapostheaders.md) | _(Optional)_ optional meta data |

**Returns:**

Promise&lt;[FormDataRequestOptions](./data-provider-base.formdatarequestoptions.md)<!-- -->&gt;

return request options for fetch.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@lukso/data-providers](./data-providers.md) &gt; [BaseFormDataProvider](./data-providers.baseformdataprovider.md) &gt; [getToken](./data-providers.baseformdataprovider.gettoken.md)
[Home](./index.md) &gt; [@lukso/data-provider-base](./data-provider-base.md) &gt; [BaseFormDataProvider](./data-provider-base.baseformdataprovider.md) &gt; [getToken](./data-provider-base.baseformdataprovider.gettoken.md)

## BaseFormDataProvider.getToken() method

Expand Down
26 changes: 26 additions & 0 deletions data-provider-base.baseformdataprovider.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@lukso/data-provider-base](./data-provider-base.md) &gt; [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 <code>ipfs://${hash}</code>. |
| [wrapStream(data)](./data-provider-base.baseformdataprovider.wrapstream.md) | <code>protected</code> | |

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@lukso/data-providers](./data-providers.md) &gt; [BaseFormDataProvider](./data-providers.baseformdataprovider.md) &gt; [resolveUrl](./data-providers.baseformdataprovider.resolveurl.md)
[Home](./index.md) &gt; [@lukso/data-provider-base](./data-provider-base.md) &gt; [BaseFormDataProvider](./data-provider-base.baseformdataprovider.md) &gt; [resolveUrl](./data-provider-base.baseformdataprovider.resolveurl.md)

## BaseFormDataProvider.resolveUrl() method

Expand Down
22 changes: 22 additions & 0 deletions data-provider-base.baseformdataprovider.wrapstream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@lukso/data-provider-base](./data-provider-base.md) &gt; [BaseFormDataProvider](./data-provider-base.baseformdataprovider.md) &gt; [wrapStream](./data-provider-base.baseformdataprovider.wrapstream.md)

## BaseFormDataProvider.wrapStream() method

**Signature:**

```typescript
protected wrapStream(data: any): Promise<any>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| data | any | |

**Returns:**

Promise&lt;any&gt;

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@lukso/data-providers](./data-providers.md) &gt; [FormDataPostHeaders](./data-providers.formdatapostheaders.md)
[Home](./index.md) &gt; [@lukso/data-provider-base](./data-provider-base.md) &gt; [FormDataPostHeaders](./data-provider-base.formdatapostheaders.md)

## FormDataPostHeaders type

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@lukso/data-providers](./data-providers.md) &gt; [FormDataRequestOptions](./data-providers.formdatarequestoptions.md)
[Home](./index.md) &gt; [@lukso/data-provider-base](./data-provider-base.md) &gt; [FormDataRequestOptions](./data-provider-base.formdatarequestoptions.md)

## FormDataRequestOptions type

Expand All @@ -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)

26 changes: 26 additions & 0 deletions data-provider-base.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@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) |

This file was deleted.

27 changes: 0 additions & 27 deletions data-provider-http-client.httpipfsclientdataprovider.md

This file was deleted.

27 changes: 0 additions & 27 deletions data-provider-http-client.httpipfsclientdataprovider.upload.md

This file was deleted.

12 changes: 0 additions & 12 deletions data-provider-http-client.md

This file was deleted.

Loading

0 comments on commit 1b080f7

Please sign in to comment.