Skip to content

Commit

Permalink
Merge pull request #63 from holaplex/espi/open-drops-api-reference
Browse files Browse the repository at this point in the history
API Docs - Switch Collections and Open Drops
  • Loading branch information
kespinola authored Sep 28, 2023
2 parents e01e5bc + 12e7db4 commit d383c7f
Show file tree
Hide file tree
Showing 33 changed files with 730 additions and 17 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,23 @@ This command generates static content into the `build` directory and can be serv

### Commands

Retrieve the most recent version of the GraphQL schema and generate documentation pages for the "API Reference."
Retrieve the most recent version of the GraphQL schema and generate documentation pages for the "API Reference.

Add `.env` file to the root of the project and set the below environment variables. You can generate an auth token from the credentials tab of your HUB account.

```
HOLAPLEX_API_ENDPOINT=https://api.holaplex.com/graphql
HOLAPLEX_AUTH_TOKEN=
```

Once your environment is set run the below script to re-generate the api documentation.

```bash
$ yarn run graphql-to-doc
```

Create a branch, commit the changes, open a pull request, and merge. Once the changes are merged into the `main` branch they will be automatically deployed via a github action workflow.

### Deployment

Using SSH:
Expand Down
5 changes: 5 additions & 0 deletions docs/api/enums/action.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ enum Action {
MINT
MINT_COMPRESSED
UPDATE_MINT
SWITCH_COLLECTION
}
```

Expand Down Expand Up @@ -80,6 +81,10 @@ enum Action {
>
>
#### [<code style={{ fontWeight: 'normal' }}>Action.<b>SWITCH_COLLECTION</b></code>](#)
>
>


### Member of
Expand Down
7 changes: 6 additions & 1 deletion docs/api/enums/creation-status.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ enum CreationStatus {
FAILED
PENDING
REJECTED
QUEUED
}
```

