@appweaver/core 1.0.0

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 (271) hide show
  1. package/LICENSE +1 -0
  2. package/README.md +7 -0
  3. package/app/application.d.ts +43 -0
  4. package/app/application.js +112 -0
  5. package/app/create-app.d.ts +32 -0
  6. package/app/create-app.js +38 -0
  7. package/app/index.d.ts +2 -0
  8. package/app/index.js +18 -0
  9. package/app/lifecycle-manager.d.ts +20 -0
  10. package/app/lifecycle-manager.js +42 -0
  11. package/app/load-modules.d.ts +10 -0
  12. package/app/load-modules.js +50 -0
  13. package/app/load-providers.d.ts +8 -0
  14. package/app/load-providers.js +33 -0
  15. package/cache/cache-service.d.ts +72 -0
  16. package/cache/cache-service.js +202 -0
  17. package/cache/cache.d.ts +12 -0
  18. package/cache/cache.js +184 -0
  19. package/cache/caching.d.ts +8 -0
  20. package/cache/caching.js +72 -0
  21. package/cache/eviction/eviction-index.d.ts +35 -0
  22. package/cache/eviction/eviction-index.js +2 -0
  23. package/cache/eviction/fifo-eviction-index.d.ts +7 -0
  24. package/cache/eviction/fifo-eviction-index.js +28 -0
  25. package/cache/eviction/index.d.ts +4 -0
  26. package/cache/eviction/index.js +20 -0
  27. package/cache/eviction/lfu-eviction-index.d.ts +8 -0
  28. package/cache/eviction/lfu-eviction-index.js +82 -0
  29. package/cache/eviction/lru-eviction-index.d.ts +8 -0
  30. package/cache/eviction/lru-eviction-index.js +81 -0
  31. package/cache/index.d.ts +2 -0
  32. package/cache/index.js +18 -0
  33. package/cache/memory-cache.d.ts +4 -0
  34. package/cache/memory-cache.js +12 -0
  35. package/cache/redis-cache.d.ts +4 -0
  36. package/cache/redis-cache.js +12 -0
  37. package/context/context.d.ts +2 -0
  38. package/context/context.js +13 -0
  39. package/context/dependency-injection.d.ts +98 -0
  40. package/context/dependency-injection.js +276 -0
  41. package/context/index.d.ts +2 -0
  42. package/context/index.js +18 -0
  43. package/database/create-client.d.ts +11 -0
  44. package/database/create-client.js +142 -0
  45. package/database/index.d.ts +1 -0
  46. package/database/index.js +17 -0
  47. package/database/prisma-database.d.ts +15 -0
  48. package/database/prisma-database.js +53 -0
  49. package/errors/error-handler.d.ts +3 -0
  50. package/errors/error-handler.js +24 -0
  51. package/errors/error-schema.d.ts +32 -0
  52. package/errors/error-schema.js +31 -0
  53. package/errors/http-error.d.ts +21 -0
  54. package/errors/http-error.js +33 -0
  55. package/errors/index.d.ts +3 -0
  56. package/errors/index.js +19 -0
  57. package/events/node-events.d.ts +7 -0
  58. package/events/node-events.js +39 -0
  59. package/export/export-service.d.ts +19 -0
  60. package/export/export-service.js +154 -0
  61. package/export/index.d.ts +1 -0
  62. package/export/index.js +17 -0
  63. package/factory/create-model.d.ts +2 -0
  64. package/factory/create-model.js +366 -0
  65. package/factory/create-policy.d.ts +2 -0
  66. package/factory/create-policy.js +16 -0
  67. package/factory/create-routes.d.ts +2 -0
  68. package/factory/create-routes.js +21 -0
  69. package/factory/create-service.d.ts +3 -0
  70. package/factory/create-service.js +97 -0
  71. package/factory/index.d.ts +4 -0
  72. package/factory/index.js +20 -0
  73. package/health/health-routes.d.ts +2 -0
  74. package/health/health-routes.js +36 -0
  75. package/health/health-schema.d.ts +45 -0
  76. package/health/health-schema.js +52 -0
  77. package/health/health-service.d.ts +38 -0
  78. package/health/health-service.js +82 -0
  79. package/health/index.d.ts +2 -0
  80. package/health/index.js +18 -0
  81. package/index.d.ts +15 -0
  82. package/index.js +31 -0
  83. package/mailer/email-service.d.ts +36 -0
  84. package/mailer/email-service.js +89 -0
  85. package/mailer/index.d.ts +1 -0
  86. package/mailer/index.js +17 -0
  87. package/mailer/json-mailer.d.ts +7 -0
  88. package/mailer/json-mailer.js +32 -0
  89. package/mailer/smtp-mailer.d.ts +7 -0
  90. package/mailer/smtp-mailer.js +43 -0
  91. package/memory/in-memory.d.ts +24 -0
  92. package/memory/in-memory.js +164 -0
  93. package/memory/redis.d.ts +26 -0
  94. package/memory/redis.js +158 -0
  95. package/package.json +68 -0
  96. package/prisma/client/browser.d.ts +34 -0
  97. package/prisma/client/browser.js +56 -0
  98. package/prisma/client/client.d.ts +53 -0
  99. package/prisma/client/client.js +70 -0
  100. package/prisma/client/commonInputTypes.d.ts +395 -0
  101. package/prisma/client/commonInputTypes.js +11 -0
  102. package/prisma/client/enums.d.ts +1 -0
  103. package/prisma/client/enums.js +11 -0
  104. package/prisma/client/internal/class.d.ts +187 -0
  105. package/prisma/client/internal/class.js +85 -0
  106. package/prisma/client/internal/prismaNamespace.d.ts +987 -0
  107. package/prisma/client/internal/prismaNamespace.js +193 -0
  108. package/prisma/client/internal/prismaNamespaceBrowser.d.ts +125 -0
  109. package/prisma/client/internal/prismaNamespaceBrowser.js +164 -0
  110. package/prisma/client/models/ApiKey.d.ts +1167 -0
  111. package/prisma/client/models/ApiKey.js +2 -0
  112. package/prisma/client/models/File.d.ts +1248 -0
  113. package/prisma/client/models/File.js +2 -0
  114. package/prisma/client/models/OneTimeToken.d.ts +1083 -0
  115. package/prisma/client/models/OneTimeToken.js +2 -0
  116. package/prisma/client/models/Permission.d.ts +1209 -0
  117. package/prisma/client/models/Permission.js +2 -0
  118. package/prisma/client/models/Role.d.ts +1209 -0
  119. package/prisma/client/models/Role.js +2 -0
  120. package/prisma/client/models/Seeder.d.ts +1023 -0
  121. package/prisma/client/models/Seeder.js +2 -0
  122. package/prisma/client/models.d.ts +7 -0
  123. package/prisma/client/models.js +2 -0
  124. package/queue/bull-queue.d.ts +37 -0
  125. package/queue/bull-queue.js +207 -0
  126. package/queue/memory-queue.d.ts +54 -0
  127. package/queue/memory-queue.js +283 -0
  128. package/resource/index.d.ts +4 -0
  129. package/resource/index.js +20 -0
  130. package/resource/resource-loader.d.ts +26 -0
  131. package/resource/resource-loader.js +161 -0
  132. package/resource/resource-routes.d.ts +3 -0
  133. package/resource/resource-routes.js +174 -0
  134. package/resource/resource-schema.d.ts +33 -0
  135. package/resource/resource-schema.js +186 -0
  136. package/resource/resource-service.d.ts +89 -0
  137. package/resource/resource-service.js +772 -0
  138. package/resources.d.ts +9 -0
  139. package/resources.js +24 -0
  140. package/scheduler/cron-scheduler.d.ts +12 -0
  141. package/scheduler/cron-scheduler.js +73 -0
  142. package/security/account/account-routes.d.ts +2 -0
  143. package/security/account/account-routes.js +104 -0
  144. package/security/account/account-schema.d.ts +290 -0
  145. package/security/account/account-schema.js +166 -0
  146. package/security/account/account-service.d.ts +88 -0
  147. package/security/account/account-service.js +218 -0
  148. package/security/account/index.d.ts +3 -0
  149. package/security/account/index.js +19 -0
  150. package/security/api-key/api-key-auth.d.ts +4 -0
  151. package/security/api-key/api-key-auth.js +66 -0
  152. package/security/api-key/index.d.ts +1 -0
  153. package/security/api-key/index.js +17 -0
  154. package/security/auth-routes.d.ts +2 -0
  155. package/security/auth-routes.js +80 -0
  156. package/security/auth-schema.d.ts +215 -0
  157. package/security/auth-schema.js +129 -0
  158. package/security/auth-service.d.ts +117 -0
  159. package/security/auth-service.js +272 -0
  160. package/security/auth.d.ts +3 -0
  161. package/security/auth.js +127 -0
  162. package/security/basic/basic-auth.d.ts +4 -0
  163. package/security/basic/basic-auth.js +32 -0
  164. package/security/basic/index.d.ts +1 -0
  165. package/security/basic/index.js +17 -0
  166. package/security/create-auth-resources.d.ts +6 -0
  167. package/security/create-auth-resources.js +129 -0
  168. package/security/helper.d.ts +127 -0
  169. package/security/helper.js +329 -0
  170. package/security/index.d.ts +4 -0
  171. package/security/index.js +20 -0
  172. package/security/jwt/index.d.ts +2 -0
  173. package/security/jwt/index.js +18 -0
  174. package/security/jwt/jwt-auth.d.ts +4 -0
  175. package/security/jwt/jwt-auth.js +57 -0
  176. package/security/jwt/jwt-keys.d.ts +7 -0
  177. package/security/jwt/jwt-keys.js +43 -0
  178. package/security/oauth2/create-oauth2-plugin.d.ts +17 -0
  179. package/security/oauth2/create-oauth2-plugin.js +85 -0
  180. package/security/oauth2/index.d.ts +3 -0
  181. package/security/oauth2/index.js +19 -0
  182. package/security/oauth2/oauth2-custom.d.ts +7 -0
  183. package/security/oauth2/oauth2-custom.js +40 -0
  184. package/security/oauth2/oauth2-facebook.d.ts +1 -0
  185. package/security/oauth2/oauth2-facebook.js +30 -0
  186. package/security/oauth2/oauth2-google.d.ts +1 -0
  187. package/security/oauth2/oauth2-google.js +28 -0
  188. package/security/oauth2/oauth2-schema.d.ts +10 -0
  189. package/security/oauth2/oauth2-schema.js +53 -0
  190. package/security/recaptcha/index.d.ts +2 -0
  191. package/security/recaptcha/index.js +18 -0
  192. package/security/recaptcha/recaptcha-verify.d.ts +1 -0
  193. package/security/recaptcha/recaptcha-verify.js +33 -0
  194. package/security/recaptcha/recaptcha.d.ts +2 -0
  195. package/security/recaptcha/recaptcha.js +22 -0
  196. package/security/resources/api-key/model.d.ts +2 -0
  197. package/security/resources/api-key/model.js +63 -0
  198. package/security/resources/api-key/policy.d.ts +2 -0
  199. package/security/resources/api-key/policy.js +26 -0
  200. package/security/resources/api-key/routes.d.ts +2 -0
  201. package/security/resources/api-key/routes.js +15 -0
  202. package/security/resources/api-key/service.d.ts +3 -0
  203. package/security/resources/api-key/service.js +33 -0
  204. package/security/resources/one-time-token/model.d.ts +2 -0
  205. package/security/resources/one-time-token/model.js +32 -0
  206. package/security/resources/permission/model.d.ts +2 -0
  207. package/security/resources/permission/model.js +16 -0
  208. package/security/resources/role/model.d.ts +2 -0
  209. package/security/resources/role/model.js +22 -0
  210. package/security/store/database-security-store.d.ts +5 -0
  211. package/security/store/database-security-store.js +51 -0
  212. package/security/store/redis-security-store.d.ts +5 -0
  213. package/security/store/redis-security-store.js +32 -0
  214. package/seeder/create-seeder.d.ts +21 -0
  215. package/seeder/create-seeder.js +17 -0
  216. package/seeder/index.d.ts +2 -0
  217. package/seeder/index.js +18 -0
  218. package/seeder/resources/seeder/model.d.ts +2 -0
  219. package/seeder/resources/seeder/model.js +38 -0
  220. package/seeder/seeder.d.ts +20 -0
  221. package/seeder/seeder.js +175 -0
  222. package/server/create-server.d.ts +20 -0
  223. package/server/create-server.js +160 -0
  224. package/server/index.d.ts +4 -0
  225. package/server/index.js +20 -0
  226. package/server/info-route.d.ts +2 -0
  227. package/server/info-route.js +18 -0
  228. package/server/info-schema.d.ts +37 -0
  229. package/server/info-schema.js +19 -0
  230. package/server/register-model.d.ts +2 -0
  231. package/server/register-model.js +12 -0
  232. package/server/register-plugin.d.ts +2 -0
  233. package/server/register-plugin.js +13 -0
  234. package/server/register-route.d.ts +3 -0
  235. package/server/register-route.js +74 -0
  236. package/server/schemas.d.ts +3 -0
  237. package/server/schemas.js +30 -0
  238. package/server/swagger.d.ts +3 -0
  239. package/server/swagger.js +122 -0
  240. package/storage/file-route.d.ts +2 -0
  241. package/storage/file-route.js +39 -0
  242. package/storage/file-schema.d.ts +9 -0
  243. package/storage/file-schema.js +42 -0
  244. package/storage/file-service.d.ts +81 -0
  245. package/storage/file-service.js +384 -0
  246. package/storage/filesystem-storage.d.ts +10 -0
  247. package/storage/filesystem-storage.js +128 -0
  248. package/storage/index.d.ts +2 -0
  249. package/storage/index.js +18 -0
  250. package/storage/resources/file/model.d.ts +2 -0
  251. package/storage/resources/file/model.js +75 -0
  252. package/types/application-context.d.ts +20 -0
  253. package/types/application-context.js +2 -0
  254. package/types/auth.d.ts +31 -0
  255. package/types/auth.js +2 -0
  256. package/types/fastify-extensions.d.ts +24 -0
  257. package/types/fastify-extensions.js +4 -0
  258. package/types/generated.d.ts +193 -0
  259. package/types/generated.js +3 -0
  260. package/types/index.d.ts +4 -0
  261. package/types/index.js +20 -0
  262. package/types/server.d.ts +4 -0
  263. package/types/server.js +2 -0
  264. package/utils/export-util.d.ts +8 -0
  265. package/utils/export-util.js +25 -0
  266. package/utils/file-util.d.ts +64 -0
  267. package/utils/file-util.js +141 -0
  268. package/utils/index.d.ts +3 -0
  269. package/utils/index.js +19 -0
  270. package/utils/schema-util.d.ts +20 -0
  271. package/utils/schema-util.js +37 -0
