Update Dockerfile and TypeScript interfaces for improved project structure and functionality

- Adjusted Dockerfile to correct project paths for COPY commands, ensuring proper build context.
- Enhanced TypeScript interfaces by adding 'gmxSlippage' to User and 'botTradingBalance' to TradingBotResponse, improving data handling.
- Updated methods in BotClient and DataClient to include optional min and max balance parameters for better filtering capabilities.
This commit is contained in:
2026-01-01 21:48:36 +07:00
parent 18373b657a
commit 8c8dec3494
4 changed files with 36 additions and 20 deletions

View File

@@ -7,20 +7,21 @@ EXPOSE 443
# Use the official Microsoft .NET SDK image to build the code. # Use the official Microsoft .NET SDK image to build the code.
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /buildapp WORKDIR /buildapp
COPY ["/src/Managing.Api/Managing.Api.csproj", "Managing.Api/"] COPY ["/src/Managing.Api/Managing.Api.csproj", "src/Managing.Api/"]
COPY ["/src/Managing.Bootstrap/Managing.Bootstrap.csproj", "Managing.Bootstrap/"] COPY ["/src/Managing.Bootstrap/Managing.Bootstrap.csproj", "src/Managing.Bootstrap/"]
COPY ["/src/Managing.Infrastructure.Storage/Managing.Infrastructure.Storage.csproj", "Managing.Infrastructure.Storage/"] COPY ["/src/Managing.Infrastructure.Storage/Managing.Infrastructure.Storage.csproj", "src/Managing.Infrastructure.Storage/"]
COPY ["/src/Managing.Application/Managing.Application.csproj", "Managing.Application/"] COPY ["/src/Managing.Application/Managing.Application.csproj", "src/Managing.Application/"]
COPY ["/src/Managing.Common/Managing.Common.csproj", "Managing.Common/"] COPY ["/src/Managing.Common/Managing.Common.csproj", "src/Managing.Common/"]
COPY ["/src/Managing.Core/Managing.Core.csproj", "Managing.Core/"] COPY ["/src/Managing.Core/Managing.Core.csproj", "src/Managing.Core/"]
COPY ["/src/Managing.Application.Abstractions/Managing.Application.Abstractions.csproj", "Managing.Application.Abstractions/"] COPY ["/src/Managing.Application.Abstractions/Managing.Application.Abstractions.csproj", "src/Managing.Application.Abstractions/"]
COPY ["/src/Managing.Domain/Managing.Domain.csproj", "Managing.Domain/"] COPY ["/src/Managing.Domain/Managing.Domain.csproj", "src/Managing.Domain/"]
COPY ["/src/Managing.Infrastructure.Messengers/Managing.Infrastructure.Messengers.csproj", "Managing.Infrastructure.Messengers/"] COPY ["/src/Managing.Infrastructure.Messengers/Managing.Infrastructure.Messengers.csproj", "src/Managing.Infrastructure.Messengers/"]
COPY ["/src/Managing.Infrastructure.Exchanges/Managing.Infrastructure.Exchanges.csproj", "Managing.Infrastructure.Exchanges/"] COPY ["/src/Managing.Infrastructure.Exchanges/Managing.Infrastructure.Exchanges.csproj", "src/Managing.Infrastructure.Exchanges/"]
COPY ["/src/Managing.Infrastructure.Database/Managing.Infrastructure.Databases.csproj", "Managing.Infrastructure.Database/"] COPY ["/src/Managing.Infrastructure.Database/Managing.Infrastructure.Databases.csproj", "src/Managing.Infrastructure.Database/"]
COPY ["/src/Managing.Infrastructure.Web3/Managing.Infrastructure.Evm.csproj", "src/Managing.Infrastructure.Web3/"]
# Restore dependencies for all projects # Restore dependencies for all projects
RUN dotnet restore "/buildapp/Managing.Api/Managing.Api.csproj" RUN dotnet restore "/buildapp/src/Managing.Api/Managing.Api.csproj"
# Copy everything else and build # Copy everything else and build
COPY . . COPY . .
@@ -29,6 +30,7 @@ WORKDIR "/buildapp/src/Managing.Api"
RUN dotnet build "Managing.Api.csproj" -c Release -o /app/build RUN dotnet build "Managing.Api.csproj" -c Release -o /app/build
FROM build AS publish FROM build AS publish
WORKDIR "/buildapp/src/Managing.Api"
RUN dotnet publish "Managing.Api.csproj" -c Release -o /app/publish RUN dotnet publish "Managing.Api.csproj" -c Release -o /app/publish
FROM base AS final FROM base AS final

