From 0ac36af93eb6dcefc65d0f2bedf706ac362f8473 Mon Sep 17 00:00:00 2001 From: Alessandro Magionami Date: Mon, 26 Aug 2024 17:53:34 +0200 Subject: [PATCH] Alessandro/web 1659 workspace limits (#2733) * chore(workspaces): billing version limit graphql schema * chore(workspaces): billing member role required * chore(core): test helper for random string * chore(core): test helpers * chore(workspaces): workspaces billing version resolver * chore(workspaces): rename version to versionsCount --- .../typedefs/workspaces.graphql | 19 +++++ .../modules/core/graph/generated/graphql.ts | 33 ++++++++ .../modules/core/helpers/testHelpers.ts | 4 + .../modules/core/tests/helpers/graphql.ts | 7 ++ .../graph/generated/graphql.ts | 15 ++++ .../modules/gatekeeper/domain/constants.ts | 1 + .../modules/workspaces/domain/operations.ts | 6 ++ .../workspaces/graph/resolvers/workspaces.ts | 16 +++- .../workspaces/repositories/workspaces.ts | 22 +++++- .../workspaces/tests/helpers/graphql.ts | 23 ++++++ .../integration/workspaces.graph.spec.ts | 79 ++++++++++++++++++- .../server/test/graphql/generated/graphql.ts | 34 ++++++++ 12 files changed, 256 insertions(+), 3 deletions(-) create mode 100644 packages/server/modules/core/tests/helpers/graphql.ts create mode 100644 packages/server/modules/gatekeeper/domain/constants.ts diff --git a/packages/server/assets/workspacesCore/typedefs/workspaces.graphql b/packages/server/assets/workspacesCore/typedefs/workspaces.graphql index f3f119bbc..c18aaa761 100644 --- a/packages/server/assets/workspacesCore/typedefs/workspaces.graphql +++ b/packages/server/assets/workspacesCore/typedefs/workspaces.graphql @@ -182,6 +182,21 @@ input PendingWorkspaceCollaboratorsFilter { search: String } +type WorkspaceVersionsCount { + """ + Total number of versions of all projects in the workspace + """ + current: Int! + """ + Maximum number of version of all projects in the workspace with no additional cost + """ + max: Int! +} + +type WorkspaceBilling { + versionsCount: WorkspaceVersionsCount +} + type Workspace { id: ID! name: String! @@ -217,6 +232,10 @@ type Workspace { filter: WorkspaceProjectsFilter ): ProjectCollection! """ + Billing data for Workspaces beta + """ + billing: WorkspaceBilling! @hasWorkspaceRole(role: MEMBER) + """ Enable/Disable restriction to invite users to workspace as Guests only """ domainBasedMembershipProtectionEnabled: Boolean! diff --git a/packages/server/modules/core/graph/generated/graphql.ts b/packages/server/modules/core/graph/generated/graphql.ts index b484e5de0..e1e86dcdd 100644 --- a/packages/server/modules/core/graph/generated/graphql.ts +++ b/packages/server/modules/core/graph/generated/graphql.ts @@ -3854,6 +3854,8 @@ export type WebhookUpdateInput = { export type Workspace = { __typename?: 'Workspace'; + /** Billing data for Workspaces beta */ + billing: WorkspaceBilling; createdAt: Scalars['DateTime']['output']; /** Selected fallback when `logo` not set */ defaultLogoIndex: Scalars['Int']['output']; @@ -3894,6 +3896,11 @@ export type WorkspaceTeamArgs = { filter?: InputMaybe; }; +export type WorkspaceBilling = { + __typename?: 'WorkspaceBilling'; + versionsCount?: Maybe; +}; + export type WorkspaceCollaborator = { __typename?: 'WorkspaceCollaborator'; id: Scalars['ID']['output']; @@ -4097,6 +4104,14 @@ export type WorkspaceUpdateInput = { name?: InputMaybe; }; +export type WorkspaceVersionsCount = { + __typename?: 'WorkspaceVersionsCount'; + /** Total number of versions of all projects in the workspace */ + current: Scalars['Int']['output']; + /** Maximum number of version of all projects in the workspace with no additional cost */ + max: Scalars['Int']['output']; +}; + export type ResolverTypeWrapper = Promise | T; @@ -4400,6 +4415,7 @@ export type ResolversTypes = { WebhookEventCollection: ResolverTypeWrapper; WebhookUpdateInput: WebhookUpdateInput; Workspace: ResolverTypeWrapper; + WorkspaceBilling: ResolverTypeWrapper; WorkspaceCollaborator: ResolverTypeWrapper; WorkspaceCollection: ResolverTypeWrapper & { items: Array }>; WorkspaceCreateInput: WorkspaceCreateInput; @@ -4417,6 +4433,7 @@ export type ResolversTypes = { WorkspaceRoleUpdateInput: WorkspaceRoleUpdateInput; WorkspaceTeamFilter: WorkspaceTeamFilter; WorkspaceUpdateInput: WorkspaceUpdateInput; + WorkspaceVersionsCount: ResolverTypeWrapper; }; /** Mapping between all available schema types and the resolvers parents */ @@ -4632,6 +4649,7 @@ export type ResolversParentTypes = { WebhookEventCollection: WebhookEventCollection; WebhookUpdateInput: WebhookUpdateInput; Workspace: WorkspaceGraphQLReturn; + WorkspaceBilling: WorkspaceBilling; WorkspaceCollaborator: WorkspaceCollaboratorGraphQLReturn; WorkspaceCollection: Omit & { items: Array }; WorkspaceCreateInput: WorkspaceCreateInput; @@ -4648,6 +4666,7 @@ export type ResolversParentTypes = { WorkspaceRoleUpdateInput: WorkspaceRoleUpdateInput; WorkspaceTeamFilter: WorkspaceTeamFilter; WorkspaceUpdateInput: WorkspaceUpdateInput; + WorkspaceVersionsCount: WorkspaceVersionsCount; }; export type HasScopeDirectiveArgs = { @@ -5985,6 +6004,7 @@ export type WebhookEventCollectionResolvers = { + billing?: Resolver; createdAt?: Resolver; defaultLogoIndex?: Resolver; description?: Resolver, ParentType, ContextType>; @@ -6002,6 +6022,11 @@ export type WorkspaceResolvers; }; +export type WorkspaceBillingResolvers = { + versionsCount?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + export type WorkspaceCollaboratorResolvers = { id?: Resolver; role?: Resolver; @@ -6044,6 +6069,12 @@ export type WorkspaceMutationsResolvers; }; +export type WorkspaceVersionsCountResolvers = { + current?: Resolver; + max?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + export type Resolvers = { ActiveUserMutations?: ActiveUserMutationsResolvers; Activity?: ActivityResolvers; @@ -6173,11 +6204,13 @@ export type Resolvers = { WebhookEvent?: WebhookEventResolvers; WebhookEventCollection?: WebhookEventCollectionResolvers; Workspace?: WorkspaceResolvers; + WorkspaceBilling?: WorkspaceBillingResolvers; WorkspaceCollaborator?: WorkspaceCollaboratorResolvers; WorkspaceCollection?: WorkspaceCollectionResolvers; WorkspaceDomain?: WorkspaceDomainResolvers; WorkspaceInviteMutations?: WorkspaceInviteMutationsResolvers; WorkspaceMutations?: WorkspaceMutationsResolvers; + WorkspaceVersionsCount?: WorkspaceVersionsCountResolvers; }; export type DirectiveResolvers = { diff --git a/packages/server/modules/core/helpers/testHelpers.ts b/packages/server/modules/core/helpers/testHelpers.ts index 22f92185c..1b771176b 100644 --- a/packages/server/modules/core/helpers/testHelpers.ts +++ b/packages/server/modules/core/helpers/testHelpers.ts @@ -8,6 +8,10 @@ export function createRandomPassword(length?: number) { return crs({ length: length ?? 10 }) } +export function createRandomString(length?: number) { + return crs({ length: length ?? 10 }) +} + export const randomizeCase = (str: string) => str .split('') diff --git a/packages/server/modules/core/tests/helpers/graphql.ts b/packages/server/modules/core/tests/helpers/graphql.ts new file mode 100644 index 000000000..6c7d859bc --- /dev/null +++ b/packages/server/modules/core/tests/helpers/graphql.ts @@ -0,0 +1,7 @@ +import { gql } from 'apollo-server-express' + +export const createObjectMutation = gql` + mutation CreateObject($input: ObjectCreateInput!) { + objectCreate(objectInput: $input) + } +` diff --git a/packages/server/modules/cross-server-sync/graph/generated/graphql.ts b/packages/server/modules/cross-server-sync/graph/generated/graphql.ts index 5204e7401..394e656be 100644 --- a/packages/server/modules/cross-server-sync/graph/generated/graphql.ts +++ b/packages/server/modules/cross-server-sync/graph/generated/graphql.ts @@ -3843,6 +3843,8 @@ export type WebhookUpdateInput = { export type Workspace = { __typename?: 'Workspace'; + /** Billing data for Workspaces beta */ + billing: WorkspaceBilling; createdAt: Scalars['DateTime']['output']; /** Selected fallback when `logo` not set */ defaultLogoIndex: Scalars['Int']['output']; @@ -3883,6 +3885,11 @@ export type WorkspaceTeamArgs = { filter?: InputMaybe; }; +export type WorkspaceBilling = { + __typename?: 'WorkspaceBilling'; + versionsCount?: Maybe; +}; + export type WorkspaceCollaborator = { __typename?: 'WorkspaceCollaborator'; id: Scalars['ID']['output']; @@ -4086,6 +4093,14 @@ export type WorkspaceUpdateInput = { name?: InputMaybe; }; +export type WorkspaceVersionsCount = { + __typename?: 'WorkspaceVersionsCount'; + /** Total number of versions of all projects in the workspace */ + current: Scalars['Int']['output']; + /** Maximum number of version of all projects in the workspace with no additional cost */ + max: Scalars['Int']['output']; +}; + export type CrossSyncCommitBranchMetadataQueryVariables = Exact<{ streamId: Scalars['String']['input']; commitId: Scalars['String']['input']; diff --git a/packages/server/modules/gatekeeper/domain/constants.ts b/packages/server/modules/gatekeeper/domain/constants.ts new file mode 100644 index 000000000..a684f0b25 --- /dev/null +++ b/packages/server/modules/gatekeeper/domain/constants.ts @@ -0,0 +1 @@ +export const WORKSPACE_MAX_PROJECTS_VERSIONS = 500 diff --git a/packages/server/modules/workspaces/domain/operations.ts b/packages/server/modules/workspaces/domain/operations.ts index 258581f2a..207f8abd0 100644 --- a/packages/server/modules/workspaces/domain/operations.ts +++ b/packages/server/modules/workspaces/domain/operations.ts @@ -146,3 +146,9 @@ export type EmitWorkspaceEvent = (args: { eventName: TEvent payload: EventBusPayloads[TEvent] }) => Promise + +export type CountProjectsVersionsByWorkspaceId = ({ + workspaceId +}: { + workspaceId: string +}) => Promise diff --git a/packages/server/modules/workspaces/graph/resolvers/workspaces.ts b/packages/server/modules/workspaces/graph/resolvers/workspaces.ts index 2f184a6d8..232716b83 100644 --- a/packages/server/modules/workspaces/graph/resolvers/workspaces.ts +++ b/packages/server/modules/workspaces/graph/resolvers/workspaces.ts @@ -61,7 +61,8 @@ import { deleteWorkspaceDomainFactory, getWorkspaceDomainsFactory, getUserDiscoverableWorkspacesFactory, - getWorkspaceWithDomainsFactory + getWorkspaceWithDomainsFactory, + countProjectsVersionsByWorkspaceIdFactory } from '@/modules/workspaces/repositories/workspaces' import { buildWorkspaceInviteEmailContentsFactory, @@ -102,6 +103,8 @@ import { import { joinWorkspaceFactory } from '@/modules/workspaces/services/join' import { validateAndCreateUserEmailFactory } from '@/modules/core/services/userEmails' import { requestNewEmailVerification } from '@/modules/emails/services/verification/request' +import { Workspace } from '@/modules/workspacesCore/domain/types' +import { WORKSPACE_MAX_PROJECTS_VERSIONS } from '@/modules/gatekeeper/domain/constants' const buildCreateAndSendServerOrProjectInvite = () => createAndSendInviteFactory({ @@ -611,6 +614,17 @@ export = FF_WORKSPACES_MODULE_ENABLED }, domains: async (parent) => { return await getWorkspaceDomainsFactory({ db })({ workspaceIds: [parent.id] }) + }, + billing: (parent) => ({ parent }) + }, + WorkspaceBilling: { + versionsCount: async (parent) => { + return { + current: await countProjectsVersionsByWorkspaceIdFactory({ db })({ + workspaceId: (parent as { parent: Workspace }).parent.id + }), + max: WORKSPACE_MAX_PROJECTS_VERSIONS + } } }, WorkspaceCollaborator: { diff --git a/packages/server/modules/workspaces/repositories/workspaces.ts b/packages/server/modules/workspaces/repositories/workspaces.ts index 07cc24dfd..7e072c80c 100644 --- a/packages/server/modules/workspaces/repositories/workspaces.ts +++ b/packages/server/modules/workspaces/repositories/workspaces.ts @@ -5,6 +5,7 @@ import { WorkspaceWithOptionalRole } from '@/modules/workspacesCore/domain/types' import { + CountProjectsVersionsByWorkspaceId, DeleteWorkspace, DeleteWorkspaceDomain, DeleteWorkspaceRole, @@ -30,7 +31,14 @@ import { WorkspaceDomains, Workspaces } from '@/modules/workspaces/helpers/db' -import { knex, ServerAcl, ServerInvites, Users } from '@/modules/core/dbSchema' +import { + knex, + ServerAcl, + ServerInvites, + StreamCommits, + Streams, + Users +} from '@/modules/core/dbSchema' import { UserWithRole } from '@/modules/core/repositories/users' import { removePrivateFields } from '@/modules/core/helpers/userHelper' import { @@ -302,3 +310,15 @@ export const getWorkspaceWithDomainsFactory = ) } as Workspace & { domains: WorkspaceDomain[] } } + +export const countProjectsVersionsByWorkspaceIdFactory = + ({ db }: { db: Knex }): CountProjectsVersionsByWorkspaceId => + async ({ workspaceId }) => { + const [res] = await tables + .streams(db) + .join(StreamCommits.name, StreamCommits.col.streamId, Streams.col.id) + .where({ workspaceId }) + .count(StreamCommits.col.commitId) + + return parseInt(res.count.toString()) + } diff --git a/packages/server/modules/workspaces/tests/helpers/graphql.ts b/packages/server/modules/workspaces/tests/helpers/graphql.ts index 601d28b52..7a0b2e1e0 100644 --- a/packages/server/modules/workspaces/tests/helpers/graphql.ts +++ b/packages/server/modules/workspaces/tests/helpers/graphql.ts @@ -30,6 +30,17 @@ export const basicPendingWorkspaceCollaboratorFragment = gql` } ` +export const workspaceBillingFragment = gql` + fragment WorkspaceBilling on Workspace { + billing { + versionsCount { + current + max + } + } + } +` + export const createWorkspaceInviteQuery = gql` mutation CreateWorkspaceInvite( $workspaceId: String! @@ -86,6 +97,18 @@ export const getWorkspaceWithTeamQuery = gql` ${basicPendingWorkspaceCollaboratorFragment} ` +export const getWorkspaceWithBillingQuery = gql` + query GetWorkspaceWithBilling($workspaceId: String!) { + workspace(id: $workspaceId) { + ...BasicWorkspace + ...WorkspaceBilling + } + } + + ${basicWorkspaceFragment} + ${workspaceBillingFragment} +` + export const cancelInviteMutation = gql` mutation CancelWorkspaceInvite($workspaceId: String!, $inviteId: String!) { workspaceMutations { diff --git a/packages/server/modules/workspaces/tests/integration/workspaces.graph.spec.ts b/packages/server/modules/workspaces/tests/integration/workspaces.graph.spec.ts index 2139409d5..07ebe462e 100644 --- a/packages/server/modules/workspaces/tests/integration/workspaces.graph.spec.ts +++ b/packages/server/modules/workspaces/tests/integration/workspaces.graph.spec.ts @@ -20,7 +20,11 @@ import { GetWorkspaceTeamDocument, UpdateWorkspaceDocument, UpdateWorkspaceRoleDocument, - ActiveUserLeaveWorkspaceDocument + ActiveUserLeaveWorkspaceDocument, + GetWorkspaceWithBillingDocument, + CreateProjectDocument, + CreateObjectDocument, + CreateProjectVersionDocument } from '@/test/graphql/generated/graphql' import { beforeEachContext } from '@/test/hooks' import { AllScopes } from '@/modules/core/helpers/mainConstants' @@ -33,7 +37,57 @@ import { import { BasicTestCommit, createTestCommit } from '@/test/speckle-helpers/commitHelper' import { BasicTestStream, createTestStream } from '@/test/speckle-helpers/streamHelper' import knex from '@/db/knex' +import { createRandomPassword } from '@/modules/core/helpers/testHelpers' +import { getBranchesByStreamId } from '@/modules/core/services/branches' +const createProjectWithVersions = + ({ apollo }: { apollo: TestApolloServer }) => + async ({ + workspaceId, + versionsCount + }: { + workspaceId?: string + versionsCount: number + }) => { + const resProject1 = await apollo.execute(CreateProjectDocument, { + input: { + name: createRandomPassword(), + workspaceId + } + }) + expect(resProject1).to.not.haveGraphQLErrors() + const project1Id = resProject1.data!.projectMutations.create.id + + const { + items: [model1] + } = await getBranchesByStreamId({ + streamId: project1Id, + limit: 1, + cursor: null + }) + expect(model1).to.exist + + const resObj1 = await apollo.execute(CreateObjectDocument, { + input: { + streamId: project1Id, + objects: [{ some: 'obj' }] + } + }) + expect(resObj1).to.not.haveGraphQLErrors() + + await Promise.all( + new Array(versionsCount).fill(0).map(async () => { + const res = await apollo.execute(CreateProjectVersionDocument, { + input: { + projectId: project1Id, + modelId: model1.id, + objectId: resObj1.data!.objectCreate[0] + } + }) + expect(res).to.not.haveGraphQLErrors() + }) + ) + } describe('Workspaces GQL CRUD', () => { let apollo: TestApolloServer @@ -150,6 +204,29 @@ describe('Workspaces GQL CRUD', () => { }) }) + describe('query workspace.billing', () => { + it('should return workspace version limits', async () => { + await createProjectWithVersions({ apollo })({ + workspaceId: workspace.id, + versionsCount: 3 + }) + await createProjectWithVersions({ apollo })({ + workspaceId: workspace.id, + versionsCount: 2 + }) + + const res = await apollo.execute(GetWorkspaceWithBillingDocument, { + workspaceId: workspace.id + }) + + expect(res).to.not.haveGraphQLErrors() + expect(res.data?.workspace.billing.versionsCount).to.deep.equal({ + current: 5, + max: 500 + }) + }) + }) + describe('query activeUser.workspaces', () => { it('should return all workspaces for a user', async () => { const res = await apollo.execute(GetActiveUserWorkspacesDocument, {}) diff --git a/packages/server/test/graphql/generated/graphql.ts b/packages/server/test/graphql/generated/graphql.ts index c3658988a..0101c360b 100644 --- a/packages/server/test/graphql/generated/graphql.ts +++ b/packages/server/test/graphql/generated/graphql.ts @@ -3844,6 +3844,8 @@ export type WebhookUpdateInput = { export type Workspace = { __typename?: 'Workspace'; + /** Billing data for Workspaces beta */ + billing: WorkspaceBilling; createdAt: Scalars['DateTime']['output']; /** Selected fallback when `logo` not set */ defaultLogoIndex: Scalars['Int']['output']; @@ -3884,6 +3886,11 @@ export type WorkspaceTeamArgs = { filter?: InputMaybe; }; +export type WorkspaceBilling = { + __typename?: 'WorkspaceBilling'; + versionsCount?: Maybe; +}; + export type WorkspaceCollaborator = { __typename?: 'WorkspaceCollaborator'; id: Scalars['ID']['output']; @@ -4087,10 +4094,27 @@ export type WorkspaceUpdateInput = { name?: InputMaybe; }; +export type WorkspaceVersionsCount = { + __typename?: 'WorkspaceVersionsCount'; + /** Total number of versions of all projects in the workspace */ + current: Scalars['Int']['output']; + /** Maximum number of version of all projects in the workspace with no additional cost */ + max: Scalars['Int']['output']; +}; + +export type CreateObjectMutationVariables = Exact<{ + input: ObjectCreateInput; +}>; + + +export type CreateObjectMutation = { __typename?: 'Mutation', objectCreate: Array }; + export type BasicWorkspaceFragment = { __typename?: 'Workspace', id: string, name: string, updatedAt: string, createdAt: string, role?: string | null }; export type BasicPendingWorkspaceCollaboratorFragment = { __typename?: 'PendingWorkspaceCollaborator', id: string, inviteId: string, workspaceId: string, workspaceName: string, title: string, role: string, token?: string | null, invitedBy: { __typename?: 'LimitedUser', id: string, name: string }, user?: { __typename?: 'LimitedUser', id: string, name: string } | null }; +export type WorkspaceBillingFragment = { __typename?: 'Workspace', billing: { __typename?: 'WorkspaceBilling', versionsCount?: { __typename?: 'WorkspaceVersionsCount', current: number, max: number } | null } }; + export type CreateWorkspaceInviteMutationVariables = Exact<{ workspaceId: Scalars['String']['input']; input: WorkspaceInviteCreateInput; @@ -4114,6 +4138,13 @@ export type GetWorkspaceWithTeamQueryVariables = Exact<{ export type GetWorkspaceWithTeamQuery = { __typename?: 'Query', workspace: { __typename?: 'Workspace', id: string, name: string, updatedAt: string, createdAt: string, role?: string | null, invitedTeam?: Array<{ __typename?: 'PendingWorkspaceCollaborator', id: string, inviteId: string, workspaceId: string, workspaceName: string, title: string, role: string, token?: string | null, invitedBy: { __typename?: 'LimitedUser', id: string, name: string }, user?: { __typename?: 'LimitedUser', id: string, name: string } | null }> | null } }; +export type GetWorkspaceWithBillingQueryVariables = Exact<{ + workspaceId: Scalars['String']['input']; +}>; + + +export type GetWorkspaceWithBillingQuery = { __typename?: 'Query', workspace: { __typename?: 'Workspace', id: string, name: string, updatedAt: string, createdAt: string, role?: string | null, billing: { __typename?: 'WorkspaceBilling', versionsCount?: { __typename?: 'WorkspaceVersionsCount', current: number, max: number } | null } } }; + export type CancelWorkspaceInviteMutationVariables = Exact<{ workspaceId: Scalars['String']['input']; inviteId: Scalars['String']['input']; @@ -4750,6 +4781,7 @@ export type ActiveUserLeaveWorkspaceMutation = { __typename?: 'Mutation', worksp export const BasicWorkspaceFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BasicWorkspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}}]} as unknown as DocumentNode; export const BasicPendingWorkspaceCollaboratorFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BasicPendingWorkspaceCollaborator"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PendingWorkspaceCollaborator"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inviteId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceName"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"invitedBy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"token"}}]}}]} as unknown as DocumentNode; +export const WorkspaceBillingFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceBilling"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"billing"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"versionsCount"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"current"}},{"kind":"Field","name":{"kind":"Name","value":"max"}}]}}]}}]}}]} as unknown as DocumentNode; export const BasicStreamAccessRequestFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BasicStreamAccessRequestFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"StreamAccessRequest"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"requester"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"requesterId"}},{"kind":"Field","name":{"kind":"Name","value":"streamId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}}]} as unknown as DocumentNode; export const TestAutomateFunctionFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TestAutomateFunction"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"repo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"owner"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"isFeatured"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"releases"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"5"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"versionTag"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"inputSchema"}},{"kind":"Field","name":{"kind":"Name","value":"commitId"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"automationCount"}},{"kind":"Field","name":{"kind":"Name","value":"supportedSourceApps"}},{"kind":"Field","name":{"kind":"Name","value":"tags"}}]}}]} as unknown as DocumentNode; export const TestAutomationFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TestAutomation"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Automation"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"enabled"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"runs"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"trigger"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"VersionCreatedTrigger"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"version"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"model"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"statusMessage"}},{"kind":"Field","name":{"kind":"Name","value":"contextView"}},{"kind":"Field","name":{"kind":"Name","value":"function"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"elapsed"}},{"kind":"Field","name":{"kind":"Name","value":"results"}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"currentRevision"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"triggerDefinitions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"VersionCreatedTriggerDefinition"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"model"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"functions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"parameters"}},{"kind":"Field","name":{"kind":"Name","value":"release"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"function"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"versionTag"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"inputSchema"}},{"kind":"Field","name":{"kind":"Name","value":"commitId"}}]}}]}}]}}]}}]} as unknown as DocumentNode; @@ -4766,9 +4798,11 @@ export const TestWorkspaceFragmentDoc = {"kind":"Document","definitions":[{"kind export const TestWorkspaceCollaboratorFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TestWorkspaceCollaborator"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceCollaborator"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}}]} as unknown as DocumentNode; export const TestWorkspaceProjectFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TestWorkspaceProject"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Project"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode; export const TestWorkspaceTeamFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TestWorkspaceTeam"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}}]}}]} as unknown as DocumentNode; +export const CreateObjectDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateObject"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ObjectCreateInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"objectCreate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"objectInput"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]} as unknown as DocumentNode; export const CreateWorkspaceInviteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateWorkspaceInvite"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceInviteCreateInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspaceMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"invites"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"create"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"workspaceId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}}},{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BasicWorkspace"}},{"kind":"Field","name":{"kind":"Name","value":"invitedTeam"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BasicPendingWorkspaceCollaborator"}}]}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BasicWorkspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BasicPendingWorkspaceCollaborator"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PendingWorkspaceCollaborator"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inviteId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceName"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"invitedBy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"token"}}]}}]} as unknown as DocumentNode; export const BatchCreateWorkspaceInvitesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"BatchCreateWorkspaceInvites"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceInviteCreateInput"}}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspaceMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"invites"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"batchCreate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"workspaceId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}}},{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BasicWorkspace"}},{"kind":"Field","name":{"kind":"Name","value":"invitedTeam"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BasicPendingWorkspaceCollaborator"}}]}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BasicWorkspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BasicPendingWorkspaceCollaborator"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PendingWorkspaceCollaborator"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inviteId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceName"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"invitedBy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"token"}}]}}]} as unknown as DocumentNode; export const GetWorkspaceWithTeamDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetWorkspaceWithTeam"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspace"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BasicWorkspace"}},{"kind":"Field","name":{"kind":"Name","value":"invitedTeam"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BasicPendingWorkspaceCollaborator"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BasicWorkspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BasicPendingWorkspaceCollaborator"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PendingWorkspaceCollaborator"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inviteId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceName"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"invitedBy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"token"}}]}}]} as unknown as DocumentNode; +export const GetWorkspaceWithBillingDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetWorkspaceWithBilling"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspace"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BasicWorkspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceBilling"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BasicWorkspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceBilling"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"billing"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"versionsCount"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"current"}},{"kind":"Field","name":{"kind":"Name","value":"max"}}]}}]}}]}}]} as unknown as DocumentNode; export const CancelWorkspaceInviteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CancelWorkspaceInvite"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"inviteId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspaceMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"invites"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"cancel"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"workspaceId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}}},{"kind":"Argument","name":{"kind":"Name","value":"inviteId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"inviteId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BasicWorkspace"}},{"kind":"Field","name":{"kind":"Name","value":"invitedTeam"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BasicPendingWorkspaceCollaborator"}}]}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BasicWorkspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BasicPendingWorkspaceCollaborator"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PendingWorkspaceCollaborator"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inviteId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceName"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"invitedBy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"token"}}]}}]} as unknown as DocumentNode; export const UseWorkspaceInviteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UseWorkspaceInvite"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceInviteUseInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspaceMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"invites"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"use"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]}}]}}]} as unknown as DocumentNode; export const GetWorkspaceInviteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetWorkspaceInvite"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"token"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspaceInvite"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"workspaceId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}}},{"kind":"Argument","name":{"kind":"Name","value":"token"},"value":{"kind":"Variable","name":{"kind":"Name","value":"token"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BasicPendingWorkspaceCollaborator"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BasicPendingWorkspaceCollaborator"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PendingWorkspaceCollaborator"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inviteId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceName"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"invitedBy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"token"}}]}}]} as unknown as DocumentNode;