Skip to content

Commit

Permalink
fix: update types after enum serialization change (#322)
Browse files Browse the repository at this point in the history
* update flake.lock

* update types to new enum serialization logic

* fix build error, build docs

* update flake.lock

* re-introduce CellType
  • Loading branch information
matthme authored Feb 19, 2025
1 parent ca2db26 commit 0f26244
Show file tree
Hide file tree
Showing 36 changed files with 538 additions and 510 deletions.
6 changes: 4 additions & 2 deletions docs/client.appbundlesource.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@

```typescript
export type AppBundleSource = {
bundle: AppBundle;
type: "path";
value: string;
} | {
path: string;
type: "bundle";
value: AppBundle;
};
```
**References:** [AppBundle](./client.appbundle.md)
Expand Down
10 changes: 5 additions & 5 deletions docs/client.appstatusfilter.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Disabled

</td><td>

`"Disabled"`
`"disabled"`


</td><td>
Expand All @@ -50,7 +50,7 @@ Enabled

</td><td>

`"Enabled"`
`"enabled"`


</td><td>
Expand All @@ -64,7 +64,7 @@ Paused

</td><td>

`"Paused"`
`"paused"`


</td><td>
Expand All @@ -78,7 +78,7 @@ Running

</td><td>

`"Running"`
`"running"`


</td><td>
Expand All @@ -92,7 +92,7 @@ Stopped

</td><td>

`"Stopped"`
`"stopped"`


</td><td>
Expand Down
4 changes: 2 additions & 2 deletions docs/client.appwebsocket.createclonecell.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Clone an existing provisioned cell.
**Signature:**

```typescript
createCloneCell(args: CreateCloneCellRequest): Promise<import("../admin/types.js").ClonedCell>;
createCloneCell(args: CreateCloneCellRequest): Promise<ClonedCell>;
```

## Parameters
Expand Down Expand Up @@ -49,7 +49,7 @@ Specify the cell to clone.
</tbody></table>
**Returns:**

Promise&lt;import("../admin/types.js").[ClonedCell](./client.clonedcell.md)<!-- -->&gt;
Promise&lt;[ClonedCell](./client.clonedcell.md)<!-- -->&gt;

The created clone cell.

4 changes: 2 additions & 2 deletions docs/client.appwebsocket.enableclonecell.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Enable a disabled clone cell.
**Signature:**

```typescript
enableCloneCell(args: EnableCloneCellRequest): Promise<import("../admin/types.js").ClonedCell>;
enableCloneCell(args: EnableCloneCellRequest): Promise<ClonedCell>;
```

## Parameters
Expand Down Expand Up @@ -49,7 +49,7 @@ Specify the clone cell to enable.
</tbody></table>
**Returns:**

Promise&lt;import("../admin/types.js").[ClonedCell](./client.clonedcell.md)<!-- -->&gt;
Promise&lt;[ClonedCell](./client.clonedcell.md)<!-- -->&gt;

The enabled clone cell.

12 changes: 8 additions & 4 deletions docs/client.capaccess.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,20 @@
**Signature:**

```typescript
export type CapAccess = [CapAccessType.Unrestricted] | {
[CapAccessType.Transferable]: {
export type CapAccess = {
type: "unrestricted";
} | {
type: "transferable";
value: {
secret: CapSecret;
};
} | {
[CapAccessType.Assigned]: {
type: "assigned";
value: {
secret: CapSecret;
assignees: AgentPubKey[];
};
};
```
**References:** [CapAccessType.Unrestricted](./client.capaccesstype.md)<!-- -->, [CapAccessType.Transferable](./client.capaccesstype.md)<!-- -->, [CapSecret](./client.capsecret.md)<!-- -->, [CapAccessType.Assigned](./client.capaccesstype.md)<!-- -->, [AgentPubKey](./client.agentpubkey.md)
**References:** [CapSecret](./client.capsecret.md)<!-- -->, [AgentPubKey](./client.agentpubkey.md)

74 changes: 0 additions & 74 deletions docs/client.capaccesstype.md

This file was deleted.

9 changes: 6 additions & 3 deletions docs/client.cellinfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@

```typescript
export type CellInfo = {
[CellType.Provisioned]: ProvisionedCell;
type: CellType.Provisioned;
value: ProvisionedCell;
} | {
[CellType.Cloned]: ClonedCell;
type: CellType.Cloned;
value: ClonedCell;
} | {
[CellType.Stem]: StemCell;
type: CellType.Stem;
value: StemCell;
};
```
**References:** [CellType.Provisioned](./client.celltype.md)<!-- -->, [ProvisionedCell](./client.provisionedcell.md)<!-- -->, [CellType.Cloned](./client.celltype.md)<!-- -->, [ClonedCell](./client.clonedcell.md)<!-- -->, [CellType.Stem](./client.celltype.md)<!-- -->, [StemCell](./client.stemcell.md)
Expand Down
20 changes: 20 additions & 0 deletions docs/client.clonecellid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@holochain/client](./client.md) &gt; [CloneCellId](./client.clonecellid.md)

