document-drive 1.29.4-dev.2 → 1.29.4-dev.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/server/base-server.d.ts.map +1 -1
- package/dist/src/server/base-server.js +13 -1
- package/dist/src/server/listener/listener-manager.d.ts.map +1 -1
- package/dist/src/server/listener/listener-manager.js +67 -44
- package/dist/src/server/listener/transmitter/pull-responder.d.ts +8 -0
- package/dist/src/server/listener/transmitter/pull-responder.d.ts.map +1 -1
- package/dist/src/server/listener/transmitter/pull-responder.js +159 -67
- package/dist/src/server/listener/transmitter/types.d.ts +3 -1
- package/dist/src/server/listener/transmitter/types.d.ts.map +1 -1
- package/dist/src/server/sync-manager.d.ts.map +1 -1
- package/dist/src/server/sync-manager.js +18 -0
- package/dist/src/storage/prisma/client/default.d.ts +1 -0
- package/dist/src/storage/prisma/client/edge.d.ts +1 -0
- package/dist/src/storage/prisma/client/index.d.ts +10447 -0
- package/dist/src/storage/prisma/client/libquery_engine-debian-openssl-3.0.x.so.node +0 -0
- package/dist/src/storage/prisma/client/package.json +84 -0
- package/dist/src/storage/prisma/client/runtime/index-browser.d.ts +365 -0
- package/dist/src/storage/prisma/client/runtime/library.d.ts +3273 -0
- package/dist/src/storage/prisma/client/schema.prisma +91 -0
- package/dist/src/storage/prisma/client/wasm.d.ts +1 -0
- package/dist/src/storage/prisma/factory.d.ts.map +1 -1
- package/dist/src/storage/prisma/factory.js +1 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// This is your Prisma schema file,
|
|
2
|
+
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
3
|
+
|
|
4
|
+
generator client {
|
|
5
|
+
provider = "prisma-client-js"
|
|
6
|
+
output = "../src/storage/prisma/client"
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
datasource db {
|
|
10
|
+
provider = "postgresql"
|
|
11
|
+
url = env("DATABASE_URL")
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
model Drive {
|
|
15
|
+
id String @id
|
|
16
|
+
slug String @unique
|
|
17
|
+
driveDocuments DriveDocument[]
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
model Document {
|
|
21
|
+
id String @id
|
|
22
|
+
created DateTime @default(now())
|
|
23
|
+
lastModified DateTime @default(now())
|
|
24
|
+
isDrive Boolean
|
|
25
|
+
revision String
|
|
26
|
+
name String?
|
|
27
|
+
operations Operation[]
|
|
28
|
+
initialState String // json object with the scope as keys of the root object
|
|
29
|
+
documentType String
|
|
30
|
+
meta String?
|
|
31
|
+
synchronizationUnits SynchronizationUnit[]
|
|
32
|
+
driveDocuments DriveDocument[]
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Model to map the many-to-many relationship between drives and documents
|
|
36
|
+
model DriveDocument {
|
|
37
|
+
driveId String
|
|
38
|
+
documentId String
|
|
39
|
+
drive Drive @relation(fields: [driveId], references: [id], onDelete: Cascade)
|
|
40
|
+
document Document @relation(fields: [documentId], references: [id], onDelete: Cascade)
|
|
41
|
+
|
|
42
|
+
@@id([driveId, documentId])
|
|
43
|
+
@@index([driveId])
|
|
44
|
+
@@index([documentId])
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
model Operation {
|
|
48
|
+
id String @id @default(uuid())
|
|
49
|
+
opId String?
|
|
50
|
+
Document Document? @relation(fields: [documentId], references: [id], onDelete: Cascade)
|
|
51
|
+
documentId String
|
|
52
|
+
scope String
|
|
53
|
+
branch String
|
|
54
|
+
index Int
|
|
55
|
+
skip Int
|
|
56
|
+
hash String
|
|
57
|
+
timestamp DateTime
|
|
58
|
+
input String
|
|
59
|
+
type String
|
|
60
|
+
attachments Attachment[]
|
|
61
|
+
syncId String?
|
|
62
|
+
clipboard Boolean? @default(false)
|
|
63
|
+
context Json?
|
|
64
|
+
resultingState Bytes?
|
|
65
|
+
|
|
66
|
+
SynchronizationUnit SynchronizationUnit? @relation(fields: [syncId], references: [id], onDelete: Cascade)
|
|
67
|
+
|
|
68
|
+
@@unique([documentId, scope, branch, index(sort: Asc)], name: "unique_operation")
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
model SynchronizationUnit {
|
|
72
|
+
id String @id
|
|
73
|
+
documentId String
|
|
74
|
+
|
|
75
|
+
Document Document @relation(fields: [documentId], references: [id], onDelete: Cascade)
|
|
76
|
+
scope String
|
|
77
|
+
branch String
|
|
78
|
+
operations Operation[]
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
model Attachment {
|
|
82
|
+
id String @id @default(uuid())
|
|
83
|
+
operationId String
|
|
84
|
+
Operation Operation @relation(fields: [operationId], references: [id], onDelete: Cascade)
|
|
85
|
+
|
|
86
|
+
mimeType String
|
|
87
|
+
data String
|
|
88
|
+
filename String?
|
|
89
|
+
extension String?
|
|
90
|
+
hash String
|
|
91
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './index'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/storage/prisma/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/storage/prisma/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGtD,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IACtC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;gBAEnB,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAWxC,KAAK;CAGN"}
|