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
1 change: 0 additions & 1 deletion packages/clients/src/api/ipfs/v1alpha1/index.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export type {
PinCIDMeta,
PinDetails,
PinInfo,
PinOptions,
PinStatus,
ReplacePinRequest,
ReplacePinResponse,
Expand Down
18 changes: 0 additions & 18 deletions packages/clients/src/api/ipfs/v1alpha1/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import type {
PinCID,
PinCIDMeta,
PinInfo,
PinOptions,
ReplacePinRequest,
ReplacePinResponse,
UpdateVolumeRequest,
Expand Down Expand Up @@ -196,24 +195,13 @@ export const unmarshalReplacePinResponse = (data: unknown) => {
} as ReplacePinResponse
}

const marshalPinOptions = (
request: PinOptions,
defaults: DefaultValues,
): Record<string, unknown> => ({
replication_count: request.replicationCount,
required_zones: request.requiredZones,
})

export const marshalCreatePinByCIDRequest = (
request: CreatePinByCIDRequest,
defaults: DefaultValues,
): Record<string, unknown> => ({
cid: request.cid,
name: request.name,
origins: request.origins,
pin_options: request.pinOptions
? marshalPinOptions(request.pinOptions, defaults)
: undefined,
volume_id: request.volumeId,
})

Expand All @@ -222,9 +210,6 @@ export const marshalCreatePinByURLRequest = (
defaults: DefaultValues,
): Record<string, unknown> => ({
name: request.name,
pin_options: request.pinOptions
? marshalPinOptions(request.pinOptions, defaults)
: undefined,
url: request.url,
volume_id: request.volumeId,
})
Expand Down Expand Up @@ -272,9 +257,6 @@ export const marshalReplacePinRequest = (
cid: request.cid,
name: request.name,
origins: request.origins,
pin_options: request.pinOptions
? marshalPinOptions(request.pinOptions, defaults)
: undefined,
volume_id: request.volumeId,
})

Expand Down
11 changes: 0 additions & 11 deletions packages/clients/src/api/ipfs/v1alpha1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,6 @@ export interface PinInfo {
statusDetails: PinDetails
}

export interface PinOptions {
requiredZones: string[]
replicationCount: number
}

export interface ReplacePinResponse {
pin?: Pin
}
Expand Down Expand Up @@ -205,8 +200,6 @@ export type CreatePinByURLRequest = {
url: string
/** Pin name. */
name?: string
/** Pin options. */
pinOptions?: PinOptions
}

export type CreatePinByCIDRequest = {
Expand All @@ -223,8 +216,6 @@ export type CreatePinByCIDRequest = {
origins?: string[]
/** Pin name. */
name?: string
/** Pin options. */
pinOptions?: PinOptions
}

export type ReplacePinRequest = {
Expand All @@ -243,8 +234,6 @@ export type ReplacePinRequest = {
name?: string
/** Node containing the content you want to pin. */
origins?: string[]
/** Pin options. */
pinOptions?: PinOptions
}

export type GetPinRequest = {
Expand Down