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

Add Latest Types v1.3.0 #68

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
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
170 changes: 170 additions & 0 deletions src/generatedTypes/v1.3.0.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
/* tslint:disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/

/**
* Semantic versioning of document.
*/
export type Version = string;
/**
* The code identifying the CLI, UI, service generating the order.
*/
export type AppCode = string;
/**
* Environment from which the order came from.
*/
export type Environment = string;
/**
* The address of the trader who signs the CoW Swap order. This field should normally be omitted; it is recommended to use it if the signer is a smart-contract wallet using EIP-1271 signatures.
*/
export type Signer = string;
export type ReferrerAddress = string;
/**
* Tracks in which medium the traffic originated from (twitter, facebook, etc.)
*/
export type UTMSource = string;
/**
* Tracks in which medium the traffic originated from (mail, CPC, social, etc.)
*/
export type UTMMedium = string;
/**
* Track the performance of a specific campaign
*/
export type UTMCampaign = string;
/**
* Track which link was clicked
*/
export type UTMContent = string;
/**
* Track which keyword term a website visitor came from
*/
export type UTMKeywordTerm = string;
/**
* Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS). One basis point is equivalent to 0.01% (1/100th of a percent)
*/
export type SlippageBips = number;
/**
* Whether the given slippageBips used is originated from a Smart slippage suggestion
*/
export type SmartSlippage = boolean;
/**
* Indicator of the order class.
*/
export type OrderClass1 = "market" | "limit" | "liquidity" | "twap";
/**
* Semantic versioning of document.
*/
export type Version1 = string;
/**
* The contract to call for the hook
*/
export type HookTarget = string;
/**
* The calldata to use when calling the hook
*/
export type HookCallData = string;
/**
* The gas limit (in gas units) for the hook
*/
export type HookGasLimit = string;
/**
* CoW Swap has an interface that allows dApps to build hooks for orders. This field is used to identify the dApp that has built the hook.
*/
export type IdOfTheDAppWhichHasBuiltTheHook = string;
/**
* CoW Hooks to call before an order executes
*/
export type PreHooks = CoWHook[];
/**
* CoW Hooks to call after an order executes
*/
export type PostHooks = CoWHook[];
/**
* The code identifying the UI powering the widget
*/
export type AppCode1 = string;
/**
* Environment from which the order came from.
*/
export type Environment1 = string;
/**
* The fee in basis points (BPS) to be paid to the partner. One basis point is equivalent to 0.01% (1/100th of a percent)
*/
export type BasisPointBPS = number;
/**
* The Ethereum address of the partner to receive the fee.
*/
export type PartnerAccount = string;
/**
* The replaced order UID.
*/
export type ReplacedOrderUID = string;

/**
* Metadata JSON document for adding information to orders.
*/
export interface AppDataRootSchema {
version: Version;
appCode?: AppCode;
environment?: Environment;
metadata: Metadata;
}
/**
* Each metadata will specify one aspect of the order.
*/
export interface Metadata {
signer?: Signer;
referrer?: Referrer;
utm?: UTMCodes;
quote?: Quote;
orderClass?: OrderClass;
hooks?: OrderInteractionHooks;
widget?: Widget;
partnerFee?: PartnerFee;
replacedOrder?: ReplacedOrder;
}
export interface Referrer {
address: ReferrerAddress;
}
export interface UTMCodes {
utmSource?: UTMSource;
utmMedium?: UTMMedium;
utmCampaign?: UTMCampaign;
utmContent?: UTMContent;
utmTerm?: UTMKeywordTerm;
}
export interface Quote {
slippageBips: SlippageBips;
smartSlippage?: SmartSlippage;
}
export interface OrderClass {
orderClass: OrderClass1;
}
/**
* Optional Pre and Post order interaction hooks attached to a single order
*/
export interface OrderInteractionHooks {
version?: Version1;
pre?: PreHooks;
post?: PostHooks;
}
export interface CoWHook {
target: HookTarget;
callData: HookCallData;
gasLimit: HookGasLimit;
dappId?: IdOfTheDAppWhichHasBuiltTheHook;
}
export interface Widget {
appCode: AppCode1;
environment?: Environment1;
}
export interface PartnerFee {
bps: BasisPointBPS;
recipient: PartnerAccount;
}
export interface ReplacedOrder {
uid: ReplacedOrderUID;
}
Loading