document-drive 1.29.4-dev.1 → 1.29.4-dev.3
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/prisma/schema.prisma +91 -0
- 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 +158 -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/default.js +1 -0
- package/dist/src/storage/prisma/client/edge.d.ts +1 -0
- package/dist/src/storage/prisma/client/edge.js +253 -0
- package/dist/src/storage/prisma/client/index-browser.js +244 -0
- package/dist/src/storage/prisma/client/index.d.ts +10447 -0
- package/dist/src/storage/prisma/client/index.js +274 -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/schema.prisma +91 -0
- package/dist/src/storage/prisma/client/wasm.d.ts +1 -0
- package/dist/src/storage/prisma/client/wasm.js +244 -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 +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type PullResponderTriggerData, type Trigger } from "#drive-document-model/gen/types";
|
|
1
|
+
import { ListenerFilter, type PullResponderTriggerData, type Trigger } from "#drive-document-model/gen/types";
|
|
2
2
|
import { type ListenerRevision, type StrandUpdate } from "#server/types";
|
|
3
3
|
export type StrandUpdateSource = {
|
|
4
4
|
type: "local";
|
|
@@ -14,6 +14,8 @@ export interface InternalTransmitterService extends ITransmitter {
|
|
|
14
14
|
getName(): string;
|
|
15
15
|
}
|
|
16
16
|
export type PullResponderTrigger = Omit<Trigger, "data" | "type"> & {
|
|
17
|
+
driveId: string;
|
|
18
|
+
filter: ListenerFilter;
|
|
17
19
|
data: PullResponderTriggerData;
|
|
18
20
|
type: "PullResponder";
|
|
19
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/server/listener/transmitter/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,OAAO,EACb,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAEzE,MAAM,MAAM,kBAAkB,GAC1B;IACE,IAAI,EAAE,OAAO,CAAC;CACf,GACD;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAE1C,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,CACP,OAAO,EAAE,YAAY,EAAE,EACvB,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAC/B,UAAU,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AACD,MAAM,WAAW,0BAA2B,SAAQ,YAAY;IAC9D,OAAO,IAAI,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG;IAClE,IAAI,EAAE,wBAAwB,CAAC;IAC/B,IAAI,EAAE,eAAe,CAAC;CACvB,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/server/listener/transmitter/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,KAAK,wBAAwB,EAC7B,KAAK,OAAO,EACb,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAEzE,MAAM,MAAM,kBAAkB,GAC1B;IACE,IAAI,EAAE,OAAO,CAAC;CACf,GACD;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAE1C,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,CACP,OAAO,EAAE,YAAY,EAAE,EACvB,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAC/B,UAAU,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AACD,MAAM,WAAW,0BAA2B,SAAQ,YAAY;IAC9D,OAAO,IAAI,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG;IAClE,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,cAAc,CAAC;IACvB,IAAI,EAAE,wBAAwB,CAAC;IAC/B,IAAI,EAAE,eAAe,CAAC;CACvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-manager.d.ts","sourceRoot":"","sources":["../../../src/server/sync-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EACL,KAAK,qBAAqB,EAE3B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD,OAAO,EACL,KAAK,mBAAmB,EAKzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,gCAAgC,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC9B,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,OAAO,OAAO,sBAAuB,YAAW,uBAAuB;IAM1E,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,oBAAoB;IAC5B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC;IARhC,OAAO,CAAC,UAAU,CAA2C;IAE7D,OAAO,CAAC,MAAM,CAA2C;gBAGtC,OAAO,EAAE,aAAa,EACtB,KAAK,EAAE,MAAM,EACtB,oBAAoB,EAAE,mBAAmB,EAAE,EAClC,YAAY,CAAC,EAAE,aAAa,YAAA;IAGzC,uBAAuB,CAC3B,OAAO,EAAE,MAAM,EACf,UAAU,CAAC,EAAE,MAAM,EAAE,EACrB,KAAK,CAAC,EAAE,MAAM,EAAE,EAChB,MAAM,CAAC,EAAE,MAAM,EAAE,EACjB,YAAY,CAAC,EAAE,MAAM,EAAE,GACtB,OAAO,CAAC,mBAAmB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"sync-manager.d.ts","sourceRoot":"","sources":["../../../src/server/sync-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EACL,KAAK,qBAAqB,EAE3B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD,OAAO,EACL,KAAK,mBAAmB,EAKzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,gCAAgC,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC9B,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,OAAO,OAAO,sBAAuB,YAAW,uBAAuB;IAM1E,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,oBAAoB;IAC5B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC;IARhC,OAAO,CAAC,UAAU,CAA2C;IAE7D,OAAO,CAAC,MAAM,CAA2C;gBAGtC,OAAO,EAAE,aAAa,EACtB,KAAK,EAAE,MAAM,EACtB,oBAAoB,EAAE,mBAAmB,EAAE,EAClC,YAAY,CAAC,EAAE,aAAa,YAAA;IAGzC,uBAAuB,CAC3B,OAAO,EAAE,MAAM,EACf,UAAU,CAAC,EAAE,MAAM,EAAE,EACrB,KAAK,CAAC,EAAE,MAAM,EAAE,EAChB,MAAM,CAAC,EAAE,MAAM,EAAE,EACjB,YAAY,CAAC,EAAE,MAAM,EAAE,GACtB,OAAO,CAAC,mBAAmB,EAAE,CAAC;IAmB3B,+BAA+B,CACnC,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,wBAAwB,EAAE,GACzC,OAAO,CAAC,mBAAmB,EAAE,CAAC;IAuB3B,0BAA0B,CAC9B,OAAO,EAAE,MAAM,EACf,UAAU,CAAC,EAAE,MAAM,EAAE,EACrB,KAAK,CAAC,EAAE,MAAM,EAAE,EAChB,MAAM,CAAC,EAAE,MAAM,EAAE,EACjB,YAAY,CAAC,EAAE,MAAM,EAAE,GACtB,OAAO,CAAC,wBAAwB,EAAE,CAAC;IAmEhC,4BAA4B,CAChC,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,wBAAwB,GAAG,SAAS,CAAC;IA4B1C,sBAAsB,CAC1B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC;IAyBrC,gBAAgB,CACpB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC,eAAe,EAAE,CAAC;YAoFf,QAAQ;YAiBR,WAAW;IAgBzB,OAAO,CAAC,cAAc;IAuBtB,uBAAuB,CAAC,OAAO,EAAE,mBAAmB,EAAE;IAItD,OAAO,CAAC,sBAAsB;IAU9B,yBAAyB,CAAC,cAAc,EAAE,oBAAoB,GAAG,UAAU;IAoB3E,aAAa,CACX,UAAU,EAAE,MAAM,GACjB,UAAU,GAAG,gCAAgC;IAWhD,gBAAgB,CACd,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC,GAAG,IAAI,EAC5C,KAAK,CAAC,EAAE,KAAK,GACZ,IAAI;IAiDP,OAAO,CAAC,cAAc;IAyBhB,yBAAyB,CAC7B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,IAAI,CAAC;CAejB"}
|
|
@@ -18,11 +18,13 @@ export default class SynchronizationManager {
|
|
|
18
18
|
}
|
|
19
19
|
async getSynchronizationUnits(driveId, documentId, scope, branch, documentType) {
|
|
20
20
|
const synchronizationUnitsQuery = await this.getSynchronizationUnitsIds(driveId, documentId, scope, branch, documentType);
|
|
21
|
+
this.logger.verbose(`getSynchronizationUnits query: ${JSON.stringify(synchronizationUnitsQuery)}`);
|
|
21
22
|
return this.getSynchronizationUnitsRevision(driveId, synchronizationUnitsQuery);
|
|
22
23
|
}
|
|
23
24
|
async getSynchronizationUnitsRevision(driveId, syncUnitsQuery) {
|
|
24
25
|
const drive = await this.getDrive(driveId);
|
|
25
26
|
const revisions = await this.storage.getSynchronizationUnitsRevision(syncUnitsQuery);
|
|
27
|
+
this.logger.verbose(`getSynchronizationUnitsRevision: ${JSON.stringify(revisions)}`);
|
|
26
28
|
return syncUnitsQuery.map((s) => ({
|
|
27
29
|
...s,
|
|
28
30
|
lastUpdated: drive.created,
|
|
@@ -121,24 +123,40 @@ export default class SynchronizationManager {
|
|
|
121
123
|
};
|
|
122
124
|
}
|
|
123
125
|
async getOperationData(driveId, syncId, filter) {
|
|
126
|
+
this.logger.verbose(`[SYNC DEBUG] SynchronizationManager.getOperationData called for drive: ${driveId}, syncId: ${syncId}, filter: ${JSON.stringify(filter)}`);
|
|
124
127
|
const syncUnit = syncId === "0"
|
|
125
128
|
? { documentId: "", scope: "global" }
|
|
126
129
|
: await this.getSynchronizationUnitIdInfo(driveId, syncId);
|
|
127
130
|
if (!syncUnit) {
|
|
131
|
+
this.logger.error(`SYNC DEBUG] Invalid Sync Id ${syncId} in drive ${driveId}`);
|
|
128
132
|
throw new Error(`Invalid Sync Id ${syncId} in drive ${driveId}`);
|
|
129
133
|
}
|
|
134
|
+
this.logger.verbose(`[SYNC DEBUG] Found sync unit: documentId: ${syncUnit.documentId}, scope: ${syncUnit.scope}`);
|
|
130
135
|
const document = syncId === "0"
|
|
131
136
|
? await this.getDrive(driveId)
|
|
132
137
|
: await this.getDocument(driveId, syncUnit.documentId); // TODO replace with getDocumentOperations
|
|
138
|
+
this.logger.verbose(`[SYNC DEBUG] Retrieved document ${syncUnit.documentId} with type: ${document.documentType}`);
|
|
133
139
|
const operations = document.operations[syncUnit.scope] ?? []; // TODO filter by branch also
|
|
140
|
+
this.logger.verbose(`[SYNC DEBUG] Found ${operations.length} total operations in scope ${syncUnit.scope}`);
|
|
134
141
|
const filteredOperations = operations.filter((operation) => Object.keys(filter).length === 0 ||
|
|
135
142
|
((filter.since === undefined ||
|
|
136
143
|
isBefore(filter.since, operation.timestamp)) &&
|
|
137
144
|
(filter.fromRevision === undefined ||
|
|
138
145
|
operation.index > filter.fromRevision)));
|
|
146
|
+
this.logger.verbose(`[SYNC DEBUG] Filtered to ${filteredOperations.length} operations based on filter criteria` +
|
|
147
|
+
(filter.fromRevision !== undefined
|
|
148
|
+
? ` (fromRevision: ${filter.fromRevision})`
|
|
149
|
+
: ""));
|
|
139
150
|
const limitedOperations = filter.limit
|
|
140
151
|
? filteredOperations.slice(0, filter.limit)
|
|
141
152
|
: filteredOperations;
|
|
153
|
+
this.logger.verbose(`[SYNC DEBUG] Returning ${limitedOperations.length} operations after applying limit`);
|
|
154
|
+
if (limitedOperations.length > 0) {
|
|
155
|
+
const firstOp = limitedOperations[0];
|
|
156
|
+
const lastOp = limitedOperations[limitedOperations.length - 1];
|
|
157
|
+
this.logger.verbose(`[SYNC DEBUG] First operation: index=${firstOp.index}, type=${firstOp.type}`);
|
|
158
|
+
this.logger.verbose(`[SYNC DEBUG] Last operation: index=${lastOp.index}, type=${lastOp.type}`);
|
|
159
|
+
}
|
|
142
160
|
return limitedOperations.map((operation) => ({
|
|
143
161
|
hash: operation.hash,
|
|
144
162
|
index: operation.index,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './index'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = { ...require('.') }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './default'
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
|
|
4
|
+
const {
|
|
5
|
+
PrismaClientKnownRequestError,
|
|
6
|
+
PrismaClientUnknownRequestError,
|
|
7
|
+
PrismaClientRustPanicError,
|
|
8
|
+
PrismaClientInitializationError,
|
|
9
|
+
PrismaClientValidationError,
|
|
10
|
+
NotFoundError,
|
|
11
|
+
getPrismaClient,
|
|
12
|
+
sqltag,
|
|
13
|
+
empty,
|
|
14
|
+
join,
|
|
15
|
+
raw,
|
|
16
|
+
Decimal,
|
|
17
|
+
Debug,
|
|
18
|
+
objectEnumValues,
|
|
19
|
+
makeStrictEnum,
|
|
20
|
+
Extensions,
|
|
21
|
+
warnOnce,
|
|
22
|
+
defineDmmfProperty,
|
|
23
|
+
Public,
|
|
24
|
+
getRuntime
|
|
25
|
+
} = require('./runtime/edge.js')
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
const Prisma = {}
|
|
29
|
+
|
|
30
|
+
exports.Prisma = Prisma
|
|
31
|
+
exports.$Enums = {}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Prisma Client JS version: 5.17.0
|
|
35
|
+
* Query Engine version: 393aa359c9ad4a4bb28630fb5613f9c281cde053
|
|
36
|
+
*/
|
|
37
|
+
Prisma.prismaVersion = {
|
|
38
|
+
client: "5.17.0",
|
|
39
|
+
engine: "393aa359c9ad4a4bb28630fb5613f9c281cde053"
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError;
|
|
43
|
+
Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError
|
|
44
|
+
Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError
|
|
45
|
+
Prisma.PrismaClientInitializationError = PrismaClientInitializationError
|
|
46
|
+
Prisma.PrismaClientValidationError = PrismaClientValidationError
|
|
47
|
+
Prisma.NotFoundError = NotFoundError
|
|
48
|
+
Prisma.Decimal = Decimal
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Re-export of sql-template-tag
|
|
52
|
+
*/
|
|
53
|
+
Prisma.sql = sqltag
|
|
54
|
+
Prisma.empty = empty
|
|
55
|
+
Prisma.join = join
|
|
56
|
+
Prisma.raw = raw
|
|
57
|
+
Prisma.validator = Public.validator
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Extensions
|
|
61
|
+
*/
|
|
62
|
+
Prisma.getExtensionContext = Extensions.getExtensionContext
|
|
63
|
+
Prisma.defineExtension = Extensions.defineExtension
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Shorthand utilities for JSON filtering
|
|
67
|
+
*/
|
|
68
|
+
Prisma.DbNull = objectEnumValues.instances.DbNull
|
|
69
|
+
Prisma.JsonNull = objectEnumValues.instances.JsonNull
|
|
70
|
+
Prisma.AnyNull = objectEnumValues.instances.AnyNull
|
|
71
|
+
|
|
72
|
+
Prisma.NullTypes = {
|
|
73
|
+
DbNull: objectEnumValues.classes.DbNull,
|
|
74
|
+
JsonNull: objectEnumValues.classes.JsonNull,
|
|
75
|
+
AnyNull: objectEnumValues.classes.AnyNull
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Enums
|
|
82
|
+
*/
|
|
83
|
+
exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
|
|
84
|
+
ReadUncommitted: 'ReadUncommitted',
|
|
85
|
+
ReadCommitted: 'ReadCommitted',
|
|
86
|
+
RepeatableRead: 'RepeatableRead',
|
|
87
|
+
Serializable: 'Serializable'
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
exports.Prisma.DriveScalarFieldEnum = {
|
|
91
|
+
id: 'id',
|
|
92
|
+
slug: 'slug'
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
exports.Prisma.DocumentScalarFieldEnum = {
|
|
96
|
+
id: 'id',
|
|
97
|
+
created: 'created',
|
|
98
|
+
lastModified: 'lastModified',
|
|
99
|
+
isDrive: 'isDrive',
|
|
100
|
+
revision: 'revision',
|
|
101
|
+
name: 'name',
|
|
102
|
+
initialState: 'initialState',
|
|
103
|
+
documentType: 'documentType',
|
|
104
|
+
meta: 'meta'
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
exports.Prisma.DriveDocumentScalarFieldEnum = {
|
|
108
|
+
driveId: 'driveId',
|
|
109
|
+
documentId: 'documentId'
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
exports.Prisma.OperationScalarFieldEnum = {
|
|
113
|
+
id: 'id',
|
|
114
|
+
opId: 'opId',
|
|
115
|
+
documentId: 'documentId',
|
|
116
|
+
scope: 'scope',
|
|
117
|
+
branch: 'branch',
|
|
118
|
+
index: 'index',
|
|
119
|
+
skip: 'skip',
|
|
120
|
+
hash: 'hash',
|
|
121
|
+
timestamp: 'timestamp',
|
|
122
|
+
input: 'input',
|
|
123
|
+
type: 'type',
|
|
124
|
+
syncId: 'syncId',
|
|
125
|
+
clipboard: 'clipboard',
|
|
126
|
+
context: 'context',
|
|
127
|
+
resultingState: 'resultingState'
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
exports.Prisma.SynchronizationUnitScalarFieldEnum = {
|
|
131
|
+
id: 'id',
|
|
132
|
+
documentId: 'documentId',
|
|
133
|
+
scope: 'scope',
|
|
134
|
+
branch: 'branch'
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
exports.Prisma.AttachmentScalarFieldEnum = {
|
|
138
|
+
id: 'id',
|
|
139
|
+
operationId: 'operationId',
|
|
140
|
+
mimeType: 'mimeType',
|
|
141
|
+
data: 'data',
|
|
142
|
+
filename: 'filename',
|
|
143
|
+
extension: 'extension',
|
|
144
|
+
hash: 'hash'
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
exports.Prisma.SortOrder = {
|
|
148
|
+
asc: 'asc',
|
|
149
|
+
desc: 'desc'
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
exports.Prisma.NullableJsonNullValueInput = {
|
|
153
|
+
DbNull: Prisma.DbNull,
|
|
154
|
+
JsonNull: Prisma.JsonNull
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
exports.Prisma.QueryMode = {
|
|
158
|
+
default: 'default',
|
|
159
|
+
insensitive: 'insensitive'
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
exports.Prisma.NullsOrder = {
|
|
163
|
+
first: 'first',
|
|
164
|
+
last: 'last'
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
exports.Prisma.JsonNullValueFilter = {
|
|
168
|
+
DbNull: Prisma.DbNull,
|
|
169
|
+
JsonNull: Prisma.JsonNull,
|
|
170
|
+
AnyNull: Prisma.AnyNull
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
exports.Prisma.ModelName = {
|
|
175
|
+
Drive: 'Drive',
|
|
176
|
+
Document: 'Document',
|
|
177
|
+
DriveDocument: 'DriveDocument',
|
|
178
|
+
Operation: 'Operation',
|
|
179
|
+
SynchronizationUnit: 'SynchronizationUnit',
|
|
180
|
+
Attachment: 'Attachment'
|
|
181
|
+
};
|
|
182
|
+
/**
|
|
183
|
+
* Create the Client
|
|
184
|
+
*/
|
|
185
|
+
const config = {
|
|
186
|
+
"generator": {
|
|
187
|
+
"name": "client",
|
|
188
|
+
"provider": {
|
|
189
|
+
"fromEnvVar": null,
|
|
190
|
+
"value": "prisma-client-js"
|
|
191
|
+
},
|
|
192
|
+
"output": {
|
|
193
|
+
"value": "/home/runner/work/powerhouse/powerhouse/packages/document-drive/src/storage/prisma/client",
|
|
194
|
+
"fromEnvVar": null
|
|
195
|
+
},
|
|
196
|
+
"config": {
|
|
197
|
+
"engineType": "library"
|
|
198
|
+
},
|
|
199
|
+
"binaryTargets": [
|
|
200
|
+
{
|
|
201
|
+
"fromEnvVar": null,
|
|
202
|
+
"value": "debian-openssl-3.0.x",
|
|
203
|
+
"native": true
|
|
204
|
+
}
|
|
205
|
+
],
|
|
206
|
+
"previewFeatures": [],
|
|
207
|
+
"sourceFilePath": "/home/runner/work/powerhouse/powerhouse/packages/document-drive/prisma/schema.prisma",
|
|
208
|
+
"isCustomOutput": true
|
|
209
|
+
},
|
|
210
|
+
"relativeEnvPaths": {
|
|
211
|
+
"rootEnvPath": null
|
|
212
|
+
},
|
|
213
|
+
"relativePath": "../../../../prisma",
|
|
214
|
+
"clientVersion": "5.17.0",
|
|
215
|
+
"engineVersion": "393aa359c9ad4a4bb28630fb5613f9c281cde053",
|
|
216
|
+
"datasourceNames": [
|
|
217
|
+
"db"
|
|
218
|
+
],
|
|
219
|
+
"activeProvider": "postgresql",
|
|
220
|
+
"postinstall": false,
|
|
221
|
+
"ciName": "GitHub Actions",
|
|
222
|
+
"inlineDatasources": {
|
|
223
|
+
"db": {
|
|
224
|
+
"url": {
|
|
225
|
+
"fromEnvVar": "DATABASE_URL",
|
|
226
|
+
"value": null
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\ngenerator client {\n provider = \"prisma-client-js\"\n output = \"../src/storage/prisma/client\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel Drive {\n id String @id\n slug String @unique\n driveDocuments DriveDocument[]\n}\n\nmodel Document {\n id String @id\n created DateTime @default(now())\n lastModified DateTime @default(now())\n isDrive Boolean\n revision String\n name String?\n operations Operation[]\n initialState String // json object with the scope as keys of the root object\n documentType String\n meta String?\n synchronizationUnits SynchronizationUnit[]\n driveDocuments DriveDocument[]\n}\n\n// Model to map the many-to-many relationship between drives and documents\nmodel DriveDocument {\n driveId String\n documentId String\n drive Drive @relation(fields: [driveId], references: [id], onDelete: Cascade)\n document Document @relation(fields: [documentId], references: [id], onDelete: Cascade)\n\n @@id([driveId, documentId])\n @@index([driveId])\n @@index([documentId])\n}\n\nmodel Operation {\n id String @id @default(uuid())\n opId String?\n Document Document? @relation(fields: [documentId], references: [id], onDelete: Cascade)\n documentId String\n scope String\n branch String\n index Int\n skip Int\n hash String\n timestamp DateTime\n input String\n type String\n attachments Attachment[]\n syncId String?\n clipboard Boolean? @default(false)\n context Json?\n resultingState Bytes?\n\n SynchronizationUnit SynchronizationUnit? @relation(fields: [syncId], references: [id], onDelete: Cascade)\n\n @@unique([documentId, scope, branch, index(sort: Asc)], name: \"unique_operation\")\n}\n\nmodel SynchronizationUnit {\n id String @id\n documentId String\n\n Document Document @relation(fields: [documentId], references: [id], onDelete: Cascade)\n scope String\n branch String\n operations Operation[]\n}\n\nmodel Attachment {\n id String @id @default(uuid())\n operationId String\n Operation Operation @relation(fields: [operationId], references: [id], onDelete: Cascade)\n\n mimeType String\n data String\n filename String?\n extension String?\n hash String\n}\n",
|
|
231
|
+
"inlineSchemaHash": "52b2d1553e673d066b78ac5c3e41ee747e559357e82db2939daed24cfdc1a4d6",
|
|
232
|
+
"copyEngine": true
|
|
233
|
+
}
|
|
234
|
+
config.dirname = '/'
|
|
235
|
+
|
|
236
|
+
config.runtimeDataModel = JSON.parse("{\"models\":{\"Drive\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"slug\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"driveDocuments\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DriveDocument\",\"relationName\":\"DriveToDriveDocument\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Document\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"created\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastModified\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isDrive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Boolean\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"revision\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"operations\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Operation\",\"relationName\":\"DocumentToOperation\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"initialState\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"documentType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"meta\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"synchronizationUnits\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SynchronizationUnit\",\"relationName\":\"DocumentToSynchronizationUnit\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"driveDocuments\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DriveDocument\",\"relationName\":\"DocumentToDriveDocument\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"DriveDocument\":{\"dbName\":null,\"fields\":[{\"name\":\"driveId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"documentId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"drive\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Drive\",\"relationName\":\"DriveToDriveDocument\",\"relationFromFields\":[\"driveId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"document\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Document\",\"relationName\":\"DocumentToDriveDocument\",\"relationFromFields\":[\"documentId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"driveId\",\"documentId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Operation\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"opId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"Document\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Document\",\"relationName\":\"DocumentToOperation\",\"relationFromFields\":[\"documentId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"documentId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scope\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branch\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"index\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"skip\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"hash\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"timestamp\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"input\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"attachments\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Attachment\",\"relationName\":\"AttachmentToOperation\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"syncId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"clipboard\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"context\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"resultingState\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Bytes\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"SynchronizationUnit\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SynchronizationUnit\",\"relationName\":\"OperationToSynchronizationUnit\",\"relationFromFields\":[\"syncId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"documentId\",\"scope\",\"branch\",\"index\"]],\"uniqueIndexes\":[{\"name\":\"unique_operation\",\"fields\":[\"documentId\",\"scope\",\"branch\",\"index\"]}],\"isGenerated\":false},\"SynchronizationUnit\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"documentId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"Document\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Document\",\"relationName\":\"DocumentToSynchronizationUnit\",\"relationFromFields\":[\"documentId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scope\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branch\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"operations\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Operation\",\"relationName\":\"OperationToSynchronizationUnit\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Attachment\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"operationId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"Operation\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Operation\",\"relationName\":\"AttachmentToOperation\",\"relationFromFields\":[\"operationId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mimeType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"data\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"filename\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"extension\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"hash\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}")
|
|
237
|
+
defineDmmfProperty(exports.Prisma, config.runtimeDataModel)
|
|
238
|
+
config.engineWasm = undefined
|
|
239
|
+
|
|
240
|
+
config.injectableEdgeEnv = () => ({
|
|
241
|
+
parsed: {
|
|
242
|
+
DATABASE_URL: typeof globalThis !== 'undefined' && globalThis['DATABASE_URL'] || typeof process !== 'undefined' && process.env && process.env.DATABASE_URL || undefined
|
|
243
|
+
}
|
|
244
|
+
})
|
|
245
|
+
|
|
246
|
+
if (typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) {
|
|
247
|
+
Debug.enable(typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined)
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
const PrismaClient = getPrismaClient(config)
|
|
251
|
+
exports.PrismaClient = PrismaClient
|
|
252
|
+
Object.assign(exports, Prisma)
|
|
253
|
+
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
|
|
4
|
+
const {
|
|
5
|
+
Decimal,
|
|
6
|
+
objectEnumValues,
|
|
7
|
+
makeStrictEnum,
|
|
8
|
+
Public,
|
|
9
|
+
getRuntime,
|
|
10
|
+
} = require('./runtime/index-browser.js')
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
const Prisma = {}
|
|
14
|
+
|
|
15
|
+
exports.Prisma = Prisma
|
|
16
|
+
exports.$Enums = {}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Prisma Client JS version: 5.17.0
|
|
20
|
+
* Query Engine version: 393aa359c9ad4a4bb28630fb5613f9c281cde053
|
|
21
|
+
*/
|
|
22
|
+
Prisma.prismaVersion = {
|
|
23
|
+
client: "5.17.0",
|
|
24
|
+
engine: "393aa359c9ad4a4bb28630fb5613f9c281cde053"
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
Prisma.PrismaClientKnownRequestError = () => {
|
|
28
|
+
const runtimeName = getRuntime().prettyName;
|
|
29
|
+
throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
30
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
31
|
+
)};
|
|
32
|
+
Prisma.PrismaClientUnknownRequestError = () => {
|
|
33
|
+
const runtimeName = getRuntime().prettyName;
|
|
34
|
+
throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
35
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
36
|
+
)}
|
|
37
|
+
Prisma.PrismaClientRustPanicError = () => {
|
|
38
|
+
const runtimeName = getRuntime().prettyName;
|
|
39
|
+
throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
40
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
41
|
+
)}
|
|
42
|
+
Prisma.PrismaClientInitializationError = () => {
|
|
43
|
+
const runtimeName = getRuntime().prettyName;
|
|
44
|
+
throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
45
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
46
|
+
)}
|
|
47
|
+
Prisma.PrismaClientValidationError = () => {
|
|
48
|
+
const runtimeName = getRuntime().prettyName;
|
|
49
|
+
throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
50
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
51
|
+
)}
|
|
52
|
+
Prisma.NotFoundError = () => {
|
|
53
|
+
const runtimeName = getRuntime().prettyName;
|
|
54
|
+
throw new Error(`NotFoundError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
55
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
56
|
+
)}
|
|
57
|
+
Prisma.Decimal = Decimal
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Re-export of sql-template-tag
|
|
61
|
+
*/
|
|
62
|
+
Prisma.sql = () => {
|
|
63
|
+
const runtimeName = getRuntime().prettyName;
|
|
64
|
+
throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
65
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
66
|
+
)}
|
|
67
|
+
Prisma.empty = () => {
|
|
68
|
+
const runtimeName = getRuntime().prettyName;
|
|
69
|
+
throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
70
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
71
|
+
)}
|
|
72
|
+
Prisma.join = () => {
|
|
73
|
+
const runtimeName = getRuntime().prettyName;
|
|
74
|
+
throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
75
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
76
|
+
)}
|
|
77
|
+
Prisma.raw = () => {
|
|
78
|
+
const runtimeName = getRuntime().prettyName;
|
|
79
|
+
throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
80
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
81
|
+
)}
|
|
82
|
+
Prisma.validator = Public.validator
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Extensions
|
|
86
|
+
*/
|
|
87
|
+
Prisma.getExtensionContext = () => {
|
|
88
|
+
const runtimeName = getRuntime().prettyName;
|
|
89
|
+
throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
90
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
91
|
+
)}
|
|
92
|
+
Prisma.defineExtension = () => {
|
|
93
|
+
const runtimeName = getRuntime().prettyName;
|
|
94
|
+
throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
95
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
96
|
+
)}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Shorthand utilities for JSON filtering
|
|
100
|
+
*/
|
|
101
|
+
Prisma.DbNull = objectEnumValues.instances.DbNull
|
|
102
|
+
Prisma.JsonNull = objectEnumValues.instances.JsonNull
|
|
103
|
+
Prisma.AnyNull = objectEnumValues.instances.AnyNull
|
|
104
|
+
|
|
105
|
+
Prisma.NullTypes = {
|
|
106
|
+
DbNull: objectEnumValues.classes.DbNull,
|
|
107
|
+
JsonNull: objectEnumValues.classes.JsonNull,
|
|
108
|
+
AnyNull: objectEnumValues.classes.AnyNull
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Enums
|
|
113
|
+
*/
|
|
114
|
+
|
|
115
|
+
exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
|
|
116
|
+
ReadUncommitted: 'ReadUncommitted',
|
|
117
|
+
ReadCommitted: 'ReadCommitted',
|
|
118
|
+
RepeatableRead: 'RepeatableRead',
|
|
119
|
+
Serializable: 'Serializable'
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
exports.Prisma.DriveScalarFieldEnum = {
|
|
123
|
+
id: 'id',
|
|
124
|
+
slug: 'slug'
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
exports.Prisma.DocumentScalarFieldEnum = {
|
|
128
|
+
id: 'id',
|
|
129
|
+
created: 'created',
|
|
130
|
+
lastModified: 'lastModified',
|
|
131
|
+
isDrive: 'isDrive',
|
|
132
|
+
revision: 'revision',
|
|
133
|
+
name: 'name',
|
|
134
|
+
initialState: 'initialState',
|
|
135
|
+
documentType: 'documentType',
|
|
136
|
+
meta: 'meta'
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
exports.Prisma.DriveDocumentScalarFieldEnum = {
|
|
140
|
+
driveId: 'driveId',
|
|
141
|
+
documentId: 'documentId'
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
exports.Prisma.OperationScalarFieldEnum = {
|
|
145
|
+
id: 'id',
|
|
146
|
+
opId: 'opId',
|
|
147
|
+
documentId: 'documentId',
|
|
148
|
+
scope: 'scope',
|
|
149
|
+
branch: 'branch',
|
|
150
|
+
index: 'index',
|
|
151
|
+
skip: 'skip',
|
|
152
|
+
hash: 'hash',
|
|
153
|
+
timestamp: 'timestamp',
|
|
154
|
+
input: 'input',
|
|
155
|
+
type: 'type',
|
|
156
|
+
syncId: 'syncId',
|
|
157
|
+
clipboard: 'clipboard',
|
|
158
|
+
context: 'context',
|
|
159
|
+
resultingState: 'resultingState'
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
exports.Prisma.SynchronizationUnitScalarFieldEnum = {
|
|
163
|
+
id: 'id',
|
|
164
|
+
documentId: 'documentId',
|
|
165
|
+
scope: 'scope',
|
|
166
|
+
branch: 'branch'
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
exports.Prisma.AttachmentScalarFieldEnum = {
|
|
170
|
+
id: 'id',
|
|
171
|
+
operationId: 'operationId',
|
|
172
|
+
mimeType: 'mimeType',
|
|
173
|
+
data: 'data',
|
|
174
|
+
filename: 'filename',
|
|
175
|
+
extension: 'extension',
|
|
176
|
+
hash: 'hash'
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
exports.Prisma.SortOrder = {
|
|
180
|
+
asc: 'asc',
|
|
181
|
+
desc: 'desc'
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
exports.Prisma.NullableJsonNullValueInput = {
|
|
185
|
+
DbNull: Prisma.DbNull,
|
|
186
|
+
JsonNull: Prisma.JsonNull
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
exports.Prisma.QueryMode = {
|
|
190
|
+
default: 'default',
|
|
191
|
+
insensitive: 'insensitive'
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
exports.Prisma.NullsOrder = {
|
|
195
|
+
first: 'first',
|
|
196
|
+
last: 'last'
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
exports.Prisma.JsonNullValueFilter = {
|
|
200
|
+
DbNull: Prisma.DbNull,
|
|
201
|
+
JsonNull: Prisma.JsonNull,
|
|
202
|
+
AnyNull: Prisma.AnyNull
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
exports.Prisma.ModelName = {
|
|
207
|
+
Drive: 'Drive',
|
|
208
|
+
Document: 'Document',
|
|
209
|
+
DriveDocument: 'DriveDocument',
|
|
210
|
+
Operation: 'Operation',
|
|
211
|
+
SynchronizationUnit: 'SynchronizationUnit',
|
|
212
|
+
Attachment: 'Attachment'
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* This is a stub Prisma Client that will error at runtime if called.
|
|
217
|
+
*/
|
|
218
|
+
class PrismaClient {
|
|
219
|
+
constructor() {
|
|
220
|
+
return new Proxy(this, {
|
|
221
|
+
get(target, prop) {
|
|
222
|
+
let message
|
|
223
|
+
const runtime = getRuntime()
|
|
224
|
+
if (runtime.isEdge) {
|
|
225
|
+
message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either:
|
|
226
|
+
- Use Prisma Accelerate: https://pris.ly/d/accelerate
|
|
227
|
+
- Use Driver Adapters: https://pris.ly/d/driver-adapters
|
|
228
|
+
`;
|
|
229
|
+
} else {
|
|
230
|
+
message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).'
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
message += `
|
|
234
|
+
If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report`
|
|
235
|
+
|
|
236
|
+
throw new Error(message)
|
|
237
|
+
}
|
|
238
|
+
})
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
exports.PrismaClient = PrismaClient
|
|
243
|
+
|
|
244
|
+
Object.assign(exports, Prisma)
|