mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-20 03:26:47 +08:00
feat(infra): framework
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
query checkBlobSizes($workspaceId: String!, $size: SafeInt!) {
|
||||
checkBlobSize(workspaceId: $workspaceId, size: $size) {
|
||||
size
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
query blobSizes($workspaceId: String!) {
|
||||
workspace(id: $workspaceId) {
|
||||
blobsSize
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
query allBlobSizes {
|
||||
collectAllBlobSizes {
|
||||
size
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
mutation addToEarlyAccess($email: String!) {
|
||||
addToEarlyAccess(email: $email)
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
query getMembersByWorkspaceId($workspaceId: String!, $skip: Int!, $take: Int!) {
|
||||
workspace(id: $workspaceId) {
|
||||
memberCount
|
||||
members(skip: $skip, take: $take) {
|
||||
id
|
||||
name
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
query getUserFeatures {
|
||||
currentUser {
|
||||
id
|
||||
features
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
query getWorkspacePublicPageById($workspaceId: String!, $pageId: String!) {
|
||||
workspace(id: $workspaceId) {
|
||||
publicPage(pageId: $pageId) {
|
||||
id
|
||||
mode
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
query getWorkspaces {
|
||||
workspaces {
|
||||
id
|
||||
owner {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,19 +18,6 @@ fragment CredentialsRequirement on CredentialsRequirementType {
|
||||
...PasswordLimits
|
||||
}
|
||||
}`
|
||||
export const checkBlobSizesQuery = {
|
||||
id: 'checkBlobSizesQuery' as const,
|
||||
operationName: 'checkBlobSizes',
|
||||
definitionName: 'checkBlobSize',
|
||||
containsFile: false,
|
||||
query: `
|
||||
query checkBlobSizes($workspaceId: String!, $size: SafeInt!) {
|
||||
checkBlobSize(workspaceId: $workspaceId, size: $size) {
|
||||
size
|
||||
}
|
||||
}`,
|
||||
};
|
||||
|
||||
export const deleteBlobMutation = {
|
||||
id: 'deleteBlobMutation' as const,
|
||||
operationName: 'deleteBlob',
|
||||
@@ -64,32 +51,6 @@ mutation setBlob($workspaceId: String!, $blob: Upload!) {
|
||||
}`,
|
||||
};
|
||||
|
||||
export const blobSizesQuery = {
|
||||
id: 'blobSizesQuery' as const,
|
||||
operationName: 'blobSizes',
|
||||
definitionName: 'workspace',
|
||||
containsFile: false,
|
||||
query: `
|
||||
query blobSizes($workspaceId: String!) {
|
||||
workspace(id: $workspaceId) {
|
||||
blobsSize
|
||||
}
|
||||
}`,
|
||||
};
|
||||
|
||||
export const allBlobSizesQuery = {
|
||||
id: 'allBlobSizesQuery' as const,
|
||||
operationName: 'allBlobSizes',
|
||||
definitionName: 'collectAllBlobSizes',
|
||||
containsFile: false,
|
||||
query: `
|
||||
query allBlobSizes {
|
||||
collectAllBlobSizes {
|
||||
size
|
||||
}
|
||||
}`,
|
||||
};
|
||||
|
||||
export const cancelSubscriptionMutation = {
|
||||
id: 'cancelSubscriptionMutation' as const,
|
||||
operationName: 'cancelSubscription',
|
||||
@@ -216,17 +177,6 @@ mutation deleteWorkspace($id: String!) {
|
||||
}`,
|
||||
};
|
||||
|
||||
export const addToEarlyAccessMutation = {
|
||||
id: 'addToEarlyAccessMutation' as const,
|
||||
operationName: 'addToEarlyAccess',
|
||||
definitionName: 'addToEarlyAccess',
|
||||
containsFile: false,
|
||||
query: `
|
||||
mutation addToEarlyAccess($email: String!) {
|
||||
addToEarlyAccess(email: $email)
|
||||
}`,
|
||||
};
|
||||
|
||||
export const earlyAccessUsersQuery = {
|
||||
id: 'earlyAccessUsersQuery' as const,
|
||||
operationName: 'earlyAccessUsers',
|
||||
@@ -395,6 +345,7 @@ export const getMembersByWorkspaceIdQuery = {
|
||||
query: `
|
||||
query getMembersByWorkspaceId($workspaceId: String!, $skip: Int!, $take: Int!) {
|
||||
workspace(id: $workspaceId) {
|
||||
memberCount
|
||||
members(skip: $skip, take: $take) {
|
||||
id
|
||||
name
|
||||
@@ -443,6 +394,7 @@ export const getUserFeaturesQuery = {
|
||||
query: `
|
||||
query getUserFeatures {
|
||||
currentUser {
|
||||
id
|
||||
features
|
||||
}
|
||||
}`,
|
||||
@@ -498,6 +450,22 @@ query getWorkspacePublicById($id: String!) {
|
||||
}`,
|
||||
};
|
||||
|
||||
export const getWorkspacePublicPageByIdQuery = {
|
||||
id: 'getWorkspacePublicPageByIdQuery' as const,
|
||||
operationName: 'getWorkspacePublicPageById',
|
||||
definitionName: 'workspace',
|
||||
containsFile: false,
|
||||
query: `
|
||||
query getWorkspacePublicPageById($workspaceId: String!, $pageId: String!) {
|
||||
workspace(id: $workspaceId) {
|
||||
publicPage(pageId: $pageId) {
|
||||
id
|
||||
mode
|
||||
}
|
||||
}
|
||||
}`,
|
||||
};
|
||||
|
||||
export const getWorkspacePublicPagesQuery = {
|
||||
id: 'getWorkspacePublicPagesQuery' as const,
|
||||
operationName: 'getWorkspacePublicPages',
|
||||
@@ -536,6 +504,9 @@ export const getWorkspacesQuery = {
|
||||
query getWorkspaces {
|
||||
workspaces {
|
||||
id
|
||||
owner {
|
||||
id
|
||||
}
|
||||
}
|
||||
}`,
|
||||
};
|
||||
@@ -642,11 +613,18 @@ mutation publishPage($workspaceId: String!, $pageId: String!, $mode: PublicPageM
|
||||
export const quotaQuery = {
|
||||
id: 'quotaQuery' as const,
|
||||
operationName: 'quota',
|
||||
definitionName: 'currentUser',
|
||||
definitionName: 'currentUser,collectAllBlobSizes',
|
||||
containsFile: false,
|
||||
query: `
|
||||
query quota {
|
||||
currentUser {
|
||||
id
|
||||
copilot {
|
||||
quota {
|
||||
limit
|
||||
used
|
||||
}
|
||||
}
|
||||
quota {
|
||||
name
|
||||
blobLimit
|
||||
@@ -662,6 +640,9 @@ query quota {
|
||||
}
|
||||
}
|
||||
}
|
||||
collectAllBlobSizes {
|
||||
size
|
||||
}
|
||||
}`,
|
||||
};
|
||||
|
||||
@@ -829,6 +810,7 @@ export const subscriptionQuery = {
|
||||
query: `
|
||||
query subscription {
|
||||
currentUser {
|
||||
id
|
||||
subscriptions {
|
||||
id
|
||||
status
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
query quota {
|
||||
currentUser {
|
||||
id
|
||||
copilot {
|
||||
quota {
|
||||
limit
|
||||
used
|
||||
}
|
||||
}
|
||||
quota {
|
||||
name
|
||||
blobLimit
|
||||
@@ -15,4 +22,7 @@ query quota {
|
||||
}
|
||||
}
|
||||
}
|
||||
collectAllBlobSizes {
|
||||
size
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
query subscription {
|
||||
currentUser {
|
||||
id
|
||||
subscriptions {
|
||||
id
|
||||
status
|
||||
|
||||
Reference in New Issue
Block a user