Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 22 additions & 17 deletions packages/clients/src/api/ipfs/v1alpha1/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ export class API extends ParentAPI {
public static readonly LOCALITIES: Region[] = ['fr-par', 'nl-ams', 'pl-waw']

/**
* Create a new volume from a Project ID. Volume is identified by an ID and
* used to host pin references. Volume is personal (at least to your
* organization) even if IPFS blocks and CID are available to anyone. Should
* be the first command you made because every pin must be attached to a
* volume.
* Create a new volume. Create a new volume from a Project ID. Volume is
* identified by an ID and used to host pin references. Volume is personal (at
* least to your organization) even if IPFS blocks and CID are available to
* anyone. Should be the first command you made because every pin must be
* attached to a volume.
*
* @param request - The request {@link CreateVolumeRequest}
* @returns A Promise of Volume
Expand All @@ -76,7 +76,8 @@ export class API extends ParentAPI {
)

/**
* Retrieve information about a specific volume.
* Get information about a volume. Retrieve information about a specific
* volume.
*
* @param request - The request {@link GetVolumeRequest}
* @returns A Promise of Volume
Expand Down Expand Up @@ -118,7 +119,8 @@ export class API extends ParentAPI {
)

/**
* Retrieve information about all volumes from a Project ID.
* List all volumes by a Project ID. Retrieve information about all volumes
* from a Project ID.
*
* @param request - The request {@link ListVolumesRequest}
* @returns A Promise of ListVolumesResponse
Expand All @@ -127,7 +129,7 @@ export class API extends ParentAPI {
enrichForPagination('volumes', this.pageOfListVolumes, request)

/**
* Update volume information (tag, name...).
* Update volume information. Update volume information (tag, name...).
*
* @param request - The request {@link UpdateVolumeRequest}
* @returns A Promise of Volume
Expand All @@ -149,8 +151,9 @@ export class API extends ParentAPI {
)

/**
* Delete a volume by its ID and every pin attached to this volume. Can take a
* while, depending of your pinned content.
* Delete an existing volume. Delete a volume by its ID and every pin attached
* to this volume. This process can take a while to conclude, depending on the
* size of your pinned content.
*
* @param request - The request {@link DeleteVolumeRequest}
*/
Expand All @@ -164,7 +167,7 @@ export class API extends ParentAPI {
})

/**
* Create a pin request. Will fetch and store the content pointed by the
* Create a pin by URL. Will fetch and store the content pointed by the
* provided URL. The content must be available on the public IPFS network. The
* content (IPFS blocks) will be host by the pinning service until pin
* deletion. From that point, any other IPFS peer can fetch and host your
Expand Down Expand Up @@ -192,7 +195,7 @@ export class API extends ParentAPI {
)

/**
* Create a pin request. Will fetch and store the content pointed by the
* Create a pin by CID. Will fetch and store the content pointed by the
* provided CID. The content must be available on the public IPFS network. The
* content (IPFS blocks) will be host by the pinning service until pin
* deletion. From that point, any other IPFS peer can fetch and host your
Expand Down Expand Up @@ -236,8 +239,8 @@ export class API extends ParentAPI {
)

/**
* Retrieve information about the provided pin ID (not the CID): status, last
* modification, CID.
* Get pin information. Retrieve information about the provided **pin ID**,
* such as status, last modification, and CID.
*
* @param request - The request {@link GetPinRequest}
* @returns A Promise of Pin
Expand Down Expand Up @@ -299,7 +302,8 @@ export class API extends ParentAPI {
)

/**
* Retrieve information about all pins into a volume.
* List all pins within a volume. Retrieve information about all pins into a
* volume.
*
* @param request - The request {@link ListPinsRequest}
* @returns A Promise of ListPinsResponse
Expand All @@ -308,8 +312,9 @@ export class API extends ParentAPI {
enrichForPagination('pins', this.pageOfListPins, request)

/**
* Create an unpin request. If the pin was the last to target a specific CID,
* the content will be erase from storage. The function is indempotent.
* Create an unpin request. An unpin request means that you no longer own the
* content. This content can therefore be removed and no longer provided on
* the IPFS network.
*
* @param request - The request {@link DeletePinRequest}
*/
Expand Down
15 changes: 8 additions & 7 deletions packages/clients/src/api/ipfs/v1alpha1/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,7 @@ const unmarshalPinCIDMeta = (data: unknown) => {
)
}

return {
id: data.id,
progress: data.progress,
size: data.size,
url: data.url,
} as PinCIDMeta
return { id: data.id } as PinCIDMeta
}

const unmarshalPinCID = (data: unknown) => {
Expand All @@ -60,7 +55,13 @@ const unmarshalPinInfo = (data: unknown) => {
)
}

return { statusDetails: data.status_details } as PinInfo
return {
id: data.id,
progress: data.progress,
size: data.size,
statusDetails: data.status_details,
url: data.url,
} as PinInfo
}

export const unmarshalPin = (data: unknown) => {
Expand Down
9 changes: 5 additions & 4 deletions packages/clients/src/api/ipfs/v1alpha1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ export interface PinCID {
}

export interface PinCIDMeta {
id: string
url?: string
size?: number
progress?: number
id?: string
}

export interface PinInfo {
statusDetails?: string
id?: string
url?: string
size?: number
progress?: number
}

export interface PinOptions {
Expand Down