diff --git a/package.json b/package.json index 63d4e3dc..fbb391c9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cowprotocol/cow-sdk", - "version": "3.0.1", + "version": "4.0.0", "license": "(MIT OR Apache-2.0)", "files": [ "/dist" @@ -27,7 +27,7 @@ "prepare": "npm run build", "prepublishOnly": "npm test && npm run lint", "graphql:codegen": "graphql-codegen --config graphql-codegen.yml", - "swagger:codegen": " openapi --input https://raw.githubusercontent.com/cowprotocol/services/v2.220.0/crates/orderbook/openapi.yml --output src/order-book/generated --exportServices false --exportCore false", + "swagger:codegen": " openapi --input https://raw.githubusercontent.com/cowprotocol/services/v2.227.1/crates/orderbook/openapi.yml --output src/order-book/generated --exportServices false --exportCore false", "typechain:codegen": "typechain --target ethers-v5 --out-dir ./src/composable/generated './abi/*.json'" }, "dependencies": { diff --git a/src/order-book/generated/index.ts b/src/order-book/generated/index.ts index 45fdf2d6..86a7829c 100644 --- a/src/order-book/generated/index.ts +++ b/src/order-book/generated/index.ts @@ -15,7 +15,6 @@ export type { CompetitionAuction } from './models/CompetitionAuction'; export type { EcdsaSignature } from './models/EcdsaSignature'; export { EcdsaSigningScheme } from './models/EcdsaSigningScheme'; export type { EthflowData } from './models/EthflowData'; -export { FeeAndQuoteError } from './models/FeeAndQuoteError'; export type { NativePriceResponse } from './models/NativePriceResponse'; export { OnchainOrderData } from './models/OnchainOrderData'; export type { Order } from './models/Order'; @@ -36,6 +35,7 @@ export { OrderQuoteSideKindSell } from './models/OrderQuoteSideKindSell'; export type { OrderQuoteValidity } from './models/OrderQuoteValidity'; export { OrderStatus } from './models/OrderStatus'; export type { PreSignature } from './models/PreSignature'; +export { PriceEstimationError } from './models/PriceEstimationError'; export { PriceQuality } from './models/PriceQuality'; export type { ProtocolAppData } from './models/ProtocolAppData'; export { ReplaceOrderError } from './models/ReplaceOrderError'; diff --git a/src/order-book/generated/models/FeeAndQuoteError.ts b/src/order-book/generated/models/FeeAndQuoteError.ts deleted file mode 100644 index d086bb63..00000000 --- a/src/order-book/generated/models/FeeAndQuoteError.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type FeeAndQuoteError = { - errorType: FeeAndQuoteError.errorType; - description: string; -}; - -export namespace FeeAndQuoteError { - - export enum errorType { - NO_LIQUIDITY = 'NoLiquidity', - UNSUPPORTED_TOKEN = 'UnsupportedToken', - AMOUNT_IS_ZERO = 'AmountIsZero', - SELL_AMOUNT_DOES_NOT_COVER_FEE = 'SellAmountDoesNotCoverFee', - } - - -} - diff --git a/src/order-book/generated/models/OrderPostError.ts b/src/order-book/generated/models/OrderPostError.ts index 36a7c832..c1fee9ac 100644 --- a/src/order-book/generated/models/OrderPostError.ts +++ b/src/order-book/generated/models/OrderPostError.ts @@ -10,27 +10,33 @@ export type OrderPostError = { export namespace OrderPostError { export enum errorType { - DUPLICATE_ORDER = 'DuplicateOrder', - INSUFFICIENT_FEE = 'InsufficientFee', - INSUFFICIENT_ALLOWANCE = 'InsufficientAllowance', + DUPLICATED_ORDER = 'DuplicatedOrder', + QUOTE_NOT_FOUND = 'QuoteNotFound', + INVALID_QUOTE = 'InvalidQuote', + MISSING_FROM = 'MissingFrom', + WRONG_OWNER = 'WrongOwner', + INVALID_EIP1271SIGNATURE = 'InvalidEip1271Signature', INSUFFICIENT_BALANCE = 'InsufficientBalance', - INSUFFICIENT_VALID_TO = 'InsufficientValidTo', - EXCESSIVE_VALID_TO = 'ExcessiveValidTo', + INSUFFICIENT_ALLOWANCE = 'InsufficientAllowance', INVALID_SIGNATURE = 'InvalidSignature', - TRANSFER_ETH_TO_CONTRACT = 'TransferEthToContract', + INSUFFICIENT_FEE = 'InsufficientFee', + SELL_AMOUNT_OVERFLOW = 'SellAmountOverflow', TRANSFER_SIMULATION_FAILED = 'TransferSimulationFailed', - UNSUPPORTED_TOKEN = 'UnsupportedToken', - WRONG_OWNER = 'WrongOwner', - INVALID_EIP1271SIGNATURE = 'InvalidEip1271Signature', - MISSING_FROM = 'MissingFrom', - SAME_BUY_AND_SELL_TOKEN = 'SameBuyAndSellToken', ZERO_AMOUNT = 'ZeroAmount', + INCOMPATIBLE_SIGNING_SCHEME = 'IncompatibleSigningScheme', UNSUPPORTED_BUY_TOKEN_DESTINATION = 'UnsupportedBuyTokenDestination', UNSUPPORTED_SELL_TOKEN_SOURCE = 'UnsupportedSellTokenSource', UNSUPPORTED_ORDER_TYPE = 'UnsupportedOrderType', + INSUFFICIENT_VALID_TO = 'InsufficientValidTo', + EXCESSIVE_VALID_TO = 'ExcessiveValidTo', + TRANSFER_ETH_TO_CONTRACT = 'TransferEthToContract', + INVALID_NATIVE_SELL_TOKEN = 'InvalidNativeSellToken', + SAME_BUY_AND_SELL_TOKEN = 'SameBuyAndSellToken', UNSUPPORTED_SIGNATURE = 'UnsupportedSignature', - TOO_MANY_LIMIT_ORDERS = 'TooManyLimitOrders', + TOO_MANY_LIMIT_ORDERS= 'TooManyLimitOrders', INVALID_APP_DATA = 'InvalidAppData', + UNSUPPORTED_TOKEN = 'UnsupportedToken', + UNSUPPORTED_CUSTOM_INTERACTION = 'UnsupportedCustomInteraction', APP_DATA_HASH_MISMATCH = 'AppDataHashMismatch', } diff --git a/src/order-book/generated/models/PriceEstimationError.ts b/src/order-book/generated/models/PriceEstimationError.ts new file mode 100644 index 00000000..0566edc8 --- /dev/null +++ b/src/order-book/generated/models/PriceEstimationError.ts @@ -0,0 +1,20 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type PriceEstimationError = { + errorType: PriceEstimationError.errorType; + description: string; +}; + +export namespace PriceEstimationError { + + export enum errorType { + UNSUPPORTED_TOKEN = 'UnsupportedToken', + ZERO_AMOUNT = 'ZeroAmount', + UNSUPPORTED_ORDER_TYPE = 'UnsupportedOrderType', + } + + +} + diff --git a/src/order-book/generated/models/ReplaceOrderError.ts b/src/order-book/generated/models/ReplaceOrderError.ts index 979c629a..0e33a9fe 100644 --- a/src/order-book/generated/models/ReplaceOrderError.ts +++ b/src/order-book/generated/models/ReplaceOrderError.ts @@ -14,7 +14,7 @@ export namespace ReplaceOrderError { ORDER_FULLY_EXECUTED = 'OrderFullyExecuted', ORDER_EXPIRED = 'OrderExpired', ON_CHAIN_ORDER = 'OnChainOrder', - DUPLICATE_ORDER = 'DuplicateOrder', + DUPLICATED_ORDER = 'DuplicatedOrder', INSUFFICIENT_FEE = 'InsufficientFee', INSUFFICIENT_ALLOWANCE = 'InsufficientAllowance', INSUFFICIENT_BALANCE = 'InsufficientBalance',