@estifanos-sh/convex-auth 0.0.1-preview.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 (387) hide show
  1. package/README.md +52 -0
  2. package/dist/_generated/component.d.ts +2981 -0
  3. package/dist/bin.js +7194 -0
  4. package/dist/browser/index.d.ts +22 -0
  5. package/dist/browser/index.js +61 -0
  6. package/dist/browser/locks.js +20 -0
  7. package/dist/browser/navigation.js +14 -0
  8. package/dist/browser/runtime.js +90 -0
  9. package/dist/browser/webauthn.js +99 -0
  10. package/dist/client/core/types.d.ts +615 -0
  11. package/dist/client/core/types.js +23 -0
  12. package/dist/client/errors.js +30 -0
  13. package/dist/client/factors/device.js +100 -0
  14. package/dist/client/factors/totp.js +111 -0
  15. package/dist/client/factors/webauthn.js +69 -0
  16. package/dist/client/index.d.ts +60 -0
  17. package/dist/client/index.js +976 -0
  18. package/dist/client/runtime/invite.js +50 -0
  19. package/dist/client/runtime/mutex.js +25 -0
  20. package/dist/client/runtime/proxy.js +75 -0
  21. package/dist/client/runtime/storage.js +65 -0
  22. package/dist/component/_generated/api.js +26 -0
  23. package/dist/component/_generated/component.d.ts +2981 -0
  24. package/dist/component/_generated/component.js +1 -0
  25. package/dist/component/_generated/dataModel.js +1 -0
  26. package/dist/component/_generated/server.js +74 -0
  27. package/dist/component/account.js +197 -0
  28. package/dist/component/connection/audit.js +152 -0
  29. package/dist/component/connection/cache.js +205 -0
  30. package/dist/component/connection/domain/verification.js +63 -0
  31. package/dist/component/connection/domain.js +108 -0
  32. package/dist/component/connection/saml/assertion.js +41 -0
  33. package/dist/component/connection/saml/request.js +61 -0
  34. package/dist/component/connection/scim/config.js +55 -0
  35. package/dist/component/connection/scim/identity.js +162 -0
  36. package/dist/component/connection/secret.js +65 -0
  37. package/dist/component/connection/webhook/delivery.js +396 -0
  38. package/dist/component/connection/webhook/endpoint.js +77 -0
  39. package/dist/component/connection.js +204 -0
  40. package/dist/component/convex.config.d.ts +7 -0
  41. package/dist/component/convex.config.js +15 -0
  42. package/dist/component/crons.js +27 -0
  43. package/dist/component/event.js +341 -0
  44. package/dist/component/factor/device.js +141 -0
  45. package/dist/component/factor/passkey.js +385 -0
  46. package/dist/component/factor/totp.js +253 -0
  47. package/dist/component/functions.js +3 -0
  48. package/dist/component/group/active.js +63 -0
  49. package/dist/component/group/invite.js +300 -0
  50. package/dist/component/group/member.js +188 -0
  51. package/dist/component/group.js +431 -0
  52. package/dist/component/http.js +9 -0
  53. package/dist/component/index.d.ts +5 -0
  54. package/dist/component/index.js +3 -0
  55. package/dist/component/limits.js +103 -0
  56. package/dist/component/maintenance.js +205 -0
  57. package/dist/component/migrations.js +277 -0
  58. package/dist/component/model.d.ts +384 -0
  59. package/dist/component/model.js +709 -0
  60. package/dist/component/modules.js +53 -0
  61. package/dist/component/oauth/client.js +196 -0
  62. package/dist/component/oauth/code.js +97 -0
  63. package/dist/component/oauth/refresh.js +230 -0
  64. package/dist/component/schema.d.ts +1530 -0
  65. package/dist/component/schema.js +401 -0
  66. package/dist/component/session.js +134 -0
  67. package/dist/component/token/pkce.js +121 -0
  68. package/dist/component/token/refresh.js +189 -0
  69. package/dist/component/token/verification.js +155 -0
  70. package/dist/component/user/email.js +147 -0
  71. package/dist/component/user/key.js +273 -0
  72. package/dist/component/user.js +173 -0
  73. package/dist/core/index.d.ts +531 -0
  74. package/dist/core/index.js +81 -0
  75. package/dist/expo/index.d.ts +43 -0
  76. package/dist/expo/index.js +131 -0
  77. package/dist/expo/webauthn.js +88 -0
  78. package/dist/node_modules/.pnpm/@opentelemetry_api-logs@0.214.0/node_modules/@opentelemetry/api-logs/build/src/NoopLogger.d.ts +2 -0
  79. package/dist/node_modules/.pnpm/@opentelemetry_api-logs@0.214.0/node_modules/@opentelemetry/api-logs/build/src/api/logs.d.ts +3 -0
  80. package/dist/node_modules/.pnpm/@opentelemetry_api-logs@0.214.0/node_modules/@opentelemetry/api-logs/build/src/index.d.ts +7 -0
  81. package/dist/node_modules/.pnpm/@opentelemetry_api-logs@0.214.0/node_modules/@opentelemetry/api-logs/build/src/types/AnyValue.d.ts +21 -0
  82. package/dist/node_modules/.pnpm/@opentelemetry_api-logs@0.214.0/node_modules/@opentelemetry/api-logs/build/src/types/LogRecord.d.ts +36 -0
  83. package/dist/node_modules/.pnpm/@opentelemetry_api-logs@0.214.0/node_modules/@opentelemetry/api-logs/build/src/types/Logger.d.ts +1 -0
  84. package/dist/node_modules/.pnpm/@opentelemetry_api-logs@0.214.0/node_modules/@opentelemetry/api-logs/build/src/types/LoggerOptions.d.ts +1 -0
  85. package/dist/node_modules/.pnpm/@opentelemetry_api-logs@0.214.0/node_modules/@opentelemetry/api-logs/build/src/types/LoggerProvider.d.ts +2 -0
  86. package/dist/node_modules/.pnpm/@opentelemetry_core@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/core/build/src/baggage/propagation/W3CBaggagePropagator.d.ts +1 -0
  87. package/dist/node_modules/.pnpm/@opentelemetry_core@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/core/build/src/baggage/utils.d.ts +1 -0
  88. package/dist/node_modules/.pnpm/@opentelemetry_core@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/core/build/src/common/attributes.d.ts +1 -0
  89. package/dist/node_modules/.pnpm/@opentelemetry_core@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/core/build/src/common/global-error-handler.d.ts +2 -0
  90. package/dist/node_modules/.pnpm/@opentelemetry_core@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/core/build/src/common/logging-error-handler.d.ts +1 -0
  91. package/dist/node_modules/.pnpm/@opentelemetry_core@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/core/build/src/common/time.d.ts +1 -0
  92. package/dist/node_modules/.pnpm/@opentelemetry_core@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/core/build/src/common/types.d.ts +16 -0
  93. package/dist/node_modules/.pnpm/@opentelemetry_core@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/core/build/src/index.d.ts +13 -0
  94. package/dist/node_modules/.pnpm/@opentelemetry_core@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/core/build/src/propagation/composite.d.ts +1 -0
  95. package/dist/node_modules/.pnpm/@opentelemetry_core@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/core/build/src/trace/TraceState.d.ts +1 -0
  96. package/dist/node_modules/.pnpm/@opentelemetry_core@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/core/build/src/trace/W3CTraceContextPropagator.d.ts +1 -0
  97. package/dist/node_modules/.pnpm/@opentelemetry_core@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/core/build/src/trace/rpc-metadata.d.ts +1 -0
  98. package/dist/node_modules/.pnpm/@opentelemetry_core@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/core/build/src/trace/suppress-tracing.d.ts +1 -0
  99. package/dist/node_modules/.pnpm/@opentelemetry_core@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/core/build/src/utils/configuration.d.ts +1 -0
  100. package/dist/node_modules/.pnpm/@opentelemetry_sdk-logs@0.214.0_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-logs/build/src/LogRecordProcessor.d.ts +24 -0
  101. package/dist/node_modules/.pnpm/@opentelemetry_sdk-logs@0.214.0_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-logs/build/src/LoggerProvider.d.ts +2 -0
  102. package/dist/node_modules/.pnpm/@opentelemetry_sdk-logs@0.214.0_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-logs/build/src/config/LoggerConfigurators.d.ts +1 -0
  103. package/dist/node_modules/.pnpm/@opentelemetry_sdk-logs@0.214.0_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-logs/build/src/export/BatchLogRecordProcessorBase.d.ts +4 -0
  104. package/dist/node_modules/.pnpm/@opentelemetry_sdk-logs@0.214.0_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-logs/build/src/export/ConsoleLogRecordExporter.d.ts +3 -0
  105. package/dist/node_modules/.pnpm/@opentelemetry_sdk-logs@0.214.0_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-logs/build/src/export/InMemoryLogRecordExporter.d.ts +3 -0
  106. package/dist/node_modules/.pnpm/@opentelemetry_sdk-logs@0.214.0_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-logs/build/src/export/LogRecordExporter.d.ts +2 -0
  107. package/dist/node_modules/.pnpm/@opentelemetry_sdk-logs@0.214.0_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-logs/build/src/export/ReadableLogRecord.d.ts +4 -0
  108. package/dist/node_modules/.pnpm/@opentelemetry_sdk-logs@0.214.0_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-logs/build/src/export/SdkLogRecord.d.ts +71 -0
  109. package/dist/node_modules/.pnpm/@opentelemetry_sdk-logs@0.214.0_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-logs/build/src/export/SimpleLogRecordProcessor.d.ts +3 -0
  110. package/dist/node_modules/.pnpm/@opentelemetry_sdk-logs@0.214.0_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-logs/build/src/index.d.ts +11 -0
  111. package/dist/node_modules/.pnpm/@opentelemetry_sdk-logs@0.214.0_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-logs/build/src/platform/index.d.ts +1 -0
  112. package/dist/node_modules/.pnpm/@opentelemetry_sdk-logs@0.214.0_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-logs/build/src/platform/node/export/BatchLogRecordProcessor.d.ts +2 -0
  113. package/dist/node_modules/.pnpm/@opentelemetry_sdk-logs@0.214.0_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-logs/build/src/platform/node/index.d.ts +1 -0
  114. package/dist/node_modules/.pnpm/@opentelemetry_sdk-logs@0.214.0_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-logs/build/src/types.d.ts +4 -0
  115. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/InstrumentDescriptor.d.ts +3 -0
  116. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/MeterProvider.d.ts +4 -0
  117. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/Drop.d.ts +4 -0
  118. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/ExponentialHistogram.d.ts +5 -0
  119. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/Histogram.d.ts +5 -0
  120. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/LastValue.d.ts +5 -0
  121. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/Sum.d.ts +5 -0
  122. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/index.d.ts +6 -0
  123. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/types.d.ts +53 -0
  124. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/export/AggregationSelector.d.ts +16 -0
  125. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/export/AggregationTemporality.d.ts +11 -0
  126. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/export/CardinalitySelector.d.ts +10 -0
  127. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/export/ConsoleMetricExporter.d.ts +4 -0
  128. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/export/InMemoryMetricExporter.d.ts +3 -0
  129. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricData.d.ts +148 -0
  130. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricExporter.d.ts +3 -0
  131. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricProducer.d.ts +27 -0
  132. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricReader.d.ts +138 -0
  133. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/export/PeriodicExportingMetricReader.d.ts +3 -0
  134. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/index.d.ts +15 -0
  135. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/types.d.ts +10 -0
  136. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/utils.d.ts +2 -0
  137. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/view/Aggregation.d.ts +4 -0
  138. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/view/AggregationOption.d.ts +41 -0
  139. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/view/AttributesProcessor.d.ts +1 -0
  140. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/view/InstrumentSelector.d.ts +1 -0
  141. package/dist/node_modules/.pnpm/@opentelemetry_sdk-metrics@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-metrics/build/src/view/View.d.ts +5 -0
  142. package/dist/node_modules/.pnpm/@opentelemetry_sdk-trace-base@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-trace-base/build/src/BasicTracerProvider.d.ts +2 -0
  143. package/dist/node_modules/.pnpm/@opentelemetry_sdk-trace-base@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-trace-base/build/src/IdGenerator.d.ts +11 -0
  144. package/dist/node_modules/.pnpm/@opentelemetry_sdk-trace-base@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-trace-base/build/src/Sampler.d.ts +74 -0
  145. package/dist/node_modules/.pnpm/@opentelemetry_sdk-trace-base@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-trace-base/build/src/Span.d.ts +17 -0
  146. package/dist/node_modules/.pnpm/@opentelemetry_sdk-trace-base@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-trace-base/build/src/SpanProcessor.d.ts +43 -0
  147. package/dist/node_modules/.pnpm/@opentelemetry_sdk-trace-base@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-trace-base/build/src/TimedEvent.d.ts +19 -0
  148. package/dist/node_modules/.pnpm/@opentelemetry_sdk-trace-base@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-trace-base/build/src/export/BatchSpanProcessorBase.d.ts +6 -0
  149. package/dist/node_modules/.pnpm/@opentelemetry_sdk-trace-base@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-trace-base/build/src/export/ConsoleSpanExporter.d.ts +3 -0
  150. package/dist/node_modules/.pnpm/@opentelemetry_sdk-trace-base@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-trace-base/build/src/export/InMemorySpanExporter.d.ts +3 -0
  151. package/dist/node_modules/.pnpm/@opentelemetry_sdk-trace-base@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-trace-base/build/src/export/NoopSpanProcessor.d.ts +4 -0
  152. package/dist/node_modules/.pnpm/@opentelemetry_sdk-trace-base@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-trace-base/build/src/export/ReadableSpan.d.ts +29 -0
  153. package/dist/node_modules/.pnpm/@opentelemetry_sdk-trace-base@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-trace-base/build/src/export/SimpleSpanProcessor.d.ts +5 -0
  154. package/dist/node_modules/.pnpm/@opentelemetry_sdk-trace-base@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-trace-base/build/src/export/SpanExporter.d.ts +2 -0
  155. package/dist/node_modules/.pnpm/@opentelemetry_sdk-trace-base@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-trace-base/build/src/index.d.ts +18 -0
  156. package/dist/node_modules/.pnpm/@opentelemetry_sdk-trace-base@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-trace-base/build/src/platform/index.d.ts +1 -0
  157. package/dist/node_modules/.pnpm/@opentelemetry_sdk-trace-base@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-trace-base/build/src/platform/node/export/BatchSpanProcessor.d.ts +2 -0
  158. package/dist/node_modules/.pnpm/@opentelemetry_sdk-trace-base@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-trace-base/build/src/platform/node/index.d.ts +1 -0
  159. package/dist/node_modules/.pnpm/@opentelemetry_sdk-trace-base@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-trace-base/build/src/sampler/AlwaysOffSampler.d.ts +1 -0
  160. package/dist/node_modules/.pnpm/@opentelemetry_sdk-trace-base@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-trace-base/build/src/sampler/AlwaysOnSampler.d.ts +1 -0
  161. package/dist/node_modules/.pnpm/@opentelemetry_sdk-trace-base@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-trace-base/build/src/sampler/ParentBasedSampler.d.ts +2 -0
  162. package/dist/node_modules/.pnpm/@opentelemetry_sdk-trace-base@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-trace-base/build/src/sampler/TraceIdRatioBasedSampler.d.ts +1 -0
  163. package/dist/node_modules/.pnpm/@opentelemetry_sdk-trace-base@2.6.1_@opentelemetry_api@1.9.1/node_modules/@opentelemetry/sdk-trace-base/build/src/types.d.ts +66 -0
  164. package/dist/otel.d.ts +73 -0
  165. package/dist/otel.js +82 -0
  166. package/dist/permissions/index.d.ts +81 -0
  167. package/dist/permissions/index.js +18 -0
  168. package/dist/providers/anonymous.d.ts +35 -0
  169. package/dist/providers/anonymous.js +40 -0
  170. package/dist/providers/apple.d.ts +61 -0
  171. package/dist/providers/apple.js +57 -0
  172. package/dist/providers/connection.d.ts +30 -0
  173. package/dist/providers/connection.js +33 -0
  174. package/dist/providers/credentials.d.ts +78 -0
  175. package/dist/providers/credentials.js +31 -0
  176. package/dist/providers/custom.d.ts +96 -0
  177. package/dist/providers/custom.js +108 -0
  178. package/dist/providers/device.d.ts +33 -0
  179. package/dist/providers/device.js +30 -0
  180. package/dist/providers/email.d.ts +45 -0
  181. package/dist/providers/email.js +52 -0
  182. package/dist/providers/github.d.ts +56 -0
  183. package/dist/providers/github.js +79 -0
  184. package/dist/providers/google.d.ts +56 -0
  185. package/dist/providers/google.js +59 -0
  186. package/dist/providers/index.d.ts +16 -0
  187. package/dist/providers/index.js +16 -0
  188. package/dist/providers/microsoft.d.ts +59 -0
  189. package/dist/providers/microsoft.js +98 -0
  190. package/dist/providers/password.d.ts +68 -0
  191. package/dist/providers/password.js +348 -0
  192. package/dist/providers/phone.d.ts +33 -0
  193. package/dist/providers/phone.js +35 -0
  194. package/dist/providers/redirect.d.ts +1 -0
  195. package/dist/providers/redirect.js +11 -0
  196. package/dist/providers/totp.d.ts +29 -0
  197. package/dist/providers/totp.js +29 -0
  198. package/dist/providers/webauthn/attestation.d.ts +42 -0
  199. package/dist/providers/webauthn/attestation.js +167 -0
  200. package/dist/providers/webauthn.d.ts +83 -0
  201. package/dist/providers/webauthn.js +57 -0
  202. package/dist/react/index.d.ts +55 -0
  203. package/dist/react/index.js +80 -0
  204. package/dist/server/auth.d.ts +443 -0
  205. package/dist/server/auth.js +178 -0
  206. package/dist/server/cache/context.js +94 -0
  207. package/dist/server/component/api.d.ts +14 -0
  208. package/dist/server/component/api.js +13 -0
  209. package/dist/server/component/context.d.ts +16 -0
  210. package/dist/server/component/context.js +1 -0
  211. package/dist/server/component/factor/db.js +71 -0
  212. package/dist/server/config.d.ts +3 -0
  213. package/dist/server/config.js +78 -0
  214. package/dist/server/connection/config.js +101 -0
  215. package/dist/server/connection/domain.d.ts +878 -0
  216. package/dist/server/connection/domain.js +1122 -0
  217. package/dist/server/connection/group/service.d.ts +25 -0
  218. package/dist/server/connection/group/service.js +250 -0
  219. package/dist/server/connection/http.js +1485 -0
  220. package/dist/server/connection/oidc.js +366 -0
  221. package/dist/server/connection/policy/domain.js +59 -0
  222. package/dist/server/connection/policy.d.ts +1 -0
  223. package/dist/server/connection/policy.js +163 -0
  224. package/dist/server/connection/profile.js +22 -0
  225. package/dist/server/connection/provision.js +182 -0
  226. package/dist/server/connection/saml/api.js +70 -0
  227. package/dist/server/connection/saml/binding/post.js +140 -0
  228. package/dist/server/connection/saml/binding/redirect.js +139 -0
  229. package/dist/server/connection/saml/binding/shared.js +18 -0
  230. package/dist/server/connection/saml/c14n.js +224 -0
  231. package/dist/server/connection/saml/constants.js +100 -0
  232. package/dist/server/connection/saml/crypto.js +170 -0
  233. package/dist/server/connection/saml/dom/select.js +299 -0
  234. package/dist/server/connection/saml/encoding.js +93 -0
  235. package/dist/server/connection/saml/encryption.js +34 -0
  236. package/dist/server/connection/saml/entity.js +24 -0
  237. package/dist/server/connection/saml/extractor.js +408 -0
  238. package/dist/server/connection/saml/flow.js +150 -0
  239. package/dist/server/connection/saml/identity/provider.js +66 -0
  240. package/dist/server/connection/saml/index.js +5 -0
  241. package/dist/server/connection/saml/metadata.js +294 -0
  242. package/dist/server/connection/saml/service/provider.js +117 -0
  243. package/dist/server/connection/saml/signature.js +214 -0
  244. package/dist/server/connection/saml/template.js +68 -0
  245. package/dist/server/connection/saml/types.js +1 -0
  246. package/dist/server/connection/saml/validator.js +32 -0
  247. package/dist/server/connection/saml/xml/builder.js +68 -0
  248. package/dist/server/connection/saml/xmldsig.js +598 -0
  249. package/dist/server/connection/saml/xmlenc.js +162 -0
  250. package/dist/server/connection/saml.d.ts +56 -0
  251. package/dist/server/connection/saml.js +762 -0
  252. package/dist/server/connection/scim.js +115 -0
  253. package/dist/server/connection/shared.js +74 -0
  254. package/dist/server/connection/webhook.js +163 -0
  255. package/dist/server/context.d.ts +137 -0
  256. package/dist/server/context.js +108 -0
  257. package/dist/server/contract.d.ts +48 -0
  258. package/dist/server/contract.js +107 -0
  259. package/dist/server/cookies.js +90 -0
  260. package/dist/server/core.js +163 -0
  261. package/dist/server/cors.d.ts +22 -0
  262. package/dist/server/cors.js +93 -0
  263. package/dist/server/crypto.js +43 -0
  264. package/dist/server/db.js +88 -0
  265. package/dist/server/device.js +140 -0
  266. package/dist/server/domains/access.js +29 -0
  267. package/dist/server/domains/account.d.ts +16 -0
  268. package/dist/server/domains/account.js +92 -0
  269. package/dist/server/domains/factor.d.ts +28 -0
  270. package/dist/server/domains/factor.js +115 -0
  271. package/dist/server/domains/group.js +87 -0
  272. package/dist/server/domains/invite.js +76 -0
  273. package/dist/server/domains/key.js +253 -0
  274. package/dist/server/domains/member.js +149 -0
  275. package/dist/server/domains/session.js +29 -0
  276. package/dist/server/domains/user.js +119 -0
  277. package/dist/server/env.d.ts +46 -0
  278. package/dist/server/env.js +96 -0
  279. package/dist/server/errors.js +38 -0
  280. package/dist/server/events.d.ts +880 -0
  281. package/dist/server/events.js +406 -0
  282. package/dist/server/facade.d.ts +83 -0
  283. package/dist/server/facade.js +124 -0
  284. package/dist/server/http.d.ts +125 -0
  285. package/dist/server/http.js +566 -0
  286. package/dist/server/identity/claims.js +58 -0
  287. package/dist/server/identity/convex.d.ts +15 -0
  288. package/dist/server/identity/convex.js +1 -0
  289. package/dist/server/index.d.ts +17 -0
  290. package/dist/server/index.js +11 -0
  291. package/dist/server/keys.js +60 -0
  292. package/dist/server/limits.js +41 -0
  293. package/dist/server/log.js +28 -0
  294. package/dist/server/mcp.d.ts +19 -0
  295. package/dist/server/mcp.js +250 -0
  296. package/dist/server/mutations/account.js +47 -0
  297. package/dist/server/mutations/calls.js +16 -0
  298. package/dist/server/mutations/code.js +91 -0
  299. package/dist/server/mutations/credentials/signin.js +210 -0
  300. package/dist/server/mutations/invalidate.js +60 -0
  301. package/dist/server/mutations/oauth.js +251 -0
  302. package/dist/server/mutations/refresh.js +152 -0
  303. package/dist/server/mutations/register.js +93 -0
  304. package/dist/server/mutations/retrieve.js +66 -0
  305. package/dist/server/mutations/signature.js +36 -0
  306. package/dist/server/mutations/signin.js +81 -0
  307. package/dist/server/mutations/signout.js +61 -0
  308. package/dist/server/mutations/store/refs.js +15 -0
  309. package/dist/server/mutations/store.js +82 -0
  310. package/dist/server/mutations/verifier.js +25 -0
  311. package/dist/server/mutations/verify.js +199 -0
  312. package/dist/server/oauth/authorize.js +98 -0
  313. package/dist/server/oauth/client.d.ts +93 -0
  314. package/dist/server/oauth/client.js +115 -0
  315. package/dist/server/oauth/code.d.ts +63 -0
  316. package/dist/server/oauth/code.js +124 -0
  317. package/dist/server/oauth/domain.d.ts +23 -0
  318. package/dist/server/oauth/domain.js +1 -0
  319. package/dist/server/oauth/factory.js +46 -0
  320. package/dist/server/oauth/grant.js +46 -0
  321. package/dist/server/oauth/handlers.js +108 -0
  322. package/dist/server/oauth/manage.js +121 -0
  323. package/dist/server/oauth/normalize.js +27 -0
  324. package/dist/server/oauth/refresh.d.ts +71 -0
  325. package/dist/server/oauth/refresh.js +132 -0
  326. package/dist/server/oauth/register.js +147 -0
  327. package/dist/server/oauth/runtime.js +280 -0
  328. package/dist/server/oauth/token.js +355 -0
  329. package/dist/server/payloads.d.ts +16 -0
  330. package/dist/server/payloads.js +30 -0
  331. package/dist/server/preload.d.ts +249 -0
  332. package/dist/server/preload.js +673 -0
  333. package/dist/server/random.js +25 -0
  334. package/dist/server/redirects.js +85 -0
  335. package/dist/server/runtime.d.ts +845 -0
  336. package/dist/server/runtime.js +387 -0
  337. package/dist/server/secret.js +46 -0
  338. package/dist/server/services/factors.js +117 -0
  339. package/dist/server/services/providers.js +23 -0
  340. package/dist/server/services/resolve.js +17 -0
  341. package/dist/server/session/lifecycle.d.ts +23 -0
  342. package/dist/server/session/lifecycle.js +139 -0
  343. package/dist/server/signin/flow.js +359 -0
  344. package/dist/server/telemetry.js +68 -0
  345. package/dist/server/templates.js +91 -0
  346. package/dist/server/token/refresh.js +35 -0
  347. package/dist/server/tokens.js +164 -0
  348. package/dist/server/totp.js +282 -0
  349. package/dist/server/types.d.ts +1154 -0
  350. package/dist/server/types.js +1 -0
  351. package/dist/server/url.js +43 -0
  352. package/dist/server/user/account.js +325 -0
  353. package/dist/server/utils/bearer.js +24 -0
  354. package/dist/server/utils/cache.js +51 -0
  355. package/dist/server/utils/retry.js +3 -0
  356. package/dist/server/utils/span.js +59 -0
  357. package/dist/server/validators.d.ts +2061 -0
  358. package/dist/server/validators.js +320 -0
  359. package/dist/server/webauthn.js +699 -0
  360. package/dist/server/wellknown.d.ts +74 -0
  361. package/dist/server/wellknown.js +195 -0
  362. package/dist/shared/brand.d.ts +28 -0
  363. package/dist/shared/brand.js +13 -0
  364. package/dist/shared/codes.d.ts +99 -0
  365. package/dist/shared/codes.js +98 -0
  366. package/dist/shared/compare.js +23 -0
  367. package/dist/shared/errors.js +24 -0
  368. package/dist/shared/event/kinds.d.ts +188 -0
  369. package/dist/shared/event/kinds.js +103 -0
  370. package/dist/shared/fetch/guard.js +189 -0
  371. package/dist/shared/log.js +62 -0
  372. package/dist/shared/results.d.ts +58 -0
  373. package/dist/shared/retry.js +27 -0
  374. package/dist/shared/webauthn.js +9 -0
  375. package/dist/svelte/AuthLoading.svelte +13 -0
  376. package/dist/svelte/AuthLoading.svelte.d.ts +8 -0
  377. package/dist/svelte/SignedIn.svelte +14 -0
  378. package/dist/svelte/SignedIn.svelte.d.ts +8 -0
  379. package/dist/svelte/SignedOut.svelte +13 -0
  380. package/dist/svelte/SignedOut.svelte.d.ts +8 -0
  381. package/dist/svelte/context.svelte.d.ts +26 -0
  382. package/dist/svelte/context.svelte.js +61 -0
  383. package/dist/svelte/index.d.ts +5 -0
  384. package/dist/svelte/index.js +4 -0
  385. package/dist/test.d.ts +48 -0
  386. package/dist/test.js +54 -0
  387. package/package.json +247 -0
