From 2e6f2fc36f8d5b66e6e407073548d6502060b969 Mon Sep 17 00:00:00 2001 From: "Rob Moore (MakerX)" Date: Thu, 25 Jan 2024 11:10:14 +0800 Subject: [PATCH] fix: Correcting the return type of create and update calls, fixes #89 --- README.md | 9 ++++---- examples/helloworld/client.ts | 25 ++++++++++++--------- examples/lifecycle/client.ts | 29 +++++++++++++++---------- examples/state/client.ts | 41 ++++++++++++++++++++--------------- examples/voting/client.ts | 21 +++++++++++------- src/client/call-client.ts | 32 +++++++++++++++++---------- src/client/imports.ts | 6 +++-- src/client/utility-types.ts | 6 ++++- 8 files changed, 102 insertions(+), 67 deletions(-) diff --git a/README.md b/README.md index da38b94..1923f53 100644 --- a/README.md +++ b/README.md @@ -23,13 +23,13 @@ npx --yes @algorandfoundation/algokit-client-generator generate -a ./applicatio Alternatively, a client can be generated from code by invoking the `generate` function paired with either `writeDocumentPartsToString` or `writeDocumentPartsToStream` depending on your needs. We also expose helpers to optionally load and validate an application.json file. ```ts -import fs from 'fs +import fs from 'fs' import { writeDocumentPartsToStream, writeDocumentPartsToString, generate, loadApplicationJson, - validateApplicationJson + validateApplicationJson, } from '@algorandfoundation/algokit-client-generator' import appJson from './application.json' @@ -39,10 +39,9 @@ const appJsonFromObject = validateApplicationJson(appJson) const fileStream = fs.createWriteStream('./client.ts', { flags: 'w', }) -writeDocumentPartsToStream(generate(appJsonFromFile, fileStream) +writeDocumentPartsToStream(generate(appJsonFromFile, fileStream)) const clientAsString = writeDocumentPartsToString(appJsonFromObject) - ``` For details on how to use the generated client see the more detailed [usage docs](./docs/usage.md) @@ -96,6 +95,8 @@ poetry run python -m examples Or in Visual Studio Code you can use the default build task (Ctrl+Shift+B). +To regenerate the generated clients run `npm run update-approvals`. + ### Continuous Integration / Continuous Deployment (CI/CD) This project uses [GitHub Actions](https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions) to define CI/CD workflows, which are located in the [`.github/workflows`](./.github/workflows) folder. diff --git a/examples/helloworld/client.ts b/examples/helloworld/client.ts index cf4b959..bf57feb 100644 --- a/examples/helloworld/client.ts +++ b/examples/helloworld/client.ts @@ -6,13 +6,15 @@ */ import * as algokit from '@algorandfoundation/algokit-utils' import type { + ABIAppCallArg, AppCallTransactionResult, AppCallTransactionResultOfType, + AppCompilationResult, + AppReference, + AppState, CoreAppCallArgs, RawAppCallArgs, - AppState, TealTemplateParams, - ABIAppCallArg, } from '@algorandfoundation/algokit-utils/types/app' import type { AppClientCallCoreParams, @@ -148,6 +150,9 @@ export type BinaryState = { asString(): string } +export type AppCreateCallTransactionResult = AppCallTransactionResult & Partial & AppReference +export type AppUpdateCallTransactionResult = AppCallTransactionResult & Partial + /** * Defines the types of available calls and state of the HelloWorldApp smart contract. */ @@ -375,14 +380,14 @@ export class HelloWorldAppClient { * @param returnValueFormatter An optional delegate to format the return value if required * @returns The smart contract response with an updated return value */ - protected mapReturnValue(result: AppCallTransactionResult, returnValueFormatter?: (value: any) => TReturn): AppCallTransactionResultOfType { + protected mapReturnValue(result: AppCallTransactionResult, returnValueFormatter?: (value: any) => TReturn): AppCallTransactionResultOfType & TResult { if(result.return?.decodeError) { throw result.return.decodeError } const returnValue = result.return?.returnValue !== undefined && returnValueFormatter !== undefined ? returnValueFormatter(result.return.returnValue) : result.return?.returnValue as TReturn | undefined - return { ...result, return: returnValue } + return { ...result, return: returnValue } as AppCallTransactionResultOfType & TResult } /** @@ -427,8 +432,8 @@ export class HelloWorldAppClient { * @param args The arguments for the bare call * @returns The create result */ - bare(args: BareCallArgs & AppClientCallCoreParams & AppClientCompilationParams & CoreAppCallArgs & (OnCompleteNoOp) = {}): Promise> { - return $this.appClient.create(args) as unknown as Promise> + async bare(args: BareCallArgs & AppClientCallCoreParams & AppClientCompilationParams & CoreAppCallArgs & (OnCompleteNoOp) = {}) { + return $this.mapReturnValue(await $this.appClient.create(args)) }, } } @@ -445,8 +450,8 @@ export class HelloWorldAppClient { * @param args The arguments for the bare call * @returns The update result */ - bare(args: BareCallArgs & AppClientCallCoreParams & AppClientCompilationParams & CoreAppCallArgs = {}): Promise> { - return $this.appClient.update(args) as unknown as Promise> + async bare(args: BareCallArgs & AppClientCallCoreParams & AppClientCompilationParams & CoreAppCallArgs = {}) { + return $this.mapReturnValue(await $this.appClient.update(args)) }, } } @@ -463,8 +468,8 @@ export class HelloWorldAppClient { * @param args The arguments for the bare call * @returns The delete result */ - bare(args: BareCallArgs & AppClientCallCoreParams & CoreAppCallArgs = {}): Promise> { - return $this.appClient.delete(args) as unknown as Promise> + async bare(args: BareCallArgs & AppClientCallCoreParams & CoreAppCallArgs = {}) { + return $this.mapReturnValue(await $this.appClient.delete(args)) }, } } diff --git a/examples/lifecycle/client.ts b/examples/lifecycle/client.ts index 237f3ce..a1b7106 100644 --- a/examples/lifecycle/client.ts +++ b/examples/lifecycle/client.ts @@ -6,13 +6,15 @@ */ import * as algokit from '@algorandfoundation/algokit-utils' import type { + ABIAppCallArg, AppCallTransactionResult, AppCallTransactionResultOfType, + AppCompilationResult, + AppReference, + AppState, CoreAppCallArgs, RawAppCallArgs, - AppState, TealTemplateParams, - ABIAppCallArg, } from '@algorandfoundation/algokit-utils/types/app' import type { AppClientCallCoreParams, @@ -194,6 +196,9 @@ export type BinaryState = { asString(): string } +export type AppCreateCallTransactionResult = AppCallTransactionResult & Partial & AppReference +export type AppUpdateCallTransactionResult = AppCallTransactionResult & Partial + /** * Defines the types of available calls and state of the LifeCycleApp smart contract. */ @@ -442,14 +447,14 @@ export class LifeCycleAppClient { * @param returnValueFormatter An optional delegate to format the return value if required * @returns The smart contract response with an updated return value */ - protected mapReturnValue(result: AppCallTransactionResult, returnValueFormatter?: (value: any) => TReturn): AppCallTransactionResultOfType { + protected mapReturnValue(result: AppCallTransactionResult, returnValueFormatter?: (value: any) => TReturn): AppCallTransactionResultOfType & TResult { if(result.return?.decodeError) { throw result.return.decodeError } const returnValue = result.return?.returnValue !== undefined && returnValueFormatter !== undefined ? returnValueFormatter(result.return.returnValue) : result.return?.returnValue as TReturn | undefined - return { ...result, return: returnValue } + return { ...result, return: returnValue } as AppCallTransactionResultOfType & TResult } /** @@ -492,8 +497,8 @@ export class LifeCycleAppClient { * @param args The arguments for the bare call * @returns The create result */ - bare(args: BareCallArgs & AppClientCallCoreParams & AppClientCompilationParams & CoreAppCallArgs & (OnCompleteNoOp | OnCompleteOptIn) = {}): Promise> { - return $this.appClient.create(args) as unknown as Promise> + async bare(args: BareCallArgs & AppClientCallCoreParams & AppClientCompilationParams & CoreAppCallArgs & (OnCompleteNoOp | OnCompleteOptIn) = {}) { + return $this.mapReturnValue(await $this.appClient.create(args)) }, /** * Creates a new instance of the LifeCycleApp smart contract using the create(string)string ABI method. @@ -502,8 +507,8 @@ export class LifeCycleAppClient { * @param params Any additional parameters for the call * @returns The create result: The formatted greeting */ - async createStringString(args: MethodArgs<'create(string)string'>, params: AppClientCallCoreParams & AppClientCompilationParams & (OnCompleteNoOp) = {}): Promise>> { - return $this.mapReturnValue(await $this.appClient.create(LifeCycleAppCallFactory.create.createStringString(args, params))) + async createStringString(args: MethodArgs<'create(string)string'>, params: AppClientCallCoreParams & AppClientCompilationParams & (OnCompleteNoOp) = {}) { + return $this.mapReturnValue, AppCreateCallTransactionResult>(await $this.appClient.create(LifeCycleAppCallFactory.create.createStringString(args, params))) }, /** * Creates a new instance of the LifeCycleApp smart contract using the create(string,uint32)void ABI method. @@ -512,8 +517,8 @@ export class LifeCycleAppClient { * @param params Any additional parameters for the call * @returns The create result */ - async createStringUint32Void(args: MethodArgs<'create(string,uint32)void'>, params: AppClientCallCoreParams & AppClientCompilationParams & (OnCompleteNoOp) = {}): Promise>> { - return $this.mapReturnValue(await $this.appClient.create(LifeCycleAppCallFactory.create.createStringUint32Void(args, params))) + async createStringUint32Void(args: MethodArgs<'create(string,uint32)void'>, params: AppClientCallCoreParams & AppClientCompilationParams & (OnCompleteNoOp) = {}) { + return $this.mapReturnValue, AppCreateCallTransactionResult>(await $this.appClient.create(LifeCycleAppCallFactory.create.createStringUint32Void(args, params))) }, } } @@ -530,8 +535,8 @@ export class LifeCycleAppClient { * @param args The arguments for the bare call * @returns The update result */ - bare(args: BareCallArgs & AppClientCallCoreParams & AppClientCompilationParams & CoreAppCallArgs = {}): Promise> { - return $this.appClient.update(args) as unknown as Promise> + async bare(args: BareCallArgs & AppClientCallCoreParams & AppClientCompilationParams & CoreAppCallArgs = {}) { + return $this.mapReturnValue(await $this.appClient.update(args)) }, } } diff --git a/examples/state/client.ts b/examples/state/client.ts index 5732ea4..907a5cd 100644 --- a/examples/state/client.ts +++ b/examples/state/client.ts @@ -6,13 +6,15 @@ */ import * as algokit from '@algorandfoundation/algokit-utils' import type { + ABIAppCallArg, AppCallTransactionResult, AppCallTransactionResultOfType, + AppCompilationResult, + AppReference, + AppState, CoreAppCallArgs, RawAppCallArgs, - AppState, TealTemplateParams, - ABIAppCallArg, } from '@algorandfoundation/algokit-utils/types/app' import type { AppClientCallCoreParams, @@ -523,6 +525,9 @@ export type BinaryState = { asString(): string } +export type AppCreateCallTransactionResult = AppCallTransactionResult & Partial & AppReference +export type AppUpdateCallTransactionResult = AppCallTransactionResult & Partial + /** * Defines the types of available calls and state of the StateApp smart contract. */ @@ -1077,14 +1082,14 @@ export class StateAppClient { * @param returnValueFormatter An optional delegate to format the return value if required * @returns The smart contract response with an updated return value */ - protected mapReturnValue(result: AppCallTransactionResult, returnValueFormatter?: (value: any) => TReturn): AppCallTransactionResultOfType { + protected mapReturnValue(result: AppCallTransactionResult, returnValueFormatter?: (value: any) => TReturn): AppCallTransactionResultOfType & TResult { if(result.return?.decodeError) { throw result.return.decodeError } const returnValue = result.return?.returnValue !== undefined && returnValueFormatter !== undefined ? returnValueFormatter(result.return.returnValue) : result.return?.returnValue as TReturn | undefined - return { ...result, return: returnValue } + return { ...result, return: returnValue } as AppCallTransactionResultOfType & TResult } /** @@ -1129,8 +1134,8 @@ export class StateAppClient { * @param args The arguments for the bare call * @returns The create result */ - bare(args: BareCallArgs & AppClientCallCoreParams & AppClientCompilationParams & CoreAppCallArgs & (OnCompleteNoOp | OnCompleteOptIn) = {}): Promise> { - return $this.appClient.create(args) as unknown as Promise> + async bare(args: BareCallArgs & AppClientCallCoreParams & AppClientCompilationParams & CoreAppCallArgs & (OnCompleteNoOp | OnCompleteOptIn) = {}) { + return $this.mapReturnValue(await $this.appClient.create(args)) }, /** * Creates a new instance of the StateApp smart contract using the create_abi(string)string ABI method. @@ -1139,8 +1144,8 @@ export class StateAppClient { * @param params Any additional parameters for the call * @returns The create result */ - async createAbi(args: MethodArgs<'create_abi(string)string'>, params: AppClientCallCoreParams & AppClientCompilationParams & (OnCompleteNoOp) = {}): Promise>> { - return $this.mapReturnValue(await $this.appClient.create(StateAppCallFactory.create.createAbi(args, params))) + async createAbi(args: MethodArgs<'create_abi(string)string'>, params: AppClientCallCoreParams & AppClientCompilationParams & (OnCompleteNoOp) = {}) { + return $this.mapReturnValue, AppCreateCallTransactionResult>(await $this.appClient.create(StateAppCallFactory.create.createAbi(args, params))) }, } } @@ -1157,8 +1162,8 @@ export class StateAppClient { * @param args The arguments for the bare call * @returns The update result */ - bare(args: BareCallArgs & AppClientCallCoreParams & AppClientCompilationParams & CoreAppCallArgs = {}): Promise> { - return $this.appClient.update(args) as unknown as Promise> + async bare(args: BareCallArgs & AppClientCallCoreParams & AppClientCompilationParams & CoreAppCallArgs = {}) { + return $this.mapReturnValue(await $this.appClient.update(args)) }, /** * Updates an existing instance of the StateApp smart contract using the update_abi(string)string ABI method. @@ -1167,8 +1172,8 @@ export class StateAppClient { * @param params Any additional parameters for the call * @returns The update result */ - async updateAbi(args: MethodArgs<'update_abi(string)string'>, params: AppClientCallCoreParams & AppClientCompilationParams = {}): Promise>> { - return $this.mapReturnValue(await $this.appClient.update(StateAppCallFactory.update.updateAbi(args, params))) + async updateAbi(args: MethodArgs<'update_abi(string)string'>, params: AppClientCallCoreParams & AppClientCompilationParams = {}) { + return $this.mapReturnValue, AppUpdateCallTransactionResult>(await $this.appClient.update(StateAppCallFactory.update.updateAbi(args, params))) }, } } @@ -1185,8 +1190,8 @@ export class StateAppClient { * @param args The arguments for the bare call * @returns The delete result */ - bare(args: BareCallArgs & AppClientCallCoreParams & CoreAppCallArgs = {}): Promise> { - return $this.appClient.delete(args) as unknown as Promise> + async bare(args: BareCallArgs & AppClientCallCoreParams & CoreAppCallArgs = {}) { + return $this.mapReturnValue(await $this.appClient.delete(args)) }, /** * Deletes an existing instance of the StateApp smart contract using the delete_abi(string)string ABI method. @@ -1195,8 +1200,8 @@ export class StateAppClient { * @param params Any additional parameters for the call * @returns The delete result */ - async deleteAbi(args: MethodArgs<'delete_abi(string)string'>, params: AppClientCallCoreParams = {}): Promise>> { - return $this.mapReturnValue(await $this.appClient.delete(StateAppCallFactory.delete.deleteAbi(args, params))) + async deleteAbi(args: MethodArgs<'delete_abi(string)string'>, params: AppClientCallCoreParams = {}) { + return $this.mapReturnValue>(await $this.appClient.delete(StateAppCallFactory.delete.deleteAbi(args, params))) }, } } @@ -1214,8 +1219,8 @@ export class StateAppClient { * @param params Any additional parameters for the call * @returns The optIn result */ - async optIn(args: MethodArgs<'opt_in()void'>, params: AppClientCallCoreParams = {}): Promise>> { - return $this.mapReturnValue(await $this.appClient.optIn(StateAppCallFactory.optIn.optIn(args, params))) + async optIn(args: MethodArgs<'opt_in()void'>, params: AppClientCallCoreParams = {}) { + return $this.mapReturnValue>(await $this.appClient.optIn(StateAppCallFactory.optIn.optIn(args, params))) }, } } diff --git a/examples/voting/client.ts b/examples/voting/client.ts index e83b647..38da848 100644 --- a/examples/voting/client.ts +++ b/examples/voting/client.ts @@ -6,13 +6,15 @@ */ import * as algokit from '@algorandfoundation/algokit-utils' import type { + ABIAppCallArg, AppCallTransactionResult, AppCallTransactionResultOfType, + AppCompilationResult, + AppReference, + AppState, CoreAppCallArgs, RawAppCallArgs, - AppState, TealTemplateParams, - ABIAppCallArg, } from '@algorandfoundation/algokit-utils/types/app' import type { AppClientCallCoreParams, @@ -319,6 +321,9 @@ export type BinaryState = { asString(): string } +export type AppCreateCallTransactionResult = AppCallTransactionResult & Partial & AppReference +export type AppUpdateCallTransactionResult = AppCallTransactionResult & Partial + /** * Defines the types of available calls and state of the VotingRoundApp smart contract. */ @@ -653,14 +658,14 @@ export class VotingRoundAppClient { * @param returnValueFormatter An optional delegate to format the return value if required * @returns The smart contract response with an updated return value */ - protected mapReturnValue(result: AppCallTransactionResult, returnValueFormatter?: (value: any) => TReturn): AppCallTransactionResultOfType { + protected mapReturnValue(result: AppCallTransactionResult, returnValueFormatter?: (value: any) => TReturn): AppCallTransactionResultOfType & TResult { if(result.return?.decodeError) { throw result.return.decodeError } const returnValue = result.return?.returnValue !== undefined && returnValueFormatter !== undefined ? returnValueFormatter(result.return.returnValue) : result.return?.returnValue as TReturn | undefined - return { ...result, return: returnValue } + return { ...result, return: returnValue } as AppCallTransactionResultOfType & TResult } /** @@ -704,8 +709,8 @@ export class VotingRoundAppClient { * @param params Any additional parameters for the call * @returns The create result */ - async create(args: MethodArgs<'create(string,byte[],string,uint64,uint64,uint8[],uint64,string)void'>, params: AppClientCallCoreParams & AppClientCompilationParams & (OnCompleteNoOp) = {}): Promise>> { - return $this.mapReturnValue(await $this.appClient.create(VotingRoundAppCallFactory.create.create(args, params))) + async create(args: MethodArgs<'create(string,byte[],string,uint64,uint64,uint8[],uint64,string)void'>, params: AppClientCallCoreParams & AppClientCompilationParams & (OnCompleteNoOp) = {}) { + return $this.mapReturnValue, AppCreateCallTransactionResult>(await $this.appClient.create(VotingRoundAppCallFactory.create.create(args, params))) }, } } @@ -722,8 +727,8 @@ export class VotingRoundAppClient { * @param args The arguments for the bare call * @returns The delete result */ - bare(args: BareCallArgs & AppClientCallCoreParams & CoreAppCallArgs = {}): Promise> { - return $this.appClient.delete(args) as unknown as Promise> + async bare(args: BareCallArgs & AppClientCallCoreParams & CoreAppCallArgs = {}) { + return $this.mapReturnValue(await $this.appClient.delete(args)) }, } } diff --git a/src/client/call-client.ts b/src/client/call-client.ts index 0dc9953..ee5bcc5 100644 --- a/src/client/call-client.ts +++ b/src/client/call-client.ts @@ -45,9 +45,9 @@ export function* callClient(ctx: GeneratorContext): DocumentParts { returns: 'The smart contract response with an updated return value', }) yield* inline( - `protected mapReturnValue`, + `protected mapReturnValue`, `(result: AppCallTransactionResult, returnValueFormatter?: (value: any) => TReturn): `, - `AppCallTransactionResultOfType {`, + `AppCallTransactionResultOfType & TResult {`, ) yield IncIndent yield `if(result.return?.decodeError) {` @@ -57,7 +57,7 @@ export function* callClient(ctx: GeneratorContext): DocumentParts { yield IncIndent yield `? returnValueFormatter(result.return.returnValue)` yield `: result.return?.returnValue as TReturn | undefined` - yield `return { ...result, return: returnValue }` + yield `return { ...result, return: returnValue } as AppCallTransactionResultOfType & TResult` yield DecIndent yield DecIndentAndCloseBlock yield NewLine @@ -144,6 +144,18 @@ function* operationMethod( verb: 'create' | 'update' | 'optIn' | 'closeOut' | 'delete', includeCompilation?: boolean, ): DocumentParts { + let responseTypeGenericParam + switch (verb) { + case 'create': + responseTypeGenericParam = ', AppCreateCallTransactionResult' + break + case 'update': + responseTypeGenericParam = ', AppUpdateCallTransactionResult' + break + default: + responseTypeGenericParam = '' + break + } if (methods.length) { yield* jsDoc(`Gets available ${verb} methods`) yield `public get ${verb}() {` @@ -161,12 +173,10 @@ function* operationMethod( }, returns: `The ${verb} result`, }) - yield `bare(args: BareCallArgs & AppClientCallCoreParams ${ + yield `async bare(args: BareCallArgs & AppClientCallCoreParams ${ includeCompilation ? '& AppClientCompilationParams ' : '' - }& CoreAppCallArgs${onComplete?.type ? ` & ${onComplete.type}` : ''}${ - onComplete?.isOptional !== false ? ' = {}' : '' - }): Promise> {` - yield* indent(`return $this.appClient.${verb}(args) as unknown as Promise>`) + }& CoreAppCallArgs${onComplete?.type ? ` & ${onComplete.type}` : ''}${onComplete?.isOptional !== false ? ' = {}' : ''}) {` + yield* indent(`return $this.mapReturnValue(await $this.appClient.${verb}(args))`) yield '},' } else { const uniqueName = methodSignatureToUniqueName[methodSig] @@ -181,11 +191,9 @@ function* operationMethod( }) yield `async ${makeSafeMethodIdentifier(uniqueName)}(args: MethodArgs<'${methodSig}'>, params: AppClientCallCoreParams${ includeCompilation ? ' & AppClientCompilationParams' : '' - }${onComplete?.type ? ` & ${onComplete.type}` : ''}${ - onComplete?.isOptional !== false ? ' = {}' : '' - }): Promise>> {` + }${onComplete?.type ? ` & ${onComplete.type}` : ''}${onComplete?.isOptional !== false ? ' = {}' : ''}) {` yield* indent( - `return $this.mapReturnValue(await $this.appClient.${verb}(${name}CallFactory.${verb}.${makeSafeMethodIdentifier( + `return $this.mapReturnValue${responseTypeGenericParam}>(await $this.appClient.${verb}(${name}CallFactory.${verb}.${makeSafeMethodIdentifier( uniqueName, )}(args, params)))`, ) diff --git a/src/client/imports.ts b/src/client/imports.ts index 98014fc..42d2e6e 100644 --- a/src/client/imports.ts +++ b/src/client/imports.ts @@ -3,13 +3,15 @@ import { DocumentParts } from '../output/writer' export function* imports(): DocumentParts { yield `import * as algokit from '@algorandfoundation/algokit-utils' import type { + ABIAppCallArg, AppCallTransactionResult, AppCallTransactionResultOfType, + AppCompilationResult, + AppReference, + AppState, CoreAppCallArgs, RawAppCallArgs, - AppState, TealTemplateParams, - ABIAppCallArg, } from '@algorandfoundation/algokit-utils/types/app' import type { AppClientCallCoreParams, diff --git a/src/client/utility-types.ts b/src/client/utility-types.ts index decbbcf..41b7dbf 100644 --- a/src/client/utility-types.ts +++ b/src/client/utility-types.ts @@ -1,4 +1,4 @@ -import { DecIndentAndCloseBlock, DocumentParts, IncIndent, jsDoc } from '../output/writer' +import { DecIndentAndCloseBlock, DocumentParts, IncIndent, jsDoc, NewLine } from '../output/writer' export function* utilityTypes(): DocumentParts { yield* jsDoc(`Defines an onCompletionAction of 'no_op'`) @@ -28,6 +28,10 @@ export function* utilityTypes(): DocumentParts { yield* jsDoc('Gets the state value as a string') yield `asString(): string` yield DecIndentAndCloseBlock + + yield NewLine + yield `export type AppCreateCallTransactionResult = AppCallTransactionResult & Partial & AppReference` + yield `export type AppUpdateCallTransactionResult = AppCallTransactionResult & Partial` } export const OnCompleteCodeMap = {