Skip to content

Commit

Permalink
Fixed Documentation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nhenin committed Apr 18, 2024
1 parent 0d2f5d4 commit fb7ef61
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 10 deletions.
5 changes: 5 additions & 0 deletions packages/runtime/client/rest/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,11 @@ export interface ContractsAPI {
*/
export type RestDI = { restClient: RestClient };

/**
*
* @description Dependency Injection for the Wallet API
* @hidden
*/
export type DeprecatedRestDI = { deprecatedRestAPI: FPTSRestAPI };

/**
Expand Down
26 changes: 25 additions & 1 deletion packages/runtime/lifecycle/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,20 @@ import {
ContractInstanceAPI,
} from "./generic/new-contract-api.js";
import {
ApplyInputsRequest,
ContractsAPI,
CreateContractRequest,
CreateContractRequestBase,
CreateContractRequestFromBundle,
CreateContractRequestFromContract,
} from "./generic/contracts.js";
import {
ContractsAPI as NewContractsAPI,
ApplicableActionsAPI as NewApplicableActionsAPI,
ComputeApplicableActionsRequest,
} from "./generic/new-contract-api.js";
import * as NewContract from "./generic/new-contract-api.js";

export {
ApplicableActionsAPI,
ApplicableAction,
Expand All @@ -50,8 +61,15 @@ export {
ContractDetails,
ContractInstanceAPI,
CreateContractRequestBase,
ContractsAPI,
ApplyInputsRequest,
CreateContractRequest,
NewContractsAPI,
NewApplicableActionsAPI,
ComputeApplicableActionsRequest,
CreateContractRequestFromContract,
CreateContractRequestFromBundle,
};
import * as NewContract from "./generic/new-contract-api.js";

/**
* This is the main entry point of the @marlowe.io/runtime-lifecycle package. It provides a set of APIs to
Expand All @@ -70,9 +88,15 @@ export interface RuntimeLifecycle {
* Access to the low-level REST API as defined in the {@link @marlowe.io/runtime-rest-client! } package. It is re-exported here for convenience.
*/
restClient: RestClient;

/**
* The new contract API is a high level API that lets you create and interact with Marlowe contracts.
*/
newContractAPI: NewContract.ContractsAPI;

/**
* The contracts API is a high level API that lets you create and interact with Marlowe contracts.
* @deprecated Use {@link RuntimeLifecycle.newContractAPI} instead.
*/
contracts: ContractsAPI;
payouts: PayoutsAPI;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import {
Tags,
TxId,
} from "@marlowe.io/runtime-core";
import { RestClient, RestDI, Tip } from "@marlowe.io/runtime-rest-client";
import { RestDI } from "@marlowe.io/runtime-rest-client";
import { WalletAPI, WalletDI } from "@marlowe.io/wallet";
import * as Big from "@marlowe.io/adapter/bigint";
import { ContractSourceId } from "@marlowe.io/marlowe-object";
Expand Down
8 changes: 1 addition & 7 deletions packages/runtime/lifecycle/src/generic/contracts.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import * as TE from "fp-ts/lib/TaskEither.js";
import { pipe } from "fp-ts/lib/function.js";
import { Option } from "fp-ts/lib/Option.js";
import {
Contract,
Expand All @@ -8,7 +6,7 @@ import {
Party,
RoleName,
} from "@marlowe.io/language-core-v1";
import { tryCatchDefault, unsafeTaskEither } from "@marlowe.io/adapter/fp-ts";
import { unsafeTaskEither } from "@marlowe.io/adapter/fp-ts";

import {
getAddressesAndCollaterals,
Expand All @@ -20,8 +18,6 @@ import {
ContractId,
contractIdToTxId,
TxId,
AddressesAndCollaterals,
HexTransactionWitnessSet,
transactionWitnessSetTextEnvelope,
BlockHeader,
StakeAddressBech32,
Expand All @@ -36,14 +32,12 @@ import {
ItemRange,
DeprecatedRestDI,
} from "@marlowe.io/runtime-rest-client";
import { DecodingError } from "@marlowe.io/adapter/codec";

import { Next, noNext } from "@marlowe.io/language-core-v1/next";
import {
BuildCreateContractTxRequest,
BuildCreateContractTxRequestOptions,
RolesConfiguration,
TransactionTextEnvelope,
} from "@marlowe.io/runtime-rest-client/contract";
import { SingleInputTx } from "@marlowe.io/language-core-v1/transaction.js";
import { ISO8601, iso8601ToPosixTime } from "@marlowe.io/adapter/time";
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/lifecycle/src/generic/new-contract-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function mkApplicableActionsAPI(
* TODO comment
* @category New ContractsAPI
*/
type ComputeApplicableActionsRequest = {
export type ComputeApplicableActionsRequest = {
environment?: Environment;
contractDetails?: ContractDetails;
};
Expand Down

0 comments on commit fb7ef61

Please sign in to comment.