From 2a435666adb44ac21d0fae939bc4dbdadcfb3a74 Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Fri, 18 Oct 2024 16:45:03 +0530 Subject: [PATCH] Update flow for updating is current status for deployments --- packages/backend/src/registry.ts | 1 - packages/backend/src/service.ts | 117 ++- .../project/overview/Activity/AuctionCard.tsx | 29 +- .../frontend/src/pages/components/modals.tsx | 2 +- packages/gql-client/dist/index.d.mts | 340 ------- packages/gql-client/dist/index.d.ts | 340 ------- packages/gql-client/dist/index.js | 841 ------------------ packages/gql-client/dist/index.js.map | 1 - packages/gql-client/dist/index.mjs | 812 ----------------- packages/gql-client/dist/index.mjs.map | 1 - 10 files changed, 74 insertions(+), 2410 deletions(-) delete mode 100644 packages/gql-client/dist/index.d.mts delete mode 100644 packages/gql-client/dist/index.d.ts delete mode 100644 packages/gql-client/dist/index.js delete mode 100644 packages/gql-client/dist/index.js.map delete mode 100644 packages/gql-client/dist/index.mjs delete mode 100644 packages/gql-client/dist/index.mjs.map diff --git a/packages/backend/src/registry.ts b/packages/backend/src/registry.ts index e0ef3c30..45305c57 100644 --- a/packages/backend/src/registry.ts +++ b/packages/backend/src/registry.ts @@ -254,7 +254,6 @@ export class Registry { application: `${lrn}@${applicationRecord.attributes.app_version}`, dns: data.dns, - // TODO: Not set in test-progressive-web-app CI // https://git.vdb.to/cerc-io/laconic-registry-cli/commit/129019105dfb93bebcea02fde0ed64d0f8e5983b config: JSON.stringify({ env: data.environmentVariables diff --git a/packages/backend/src/service.ts b/packages/backend/src/service.ts index bb81c3c1..ed45fe63 100644 --- a/packages/backend/src/service.ts +++ b/packages/backend/src/service.ts @@ -44,6 +44,7 @@ export class Service { private config: Config; private deployRecordCheckTimeout?: NodeJS.Timeout; + private auctionStatusCheckTimeout?: NodeJS.Timeout; constructor(config: Config, db: Database, app: OAuthApp, registry: Registry) { this.db = db; @@ -70,6 +71,7 @@ export class Service { */ destroy(): void { clearTimeout(this.deployRecordCheckTimeout); + clearTimeout(this.auctionStatusCheckTimeout); } /** @@ -160,42 +162,21 @@ export class Service { /** * Update deployments with ApplicationDeploymentRecord data + * Deployments that are completed but not updated in DB */ async updateDeploymentsWithRecordData( records: AppDeploymentRecord[], ): Promise { - // Get deployments for ApplicationDeploymentRecords - // Deployments that are completed but not updated(are in building state and ApplicationDeploymentRecord is present) + // get and update deployments to be updated using request id const deployments = await this.db.getDeployments({ where: records.map((record) => ({ - applicationRecordId: record.attributes.application, - // Only for the specific deployer - deployerLrn: record.attributes.deployer + applicationDeploymentRequestId: record.attributes.request, })), order: { createdAt: 'DESC', }, }); - // Get deployment IDs of deployments that are in production environment - const productionDeploymentIds: string[] = []; - deployments.forEach(deployment => { - if (deployment.environment === Environment.Production) { - if (!productionDeploymentIds.includes(deployment.id)) { - productionDeploymentIds.push(deployment.id); - } - } - }); - - // Set old deployments isCurrent to false - // TODO: Only set isCurrent to false for the deployment for that specific deployer - for (const deploymentId of productionDeploymentIds) { - await this.db.updateDeployment( - { id: deploymentId }, - { isCurrent: false } - ); - } - const recordToDeploymentsMap = deployments.reduce( (acc: { [key: string]: Deployment }, deployment) => { acc[deployment.applicationDeploymentRequestId!] = deployment; @@ -213,14 +194,14 @@ export class Service { const parts = record.attributes.url.replace('https://', '').split('.'); const baseDomain = parts.slice(1).join('.'); - await this.db.updateDeploymentById(deployment.id, { - applicationDeploymentRecordId: record.id, - applicationDeploymentRecordData: record.attributes, - url: record.attributes.url, - baseDomain, - status: DeploymentStatus.Ready, - isCurrent: deployment.environment === Environment.Production, - }); + deployment.applicationDeploymentRecordId = record.id; + deployment.applicationDeploymentRecordData = record.attributes; + deployment.url = record.attributes.url; + deployment.baseDomain = baseDomain; + deployment.status = DeploymentStatus.Ready; + deployment.isCurrent = deployment.environment === Environment.Production; + + await this.db.updateDeploymentById(deployment.id, deployment); const baseDomains = project.baseDomains || []; @@ -237,6 +218,33 @@ export class Service { ); }); + await Promise.all(deploymentUpdatePromises); + + // if iscurrent is true for this deployment then update the old ones + const prodDeployments = Object.values(recordToDeploymentsMap).filter(deployment => deployment.isCurrent); + + // Get deployment IDs of deployments that are in production environment + for (const deployment of prodDeployments) { + const projectDeployments = await this.db.getDeploymentsByProjectId(deployment.projectId); + const oldDeployments = projectDeployments + .filter(projectDeployment => projectDeployment.deployerLrn === deployment.deployerLrn && projectDeployment.id !== deployment.id); + for (const oldDeployment of oldDeployments) { + await this.db.updateDeployment( + { id: oldDeployment.id }, + { isCurrent: false } + ); + } + } + + // Get old deployments for ApplicationDeploymentRecords + // flter out deps with is current false + + // loop over these deps + // get the project + // get all the deployemnts in that proj with the same deployer lrn (query filter not above updated dep) + // set is current to false + + await Promise.all(deploymentUpdatePromises); } @@ -280,13 +288,6 @@ export class Service { ); await this.db.deleteDeploymentById(deployment.id); - const project = await this.db.getProjectById(deployment.projectId); - - const updatedBaseDomains = project!.baseDomains!.filter(baseDomain => baseDomain !== deployment.baseDomain); - - await this.db.updateProjectById(deployment.projectId, { - baseDomains: updatedBaseDomains - }); }); await Promise.all(deploymentUpdatePromises); @@ -309,9 +310,7 @@ export class Service { const projects = allProjects.filter(project => { if (project.deletedAt !== null) return false; - const deletedDeployments = project.deployments.filter(deployment => deployment.deletedAt !== null).length; - - return project.deployments.length === 0 && deletedDeployments === 0; + return project.deployments.length === 0; }); const auctionIds = projects.map((project) => project.auctionId); @@ -343,7 +342,7 @@ export class Service { } } - this.deployRecordCheckTimeout = setTimeout(() => { + this.auctionStatusCheckTimeout = setTimeout(() => { this.checkAuctionStatus(); }, this.config.registryConfig.checkAuctionStatusDelay); } @@ -605,7 +604,8 @@ export class Service { domain: prodBranchDomains[0], commitHash: oldDeployment.commitHash, commitMessage: oldDeployment.commitMessage, - }, oldDeployment.deployerLrn); + deployerLrn: oldDeployment.deployerLrn + }); return newDeployment; } @@ -613,8 +613,7 @@ export class Service { async createDeployment( userId: string, octokit: Octokit, - data: DeepPartial, - deployerLrn: string + data: DeepPartial ): Promise { assert(data.project?.repository, 'Project repository not found'); log( @@ -643,7 +642,7 @@ export class Service { ); } - const newDeployment = await this.createDeploymentFromData(userId, data, deployerLrn, applicationRecordId, applicationRecordData); + const newDeployment = await this.createDeploymentFromData(userId, data, data.deployerLrn!, applicationRecordId, applicationRecordData); const { repo, repoUrl } = await getRepoDetails(octokit, data.project.repository, data.commitHash); const environmentVariablesObj = await this.getEnvVariables(data.project!.id!); @@ -657,7 +656,7 @@ export class Service { repository: repoUrl, environmentVariables: environmentVariablesObj, dns: `${newDeployment.project.name}`, - lrn: deployerLrn + lrn: data.deployerLrn! }); } @@ -666,7 +665,7 @@ export class Service { deployment: newDeployment, appName: repo, repository: repoUrl, - lrn: deployerLrn, + lrn: data.deployerLrn!, environmentVariables: environmentVariablesObj, dns: `${newDeployment.project.name}-${newDeployment.id}`, }); @@ -676,11 +675,6 @@ export class Service { applicationDeploymentRequestData, }); - // Save deployer lrn only if present - if (deployerLrn) { - newDeployment.project.deployerLrns = [deployerLrn]; - } - return newDeployment; } @@ -876,13 +870,14 @@ export class Service { domain: null, commitHash: latestCommit.sha, commitMessage: latestCommit.commit.message, + deployerLrn: lrn }; if (auctionParams) { const { applicationDeploymentAuctionId } = await this.laconicRegistry.createApplicationDeploymentAuction(repo, octokit, auctionParams!, deploymentData); await this.updateProject(project.id, { auctionId: applicationDeploymentAuctionId }) } else { - await this.createDeployment(user.id, octokit, deploymentData, lrn!); + await this.createDeployment(user.id, octokit, deploymentData); await this.updateProject(project.id, { deployerLrns: [lrn!] }) } @@ -954,7 +949,10 @@ export class Service { }); const deployers = project.deployerLrns; - if (!deployers) return; + if (!deployers) { + log(`No deployer present for project ${project.id}`) + return; + } for (const deployer of deployers) { // Create deployment with branch and latest commit in GitHub data @@ -969,8 +967,8 @@ export class Service { domain, commitHash: headCommit.id, commitMessage: headCommit.message, + deployerLrn: deployer }, - deployer ); } } @@ -1025,6 +1023,7 @@ export class Service { let newDeployment: Deployment; if (oldDeployment.project.auctionId) { + // TODO: Discuss creating applicationRecord for redeployments newDeployment = await this.createDeploymentFromAuction(oldDeployment.project, oldDeployment.deployerLrn); } else { newDeployment = await this.createDeployment(user.id, octokit, @@ -1036,8 +1035,8 @@ export class Service { domain: oldDeployment.domain, commitHash: oldDeployment.commitHash, commitMessage: oldDeployment.commitMessage, - }, - oldDeployment.deployerLrn + deployerLrn: oldDeployment.deployerLrn + } ); } diff --git a/packages/frontend/src/components/projects/project/overview/Activity/AuctionCard.tsx b/packages/frontend/src/components/projects/project/overview/Activity/AuctionCard.tsx index 518d1800..e79e944b 100644 --- a/packages/frontend/src/components/projects/project/overview/Activity/AuctionCard.tsx +++ b/packages/frontend/src/components/projects/project/overview/Activity/AuctionCard.tsx @@ -29,28 +29,29 @@ export const AuctionCard = ({ project }: { project: Project }) => { setAuctionStatus(result.status); setAuctionDetails(result); setDeployerLrns(project.deployerLrns); - }, [client, project.auctionId, project.deployerLrns]); + }, [client, project.auctionId, project.deployerLrns]); useEffect(() => { - const fetchUpdatedProject = async () => { - if (auctionStatus === 'completed') { - // Wait for 5 secs since the project is not immediately updated with deployer LRNs - await new Promise((resolve) => setTimeout(resolve, WAIT_DURATION)); - - const updatedProject = await client.getProject(project.id); - setDeployerLrns(updatedProject.project!.deployerLrns || []); - } - }; - if (auctionStatus !== 'completed') { - const intervalId = setInterval(checkAuctionStatus, WAIT_DURATION); checkAuctionStatus(); + const intervalId = setInterval(checkAuctionStatus, WAIT_DURATION); return () => clearInterval(intervalId); - } else { + } + }, [auctionStatus, checkAuctionStatus]); + + useEffect(() => { + if (auctionStatus === 'completed') { + const fetchUpdatedProject = async () => { + // Wait for 5 secs since the project is not immediately updated with deployer LRNs + await new Promise((resolve) => setTimeout(resolve, WAIT_DURATION)); + const updatedProject = await client.getProject(project.id); + setDeployerLrns(updatedProject.project?.deployerLrns || []); + }; + fetchUpdatedProject(); } - }, [auctionStatus, checkAuctionStatus, client]); + }, [auctionStatus, client, project.id]); const renderAuctionStatus = useCallback( () => ( diff --git a/packages/frontend/src/pages/components/modals.tsx b/packages/frontend/src/pages/components/modals.tsx index 608e3ffb..1eece68c 100644 --- a/packages/frontend/src/pages/components/modals.tsx +++ b/packages/frontend/src/pages/components/modals.tsx @@ -36,7 +36,7 @@ const deployment: Deployment = { url: 'https://deploy1.example.com', environment: Environment.Production, isCurrent: true, - deployerLrn: 'lrn://deepstack-test4/deployers/webapp-deployer-api.test4.wireitin.com', + deployerLrn: 'lrn://example/deployers/webapp-deployer-api.test.com', status: DeploymentStatus.Ready, createdBy: { id: 'user1', diff --git a/packages/gql-client/dist/index.d.mts b/packages/gql-client/dist/index.d.mts deleted file mode 100644 index 574f98ea..00000000 --- a/packages/gql-client/dist/index.d.mts +++ /dev/null @@ -1,340 +0,0 @@ -declare enum Role { - Owner = "Owner", - Maintainer = "Maintainer", - Reader = "Reader" -} -declare enum Permission { - View = "View", - Edit = "Edit" -} -declare enum Environment { - Production = "Production", - Preview = "Preview", - Development = "Development" -} -declare enum DeploymentStatus { - Building = "Building", - Ready = "Ready", - Error = "Error", - Deleting = "Deleting" -} -declare enum AuctionStatus { - AuctionStatusCommitPhase = "commit", - AuctionStatusRevealPhase = "reveal", - AuctionStatusExpired = "expired", - AuctionStatusCompleted = "completed" -} -type Bid = { - auctionId: string; - bidderAddress: string; - status: string; - commitHash: string; - commitTime?: Date; - commitFee?: string; - revealTime?: Date; - revealFee?: string; - bidAmount?: string; -}; -type Auction = { - id: string; - kind: string; - status: string; - ownerAddress: string; - createTime?: Date; - commitsEndTime?: Date; - revealsEndTime?: Date; - commitFee?: string; - revealFee?: string; - minimumBid?: string; - winnerAddresses: string[]; - winnerBids?: string[]; - winnerPrice?: string; - maxPrice?: string; - numProviders: number; - fundsReleased: boolean; - bids: Bid[]; -}; -declare enum DomainStatus { - Live = "Live", - Pending = "Pending" -} -type EnvironmentVariable = { - id: string; - environment: Environment; - key: string; - value: string; - createdAt: string; - updatedAt: string; -}; -type Domain = { - id: string; - branch: string; - name: string; - status: DomainStatus; - redirectTo: Domain | null; - createdAt: string; - updatedAt: string; -}; -type User = { - id: string; - name: string | null; - email: string; - isVerified: boolean; - createdAt: string; - updatedAt: string; - gitHubToken: string | null; -}; -type Deployment = { - id: string; - domain: Domain; - branch: string; - commitHash: string; - commitMessage: string; - url?: string; - deployerLrn: string; - environment: Environment; - isCurrent: boolean; - baseDomain?: string; - status: DeploymentStatus; - createdBy: User; - createdAt: string; - updatedAt: string; -}; -type OrganizationMember = { - id: string; - member: User; - role: Role; - createdAt: string; - updatedAt: string; -}; -type ProjectMember = { - id: string; - member: User; - permissions: Permission[]; - isPending: boolean; - createdAt: string; - updatedAt: string; -}; -type OrganizationProject = { - id: string; - owner: User; - deployments: Deployment[]; - name: string; - repository: string; - prodBranch: string; - description: string; - template: string; - framework: string; - webhooks: string[]; - members: ProjectMember[]; - environmentVariables: EnvironmentVariable[]; - createdAt: string; - updatedAt: string; -}; -type Organization = { - id: string; - name: string; - slug: string; - projects: OrganizationProject[]; - createdAt: string; - updatedAt: string; - members: OrganizationMember[]; -}; -type Project = { - id: string; - owner: User; - deployments: Deployment[]; - name: string; - repository: string; - prodBranch: string; - description: string; - template: string; - framework: string; - deployerLrns: string[]; - auctionId: string; - webhooks: string[]; - members: ProjectMember[]; - environmentVariables: EnvironmentVariable[]; - createdAt: string; - updatedAt: string; - organization: Organization; - icon: string; - baseDomains?: string[] | null; -}; -type GetProjectMembersResponse = { - projectMembers: ProjectMember[]; -}; -type AddProjectMemberResponse = { - addProjectMember: boolean; -}; -type RemoveProjectMemberResponse = { - removeProjectMember: boolean; -}; -type UpdateProjectMemberResponse = { - updateProjectMember: boolean; -}; -type GetDeploymentsResponse = { - deployments: Deployment[]; -}; -type GetEnvironmentVariablesResponse = { - environmentVariables: EnvironmentVariable[]; -}; -type GetOrganizationsResponse = { - organizations: Organization[]; -}; -type GetUserResponse = { - user: User; -}; -type GetProjectResponse = { - project: Project | null; -}; -type GetProjectsInOrganizationResponse = { - projectsInOrganization: Project[]; -}; -type GetDomainsResponse = { - domains: Domain[]; -}; -type SearchProjectsResponse = { - searchProjects: Project[]; -}; -type AddEnvironmentVariablesResponse = { - addEnvironmentVariables: boolean; -}; -type AddEnvironmentVariableInput = { - environments: string[]; - key: string; - value: string; -}; -type UpdateEnvironmentVariableInput = { - key: string; - value: string; -}; -type UpdateProjectMemberInput = { - permissions: Permission[]; -}; -type AddProjectMemberInput = { - email: string; - permissions: Permission[]; -}; -type UpdateEnvironmentVariableResponse = { - updateEnvironmentVariable: boolean; -}; -type RemoveEnvironmentVariableResponse = { - removeEnvironmentVariable: boolean; -}; -type UpdateDeploymentToProdResponse = { - updateDeploymentToProd: boolean; -}; -type AddProjectFromTemplateResponse = { - addProjectFromTemplate: Project; -}; -type AddProjectResponse = { - addProject: Project; -}; -type UpdateProjectResponse = { - updateProject: boolean; -}; -type UpdateDomainResponse = { - updateDomain: boolean; -}; -type DeleteProjectResponse = { - deleteProject: boolean; -}; -type DeleteDomainResponse = { - deleteDomain: boolean; -}; -type AddProjectFromTemplateInput = { - templateOwner: string; - templateRepo: string; - owner: string; - name: string; - isPrivate: boolean; -}; -type AddProjectInput = { - name: string; - repository: string; - prodBranch: string; - template?: string; -}; -type UpdateProjectInput = { - name?: string; - description?: string; - prodBranch?: string; - webhooks?: string[]; - organizationId?: string; -}; -type UpdateDomainInput = { - name?: string; - branch?: string; - redirectToId?: string | null; -}; -type RedeployToProdResponse = { - redeployToProd: boolean; -}; -type RollbackDeploymentResponse = { - rollbackDeployment: boolean; -}; -type DeleteDeploymentResponse = { - deleteDeployment: boolean; -}; -type AddDomainInput = { - name: string; -}; -type FilterDomainInput = { - branch?: string; - status?: DomainStatus; -}; -type AddDomainResponse = { - addDomain: true; -}; -type AuthenticateGitHubResponse = { - authenticateGitHub: { - token: string; - }; -}; -type UnauthenticateGitHubResponse = { - unauthenticateGitHub: boolean; -}; -type AuctionParams = { - maxPrice: string; - numProviders: number; -}; - -interface GraphQLConfig { - gqlEndpoint: string; -} -declare class GQLClient { - private client; - constructor(config: GraphQLConfig); - getUser(): Promise; - getProject(projectId: string): Promise; - getProjectsInOrganization(organizationSlug: string): Promise; - getOrganizations(): Promise; - getDeployments(projectId: string): Promise; - getEnvironmentVariables(projectId: string): Promise; - getProjectMembers(projectId: string): Promise; - addProjectMember(projectId: string, data: AddProjectMemberInput): Promise; - updateProjectMember(projectMemberId: string, data: UpdateProjectMemberInput): Promise; - removeProjectMember(projectMemberId: string): Promise; - searchProjects(searchText: string): Promise; - addEnvironmentVariables(projectId: string, data: AddEnvironmentVariableInput[]): Promise; - updateEnvironmentVariable(environmentVariableId: string, data: UpdateEnvironmentVariableInput): Promise; - removeEnvironmentVariable(environmentVariableId: string): Promise; - updateDeploymentToProd(deploymentId: string): Promise; - addProjectFromTemplate(organizationSlug: string, data: AddProjectFromTemplateInput, lrn?: string, auctionParams?: AuctionParams): Promise; - addProject(organizationSlug: string, data: AddProjectInput, lrn?: string, auctionParams?: AuctionParams): Promise; - updateProject(projectId: string, data: UpdateProjectInput): Promise; - updateDomain(domainId: string, data: UpdateDomainInput): Promise; - redeployToProd(deploymentId: string): Promise; - deleteProject(projectId: string): Promise; - deleteDomain(domainId: string): Promise; - rollbackDeployment(projectId: string, deploymentId: string): Promise; - deleteDeployment(deploymentId: string): Promise; - addDomain(projectId: string, data: AddDomainInput): Promise; - getDomains(projectId: string, filter?: FilterDomainInput): Promise; - authenticateGitHub(code: string): Promise; - unauthenticateGithub(): Promise; - getAuctionData(auctionId: string): Promise; -} - -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 }; diff --git a/packages/gql-client/dist/index.d.ts b/packages/gql-client/dist/index.d.ts deleted file mode 100644 index 574f98ea..00000000 --- a/packages/gql-client/dist/index.d.ts +++ /dev/null @@ -1,340 +0,0 @@ -declare enum Role { - Owner = "Owner", - Maintainer = "Maintainer", - Reader = "Reader" -} -declare enum Permission { - View = "View", - Edit = "Edit" -} -declare enum Environment { - Production = "Production", - Preview = "Preview", - Development = "Development" -} -declare enum DeploymentStatus { - Building = "Building", - Ready = "Ready", - Error = "Error", - Deleting = "Deleting" -} -declare enum AuctionStatus { - AuctionStatusCommitPhase = "commit", - AuctionStatusRevealPhase = "reveal", - AuctionStatusExpired = "expired", - AuctionStatusCompleted = "completed" -} -type Bid = { - auctionId: string; - bidderAddress: string; - status: string; - commitHash: string; - commitTime?: Date; - commitFee?: string; - revealTime?: Date; - revealFee?: string; - bidAmount?: string; -}; -type Auction = { - id: string; - kind: string; - status: string; - ownerAddress: string; - createTime?: Date; - commitsEndTime?: Date; - revealsEndTime?: Date; - commitFee?: string; - revealFee?: string; - minimumBid?: string; - winnerAddresses: string[]; - winnerBids?: string[]; - winnerPrice?: string; - maxPrice?: string; - numProviders: number; - fundsReleased: boolean; - bids: Bid[]; -}; -declare enum DomainStatus { - Live = "Live", - Pending = "Pending" -} -type EnvironmentVariable = { - id: string; - environment: Environment; - key: string; - value: string; - createdAt: string; - updatedAt: string; -}; -type Domain = { - id: string; - branch: string; - name: string; - status: DomainStatus; - redirectTo: Domain | null; - createdAt: string; - updatedAt: string; -}; -type User = { - id: string; - name: string | null; - email: string; - isVerified: boolean; - createdAt: string; - updatedAt: string; - gitHubToken: string | null; -}; -type Deployment = { - id: string; - domain: Domain; - branch: string; - commitHash: string; - commitMessage: string; - url?: string; - deployerLrn: string; - environment: Environment; - isCurrent: boolean; - baseDomain?: string; - status: DeploymentStatus; - createdBy: User; - createdAt: string; - updatedAt: string; -}; -type OrganizationMember = { - id: string; - member: User; - role: Role; - createdAt: string; - updatedAt: string; -}; -type ProjectMember = { - id: string; - member: User; - permissions: Permission[]; - isPending: boolean; - createdAt: string; - updatedAt: string; -}; -type OrganizationProject = { - id: string; - owner: User; - deployments: Deployment[]; - name: string; - repository: string; - prodBranch: string; - description: string; - template: string; - framework: string; - webhooks: string[]; - members: ProjectMember[]; - environmentVariables: EnvironmentVariable[]; - createdAt: string; - updatedAt: string; -}; -type Organization = { - id: string; - name: string; - slug: string; - projects: OrganizationProject[]; - createdAt: string; - updatedAt: string; - members: OrganizationMember[]; -}; -type Project = { - id: string; - owner: User; - deployments: Deployment[]; - name: string; - repository: string; - prodBranch: string; - description: string; - template: string; - framework: string; - deployerLrns: string[]; - auctionId: string; - webhooks: string[]; - members: ProjectMember[]; - environmentVariables: EnvironmentVariable[]; - createdAt: string; - updatedAt: string; - organization: Organization; - icon: string; - baseDomains?: string[] | null; -}; -type GetProjectMembersResponse = { - projectMembers: ProjectMember[]; -}; -type AddProjectMemberResponse = { - addProjectMember: boolean; -}; -type RemoveProjectMemberResponse = { - removeProjectMember: boolean; -}; -type UpdateProjectMemberResponse = { - updateProjectMember: boolean; -}; -type GetDeploymentsResponse = { - deployments: Deployment[]; -}; -type GetEnvironmentVariablesResponse = { - environmentVariables: EnvironmentVariable[]; -}; -type GetOrganizationsResponse = { - organizations: Organization[]; -}; -type GetUserResponse = { - user: User; -}; -type GetProjectResponse = { - project: Project | null; -}; -type GetProjectsInOrganizationResponse = { - projectsInOrganization: Project[]; -}; -type GetDomainsResponse = { - domains: Domain[]; -}; -type SearchProjectsResponse = { - searchProjects: Project[]; -}; -type AddEnvironmentVariablesResponse = { - addEnvironmentVariables: boolean; -}; -type AddEnvironmentVariableInput = { - environments: string[]; - key: string; - value: string; -}; -type UpdateEnvironmentVariableInput = { - key: string; - value: string; -}; -type UpdateProjectMemberInput = { - permissions: Permission[]; -}; -type AddProjectMemberInput = { - email: string; - permissions: Permission[]; -}; -type UpdateEnvironmentVariableResponse = { - updateEnvironmentVariable: boolean; -}; -type RemoveEnvironmentVariableResponse = { - removeEnvironmentVariable: boolean; -}; -type UpdateDeploymentToProdResponse = { - updateDeploymentToProd: boolean; -}; -type AddProjectFromTemplateResponse = { - addProjectFromTemplate: Project; -}; -type AddProjectResponse = { - addProject: Project; -}; -type UpdateProjectResponse = { - updateProject: boolean; -}; -type UpdateDomainResponse = { - updateDomain: boolean; -}; -type DeleteProjectResponse = { - deleteProject: boolean; -}; -type DeleteDomainResponse = { - deleteDomain: boolean; -}; -type AddProjectFromTemplateInput = { - templateOwner: string; - templateRepo: string; - owner: string; - name: string; - isPrivate: boolean; -}; -type AddProjectInput = { - name: string; - repository: string; - prodBranch: string; - template?: string; -}; -type UpdateProjectInput = { - name?: string; - description?: string; - prodBranch?: string; - webhooks?: string[]; - organizationId?: string; -}; -type UpdateDomainInput = { - name?: string; - branch?: string; - redirectToId?: string | null; -}; -type RedeployToProdResponse = { - redeployToProd: boolean; -}; -type RollbackDeploymentResponse = { - rollbackDeployment: boolean; -}; -type DeleteDeploymentResponse = { - deleteDeployment: boolean; -}; -type AddDomainInput = { - name: string; -}; -type FilterDomainInput = { - branch?: string; - status?: DomainStatus; -}; -type AddDomainResponse = { - addDomain: true; -}; -type AuthenticateGitHubResponse = { - authenticateGitHub: { - token: string; - }; -}; -type UnauthenticateGitHubResponse = { - unauthenticateGitHub: boolean; -}; -type AuctionParams = { - maxPrice: string; - numProviders: number; -}; - -interface GraphQLConfig { - gqlEndpoint: string; -} -declare class GQLClient { - private client; - constructor(config: GraphQLConfig); - getUser(): Promise; - getProject(projectId: string): Promise; - getProjectsInOrganization(organizationSlug: string): Promise; - getOrganizations(): Promise; - getDeployments(projectId: string): Promise; - getEnvironmentVariables(projectId: string): Promise; - getProjectMembers(projectId: string): Promise; - addProjectMember(projectId: string, data: AddProjectMemberInput): Promise; - updateProjectMember(projectMemberId: string, data: UpdateProjectMemberInput): Promise; - removeProjectMember(projectMemberId: string): Promise; - searchProjects(searchText: string): Promise; - addEnvironmentVariables(projectId: string, data: AddEnvironmentVariableInput[]): Promise; - updateEnvironmentVariable(environmentVariableId: string, data: UpdateEnvironmentVariableInput): Promise; - removeEnvironmentVariable(environmentVariableId: string): Promise; - updateDeploymentToProd(deploymentId: string): Promise; - addProjectFromTemplate(organizationSlug: string, data: AddProjectFromTemplateInput, lrn?: string, auctionParams?: AuctionParams): Promise; - addProject(organizationSlug: string, data: AddProjectInput, lrn?: string, auctionParams?: AuctionParams): Promise; - updateProject(projectId: string, data: UpdateProjectInput): Promise; - updateDomain(domainId: string, data: UpdateDomainInput): Promise; - redeployToProd(deploymentId: string): Promise; - deleteProject(projectId: string): Promise; - deleteDomain(domainId: string): Promise; - rollbackDeployment(projectId: string, deploymentId: string): Promise; - deleteDeployment(deploymentId: string): Promise; - addDomain(projectId: string, data: AddDomainInput): Promise; - getDomains(projectId: string, filter?: FilterDomainInput): Promise; - authenticateGitHub(code: string): Promise; - unauthenticateGithub(): Promise; - getAuctionData(auctionId: string): Promise; -} - -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 }; diff --git a/packages/gql-client/dist/index.js b/packages/gql-client/dist/index.js deleted file mode 100644 index 58a9f655..00000000 --- a/packages/gql-client/dist/index.js +++ /dev/null @@ -1,841 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var __async = (__this, __arguments, generator) => { - return new Promise((resolve, reject) => { - var fulfilled = (value) => { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - }; - var rejected = (value) => { - try { - step(generator.throw(value)); - } catch (e) { - reject(e); - } - }; - var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); - step((generator = generator.apply(__this, __arguments)).next()); - }); -}; - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - AuctionStatus: () => AuctionStatus, - DeploymentStatus: () => DeploymentStatus, - DomainStatus: () => DomainStatus, - Environment: () => Environment, - GQLClient: () => GQLClient, - Permission: () => Permission, - Role: () => Role -}); -module.exports = __toCommonJS(src_exports); - -// src/client.ts -var import_client3 = require("@apollo/client"); - -// src/queries.ts -var import_client = require("@apollo/client"); -var getUser = import_client.gql` -query { - user { - id - name - email - createdAt - updatedAt - gitHubToken - } -} -`; -var getProject = import_client.gql` -query ($projectId: String!) { - project(projectId: $projectId) { - createdAt - description - id - name - template - updatedAt - prodBranch - auctionId - deployerLrns - framework - repository - webhooks - icon - baseDomains - organization { - id - name - } - owner { - id - name - email - } - deployments { - id - branch - isCurrent - baseDomain - status - updatedAt - commitHash - createdAt - environment - domain { - status - branch - createdAt - updatedAt - id - name - } - createdBy { - id - name - } - } - } -} -`; -var getProjectsInOrganization = import_client.gql` -query ($organizationSlug: String!) { - projectsInOrganization(organizationSlug: $organizationSlug) { - id - name - createdAt - description - framework - auctionId - deployerLrns - prodBranch - webhooks - repository - updatedAt - icon - baseDomains - deployments { - id - branch - isCurrent - baseDomain - status - updatedAt - commitHash - commitMessage - createdAt - environment - domain { - status - branch - createdAt - updatedAt - id - name - } - } - } -} -`; -var getOrganizations = import_client.gql` -query { - organizations { - id - name - slug - createdAt - updatedAt - } -} -`; -var getDeployments = import_client.gql` -query ($projectId: String!) { - deployments(projectId: $projectId) { - id - domain{ - branch - createdAt - id - name - status - updatedAt - } - branch - commitHash - commitMessage - url - deployerLrn - environment - isCurrent - baseDomain - status - createdAt - updatedAt - createdBy { - id - name - email - } - } -} -`; -var getEnvironmentVariables = import_client.gql` -query ($projectId: String!) { - environmentVariables(projectId: $projectId) { - createdAt - environment - id - key - updatedAt - value - } -} -`; -var getProjectMembers = import_client.gql` -query ($projectId: String!) { - projectMembers(projectId: $projectId) { - id - member { - id - name - email - isVerified - } - isPending - createdAt - updatedAt - permissions - } -} -`; -var searchProjects = import_client.gql` -query ($searchText: String!) { - searchProjects(searchText: $searchText) { - id - name - prodBranch - repository - createdAt - description - framework - auctionId - deployerLrns - prodBranch - webhooks - updatedAt - template - repository - organization { - id - name - slug - createdAt - updatedAt - } - } -} -`; -var getDomains = import_client.gql` -query ($projectId: String!, $filter: FilterDomainsInput) { - domains(projectId: $projectId, filter: $filter) { - branch - createdAt - redirectTo { - id - name - branch - status - } - id - name - status - updatedAt - } -} -`; -var getAuctionData = import_client.gql` -query ($auctionId: String!) { - getAuctionData(auctionId: $auctionId){ - id - kind - status - ownerAddress - createTime - commitsEndTime - revealsEndTime - commitFee { - type - quantity - } - revealFee { - type - quantity - } - minimumBid { - type - quantity - } - winnerAddresses - winnerBids { - type - quantity - } - winnerPrice { - type - quantity - } - maxPrice { - type - quantity - } - numProviders - fundsReleased - bids { - bidderAddress - status - commitHash - commitTime - revealTime - commitFee { - type - quantity - } - revealFee { - type - quantity - } - bidAmount { - type - quantity - } - } - } -} -`; - -// src/mutations.ts -var import_client2 = require("@apollo/client"); -var removeProjectMember = import_client2.gql` - mutation ($projectMemberId: String!) { - removeProjectMember(projectMemberId: $projectMemberId) - } -`; -var updateProjectMember = import_client2.gql` - mutation ($projectMemberId: String!, $data: UpdateProjectMemberInput) { - updateProjectMember(projectMemberId: $projectMemberId, data: $data) - } -`; -var addProjectMember = import_client2.gql` - mutation ($projectId: String!, $data: AddProjectMemberInput) { - addProjectMember(projectId: $projectId, data: $data) - } -`; -var addEnvironmentVariables = import_client2.gql` - mutation ($projectId: String!, $data: [AddEnvironmentVariableInput!]) { - addEnvironmentVariables(projectId: $projectId, data: $data) - } -`; -var updateEnvironmentVariable = import_client2.gql` - mutation ( - $environmentVariableId: String! - $data: UpdateEnvironmentVariableInput! - ) { - updateEnvironmentVariable( - environmentVariableId: $environmentVariableId - data: $data - ) - } -`; -var removeEnvironmentVariable = import_client2.gql` - mutation ($environmentVariableId: String!) { - removeEnvironmentVariable(environmentVariableId: $environmentVariableId) - } -`; -var updateDeploymentToProd = import_client2.gql` - mutation ($deploymentId: String!) { - updateDeploymentToProd(deploymentId: $deploymentId) - } -`; -var addProjectFromTemplate = import_client2.gql` - mutation ($organizationSlug: String!, $data: AddProjectFromTemplateInput, $lrn: String, $auctionParams: AuctionParams) { - addProjectFromTemplate(organizationSlug: $organizationSlug, data: $data, lrn: $lrn, auctionParams: $auctionParams) { - id - } - } -`; -var addProject = import_client2.gql` - mutation ($organizationSlug: String!, $data: AddProjectInput!, $lrn: String, $auctionParams: Auctionparams) { - addProject(organizationSlug: $organizationSlug, data: $data, lrn: $lrn, auctionParams: $auctionParams) { - id - } - } -`; -var updateProjectMutation = import_client2.gql` - mutation ($projectId: String!, $data: UpdateProjectInput) { - updateProject(projectId: $projectId, data: $data) - } -`; -var updateDomainMutation = import_client2.gql` - mutation ($domainId: String!, $data: UpdateDomainInput!) { - updateDomain(domainId: $domainId, data: $data) - } -`; -var redeployToProd = import_client2.gql` - mutation ($deploymentId: String!) { - redeployToProd(deploymentId: $deploymentId) - } -`; -var deleteProject = import_client2.gql` - mutation ($projectId: String!) { - deleteProject(projectId: $projectId) - } -`; -var deleteDomain = import_client2.gql` - mutation ($domainId: String!) { - deleteDomain(domainId: $domainId) - } -`; -var rollbackDeployment = import_client2.gql` - mutation ($projectId: String!, $deploymentId: String!) { - rollbackDeployment(projectId: $projectId, deploymentId: $deploymentId) - } -`; -var deleteDeployment = import_client2.gql` - mutation ($deploymentId: String!) { - deleteDeployment(deploymentId: $deploymentId) - } -`; -var addDomain = import_client2.gql` - mutation ($projectId: String!, $data: AddDomainInput!) { - addDomain(projectId: $projectId, data: $data) - } -`; -var authenticateGitHub = import_client2.gql` - mutation ($code: String!) { - authenticateGitHub(code: $code) { - token - } - } -`; -var unauthenticateGitHub = import_client2.gql` - mutation { - unauthenticateGitHub - } -`; - -// src/client.ts -var defaultOptions = { - watchQuery: { - fetchPolicy: "no-cache", - errorPolicy: "ignore" - }, - query: { - fetchPolicy: "no-cache", - errorPolicy: "all" - } -}; -var GQLClient = class { - constructor(config) { - this.client = new import_client3.ApolloClient({ - uri: config.gqlEndpoint, - cache: new import_client3.InMemoryCache(), - defaultOptions, - credentials: "include" - }); - } - getUser() { - return __async(this, null, function* () { - const { data } = yield this.client.query({ - query: getUser - }); - return data; - }); - } - getProject(projectId) { - return __async(this, null, function* () { - const { data } = yield this.client.query({ - query: getProject, - variables: { - projectId - } - }); - return data; - }); - } - getProjectsInOrganization(organizationSlug) { - return __async(this, null, function* () { - const { data } = yield this.client.query({ - query: getProjectsInOrganization, - variables: { - organizationSlug - } - }); - return data; - }); - } - getOrganizations() { - return __async(this, null, function* () { - const { data } = yield this.client.query({ - query: getOrganizations - }); - return data; - }); - } - getDeployments(projectId) { - return __async(this, null, function* () { - const { data } = yield this.client.query({ - query: getDeployments, - variables: { - projectId - } - }); - return data; - }); - } - getEnvironmentVariables(projectId) { - return __async(this, null, function* () { - const { data } = yield this.client.query({ - query: getEnvironmentVariables, - variables: { - projectId - } - }); - return data; - }); - } - getProjectMembers(projectId) { - return __async(this, null, function* () { - const result = yield this.client.query({ - query: getProjectMembers, - variables: { - projectId - } - }); - return result.data; - }); - } - addProjectMember(projectId, data) { - return __async(this, null, function* () { - const result = yield this.client.mutate({ - mutation: addProjectMember, - variables: { - projectId, - data - } - }); - return result.data; - }); - } - updateProjectMember(projectMemberId, data) { - return __async(this, null, function* () { - const result = yield this.client.mutate({ - mutation: updateProjectMember, - variables: { - projectMemberId, - data - } - }); - return result.data; - }); - } - removeProjectMember(projectMemberId) { - return __async(this, null, function* () { - const result = yield this.client.mutate({ - mutation: removeProjectMember, - variables: { - projectMemberId - } - }); - return result.data; - }); - } - searchProjects(searchText) { - return __async(this, null, function* () { - const { data } = yield this.client.query({ - query: searchProjects, - variables: { - searchText - } - }); - return data; - }); - } - addEnvironmentVariables(projectId, data) { - return __async(this, null, function* () { - const result = yield this.client.mutate({ - mutation: addEnvironmentVariables, - variables: { - projectId, - data - } - }); - return result.data; - }); - } - updateEnvironmentVariable(environmentVariableId, data) { - return __async(this, null, function* () { - const result = yield this.client.mutate({ - mutation: updateEnvironmentVariable, - variables: { - environmentVariableId, - data - } - }); - return result.data; - }); - } - removeEnvironmentVariable(environmentVariableId) { - return __async(this, null, function* () { - const { data } = yield this.client.mutate({ - mutation: removeEnvironmentVariable, - variables: { - environmentVariableId - } - }); - return data; - }); - } - updateDeploymentToProd(deploymentId) { - return __async(this, null, function* () { - const { data } = yield this.client.mutate({ - mutation: updateDeploymentToProd, - variables: { - deploymentId - } - }); - return data; - }); - } - addProjectFromTemplate(organizationSlug, data, lrn, auctionParams) { - return __async(this, null, function* () { - const result = yield this.client.mutate({ - mutation: addProjectFromTemplate, - variables: { - organizationSlug, - data, - lrn, - auctionParams - } - }); - return result.data; - }); - } - addProject(organizationSlug, data, lrn, auctionParams) { - return __async(this, null, function* () { - const result = yield this.client.mutate({ - mutation: addProject, - variables: { - organizationSlug, - data, - lrn, - auctionParams - } - }); - return result.data; - }); - } - updateProject(projectId, data) { - return __async(this, null, function* () { - const result = yield this.client.mutate({ - mutation: updateProjectMutation, - variables: { - projectId, - data - } - }); - return result.data; - }); - } - updateDomain(domainId, data) { - return __async(this, null, function* () { - const result = yield this.client.mutate({ - mutation: updateDomainMutation, - variables: { - domainId, - data - } - }); - return result.data; - }); - } - redeployToProd(deploymentId) { - return __async(this, null, function* () { - const { data } = yield this.client.mutate({ - mutation: redeployToProd, - variables: { - deploymentId - } - }); - return data; - }); - } - deleteProject(projectId) { - return __async(this, null, function* () { - const { data } = yield this.client.mutate({ - mutation: deleteProject, - variables: { - projectId - } - }); - return data; - }); - } - deleteDomain(domainId) { - return __async(this, null, function* () { - const { data } = yield this.client.mutate({ - mutation: deleteDomain, - variables: { - domainId - } - }); - return data; - }); - } - rollbackDeployment(projectId, deploymentId) { - return __async(this, null, function* () { - const { data } = yield this.client.mutate({ - mutation: rollbackDeployment, - variables: { - projectId, - deploymentId - } - }); - return data; - }); - } - deleteDeployment(deploymentId) { - return __async(this, null, function* () { - const { data } = yield this.client.mutate({ - mutation: deleteDeployment, - variables: { - deploymentId - } - }); - return data; - }); - } - addDomain(projectId, data) { - return __async(this, null, function* () { - const result = yield this.client.mutate({ - mutation: addDomain, - variables: { - projectId, - data - } - }); - return result.data; - }); - } - getDomains(projectId, filter) { - return __async(this, null, function* () { - const { data } = yield this.client.query({ - query: getDomains, - variables: { - projectId, - filter - } - }); - return data; - }); - } - authenticateGitHub(code) { - return __async(this, null, function* () { - const { data } = yield this.client.mutate({ - mutation: authenticateGitHub, - variables: { - code - } - }); - return data; - }); - } - unauthenticateGithub() { - return __async(this, null, function* () { - const { data } = yield this.client.mutate({ - mutation: unauthenticateGitHub - }); - return data; - }); - } - getAuctionData(auctionId) { - return __async(this, null, function* () { - const { data } = yield this.client.query({ - query: getAuctionData, - variables: { - auctionId - } - }); - return data.getAuctionData; - }); - } -}; - -// src/types.ts -var Role = /* @__PURE__ */ ((Role2) => { - Role2["Owner"] = "Owner"; - Role2["Maintainer"] = "Maintainer"; - Role2["Reader"] = "Reader"; - return Role2; -})(Role || {}); -var Permission = /* @__PURE__ */ ((Permission2) => { - Permission2["View"] = "View"; - Permission2["Edit"] = "Edit"; - return Permission2; -})(Permission || {}); -var Environment = /* @__PURE__ */ ((Environment2) => { - Environment2["Production"] = "Production"; - Environment2["Preview"] = "Preview"; - Environment2["Development"] = "Development"; - return Environment2; -})(Environment || {}); -var DeploymentStatus = /* @__PURE__ */ ((DeploymentStatus2) => { - DeploymentStatus2["Building"] = "Building"; - DeploymentStatus2["Ready"] = "Ready"; - DeploymentStatus2["Error"] = "Error"; - DeploymentStatus2["Deleting"] = "Deleting"; - return DeploymentStatus2; -})(DeploymentStatus || {}); -var AuctionStatus = /* @__PURE__ */ ((AuctionStatus2) => { - AuctionStatus2["AuctionStatusCommitPhase"] = "commit"; - AuctionStatus2["AuctionStatusRevealPhase"] = "reveal"; - AuctionStatus2["AuctionStatusExpired"] = "expired"; - AuctionStatus2["AuctionStatusCompleted"] = "completed"; - return AuctionStatus2; -})(AuctionStatus || {}); -var DomainStatus = /* @__PURE__ */ ((DomainStatus2) => { - DomainStatus2["Live"] = "Live"; - DomainStatus2["Pending"] = "Pending"; - return DomainStatus2; -})(DomainStatus || {}); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - AuctionStatus, - DeploymentStatus, - DomainStatus, - Environment, - GQLClient, - Permission, - Role -}); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/gql-client/dist/index.js.map b/packages/gql-client/dist/index.js.map deleted file mode 100644 index 276b1570..00000000 --- a/packages/gql-client/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts","../src/client.ts","../src/queries.ts","../src/mutations.ts","../src/types.ts"],"sourcesContent":["export * from \"./client\";\nexport * from \"./types\";\n","import {\n ApolloClient,\n DefaultOptions,\n InMemoryCache,\n NormalizedCacheObject,\n} from \"@apollo/client\";\n\nimport * as queries from \"./queries\";\nimport * as types from \"./types\";\nimport * as mutations from \"./mutations\";\n\nexport interface GraphQLConfig {\n gqlEndpoint: string;\n}\n\n// TODO: check options\nconst defaultOptions: DefaultOptions = {\n watchQuery: {\n fetchPolicy: \"no-cache\",\n errorPolicy: \"ignore\",\n },\n query: {\n fetchPolicy: \"no-cache\",\n errorPolicy: \"all\",\n },\n};\n\nexport class GQLClient {\n private client: ApolloClient;\n\n constructor(config: GraphQLConfig) {\n this.client = new ApolloClient({\n uri: config.gqlEndpoint,\n cache: new InMemoryCache(),\n defaultOptions,\n credentials: \"include\",\n });\n }\n\n async getUser(): Promise {\n const { data } = await this.client.query({\n query: queries.getUser,\n });\n\n return data;\n }\n\n async getProject(projectId: string): Promise {\n const { data } = await this.client.query({\n query: queries.getProject,\n variables: {\n projectId,\n },\n });\n\n return data;\n }\n\n async getProjectsInOrganization(\n organizationSlug: string\n ): Promise {\n const { data } = await this.client.query({\n query: queries.getProjectsInOrganization,\n variables: {\n organizationSlug,\n },\n });\n\n return data;\n }\n\n async getOrganizations(): Promise {\n const { data } = await this.client.query({\n query: queries.getOrganizations,\n });\n\n return data;\n }\n\n async getDeployments(\n projectId: string\n ): Promise {\n const { data } = await this.client.query({\n query: queries.getDeployments,\n variables: {\n projectId,\n },\n });\n\n return data;\n }\n\n async getEnvironmentVariables(\n projectId: string\n ): Promise {\n const { data } = await this.client.query({\n query: queries.getEnvironmentVariables,\n variables: {\n projectId,\n },\n });\n\n return data;\n }\n\n async getProjectMembers(\n projectId: string\n ): Promise {\n const result = await this.client.query({\n query: queries.getProjectMembers,\n variables: {\n projectId,\n },\n });\n\n return result.data;\n }\n\n async addProjectMember(\n projectId: string,\n data: types.AddProjectMemberInput\n ): Promise {\n const result = await this.client.mutate({\n mutation: mutations.addProjectMember,\n variables: {\n projectId,\n data,\n },\n });\n\n return result.data;\n }\n\n async updateProjectMember(\n projectMemberId: string,\n data: types.UpdateProjectMemberInput\n ): Promise {\n const result = await this.client.mutate({\n mutation: mutations.updateProjectMember,\n variables: {\n projectMemberId,\n data,\n },\n });\n\n return result.data;\n }\n\n async removeProjectMember(\n projectMemberId: string\n ): Promise {\n const result = await this.client.mutate({\n mutation: mutations.removeProjectMember,\n variables: {\n projectMemberId,\n },\n });\n\n return result.data;\n }\n\n async searchProjects(\n searchText: string\n ): Promise {\n const { data } = await this.client.query({\n query: queries.searchProjects,\n variables: {\n searchText,\n },\n });\n\n return data;\n }\n\n async addEnvironmentVariables(\n projectId: string,\n data: types.AddEnvironmentVariableInput[]\n ): Promise {\n const result = await this.client.mutate({\n mutation: mutations.addEnvironmentVariables,\n variables: {\n projectId,\n data,\n },\n });\n\n return result.data;\n }\n\n async updateEnvironmentVariable(\n environmentVariableId: string,\n data: types.UpdateEnvironmentVariableInput\n ): Promise {\n const result = await this.client.mutate({\n mutation: mutations.updateEnvironmentVariable,\n variables: {\n environmentVariableId,\n data,\n },\n });\n\n return result.data;\n }\n\n async removeEnvironmentVariable(\n environmentVariableId: string\n ): Promise {\n const { data } = await this.client.mutate({\n mutation: mutations.removeEnvironmentVariable,\n variables: {\n environmentVariableId,\n },\n });\n\n return data;\n }\n\n async updateDeploymentToProd(\n deploymentId: string\n ): Promise {\n const { data } = await this.client.mutate({\n mutation: mutations.updateDeploymentToProd,\n variables: {\n deploymentId,\n },\n });\n\n return data;\n }\n\n async addProjectFromTemplate(\n organizationSlug: string,\n data: types.AddProjectFromTemplateInput,\n lrn?: string,\n auctionParams?: types.AuctionParams,\n ): Promise {\n const result = await this.client.mutate({\n mutation: mutations.addProjectFromTemplate,\n variables: {\n organizationSlug,\n data,\n lrn,\n auctionParams\n },\n });\n\n return result.data;\n }\n\n async addProject(\n organizationSlug: string,\n data: types.AddProjectInput,\n lrn?: string,\n auctionParams?: types.AuctionParams,\n ): Promise {\n const result = await this.client.mutate({\n mutation: mutations.addProject,\n variables: {\n organizationSlug,\n data,\n lrn,\n auctionParams\n },\n });\n\n return result.data;\n }\n\n async updateProject(\n projectId: string,\n data: types.UpdateProjectInput\n ): Promise {\n const result = await this.client.mutate({\n mutation: mutations.updateProjectMutation,\n variables: {\n projectId,\n data,\n },\n });\n\n return result.data;\n }\n\n async updateDomain(\n domainId: string,\n data: types.UpdateDomainInput\n ): Promise {\n const result = await this.client.mutate({\n mutation: mutations.updateDomainMutation,\n variables: {\n domainId,\n data,\n },\n });\n\n return result.data;\n }\n\n async redeployToProd(\n deploymentId: string\n ): Promise {\n const { data } = await this.client.mutate({\n mutation: mutations.redeployToProd,\n variables: {\n deploymentId,\n },\n });\n\n return data;\n }\n\n async deleteProject(projectId: string): Promise {\n const { data } = await this.client.mutate({\n mutation: mutations.deleteProject,\n variables: {\n projectId,\n },\n });\n\n return data;\n }\n\n async deleteDomain(domainId: string): Promise {\n const { data } = await this.client.mutate({\n mutation: mutations.deleteDomain,\n variables: {\n domainId,\n },\n });\n\n return data;\n }\n\n async rollbackDeployment(\n projectId: string,\n deploymentId: string\n ): Promise {\n const { data } = await this.client.mutate({\n mutation: mutations.rollbackDeployment,\n variables: {\n projectId,\n deploymentId,\n },\n });\n\n return data;\n }\n\n async deleteDeployment(\n deploymentId: string\n ): Promise {\n const { data } = await this.client.mutate({\n mutation: mutations.deleteDeployment,\n variables: {\n deploymentId,\n },\n });\n\n return data;\n }\n\n async addDomain(\n projectId: string,\n data: types.AddDomainInput\n ): Promise {\n const result = await this.client.mutate({\n mutation: mutations.addDomain,\n variables: {\n projectId,\n data,\n },\n });\n\n return result.data;\n }\n\n async getDomains(\n projectId: string,\n filter?: types.FilterDomainInput\n ): Promise {\n const { data } = await this.client.query({\n query: queries.getDomains,\n variables: {\n projectId,\n filter,\n },\n });\n\n return data;\n }\n\n async authenticateGitHub(\n code: string\n ): Promise {\n const { data } = await this.client.mutate({\n mutation: mutations.authenticateGitHub,\n variables: {\n code,\n },\n });\n\n return data;\n }\n\n async unauthenticateGithub(): Promise {\n const { data } = await this.client.mutate({\n mutation: mutations.unauthenticateGitHub,\n });\n\n return data;\n }\n\n async getAuctionData(auctionId: string): Promise {\n const { data } = await this.client.query({\n query: queries.getAuctionData,\n variables: {\n auctionId,\n },\n });\n\n return data.getAuctionData;\n }\n}\n","import { gql } from '@apollo/client';\n\nexport const getUser = gql`\nquery {\n user {\n id\n name\n email\n createdAt\n updatedAt\n gitHubToken\n }\n}\n`;\n\nexport const getProject = gql`\nquery ($projectId: String!) {\n project(projectId: $projectId) {\n createdAt\n description\n id\n name\n template\n updatedAt\n prodBranch\n auctionId\n deployerLrns\n framework\n repository\n webhooks\n icon\n baseDomains\n organization {\n id\n name\n }\n owner {\n id\n name\n email\n }\n deployments {\n id\n branch\n isCurrent\n baseDomain\n status\n updatedAt\n commitHash\n createdAt\n environment\n domain {\n status\n branch\n createdAt\n updatedAt\n id\n name\n }\n createdBy {\n id\n name\n }\n }\n }\n}\n`;\n\nexport const getProjectsInOrganization = gql`\nquery ($organizationSlug: String!) {\n projectsInOrganization(organizationSlug: $organizationSlug) {\n id\n name\n createdAt\n description\n framework\n auctionId\n deployerLrns\n prodBranch\n webhooks\n repository\n updatedAt\n icon\n baseDomains\n deployments {\n id\n branch\n isCurrent\n baseDomain\n status\n updatedAt\n commitHash\n commitMessage\n createdAt\n environment\n domain {\n status\n branch\n createdAt\n updatedAt\n id\n name\n }\n }\n }\n}\n`;\n\nexport const getOrganizations = gql`\nquery {\n organizations {\n id\n name\n slug\n createdAt\n updatedAt\n }\n}\n`;\n\nexport const getDeployments = gql`\nquery ($projectId: String!) {\n deployments(projectId: $projectId) {\n id\n domain{\n branch\n createdAt\n id\n name\n status\n updatedAt\n }\n branch\n commitHash\n commitMessage\n url\n deployerLrn\n environment\n isCurrent\n baseDomain\n status\n createdAt\n updatedAt\n createdBy {\n id\n name\n email\n }\n }\n}\n`;\n\nexport const getEnvironmentVariables = gql`\nquery ($projectId: String!) {\n environmentVariables(projectId: $projectId) {\n createdAt\n environment\n id\n key\n updatedAt\n value\n }\n}\n`;\n\nexport const getProjectMembers = gql`\nquery ($projectId: String!) {\n projectMembers(projectId: $projectId) {\n id\n member {\n id\n name\n email\n isVerified\n }\n isPending\n createdAt\n updatedAt\n permissions\n }\n}\n`;\n\nexport const searchProjects = gql`\nquery ($searchText: String!) {\n searchProjects(searchText: $searchText) {\n id\n name\n prodBranch\n repository\n createdAt\n description\n framework\n auctionId\n deployerLrns\n prodBranch\n webhooks\n updatedAt\n template\n repository\n organization {\n id\n name\n slug\n createdAt\n updatedAt\n }\n }\n}\n`;\n\nexport const getDomains = gql`\nquery ($projectId: String!, $filter: FilterDomainsInput) {\n domains(projectId: $projectId, filter: $filter) {\n branch\n createdAt\n redirectTo {\n id\n name\n branch\n status\n }\n id\n name\n status\n updatedAt\n }\n}\n`;\n\nexport const getAuctionData = gql`\nquery ($auctionId: String!) {\n getAuctionData(auctionId: $auctionId){\n id\n kind\n status\n ownerAddress\n createTime\n commitsEndTime\n revealsEndTime\n commitFee {\n type\n quantity\n }\n revealFee {\n type\n quantity\n }\n minimumBid {\n type\n quantity\n }\n winnerAddresses\n winnerBids {\n type\n quantity\n }\n winnerPrice {\n type\n quantity\n }\n maxPrice {\n type\n quantity\n }\n numProviders\n fundsReleased\n bids {\n bidderAddress\n status\n commitHash\n commitTime\n revealTime\n commitFee {\n type\n quantity\n }\n revealFee {\n type\n quantity\n }\n bidAmount {\n type\n quantity\n }\n }\n }\n}\n`;\n","import { gql } from \"@apollo/client\";\n\nexport const removeProjectMember = gql`\n mutation ($projectMemberId: String!) {\n removeProjectMember(projectMemberId: $projectMemberId)\n }\n`;\n\nexport const updateProjectMember = gql`\n mutation ($projectMemberId: String!, $data: UpdateProjectMemberInput) {\n updateProjectMember(projectMemberId: $projectMemberId, data: $data)\n }\n`;\n\nexport const addProjectMember = gql`\n mutation ($projectId: String!, $data: AddProjectMemberInput) {\n addProjectMember(projectId: $projectId, data: $data)\n }\n`;\n\nexport const addEnvironmentVariables = gql`\n mutation ($projectId: String!, $data: [AddEnvironmentVariableInput!]) {\n addEnvironmentVariables(projectId: $projectId, data: $data)\n }\n`;\n\nexport const updateEnvironmentVariable = gql`\n mutation (\n $environmentVariableId: String!\n $data: UpdateEnvironmentVariableInput!\n ) {\n updateEnvironmentVariable(\n environmentVariableId: $environmentVariableId\n data: $data\n )\n }\n`;\n\nexport const removeEnvironmentVariable = gql`\n mutation ($environmentVariableId: String!) {\n removeEnvironmentVariable(environmentVariableId: $environmentVariableId)\n }\n`;\n\nexport const updateDeploymentToProd = gql`\n mutation ($deploymentId: String!) {\n updateDeploymentToProd(deploymentId: $deploymentId)\n }\n`;\n\nexport const addProjectFromTemplate = gql`\n mutation ($organizationSlug: String!, $data: AddProjectFromTemplateInput, $lrn: String, $auctionParams: AuctionParams) {\n addProjectFromTemplate(organizationSlug: $organizationSlug, data: $data, lrn: $lrn, auctionParams: $auctionParams) {\n id\n }\n }\n`;\n\nexport const addProject = gql`\n mutation ($organizationSlug: String!, $data: AddProjectInput!, $lrn: String, $auctionParams: Auctionparams) {\n addProject(organizationSlug: $organizationSlug, data: $data, lrn: $lrn, auctionParams: $auctionParams) {\n id\n }\n }\n`;\n\nexport const updateProjectMutation = gql`\n mutation ($projectId: String!, $data: UpdateProjectInput) {\n updateProject(projectId: $projectId, data: $data)\n }\n`;\n\nexport const updateDomainMutation = gql`\n mutation ($domainId: String!, $data: UpdateDomainInput!) {\n updateDomain(domainId: $domainId, data: $data)\n }\n`;\n\nexport const redeployToProd = gql`\n mutation ($deploymentId: String!) {\n redeployToProd(deploymentId: $deploymentId)\n }\n`;\n\nexport const deleteProject = gql`\n mutation ($projectId: String!) {\n deleteProject(projectId: $projectId)\n }\n`;\n\nexport const deleteDomain = gql`\n mutation ($domainId: String!) {\n deleteDomain(domainId: $domainId)\n }\n`;\n\nexport const rollbackDeployment = gql`\n mutation ($projectId: String!, $deploymentId: String!) {\n rollbackDeployment(projectId: $projectId, deploymentId: $deploymentId)\n }\n`;\n\nexport const deleteDeployment = gql`\n mutation ($deploymentId: String!) {\n deleteDeployment(deploymentId: $deploymentId)\n }\n`;\n\nexport const addDomain = gql`\n mutation ($projectId: String!, $data: AddDomainInput!) {\n addDomain(projectId: $projectId, data: $data)\n }\n`;\n\nexport const authenticateGitHub = gql`\n mutation ($code: String!) {\n authenticateGitHub(code: $code) {\n token\n }\n }\n`;\n\nexport const unauthenticateGitHub = gql`\n mutation {\n unauthenticateGitHub\n }\n`;\n","import { addProjectFromTemplate } from \"./mutations\";\n// Note: equivalent to types present in GQL schema\n\nexport enum Role {\n Owner = \"Owner\",\n Maintainer = \"Maintainer\",\n Reader = \"Reader\",\n}\n\nexport enum Permission {\n View = \"View\",\n Edit = \"Edit\",\n}\n\nexport enum Environment {\n Production = \"Production\",\n Preview = \"Preview\",\n Development = \"Development\",\n}\n\nexport enum DeploymentStatus {\n Building = \"Building\",\n Ready = \"Ready\",\n Error = \"Error\",\n Deleting = \"Deleting\",\n}\n\nexport enum AuctionStatus {\n AuctionStatusCommitPhase = \"commit\",\n AuctionStatusRevealPhase = \"reveal\",\n AuctionStatusExpired = \"expired\",\n AuctionStatusCompleted = \"completed\",\n}\n\nexport type Bid = {\n auctionId: string;\n bidderAddress: string;\n status: string;\n commitHash: string;\n commitTime?: Date;\n commitFee?: string;\n revealTime?: Date;\n revealFee?: string;\n bidAmount?: string;\n}\n\nexport type Auction = {\n id: string;\n kind: string;\n status: string;\n ownerAddress: string;\n createTime?: Date;\n commitsEndTime?: Date;\n revealsEndTime?: Date;\n commitFee?: string;\n revealFee?: string;\n minimumBid?: string;\n winnerAddresses: string[];\n winnerBids?: string[];\n winnerPrice?: string;\n maxPrice?: string;\n numProviders: number;\n fundsReleased: boolean;\n bids: Bid[];\n}\n\nexport enum DomainStatus {\n Live = \"Live\",\n Pending = \"Pending\",\n}\n\nexport type EnvironmentVariable = {\n id: string;\n environment: Environment;\n key: string;\n value: string;\n createdAt: string;\n updatedAt: string;\n};\n\nexport type Domain = {\n id: string;\n branch: string;\n name: string;\n status: DomainStatus;\n redirectTo: Domain | null;\n createdAt: string;\n updatedAt: string;\n};\n\nexport type User = {\n id: string;\n name: string | null;\n email: string;\n isVerified: boolean;\n createdAt: string;\n updatedAt: string;\n gitHubToken: string | null;\n};\n\nexport type Deployment = {\n id: string;\n domain: Domain;\n branch: string;\n commitHash: string;\n commitMessage: string;\n url?: string;\n deployerLrn: string;\n environment: Environment;\n isCurrent: boolean;\n baseDomain?: string;\n status: DeploymentStatus;\n createdBy: User;\n createdAt: string;\n updatedAt: string;\n};\n\nexport type OrganizationMember = {\n id: string;\n member: User;\n role: Role;\n createdAt: string;\n updatedAt: string;\n};\n\nexport type ProjectMember = {\n id: string;\n member: User;\n permissions: Permission[];\n isPending: boolean;\n createdAt: string;\n updatedAt: string;\n};\n\nexport type OrganizationProject = {\n id: string;\n owner: User;\n deployments: Deployment[];\n name: string;\n repository: string;\n prodBranch: string;\n description: string;\n template: string;\n framework: string;\n webhooks: string[];\n members: ProjectMember[];\n environmentVariables: EnvironmentVariable[];\n createdAt: string;\n updatedAt: string;\n};\n\nexport type Organization = {\n id: string;\n name: string;\n slug: string;\n projects: OrganizationProject[];\n createdAt: string;\n updatedAt: string;\n members: OrganizationMember[];\n};\n\nexport type Project = {\n id: string;\n owner: User;\n deployments: Deployment[];\n name: string;\n repository: string;\n prodBranch: string;\n description: string;\n template: string;\n framework: string;\n deployerLrns: string[];\n auctionId: string;\n webhooks: string[];\n members: ProjectMember[];\n environmentVariables: EnvironmentVariable[];\n createdAt: string;\n updatedAt: string;\n organization: Organization;\n icon: string;\n baseDomains?: string[] | null;\n};\n\nexport type GetProjectMembersResponse = {\n projectMembers: ProjectMember[];\n};\n\nexport type AddProjectMemberResponse = {\n addProjectMember: boolean;\n};\n\nexport type RemoveProjectMemberResponse = {\n removeProjectMember: boolean;\n};\n\nexport type UpdateProjectMemberResponse = {\n updateProjectMember: boolean;\n};\n\nexport type GetDeploymentsResponse = {\n deployments: Deployment[];\n};\n\nexport type GetEnvironmentVariablesResponse = {\n environmentVariables: EnvironmentVariable[];\n};\n\nexport type GetOrganizationsResponse = {\n organizations: Organization[];\n};\n\nexport type GetUserResponse = {\n user: User;\n};\n\nexport type GetProjectResponse = {\n project: Project | null;\n};\n\nexport type GetProjectsInOrganizationResponse = {\n projectsInOrganization: Project[];\n};\n\nexport type GetDomainsResponse = {\n domains: Domain[];\n};\n\nexport type SearchProjectsResponse = {\n searchProjects: Project[];\n};\n\nexport type AddEnvironmentVariablesResponse = {\n addEnvironmentVariables: boolean;\n};\n\nexport type AddEnvironmentVariableInput = {\n environments: string[];\n key: string;\n value: string;\n};\n\nexport type UpdateEnvironmentVariableInput = {\n key: string;\n value: string;\n};\n\nexport type UpdateProjectMemberInput = {\n permissions: Permission[];\n};\n\nexport type AddProjectMemberInput = {\n email: string;\n permissions: Permission[];\n};\n\nexport type UpdateEnvironmentVariableResponse = {\n updateEnvironmentVariable: boolean;\n};\n\nexport type RemoveEnvironmentVariableResponse = {\n removeEnvironmentVariable: boolean;\n};\n\nexport type UpdateDeploymentToProdResponse = {\n updateDeploymentToProd: boolean;\n};\n\nexport type AddProjectFromTemplateResponse = {\n addProjectFromTemplate: Project;\n};\n\nexport type AddProjectResponse = {\n addProject: Project;\n};\n\nexport type UpdateProjectResponse = {\n updateProject: boolean;\n};\n\nexport type UpdateDomainResponse = {\n updateDomain: boolean;\n};\n\nexport type DeleteProjectResponse = {\n deleteProject: boolean;\n};\n\nexport type DeleteDomainResponse = {\n deleteDomain: boolean;\n};\n\nexport type AddProjectFromTemplateInput = {\n templateOwner: string;\n templateRepo: string;\n owner: string;\n name: string;\n isPrivate: boolean;\n};\n\nexport type AddProjectInput = {\n name: string;\n repository: string;\n prodBranch: string;\n template?: string;\n};\n\nexport type UpdateProjectInput = {\n name?: string;\n description?: string;\n prodBranch?: string;\n webhooks?: string[];\n organizationId?: string;\n};\n\nexport type UpdateDomainInput = {\n name?: string;\n branch?: string;\n redirectToId?: string | null;\n};\n\nexport type RedeployToProdResponse = {\n redeployToProd: boolean;\n};\n\nexport type RollbackDeploymentResponse = {\n rollbackDeployment: boolean;\n};\n\nexport type DeleteDeploymentResponse = {\n deleteDeployment: boolean;\n};\n\nexport type AddDomainInput = {\n name: string;\n};\n\nexport type FilterDomainInput = {\n branch?: string;\n status?: DomainStatus;\n};\n\nexport type AddDomainResponse = {\n addDomain: true;\n};\n\nexport type AuthenticateGitHubResponse = {\n authenticateGitHub: {\n token: string;\n };\n};\n\nexport type UnauthenticateGitHubResponse = {\n unauthenticateGitHub: boolean;\n};\n\nexport type AuctionParams = {\n maxPrice: string;\n numProviders: number;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,iBAKO;;;ACLP,oBAAoB;AAEb,IAAM,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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L,EAAAA,MAAA,WAAQ;AACR,EAAAA,MAAA,gBAAa;AACb,EAAAA,MAAA,YAAS;AAHC,SAAAA;AAAA,GAAA;AAML,IAAK,aAAL,kBAAKC,gBAAL;AACL,EAAAA,YAAA,UAAO;AACP,EAAAA,YAAA,UAAO;AAFG,SAAAA;AAAA,GAAA;AAKL,IAAK,cAAL,kBAAKC,iBAAL;AACL,EAAAA,aAAA,gBAAa;AACb,EAAAA,aAAA,aAAU;AACV,EAAAA,aAAA,iBAAc;AAHJ,SAAAA;AAAA,GAAA;AAML,IAAK,mBAAL,kBAAKC,sBAAL;AACL,EAAAA,kBAAA,cAAW;AACX,EAAAA,kBAAA,WAAQ;AACR,EAAAA,kBAAA,WAAQ;AACR,EAAAA,kBAAA,cAAW;AAJD,SAAAA;AAAA,GAAA;AAOL,IAAK,gBAAL,kBAAKC,mBAAL;AACL,EAAAA,eAAA,8BAA2B;AAC3B,EAAAA,eAAA,8BAA2B;AAC3B,EAAAA,eAAA,0BAAuB;AACvB,EAAAA,eAAA,4BAAyB;AAJf,SAAAA;AAAA,GAAA;AAuCL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,UAAO;AACP,EAAAA,cAAA,aAAU;AAFA,SAAAA;AAAA,GAAA;","names":["import_client","import_client","Role","Permission","Environment","DeploymentStatus","AuctionStatus","DomainStatus"]} \ No newline at end of file diff --git a/packages/gql-client/dist/index.mjs b/packages/gql-client/dist/index.mjs deleted file mode 100644 index 6ff9b7a6..00000000 --- a/packages/gql-client/dist/index.mjs +++ /dev/null @@ -1,812 +0,0 @@ -var __async = (__this, __arguments, generator) => { - return new Promise((resolve, reject) => { - var fulfilled = (value) => { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - }; - var rejected = (value) => { - try { - step(generator.throw(value)); - } catch (e) { - reject(e); - } - }; - var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); - step((generator = generator.apply(__this, __arguments)).next()); - }); -}; - -// src/client.ts -import { - ApolloClient, - InMemoryCache -} from "@apollo/client"; - -// src/queries.ts -import { gql } from "@apollo/client"; -var getUser = gql` -query { - user { - id - name - email - createdAt - updatedAt - gitHubToken - } -} -`; -var getProject = gql` -query ($projectId: String!) { - project(projectId: $projectId) { - createdAt - description - id - name - template - updatedAt - prodBranch - auctionId - deployerLrns - framework - repository - webhooks - icon - baseDomains - organization { - id - name - } - owner { - id - name - email - } - deployments { - id - branch - isCurrent - baseDomain - status - updatedAt - commitHash - createdAt - environment - domain { - status - branch - createdAt - updatedAt - id - name - } - createdBy { - id - name - } - } - } -} -`; -var getProjectsInOrganization = gql` -query ($organizationSlug: String!) { - projectsInOrganization(organizationSlug: $organizationSlug) { - id - name - createdAt - description - framework - auctionId - deployerLrns - prodBranch - webhooks - repository - updatedAt - icon - baseDomains - deployments { - id - branch - isCurrent - baseDomain - status - updatedAt - commitHash - commitMessage - createdAt - environment - domain { - status - branch - createdAt - updatedAt - id - name - } - } - } -} -`; -var getOrganizations = gql` -query { - organizations { - id - name - slug - createdAt - updatedAt - } -} -`; -var getDeployments = gql` -query ($projectId: String!) { - deployments(projectId: $projectId) { - id - domain{ - branch - createdAt - id - name - status - updatedAt - } - branch - commitHash - commitMessage - url - deployerLrn - environment - isCurrent - baseDomain - status - createdAt - updatedAt - createdBy { - id - name - email - } - } -} -`; -var getEnvironmentVariables = gql` -query ($projectId: String!) { - environmentVariables(projectId: $projectId) { - createdAt - environment - id - key - updatedAt - value - } -} -`; -var getProjectMembers = gql` -query ($projectId: String!) { - projectMembers(projectId: $projectId) { - id - member { - id - name - email - isVerified - } - isPending - createdAt - updatedAt - permissions - } -} -`; -var searchProjects = gql` -query ($searchText: String!) { - searchProjects(searchText: $searchText) { - id - name - prodBranch - repository - createdAt - description - framework - auctionId - deployerLrns - prodBranch - webhooks - updatedAt - template - repository - organization { - id - name - slug - createdAt - updatedAt - } - } -} -`; -var getDomains = gql` -query ($projectId: String!, $filter: FilterDomainsInput) { - domains(projectId: $projectId, filter: $filter) { - branch - createdAt - redirectTo { - id - name - branch - status - } - id - name - status - updatedAt - } -} -`; -var getAuctionData = gql` -query ($auctionId: String!) { - getAuctionData(auctionId: $auctionId){ - id - kind - status - ownerAddress - createTime - commitsEndTime - revealsEndTime - commitFee { - type - quantity - } - revealFee { - type - quantity - } - minimumBid { - type - quantity - } - winnerAddresses - winnerBids { - type - quantity - } - winnerPrice { - type - quantity - } - maxPrice { - type - quantity - } - numProviders - fundsReleased - bids { - bidderAddress - status - commitHash - commitTime - revealTime - commitFee { - type - quantity - } - revealFee { - type - quantity - } - bidAmount { - type - quantity - } - } - } -} -`; - -// src/mutations.ts -import { gql as gql2 } from "@apollo/client"; -var removeProjectMember = gql2` - mutation ($projectMemberId: String!) { - removeProjectMember(projectMemberId: $projectMemberId) - } -`; -var updateProjectMember = gql2` - mutation ($projectMemberId: String!, $data: UpdateProjectMemberInput) { - updateProjectMember(projectMemberId: $projectMemberId, data: $data) - } -`; -var addProjectMember = gql2` - mutation ($projectId: String!, $data: AddProjectMemberInput) { - addProjectMember(projectId: $projectId, data: $data) - } -`; -var addEnvironmentVariables = gql2` - mutation ($projectId: String!, $data: [AddEnvironmentVariableInput!]) { - addEnvironmentVariables(projectId: $projectId, data: $data) - } -`; -var updateEnvironmentVariable = gql2` - mutation ( - $environmentVariableId: String! - $data: UpdateEnvironmentVariableInput! - ) { - updateEnvironmentVariable( - environmentVariableId: $environmentVariableId - data: $data - ) - } -`; -var removeEnvironmentVariable = gql2` - mutation ($environmentVariableId: String!) { - removeEnvironmentVariable(environmentVariableId: $environmentVariableId) - } -`; -var updateDeploymentToProd = gql2` - mutation ($deploymentId: String!) { - updateDeploymentToProd(deploymentId: $deploymentId) - } -`; -var addProjectFromTemplate = gql2` - mutation ($organizationSlug: String!, $data: AddProjectFromTemplateInput, $lrn: String, $auctionParams: AuctionParams) { - addProjectFromTemplate(organizationSlug: $organizationSlug, data: $data, lrn: $lrn, auctionParams: $auctionParams) { - id - } - } -`; -var addProject = gql2` - mutation ($organizationSlug: String!, $data: AddProjectInput!, $lrn: String, $auctionParams: Auctionparams) { - addProject(organizationSlug: $organizationSlug, data: $data, lrn: $lrn, auctionParams: $auctionParams) { - id - } - } -`; -var updateProjectMutation = gql2` - mutation ($projectId: String!, $data: UpdateProjectInput) { - updateProject(projectId: $projectId, data: $data) - } -`; -var updateDomainMutation = gql2` - mutation ($domainId: String!, $data: UpdateDomainInput!) { - updateDomain(domainId: $domainId, data: $data) - } -`; -var redeployToProd = gql2` - mutation ($deploymentId: String!) { - redeployToProd(deploymentId: $deploymentId) - } -`; -var deleteProject = gql2` - mutation ($projectId: String!) { - deleteProject(projectId: $projectId) - } -`; -var deleteDomain = gql2` - mutation ($domainId: String!) { - deleteDomain(domainId: $domainId) - } -`; -var rollbackDeployment = gql2` - mutation ($projectId: String!, $deploymentId: String!) { - rollbackDeployment(projectId: $projectId, deploymentId: $deploymentId) - } -`; -var deleteDeployment = gql2` - mutation ($deploymentId: String!) { - deleteDeployment(deploymentId: $deploymentId) - } -`; -var addDomain = gql2` - mutation ($projectId: String!, $data: AddDomainInput!) { - addDomain(projectId: $projectId, data: $data) - } -`; -var authenticateGitHub = gql2` - mutation ($code: String!) { - authenticateGitHub(code: $code) { - token - } - } -`; -var unauthenticateGitHub = gql2` - mutation { - unauthenticateGitHub - } -`; - -// src/client.ts -var defaultOptions = { - watchQuery: { - fetchPolicy: "no-cache", - errorPolicy: "ignore" - }, - query: { - fetchPolicy: "no-cache", - errorPolicy: "all" - } -}; -var GQLClient = class { - constructor(config) { - this.client = new ApolloClient({ - uri: config.gqlEndpoint, - cache: new InMemoryCache(), - defaultOptions, - credentials: "include" - }); - } - getUser() { - return __async(this, null, function* () { - const { data } = yield this.client.query({ - query: getUser - }); - return data; - }); - } - getProject(projectId) { - return __async(this, null, function* () { - const { data } = yield this.client.query({ - query: getProject, - variables: { - projectId - } - }); - return data; - }); - } - getProjectsInOrganization(organizationSlug) { - return __async(this, null, function* () { - const { data } = yield this.client.query({ - query: getProjectsInOrganization, - variables: { - organizationSlug - } - }); - return data; - }); - } - getOrganizations() { - return __async(this, null, function* () { - const { data } = yield this.client.query({ - query: getOrganizations - }); - return data; - }); - } - getDeployments(projectId) { - return __async(this, null, function* () { - const { data } = yield this.client.query({ - query: getDeployments, - variables: { - projectId - } - }); - return data; - }); - } - getEnvironmentVariables(projectId) { - return __async(this, null, function* () { - const { data } = yield this.client.query({ - query: getEnvironmentVariables, - variables: { - projectId - } - }); - return data; - }); - } - getProjectMembers(projectId) { - return __async(this, null, function* () { - const result = yield this.client.query({ - query: getProjectMembers, - variables: { - projectId - } - }); - return result.data; - }); - } - addProjectMember(projectId, data) { - return __async(this, null, function* () { - const result = yield this.client.mutate({ - mutation: addProjectMember, - variables: { - projectId, - data - } - }); - return result.data; - }); - } - updateProjectMember(projectMemberId, data) { - return __async(this, null, function* () { - const result = yield this.client.mutate({ - mutation: updateProjectMember, - variables: { - projectMemberId, - data - } - }); - return result.data; - }); - } - removeProjectMember(projectMemberId) { - return __async(this, null, function* () { - const result = yield this.client.mutate({ - mutation: removeProjectMember, - variables: { - projectMemberId - } - }); - return result.data; - }); - } - searchProjects(searchText) { - return __async(this, null, function* () { - const { data } = yield this.client.query({ - query: searchProjects, - variables: { - searchText - } - }); - return data; - }); - } - addEnvironmentVariables(projectId, data) { - return __async(this, null, function* () { - const result = yield this.client.mutate({ - mutation: addEnvironmentVariables, - variables: { - projectId, - data - } - }); - return result.data; - }); - } - updateEnvironmentVariable(environmentVariableId, data) { - return __async(this, null, function* () { - const result = yield this.client.mutate({ - mutation: updateEnvironmentVariable, - variables: { - environmentVariableId, - data - } - }); - return result.data; - }); - } - removeEnvironmentVariable(environmentVariableId) { - return __async(this, null, function* () { - const { data } = yield this.client.mutate({ - mutation: removeEnvironmentVariable, - variables: { - environmentVariableId - } - }); - return data; - }); - } - updateDeploymentToProd(deploymentId) { - return __async(this, null, function* () { - const { data } = yield this.client.mutate({ - mutation: updateDeploymentToProd, - variables: { - deploymentId - } - }); - return data; - }); - } - addProjectFromTemplate(organizationSlug, data, lrn, auctionParams) { - return __async(this, null, function* () { - const result = yield this.client.mutate({ - mutation: addProjectFromTemplate, - variables: { - organizationSlug, - data, - lrn, - auctionParams - } - }); - return result.data; - }); - } - addProject(organizationSlug, data, lrn, auctionParams) { - return __async(this, null, function* () { - const result = yield this.client.mutate({ - mutation: addProject, - variables: { - organizationSlug, - data, - lrn, - auctionParams - } - }); - return result.data; - }); - } - updateProject(projectId, data) { - return __async(this, null, function* () { - const result = yield this.client.mutate({ - mutation: updateProjectMutation, - variables: { - projectId, - data - } - }); - return result.data; - }); - } - updateDomain(domainId, data) { - return __async(this, null, function* () { - const result = yield this.client.mutate({ - mutation: updateDomainMutation, - variables: { - domainId, - data - } - }); - return result.data; - }); - } - redeployToProd(deploymentId) { - return __async(this, null, function* () { - const { data } = yield this.client.mutate({ - mutation: redeployToProd, - variables: { - deploymentId - } - }); - return data; - }); - } - deleteProject(projectId) { - return __async(this, null, function* () { - const { data } = yield this.client.mutate({ - mutation: deleteProject, - variables: { - projectId - } - }); - return data; - }); - } - deleteDomain(domainId) { - return __async(this, null, function* () { - const { data } = yield this.client.mutate({ - mutation: deleteDomain, - variables: { - domainId - } - }); - return data; - }); - } - rollbackDeployment(projectId, deploymentId) { - return __async(this, null, function* () { - const { data } = yield this.client.mutate({ - mutation: rollbackDeployment, - variables: { - projectId, - deploymentId - } - }); - return data; - }); - } - deleteDeployment(deploymentId) { - return __async(this, null, function* () { - const { data } = yield this.client.mutate({ - mutation: deleteDeployment, - variables: { - deploymentId - } - }); - return data; - }); - } - addDomain(projectId, data) { - return __async(this, null, function* () { - const result = yield this.client.mutate({ - mutation: addDomain, - variables: { - projectId, - data - } - }); - return result.data; - }); - } - getDomains(projectId, filter) { - return __async(this, null, function* () { - const { data } = yield this.client.query({ - query: getDomains, - variables: { - projectId, - filter - } - }); - return data; - }); - } - authenticateGitHub(code) { - return __async(this, null, function* () { - const { data } = yield this.client.mutate({ - mutation: authenticateGitHub, - variables: { - code - } - }); - return data; - }); - } - unauthenticateGithub() { - return __async(this, null, function* () { - const { data } = yield this.client.mutate({ - mutation: unauthenticateGitHub - }); - return data; - }); - } - getAuctionData(auctionId) { - return __async(this, null, function* () { - const { data } = yield this.client.query({ - query: getAuctionData, - variables: { - auctionId - } - }); - return data.getAuctionData; - }); - } -}; - -// src/types.ts -var Role = /* @__PURE__ */ ((Role2) => { - Role2["Owner"] = "Owner"; - Role2["Maintainer"] = "Maintainer"; - Role2["Reader"] = "Reader"; - return Role2; -})(Role || {}); -var Permission = /* @__PURE__ */ ((Permission2) => { - Permission2["View"] = "View"; - Permission2["Edit"] = "Edit"; - return Permission2; -})(Permission || {}); -var Environment = /* @__PURE__ */ ((Environment2) => { - Environment2["Production"] = "Production"; - Environment2["Preview"] = "Preview"; - Environment2["Development"] = "Development"; - return Environment2; -})(Environment || {}); -var DeploymentStatus = /* @__PURE__ */ ((DeploymentStatus2) => { - DeploymentStatus2["Building"] = "Building"; - DeploymentStatus2["Ready"] = "Ready"; - DeploymentStatus2["Error"] = "Error"; - DeploymentStatus2["Deleting"] = "Deleting"; - return DeploymentStatus2; -})(DeploymentStatus || {}); -var AuctionStatus = /* @__PURE__ */ ((AuctionStatus2) => { - AuctionStatus2["AuctionStatusCommitPhase"] = "commit"; - AuctionStatus2["AuctionStatusRevealPhase"] = "reveal"; - AuctionStatus2["AuctionStatusExpired"] = "expired"; - AuctionStatus2["AuctionStatusCompleted"] = "completed"; - return AuctionStatus2; -})(AuctionStatus || {}); -var DomainStatus = /* @__PURE__ */ ((DomainStatus2) => { - DomainStatus2["Live"] = "Live"; - DomainStatus2["Pending"] = "Pending"; - return DomainStatus2; -})(DomainStatus || {}); -export { - AuctionStatus, - DeploymentStatus, - DomainStatus, - Environment, - GQLClient, - Permission, - Role -}; -//# sourceMappingURL=index.mjs.map \ No newline at end of file diff --git a/packages/gql-client/dist/index.mjs.map b/packages/gql-client/dist/index.mjs.map deleted file mode 100644 index 33f34394..00000000 --- a/packages/gql-client/dist/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/client.ts","../src/queries.ts","../src/mutations.ts","../src/types.ts"],"sourcesContent":["import {\n ApolloClient,\n DefaultOptions,\n InMemoryCache,\n NormalizedCacheObject,\n} from \"@apollo/client\";\n\nimport * as queries from \"./queries\";\nimport * as types from \"./types\";\nimport * as mutations from \"./mutations\";\n\nexport interface GraphQLConfig {\n gqlEndpoint: string;\n}\n\n// TODO: check options\nconst defaultOptions: DefaultOptions = {\n watchQuery: {\n fetchPolicy: \"no-cache\",\n errorPolicy: \"ignore\",\n },\n query: {\n fetchPolicy: \"no-cache\",\n errorPolicy: \"all\",\n },\n};\n\nexport class GQLClient {\n private client: ApolloClient;\n\n constructor(config: GraphQLConfig) {\n this.client = new ApolloClient({\n uri: config.gqlEndpoint,\n cache: new InMemoryCache(),\n defaultOptions,\n credentials: \"include\",\n });\n }\n\n async getUser(): Promise {\n const { data } = await this.client.query({\n query: queries.getUser,\n });\n\n return data;\n }\n\n async getProject(projectId: string): Promise {\n const { data } = await this.client.query({\n query: queries.getProject,\n variables: {\n projectId,\n },\n });\n\n return data;\n }\n\n async getProjectsInOrganization(\n organizationSlug: string\n ): Promise {\n const { data } = await this.client.query({\n query: queries.getProjectsInOrganization,\n variables: {\n organizationSlug,\n },\n });\n\n return data;\n }\n\n async getOrganizations(): Promise {\n const { data } = await this.client.query({\n query: queries.getOrganizations,\n });\n\n return data;\n }\n\n async getDeployments(\n projectId: string\n ): Promise {\n const { data } = await this.client.query({\n query: queries.getDeployments,\n variables: {\n projectId,\n },\n });\n\n return data;\n }\n\n async getEnvironmentVariables(\n projectId: string\n ): Promise {\n const { data } = await this.client.query({\n query: queries.getEnvironmentVariables,\n variables: {\n projectId,\n },\n });\n\n return data;\n }\n\n async getProjectMembers(\n projectId: string\n ): Promise {\n const result = await this.client.query({\n query: queries.getProjectMembers,\n variables: {\n projectId,\n },\n });\n\n return result.data;\n }\n\n async addProjectMember(\n projectId: string,\n data: types.AddProjectMemberInput\n ): Promise {\n const result = await this.client.mutate({\n mutation: mutations.addProjectMember,\n variables: {\n projectId,\n data,\n },\n });\n\n return result.data;\n }\n\n async updateProjectMember(\n projectMemberId: string,\n data: types.UpdateProjectMemberInput\n ): Promise {\n const result = await this.client.mutate({\n mutation: mutations.updateProjectMember,\n variables: {\n projectMemberId,\n data,\n },\n });\n\n return result.data;\n }\n\n async removeProjectMember(\n projectMemberId: string\n ): Promise {\n const result = await this.client.mutate({\n mutation: mutations.removeProjectMember,\n variables: {\n projectMemberId,\n },\n });\n\n return result.data;\n }\n\n async searchProjects(\n searchText: string\n ): Promise {\n const { data } = await this.client.query({\n query: queries.searchProjects,\n variables: {\n searchText,\n },\n });\n\n return data;\n }\n\n async addEnvironmentVariables(\n projectId: string,\n data: types.AddEnvironmentVariableInput[]\n ): Promise {\n const result = await this.client.mutate({\n mutation: mutations.addEnvironmentVariables,\n variables: {\n projectId,\n data,\n },\n });\n\n return result.data;\n }\n\n async updateEnvironmentVariable(\n environmentVariableId: string,\n data: types.UpdateEnvironmentVariableInput\n ): Promise {\n const result = await this.client.mutate({\n mutation: mutations.updateEnvironmentVariable,\n variables: {\n environmentVariableId,\n data,\n },\n });\n\n return result.data;\n }\n\n async removeEnvironmentVariable(\n environmentVariableId: string\n ): Promise {\n const { data } = await this.client.mutate({\n mutation: mutations.removeEnvironmentVariable,\n variables: {\n environmentVariableId,\n },\n });\n\n return data;\n }\n\n async updateDeploymentToProd(\n deploymentId: string\n ): Promise {\n const { data } = await this.client.mutate({\n mutation: mutations.updateDeploymentToProd,\n variables: {\n deploymentId,\n },\n });\n\n return data;\n }\n\n async addProjectFromTemplate(\n organizationSlug: string,\n data: types.AddProjectFromTemplateInput,\n lrn?: string,\n auctionParams?: types.AuctionParams,\n ): Promise {\n const result = await this.client.mutate({\n mutation: mutations.addProjectFromTemplate,\n variables: {\n organizationSlug,\n data,\n lrn,\n auctionParams\n },\n });\n\n return result.data;\n }\n\n async addProject(\n organizationSlug: string,\n data: types.AddProjectInput,\n lrn?: string,\n auctionParams?: types.AuctionParams,\n ): Promise {\n const result = await this.client.mutate({\n mutation: mutations.addProject,\n variables: {\n organizationSlug,\n data,\n lrn,\n auctionParams\n },\n });\n\n return result.data;\n }\n\n async updateProject(\n projectId: string,\n data: types.UpdateProjectInput\n ): Promise {\n const result = await this.client.mutate({\n mutation: mutations.updateProjectMutation,\n variables: {\n projectId,\n data,\n },\n });\n\n return result.data;\n }\n\n async updateDomain(\n domainId: string,\n data: types.UpdateDomainInput\n ): Promise {\n const result = await this.client.mutate({\n mutation: mutations.updateDomainMutation,\n variables: {\n domainId,\n data,\n },\n });\n\n return result.data;\n }\n\n async redeployToProd(\n deploymentId: string\n ): Promise {\n const { data } = await this.client.mutate({\n mutation: mutations.redeployToProd,\n variables: {\n deploymentId,\n },\n });\n\n return data;\n }\n\n async deleteProject(projectId: string): Promise {\n const { data } = await this.client.mutate({\n mutation: mutations.deleteProject,\n variables: {\n projectId,\n },\n });\n\n return data;\n }\n\n async deleteDomain(domainId: string): Promise {\n const { data } = await this.client.mutate({\n mutation: mutations.deleteDomain,\n variables: {\n domainId,\n },\n });\n\n return data;\n }\n\n async rollbackDeployment(\n projectId: string,\n deploymentId: string\n ): Promise {\n const { data } = await this.client.mutate({\n mutation: mutations.rollbackDeployment,\n variables: {\n projectId,\n deploymentId,\n },\n });\n\n return data;\n }\n\n async deleteDeployment(\n deploymentId: string\n ): Promise {\n const { data } = await this.client.mutate({\n mutation: mutations.deleteDeployment,\n variables: {\n deploymentId,\n },\n });\n\n return data;\n }\n\n async addDomain(\n projectId: string,\n data: types.AddDomainInput\n ): Promise {\n const result = await this.client.mutate({\n mutation: mutations.addDomain,\n variables: {\n projectId,\n data,\n },\n });\n\n return result.data;\n }\n\n async getDomains(\n projectId: string,\n filter?: types.FilterDomainInput\n ): Promise {\n const { data } = await this.client.query({\n query: queries.getDomains,\n variables: {\n projectId,\n filter,\n },\n });\n\n return data;\n }\n\n async authenticateGitHub(\n code: string\n ): Promise {\n const { data } = await this.client.mutate({\n mutation: mutations.authenticateGitHub,\n variables: {\n code,\n },\n });\n\n return data;\n }\n\n async unauthenticateGithub(): Promise {\n const { data } = await this.client.mutate({\n mutation: mutations.unauthenticateGitHub,\n });\n\n return data;\n }\n\n async getAuctionData(auctionId: string): Promise {\n const { data } = await this.client.query({\n query: queries.getAuctionData,\n variables: {\n auctionId,\n },\n });\n\n return data.getAuctionData;\n }\n}\n","import { gql } from '@apollo/client';\n\nexport const getUser = gql`\nquery {\n user {\n id\n name\n email\n createdAt\n updatedAt\n gitHubToken\n }\n}\n`;\n\nexport const getProject = gql`\nquery ($projectId: String!) {\n project(projectId: $projectId) {\n createdAt\n description\n id\n name\n template\n updatedAt\n prodBranch\n auctionId\n deployerLrns\n framework\n repository\n webhooks\n icon\n baseDomains\n organization {\n id\n name\n }\n owner {\n id\n name\n email\n }\n deployments {\n id\n branch\n isCurrent\n baseDomain\n status\n updatedAt\n commitHash\n createdAt\n environment\n domain {\n status\n branch\n createdAt\n updatedAt\n id\n name\n }\n createdBy {\n id\n name\n }\n }\n }\n}\n`;\n\nexport const getProjectsInOrganization = gql`\nquery ($organizationSlug: String!) {\n projectsInOrganization(organizationSlug: $organizationSlug) {\n id\n name\n createdAt\n description\n framework\n auctionId\n deployerLrns\n prodBranch\n webhooks\n repository\n updatedAt\n icon\n baseDomains\n deployments {\n id\n branch\n isCurrent\n baseDomain\n status\n updatedAt\n commitHash\n commitMessage\n createdAt\n environment\n domain {\n status\n branch\n createdAt\n updatedAt\n id\n name\n }\n }\n }\n}\n`;\n\nexport const getOrganizations = gql`\nquery {\n organizations {\n id\n name\n slug\n createdAt\n updatedAt\n }\n}\n`;\n\nexport const getDeployments = gql`\nquery ($projectId: String!) {\n deployments(projectId: $projectId) {\n id\n domain{\n branch\n createdAt\n id\n name\n status\n updatedAt\n }\n branch\n commitHash\n commitMessage\n url\n deployerLrn\n environment\n isCurrent\n baseDomain\n status\n createdAt\n updatedAt\n createdBy {\n id\n name\n email\n }\n }\n}\n`;\n\nexport const getEnvironmentVariables = gql`\nquery ($projectId: String!) {\n environmentVariables(projectId: $projectId) {\n createdAt\n environment\n id\n key\n updatedAt\n value\n }\n}\n`;\n\nexport const getProjectMembers = gql`\nquery ($projectId: String!) {\n projectMembers(projectId: $projectId) {\n id\n member {\n id\n name\n email\n isVerified\n }\n isPending\n createdAt\n updatedAt\n permissions\n }\n}\n`;\n\nexport const searchProjects = gql`\nquery ($searchText: String!) {\n searchProjects(searchText: $searchText) {\n id\n name\n prodBranch\n repository\n createdAt\n description\n framework\n auctionId\n deployerLrns\n prodBranch\n webhooks\n updatedAt\n template\n repository\n organization {\n id\n name\n slug\n createdAt\n updatedAt\n }\n }\n}\n`;\n\nexport const getDomains = gql`\nquery ($projectId: String!, $filter: FilterDomainsInput) {\n domains(projectId: $projectId, filter: $filter) {\n branch\n createdAt\n redirectTo {\n id\n name\n branch\n status\n }\n id\n name\n status\n updatedAt\n }\n}\n`;\n\nexport const getAuctionData = gql`\nquery ($auctionId: String!) {\n getAuctionData(auctionId: $auctionId){\n id\n kind\n status\n ownerAddress\n createTime\n commitsEndTime\n revealsEndTime\n commitFee {\n type\n quantity\n }\n revealFee {\n type\n quantity\n }\n minimumBid {\n type\n quantity\n }\n winnerAddresses\n winnerBids {\n type\n quantity\n }\n winnerPrice {\n type\n quantity\n }\n maxPrice {\n type\n quantity\n }\n numProviders\n fundsReleased\n bids {\n bidderAddress\n status\n commitHash\n commitTime\n revealTime\n commitFee {\n type\n quantity\n }\n revealFee {\n type\n quantity\n }\n bidAmount {\n type\n quantity\n }\n }\n }\n}\n`;\n","import { gql } from \"@apollo/client\";\n\nexport const removeProjectMember = gql`\n mutation ($projectMemberId: String!) {\n removeProjectMember(projectMemberId: $projectMemberId)\n }\n`;\n\nexport const updateProjectMember = gql`\n mutation ($projectMemberId: String!, $data: UpdateProjectMemberInput) {\n updateProjectMember(projectMemberId: $projectMemberId, data: $data)\n }\n`;\n\nexport const addProjectMember = gql`\n mutation ($projectId: String!, $data: AddProjectMemberInput) {\n addProjectMember(projectId: $projectId, data: $data)\n }\n`;\n\nexport const addEnvironmentVariables = gql`\n mutation ($projectId: String!, $data: [AddEnvironmentVariableInput!]) {\n addEnvironmentVariables(projectId: $projectId, data: $data)\n }\n`;\n\nexport const updateEnvironmentVariable = gql`\n mutation (\n $environmentVariableId: String!\n $data: UpdateEnvironmentVariableInput!\n ) {\n updateEnvironmentVariable(\n environmentVariableId: $environmentVariableId\n data: $data\n )\n }\n`;\n\nexport const removeEnvironmentVariable = gql`\n mutation ($environmentVariableId: String!) {\n removeEnvironmentVariable(environmentVariableId: $environmentVariableId)\n }\n`;\n\nexport const updateDeploymentToProd = gql`\n mutation ($deploymentId: String!) {\n updateDeploymentToProd(deploymentId: $deploymentId)\n }\n`;\n\nexport const addProjectFromTemplate = gql`\n mutation ($organizationSlug: String!, $data: AddProjectFromTemplateInput, $lrn: String, $auctionParams: AuctionParams) {\n addProjectFromTemplate(organizationSlug: $organizationSlug, data: $data, lrn: $lrn, auctionParams: $auctionParams) {\n id\n }\n }\n`;\n\nexport const addProject = gql`\n mutation ($organizationSlug: String!, $data: AddProjectInput!, $lrn: String, $auctionParams: Auctionparams) {\n addProject(organizationSlug: $organizationSlug, data: $data, lrn: $lrn, auctionParams: $auctionParams) {\n id\n }\n }\n`;\n\nexport const updateProjectMutation = gql`\n mutation ($projectId: String!, $data: UpdateProjectInput) {\n updateProject(projectId: $projectId, data: $data)\n }\n`;\n\nexport const updateDomainMutation = gql`\n mutation ($domainId: String!, $data: UpdateDomainInput!) {\n updateDomain(domainId: $domainId, data: $data)\n }\n`;\n\nexport const redeployToProd = gql`\n mutation ($deploymentId: String!) {\n redeployToProd(deploymentId: $deploymentId)\n }\n`;\n\nexport const deleteProject = gql`\n mutation ($projectId: String!) {\n deleteProject(projectId: $projectId)\n }\n`;\n\nexport const deleteDomain = gql`\n mutation ($domainId: String!) {\n deleteDomain(domainId: $domainId)\n }\n`;\n\nexport const rollbackDeployment = gql`\n mutation ($projectId: String!, $deploymentId: String!) {\n rollbackDeployment(projectId: $projectId, deploymentId: $deploymentId)\n }\n`;\n\nexport const deleteDeployment = gql`\n mutation ($deploymentId: String!) {\n deleteDeployment(deploymentId: $deploymentId)\n }\n`;\n\nexport const addDomain = gql`\n mutation ($projectId: String!, $data: AddDomainInput!) {\n addDomain(projectId: $projectId, data: $data)\n }\n`;\n\nexport const authenticateGitHub = gql`\n mutation ($code: String!) {\n authenticateGitHub(code: $code) {\n token\n }\n }\n`;\n\nexport const unauthenticateGitHub = gql`\n mutation {\n unauthenticateGitHub\n }\n`;\n","import { addProjectFromTemplate } from \"./mutations\";\n// Note: equivalent to types present in GQL schema\n\nexport enum Role {\n Owner = \"Owner\",\n Maintainer = \"Maintainer\",\n Reader = \"Reader\",\n}\n\nexport enum Permission {\n View = \"View\",\n Edit = \"Edit\",\n}\n\nexport enum Environment {\n Production = \"Production\",\n Preview = \"Preview\",\n Development = \"Development\",\n}\n\nexport enum DeploymentStatus {\n Building = \"Building\",\n Ready = \"Ready\",\n Error = \"Error\",\n Deleting = \"Deleting\",\n}\n\nexport enum AuctionStatus {\n AuctionStatusCommitPhase = \"commit\",\n AuctionStatusRevealPhase = \"reveal\",\n AuctionStatusExpired = \"expired\",\n AuctionStatusCompleted = \"completed\",\n}\n\nexport type Bid = {\n auctionId: string;\n bidderAddress: string;\n status: string;\n commitHash: string;\n commitTime?: Date;\n commitFee?: string;\n revealTime?: Date;\n revealFee?: string;\n bidAmount?: string;\n}\n\nexport type Auction = {\n id: string;\n kind: string;\n status: string;\n ownerAddress: string;\n createTime?: Date;\n commitsEndTime?: Date;\n revealsEndTime?: Date;\n commitFee?: string;\n revealFee?: string;\n minimumBid?: string;\n winnerAddresses: string[];\n winnerBids?: string[];\n winnerPrice?: string;\n maxPrice?: string;\n numProviders: number;\n fundsReleased: boolean;\n bids: Bid[];\n}\n\nexport enum DomainStatus {\n Live = \"Live\",\n Pending = \"Pending\",\n}\n\nexport type EnvironmentVariable = {\n id: string;\n environment: Environment;\n key: string;\n value: string;\n createdAt: string;\n updatedAt: string;\n};\n\nexport type Domain = {\n id: string;\n branch: string;\n name: string;\n status: DomainStatus;\n redirectTo: Domain | null;\n createdAt: string;\n updatedAt: string;\n};\n\nexport type User = {\n id: string;\n name: string | null;\n email: string;\n isVerified: boolean;\n createdAt: string;\n updatedAt: string;\n gitHubToken: string | null;\n};\n\nexport type Deployment = {\n id: string;\n domain: Domain;\n branch: string;\n commitHash: string;\n commitMessage: string;\n url?: string;\n deployerLrn: string;\n environment: Environment;\n isCurrent: boolean;\n baseDomain?: string;\n status: DeploymentStatus;\n createdBy: User;\n createdAt: string;\n updatedAt: string;\n};\n\nexport type OrganizationMember = {\n id: string;\n member: User;\n role: Role;\n createdAt: string;\n updatedAt: string;\n};\n\nexport type ProjectMember = {\n id: string;\n member: User;\n permissions: Permission[];\n isPending: boolean;\n createdAt: string;\n updatedAt: string;\n};\n\nexport type OrganizationProject = {\n id: string;\n owner: User;\n deployments: Deployment[];\n name: string;\n repository: string;\n prodBranch: string;\n description: string;\n template: string;\n framework: string;\n webhooks: string[];\n members: ProjectMember[];\n environmentVariables: EnvironmentVariable[];\n createdAt: string;\n updatedAt: string;\n};\n\nexport type Organization = {\n id: string;\n name: string;\n slug: string;\n projects: OrganizationProject[];\n createdAt: string;\n updatedAt: string;\n members: OrganizationMember[];\n};\n\nexport type Project = {\n id: string;\n owner: User;\n deployments: Deployment[];\n name: string;\n repository: string;\n prodBranch: string;\n description: string;\n template: string;\n framework: string;\n deployerLrns: string[];\n auctionId: string;\n webhooks: string[];\n members: ProjectMember[];\n environmentVariables: EnvironmentVariable[];\n createdAt: string;\n updatedAt: string;\n organization: Organization;\n icon: string;\n baseDomains?: string[] | null;\n};\n\nexport type GetProjectMembersResponse = {\n projectMembers: ProjectMember[];\n};\n\nexport type AddProjectMemberResponse = {\n addProjectMember: boolean;\n};\n\nexport type RemoveProjectMemberResponse = {\n removeProjectMember: boolean;\n};\n\nexport type UpdateProjectMemberResponse = {\n updateProjectMember: boolean;\n};\n\nexport type GetDeploymentsResponse = {\n deployments: Deployment[];\n};\n\nexport type GetEnvironmentVariablesResponse = {\n environmentVariables: EnvironmentVariable[];\n};\n\nexport type GetOrganizationsResponse = {\n organizations: Organization[];\n};\n\nexport type GetUserResponse = {\n user: User;\n};\n\nexport type GetProjectResponse = {\n project: Project | null;\n};\n\nexport type GetProjectsInOrganizationResponse = {\n projectsInOrganization: Project[];\n};\n\nexport type GetDomainsResponse = {\n domains: Domain[];\n};\n\nexport type SearchProjectsResponse = {\n searchProjects: Project[];\n};\n\nexport type AddEnvironmentVariablesResponse = {\n addEnvironmentVariables: boolean;\n};\n\nexport type AddEnvironmentVariableInput = {\n environments: string[];\n key: string;\n value: string;\n};\n\nexport type UpdateEnvironmentVariableInput = {\n key: string;\n value: string;\n};\n\nexport type UpdateProjectMemberInput = {\n permissions: Permission[];\n};\n\nexport type AddProjectMemberInput = {\n email: string;\n permissions: Permission[];\n};\n\nexport type UpdateEnvironmentVariableResponse = {\n updateEnvironmentVariable: boolean;\n};\n\nexport type RemoveEnvironmentVariableResponse = {\n removeEnvironmentVariable: boolean;\n};\n\nexport type UpdateDeploymentToProdResponse = {\n updateDeploymentToProd: boolean;\n};\n\nexport type AddProjectFromTemplateResponse = {\n addProjectFromTemplate: Project;\n};\n\nexport type AddProjectResponse = {\n addProject: Project;\n};\n\nexport type UpdateProjectResponse = {\n updateProject: boolean;\n};\n\nexport type UpdateDomainResponse = {\n updateDomain: boolean;\n};\n\nexport type DeleteProjectResponse = {\n deleteProject: boolean;\n};\n\nexport type DeleteDomainResponse = {\n deleteDomain: boolean;\n};\n\nexport type AddProjectFromTemplateInput = {\n templateOwner: string;\n templateRepo: string;\n owner: string;\n name: string;\n isPrivate: boolean;\n};\n\nexport type AddProjectInput = {\n name: string;\n repository: string;\n prodBranch: string;\n template?: string;\n};\n\nexport type UpdateProjectInput = {\n name?: string;\n description?: string;\n prodBranch?: string;\n webhooks?: string[];\n organizationId?: string;\n};\n\nexport type UpdateDomainInput = {\n name?: string;\n branch?: string;\n redirectToId?: string | null;\n};\n\nexport type RedeployToProdResponse = {\n redeployToProd: boolean;\n};\n\nexport type RollbackDeploymentResponse = {\n rollbackDeployment: boolean;\n};\n\nexport type DeleteDeploymentResponse = {\n deleteDeployment: boolean;\n};\n\nexport type AddDomainInput = {\n name: string;\n};\n\nexport type FilterDomainInput = {\n branch?: string;\n status?: DomainStatus;\n};\n\nexport type AddDomainResponse = {\n addDomain: true;\n};\n\nexport type AuthenticateGitHubResponse = {\n authenticateGitHub: {\n token: string;\n };\n};\n\nexport type UnauthenticateGitHubResponse = {\n unauthenticateGitHub: boolean;\n};\n\nexport type AuctionParams = {\n maxPrice: string;\n numProviders: number;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,EACE;AAAA,EAEA;AAAA,OAEK;;;ACLP,SAAS,WAAW;AAEb,IAAM,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAahB,IAAM,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqDnB,IAAM,4BAA4B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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AAOL,IAAK,gBAAL,kBAAKC,mBAAL;AACL,EAAAA,eAAA,8BAA2B;AAC3B,EAAAA,eAAA,8BAA2B;AAC3B,EAAAA,eAAA,0BAAuB;AACvB,EAAAA,eAAA,4BAAyB;AAJf,SAAAA;AAAA,GAAA;AAuCL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,UAAO;AACP,EAAAA,cAAA,aAAU;AAFA,SAAAA;AAAA,GAAA;","names":["gql","Role","Permission","Environment","DeploymentStatus","AuctionStatus","DomainStatus"]} \ No newline at end of file