Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary app clone cell types #304

Merged
merged 2 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions docs/client.appclient.createclonecell.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
**Signature:**

```typescript
createCloneCell(args: AppCreateCloneCellRequest): Promise<CreateCloneCellResponse>;
createCloneCell(args: CreateCloneCellRequest): Promise<CreateCloneCellResponse>;
```

## Parameters
Expand Down Expand Up @@ -35,7 +35,7 @@ args

</td><td>

[AppCreateCloneCellRequest](./client.appcreateclonecellrequest.md)
[CreateCloneCellRequest](./client.createclonecellrequest.md)


</td><td>
Expand Down
4 changes: 2 additions & 2 deletions docs/client.appclient.disableclonecell.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
**Signature:**

```typescript
disableCloneCell(args: AppDisableCloneCellRequest): Promise<DisableCloneCellResponse>;
disableCloneCell(args: DisableCloneCellRequest): Promise<DisableCloneCellResponse>;
```

## Parameters
Expand Down Expand Up @@ -35,7 +35,7 @@ args

</td><td>

[AppDisableCloneCellRequest](./client.appdisableclonecellrequest.md)
[DisableCloneCellRequest](./client.disableclonecellrequest.md)


</td><td>
Expand Down
4 changes: 2 additions & 2 deletions docs/client.appclient.enableclonecell.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
**Signature:**

```typescript
enableCloneCell(args: AppEnableCloneCellRequest): Promise<EnableCloneCellResponse>;
enableCloneCell(args: EnableCloneCellRequest): Promise<EnableCloneCellResponse>;
```

## Parameters
Expand Down Expand Up @@ -35,7 +35,7 @@ args

</td><td>

[AppEnableCloneCellRequest](./client.appenableclonecellrequest.md)
[EnableCloneCellRequest](./client.enableclonecellrequest.md)


</td><td>
Expand Down
14 changes: 0 additions & 14 deletions docs/client.appcreateclonecellrequest.md

This file was deleted.

14 changes: 0 additions & 14 deletions docs/client.appdisableclonecellrequest.md

This file was deleted.

14 changes: 0 additions & 14 deletions docs/client.appenableclonecellrequest.md

This file was deleted.

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: AppCreateCloneCellRequest): Promise<import("../admin/types.js").ClonedCell>;
createCloneCell(args: CreateCloneCellRequest): Promise<import("../admin/types.js").ClonedCell>;
```

## Parameters
Expand Down Expand Up @@ -37,7 +37,7 @@ args

</td><td>

[AppCreateCloneCellRequest](./client.appcreateclonecellrequest.md)
[CreateCloneCellRequest](./client.createclonecellrequest.md)


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

```typescript
disableCloneCell(args: AppDisableCloneCellRequest): Promise<void>;
disableCloneCell(args: DisableCloneCellRequest): Promise<void>;
```

## Parameters
Expand Down Expand Up @@ -37,7 +37,7 @@ args

</td><td>

[AppDisableCloneCellRequest](./client.appdisableclonecellrequest.md)
[DisableCloneCellRequest](./client.disableclonecellrequest.md)


</td><td>
Expand Down
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: AppEnableCloneCellRequest): Promise<import("../admin/types.js").ClonedCell>;
enableCloneCell(args: EnableCloneCellRequest): Promise<import("../admin/types.js").ClonedCell>;
```

## Parameters
Expand Down Expand Up @@ -37,7 +37,7 @@ args

</td><td>

[AppEnableCloneCellRequest](./client.appenableclonecellrequest.md)
[EnableCloneCellRequest](./client.enableclonecellrequest.md)


</td><td>
Expand Down
4 changes: 2 additions & 2 deletions docs/client.appwebsocket.getcellidfromrolename.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Get a cell id by its role name or clone id.
**Signature:**

```typescript
getCellIdFromRoleName(roleName: RoleName, appInfo: AppInfo): CellId;
getCellIdFromRoleName(roleName: RoleName, appInfo: AppInfo): import("../../types.js").CellId;
```

## Parameters
Expand Down Expand Up @@ -65,7 +65,7 @@ The app info containing all cell infos.
</tbody></table>
**Returns:**

[CellId](./client.cellid.md)
import("../../types.js").[CellId](./client.cellid.md)

The cell id or throws an error if not found.

30 changes: 0 additions & 30 deletions docs/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -1432,36 +1432,6 @@ This type is meant to be opaque



</td></tr>
<tr><td>

[AppCreateCloneCellRequest](./client.appcreateclonecellrequest.md)


</td><td>



</td></tr>
<tr><td>

[AppDisableCloneCellRequest](./client.appdisableclonecellrequest.md)