Expand Down Expand Up @@ -55,11 +56,15 @@ enum CreationStatus {
>
>
#### [<code style={{ fontWeight: 'normal' }}>CreationStatus.<b>QUEUED</b></code>](#)
>
>


### Member of

[`Collection`](/api/objects/collection) <Badge class="secondary" text="object"/><Bullet />[`CollectionMint`](/api/objects/collection-mint) <Badge class="secondary" text="object"/><Bullet />[`Drop`](/api/objects/drop) <Badge class="secondary" text="object"/><Bullet />[`ImportCollectionPayload`](/api/objects/import-collection-payload) <Badge class="secondary" text="object"/><Bullet />[`MintHistory`](/api/objects/mint-history) <Badge class="secondary" text="object"/><Bullet />[`RetryUpdateMintPayload`](/api/objects/retry-update-mint-payload) <Badge class="secondary" text="object"/><Bullet />[`UpdateHistory`](/api/objects/update-history) <Badge class="secondary" text="object"/>
[`Collection`](/api/objects/collection) <Badge class="secondary" text="object"/><Bullet />[`CollectionMint`](/api/objects/collection-mint) <Badge class="secondary" text="object"/><Bullet />[`Drop`](/api/objects/drop) <Badge class="secondary" text="object"/><Bullet />[`ImportCollectionPayload`](/api/objects/import-collection-payload) <Badge class="secondary" text="object"/><Bullet />[`MintHistory`](/api/objects/mint-history) <Badge class="secondary" text="object"/><Bullet />[`RetryUpdateMintPayload`](/api/objects/retry-update-mint-payload) <Badge class="secondary" text="object"/><Bullet />[`SwitchCollectionHistory`](/api/objects/switch-collection-history) <Badge class="secondary" text="object"/><Bullet />[`UpdateHistory`](/api/objects/update-history) <Badge class="secondary" text="object"/>



45 changes: 45 additions & 0 deletions docs/api/enums/drop-type.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
id: drop-type
title: DropType
hide_table_of_contents: true
pagination_next: null
pagination_prev: null
---



export const Bullet = () => <><span style={{ fontWeight: 'normal', fontSize: '.5em', color: 'var(--ifm-color-secondary-darkest)' }}>&nbsp;&nbsp;</span></>

export const SpecifiedBy = (props) => <>Specification<a className="link" style={{ fontSize:'1.5em', paddingLeft:'4px' }} target="_blank" href={props.url} title={'Specified by ' + props.url}>⎘</a></>

export const Badge = (props) => <><span className={'badge badge--' + props.class}>{props.text}</span></>


No description

```graphql
enum DropType {
EDITION
OPEN
}
```


### Values

#### [<code style={{ fontWeight: 'normal' }}>DropType.<b>EDITION</b></code>](#)
>
>
#### [<code style={{ fontWeight: 'normal' }}>DropType.<b>OPEN</b></code>](#)
>
>


### Member of

[`CreateDropInput`](/api/inputs/create-drop-input) <Badge class="secondary" text="input"/><Bullet />[`Drop`](/api/objects/drop) <Badge class="secondary" text="object"/>



19 changes: 19 additions & 0 deletions docs/api/generated.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
id: schema
slug: /api/generated
title: Schema Documentation
sidebar_position: 1
hide_table_of_contents: true
pagination_next: null
pagination_prev: null
sidebar_class_name: navbar__toggle
---

This documentation has been automatically generated from the GraphQL schema.

Use the docs in the sidebar to find out how to use the schema:

- **Allowed operations**: queries and mutations.
- **Schema-defined types**: scalars, objects, enums, interfaces, unions, and input objects.

<small><i>Generated on 9/28/2023, 10:33:27 AM.</i></small>
2 changes: 1 addition & 1 deletion docs/api/inputs/create-collection-input.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const SpecifiedBy = (props) => <>Specification<a className="link" style={
export const Badge = (props) => <><span className={'badge badge--' + props.class}>{props.text}</span></>


No description
Input object for creating a collection.

```graphql
input CreateCollectionInput {
Expand Down
5 changes: 5 additions & 0 deletions docs/api/inputs/create-drop-input.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ input CreateDropInput {
blockchain: Blockchain!
creators: [CreatorInput!]!
metadataJson: MetadataJsonInput!
type: DropType!
}
```

Expand Down Expand Up @@ -70,6 +71,10 @@ input CreateDropInput {
>
>

#### [<code style={{ fontWeight: 'normal' }}>CreateDropInput.<b>type</b></code>](#)<Bullet />[`DropType!`](/api/enums/drop-type) <Badge class="secondary" text="non-null"/> <Badge class="secondary" text="enum"/>
>
>



### Member of
Expand Down
2 changes: 1 addition & 1 deletion docs/api/inputs/metadata-json-input.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ input MetadataJsonInput {

### Member of

[`CreateCollectionInput`](/api/inputs/create-collection-input) <Badge class="secondary" text="input"/><Bullet />[`CreateDropInput`](/api/inputs/create-drop-input) <Badge class="secondary" text="input"/><Bullet />[`MintToCollectionInput`](/api/inputs/mint-to-collection-input) <Badge class="secondary" text="input"/><Bullet />[`PatchCollectionInput`](/api/inputs/patch-collection-input) <Badge class="secondary" text="input"/><Bullet />[`PatchDropInput`](/api/inputs/patch-drop-input) <Badge class="secondary" text="input"/><Bullet />[`UpdateMintInput`](/api/inputs/update-mint-input) <Badge class="secondary" text="input"/>
[`CreateCollectionInput`](/api/inputs/create-collection-input) <Badge class="secondary" text="input"/><Bullet />[`CreateDropInput`](/api/inputs/create-drop-input) <Badge class="secondary" text="input"/><Bullet />[`MintToCollectionInput`](/api/inputs/mint-to-collection-input) <Badge class="secondary" text="input"/><Bullet />[`PatchCollectionInput`](/api/inputs/patch-collection-input) <Badge class="secondary" text="input"/><Bullet />[`PatchDropInput`](/api/inputs/patch-drop-input) <Badge class="secondary" text="input"/><Bullet />[`QueueMintToDropInput`](/api/inputs/queue-mint-to-drop-input) <Badge class="secondary" text="input"/><Bullet />[`UpdateMintInput`](/api/inputs/update-mint-input) <Badge class="secondary" text="input"/>



50 changes: 50 additions & 0 deletions docs/api/inputs/mint-queued-input.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
id: mint-queued-input
title: MintQueuedInput
hide_table_of_contents: true
pagination_next: null
pagination_prev: null
---



export const Bullet = () => <><span style={{ fontWeight: 'normal', fontSize: '.5em', color: 'var(--ifm-color-secondary-darkest)' }}>&nbsp;&nbsp;</span></>

export const SpecifiedBy = (props) => <>Specification<a className="link" style={{ fontSize:'1.5em', paddingLeft:'4px' }} target="_blank" href={props.url} title={'Specified by ' + props.url}>⎘</a></>

export const Badge = (props) => <><span className={'badge badge--' + props.class}>{props.text}</span></>


Represents input data for `mint_queued` mutation

```graphql
input MintQueuedInput {
mint: UUID!
recipient: String!
compressed: Boolean!
}
```


### Fields

#### [<code style={{ fontWeight: 'normal' }}>MintQueuedInput.<b>mint</b></code>](#)<Bullet />[`UUID!`](/api/scalars/uuid) <Badge class="secondary" text="non-null"/> <Badge class="secondary" text="scalar"/>
>
>

#### [<code style={{ fontWeight: 'normal' }}>MintQueuedInput.<b>recipient</b></code>](#)<Bullet />[`String!`](/api/scalars/string) <Badge class="secondary" text="non-null"/> <Badge class="secondary" text="scalar"/>
>
>

#### [<code style={{ fontWeight: 'normal' }}>MintQueuedInput.<b>compressed</b></code>](#)<Bullet />[`Boolean!`](/api/scalars/boolean) <Badge class="secondary" text="non-null"/> <Badge class="secondary" text="scalar"/>
>
>



### Member of

[`mintQueued`](/api/mutations/mint-queued) <Badge class="secondary" text="mutation"/>



50 changes: 50 additions & 0 deletions docs/api/inputs/mint-random-queued-input.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
id: mint-random-queued-input
title: MintRandomQueuedInput
hide_table_of_contents: true
pagination_next: null
pagination_prev: null
---



export const Bullet = () => <><span style={{ fontWeight: 'normal', fontSize: '.5em', color: 'var(--ifm-color-secondary-darkest)' }}>&nbsp;&nbsp;</span></>

export const SpecifiedBy = (props) => <>Specification<a className="link" style={{ fontSize:'1.5em', paddingLeft:'4px' }} target="_blank" href={props.url} title={'Specified by ' + props.url}>⎘</a></>

export const Badge = (props) => <><span className={'badge badge--' + props.class}>{props.text}</span></>


Represents input data for `mint_random_queued` mutation

```graphql
input MintRandomQueuedInput {
drop: UUID!
recipient: String!
compressed: Boolean!
}
```


### Fields

#### [<code style={{ fontWeight: 'normal' }}>MintRandomQueuedInput.<b>drop</b></code>](#)<Bullet />[`UUID!`](/api/scalars/uuid) <Badge class="secondary" text="non-null"/> <Badge class="secondary" text="scalar"/>
>
>

#### [<code style={{ fontWeight: 'normal' }}>MintRandomQueuedInput.<b>recipient</b></code>](#)<Bullet />[`String!`](/api/scalars/string) <Badge class="secondary" text="non-null"/> <Badge class="secondary" text="scalar"/>
>
>

#### [<code style={{ fontWeight: 'normal' }}>MintRandomQueuedInput.<b>compressed</b></code>](#)<Bullet />[`Boolean!`](/api/scalars/boolean) <Badge class="secondary" text="non-null"/> <Badge class="secondary" text="scalar"/>
>
>



### Member of

[`mintRandomQueuedToDrop`](/api/mutations/mint-random-queued-to-drop) <Badge class="secondary" text="mutation"/>



45 changes: 45 additions & 0 deletions docs/api/inputs/queue-mint-to-drop-input.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
id: queue-mint-to-drop-input
title: QueueMintToDropInput
hide_table_of_contents: true
pagination_next: null
pagination_prev: null
---



export const Bullet = () => <><span style={{ fontWeight: 'normal', fontSize: '.5em', color: 'var(--ifm-color-secondary-darkest)' }}>&nbsp;&nbsp;</span></>

export const SpecifiedBy = (props) => <>Specification<a className="link" style={{ fontSize:'1.5em', paddingLeft:'4px' }} target="_blank" href={props.url} title={'Specified by ' + props.url}>⎘</a></>

export const Badge = (props) => <><span className={'badge badge--' + props.class}>{props.text}</span></>


Represents input data for `queue_mint_to_drop` mutation

```graphql
input QueueMintToDropInput {
drop: UUID!
metadataJson: MetadataJsonInput!
}
```


### Fields

#### [<code style={{ fontWeight: 'normal' }}>QueueMintToDropInput.<b>drop</b></code>](#)<Bullet />[`UUID!`](/api/scalars/uuid) <Badge class="secondary" text="non-null"/> <Badge class="secondary" text="scalar"/>
>
>

#### [<code style={{ fontWeight: 'normal' }}>QueueMintToDropInput.<b>metadataJson</b></code>](#)<Bullet />[`MetadataJsonInput!`](/api/inputs/metadata-json-input) <Badge class="secondary" text="non-null"/> <Badge class="secondary" text="input"/>
>
>



### Member of

[`queueMintToDrop`](/api/mutations/queue-mint-to-drop) <Badge class="secondary" text="mutation"/>



45 changes: 45 additions & 0 deletions docs/api/inputs/switch-collection-input.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
id: switch-collection-input
title: SwitchCollectionInput
hide_table_of_contents: true
pagination_next: null
pagination_prev: null
---



export const Bullet = () => <><span style={{ fontWeight: 'normal', fontSize: '.5em', color: 'var(--ifm-color-secondary-darkest)' }}>&nbsp;&nbsp;</span></>

export const SpecifiedBy = (props) => <>Specification<a className="link" style={{ fontSize:'1.5em', paddingLeft:'4px' }} target="_blank" href={props.url} title={'Specified by ' + props.url}>⎘</a></>

export const Badge = (props) => <><span className={'badge badge--' + props.class}>{props.text}</span></>


Input object for switching a mint's collection.

```graphql
input SwitchCollectionInput {
mint: UUID!
collectionAddress: String!
}
```


### Fields

#### [<code style={{ fontWeight: 'normal' }}>SwitchCollectionInput.<b>mint</b></code>](#)<Bullet />[`UUID!`](/api/scalars/uuid) <Badge class="secondary" text="non-null"/> <Badge class="secondary" text="scalar"/>
>
>

#### [<code style={{ fontWeight: 'normal' }}>SwitchCollectionInput.<b>collectionAddress</b></code>](#)<Bullet />[`String!`](/api/scalars/string) <Badge class="secondary" text="non-null"/> <Badge class="secondary" text="scalar"/>
>
>



### Member of

[`switchCollection`](/api/mutations/switch-collection) <Badge class="secondary" text="mutation"/>



2 changes: 1 addition & 1 deletion docs/api/mutations/create-collection.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ createCollection(
### Type

#### [`CreateCollectionPayload`](/api/objects/create-collection-payload) <Badge class="secondary" text="object"/>
>
> Result of a successful create collection mutation.
>

Expand Down
Loading

0 comments on commit d383c7f

Please sign in to comment.