Skip to content

Commit

Permalink
chore: bump openapi (#175)
Browse files Browse the repository at this point in the history
* chore: update openapi

* chore: bump version

* fix: fix enum

* chore: set version

---------

Co-authored-by: Anxo Rodriguez <[email protected]>
  • Loading branch information
mfw78 and anxolin authored Oct 10, 2023
1 parent 5e80c0f commit 0561e48
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 37 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cowprotocol/cow-sdk",
"version": "3.0.1",
"version": "4.0.0",
"license": "(MIT OR Apache-2.0)",
"files": [
"/dist"
Expand All @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion src/order-book/generated/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
Expand Down
21 changes: 0 additions & 21 deletions src/order-book/generated/models/FeeAndQuoteError.ts

This file was deleted.

30 changes: 18 additions & 12 deletions src/order-book/generated/models/OrderPostError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
}

Expand Down
20 changes: 20 additions & 0 deletions src/order-book/generated/models/PriceEstimationError.ts
Original file line number Diff line number Diff line change
@@ -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',
}


}

2 changes: 1 addition & 1 deletion src/order-book/generated/models/ReplaceOrderError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 0561e48

Please sign in to comment.