|
| 1 | +/** |
| 2 | + * This file was generated by kysely-codegen. |
| 3 | + * Please do not edit it manually. |
| 4 | + */ |
| 5 | + |
| 6 | +import type { ColumnType } from "kysely"; |
| 7 | + |
| 8 | +export enum Agentidentifiertype { |
| 9 | + Email = "email", |
| 10 | + Orcid = "orcid", |
| 11 | +} |
| 12 | + |
| 13 | +export enum Agenttype { |
| 14 | + Anonymous = "anonymous", |
| 15 | + AutomatedAgent = "automated_agent", |
| 16 | + Organization = "organization", |
| 17 | + Person = "person", |
| 18 | +} |
| 19 | + |
| 20 | +export enum Contentvariant { |
| 21 | + Direct = "direct", |
| 22 | + DirectAndChildren = "direct_and_children", |
| 23 | + DirectAndDescription = "direct_and_description", |
| 24 | +} |
| 25 | + |
| 26 | +export enum Embeddingname { |
| 27 | + OpenaiTextEmbedding3Large1024 = "openai_text_embedding_3_large_1024", |
| 28 | + OpenaiTextEmbedding3Large256 = "openai_text_embedding_3_large_256", |
| 29 | + OpenaiTextEmbedding3Large3072 = "openai_text_embedding_3_large_3072", |
| 30 | + OpenaiTextEmbedding3Small1536 = "openai_text_embedding_3_small_1536", |
| 31 | + OpenaiTextEmbedding3Small512 = "openai_text_embedding_3_small_512", |
| 32 | + OpenaiTextEmbeddingAda21536 = "openai_text_embedding_ada2_1536", |
| 33 | +} |
| 34 | + |
| 35 | +export enum Entitytype { |
| 36 | + AutomatedAgent = "AutomatedAgent", |
| 37 | + Concept = "Concept", |
| 38 | + ConceptSchema = "ConceptSchema", |
| 39 | + Content = "Content", |
| 40 | + ContentLink = "ContentLink", |
| 41 | + Document = "Document", |
| 42 | + Occurrence = "Occurrence", |
| 43 | + Person = "Person", |
| 44 | + Platform = "Platform", |
| 45 | + PlatformAccount = "PlatformAccount", |
| 46 | + Space = "Space", |
| 47 | +} |
| 48 | + |
| 49 | +export enum Epistemicstatus { |
| 50 | + Certain = "certain", |
| 51 | + CertainlyNot = "certainly_not", |
| 52 | + Contentious = "contentious", |
| 53 | + CouldBeFalse = "could_be_false", |
| 54 | + CouldBeTrue = "could_be_true", |
| 55 | + StrongEvidenceAgainst = "strong_evidence_against", |
| 56 | + StrongEvidenceFor = "strong_evidence_for", |
| 57 | + Uncertain = "uncertain", |
| 58 | + Unknown = "unknown", |
| 59 | +} |
| 60 | + |
| 61 | +export enum Platform { |
| 62 | + Obsidian = "Obsidian", |
| 63 | + Roam = "Roam", |
| 64 | +} |
| 65 | + |
| 66 | +export enum Scale { |
| 67 | + Block = "block", |
| 68 | + ChunkUnit = "chunk_unit", |
| 69 | + Document = "document", |
| 70 | + Field = "field", |
| 71 | + Paragraph = "paragraph", |
| 72 | + Phrase = "phrase", |
| 73 | + Post = "post", |
| 74 | + Quote = "quote", |
| 75 | + Section = "section", |
| 76 | + Sentence = "sentence", |
| 77 | +} |
| 78 | + |
| 79 | +export enum TaskStatus { |
| 80 | + Active = "active", |
| 81 | + Complete = "complete", |
| 82 | + Failed = "failed", |
| 83 | + Timeout = "timeout", |
| 84 | +} |
| 85 | + |
| 86 | +export type ArrayType<T> = ArrayTypeImpl<T> extends (infer U)[] |
| 87 | + ? U[] |
| 88 | + : ArrayTypeImpl<T>; |
| 89 | + |
| 90 | +export type ArrayTypeImpl<T> = T extends ColumnType<infer S, infer I, infer U> |
| 91 | + ? ColumnType<S[], I[], U[]> |
| 92 | + : T[]; |
| 93 | + |
| 94 | +export type Generated<T> = T extends ColumnType<infer S, infer I, infer U> |
| 95 | + ? ColumnType<S, I | undefined, U> |
| 96 | + : ColumnType<T, T | undefined, T>; |
| 97 | + |
| 98 | +export type Int8 = ColumnType<string, bigint | number | string, bigint | number | string>; |
| 99 | + |
| 100 | +export type Json = JsonValue; |
| 101 | + |
| 102 | +export type JsonArray = JsonValue[]; |
| 103 | + |
| 104 | +export type JsonObject = { |
| 105 | + [x: string]: JsonValue | undefined; |
| 106 | +}; |
| 107 | + |
| 108 | +export type JsonPrimitive = boolean | number | string | null; |
| 109 | + |
| 110 | +export type JsonValue = JsonArray | JsonObject | JsonPrimitive; |
| 111 | + |
| 112 | +export type Timestamp = ColumnType<Date, Date | string, Date | string>; |
| 113 | + |
| 114 | +export interface AccessToken { |
| 115 | + accessToken: string; |
| 116 | + code: string | null; |
| 117 | + createdDate: Generated<Timestamp>; |
| 118 | + platformAccountId: Int8 | null; |
| 119 | + requestId: string; |
| 120 | +} |
| 121 | + |
| 122 | +export interface AgentIdentifier { |
| 123 | + accountId: Int8; |
| 124 | + identifierType: Agentidentifiertype; |
| 125 | + trusted: Generated<boolean>; |
| 126 | + value: string; |
| 127 | +} |
| 128 | + |
| 129 | +export interface Concept { |
| 130 | + arity: Generated<number | null>; |
| 131 | + /** |
| 132 | + * The author of content |
| 133 | + */ |
| 134 | + authorId: Int8 | null; |
| 135 | + /** |
| 136 | + * The time when the content was created in the remote source |
| 137 | + */ |
| 138 | + created: Timestamp; |
| 139 | + description: string | null; |
| 140 | + epistemicStatus: Generated<Epistemicstatus>; |
| 141 | + id: Generated<Int8>; |
| 142 | + isSchema: Generated<boolean>; |
| 143 | + /** |
| 144 | + * The last time the content was modified in the remote source |
| 145 | + */ |
| 146 | + lastModified: Timestamp; |
| 147 | + literalContent: Generated<Json>; |
| 148 | + name: string; |
| 149 | + referenceContent: Generated<Json>; |
| 150 | + refs: Generated<ArrayType<Int8>>; |
| 151 | + representedById: Int8 | null; |
| 152 | + schemaId: Int8 | null; |
| 153 | + /** |
| 154 | + * The space in which the content is located |
| 155 | + */ |
| 156 | + spaceId: Int8; |
| 157 | +} |
| 158 | + |
| 159 | +export interface ConceptContributors { |
| 160 | + conceptId: Int8; |
| 161 | + contributorId: Int8; |
| 162 | +} |
| 163 | + |
| 164 | +export interface Content { |
| 165 | + /** |
| 166 | + * The author of content |
| 167 | + */ |
| 168 | + authorId: Int8 | null; |
| 169 | + /** |
| 170 | + * The time when the content was created in the remote source |
| 171 | + */ |
| 172 | + created: Timestamp; |
| 173 | + /** |
| 174 | + * The creator of a logical structure, such as a content subdivision |
| 175 | + */ |
| 176 | + creatorId: Int8 | null; |
| 177 | + documentId: Int8; |
| 178 | + id: Generated<Int8>; |
| 179 | + /** |
| 180 | + * The last time the content was modified in the remote source |
| 181 | + */ |
| 182 | + lastModified: Timestamp; |
| 183 | + metadata: Generated<Json>; |
| 184 | + /** |
| 185 | + * This content is part of a larger content unit |
| 186 | + */ |
| 187 | + partOfId: Int8 | null; |
| 188 | + scale: Scale; |
| 189 | + /** |
| 190 | + * The unique identifier of the content in the remote source |
| 191 | + */ |
| 192 | + sourceLocalId: string | null; |
| 193 | + /** |
| 194 | + * The space in which the content is located |
| 195 | + */ |
| 196 | + spaceId: Int8 | null; |
| 197 | + text: string; |
| 198 | + variant: Generated<Contentvariant>; |
| 199 | +} |
| 200 | + |
| 201 | +export interface ContentContributors { |
| 202 | + contentId: Int8; |
| 203 | + contributorId: Int8; |
| 204 | +} |
| 205 | + |
| 206 | +export interface ContentEmbeddingOpenaiTextEmbedding3Small1536 { |
| 207 | + model: Generated<Embeddingname>; |
| 208 | + obsolete: Generated<boolean | null>; |
| 209 | + targetId: Int8; |
| 210 | + vector: string; |
| 211 | +} |
| 212 | + |
| 213 | +export interface Document { |
| 214 | + /** |
| 215 | + * The author of content |
| 216 | + */ |
| 217 | + authorId: Int8; |
| 218 | + /** |
| 219 | + * A large object OID for the downloaded raw content |
| 220 | + */ |
| 221 | + contents: number | null; |
| 222 | + /** |
| 223 | + * The time when the content was created in the remote source |
| 224 | + */ |
| 225 | + created: Timestamp; |
| 226 | + id: Generated<Int8>; |
| 227 | + /** |
| 228 | + * The last time the content was modified in the remote source |
| 229 | + */ |
| 230 | + lastModified: Timestamp; |
| 231 | + metadata: Generated<Json>; |
| 232 | + /** |
| 233 | + * The unique identifier of the content in the remote source |
| 234 | + */ |
| 235 | + sourceLocalId: string | null; |
| 236 | + /** |
| 237 | + * The space in which the content is located |
| 238 | + */ |
| 239 | + spaceId: Int8 | null; |
| 240 | + url: string | null; |
| 241 | +} |
| 242 | + |
| 243 | +export interface MyAccounts { |
| 244 | + accountLocalId: string | null; |
| 245 | + active: boolean | null; |
| 246 | + agentType: Agenttype | null; |
| 247 | + dgAccount: string | null; |
| 248 | + id: Int8 | null; |
| 249 | + metadata: Json | null; |
| 250 | + name: string | null; |
| 251 | + platform: Platform | null; |
| 252 | + writePermission: boolean | null; |
| 253 | +} |
| 254 | + |
| 255 | +export interface MyConcepts { |
| 256 | + arity: number | null; |
| 257 | + authorId: Int8 | null; |
| 258 | + created: Timestamp | null; |
| 259 | + description: string | null; |
| 260 | + epistemicStatus: Epistemicstatus | null; |
| 261 | + id: Int8 | null; |
| 262 | + isSchema: boolean | null; |
| 263 | + lastModified: Timestamp | null; |
| 264 | + literalContent: Json | null; |
| 265 | + name: string | null; |
| 266 | + referenceContent: Json | null; |
| 267 | + refs: ArrayType<Int8> | null; |
| 268 | + representedById: Int8 | null; |
| 269 | + schemaId: Int8 | null; |
| 270 | + spaceId: Int8 | null; |
| 271 | +} |
| 272 | + |
| 273 | +export interface MyContents { |
| 274 | + authorId: Int8 | null; |
| 275 | + created: Timestamp | null; |
| 276 | + creatorId: Int8 | null; |
| 277 | + documentId: Int8 | null; |
| 278 | + id: Int8 | null; |
| 279 | + lastModified: Timestamp | null; |
| 280 | + metadata: Json | null; |
| 281 | + partOfId: Int8 | null; |
| 282 | + scale: Scale | null; |
| 283 | + sourceLocalId: string | null; |
| 284 | + spaceId: Int8 | null; |
| 285 | + text: string | null; |
| 286 | + variant: Contentvariant | null; |
| 287 | +} |
| 288 | + |
| 289 | +export interface MyContentsWithEmbeddingOpenaiTextEmbedding3Small1536 { |
| 290 | + authorId: Int8 | null; |
| 291 | + created: Timestamp | null; |
| 292 | + creatorId: Int8 | null; |
| 293 | + documentId: Int8 | null; |
| 294 | + id: Int8 | null; |
| 295 | + lastModified: Timestamp | null; |
| 296 | + metadata: Json | null; |
| 297 | + model: Embeddingname | null; |
| 298 | + partOfId: Int8 | null; |
| 299 | + scale: Scale | null; |
| 300 | + sourceLocalId: string | null; |
| 301 | + spaceId: Int8 | null; |
| 302 | + text: string | null; |
| 303 | + variant: Contentvariant | null; |
| 304 | + vector: string | null; |
| 305 | +} |
| 306 | + |
| 307 | +export interface MyDocuments { |
| 308 | + authorId: Int8 | null; |
| 309 | + contents: number | null; |
| 310 | + created: Timestamp | null; |
| 311 | + id: Int8 | null; |
| 312 | + lastModified: Timestamp | null; |
| 313 | + metadata: Json | null; |
| 314 | + sourceLocalId: string | null; |
| 315 | + spaceId: Int8 | null; |
| 316 | + url: string | null; |
| 317 | +} |
| 318 | + |
| 319 | +export interface MySpaces { |
| 320 | + id: Int8 | null; |
| 321 | + name: string | null; |
| 322 | + platform: Platform | null; |
| 323 | + url: string | null; |
| 324 | +} |
| 325 | + |
| 326 | +export interface PlatformAccount { |
| 327 | + accountLocalId: string; |
| 328 | + active: Generated<boolean>; |
| 329 | + agentType: Generated<Agenttype>; |
| 330 | + dgAccount: string | null; |
| 331 | + id: Generated<Int8>; |
| 332 | + metadata: Generated<Json>; |
| 333 | + name: string; |
| 334 | + platform: Platform; |
| 335 | + writePermission: Generated<boolean>; |
| 336 | +} |
| 337 | + |
| 338 | +export interface Result { |
| 339 | + max: Timestamp | null; |
| 340 | +} |
| 341 | + |
| 342 | +export interface Space { |
| 343 | + id: Generated<Int8>; |
| 344 | + name: string; |
| 345 | + platform: Platform; |
| 346 | + url: string; |
| 347 | +} |
| 348 | + |
| 349 | +export interface SpaceAccess { |
| 350 | + /** |
| 351 | + * The identity of the account in this space |
| 352 | + */ |
| 353 | + accountId: Int8; |
| 354 | + editor: boolean; |
| 355 | + /** |
| 356 | + * The space in which the content is located |
| 357 | + */ |
| 358 | + spaceId: Int8; |
| 359 | +} |
| 360 | + |
| 361 | +export interface SyncInfo { |
| 362 | + failureCount: Generated<number | null>; |
| 363 | + id: Generated<number>; |
| 364 | + lastTaskEnd: Timestamp | null; |
| 365 | + lastTaskStart: Timestamp | null; |
| 366 | + status: Generated<TaskStatus | null>; |
| 367 | + syncFunction: string | null; |
| 368 | + syncTarget: Int8 | null; |
| 369 | + targetType: Generated<Entitytype>; |
| 370 | + taskTimesOutAt: Timestamp | null; |
| 371 | + worker: string; |
| 372 | +} |
| 373 | + |
| 374 | +export interface DB { |
| 375 | + accessToken: AccessToken; |
| 376 | + AgentIdentifier: AgentIdentifier; |
| 377 | + Concept: Concept; |
| 378 | + conceptContributors: ConceptContributors; |
| 379 | + Content: Content; |
| 380 | + contentContributors: ContentContributors; |
| 381 | + ContentEmbeddingOpenaiTextEmbedding3Small1536: ContentEmbeddingOpenaiTextEmbedding3Small1536; |
| 382 | + Document: Document; |
| 383 | + myAccounts: MyAccounts; |
| 384 | + myConcepts: MyConcepts; |
| 385 | + myContents: MyContents; |
| 386 | + myContentsWithEmbeddingOpenaiTextEmbedding3Small1536: MyContentsWithEmbeddingOpenaiTextEmbedding3Small1536; |
| 387 | + myDocuments: MyDocuments; |
| 388 | + mySpaces: MySpaces; |
| 389 | + PlatformAccount: PlatformAccount; |
| 390 | + result: Result; |
| 391 | + Space: Space; |
| 392 | + SpaceAccess: SpaceAccess; |
| 393 | + syncInfo: SyncInfo; |
| 394 | +} |
0 commit comments