View File

@@ -55,6 +55,7 @@ export interface User {
maxWaitingTimeForPositionToGetFilledSeconds?: number | null; maxWaitingTimeForPositionToGetFilledSeconds?: number | null;
maxTxnGasFeePerPosition?: number | null; maxTxnGasFeePerPosition?: number | null;
isGmxEnabled?: boolean; isGmxEnabled?: boolean;
gmxSlippage?: number | null;
minimumConfidence?: Confidence | null; minimumConfidence?: Confidence | null;
trendStrongAgreementThreshold?: number | null; trendStrongAgreementThreshold?: number | null;
signalAgreementThreshold?: number | null; signalAgreementThreshold?: number | null;
@@ -1001,6 +1002,7 @@ export interface TradingBotResponse {
ticker: Ticker; ticker: Ticker;
tradingType: TradingType; tradingType: TradingType;
masterAgentName?: string | null; masterAgentName?: string | null;
botTradingBalance: number;
} }
export interface PaginatedResponseOfTradingBotResponse { export interface PaginatedResponseOfTradingBotResponse {
@@ -1023,6 +1025,7 @@ export enum BotSortableColumn {
Pnl = "Pnl", Pnl = "Pnl",
WinRate = "WinRate", WinRate = "WinRate",
AgentName = "AgentName", AgentName = "AgentName",
BotTradingBalance = "BotTradingBalance",
} }
export enum SortDirection { export enum SortDirection {
@@ -1507,12 +1510,11 @@ export interface UpdateUserSettingsRequest {
autoswapAmount?: number | null; autoswapAmount?: number | null;
maxWaitingTimeForPositionToGetFilledSeconds?: number | null; maxWaitingTimeForPositionToGetFilledSeconds?: number | null;
maxTxnGasFeePerPosition?: number | null; maxTxnGasFeePerPosition?: number | null;
isGmxEnabled?: boolean | null; gmxSlippage?: number | null;
minimumConfidence?: Confidence | null; minimumConfidence?: Confidence | null;
trendStrongAgreementThreshold?: number | null; trendStrongAgreementThreshold?: number | null;
signalAgreementThreshold?: number | null; signalAgreementThreshold?: number | null;
allowSignalTrendOverride?: boolean | null; allowSignalTrendOverride?: boolean | null;
defaultExchange?: TradingExchanges | null;
} }
export interface PaginatedWhitelistAccountsResponse { export interface PaginatedWhitelistAccountsResponse {

View File

@@ -1917,7 +1917,7 @@ export class BotClient extends AuthorizedApiBase {
return Promise.resolve<TradingBotResponse[]>(null as any); return Promise.resolve<TradingBotResponse[]>(null as any);
} }
bot_GetBotsPaginated(pageNumber: number | undefined, pageSize: number | undefined, status: BotStatus | null | undefined, name: string | null | undefined, ticker: string | null | undefined, agentName: string | null | undefined, sortBy: BotSortableColumn | undefined, sortDirection: SortDirection | undefined): Promise<PaginatedResponseOfTradingBotResponse> { bot_GetBotsPaginated(pageNumber: number | undefined, pageSize: number | undefined, status: BotStatus | null | undefined, name: string | null | undefined, ticker: string | null | undefined, agentName: string | null | undefined, minBalance: number | null | undefined, maxBalance: number | null | undefined, sortBy: BotSortableColumn | undefined, sortDirection: SortDirection | undefined): Promise<PaginatedResponseOfTradingBotResponse> {
let url_ = this.baseUrl + "/Bot/Paginated?"; let url_ = this.baseUrl + "/Bot/Paginated?";
if (pageNumber === null) if (pageNumber === null)
throw new Error("The parameter 'pageNumber' cannot be null."); throw new Error("The parameter 'pageNumber' cannot be null.");
@@ -1935,6 +1935,10 @@ export class BotClient extends AuthorizedApiBase {
url_ += "ticker=" + encodeURIComponent("" + ticker) + "&"; url_ += "ticker=" + encodeURIComponent("" + ticker) + "&";
if (agentName !== undefined && agentName !== null) if (agentName !== undefined && agentName !== null)
url_ += "agentName=" + encodeURIComponent("" + agentName) + "&"; url_ += "agentName=" + encodeURIComponent("" + agentName) + "&";
if (minBalance !== undefined && minBalance !== null)
url_ += "minBalance=" + encodeURIComponent("" + minBalance) + "&";
if (maxBalance !== undefined && maxBalance !== null)
url_ += "maxBalance=" + encodeURIComponent("" + maxBalance) + "&";
if (sortBy === null) if (sortBy === null)
throw new Error("The parameter 'sortBy' cannot be null."); throw new Error("The parameter 'sortBy' cannot be null.");
else if (sortBy !== undefined) else if (sortBy !== undefined)
@@ -2601,7 +2605,7 @@ export class DataClient extends AuthorizedApiBase {
return Promise.resolve<string[]>(null as any); return Promise.resolve<string[]>(null as any);
} }
data_GetStrategiesPaginated(pageNumber: number | undefined, pageSize: number | undefined, name: string | null | undefined, ticker: string | null | undefined, agentName: string | null | undefined, sortBy: BotSortableColumn | undefined, sortDirection: SortDirection | undefined): Promise<PaginatedResponseOfTradingBotResponse> { data_GetStrategiesPaginated(pageNumber: number | undefined, pageSize: number | undefined, name: string | null | undefined, ticker: string | null | undefined, agentName: string | null | undefined, minBalance: number | null | undefined, maxBalance: number | null | undefined, sortBy: BotSortableColumn | undefined, sortDirection: SortDirection | undefined): Promise<PaginatedResponseOfTradingBotResponse> {
let url_ = this.baseUrl + "/Data/GetStrategiesPaginated?"; let url_ = this.baseUrl + "/Data/GetStrategiesPaginated?";
if (pageNumber === null) if (pageNumber === null)
throw new Error("The parameter 'pageNumber' cannot be null."); throw new Error("The parameter 'pageNumber' cannot be null.");
@@ -2617,6 +2621,10 @@ export class DataClient extends AuthorizedApiBase {
url_ += "ticker=" + encodeURIComponent("" + ticker) + "&"; url_ += "ticker=" + encodeURIComponent("" + ticker) + "&";
if (agentName !== undefined && agentName !== null) if (agentName !== undefined && agentName !== null)
url_ += "agentName=" + encodeURIComponent("" + agentName) + "&"; url_ += "agentName=" + encodeURIComponent("" + agentName) + "&";
if (minBalance !== undefined && minBalance !== null)
url_ += "minBalance=" + encodeURIComponent("" + minBalance) + "&";
if (maxBalance !== undefined && maxBalance !== null)
url_ += "maxBalance=" + encodeURIComponent("" + maxBalance) + "&";
if (sortBy === null) if (sortBy === null)
throw new Error("The parameter 'sortBy' cannot be null."); throw new Error("The parameter 'sortBy' cannot be null.");
else if (sortBy !== undefined) else if (sortBy !== undefined)
@@ -4636,6 +4644,7 @@ export interface User {
maxWaitingTimeForPositionToGetFilledSeconds?: number | null; maxWaitingTimeForPositionToGetFilledSeconds?: number | null;
maxTxnGasFeePerPosition?: number | null; maxTxnGasFeePerPosition?: number | null;
isGmxEnabled?: boolean; isGmxEnabled?: boolean;
gmxSlippage?: number | null;
minimumConfidence?: Confidence | null; minimumConfidence?: Confidence | null;
trendStrongAgreementThreshold?: number | null; trendStrongAgreementThreshold?: number | null;
signalAgreementThreshold?: number | null; signalAgreementThreshold?: number | null;
@@ -5582,6 +5591,7 @@ export interface TradingBotResponse {
ticker: Ticker; ticker: Ticker;
tradingType: TradingType; tradingType: TradingType;
masterAgentName?: string | null; masterAgentName?: string | null;
botTradingBalance: number;
} }
export interface PaginatedResponseOfTradingBotResponse { export interface PaginatedResponseOfTradingBotResponse {
@@ -5604,6 +5614,7 @@ export enum BotSortableColumn {
Pnl = "Pnl", Pnl = "Pnl",
WinRate = "WinRate", WinRate = "WinRate",
AgentName = "AgentName", AgentName = "AgentName",
BotTradingBalance = "BotTradingBalance",
} }
export enum SortDirection { export enum SortDirection {
@@ -6088,12 +6099,11 @@ export interface UpdateUserSettingsRequest {
autoswapAmount?: number | null; autoswapAmount?: number | null;
maxWaitingTimeForPositionToGetFilledSeconds?: number | null; maxWaitingTimeForPositionToGetFilledSeconds?: number | null;
maxTxnGasFeePerPosition?: number | null; maxTxnGasFeePerPosition?: number | null;
isGmxEnabled?: boolean | null; gmxSlippage?: number | null;
minimumConfidence?: Confidence | null; minimumConfidence?: Confidence | null;
trendStrongAgreementThreshold?: number | null; trendStrongAgreementThreshold?: number | null;
signalAgreementThreshold?: number | null; signalAgreementThreshold?: number | null;
allowSignalTrendOverride?: boolean | null; allowSignalTrendOverride?: boolean | null;
defaultExchange?: TradingExchanges | null;
} }
export interface PaginatedWhitelistAccountsResponse { export interface PaginatedWhitelistAccountsResponse {

View File

@@ -55,6 +55,7 @@ export interface User {
maxWaitingTimeForPositionToGetFilledSeconds?: number | null; maxWaitingTimeForPositionToGetFilledSeconds?: number | null;
maxTxnGasFeePerPosition?: number | null; maxTxnGasFeePerPosition?: number | null;
isGmxEnabled?: boolean; isGmxEnabled?: boolean;
gmxSlippage?: number | null;
minimumConfidence?: Confidence | null; minimumConfidence?: Confidence | null;
trendStrongAgreementThreshold?: number | null; trendStrongAgreementThreshold?: number | null;
signalAgreementThreshold?: number | null; signalAgreementThreshold?: number | null;
@@ -1001,6 +1002,7 @@ export interface TradingBotResponse {
ticker: Ticker; ticker: Ticker;
tradingType: TradingType; tradingType: TradingType;
masterAgentName?: string | null; masterAgentName?: string | null;
botTradingBalance: number;
} }
export interface PaginatedResponseOfTradingBotResponse { export interface PaginatedResponseOfTradingBotResponse {
@@ -1023,6 +1025,7 @@ export enum BotSortableColumn {
Pnl = "Pnl", Pnl = "Pnl",
WinRate = "WinRate", WinRate = "WinRate",
AgentName = "AgentName", AgentName = "AgentName",
BotTradingBalance = "BotTradingBalance",
} }
export enum SortDirection { export enum SortDirection {
@@ -1507,12 +1510,11 @@ export interface UpdateUserSettingsRequest {
autoswapAmount?: number | null; autoswapAmount?: number | null;
maxWaitingTimeForPositionToGetFilledSeconds?: number | null; maxWaitingTimeForPositionToGetFilledSeconds?: number | null;
maxTxnGasFeePerPosition?: number | null; maxTxnGasFeePerPosition?: number | null;
isGmxEnabled?: boolean | null; gmxSlippage?: number | null;
minimumConfidence?: Confidence | null; minimumConfidence?: Confidence | null;
trendStrongAgreementThreshold?: number | null; trendStrongAgreementThreshold?: number | null;
signalAgreementThreshold?: number | null; signalAgreementThreshold?: number | null;
allowSignalTrendOverride?: boolean | null; allowSignalTrendOverride?: boolean | null;
defaultExchange?: TradingExchanges | null;
} }
export interface PaginatedWhitelistAccountsResponse { export interface PaginatedWhitelistAccountsResponse {