Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tefkah committed Jun 13, 2024
1 parent 9bcd749 commit 40466ec
Showing 1 changed file with 25 additions and 67 deletions.
92 changes: 25 additions & 67 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2790,7 +2790,10 @@ Create a community
```ts
create: (input, rest?) =>
Promise<{ status: 201; body: string; headers: Headers }>
Promise<
| { status: 201; body: string; headers: Headers }
| { status: 409; body: string; headers: Headers }
>
```
##### Access
Expand Down Expand Up @@ -2830,11 +2833,18 @@ You need to be **logged in** and have access to this resource.
##### Returns
```ts
Promise<{
status: 201
body: string
headers: Headers
}>
Promise<
| {
status: 201
body: string
headers: Headers
}
| {
status: 409
body: string
headers: Headers
}
>
```
#### `pubpub.community.get`
Expand Down Expand Up @@ -3287,8 +3297,14 @@ You need to be **logged in** and have access to this resource.
```ts
{
cache: RequestCache
extraHeaders: Record<string, undefined | string>
cache?: RequestCache | undefined
extraHeaders?:
| ({
[x: string]: undefined
[x: number]: undefined
[x: symbol]: undefined
} & Record<string, string | undefined>)
| undefined
}
```
Expand Down Expand Up @@ -6318,65 +6334,7 @@ Promise<{
Create a pub and upload a file and import it to a pub.

```ts
;(input, rest?) =>
Promise<{
status: 201
body: {
pub: {
id: string
communityId: string
title: string
description: string | null
avatar: string | null
viewHash: string | null
editHash: string | null
scopeSummaryId: string | null
slug: string
metadata: {
mtg_id: string
bibcode: string
mtg_presentation_id: string
} | null
doi: string | null
crossrefDepositRecordId: string | null
attributions: {
id: string
pubId: string
title: string | null
avatar: string | null
name: string | null
order: number
userId: string | null
orcid: string | null
isAuthor: boolean | null
roles: string[] | null
affiliation: string | null
createdAt?: string | undefined
updatedAt?: string | undefined
}[]
htmlTitle: string | null
htmlDescription: string | null
customPublishedAt: string | null
labels:
| { id: string; title: string; color: string; publicApply: boolean }[]
| null
downloads:
| { createdAt: string; type: 'formatted'; url: string }[]
| null
reviewHash: string | null
commentHash: string | null
draftId: string
createdAt?: string | undefined
updatedAt?: string | undefined
}
doc: {
type: 'doc'
content: any[]
attrs?: Record<string, any> | undefined
}
}
headers: Headers
}>
import: (input, rest?) => Promise<{ status: 201; body: { pub: { id: string; communityId: string; title: string; description: string | null; avatar: string | null; viewHash: string | null; editHash: string | null; scopeSummaryId: string | null; slug: string; metadata: { mtg_id: string; bibcode: string; mtg_presentation_id: string; } | null; doi: string | null; crossrefDepositRecordId: string | null; attributions: { id: string; pubId: string; title: string | null; avatar: string | null; name: string | null; order: number; userId: string | null; orcid: string | null; isAuthor: boolean | null; roles: string[] | null; affiliation: string | null; createdAt?: string | undefined; updatedAt?: string | undefined; }[]; htmlTitle: string | null; htmlDescription: string | null; customPublishedAt: string | null; labels: { id: string; title: string; color: string; publicApply: boolean; }[] | null; downloads: { createdAt: string; type: "formatted"; url: string; }[] | null; reviewHash: string | null; commentHash: string | null; draftId: string; createdAt?: string | undefined; updatedAt?: string | undefined; }; doc: { type: "doc"; content: any[]; attrs?: Record<string, any> | undefined; }; }; headers: Headers; }>;
```

###### Access
Expand Down

0 comments on commit 40466ec

Please sign in to comment.