@allbluecn/database 0.4.0 → 0.4.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.
Files changed (190) hide show
  1. package/desktop-init.ts +128 -0
  2. package/generated/browser.ts +494 -0
  3. package/generated/client.ts +518 -0
  4. package/generated/commonInputTypes.ts +1056 -0
  5. package/generated/enums.ts +93 -0
  6. package/generated/internal/class.ts +1144 -0
  7. package/generated/internal/prismaNamespace.ts +9603 -0
  8. package/generated/internal/prismaNamespaceBrowser.ts +1695 -0
  9. package/generated/models/Account.ts +1648 -0
  10. package/generated/models/AgentConversation.ts +1651 -0
  11. package/generated/models/AgentMessage.ts +1409 -0
  12. package/generated/models/AiProvider.ts +1607 -0
  13. package/generated/models/AiProviderConfig.ts +1514 -0
  14. package/generated/models/AiUsageLog.ts +1863 -0
  15. package/generated/models/AnyHubApp.ts +1911 -0
  16. package/generated/models/AnyHubMarketApp.ts +2008 -0
  17. package/generated/models/AnyHubPermission.ts +1422 -0
  18. package/generated/models/AnyHubRecommendation.ts +1870 -0
  19. package/generated/models/AnyHubRecommender.ts +1471 -0
  20. package/generated/models/Artboard.ts +1811 -0
  21. package/generated/models/ArtboardExport.ts +1548 -0
  22. package/generated/models/ArticleFavorite.ts +1352 -0
  23. package/generated/models/AuditLog.ts +1533 -0
  24. package/generated/models/Block.ts +1650 -0
  25. package/generated/models/BlockComponent.ts +1734 -0
  26. package/generated/models/BlockInstance.ts +2043 -0
  27. package/generated/models/BookmarkCategory.ts +1670 -0
  28. package/generated/models/ChatInterrupt.ts +1699 -0
  29. package/generated/models/ChatMessage.ts +1438 -0
  30. package/generated/models/ChatRun.ts +1632 -0
  31. package/generated/models/ChatThread.ts +2133 -0
  32. package/generated/models/Comment.ts +2206 -0
  33. package/generated/models/CommentIgnore.ts +1430 -0
  34. package/generated/models/CommentReaction.ts +1472 -0
  35. package/generated/models/ComplianceExport.ts +1345 -0
  36. package/generated/models/Component.ts +2345 -0
  37. package/generated/models/ComponentInstance.ts +2102 -0
  38. package/generated/models/ComponentTag.ts +1281 -0
  39. package/generated/models/CustomRole.ts +1560 -0
  40. package/generated/models/DesignProject.ts +1643 -0
  41. package/generated/models/DictionaryTerm.ts +1642 -0
  42. package/generated/models/GenerationRun.ts +1543 -0
  43. package/generated/models/IndustryCompliance.ts +1797 -0
  44. package/generated/models/InvitationCode.ts +1417 -0
  45. package/generated/models/InvitationUse.ts +1424 -0
  46. package/generated/models/Invoice.ts +1710 -0
  47. package/generated/models/KnowledgeBase.ts +1671 -0
  48. package/generated/models/KnowledgeDocument.ts +2458 -0
  49. package/generated/models/KnowledgeShareRecord.ts +1352 -0
  50. package/generated/models/Label.ts +1482 -0
  51. package/generated/models/LegalRegulation.ts +1873 -0
  52. package/generated/models/LicenseActivation.ts +1415 -0
  53. package/generated/models/LicenseKey.ts +1884 -0
  54. package/generated/models/LoginLog.ts +1450 -0
  55. package/generated/models/MonitoringErrorReport.ts +1299 -0
  56. package/generated/models/MonitoringHealthSnapshot.ts +1249 -0
  57. package/generated/models/MonitoringMetricsSnapshot.ts +1369 -0
  58. package/generated/models/MonitoringRequestLog.ts +1283 -0
  59. package/generated/models/PRD.ts +2805 -0
  60. package/generated/models/PRDPage.ts +2402 -0
  61. package/generated/models/PRDTag.ts +1430 -0
  62. package/generated/models/PRDVersion.ts +2121 -0
  63. package/generated/models/PageVersion.ts +1523 -0
  64. package/generated/models/PasswordResetToken.ts +1380 -0
  65. package/generated/models/Plan.ts +2069 -0
  66. package/generated/models/Project.ts +2148 -0
  67. package/generated/models/ProjectActivity.ts +1582 -0
  68. package/generated/models/ProjectMember.ts +1512 -0
  69. package/generated/models/ProviderEvent.ts +1227 -0
  70. package/generated/models/Reference.ts +1177 -0
  71. package/generated/models/Review.ts +1912 -0
  72. package/generated/models/ReviewComment.ts +1904 -0
  73. package/generated/models/RoleAssignment.ts +1430 -0
  74. package/generated/models/SequenceCounter.ts +1137 -0
  75. package/generated/models/Share.ts +1681 -0
  76. package/generated/models/ShareVersion.ts +1389 -0
  77. package/generated/models/SsoMapping.ts +1512 -0
  78. package/generated/models/SsoProvider.ts +1639 -0
  79. package/generated/models/Story.ts +5234 -0
  80. package/generated/models/StoryActivity.ts +1664 -0
  81. package/generated/models/StoryAttachment.ts +1467 -0
  82. package/generated/models/StoryComment.ts +1992 -0
  83. package/generated/models/StoryDependency.ts +1517 -0
  84. package/generated/models/StoryDocLink.ts +1430 -0
  85. package/generated/models/StoryFilterView.ts +1587 -0
  86. package/generated/models/StoryLabel.ts +1349 -0
  87. package/generated/models/StoryLink.ts +1415 -0
  88. package/generated/models/StoryPrdLink.ts +1430 -0
  89. package/generated/models/StoryReaction.ts +1472 -0
  90. package/generated/models/Subscription.ts +2147 -0
  91. package/generated/models/SystemSetting.ts +1217 -0
  92. package/generated/models/Tag.ts +1655 -0
  93. package/generated/models/TeamInvitation.ts +1526 -0
  94. package/generated/models/TeamMembership.ts +1436 -0
  95. package/generated/models/Template.ts +1391 -0
  96. package/generated/models/TemplateBlock.ts +1664 -0
  97. package/generated/models/ThirdPartyDependency.ts +1473 -0
  98. package/generated/models/UsageRecord.ts +1505 -0
  99. package/generated/models/User.ts +20998 -0
  100. package/generated/models/UserAgent.ts +1900 -0
  101. package/generated/models/UserSkill.ts +1456 -0
  102. package/generated/models/WebsiteBookmark.ts +2219 -0
  103. package/generated/models/Workspace.ts +2279 -0
  104. package/generated/models.ts +106 -0
  105. package/generated-sqlite/browser.ts +399 -0
  106. package/generated-sqlite/client.ts +423 -0
  107. package/generated-sqlite/commonInputTypes.ts +608 -0
  108. package/generated-sqlite/enums.ts +15 -0
  109. package/generated-sqlite/internal/class.ts +954 -0
  110. package/generated-sqlite/internal/prismaNamespace.ts +7716 -0
  111. package/generated-sqlite/internal/prismaNamespaceBrowser.ts +1415 -0
  112. package/generated-sqlite/models/AgentConversation.ts +1647 -0
  113. package/generated-sqlite/models/AgentMessage.ts +1406 -0
  114. package/generated-sqlite/models/AiProvider.ts +1605 -0
  115. package/generated-sqlite/models/AiProviderConfig.ts +1511 -0
  116. package/generated-sqlite/models/AiUsageLog.ts +1845 -0
  117. package/generated-sqlite/models/AnyHubApp.ts +1908 -0
  118. package/generated-sqlite/models/AnyHubMarketApp.ts +1997 -0
  119. package/generated-sqlite/models/AnyHubPermission.ts +1419 -0
  120. package/generated-sqlite/models/AnyHubRecommendation.ts +1867 -0
  121. package/generated-sqlite/models/AnyHubRecommender.ts +1467 -0
  122. package/generated-sqlite/models/Artboard.ts +1808 -0
  123. package/generated-sqlite/models/ArtboardExport.ts +1545 -0
  124. package/generated-sqlite/models/ArticleFavorite.ts +1349 -0
  125. package/generated-sqlite/models/AuditLog.ts +1287 -0
  126. package/generated-sqlite/models/Block.ts +1648 -0
  127. package/generated-sqlite/models/BlockComponent.ts +1730 -0
  128. package/generated-sqlite/models/BlockInstance.ts +2039 -0
  129. package/generated-sqlite/models/BookmarkCategory.ts +1667 -0
  130. package/generated-sqlite/models/ChatInterrupt.ts +1695 -0
  131. package/generated-sqlite/models/ChatMessage.ts +1435 -0
  132. package/generated-sqlite/models/ChatRun.ts +1629 -0
  133. package/generated-sqlite/models/ChatThread.ts +2129 -0
  134. package/generated-sqlite/models/Comment.ts +2201 -0
  135. package/generated-sqlite/models/CommentIgnore.ts +1426 -0
  136. package/generated-sqlite/models/ComplianceExport.ts +1343 -0
  137. package/generated-sqlite/models/Component.ts +2326 -0
  138. package/generated-sqlite/models/ComponentInstance.ts +2097 -0
  139. package/generated-sqlite/models/ComponentTag.ts +1278 -0
  140. package/generated-sqlite/models/CustomRole.ts +1209 -0
  141. package/generated-sqlite/models/DesignProject.ts +1640 -0
  142. package/generated-sqlite/models/DictionaryTerm.ts +1639 -0
  143. package/generated-sqlite/models/GenerationRun.ts +1540 -0
  144. package/generated-sqlite/models/IndustryCompliance.ts +1794 -0
  145. package/generated-sqlite/models/InvitationCode.ts +1415 -0
  146. package/generated-sqlite/models/InvitationUse.ts +1420 -0
  147. package/generated-sqlite/models/Invoice.ts +1707 -0
  148. package/generated-sqlite/models/KnowledgeBase.ts +1668 -0
  149. package/generated-sqlite/models/KnowledgeDocument.ts +2282 -0
  150. package/generated-sqlite/models/KnowledgeShareRecord.ts +1349 -0
  151. package/generated-sqlite/models/LegalRegulation.ts +1870 -0
  152. package/generated-sqlite/models/LicenseActivation.ts +1203 -0
  153. package/generated-sqlite/models/LicenseKey.ts +1443 -0
  154. package/generated-sqlite/models/LoginLog.ts +1447 -0
  155. package/generated-sqlite/models/PRD.ts +2616 -0
  156. package/generated-sqlite/models/PRDPage.ts +2398 -0
  157. package/generated-sqlite/models/PRDTag.ts +1426 -0
  158. package/generated-sqlite/models/PRDVersion.ts +2117 -0
  159. package/generated-sqlite/models/PageVersion.ts +1528 -0
  160. package/generated-sqlite/models/PasswordResetToken.ts +1377 -0
  161. package/generated-sqlite/models/Plan.ts +2060 -0
  162. package/generated-sqlite/models/Project.ts +1994 -0
  163. package/generated-sqlite/models/ProjectActivity.ts +1578 -0
  164. package/generated-sqlite/models/ProjectMember.ts +1508 -0
  165. package/generated-sqlite/models/ProviderEvent.ts +1225 -0
  166. package/generated-sqlite/models/Reference.ts +1175 -0
  167. package/generated-sqlite/models/Review.ts +1903 -0
  168. package/generated-sqlite/models/ReviewComment.ts +1899 -0
  169. package/generated-sqlite/models/RoleAssignment.ts +1125 -0
  170. package/generated-sqlite/models/Share.ts +1674 -0
  171. package/generated-sqlite/models/ShareVersion.ts +1385 -0
  172. package/generated-sqlite/models/SsoMapping.ts +1181 -0
  173. package/generated-sqlite/models/SsoProvider.ts +1266 -0
  174. package/generated-sqlite/models/Subscription.ts +2137 -0
  175. package/generated-sqlite/models/SystemSetting.ts +1215 -0
  176. package/generated-sqlite/models/Tag.ts +1652 -0
  177. package/generated-sqlite/models/TeamInvitation.ts +1523 -0
  178. package/generated-sqlite/models/TeamMembership.ts +1433 -0
  179. package/generated-sqlite/models/Template.ts +1389 -0
  180. package/generated-sqlite/models/TemplateBlock.ts +1660 -0
  181. package/generated-sqlite/models/ThirdPartyDependency.ts +1471 -0
  182. package/generated-sqlite/models/UsageRecord.ts +1498 -0
  183. package/generated-sqlite/models/User.ts +13558 -0
  184. package/generated-sqlite/models/UserAgent.ts +1897 -0
  185. package/generated-sqlite/models/UserSkill.ts +1453 -0
  186. package/generated-sqlite/models/WebsiteBookmark.ts +2215 -0
  187. package/generated-sqlite/models/Workspace.ts +1824 -0
  188. package/generated-sqlite/models.ts +87 -0
  189. package/package.json +7 -3
  190. package/LICENSE +0 -661
