From fdbbde13abc4651849c6e60b760e1ed81168b56d Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 1 Dec 2024 21:36:53 +0100 Subject: [PATCH] remove unnecessary app clone cell types --- docs/client.appclient.createclonecell.md | 4 +-- docs/client.appclient.disableclonecell.md | 4 +-- docs/client.appclient.enableclonecell.md | 4 +-- docs/client.appcreateclonecellrequest.md | 14 --------- docs/client.appdisableclonecellrequest.md | 14 --------- docs/client.appenableclonecellrequest.md | 14 --------- docs/client.appwebsocket.createclonecell.md | 4 +-- docs/client.appwebsocket.disableclonecell.md | 4 +-- docs/client.appwebsocket.enableclonecell.md | 4 +-- ...ient.appwebsocket.getcellidfromrolename.md | 4 +-- docs/client.md | 30 ------------------- package-lock.json | 4 +-- src/api/app/types.ts | 24 ++------------- src/api/app/websocket.ts | 18 ++++------- test/e2e/app-websocket.ts | 6 ++-- 15 files changed, 27 insertions(+), 125 deletions(-) delete mode 100644 docs/client.appcreateclonecellrequest.md delete mode 100644 docs/client.appdisableclonecellrequest.md delete mode 100644 docs/client.appenableclonecellrequest.md diff --git a/docs/client.appclient.createclonecell.md b/docs/client.appclient.createclonecell.md index 3f014316..bcd58e84 100644 --- a/docs/client.appclient.createclonecell.md +++ b/docs/client.appclient.createclonecell.md @@ -7,7 +7,7 @@ **Signature:** ```typescript -createCloneCell(args: AppCreateCloneCellRequest): Promise; +createCloneCell(args: CreateCloneCellRequest): Promise; ``` ## Parameters @@ -35,7 +35,7 @@ args -[AppCreateCloneCellRequest](./client.appcreateclonecellrequest.md) +[CreateCloneCellRequest](./client.createclonecellrequest.md) diff --git a/docs/client.appclient.disableclonecell.md b/docs/client.appclient.disableclonecell.md index 1d92507c..20a82f1c 100644 --- a/docs/client.appclient.disableclonecell.md +++ b/docs/client.appclient.disableclonecell.md @@ -7,7 +7,7 @@ **Signature:** ```typescript -disableCloneCell(args: AppDisableCloneCellRequest): Promise; +disableCloneCell(args: DisableCloneCellRequest): Promise; ``` ## Parameters @@ -35,7 +35,7 @@ args -[AppDisableCloneCellRequest](./client.appdisableclonecellrequest.md) +[DisableCloneCellRequest](./client.disableclonecellrequest.md) diff --git a/docs/client.appclient.enableclonecell.md b/docs/client.appclient.enableclonecell.md index 4bec4230..53dde3f8 100644 --- a/docs/client.appclient.enableclonecell.md +++ b/docs/client.appclient.enableclonecell.md @@ -7,7 +7,7 @@ **Signature:** ```typescript -enableCloneCell(args: AppEnableCloneCellRequest): Promise; +enableCloneCell(args: EnableCloneCellRequest): Promise; ``` ## Parameters @@ -35,7 +35,7 @@ args -[AppEnableCloneCellRequest](./client.appenableclonecellrequest.md) +[EnableCloneCellRequest](./client.enableclonecellrequest.md) diff --git a/docs/client.appcreateclonecellrequest.md b/docs/client.appcreateclonecellrequest.md deleted file mode 100644 index e4c200e2..00000000 --- a/docs/client.appcreateclonecellrequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -[Home](./index.md) > [@holochain/client](./client.md) > [AppCreateCloneCellRequest](./client.appcreateclonecellrequest.md) - -## AppCreateCloneCellRequest type - - -**Signature:** - -```typescript -export type AppCreateCloneCellRequest = Omit; -``` -**References:** [CreateCloneCellRequest](./client.createclonecellrequest.md) - diff --git a/docs/client.appdisableclonecellrequest.md b/docs/client.appdisableclonecellrequest.md deleted file mode 100644 index 21ae3ba8..00000000 --- a/docs/client.appdisableclonecellrequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -[Home](./index.md) > [@holochain/client](./client.md) > [AppDisableCloneCellRequest](./client.appdisableclonecellrequest.md) - -## AppDisableCloneCellRequest type - - -**Signature:** - -```typescript -export type AppDisableCloneCellRequest = Omit; -``` -**References:** [DisableCloneCellRequest](./client.disableclonecellrequest.md) - diff --git a/docs/client.appenableclonecellrequest.md b/docs/client.appenableclonecellrequest.md deleted file mode 100644 index 9f6b0de6..00000000 --- a/docs/client.appenableclonecellrequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -[Home](./index.md) > [@holochain/client](./client.md) > [AppEnableCloneCellRequest](./client.appenableclonecellrequest.md) - -## AppEnableCloneCellRequest type - - -**Signature:** - -```typescript -export type AppEnableCloneCellRequest = Omit; -``` -**References:** [EnableCloneCellRequest](./client.enableclonecellrequest.md) - diff --git a/docs/client.appwebsocket.createclonecell.md b/docs/client.appwebsocket.createclonecell.md index aaca715c..82dc6c00 100644 --- a/docs/client.appwebsocket.createclonecell.md +++ b/docs/client.appwebsocket.createclonecell.md @@ -9,7 +9,7 @@ Clone an existing provisioned cell. **Signature:** ```typescript -createCloneCell(args: AppCreateCloneCellRequest): Promise; +createCloneCell(args: CreateCloneCellRequest): Promise; ``` ## Parameters @@ -37,7 +37,7 @@ args -[AppCreateCloneCellRequest](./client.appcreateclonecellrequest.md) +[CreateCloneCellRequest](./client.createclonecellrequest.md) diff --git a/docs/client.appwebsocket.disableclonecell.md b/docs/client.appwebsocket.disableclonecell.md index 7ac6ca46..bd601bb9 100644 --- a/docs/client.appwebsocket.disableclonecell.md +++ b/docs/client.appwebsocket.disableclonecell.md @@ -9,7 +9,7 @@ Disable an enabled clone cell. **Signature:** ```typescript -disableCloneCell(args: AppDisableCloneCellRequest): Promise; +disableCloneCell(args: DisableCloneCellRequest): Promise; ``` ## Parameters @@ -37,7 +37,7 @@ args -[AppDisableCloneCellRequest](./client.appdisableclonecellrequest.md) +[DisableCloneCellRequest](./client.disableclonecellrequest.md) diff --git a/docs/client.appwebsocket.enableclonecell.md b/docs/client.appwebsocket.enableclonecell.md index 1875899a..0166867c 100644 --- a/docs/client.appwebsocket.enableclonecell.md +++ b/docs/client.appwebsocket.enableclonecell.md @@ -9,7 +9,7 @@ Enable a disabled clone cell. **Signature:** ```typescript -enableCloneCell(args: AppEnableCloneCellRequest): Promise; +enableCloneCell(args: EnableCloneCellRequest): Promise; ``` ## Parameters @@ -37,7 +37,7 @@ args -[AppEnableCloneCellRequest](./client.appenableclonecellrequest.md) +[EnableCloneCellRequest](./client.enableclonecellrequest.md) diff --git a/docs/client.appwebsocket.getcellidfromrolename.md b/docs/client.appwebsocket.getcellidfromrolename.md index c028286c..e5a40e6e 100644 --- a/docs/client.appwebsocket.getcellidfromrolename.md +++ b/docs/client.appwebsocket.getcellidfromrolename.md @@ -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 @@ -65,7 +65,7 @@ The app info containing all cell infos. **Returns:** -[CellId](./client.cellid.md) +import("../../types.js").[CellId](./client.cellid.md) The cell id or throws an error if not found. diff --git a/docs/client.md b/docs/client.md index 1114b405..801a9ce6 100644 --- a/docs/client.md +++ b/docs/client.md @@ -1432,36 +1432,6 @@ This type is meant to be opaque - - - -[AppCreateCloneCellRequest](./client.appcreateclonecellrequest.md) - - - - - - - - - -[AppDisableCloneCellRequest](./client.appdisableclonecellrequest.md) - - - - - - - - - -[AppEnableCloneCellRequest](./client.appenableclonecellrequest.md) - - - - - - diff --git a/package-lock.json b/package-lock.json index 1ec0b480..51f5ef19 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@holochain/client", - "version": "0.19.0-dev.5", + "version": "0.19.0-dev.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@holochain/client", - "version": "0.19.0-dev.5", + "version": "0.19.0-dev.6", "license": "CAL-1.0", "dependencies": { "@bitgo/blake2b": "^3.2.4", diff --git a/src/api/app/types.ts b/src/api/app/types.ts index 1fe3ca8f..d1d5f565 100644 --- a/src/api/app/types.ts +++ b/src/api/app/types.ts @@ -26,24 +26,6 @@ import { SignedActionHashed, } from "../../index.js"; -/** - * @public - */ -export type AppCreateCloneCellRequest = Omit; - -/** - * @public - */ -export type AppEnableCloneCellRequest = Omit; - -/** - * @public - */ -export type AppDisableCloneCellRequest = Omit< - DisableCloneCellRequest, - "app_id" ->; - /** * @public */ @@ -511,13 +493,13 @@ export interface AppClient { installedAppId: InstalledAppId; createCloneCell( - args: AppCreateCloneCellRequest + args: CreateCloneCellRequest ): Promise; enableCloneCell( - args: AppEnableCloneCellRequest + args: EnableCloneCellRequest ): Promise; disableCloneCell( - args: AppDisableCloneCellRequest + args: DisableCloneCellRequest ): Promise; networkInfo(args: AppNetworkInfoRequest): Promise; } diff --git a/src/api/app/websocket.ts b/src/api/app/websocket.ts index bcae6ed6..ef95bfd6 100644 --- a/src/api/app/websocket.ts +++ b/src/api/app/websocket.ts @@ -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, @@ -22,9 +17,6 @@ import { AppClient, AppEvents, AppNetworkInfoRequest, - AppCreateCloneCellRequest, - AppDisableCloneCellRequest, - AppEnableCloneCellRequest, AppInfoResponse, SignalCb, CallZomeRequest, @@ -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, }); @@ -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, }); @@ -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, }); diff --git a/test/e2e/app-websocket.ts b/test/e2e/app-websocket.ts index 718af463..9894656a 100644 --- a/test/e2e/app-websocket.ts +++ b/test/e2e/app-websocket.ts @@ -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, @@ -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", @@ -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",