@@ -0,0 +1,2981 @@
1
+ import { FunctionReference } from "convex/server";
2
+
3
+ //#region src/component/_generated/component.d.ts
4
+ /**
5
+ * A utility for referencing a Convex component's exposed API.
6
+ *
7
+ * Useful when expecting a parameter like `components.myComponent`.
8
+ * Usage:
9
+ * ```ts
10
+ * async function myFunction(ctx: QueryCtx, component: ComponentApi) {
11
+ * return ctx.runQuery(component.someFile.someQuery, { ...args });
12
+ * }
13
+ * ```
14
+ */
15
+ type ComponentApi<Name extends string | undefined = string | undefined> = {
16
+ account: {
17
+ beginCredentialsSignIn: FunctionReference<"mutation", "internal", {
18
+ includeTotp: boolean;
19
+ maxAttemptsPerHour: number;
20
+ provider: string;
21
+ providerAccountId: string;
22
+ reserveAttempt: boolean;
23
+ }, {
24
+ status: "invalid";
25
+ } | {
26
+ status: "limited";
27
+ } | {
28
+ account: {
29
+ _creationTime: number;
30
+ _id: string;
31
+ emailVerified?: string;
32
+ extend?: any;
33
+ phoneVerified?: string;
34
+ provider: string;
35
+ providerAccountId: string;
36
+ secret?: string;
37
+ userId: string;
38
+ };
39
+ hasTotp: boolean;
40
+ status: "ready";
41
+ user: {
42
+ _creationTime: number;
43
+ _id: string;
44
+ email?: string;
45
+ emailVerificationTime?: number;
46
+ extend?: any;
47
+ firstName?: string;
48
+ hasTotp?: boolean;
49
+ image?: string;
50
+ isAnonymous?: boolean;
51
+ lastActiveGroup?: string;
52
+ lastName?: string;
53
+ name?: string;
54
+ phone?: string;
55
+ phoneVerificationTime?: number;
56
+ };
57
+ }, Name>;
58
+ completeCredentialsSignIn: FunctionReference<"mutation", "internal", {
59
+ accountId: string;
60
+ generateTokens: boolean;
61
+ issueSession: boolean;
62
+ refreshTokenExpirationTime: number;
63
+ replaceSessionId?: string;
64
+ sessionExpirationTime: number;
65
+ }, {
66
+ status: "rejected";
67
+ } | {
68
+ status: "reset";
69
+ } | {
70
+ refreshTokenId?: string;
71
+ replacedSessionId?: string;
72
+ sessionId: string;
73
+ status: "accepted";
74
+ user: {
75
+ _creationTime: number;
76
+ _id: string;
77
+ email?: string;
78
+ emailVerificationTime?: number;
79
+ extend?: any;
80
+ firstName?: string;
81
+ hasTotp?: boolean;
82
+ image?: string;
83
+ isAnonymous?: boolean;
84
+ lastActiveGroup?: string;
85
+ lastName?: string;
86
+ name?: string;
87
+ phone?: string;
88
+ phoneVerificationTime?: number;
89
+ };
90
+ }, Name>;
91
+ create: FunctionReference<"mutation", "internal", {
92
+ extend?: any;
93
+ provider: string;
94
+ providerAccountId: string;
95
+ secret?: string;
96
+ userId: string;
97
+ }, string, Name>;
98
+ get: FunctionReference<"query", "internal", {
99
+ id?: string;
100
+ provider?: string;
101
+ providerAccountId?: string;
102
+ }, {
103
+ _creationTime: number;
104
+ _id: string;
105
+ emailVerified?: string;
106
+ extend?: any;
107
+ phoneVerified?: string;
108
+ provider: string;
109
+ providerAccountId: string;
110
+ secret?: string;
111
+ userId: string;
112
+ } | null, Name>;
113
+ list: FunctionReference<"query", "internal", {
114
+ userId: string;
115
+ }, Array<{
116
+ _creationTime: number;
117
+ _id: string;
118
+ emailVerified?: string;
119
+ extend?: any;
120
+ phoneVerified?: string;
121
+ provider: string;
122
+ providerAccountId: string;
123
+ secret?: string;
124
+ userId: string;
125
+ }>, Name>;
126
+ remove: FunctionReference<"mutation", "internal", {
127
+ id: string;
128
+ requireOtherAccount?: boolean;
129
+ userId?: string;
130
+ }, null, Name>;
131
+ update: FunctionReference<"mutation", "internal", {
132
+ id: string;
133
+ patch: {
134
+ emailVerified?: string;
135
+ extend?: any;
136
+ phoneVerified?: string;
137
+ provider?: string;
138
+ providerAccountId?: string;
139
+ secret?: string;
140
+ userId?: string;
141
+ };
142
+ }, null, Name>;
143
+ };
144
+ connection: {
145
+ audit: {
146
+ list: FunctionReference<"query", "internal", {
147
+ connectionId?: string;
148
+ groupId?: string;
149
+ paginationOpts: {
150
+ cursor: string | null;
151
+ endCursor?: string | null;
152
+ id?: number;
153
+ maximumBytesRead?: number;
154
+ maximumRowsRead?: number;
155
+ numItems: number;
156
+ };
157
+ }, {
158
+ continueCursor: string;
159
+ isDone: boolean;
160
+ page: Array<{
161
+ _creationTime: number;
162
+ _id: string;
163
+ actorId?: string;
164
+ actorType: "user" | "system" | "scim" | "api_key" | "oauth_client" | "webhook" | "anonymous";
165
+ category: "user" | "session" | "account" | "password" | "passkey" | "totp" | "email" | "phone" | "api_key" | "oauth" | "connection" | "scim" | "webhook" | "security";
166
+ data?: {
167
+ existingUserId?: string;
168
+ profile?: Record<string, any>;
169
+ provider?: string;
170
+ type?: string;
171
+ } | {
172
+ method?: string;
173
+ provider: string;
174
+ } | {
175
+ flow?: "reset" | "change";
176
+ reason?: string;
177
+ refreshTokenId?: string;
178
+ sessionId?: string;
179
+ userId?: string;
180
+ } | {
181
+ accountId?: string;
182
+ provider?: string;
183
+ providerAccountId?: string;
184
+ } | {
185
+ credentialId?: string;
186
+ keyId?: string;
187
+ name?: string;
188
+ passkeyId?: string;
189
+ prefix?: string;
190
+ reason?: string;
191
+ totpId?: string;
192
+ } | {
193
+ email?: string;
194
+ phone?: string;
195
+ userId?: string;
196
+ } | {
197
+ clientId?: string;
198
+ codeId?: string;
199
+ grantType?: string;
200
+ name?: string;
201
+ redirectUri?: string;
202
+ resource?: string;
203
+ scopes?: Array<string>;
204
+ userId?: string;
205
+ } | {
206
+ audience?: string | Array<string>;
207
+ changed?: Array<string>;
208
+ connectionId?: string;
209
+ discoveryUrl?: string;
210
+ domain?: string;
211
+ domains?: Array<string>;
212
+ errorCode?: string;
213
+ expiresAt?: number;
214
+ issuer?: string;
215
+ jwksUri?: string;
216
+ metadataUrl?: string;
217
+ protocol?: "oidc" | "saml";
218
+ recordName?: string;
219
+ tokenEndpointAuthMethod?: string;
220
+ userId?: string;
221
+ verifiedAt?: number;
222
+ version?: number;
223
+ } | {
224
+ active?: boolean;
225
+ externalId?: string;
226
+ groupId?: string;
227
+ operation?: string;
228
+ resourceId?: string;
229
+ resourceType?: "user" | "group";
230
+ scimConfigId?: string;
231
+ userId?: string;
232
+ } | {
233
+ attemptCount?: number;
234
+ deliveryId?: string;
235
+ endpointId?: string;
236
+ error?: string;
237
+ sourceEventId?: string;
238
+ sourceEventType?: "user.created" | "user.updated" | "session.signed_in" | "session.signed_out" | "session.invalidated" | "session.refresh_exchanged" | "session.refresh_reuse_detected" | "account.linked" | "account.unlinked" | "password.changed" | "passkey.added" | "passkey.removed" | "totp.enrolled" | "totp.removed" | "email.verified" | "phone.verified" | "api_key.created" | "api_key.revoked" | "oauth.client.created" | "oauth.client.revoked" | "oauth.code.created" | "oauth.token.created" | "oauth.token.exchanged" | "oauth.refresh.reuse_detected" | "oauth.refresh.revoked" | "connection.created" | "connection.updated" | "connection.removed" | "connection.login.succeeded" | "connection.login.failed" | "connection.domain.verification_requested" | "connection.domain.verified" | "connection.policy.updated" | "connection.saml.set" | "connection.saml.refreshed" | "connection.oidc.set" | "connection.scim.set" | "connection.scim.read" | "connection.scim.user.provisioned" | "connection.scim.user.updated" | "connection.scim.user.deactivated" | "connection.scim.user.reactivated" | "connection.scim.group.provisioned" | "connection.scim.group.updated" | "connection.scim.group.deactivated" | "connection.scim.group.reactivated" | "webhook.endpoint.created" | "webhook.endpoint.disabled" | "webhook.delivery.created" | "webhook.delivery.attempted" | "webhook.delivery.succeeded" | "webhook.delivery.failed";
239
+ status?: number;
240
+ };
241
+ errorCode?: string;
242
+ eventId: string;
243
+ ip?: string;
244
+ kind: "user.created" | "user.updated" | "session.signed_in" | "session.signed_out" | "session.invalidated" | "session.refresh_exchanged" | "session.refresh_reuse_detected" | "account.linked" | "account.unlinked" | "password.changed" | "passkey.added" | "passkey.removed" | "totp.enrolled" | "totp.removed" | "email.verified" | "phone.verified" | "api_key.created" | "api_key.revoked" | "oauth.client.created" | "oauth.client.revoked" | "oauth.code.created" | "oauth.token.created" | "oauth.token.exchanged" | "oauth.refresh.reuse_detected" | "oauth.refresh.revoked" | "connection.created" | "connection.updated" | "connection.removed" | "connection.login.succeeded" | "connection.login.failed" | "connection.domain.verification_requested" | "connection.domain.verified" | "connection.policy.updated" | "connection.saml.set" | "connection.saml.refreshed" | "connection.oidc.set" | "connection.scim.set" | "connection.scim.read" | "connection.scim.user.provisioned" | "connection.scim.user.updated" | "connection.scim.user.deactivated" | "connection.scim.user.reactivated" | "connection.scim.group.provisioned" | "connection.scim.group.updated" | "connection.scim.group.deactivated" | "connection.scim.group.reactivated" | "webhook.endpoint.created" | "webhook.endpoint.disabled" | "webhook.delivery.created" | "webhook.delivery.attempted" | "webhook.delivery.succeeded" | "webhook.delivery.failed";
245
+ occurredAt: number;
246
+ outcome: "success" | "failure";
247
+ requestId?: string;
248
+ subjectId?: string;
249
+ subjectType: "user" | "session" | "account" | "passkey" | "totp" | "email" | "phone" | "api_key" | "oauth_client" | "oauth_code" | "group" | "connection" | "scim_identity" | "webhook_endpoint" | "webhook_delivery" | "system";
250
+ targetId: string;
251
+ targetKind: "user" | "session" | "group" | "connection" | "oauth_client" | "api_key" | "global";
252
+ }>;
253
+ pageStatus?: "SplitRecommended" | "SplitRequired" | null;
254
+ splitCursor?: string | null;
255
+ }, Name>;
256
+ };
257
+ cache: {
258
+ invalidateOidcDiscovery: FunctionReference<"mutation", "internal", {
259
+ externalHost?: string;
260
+ runtimeOrigin?: string;
261
+ url: string;
262
+ }, null, Name>;
263
+ invalidateSamlMetadata: FunctionReference<"mutation", "internal", {
264
+ externalHost?: string;
265
+ runtimeOrigin?: string;
266
+ url: string;
267
+ }, null, Name>;
268
+ oidcDiscovery: FunctionReference<"action", "internal", {
269
+ externalHost?: string;
270
+ runtimeOrigin?: string;
271
+ url: string;
272
+ }, {
273
+ authorization_endpoint: string;
274
+ id_token_signing_alg_values_supported?: Array<string>;
275
+ issuer: string;
276
+ jwks_uri: string;
277
+ token_endpoint: string;
278
+ token_endpoint_auth_methods_supported?: Array<string>;
279
+ userinfo_endpoint?: string;
280
+ }, Name>;
281
+ oidcStatusDiscovery: FunctionReference<"action", "internal", {
282
+ externalHost?: string;
283
+ runtimeOrigin?: string;
284
+ url: string;
285
+ }, {
286
+ authorization_endpoint: string;
287
+ id_token_signing_alg_values_supported?: Array<string>;
288
+ issuer: string;
289
+ jwks_uri: string;
290
+ token_endpoint: string;
291
+ token_endpoint_auth_methods_supported?: Array<string>;
292
+ userinfo_endpoint?: string;
293
+ }, Name>;
294
+ samlMetadata: FunctionReference<"action", "internal", {
295
+ externalHost?: string;
296
+ runtimeOrigin?: string;
297
+ url: string;
298
+ }, string, Name>;
299
+ };
300
+ create: FunctionReference<"mutation", "internal", {
301
+ config?: any;
302
+ extend?: any;
303
+ groupId: string;
304
+ name?: string;
305
+ protocol: "oidc" | "saml";
306
+ slug?: string;
307
+ status?: "draft" | "active" | "disabled";
308
+ }, string, Name>;
309
+ domain: {
310
+ create: FunctionReference<"mutation", "internal", {
311
+ connectionId: string;
312
+ domain: string;
313
+ groupId: string;
314
+ isPrimary?: boolean;
315
+ }, string, Name>;
316
+ list: FunctionReference<"query", "internal", {
317
+ connectionId: string;
318
+ limit?: number;
319
+ }, Array<{
320
+ _creationTime: number;
321
+ _id: string;
322
+ connectionId: string;
323
+ domain: string;
324
+ groupId: string;
325
+ isPrimary: boolean;
326
+ verifiedAt?: number;
327
+ }>, Name>;
328
+ remove: FunctionReference<"mutation", "internal", {
329
+ id: string;
330
+ }, null, Name>;
331
+ verification: {
332
+ get: FunctionReference<"query", "internal", {
333
+ domainId: string;
334
+ }, {
335
+ _creationTime: number;
336
+ _id: string;
337
+ connectionId: string;
338
+ domain: string;
339
+ domainId: string;
340
+ expiresAt: number;
341
+ groupId: string;
342
+ recordName: string;
343
+ requestedAt: number;
344
+ token: string;
345
+ tokenHash: string;
346
+ } | null, Name>;
347
+ remove: FunctionReference<"mutation", "internal", {
348
+ domainId: string;
349
+ }, null, Name>;
350
+ upsert: FunctionReference<"mutation", "internal", {
351
+ connectionId: string;
352
+ domain: string;
353
+ domainId: string;
354
+ expiresAt: number;
355
+ groupId: string;
356
+ recordName: string;
357
+ requestedAt: number;
358
+ token: string;
359
+ tokenHash: string;
360
+ }, string, Name>;
361
+ };
362
+ verify: FunctionReference<"mutation", "internal", {
363
+ id: string;
364
+ verifiedAt: number;
365
+ }, {
366
+ _creationTime: number;
367
+ _id: string;
368
+ connectionId: string;
369
+ domain: string;
370
+ groupId: string;
371
+ isPrimary: boolean;
372
+ verifiedAt?: number;
373
+ }, Name>;
374
+ };
375
+ get: FunctionReference<"query", "internal", {
376
+ domain?: string;
377
+ id?: string;
378
+ }, {
379
+ _creationTime: number;
380
+ _id: string;
381
+ config?: any;
382
+ extend?: any;
383
+ groupId: string;
384
+ name?: string;
385
+ protocol: "oidc" | "saml";
386
+ slug?: string;
387
+ status: "draft" | "active" | "disabled";
388
+ } | {
389
+ connection: {
390
+ _creationTime: number;
391
+ _id: string;
392
+ config?: any;
393
+ extend?: any;
394
+ groupId: string;
395
+ name?: string;
396
+ protocol: "oidc" | "saml";
397
+ slug?: string;
398
+ status: "draft" | "active" | "disabled";
399
+ };
400
+ domain: {
401
+ _creationTime: number;
402
+ _id: string;
403
+ connectionId: string;
404
+ domain: string;
405
+ groupId: string;
406
+ isPrimary: boolean;
407
+ verifiedAt?: number;
408
+ };
409
+ } | null, Name>;
410
+ list: FunctionReference<"query", "internal", {
411
+ order?: "asc" | "desc";
412
+ orderBy?: "_creationTime" | "name" | "slug" | "status";
413
+ paginationOpts: {
414
+ cursor: string | null;
415
+ endCursor?: string | null;
416
+ id?: number;
417
+ maximumBytesRead?: number;
418
+ maximumRowsRead?: number;
419
+ numItems: number;
420
+ };
421
+ where?: {
422
+ groupId?: string;
423
+ slug?: string;
424
+ status?: "draft" | "active" | "disabled";
425
+ };
426
+ }, {
427
+ continueCursor: string;
428
+ isDone: boolean;
429
+ page: Array<{
430
+ _creationTime: number;
431
+ _id: string;
432
+ config?: any;
433
+ extend?: any;
434
+ groupId: string;
435
+ name?: string;
436
+ protocol: "oidc" | "saml";
437
+ slug?: string;
438
+ status: "draft" | "active" | "disabled";
439
+ }>;
440
+ pageStatus?: "SplitRecommended" | "SplitRequired" | null;
441
+ splitCursor?: string | null;
442
+ }, Name>;
443
+ remove: FunctionReference<"mutation", "internal", {
444
+ id: string;
445
+ }, null, Name>;
446
+ saml: {
447
+ assertion: {
448
+ accept: FunctionReference<"mutation", "internal", {
449
+ assertionId: string;
450
+ connectionId: string;
451
+ expiresAt: number;
452
+ }, boolean, Name>;
453
+ };
454
+ request: {
455
+ accept: FunctionReference<"mutation", "internal", {
456
+ connectionId?: string;
457
+ now: number;
458
+ requestId: string;
459
+ }, boolean, Name>;
460
+ create: FunctionReference<"mutation", "internal", {
461
+ connectionId: string;
462
+ createdAt: number;
463
+ expiresAt: number;
464
+ requestId: string;
465
+ }, string, Name>;
466
+ };
467
+ };
468
+ scim: {
469
+ config: {
470
+ get: FunctionReference<"query", "internal", {
471
+ connectionId?: string;
472
+ tokenHash?: string;
473
+ }, {
474
+ _creationTime: number;
475
+ _id: string;
476
+ basePath: string;
477
+ connectionId: string;
478
+ extend?: any;
479
+ groupId: string;
480
+ lastRotatedAt?: number;
481
+ status: "draft" | "active" | "disabled";
482
+ tokenHash: string;
483
+ } | null, Name>;
484
+ upsert: FunctionReference<"mutation", "internal", {
485
+ basePath: string;
486
+ connectionId: string;
487
+ extend?: any;
488
+ groupId: string;
489
+ lastRotatedAt?: number;
490
+ status: "draft" | "active" | "disabled";
491
+ tokenHash: string;
492
+ }, string, Name>;
493
+ };
494
+ identity: {
495
+ get: FunctionReference<"query", "internal", {
496
+ connectionId?: string;
497
+ externalId?: string;
498
+ mappedGroupId?: string;
499
+ resourceType?: "user" | "group";
500
+ userId?: string;
501
+ userIds?: Array<string>;
502
+ }, {
503
+ _creationTime: number;
504
+ _id: string;
505
+ active?: boolean;
506
+ connectionId: string;
507
+ externalId: string;
508
+ groupId: string;
509
+ lastProvisionedAt?: number;
510
+ mappedGroupId?: string;
511
+ raw?: any;
512
+ resourceType: "user" | "group";
513
+ userId?: string;
514
+ } | null | Array<{
515
+ _creationTime: number;
516
+ _id: string;
517
+ active?: boolean;
518
+ connectionId: string;
519
+ externalId: string;
520
+ groupId: string;
521
+ lastProvisionedAt?: number;
522
+ mappedGroupId?: string;
523
+ raw?: any;
524
+ resourceType: "user" | "group";
525
+ userId?: string;
526
+ } | null>, Name>;
527
+ list: FunctionReference<"query", "internal", {
528
+ connectionId: string;
529
+ paginationOpts: {
530
+ cursor: string | null;
531
+ endCursor?: string | null;
532
+ id?: number;
533
+ maximumBytesRead?: number;
534
+ maximumRowsRead?: number;
535
+ numItems: number;
536
+ };
537
+ }, {
538
+ continueCursor: string;
539
+ isDone: boolean;
540
+ page: Array<{
541
+ _creationTime: number;
542
+ _id: string;
543
+ active?: boolean;
544
+ connectionId: string;
545
+ externalId: string;
546
+ groupId: string;
547
+ lastProvisionedAt?: number;
548
+ mappedGroupId?: string;
549
+ raw?: any;
550
+ resourceType: "user" | "group";
551
+ userId?: string;
552
+ }>;
553
+ pageStatus?: "SplitRecommended" | "SplitRequired" | null;
554
+ splitCursor?: string | null;
555
+ }, Name>;
556
+ provision: FunctionReference<"mutation", "internal", {
557
+ active?: boolean;
558
+ connectionId: string;
559
+ externalId: string;
560
+ groupId: string;
561
+ lastProvisionedAt?: number;
562
+ provider: string;
563
+ raw?: any;
564
+ userData: {
565
+ email?: string;
566
+ emailVerificationTime?: number;
567
+ extend?: any;
568
+ firstName?: string;
569
+ hasTotp?: boolean;
570
+ image?: string;
571
+ isAnonymous?: boolean;
572
+ lastActiveGroup?: string;
573
+ lastName?: string;
574
+ name?: string;
575
+ phone?: string;
576
+ phoneVerificationTime?: number;
577
+ };
578
+ }, {
579
+ created: boolean;
580
+ userId: string;
581
+ }, Name>;
582
+ remove: FunctionReference<"mutation", "internal", {
583
+ id: string;
584
+ }, null, Name>;
585
+ upsert: FunctionReference<"mutation", "internal", {
586
+ active?: boolean;
587
+ connectionId: string;
588
+ externalId: string;
589
+ groupId: string;
590
+ lastProvisionedAt?: number;
591
+ mappedGroupId?: string;
592
+ raw?: any;
593
+ resourceType: "user" | "group";
594
+ userId?: string;
595
+ }, string, Name>;
596
+ };
597
+ };
598
+ secret: {
599
+ get: FunctionReference<"query", "internal", {
600
+ connectionId: string;
601
+ kind: "oidc_client_secret";
602
+ }, {
603
+ _creationTime: number;
604
+ _id: string;
605
+ ciphertext: string;
606
+ connectionId: string;
607
+ groupId: string;
608
+ kind: "oidc_client_secret";
609
+ updatedAt: number;
610
+ } | null, Name>;
611
+ remove: FunctionReference<"mutation", "internal", {
612
+ connectionId: string;
613
+ kind: "oidc_client_secret";
614
+ }, null, Name>;
615
+ upsert: FunctionReference<"mutation", "internal", {
616
+ ciphertext: string;
617
+ connectionId: string;
618
+ groupId: string;
619
+ kind: "oidc_client_secret";
620
+ updatedAt: number;
621
+ }, string, Name>;
622
+ };
623
+ update: FunctionReference<"mutation", "internal", {
624
+ id: string;
625
+ patch: {
626
+ config?: any;
627
+ extend?: any;
628
+ name?: string;
629
+ slug?: string;
630
+ status?: "draft" | "active" | "disabled";
631
+ };
632
+ }, null, Name>;
633
+ webhook: {
634
+ delivery: {
635
+ create: FunctionReference<"mutation", "internal", {
636
+ connectionId: string;
637
+ endpointId: string;
638
+ eventId: string;
639
+ kind: "user.created" | "user.updated" | "session.signed_in" | "session.signed_out" | "session.invalidated" | "session.refresh_exchanged" | "session.refresh_reuse_detected" | "account.linked" | "account.unlinked" | "password.changed" | "passkey.added" | "passkey.removed" | "totp.enrolled" | "totp.removed" | "email.verified" | "phone.verified" | "api_key.created" | "api_key.revoked" | "oauth.client.created" | "oauth.client.revoked" | "oauth.code.created" | "oauth.token.created" | "oauth.token.exchanged" | "oauth.refresh.reuse_detected" | "oauth.refresh.revoked" | "connection.created" | "connection.updated" | "connection.removed" | "connection.login.succeeded" | "connection.login.failed" | "connection.domain.verification_requested" | "connection.domain.verified" | "connection.policy.updated" | "connection.saml.set" | "connection.saml.refreshed" | "connection.oidc.set" | "connection.scim.set" | "connection.scim.read" | "connection.scim.user.provisioned" | "connection.scim.user.updated" | "connection.scim.user.deactivated" | "connection.scim.user.reactivated" | "connection.scim.group.provisioned" | "connection.scim.group.updated" | "connection.scim.group.deactivated" | "connection.scim.group.reactivated" | "webhook.endpoint.created" | "webhook.endpoint.disabled" | "webhook.delivery.created" | "webhook.delivery.attempted" | "webhook.delivery.succeeded" | "webhook.delivery.failed";
640
+ nextAttemptAt: number;
641
+ payload: any;
642
+ signature: string;
643
+ signedAt: number;
644
+ }, string, Name>;
645
+ dueForDispatch: FunctionReference<"query", "internal", {
646
+ limit?: number;
647
+ now: number;
648
+ }, Array<{
649
+ _creationTime: number;
650
+ _id: string;
651
+ attemptCount: number;
652
+ auditEventId?: string;
653
+ connectionId: string;
654
+ endpointId: string;
655
+ eventId?: string;
656
+ eventType?: string;
657
+ kind?: "user.created" | "user.updated" | "session.signed_in" | "session.signed_out" | "session.invalidated" | "session.refresh_exchanged" | "session.refresh_reuse_detected" | "account.linked" | "account.unlinked" | "password.changed" | "passkey.added" | "passkey.removed" | "totp.enrolled" | "totp.removed" | "email.verified" | "phone.verified" | "api_key.created" | "api_key.revoked" | "oauth.client.created" | "oauth.client.revoked" | "oauth.code.created" | "oauth.token.created" | "oauth.token.exchanged" | "oauth.refresh.reuse_detected" | "oauth.refresh.revoked" | "connection.created" | "connection.updated" | "connection.removed" | "connection.login.succeeded" | "connection.login.failed" | "connection.domain.verification_requested" | "connection.domain.verified" | "connection.policy.updated" | "connection.saml.set" | "connection.saml.refreshed" | "connection.oidc.set" | "connection.scim.set" | "connection.scim.read" | "connection.scim.user.provisioned" | "connection.scim.user.updated" | "connection.scim.user.deactivated" | "connection.scim.user.reactivated" | "connection.scim.group.provisioned" | "connection.scim.group.updated" | "connection.scim.group.deactivated" | "connection.scim.group.reactivated" | "webhook.endpoint.created" | "webhook.endpoint.disabled" | "webhook.delivery.created" | "webhook.delivery.attempted" | "webhook.delivery.succeeded" | "webhook.delivery.failed";
658
+ lastAttemptAt?: number;
659
+ lastError?: string;
660
+ lastResponseStatus?: number;
661
+ nextAttemptAt: number;
662
+ payload: any;
663
+ signature?: string;
664
+ signedAt?: number;
665
+ status: "pending" | "processing" | "delivered" | "failed";
666
+ }>, Name>;
667
+ list: FunctionReference<"query", "internal", {
668
+ connectionId: string;
669
+ paginationOpts: {
670
+ cursor: string | null;
671
+ endCursor?: string | null;
672
+ id?: number;
673
+ maximumBytesRead?: number;
674
+ maximumRowsRead?: number;
675
+ numItems: number;
676
+ };
677
+ }, {
678
+ continueCursor: string;
679
+ isDone: boolean;
680
+ page: Array<{
681
+ _creationTime: number;
682
+ _id: string;
683
+ attemptCount: number;
684
+ connectionId: string;
685
+ endpointId: string;
686
+ eventId?: string;
687
+ kind?: "user.created" | "user.updated" | "session.signed_in" | "session.signed_out" | "session.invalidated" | "session.refresh_exchanged" | "session.refresh_reuse_detected" | "account.linked" | "account.unlinked" | "password.changed" | "passkey.added" | "passkey.removed" | "totp.enrolled" | "totp.removed" | "email.verified" | "phone.verified" | "api_key.created" | "api_key.revoked" | "oauth.client.created" | "oauth.client.revoked" | "oauth.code.created" | "oauth.token.created" | "oauth.token.exchanged" | "oauth.refresh.reuse_detected" | "oauth.refresh.revoked" | "connection.created" | "connection.updated" | "connection.removed" | "connection.login.succeeded" | "connection.login.failed" | "connection.domain.verification_requested" | "connection.domain.verified" | "connection.policy.updated" | "connection.saml.set" | "connection.saml.refreshed" | "connection.oidc.set" | "connection.scim.set" | "connection.scim.read" | "connection.scim.user.provisioned" | "connection.scim.user.updated" | "connection.scim.user.deactivated" | "connection.scim.user.reactivated" | "connection.scim.group.provisioned" | "connection.scim.group.updated" | "connection.scim.group.deactivated" | "connection.scim.group.reactivated" | "webhook.endpoint.created" | "webhook.endpoint.disabled" | "webhook.delivery.created" | "webhook.delivery.attempted" | "webhook.delivery.succeeded" | "webhook.delivery.failed";
688
+ lastAttemptAt?: number;
689
+ lastError?: string;
690
+ lastResponseStatus?: number;
691
+ nextAttemptAt: number;
692
+ signedAt?: number;
693
+ status: "pending" | "processing" | "delivered" | "failed";
694
+ }>;
695
+ pageStatus?: "SplitRecommended" | "SplitRequired" | null;
696
+ splitCursor?: string | null;
697
+ }, Name>;
698
+ update: FunctionReference<"mutation", "internal", {
699
+ id: string;
700
+ patch: {
701
+ attemptCount?: number;
702
+ lastAttemptAt?: number;
703
+ lastError?: string;
704
+ lastResponseStatus?: number;
705
+ nextAttemptAt?: number;
706
+ status?: "pending" | "processing" | "delivered" | "failed";
707
+ };
708
+ }, null, Name>;
709
+ };
710
+ endpoint: {
711
+ create: FunctionReference<"mutation", "internal", {
712
+ connectionId: string;
713
+ createdByUserId?: string;
714
+ extend?: any;
715
+ groupId: string;
716
+ secretCiphertext: string;
717
+ status?: "active" | "disabled";
718
+ subscriptions: Array<"user.created" | "user.updated" | "session.signed_in" | "session.signed_out" | "session.invalidated" | "session.refresh_exchanged" | "session.refresh_reuse_detected" | "account.linked" | "account.unlinked" | "password.changed" | "passkey.added" | "passkey.removed" | "totp.enrolled" | "totp.removed" | "email.verified" | "phone.verified" | "api_key.created" | "api_key.revoked" | "oauth.client.created" | "oauth.client.revoked" | "oauth.code.created" | "oauth.token.created" | "oauth.token.exchanged" | "oauth.refresh.reuse_detected" | "oauth.refresh.revoked" | "connection.created" | "connection.updated" | "connection.removed" | "connection.login.succeeded" | "connection.login.failed" | "connection.domain.verification_requested" | "connection.domain.verified" | "connection.policy.updated" | "connection.saml.set" | "connection.saml.refreshed" | "connection.oidc.set" | "connection.scim.set" | "connection.scim.read" | "connection.scim.user.provisioned" | "connection.scim.user.updated" | "connection.scim.user.deactivated" | "connection.scim.user.reactivated" | "connection.scim.group.provisioned" | "connection.scim.group.updated" | "connection.scim.group.deactivated" | "connection.scim.group.reactivated" | "webhook.endpoint.created" | "webhook.endpoint.disabled" | "webhook.delivery.created" | "webhook.delivery.attempted" | "webhook.delivery.succeeded" | "webhook.delivery.failed">;
719
+ url: string;
720
+ }, string, Name>;
721
+ get: FunctionReference<"query", "internal", {
722
+ id: string;
723
+ }, {
724
+ _creationTime: number;
725
+ _id: string;
726
+ connectionId: string;
727
+ createdByUserId?: string;
728
+ extend?: any;
729
+ failureCount: number;
730
+ groupId: string;
731
+ lastFailureAt?: number;
732
+ lastSuccessAt?: number;
733
+ secretCiphertext?: string;
734
+ secretHash?: string;
735
+ status: "active" | "disabled";
736
+ subscriptions: Array<string>;
737
+ url: string;
738
+ } | null, Name>;
739
+ list: FunctionReference<"query", "internal", {
740
+ connectionId: string;
741
+ }, Array<{
742
+ _creationTime: number;
743
+ _id: string;
744
+ connectionId: string;
745
+ createdByUserId?: string;
746
+ extend?: any;
747
+ failureCount: number;
748
+ groupId: string;
749
+ lastFailureAt?: number;
750
+ lastSuccessAt?: number;
751
+ secretCiphertext?: string;
752
+ secretHash?: string;
753
+ status: "active" | "disabled";
754
+ subscriptions: Array<string>;
755
+ url: string;
756
+ }>, Name>;
757
+ update: FunctionReference<"mutation", "internal", {
758
+ id: string;
759
+ patch: {
760
+ extend?: any;
761
+ failureCount?: number;
762
+ lastFailureAt?: number;
763
+ lastSuccessAt?: number;
764
+ secretCiphertext?: string;
765
+ status?: "active" | "disabled";
766
+ subscriptions?: Array<"user.created" | "user.updated" | "session.signed_in" | "session.signed_out" | "session.invalidated" | "session.refresh_exchanged" | "session.refresh_reuse_detected" | "account.linked" | "account.unlinked" | "password.changed" | "passkey.added" | "passkey.removed" | "totp.enrolled" | "totp.removed" | "email.verified" | "phone.verified" | "api_key.created" | "api_key.revoked" | "oauth.client.created" | "oauth.client.revoked" | "oauth.code.created" | "oauth.token.created" | "oauth.token.exchanged" | "oauth.refresh.reuse_detected" | "oauth.refresh.revoked" | "connection.created" | "connection.updated" | "connection.removed" | "connection.login.succeeded" | "connection.login.failed" | "connection.domain.verification_requested" | "connection.domain.verified" | "connection.policy.updated" | "connection.saml.set" | "connection.saml.refreshed" | "connection.oidc.set" | "connection.scim.set" | "connection.scim.read" | "connection.scim.user.provisioned" | "connection.scim.user.updated" | "connection.scim.user.deactivated" | "connection.scim.user.reactivated" | "connection.scim.group.provisioned" | "connection.scim.group.updated" | "connection.scim.group.deactivated" | "connection.scim.group.reactivated" | "webhook.endpoint.created" | "webhook.endpoint.disabled" | "webhook.delivery.created" | "webhook.delivery.attempted" | "webhook.delivery.succeeded" | "webhook.delivery.failed">;
767
+ url?: string;
768
+ };
769
+ }, null, Name>;
770
+ };
771
+ };
772
+ };
773
+ event: {
774
+ append: FunctionReference<"mutation", "internal", {
775
+ event: {
776
+ actor: {
777
+ id?: string;
778
+ type: "user" | "system" | "scim" | "api_key" | "oauth_client" | "webhook" | "anonymous";
779
+ };
780
+ category: "user" | "session" | "account" | "password" | "passkey" | "totp" | "email" | "phone" | "api_key" | "oauth" | "connection" | "scim" | "webhook" | "security";
781
+ data?: {
782
+ existingUserId?: string;
783
+ profile?: Record<string, any>;
784
+ provider?: string;
785
+ type?: string;
786
+ } | {
787
+ method?: string;
788
+ provider: string;
789
+ } | {
790
+ flow?: "reset" | "change";
791
+ reason?: string;
792
+ refreshTokenId?: string;
793
+ sessionId?: string;
794
+ userId?: string;
795
+ } | {
796
+ accountId?: string;
797
+ provider?: string;
798
+ providerAccountId?: string;
799
+ } | {
800
+ credentialId?: string;
801
+ keyId?: string;
802
+ name?: string;
803
+ passkeyId?: string;
804
+ prefix?: string;
805
+ reason?: string;
806
+ totpId?: string;
807
+ } | {
808
+ email?: string;
809
+ phone?: string;
810
+ userId?: string;
811
+ } | {
812
+ clientId?: string;
813
+ codeId?: string;
814
+ grantType?: string;
815
+ name?: string;
816
+ redirectUri?: string;
817
+ resource?: string;
818
+ scopes?: Array<string>;
819
+ userId?: string;
820
+ } | {
821
+ audience?: string | Array<string>;
822
+ changed?: Array<string>;
823
+ connectionId?: string;
824
+ discoveryUrl?: string;
825
+ domain?: string;
826
+ domains?: Array<string>;
827
+ errorCode?: string;
828
+ expiresAt?: number;
829
+ issuer?: string;
830
+ jwksUri?: string;
831
+ metadataUrl?: string;
832
+ protocol?: "oidc" | "saml";
833
+ recordName?: string;
834
+ tokenEndpointAuthMethod?: string;
835
+ userId?: string;
836
+ verifiedAt?: number;
837
+ version?: number;
838
+ } | {
839
+ active?: boolean;
840
+ externalId?: string;
841
+ groupId?: string;
842
+ operation?: string;
843
+ resourceId?: string;
844
+ resourceType?: "user" | "group";
845
+ scimConfigId?: string;
846
+ userId?: string;
847
+ } | {
848
+ attemptCount?: number;
849
+ deliveryId?: string;
850
+ endpointId?: string;
851
+ error?: string;
852
+ sourceEventId?: string;
853
+ sourceEventType?: "user.created" | "user.updated" | "session.signed_in" | "session.signed_out" | "session.invalidated" | "session.refresh_exchanged" | "session.refresh_reuse_detected" | "account.linked" | "account.unlinked" | "password.changed" | "passkey.added" | "passkey.removed" | "totp.enrolled" | "totp.removed" | "email.verified" | "phone.verified" | "api_key.created" | "api_key.revoked" | "oauth.client.created" | "oauth.client.revoked" | "oauth.code.created" | "oauth.token.created" | "oauth.token.exchanged" | "oauth.refresh.reuse_detected" | "oauth.refresh.revoked" | "connection.created" | "connection.updated" | "connection.removed" | "connection.login.succeeded" | "connection.login.failed" | "connection.domain.verification_requested" | "connection.domain.verified" | "connection.policy.updated" | "connection.saml.set" | "connection.saml.refreshed" | "connection.oidc.set" | "connection.scim.set" | "connection.scim.read" | "connection.scim.user.provisioned" | "connection.scim.user.updated" | "connection.scim.user.deactivated" | "connection.scim.user.reactivated" | "connection.scim.group.provisioned" | "connection.scim.group.updated" | "connection.scim.group.deactivated" | "connection.scim.group.reactivated" | "webhook.endpoint.created" | "webhook.endpoint.disabled" | "webhook.delivery.created" | "webhook.delivery.attempted" | "webhook.delivery.succeeded" | "webhook.delivery.failed";
854
+ status?: number;
855
+ };
856
+ errorCode?: string;
857
+ eventId: string;
858
+ kind: "user.created" | "user.updated" | "session.signed_in" | "session.signed_out" | "session.invalidated" | "session.refresh_exchanged" | "session.refresh_reuse_detected" | "account.linked" | "account.unlinked" | "password.changed" | "passkey.added" | "passkey.removed" | "totp.enrolled" | "totp.removed" | "email.verified" | "phone.verified" | "api_key.created" | "api_key.revoked" | "oauth.client.created" | "oauth.client.revoked" | "oauth.code.created" | "oauth.token.created" | "oauth.token.exchanged" | "oauth.refresh.reuse_detected" | "oauth.refresh.revoked" | "connection.created" | "connection.updated" | "connection.removed" | "connection.login.succeeded" | "connection.login.failed" | "connection.domain.verification_requested" | "connection.domain.verified" | "connection.policy.updated" | "connection.saml.set" | "connection.saml.refreshed" | "connection.oidc.set" | "connection.scim.set" | "connection.scim.read" | "connection.scim.user.provisioned" | "connection.scim.user.updated" | "connection.scim.user.deactivated" | "connection.scim.user.reactivated" | "connection.scim.group.provisioned" | "connection.scim.group.updated" | "connection.scim.group.deactivated" | "connection.scim.group.reactivated" | "webhook.endpoint.created" | "webhook.endpoint.disabled" | "webhook.delivery.created" | "webhook.delivery.attempted" | "webhook.delivery.succeeded" | "webhook.delivery.failed";
859
+ occurredAt: number;
860
+ outcome: "success" | "failure";
861
+ request?: {
862
+ ip?: string;
863
+ requestId?: string;
864
+ userAgent?: string;
865
+ };
866
+ subject: {
867
+ id?: string;
868
+ type: "user" | "session" | "account" | "passkey" | "totp" | "email" | "phone" | "api_key" | "oauth_client" | "oauth_code" | "group" | "connection" | "scim_identity" | "webhook_endpoint" | "webhook_delivery" | "system";
869
+ };
870
+ targets: Array<{
871
+ id: string;
872
+ kind: "user" | "session" | "group" | "connection" | "oauth_client" | "api_key" | "global";
873
+ }>;
874
+ };
875
+ idempotencyKey?: string;
876
+ targets?: Array<{
877
+ id: string;
878
+ kind: "user" | "session" | "group" | "connection" | "oauth_client" | "api_key" | "global";
879
+ }>;
880
+ }, {
881
+ created: boolean;
882
+ createdTargets: Array<{
883
+ id: string;
884
+ kind: "user" | "session" | "group" | "connection" | "oauth_client" | "api_key" | "global";
885
+ }>;
886
+ eventId: string;
887
+ projections: Array<{
888
+ _creationTime: number;
889
+ _id: string;
890
+ actorId?: string;
891
+ actorType: "user" | "system" | "scim" | "api_key" | "oauth_client" | "webhook" | "anonymous";
892
+ category: "user" | "session" | "account" | "password" | "passkey" | "totp" | "email" | "phone" | "api_key" | "oauth" | "connection" | "scim" | "webhook" | "security";
893
+ data?: {
894
+ existingUserId?: string;
895
+ profile?: Record<string, any>;
896
+ provider?: string;
897
+ type?: string;
898
+ } | {
899
+ method?: string;
900
+ provider: string;
901
+ } | {
902
+ flow?: "reset" | "change";
903
+ reason?: string;
904
+ refreshTokenId?: string;
905
+ sessionId?: string;
906
+ userId?: string;
907
+ } | {
908
+ accountId?: string;
909
+ provider?: string;
910
+ providerAccountId?: string;
911
+ } | {
912
+ credentialId?: string;
913
+ keyId?: string;
914
+ name?: string;
915
+ passkeyId?: string;
916
+ prefix?: string;
917
+ reason?: string;
918
+ totpId?: string;
919
+ } | {
920
+ email?: string;
921
+ phone?: string;
922
+ userId?: string;
923
+ } | {
924
+ clientId?: string;
925
+ codeId?: string;
926
+ grantType?: string;
927
+ name?: string;
928
+ redirectUri?: string;
929
+ resource?: string;
930
+ scopes?: Array<string>;
931
+ userId?: string;
932
+ } | {
933
+ audience?: string | Array<string>;
934
+ changed?: Array<string>;
935
+ connectionId?: string;
936
+ discoveryUrl?: string;
937
+ domain?: string;
938
+ domains?: Array<string>;
939
+ errorCode?: string;
940
+ expiresAt?: number;
941
+ issuer?: string;
942
+ jwksUri?: string;
943
+ metadataUrl?: string;
944
+ protocol?: "oidc" | "saml";
945
+ recordName?: string;
946
+ tokenEndpointAuthMethod?: string;
947
+ userId?: string;
948
+ verifiedAt?: number;
949
+ version?: number;
950
+ } | {
951
+ active?: boolean;
952
+ externalId?: string;
953
+ groupId?: string;
954
+ operation?: string;
955
+ resourceId?: string;
956
+ resourceType?: "user" | "group";
957
+ scimConfigId?: string;
958
+ userId?: string;
959
+ } | {
960
+ attemptCount?: number;
961
+ deliveryId?: string;
962
+ endpointId?: string;
963
+ error?: string;
964
+ sourceEventId?: string;
965
+ sourceEventType?: "user.created" | "user.updated" | "session.signed_in" | "session.signed_out" | "session.invalidated" | "session.refresh_exchanged" | "session.refresh_reuse_detected" | "account.linked" | "account.unlinked" | "password.changed" | "passkey.added" | "passkey.removed" | "totp.enrolled" | "totp.removed" | "email.verified" | "phone.verified" | "api_key.created" | "api_key.revoked" | "oauth.client.created" | "oauth.client.revoked" | "oauth.code.created" | "oauth.token.created" | "oauth.token.exchanged" | "oauth.refresh.reuse_detected" | "oauth.refresh.revoked" | "connection.created" | "connection.updated" | "connection.removed" | "connection.login.succeeded" | "connection.login.failed" | "connection.domain.verification_requested" | "connection.domain.verified" | "connection.policy.updated" | "connection.saml.set" | "connection.saml.refreshed" | "connection.oidc.set" | "connection.scim.set" | "connection.scim.read" | "connection.scim.user.provisioned" | "connection.scim.user.updated" | "connection.scim.user.deactivated" | "connection.scim.user.reactivated" | "connection.scim.group.provisioned" | "connection.scim.group.updated" | "connection.scim.group.deactivated" | "connection.scim.group.reactivated" | "webhook.endpoint.created" | "webhook.endpoint.disabled" | "webhook.delivery.created" | "webhook.delivery.attempted" | "webhook.delivery.succeeded" | "webhook.delivery.failed";
966
+ status?: number;
967
+ };
968
+ errorCode?: string;
969
+ eventId: string;
970
+ ip?: string;
971
+ kind: "user.created" | "user.updated" | "session.signed_in" | "session.signed_out" | "session.invalidated" | "session.refresh_exchanged" | "session.refresh_reuse_detected" | "account.linked" | "account.unlinked" | "password.changed" | "passkey.added" | "passkey.removed" | "totp.enrolled" | "totp.removed" | "email.verified" | "phone.verified" | "api_key.created" | "api_key.revoked" | "oauth.client.created" | "oauth.client.revoked" | "oauth.code.created" | "oauth.token.created" | "oauth.token.exchanged" | "oauth.refresh.reuse_detected" | "oauth.refresh.revoked" | "connection.created" | "connection.updated" | "connection.removed" | "connection.login.succeeded" | "connection.login.failed" | "connection.domain.verification_requested" | "connection.domain.verified" | "connection.policy.updated" | "connection.saml.set" | "connection.saml.refreshed" | "connection.oidc.set" | "connection.scim.set" | "connection.scim.read" | "connection.scim.user.provisioned" | "connection.scim.user.updated" | "connection.scim.user.deactivated" | "connection.scim.user.reactivated" | "connection.scim.group.provisioned" | "connection.scim.group.updated" | "connection.scim.group.deactivated" | "connection.scim.group.reactivated" | "webhook.endpoint.created" | "webhook.endpoint.disabled" | "webhook.delivery.created" | "webhook.delivery.attempted" | "webhook.delivery.succeeded" | "webhook.delivery.failed";
972
+ occurredAt: number;
973
+ outcome: "success" | "failure";
974
+ requestId?: string;
975
+ subjectId?: string;
976
+ subjectType: "user" | "session" | "account" | "passkey" | "totp" | "email" | "phone" | "api_key" | "oauth_client" | "oauth_code" | "group" | "connection" | "scim_identity" | "webhook_endpoint" | "webhook_delivery" | "system";
977
+ targetId: string;
978
+ targetKind: "user" | "session" | "group" | "connection" | "oauth_client" | "api_key" | "global";
979
+ }>;
980
+ }, Name>;
981
+ get: FunctionReference<"query", "internal", {
982
+ id: string;
983
+ }, {
984
+ _creationTime: number;
985
+ _id: string;
986
+ actorId?: string;
987
+ actorType: "user" | "system" | "scim" | "api_key" | "oauth_client" | "webhook" | "anonymous";
988
+ category: "user" | "session" | "account" | "password" | "passkey" | "totp" | "email" | "phone" | "api_key" | "oauth" | "connection" | "scim" | "webhook" | "security";
989
+ data?: {
990
+ existingUserId?: string;
991
+ profile?: Record<string, any>;
992
+ provider?: string;
993
+ type?: string;
994
+ } | {
995
+ method?: string;
996
+ provider: string;
997
+ } | {
998
+ flow?: "reset" | "change";
999
+ reason?: string;
1000
+ refreshTokenId?: string;
1001
+ sessionId?: string;
1002
+ userId?: string;
1003
+ } | {
1004
+ accountId?: string;
1005
+ provider?: string;
1006
+ providerAccountId?: string;
1007
+ } | {
1008
+ credentialId?: string;
1009
+ keyId?: string;
1010
+ name?: string;
1011
+ passkeyId?: string;
1012
+ prefix?: string;
1013
+ reason?: string;
1014
+ totpId?: string;
1015
+ } | {
1016
+ email?: string;
1017
+ phone?: string;
1018
+ userId?: string;
1019
+ } | {
1020
+ clientId?: string;
1021
+ codeId?: string;
1022
+ grantType?: string;
1023
+ name?: string;
1024
+ redirectUri?: string;
1025
+ resource?: string;
1026
+ scopes?: Array<string>;
1027
+ userId?: string;
1028
+ } | {
1029
+ audience?: string | Array<string>;
1030
+ changed?: Array<string>;
1031
+ connectionId?: string;
1032
+ discoveryUrl?: string;
1033
+ domain?: string;
1034
+ domains?: Array<string>;
1035
+ errorCode?: string;
1036
+ expiresAt?: number;
1037
+ issuer?: string;
1038
+ jwksUri?: string;
1039
+ metadataUrl?: string;
1040
+ protocol?: "oidc" | "saml";
1041
+ recordName?: string;
1042
+ tokenEndpointAuthMethod?: string;
1043
+ userId?: string;
1044
+ verifiedAt?: number;
1045
+ version?: number;
1046
+ } | {
1047
+ active?: boolean;
1048
+ externalId?: string;
1049
+ groupId?: string;
1050
+ operation?: string;
1051
+ resourceId?: string;
1052
+ resourceType?: "user" | "group";
1053
+ scimConfigId?: string;
1054
+ userId?: string;
1055
+ } | {
1056
+ attemptCount?: number;
1057
+ deliveryId?: string;
1058
+ endpointId?: string;
1059
+ error?: string;
1060
+ sourceEventId?: string;
1061
+ sourceEventType?: "user.created" | "user.updated" | "session.signed_in" | "session.signed_out" | "session.invalidated" | "session.refresh_exchanged" | "session.refresh_reuse_detected" | "account.linked" | "account.unlinked" | "password.changed" | "passkey.added" | "passkey.removed" | "totp.enrolled" | "totp.removed" | "email.verified" | "phone.verified" | "api_key.created" | "api_key.revoked" | "oauth.client.created" | "oauth.client.revoked" | "oauth.code.created" | "oauth.token.created" | "oauth.token.exchanged" | "oauth.refresh.reuse_detected" | "oauth.refresh.revoked" | "connection.created" | "connection.updated" | "connection.removed" | "connection.login.succeeded" | "connection.login.failed" | "connection.domain.verification_requested" | "connection.domain.verified" | "connection.policy.updated" | "connection.saml.set" | "connection.saml.refreshed" | "connection.oidc.set" | "connection.scim.set" | "connection.scim.read" | "connection.scim.user.provisioned" | "connection.scim.user.updated" | "connection.scim.user.deactivated" | "connection.scim.user.reactivated" | "connection.scim.group.provisioned" | "connection.scim.group.updated" | "connection.scim.group.deactivated" | "connection.scim.group.reactivated" | "webhook.endpoint.created" | "webhook.endpoint.disabled" | "webhook.delivery.created" | "webhook.delivery.attempted" | "webhook.delivery.succeeded" | "webhook.delivery.failed";
1062
+ status?: number;
1063
+ };
1064
+ errorCode?: string;
1065
+ eventId: string;
1066
+ ip?: string;
1067
+ kind: "user.created" | "user.updated" | "session.signed_in" | "session.signed_out" | "session.invalidated" | "session.refresh_exchanged" | "session.refresh_reuse_detected" | "account.linked" | "account.unlinked" | "password.changed" | "passkey.added" | "passkey.removed" | "totp.enrolled" | "totp.removed" | "email.verified" | "phone.verified" | "api_key.created" | "api_key.revoked" | "oauth.client.created" | "oauth.client.revoked" | "oauth.code.created" | "oauth.token.created" | "oauth.token.exchanged" | "oauth.refresh.reuse_detected" | "oauth.refresh.revoked" | "connection.created" | "connection.updated" | "connection.removed" | "connection.login.succeeded" | "connection.login.failed" | "connection.domain.verification_requested" | "connection.domain.verified" | "connection.policy.updated" | "connection.saml.set" | "connection.saml.refreshed" | "connection.oidc.set" | "connection.scim.set" | "connection.scim.read" | "connection.scim.user.provisioned" | "connection.scim.user.updated" | "connection.scim.user.deactivated" | "connection.scim.user.reactivated" | "connection.scim.group.provisioned" | "connection.scim.group.updated" | "connection.scim.group.deactivated" | "connection.scim.group.reactivated" | "webhook.endpoint.created" | "webhook.endpoint.disabled" | "webhook.delivery.created" | "webhook.delivery.attempted" | "webhook.delivery.succeeded" | "webhook.delivery.failed";
1068
+ occurredAt: number;
1069
+ outcome: "success" | "failure";
1070
+ requestId?: string;
1071
+ subjectId?: string;
1072
+ subjectType: "user" | "session" | "account" | "passkey" | "totp" | "email" | "phone" | "api_key" | "oauth_client" | "oauth_code" | "group" | "connection" | "scim_identity" | "webhook_endpoint" | "webhook_delivery" | "system";
1073
+ targetId: string;
1074
+ targetKind: "user" | "session" | "group" | "connection" | "oauth_client" | "api_key" | "global";
1075
+ } | null, Name>;
1076
+ list: FunctionReference<"query", "internal", {
1077
+ order?: "asc" | "desc";
1078
+ paginationOpts: {
1079
+ cursor: string | null;
1080
+ endCursor?: string | null;
1081
+ id?: number;
1082
+ maximumBytesRead?: number;
1083
+ maximumRowsRead?: number;
1084
+ numItems: number;
1085
+ };
1086
+ where: {
1087
+ actor?: {
1088
+ id?: string;
1089
+ type: "user" | "system" | "scim" | "api_key" | "oauth_client" | "webhook" | "anonymous";
1090
+ };
1091
+ category?: "user" | "session" | "account" | "password" | "passkey" | "totp" | "email" | "phone" | "api_key" | "oauth" | "connection" | "scim" | "webhook" | "security";
1092
+ kind?: "user.created" | "user.updated" | "session.signed_in" | "session.signed_out" | "session.invalidated" | "session.refresh_exchanged" | "session.refresh_reuse_detected" | "account.linked" | "account.unlinked" | "password.changed" | "passkey.added" | "passkey.removed" | "totp.enrolled" | "totp.removed" | "email.verified" | "phone.verified" | "api_key.created" | "api_key.revoked" | "oauth.client.created" | "oauth.client.revoked" | "oauth.code.created" | "oauth.token.created" | "oauth.token.exchanged" | "oauth.refresh.reuse_detected" | "oauth.refresh.revoked" | "connection.created" | "connection.updated" | "connection.removed" | "connection.login.succeeded" | "connection.login.failed" | "connection.domain.verification_requested" | "connection.domain.verified" | "connection.policy.updated" | "connection.saml.set" | "connection.saml.refreshed" | "connection.oidc.set" | "connection.scim.set" | "connection.scim.read" | "connection.scim.user.provisioned" | "connection.scim.user.updated" | "connection.scim.user.deactivated" | "connection.scim.user.reactivated" | "connection.scim.group.provisioned" | "connection.scim.group.updated" | "connection.scim.group.deactivated" | "connection.scim.group.reactivated" | "webhook.endpoint.created" | "webhook.endpoint.disabled" | "webhook.delivery.created" | "webhook.delivery.attempted" | "webhook.delivery.succeeded" | "webhook.delivery.failed";
1093
+ occurredAtGt?: number;
1094
+ occurredAtGte?: number;
1095
+ occurredAtLt?: number;
1096
+ occurredAtLte?: number;
1097
+ outcome?: "success" | "failure";
1098
+ requestId?: string;
1099
+ subject?: {
1100
+ id?: string;
1101
+ type: "user" | "session" | "account" | "passkey" | "totp" | "email" | "phone" | "api_key" | "oauth_client" | "oauth_code" | "group" | "connection" | "scim_identity" | "webhook_endpoint" | "webhook_delivery" | "system";
1102
+ };
1103
+ target?: {
1104
+ id: string;
1105
+ kind: "user" | "session" | "group" | "connection" | "oauth_client" | "api_key" | "global";
1106
+ };
1107
+ };
1108
+ }, {
1109
+ continueCursor: string;
1110
+ isDone: boolean;
1111
+ page: Array<{
1112
+ _creationTime: number;
1113
+ _id: string;
1114
+ actorId?: string;
1115
+ actorType: "user" | "system" | "scim" | "api_key" | "oauth_client" | "webhook" | "anonymous";
1116
+ category: "user" | "session" | "account" | "password" | "passkey" | "totp" | "email" | "phone" | "api_key" | "oauth" | "connection" | "scim" | "webhook" | "security";
1117
+ data?: {
1118
+ existingUserId?: string;
1119
+ profile?: Record<string, any>;
1120
+ provider?: string;
1121
+ type?: string;
1122
+ } | {
1123
+ method?: string;
1124
+ provider: string;
1125
+ } | {
1126
+ flow?: "reset" | "change";
1127
+ reason?: string;
1128
+ refreshTokenId?: string;
1129
+ sessionId?: string;
1130
+ userId?: string;
1131
+ } | {
1132
+ accountId?: string;
1133
+ provider?: string;
1134
+ providerAccountId?: string;
1135
+ } | {
1136
+ credentialId?: string;
1137
+ keyId?: string;
1138
+ name?: string;
1139
+ passkeyId?: string;
1140
+ prefix?: string;
1141
+ reason?: string;
1142
+ totpId?: string;
1143
+ } | {
1144
+ email?: string;
1145
+ phone?: string;
1146
+ userId?: string;
1147
+ } | {
1148
+ clientId?: string;
1149
+ codeId?: string;
1150
+ grantType?: string;
1151
+ name?: string;
1152
+ redirectUri?: string;
1153
+ resource?: string;
1154
+ scopes?: Array<string>;
1155
+ userId?: string;
1156
+ } | {
1157
+ audience?: string | Array<string>;
1158
+ changed?: Array<string>;
1159
+ connectionId?: string;
1160
+ discoveryUrl?: string;
1161
+ domain?: string;
1162
+ domains?: Array<string>;
1163
+ errorCode?: string;
1164
+ expiresAt?: number;
1165
+ issuer?: string;
1166
+ jwksUri?: string;
1167
+ metadataUrl?: string;
1168
+ protocol?: "oidc" | "saml";
1169
+ recordName?: string;
1170
+ tokenEndpointAuthMethod?: string;
1171
+ userId?: string;
1172
+ verifiedAt?: number;
1173
+ version?: number;
1174
+ } | {
1175
+ active?: boolean;
1176
+ externalId?: string;
1177
+ groupId?: string;
1178
+ operation?: string;
1179
+ resourceId?: string;
1180
+ resourceType?: "user" | "group";
1181
+ scimConfigId?: string;
1182
+ userId?: string;
1183
+ } | {
1184
+ attemptCount?: number;
1185
+ deliveryId?: string;
1186
+ endpointId?: string;
1187
+ error?: string;
1188
+ sourceEventId?: string;
1189
+ sourceEventType?: "user.created" | "user.updated" | "session.signed_in" | "session.signed_out" | "session.invalidated" | "session.refresh_exchanged" | "session.refresh_reuse_detected" | "account.linked" | "account.unlinked" | "password.changed" | "passkey.added" | "passkey.removed" | "totp.enrolled" | "totp.removed" | "email.verified" | "phone.verified" | "api_key.created" | "api_key.revoked" | "oauth.client.created" | "oauth.client.revoked" | "oauth.code.created" | "oauth.token.created" | "oauth.token.exchanged" | "oauth.refresh.reuse_detected" | "oauth.refresh.revoked" | "connection.created" | "connection.updated" | "connection.removed" | "connection.login.succeeded" | "connection.login.failed" | "connection.domain.verification_requested" | "connection.domain.verified" | "connection.policy.updated" | "connection.saml.set" | "connection.saml.refreshed" | "connection.oidc.set" | "connection.scim.set" | "connection.scim.read" | "connection.scim.user.provisioned" | "connection.scim.user.updated" | "connection.scim.user.deactivated" | "connection.scim.user.reactivated" | "connection.scim.group.provisioned" | "connection.scim.group.updated" | "connection.scim.group.deactivated" | "connection.scim.group.reactivated" | "webhook.endpoint.created" | "webhook.endpoint.disabled" | "webhook.delivery.created" | "webhook.delivery.attempted" | "webhook.delivery.succeeded" | "webhook.delivery.failed";
1190
+ status?: number;
1191
+ };
1192
+ errorCode?: string;
1193
+ eventId: string;
1194
+ ip?: string;
1195
+ kind: "user.created" | "user.updated" | "session.signed_in" | "session.signed_out" | "session.invalidated" | "session.refresh_exchanged" | "session.refresh_reuse_detected" | "account.linked" | "account.unlinked" | "password.changed" | "passkey.added" | "passkey.removed" | "totp.enrolled" | "totp.removed" | "email.verified" | "phone.verified" | "api_key.created" | "api_key.revoked" | "oauth.client.created" | "oauth.client.revoked" | "oauth.code.created" | "oauth.token.created" | "oauth.token.exchanged" | "oauth.refresh.reuse_detected" | "oauth.refresh.revoked" | "connection.created" | "connection.updated" | "connection.removed" | "connection.login.succeeded" | "connection.login.failed" | "connection.domain.verification_requested" | "connection.domain.verified" | "connection.policy.updated" | "connection.saml.set" | "connection.saml.refreshed" | "connection.oidc.set" | "connection.scim.set" | "connection.scim.read" | "connection.scim.user.provisioned" | "connection.scim.user.updated" | "connection.scim.user.deactivated" | "connection.scim.user.reactivated" | "connection.scim.group.provisioned" | "connection.scim.group.updated" | "connection.scim.group.deactivated" | "connection.scim.group.reactivated" | "webhook.endpoint.created" | "webhook.endpoint.disabled" | "webhook.delivery.created" | "webhook.delivery.attempted" | "webhook.delivery.succeeded" | "webhook.delivery.failed";
1196
+ occurredAt: number;
1197
+ outcome: "success" | "failure";
1198
+ requestId?: string;
1199
+ subjectId?: string;
1200
+ subjectType: "user" | "session" | "account" | "passkey" | "totp" | "email" | "phone" | "api_key" | "oauth_client" | "oauth_code" | "group" | "connection" | "scim_identity" | "webhook_endpoint" | "webhook_delivery" | "system";
1201
+ targetId: string;
1202
+ targetKind: "user" | "session" | "group" | "connection" | "oauth_client" | "api_key" | "global";
1203
+ }>;
1204
+ pageStatus?: "SplitRecommended" | "SplitRequired" | null;
1205
+ splitCursor?: string | null;
1206
+ }, Name>;
1207
+ };
1208
+ factor: {
1209
+ device: {
1210
+ accept: FunctionReference<"mutation", "internal", {
1211
+ deviceCodeHash: string;
1212
+ now: number;
1213
+ }, {
1214
+ sessionId: string;
1215
+ userId: string;
1216
+ } | null, Name>;
1217
+ authorize: FunctionReference<"mutation", "internal", {
1218
+ id: string;
1219
+ now: number;
1220
+ sessionExpirationTime: number;
1221
+ userId: string;
1222
+ }, {
1223
+ sessionId?: string;
1224
+ transitioned: boolean;
1225
+ }, Name>;
1226
+ create: FunctionReference<"mutation", "internal", {
1227
+ deviceCodeHash: string;
1228
+ expiresAt: number;
1229
+ interval: number;
1230
+ status: "pending" | "authorized" | "denied";
1231
+ userCode: string;
1232
+ }, string, Name>;
1233
+ get: FunctionReference<"query", "internal", {
1234
+ deviceCodeHash?: string;
1235
+ id?: string;
1236
+ userCode?: string;
1237
+ }, {
1238
+ _creationTime: number;
1239
+ _id: string;
1240
+ deviceCodeHash: string;
1241
+ expiresAt: number;
1242
+ interval: number;
1243
+ lastPolledAt?: number;
1244
+ sessionId?: string;
1245
+ status: "pending" | "authorized" | "denied";
1246
+ userCode: string;
1247
+ userId?: string;
1248
+ } | null, Name>;
1249
+ remove: FunctionReference<"mutation", "internal", {
1250
+ id: string;
1251
+ }, null, Name>;
1252
+ update: FunctionReference<"mutation", "internal", {
1253
+ id: string;
1254
+ patch: {
1255
+ lastPolledAt?: number;
1256
+ sessionId?: string;
1257
+ status?: "pending" | "authorized" | "denied";
1258
+ userId?: string;
1259
+ };
1260
+ }, null, Name>;
1261
+ };
1262
+ passkey: {
1263
+ acceptAssertion: FunctionReference<"mutation", "internal", {
1264
+ backedUp: boolean;
1265
+ counter: number;
1266
+ id: string;
1267
+ lastUsedAt: number;
1268
+ }, boolean, Name>;
1269
+ beginAssertion: FunctionReference<"mutation", "internal", {
1270
+ credentialId: string;
1271
+ expectedChallenge: string;
1272
+ verifierId: string;
1273
+ }, {
1274
+ passkey: {
1275
+ _creationTime: number;
1276
+ _id: string;
1277
+ algorithm: number;
1278
+ attestation?: {
1279
+ aaguid: string;
1280
+ format: string;
1281
+ metadataDescription?: string;
1282
+ status: "trusted";
1283
+ verifiedAt: number;
1284
+ verifier: string;
1285
+ };
1286
+ backedUp: boolean;
1287
+ counter: number;
1288
+ createdAt: number;
1289
+ credentialId: string;
1290
+ deviceType: string;
1291
+ lastUsedAt?: number;
1292
+ name?: string;
1293
+ publicKey: ArrayBuffer;
1294
+ transports?: Array<string>;
1295
+ userId: string;
1296
+ } | null;
1297
+ verifierAccepted: boolean;
1298
+ }, Name>;
1299
+ beginRegistration: FunctionReference<"mutation", "internal", {
1300
+ expirationTime: number;
1301
+ sessionId?: string;
1302
+ signature: string;
1303
+ userId: string;
1304
+ }, {
1305
+ credentials: Array<{
1306
+ id: string;
1307
+ transports?: Array<string>;
1308
+ }>;
1309
+ user: {
1310
+ email?: string;
1311
+ name?: string;
1312
+ };
1313
+ verifierId: string;
1314
+ }, Name>;
1315
+ beginSignIn: FunctionReference<"mutation", "internal", {
1316
+ expirationTime: number;
1317
+ sessionId?: string;
1318
+ signature: string;
1319
+ verifiedEmail?: string;
1320
+ }, {
1321
+ credentialIds: Array<string>;
1322
+ verifierId: string;
1323
+ }, Name>;
1324
+ completeAssertion: FunctionReference<"mutation", "internal", {
1325
+ backedUp: boolean;
1326
+ counter: number;
1327
+ id: string;
1328
+ lastUsedAt: number;
1329
+ refreshTokenExpirationTime: number;
1330
+ replaceSessionId?: string;
1331
+ sessionExpirationTime: number;
1332
+ }, {
1333
+ status: "rejected";
1334
+ } | {
1335
+ refreshTokenId: string;
1336
+ replacedSessionId?: string;
1337
+ sessionId: string;
1338
+ status: "accepted";
1339
+ user: {
1340
+ _creationTime: number;
1341
+ _id: string;
1342
+ email?: string;
1343
+ emailVerificationTime?: number;
1344
+ extend?: any;
1345
+ firstName?: string;
1346
+ hasTotp?: boolean;
1347
+ image?: string;
1348
+ isAnonymous?: boolean;
1349
+ lastActiveGroup?: string;
1350
+ lastName?: string;
1351
+ name?: string;
1352
+ phone?: string;
1353
+ phoneVerificationTime?: number;
1354
+ };
1355
+ }, Name>;
1356
+ completeRegistration: FunctionReference<"mutation", "internal", {
1357
+ algorithm: number;
1358
+ attestation?: {
1359
+ aaguid: string;
1360
+ format: string;
1361
+ metadataDescription?: string;
1362
+ status: "trusted";
1363
+ verifiedAt: number;
1364
+ verifier: string;
1365
+ };
1366
+ backedUp: boolean;
1367
+ counter: number;
1368
+ createdAt: number;
1369
+ credentialId: string;
1370
+ deviceType: string;
1371
+ name?: string;
1372
+ publicKey: ArrayBuffer;
1373
+ refreshTokenExpirationTime: number;
1374
+ replaceSessionId?: string;
1375
+ sessionExpirationTime: number;
1376
+ transports?: Array<string>;
1377
+ userId: string;
1378
+ }, {
1379
+ passkeyId: string;
1380
+ refreshTokenId: string;
1381
+ replacedSessionId?: string;
1382
+ sessionId: string;
1383
+ user: {
1384
+ _creationTime: number;
1385
+ _id: string;
1386
+ email?: string;
1387
+ emailVerificationTime?: number;
1388
+ extend?: any;
1389
+ firstName?: string;
1390
+ hasTotp?: boolean;
1391
+ image?: string;
1392
+ isAnonymous?: boolean;
1393
+ lastActiveGroup?: string;
1394
+ lastName?: string;
1395
+ name?: string;
1396
+ phone?: string;
1397
+ phoneVerificationTime?: number;
1398
+ };
1399
+ }, Name>;
1400
+ create: FunctionReference<"mutation", "internal", {
1401
+ algorithm: number;
1402
+ attestation?: {
1403
+ aaguid: string;
1404
+ format: string;
1405
+ metadataDescription?: string;
1406
+ status: "trusted";
1407
+ verifiedAt: number;
1408
+ verifier: string;
1409
+ };
1410
+ backedUp: boolean;
1411
+ counter: number;
1412
+ createdAt: number;
1413
+ credentialId: string;
1414
+ deviceType: string;
1415
+ name?: string;
1416
+ publicKey: ArrayBuffer;
1417
+ transports?: Array<string>;
1418
+ userId: string;
1419
+ }, string, Name>;
1420
+ get: FunctionReference<"query", "internal", {
1421
+ credentialId?: string;
1422
+ id?: string;
1423
+ }, {
1424
+ _creationTime: number;
1425
+ _id: string;
1426
+ algorithm: number;
1427
+ attestation?: {
1428
+ aaguid: string;
1429
+ format: string;
1430
+ metadataDescription?: string;
1431
+ status: "trusted";
1432
+ verifiedAt: number;
1433
+ verifier: string;
1434
+ };
1435
+ backedUp: boolean;
1436
+ counter: number;
1437
+ createdAt: number;
1438
+ credentialId: string;
1439
+ deviceType: string;
1440
+ lastUsedAt?: number;
1441
+ name?: string;
1442
+ publicKey: ArrayBuffer;
1443
+ transports?: Array<string>;
1444
+ userId: string;
1445
+ } | null, Name>;
1446
+ list: FunctionReference<"query", "internal", {
1447
+ userId: string;
1448
+ }, Array<{
1449
+ _creationTime: number;
1450
+ _id: string;
1451
+ algorithm: number;
1452
+ attestation?: {
1453
+ aaguid: string;
1454
+ format: string;
1455
+ metadataDescription?: string;
1456
+ status: "trusted";
1457
+ verifiedAt: number;
1458
+ verifier: string;
1459
+ };
1460
+ backedUp: boolean;
1461
+ counter: number;
1462
+ createdAt: number;
1463
+ credentialId: string;
1464
+ deviceType: string;
1465
+ lastUsedAt?: number;
1466
+ name?: string;
1467
+ publicKey: ArrayBuffer;
1468
+ transports?: Array<string>;
1469
+ userId: string;
1470
+ }>, Name>;
1471
+ remove: FunctionReference<"mutation", "internal", {
1472
+ id: string;
1473
+ requireOtherAccount?: boolean;
1474
+ userId?: string;
1475
+ }, null, Name>;
1476
+ update: FunctionReference<"mutation", "internal", {
1477
+ id: string;
1478
+ patch: {
1479
+ backedUp?: boolean;
1480
+ counter?: number;
1481
+ lastUsedAt?: number;
1482
+ name?: string;
1483
+ transports?: Array<string>;
1484
+ };
1485
+ userId?: string;
1486
+ }, null, Name>;
1487
+ };
1488
+ totp: {
1489
+ beginVerification: FunctionReference<"mutation", "internal", {
1490
+ authenticatedUserId?: string;
1491
+ intent: "enrollment" | "challenge";
1492
+ maxAttemptsPerHour: number;
1493
+ totpId?: string;
1494
+ verifierId: string;
1495
+ }, {
1496
+ status: "invalid_verifier";
1497
+ } | {
1498
+ status: "limited";
1499
+ } | {
1500
+ status: "not_found";
1501
+ } | {
1502
+ status: "already_verified";
1503
+ } | {
1504
+ factor: {
1505
+ _creationTime: number;
1506
+ _id: string;
1507
+ createdAt: number;
1508
+ digits: number;
1509
+ lastUsedAt?: number;
1510
+ name?: string;
1511
+ period: number;
1512
+ secret: ArrayBuffer;
1513
+ userId: string;
1514
+ verified: boolean;
1515
+ };
1516
+ status: "ready";
1517
+ userId: string;
1518
+ }, Name>;
1519
+ completeVerification: FunctionReference<"mutation", "internal", {
1520
+ authenticatedUserId?: string;
1521
+ intent: "enrollment" | "challenge";
1522
+ now: number;
1523
+ refreshTokenExpirationTime: number;
1524
+ replaceSessionId?: string;
1525
+ sessionExpirationTime: number;
1526
+ totpId?: string;
1527
+ verifierId: string;
1528
+ }, {
1529
+ status: "rejected";
1530
+ } | {
1531
+ factorId: string;
1532
+ refreshTokenId: string;
1533
+ replacedSessionId?: string;
1534
+ sessionId: string;
1535
+ status: "accepted";
1536
+ user: {
1537
+ _creationTime: number;
1538
+ _id: string;
1539
+ email?: string;
1540
+ emailVerificationTime?: number;
1541
+ extend?: any;
1542
+ firstName?: string;
1543
+ hasTotp?: boolean;
1544
+ image?: string;
1545
+ isAnonymous?: boolean;
1546
+ lastActiveGroup?: string;
1547
+ lastName?: string;
1548
+ name?: string;
1549
+ phone?: string;
1550
+ phoneVerificationTime?: number;
1551
+ };
1552
+ }, Name>;
1553
+ create: FunctionReference<"mutation", "internal", {
1554
+ createdAt: number;
1555
+ digits: number;
1556
+ name?: string;
1557
+ period: number;
1558
+ secret: ArrayBuffer;
1559
+ userId: string;
1560
+ verified: boolean;
1561
+ }, string, Name>;
1562
+ createEnrollment: FunctionReference<"mutation", "internal", {
1563
+ createdAt: number;
1564
+ digits: number;
1565
+ name?: string;
1566
+ period: number;
1567
+ secret: ArrayBuffer;
1568
+ userId: string;
1569
+ }, {
1570
+ totpId: string;
1571
+ user: {
1572
+ _creationTime: number;
1573
+ _id: string;
1574
+ email?: string;
1575
+ emailVerificationTime?: number;
1576
+ extend?: any;
1577
+ firstName?: string;
1578
+ hasTotp?: boolean;
1579
+ image?: string;
1580
+ isAnonymous?: boolean;
1581
+ lastActiveGroup?: string;
1582
+ lastName?: string;
1583
+ name?: string;
1584
+ phone?: string;
1585
+ phoneVerificationTime?: number;
1586
+ };
1587
+ verifierId: string;
1588
+ }, Name>;
1589
+ get: FunctionReference<"query", "internal", {
1590
+ id?: string;
1591
+ verifiedForUserId?: string;
1592
+ }, {
1593
+ _creationTime: number;
1594
+ _id: string;
1595
+ createdAt: number;
1596
+ digits: number;
1597
+ lastUsedAt?: number;
1598
+ name?: string;
1599
+ period: number;
1600
+ secret: ArrayBuffer;
1601
+ userId: string;
1602
+ verified: boolean;
1603
+ } | null, Name>;
1604
+ list: FunctionReference<"query", "internal", {
1605
+ userId: string;
1606
+ }, Array<{
1607
+ _creationTime: number;
1608
+ _id: string;
1609
+ createdAt: number;
1610
+ digits: number;
1611
+ lastUsedAt?: number;
1612
+ name?: string;
1613
+ period: number;
1614
+ secret: ArrayBuffer;
1615
+ userId: string;
1616
+ verified: boolean;
1617
+ }>, Name>;
1618
+ remove: FunctionReference<"mutation", "internal", {
1619
+ id: string;
1620
+ userId?: string;
1621
+ }, null, Name>;
1622
+ update: FunctionReference<"mutation", "internal", {
1623
+ id: string;
1624
+ patch: {
1625
+ lastUsedAt?: number;
1626
+ name?: string;
1627
+ verified?: boolean;
1628
+ };
1629
+ userId?: string;
1630
+ }, null, Name>;
1631
+ };
1632
+ };
1633
+ group: {
1634
+ active: {
1635
+ get: FunctionReference<"query", "internal", {
1636
+ userId: string;
1637
+ }, {
1638
+ group: {
1639
+ _creationTime: number;
1640
+ _id: string;
1641
+ extend?: any;
1642
+ isRoot?: boolean;
1643
+ name: string;
1644
+ parentGroupId?: string;
1645
+ policy?: {
1646
+ extend?: any;
1647
+ identity: {
1648
+ accountLinking: {
1649
+ oidc: "verifiedEmail" | "none" | "sameConnection";
1650
+ saml: "verifiedEmail" | "none" | "sameConnection";
1651
+ };
1652
+ };
1653
+ provisioning: {
1654
+ deprovision: {
1655
+ mode: "soft" | "hard";
1656
+ };
1657
+ groups: {
1658
+ mapping?: Record<string, Array<string>>;
1659
+ mode: "ignore" | "sync";
1660
+ source: "protocol";
1661
+ };
1662
+ jit: {
1663
+ defaultRole?: string;
1664
+ defaultRoleIds?: Array<string>;
1665
+ mode: "off" | "createUser" | "createUserAndMembership";
1666
+ };
1667
+ roles: {
1668
+ mapping?: Record<string, Array<string>>;
1669
+ mode: "ignore" | "map";
1670
+ source: "protocol";
1671
+ };
1672
+ scimReuse: {
1673
+ user: "externalId" | "none";
1674
+ };
1675
+ user: {
1676
+ authority: "app" | "connection" | "scim";
1677
+ createOnSignIn: boolean;
1678
+ updateProfileFromScim: "never" | "missing" | "always";
1679
+ updateProfileOnLogin: "never" | "missing" | "always";
1680
+ };
1681
+ };
1682
+ version: 1;
1683
+ };
1684
+ rootGroupId?: string;
1685
+ slug?: string;
1686
+ type?: string;
1687
+ } | null;
1688
+ groupId: string;
1689
+ membership: {
1690
+ _creationTime: number;
1691
+ _id: string;
1692
+ extend?: any;
1693
+ groupId: string;
1694
+ role?: string;
1695
+ roleIds?: Array<string>;
1696
+ status?: string;
1697
+ userId: string;
1698
+ };
1699
+ } | null, Name>;
1700
+ reset: FunctionReference<"mutation", "internal", {
1701
+ userId: string;
1702
+ }, null, Name>;
1703
+ update: FunctionReference<"mutation", "internal", {
1704
+ groupId: string;
1705
+ userId: string;
1706
+ }, null, Name>;
1707
+ };
1708
+ ancestors: FunctionReference<"query", "internal", {
1709
+ id: string;
1710
+ includeSelf?: boolean;
1711
+ maxDepth?: number;
1712
+ }, {
1713
+ ancestors: Array<{
1714
+ _creationTime: number;
1715
+ _id: string;
1716
+ extend?: any;
1717
+ isRoot?: boolean;
1718
+ name: string;
1719
+ parentGroupId?: string;
1720
+ policy?: {
1721
+ extend?: any;
1722
+ identity: {
1723
+ accountLinking: {
1724
+ oidc: "verifiedEmail" | "none" | "sameConnection";
1725
+ saml: "verifiedEmail" | "none" | "sameConnection";
1726
+ };
1727
+ };
1728
+ provisioning: {
1729
+ deprovision: {
1730
+ mode: "soft" | "hard";
1731
+ };
1732
+ groups: {
1733
+ mapping?: Record<string, Array<string>>;
1734
+ mode: "ignore" | "sync";
1735
+ source: "protocol";
1736
+ };
1737
+ jit: {
1738
+ defaultRole?: string;
1739
+ defaultRoleIds?: Array<string>;
1740
+ mode: "off" | "createUser" | "createUserAndMembership";
1741
+ };
1742
+ roles: {
1743
+ mapping?: Record<string, Array<string>>;
1744
+ mode: "ignore" | "map";
1745
+ source: "protocol";
1746
+ };
1747
+ scimReuse: {
1748
+ user: "externalId" | "none";
1749
+ };
1750
+ user: {
1751
+ authority: "app" | "connection" | "scim";
1752
+ createOnSignIn: boolean;
1753
+ updateProfileFromScim: "never" | "missing" | "always";
1754
+ updateProfileOnLogin: "never" | "missing" | "always";
1755
+ };
1756
+ };
1757
+ version: 1;
1758
+ };
1759
+ rootGroupId?: string;
1760
+ slug?: string;
1761
+ type?: string;
1762
+ }>;
1763
+ cycleDetected: boolean;
1764
+ maxDepthReached: boolean;
1765
+ }, Name>;
1766
+ create: FunctionReference<"mutation", "internal", {
1767
+ extend?: any;
1768
+ name: string;
1769
+ parentGroupId?: string;
1770
+ slug?: string;
1771
+ type?: string;
1772
+ }, string, Name>;
1773
+ get: FunctionReference<"query", "internal", {
1774
+ id?: string;
1775
+ ids?: Array<string>;
1776
+ }, {
1777
+ _creationTime: number;
1778
+ _id: string;
1779
+ extend?: any;
1780
+ isRoot?: boolean;
1781
+ name: string;
1782
+ parentGroupId?: string;
1783
+ policy?: {
1784
+ extend?: any;
1785
+ identity: {
1786
+ accountLinking: {
1787
+ oidc: "verifiedEmail" | "none" | "sameConnection";
1788
+ saml: "verifiedEmail" | "none" | "sameConnection";
1789
+ };
1790
+ };
1791
+ provisioning: {
1792
+ deprovision: {
1793
+ mode: "soft" | "hard";
1794
+ };
1795
+ groups: {
1796
+ mapping?: Record<string, Array<string>>;
1797
+ mode: "ignore" | "sync";
1798
+ source: "protocol";
1799
+ };
1800
+ jit: {
1801
+ defaultRole?: string;
1802
+ defaultRoleIds?: Array<string>;
1803
+ mode: "off" | "createUser" | "createUserAndMembership";
1804
+ };
1805
+ roles: {
1806
+ mapping?: Record<string, Array<string>>;
1807
+ mode: "ignore" | "map";
1808
+ source: "protocol";
1809
+ };
1810
+ scimReuse: {
1811
+ user: "externalId" | "none";
1812
+ };
1813
+ user: {
1814
+ authority: "app" | "connection" | "scim";
1815
+ createOnSignIn: boolean;
1816
+ updateProfileFromScim: "never" | "missing" | "always";
1817
+ updateProfileOnLogin: "never" | "missing" | "always";
1818
+ };
1819
+ };
1820
+ version: 1;
1821
+ };
1822
+ rootGroupId?: string;
1823
+ slug?: string;
1824
+ type?: string;
1825
+ } | null | Array<{
1826
+ _creationTime: number;
1827
+ _id: string;
1828
+ extend?: any;
1829
+ isRoot?: boolean;
1830
+ name: string;
1831
+ parentGroupId?: string;
1832
+ policy?: {
1833
+ extend?: any;
1834
+ identity: {
1835
+ accountLinking: {
1836
+ oidc: "verifiedEmail" | "none" | "sameConnection";
1837
+ saml: "verifiedEmail" | "none" | "sameConnection";
1838
+ };
1839
+ };
1840
+ provisioning: {
1841
+ deprovision: {
1842
+ mode: "soft" | "hard";
1843
+ };
1844
+ groups: {
1845
+ mapping?: Record<string, Array<string>>;
1846
+ mode: "ignore" | "sync";
1847
+ source: "protocol";
1848
+ };
1849
+ jit: {
1850
+ defaultRole?: string;
1851
+ defaultRoleIds?: Array<string>;
1852
+ mode: "off" | "createUser" | "createUserAndMembership";
1853
+ };
1854
+ roles: {
1855
+ mapping?: Record<string, Array<string>>;
1856
+ mode: "ignore" | "map";
1857
+ source: "protocol";
1858
+ };
1859
+ scimReuse: {
1860
+ user: "externalId" | "none";
1861
+ };
1862
+ user: {
1863
+ authority: "app" | "connection" | "scim";
1864
+ createOnSignIn: boolean;
1865
+ updateProfileFromScim: "never" | "missing" | "always";
1866
+ updateProfileOnLogin: "never" | "missing" | "always";
1867
+ };
1868
+ };
1869
+ version: 1;
1870
+ };
1871
+ rootGroupId?: string;
1872
+ slug?: string;
1873
+ type?: string;
1874
+ } | null>, Name>;
1875
+ invite: {
1876
+ accept: FunctionReference<"mutation", "internal", {
1877
+ acceptedByUserId?: string;
1878
+ id?: string;
1879
+ tokenHash?: string;
1880
+ }, null | {
1881
+ groupId: string | null;
1882
+ inviteId: string;
1883
+ inviteStatus: "accepted" | "already_accepted";
1884
+ memberId?: string;
1885
+ membershipStatus: "joined" | "already_joined" | "not_applicable";
1886
+ }, Name>;
1887
+ create: FunctionReference<"mutation", "internal", {
1888
+ email?: string;
1889
+ expiresTime?: number;
1890
+ extend?: any;
1891
+ groupId?: string;
1892
+ invitedByUserId?: string;
1893
+ roleIds?: Array<string>;
1894
+ status: "pending" | "accepted" | "revoked" | "expired";
1895
+ tokenHash: string;
1896
+ }, string, Name>;
1897
+ get: FunctionReference<"query", "internal", {
1898
+ id?: string;
1899
+ tokenHash?: string;
1900
+ }, {
1901
+ _creationTime: number;
1902
+ _id: string;
1903
+ acceptedByUserId?: string;
1904
+ acceptedTime?: number;
1905
+ email?: string;
1906
+ expiresTime?: number;
1907
+ extend?: any;
1908
+ groupId?: string;
1909
+ invitedByUserId?: string;
1910
+ role?: string;
1911
+ roleIds?: Array<string>;
1912
+ status: "pending" | "accepted" | "revoked" | "expired";
1913
+ tokenHash: string;
1914
+ } | null, Name>;
1915
+ list: FunctionReference<"query", "internal", {
1916
+ order?: "asc" | "desc";
1917
+ orderBy?: "_creationTime" | "status" | "email" | "expiresTime" | "acceptedTime";
1918
+ paginationOpts: {
1919
+ cursor: string | null;
1920
+ endCursor?: string | null;
1921
+ id?: number;
1922
+ maximumBytesRead?: number;
1923
+ maximumRowsRead?: number;
1924
+ numItems: number;
1925
+ };
1926
+ where?: {
1927
+ acceptedByUserId?: string;
1928
+ email?: string;
1929
+ groupId?: string;
1930
+ invitedByUserId?: string;
1931
+ status?: "pending" | "accepted" | "revoked" | "expired";
1932
+ tokenHash?: string;
1933
+ };
1934
+ }, {
1935
+ continueCursor: string;
1936
+ isDone: boolean;
1937
+ page: Array<{
1938
+ _creationTime: number;
1939
+ _id: string;
1940
+ acceptedByUserId?: string;
1941
+ acceptedTime?: number;
1942
+ email?: string;
1943
+ expiresTime?: number;
1944
+ extend?: any;
1945
+ groupId?: string;
1946
+ invitedByUserId?: string;
1947
+ role?: string;
1948
+ roleIds?: Array<string>;
1949
+ status: "pending" | "accepted" | "revoked" | "expired";
1950
+ tokenHash: string;
1951
+ }>;
1952
+ pageStatus?: "SplitRecommended" | "SplitRequired" | null;
1953
+ splitCursor?: string | null;
1954
+ }, Name>;
1955
+ revoke: FunctionReference<"mutation", "internal", {
1956
+ id: string;
1957
+ }, null, Name>;
1958
+ };
1959
+ list: FunctionReference<"query", "internal", {
1960
+ order?: "asc" | "desc";
1961
+ orderBy?: "_creationTime" | "name" | "slug" | "type";
1962
+ paginationOpts: {
1963
+ cursor: string | null;
1964
+ endCursor?: string | null;
1965
+ id?: number;
1966
+ maximumBytesRead?: number;
1967
+ maximumRowsRead?: number;
1968
+ numItems: number;
1969
+ };
1970
+ where?: {
1971
+ isRoot?: boolean;
1972
+ name?: string;
1973
+ parentGroupId?: string;
1974
+ slug?: string;
1975
+ type?: string;
1976
+ };
1977
+ }, {
1978
+ continueCursor: string;
1979
+ isDone: boolean;
1980
+ page: Array<{
1981
+ _creationTime: number;
1982
+ _id: string;
1983
+ extend?: any;
1984
+ isRoot?: boolean;
1985
+ name: string;
1986
+ parentGroupId?: string;
1987
+ policy?: {
1988
+ extend?: any;
1989
+ identity: {
1990
+ accountLinking: {
1991
+ oidc: "verifiedEmail" | "none" | "sameConnection";
1992
+ saml: "verifiedEmail" | "none" | "sameConnection";
1993
+ };
1994
+ };
1995
+ provisioning: {
1996
+ deprovision: {
1997
+ mode: "soft" | "hard";
1998
+ };
1999
+ groups: {
2000
+ mapping?: Record<string, Array<string>>;
2001
+ mode: "ignore" | "sync";
2002
+ source: "protocol";
2003
+ };
2004
+ jit: {
2005
+ defaultRole?: string;
2006
+ defaultRoleIds?: Array<string>;
2007
+ mode: "off" | "createUser" | "createUserAndMembership";
2008
+ };
2009
+ roles: {
2010
+ mapping?: Record<string, Array<string>>;
2011
+ mode: "ignore" | "map";
2012
+ source: "protocol";
2013
+ };
2014
+ scimReuse: {
2015
+ user: "externalId" | "none";
2016
+ };
2017
+ user: {
2018
+ authority: "app" | "connection" | "scim";
2019
+ createOnSignIn: boolean;
2020
+ updateProfileFromScim: "never" | "missing" | "always";
2021
+ updateProfileOnLogin: "never" | "missing" | "always";
2022
+ };
2023
+ };
2024
+ version: 1;
2025
+ };
2026
+ rootGroupId?: string;
2027
+ slug?: string;
2028
+ type?: string;
2029
+ }>;
2030
+ pageStatus?: "SplitRecommended" | "SplitRequired" | null;
2031
+ splitCursor?: string | null;
2032
+ }, Name>;
2033
+ member: {
2034
+ create: FunctionReference<"mutation", "internal", {
2035
+ extend?: any;
2036
+ groupId: string;
2037
+ roleIds?: Array<string>;
2038
+ status?: string;
2039
+ userId: string;
2040
+ }, string, Name>;
2041
+ get: FunctionReference<"query", "internal", {
2042
+ groupId?: string;
2043
+ groupIds?: Array<string>;
2044
+ id?: string;
2045
+ userId?: string;
2046
+ }, {
2047
+ _creationTime: number;
2048
+ _id: string;
2049
+ extend?: any;
2050
+ groupId: string;
2051
+ role?: string;
2052
+ roleIds?: Array<string>;
2053
+ status?: string;
2054
+ userId: string;
2055
+ } | null | Array<{
2056
+ _creationTime: number;
2057
+ _id: string;
2058
+ extend?: any;
2059
+ groupId: string;
2060
+ role?: string;
2061
+ roleIds?: Array<string>;
2062
+ status?: string;
2063
+ userId: string;
2064
+ } | null>, Name>;
2065
+ list: FunctionReference<"query", "internal", {
2066
+ order?: "asc" | "desc";
2067
+ orderBy?: "_creationTime" | "status";
2068
+ paginationOpts: {
2069
+ cursor: string | null;
2070
+ endCursor?: string | null;
2071
+ id?: number;
2072
+ maximumBytesRead?: number;
2073
+ maximumRowsRead?: number;
2074
+ numItems: number;
2075
+ };
2076
+ where?: {
2077
+ groupId?: string;
2078
+ status?: string;
2079
+ userId?: string;
2080
+ };
2081
+ }, {
2082
+ continueCursor: string;
2083
+ isDone: boolean;
2084
+ page: Array<{
2085
+ _creationTime: number;
2086
+ _id: string;
2087
+ extend?: any;
2088
+ groupId: string;
2089
+ role?: string;
2090
+ roleIds?: Array<string>;
2091
+ status?: string;
2092
+ userId: string;
2093
+ }>;
2094
+ pageStatus?: "SplitRecommended" | "SplitRequired" | null;
2095
+ splitCursor?: string | null;
2096
+ }, Name>;
2097
+ remove: FunctionReference<"mutation", "internal", {
2098
+ id: string;
2099
+ }, null, Name>;
2100
+ resolve: FunctionReference<"query", "internal", {
2101
+ groupId: string;
2102
+ maxDepth?: number;
2103
+ userId: string;
2104
+ }, {
2105
+ depth: number | null;
2106
+ isDirect: boolean;
2107
+ isInherited: boolean;
2108
+ matchedGroupId: string | null;
2109
+ membership: {
2110
+ _creationTime: number;
2111
+ _id: string;
2112
+ extend?: any;
2113
+ groupId: string;
2114
+ role?: string;
2115
+ roleIds?: Array<string>;
2116
+ status?: string;
2117
+ userId: string;
2118
+ } | null;
2119
+ traversedGroupIds: Array<string>;
2120
+ }, Name>;
2121
+ update: FunctionReference<"mutation", "internal", {
2122
+ id: string;
2123
+ patch: {
2124
+ extend?: any;
2125
+ role?: string;
2126
+ roleIds?: Array<string>;
2127
+ status?: string;
2128
+ };
2129
+ }, null, Name>;
2130
+ };
2131
+ remove: FunctionReference<"mutation", "internal", {
2132
+ id: string;
2133
+ }, null, Name>;
2134
+ update: FunctionReference<"mutation", "internal", {
2135
+ id: string;
2136
+ patch: {
2137
+ extend?: any;
2138
+ isRoot?: boolean;
2139
+ name?: string;
2140
+ parentGroupId?: string;
2141
+ policy?: {
2142
+ extend?: any;
2143
+ identity: {
2144
+ accountLinking: {
2145
+ oidc: "verifiedEmail" | "none" | "sameConnection";
2146
+ saml: "verifiedEmail" | "none" | "sameConnection";
2147
+ };
2148
+ };
2149
+ provisioning: {
2150
+ deprovision: {
2151
+ mode: "soft" | "hard";
2152
+ };
2153
+ groups: {
2154
+ mapping?: Record<string, Array<string>>;
2155
+ mode: "ignore" | "sync";
2156
+ source: "protocol";
2157
+ };
2158
+ jit: {
2159
+ defaultRole?: string;
2160
+ defaultRoleIds?: Array<string>;
2161
+ mode: "off" | "createUser" | "createUserAndMembership";
2162
+ };
2163
+ roles: {
2164
+ mapping?: Record<string, Array<string>>;
2165
+ mode: "ignore" | "map";
2166
+ source: "protocol";
2167
+ };
2168
+ scimReuse: {
2169
+ user: "externalId" | "none";
2170
+ };
2171
+ user: {
2172
+ authority: "app" | "connection" | "scim";
2173
+ createOnSignIn: boolean;
2174
+ updateProfileFromScim: "never" | "missing" | "always";
2175
+ updateProfileOnLogin: "never" | "missing" | "always";
2176
+ };
2177
+ };
2178
+ version: 1;
2179
+ };
2180
+ rootGroupId?: string;
2181
+ slug?: string;
2182
+ type?: string;
2183
+ };
2184
+ }, null, Name>;
2185
+ };
2186
+ limits: {
2187
+ signInCheck: FunctionReference<"query", "internal", {
2188
+ identifier: string;
2189
+ maxAttemptsPerHour: number;
2190
+ }, {
2191
+ ok: boolean;
2192
+ retryAfter?: number;
2193
+ }, Name>;
2194
+ signInRecord: FunctionReference<"mutation", "internal", {
2195
+ identifier: string;
2196
+ maxAttemptsPerHour: number;
2197
+ }, {
2198
+ ok: boolean;
2199
+ retryAfter?: number;
2200
+ }, Name>;
2201
+ signInReset: FunctionReference<"mutation", "internal", {
2202
+ identifier: string;
2203
+ }, null, Name>;
2204
+ };
2205
+ oauth: {
2206
+ client: {
2207
+ create: FunctionReference<"mutation", "internal", {
2208
+ allowedScopes?: Array<string>;
2209
+ clientId: string;
2210
+ clientSecretHash?: string;
2211
+ createdBy?: string;
2212
+ extend?: any;
2213
+ grantTypes: Array<string>;
2214
+ name: string;
2215
+ redirectUris: Array<string>;
2216
+ registrationAccessTokenHash?: string;
2217
+ scopes: Array<string>;
2218
+ tokenEndpointAuthMethod?: "client_secret_basic" | "client_secret_post" | "none";
2219
+ }, string, Name>;
2220
+ get: FunctionReference<"query", "internal", {
2221
+ clientId?: string;
2222
+ id?: string;
2223
+ }, {
2224
+ _creationTime: number;
2225
+ _id: string;
2226
+ clientId: string;
2227
+ clientSecretHash?: string;
2228
+ createdBy?: string;
2229
+ extend?: any;
2230
+ grantTypes: Array<string>;
2231
+ name: string;
2232
+ redirectUris: Array<string>;
2233
+ registrationAccessTokenHash?: string;
2234
+ revoked: boolean;
2235
+ revokedAt?: number;
2236
+ scopes: Array<string>;
2237
+ tokenEndpointAuthMethod?: "client_secret_basic" | "client_secret_post" | "none";
2238
+ } | null, Name>;
2239
+ list: FunctionReference<"query", "internal", {
2240
+ paginationOpts: {
2241
+ cursor: string | null;
2242
+ endCursor?: string | null;
2243
+ id?: number;
2244
+ maximumBytesRead?: number;
2245
+ maximumRowsRead?: number;
2246
+ numItems: number;
2247
+ };
2248
+ where?: {
2249
+ createdBy?: string;
2250
+ includeRevoked?: boolean;
2251
+ };
2252
+ }, {
2253
+ continueCursor: string;
2254
+ isDone: boolean;
2255
+ page: Array<{
2256
+ _creationTime: number;
2257
+ _id: string;
2258
+ clientId: string;
2259
+ clientSecretHash?: string;
2260
+ createdBy?: string;
2261
+ extend?: any;
2262
+ grantTypes: Array<string>;
2263
+ name: string;
2264
+ redirectUris: Array<string>;
2265
+ registrationAccessTokenHash?: string;
2266
+ revoked: boolean;
2267
+ revokedAt?: number;
2268
+ scopes: Array<string>;
2269
+ tokenEndpointAuthMethod?: "client_secret_basic" | "client_secret_post" | "none";
2270
+ }>;
2271
+ pageStatus?: "SplitRecommended" | "SplitRequired" | null;
2272
+ splitCursor?: string | null;
2273
+ }, Name>;
2274
+ remove: FunctionReference<"mutation", "internal", {
2275
+ clientId: string;
2276
+ }, null, Name>;
2277
+ revoke: FunctionReference<"mutation", "internal", {
2278
+ clientId: string;
2279
+ }, null, Name>;
2280
+ update: FunctionReference<"mutation", "internal", {
2281
+ clientId: string;
2282
+ patch: {
2283
+ grantTypes?: Array<string>;
2284
+ name?: string;
2285
+ redirectUris?: Array<string>;
2286
+ scopes?: Array<string>;
2287
+ tokenEndpointAuthMethod?: "client_secret_basic" | "client_secret_post" | "none";
2288
+ };
2289
+ }, null, Name>;
2290
+ };
2291
+ code: {
2292
+ accept: FunctionReference<"mutation", "internal", {
2293
+ clientId: string;
2294
+ codeChallenge: string;
2295
+ codeHash: string;
2296
+ redirectUri: string;
2297
+ refresh?: {
2298
+ expiresAt: number;
2299
+ tokenHash: string;
2300
+ };
2301
+ }, {
2302
+ _creationTime: number;
2303
+ _id: string;
2304
+ clientId: string;
2305
+ codeChallenge: string;
2306
+ codeHash: string;
2307
+ expiresAt: number;
2308
+ redirectUri: string;
2309
+ resource?: string;
2310
+ scopes: Array<string>;
2311
+ usedAt?: number;
2312
+ userId: string;
2313
+ } | null, Name>;
2314
+ create: FunctionReference<"mutation", "internal", {
2315
+ clientId: string;
2316
+ codeChallenge: string;
2317
+ codeHash: string;
2318
+ expiresAt: number;
2319
+ redirectUri: string;
2320
+ resource?: string;
2321
+ scopes: Array<string>;
2322
+ userId: string;
2323
+ }, string, Name>;
2324
+ get: FunctionReference<"query", "internal", {
2325
+ codeHash: string;
2326
+ }, {
2327
+ _creationTime: number;
2328
+ _id: string;
2329
+ clientId: string;
2330
+ codeChallenge: string;
2331
+ codeHash: string;
2332
+ expiresAt: number;
2333
+ redirectUri: string;
2334
+ resource?: string;
2335
+ scopes: Array<string>;
2336
+ usedAt?: number;
2337
+ userId: string;
2338
+ } | null, Name>;
2339
+ };
2340
+ refresh: {
2341
+ create: FunctionReference<"mutation", "internal", {
2342
+ clientId: string;
2343
+ expiresAt: number;
2344
+ resource?: string;
2345
+ scopes: Array<string>;
2346
+ tokenHash: string;
2347
+ userId: string;
2348
+ }, string, Name>;
2349
+ exchange: FunctionReference<"mutation", "internal", {
2350
+ clientId: string;
2351
+ newExpiresAt: number;
2352
+ newTokenHash: string;
2353
+ now: number;
2354
+ requestedScopes?: Array<string>;
2355
+ reuseWindowMs: number;
2356
+ tokenHash: string;
2357
+ }, {
2358
+ resource?: string;
2359
+ scopes: Array<string>;
2360
+ status: "rotated";
2361
+ userId: string;
2362
+ } | {
2363
+ clientId: string;
2364
+ status: "reuse_detected";
2365
+ userId: string;
2366
+ } | {
2367
+ status: "scope_exceeded";
2368
+ } | {
2369
+ status: "invalid";
2370
+ }, Name>;
2371
+ get: FunctionReference<"query", "internal", {
2372
+ tokenHash: string;
2373
+ }, {
2374
+ _creationTime: number;
2375
+ _id: string;
2376
+ expiresAt: number;
2377
+ firstUsedTime?: number;
2378
+ grantId?: string;
2379
+ parentTokenId?: string;
2380
+ tokenHash: string;
2381
+ } | null, Name>;
2382
+ revoke: FunctionReference<"mutation", "internal", {
2383
+ tokenHash: string;
2384
+ }, {
2385
+ clientId: string;
2386
+ userId: string;
2387
+ } | null, Name>;
2388
+ };
2389
+ };
2390
+ session: {
2391
+ create: FunctionReference<"mutation", "internal", {
2392
+ refreshTokenExpirationTime?: number;
2393
+ replaceSessionId?: string;
2394
+ sessionExpirationTime: number;
2395
+ sessionId?: string;
2396
+ userId: string;
2397
+ }, {
2398
+ refreshTokenId?: string;
2399
+ replacedSessionId?: string;
2400
+ sessionId: string;
2401
+ user: {
2402
+ _creationTime: number;
2403
+ _id: string;
2404
+ email?: string;
2405
+ emailVerificationTime?: number;
2406
+ extend?: any;
2407
+ firstName?: string;
2408
+ hasTotp?: boolean;
2409
+ image?: string;
2410
+ isAnonymous?: boolean;
2411
+ lastActiveGroup?: string;
2412
+ lastName?: string;
2413
+ name?: string;
2414
+ phone?: string;
2415
+ phoneVerificationTime?: number;
2416
+ };
2417
+ userId: string;
2418
+ }, Name>;
2419
+ get: FunctionReference<"query", "internal", {
2420
+ id: string;
2421
+ }, {
2422
+ _creationTime: number;
2423
+ _id: string;
2424
+ expirationTime: number;
2425
+ userId: string;
2426
+ } | null, Name>;
2427
+ list: FunctionReference<"query", "internal", {
2428
+ userId: string;
2429
+ }, Array<{
2430
+ _creationTime: number;
2431
+ _id: string;
2432
+ expirationTime: number;
2433
+ userId: string;
2434
+ }>, Name>;
2435
+ remove: FunctionReference<"mutation", "internal", {
2436
+ id: string;
2437
+ }, null, Name>;
2438
+ revokeForUser: FunctionReference<"mutation", "internal", {
2439
+ userId: string;
2440
+ }, {
2441
+ revoked: number;
2442
+ }, Name>;
2443
+ };
2444
+ token: {
2445
+ pkce: {
2446
+ consume: FunctionReference<"mutation", "internal", {
2447
+ expectedSignature?: string;
2448
+ id?: string;
2449
+ signature?: string;
2450
+ }, {
2451
+ _creationTime: number;
2452
+ _id: string;
2453
+ expirationTime?: number;
2454
+ sessionId?: string;
2455
+ signature?: string;
2456
+ } | null, Name>;
2457
+ create: FunctionReference<"mutation", "internal", {
2458
+ expirationTime?: number;
2459
+ sessionId?: string;
2460
+ signature?: string;
2461
+ }, string, Name>;
2462
+ get: FunctionReference<"query", "internal", {
2463
+ id?: string;
2464
+ signature?: string;
2465
+ }, {
2466
+ _creationTime: number;
2467
+ _id: string;
2468
+ expirationTime?: number;
2469
+ sessionId?: string;
2470
+ signature?: string;
2471
+ } | null, Name>;
2472
+ remove: FunctionReference<"mutation", "internal", {
2473
+ id: string;
2474
+ }, null, Name>;
2475
+ update: FunctionReference<"mutation", "internal", {
2476
+ id: string;
2477
+ patch: {
2478
+ expirationTime?: number;
2479
+ sessionId?: string;
2480
+ signature?: string;
2481
+ };
2482
+ }, null, Name>;
2483
+ };
2484
+ refresh: {
2485
+ create: FunctionReference<"mutation", "internal", {
2486
+ expirationTime: number;
2487
+ parentRefreshTokenId?: string;
2488
+ sessionId: string;
2489
+ }, string, Name>;
2490
+ exchange: FunctionReference<"mutation", "internal", {
2491
+ now: number;
2492
+ refreshTokenExpirationTime: number;
2493
+ refreshTokenId: string;
2494
+ reuseWindowMs: number;
2495
+ sessionId: string;
2496
+ }, {
2497
+ refreshTokenId: string;
2498
+ sessionId: string;
2499
+ status: "rotated";
2500
+ user: {
2501
+ _creationTime: number;
2502
+ _id: string;
2503
+ email?: string;
2504
+ emailVerificationTime?: number;
2505
+ extend?: any;
2506
+ firstName?: string;
2507
+ hasTotp?: boolean;
2508
+ image?: string;
2509
+ isAnonymous?: boolean;
2510
+ lastActiveGroup?: string;
2511
+ lastName?: string;
2512
+ name?: string;
2513
+ phone?: string;
2514
+ phoneVerificationTime?: number;
2515
+ };
2516
+ userId: string;
2517
+ } | {
2518
+ refreshTokenId: string;
2519
+ status: "reuse_detected";
2520
+ userId: string;
2521
+ } | {
2522
+ status: "invalid";
2523
+ }, Name>;
2524
+ get: FunctionReference<"query", "internal", {
2525
+ activeForSession?: string;
2526
+ id?: string;
2527
+ }, {
2528
+ _creationTime: number;
2529
+ _id: string;
2530
+ expirationTime: number;
2531
+ firstUsedTime?: number;
2532
+ parentRefreshTokenId?: string;
2533
+ sessionId: string;
2534
+ } | null, Name>;
2535
+ list: FunctionReference<"query", "internal", {
2536
+ parentRefreshTokenId?: string;
2537
+ sessionId: string;
2538
+ }, Array<{
2539
+ _creationTime: number;
2540
+ _id: string;
2541
+ expirationTime: number;
2542
+ firstUsedTime?: number;
2543
+ parentRefreshTokenId?: string;
2544
+ sessionId: string;
2545
+ }>, Name>;
2546
+ remove: FunctionReference<"mutation", "internal", {
2547
+ sessionId: string;
2548
+ }, null, Name>;
2549
+ update: FunctionReference<"mutation", "internal", {
2550
+ id: string;
2551
+ patch: {
2552
+ expirationTime?: number;
2553
+ firstUsedTime?: number;
2554
+ };
2555
+ }, null, Name>;
2556
+ };
2557
+ verification: {
2558
+ beginVerification: FunctionReference<"mutation", "internal", {
2559
+ code: string;
2560
+ identifier?: string;
2561
+ maxAttemptsPerHour: number;
2562
+ now: number;
2563
+ provider?: string;
2564
+ verifier?: string;
2565
+ }, {
2566
+ status: "invalid";
2567
+ } | {
2568
+ status: "limited";
2569
+ } | {
2570
+ account: {
2571
+ _creationTime: number;
2572
+ _id: string;
2573
+ emailVerified?: string;
2574
+ extend?: any;
2575
+ phoneVerified?: string;
2576
+ provider: string;
2577
+ providerAccountId: string;
2578
+ secret?: string;
2579
+ userId: string;
2580
+ };
2581
+ code: {
2582
+ _creationTime: number;
2583
+ _id: string;
2584
+ accountId: string;
2585
+ code: string;
2586
+ emailVerified?: string;
2587
+ expirationTime: number;
2588
+ phoneVerified?: string;
2589
+ provider: string;
2590
+ verifier?: string;
2591
+ };
2592
+ status: "ready";
2593
+ }, Name>;
2594
+ completeVerification: FunctionReference<"mutation", "internal", {
2595
+ codeId: string;
2596
+ generateTokens: boolean;
2597
+ identifier?: string;
2598
+ refreshTokenExpirationTime: number;
2599
+ replaceSessionId?: string;
2600
+ sessionExpirationTime: number;
2601
+ userId: string;
2602
+ }, {
2603
+ status: "rejected";
2604
+ } | {
2605
+ refreshTokenId?: string;
2606
+ replacedSessionId?: string;
2607
+ sessionId: string;
2608
+ status: "accepted";
2609
+ user: {
2610
+ _creationTime: number;
2611
+ _id: string;
2612
+ email?: string;
2613
+ emailVerificationTime?: number;
2614
+ extend?: any;
2615
+ firstName?: string;
2616
+ hasTotp?: boolean;
2617
+ image?: string;
2618
+ isAnonymous?: boolean;
2619
+ lastActiveGroup?: string;
2620
+ lastName?: string;
2621
+ name?: string;
2622
+ phone?: string;
2623
+ phoneVerificationTime?: number;
2624
+ };
2625
+ }, Name>;
2626
+ create: FunctionReference<"mutation", "internal", {
2627
+ accountId: string;
2628
+ code: string;
2629
+ emailVerified?: string;
2630
+ expirationTime: number;
2631
+ phoneVerified?: string;
2632
+ provider: string;
2633
+ verifier?: string;
2634
+ }, string, Name>;
2635
+ get: FunctionReference<"query", "internal", {
2636
+ accountId?: string;
2637
+ code?: string;
2638
+ }, {
2639
+ _creationTime: number;
2640
+ _id: string;
2641
+ accountId: string;
2642
+ code: string;
2643
+ emailVerified?: string;
2644
+ expirationTime: number;
2645
+ phoneVerified?: string;
2646
+ provider: string;
2647
+ verifier?: string;
2648
+ } | null, Name>;
2649
+ remove: FunctionReference<"mutation", "internal", {
2650
+ id: string;
2651
+ }, null, Name>;
2652
+ resetVerificationLimits: FunctionReference<"mutation", "internal", {
2653
+ accountId: string;
2654
+ identifier?: string;
2655
+ }, null, Name>;
2656
+ };
2657
+ };
2658
+ user: {
2659
+ create: FunctionReference<"mutation", "internal", {
2660
+ data: {
2661
+ email?: string;
2662
+ emailVerificationTime?: number;
2663
+ extend?: any;
2664
+ firstName?: string;
2665
+ hasTotp?: boolean;
2666
+ image?: string;
2667
+ isAnonymous?: boolean;
2668
+ lastActiveGroup?: string;
2669
+ lastName?: string;
2670
+ name?: string;
2671
+ phone?: string;
2672
+ phoneVerificationTime?: number;
2673
+ };
2674
+ }, string, Name>;
2675
+ email: {
2676
+ list: FunctionReference<"query", "internal", {
2677
+ userId: string;
2678
+ }, Array<{
2679
+ _creationTime: number;
2680
+ _id: string;
2681
+ accountId?: string;
2682
+ connectionId?: string;
2683
+ email: string;
2684
+ isPrimary: boolean;
2685
+ provider?: string;
2686
+ source: "password" | "oauth" | "oidc" | "saml" | "scim";
2687
+ userId: string;
2688
+ verificationTime?: number;
2689
+ }>, Name>;
2690
+ promote: FunctionReference<"mutation", "internal", {
2691
+ email: string;
2692
+ userId: string;
2693
+ }, null, Name>;
2694
+ remove: FunctionReference<"mutation", "internal", {
2695
+ email: string;
2696
+ userId: string;
2697
+ }, null, Name>;
2698
+ upsert: FunctionReference<"mutation", "internal", {
2699
+ accountId?: string;
2700
+ connectionId?: string;
2701
+ email: string;
2702
+ isPrimary?: boolean;
2703
+ provider?: string;
2704
+ source: "password" | "oauth" | "oidc" | "saml" | "scim";
2705
+ userId: string;
2706
+ verified?: boolean;
2707
+ }, string, Name>;
2708
+ };
2709
+ get: FunctionReference<"query", "internal", {
2710
+ id?: string;
2711
+ ids?: Array<string>;
2712
+ verifiedEmail?: string;
2713
+ verifiedPhone?: string;
2714
+ }, {
2715
+ _creationTime: number;
2716
+ _id: string;
2717
+ email?: string;
2718
+ emailVerificationTime?: number;
2719
+ extend?: any;
2720
+ firstName?: string;
2721
+ hasTotp?: boolean;
2722
+ image?: string;
2723
+ isAnonymous?: boolean;
2724
+ lastActiveGroup?: string;
2725
+ lastName?: string;
2726
+ name?: string;
2727
+ phone?: string;
2728
+ phoneVerificationTime?: number;
2729
+ } | null | Array<{
2730
+ _creationTime: number;
2731
+ _id: string;
2732
+ email?: string;
2733
+ emailVerificationTime?: number;
2734
+ extend?: any;
2735
+ firstName?: string;
2736
+ hasTotp?: boolean;
2737
+ image?: string;
2738
+ isAnonymous?: boolean;
2739
+ lastActiveGroup?: string;
2740
+ lastName?: string;
2741
+ name?: string;
2742
+ phone?: string;
2743
+ phoneVerificationTime?: number;
2744
+ } | null>, Name>;
2745
+ key: {
2746
+ create: FunctionReference<"mutation", "internal", {
2747
+ expiresAt?: number;
2748
+ extend?: any;
2749
+ hashedKey: string;
2750
+ name: string;
2751
+ prefix: string;
2752
+ rateLimit?: {
2753
+ maxRequests: number;
2754
+ windowMs: number;
2755
+ };
2756
+ scopes: Array<{
2757
+ actions: Array<string>;
2758
+ resource: string;
2759
+ }>;
2760
+ userId: string;
2761
+ }, string, Name>;
2762
+ get: FunctionReference<"query", "internal", {
2763
+ hashedKey?: string;
2764
+ id?: string;
2765
+ }, {
2766
+ _creationTime: number;
2767
+ _id: string;
2768
+ createdAt: number;
2769
+ expiresAt?: number;
2770
+ extend?: any;
2771
+ hashedKey: string;
2772
+ lastUsedAt?: number;
2773
+ name: string;
2774
+ prefix: string;
2775
+ rateLimit?: {
2776
+ maxRequests: number;
2777
+ windowMs: number;
2778
+ };
2779
+ rateLimitState?: {
2780
+ attemptsLeft: number;
2781
+ lastAttemptTime: number;
2782
+ };
2783
+ revoked: boolean;
2784
+ scopes: Array<{
2785
+ actions: Array<string>;
2786
+ resource: string;
2787
+ }>;
2788
+ userId: string;
2789
+ } | null, Name>;
2790
+ list: FunctionReference<"query", "internal", {
2791
+ order?: "asc" | "desc";
2792
+ orderBy?: "_creationTime" | "name" | "lastUsedAt" | "expiresAt" | "revoked";
2793
+ paginationOpts: {
2794
+ cursor: string | null;
2795
+ endCursor?: string | null;
2796
+ id?: number;
2797
+ maximumBytesRead?: number;
2798
+ maximumRowsRead?: number;
2799
+ numItems: number;
2800
+ };
2801
+ where?: {
2802
+ name?: string;
2803
+ prefix?: string;
2804
+ revoked?: boolean;
2805
+ userId?: string;
2806
+ };
2807
+ }, {
2808
+ continueCursor: string;
2809
+ isDone: boolean;
2810
+ page: Array<{
2811
+ _creationTime: number;
2812
+ _id: string;
2813
+ createdAt: number;
2814
+ expiresAt?: number;
2815
+ extend?: any;
2816
+ hashedKey: string;
2817
+ lastUsedAt?: number;
2818
+ name: string;
2819
+ prefix: string;
2820
+ rateLimit?: {
2821
+ maxRequests: number;
2822
+ windowMs: number;
2823
+ };
2824
+ rateLimitState?: {
2825
+ attemptsLeft: number;
2826
+ lastAttemptTime: number;
2827
+ };
2828
+ revoked: boolean;
2829
+ scopes: Array<{
2830
+ actions: Array<string>;
2831
+ resource: string;
2832
+ }>;
2833
+ userId: string;
2834
+ }>;
2835
+ pageStatus?: "SplitRecommended" | "SplitRequired" | null;
2836
+ splitCursor?: string | null;
2837
+ }, Name>;
2838
+ recordUse: FunctionReference<"mutation", "internal", {
2839
+ coarsenMs?: number;
2840
+ id: string;
2841
+ now: number;
2842
+ }, {
2843
+ status: "invalid";
2844
+ } | {
2845
+ status: "revoked";
2846
+ } | {
2847
+ status: "expired";
2848
+ } | {
2849
+ status: "limited";
2850
+ } | {
2851
+ keyId: string;
2852
+ scopes: Array<{
2853
+ actions: Array<string>;
2854
+ resource: string;
2855
+ }>;
2856
+ status: "verified";
2857
+ userId: string;
2858
+ }, Name>;
2859
+ remove: FunctionReference<"mutation", "internal", {
2860
+ id: string;
2861
+ }, null, Name>;
2862
+ rotate: FunctionReference<"mutation", "internal", {
2863
+ expiresAt?: number;
2864
+ hashedKey: string;
2865
+ id: string;
2866
+ name?: string;
2867
+ prefix: string;
2868
+ }, {
2869
+ status: "invalid";
2870
+ } | {
2871
+ status: "revoked";
2872
+ } | {
2873
+ status: "invalid_rate_limit";
2874
+ } | {
2875
+ id: string;
2876
+ name: string;
2877
+ status: "rotated";
2878
+ userId: string;
2879
+ }, Name>;
2880
+ update: FunctionReference<"mutation", "internal", {
2881
+ id: string;
2882
+ patch: {
2883
+ lastUsedAt?: number;
2884
+ name?: string;
2885
+ rateLimit?: {
2886
+ maxRequests: number;
2887
+ windowMs: number;
2888
+ };
2889
+ rateLimitState?: {
2890
+ attemptsLeft: number;
2891
+ lastAttemptTime: number;
2892
+ };
2893
+ revoked?: boolean;
2894
+ scopes?: Array<{
2895
+ actions: Array<string>;
2896
+ resource: string;
2897
+ }>;
2898
+ };
2899
+ }, null, Name>;
2900
+ };
2901
+ list: FunctionReference<"query", "internal", {
2902
+ order?: "asc" | "desc";
2903
+ orderBy?: "_creationTime" | "name" | "email" | "phone";
2904
+ paginationOpts: {
2905
+ cursor: string | null;
2906
+ endCursor?: string | null;
2907
+ id?: number;
2908
+ maximumBytesRead?: number;
2909
+ maximumRowsRead?: number;
2910
+ numItems: number;
2911
+ };
2912
+ where?: {
2913
+ email?: string;
2914
+ isAnonymous?: boolean;
2915
+ name?: string;
2916
+ phone?: string;
2917
+ };
2918
+ }, {
2919
+ continueCursor: string;
2920
+ isDone: boolean;
2921
+ page: Array<{
2922
+ _creationTime: number;
2923
+ _id: string;
2924
+ email?: string;
2925
+ emailVerificationTime?: number;
2926
+ extend?: any;
2927
+ firstName?: string;
2928
+ hasTotp?: boolean;
2929
+ image?: string;
2930
+ isAnonymous?: boolean;
2931
+ lastActiveGroup?: string;
2932
+ lastName?: string;
2933
+ name?: string;
2934
+ phone?: string;
2935
+ phoneVerificationTime?: number;
2936
+ }>;
2937
+ pageStatus?: "SplitRecommended" | "SplitRequired" | null;
2938
+ splitCursor?: string | null;
2939
+ }, Name>;
2940
+ remove: FunctionReference<"mutation", "internal", {
2941
+ id: string;
2942
+ }, null, Name>;
2943
+ update: FunctionReference<"mutation", "internal", {
2944
+ id: string;
2945
+ patch: {
2946
+ email?: string;
2947
+ emailVerificationTime?: number;
2948
+ extend?: any;
2949
+ firstName?: string;
2950
+ hasTotp?: boolean;
2951
+ image?: string;
2952
+ isAnonymous?: boolean;
2953
+ lastActiveGroup?: string;
2954
+ lastName?: string;
2955
+ name?: string;
2956
+ phone?: string;
2957
+ phoneVerificationTime?: number;
2958
+ };
2959
+ }, null, Name>;
2960
+ upsert: FunctionReference<"mutation", "internal", {
2961
+ data: {
2962
+ email?: string;
2963
+ emailVerificationTime?: number;
2964
+ extend?: any;
2965
+ firstName?: string;
2966
+ hasTotp?: boolean;
2967
+ image?: string;
2968
+ isAnonymous?: boolean;
2969
+ lastActiveGroup?: string;
2970
+ lastName?: string;
2971
+ name?: string;
2972
+ phone?: string;
2973
+ phoneVerificationTime?: number;
2974
+ };
2975
+ id?: string;
2976
+ }, string, Name>;
2977
+ };
2978
+ };
2979
+ //#endregion
2980
+ export { ComponentApi };
2981
+ //# sourceMappingURL=component.d.ts.map