@friggframework/core 2.0.0--canary.737.83b4e17.0 → 2.0.0--canary.743.c55fe7b.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 (67) hide show
  1. package/CLAUDE.md +173 -7
  2. package/core/CLAUDE.md +57 -1
  3. package/core/Worker.js +440 -11
  4. package/core/create-handler.js +20 -0
  5. package/core/index.js +6 -0
  6. package/core/invocation-deadline.js +91 -0
  7. package/core/invocation-scope.js +30 -24
  8. package/core/rate-limited-response.js +27 -0
  9. package/errors/fetch-error.js +10 -6
  10. package/errors/index.js +2 -0
  11. package/errors/rate-limit-error.js +46 -0
  12. package/generated/prisma-mongodb/edge.js +13 -4
  13. package/generated/prisma-mongodb/index-browser.js +10 -1
  14. package/generated/prisma-mongodb/index.d.ts +1394 -118
  15. package/generated/prisma-mongodb/index.js +13 -4
  16. package/generated/prisma-mongodb/package.json +1 -1
  17. package/generated/prisma-mongodb/schema.prisma +15 -0
  18. package/generated/prisma-mongodb/wasm.js +13 -4
  19. package/generated/prisma-postgresql/edge.js +13 -4
  20. package/generated/prisma-postgresql/index-browser.js +10 -1
  21. package/generated/prisma-postgresql/index.d.ts +1438 -100
  22. package/generated/prisma-postgresql/index.js +13 -4
  23. package/generated/prisma-postgresql/package.json +1 -1
  24. package/generated/prisma-postgresql/schema.prisma +13 -0
  25. package/generated/prisma-postgresql/wasm.js +13 -4
  26. package/handlers/app-handler-helpers.js +15 -0
  27. package/handlers/backend-utils.js +75 -1
  28. package/handlers/workers/integration-defined-workers.js +2 -0
  29. package/index.js +26 -0
  30. package/infrastructure/scheduler/eventbridge-scheduler-adapter.js +2 -0
  31. package/integrations/repositories/integration-repository-documentdb.js +59 -10
  32. package/integrations/repositories/integration-repository-interface.js +50 -7
  33. package/integrations/repositories/integration-repository-mongo.js +88 -16
  34. package/integrations/repositories/integration-repository-postgres.js +89 -16
  35. package/integrations/repositories/message-item-shared.js +17 -0
  36. package/integrations/tests/doubles/prisma-message-row.js +24 -0
  37. package/integrations/tests/doubles/test-integration-repository.js +32 -2
  38. package/integrations/use-cases/clear-rate-limit-wait.js +28 -0
  39. package/integrations/use-cases/index.js +7 -1
  40. package/integrations/use-cases/record-rate-limit-message.js +104 -0
  41. package/integrations/use-cases/record-rate-limit-wait.js +36 -0
  42. package/integrations/use-cases/update-integration-messages.js +28 -9
  43. package/logs/serialize.js +15 -0
  44. package/modules/requester/oauth-2.js +8 -0
  45. package/modules/requester/rate-limit/index.js +6 -0
  46. package/modules/requester/rate-limit/pacer.js +541 -0
  47. package/modules/requester/rate-limit/parsers.js +249 -0
  48. package/modules/requester/rate-limit/policy.js +326 -0
  49. package/modules/requester/rate-limit/state/rate-limit-state-repository-factory.js +35 -0
  50. package/modules/requester/rate-limit/state/rate-limit-state-repository-interface.js +48 -0
  51. package/modules/requester/rate-limit/state/rate-limit-state-repository-memory.js +57 -0
  52. package/modules/requester/rate-limit/state/rate-limit-state-repository-mongo.js +160 -0
  53. package/modules/requester/rate-limit/state/rate-limit-state-repository-postgres.js +59 -0
  54. package/modules/requester/requester.js +342 -11
  55. package/package.json +7 -6
  56. package/prisma-mongodb/schema.prisma +15 -0
  57. package/prisma-postgresql/migrations/20261202000000_create_rate_limit_scope/migration.sql +14 -0
  58. package/prisma-postgresql/schema.prisma +13 -0
  59. package/queues/queue-deferral.js +155 -0
  60. package/queues/queue-delivery.js +1 -0
  61. package/queues/queuer-util.js +3 -4
  62. package/types/core/consumer.fixture.ts +12 -0
  63. package/types/core/index.d.ts +84 -0
  64. package/types/errors/index.d.ts +47 -0
  65. package/types/integrations/index.d.ts +25 -4
  66. package/types/module-plugin/index.d.ts +52 -0
  67. package/queues/sqs-message-body.js +0 -17
@@ -103,6 +103,14 @@ export type ScriptSchedule = $Result.DefaultSelection<Prisma.$ScriptSchedulePayl
103
103
  * history survives integration deletion.
104
104
  */
105
105
  export type UsageCounter = $Result.DefaultSelection<Prisma.$UsageCounterPayload>
106
+ /**
107
+ * Model RateLimitScope
108
+ * Shared rate-limit state, one row per scope key (ADR-049 section 6, pacing
109
+ * 2b). Isolated like UsageCounter: no userId, no foreign key, no secret. A
110
+ * scope key is a module label and a database id (`acme:credential:<id>`), or
111
+ * a hash. The key is the primary key, so every write is one atomic upsert.
112
+ */
113
+ export type RateLimitScope = $Result.DefaultSelection<Prisma.$RateLimitScopePayload>
106
114
 
107
115
  /**
108
116
  * Enums
@@ -409,6 +417,16 @@ export class PrismaClient<
409
417
  * ```
410
418
  */
411
419
  get usageCounter(): Prisma.UsageCounterDelegate<ExtArgs, ClientOptions>;
420
+
421
+ /**
422
+ * `prisma.rateLimitScope`: Exposes CRUD operations for the **RateLimitScope** model.
423
+ * Example usage:
424
+ * ```ts
425
+ * // Fetch zero or more RateLimitScopes
426
+ * const rateLimitScopes = await prisma.rateLimitScope.findMany()
427
+ * ```
428
+ */
429
+ get rateLimitScope(): Prisma.RateLimitScopeDelegate<ExtArgs, ClientOptions>;
412
430
  }
413
431
 
414
432
  export namespace Prisma {
@@ -865,7 +883,8 @@ export namespace Prisma {
865
883
  WebsocketConnection: 'WebsocketConnection',
866
884
  AdminScriptExecution: 'AdminScriptExecution',
867
885
  ScriptSchedule: 'ScriptSchedule',
868
- UsageCounter: 'UsageCounter'
886
+ UsageCounter: 'UsageCounter',
887
+ RateLimitScope: 'RateLimitScope'
869
888
  };
870
889
 
871
890
  export type ModelName = (typeof ModelName)[keyof typeof ModelName]
@@ -884,7 +903,7 @@ export namespace Prisma {
884
903
  omit: GlobalOmitOptions
885
904
  }
886
905
  meta: {
887
- modelProps: "user" | "token" | "credential" | "entity" | "integration" | "integrationMapping" | "process" | "sync" | "dataIdentifier" | "association" | "associationObject" | "state" | "websocketConnection" | "adminScriptExecution" | "scriptSchedule" | "usageCounter"
906
+ modelProps: "user" | "token" | "credential" | "entity" | "integration" | "integrationMapping" | "process" | "sync" | "dataIdentifier" | "association" | "associationObject" | "state" | "websocketConnection" | "adminScriptExecution" | "scriptSchedule" | "usageCounter" | "rateLimitScope"
888
907
  txIsolationLevel: never
889
908
  }
890
909
  model: {
@@ -2072,6 +2091,80 @@ export namespace Prisma {
2072
2091
  }
2073
2092
  }
2074
2093
  }
2094
+ RateLimitScope: {
2095
+ payload: Prisma.$RateLimitScopePayload<ExtArgs>
2096
+ fields: Prisma.RateLimitScopeFieldRefs
2097
+ operations: {
2098
+ findUnique: {
2099
+ args: Prisma.RateLimitScopeFindUniqueArgs<ExtArgs>
2100
+ result: $Utils.PayloadToResult<Prisma.$RateLimitScopePayload> | null
2101
+ }
2102
+ findUniqueOrThrow: {
2103
+ args: Prisma.RateLimitScopeFindUniqueOrThrowArgs<ExtArgs>
2104
+ result: $Utils.PayloadToResult<Prisma.$RateLimitScopePayload>
2105
+ }
2106
+ findFirst: {
2107
+ args: Prisma.RateLimitScopeFindFirstArgs<ExtArgs>
2108
+ result: $Utils.PayloadToResult<Prisma.$RateLimitScopePayload> | null
2109
+ }
2110
+ findFirstOrThrow: {
2111
+ args: Prisma.RateLimitScopeFindFirstOrThrowArgs<ExtArgs>
2112
+ result: $Utils.PayloadToResult<Prisma.$RateLimitScopePayload>
2113
+ }
2114
+ findMany: {
2115
+ args: Prisma.RateLimitScopeFindManyArgs<ExtArgs>
2116
+ result: $Utils.PayloadToResult<Prisma.$RateLimitScopePayload>[]
2117
+ }
2118
+ create: {
2119
+ args: Prisma.RateLimitScopeCreateArgs<ExtArgs>
2120
+ result: $Utils.PayloadToResult<Prisma.$RateLimitScopePayload>
2121
+ }
2122
+ createMany: {
2123
+ args: Prisma.RateLimitScopeCreateManyArgs<ExtArgs>
2124
+ result: BatchPayload
2125
+ }
2126
+ delete: {
2127
+ args: Prisma.RateLimitScopeDeleteArgs<ExtArgs>
2128
+ result: $Utils.PayloadToResult<Prisma.$RateLimitScopePayload>
2129
+ }
2130
+ update: {
2131
+ args: Prisma.RateLimitScopeUpdateArgs<ExtArgs>
2132
+ result: $Utils.PayloadToResult<Prisma.$RateLimitScopePayload>
2133
+ }
2134
+ deleteMany: {
2135
+ args: Prisma.RateLimitScopeDeleteManyArgs<ExtArgs>
2136
+ result: BatchPayload
2137
+ }
2138
+ updateMany: {
2139
+ args: Prisma.RateLimitScopeUpdateManyArgs<ExtArgs>
2140
+ result: BatchPayload
2141
+ }
2142
+ upsert: {
2143
+ args: Prisma.RateLimitScopeUpsertArgs<ExtArgs>
2144
+ result: $Utils.PayloadToResult<Prisma.$RateLimitScopePayload>
2145
+ }
2146
+ aggregate: {
2147
+ args: Prisma.RateLimitScopeAggregateArgs<ExtArgs>
2148
+ result: $Utils.Optional<AggregateRateLimitScope>
2149
+ }
2150
+ groupBy: {
2151
+ args: Prisma.RateLimitScopeGroupByArgs<ExtArgs>
2152
+ result: $Utils.Optional<RateLimitScopeGroupByOutputType>[]
2153
+ }
2154
+ findRaw: {
2155
+ args: Prisma.RateLimitScopeFindRawArgs<ExtArgs>
2156
+ result: JsonObject
2157
+ }
2158
+ aggregateRaw: {
2159
+ args: Prisma.RateLimitScopeAggregateRawArgs<ExtArgs>
2160
+ result: JsonObject
2161
+ }
2162
+ count: {
2163
+ args: Prisma.RateLimitScopeCountArgs<ExtArgs>
2164
+ result: $Utils.Optional<RateLimitScopeCountAggregateOutputType> | number
2165
+ }
2166
+ }
2167
+ }
2075
2168
  }