## CloneCellId type


**Signature:**

```typescript
export type CloneCellId = {
type: "clone_id";
value: CloneId;
} | {
type: "dna_hash";
value: DnaHash;
};
```
**References:** [DnaHash](./client.dnahash.md)

6 changes: 4 additions & 2 deletions docs/client.coordinatorsource.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@

```typescript
export type CoordinatorSource = {
path: string;
type: "path";
value: string;
} | {
bundle: CoordinatorBundle;
type: "bundle";
value: CoordinatorBundle;
};
```
**References:** [CoordinatorBundle](./client.coordinatorbundle.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/client.deleteclonecellrequest.clone_cell_id.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ The clone id or cell id of the clone cell
**Signature:**

```typescript
clone_cell_id: RoleName | DnaHash;
clone_cell_id: CloneCellId;
```
2 changes: 1 addition & 1 deletion docs/client.deleteclonecellrequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The app id that the clone cell belongs to

</td><td>

[RoleName](./client.rolename.md) \| [DnaHash](./client.dnahash.md)
[CloneCellId](./client.clonecellid.md)


</td><td>
Expand Down
2 changes: 1 addition & 1 deletion docs/client.disableclonecellrequest.clone_cell_id.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ The clone id or cell id of the clone cell
**Signature:**

```typescript
clone_cell_id: RoleName | DnaHash;
clone_cell_id: CloneCellId;
```
2 changes: 1 addition & 1 deletion docs/client.disableclonecellrequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Description

</td><td>

[RoleName](./client.rolename.md) \| [DnaHash](./client.dnahash.md)
[CloneCellId](./client.clonecellid.md)


</td><td>
Expand Down
11 changes: 7 additions & 4 deletions docs/client.dnasource.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@

```typescript
export type DnaSource = {
hash: HoloHash;
type: "path";
value: string;
} | {
path: string;
type: "bundle";
value: DnaBundle;
} | {
bundle: DnaBundle;
type: "hash";
value: HoloHash;
};
```
**References:** [HoloHash](./client.holohash.md)<!-- -->, [DnaBundle](./client.dnabundle.md)
**References:** [DnaBundle](./client.dnabundle.md)<!-- -->, [HoloHash](./client.holohash.md)

11 changes: 0 additions & 11 deletions docs/client.dnastorageblob.dna.md

This file was deleted.

49 changes: 6 additions & 43 deletions docs/client.dnastorageblob.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,16 @@

[Home](./index.md) &gt; [@holochain/client](./client.md) &gt; [DnaStorageBlob](./client.dnastorageblob.md)

## DnaStorageBlob interface
## DnaStorageBlob type


**Signature:**

```typescript
export interface DnaStorageBlob
export type DnaStorageBlob = {
type: "dna";
value: DnaStorageInfo;
};
```
**References:** [DnaStorageInfo](./client.dnastorageinfo.md)

## Properties

<table><thead><tr><th>

Property


</th><th>

Modifiers


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[dna](./client.dnastorageblob.dna.md)


</td><td>


</td><td>

[DnaStorageInfo](./client.dnastorageinfo.md)


</td><td>


</td></tr>
</tbody></table>
9 changes: 6 additions & 3 deletions docs/client.grantedfunctions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@
**Signature:**

```typescript
export type GrantedFunctions = GrantedFunctionsType.All | {
[GrantedFunctionsType.Listed]: [ZomeName, FunctionName][];
export type GrantedFunctions = {
type: "all";
} | {
type: "listed";
value: [ZomeName, FunctionName][];
};
```
**References:** [GrantedFunctionsType.All](./client.grantedfunctionstype.md)<!-- -->, [GrantedFunctionsType.Listed](./client.grantedfunctionstype.md)<!-- -->, [ZomeName](./client.zomename.md)<!-- -->, [FunctionName](./client.functionname.md)
**References:** [ZomeName](./client.zomename.md)<!-- -->, [FunctionName](./client.functionname.md)

Loading

0 comments on commit 0f26244

Please sign in to comment.