@@ -0,0 +1,1209 @@
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
+ * This file exports the `CustomRole` model and its related types.
8
+ *
9
+ * 🟢 You can import this file directly.
10
+ */
11
+ import type * as runtime from "@prisma/client/runtime/client"
12
+ import type * as $Enums from "../enums"
13
+ import type * as Prisma from "../internal/prismaNamespace"
14
+
15
+ /**
16
+ * Model CustomRole
17
+ *
18
+ */
19
+ export type CustomRoleModel = runtime.Types.Result.DefaultSelection<Prisma.$CustomRolePayload>
20
+
21
+ export type AggregateCustomRole = {
22
+ _count: CustomRoleCountAggregateOutputType | null
23
+ _min: CustomRoleMinAggregateOutputType | null
24
+ _max: CustomRoleMaxAggregateOutputType | null
25
+ }
26
+
27
+ export type CustomRoleMinAggregateOutputType = {
28
+ id: string | null
29
+ workspaceId: string | null
30
+ name: string | null
31
+ permissions: string | null
32
+ isSystem: boolean | null
33
+ createdAt: Date | null
34
+ updatedAt: Date | null
35
+ }
36
+
37
+ export type CustomRoleMaxAggregateOutputType = {
38
+ id: string | null
39
+ workspaceId: string | null
40
+ name: string | null
41
+ permissions: string | null
42
+ isSystem: boolean | null
43
+ createdAt: Date | null
44
+ updatedAt: Date | null
45
+ }
46
+
47
+ export type CustomRoleCountAggregateOutputType = {
48
+ id: number
49
+ workspaceId: number
50
+ name: number
51
+ permissions: number
52
+ isSystem: number
53
+ createdAt: number
54
+ updatedAt: number
55
+ _all: number
56
+ }
57
+
58
+
59
+ export type CustomRoleMinAggregateInputType = {
60
+ id?: true
61
+ workspaceId?: true
62
+ name?: true
63
+ permissions?: true
64
+ isSystem?: true
65
+ createdAt?: true
66
+ updatedAt?: true
67
+ }
68
+
69
+ export type CustomRoleMaxAggregateInputType = {
70
+ id?: true
71
+ workspaceId?: true
72
+ name?: true
73
+ permissions?: true
74
+ isSystem?: true
75
+ createdAt?: true
76
+ updatedAt?: true
77
+ }
78
+
79
+ export type CustomRoleCountAggregateInputType = {
80
+ id?: true
81
+ workspaceId?: true
82
+ name?: true
83
+ permissions?: true
84
+ isSystem?: true
85
+ createdAt?: true
86
+ updatedAt?: true
87
+ _all?: true
88
+ }
89
+
90
+ export type CustomRoleAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
91
+ /**
92
+ * Filter which CustomRole to aggregate.
93
+ */
94
+ where?: Prisma.CustomRoleWhereInput
95
+ /**
96
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
97
+ *
98
+ * Determine the order of CustomRoles to fetch.
99
+ */
100
+ orderBy?: Prisma.CustomRoleOrderByWithRelationInput | Prisma.CustomRoleOrderByWithRelationInput[]
101
+ /**
102
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
103
+ *
104
+ * Sets the start position
105
+ */
106
+ cursor?: Prisma.CustomRoleWhereUniqueInput
107
+ /**
108
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
109
+ *
110
+ * Take `±n` CustomRoles from the position of the cursor.
111
+ */
112
+ take?: number
113
+ /**
114
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
115
+ *
116
+ * Skip the first `n` CustomRoles.
117
+ */
118
+ skip?: number
119
+ /**
120
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
121
+ *
122
+ * Count returned CustomRoles
123
+ **/
124
+ _count?: true | CustomRoleCountAggregateInputType
125
+ /**
126
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
127
+ *
128
+ * Select which fields to find the minimum value
129
+ **/
130
+ _min?: CustomRoleMinAggregateInputType
131
+ /**
132
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
133
+ *
134
+ * Select which fields to find the maximum value
135
+ **/
136
+ _max?: CustomRoleMaxAggregateInputType
137
+ }
138
+
139
+ export type GetCustomRoleAggregateType<T extends CustomRoleAggregateArgs> = {
140
+ [P in keyof T & keyof AggregateCustomRole]: P extends '_count' | 'count'
141
+ ? T[P] extends true
142
+ ? number
143
+ : Prisma.GetScalarType<T[P], AggregateCustomRole[P]>
144
+ : Prisma.GetScalarType<T[P], AggregateCustomRole[P]>
145
+ }
146
+
147
+
148
+
149
+
150
+ export type CustomRoleGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
151
+ where?: Prisma.CustomRoleWhereInput
152
+ orderBy?: Prisma.CustomRoleOrderByWithAggregationInput | Prisma.CustomRoleOrderByWithAggregationInput[]
153
+ by: Prisma.CustomRoleScalarFieldEnum[] | Prisma.CustomRoleScalarFieldEnum
154
+ having?: Prisma.CustomRoleScalarWhereWithAggregatesInput
155
+ take?: number
156
+ skip?: number
157
+ _count?: CustomRoleCountAggregateInputType | true
158
+ _min?: CustomRoleMinAggregateInputType
159
+ _max?: CustomRoleMaxAggregateInputType
160
+ }
161
+
162
+ export type CustomRoleGroupByOutputType = {
163
+ id: string
164
+ workspaceId: string
165
+ name: string
166
+ permissions: string
167
+ isSystem: boolean
168
+ createdAt: Date
169
+ updatedAt: Date
170
+ _count: CustomRoleCountAggregateOutputType | null
171
+ _min: CustomRoleMinAggregateOutputType | null
172
+ _max: CustomRoleMaxAggregateOutputType | null
173
+ }
174
+
175
+ export type GetCustomRoleGroupByPayload<T extends CustomRoleGroupByArgs> = Prisma.PrismaPromise<
176
+ Array<
177
+ Prisma.PickEnumerable<CustomRoleGroupByOutputType, T['by']> &
178
+ {
179
+ [P in ((keyof T) & (keyof CustomRoleGroupByOutputType))]: P extends '_count'
180
+ ? T[P] extends boolean
181
+ ? number
182
+ : Prisma.GetScalarType<T[P], CustomRoleGroupByOutputType[P]>
183
+ : Prisma.GetScalarType<T[P], CustomRoleGroupByOutputType[P]>
184
+ }
185
+ >
186
+ >
187
+
188
+
189
+
190
+ export type CustomRoleWhereInput = {
191
+ AND?: Prisma.CustomRoleWhereInput | Prisma.CustomRoleWhereInput[]
192
+ OR?: Prisma.CustomRoleWhereInput[]
193
+ NOT?: Prisma.CustomRoleWhereInput | Prisma.CustomRoleWhereInput[]
194
+ id?: Prisma.StringFilter<"CustomRole"> | string
195
+ workspaceId?: Prisma.StringFilter<"CustomRole"> | string
196
+ name?: Prisma.StringFilter<"CustomRole"> | string
197
+ permissions?: Prisma.StringFilter<"CustomRole"> | string
198
+ isSystem?: Prisma.BoolFilter<"CustomRole"> | boolean
199
+ createdAt?: Prisma.DateTimeFilter<"CustomRole"> | Date | string
200
+ updatedAt?: Prisma.DateTimeFilter<"CustomRole"> | Date | string
201
+ }
202
+
203
+ export type CustomRoleOrderByWithRelationInput = {
204
+ id?: Prisma.SortOrder
205
+ workspaceId?: Prisma.SortOrder
206
+ name?: Prisma.SortOrder
207
+ permissions?: Prisma.SortOrder
208
+ isSystem?: Prisma.SortOrder
209
+ createdAt?: Prisma.SortOrder
210
+ updatedAt?: Prisma.SortOrder
211
+ }
212
+
213
+ export type CustomRoleWhereUniqueInput = Prisma.AtLeast<{
214
+ id?: string
215
+ workspaceId_name?: Prisma.CustomRoleWorkspaceIdNameCompoundUniqueInput
216
+ AND?: Prisma.CustomRoleWhereInput | Prisma.CustomRoleWhereInput[]
217
+ OR?: Prisma.CustomRoleWhereInput[]
218
+ NOT?: Prisma.CustomRoleWhereInput | Prisma.CustomRoleWhereInput[]
219
+ workspaceId?: Prisma.StringFilter<"CustomRole"> | string
220
+ name?: Prisma.StringFilter<"CustomRole"> | string
221
+ permissions?: Prisma.StringFilter<"CustomRole"> | string
222
+ isSystem?: Prisma.BoolFilter<"CustomRole"> | boolean
223
+ createdAt?: Prisma.DateTimeFilter<"CustomRole"> | Date | string
224
+ updatedAt?: Prisma.DateTimeFilter<"CustomRole"> | Date | string
225
+ }, "id" | "workspaceId_name">
226
+
227
+ export type CustomRoleOrderByWithAggregationInput = {
228
+ id?: Prisma.SortOrder
229
+ workspaceId?: Prisma.SortOrder
230
+ name?: Prisma.SortOrder
231
+ permissions?: Prisma.SortOrder
232
+ isSystem?: Prisma.SortOrder
233
+ createdAt?: Prisma.SortOrder
234
+ updatedAt?: Prisma.SortOrder
235
+ _count?: Prisma.CustomRoleCountOrderByAggregateInput
236
+ _max?: Prisma.CustomRoleMaxOrderByAggregateInput
237
+ _min?: Prisma.CustomRoleMinOrderByAggregateInput
238
+ }
239
+
240
+ export type CustomRoleScalarWhereWithAggregatesInput = {
241
+ AND?: Prisma.CustomRoleScalarWhereWithAggregatesInput | Prisma.CustomRoleScalarWhereWithAggregatesInput[]
242
+ OR?: Prisma.CustomRoleScalarWhereWithAggregatesInput[]
243
+ NOT?: Prisma.CustomRoleScalarWhereWithAggregatesInput | Prisma.CustomRoleScalarWhereWithAggregatesInput[]
244
+ id?: Prisma.StringWithAggregatesFilter<"CustomRole"> | string
245
+ workspaceId?: Prisma.StringWithAggregatesFilter<"CustomRole"> | string
246
+ name?: Prisma.StringWithAggregatesFilter<"CustomRole"> | string
247
+ permissions?: Prisma.StringWithAggregatesFilter<"CustomRole"> | string
248
+ isSystem?: Prisma.BoolWithAggregatesFilter<"CustomRole"> | boolean
249
+ createdAt?: Prisma.DateTimeWithAggregatesFilter<"CustomRole"> | Date | string
250
+ updatedAt?: Prisma.DateTimeWithAggregatesFilter<"CustomRole"> | Date | string
251
+ }
252
+
253
+ export type CustomRoleCreateInput = {
254
+ id?: string
255
+ workspaceId: string
256
+ name: string
257
+ permissions?: string
258
+ isSystem?: boolean
259
+ createdAt?: Date | string
260
+ updatedAt?: Date | string
261
+ }
262
+
263
+ export type CustomRoleUncheckedCreateInput = {
264
+ id?: string
265
+ workspaceId: string
266
+ name: string
267
+ permissions?: string
268
+ isSystem?: boolean
269
+ createdAt?: Date | string
270
+ updatedAt?: Date | string
271
+ }
272
+
273
+ export type CustomRoleUpdateInput = {
274
+ id?: Prisma.StringFieldUpdateOperationsInput | string
275
+ workspaceId?: Prisma.StringFieldUpdateOperationsInput | string
276
+ name?: Prisma.StringFieldUpdateOperationsInput | string
277
+ permissions?: Prisma.StringFieldUpdateOperationsInput | string
278
+ isSystem?: Prisma.BoolFieldUpdateOperationsInput | boolean
279
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
280
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
281
+ }
282
+
283
+ export type CustomRoleUncheckedUpdateInput = {
284
+ id?: Prisma.StringFieldUpdateOperationsInput | string
285
+ workspaceId?: Prisma.StringFieldUpdateOperationsInput | string
286
+ name?: Prisma.StringFieldUpdateOperationsInput | string
287
+ permissions?: Prisma.StringFieldUpdateOperationsInput | string
288
+ isSystem?: Prisma.BoolFieldUpdateOperationsInput | boolean
289
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
290
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
291
+ }
292
+
293
+ export type CustomRoleCreateManyInput = {
294
+ id?: string
295
+ workspaceId: string
296
+ name: string
297
+ permissions?: string
298
+ isSystem?: boolean
299
+ createdAt?: Date | string
300
+ updatedAt?: Date | string
301
+ }
302
+
303
+ export type CustomRoleUpdateManyMutationInput = {
304
+ id?: Prisma.StringFieldUpdateOperationsInput | string
305
+ workspaceId?: Prisma.StringFieldUpdateOperationsInput | string
306
+ name?: Prisma.StringFieldUpdateOperationsInput | string
307
+ permissions?: Prisma.StringFieldUpdateOperationsInput | string
308
+ isSystem?: Prisma.BoolFieldUpdateOperationsInput | boolean
309
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
310
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
311
+ }
312
+
313
+ export type CustomRoleUncheckedUpdateManyInput = {
314
+ id?: Prisma.StringFieldUpdateOperationsInput | string
315
+ workspaceId?: Prisma.StringFieldUpdateOperationsInput | string
316
+ name?: Prisma.StringFieldUpdateOperationsInput | string
317
+ permissions?: Prisma.StringFieldUpdateOperationsInput | string
318
+ isSystem?: Prisma.BoolFieldUpdateOperationsInput | boolean
319
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
320
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
321
+ }
322
+
323
+ export type CustomRoleWorkspaceIdNameCompoundUniqueInput = {
324
+ workspaceId: string
325
+ name: string
326
+ }
327
+
328
+ export type CustomRoleCountOrderByAggregateInput = {
329
+ id?: Prisma.SortOrder
330
+ workspaceId?: Prisma.SortOrder
331
+ name?: Prisma.SortOrder
332
+ permissions?: Prisma.SortOrder
333
+ isSystem?: Prisma.SortOrder
334
+ createdAt?: Prisma.SortOrder
335
+ updatedAt?: Prisma.SortOrder
336
+ }
337
+
338
+ export type CustomRoleMaxOrderByAggregateInput = {
339
+ id?: Prisma.SortOrder
340
+ workspaceId?: Prisma.SortOrder
341
+ name?: Prisma.SortOrder
342
+ permissions?: Prisma.SortOrder
343
+ isSystem?: Prisma.SortOrder
344
+ createdAt?: Prisma.SortOrder
345
+ updatedAt?: Prisma.SortOrder
346
+ }
347
+
348
+ export type CustomRoleMinOrderByAggregateInput = {
349
+ id?: Prisma.SortOrder
350
+ workspaceId?: Prisma.SortOrder
351
+ name?: Prisma.SortOrder
352
+ permissions?: Prisma.SortOrder
353
+ isSystem?: Prisma.SortOrder
354
+ createdAt?: Prisma.SortOrder
355
+ updatedAt?: Prisma.SortOrder
356
+ }
357
+
358
+
359
+
360
+ export type CustomRoleSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
361
+ id?: boolean
362
+ workspaceId?: boolean
363
+ name?: boolean
364
+ permissions?: boolean
365
+ isSystem?: boolean
366
+ createdAt?: boolean
367
+ updatedAt?: boolean
368
+ }, ExtArgs["result"]["customRole"]>
369
+
370
+ export type CustomRoleSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
371
+ id?: boolean
372
+ workspaceId?: boolean
373
+ name?: boolean
374
+ permissions?: boolean
375
+ isSystem?: boolean
376
+ createdAt?: boolean
377
+ updatedAt?: boolean
378
+ }, ExtArgs["result"]["customRole"]>
379
+
380
+ export type CustomRoleSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
381
+ id?: boolean
382
+ workspaceId?: boolean
383
+ name?: boolean
384
+ permissions?: boolean
385
+ isSystem?: boolean
386
+ createdAt?: boolean
387
+ updatedAt?: boolean
388
+ }, ExtArgs["result"]["customRole"]>
389
+
390
+ export type CustomRoleSelectScalar = {
391
+ id?: boolean
392
+ workspaceId?: boolean
393
+ name?: boolean
394
+ permissions?: boolean
395
+ isSystem?: boolean
396
+ createdAt?: boolean
397
+ updatedAt?: boolean
398
+ }
399
+
400
+ export type CustomRoleOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "workspaceId" | "name" | "permissions" | "isSystem" | "createdAt" | "updatedAt", ExtArgs["result"]["customRole"]>
401
+
402
+ export type $CustomRolePayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
403
+ name: "CustomRole"
404
+ objects: {}
405
+ scalars: runtime.Types.Extensions.GetPayloadResult<{
406
+ id: string
407
+ workspaceId: string
408
+ name: string
409
+ permissions: string
410
+ isSystem: boolean
411
+ createdAt: Date
412
+ updatedAt: Date
413
+ }, ExtArgs["result"]["customRole"]>
414
+ composites: {}
415
+ }
416
+
417
+ export type CustomRoleGetPayload<S extends boolean | null | undefined | CustomRoleDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$CustomRolePayload, S>
418
+
419
+ export type CustomRoleCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
420
+ Omit<CustomRoleFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
421
+ select?: CustomRoleCountAggregateInputType | true
422
+ }
423
+
424
+ export interface CustomRoleDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
425
+ [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['CustomRole'], meta: { name: 'CustomRole' } }
426
+ /**
427
+ * Find zero or one CustomRole that matches the filter.
428
+ * @param {CustomRoleFindUniqueArgs} args - Arguments to find a CustomRole
429
+ * @example
430
+ * // Get one CustomRole
431
+ * const customRole = await prisma.customRole.findUnique({
432
+ * where: {
433
+ * // ... provide filter here
434
+ * }
435
+ * })
436
+ */
437
+ findUnique<T extends CustomRoleFindUniqueArgs>(args: Prisma.SelectSubset<T, CustomRoleFindUniqueArgs<ExtArgs>>): Prisma.Prisma__CustomRoleClient<runtime.Types.Result.GetResult<Prisma.$CustomRolePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
438
+
439
+ /**
440
+ * Find one CustomRole that matches the filter or throw an error with `error.code='P2025'`
441
+ * if no matches were found.
442
+ * @param {CustomRoleFindUniqueOrThrowArgs} args - Arguments to find a CustomRole
443
+ * @example
444
+ * // Get one CustomRole
445
+ * const customRole = await prisma.customRole.findUniqueOrThrow({
446
+ * where: {
447
+ * // ... provide filter here
448
+ * }
449
+ * })
450
+ */
451
+ findUniqueOrThrow<T extends CustomRoleFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, CustomRoleFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__CustomRoleClient<runtime.Types.Result.GetResult<Prisma.$CustomRolePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
452
+
453
+ /**
454
+ * Find the first CustomRole that matches the filter.
455
+ * Note, that providing `undefined` is treated as the value not being there.
456
+ * Read more here: https://pris.ly/d/null-undefined
457
+ * @param {CustomRoleFindFirstArgs} args - Arguments to find a CustomRole
458
+ * @example
459
+ * // Get one CustomRole
460
+ * const customRole = await prisma.customRole.findFirst({
461
+ * where: {
462
+ * // ... provide filter here
463
+ * }
464
+ * })
465
+ */
466
+ findFirst<T extends CustomRoleFindFirstArgs>(args?: Prisma.SelectSubset<T, CustomRoleFindFirstArgs<ExtArgs>>): Prisma.Prisma__CustomRoleClient<runtime.Types.Result.GetResult<Prisma.$CustomRolePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
467
+
468
+ /**
469
+ * Find the first CustomRole that matches the filter or
470
+ * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
471
+ * Note, that providing `undefined` is treated as the value not being there.
472
+ * Read more here: https://pris.ly/d/null-undefined
473
+ * @param {CustomRoleFindFirstOrThrowArgs} args - Arguments to find a CustomRole
474
+ * @example
475
+ * // Get one CustomRole
476
+ * const customRole = await prisma.customRole.findFirstOrThrow({
477
+ * where: {
478
+ * // ... provide filter here
479
+ * }
480
+ * })
481
+ */
482
+ findFirstOrThrow<T extends CustomRoleFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, CustomRoleFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__CustomRoleClient<runtime.Types.Result.GetResult<Prisma.$CustomRolePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
483
+
484
+ /**
485
+ * Find zero or more CustomRoles that matches the filter.
486
+ * Note, that providing `undefined` is treated as the value not being there.
487
+ * Read more here: https://pris.ly/d/null-undefined
488
+ * @param {CustomRoleFindManyArgs} args - Arguments to filter and select certain fields only.
489
+ * @example
490
+ * // Get all CustomRoles
491
+ * const customRoles = await prisma.customRole.findMany()
492
+ *
493
+ * // Get first 10 CustomRoles
494
+ * const customRoles = await prisma.customRole.findMany({ take: 10 })
495
+ *
496
+ * // Only select the `id`
497
+ * const customRoleWithIdOnly = await prisma.customRole.findMany({ select: { id: true } })
498
+ *
499
+ */
500
+ findMany<T extends CustomRoleFindManyArgs>(args?: Prisma.SelectSubset<T, CustomRoleFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$CustomRolePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
501
+
502
+ /**
503
+ * Create a CustomRole.
504
+ * @param {CustomRoleCreateArgs} args - Arguments to create a CustomRole.
505
+ * @example
506
+ * // Create one CustomRole
507
+ * const CustomRole = await prisma.customRole.create({
508
+ * data: {
509
+ * // ... data to create a CustomRole
510
+ * }
511
+ * })
512
+ *
513
+ */
514
+ create<T extends CustomRoleCreateArgs>(args: Prisma.SelectSubset<T, CustomRoleCreateArgs<ExtArgs>>): Prisma.Prisma__CustomRoleClient<runtime.Types.Result.GetResult<Prisma.$CustomRolePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
515
+
516
+ /**
517
+ * Create many CustomRoles.
518
+ * @param {CustomRoleCreateManyArgs} args - Arguments to create many CustomRoles.
519
+ * @example
520
+ * // Create many CustomRoles
521
+ * const customRole = await prisma.customRole.createMany({
522
+ * data: [
523
+ * // ... provide data here
524
+ * ]
525
+ * })
526
+ *
527
+ */
528
+ createMany<T extends CustomRoleCreateManyArgs>(args?: Prisma.SelectSubset<T, CustomRoleCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
529
+
530
+ /**
531
+ * Create many CustomRoles and returns the data saved in the database.
532
+ * @param {CustomRoleCreateManyAndReturnArgs} args - Arguments to create many CustomRoles.
533
+ * @example
534
+ * // Create many CustomRoles
535
+ * const customRole = await prisma.customRole.createManyAndReturn({
536
+ * data: [
537
+ * // ... provide data here
538
+ * ]
539
+ * })
540
+ *
541
+ * // Create many CustomRoles and only return the `id`
542
+ * const customRoleWithIdOnly = await prisma.customRole.createManyAndReturn({
543
+ * select: { id: true },
544
+ * data: [
545
+ * // ... provide data here
546
+ * ]
547
+ * })
548
+ * Note, that providing `undefined` is treated as the value not being there.
549
+ * Read more here: https://pris.ly/d/null-undefined
550
+ *
551
+ */
552
+ createManyAndReturn<T extends CustomRoleCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, CustomRoleCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$CustomRolePayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>
553
+
554
+ /**
555
+ * Delete a CustomRole.
556
+ * @param {CustomRoleDeleteArgs} args - Arguments to delete one CustomRole.
557
+ * @example
558
+ * // Delete one CustomRole
559
+ * const CustomRole = await prisma.customRole.delete({
560
+ * where: {
561
+ * // ... filter to delete one CustomRole
562
+ * }
563
+ * })
564
+ *
565
+ */
566
+ delete<T extends CustomRoleDeleteArgs>(args: Prisma.SelectSubset<T, CustomRoleDeleteArgs<ExtArgs>>): Prisma.Prisma__CustomRoleClient<runtime.Types.Result.GetResult<Prisma.$CustomRolePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
567
+
568
+ /**
569
+ * Update one CustomRole.
570
+ * @param {CustomRoleUpdateArgs} args - Arguments to update one CustomRole.
571
+ * @example
572
+ * // Update one CustomRole
573
+ * const customRole = await prisma.customRole.update({
574
+ * where: {
575
+ * // ... provide filter here
576
+ * },
577
+ * data: {
578
+ * // ... provide data here
579
+ * }
580
+ * })
581
+ *
582
+ */
583
+ update<T extends CustomRoleUpdateArgs>(args: Prisma.SelectSubset<T, CustomRoleUpdateArgs<ExtArgs>>): Prisma.Prisma__CustomRoleClient<runtime.Types.Result.GetResult<Prisma.$CustomRolePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
584
+
585
+ /**
586
+ * Delete zero or more CustomRoles.
587
+ * @param {CustomRoleDeleteManyArgs} args - Arguments to filter CustomRoles to delete.
588
+ * @example
589
+ * // Delete a few CustomRoles
590
+ * const { count } = await prisma.customRole.deleteMany({
591
+ * where: {
592
+ * // ... provide filter here
593
+ * }
594
+ * })
595
+ *
596
+ */
597
+ deleteMany<T extends CustomRoleDeleteManyArgs>(args?: Prisma.SelectSubset<T, CustomRoleDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
598
+
599
+ /**
600
+ * Update zero or more CustomRoles.
601
+ * Note, that providing `undefined` is treated as the value not being there.
602
+ * Read more here: https://pris.ly/d/null-undefined
603
+ * @param {CustomRoleUpdateManyArgs} args - Arguments to update one or more rows.
604
+ * @example
605
+ * // Update many CustomRoles
606
+ * const customRole = await prisma.customRole.updateMany({
607
+ * where: {
608
+ * // ... provide filter here
609
+ * },
610
+ * data: {
611
+ * // ... provide data here
612
+ * }
613
+ * })
614
+ *
615
+ */
616
+ updateMany<T extends CustomRoleUpdateManyArgs>(args: Prisma.SelectSubset<T, CustomRoleUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
617
+
618
+ /**
619
+ * Update zero or more CustomRoles and returns the data updated in the database.
620
+ * @param {CustomRoleUpdateManyAndReturnArgs} args - Arguments to update many CustomRoles.
621
+ * @example
622
+ * // Update many CustomRoles
623
+ * const customRole = await prisma.customRole.updateManyAndReturn({
624
+ * where: {
625
+ * // ... provide filter here
626
+ * },
627
+ * data: [
628
+ * // ... provide data here
629
+ * ]
630
+ * })
631
+ *
632
+ * // Update zero or more CustomRoles and only return the `id`
633
+ * const customRoleWithIdOnly = await prisma.customRole.updateManyAndReturn({
634
+ * select: { id: true },
635
+ * where: {
636
+ * // ... provide filter here
637
+ * },
638
+ * data: [
639
+ * // ... provide data here
640
+ * ]
641
+ * })
642
+ * Note, that providing `undefined` is treated as the value not being there.
643
+ * Read more here: https://pris.ly/d/null-undefined
644
+ *
645
+ */
646
+ updateManyAndReturn<T extends CustomRoleUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, CustomRoleUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$CustomRolePayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>
647
+
648
+ /**
649
+ * Create or update one CustomRole.
650
+ * @param {CustomRoleUpsertArgs} args - Arguments to update or create a CustomRole.
651
+ * @example
652
+ * // Update or create a CustomRole
653
+ * const customRole = await prisma.customRole.upsert({
654
+ * create: {
655
+ * // ... data to create a CustomRole
656
+ * },
657
+ * update: {
658
+ * // ... in case it already exists, update
659
+ * },
660
+ * where: {
661
+ * // ... the filter for the CustomRole we want to update
662
+ * }
663
+ * })
664
+ */
665
+ upsert<T extends CustomRoleUpsertArgs>(args: Prisma.SelectSubset<T, CustomRoleUpsertArgs<ExtArgs>>): Prisma.Prisma__CustomRoleClient<runtime.Types.Result.GetResult<Prisma.$CustomRolePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
666
+
667
+
668
+ /**
669
+ * Count the number of CustomRoles.
670
+ * Note, that providing `undefined` is treated as the value not being there.
671
+ * Read more here: https://pris.ly/d/null-undefined
672
+ * @param {CustomRoleCountArgs} args - Arguments to filter CustomRoles to count.
673
+ * @example
674
+ * // Count the number of CustomRoles
675
+ * const count = await prisma.customRole.count({
676
+ * where: {
677
+ * // ... the filter for the CustomRoles we want to count
678
+ * }
679
+ * })
680
+ **/
681
+ count<T extends CustomRoleCountArgs>(
682
+ args?: Prisma.Subset<T, CustomRoleCountArgs>,
683
+ ): Prisma.PrismaPromise<
684
+ T extends runtime.Types.Utils.Record<'select', any>
685
+ ? T['select'] extends true
686
+ ? number
687
+ : Prisma.GetScalarType<T['select'], CustomRoleCountAggregateOutputType>
688
+ : number
689
+ >
690
+
691
+ /**
692
+ * Allows you to perform aggregations operations on a CustomRole.
693
+ * Note, that providing `undefined` is treated as the value not being there.
694
+ * Read more here: https://pris.ly/d/null-undefined
695
+ * @param {CustomRoleAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
696
+ * @example
697
+ * // Ordered by age ascending
698
+ * // Where email contains prisma.io
699
+ * // Limited to the 10 users
700
+ * const aggregations = await prisma.user.aggregate({
701
+ * _avg: {
702
+ * age: true,
703
+ * },
704
+ * where: {
705
+ * email: {
706
+ * contains: "prisma.io",
707
+ * },
708
+ * },
709
+ * orderBy: {
710
+ * age: "asc",
711
+ * },
712
+ * take: 10,
713
+ * })
714
+ **/
715
+ aggregate<T extends CustomRoleAggregateArgs>(args: Prisma.Subset<T, CustomRoleAggregateArgs>): Prisma.PrismaPromise<GetCustomRoleAggregateType<T>>
716
+
717
+ /**
718
+ * Group by CustomRole.
719
+ * Note, that providing `undefined` is treated as the value not being there.
720
+ * Read more here: https://pris.ly/d/null-undefined
721
+ * @param {CustomRoleGroupByArgs} args - Group by arguments.
722
+ * @example
723
+ * // Group by city, order by createdAt, get count
724
+ * const result = await prisma.user.groupBy({
725
+ * by: ['city', 'createdAt'],
726
+ * orderBy: {
727
+ * createdAt: true
728
+ * },
729
+ * _count: {
730
+ * _all: true
731
+ * },
732
+ * })
733
+ *
734
+ **/
735
+ groupBy<
736
+ T extends CustomRoleGroupByArgs,
737
+ HasSelectOrTake extends Prisma.Or<
738
+ Prisma.Extends<'skip', Prisma.Keys<T>>,
739
+ Prisma.Extends<'take', Prisma.Keys<T>>
740
+ >,
741
+ OrderByArg extends Prisma.True extends HasSelectOrTake
742
+ ? { orderBy: CustomRoleGroupByArgs['orderBy'] }
743
+ : { orderBy?: CustomRoleGroupByArgs['orderBy'] },
744
+ OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>,
745
+ ByFields extends Prisma.MaybeTupleToUnion<T['by']>,
746
+ ByValid extends Prisma.Has<ByFields, OrderFields>,
747
+ HavingFields extends Prisma.GetHavingFields<T['having']>,
748
+ HavingValid extends Prisma.Has<ByFields, HavingFields>,
749
+ ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False,
750
+ InputErrors extends ByEmpty extends Prisma.True
751
+ ? `Error: "by" must not be empty.`
752
+ : HavingValid extends Prisma.False
753
+ ? {
754
+ [P in HavingFields]: P extends ByFields
755
+ ? never
756
+ : P extends string
757
+ ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
758
+ : [
759
+ Error,
760
+ 'Field ',
761
+ P,
762
+ ` in "having" needs to be provided in "by"`,
763
+ ]
764
+ }[HavingFields]
765
+ : 'take' extends Prisma.Keys<T>
766
+ ? 'orderBy' extends Prisma.Keys<T>
767
+ ? ByValid extends Prisma.True
768
+ ? {}
769
+ : {
770
+ [P in OrderFields]: P extends ByFields
771
+ ? never
772
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
773
+ }[OrderFields]
774
+ : 'Error: If you provide "take", you also need to provide "orderBy"'
775
+ : 'skip' extends Prisma.Keys<T>
776
+ ? 'orderBy' extends Prisma.Keys<T>
777
+ ? ByValid extends Prisma.True
778
+ ? {}
779
+ : {
780
+ [P in OrderFields]: P extends ByFields
781
+ ? never
782
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
783
+ }[OrderFields]
784
+ : 'Error: If you provide "skip", you also need to provide "orderBy"'
785
+ : ByValid extends Prisma.True
786
+ ? {}
787
+ : {
788
+ [P in OrderFields]: P extends ByFields
789
+ ? never
790
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
791
+ }[OrderFields]
792
+ >(args: Prisma.SubsetIntersection<T, CustomRoleGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetCustomRoleGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
793
+ /**
794
+ * Fields of the CustomRole model
795
+ */
796
+ readonly fields: CustomRoleFieldRefs;
797
+ }
798
+
799
+ /**
800
+ * The delegate class that acts as a "Promise-like" for CustomRole.
801
+ * Why is this prefixed with `Prisma__`?
802
+ * Because we want to prevent naming conflicts as mentioned in
803
+ * https://github.com/prisma/prisma-client-js/issues/707
804
+ */
805
+ export interface Prisma__CustomRoleClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
806
+ readonly [Symbol.toStringTag]: "PrismaPromise"
807
+ /**
808
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
809
+ * @param onfulfilled The callback to execute when the Promise is resolved.
810
+ * @param onrejected The callback to execute when the Promise is rejected.
811
+ * @returns A Promise for the completion of which ever callback is executed.
812
+ */
813
+ then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): runtime.Types.Utils.JsPromise<TResult1 | TResult2>
814
+ /**
815
+ * Attaches a callback for only the rejection of the Promise.
816
+ * @param onrejected The callback to execute when the Promise is rejected.
817
+ * @returns A Promise for the completion of the callback.
818
+ */
819
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>
820
+ /**
821
+ * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
822
+ * resolved value cannot be modified from the callback.
823
+ * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
824
+ * @returns A Promise for the completion of the callback.
825
+ */
826
+ finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>
827
+ }
828
+
829
+
830
+
831
+
832
+ /**
833
+ * Fields of the CustomRole model
834
+ */
835
+ export interface CustomRoleFieldRefs {
836
+ readonly id: Prisma.FieldRef<"CustomRole", 'String'>
837
+ readonly workspaceId: Prisma.FieldRef<"CustomRole", 'String'>
838
+ readonly name: Prisma.FieldRef<"CustomRole", 'String'>
839
+ readonly permissions: Prisma.FieldRef<"CustomRole", 'String'>
840
+ readonly isSystem: Prisma.FieldRef<"CustomRole", 'Boolean'>
841
+ readonly createdAt: Prisma.FieldRef<"CustomRole", 'DateTime'>
842
+ readonly updatedAt: Prisma.FieldRef<"CustomRole", 'DateTime'>
843
+ }
844
+
845
+
846
+ // Custom InputTypes
847
+ /**
848
+ * CustomRole findUnique
849
+ */
850
+ export type CustomRoleFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
851
+ /**
852
+ * Select specific fields to fetch from the CustomRole
853
+ */
854
+ select?: Prisma.CustomRoleSelect<ExtArgs> | null
855
+ /**
856
+ * Omit specific fields from the CustomRole
857
+ */
858
+ omit?: Prisma.CustomRoleOmit<ExtArgs> | null
859
+ /**
860
+ * Filter, which CustomRole to fetch.
861
+ */
862
+ where: Prisma.CustomRoleWhereUniqueInput
863
+ }
864
+
865
+ /**
866
+ * CustomRole findUniqueOrThrow
867
+ */
868
+ export type CustomRoleFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
869
+ /**
870
+ * Select specific fields to fetch from the CustomRole
871
+ */
872
+ select?: Prisma.CustomRoleSelect<ExtArgs> | null
873
+ /**
874
+ * Omit specific fields from the CustomRole
875
+ */
876
+ omit?: Prisma.CustomRoleOmit<ExtArgs> | null
877
+ /**
878
+ * Filter, which CustomRole to fetch.
879
+ */
880
+ where: Prisma.CustomRoleWhereUniqueInput
881
+ }
882
+
883
+ /**
884
+ * CustomRole findFirst
885
+ */
886
+ export type CustomRoleFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
887
+ /**
888
+ * Select specific fields to fetch from the CustomRole
889
+ */
890
+ select?: Prisma.CustomRoleSelect<ExtArgs> | null
891
+ /**
892
+ * Omit specific fields from the CustomRole
893
+ */
894
+ omit?: Prisma.CustomRoleOmit<ExtArgs> | null
895
+ /**
896
+ * Filter, which CustomRole to fetch.
897
+ */
898
+ where?: Prisma.CustomRoleWhereInput
899
+ /**
900
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
901
+ *
902
+ * Determine the order of CustomRoles to fetch.
903
+ */
904
+ orderBy?: Prisma.CustomRoleOrderByWithRelationInput | Prisma.CustomRoleOrderByWithRelationInput[]
905
+ /**
906
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
907
+ *
908
+ * Sets the position for searching for CustomRoles.
909
+ */
910
+ cursor?: Prisma.CustomRoleWhereUniqueInput
911
+ /**
912
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
913
+ *
914
+ * Take `±n` CustomRoles from the position of the cursor.
915
+ */
916
+ take?: number
917
+ /**
918
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
919
+ *
920
+ * Skip the first `n` CustomRoles.
921
+ */
922
+ skip?: number
923
+ /**
924
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
925
+ *
926
+ * Filter by unique combinations of CustomRoles.
927
+ */
928
+ distinct?: Prisma.CustomRoleScalarFieldEnum | Prisma.CustomRoleScalarFieldEnum[]
929
+ }
930
+
931
+ /**
932
+ * CustomRole findFirstOrThrow
933
+ */
934
+ export type CustomRoleFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
935
+ /**
936
+ * Select specific fields to fetch from the CustomRole
937
+ */
938
+ select?: Prisma.CustomRoleSelect<ExtArgs> | null
939
+ /**
940
+ * Omit specific fields from the CustomRole
941
+ */
942
+ omit?: Prisma.CustomRoleOmit<ExtArgs> | null
943
+ /**
944
+ * Filter, which CustomRole to fetch.
945
+ */
946
+ where?: Prisma.CustomRoleWhereInput
947
+ /**
948
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
949
+ *
950
+ * Determine the order of CustomRoles to fetch.
951
+ */
952
+ orderBy?: Prisma.CustomRoleOrderByWithRelationInput | Prisma.CustomRoleOrderByWithRelationInput[]
953
+ /**
954
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
955
+ *
956
+ * Sets the position for searching for CustomRoles.
957
+ */
958
+ cursor?: Prisma.CustomRoleWhereUniqueInput
959
+ /**
960
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
961
+ *
962
+ * Take `±n` CustomRoles from the position of the cursor.
963
+ */
964
+ take?: number
965
+ /**
966
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
967
+ *
968
+ * Skip the first `n` CustomRoles.
969
+ */
970
+ skip?: number
971
+ /**
972
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
973
+ *
974
+ * Filter by unique combinations of CustomRoles.
975
+ */
976
+ distinct?: Prisma.CustomRoleScalarFieldEnum | Prisma.CustomRoleScalarFieldEnum[]
977
+ }
978
+
979
+ /**
980
+ * CustomRole findMany
981
+ */
982
+ export type CustomRoleFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
983
+ /**
984
+ * Select specific fields to fetch from the CustomRole
985
+ */
986
+ select?: Prisma.CustomRoleSelect<ExtArgs> | null
987
+ /**
988
+ * Omit specific fields from the CustomRole
989
+ */
990
+ omit?: Prisma.CustomRoleOmit<ExtArgs> | null
991
+ /**
992
+ * Filter, which CustomRoles to fetch.
993
+ */
994
+ where?: Prisma.CustomRoleWhereInput
995
+ /**
996
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
997
+ *
998
+ * Determine the order of CustomRoles to fetch.
999
+ */
1000
+ orderBy?: Prisma.CustomRoleOrderByWithRelationInput | Prisma.CustomRoleOrderByWithRelationInput[]
1001
+ /**
1002
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1003
+ *
1004
+ * Sets the position for listing CustomRoles.
1005
+ */
1006
+ cursor?: Prisma.CustomRoleWhereUniqueInput
1007
+ /**
1008
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1009
+ *
1010
+ * Take `±n` CustomRoles from the position of the cursor.
1011
+ */
1012
+ take?: number
1013
+ /**
1014
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1015
+ *
1016
+ * Skip the first `n` CustomRoles.
1017
+ */
1018
+ skip?: number
1019
+ /**
1020
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1021
+ *
1022
+ * Filter by unique combinations of CustomRoles.
1023
+ */
1024
+ distinct?: Prisma.CustomRoleScalarFieldEnum | Prisma.CustomRoleScalarFieldEnum[]
1025
+ }
1026
+
1027
+ /**
1028
+ * CustomRole create
1029
+ */
1030
+ export type CustomRoleCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1031
+ /**
1032
+ * Select specific fields to fetch from the CustomRole
1033
+ */
1034
+ select?: Prisma.CustomRoleSelect<ExtArgs> | null
1035
+ /**
1036
+ * Omit specific fields from the CustomRole
1037
+ */
1038
+ omit?: Prisma.CustomRoleOmit<ExtArgs> | null
1039
+ /**
1040
+ * The data needed to create a CustomRole.
1041
+ */
1042
+ data: Prisma.XOR<Prisma.CustomRoleCreateInput, Prisma.CustomRoleUncheckedCreateInput>
1043
+ }
1044
+
1045
+ /**
1046
+ * CustomRole createMany
1047
+ */
1048
+ export type CustomRoleCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1049
+ /**
1050
+ * The data used to create many CustomRoles.
1051
+ */
1052
+ data: Prisma.CustomRoleCreateManyInput | Prisma.CustomRoleCreateManyInput[]
1053
+ }
1054
+
1055
+ /**
1056
+ * CustomRole createManyAndReturn
1057
+ */
1058
+ export type CustomRoleCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1059
+ /**
1060
+ * Select specific fields to fetch from the CustomRole
1061
+ */
1062
+ select?: Prisma.CustomRoleSelectCreateManyAndReturn<ExtArgs> | null
1063
+ /**
1064
+ * Omit specific fields from the CustomRole
1065
+ */
1066
+ omit?: Prisma.CustomRoleOmit<ExtArgs> | null
1067
+ /**
1068
+ * The data used to create many CustomRoles.
1069
+ */
1070
+ data: Prisma.CustomRoleCreateManyInput | Prisma.CustomRoleCreateManyInput[]
1071
+ }
1072
+
1073
+ /**
1074
+ * CustomRole update
1075
+ */
1076
+ export type CustomRoleUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1077
+ /**
1078
+ * Select specific fields to fetch from the CustomRole
1079
+ */
1080
+ select?: Prisma.CustomRoleSelect<ExtArgs> | null
1081
+ /**
1082
+ * Omit specific fields from the CustomRole
1083
+ */
1084
+ omit?: Prisma.CustomRoleOmit<ExtArgs> | null
1085
+ /**
1086
+ * The data needed to update a CustomRole.
1087
+ */
1088
+ data: Prisma.XOR<Prisma.CustomRoleUpdateInput, Prisma.CustomRoleUncheckedUpdateInput>
1089
+ /**
1090
+ * Choose, which CustomRole to update.
1091
+ */
1092
+ where: Prisma.CustomRoleWhereUniqueInput
1093
+ }
1094
+
1095
+ /**
1096
+ * CustomRole updateMany
1097
+ */
1098
+ export type CustomRoleUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1099
+ /**
1100
+ * The data used to update CustomRoles.
1101
+ */
1102
+ data: Prisma.XOR<Prisma.CustomRoleUpdateManyMutationInput, Prisma.CustomRoleUncheckedUpdateManyInput>
1103
+ /**
1104
+ * Filter which CustomRoles to update
1105
+ */
1106
+ where?: Prisma.CustomRoleWhereInput
1107
+ /**
1108
+ * Limit how many CustomRoles to update.
1109
+ */
1110
+ limit?: number
1111
+ }
1112
+
1113
+ /**
1114
+ * CustomRole updateManyAndReturn
1115
+ */
1116
+ export type CustomRoleUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1117
+ /**
1118
+ * Select specific fields to fetch from the CustomRole
1119
+ */
1120
+ select?: Prisma.CustomRoleSelectUpdateManyAndReturn<ExtArgs> | null
1121
+ /**
1122
+ * Omit specific fields from the CustomRole
1123
+ */
1124
+ omit?: Prisma.CustomRoleOmit<ExtArgs> | null
1125
+ /**
1126
+ * The data used to update CustomRoles.
1127
+ */
1128
+ data: Prisma.XOR<Prisma.CustomRoleUpdateManyMutationInput, Prisma.CustomRoleUncheckedUpdateManyInput>
1129
+ /**
1130
+ * Filter which CustomRoles to update
1131
+ */
1132
+ where?: Prisma.CustomRoleWhereInput
1133
+ /**
1134
+ * Limit how many CustomRoles to update.
1135
+ */
1136
+ limit?: number
1137
+ }
1138
+
1139
+ /**
1140
+ * CustomRole upsert
1141
+ */
1142
+ export type CustomRoleUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1143
+ /**
1144
+ * Select specific fields to fetch from the CustomRole
1145
+ */
1146
+ select?: Prisma.CustomRoleSelect<ExtArgs> | null
1147
+ /**
1148
+ * Omit specific fields from the CustomRole
1149
+ */
1150
+ omit?: Prisma.CustomRoleOmit<ExtArgs> | null
1151
+ /**
1152
+ * The filter to search for the CustomRole to update in case it exists.
1153
+ */
1154
+ where: Prisma.CustomRoleWhereUniqueInput
1155
+ /**
1156
+ * In case the CustomRole found by the `where` argument doesn't exist, create a new CustomRole with this data.
1157
+ */
1158
+ create: Prisma.XOR<Prisma.CustomRoleCreateInput, Prisma.CustomRoleUncheckedCreateInput>
1159
+ /**
1160
+ * In case the CustomRole was found with the provided `where` argument, update it with this data.
1161
+ */
1162
+ update: Prisma.XOR<Prisma.CustomRoleUpdateInput, Prisma.CustomRoleUncheckedUpdateInput>
1163
+ }
1164
+
1165
+ /**
1166
+ * CustomRole delete
1167
+ */
1168
+ export type CustomRoleDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1169
+ /**
1170
+ * Select specific fields to fetch from the CustomRole
1171
+ */
1172
+ select?: Prisma.CustomRoleSelect<ExtArgs> | null
1173
+ /**
1174
+ * Omit specific fields from the CustomRole
1175
+ */
1176
+ omit?: Prisma.CustomRoleOmit<ExtArgs> | null
1177
+ /**
1178
+ * Filter which CustomRole to delete.
1179
+ */
1180
+ where: Prisma.CustomRoleWhereUniqueInput
1181
+ }
1182
+
1183
+ /**
1184
+ * CustomRole deleteMany
1185
+ */
1186
+ export type CustomRoleDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1187
+ /**
1188
+ * Filter which CustomRoles to delete
1189
+ */
1190
+ where?: Prisma.CustomRoleWhereInput
1191
+ /**
1192
+ * Limit how many CustomRoles to delete.
1193
+ */
1194
+ limit?: number
1195
+ }
1196
+
1197
+ /**
1198
+ * CustomRole without action
1199
+ */
1200
+ export type CustomRoleDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1201
+ /**
1202
+ * Select specific fields to fetch from the CustomRole
1203
+ */
1204
+ select?: Prisma.CustomRoleSelect<ExtArgs> | null
1205
+ /**
1206
+ * Omit specific fields from the CustomRole
1207
+ */
1208
+ omit?: Prisma.CustomRoleOmit<ExtArgs> | null
1209
+ }