2076
2169
  } & {
2077
2170
  other: {
@@ -2167,6 +2260,7 @@ export namespace Prisma {
2167
2260
  adminScriptExecution?: AdminScriptExecutionOmit
2168
2261
  scriptSchedule?: ScriptScheduleOmit
2169
2262
  usageCounter?: UsageCounterOmit
2263
+ rateLimitScope?: RateLimitScopeOmit
2170
2264
  }
2171
2265
 
2172
2266
  /* Types for Logging */
@@ -19040,143 +19134,1109 @@ export namespace Prisma {
19040
19134
 
19041
19135
 
19042
19136
  /**
19043
- * Enums
19137
+ * Model RateLimitScope
19044
19138
  */
19045
19139
 
19046
- export const UserScalarFieldEnum: {
19047
- id: 'id',
19048
- type: 'type',
19049
- createdAt: 'createdAt',
19050
- updatedAt: 'updatedAt',
19051
- email: 'email',
19052
- username: 'username',
19053
- hashword: 'hashword',
19054
- appUserId: 'appUserId',
19055
- organizationId: 'organizationId',
19056
- appOrgId: 'appOrgId',
19057
- name: 'name'
19058
- };
19140
+ export type AggregateRateLimitScope = {
19141
+ _count: RateLimitScopeCountAggregateOutputType | null
19142
+ _avg: RateLimitScopeAvgAggregateOutputType | null
19143
+ _sum: RateLimitScopeSumAggregateOutputType | null
19144
+ _min: RateLimitScopeMinAggregateOutputType | null
19145
+ _max: RateLimitScopeMaxAggregateOutputType | null
19146
+ }
19059
19147
 
19060
- export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum]
19148
+ export type RateLimitScopeAvgAggregateOutputType = {
19149
+ nextSlotMs: number | null
19150
+ }
19061
19151
 
19152
+ export type RateLimitScopeSumAggregateOutputType = {
19153
+ nextSlotMs: number | null
19154
+ }
19062
19155
 
19063
- export const TokenScalarFieldEnum: {
19064
- id: 'id',
19065
- token: 'token',
19066
- created: 'created',
19067
- expires: 'expires',
19068
- userId: 'userId'
19069
- };
19156
+ export type RateLimitScopeMinAggregateOutputType = {
19157
+ scopeKey: string | null
19158
+ blockedUntil: Date | null
19159
+ nextSlotMs: number | null
19160
+ createdAt: Date | null
19161
+ updatedAt: Date | null
19162
+ }
19070
19163
 
19071
- export type TokenScalarFieldEnum = (typeof TokenScalarFieldEnum)[keyof typeof TokenScalarFieldEnum]
19164
+ export type RateLimitScopeMaxAggregateOutputType = {
19165
+ scopeKey: string | null
19166
+ blockedUntil: Date | null
19167
+ nextSlotMs: number | null
19168
+ createdAt: Date | null
19169
+ updatedAt: Date | null
19170
+ }
19072
19171
 
19172
+ export type RateLimitScopeCountAggregateOutputType = {
19173
+ scopeKey: number
19174
+ blockedUntil: number
19175
+ nextSlotMs: number
19176
+ createdAt: number
19177
+ updatedAt: number
19178
+ _all: number
19179
+ }
19073
19180
 
19074
- export const CredentialScalarFieldEnum: {
19075
- id: 'id',
19076
- userId: 'userId',
19077
- authIsValid: 'authIsValid',
19078
- externalId: 'externalId',
19079
- data: 'data',
19080
- createdAt: 'createdAt',
19081
- updatedAt: 'updatedAt'
19082
- };
19083
19181
 
19084
- export type CredentialScalarFieldEnum = (typeof CredentialScalarFieldEnum)[keyof typeof CredentialScalarFieldEnum]
19182
+ export type RateLimitScopeAvgAggregateInputType = {
19183
+ nextSlotMs?: true
19184
+ }
19085
19185
 
19186
+ export type RateLimitScopeSumAggregateInputType = {
19187
+ nextSlotMs?: true
19188
+ }
19086
19189
 
19087
- export const EntityScalarFieldEnum: {
19088
- id: 'id',
19089
- credentialId: 'credentialId',
19090
- userId: 'userId',
19091
- name: 'name',
19092
- moduleName: 'moduleName',
19093
- externalId: 'externalId',
19094
- data: 'data',
19095
- createdAt: 'createdAt',
19096
- updatedAt: 'updatedAt',
19097
- integrationIds: 'integrationIds',
19098
- syncIds: 'syncIds'
19099
- };
19190
+ export type RateLimitScopeMinAggregateInputType = {
19191
+ scopeKey?: true
19192
+ blockedUntil?: true
19193
+ nextSlotMs?: true
19194
+ createdAt?: true
19195
+ updatedAt?: true
19196
+ }
19100
19197
 
19101
- export type EntityScalarFieldEnum = (typeof EntityScalarFieldEnum)[keyof typeof EntityScalarFieldEnum]
19198
+ export type RateLimitScopeMaxAggregateInputType = {
19199
+ scopeKey?: true
19200
+ blockedUntil?: true
19201
+ nextSlotMs?: true
19202
+ createdAt?: true
19203
+ updatedAt?: true
19204
+ }
19102
19205
 
19206
+ export type RateLimitScopeCountAggregateInputType = {
19207
+ scopeKey?: true
19208
+ blockedUntil?: true
19209
+ nextSlotMs?: true
19210
+ createdAt?: true
19211
+ updatedAt?: true
19212
+ _all?: true
19213
+ }
19103
19214
 
19104
- export const IntegrationScalarFieldEnum: {
19105
- id: 'id',
19106
- userId: 'userId',
19107
- status: 'status',
19108
- config: 'config',
19109
- version: 'version',
19110
- entityIds: 'entityIds',
19111
- errors: 'errors',
19112
- warnings: 'warnings',
19113
- info: 'info',
19114
- logs: 'logs',
19115
- createdAt: 'createdAt',
19116
- updatedAt: 'updatedAt'
19117
- };
19215
+ export type RateLimitScopeAggregateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
19216
+ /**
19217
+ * Filter which RateLimitScope to aggregate.
19218
+ */
19219
+ where?: RateLimitScopeWhereInput
19220
+ /**
19221
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
19222
+ *
19223
+ * Determine the order of RateLimitScopes to fetch.
19224
+ */
19225
+ orderBy?: RateLimitScopeOrderByWithRelationInput | RateLimitScopeOrderByWithRelationInput[]
19226
+ /**
19227
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
19228
+ *
19229
+ * Sets the start position
19230
+ */
19231
+ cursor?: RateLimitScopeWhereUniqueInput
19232
+ /**
19233
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
19234
+ *
19235
+ * Take `±n` RateLimitScopes from the position of the cursor.
19236
+ */
19237
+ take?: number
19238
+ /**
19239
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
19240
+ *
19241
+ * Skip the first `n` RateLimitScopes.
19242
+ */
19243
+ skip?: number
19244
+ /**
19245
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
19246
+ *
19247
+ * Count returned RateLimitScopes
19248
+ **/
19249
+ _count?: true | RateLimitScopeCountAggregateInputType
19250
+ /**
19251
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
19252
+ *
19253
+ * Select which fields to average
19254
+ **/
19255
+ _avg?: RateLimitScopeAvgAggregateInputType
19256
+ /**
19257
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
19258
+ *
19259
+ * Select which fields to sum
19260
+ **/
19261
+ _sum?: RateLimitScopeSumAggregateInputType
19262
+ /**
19263
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
19264
+ *
19265
+ * Select which fields to find the minimum value
19266
+ **/
19267
+ _min?: RateLimitScopeMinAggregateInputType
19268
+ /**
19269
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
19270
+ *
19271
+ * Select which fields to find the maximum value
19272
+ **/
19273
+ _max?: RateLimitScopeMaxAggregateInputType
19274
+ }
19118
19275
 
19119
- export type IntegrationScalarFieldEnum = (typeof IntegrationScalarFieldEnum)[keyof typeof IntegrationScalarFieldEnum]
19276
+ export type GetRateLimitScopeAggregateType<T extends RateLimitScopeAggregateArgs> = {
19277
+ [P in keyof T & keyof AggregateRateLimitScope]: P extends '_count' | 'count'
19278
+ ? T[P] extends true
19279
+ ? number
19280
+ : GetScalarType<T[P], AggregateRateLimitScope[P]>
19281
+ : GetScalarType<T[P], AggregateRateLimitScope[P]>
19282
+ }
19120
19283
 
19121
19284
 
19122
- export const IntegrationMappingScalarFieldEnum: {
19123
- id: 'id',
19124
- integrationId: 'integrationId',
19125
- sourceId: 'sourceId',
19126
- mapping: 'mapping',
19127
- createdAt: 'createdAt',
19128
- updatedAt: 'updatedAt'
19129
- };
19130
19285
 
19131
- export type IntegrationMappingScalarFieldEnum = (typeof IntegrationMappingScalarFieldEnum)[keyof typeof IntegrationMappingScalarFieldEnum]
19132
19286
 
19287
+ export type RateLimitScopeGroupByArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
19288
+ where?: RateLimitScopeWhereInput
19289
+ orderBy?: RateLimitScopeOrderByWithAggregationInput | RateLimitScopeOrderByWithAggregationInput[]
19290
+ by: RateLimitScopeScalarFieldEnum[] | RateLimitScopeScalarFieldEnum
19291
+ having?: RateLimitScopeScalarWhereWithAggregatesInput
19292
+ take?: number
19293
+ skip?: number
19294
+ _count?: RateLimitScopeCountAggregateInputType | true
19295
+ _avg?: RateLimitScopeAvgAggregateInputType
19296
+ _sum?: RateLimitScopeSumAggregateInputType
19297
+ _min?: RateLimitScopeMinAggregateInputType
19298
+ _max?: RateLimitScopeMaxAggregateInputType
19299
+ }
19133
19300
 