@@ -0,0 +1,1209 @@
1
+ import type * as runtime from "@prisma/client/runtime/client";
2
+ import type * as Prisma from "../internal/prismaNamespace";
3
+ /**
4
+ * Model Permission
5
+ *
6
+ */
7
+ export type PermissionModel = runtime.Types.Result.DefaultSelection<Prisma.$PermissionPayload>;
8
+ export type AggregatePermission = {
9
+ _count: PermissionCountAggregateOutputType | null;
10
+ _avg: PermissionAvgAggregateOutputType | null;
11
+ _sum: PermissionSumAggregateOutputType | null;
12
+ _min: PermissionMinAggregateOutputType | null;
13
+ _max: PermissionMaxAggregateOutputType | null;
14
+ };
15
+ export type PermissionAvgAggregateOutputType = {
16
+ id: number | null;
17
+ };
18
+ export type PermissionSumAggregateOutputType = {
19
+ id: number | null;
20
+ };
21
+ export type PermissionMinAggregateOutputType = {
22
+ id: number | null;
23
+ name: string | null;
24
+ updatedAt: Date | null;
25
+ createdAt: Date | null;
26
+ };
27
+ export type PermissionMaxAggregateOutputType = {
28
+ id: number | null;
29
+ name: string | null;
30
+ updatedAt: Date | null;
31
+ createdAt: Date | null;
32
+ };
33
+ export type PermissionCountAggregateOutputType = {
34
+ id: number;
35
+ name: number;
36
+ updatedAt: number;
37
+ createdAt: number;
38
+ _all: number;
39
+ };
40
+ export type PermissionAvgAggregateInputType = {
41
+ id?: true;
42
+ };
43
+ export type PermissionSumAggregateInputType = {
44
+ id?: true;
45
+ };
46
+ export type PermissionMinAggregateInputType = {
47
+ id?: true;
48
+ name?: true;
49
+ updatedAt?: true;
50
+ createdAt?: true;
51
+ };
52
+ export type PermissionMaxAggregateInputType = {
53
+ id?: true;
54
+ name?: true;
55
+ updatedAt?: true;
56
+ createdAt?: true;
57
+ };
58
+ export type PermissionCountAggregateInputType = {
59
+ id?: true;
60
+ name?: true;
61
+ updatedAt?: true;
62
+ createdAt?: true;
63
+ _all?: true;
64
+ };
65
+ export type PermissionAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
66
+ /**
67
+ * Filter which Permission to aggregate.
68
+ */
69
+ where?: Prisma.PermissionWhereInput;
70
+ /**
71
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
72
+ *
73
+ * Determine the order of Permissions to fetch.
74
+ */
75
+ orderBy?: Prisma.PermissionOrderByWithRelationInput | Prisma.PermissionOrderByWithRelationInput[];
76
+ /**
77
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
78
+ *
79
+ * Sets the start position
80
+ */
81
+ cursor?: Prisma.PermissionWhereUniqueInput;
82
+ /**
83
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
84
+ *
85
+ * Take `±n` Permissions from the position of the cursor.
86
+ */
87
+ take?: number;
88
+ /**
89
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
90
+ *
91
+ * Skip the first `n` Permissions.
92
+ */
93
+ skip?: number;
94
+ /**
95
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
96
+ *
97
+ * Count returned Permissions
98
+ **/
99
+ _count?: true | PermissionCountAggregateInputType;
100
+ /**
101
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
102
+ *
103
+ * Select which fields to average
104
+ **/
105
+ _avg?: PermissionAvgAggregateInputType;
106
+ /**
107
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
108
+ *
109
+ * Select which fields to sum
110
+ **/
111
+ _sum?: PermissionSumAggregateInputType;
112
+ /**
113
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
114
+ *
115
+ * Select which fields to find the minimum value
116
+ **/
117
+ _min?: PermissionMinAggregateInputType;
118
+ /**
119
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
120
+ *
121
+ * Select which fields to find the maximum value
122
+ **/
123
+ _max?: PermissionMaxAggregateInputType;
124
+ };
125
+ export type GetPermissionAggregateType<T extends PermissionAggregateArgs> = {
126
+ [P in keyof T & keyof AggregatePermission]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType<T[P], AggregatePermission[P]> : Prisma.GetScalarType<T[P], AggregatePermission[P]>;
127
+ };
128
+ export type PermissionGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
129
+ where?: Prisma.PermissionWhereInput;
130
+ orderBy?: Prisma.PermissionOrderByWithAggregationInput | Prisma.PermissionOrderByWithAggregationInput[];
131
+ by: Prisma.PermissionScalarFieldEnum[] | Prisma.PermissionScalarFieldEnum;
132
+ having?: Prisma.PermissionScalarWhereWithAggregatesInput;
133
+ take?: number;
134
+ skip?: number;
135
+ _count?: PermissionCountAggregateInputType | true;
136
+ _avg?: PermissionAvgAggregateInputType;
137
+ _sum?: PermissionSumAggregateInputType;
138
+ _min?: PermissionMinAggregateInputType;
139
+ _max?: PermissionMaxAggregateInputType;
140
+ };
141
+ export type PermissionGroupByOutputType = {
142
+ id: number;
143
+ name: string;
144
+ updatedAt: Date;
145
+ createdAt: Date;
146
+ _count: PermissionCountAggregateOutputType | null;
147
+ _avg: PermissionAvgAggregateOutputType | null;
148
+ _sum: PermissionSumAggregateOutputType | null;
149
+ _min: PermissionMinAggregateOutputType | null;
150
+ _max: PermissionMaxAggregateOutputType | null;
151
+ };
152
+ export type GetPermissionGroupByPayload<T extends PermissionGroupByArgs> = Prisma.PrismaPromise<Array<Prisma.PickEnumerable<PermissionGroupByOutputType, T['by']> & {
153
+ [P in ((keyof T) & (keyof PermissionGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType<T[P], PermissionGroupByOutputType[P]> : Prisma.GetScalarType<T[P], PermissionGroupByOutputType[P]>;
154
+ }>>;
155
+ export type PermissionWhereInput = {
156
+ AND?: Prisma.PermissionWhereInput | Prisma.PermissionWhereInput[];
157
+ OR?: Prisma.PermissionWhereInput[];
158
+ NOT?: Prisma.PermissionWhereInput | Prisma.PermissionWhereInput[];
159
+ id?: Prisma.IntFilter<"Permission"> | number;
160
+ name?: Prisma.StringFilter<"Permission"> | string;
161
+ updatedAt?: Prisma.DateTimeFilter<"Permission"> | Date | string;
162
+ createdAt?: Prisma.DateTimeFilter<"Permission"> | Date | string;
163
+ roles?: Prisma.RoleListRelationFilter;
164
+ };
165
+ export type PermissionOrderByWithRelationInput = {
166
+ id?: Prisma.SortOrder;
167
+ name?: Prisma.SortOrder;
168
+ updatedAt?: Prisma.SortOrder;
169
+ createdAt?: Prisma.SortOrder;
170
+ roles?: Prisma.RoleOrderByRelationAggregateInput;
171
+ };
172
+ export type PermissionWhereUniqueInput = Prisma.AtLeast<{
173
+ id?: number;
174
+ name?: string;
175
+ AND?: Prisma.PermissionWhereInput | Prisma.PermissionWhereInput[];
176
+ OR?: Prisma.PermissionWhereInput[];
177
+ NOT?: Prisma.PermissionWhereInput | Prisma.PermissionWhereInput[];
178
+ updatedAt?: Prisma.DateTimeFilter<"Permission"> | Date | string;
179
+ createdAt?: Prisma.DateTimeFilter<"Permission"> | Date | string;
180
+ roles?: Prisma.RoleListRelationFilter;
181
+ }, "id" | "name">;
182
+ export type PermissionOrderByWithAggregationInput = {
183
+ id?: Prisma.SortOrder;
184
+ name?: Prisma.SortOrder;
185
+ updatedAt?: Prisma.SortOrder;
186
+ createdAt?: Prisma.SortOrder;
187
+ _count?: Prisma.PermissionCountOrderByAggregateInput;
188
+ _avg?: Prisma.PermissionAvgOrderByAggregateInput;
189
+ _max?: Prisma.PermissionMaxOrderByAggregateInput;
190
+ _min?: Prisma.PermissionMinOrderByAggregateInput;
191
+ _sum?: Prisma.PermissionSumOrderByAggregateInput;
192
+ };
193
+ export type PermissionScalarWhereWithAggregatesInput = {
194
+ AND?: Prisma.PermissionScalarWhereWithAggregatesInput | Prisma.PermissionScalarWhereWithAggregatesInput[];
195
+ OR?: Prisma.PermissionScalarWhereWithAggregatesInput[];
196
+ NOT?: Prisma.PermissionScalarWhereWithAggregatesInput | Prisma.PermissionScalarWhereWithAggregatesInput[];
197
+ id?: Prisma.IntWithAggregatesFilter<"Permission"> | number;
198
+ name?: Prisma.StringWithAggregatesFilter<"Permission"> | string;
199
+ updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Permission"> | Date | string;
200
+ createdAt?: Prisma.DateTimeWithAggregatesFilter<"Permission"> | Date | string;
201
+ };
202
+ export type PermissionCreateInput = {
203
+ name: string;
204
+ updatedAt?: Date | string;
205
+ createdAt?: Date | string;
206
+ roles?: Prisma.RoleCreateNestedManyWithoutPermissionsInput;
207
+ };
208
+ export type PermissionUncheckedCreateInput = {
209
+ id?: number;
210
+ name: string;
211
+ updatedAt?: Date | string;
212
+ createdAt?: Date | string;
213
+ roles?: Prisma.RoleUncheckedCreateNestedManyWithoutPermissionsInput;
214
+ };
215
+ export type PermissionUpdateInput = {
216
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
217
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
218
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
219
+ roles?: Prisma.RoleUpdateManyWithoutPermissionsNestedInput;
220
+ };
221
+ export type PermissionUncheckedUpdateInput = {
222
+ id?: Prisma.IntFieldUpdateOperationsInput | number;
223
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
224
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
225
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
226
+ roles?: Prisma.RoleUncheckedUpdateManyWithoutPermissionsNestedInput;
227
+ };
228
+ export type PermissionCreateManyInput = {
229
+ id?: number;
230
+ name: string;
231
+ updatedAt?: Date | string;
232
+ createdAt?: Date | string;
233
+ };
234
+ export type PermissionUpdateManyMutationInput = {
235
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
236
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
237
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
238
+ };
239
+ export type PermissionUncheckedUpdateManyInput = {
240
+ id?: Prisma.IntFieldUpdateOperationsInput | number;
241
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
242
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
243
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
244
+ };
245
+ export type PermissionCountOrderByAggregateInput = {
246
+ id?: Prisma.SortOrder;
247
+ name?: Prisma.SortOrder;
248
+ updatedAt?: Prisma.SortOrder;
249
+ createdAt?: Prisma.SortOrder;
250
+ };
251
+ export type PermissionAvgOrderByAggregateInput = {
252
+ id?: Prisma.SortOrder;
253
+ };
254
+ export type PermissionMaxOrderByAggregateInput = {
255
+ id?: Prisma.SortOrder;
256
+ name?: Prisma.SortOrder;
257
+ updatedAt?: Prisma.SortOrder;
258
+ createdAt?: Prisma.SortOrder;
259
+ };
260
+ export type PermissionMinOrderByAggregateInput = {
261
+ id?: Prisma.SortOrder;
262
+ name?: Prisma.SortOrder;
263
+ updatedAt?: Prisma.SortOrder;
264
+ createdAt?: Prisma.SortOrder;
265
+ };
266
+ export type PermissionSumOrderByAggregateInput = {
267
+ id?: Prisma.SortOrder;
268
+ };
269
+ export type PermissionListRelationFilter = {
270
+ every?: Prisma.PermissionWhereInput;
271
+ some?: Prisma.PermissionWhereInput;
272
+ none?: Prisma.PermissionWhereInput;
273
+ };
274
+ export type PermissionOrderByRelationAggregateInput = {
275
+ _count?: Prisma.SortOrder;
276
+ };
277
+ export type PermissionCreateNestedManyWithoutRolesInput = {
278
+ create?: Prisma.XOR<Prisma.PermissionCreateWithoutRolesInput, Prisma.PermissionUncheckedCreateWithoutRolesInput> | Prisma.PermissionCreateWithoutRolesInput[] | Prisma.PermissionUncheckedCreateWithoutRolesInput[];
279
+ connectOrCreate?: Prisma.PermissionCreateOrConnectWithoutRolesInput | Prisma.PermissionCreateOrConnectWithoutRolesInput[];
280
+ connect?: Prisma.PermissionWhereUniqueInput | Prisma.PermissionWhereUniqueInput[];
281
+ };
282
+ export type PermissionUncheckedCreateNestedManyWithoutRolesInput = {
283
+ create?: Prisma.XOR<Prisma.PermissionCreateWithoutRolesInput, Prisma.PermissionUncheckedCreateWithoutRolesInput> | Prisma.PermissionCreateWithoutRolesInput[] | Prisma.PermissionUncheckedCreateWithoutRolesInput[];
284
+ connectOrCreate?: Prisma.PermissionCreateOrConnectWithoutRolesInput | Prisma.PermissionCreateOrConnectWithoutRolesInput[];
285
+ connect?: Prisma.PermissionWhereUniqueInput | Prisma.PermissionWhereUniqueInput[];
286
+ };
287
+ export type PermissionUpdateManyWithoutRolesNestedInput = {
288
+ create?: Prisma.XOR<Prisma.PermissionCreateWithoutRolesInput, Prisma.PermissionUncheckedCreateWithoutRolesInput> | Prisma.PermissionCreateWithoutRolesInput[] | Prisma.PermissionUncheckedCreateWithoutRolesInput[];
289
+ connectOrCreate?: Prisma.PermissionCreateOrConnectWithoutRolesInput | Prisma.PermissionCreateOrConnectWithoutRolesInput[];
290
+ upsert?: Prisma.PermissionUpsertWithWhereUniqueWithoutRolesInput | Prisma.PermissionUpsertWithWhereUniqueWithoutRolesInput[];
291
+ set?: Prisma.PermissionWhereUniqueInput | Prisma.PermissionWhereUniqueInput[];
292
+ disconnect?: Prisma.PermissionWhereUniqueInput | Prisma.PermissionWhereUniqueInput[];
293
+ delete?: Prisma.PermissionWhereUniqueInput | Prisma.PermissionWhereUniqueInput[];
294
+ connect?: Prisma.PermissionWhereUniqueInput | Prisma.PermissionWhereUniqueInput[];
295
+ update?: Prisma.PermissionUpdateWithWhereUniqueWithoutRolesInput | Prisma.PermissionUpdateWithWhereUniqueWithoutRolesInput[];
296
+ updateMany?: Prisma.PermissionUpdateManyWithWhereWithoutRolesInput | Prisma.PermissionUpdateManyWithWhereWithoutRolesInput[];
297
+ deleteMany?: Prisma.PermissionScalarWhereInput | Prisma.PermissionScalarWhereInput[];
298
+ };
299
+ export type PermissionUncheckedUpdateManyWithoutRolesNestedInput = {
300
+ create?: Prisma.XOR<Prisma.PermissionCreateWithoutRolesInput, Prisma.PermissionUncheckedCreateWithoutRolesInput> | Prisma.PermissionCreateWithoutRolesInput[] | Prisma.PermissionUncheckedCreateWithoutRolesInput[];
301
+ connectOrCreate?: Prisma.PermissionCreateOrConnectWithoutRolesInput | Prisma.PermissionCreateOrConnectWithoutRolesInput[];
302
+ upsert?: Prisma.PermissionUpsertWithWhereUniqueWithoutRolesInput | Prisma.PermissionUpsertWithWhereUniqueWithoutRolesInput[];
303
+ set?: Prisma.PermissionWhereUniqueInput | Prisma.PermissionWhereUniqueInput[];
304
+ disconnect?: Prisma.PermissionWhereUniqueInput | Prisma.PermissionWhereUniqueInput[];
305
+ delete?: Prisma.PermissionWhereUniqueInput | Prisma.PermissionWhereUniqueInput[];
306
+ connect?: Prisma.PermissionWhereUniqueInput | Prisma.PermissionWhereUniqueInput[];
307
+ update?: Prisma.PermissionUpdateWithWhereUniqueWithoutRolesInput | Prisma.PermissionUpdateWithWhereUniqueWithoutRolesInput[];
308
+ updateMany?: Prisma.PermissionUpdateManyWithWhereWithoutRolesInput | Prisma.PermissionUpdateManyWithWhereWithoutRolesInput[];
309
+ deleteMany?: Prisma.PermissionScalarWhereInput | Prisma.PermissionScalarWhereInput[];
310
+ };
311
+ export type PermissionCreateWithoutRolesInput = {
312
+ name: string;
313
+ updatedAt?: Date | string;
314
+ createdAt?: Date | string;
315
+ };
316
+ export type PermissionUncheckedCreateWithoutRolesInput = {
317
+ id?: number;
318
+ name: string;
319
+ updatedAt?: Date | string;
320
+ createdAt?: Date | string;
321
+ };
322
+ export type PermissionCreateOrConnectWithoutRolesInput = {
323
+ where: Prisma.PermissionWhereUniqueInput;
324
+ create: Prisma.XOR<Prisma.PermissionCreateWithoutRolesInput, Prisma.PermissionUncheckedCreateWithoutRolesInput>;
325
+ };
326
+ export type PermissionUpsertWithWhereUniqueWithoutRolesInput = {
327
+ where: Prisma.PermissionWhereUniqueInput;
328
+ update: Prisma.XOR<Prisma.PermissionUpdateWithoutRolesInput, Prisma.PermissionUncheckedUpdateWithoutRolesInput>;
329
+ create: Prisma.XOR<Prisma.PermissionCreateWithoutRolesInput, Prisma.PermissionUncheckedCreateWithoutRolesInput>;
330
+ };
331
+ export type PermissionUpdateWithWhereUniqueWithoutRolesInput = {
332
+ where: Prisma.PermissionWhereUniqueInput;
333
+ data: Prisma.XOR<Prisma.PermissionUpdateWithoutRolesInput, Prisma.PermissionUncheckedUpdateWithoutRolesInput>;
334
+ };
335
+ export type PermissionUpdateManyWithWhereWithoutRolesInput = {
336
+ where: Prisma.PermissionScalarWhereInput;
337
+ data: Prisma.XOR<Prisma.PermissionUpdateManyMutationInput, Prisma.PermissionUncheckedUpdateManyWithoutRolesInput>;
338
+ };
339
+ export type PermissionScalarWhereInput = {
340
+ AND?: Prisma.PermissionScalarWhereInput | Prisma.PermissionScalarWhereInput[];
341
+ OR?: Prisma.PermissionScalarWhereInput[];
342
+ NOT?: Prisma.PermissionScalarWhereInput | Prisma.PermissionScalarWhereInput[];
343
+ id?: Prisma.IntFilter<"Permission"> | number;
344
+ name?: Prisma.StringFilter<"Permission"> | string;
345
+ updatedAt?: Prisma.DateTimeFilter<"Permission"> | Date | string;
346
+ createdAt?: Prisma.DateTimeFilter<"Permission"> | Date | string;
347
+ };
348
+ export type PermissionUpdateWithoutRolesInput = {
349
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
350
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
351
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
352
+ };
353
+ export type PermissionUncheckedUpdateWithoutRolesInput = {
354
+ id?: Prisma.IntFieldUpdateOperationsInput | number;
355
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
356
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
357
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
358
+ };
359
+ export type PermissionUncheckedUpdateManyWithoutRolesInput = {
360
+ id?: Prisma.IntFieldUpdateOperationsInput | number;
361
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
362
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
363
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
364
+ };
365
+ /**
366
+ * Count Type PermissionCountOutputType
367
+ */
368
+ export type PermissionCountOutputType = {
369
+ roles: number;
370
+ };
371
+ export type PermissionCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
372
+ roles?: boolean | PermissionCountOutputTypeCountRolesArgs;
373
+ };
374
+ /**
375
+ * PermissionCountOutputType without action
376
+ */
377
+ export type PermissionCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
378
+ /**
379
+ * Select specific fields to fetch from the PermissionCountOutputType
380
+ */
381
+ select?: Prisma.PermissionCountOutputTypeSelect<ExtArgs> | null;
382
+ };
383
+ /**
384
+ * PermissionCountOutputType without action
385
+ */
386
+ export type PermissionCountOutputTypeCountRolesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
387
+ where?: Prisma.RoleWhereInput;
388
+ };
389
+ export type PermissionSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
390
+ id?: boolean;
391
+ name?: boolean;
392
+ updatedAt?: boolean;
393
+ createdAt?: boolean;
394
+ roles?: boolean | Prisma.Permission$rolesArgs<ExtArgs>;
395
+ _count?: boolean | Prisma.PermissionCountOutputTypeDefaultArgs<ExtArgs>;
396
+ }, ExtArgs["result"]["permission"]>;
397
+ export type PermissionSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
398
+ id?: boolean;
399
+ name?: boolean;
400
+ updatedAt?: boolean;
401
+ createdAt?: boolean;
402
+ }, ExtArgs["result"]["permission"]>;
403
+ export type PermissionSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
404
+ id?: boolean;
405
+ name?: boolean;
406
+ updatedAt?: boolean;
407
+ createdAt?: boolean;
408
+ }, ExtArgs["result"]["permission"]>;
409
+ export type PermissionSelectScalar = {
410
+ id?: boolean;
411
+ name?: boolean;
412
+ updatedAt?: boolean;
413
+ createdAt?: boolean;
414
+ };
415
+ export type PermissionOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "updatedAt" | "createdAt", ExtArgs["result"]["permission"]>;
416
+ export type PermissionInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
417
+ roles?: boolean | Prisma.Permission$rolesArgs<ExtArgs>;
418
+ _count?: boolean | Prisma.PermissionCountOutputTypeDefaultArgs<ExtArgs>;
419
+ };
420
+ export type PermissionIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {};
421
+ export type PermissionIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {};
422
+ export type $PermissionPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
423
+ name: "Permission";
424
+ objects: {
425
+ /**
426
+ * Related columns
427
+ */
428
+ roles: Prisma.$RolePayload<ExtArgs>[];
429
+ };
430
+ scalars: runtime.Types.Extensions.GetPayloadResult<{
431
+ id: number;
432
+ name: string;
433
+ /**
434
+ * Audit columns
435
+ */
436
+ updatedAt: Date;
437
+ createdAt: Date;
438
+ }, ExtArgs["result"]["permission"]>;
439
+ composites: {};
440
+ };
441
+ export type PermissionGetPayload<S extends boolean | null | undefined | PermissionDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$PermissionPayload, S>;
442
+ export type PermissionCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = Omit<PermissionFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
443
+ select?: PermissionCountAggregateInputType | true;
444
+ };
445
+ export interface PermissionDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
446
+ [K: symbol]: {
447
+ types: Prisma.TypeMap<ExtArgs>['model']['Permission'];
448
+ meta: {
449
+ name: 'Permission';
450
+ };
451
+ };
452
+ /**
453
+ * Find zero or one Permission that matches the filter.
454
+ * @param {PermissionFindUniqueArgs} args - Arguments to find a Permission
455
+ * @example
456
+ * // Get one Permission
457
+ * const permission = await prisma.permission.findUnique({
458
+ * where: {
459
+ * // ... provide filter here
460
+ * }
461
+ * })
462
+ */
463
+ findUnique<T extends PermissionFindUniqueArgs>(args: Prisma.SelectSubset<T, PermissionFindUniqueArgs<ExtArgs>>): Prisma.Prisma__PermissionClient<runtime.Types.Result.GetResult<Prisma.$PermissionPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
464
+ /**
465
+ * Find one Permission that matches the filter or throw an error with `error.code='P2025'`
466
+ * if no matches were found.
467
+ * @param {PermissionFindUniqueOrThrowArgs} args - Arguments to find a Permission
468
+ * @example
469
+ * // Get one Permission
470
+ * const permission = await prisma.permission.findUniqueOrThrow({
471
+ * where: {
472
+ * // ... provide filter here
473
+ * }
474
+ * })
475
+ */
476
+ findUniqueOrThrow<T extends PermissionFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, PermissionFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__PermissionClient<runtime.Types.Result.GetResult<Prisma.$PermissionPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
477
+ /**
478
+ * Find the first Permission that matches the filter.
479
+ * Note, that providing `undefined` is treated as the value not being there.
480
+ * Read more here: https://pris.ly/d/null-undefined
481
+ * @param {PermissionFindFirstArgs} args - Arguments to find a Permission
482
+ * @example
483
+ * // Get one Permission
484
+ * const permission = await prisma.permission.findFirst({
485
+ * where: {
486
+ * // ... provide filter here
487
+ * }
488
+ * })
489
+ */
490
+ findFirst<T extends PermissionFindFirstArgs>(args?: Prisma.SelectSubset<T, PermissionFindFirstArgs<ExtArgs>>): Prisma.Prisma__PermissionClient<runtime.Types.Result.GetResult<Prisma.$PermissionPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
491
+ /**
492
+ * Find the first Permission that matches the filter or
493
+ * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
494
+ * Note, that providing `undefined` is treated as the value not being there.
495
+ * Read more here: https://pris.ly/d/null-undefined
496
+ * @param {PermissionFindFirstOrThrowArgs} args - Arguments to find a Permission
497
+ * @example
498
+ * // Get one Permission
499
+ * const permission = await prisma.permission.findFirstOrThrow({
500
+ * where: {
501
+ * // ... provide filter here
502
+ * }
503
+ * })
504
+ */
505
+ findFirstOrThrow<T extends PermissionFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, PermissionFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__PermissionClient<runtime.Types.Result.GetResult<Prisma.$PermissionPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
506
+ /**
507
+ * Find zero or more Permissions that matches the filter.
508
+ * Note, that providing `undefined` is treated as the value not being there.
509
+ * Read more here: https://pris.ly/d/null-undefined
510
+ * @param {PermissionFindManyArgs} args - Arguments to filter and select certain fields only.
511
+ * @example
512
+ * // Get all Permissions
513
+ * const permissions = await prisma.permission.findMany()
514
+ *
515
+ * // Get first 10 Permissions
516
+ * const permissions = await prisma.permission.findMany({ take: 10 })
517
+ *
518
+ * // Only select the `id`
519
+ * const permissionWithIdOnly = await prisma.permission.findMany({ select: { id: true } })
520
+ *
521
+ */
522
+ findMany<T extends PermissionFindManyArgs>(args?: Prisma.SelectSubset<T, PermissionFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PermissionPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>;
523
+ /**
524
+ * Create a Permission.
525
+ * @param {PermissionCreateArgs} args - Arguments to create a Permission.
526
+ * @example
527
+ * // Create one Permission
528
+ * const Permission = await prisma.permission.create({
529
+ * data: {
530
+ * // ... data to create a Permission
531
+ * }
532
+ * })
533
+ *
534
+ */
535
+ create<T extends PermissionCreateArgs>(args: Prisma.SelectSubset<T, PermissionCreateArgs<ExtArgs>>): Prisma.Prisma__PermissionClient<runtime.Types.Result.GetResult<Prisma.$PermissionPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
536
+ /**
537
+ * Create many Permissions.
538
+ * @param {PermissionCreateManyArgs} args - Arguments to create many Permissions.
539
+ * @example
540
+ * // Create many Permissions
541
+ * const permission = await prisma.permission.createMany({
542
+ * data: [
543
+ * // ... provide data here
544
+ * ]
545
+ * })
546
+ *
547
+ */
548
+ createMany<T extends PermissionCreateManyArgs>(args?: Prisma.SelectSubset<T, PermissionCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
549
+ /**
550
+ * Create many Permissions and returns the data saved in the database.
551
+ * @param {PermissionCreateManyAndReturnArgs} args - Arguments to create many Permissions.
552
+ * @example
553
+ * // Create many Permissions
554
+ * const permission = await prisma.permission.createManyAndReturn({
555
+ * data: [
556
+ * // ... provide data here
557
+ * ]
558
+ * })
559
+ *
560
+ * // Create many Permissions and only return the `id`
561
+ * const permissionWithIdOnly = await prisma.permission.createManyAndReturn({
562
+ * select: { id: true },
563
+ * data: [
564
+ * // ... provide data here
565
+ * ]
566
+ * })
567
+ * Note, that providing `undefined` is treated as the value not being there.
568
+ * Read more here: https://pris.ly/d/null-undefined
569
+ *
570
+ */
571
+ createManyAndReturn<T extends PermissionCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, PermissionCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PermissionPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>;
572
+ /**
573
+ * Delete a Permission.
574
+ * @param {PermissionDeleteArgs} args - Arguments to delete one Permission.
575
+ * @example
576
+ * // Delete one Permission
577
+ * const Permission = await prisma.permission.delete({
578
+ * where: {
579
+ * // ... filter to delete one Permission
580
+ * }
581
+ * })
582
+ *
583
+ */
584
+ delete<T extends PermissionDeleteArgs>(args: Prisma.SelectSubset<T, PermissionDeleteArgs<ExtArgs>>): Prisma.Prisma__PermissionClient<runtime.Types.Result.GetResult<Prisma.$PermissionPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
585
+ /**
586
+ * Update one Permission.
587
+ * @param {PermissionUpdateArgs} args - Arguments to update one Permission.
588
+ * @example
589
+ * // Update one Permission
590
+ * const permission = await prisma.permission.update({
591
+ * where: {
592
+ * // ... provide filter here
593
+ * },
594
+ * data: {
595
+ * // ... provide data here
596
+ * }
597
+ * })
598
+ *
599
+ */
600
+ update<T extends PermissionUpdateArgs>(args: Prisma.SelectSubset<T, PermissionUpdateArgs<ExtArgs>>): Prisma.Prisma__PermissionClient<runtime.Types.Result.GetResult<Prisma.$PermissionPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
601
+ /**
602
+ * Delete zero or more Permissions.
603
+ * @param {PermissionDeleteManyArgs} args - Arguments to filter Permissions to delete.
604
+ * @example
605
+ * // Delete a few Permissions
606
+ * const { count } = await prisma.permission.deleteMany({
607
+ * where: {
608
+ * // ... provide filter here
609
+ * }
610
+ * })
611
+ *
612
+ */
613
+ deleteMany<T extends PermissionDeleteManyArgs>(args?: Prisma.SelectSubset<T, PermissionDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
614
+ /**
615
+ * Update zero or more Permissions.
616
+ * Note, that providing `undefined` is treated as the value not being there.
617
+ * Read more here: https://pris.ly/d/null-undefined
618
+ * @param {PermissionUpdateManyArgs} args - Arguments to update one or more rows.
619
+ * @example
620
+ * // Update many Permissions
621
+ * const permission = await prisma.permission.updateMany({
622
+ * where: {
623
+ * // ... provide filter here
624
+ * },
625
+ * data: {
626
+ * // ... provide data here
627
+ * }
628
+ * })
629
+ *
630
+ */
631
+ updateMany<T extends PermissionUpdateManyArgs>(args: Prisma.SelectSubset<T, PermissionUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
632
+ /**
633
+ * Update zero or more Permissions and returns the data updated in the database.
634
+ * @param {PermissionUpdateManyAndReturnArgs} args - Arguments to update many Permissions.
635
+ * @example
636
+ * // Update many Permissions
637
+ * const permission = await prisma.permission.updateManyAndReturn({
638
+ * where: {
639
+ * // ... provide filter here
640
+ * },
641
+ * data: [
642
+ * // ... provide data here
643
+ * ]
644
+ * })
645
+ *
646
+ * // Update zero or more Permissions and only return the `id`
647
+ * const permissionWithIdOnly = await prisma.permission.updateManyAndReturn({
648
+ * select: { id: true },
649
+ * where: {
650
+ * // ... provide filter here
651
+ * },
652
+ * data: [
653
+ * // ... provide data here
654
+ * ]
655
+ * })
656
+ * Note, that providing `undefined` is treated as the value not being there.
657
+ * Read more here: https://pris.ly/d/null-undefined
658
+ *
659
+ */
660
+ updateManyAndReturn<T extends PermissionUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, PermissionUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PermissionPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>;
661
+ /**
662
+ * Create or update one Permission.
663
+ * @param {PermissionUpsertArgs} args - Arguments to update or create a Permission.
664
+ * @example
665
+ * // Update or create a Permission
666
+ * const permission = await prisma.permission.upsert({
667
+ * create: {
668
+ * // ... data to create a Permission
669
+ * },
670
+ * update: {
671
+ * // ... in case it already exists, update
672
+ * },
673
+ * where: {
674
+ * // ... the filter for the Permission we want to update
675
+ * }
676
+ * })
677
+ */
678
+ upsert<T extends PermissionUpsertArgs>(args: Prisma.SelectSubset<T, PermissionUpsertArgs<ExtArgs>>): Prisma.Prisma__PermissionClient<runtime.Types.Result.GetResult<Prisma.$PermissionPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
679
+ /**
680
+ * Count the number of Permissions.
681
+ * Note, that providing `undefined` is treated as the value not being there.
682
+ * Read more here: https://pris.ly/d/null-undefined
683
+ * @param {PermissionCountArgs} args - Arguments to filter Permissions to count.
684
+ * @example
685
+ * // Count the number of Permissions
686
+ * const count = await prisma.permission.count({
687
+ * where: {
688
+ * // ... the filter for the Permissions we want to count
689
+ * }
690
+ * })
691
+ **/
692
+ count<T extends PermissionCountArgs>(args?: Prisma.Subset<T, PermissionCountArgs>): Prisma.PrismaPromise<T extends runtime.Types.Utils.Record<'select', any> ? T['select'] extends true ? number : Prisma.GetScalarType<T['select'], PermissionCountAggregateOutputType> : number>;
693
+ /**
694
+ * Allows you to perform aggregations operations on a Permission.
695
+ * Note, that providing `undefined` is treated as the value not being there.
696
+ * Read more here: https://pris.ly/d/null-undefined
697
+ * @param {PermissionAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
698
+ * @example
699
+ * // Ordered by age ascending
700
+ * // Where email contains prisma.io
701
+ * // Limited to the 10 users
702
+ * const aggregations = await prisma.user.aggregate({
703
+ * _avg: {
704
+ * age: true,
705
+ * },
706
+ * where: {
707
+ * email: {
708
+ * contains: "prisma.io",
709
+ * },
710
+ * },
711
+ * orderBy: {
712
+ * age: "asc",
713
+ * },
714
+ * take: 10,
715
+ * })
716
+ **/
717
+ aggregate<T extends PermissionAggregateArgs>(args: Prisma.Subset<T, PermissionAggregateArgs>): Prisma.PrismaPromise<GetPermissionAggregateType<T>>;
718
+ /**
719
+ * Group by Permission.
720
+ * Note, that providing `undefined` is treated as the value not being there.
721
+ * Read more here: https://pris.ly/d/null-undefined
722
+ * @param {PermissionGroupByArgs} args - Group by arguments.
723
+ * @example
724
+ * // Group by city, order by createdAt, get count
725
+ * const result = await prisma.user.groupBy({
726
+ * by: ['city', 'createdAt'],
727
+ * orderBy: {
728
+ * createdAt: true
729
+ * },
730
+ * _count: {
731
+ * _all: true
732
+ * },
733
+ * })
734
+ *
735
+ **/
736
+ groupBy<T extends PermissionGroupByArgs, HasSelectOrTake extends Prisma.Or<Prisma.Extends<'skip', Prisma.Keys<T>>, Prisma.Extends<'take', Prisma.Keys<T>>>, OrderByArg extends Prisma.True extends HasSelectOrTake ? {
737
+ orderBy: PermissionGroupByArgs['orderBy'];
738
+ } : {
739
+ orderBy?: PermissionGroupByArgs['orderBy'];
740
+ }, OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>, ByFields extends Prisma.MaybeTupleToUnion<T['by']>, ByValid extends Prisma.Has<ByFields, OrderFields>, HavingFields extends Prisma.GetHavingFields<T['having']>, HavingValid extends Prisma.Has<ByFields, HavingFields>, ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, InputErrors extends ByEmpty extends Prisma.True ? `Error: "by" must not be empty.` : HavingValid extends Prisma.False ? {
741
+ [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [
742
+ Error,
743
+ 'Field ',
744
+ P,
745
+ ` in "having" needs to be provided in "by"`
746
+ ];
747
+ }[HavingFields] : 'take' extends Prisma.Keys<T> ? 'orderBy' extends Prisma.Keys<T> ? ByValid extends Prisma.True ? {} : {
748
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
749
+ }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Prisma.Keys<T> ? 'orderBy' extends Prisma.Keys<T> ? ByValid extends Prisma.True ? {} : {
750
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
751
+ }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends Prisma.True ? {} : {
752
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
753
+ }[OrderFields]>(args: Prisma.SubsetIntersection<T, PermissionGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetPermissionGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>;
754
+ /**
755
+ * Fields of the Permission model
756
+ */
757
+ readonly fields: PermissionFieldRefs;
758
+ }
759
+ /**
760
+ * The delegate class that acts as a "Promise-like" for Permission.
761
+ * Why is this prefixed with `Prisma__`?
762
+ * Because we want to prevent naming conflicts as mentioned in
763
+ * https://github.com/prisma/prisma-client-js/issues/707
764
+ */
765
+ export interface Prisma__PermissionClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
766
+ readonly [Symbol.toStringTag]: "PrismaPromise";
767
+ roles<T extends Prisma.Permission$rolesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Permission$rolesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$RolePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>;
768
+ /**
769
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
770
+ * @param onfulfilled The callback to execute when the Promise is resolved.
771
+ * @param onrejected The callback to execute when the Promise is rejected.
772
+ * @returns A Promise for the completion of which ever callback is executed.
773
+ */
774
+ 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>;
775
+ /**
776
+ * Attaches a callback for only the rejection of the Promise.
777
+ * @param onrejected The callback to execute when the Promise is rejected.
778
+ * @returns A Promise for the completion of the callback.
779
+ */
780
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>;
781
+ /**
782
+ * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
783
+ * resolved value cannot be modified from the callback.
784
+ * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
785
+ * @returns A Promise for the completion of the callback.
786
+ */
787
+ finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>;
788
+ }
789
+ /**
790
+ * Fields of the Permission model
791
+ */
792
+ export interface PermissionFieldRefs {
793
+ readonly id: Prisma.FieldRef<"Permission", 'Int'>;
794
+ readonly name: Prisma.FieldRef<"Permission", 'String'>;
795
+ readonly updatedAt: Prisma.FieldRef<"Permission", 'DateTime'>;
796
+ readonly createdAt: Prisma.FieldRef<"Permission", 'DateTime'>;
797
+ }
798
+ /**
799
+ * Permission findUnique
800
+ */
801
+ export type PermissionFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
802
+ /**
803
+ * Select specific fields to fetch from the Permission
804
+ */
805
+ select?: Prisma.PermissionSelect<ExtArgs> | null;
806
+ /**
807
+ * Omit specific fields from the Permission
808
+ */
809
+ omit?: Prisma.PermissionOmit<ExtArgs> | null;
810
+ /**
811
+ * Choose, which related nodes to fetch as well
812
+ */
813
+ include?: Prisma.PermissionInclude<ExtArgs> | null;
814
+ /**
815
+ * Filter, which Permission to fetch.
816
+ */
817
+ where: Prisma.PermissionWhereUniqueInput;
818
+ };
819
+ /**
820
+ * Permission findUniqueOrThrow
821
+ */
822
+ export type PermissionFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
823
+ /**
824
+ * Select specific fields to fetch from the Permission
825
+ */
826
+ select?: Prisma.PermissionSelect<ExtArgs> | null;
827
+ /**
828
+ * Omit specific fields from the Permission
829
+ */
830
+ omit?: Prisma.PermissionOmit<ExtArgs> | null;
831
+ /**
832
+ * Choose, which related nodes to fetch as well
833
+ */
834
+ include?: Prisma.PermissionInclude<ExtArgs> | null;
835
+ /**
836
+ * Filter, which Permission to fetch.
837
+ */
838
+ where: Prisma.PermissionWhereUniqueInput;
839
+ };
840
+ /**
841
+ * Permission findFirst
842
+ */
843
+ export type PermissionFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
844
+ /**
845
+ * Select specific fields to fetch from the Permission
846
+ */
847
+ select?: Prisma.PermissionSelect<ExtArgs> | null;
848
+ /**
849
+ * Omit specific fields from the Permission
850
+ */
851
+ omit?: Prisma.PermissionOmit<ExtArgs> | null;
852
+ /**
853
+ * Choose, which related nodes to fetch as well
854
+ */
855
+ include?: Prisma.PermissionInclude<ExtArgs> | null;
856
+ /**
857
+ * Filter, which Permission to fetch.
858
+ */
859
+ where?: Prisma.PermissionWhereInput;
860
+ /**
861
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
862
+ *
863
+ * Determine the order of Permissions to fetch.
864
+ */
865
+ orderBy?: Prisma.PermissionOrderByWithRelationInput | Prisma.PermissionOrderByWithRelationInput[];
866
+ /**
867
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
868
+ *
869
+ * Sets the position for searching for Permissions.
870
+ */
871
+ cursor?: Prisma.PermissionWhereUniqueInput;
872
+ /**
873
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
874
+ *
875
+ * Take `±n` Permissions from the position of the cursor.
876
+ */
877
+ take?: number;
878
+ /**
879
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
880
+ *
881
+ * Skip the first `n` Permissions.
882
+ */
883
+ skip?: number;
884
+ /**
885
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
886
+ *
887
+ * Filter by unique combinations of Permissions.
888
+ */
889
+ distinct?: Prisma.PermissionScalarFieldEnum | Prisma.PermissionScalarFieldEnum[];
890
+ };
891
+ /**
892
+ * Permission findFirstOrThrow
893
+ */
894
+ export type PermissionFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
895
+ /**
896
+ * Select specific fields to fetch from the Permission
897
+ */
898
+ select?: Prisma.PermissionSelect<ExtArgs> | null;
899
+ /**
900
+ * Omit specific fields from the Permission
901
+ */
902
+ omit?: Prisma.PermissionOmit<ExtArgs> | null;
903
+ /**
904
+ * Choose, which related nodes to fetch as well
905
+ */
906
+ include?: Prisma.PermissionInclude<ExtArgs> | null;
907
+ /**
908
+ * Filter, which Permission to fetch.
909
+ */
910
+ where?: Prisma.PermissionWhereInput;
911
+ /**
912
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
913
+ *
914
+ * Determine the order of Permissions to fetch.
915
+ */
916
+ orderBy?: Prisma.PermissionOrderByWithRelationInput | Prisma.PermissionOrderByWithRelationInput[];
917
+ /**
918
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
919
+ *
920
+ * Sets the position for searching for Permissions.
921
+ */
922
+ cursor?: Prisma.PermissionWhereUniqueInput;
923
+ /**
924
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
925
+ *
926
+ * Take `±n` Permissions from the position of the cursor.
927
+ */
928
+ take?: number;
929
+ /**
930
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
931
+ *
932
+ * Skip the first `n` Permissions.
933
+ */
934
+ skip?: number;
935
+ /**
936
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
937
+ *
938
+ * Filter by unique combinations of Permissions.
939
+ */
940
+ distinct?: Prisma.PermissionScalarFieldEnum | Prisma.PermissionScalarFieldEnum[];
941
+ };
942
+ /**
943
+ * Permission findMany
944
+ */
945
+ export type PermissionFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
946
+ /**
947
+ * Select specific fields to fetch from the Permission
948
+ */
949
+ select?: Prisma.PermissionSelect<ExtArgs> | null;
950
+ /**
951
+ * Omit specific fields from the Permission
952
+ */
953
+ omit?: Prisma.PermissionOmit<ExtArgs> | null;
954
+ /**
955
+ * Choose, which related nodes to fetch as well
956
+ */
957
+ include?: Prisma.PermissionInclude<ExtArgs> | null;
958
+ /**
959
+ * Filter, which Permissions to fetch.
960
+ */
961
+ where?: Prisma.PermissionWhereInput;
962
+ /**
963
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
964
+ *
965
+ * Determine the order of Permissions to fetch.
966
+ */
967
+ orderBy?: Prisma.PermissionOrderByWithRelationInput | Prisma.PermissionOrderByWithRelationInput[];
968
+ /**
969
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
970
+ *
971
+ * Sets the position for listing Permissions.
972
+ */
973
+ cursor?: Prisma.PermissionWhereUniqueInput;
974
+ /**
975
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
976
+ *
977
+ * Take `±n` Permissions from the position of the cursor.
978
+ */
979
+ take?: number;
980
+ /**
981
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
982
+ *
983
+ * Skip the first `n` Permissions.
984
+ */
985
+ skip?: number;
986
+ /**
987
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
988
+ *
989
+ * Filter by unique combinations of Permissions.
990
+ */
991
+ distinct?: Prisma.PermissionScalarFieldEnum | Prisma.PermissionScalarFieldEnum[];
992
+ };
993
+ /**
994
+ * Permission create
995
+ */
996
+ export type PermissionCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
997
+ /**
998
+ * Select specific fields to fetch from the Permission
999
+ */
1000
+ select?: Prisma.PermissionSelect<ExtArgs> | null;
1001
+ /**
1002
+ * Omit specific fields from the Permission
1003
+ */
1004
+ omit?: Prisma.PermissionOmit<ExtArgs> | null;
1005
+ /**
1006
+ * Choose, which related nodes to fetch as well
1007
+ */
1008
+ include?: Prisma.PermissionInclude<ExtArgs> | null;
1009
+ /**
1010
+ * The data needed to create a Permission.
1011
+ */
1012
+ data: Prisma.XOR<Prisma.PermissionCreateInput, Prisma.PermissionUncheckedCreateInput>;
1013
+ };
1014
+ /**
1015
+ * Permission createMany
1016
+ */
1017
+ export type PermissionCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1018
+ /**
1019
+ * The data used to create many Permissions.
1020
+ */
1021
+ data: Prisma.PermissionCreateManyInput | Prisma.PermissionCreateManyInput[];
1022
+ };
1023
+ /**
1024
+ * Permission createManyAndReturn
1025
+ */
1026
+ export type PermissionCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1027
+ /**
1028
+ * Select specific fields to fetch from the Permission
1029
+ */
1030
+ select?: Prisma.PermissionSelectCreateManyAndReturn<ExtArgs> | null;
1031
+ /**
1032
+ * Omit specific fields from the Permission
1033
+ */
1034
+ omit?: Prisma.PermissionOmit<ExtArgs> | null;
1035
+ /**
1036
+ * The data used to create many Permissions.
1037
+ */
1038
+ data: Prisma.PermissionCreateManyInput | Prisma.PermissionCreateManyInput[];
1039
+ };
1040
+ /**
1041
+ * Permission update
1042
+ */
1043
+ export type PermissionUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1044
+ /**
1045
+ * Select specific fields to fetch from the Permission
1046
+ */
1047
+ select?: Prisma.PermissionSelect<ExtArgs> | null;
1048
+ /**
1049
+ * Omit specific fields from the Permission
1050
+ */
1051
+ omit?: Prisma.PermissionOmit<ExtArgs> | null;
1052
+ /**
1053
+ * Choose, which related nodes to fetch as well
1054
+ */
1055
+ include?: Prisma.PermissionInclude<ExtArgs> | null;
1056
+ /**
1057
+ * The data needed to update a Permission.
1058
+ */
1059
+ data: Prisma.XOR<Prisma.PermissionUpdateInput, Prisma.PermissionUncheckedUpdateInput>;
1060
+ /**
1061
+ * Choose, which Permission to update.
1062
+ */
1063
+ where: Prisma.PermissionWhereUniqueInput;
1064
+ };
1065
+ /**
1066
+ * Permission updateMany
1067
+ */
1068
+ export type PermissionUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1069
+ /**
1070
+ * The data used to update Permissions.
1071
+ */
1072
+ data: Prisma.XOR<Prisma.PermissionUpdateManyMutationInput, Prisma.PermissionUncheckedUpdateManyInput>;
1073
+ /**
1074
+ * Filter which Permissions to update
1075
+ */
1076
+ where?: Prisma.PermissionWhereInput;
1077
+ /**
1078
+ * Limit how many Permissions to update.
1079
+ */
1080
+ limit?: number;
1081
+ };
1082
+ /**
1083
+ * Permission updateManyAndReturn
1084
+ */
1085
+ export type PermissionUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1086
+ /**
1087
+ * Select specific fields to fetch from the Permission
1088
+ */
1089
+ select?: Prisma.PermissionSelectUpdateManyAndReturn<ExtArgs> | null;
1090
+ /**
1091
+ * Omit specific fields from the Permission
1092
+ */
1093
+ omit?: Prisma.PermissionOmit<ExtArgs> | null;
1094
+ /**
1095
+ * The data used to update Permissions.
1096
+ */
1097
+ data: Prisma.XOR<Prisma.PermissionUpdateManyMutationInput, Prisma.PermissionUncheckedUpdateManyInput>;
1098
+ /**
1099
+ * Filter which Permissions to update
1100
+ */
1101
+ where?: Prisma.PermissionWhereInput;
1102
+ /**
1103
+ * Limit how many Permissions to update.
1104
+ */
1105
+ limit?: number;
1106
+ };
1107
+ /**
1108
+ * Permission upsert
1109
+ */
1110
+ export type PermissionUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1111
+ /**
1112
+ * Select specific fields to fetch from the Permission
1113
+ */
1114
+ select?: Prisma.PermissionSelect<ExtArgs> | null;
1115
+ /**
1116
+ * Omit specific fields from the Permission
1117
+ */
1118
+ omit?: Prisma.PermissionOmit<ExtArgs> | null;
1119
+ /**
1120
+ * Choose, which related nodes to fetch as well
1121
+ */
1122
+ include?: Prisma.PermissionInclude<ExtArgs> | null;
1123
+ /**
1124
+ * The filter to search for the Permission to update in case it exists.
1125
+ */
1126
+ where: Prisma.PermissionWhereUniqueInput;
1127
+ /**
1128
+ * In case the Permission found by the `where` argument doesn't exist, create a new Permission with this data.
1129
+ */
1130
+ create: Prisma.XOR<Prisma.PermissionCreateInput, Prisma.PermissionUncheckedCreateInput>;
1131
+ /**
1132
+ * In case the Permission was found with the provided `where` argument, update it with this data.
1133
+ */
1134
+ update: Prisma.XOR<Prisma.PermissionUpdateInput, Prisma.PermissionUncheckedUpdateInput>;
1135
+ };
1136
+ /**
1137
+ * Permission delete
1138
+ */
1139
+ export type PermissionDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1140
+ /**
1141
+ * Select specific fields to fetch from the Permission
1142
+ */
1143
+ select?: Prisma.PermissionSelect<ExtArgs> | null;
1144
+ /**
1145
+ * Omit specific fields from the Permission
1146
+ */
1147
+ omit?: Prisma.PermissionOmit<ExtArgs> | null;
1148
+ /**
1149
+ * Choose, which related nodes to fetch as well
1150
+ */
1151
+ include?: Prisma.PermissionInclude<ExtArgs> | null;
1152
+ /**
1153
+ * Filter which Permission to delete.
1154
+ */
1155
+ where: Prisma.PermissionWhereUniqueInput;
1156
+ };
1157
+ /**
1158
+ * Permission deleteMany
1159
+ */
1160
+ export type PermissionDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1161
+ /**
1162
+ * Filter which Permissions to delete
1163
+ */
1164
+ where?: Prisma.PermissionWhereInput;
1165
+ /**
1166
+ * Limit how many Permissions to delete.
1167
+ */
1168
+ limit?: number;
1169
+ };
1170
+ /**
1171
+ * Permission.roles
1172
+ */
1173
+ export type Permission$rolesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1174
+ /**
1175
+ * Select specific fields to fetch from the Role
1176
+ */
1177
+ select?: Prisma.RoleSelect<ExtArgs> | null;
1178
+ /**
1179
+ * Omit specific fields from the Role
1180
+ */
1181
+ omit?: Prisma.RoleOmit<ExtArgs> | null;
1182
+ /**
1183
+ * Choose, which related nodes to fetch as well
1184
+ */
1185
+ include?: Prisma.RoleInclude<ExtArgs> | null;
1186
+ where?: Prisma.RoleWhereInput;
1187
+ orderBy?: Prisma.RoleOrderByWithRelationInput | Prisma.RoleOrderByWithRelationInput[];
1188
+ cursor?: Prisma.RoleWhereUniqueInput;
1189
+ take?: number;
1190
+ skip?: number;
1191
+ distinct?: Prisma.RoleScalarFieldEnum | Prisma.RoleScalarFieldEnum[];
1192
+ };
1193
+ /**
1194
+ * Permission without action
1195
+ */
1196
+ export type PermissionDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1197
+ /**
1198
+ * Select specific fields to fetch from the Permission
1199
+ */
1200
+ select?: Prisma.PermissionSelect<ExtArgs> | null;
1201
+ /**
1202
+ * Omit specific fields from the Permission
1203
+ */
1204
+ omit?: Prisma.PermissionOmit<ExtArgs> | null;
1205
+ /**
1206
+ * Choose, which related nodes to fetch as well
1207
+ */
1208
+ include?: Prisma.PermissionInclude<ExtArgs> | null;
1209
+ };