</td><td>



</td></tr>
<tr><td>

[AppEnableCloneCellRequest](./client.appenableclonecellrequest.md)


</td><td>



</td></tr>
<tr><td>

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 3 additions & 21 deletions src/api/app/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,6 @@ import {
SignedActionHashed,
} from "../../index.js";

/**
* @public
*/
export type AppCreateCloneCellRequest = Omit<CreateCloneCellRequest, "app_id">;

/**
* @public
*/
export type AppEnableCloneCellRequest = Omit<EnableCloneCellRequest, "app_id">;

/**
* @public
*/
export type AppDisableCloneCellRequest = Omit<
DisableCloneCellRequest,
"app_id"
>;

/**
* @public
*/
Expand Down Expand Up @@ -511,13 +493,13 @@ export interface AppClient {
installedAppId: InstalledAppId;

createCloneCell(
args: AppCreateCloneCellRequest
args: CreateCloneCellRequest
): Promise<CreateCloneCellResponse>;
enableCloneCell(
args: AppEnableCloneCellRequest
args: EnableCloneCellRequest
): Promise<EnableCloneCellResponse>;
disableCloneCell(
args: AppDisableCloneCellRequest
args: DisableCloneCellRequest
): Promise<DisableCloneCellResponse>;
networkInfo(args: AppNetworkInfoRequest): Promise<NetworkInfoResponse>;
}
Expand Down
18 changes: 5 additions & 13 deletions src/api/app/websocket.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import Emittery, { UnsubscribeFunction } from "emittery";
import { omit } from "lodash-es";
import { AgentPubKey, CellId, InstalledAppId, RoleName } from "../../types.js";
import {
AppAuthenticationToken,
AppInfo,
CellType,
MemproofMap,
} from "../admin/index.js";
import { AgentPubKey, InstalledAppId, RoleName } from "../../types.js";
import { AppInfo, CellType, MemproofMap } from "../admin/index.js";
import {
catchError,
DEFAULT_TIMEOUT,
Expand All @@ -22,9 +17,6 @@ import {
AppClient,
AppEvents,
AppNetworkInfoRequest,
AppCreateCloneCellRequest,
AppDisableCloneCellRequest,
AppEnableCloneCellRequest,
AppInfoResponse,
SignalCb,
CallZomeRequest,
Expand Down Expand Up @@ -394,7 +386,7 @@ export class AppWebsocket implements AppClient {
* @param args - Specify the cell to clone.
* @returns The created clone cell.
*/
async createCloneCell(args: AppCreateCloneCellRequest) {
async createCloneCell(args: CreateCloneCellRequest) {
const clonedCell = this.createCloneCellRequester({
...args,
});
Expand All @@ -410,7 +402,7 @@ export class AppWebsocket implements AppClient {
* @param args - Specify the clone cell to enable.
* @returns The enabled clone cell.
*/
async enableCloneCell(args: AppEnableCloneCellRequest) {
async enableCloneCell(args: EnableCloneCellRequest) {
return this.enableCloneCellRequester({
...args,
});
Expand All @@ -421,7 +413,7 @@ export class AppWebsocket implements AppClient {
*
* @param args - Specify the clone cell to disable.
*/
async disableCloneCell(args: AppDisableCloneCellRequest) {
async disableCloneCell(args: DisableCloneCellRequest) {
return this.disableCloneCellRequester({
...args,
});
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/app-websocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import assert from "node:assert";
import test from "tape";
import {
AdminWebsocket,
AppCreateCloneCellRequest,
AppEntryDef,
AppWebsocket,
CallZomeRequest,
CellType,
CloneId,
CreateCloneCellRequest,
fakeAgentPubKey,
RoleName,
RoleNameCallZomeRequest,
Expand Down Expand Up @@ -208,7 +208,7 @@ test(
const { admin, client: appWs } = await createAppWsAndInstallApp(ADMIN_PORT);
const info = await appWs.appInfo();

const createCloneCellParams: AppCreateCloneCellRequest = {
const createCloneCellParams: CreateCloneCellRequest = {
role_name: ROLE_NAME,
modifiers: {
network_seed: "clone-0",
Expand Down Expand Up @@ -245,7 +245,7 @@ test(
withConductor(ADMIN_PORT, async (t) => {
const { admin, client: appWs } = await createAppWsAndInstallApp(ADMIN_PORT);

const createCloneCellParams: AppCreateCloneCellRequest = {
const createCloneCellParams: CreateCloneCellRequest = {
role_name: ROLE_NAME,
modifiers: {
network_seed: "clone-0",
Expand Down