19134
- export const ProcessScalarFieldEnum: {
19135
- id: 'id',
19136
- userId: 'userId',
19137
- integrationId: 'integrationId',
19138
- name: 'name',
19139
- type: 'type',
19140
- state: 'state',
19141
- context: 'context',
19142
- results: 'results',
19143
- childProcesses: 'childProcesses',
19144
- parentProcessId: 'parentProcessId',
19145
- createdAt: 'createdAt',
19146
- updatedAt: 'updatedAt'
19147
- };
19301
+ export type RateLimitScopeGroupByOutputType = {
19302
+ scopeKey: string
19303
+ blockedUntil: Date | null
19304
+ nextSlotMs: number | null
19305
+ createdAt: Date
19306
+ updatedAt: Date
19307
+ _count: RateLimitScopeCountAggregateOutputType | null
19308
+ _avg: RateLimitScopeAvgAggregateOutputType | null
19309
+ _sum: RateLimitScopeSumAggregateOutputType | null
19310
+ _min: RateLimitScopeMinAggregateOutputType | null
19311
+ _max: RateLimitScopeMaxAggregateOutputType | null
19312
+ }
19148
19313
 
19149
- export type ProcessScalarFieldEnum = (typeof ProcessScalarFieldEnum)[keyof typeof ProcessScalarFieldEnum]
19314
+ type GetRateLimitScopeGroupByPayload<T extends RateLimitScopeGroupByArgs> = Prisma.PrismaPromise<
19315
+ Array<
19316
+ PickEnumerable<RateLimitScopeGroupByOutputType, T['by']> &
19317
+ {
19318
+ [P in ((keyof T) & (keyof RateLimitScopeGroupByOutputType))]: P extends '_count'
19319
+ ? T[P] extends boolean
19320
+ ? number
19321
+ : GetScalarType<T[P], RateLimitScopeGroupByOutputType[P]>
19322
+ : GetScalarType<T[P], RateLimitScopeGroupByOutputType[P]>
19323
+ }
19324
+ >
19325
+ >
19150
19326
 
19151
19327
 
19152
- export const SyncScalarFieldEnum: {
19153
- id: 'id',
19154
- integrationId: 'integrationId',
19155
- entityIds: 'entityIds',
19156
- hash: 'hash',
19157
- name: 'name'
19158
- };
19328
+ export type RateLimitScopeSelect<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetSelect<{
19329
+ scopeKey?: boolean
19330
+ blockedUntil?: boolean
19331
+ nextSlotMs?: boolean
19332
+ createdAt?: boolean
19333
+ updatedAt?: boolean
19334
+ }, ExtArgs["result"]["rateLimitScope"]>
19159
19335
 
19160
- export type SyncScalarFieldEnum = (typeof SyncScalarFieldEnum)[keyof typeof SyncScalarFieldEnum]
19161
19336
 
19162
19337
 
19163
- export const DataIdentifierScalarFieldEnum: {
19164
- id: 'id',
19165
- syncId: 'syncId',
19166
- entityId: 'entityId',
19167
- idData: 'idData',
19168
- hash: 'hash'
19169
- };
19338
+ export type RateLimitScopeSelectScalar = {
19339
+ scopeKey?: boolean
19340
+ blockedUntil?: boolean
19341
+ nextSlotMs?: boolean
19342
+ createdAt?: boolean
19343
+ updatedAt?: boolean
19344
+ }
19170
19345
 
19171
- export type DataIdentifierScalarFieldEnum = (typeof DataIdentifierScalarFieldEnum)[keyof typeof DataIdentifierScalarFieldEnum]
19346
+ export type RateLimitScopeOmit<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = $Extensions.GetOmit<"scopeKey" | "blockedUntil" | "nextSlotMs" | "createdAt" | "updatedAt", ExtArgs["result"]["rateLimitScope"]>
19172
19347
 
19348
+ export type $RateLimitScopePayload<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
19349
+ name: "RateLimitScope"
19350
+ objects: {}
19351
+ scalars: $Extensions.GetPayloadResult<{
19352
+ scopeKey: string
19353
+ blockedUntil: Date | null
19354
+ nextSlotMs: number | null
19355
+ createdAt: Date
19356
+ updatedAt: Date
19357
+ }, ExtArgs["result"]["rateLimitScope"]>
19358
+ composites: {}
19359
+ }
19173
19360
 
