feat(mobile): adapt new endpoint (#14778)

#### PR Dependency Tree


* **PR #14778** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)
This commit is contained in:
DarkSky
2026-04-04 20:39:42 +08:00
committed by GitHub
parent 4be0cba9b5
commit 5a6c65085a
247 changed files with 4199 additions and 702 deletions
@@ -30,6 +30,9 @@
"mammoth": "^1.11.0",
"zod": "^3.25.76"
},
"devDependencies": {
"@types/js-yaml": "^4.0.9"
},
"exports": {
".": "./src/index.ts",
"./view": "./src/view.ts"
+5 -4
View File
@@ -25,18 +25,19 @@
"dependencies": {
"@affine/s3-compat": "workspace:*",
"@affine/server-native": "workspace:*",
"@apollo/server": "^4.13.0",
"@apollo/server": "^5.5.0",
"@as-integrations/express5": "^1.1.2",
"@fal-ai/serverless-client": "^0.15.0",
"@google-cloud/opentelemetry-cloud-trace-exporter": "^3.0.0",
"@google-cloud/opentelemetry-resource-util": "^3.0.0",
"@inquirer/prompts": "^7.10.1",
"@nestjs-cls/transactional": "^3.2.0",
"@nestjs-cls/transactional-adapter-prisma": "^1.3.4",
"@nestjs/apollo": "^13.0.4",
"@nestjs/apollo": "^13.2.4",
"@nestjs/bullmq": "^11.0.4",
"@nestjs/common": "^11.1.17",
"@nestjs/core": "^11.1.17",
"@nestjs/graphql": "^13.0.4",
"@nestjs/graphql": "^13.2.4",
"@nestjs/platform-express": "^11.1.17",
"@nestjs/platform-socket.io": "^11.1.17",
"@nestjs/schedule": "^6.1.1",
@@ -77,7 +78,7 @@
"fast-xml-parser": "^5.5.7",
"get-stream": "^9.0.1",
"google-auth-library": "^10.2.0",
"graphql": "^16.9.0",
"graphql": "^16.13.2",
"graphql-scalars": "^1.24.0",
"graphql-upload": "^17.0.0",
"html-validate": "^9.0.0",
@@ -11,6 +11,7 @@ import { afterEach, expect, test, vi } from 'vitest';
import { CloudBlobStorage } from '../impls/cloud/blob';
const originalBuildConfig = (globalThis as any).BUILD_CONFIG;
const quotaResponse = {
workspace: {
quota: {
@@ -25,6 +26,7 @@ const quotaResponse = {
afterEach(() => {
vi.restoreAllMocks();
vi.unstubAllGlobals();
(globalThis as any).BUILD_CONFIG = originalBuildConfig;
});
function createStorage() {
@@ -162,3 +164,155 @@ test('falls back to graphql and aborts when multipart upload fails', async () =>
expect(queries).toContain(abortBlobUploadMutation);
expect(queries).toContain(setBlobMutation);
});
test('uses presigned upload and completes without graphql fallback', async () => {
const storage = createStorage();
const gqlMock = vi.fn(async ({ query }) => {
if (query === workspaceBlobQuotaQuery) {
return quotaResponse;
}
if (query === createBlobUploadMutation) {
return {
createBlobUpload: {
method: BlobUploadMethod.PRESIGNED,
blobKey: 'blob-key',
alreadyUploaded: false,
uploadUrl: 'https://upload.example.com/blob',
},
};
}
if (query === completeBlobUploadMutation) {
return { completeBlobUpload: 'blob-key' };
}
throw new Error('Unexpected query');
});
(storage.connection as any).gql = gqlMock;
const fetchMock = vi.fn(async () => new Response('', { status: 200 }));
vi.stubGlobal('fetch', fetchMock);
await storage.set({
key: 'blob-key',
data: new Uint8Array([1, 2, 3]),
mime: 'text/plain',
});
const queries = gqlMock.mock.calls.map(call => call[0].query);
expect(queries).toContain(completeBlobUploadMutation);
expect(queries).not.toContain(setBlobMutation);
expect(fetchMock).toHaveBeenCalledWith(
'https://upload.example.com/blob',
expect.objectContaining({
method: 'PUT',
})
);
});
test('uses multipart upload and completes without graphql fallback', async () => {
const storage = createStorage();
const gqlMock = vi.fn(async ({ query, variables }) => {
if (query === workspaceBlobQuotaQuery) {
return quotaResponse;
}
if (query === createBlobUploadMutation) {
return {
createBlobUpload: {
method: BlobUploadMethod.MULTIPART,
blobKey: 'blob-key',
alreadyUploaded: false,
uploadId: 'upload-1',
partSize: 2,
uploadedParts: [],
},
};
}
if (query === getBlobUploadPartUrlQuery) {
return {
workspace: {
blobUploadPartUrl: {
uploadUrl: `https://upload.example.com/part/${variables.partNumber}`,
},
},
};
}
if (query === completeBlobUploadMutation) {
return { completeBlobUpload: 'blob-key' };
}
throw new Error('Unexpected query');
});
(storage.connection as any).gql = gqlMock;
const fetchMock = vi.fn(async (_input: string, init?: RequestInit) => {
const body = init?.body as ArrayBuffer;
const length = body.byteLength;
return new Response('', {
status: 200,
headers: {
etag: `etag-${length}`,
},
});
});
vi.stubGlobal('fetch', fetchMock);
await storage.set({
key: 'blob-key',
data: new Uint8Array([1, 2, 3]),
mime: 'text/plain',
});
const queries = gqlMock.mock.calls.map(call => call[0].query);
expect(queries).toContain(getBlobUploadPartUrlQuery);
expect(queries).toContain(completeBlobUploadMutation);
expect(queries).not.toContain(setBlobMutation);
expect(fetchMock).toHaveBeenCalledTimes(2);
});
test('uses manual redirect when downloading blobs on mobile', async () => {
(globalThis as any).BUILD_CONFIG = {
...originalBuildConfig,
appVersion: 'test',
isAndroid: true,
isIOS: false,
isElectron: false,
};
vi.resetModules();
const { CloudBlobStorage: MobileCloudBlobStorage } =
await import('../impls/cloud/blob');
const storage = new MobileCloudBlobStorage({
serverBaseUrl: 'https://example.com',
id: 'workspace-1',
});
const fetchMock = vi
.fn()
.mockResolvedValueOnce(
new Response(
JSON.stringify({ url: 'https://cdn.example.com/blob-key' }),
{
status: 200,
headers: {
'content-type': 'application/json',
},
}
)
)
.mockResolvedValueOnce(
new Response('blob-data', {
status: 200,
headers: {
'content-type': 'text/plain',
},
})
);
vi.stubGlobal('fetch', fetchMock);
const blob = await storage.get('blob-key');
expect(blob?.data).toEqual(new TextEncoder().encode('blob-data'));
expect(fetchMock.mock.calls[0]?.[0]?.toString()).toBe(
'https://example.com/api/workspaces/workspace-1/blobs/blob-key?redirect=manual'
);
expect(fetchMock.mock.calls[1]?.[0]?.toString()).toBe(
'https://cdn.example.com/blob-key'
);
});
@@ -13,7 +13,7 @@ androidx-junit = "1.2.1"
androidx-lifecycle-compose = "2.9.0"
androidx-material3 = "1.3.1"
androidx-navigation = "2.9.0"
apollo = "4.2.0"
apollo = "4.4.2"
apollo-kotlin-adapters = "0.0.6"
# @keep
compileSdk = "36"
@@ -5,8 +5,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apollographql/apollo-ios",
"state" : {
"revision" : "d591c1dd55824867877cff4f6551fe32983d7f51",
"version" : "1.23.0"
"revision" : "185b322c503dc2e6b76a2d379cba4758da03cb8c",
"version" : "1.25.4"
}
},
{
@@ -14,7 +14,7 @@ let package = Package(
.library(name: "AffineGraphQL", targets: ["AffineGraphQL"]),
],
dependencies: [
.package(url: "https://github.com/apollographql/apollo-ios", exact: "1.23.0"),
.package(url: "https://github.com/apollographql/apollo-ios", exact: "1.25.4"),
],
targets: [
.target(
@@ -5,7 +5,7 @@
public struct CopilotChatHistory: AffineGraphQL.SelectionSet, Fragment {
public static var fragmentDefinition: StaticString {
#"fragment CopilotChatHistory on CopilotHistories { __typename sessionId workspaceId docId parentSessionId promptName model optionalModels action pinned title tokens messages { __typename ...CopilotChatMessage } createdAt updatedAt }"#
#"fragment CopilotChatHistory on CopilotHistories { __typename sessionId workspaceId docId parentSessionId promptName model optionalModels action pinned title tokens messages { __typename id role content attachments streamObjects { __typename type textDelta toolCallId toolName args result } createdAt } createdAt updatedAt }"#
}
public let __data: DataDict
@@ -29,6 +29,9 @@ public struct CopilotChatHistory: AffineGraphQL.SelectionSet, Fragment {
.field("createdAt", AffineGraphQL.DateTime.self),
.field("updatedAt", AffineGraphQL.DateTime.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CopilotChatHistory.self
] }
public var sessionId: String { __data["sessionId"] }
public var workspaceId: String { __data["workspaceId"] }
@@ -57,7 +60,15 @@ public struct CopilotChatHistory: AffineGraphQL.SelectionSet, Fragment {
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.ChatMessage }
public static var __selections: [ApolloAPI.Selection] { [
.field("__typename", String.self),
.fragment(CopilotChatMessage.self),
.field("id", AffineGraphQL.ID?.self),
.field("role", String.self),
.field("content", String.self),
.field("attachments", [String]?.self),
.field("streamObjects", [StreamObject]?.self),
.field("createdAt", AffineGraphQL.DateTime.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CopilotChatHistory.Message.self
] }
public var id: AffineGraphQL.ID? { __data["id"] }
@@ -67,13 +78,33 @@ public struct CopilotChatHistory: AffineGraphQL.SelectionSet, Fragment {
public var streamObjects: [StreamObject]? { __data["streamObjects"] }
public var createdAt: AffineGraphQL.DateTime { __data["createdAt"] }
public struct Fragments: FragmentContainer {
/// Message.StreamObject
///
/// Parent Type: `StreamObject`
public struct StreamObject: AffineGraphQL.SelectionSet {
public let __data: DataDict
public init(_dataDict: DataDict) { __data = _dataDict }
public var copilotChatMessage: CopilotChatMessage { _toFragment() }
}
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.StreamObject }
public static var __selections: [ApolloAPI.Selection] { [
.field("__typename", String.self),
.field("type", String.self),
.field("textDelta", String?.self),
.field("toolCallId", String?.self),
.field("toolName", String?.self),
.field("args", AffineGraphQL.JSON?.self),
.field("result", AffineGraphQL.JSON?.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CopilotChatHistory.Message.StreamObject.self
] }
public typealias StreamObject = CopilotChatMessage.StreamObject
public var type: String { __data["type"] }
public var textDelta: String? { __data["textDelta"] }
public var toolCallId: String? { __data["toolCallId"] }
public var toolName: String? { __data["toolName"] }
public var args: AffineGraphQL.JSON? { __data["args"] }
public var result: AffineGraphQL.JSON? { __data["result"] }
}
}
}
@@ -1,57 +0,0 @@
// @generated
// This file was automatically generated and should not be edited.
@_exported import ApolloAPI
public struct CopilotChatMessage: AffineGraphQL.SelectionSet, Fragment {
public static var fragmentDefinition: StaticString {
#"fragment CopilotChatMessage on ChatMessage { __typename id role content attachments streamObjects { __typename type textDelta toolCallId toolName args result } createdAt }"#
}
public let __data: DataDict
public init(_dataDict: DataDict) { __data = _dataDict }
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.ChatMessage }
public static var __selections: [ApolloAPI.Selection] { [
.field("__typename", String.self),
.field("id", AffineGraphQL.ID?.self),
.field("role", String.self),
.field("content", String.self),
.field("attachments", [String]?.self),
.field("streamObjects", [StreamObject]?.self),
.field("createdAt", AffineGraphQL.DateTime.self),
] }
public var id: AffineGraphQL.ID? { __data["id"] }
public var role: String { __data["role"] }
public var content: String { __data["content"] }
public var attachments: [String]? { __data["attachments"] }
public var streamObjects: [StreamObject]? { __data["streamObjects"] }
public var createdAt: AffineGraphQL.DateTime { __data["createdAt"] }
/// StreamObject
///
/// Parent Type: `StreamObject`
public struct StreamObject: AffineGraphQL.SelectionSet {
public let __data: DataDict
public init(_dataDict: DataDict) { __data = _dataDict }
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.StreamObject }
public static var __selections: [ApolloAPI.Selection] { [
.field("__typename", String.self),
.field("type", String.self),
.field("textDelta", String?.self),
.field("toolCallId", String?.self),
.field("toolName", String?.self),
.field("args", AffineGraphQL.JSON?.self),
.field("result", AffineGraphQL.JSON?.self),
] }
public var type: String { __data["type"] }
public var textDelta: String? { __data["textDelta"] }
public var toolCallId: String? { __data["toolCallId"] }
public var toolName: String? { __data["toolName"] }
public var args: AffineGraphQL.JSON? { __data["args"] }
public var result: AffineGraphQL.JSON? { __data["result"] }
}
}
@@ -16,6 +16,9 @@ public struct CredentialsRequirements: AffineGraphQL.SelectionSet, Fragment {
.field("__typename", String.self),
.field("password", Password.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CredentialsRequirements.self
] }
public var password: Password { __data["password"] }
@@ -31,6 +34,10 @@ public struct CredentialsRequirements: AffineGraphQL.SelectionSet, Fragment {
.field("__typename", String.self),
.fragment(PasswordLimits.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CredentialsRequirements.Password.self,
PasswordLimits.self
] }
public var minLength: Int { __data["minLength"] }
public var maxLength: Int { __data["maxLength"] }
@@ -25,6 +25,9 @@ public struct CurrentUserProfile: AffineGraphQL.SelectionSet, Fragment {
.field("quotaUsage", QuotaUsage.self),
.field("copilot", Copilot.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CurrentUserProfile.self
] }
public var id: AffineGraphQL.ID { __data["id"] }
/// User name
@@ -57,6 +60,9 @@ public struct CurrentUserProfile: AffineGraphQL.SelectionSet, Fragment {
.field("receiveMentionEmail", Bool.self),
.field("receiveCommentEmail", Bool.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CurrentUserProfile.Settings.self
] }
/// Receive invitation email
public var receiveInvitationEmail: Bool { __data["receiveInvitationEmail"] }
@@ -83,6 +89,9 @@ public struct CurrentUserProfile: AffineGraphQL.SelectionSet, Fragment {
.field("memberLimit", Int.self),
.field("humanReadable", HumanReadable.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CurrentUserProfile.Quota.self
] }
public var name: String { __data["name"] }
public var blobLimit: AffineGraphQL.SafeInt { __data["blobLimit"] }
@@ -107,6 +116,9 @@ public struct CurrentUserProfile: AffineGraphQL.SelectionSet, Fragment {
.field("historyPeriod", String.self),
.field("memberLimit", String.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CurrentUserProfile.Quota.HumanReadable.self
] }
public var name: String { __data["name"] }
public var blobLimit: String { __data["blobLimit"] }
@@ -128,6 +140,9 @@ public struct CurrentUserProfile: AffineGraphQL.SelectionSet, Fragment {
.field("__typename", String.self),
.field("storageQuota", AffineGraphQL.SafeInt.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CurrentUserProfile.QuotaUsage.self
] }
@available(*, deprecated, message: "use `UserQuotaType[\'usedStorageQuota\']` instead")
public var storageQuota: AffineGraphQL.SafeInt { __data["storageQuota"] }
@@ -145,6 +160,9 @@ public struct CurrentUserProfile: AffineGraphQL.SelectionSet, Fragment {
.field("__typename", String.self),
.field("quota", Quota.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CurrentUserProfile.Copilot.self
] }
/// Get the quota of the user in the workspace
public var quota: Quota { __data["quota"] }
@@ -162,6 +180,9 @@ public struct CurrentUserProfile: AffineGraphQL.SelectionSet, Fragment {
.field("limit", AffineGraphQL.SafeInt?.self),
.field("used", AffineGraphQL.SafeInt.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CurrentUserProfile.Copilot.Quota.self
] }
public var limit: AffineGraphQL.SafeInt? { __data["limit"] }
public var used: AffineGraphQL.SafeInt { __data["used"] }
@@ -21,6 +21,9 @@ public struct LicenseBody: AffineGraphQL.SelectionSet, Fragment {
.field("validatedAt", AffineGraphQL.DateTime.self),
.field("variant", GraphQLEnum<AffineGraphQL.SubscriptionVariant>?.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
LicenseBody.self
] }
public var expiredAt: AffineGraphQL.DateTime? { __data["expiredAt"] }
public var installedAt: AffineGraphQL.DateTime { __data["installedAt"] }
@@ -17,6 +17,9 @@ public struct PaginatedCopilotChats: AffineGraphQL.SelectionSet, Fragment {
.field("pageInfo", PageInfo.self),
.field("edges", [Edge].self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
PaginatedCopilotChats.self
] }
public var pageInfo: PageInfo { __data["pageInfo"] }
public var edges: [Edge] { __data["edges"] }
@@ -36,6 +39,9 @@ public struct PaginatedCopilotChats: AffineGraphQL.SelectionSet, Fragment {
.field("startCursor", String?.self),
.field("endCursor", String?.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
PaginatedCopilotChats.PageInfo.self
] }
public var hasNextPage: Bool { __data["hasNextPage"] }
public var hasPreviousPage: Bool { __data["hasPreviousPage"] }
@@ -56,6 +62,9 @@ public struct PaginatedCopilotChats: AffineGraphQL.SelectionSet, Fragment {
.field("cursor", String.self),
.field("node", Node.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
PaginatedCopilotChats.Edge.self
] }
public var cursor: String { __data["cursor"] }
public var node: Node { __data["node"] }
@@ -72,6 +81,10 @@ public struct PaginatedCopilotChats: AffineGraphQL.SelectionSet, Fragment {
.field("__typename", String.self),
.fragment(CopilotChatHistory.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
PaginatedCopilotChats.Edge.Node.self,
CopilotChatHistory.self
] }
public var sessionId: String { __data["sessionId"] }
public var workspaceId: String { __data["workspaceId"] }
@@ -17,6 +17,9 @@ public struct PasswordLimits: AffineGraphQL.SelectionSet, Fragment {
.field("minLength", Int.self),
.field("maxLength", Int.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
PasswordLimits.self
] }
public var minLength: Int { __data["minLength"] }
public var maxLength: Int { __data["maxLength"] }
@@ -42,6 +42,9 @@ public class AbortBlobUploadMutation: GraphQLMutation {
"uploadId": .variable("uploadId")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
AbortBlobUploadMutation.Data.self
] }
public var abortBlobUpload: Bool { __data["abortBlobUpload"] }
}
@@ -38,6 +38,9 @@ public class AcceptInviteByInviteIdMutation: GraphQLMutation {
"inviteId": .variable("inviteId")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
AcceptInviteByInviteIdMutation.Data.self
] }
public var acceptInviteById: Bool { __data["acceptInviteById"] }
}
@@ -38,6 +38,9 @@ public class ActivateLicenseMutation: GraphQLMutation {
"license": .variable("license")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ActivateLicenseMutation.Data.self
] }
public var activateLicense: ActivateLicense { __data["activateLicense"] }
@@ -53,6 +56,10 @@ public class ActivateLicenseMutation: GraphQLMutation {
.field("__typename", String.self),
.fragment(LicenseBody.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ActivateLicenseMutation.Data.ActivateLicense.self,
LicenseBody.self
] }
public var expiredAt: AffineGraphQL.DateTime? { __data["expiredAt"] }
public var installedAt: AffineGraphQL.DateTime { __data["installedAt"] }
@@ -26,6 +26,9 @@ public class AddContextBlobMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("addContextBlob", AddContextBlob.self, arguments: ["options": .variable("options")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
AddContextBlobMutation.Data.self
] }
/// add a blob to context
public var addContextBlob: AddContextBlob { __data["addContextBlob"] }
@@ -44,6 +47,9 @@ public class AddContextBlobMutation: GraphQLMutation {
.field("createdAt", AffineGraphQL.SafeInt.self),
.field("status", GraphQLEnum<AffineGraphQL.ContextEmbedStatus>?.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
AddContextBlobMutation.Data.AddContextBlob.self
] }
public var id: AffineGraphQL.ID { __data["id"] }
public var createdAt: AffineGraphQL.SafeInt { __data["createdAt"] }
@@ -26,6 +26,9 @@ public class AddContextCategoryMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("addContextCategory", AddContextCategory.self, arguments: ["options": .variable("options")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
AddContextCategoryMutation.Data.self
] }
/// add a category to context
public var addContextCategory: AddContextCategory { __data["addContextCategory"] }
@@ -45,6 +48,9 @@ public class AddContextCategoryMutation: GraphQLMutation {
.field("type", GraphQLEnum<AffineGraphQL.ContextCategories>.self),
.field("docs", [Doc].self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
AddContextCategoryMutation.Data.AddContextCategory.self
] }
public var id: AffineGraphQL.ID { __data["id"] }
public var createdAt: AffineGraphQL.SafeInt { __data["createdAt"] }
@@ -65,6 +71,9 @@ public class AddContextCategoryMutation: GraphQLMutation {
.field("createdAt", AffineGraphQL.SafeInt.self),
.field("status", GraphQLEnum<AffineGraphQL.ContextEmbedStatus>?.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
AddContextCategoryMutation.Data.AddContextCategory.Doc.self
] }
public var id: AffineGraphQL.ID { __data["id"] }
public var createdAt: AffineGraphQL.SafeInt { __data["createdAt"] }
@@ -26,6 +26,9 @@ public class AddContextDocMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("addContextDoc", AddContextDoc.self, arguments: ["options": .variable("options")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
AddContextDocMutation.Data.self
] }
/// add a doc to context
public var addContextDoc: AddContextDoc { __data["addContextDoc"] }
@@ -44,6 +47,9 @@ public class AddContextDocMutation: GraphQLMutation {
.field("createdAt", AffineGraphQL.SafeInt.self),
.field("status", GraphQLEnum<AffineGraphQL.ContextEmbedStatus>?.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
AddContextDocMutation.Data.AddContextDoc.self
] }
public var id: AffineGraphQL.ID { __data["id"] }
public var createdAt: AffineGraphQL.SafeInt { __data["createdAt"] }
@@ -37,6 +37,9 @@ public class AddContextFileMutation: GraphQLMutation {
"options": .variable("options")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
AddContextFileMutation.Data.self
] }
/// add a file to context
public var addContextFile: AddContextFile { __data["addContextFile"] }
@@ -60,6 +63,9 @@ public class AddContextFileMutation: GraphQLMutation {
.field("status", GraphQLEnum<AffineGraphQL.ContextEmbedStatus>.self),
.field("blobId", String.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
AddContextFileMutation.Data.AddContextFile.self
] }
public var id: AffineGraphQL.ID { __data["id"] }
public var createdAt: AffineGraphQL.SafeInt { __data["createdAt"] }
@@ -37,6 +37,9 @@ public class AddWorkspaceEmbeddingFilesMutation: GraphQLMutation {
"blob": .variable("blob")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
AddWorkspaceEmbeddingFilesMutation.Data.self
] }
/// Update workspace embedding files
public var addWorkspaceEmbeddingFiles: AddWorkspaceEmbeddingFiles { __data["addWorkspaceEmbeddingFiles"] }
@@ -58,6 +61,9 @@ public class AddWorkspaceEmbeddingFilesMutation: GraphQLMutation {
.field("size", AffineGraphQL.SafeInt.self),
.field("createdAt", AffineGraphQL.DateTime.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
AddWorkspaceEmbeddingFilesMutation.Data.AddWorkspaceEmbeddingFiles.self
] }
public var fileId: String { __data["fileId"] }
public var fileName: String { __data["fileName"] }
@@ -37,6 +37,9 @@ public class AddWorkspaceEmbeddingIgnoredDocsMutation: GraphQLMutation {
"add": .variable("add")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
AddWorkspaceEmbeddingIgnoredDocsMutation.Data.self
] }
/// Update ignored docs
public var updateWorkspaceEmbeddingIgnoredDocs: Int { __data["updateWorkspaceEmbeddingIgnoredDocs"] }
@@ -26,6 +26,9 @@ public class AdminUpdateWorkspaceMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("adminUpdateWorkspace", AdminUpdateWorkspace?.self, arguments: ["input": .variable("input")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
AdminUpdateWorkspaceMutation.Data.self
] }
/// Update workspace flags and features for admin
public var adminUpdateWorkspace: AdminUpdateWorkspace? { __data["adminUpdateWorkspace"] }
@@ -58,6 +61,9 @@ public class AdminUpdateWorkspaceMutation: GraphQLMutation {
.field("blobCount", Int.self),
.field("blobSize", AffineGraphQL.SafeInt.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
AdminUpdateWorkspaceMutation.Data.AdminUpdateWorkspace.self
] }
public var id: String { __data["id"] }
public var `public`: Bool { __data["public"] }
@@ -92,6 +98,9 @@ public class AdminUpdateWorkspaceMutation: GraphQLMutation {
.field("email", String.self),
.field("avatarUrl", String?.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
AdminUpdateWorkspaceMutation.Data.AdminUpdateWorkspace.Owner.self
] }
public var id: String { __data["id"] }
public var name: String { __data["name"] }
@@ -47,6 +47,9 @@ public class ApplyDocUpdatesMutation: GraphQLMutation {
"updates": .variable("updates")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ApplyDocUpdatesMutation.Data.self
] }
/// Apply updates to a doc using LLM and return the merged markdown.
public var applyDocUpdates: String { __data["applyDocUpdates"] }
@@ -37,6 +37,9 @@ public class ApproveWorkspaceTeamMemberMutation: GraphQLMutation {
"userId": .variable("userId")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ApproveWorkspaceTeamMemberMutation.Data.self
] }
public var approveMember: Bool { __data["approveMember"] }
}
@@ -37,6 +37,9 @@ public class CancelSubscriptionMutation: GraphQLMutation {
"workspaceId": .variable("workspaceId")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CancelSubscriptionMutation.Data.self
] }
public var cancelSubscription: CancelSubscription { __data["cancelSubscription"] }
@@ -55,6 +58,9 @@ public class CancelSubscriptionMutation: GraphQLMutation {
.field("nextBillAt", AffineGraphQL.DateTime?.self),
.field("canceledAt", AffineGraphQL.DateTime?.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CancelSubscriptionMutation.Data.CancelSubscription.self
] }
@available(*, deprecated, message: "removed")
public var id: String? { __data["id"] }
@@ -37,6 +37,9 @@ public class ChangeEmailMutation: GraphQLMutation {
"email": .variable("email")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ChangeEmailMutation.Data.self
] }
public var changeEmail: ChangeEmail { __data["changeEmail"] }
@@ -53,6 +56,9 @@ public class ChangeEmailMutation: GraphQLMutation {
.field("id", AffineGraphQL.ID.self),
.field("email", String.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ChangeEmailMutation.Data.ChangeEmail.self
] }
public var id: AffineGraphQL.ID { __data["id"] }
/// User email
@@ -42,6 +42,9 @@ public class ChangePasswordMutation: GraphQLMutation {
"newPassword": .variable("newPassword")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ChangePasswordMutation.Data.self
] }
public var changePassword: Bool { __data["changePassword"] }
}
@@ -7,7 +7,7 @@ public class ClaimAudioTranscriptionMutation: GraphQLMutation {
public static let operationName: String = "claimAudioTranscription"
public static let operationDocument: ApolloAPI.OperationDocument = .init(
definition: .init(
#"mutation claimAudioTranscription($jobId: String!) { claimAudioTranscription(jobId: $jobId) { __typename id status title summary actions transcription { __typename speaker start end transcription } } }"#
#"mutation claimAudioTranscription($jobId: String!) { claimAudioTranscription(jobId: $jobId) { __typename id status title summary actions sourceAudio { __typename blobId mimeType durationMs sampleRate channels } quality { __typename degraded overflowCount } sliceManifest { __typename index fileName mimeType startSec durationSec byteSize } normalizedSegments { __typename speaker startSec endSec start end text } normalizedTranscript summaryJson { __typename title durationMinutes attendees keyPoints actionItems { __typename description owner deadline } decisions openQuestions blockers } transcription { __typename speaker start end transcription } } }"#
))
public var jobId: String
@@ -26,6 +26,9 @@ public class ClaimAudioTranscriptionMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("claimAudioTranscription", ClaimAudioTranscription?.self, arguments: ["jobId": .variable("jobId")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ClaimAudioTranscriptionMutation.Data.self
] }
public var claimAudioTranscription: ClaimAudioTranscription? { __data["claimAudioTranscription"] }
@@ -44,16 +47,193 @@ public class ClaimAudioTranscriptionMutation: GraphQLMutation {
.field("title", String?.self),
.field("summary", String?.self),
.field("actions", String?.self),
.field("sourceAudio", SourceAudio?.self),
.field("quality", Quality?.self),
.field("sliceManifest", [SliceManifest]?.self),
.field("normalizedSegments", [NormalizedSegment]?.self),
.field("normalizedTranscript", String?.self),
.field("summaryJson", SummaryJson?.self),
.field("transcription", [Transcription]?.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ClaimAudioTranscriptionMutation.Data.ClaimAudioTranscription.self
] }
public var id: AffineGraphQL.ID { __data["id"] }
public var status: GraphQLEnum<AffineGraphQL.AiJobStatus> { __data["status"] }
public var title: String? { __data["title"] }
public var summary: String? { __data["summary"] }
public var actions: String? { __data["actions"] }
public var sourceAudio: SourceAudio? { __data["sourceAudio"] }
public var quality: Quality? { __data["quality"] }
public var sliceManifest: [SliceManifest]? { __data["sliceManifest"] }
public var normalizedSegments: [NormalizedSegment]? { __data["normalizedSegments"] }
public var normalizedTranscript: String? { __data["normalizedTranscript"] }
public var summaryJson: SummaryJson? { __data["summaryJson"] }
public var transcription: [Transcription]? { __data["transcription"] }
/// ClaimAudioTranscription.SourceAudio
///
/// Parent Type: `TranscriptionSourceAudioType`
public struct SourceAudio: AffineGraphQL.SelectionSet {
public let __data: DataDict
public init(_dataDict: DataDict) { __data = _dataDict }
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.TranscriptionSourceAudioType }
public static var __selections: [ApolloAPI.Selection] { [
.field("__typename", String.self),
.field("blobId", String?.self),
.field("mimeType", String?.self),
.field("durationMs", Int?.self),
.field("sampleRate", Int?.self),
.field("channels", Int?.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ClaimAudioTranscriptionMutation.Data.ClaimAudioTranscription.SourceAudio.self
] }
public var blobId: String? { __data["blobId"] }
public var mimeType: String? { __data["mimeType"] }
public var durationMs: Int? { __data["durationMs"] }
public var sampleRate: Int? { __data["sampleRate"] }
public var channels: Int? { __data["channels"] }
}
/// ClaimAudioTranscription.Quality
///
/// Parent Type: `TranscriptionQualityType`
public struct Quality: AffineGraphQL.SelectionSet {
public let __data: DataDict
public init(_dataDict: DataDict) { __data = _dataDict }
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.TranscriptionQualityType }
public static var __selections: [ApolloAPI.Selection] { [
.field("__typename", String.self),
.field("degraded", Bool?.self),
.field("overflowCount", Int?.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ClaimAudioTranscriptionMutation.Data.ClaimAudioTranscription.Quality.self
] }
public var degraded: Bool? { __data["degraded"] }
public var overflowCount: Int? { __data["overflowCount"] }
}
/// ClaimAudioTranscription.SliceManifest
///
/// Parent Type: `AudioSliceManifestItemType`
public struct SliceManifest: AffineGraphQL.SelectionSet {
public let __data: DataDict
public init(_dataDict: DataDict) { __data = _dataDict }
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.AudioSliceManifestItemType }
public static var __selections: [ApolloAPI.Selection] { [
.field("__typename", String.self),
.field("index", Int.self),
.field("fileName", String.self),
.field("mimeType", String.self),
.field("startSec", Double.self),
.field("durationSec", Double.self),
.field("byteSize", Int?.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ClaimAudioTranscriptionMutation.Data.ClaimAudioTranscription.SliceManifest.self
] }
public var index: Int { __data["index"] }
public var fileName: String { __data["fileName"] }
public var mimeType: String { __data["mimeType"] }
public var startSec: Double { __data["startSec"] }
public var durationSec: Double { __data["durationSec"] }
public var byteSize: Int? { __data["byteSize"] }
}
/// ClaimAudioTranscription.NormalizedSegment
///
/// Parent Type: `NormalizedTranscriptSegmentType`
public struct NormalizedSegment: AffineGraphQL.SelectionSet {
public let __data: DataDict
public init(_dataDict: DataDict) { __data = _dataDict }
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.NormalizedTranscriptSegmentType }
public static var __selections: [ApolloAPI.Selection] { [
.field("__typename", String.self),
.field("speaker", String.self),
.field("startSec", Double.self),
.field("endSec", Double.self),
.field("start", String.self),
.field("end", String.self),
.field("text", String.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ClaimAudioTranscriptionMutation.Data.ClaimAudioTranscription.NormalizedSegment.self
] }
public var speaker: String { __data["speaker"] }
public var startSec: Double { __data["startSec"] }
public var endSec: Double { __data["endSec"] }
public var start: String { __data["start"] }
public var end: String { __data["end"] }
public var text: String { __data["text"] }
}
/// ClaimAudioTranscription.SummaryJson
///
/// Parent Type: `MeetingSummaryV2Type`
public struct SummaryJson: AffineGraphQL.SelectionSet {
public let __data: DataDict
public init(_dataDict: DataDict) { __data = _dataDict }
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.MeetingSummaryV2Type }
public static var __selections: [ApolloAPI.Selection] { [
.field("__typename", String.self),
.field("title", String.self),
.field("durationMinutes", Double.self),
.field("attendees", [String].self),
.field("keyPoints", [String].self),
.field("actionItems", [ActionItem].self),
.field("decisions", [String].self),
.field("openQuestions", [String].self),
.field("blockers", [String].self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ClaimAudioTranscriptionMutation.Data.ClaimAudioTranscription.SummaryJson.self
] }
public var title: String { __data["title"] }
public var durationMinutes: Double { __data["durationMinutes"] }
public var attendees: [String] { __data["attendees"] }
public var keyPoints: [String] { __data["keyPoints"] }
public var actionItems: [ActionItem] { __data["actionItems"] }
public var decisions: [String] { __data["decisions"] }
public var openQuestions: [String] { __data["openQuestions"] }
public var blockers: [String] { __data["blockers"] }
/// ClaimAudioTranscription.SummaryJson.ActionItem
///
/// Parent Type: `MeetingActionItemType`
public struct ActionItem: AffineGraphQL.SelectionSet {
public let __data: DataDict
public init(_dataDict: DataDict) { __data = _dataDict }
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.MeetingActionItemType }
public static var __selections: [ApolloAPI.Selection] { [
.field("__typename", String.self),
.field("description", String.self),
.field("owner", String?.self),
.field("deadline", String?.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ClaimAudioTranscriptionMutation.Data.ClaimAudioTranscription.SummaryJson.ActionItem.self
] }
public var description: String { __data["description"] }
public var owner: String? { __data["owner"] }
public var deadline: String? { __data["deadline"] }
}
}
/// ClaimAudioTranscription.Transcription
///
/// Parent Type: `TranscriptionItemType`
@@ -69,6 +249,9 @@ public class ClaimAudioTranscriptionMutation: GraphQLMutation {
.field("end", String.self),
.field("transcription", String.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ClaimAudioTranscriptionMutation.Data.ClaimAudioTranscription.Transcription.self
] }
public var speaker: String { __data["speaker"] }
public var start: String { __data["start"] }
@@ -26,6 +26,9 @@ public class CleanupCopilotSessionMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("cleanupCopilotSession", [String].self, arguments: ["options": .variable("input")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CleanupCopilotSessionMutation.Data.self
] }
/// Cleanup sessions
public var cleanupCopilotSession: [String] { __data["cleanupCopilotSession"] }
@@ -47,6 +47,9 @@ public class CompleteBlobUploadMutation: GraphQLMutation {
"parts": .variable("parts")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CompleteBlobUploadMutation.Data.self
] }
public var completeBlobUpload: String { __data["completeBlobUpload"] }
}
@@ -47,6 +47,9 @@ public class CreateBlobUploadMutation: GraphQLMutation {
"mime": .variable("mime")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CreateBlobUploadMutation.Data.self
] }
public var createBlobUpload: CreateBlobUpload { __data["createBlobUpload"] }
@@ -70,6 +73,9 @@ public class CreateBlobUploadMutation: GraphQLMutation {
.field("partSize", Int?.self),
.field("uploadedParts", [UploadedPart]?.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CreateBlobUploadMutation.Data.CreateBlobUpload.self
] }
public var method: GraphQLEnum<AffineGraphQL.BlobUploadMethod> { __data["method"] }
public var blobKey: String { __data["blobKey"] }
@@ -94,6 +100,9 @@ public class CreateBlobUploadMutation: GraphQLMutation {
.field("partNumber", Int.self),
.field("etag", String.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CreateBlobUploadMutation.Data.CreateBlobUpload.UploadedPart.self
] }
public var partNumber: Int { __data["partNumber"] }
public var etag: String { __data["etag"] }
@@ -37,6 +37,9 @@ public class CreateChangePasswordUrlMutation: GraphQLMutation {
"userId": .variable("userId")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CreateChangePasswordUrlMutation.Data.self
] }
/// Create change password url
public var createChangePasswordUrl: String { __data["createChangePasswordUrl"] }
@@ -26,6 +26,9 @@ public class CreateCheckoutSessionMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("createCheckoutSession", String.self, arguments: ["input": .variable("input")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CreateCheckoutSessionMutation.Data.self
] }
/// Create a subscription checkout link of stripe
public var createCheckoutSession: String { __data["createCheckoutSession"] }
@@ -26,6 +26,9 @@ public class CreateCommentMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("createComment", CreateComment.self, arguments: ["input": .variable("input")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CreateCommentMutation.Data.self
] }
public var createComment: CreateComment { __data["createComment"] }
@@ -47,6 +50,9 @@ public class CreateCommentMutation: GraphQLMutation {
.field("user", User.self),
.field("replies", [Reply].self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CreateCommentMutation.Data.CreateComment.self
] }
public var id: AffineGraphQL.ID { __data["id"] }
/// The content of the comment
@@ -76,6 +82,9 @@ public class CreateCommentMutation: GraphQLMutation {
.field("name", String.self),
.field("avatarUrl", String?.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CreateCommentMutation.Data.CreateComment.User.self
] }
public var id: String { __data["id"] }
public var name: String { __data["name"] }
@@ -99,6 +108,9 @@ public class CreateCommentMutation: GraphQLMutation {
.field("updatedAt", AffineGraphQL.DateTime.self),
.field("user", User.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CreateCommentMutation.Data.CreateComment.Reply.self
] }
public var commentId: AffineGraphQL.ID { __data["commentId"] }
public var id: AffineGraphQL.ID { __data["id"] }
@@ -125,6 +137,9 @@ public class CreateCommentMutation: GraphQLMutation {
.field("name", String.self),
.field("avatarUrl", String?.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CreateCommentMutation.Data.CreateComment.Reply.User.self
] }
public var id: String { __data["id"] }
public var name: String { __data["name"] }
@@ -37,6 +37,9 @@ public class CreateCopilotContextMutation: GraphQLMutation {
"sessionId": .variable("sessionId")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CreateCopilotContextMutation.Data.self
] }
/// Create a context session
public var createCopilotContext: String { __data["createCopilotContext"] }
@@ -26,6 +26,9 @@ public class CreateCopilotMessageMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("createCopilotMessage", String.self, arguments: ["options": .variable("options")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CreateCopilotMessageMutation.Data.self
] }
/// Create a chat message
public var createCopilotMessage: String { __data["createCopilotMessage"] }
@@ -26,8 +26,12 @@ public class CreateCopilotSessionMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("createCopilotSession", String.self, arguments: ["options": .variable("options")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CreateCopilotSessionMutation.Data.self
] }
/// Create a chat session
@available(*, deprecated, message: "use `createCopilotSessionWithHistory` instead")
public var createCopilotSession: String { __data["createCopilotSession"] }
}
}
@@ -0,0 +1,81 @@
// @generated
// This file was automatically generated and should not be edited.
@_exported import ApolloAPI
public class CreateCopilotSessionWithHistoryMutation: GraphQLMutation {
public static let operationName: String = "createCopilotSessionWithHistory"
public static let operationDocument: ApolloAPI.OperationDocument = .init(
definition: .init(
#"mutation createCopilotSessionWithHistory($options: CreateChatSessionInput!) { createCopilotSessionWithHistory(options: $options) { __typename ...CopilotChatHistory } }"#,
fragments: [CopilotChatHistory.self]
))
public var options: CreateChatSessionInput
public init(options: CreateChatSessionInput) {
self.options = options
}
public var __variables: Variables? { ["options": options] }
public struct Data: AffineGraphQL.SelectionSet {
public let __data: DataDict
public init(_dataDict: DataDict) { __data = _dataDict }
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.Mutation }
public static var __selections: [ApolloAPI.Selection] { [
.field("createCopilotSessionWithHistory", CreateCopilotSessionWithHistory.self, arguments: ["options": .variable("options")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CreateCopilotSessionWithHistoryMutation.Data.self
] }
/// Create a chat session and return full session payload
public var createCopilotSessionWithHistory: CreateCopilotSessionWithHistory { __data["createCopilotSessionWithHistory"] }
/// CreateCopilotSessionWithHistory
///
/// Parent Type: `CopilotHistories`
public struct CreateCopilotSessionWithHistory: AffineGraphQL.SelectionSet {
public let __data: DataDict
public init(_dataDict: DataDict) { __data = _dataDict }
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CopilotHistories }
public static var __selections: [ApolloAPI.Selection] { [
.field("__typename", String.self),
.fragment(CopilotChatHistory.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CreateCopilotSessionWithHistoryMutation.Data.CreateCopilotSessionWithHistory.self,
CopilotChatHistory.self
] }
public var sessionId: String { __data["sessionId"] }
public var workspaceId: String { __data["workspaceId"] }
public var docId: String? { __data["docId"] }
public var parentSessionId: String? { __data["parentSessionId"] }
public var promptName: String { __data["promptName"] }
public var model: String { __data["model"] }
public var optionalModels: [String] { __data["optionalModels"] }
/// An mark identifying which view to use to display the session
public var action: String? { __data["action"] }
public var pinned: Bool { __data["pinned"] }
public var title: String? { __data["title"] }
/// The number of tokens used in the session
public var tokens: Int { __data["tokens"] }
public var messages: [Message] { __data["messages"] }
public var createdAt: AffineGraphQL.DateTime { __data["createdAt"] }
public var updatedAt: AffineGraphQL.DateTime { __data["updatedAt"] }
public struct Fragments: FragmentContainer {
public let __data: DataDict
public init(_dataDict: DataDict) { __data = _dataDict }
public var copilotChatHistory: CopilotChatHistory { _toFragment() }
}
public typealias Message = CopilotChatHistory.Message
}
}
}
@@ -20,6 +20,9 @@ public class CreateCustomerPortalMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("createCustomerPortal", String.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CreateCustomerPortalMutation.Data.self
] }
/// Create a stripe customer portal to manage payment methods
public var createCustomerPortal: String { __data["createCustomerPortal"] }
@@ -37,6 +37,9 @@ public class CreateInviteLinkMutation: GraphQLMutation {
"expireTime": .variable("expireTime")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CreateInviteLinkMutation.Data.self
] }
public var createInviteLink: CreateInviteLink { __data["createInviteLink"] }
@@ -53,6 +56,9 @@ public class CreateInviteLinkMutation: GraphQLMutation {
.field("link", String.self),
.field("expireTime", AffineGraphQL.DateTime.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CreateInviteLinkMutation.Data.CreateInviteLink.self
] }
/// Invite link
public var link: String { __data["link"] }
@@ -26,6 +26,9 @@ public class CreateReplyMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("createReply", CreateReply.self, arguments: ["input": .variable("input")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CreateReplyMutation.Data.self
] }
public var createReply: CreateReply { __data["createReply"] }
@@ -46,6 +49,9 @@ public class CreateReplyMutation: GraphQLMutation {
.field("updatedAt", AffineGraphQL.DateTime.self),
.field("user", User.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CreateReplyMutation.Data.CreateReply.self
] }
public var commentId: AffineGraphQL.ID { __data["commentId"] }
public var id: AffineGraphQL.ID { __data["id"] }
@@ -72,6 +78,9 @@ public class CreateReplyMutation: GraphQLMutation {
.field("name", String.self),
.field("avatarUrl", String?.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CreateReplyMutation.Data.CreateReply.User.self
] }
public var id: String { __data["id"] }
public var name: String { __data["name"] }
@@ -26,6 +26,9 @@ public class CreateSelfhostCustomerPortalMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("createSelfhostWorkspaceCustomerPortal", String.self, arguments: ["workspaceId": .variable("workspaceId")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CreateSelfhostCustomerPortalMutation.Data.self
] }
public var createSelfhostWorkspaceCustomerPortal: String { __data["createSelfhostWorkspaceCustomerPortal"] }
}
@@ -26,6 +26,9 @@ public class CreateUserMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("createUser", CreateUser.self, arguments: ["input": .variable("input")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CreateUserMutation.Data.self
] }
/// Create a new user
public var createUser: CreateUser { __data["createUser"] }
@@ -42,6 +45,9 @@ public class CreateUserMutation: GraphQLMutation {
.field("__typename", String.self),
.field("id", AffineGraphQL.ID.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CreateUserMutation.Data.CreateUser.self
] }
public var id: AffineGraphQL.ID { __data["id"] }
}
@@ -20,6 +20,9 @@ public class CreateWorkspaceMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("createWorkspace", CreateWorkspace.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CreateWorkspaceMutation.Data.self
] }
/// Create a new workspace
public var createWorkspace: CreateWorkspace { __data["createWorkspace"] }
@@ -38,6 +41,9 @@ public class CreateWorkspaceMutation: GraphQLMutation {
.field("public", Bool.self),
.field("createdAt", AffineGraphQL.DateTime.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
CreateWorkspaceMutation.Data.CreateWorkspace.self
] }
public var id: AffineGraphQL.ID { __data["id"] }
/// is Public workspace
@@ -26,6 +26,9 @@ public class DeactivateLicenseMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("deactivateLicense", Bool.self, arguments: ["workspaceId": .variable("workspaceId")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
DeactivateLicenseMutation.Data.self
] }
public var deactivateLicense: Bool { __data["deactivateLicense"] }
}
@@ -20,6 +20,9 @@ public class DeleteAccountMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("deleteAccount", DeleteAccount.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
DeleteAccountMutation.Data.self
] }
public var deleteAccount: DeleteAccount { __data["deleteAccount"] }
@@ -35,6 +38,9 @@ public class DeleteAccountMutation: GraphQLMutation {
.field("__typename", String.self),
.field("success", Bool.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
DeleteAccountMutation.Data.DeleteAccount.self
] }
public var success: Bool { __data["success"] }
}
@@ -42,6 +42,9 @@ public class DeleteBlobMutation: GraphQLMutation {
"permanently": .variable("permanently")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
DeleteBlobMutation.Data.self
] }
public var deleteBlob: Bool { __data["deleteBlob"] }
}
@@ -26,6 +26,9 @@ public class DeleteCommentMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("deleteComment", Bool.self, arguments: ["id": .variable("id")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
DeleteCommentMutation.Data.self
] }
/// Delete a comment
public var deleteComment: Bool { __data["deleteComment"] }
@@ -26,6 +26,9 @@ public class DeleteReplyMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("deleteReply", Bool.self, arguments: ["id": .variable("id")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
DeleteReplyMutation.Data.self
] }
/// Delete a reply
public var deleteReply: Bool { __data["deleteReply"] }
@@ -26,6 +26,9 @@ public class DeleteUserMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("deleteUser", DeleteUser.self, arguments: ["id": .variable("id")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
DeleteUserMutation.Data.self
] }
/// Delete a user account
public var deleteUser: DeleteUser { __data["deleteUser"] }
@@ -42,6 +45,9 @@ public class DeleteUserMutation: GraphQLMutation {
.field("__typename", String.self),
.field("success", Bool.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
DeleteUserMutation.Data.DeleteUser.self
] }
public var success: Bool { __data["success"] }
}
@@ -26,6 +26,9 @@ public class DeleteWorkspaceMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("deleteWorkspace", Bool.self, arguments: ["id": .variable("id")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
DeleteWorkspaceMutation.Data.self
] }
public var deleteWorkspace: Bool { __data["deleteWorkspace"] }
}
@@ -26,6 +26,9 @@ public class DisableUserMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("banUser", BanUser.self, arguments: ["id": .variable("id")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
DisableUserMutation.Data.self
] }
/// Ban an user
public var banUser: BanUser { __data["banUser"] }
@@ -43,6 +46,9 @@ public class DisableUserMutation: GraphQLMutation {
.field("email", String.self),
.field("disabled", Bool.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
DisableUserMutation.Data.BanUser.self
] }
/// User email
public var email: String { __data["email"] }
@@ -26,6 +26,9 @@ public class EnableUserMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("enableUser", EnableUser.self, arguments: ["id": .variable("id")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
EnableUserMutation.Data.self
] }
/// Reenable an banned user
public var enableUser: EnableUser { __data["enableUser"] }
@@ -43,6 +46,9 @@ public class EnableUserMutation: GraphQLMutation {
.field("email", String.self),
.field("disabled", Bool.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
EnableUserMutation.Data.EnableUser.self
] }
/// User email
public var email: String { __data["email"] }
@@ -26,6 +26,9 @@ public class ForkCopilotSessionMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("forkCopilotSession", String.self, arguments: ["options": .variable("options")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ForkCopilotSessionMutation.Data.self
] }
/// Create a chat session
public var forkCopilotSession: String { __data["forkCopilotSession"] }
@@ -26,6 +26,9 @@ public class GenerateLicenseKeyMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("generateLicenseKey", String.self, arguments: ["sessionId": .variable("sessionId")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
GenerateLicenseKeyMutation.Data.self
] }
public var generateLicenseKey: String { __data["generateLicenseKey"] }
}
@@ -26,6 +26,9 @@ public class GenerateUserAccessTokenMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("generateUserAccessToken", GenerateUserAccessToken.self, arguments: ["input": .variable("input")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
GenerateUserAccessTokenMutation.Data.self
] }
public var generateUserAccessToken: GenerateUserAccessToken { __data["generateUserAccessToken"] }
@@ -45,6 +48,9 @@ public class GenerateUserAccessTokenMutation: GraphQLMutation {
.field("createdAt", AffineGraphQL.DateTime.self),
.field("expiresAt", AffineGraphQL.DateTime?.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
GenerateUserAccessTokenMutation.Data.GenerateUserAccessToken.self
] }
public var id: String { __data["id"] }
public var name: String { __data["name"] }
@@ -26,6 +26,9 @@ public class GrantDocUserRolesMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("grantDocUserRoles", Bool.self, arguments: ["input": .variable("input")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
GrantDocUserRolesMutation.Data.self
] }
public var grantDocUserRoles: Bool { __data["grantDocUserRoles"] }
}
@@ -42,6 +42,9 @@ public class GrantWorkspaceTeamMemberMutation: GraphQLMutation {
"permission": .variable("permission")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
GrantWorkspaceTeamMemberMutation.Data.self
] }
public var grantMember: Bool { __data["grantMember"] }
}
@@ -26,6 +26,9 @@ public class ImportUsersMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("importUsers", [ImportUser].self, arguments: ["input": .variable("input")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ImportUsersMutation.Data.self
] }
/// import users
public var importUsers: [ImportUser] { __data["importUsers"] }
@@ -43,6 +46,9 @@ public class ImportUsersMutation: GraphQLMutation {
.inlineFragment(AsUserType.self),
.inlineFragment(AsUserImportFailedType.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ImportUsersMutation.Data.ImportUser.self
] }
public var asUserType: AsUserType? { _asInlineFragment() }
public var asUserImportFailedType: AsUserImportFailedType? { _asInlineFragment() }
@@ -61,6 +67,10 @@ public class ImportUsersMutation: GraphQLMutation {
.field("name", String.self),
.field("email", String.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ImportUsersMutation.Data.ImportUser.self,
ImportUsersMutation.Data.ImportUser.AsUserType.self
] }
public var id: AffineGraphQL.ID { __data["id"] }
/// User name
@@ -82,6 +92,10 @@ public class ImportUsersMutation: GraphQLMutation {
.field("email", String.self),
.field("error", String.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ImportUsersMutation.Data.ImportUser.self,
ImportUsersMutation.Data.ImportUser.AsUserImportFailedType.self
] }
public var email: String { __data["email"] }
public var error: String { __data["error"] }
@@ -38,6 +38,9 @@ public class InstallLicenseMutation: GraphQLMutation {
"license": .variable("license")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
InstallLicenseMutation.Data.self
] }
public var installLicense: InstallLicense { __data["installLicense"] }
@@ -53,6 +56,10 @@ public class InstallLicenseMutation: GraphQLMutation {
.field("__typename", String.self),
.fragment(LicenseBody.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
InstallLicenseMutation.Data.InstallLicense.self,
LicenseBody.self
] }
public var expiredAt: AffineGraphQL.DateTime? { __data["expiredAt"] }
public var installedAt: AffineGraphQL.DateTime { __data["installedAt"] }
@@ -37,6 +37,9 @@ public class InviteByEmailsMutation: GraphQLMutation {
"emails": .variable("emails")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
InviteByEmailsMutation.Data.self
] }
public var inviteMembers: [InviteMember] { __data["inviteMembers"] }
@@ -54,6 +57,9 @@ public class InviteByEmailsMutation: GraphQLMutation {
.field("inviteId", String?.self),
.field("sentSuccess", Bool.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
InviteByEmailsMutation.Data.InviteMember.self
] }
public var email: String { __data["email"] }
/// Invite id, null if invite record create failed
@@ -38,6 +38,9 @@ public class LeaveWorkspaceMutation: GraphQLMutation {
"sendLeaveMail": .variable("sendLeaveMail")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
LeaveWorkspaceMutation.Data.self
] }
public var leaveWorkspace: Bool { __data["leaveWorkspace"] }
}
@@ -26,6 +26,9 @@ public class LinkCalDavAccountMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("linkCalDAVAccount", LinkCalDAVAccount.self, arguments: ["input": .variable("input")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
LinkCalDavAccountMutation.Data.self
] }
public var linkCalDAVAccount: LinkCalDAVAccount { __data["linkCalDAVAccount"] }
@@ -51,6 +54,9 @@ public class LinkCalDavAccountMutation: GraphQLMutation {
.field("createdAt", AffineGraphQL.DateTime.self),
.field("updatedAt", AffineGraphQL.DateTime.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
LinkCalDavAccountMutation.Data.LinkCalDAVAccount.self
] }
public var id: String { __data["id"] }
public var provider: GraphQLEnum<AffineGraphQL.CalendarProviderType> { __data["provider"] }
@@ -26,6 +26,9 @@ public class LinkCalendarAccountMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("linkCalendarAccount", String.self, arguments: ["input": .variable("input")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
LinkCalendarAccountMutation.Data.self
] }
public var linkCalendarAccount: String { __data["linkCalendarAccount"] }
}
@@ -26,6 +26,9 @@ public class MentionUserMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("mentionUser", AffineGraphQL.ID.self, arguments: ["input": .variable("input")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
MentionUserMutation.Data.self
] }
/// mention user in a doc
public var mentionUser: AffineGraphQL.ID { __data["mentionUser"] }
@@ -42,6 +42,9 @@ public class PublishPageMutation: GraphQLMutation {
"mode": .variable("mode")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
PublishPageMutation.Data.self
] }
public var publishDoc: PublishDoc { __data["publishDoc"] }
@@ -58,6 +61,9 @@ public class PublishPageMutation: GraphQLMutation {
.field("id", String.self),
.field("mode", GraphQLEnum<AffineGraphQL.PublicDocMode>.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
PublishPageMutation.Data.PublishDoc.self
] }
public var id: String { __data["id"] }
public var mode: GraphQLEnum<AffineGraphQL.PublicDocMode> { __data["mode"] }
@@ -37,6 +37,9 @@ public class QueueWorkspaceEmbeddingMutation: GraphQLMutation {
"docId": .variable("docId")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
QueueWorkspaceEmbeddingMutation.Data.self
] }
/// queue workspace doc embedding
public var queueWorkspaceEmbedding: Bool { __data["queueWorkspaceEmbedding"] }
@@ -20,6 +20,9 @@ public class ReadAllNotificationsMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("readAllNotifications", Bool.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ReadAllNotificationsMutation.Data.self
] }
/// mark all notifications as read
public var readAllNotifications: Bool { __data["readAllNotifications"] }
@@ -26,6 +26,9 @@ public class ReadNotificationMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("readNotification", Bool.self, arguments: ["id": .variable("id")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ReadNotificationMutation.Data.self
] }
/// mark notification as read
public var readNotification: Bool { __data["readNotification"] }
@@ -42,6 +42,9 @@ public class RecoverDocMutation: GraphQLMutation {
"timestamp": .variable("timestamp")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
RecoverDocMutation.Data.self
] }
public var recoverDoc: AffineGraphQL.DateTime { __data["recoverDoc"] }
}
@@ -20,6 +20,9 @@ public class RefreshSubscriptionMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("refreshUserSubscriptions", [RefreshUserSubscription].self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
RefreshSubscriptionMutation.Data.self
] }
/// Refresh current user subscriptions and return latest.
public var refreshUserSubscriptions: [RefreshUserSubscription] { __data["refreshUserSubscriptions"] }
@@ -44,6 +47,9 @@ public class RefreshSubscriptionMutation: GraphQLMutation {
.field("canceledAt", AffineGraphQL.DateTime?.self),
.field("variant", GraphQLEnum<AffineGraphQL.SubscriptionVariant>?.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
RefreshSubscriptionMutation.Data.RefreshUserSubscription.self
] }
@available(*, deprecated, message: "removed")
public var id: String? { __data["id"] }
@@ -26,6 +26,9 @@ public class ReleaseDeletedBlobsMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("releaseDeletedBlobs", Bool.self, arguments: ["workspaceId": .variable("workspaceId")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ReleaseDeletedBlobsMutation.Data.self
] }
public var releaseDeletedBlobs: Bool { __data["releaseDeletedBlobs"] }
}
@@ -20,6 +20,9 @@ public class RemoveAvatarMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("removeAvatar", RemoveAvatar.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
RemoveAvatarMutation.Data.self
] }
/// Remove user avatar
public var removeAvatar: RemoveAvatar { __data["removeAvatar"] }
@@ -36,6 +39,9 @@ public class RemoveAvatarMutation: GraphQLMutation {
.field("__typename", String.self),
.field("success", Bool.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
RemoveAvatarMutation.Data.RemoveAvatar.self
] }
public var success: Bool { __data["success"] }
}
@@ -26,6 +26,9 @@ public class RemoveContextBlobMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("removeContextBlob", Bool.self, arguments: ["options": .variable("options")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
RemoveContextBlobMutation.Data.self
] }
/// remove a blob from context
public var removeContextBlob: Bool { __data["removeContextBlob"] }
@@ -26,6 +26,9 @@ public class RemoveContextCategoryMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("removeContextCategory", Bool.self, arguments: ["options": .variable("options")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
RemoveContextCategoryMutation.Data.self
] }
/// remove a category from context
public var removeContextCategory: Bool { __data["removeContextCategory"] }
@@ -26,6 +26,9 @@ public class RemoveContextDocMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("removeContextDoc", Bool.self, arguments: ["options": .variable("options")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
RemoveContextDocMutation.Data.self
] }
/// remove a doc from context
public var removeContextDoc: Bool { __data["removeContextDoc"] }
@@ -26,6 +26,9 @@ public class RemoveContextFileMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("removeContextFile", Bool.self, arguments: ["options": .variable("options")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
RemoveContextFileMutation.Data.self
] }
/// remove a file from context
public var removeContextFile: Bool { __data["removeContextFile"] }
@@ -37,6 +37,9 @@ public class RemoveWorkspaceEmbeddingFilesMutation: GraphQLMutation {
"fileId": .variable("fileId")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
RemoveWorkspaceEmbeddingFilesMutation.Data.self
] }
/// Remove workspace embedding files
public var removeWorkspaceEmbeddingFiles: Bool { __data["removeWorkspaceEmbeddingFiles"] }
@@ -37,6 +37,9 @@ public class RemoveWorkspaceEmbeddingIgnoredDocsMutation: GraphQLMutation {
"remove": .variable("remove")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
RemoveWorkspaceEmbeddingIgnoredDocsMutation.Data.self
] }
/// Update ignored docs
public var updateWorkspaceEmbeddingIgnoredDocs: Int { __data["updateWorkspaceEmbeddingIgnoredDocs"] }
@@ -26,6 +26,9 @@ public class RequestApplySubscriptionMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("requestApplySubscription", [RequestApplySubscription].self, arguments: ["transactionId": .variable("transactionId")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
RequestApplySubscriptionMutation.Data.self
] }
/// Request to apply the subscription in advance
public var requestApplySubscription: [RequestApplySubscription] { __data["requestApplySubscription"] }
@@ -50,6 +53,9 @@ public class RequestApplySubscriptionMutation: GraphQLMutation {
.field("canceledAt", AffineGraphQL.DateTime?.self),
.field("variant", GraphQLEnum<AffineGraphQL.SubscriptionVariant>?.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
RequestApplySubscriptionMutation.Data.RequestApplySubscription.self
] }
@available(*, deprecated, message: "removed")
public var id: String? { __data["id"] }
@@ -26,6 +26,9 @@ public class ResolveCommentMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("resolveComment", Bool.self, arguments: ["input": .variable("input")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ResolveCommentMutation.Data.self
] }
/// Resolve a comment or not
public var resolveComment: Bool { __data["resolveComment"] }
@@ -37,6 +37,9 @@ public class ResumeSubscriptionMutation: GraphQLMutation {
"workspaceId": .variable("workspaceId")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ResumeSubscriptionMutation.Data.self
] }
public var resumeSubscription: ResumeSubscription { __data["resumeSubscription"] }
@@ -56,6 +59,9 @@ public class ResumeSubscriptionMutation: GraphQLMutation {
.field("start", AffineGraphQL.DateTime.self),
.field("end", AffineGraphQL.DateTime?.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
ResumeSubscriptionMutation.Data.ResumeSubscription.self
] }
@available(*, deprecated, message: "removed")
public var id: String? { __data["id"] }
@@ -37,6 +37,9 @@ public class RetryAudioTranscriptionMutation: GraphQLMutation {
"jobId": .variable("jobId")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
RetryAudioTranscriptionMutation.Data.self
] }
public var retryAudioTranscription: RetryAudioTranscription? { __data["retryAudioTranscription"] }
@@ -53,6 +56,9 @@ public class RetryAudioTranscriptionMutation: GraphQLMutation {
.field("id", AffineGraphQL.ID.self),
.field("status", GraphQLEnum<AffineGraphQL.AiJobStatus>.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
RetryAudioTranscriptionMutation.Data.RetryAudioTranscription.self
] }
public var id: AffineGraphQL.ID { __data["id"] }
public var status: GraphQLEnum<AffineGraphQL.AiJobStatus> { __data["status"] }
@@ -26,6 +26,9 @@ public class RevokeDocUserRolesMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("revokeDocUserRoles", Bool.self, arguments: ["input": .variable("input")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
RevokeDocUserRolesMutation.Data.self
] }
public var revokeDocUserRoles: Bool { __data["revokeDocUserRoles"] }
}
@@ -26,6 +26,9 @@ public class RevokeInviteLinkMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("revokeInviteLink", Bool.self, arguments: ["workspaceId": .variable("workspaceId")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
RevokeInviteLinkMutation.Data.self
] }
public var revokeInviteLink: Bool { __data["revokeInviteLink"] }
}
@@ -37,6 +37,9 @@ public class RevokeMemberPermissionMutation: GraphQLMutation {
"userId": .variable("userId")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
RevokeMemberPermissionMutation.Data.self
] }
public var revokeMember: Bool { __data["revokeMember"] }
}
@@ -37,6 +37,9 @@ public class RevokePublicPageMutation: GraphQLMutation {
"docId": .variable("pageId")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
RevokePublicPageMutation.Data.self
] }
public var revokePublicDoc: RevokePublicDoc { __data["revokePublicDoc"] }
@@ -54,6 +57,9 @@ public class RevokePublicPageMutation: GraphQLMutation {
.field("mode", GraphQLEnum<AffineGraphQL.PublicDocMode>.self),
.field("public", Bool.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
RevokePublicPageMutation.Data.RevokePublicDoc.self
] }
public var id: String { __data["id"] }
public var mode: GraphQLEnum<AffineGraphQL.PublicDocMode> { __data["mode"] }
@@ -26,6 +26,9 @@ public class RevokeUserAccessTokenMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("revokeUserAccessToken", Bool.self, arguments: ["id": .variable("id")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
RevokeUserAccessTokenMutation.Data.self
] }
public var revokeUserAccessToken: Bool { __data["revokeUserAccessToken"] }
}
@@ -26,6 +26,9 @@ public class SendChangeEmailMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("sendChangeEmail", Bool.self, arguments: ["callbackUrl": .variable("callbackUrl")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
SendChangeEmailMutation.Data.self
] }
public var sendChangeEmail: Bool { __data["sendChangeEmail"] }
}
@@ -26,6 +26,9 @@ public class SendChangePasswordEmailMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("sendChangePasswordEmail", Bool.self, arguments: ["callbackUrl": .variable("callbackUrl")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
SendChangePasswordEmailMutation.Data.self
] }
public var sendChangePasswordEmail: Bool { __data["sendChangePasswordEmail"] }
}
@@ -26,6 +26,9 @@ public class SendSetPasswordEmailMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("sendSetPasswordEmail", Bool.self, arguments: ["callbackUrl": .variable("callbackUrl")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
SendSetPasswordEmailMutation.Data.self
] }
public var sendSetPasswordEmail: Bool { __data["sendSetPasswordEmail"] }
}
@@ -57,6 +57,9 @@ public class SendTestEmailMutation: GraphQLMutation {
"ignoreTLS": .variable("ignoreTLS")
]]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
SendTestEmailMutation.Data.self
] }
public var sendTestEmail: Bool { __data["sendTestEmail"] }
}
@@ -42,6 +42,9 @@ public class SendVerifyChangeEmailMutation: GraphQLMutation {
"callbackUrl": .variable("callbackUrl")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
SendVerifyChangeEmailMutation.Data.self
] }
public var sendVerifyChangeEmail: Bool { __data["sendVerifyChangeEmail"] }
}
@@ -26,6 +26,9 @@ public class SendVerifyEmailMutation: GraphQLMutation {
public static var __selections: [ApolloAPI.Selection] { [
.field("sendVerifyEmail", Bool.self, arguments: ["callbackUrl": .variable("callbackUrl")]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
SendVerifyEmailMutation.Data.self
] }
public var sendVerifyEmail: Bool { __data["sendVerifyEmail"] }
}
@@ -37,6 +37,9 @@ public class SetBlobMutation: GraphQLMutation {
"blob": .variable("blob")
]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
SetBlobMutation.Data.self
] }
public var setBlob: String { __data["setBlob"] }
}
@@ -37,6 +37,9 @@ public class SetEnableAiMutation: GraphQLMutation {
"enableAi": .variable("enableAi")
]]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
SetEnableAiMutation.Data.self
] }
/// Update workspace
public var updateWorkspace: UpdateWorkspace { __data["updateWorkspace"] }
@@ -53,6 +56,9 @@ public class SetEnableAiMutation: GraphQLMutation {
.field("__typename", String.self),
.field("id", AffineGraphQL.ID.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
SetEnableAiMutation.Data.UpdateWorkspace.self
] }
public var id: AffineGraphQL.ID { __data["id"] }
}
@@ -37,6 +37,9 @@ public class SetEnableDocEmbeddingMutation: GraphQLMutation {
"enableDocEmbedding": .variable("enableDocEmbedding")
]]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
SetEnableDocEmbeddingMutation.Data.self
] }
/// Update workspace
public var updateWorkspace: UpdateWorkspace { __data["updateWorkspace"] }
@@ -53,6 +56,9 @@ public class SetEnableDocEmbeddingMutation: GraphQLMutation {
.field("__typename", String.self),
.field("id", AffineGraphQL.ID.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
SetEnableDocEmbeddingMutation.Data.UpdateWorkspace.self
] }
public var id: AffineGraphQL.ID { __data["id"] }
}
@@ -37,6 +37,9 @@ public class SetEnableSharingMutation: GraphQLMutation {
"enableSharing": .variable("enableSharing")
]]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
SetEnableSharingMutation.Data.self
] }
/// Update workspace
public var updateWorkspace: UpdateWorkspace { __data["updateWorkspace"] }
@@ -53,6 +56,9 @@ public class SetEnableSharingMutation: GraphQLMutation {
.field("__typename", String.self),
.field("id", AffineGraphQL.ID.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
SetEnableSharingMutation.Data.UpdateWorkspace.self
] }
public var id: AffineGraphQL.ID { __data["id"] }
}
@@ -37,6 +37,9 @@ public class SetEnableUrlPreviewMutation: GraphQLMutation {
"enableUrlPreview": .variable("enableUrlPreview")
]]),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
SetEnableUrlPreviewMutation.Data.self
] }
/// Update workspace
public var updateWorkspace: UpdateWorkspace { __data["updateWorkspace"] }
@@ -53,6 +56,9 @@ public class SetEnableUrlPreviewMutation: GraphQLMutation {
.field("__typename", String.self),
.field("id", AffineGraphQL.ID.self),
] }
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
SetEnableUrlPreviewMutation.Data.UpdateWorkspace.self
] }
public var id: AffineGraphQL.ID { __data["id"] }
}

Some files were not shown because too many files have changed in this diff Show More