Skip to content

Commit 3975a9f

Browse files
authored
feat(ipfs): update meta field (#688)
1 parent f78f536 commit 3975a9f

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

packages/clients/src/api/ipfs/v1alpha1/marshalling.gen.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ const unmarshalPinCIDMeta = (data: unknown) => {
3030
)
3131
}
3232

33-
return { id: data.id } as PinCIDMeta
33+
return {
34+
id: data.id,
35+
progress: data.progress,
36+
size: data.size,
37+
url: data.url,
38+
} as PinCIDMeta
3439
}
3540

3641
const unmarshalPinCID = (data: unknown) => {
@@ -55,13 +60,7 @@ const unmarshalPinInfo = (data: unknown) => {
5560
)
5661
}
5762

58-
return {
59-
id: data.id,
60-
progress: data.progress,
61-
size: data.size,
62-
statusDetails: data.status_details,
63-
url: data.url,
64-
} as PinInfo
63+
return { statusDetails: data.status_details } as PinInfo
6564
}
6665

6766
export const unmarshalPin = (data: unknown) => {

packages/clients/src/api/ipfs/v1alpha1/types.gen.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,14 @@ export interface PinCID {
4040
}
4141

4242
export interface PinCIDMeta {
43-
id?: string
43+
id: string
44+
url?: string
45+
size?: number
46+
progress?: number
4447
}
4548

4649
export interface PinInfo {
4750
statusDetails?: string
48-
id?: string
49-
url?: string
50-
size?: number
51-
progress?: number
5251
}
5352

5453
export interface PinOptions {

0 commit comments

Comments
 (0)