-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
62 changed files
with
448 additions
and
506 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) > [@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; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) > [@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 | | ||
|
2 changes: 1 addition & 1 deletion
2
data-providers.assetbuffer.mimetype.md → data-provider-base.assetbuffer.mimetype.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
data-provider-base.authenticatedformdataprovider.getrequestoptions.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) > [@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<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<[FormDataRequestOptions](./data-provider-base.formdatarequestoptions.md)<!-- -->> | ||
|
||
Attaches the headers with bearer token. | ||
|
2 changes: 1 addition & 1 deletion
2
...authenticatedformdataprovider.gettoken.md → ...authenticatedformdataprovider.gettoken.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) > [@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<void>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| dataContent | FormData | | | ||
| meta | [FormDataPostHeaders](./data-provider-base.formdatapostheaders.md) | _(Optional)_ | | ||
|
||
**Returns:** | ||
|
||
Promise<void> | ||
|
2 changes: 1 addition & 1 deletion
2
...iders.baseformdataprovider.getendpoint.md → ...-base.baseformdataprovider.getendpoint.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...s.baseformdataprovider.getpostendpoint.md → ...e.baseformdataprovider.getpostendpoint.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
data-provider-base.baseformdataprovider.getrequestoptions.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) > [@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<FormDataRequestOptions>; | ||
``` | ||
|
||
## 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. | ||
|
2 changes: 1 addition & 1 deletion
2
...roviders.baseformdataprovider.gettoken.md → ...der-base.baseformdataprovider.gettoken.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) > [@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 <code>ipfs://${hash}</code>. | | ||
| [wrapStream(data)](./data-provider-base.baseformdataprovider.wrapstream.md) | <code>protected</code> | | | ||
|
2 changes: 1 addition & 1 deletion
2
...viders.baseformdataprovider.resolveurl.md → ...r-base.baseformdataprovider.resolveurl.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) > [@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<any>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| data | any | | | ||
|
||
**Returns:** | ||
|
||
Promise<any> | ||
|
2 changes: 1 addition & 1 deletion
2
data-providers.formdatapostheaders.md → data-provider-base.formdatapostheaders.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) > [@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) | | ||
|
20 changes: 0 additions & 20 deletions
20
data-provider-http-client.httpipfsclientdataprovider._constructor_.md
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
27 changes: 0 additions & 27 deletions
27
data-provider-http-client.httpipfsclientdataprovider.upload.md
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.