19174
- export const AssociationScalarFieldEnum: {
19175
- id: 'id',
19176
- integrationId: 'integrationId',
19177
- name: 'name',
19178
- type: 'type',
19179
- primaryObject: 'primaryObject'
19361
+ type RateLimitScopeGetPayload<S extends boolean | null | undefined | RateLimitScopeDefaultArgs> = $Result.GetResult<Prisma.$RateLimitScopePayload, S>
19362
+
19363
+ type RateLimitScopeCountArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
19364
+ Omit<RateLimitScopeFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
19365
+ select?: RateLimitScopeCountAggregateInputType | true
19366
+ }
19367
+
19368
+ export interface RateLimitScopeDelegate<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> {
19369
+ [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['RateLimitScope'], meta: { name: 'RateLimitScope' } }
19370
+ /**
19371
+ * Find zero or one RateLimitScope that matches the filter.
19372
+ * @param {RateLimitScopeFindUniqueArgs} args - Arguments to find a RateLimitScope
19373
+ * @example
19374
+ * // Get one RateLimitScope
19375
+ * const rateLimitScope = await prisma.rateLimitScope.findUnique({
19376
+ * where: {
19377
+ * // ... provide filter here
19378
+ * }
19379
+ * })
19380
+ */
19381
+ findUnique<T extends RateLimitScopeFindUniqueArgs>(args: SelectSubset<T, RateLimitScopeFindUniqueArgs<ExtArgs>>): Prisma__RateLimitScopeClient<$Result.GetResult<Prisma.$RateLimitScopePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
19382
+
19383
+ /**
19384
+ * Find one RateLimitScope that matches the filter or throw an error with `error.code='P2025'`
19385
+ * if no matches were found.
19386
+ * @param {RateLimitScopeFindUniqueOrThrowArgs} args - Arguments to find a RateLimitScope
19387
+ * @example
19388
+ * // Get one RateLimitScope
19389
+ * const rateLimitScope = await prisma.rateLimitScope.findUniqueOrThrow({
19390
+ * where: {
19391
+ * // ... provide filter here
19392
+ * }
19393
+ * })
19394
+ */
19395
+ findUniqueOrThrow<T extends RateLimitScopeFindUniqueOrThrowArgs>(args: SelectSubset<T, RateLimitScopeFindUniqueOrThrowArgs<ExtArgs>>): Prisma__RateLimitScopeClient<$Result.GetResult<Prisma.$RateLimitScopePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
19396
+
19397
+ /**
19398
+ * Find the first RateLimitScope that matches the filter.
19399
+ * Note, that providing `undefined` is treated as the value not being there.
19400
+ * Read more here: https://pris.ly/d/null-undefined
19401
+ * @param {RateLimitScopeFindFirstArgs} args - Arguments to find a RateLimitScope
19402
+ * @example
19403
+ * // Get one RateLimitScope
19404
+ * const rateLimitScope = await prisma.rateLimitScope.findFirst({
19405
+ * where: {
19406
+ * // ... provide filter here
19407
+ * }
19408
+ * })
19409
+ */
19410
+ findFirst<T extends RateLimitScopeFindFirstArgs>(args?: SelectSubset<T, RateLimitScopeFindFirstArgs<ExtArgs>>): Prisma__RateLimitScopeClient<$Result.GetResult<Prisma.$RateLimitScopePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
19411
+
19412
+ /**
19413
+ * Find the first RateLimitScope that matches the filter or
19414
+ * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
19415
+ * Note, that providing `undefined` is treated as the value not being there.
19416
+ * Read more here: https://pris.ly/d/null-undefined
19417
+ * @param {RateLimitScopeFindFirstOrThrowArgs} args - Arguments to find a RateLimitScope
19418
+ * @example
19419
+ * // Get one RateLimitScope
19420
+ * const rateLimitScope = await prisma.rateLimitScope.findFirstOrThrow({
19421
+ * where: {
19422
+ * // ... provide filter here
19423
+ * }
19424
+ * })
19425
+ */
19426
+ findFirstOrThrow<T extends RateLimitScopeFindFirstOrThrowArgs>(args?: SelectSubset<T, RateLimitScopeFindFirstOrThrowArgs<ExtArgs>>): Prisma__RateLimitScopeClient<$Result.GetResult<Prisma.$RateLimitScopePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
19427
+
19428
+ /**
19429
+ * Find zero or more RateLimitScopes that matches the filter.
19430
+ * Note, that providing `undefined` is treated as the value not being there.
19431
+ * Read more here: https://pris.ly/d/null-undefined
19432
+ * @param {RateLimitScopeFindManyArgs} args - Arguments to filter and select certain fields only.
19433
+ * @example
19434
+ * // Get all RateLimitScopes
19435
+ * const rateLimitScopes = await prisma.rateLimitScope.findMany()
19436
+ *
19437
+ * // Get first 10 RateLimitScopes
19438
+ * const rateLimitScopes = await prisma.rateLimitScope.findMany({ take: 10 })
19439
+ *
19440
+ * // Only select the `scopeKey`
19441
+ * const rateLimitScopeWithScopeKeyOnly = await prisma.rateLimitScope.findMany({ select: { scopeKey: true } })
19442
+ *
19443
+ */
19444
+ findMany<T extends RateLimitScopeFindManyArgs>(args?: SelectSubset<T, RateLimitScopeFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<$Result.GetResult<Prisma.$RateLimitScopePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
19445
+
19446
+ /**
19447
+ * Create a RateLimitScope.
19448
+ * @param {RateLimitScopeCreateArgs} args - Arguments to create a RateLimitScope.
19449
+ * @example
19450
+ * // Create one RateLimitScope
19451
+ * const RateLimitScope = await prisma.rateLimitScope.create({
19452
+ * data: {
19453
+ * // ... data to create a RateLimitScope
19454
+ * }
19455
+ * })
19456
+ *
19457
+ */
19458
+ create<T extends RateLimitScopeCreateArgs>(args: SelectSubset<T, RateLimitScopeCreateArgs<ExtArgs>>): Prisma__RateLimitScopeClient<$Result.GetResult<Prisma.$RateLimitScopePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
19459
+
19460
+ /**
19461
+ * Create many RateLimitScopes.
19462
+ * @param {RateLimitScopeCreateManyArgs} args - Arguments to create many RateLimitScopes.
19463
+ * @example
19464
+ * // Create many RateLimitScopes
19465
+ * const rateLimitScope = await prisma.rateLimitScope.createMany({
19466
+ * data: [
19467
+ * // ... provide data here
19468
+ * ]
19469
+ * })
19470
+ *
19471
+ */
19472
+ createMany<T extends RateLimitScopeCreateManyArgs>(args?: SelectSubset<T, RateLimitScopeCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
19473
+
19474
+ /**
19475
+ * Delete a RateLimitScope.
19476
+ * @param {RateLimitScopeDeleteArgs} args - Arguments to delete one RateLimitScope.
19477
+ * @example
19478
+ * // Delete one RateLimitScope
19479
+ * const RateLimitScope = await prisma.rateLimitScope.delete({
19480
+ * where: {
19481
+ * // ... filter to delete one RateLimitScope
19482
+ * }
19483
+ * })
19484
+ *
19485
+ */
19486
+ delete<T extends RateLimitScopeDeleteArgs>(args: SelectSubset<T, RateLimitScopeDeleteArgs<ExtArgs>>): Prisma__RateLimitScopeClient<$Result.GetResult<Prisma.$RateLimitScopePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
19487
+
19488
+ /**
19489
+ * Update one RateLimitScope.
19490
+ * @param {RateLimitScopeUpdateArgs} args - Arguments to update one RateLimitScope.
19491
+ * @example
19492
+ * // Update one RateLimitScope
19493
+ * const rateLimitScope = await prisma.rateLimitScope.update({
19494
+ * where: {
19495
+ * // ... provide filter here
19496
+ * },
19497
+ * data: {
19498
+ * // ... provide data here
19499
+ * }
19500
+ * })
19501
+ *
19502
+ */
19503
+ update<T extends RateLimitScopeUpdateArgs>(args: SelectSubset<T, RateLimitScopeUpdateArgs<ExtArgs>>): Prisma__RateLimitScopeClient<$Result.GetResult<Prisma.$RateLimitScopePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
19504
+
19505
+ /**
19506
+ * Delete zero or more RateLimitScopes.
19507
+ * @param {RateLimitScopeDeleteManyArgs} args - Arguments to filter RateLimitScopes to delete.
19508
+ * @example
19509
+ * // Delete a few RateLimitScopes
19510
+ * const { count } = await prisma.rateLimitScope.deleteMany({
19511
+ * where: {
19512
+ * // ... provide filter here
19513
+ * }
19514
+ * })
19515
+ *
19516
+ */
19517
+ deleteMany<T extends RateLimitScopeDeleteManyArgs>(args?: SelectSubset<T, RateLimitScopeDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
19518
+
19519
+ /**
19520
+ * Update zero or more RateLimitScopes.
19521
+ * Note, that providing `undefined` is treated as the value not being there.
19522
+ * Read more here: https://pris.ly/d/null-undefined
19523
+ * @param {RateLimitScopeUpdateManyArgs} args - Arguments to update one or more rows.
19524
+ * @example
19525
+ * // Update many RateLimitScopes
19526
+ * const rateLimitScope = await prisma.rateLimitScope.updateMany({
19527
+ * where: {
19528
+ * // ... provide filter here
19529
+ * },
19530
+ * data: {
19531
+ * // ... provide data here
19532
+ * }
19533
+ * })
19534
+ *
19535
+ */
19536
+ updateMany<T extends RateLimitScopeUpdateManyArgs>(args: SelectSubset<T, RateLimitScopeUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<BatchPayload>
19537
+
19538
+ /**
19539
+ * Create or update one RateLimitScope.
19540
+ * @param {RateLimitScopeUpsertArgs} args - Arguments to update or create a RateLimitScope.
19541
+ * @example
19542
+ * // Update or create a RateLimitScope
19543
+ * const rateLimitScope = await prisma.rateLimitScope.upsert({
19544
+ * create: {
19545
+ * // ... data to create a RateLimitScope
19546
+ * },
19547
+ * update: {
19548
+ * // ... in case it already exists, update
19549
+ * },
19550
+ * where: {
19551
+ * // ... the filter for the RateLimitScope we want to update
19552
+ * }
19553
+ * })
19554
+ */
19555
+ upsert<T extends RateLimitScopeUpsertArgs>(args: SelectSubset<T, RateLimitScopeUpsertArgs<ExtArgs>>): Prisma__RateLimitScopeClient<$Result.GetResult<Prisma.$RateLimitScopePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
19556
+
19557
+ /**
19558
+ * Find zero or more RateLimitScopes that matches the filter.
19559
+ * @param {RateLimitScopeFindRawArgs} args - Select which filters you would like to apply.
19560
+ * @example
19561
+ * const rateLimitScope = await prisma.rateLimitScope.findRaw({
19562
+ * filter: { age: { $gt: 25 } }
19563
+ * })
19564
+ */
19565
+ findRaw(args?: RateLimitScopeFindRawArgs): Prisma.PrismaPromise<JsonObject>
19566
+
19567
+ /**
19568
+ * Perform aggregation operations on a RateLimitScope.
19569
+ * @param {RateLimitScopeAggregateRawArgs} args - Select which aggregations you would like to apply.
19570
+ * @example
19571
+ * const rateLimitScope = await prisma.rateLimitScope.aggregateRaw({
19572
+ * pipeline: [
19573
+ * { $match: { status: "registered" } },
19574
+ * { $group: { _id: "$country", total: { $sum: 1 } } }
19575
+ * ]
19576
+ * })
19577
+ */
19578
+ aggregateRaw(args?: RateLimitScopeAggregateRawArgs): Prisma.PrismaPromise<JsonObject>
19579
+
19580
+
19581
+ /**
19582
+ * Count the number of RateLimitScopes.
19583
+ * Note, that providing `undefined` is treated as the value not being there.
19584
+ * Read more here: https://pris.ly/d/null-undefined
19585
+ * @param {RateLimitScopeCountArgs} args - Arguments to filter RateLimitScopes to count.
19586
+ * @example
19587
+ * // Count the number of RateLimitScopes
19588
+ * const count = await prisma.rateLimitScope.count({
19589
+ * where: {
19590
+ * // ... the filter for the RateLimitScopes we want to count
19591
+ * }
19592
+ * })
19593
+ **/
19594
+ count<T extends RateLimitScopeCountArgs>(
19595
+ args?: Subset<T, RateLimitScopeCountArgs>,
19596
+ ): Prisma.PrismaPromise<
19597
+ T extends $Utils.Record<'select', any>
19598
+ ? T['select'] extends true
19599
+ ? number
19600
+ : GetScalarType<T['select'], RateLimitScopeCountAggregateOutputType>
19601
+ : number
19602
+ >
19603
+
19604
+ /**
19605
+ * Allows you to perform aggregations operations on a RateLimitScope.
19606
+ * Note, that providing `undefined` is treated as the value not being there.
19607
+ * Read more here: https://pris.ly/d/null-undefined
19608
+ * @param {RateLimitScopeAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
19609
+ * @example
19610
+ * // Ordered by age ascending
19611
+ * // Where email contains prisma.io
19612
+ * // Limited to the 10 users
19613
+ * const aggregations = await prisma.user.aggregate({
19614
+ * _avg: {
19615
+ * age: true,
19616
+ * },
19617
+ * where: {
19618
+ * email: {
19619
+ * contains: "prisma.io",
19620
+ * },
19621
+ * },
19622
+ * orderBy: {
19623
+ * age: "asc",
19624
+ * },
19625
+ * take: 10,
19626
+ * })
19627
+ **/
19628
+ aggregate<T extends RateLimitScopeAggregateArgs>(args: Subset<T, RateLimitScopeAggregateArgs>): Prisma.PrismaPromise<GetRateLimitScopeAggregateType<T>>
19629
+
19630
+ /**
19631
+ * Group by RateLimitScope.
19632
+ * Note, that providing `undefined` is treated as the value not being there.
19633
+ * Read more here: https://pris.ly/d/null-undefined
19634
+ * @param {RateLimitScopeGroupByArgs} args - Group by arguments.
19635
+ * @example
19636
+ * // Group by city, order by createdAt, get count
19637
+ * const result = await prisma.user.groupBy({
19638
+ * by: ['city', 'createdAt'],
19639
+ * orderBy: {
19640
+ * createdAt: true
19641
+ * },
19642
+ * _count: {
19643
+ * _all: true
19644
+ * },
19645
+ * })
19646
+ *
19647
+ **/
19648
+ groupBy<
19649
+ T extends RateLimitScopeGroupByArgs,
19650
+ HasSelectOrTake extends Or<
19651
+ Extends<'skip', Keys<T>>,
19652
+ Extends<'take', Keys<T>>
19653
+ >,
19654
+ OrderByArg extends True extends HasSelectOrTake
19655
+ ? { orderBy: RateLimitScopeGroupByArgs['orderBy'] }
19656
+ : { orderBy?: RateLimitScopeGroupByArgs['orderBy'] },
19657
+ OrderFields extends ExcludeUnderscoreKeys<Keys<MaybeTupleToUnion<T['orderBy']>>>,
19658
+ ByFields extends MaybeTupleToUnion<T['by']>,
19659
+ ByValid extends Has<ByFields, OrderFields>,
19660
+ HavingFields extends GetHavingFields<T['having']>,
19661
+ HavingValid extends Has<ByFields, HavingFields>,
19662
+ ByEmpty extends T['by'] extends never[] ? True : False,
19663
+ InputErrors extends ByEmpty extends True
19664
+ ? `Error: "by" must not be empty.`
19665
+ : HavingValid extends False
19666
+ ? {
19667
+ [P in HavingFields]: P extends ByFields
19668
+ ? never
19669
+ : P extends string
19670
+ ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
19671
+ : [
19672
+ Error,
19673
+ 'Field ',
19674
+ P,
19675
+ ` in "having" needs to be provided in "by"`,
19676
+ ]
19677
+ }[HavingFields]
19678
+ : 'take' extends Keys<T>
19679
+ ? 'orderBy' extends Keys<T>
19680
+ ? ByValid extends True
19681
+ ? {}
19682
+ : {
19683
+ [P in OrderFields]: P extends ByFields
19684
+ ? never
19685
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
19686
+ }[OrderFields]
19687
+ : 'Error: If you provide "take", you also need to provide "orderBy"'
19688
+ : 'skip' extends Keys<T>
19689
+ ? 'orderBy' extends Keys<T>
19690
+ ? ByValid extends True
19691
+ ? {}
19692
+ : {
19693
+ [P in OrderFields]: P extends ByFields
19694
+ ? never
19695
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
19696
+ }[OrderFields]
19697
+ : 'Error: If you provide "skip", you also need to provide "orderBy"'
19698
+ : ByValid extends True
19699
+ ? {}
19700
+ : {
19701
+ [P in OrderFields]: P extends ByFields
19702
+ ? never
19703
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
19704
+ }[OrderFields]
19705
+ >(args: SubsetIntersection<T, RateLimitScopeGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetRateLimitScopeGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
19706
+ /**
19707
+ * Fields of the RateLimitScope model
19708
+ */
19709
+ readonly fields: RateLimitScopeFieldRefs;
19710
+ }
19711
+
19712
+ /**
19713
+ * The delegate class that acts as a "Promise-like" for RateLimitScope.
19714
+ * Why is this prefixed with `Prisma__`?
19715
+ * Because we want to prevent naming conflicts as mentioned in
19716
+ * https://github.com/prisma/prisma-client-js/issues/707
19717
+ */
19718
+ export interface Prisma__RateLimitScopeClient<T, Null = never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
19719
+ readonly [Symbol.toStringTag]: "PrismaPromise"
19720
+ /**
19721
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
19722
+ * @param onfulfilled The callback to execute when the Promise is resolved.
19723
+ * @param onrejected The callback to execute when the Promise is rejected.
19724
+ * @returns A Promise for the completion of which ever callback is executed.
19725
+ */
19726
+ then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): $Utils.JsPromise<TResult1 | TResult2>
19727
+ /**
19728
+ * Attaches a callback for only the rejection of the Promise.
19729
+ * @param onrejected The callback to execute when the Promise is rejected.
19730
+ * @returns A Promise for the completion of the callback.
19731
+ */
19732
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): $Utils.JsPromise<T | TResult>
19733
+ /**
19734
+ * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
19735
+ * resolved value cannot be modified from the callback.
19736
+ * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
19737
+ * @returns A Promise for the completion of the callback.
19738
+ */
19739
+ finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise<T>
19740
+ }
19741
+
19742
+
19743
+
19744
+
19745
+ /**
19746
+ * Fields of the RateLimitScope model
19747
+ */
19748
+ interface RateLimitScopeFieldRefs {
19749
+ readonly scopeKey: FieldRef<"RateLimitScope", 'String'>
19750
+ readonly blockedUntil: FieldRef<"RateLimitScope", 'DateTime'>
19751
+ readonly nextSlotMs: FieldRef<"RateLimitScope", 'Float'>
19752
+ readonly createdAt: FieldRef<"RateLimitScope", 'DateTime'>
19753
+ readonly updatedAt: FieldRef<"RateLimitScope", 'DateTime'>
19754
+ }
19755
+
19756
+
19757
+ // Custom InputTypes
19758
+ /**
19759
+ * RateLimitScope findUnique
19760
+ */
19761
+ export type RateLimitScopeFindUniqueArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
19762
+ /**
19763
+ * Select specific fields to fetch from the RateLimitScope
19764
+ */
19765
+ select?: RateLimitScopeSelect<ExtArgs> | null
19766
+ /**
19767
+ * Omit specific fields from the RateLimitScope
19768
+ */
19769
+ omit?: RateLimitScopeOmit<ExtArgs> | null
19770
+ /**
19771
+ * Filter, which RateLimitScope to fetch.
19772
+ */
19773
+ where: RateLimitScopeWhereUniqueInput
19774
+ }
19775
+
19776
+ /**
19777
+ * RateLimitScope findUniqueOrThrow
19778
+ */
19779
+ export type RateLimitScopeFindUniqueOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
19780
+ /**
19781
+ * Select specific fields to fetch from the RateLimitScope
19782
+ */
19783
+ select?: RateLimitScopeSelect<ExtArgs> | null
19784
+ /**
19785
+ * Omit specific fields from the RateLimitScope
19786
+ */
19787
+ omit?: RateLimitScopeOmit<ExtArgs> | null
19788
+ /**
19789
+ * Filter, which RateLimitScope to fetch.
19790
+ */
19791
+ where: RateLimitScopeWhereUniqueInput
19792
+ }
19793
+
19794
+ /**
19795
+ * RateLimitScope findFirst
19796
+ */
19797
+ export type RateLimitScopeFindFirstArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
19798
+ /**
19799
+ * Select specific fields to fetch from the RateLimitScope
19800
+ */
19801
+ select?: RateLimitScopeSelect<ExtArgs> | null
19802
+ /**
19803
+ * Omit specific fields from the RateLimitScope
19804
+ */
19805
+ omit?: RateLimitScopeOmit<ExtArgs> | null
19806
+ /**
19807
+ * Filter, which RateLimitScope to fetch.
19808
+ */
19809
+ where?: RateLimitScopeWhereInput
19810
+ /**
19811
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
19812
+ *
19813
+ * Determine the order of RateLimitScopes to fetch.
19814
+ */
19815
+ orderBy?: RateLimitScopeOrderByWithRelationInput | RateLimitScopeOrderByWithRelationInput[]
19816
+ /**
19817
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
19818
+ *
19819
+ * Sets the position for searching for RateLimitScopes.
19820
+ */
19821
+ cursor?: RateLimitScopeWhereUniqueInput
19822
+ /**
19823
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
19824
+ *
19825
+ * Take `±n` RateLimitScopes from the position of the cursor.
19826
+ */
19827
+ take?: number
19828
+ /**
19829
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
19830
+ *
19831
+ * Skip the first `n` RateLimitScopes.
19832
+ */
19833
+ skip?: number
19834
+ /**
19835
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
19836
+ *
19837
+ * Filter by unique combinations of RateLimitScopes.
19838
+ */
19839
+ distinct?: RateLimitScopeScalarFieldEnum | RateLimitScopeScalarFieldEnum[]
19840
+ }
19841
+
19842
+ /**
19843
+ * RateLimitScope findFirstOrThrow
19844
+ */
19845
+ export type RateLimitScopeFindFirstOrThrowArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
19846
+ /**
19847
+ * Select specific fields to fetch from the RateLimitScope
19848
+ */
19849
+ select?: RateLimitScopeSelect<ExtArgs> | null
19850
+ /**
19851
+ * Omit specific fields from the RateLimitScope
19852
+ */
19853
+ omit?: RateLimitScopeOmit<ExtArgs> | null
19854
+ /**
19855
+ * Filter, which RateLimitScope to fetch.
19856
+ */
19857
+ where?: RateLimitScopeWhereInput
19858
+ /**
19859
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
19860
+ *
19861
+ * Determine the order of RateLimitScopes to fetch.
19862
+ */
19863
+ orderBy?: RateLimitScopeOrderByWithRelationInput | RateLimitScopeOrderByWithRelationInput[]
19864
+ /**
19865
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
19866
+ *
19867
+ * Sets the position for searching for RateLimitScopes.
19868
+ */
19869
+ cursor?: RateLimitScopeWhereUniqueInput
19870
+ /**
19871
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
19872
+ *
19873
+ * Take `±n` RateLimitScopes from the position of the cursor.
19874
+ */
19875
+ take?: number
19876
+ /**
19877
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
19878
+ *
19879
+ * Skip the first `n` RateLimitScopes.
19880
+ */
19881
+ skip?: number
19882
+ /**
19883
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
19884
+ *
19885
+ * Filter by unique combinations of RateLimitScopes.
19886
+ */
19887
+ distinct?: RateLimitScopeScalarFieldEnum | RateLimitScopeScalarFieldEnum[]
19888
+ }
19889
+
19890
+ /**
19891
+ * RateLimitScope findMany
19892
+ */
19893
+ export type RateLimitScopeFindManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
19894
+ /**
19895
+ * Select specific fields to fetch from the RateLimitScope
19896
+ */
19897
+ select?: RateLimitScopeSelect<ExtArgs> | null
19898
+ /**
19899
+ * Omit specific fields from the RateLimitScope
19900
+ */
19901
+ omit?: RateLimitScopeOmit<ExtArgs> | null
19902
+ /**
19903
+ * Filter, which RateLimitScopes to fetch.
19904
+ */
19905
+ where?: RateLimitScopeWhereInput
19906
+ /**
19907
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
19908
+ *
19909
+ * Determine the order of RateLimitScopes to fetch.
19910
+ */
19911
+ orderBy?: RateLimitScopeOrderByWithRelationInput | RateLimitScopeOrderByWithRelationInput[]
19912
+ /**
19913
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
19914
+ *
19915
+ * Sets the position for listing RateLimitScopes.
19916
+ */
19917
+ cursor?: RateLimitScopeWhereUniqueInput
19918
+ /**
19919
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
19920
+ *
19921
+ * Take `±n` RateLimitScopes from the position of the cursor.
19922
+ */
19923
+ take?: number
19924
+ /**
19925
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
19926
+ *
19927
+ * Skip the first `n` RateLimitScopes.
19928
+ */
19929
+ skip?: number
19930
+ distinct?: RateLimitScopeScalarFieldEnum | RateLimitScopeScalarFieldEnum[]
19931
+ }
19932
+
19933
+ /**
19934
+ * RateLimitScope create
19935
+ */
19936
+ export type RateLimitScopeCreateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
19937
+ /**
19938
+ * Select specific fields to fetch from the RateLimitScope
19939
+ */
19940
+ select?: RateLimitScopeSelect<ExtArgs> | null
19941
+ /**
19942
+ * Omit specific fields from the RateLimitScope
19943
+ */
19944
+ omit?: RateLimitScopeOmit<ExtArgs> | null
19945
+ /**
19946
+ * The data needed to create a RateLimitScope.
19947
+ */
19948
+ data: XOR<RateLimitScopeCreateInput, RateLimitScopeUncheckedCreateInput>
19949
+ }
19950
+
19951
+ /**
19952
+ * RateLimitScope createMany
19953
+ */
19954
+ export type RateLimitScopeCreateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
19955
+ /**
19956
+ * The data used to create many RateLimitScopes.
19957
+ */
19958
+ data: RateLimitScopeCreateManyInput | RateLimitScopeCreateManyInput[]
19959
+ }
19960
+
19961
+ /**
19962
+ * RateLimitScope update
19963
+ */
19964
+ export type RateLimitScopeUpdateArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
19965
+ /**
19966
+ * Select specific fields to fetch from the RateLimitScope
19967
+ */
19968
+ select?: RateLimitScopeSelect<ExtArgs> | null
19969
+ /**
19970
+ * Omit specific fields from the RateLimitScope
19971
+ */
19972
+ omit?: RateLimitScopeOmit<ExtArgs> | null
19973
+ /**
19974
+ * The data needed to update a RateLimitScope.
19975
+ */
19976
+ data: XOR<RateLimitScopeUpdateInput, RateLimitScopeUncheckedUpdateInput>
19977
+ /**
19978
+ * Choose, which RateLimitScope to update.
19979
+ */
19980
+ where: RateLimitScopeWhereUniqueInput
19981
+ }
19982
+
19983
+ /**
19984
+ * RateLimitScope updateMany
19985
+ */
19986
+ export type RateLimitScopeUpdateManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
19987
+ /**
19988
+ * The data used to update RateLimitScopes.
19989
+ */
19990
+ data: XOR<RateLimitScopeUpdateManyMutationInput, RateLimitScopeUncheckedUpdateManyInput>
19991
+ /**
19992
+ * Filter which RateLimitScopes to update
19993
+ */
19994
+ where?: RateLimitScopeWhereInput
19995
+ /**
19996
+ * Limit how many RateLimitScopes to update.
19997
+ */
19998
+ limit?: number
19999
+ }
20000
+
20001
+ /**
20002
+ * RateLimitScope upsert
20003
+ */
20004
+ export type RateLimitScopeUpsertArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
20005
+ /**
20006
+ * Select specific fields to fetch from the RateLimitScope
20007
+ */
20008
+ select?: RateLimitScopeSelect<ExtArgs> | null
20009
+ /**
20010
+ * Omit specific fields from the RateLimitScope
20011
+ */
20012
+ omit?: RateLimitScopeOmit<ExtArgs> | null
20013
+ /**
20014
+ * The filter to search for the RateLimitScope to update in case it exists.
20015
+ */
20016
+ where: RateLimitScopeWhereUniqueInput
20017
+ /**
20018
+ * In case the RateLimitScope found by the `where` argument doesn't exist, create a new RateLimitScope with this data.
20019
+ */
20020
+ create: XOR<RateLimitScopeCreateInput, RateLimitScopeUncheckedCreateInput>
20021
+ /**
20022
+ * In case the RateLimitScope was found with the provided `where` argument, update it with this data.
20023
+ */
20024
+ update: XOR<RateLimitScopeUpdateInput, RateLimitScopeUncheckedUpdateInput>
20025
+ }
20026
+
20027
+ /**
20028
+ * RateLimitScope delete
20029
+ */
20030
+ export type RateLimitScopeDeleteArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
20031
+ /**
20032
+ * Select specific fields to fetch from the RateLimitScope
20033
+ */
20034
+ select?: RateLimitScopeSelect<ExtArgs> | null
20035
+ /**
20036
+ * Omit specific fields from the RateLimitScope
20037
+ */
20038
+ omit?: RateLimitScopeOmit<ExtArgs> | null
20039
+ /**
20040
+ * Filter which RateLimitScope to delete.
20041
+ */
20042
+ where: RateLimitScopeWhereUniqueInput
20043
+ }
20044
+
20045
+ /**
20046
+ * RateLimitScope deleteMany
20047
+ */
20048
+ export type RateLimitScopeDeleteManyArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
20049
+ /**
20050
+ * Filter which RateLimitScopes to delete
20051
+ */
20052
+ where?: RateLimitScopeWhereInput
20053
+ /**
20054
+ * Limit how many RateLimitScopes to delete.
20055
+ */
20056
+ limit?: number
20057
+ }
20058
+
20059
+ /**
20060
+ * RateLimitScope findRaw
20061
+ */
20062
+ export type RateLimitScopeFindRawArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
20063
+ /**
20064
+ * The query predicate filter. If unspecified, then all documents in the collection will match the predicate. ${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}.
20065
+ */
20066
+ filter?: InputJsonValue
20067
+ /**
20068
+ * Additional options to pass to the `find` command ${@link https://docs.mongodb.com/manual/reference/command/find/#command-fields MongoDB Docs}.
20069
+ */
20070
+ options?: InputJsonValue
20071
+ }
20072
+
20073
+ /**
20074
+ * RateLimitScope aggregateRaw
20075
+ */
20076
+ export type RateLimitScopeAggregateRawArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
20077
+ /**
20078
+ * An array of aggregation stages to process and transform the document stream via the aggregation pipeline. ${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}.
20079
+ */
20080
+ pipeline?: InputJsonValue[]
20081
+ /**
20082
+ * Additional options to pass to the `aggregate` command ${@link https://docs.mongodb.com/manual/reference/command/aggregate/#command-fields MongoDB Docs}.
20083
+ */
20084
+ options?: InputJsonValue
20085
+ }
20086
+
20087
+ /**
20088
+ * RateLimitScope without action
20089
+ */
20090
+ export type RateLimitScopeDefaultArgs<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
20091
+ /**
20092
+ * Select specific fields to fetch from the RateLimitScope
20093
+ */
20094
+ select?: RateLimitScopeSelect<ExtArgs> | null
20095
+ /**
20096
+ * Omit specific fields from the RateLimitScope
20097
+ */
20098
+ omit?: RateLimitScopeOmit<ExtArgs> | null
20099
+ }
20100
+
20101
+
20102
+ /**
20103
+ * Enums
20104
+ */
20105
+
20106
+ export const UserScalarFieldEnum: {
20107
+ id: 'id',
20108
+ type: 'type',
20109
+ createdAt: 'createdAt',
20110
+ updatedAt: 'updatedAt',
20111
+ email: 'email',
20112
+ username: 'username',
20113
+ hashword: 'hashword',
20114
+ appUserId: 'appUserId',
20115
+ organizationId: 'organizationId',
20116
+ appOrgId: 'appOrgId',
20117
+ name: 'name'
20118
+ };
20119
+
20120
+ export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum]
20121
+
20122
+
20123
+ export const TokenScalarFieldEnum: {
20124
+ id: 'id',
20125
+ token: 'token',
20126
+ created: 'created',
20127
+ expires: 'expires',
20128
+ userId: 'userId'
20129
+ };
20130
+
20131
+ export type TokenScalarFieldEnum = (typeof TokenScalarFieldEnum)[keyof typeof TokenScalarFieldEnum]
20132
+
20133
+
20134
+ export const CredentialScalarFieldEnum: {
20135
+ id: 'id',
20136
+ userId: 'userId',
20137
+ authIsValid: 'authIsValid',
20138
+ externalId: 'externalId',
20139
+ data: 'data',
20140
+ createdAt: 'createdAt',
20141
+ updatedAt: 'updatedAt'
20142
+ };
20143
+
20144
+ export type CredentialScalarFieldEnum = (typeof CredentialScalarFieldEnum)[keyof typeof CredentialScalarFieldEnum]
20145
+
20146
+
20147
+ export const EntityScalarFieldEnum: {
20148
+ id: 'id',
20149
+ credentialId: 'credentialId',
20150
+ userId: 'userId',
20151
+ name: 'name',
20152
+ moduleName: 'moduleName',
20153
+ externalId: 'externalId',
20154
+ data: 'data',
20155
+ createdAt: 'createdAt',
20156
+ updatedAt: 'updatedAt',
20157
+ integrationIds: 'integrationIds',
20158
+ syncIds: 'syncIds'
20159
+ };
20160
+
20161
+ export type EntityScalarFieldEnum = (typeof EntityScalarFieldEnum)[keyof typeof EntityScalarFieldEnum]
20162
+
20163
+
20164
+ export const IntegrationScalarFieldEnum: {
20165
+ id: 'id',
20166
+ userId: 'userId',
20167
+ status: 'status',
20168
+ config: 'config',
20169
+ version: 'version',
20170
+ entityIds: 'entityIds',
20171
+ errors: 'errors',
20172
+ warnings: 'warnings',
20173
+ info: 'info',
20174
+ logs: 'logs',
20175
+ createdAt: 'createdAt',
20176
+ updatedAt: 'updatedAt'
20177
+ };
20178
+
20179
+ export type IntegrationScalarFieldEnum = (typeof IntegrationScalarFieldEnum)[keyof typeof IntegrationScalarFieldEnum]
20180
+
20181
+
20182
+ export const IntegrationMappingScalarFieldEnum: {
20183
+ id: 'id',
20184
+ integrationId: 'integrationId',
20185
+ sourceId: 'sourceId',
20186
+ mapping: 'mapping',
20187
+ createdAt: 'createdAt',
20188
+ updatedAt: 'updatedAt'
20189
+ };
20190
+
20191
+ export type IntegrationMappingScalarFieldEnum = (typeof IntegrationMappingScalarFieldEnum)[keyof typeof IntegrationMappingScalarFieldEnum]
20192
+
20193
+
20194
+ export const ProcessScalarFieldEnum: {
20195
+ id: 'id',
20196
+ userId: 'userId',
20197
+ integrationId: 'integrationId',
20198
+ name: 'name',
20199
+ type: 'type',
20200
+ state: 'state',
20201
+ context: 'context',
20202
+ results: 'results',
20203
+ childProcesses: 'childProcesses',
20204
+ parentProcessId: 'parentProcessId',
20205
+ createdAt: 'createdAt',
20206
+ updatedAt: 'updatedAt'
20207
+ };
20208
+
20209
+ export type ProcessScalarFieldEnum = (typeof ProcessScalarFieldEnum)[keyof typeof ProcessScalarFieldEnum]
20210
+
20211
+
20212
+ export const SyncScalarFieldEnum: {
20213
+ id: 'id',
20214
+ integrationId: 'integrationId',
20215
+ entityIds: 'entityIds',
20216
+ hash: 'hash',
20217
+ name: 'name'
20218
+ };
20219
+
20220
+ export type SyncScalarFieldEnum = (typeof SyncScalarFieldEnum)[keyof typeof SyncScalarFieldEnum]
20221
+
20222
+
20223
+ export const DataIdentifierScalarFieldEnum: {
20224
+ id: 'id',
20225
+ syncId: 'syncId',
20226
+ entityId: 'entityId',
20227
+ idData: 'idData',
20228
+ hash: 'hash'
20229
+ };
20230
+
20231
+ export type DataIdentifierScalarFieldEnum = (typeof DataIdentifierScalarFieldEnum)[keyof typeof DataIdentifierScalarFieldEnum]
20232
+
20233
+
20234
+ export const AssociationScalarFieldEnum: {
20235
+ id: 'id',
20236
+ integrationId: 'integrationId',
20237
+ name: 'name',
20238
+ type: 'type',
20239
+ primaryObject: 'primaryObject'
19180
20240
  };
