Update fees value in config

This commit is contained in:
IshaVenikar 2024-10-18 10:32:35 +05:30
parent 3ab081853e
commit 0415e3b1d4
16 changed files with 64 additions and 63 deletions

View File

@ -41,10 +41,11 @@
fees = "" fees = ""
gasPrice = "1alnt" gasPrice = "1alnt"
# Durations are set to 2 mins as deployers may take time with ongoing deployments and auctions
[auction] [auction]
commitFee = "1000" commitFee = "100000"
commitsDuration = "120s" commitsDuration = "120s"
revealFee = "1000" revealFee = "100000"
revealsDuration = "120s" revealsDuration = "120s"
denom = "alnt" denom = "alnt"

View File

@ -14,7 +14,7 @@ import {
ApplicationDeploymentRequest, ApplicationDeploymentRequest,
ApplicationDeploymentRemovalRequest ApplicationDeploymentRemovalRequest
} from './entity/Deployment'; } from './entity/Deployment';
import { AppDeploymentRecord, AppDeploymentRemovalRecord, AuctionData } from './types'; import { AppDeploymentRecord, AppDeploymentRemovalRecord, AuctionParams } from './types';
import { getConfig, getRepoDetails, sleep } from './utils'; import { getConfig, getRepoDetails, sleep } from './utils';
const log = debug('snowball:registry'); const log = debug('snowball:registry');
@ -163,7 +163,7 @@ export class Registry {
async createApplicationDeploymentAuction( async createApplicationDeploymentAuction(
appName: string, appName: string,
octokit: Octokit, octokit: Octokit,
auctionData: AuctionData, auctionParams: AuctionParams,
data: DeepPartial<Deployment>, data: DeepPartial<Deployment>,
): Promise<{ ): Promise<{
applicationDeploymentAuctionId: string; applicationDeploymentAuctionId: string;
@ -189,8 +189,8 @@ export class Registry {
revealFee: auctionConfig.revealFee, revealFee: auctionConfig.revealFee,
revealsDuration: auctionConfig.revealsDuration, revealsDuration: auctionConfig.revealsDuration,
denom: auctionConfig.denom, denom: auctionConfig.denom,
maxPrice: auctionData.maxPrice, maxPrice: auctionParams.maxPrice,
numProviders: auctionData.numProviders, numProviders: auctionParams.numProviders,
}, },
this.registryConfig.privateKey, this.registryConfig.privateKey,
fee fee

View File

@ -6,7 +6,7 @@ import { Permission } from './entity/ProjectMember';
import { Domain } from './entity/Domain'; import { Domain } from './entity/Domain';
import { Project } from './entity/Project'; import { Project } from './entity/Project';
import { EnvironmentVariable } from './entity/EnvironmentVariable'; import { EnvironmentVariable } from './entity/EnvironmentVariable';
import { AddProjectFromTemplateInput, AuctionData } from './types'; import { AddProjectFromTemplateInput, AuctionParams } from './types';
const log = debug('snowball:resolver'); const log = debug('snowball:resolver');
@ -211,8 +211,8 @@ export const createResolvers = async (service: Service): Promise<any> => {
organizationSlug, organizationSlug,
data, data,
lrn, lrn,
auctionData auctionParams
}: { organizationSlug: string; data: AddProjectFromTemplateInput; lrn: string; auctionData: AuctionData }, }: { organizationSlug: string; data: AddProjectFromTemplateInput; lrn: string; auctionParams: AuctionParams },
context: any, context: any,
) => { ) => {
try { try {
@ -221,7 +221,7 @@ export const createResolvers = async (service: Service): Promise<any> => {
organizationSlug, organizationSlug,
data, data,
lrn, lrn,
auctionData auctionParams
); );
} catch (err) { } catch (err) {
log(err); log(err);
@ -235,12 +235,12 @@ export const createResolvers = async (service: Service): Promise<any> => {
organizationSlug, organizationSlug,
data, data,
lrn, lrn,
auctionData auctionParams
}: { organizationSlug: string; data: DeepPartial<Project>; lrn: string; auctionData: AuctionData }, }: { organizationSlug: string; data: DeepPartial<Project>; lrn: string; auctionParams: AuctionParams },
context: any, context: any,
) => { ) => {
try { try {
return await service.addProject(context.user, organizationSlug, data, lrn, auctionData); return await service.addProject(context.user, organizationSlug, data, lrn, auctionParams);
} catch (err) { } catch (err) {
log(err); log(err);
throw err; throw err;

View File

@ -230,7 +230,7 @@ type Auction {
bids: [Bid!]! bids: [Bid!]!
} }
input AuctionData { input AuctionParams {
maxPrice: String, maxPrice: String,
numProviders: Int, numProviders: Int,
} }
@ -270,13 +270,13 @@ type Mutation {
organizationSlug: String! organizationSlug: String!
data: AddProjectFromTemplateInput data: AddProjectFromTemplateInput
lrn: String lrn: String
auctionData: AuctionData auctionParams: AuctionParams
): Project! ): Project!
addProject( addProject(
organizationSlug: String! organizationSlug: String!
data: AddProjectInput! data: AddProjectInput!
lrn: String lrn: String
auctionData: AuctionData auctionParams: AuctionParams
): Project! ): Project!
updateProject(projectId: String!, data: UpdateProjectInput): Boolean! updateProject(projectId: String!, data: UpdateProjectInput): Boolean!
redeployToProd(deploymentId: String!): Boolean! redeployToProd(deploymentId: String!): Boolean!

View File

@ -19,7 +19,7 @@ import {
AddProjectFromTemplateInput, AddProjectFromTemplateInput,
AppDeploymentRecord, AppDeploymentRecord,
AppDeploymentRemovalRecord, AppDeploymentRemovalRecord,
AuctionData, AuctionParams,
GitPushEventPayload, GitPushEventPayload,
} from './types'; } from './types';
import { Role } from './entity/UserOrganization'; import { Role } from './entity/UserOrganization';
@ -793,7 +793,7 @@ export class Service {
organizationSlug: string, organizationSlug: string,
data: AddProjectFromTemplateInput, data: AddProjectFromTemplateInput,
lrn?: string, lrn?: string,
auctionData?: AuctionData auctionParams?: AuctionParams
): Promise<Project | undefined> { ): Promise<Project | undefined> {
try { try {
const octokit = await this.getOctokit(user.id); const octokit = await this.getOctokit(user.id);
@ -824,7 +824,7 @@ export class Service {
repository: gitRepo.data.full_name, repository: gitRepo.data.full_name,
// TODO: Set selected template // TODO: Set selected template
template: 'webapp', template: 'webapp',
}, lrn, auctionData); }, lrn, auctionParams);
if (!project || !project.id) { if (!project || !project.id) {
throw new Error('Failed to create project from template'); throw new Error('Failed to create project from template');
@ -842,7 +842,7 @@ export class Service {
organizationSlug: string, organizationSlug: string,
data: DeepPartial<Project>, data: DeepPartial<Project>,
lrn?: string, lrn?: string,
auctionData?: AuctionData auctionParams?: AuctionParams
): Promise<Project | undefined> { ): Promise<Project | undefined> {
const organization = await this.db.getOrganization({ const organization = await this.db.getOrganization({
where: { where: {
@ -878,8 +878,8 @@ export class Service {
commitMessage: latestCommit.commit.message, commitMessage: latestCommit.commit.message,
}; };
if (auctionData) { if (auctionParams) {
const { applicationDeploymentAuctionId } = await this.laconicRegistry.createApplicationDeploymentAuction(repo, octokit, auctionData!, deploymentData); const { applicationDeploymentAuctionId } = await this.laconicRegistry.createApplicationDeploymentAuction(repo, octokit, auctionParams!, deploymentData);
await this.updateProject(project.id, { auctionId: applicationDeploymentAuctionId }) await this.updateProject(project.id, { auctionId: applicationDeploymentAuctionId })
} else { } else {
await this.createDeployment(user.id, octokit, deploymentData, lrn!); await this.createDeployment(user.id, octokit, deploymentData, lrn!);

View File

@ -72,7 +72,7 @@ export interface AddProjectFromTemplateInput {
isPrivate: boolean; isPrivate: boolean;
} }
export interface AuctionData { export interface AuctionParams {
maxPrice: string, maxPrice: string,
numProviders: number, numProviders: number,
} }

View File

@ -2,7 +2,7 @@ import { useCallback, useState } from 'react';
import { useForm, Controller, SubmitHandler } from 'react-hook-form'; import { useForm, Controller, SubmitHandler } from 'react-hook-form';
import { useLocation, useNavigate, useSearchParams } from 'react-router-dom'; import { useLocation, useNavigate, useSearchParams } from 'react-router-dom';
import { useMediaQuery } from 'usehooks-ts'; import { useMediaQuery } from 'usehooks-ts';
import { AuctionData } from 'gql-client'; import { AuctionParams } from 'gql-client';
import { import {
ArrowRightCircleFilledIcon, ArrowRightCircleFilledIcon,
@ -48,12 +48,12 @@ const Configure = () => {
try { try {
let lrn: string | undefined; let lrn: string | undefined;
let auctionData: AuctionData | undefined; let auctionParams: AuctionParams | undefined;
if (data.option === 'LRN') { if (data.option === 'LRN') {
lrn = data.lrn; lrn = data.lrn;
} else if (data.option === 'Auction') { } else if (data.option === 'Auction') {
auctionData = { auctionParams = {
numProviders: Number(data.numProviders!), numProviders: Number(data.numProviders!),
maxPrice: (data.maxPrice!).toString(), maxPrice: (data.maxPrice!).toString(),
}; };
@ -73,7 +73,7 @@ const Configure = () => {
orgSlug, orgSlug,
projectData, projectData,
lrn, lrn,
auctionData auctionParams
); );
data.option === 'Auction' data.option === 'Auction'
@ -94,7 +94,7 @@ const Configure = () => {
template: 'webapp', template: 'webapp',
}, },
lrn, lrn,
auctionData auctionParams
); );
data.option === 'Auction' data.option === 'Auction'

View File

@ -295,7 +295,7 @@ type AuthenticateGitHubResponse = {
type UnauthenticateGitHubResponse = { type UnauthenticateGitHubResponse = {
unauthenticateGitHub: boolean; unauthenticateGitHub: boolean;
}; };
type AuctionData = { type AuctionParams = {
maxPrice: string; maxPrice: string;
numProviders: number; numProviders: number;
}; };
@ -321,8 +321,8 @@ declare class GQLClient {
updateEnvironmentVariable(environmentVariableId: string, data: UpdateEnvironmentVariableInput): Promise<UpdateEnvironmentVariableResponse>; updateEnvironmentVariable(environmentVariableId: string, data: UpdateEnvironmentVariableInput): Promise<UpdateEnvironmentVariableResponse>;
removeEnvironmentVariable(environmentVariableId: string): Promise<RemoveEnvironmentVariableResponse>; removeEnvironmentVariable(environmentVariableId: string): Promise<RemoveEnvironmentVariableResponse>;
updateDeploymentToProd(deploymentId: string): Promise<UpdateDeploymentToProdResponse>; updateDeploymentToProd(deploymentId: string): Promise<UpdateDeploymentToProdResponse>;
addProjectFromTemplate(organizationSlug: string, data: AddProjectFromTemplateInput, lrn?: string, auctionData?: AuctionData): Promise<AddProjectFromTemplateResponse>; addProjectFromTemplate(organizationSlug: string, data: AddProjectFromTemplateInput, lrn?: string, auctionParams?: AuctionParams): Promise<AddProjectFromTemplateResponse>;
addProject(organizationSlug: string, data: AddProjectInput, lrn?: string, auctionData?: AuctionData): Promise<AddProjectResponse>; addProject(organizationSlug: string, data: AddProjectInput, lrn?: string, auctionParams?: AuctionParams): Promise<AddProjectResponse>;
updateProject(projectId: string, data: UpdateProjectInput): Promise<UpdateProjectResponse>; updateProject(projectId: string, data: UpdateProjectInput): Promise<UpdateProjectResponse>;
updateDomain(domainId: string, data: UpdateDomainInput): Promise<UpdateDomainResponse>; updateDomain(domainId: string, data: UpdateDomainInput): Promise<UpdateDomainResponse>;
redeployToProd(deploymentId: string): Promise<RedeployToProdResponse>; redeployToProd(deploymentId: string): Promise<RedeployToProdResponse>;
@ -337,4 +337,4 @@ declare class GQLClient {
getAuctionData(auctionId: string): Promise<Auction>; getAuctionData(auctionId: string): Promise<Auction>;
} }
export { type AddDomainInput, type AddDomainResponse, type AddEnvironmentVariableInput, type AddEnvironmentVariablesResponse, type AddProjectFromTemplateInput, type AddProjectFromTemplateResponse, type AddProjectInput, type AddProjectMemberInput, type AddProjectMemberResponse, type AddProjectResponse, type Auction, type AuctionData, AuctionStatus, type AuthenticateGitHubResponse, type Bid, type DeleteDeploymentResponse, type DeleteDomainResponse, type DeleteProjectResponse, type Deployment, DeploymentStatus, type Domain, DomainStatus, Environment, type EnvironmentVariable, type FilterDomainInput, GQLClient, type GetDeploymentsResponse, type GetDomainsResponse, type GetEnvironmentVariablesResponse, type GetOrganizationsResponse, type GetProjectMembersResponse, type GetProjectResponse, type GetProjectsInOrganizationResponse, type GetUserResponse, type GraphQLConfig, type Organization, type OrganizationMember, type OrganizationProject, Permission, type Project, type ProjectMember, type RedeployToProdResponse, type RemoveEnvironmentVariableResponse, type RemoveProjectMemberResponse, Role, type RollbackDeploymentResponse, type SearchProjectsResponse, type UnauthenticateGitHubResponse, type UpdateDeploymentToProdResponse, type UpdateDomainInput, type UpdateDomainResponse, type UpdateEnvironmentVariableInput, type UpdateEnvironmentVariableResponse, type UpdateProjectInput, type UpdateProjectMemberInput, type UpdateProjectMemberResponse, type UpdateProjectResponse, type User }; export { type AddDomainInput, type AddDomainResponse, type AddEnvironmentVariableInput, type AddEnvironmentVariablesResponse, type AddProjectFromTemplateInput, type AddProjectFromTemplateResponse, type AddProjectInput, type AddProjectMemberInput, type AddProjectMemberResponse, type AddProjectResponse, type Auction, type AuctionParams, AuctionStatus, type AuthenticateGitHubResponse, type Bid, type DeleteDeploymentResponse, type DeleteDomainResponse, type DeleteProjectResponse, type Deployment, DeploymentStatus, type Domain, DomainStatus, Environment, type EnvironmentVariable, type FilterDomainInput, GQLClient, type GetDeploymentsResponse, type GetDomainsResponse, type GetEnvironmentVariablesResponse, type GetOrganizationsResponse, type GetProjectMembersResponse, type GetProjectResponse, type GetProjectsInOrganizationResponse, type GetUserResponse, type GraphQLConfig, type Organization, type OrganizationMember, type OrganizationProject, Permission, type Project, type ProjectMember, type RedeployToProdResponse, type RemoveEnvironmentVariableResponse, type RemoveProjectMemberResponse, Role, type RollbackDeploymentResponse, type SearchProjectsResponse, type UnauthenticateGitHubResponse, type UpdateDeploymentToProdResponse, type UpdateDomainInput, type UpdateDomainResponse, type UpdateEnvironmentVariableInput, type UpdateEnvironmentVariableResponse, type UpdateProjectInput, type UpdateProjectMemberInput, type UpdateProjectMemberResponse, type UpdateProjectResponse, type User };

View File

@ -295,7 +295,7 @@ type AuthenticateGitHubResponse = {
type UnauthenticateGitHubResponse = { type UnauthenticateGitHubResponse = {
unauthenticateGitHub: boolean; unauthenticateGitHub: boolean;
}; };
type AuctionData = { type AuctionParams = {
maxPrice: string; maxPrice: string;
numProviders: number; numProviders: number;
}; };
@ -321,8 +321,8 @@ declare class GQLClient {
updateEnvironmentVariable(environmentVariableId: string, data: UpdateEnvironmentVariableInput): Promise<UpdateEnvironmentVariableResponse>; updateEnvironmentVariable(environmentVariableId: string, data: UpdateEnvironmentVariableInput): Promise<UpdateEnvironmentVariableResponse>;
removeEnvironmentVariable(environmentVariableId: string): Promise<RemoveEnvironmentVariableResponse>; removeEnvironmentVariable(environmentVariableId: string): Promise<RemoveEnvironmentVariableResponse>;
updateDeploymentToProd(deploymentId: string): Promise<UpdateDeploymentToProdResponse>; updateDeploymentToProd(deploymentId: string): Promise<UpdateDeploymentToProdResponse>;
addProjectFromTemplate(organizationSlug: string, data: AddProjectFromTemplateInput, lrn?: string, auctionData?: AuctionData): Promise<AddProjectFromTemplateResponse>; addProjectFromTemplate(organizationSlug: string, data: AddProjectFromTemplateInput, lrn?: string, auctionParams?: AuctionParams): Promise<AddProjectFromTemplateResponse>;
addProject(organizationSlug: string, data: AddProjectInput, lrn?: string, auctionData?: AuctionData): Promise<AddProjectResponse>; addProject(organizationSlug: string, data: AddProjectInput, lrn?: string, auctionParams?: AuctionParams): Promise<AddProjectResponse>;
updateProject(projectId: string, data: UpdateProjectInput): Promise<UpdateProjectResponse>; updateProject(projectId: string, data: UpdateProjectInput): Promise<UpdateProjectResponse>;
updateDomain(domainId: string, data: UpdateDomainInput): Promise<UpdateDomainResponse>; updateDomain(domainId: string, data: UpdateDomainInput): Promise<UpdateDomainResponse>;
redeployToProd(deploymentId: string): Promise<RedeployToProdResponse>; redeployToProd(deploymentId: string): Promise<RedeployToProdResponse>;
@ -337,4 +337,4 @@ declare class GQLClient {
getAuctionData(auctionId: string): Promise<Auction>; getAuctionData(auctionId: string): Promise<Auction>;
} }
export { type AddDomainInput, type AddDomainResponse, type AddEnvironmentVariableInput, type AddEnvironmentVariablesResponse, type AddProjectFromTemplateInput, type AddProjectFromTemplateResponse, type AddProjectInput, type AddProjectMemberInput, type AddProjectMemberResponse, type AddProjectResponse, type Auction, type AuctionData, AuctionStatus, type AuthenticateGitHubResponse, type Bid, type DeleteDeploymentResponse, type DeleteDomainResponse, type DeleteProjectResponse, type Deployment, DeploymentStatus, type Domain, DomainStatus, Environment, type EnvironmentVariable, type FilterDomainInput, GQLClient, type GetDeploymentsResponse, type GetDomainsResponse, type GetEnvironmentVariablesResponse, type GetOrganizationsResponse, type GetProjectMembersResponse, type GetProjectResponse, type GetProjectsInOrganizationResponse, type GetUserResponse, type GraphQLConfig, type Organization, type OrganizationMember, type OrganizationProject, Permission, type Project, type ProjectMember, type RedeployToProdResponse, type RemoveEnvironmentVariableResponse, type RemoveProjectMemberResponse, Role, type RollbackDeploymentResponse, type SearchProjectsResponse, type UnauthenticateGitHubResponse, type UpdateDeploymentToProdResponse, type UpdateDomainInput, type UpdateDomainResponse, type UpdateEnvironmentVariableInput, type UpdateEnvironmentVariableResponse, type UpdateProjectInput, type UpdateProjectMemberInput, type UpdateProjectMemberResponse, type UpdateProjectResponse, type User }; export { type AddDomainInput, type AddDomainResponse, type AddEnvironmentVariableInput, type AddEnvironmentVariablesResponse, type AddProjectFromTemplateInput, type AddProjectFromTemplateResponse, type AddProjectInput, type AddProjectMemberInput, type AddProjectMemberResponse, type AddProjectResponse, type Auction, type AuctionParams, AuctionStatus, type AuthenticateGitHubResponse, type Bid, type DeleteDeploymentResponse, type DeleteDomainResponse, type DeleteProjectResponse, type Deployment, DeploymentStatus, type Domain, DomainStatus, Environment, type EnvironmentVariable, type FilterDomainInput, GQLClient, type GetDeploymentsResponse, type GetDomainsResponse, type GetEnvironmentVariablesResponse, type GetOrganizationsResponse, type GetProjectMembersResponse, type GetProjectResponse, type GetProjectsInOrganizationResponse, type GetUserResponse, type GraphQLConfig, type Organization, type OrganizationMember, type OrganizationProject, Permission, type Project, type ProjectMember, type RedeployToProdResponse, type RemoveEnvironmentVariableResponse, type RemoveProjectMemberResponse, Role, type RollbackDeploymentResponse, type SearchProjectsResponse, type UnauthenticateGitHubResponse, type UpdateDeploymentToProdResponse, type UpdateDomainInput, type UpdateDomainResponse, type UpdateEnvironmentVariableInput, type UpdateEnvironmentVariableResponse, type UpdateProjectInput, type UpdateProjectMemberInput, type UpdateProjectMemberResponse, type UpdateProjectResponse, type User };

View File

@ -378,15 +378,15 @@ var updateDeploymentToProd = import_client2.gql`
} }
`; `;
var addProjectFromTemplate = import_client2.gql` var addProjectFromTemplate = import_client2.gql`
mutation ($organizationSlug: String!, $data: AddProjectFromTemplateInput, $lrn: String, $auctionData: AuctionData) { mutation ($organizationSlug: String!, $data: AddProjectFromTemplateInput, $lrn: String, $auctionParams: AuctionParams) {
addProjectFromTemplate(organizationSlug: $organizationSlug, data: $data, lrn: $lrn, auctionData: $auctionData) { addProjectFromTemplate(organizationSlug: $organizationSlug, data: $data, lrn: $lrn, auctionParams: $auctionParams) {
id id
} }
} }
`; `;
var addProject = import_client2.gql` var addProject = import_client2.gql`
mutation ($organizationSlug: String!, $data: AddProjectInput!, $lrn: String, $auctionData: AuctionData) { mutation ($organizationSlug: String!, $data: AddProjectInput!, $lrn: String, $auctionParams: Auctionparams) {
addProject(organizationSlug: $organizationSlug, data: $data, lrn: $lrn, auctionData: $auctionData) { addProject(organizationSlug: $organizationSlug, data: $data, lrn: $lrn, auctionParams: $auctionParams) {
id id
} }
} }
@ -627,7 +627,7 @@ var GQLClient = class {
return data; return data;
}); });
} }
addProjectFromTemplate(organizationSlug, data, lrn, auctionData) { addProjectFromTemplate(organizationSlug, data, lrn, auctionParams) {
return __async(this, null, function* () { return __async(this, null, function* () {
const result = yield this.client.mutate({ const result = yield this.client.mutate({
mutation: addProjectFromTemplate, mutation: addProjectFromTemplate,
@ -635,13 +635,13 @@ var GQLClient = class {
organizationSlug, organizationSlug,
data, data,
lrn, lrn,
auctionData auctionParams
} }
}); });
return result.data; return result.data;
}); });
} }
addProject(organizationSlug, data, lrn, auctionData) { addProject(organizationSlug, data, lrn, auctionParams) {
return __async(this, null, function* () { return __async(this, null, function* () {
const result = yield this.client.mutate({ const result = yield this.client.mutate({
mutation: addProject, mutation: addProject,
@ -649,7 +649,7 @@ var GQLClient = class {
organizationSlug, organizationSlug,
data, data,
lrn, lrn,
auctionData auctionParams
} }
}); });
return result.data; return result.data;

File diff suppressed because one or more lines are too long

View File

@ -350,15 +350,15 @@ var updateDeploymentToProd = gql2`
} }
`; `;
var addProjectFromTemplate = gql2` var addProjectFromTemplate = gql2`
mutation ($organizationSlug: String!, $data: AddProjectFromTemplateInput, $lrn: String, $auctionData: AuctionData) { mutation ($organizationSlug: String!, $data: AddProjectFromTemplateInput, $lrn: String, $auctionParams: AuctionParams) {
addProjectFromTemplate(organizationSlug: $organizationSlug, data: $data, lrn: $lrn, auctionData: $auctionData) { addProjectFromTemplate(organizationSlug: $organizationSlug, data: $data, lrn: $lrn, auctionParams: $auctionParams) {
id id
} }
} }
`; `;
var addProject = gql2` var addProject = gql2`
mutation ($organizationSlug: String!, $data: AddProjectInput!, $lrn: String, $auctionData: AuctionData) { mutation ($organizationSlug: String!, $data: AddProjectInput!, $lrn: String, $auctionParams: Auctionparams) {
addProject(organizationSlug: $organizationSlug, data: $data, lrn: $lrn, auctionData: $auctionData) { addProject(organizationSlug: $organizationSlug, data: $data, lrn: $lrn, auctionParams: $auctionParams) {
id id
} }
} }
@ -599,7 +599,7 @@ var GQLClient = class {
return data; return data;
}); });
} }
addProjectFromTemplate(organizationSlug, data, lrn, auctionData) { addProjectFromTemplate(organizationSlug, data, lrn, auctionParams) {
return __async(this, null, function* () { return __async(this, null, function* () {
const result = yield this.client.mutate({ const result = yield this.client.mutate({
mutation: addProjectFromTemplate, mutation: addProjectFromTemplate,
@ -607,13 +607,13 @@ var GQLClient = class {
organizationSlug, organizationSlug,
data, data,
lrn, lrn,
auctionData auctionParams
} }
}); });
return result.data; return result.data;
}); });
} }
addProject(organizationSlug, data, lrn, auctionData) { addProject(organizationSlug, data, lrn, auctionParams) {
return __async(this, null, function* () { return __async(this, null, function* () {
const result = yield this.client.mutate({ const result = yield this.client.mutate({
mutation: addProject, mutation: addProject,
@ -621,7 +621,7 @@ var GQLClient = class {
organizationSlug, organizationSlug,
data, data,
lrn, lrn,
auctionData auctionParams
} }
}); });
return result.data; return result.data;

File diff suppressed because one or more lines are too long

View File

@ -232,7 +232,7 @@ export class GQLClient {
organizationSlug: string, organizationSlug: string,
data: types.AddProjectFromTemplateInput, data: types.AddProjectFromTemplateInput,
lrn?: string, lrn?: string,
auctionData?: types.AuctionData, auctionParams?: types.AuctionParams,
): Promise<types.AddProjectFromTemplateResponse> { ): Promise<types.AddProjectFromTemplateResponse> {
const result = await this.client.mutate({ const result = await this.client.mutate({
mutation: mutations.addProjectFromTemplate, mutation: mutations.addProjectFromTemplate,
@ -240,7 +240,7 @@ export class GQLClient {
organizationSlug, organizationSlug,
data, data,
lrn, lrn,
auctionData auctionParams
}, },
}); });
@ -251,7 +251,7 @@ export class GQLClient {
organizationSlug: string, organizationSlug: string,
data: types.AddProjectInput, data: types.AddProjectInput,
lrn?: string, lrn?: string,
auctionData?: types.AuctionData, auctionParams?: types.AuctionParams,
): Promise<types.AddProjectResponse> { ): Promise<types.AddProjectResponse> {
const result = await this.client.mutate({ const result = await this.client.mutate({
mutation: mutations.addProject, mutation: mutations.addProject,
@ -259,7 +259,7 @@ export class GQLClient {
organizationSlug, organizationSlug,
data, data,
lrn, lrn,
auctionData auctionParams
}, },
}); });

View File

@ -49,16 +49,16 @@ export const updateDeploymentToProd = gql`
`; `;
export const addProjectFromTemplate = gql` export const addProjectFromTemplate = gql`
mutation ($organizationSlug: String!, $data: AddProjectFromTemplateInput, $lrn: String, $auctionData: AuctionData) { mutation ($organizationSlug: String!, $data: AddProjectFromTemplateInput, $lrn: String, $auctionParams: AuctionParams) {
addProjectFromTemplate(organizationSlug: $organizationSlug, data: $data, lrn: $lrn, auctionData: $auctionData) { addProjectFromTemplate(organizationSlug: $organizationSlug, data: $data, lrn: $lrn, auctionParams: $auctionParams) {
id id
} }
} }
`; `;
export const addProject = gql` export const addProject = gql`
mutation ($organizationSlug: String!, $data: AddProjectInput!, $lrn: String, $auctionData: AuctionData) { mutation ($organizationSlug: String!, $data: AddProjectInput!, $lrn: String, $auctionParams: Auctionparams) {
addProject(organizationSlug: $organizationSlug, data: $data, lrn: $lrn, auctionData: $auctionData) { addProject(organizationSlug: $organizationSlug, data: $data, lrn: $lrn, auctionParams: $auctionParams) {
id id
} }
} }

View File

@ -353,7 +353,7 @@ export type UnauthenticateGitHubResponse = {
unauthenticateGitHub: boolean; unauthenticateGitHub: boolean;
}; };
export type AuctionData = { export type AuctionParams = {
maxPrice: string; maxPrice: string;
numProviders: number; numProviders: number;
}; };