@cerbos/orm-prisma 3.0.1 → 3.1.1
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/README.md +2 -2
- package/lib/index.js +54 -1
- package/lib/index.js.map +1 -1
- package/package.json +17 -12
- package/src/generated/prisma/browser.ts +59 -0
- package/src/generated/prisma/client.ts +79 -0
- package/src/generated/prisma/commonInputTypes.ts +248 -0
- package/src/generated/prisma/enums.ts +15 -0
- package/src/generated/prisma/internal/class.ts +262 -0
- package/src/generated/prisma/internal/prismaNamespace.ts +1333 -0
- package/src/generated/prisma/internal/prismaNamespaceBrowser.ts +168 -0
- package/src/generated/prisma/models/Category.ts +1407 -0
- package/src/generated/prisma/models/Label.ts +1271 -0
- package/src/generated/prisma/models/NestedResource.ts +1557 -0
- package/src/generated/prisma/models/NextLevelNestedResource.ts +1332 -0
- package/src/generated/prisma/models/Resource.ts +2131 -0
- package/src/generated/prisma/models/SubCategory.ts +1407 -0
- package/src/generated/prisma/models/Tag.ts +1271 -0
- package/src/generated/prisma/models/User.ts +1498 -0
- package/src/generated/prisma/models.ts +19 -0
- package/src/generated/prisma-v6/client.d.ts +1 -0
- package/src/generated/prisma-v6/default.d.ts +1 -0
- package/src/generated/prisma-v6/edge.d.ts +1 -0
- package/src/generated/prisma-v6/index.d.ts +13639 -0
- package/src/generated/prisma-v6/runtime/index-browser.d.ts +370 -0
- package/src/generated/prisma-v6/runtime/library.d.ts +3982 -0
- package/src/generated/prisma-v6/wasm.d.ts +1 -0
- package/src/index.test.ts +702 -2
- package/src/index.ts +79 -1
- package/src/test-setup.v6.ts +5 -0
- package/src/test-setup.v7.ts +7 -0
- package/lib/index.test.d.ts +0 -2
- package/lib/index.test.d.ts.map +0 -1
- package/lib/index.test.js +0 -4093
- package/lib/index.test.js.map +0 -1
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
|
|
2
|
+
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// biome-ignore-all lint: generated file
|
|
5
|
+
// @ts-nocheck
|
|
6
|
+
/*
|
|
7
|
+
* WARNING: This is an internal file that is subject to change!
|
|
8
|
+
*
|
|
9
|
+
* 🛑 Under no circumstances should you import this file directly! 🛑
|
|
10
|
+
*
|
|
11
|
+
* All exports from this file are wrapped under a `Prisma` namespace object in the browser.ts file.
|
|
12
|
+
* While this enables partial backward compatibility, it is not part of the stable public API.
|
|
13
|
+
*
|
|
14
|
+
* If you are looking for your Models, Enums, and Input Types, please import them from the respective
|
|
15
|
+
* model files in the `model` directory!
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import * as runtime from "@prisma/client/runtime/index-browser"
|
|
19
|
+
|
|
20
|
+
export type * from '../models.js'
|
|
21
|
+
export type * from './prismaNamespace.js'
|
|
22
|
+
|
|
23
|
+
export const Decimal = runtime.Decimal
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
export const NullTypes = {
|
|
27
|
+
DbNull: runtime.NullTypes.DbNull as (new (secret: never) => typeof runtime.DbNull),
|
|
28
|
+
JsonNull: runtime.NullTypes.JsonNull as (new (secret: never) => typeof runtime.JsonNull),
|
|
29
|
+
AnyNull: runtime.NullTypes.AnyNull as (new (secret: never) => typeof runtime.AnyNull),
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Helper for filtering JSON entries that have `null` on the database (empty on the db)
|
|
33
|
+
*
|
|
34
|
+
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
|
35
|
+
*/
|
|
36
|
+
export const DbNull = runtime.DbNull
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Helper for filtering JSON entries that have JSON `null` values (not empty on the db)
|
|
40
|
+
*
|
|
41
|
+
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
|
42
|
+
*/
|
|
43
|
+
export const JsonNull = runtime.JsonNull
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull`
|
|
47
|
+
*
|
|
48
|
+
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
|
49
|
+
*/
|
|
50
|
+
export const AnyNull = runtime.AnyNull
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
export const ModelName = {
|
|
54
|
+
Resource: 'Resource',
|
|
55
|
+
User: 'User',
|
|
56
|
+
NestedResource: 'NestedResource',
|
|
57
|
+
NextLevelNestedResource: 'NextLevelNestedResource',
|
|
58
|
+
Tag: 'Tag',
|
|
59
|
+
Category: 'Category',
|
|
60
|
+
SubCategory: 'SubCategory',
|
|
61
|
+
Label: 'Label'
|
|
62
|
+
} as const
|
|
63
|
+
|
|
64
|
+
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
|
|
65
|
+
|
|
66
|
+
/*
|
|
67
|
+
* Enums
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
export const TransactionIsolationLevel = runtime.makeStrictEnum({
|
|
71
|
+
Serializable: 'Serializable'
|
|
72
|
+
} as const)
|
|
73
|
+
|
|
74
|
+
export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
export const ResourceScalarFieldEnum = {
|
|
78
|
+
id: 'id',
|
|
79
|
+
aString: 'aString',
|
|
80
|
+
aNumber: 'aNumber',
|
|
81
|
+
aBool: 'aBool',
|
|
82
|
+
creatorId: 'creatorId',
|
|
83
|
+
nestedResourceId: 'nestedResourceId',
|
|
84
|
+
aOptionalString: 'aOptionalString'
|
|
85
|
+
} as const
|
|
86
|
+
|
|
87
|
+
export type ResourceScalarFieldEnum = (typeof ResourceScalarFieldEnum)[keyof typeof ResourceScalarFieldEnum]
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
export const UserScalarFieldEnum = {
|
|
91
|
+
id: 'id',
|
|
92
|
+
aString: 'aString',
|
|
93
|
+
aNumber: 'aNumber',
|
|
94
|
+
aBool: 'aBool'
|
|
95
|
+
} as const
|
|
96
|
+
|
|
97
|
+
export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum]
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
export const NestedResourceScalarFieldEnum = {
|
|
101
|
+
id: 'id',
|
|
102
|
+
aString: 'aString',
|
|
103
|
+
aNumber: 'aNumber',
|
|
104
|
+
aBool: 'aBool',
|
|
105
|
+
aOptionalString: 'aOptionalString',
|
|
106
|
+
nextLevelNestedResourceId: 'nextLevelNestedResourceId'
|
|
107
|
+
} as const
|
|
108
|
+
|
|
109
|
+
export type NestedResourceScalarFieldEnum = (typeof NestedResourceScalarFieldEnum)[keyof typeof NestedResourceScalarFieldEnum]
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
export const NextLevelNestedResourceScalarFieldEnum = {
|
|
113
|
+
id: 'id',
|
|
114
|
+
aString: 'aString',
|
|
115
|
+
aNumber: 'aNumber',
|
|
116
|
+
aBool: 'aBool'
|
|
117
|
+
} as const
|
|
118
|
+
|
|
119
|
+
export type NextLevelNestedResourceScalarFieldEnum = (typeof NextLevelNestedResourceScalarFieldEnum)[keyof typeof NextLevelNestedResourceScalarFieldEnum]
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
export const TagScalarFieldEnum = {
|
|
123
|
+
id: 'id',
|
|
124
|
+
name: 'name'
|
|
125
|
+
} as const
|
|
126
|
+
|
|
127
|
+
export type TagScalarFieldEnum = (typeof TagScalarFieldEnum)[keyof typeof TagScalarFieldEnum]
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
export const CategoryScalarFieldEnum = {
|
|
131
|
+
id: 'id',
|
|
132
|
+
name: 'name'
|
|
133
|
+
} as const
|
|
134
|
+
|
|
135
|
+
export type CategoryScalarFieldEnum = (typeof CategoryScalarFieldEnum)[keyof typeof CategoryScalarFieldEnum]
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
export const SubCategoryScalarFieldEnum = {
|
|
139
|
+
id: 'id',
|
|
140
|
+
name: 'name'
|
|
141
|
+
} as const
|
|
142
|
+
|
|
143
|
+
export type SubCategoryScalarFieldEnum = (typeof SubCategoryScalarFieldEnum)[keyof typeof SubCategoryScalarFieldEnum]
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
export const LabelScalarFieldEnum = {
|
|
147
|
+
id: 'id',
|
|
148
|
+
name: 'name'
|
|
149
|
+
} as const
|
|
150
|
+
|
|
151
|
+
export type LabelScalarFieldEnum = (typeof LabelScalarFieldEnum)[keyof typeof LabelScalarFieldEnum]
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
export const SortOrder = {
|
|
155
|
+
asc: 'asc',
|
|
156
|
+
desc: 'desc'
|
|
157
|
+
} as const
|
|
158
|
+
|
|
159
|
+
export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
export const NullsOrder = {
|
|
163
|
+
first: 'first',
|
|
164
|
+
last: 'last'
|
|
165
|
+
} as const
|
|
166
|
+
|
|
167
|
+
export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]
|
|
168
|
+
|