19181
20241
 
19182
20242
  export type AssociationScalarFieldEnum = (typeof AssociationScalarFieldEnum)[keyof typeof AssociationScalarFieldEnum]
@@ -19257,6 +20317,17 @@ export namespace Prisma {
19257
20317
  export type UsageCounterScalarFieldEnum = (typeof UsageCounterScalarFieldEnum)[keyof typeof UsageCounterScalarFieldEnum]
19258
20318
 
19259
20319
 
20320
+ export const RateLimitScopeScalarFieldEnum: {
20321
+ scopeKey: 'scopeKey',
20322
+ blockedUntil: 'blockedUntil',
20323
+ nextSlotMs: 'nextSlotMs',
20324
+ createdAt: 'createdAt',
20325
+ updatedAt: 'updatedAt'
20326
+ };
20327
+
20328
+ export type RateLimitScopeScalarFieldEnum = (typeof RateLimitScopeScalarFieldEnum)[keyof typeof RateLimitScopeScalarFieldEnum]
20329
+
20330
+
19260
20331
  export const SortOrder: {
19261
20332
  asc: 'asc',
19262
20333
  desc: 'desc'
@@ -19391,30 +20462,30 @@ export namespace Prisma {
19391
20462
 
19392
20463
 
19393
20464
  /**
19394
- * Reference to a field of type 'Int'
20465
+ * Reference to a field of type 'Float'
19395
20466
  */
19396
- export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'>
20467
+ export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'>
19397
20468
 
19398
20469
 
19399
20470
 
19400
20471
  /**
19401
- * Reference to a field of type 'Int[]'
20472
+ * Reference to a field of type 'Float[]'
19402
20473
  */
19403
- export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'>
20474
+ export type ListFloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float[]'>
19404
20475
 
19405
20476
 
19406
20477
 
19407
20478
  /**
19408
- * Reference to a field of type 'Float'
20479
+ * Reference to a field of type 'Int'
19409
20480
  */
19410
- export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'>
20481
+ export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'>
19411
20482
 
19412
20483
 
19413
20484
 
19414
20485
  /**
19415
- * Reference to a field of type 'Float[]'
20486
+ * Reference to a field of type 'Int[]'
19416
20487
  */
19417
- export type ListFloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float[]'>
20488
+ export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'>
19418
20489
 
19419
20490
  /**
19420
20491
  * Deep Input Types
@@ -20550,6 +21621,60 @@ export namespace Prisma {
20550
21621
  updatedAt?: DateTimeWithAggregatesFilter<"UsageCounter"> | Date | string
20551
21622
  }
20552
21623
 
21624
+ export type RateLimitScopeWhereInput = {
21625
+ AND?: RateLimitScopeWhereInput | RateLimitScopeWhereInput[]
21626
+ OR?: RateLimitScopeWhereInput[]
21627
+ NOT?: RateLimitScopeWhereInput | RateLimitScopeWhereInput[]
21628
+ scopeKey?: StringFilter<"RateLimitScope"> | string
21629
+ blockedUntil?: DateTimeNullableFilter<"RateLimitScope"> | Date | string | null
21630
+ nextSlotMs?: FloatNullableFilter<"RateLimitScope"> | number | null
21631
+ createdAt?: DateTimeFilter<"RateLimitScope"> | Date | string
21632
+ updatedAt?: DateTimeFilter<"RateLimitScope"> | Date | string
21633
+ }
21634
+
21635
+ export type RateLimitScopeOrderByWithRelationInput = {
21636
+ scopeKey?: SortOrder
21637
+ blockedUntil?: SortOrder
21638
+ nextSlotMs?: SortOrder
21639
+ createdAt?: SortOrder
21640
+ updatedAt?: SortOrder
21641
+ }
21642
+
21643
+ export type RateLimitScopeWhereUniqueInput = Prisma.AtLeast<{
21644
+ scopeKey?: string
21645
+ AND?: RateLimitScopeWhereInput | RateLimitScopeWhereInput[]
21646
+ OR?: RateLimitScopeWhereInput[]
21647
+ NOT?: RateLimitScopeWhereInput | RateLimitScopeWhereInput[]
21648
+ blockedUntil?: DateTimeNullableFilter<"RateLimitScope"> | Date | string | null
21649
+ nextSlotMs?: FloatNullableFilter<"RateLimitScope"> | number | null
21650
+ createdAt?: DateTimeFilter<"RateLimitScope"> | Date | string
21651
+ updatedAt?: DateTimeFilter<"RateLimitScope"> | Date | string
21652
+ }, "scopeKey">
21653
+
21654
+ export type RateLimitScopeOrderByWithAggregationInput = {
21655
+ scopeKey?: SortOrder
21656
+ blockedUntil?: SortOrder
21657
+ nextSlotMs?: SortOrder
21658
+ createdAt?: SortOrder
21659
+ updatedAt?: SortOrder
21660
+ _count?: RateLimitScopeCountOrderByAggregateInput
21661
+ _avg?: RateLimitScopeAvgOrderByAggregateInput
21662
+ _max?: RateLimitScopeMaxOrderByAggregateInput
21663
+ _min?: RateLimitScopeMinOrderByAggregateInput
21664
+ _sum?: RateLimitScopeSumOrderByAggregateInput
21665
+ }
21666
+
21667
+ export type RateLimitScopeScalarWhereWithAggregatesInput = {
21668
+ AND?: RateLimitScopeScalarWhereWithAggregatesInput | RateLimitScopeScalarWhereWithAggregatesInput[]
21669
+ OR?: RateLimitScopeScalarWhereWithAggregatesInput[]
21670
+ NOT?: RateLimitScopeScalarWhereWithAggregatesInput | RateLimitScopeScalarWhereWithAggregatesInput[]
21671
+ scopeKey?: StringWithAggregatesFilter<"RateLimitScope"> | string
21672
+ blockedUntil?: DateTimeNullableWithAggregatesFilter<"RateLimitScope"> | Date | string | null
21673
+ nextSlotMs?: FloatNullableWithAggregatesFilter<"RateLimitScope"> | number | null
21674
+ createdAt?: DateTimeWithAggregatesFilter<"RateLimitScope"> | Date | string
21675
+ updatedAt?: DateTimeWithAggregatesFilter<"RateLimitScope"> | Date | string
21676
+ }
21677
+
20553
21678
  export type UserCreateInput = {
20554
21679
  id?: string
20555
21680
  type: $Enums.UserType
@@ -21697,6 +22822,58 @@ export namespace Prisma {
21697
22822
  updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
21698
22823
  }
21699
22824
 
22825
+ export type RateLimitScopeCreateInput = {
22826
+ scopeKey: string
22827
+ blockedUntil?: Date | string | null
22828
+ nextSlotMs?: number | null
22829
+ createdAt?: Date | string
22830
+ updatedAt?: Date | string
22831
+ }
22832
+
22833
+ export type RateLimitScopeUncheckedCreateInput = {
22834
+ scopeKey: string
22835
+ blockedUntil?: Date | string | null
22836
+ nextSlotMs?: number | null
22837
+ createdAt?: Date | string
22838
+ updatedAt?: Date | string
22839
+ }
22840
+
22841
+ export type RateLimitScopeUpdateInput = {
22842
+ blockedUntil?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
22843
+ nextSlotMs?: NullableFloatFieldUpdateOperationsInput | number | null
22844
+ createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
22845
+ updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
22846
+ }
22847
+
22848
+ export type RateLimitScopeUncheckedUpdateInput = {
22849
+ blockedUntil?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
22850
+ nextSlotMs?: NullableFloatFieldUpdateOperationsInput | number | null
22851
+ createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
22852
+ updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
22853
+ }
22854
+
22855
+ export type RateLimitScopeCreateManyInput = {
22856
+ scopeKey: string
22857
+ blockedUntil?: Date | string | null
22858
+ nextSlotMs?: number | null
22859
+ createdAt?: Date | string
22860
+ updatedAt?: Date | string
22861
+ }
22862
+
22863
+ export type RateLimitScopeUpdateManyMutationInput = {
22864
+ blockedUntil?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
22865
+ nextSlotMs?: NullableFloatFieldUpdateOperationsInput | number | null
22866
+ createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
22867
+ updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
22868
+ }
22869
+
22870
+ export type RateLimitScopeUncheckedUpdateManyInput = {
22871
+ blockedUntil?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null
22872
+ nextSlotMs?: NullableFloatFieldUpdateOperationsInput | number | null
22873
+ createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
22874
+ updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
22875
+ }
22876
+
21700
22877
  export type StringFilter<$PrismaModel = never> = {
21701
22878
  equals?: string | StringFieldRefInput<$PrismaModel>
21702
22879
  in?: string[] | ListStringFieldRefInput<$PrismaModel>
@@ -22631,6 +23808,67 @@ export namespace Prisma {
22631
23808
  _max?: NestedBigIntFilter<$PrismaModel>
22632
23809
  }
22633
23810
 
23811
+ export type FloatNullableFilter<$PrismaModel = never> = {
23812
+ equals?: number | FloatFieldRefInput<$PrismaModel> | null
23813
+ in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null
23814
+ notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null
23815
+ lt?: number | FloatFieldRefInput<$PrismaModel>
23816
+ lte?: number | FloatFieldRefInput<$PrismaModel>
23817
+ gt?: number | FloatFieldRefInput<$PrismaModel>
23818
+ gte?: number | FloatFieldRefInput<$PrismaModel>
23819
+ not?: NestedFloatNullableFilter<$PrismaModel> | number | null
23820
+ isSet?: boolean
23821
+ }
23822
+
23823
+ export type RateLimitScopeCountOrderByAggregateInput = {
23824
+ scopeKey?: SortOrder
23825
+ blockedUntil?: SortOrder
23826
+ nextSlotMs?: SortOrder
23827
+ createdAt?: SortOrder
23828
+ updatedAt?: SortOrder
23829
+ }
23830
+
23831
+ export type RateLimitScopeAvgOrderByAggregateInput = {
23832
+ nextSlotMs?: SortOrder
23833
+ }
23834
+
23835
+ export type RateLimitScopeMaxOrderByAggregateInput = {
23836
+ scopeKey?: SortOrder
23837
+ blockedUntil?: SortOrder
23838
+ nextSlotMs?: SortOrder
23839
+ createdAt?: SortOrder
23840
+ updatedAt?: SortOrder
23841
+ }
23842
+
23843
+ export type RateLimitScopeMinOrderByAggregateInput = {
23844
+ scopeKey?: SortOrder
23845
+ blockedUntil?: SortOrder
23846
+ nextSlotMs?: SortOrder
23847
+ createdAt?: SortOrder
23848
+ updatedAt?: SortOrder
23849
+ }
23850
+
23851
+ export type RateLimitScopeSumOrderByAggregateInput = {
23852
+ nextSlotMs?: SortOrder
23853
+ }
23854
+
23855
+ export type FloatNullableWithAggregatesFilter<$PrismaModel = never> = {
23856
+ equals?: number | FloatFieldRefInput<$PrismaModel> | null
23857
+ in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null
23858
+ notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null
23859
+ lt?: number | FloatFieldRefInput<$PrismaModel>
23860
+ lte?: number | FloatFieldRefInput<$PrismaModel>
23861
+ gt?: number | FloatFieldRefInput<$PrismaModel>
23862
+ gte?: number | FloatFieldRefInput<$PrismaModel>
23863
+ not?: NestedFloatNullableWithAggregatesFilter<$PrismaModel> | number | null
23864
+ _count?: NestedIntNullableFilter<$PrismaModel>
23865
+ _avg?: NestedFloatNullableFilter<$PrismaModel>
23866
+ _sum?: NestedFloatNullableFilter<$PrismaModel>
23867
+ _min?: NestedFloatNullableFilter<$PrismaModel>
23868
+ _max?: NestedFloatNullableFilter<$PrismaModel>
23869
+ isSet?: boolean
23870
+ }
23871
+
22634
23872
  export type UserCreateNestedOneWithoutMembersInput = {
22635
23873
  create?: XOR<UserCreateWithoutMembersInput, UserUncheckedCreateWithoutMembersInput>
22636
23874
  connectOrCreate?: UserCreateOrConnectWithoutMembersInput
@@ -23742,6 +24980,15 @@ export namespace Prisma {
23742
24980
  divide?: bigint | number
23743
24981
  }
23744
24982
 
24983
+ export type NullableFloatFieldUpdateOperationsInput = {
24984
+ set?: number | null
24985
+ increment?: number
24986
+ decrement?: number
24987
+ multiply?: number
24988
+ divide?: number
24989
+ unset?: boolean
24990
+ }
24991
+
23745
24992
  export type NestedStringFilter<$PrismaModel = never> = {
23746
24993
  equals?: string | StringFieldRefInput<$PrismaModel>
23747
24994
  in?: string[] | ListStringFieldRefInput<$PrismaModel>
@@ -24038,6 +25285,35 @@ export namespace Prisma {
24038
25285
  not?: NestedFloatFilter<$PrismaModel> | number
24039
25286
  }
24040
25287
 
25288
+ export type NestedFloatNullableFilter<$PrismaModel = never> = {
25289
+ equals?: number | FloatFieldRefInput<$PrismaModel> | null
25290
+ in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null
25291
+ notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null
25292
+ lt?: number | FloatFieldRefInput<$PrismaModel>
25293
+ lte?: number | FloatFieldRefInput<$PrismaModel>
25294
+ gt?: number | FloatFieldRefInput<$PrismaModel>
25295
+ gte?: number | FloatFieldRefInput<$PrismaModel>
25296
+ not?: NestedFloatNullableFilter<$PrismaModel> | number | null
25297
+ isSet?: boolean
25298
+ }
25299
+
25300
+ export type NestedFloatNullableWithAggregatesFilter<$PrismaModel = never> = {
25301
+ equals?: number | FloatFieldRefInput<$PrismaModel> | null
25302
+ in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null
25303
+ notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null
25304
+ lt?: number | FloatFieldRefInput<$PrismaModel>
25305
+ lte?: number | FloatFieldRefInput<$PrismaModel>
25306
+ gt?: number | FloatFieldRefInput<$PrismaModel>
25307
+ gte?: number | FloatFieldRefInput<$PrismaModel>
25308
+ not?: NestedFloatNullableWithAggregatesFilter<$PrismaModel> | number | null
25309
+ _count?: NestedIntNullableFilter<$PrismaModel>
25310
+ _avg?: NestedFloatNullableFilter<$PrismaModel>
25311
+ _sum?: NestedFloatNullableFilter<$PrismaModel>
25312
+ _min?: NestedFloatNullableFilter<$PrismaModel>
25313
+ _max?: NestedFloatNullableFilter<$PrismaModel>
25314
+ isSet?: boolean
25315
+ }
25316
+
24041
25317
  export type UserCreateWithoutMembersInput = {
24042
25318
  id?: string
24043
25319
  type: $Enums.UserType