@convex-dev/better-auth
Version:
A Better Auth component for Convex.
1,696 lines (1,692 loc) • 69.1 kB
TypeScript
/* eslint-disable */
/**
* Generated `api` utility.
*
* THIS CODE IS AUTOMATICALLY GENERATED.
*
* To regenerate, run `npx convex dev`.
* @module
*/
import type * as adapterTest from "../adapterTest.js";
import type * as lib from "../lib.js";
import type * as util from "../util.js";
import type {
ApiFromModules,
FilterApi,
FunctionReference,
} from "convex/server";
/**
* A utility for referencing Convex functions in your app's API.
*
* Usage:
* ```js
* const myFunctionReference = api.myModule.myFunction;
* ```
*/
declare const fullApi: ApiFromModules<{
adapterTest: typeof adapterTest;
lib: typeof lib;
util: typeof util;
}>;
export type Mounts = {
adapterTest: {
count: FunctionReference<"query", "public", any, any>;
create: FunctionReference<"mutation", "public", any, any>;
delete: FunctionReference<"mutation", "public", any, any>;
deleteMany: FunctionReference<"mutation", "public", any, any>;
findMany: FunctionReference<"query", "public", any, any>;
findOne: FunctionReference<"query", "public", any, any>;
isAuthenticated: FunctionReference<"query", "public", {}, any>;
update: FunctionReference<"mutation", "public", any, any>;
updateMany: FunctionReference<"mutation", "public", any, any>;
};
lib: {
create: FunctionReference<
"mutation",
"public",
{
input:
| {
data: {
banExpires?: number;
banReason?: string;
banned?: boolean;
createdAt: number;
displayUsername?: string;
email: string;
emailVerified: boolean;
image?: string;
isAnonymous?: boolean;
name: string;
phoneNumber?: string;
phoneNumberVerified?: boolean;
role?: string;
stripeCustomerId?: string;
twoFactorEnabled?: boolean;
updatedAt: number;
userId?: string;
username?: string;
};
model: "user";
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
data: {
activeOrganizationId?: string;
createdAt: number;
expiresAt: number;
impersonatedBy?: string;
ipAddress?: string;
token: string;
updatedAt: number;
userAgent?: string;
userId: string;
};
model: "session";
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
data: {
accessToken?: string;
accessTokenExpiresAt?: number;
accountId: string;
createdAt: number;
idToken?: string;
password?: string;
providerId: string;
refreshToken?: string;
refreshTokenExpiresAt?: number;
scope?: string;
updatedAt: number;
userId: string;
};
model: "account";
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
data: {
createdAt?: number;
expiresAt: number;
identifier: string;
updatedAt?: number;
value: string;
};
model: "verification";
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
data: { backupCodes: string; secret: string; userId: string };
model: "twoFactor";
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
data: {
aaguid?: string;
backedUp: boolean;
counter: number;
createdAt?: number;
credentialID: string;
deviceType: string;
name?: string;
publicKey: string;
transports?: string;
userId: string;
};
model: "passkey";
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
data: {
createdAt: number;
enabled?: boolean;
expiresAt?: number;
key: string;
lastRefillAt?: number;
lastRequest?: number;
metadata?: string;
name?: string;
permissions?: string;
prefix?: string;
rateLimitEnabled?: boolean;
rateLimitMax?: number;
rateLimitTimeWindow?: number;
refillAmount?: number;
refillInterval?: number;
remaining?: number;
requestCount?: number;
start?: string;
updatedAt: number;
userId: string;
};
model: "apikey";
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
data: {
clientId?: string;
clientSecret?: string;
createdAt?: number;
disabled?: boolean;
icon?: string;
metadata?: string;
name?: string;
redirectURLs?: string;
type?: string;
updatedAt?: number;
userId?: string;
};
model: "oauthApplication";
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
data: {
accessToken?: string;
accessTokenExpiresAt?: number;
clientId?: string;
createdAt?: number;
refreshToken?: string;
refreshTokenExpiresAt?: number;
scopes?: string;
updatedAt?: number;
userId?: string;
};
model: "oauthAccessToken";
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
data: {
clientId?: string;
consentGiven?: boolean;
createdAt?: number;
scopes?: string;
updatedAt?: number;
userId?: string;
};
model: "oauthConsent";
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
data: {
createdAt: number;
logo?: string;
metadata?: string;
name: string;
slug?: string;
};
model: "organization";
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
data: {
createdAt: number;
organizationId: string;
role: string;
teamId?: string;
userId: string;
};
model: "member";
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
data: {
email: string;
expiresAt: number;
inviterId: string;
organizationId: string;
role?: string;
status: string;
teamId?: string;
};
model: "invitation";
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
data: {
createdAt: number;
name: string;
organizationId: string;
updatedAt?: number;
};
model: "team";
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
data: {
domain: string;
issuer: string;
oidcConfig?: string;
organizationId?: string;
providerId: string;
samlConfig?: string;
userId?: string;
};
model: "ssoProvider";
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
data: {
createdAt: number;
privateKey: string;
publicKey: string;
};
model: "jwks";
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
data: {
cancelAtPeriodEnd?: boolean;
periodEnd?: number;
periodStart?: number;
plan: string;
referenceId: string;
seats?: number;
status?: string;
stripeCustomerId?: string;
stripeSubscriptionId?: string;
};
model: "subscription";
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
data: { count?: number; key?: string; lastRequest?: number };
model: "rateLimit";
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
};
},
any
>;
deleteMany: FunctionReference<
"mutation",
"public",
{
limit?: number;
model: string;
offset?: number;
paginationOpts: {
cursor: string | null;
endCursor?: string | null;
id?: number;
maximumBytesRead?: number;
maximumRowsRead?: number;
numItems: number;
};
select?: Array<string>;
sortBy?: { direction: "asc" | "desc"; field: string };
unique?: boolean;
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
},
any
>;
deleteOne: FunctionReference<
"mutation",
"public",
{
limit?: number;
model: string;
offset?: number;
select?: Array<string>;
sortBy?: { direction: "asc" | "desc"; field: string };
unique?: boolean;
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
},
any
>;
findMany: FunctionReference<
"query",
"public",
{
limit?: number;
model: string;
offset?: number;
paginationOpts: {
cursor: string | null;
endCursor?: string | null;
id?: number;
maximumBytesRead?: number;
maximumRowsRead?: number;
numItems: number;
};
select?: Array<string>;
sortBy?: { direction: "asc" | "desc"; field: string };
unique?: boolean;
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
},
any
>;
findOne: FunctionReference<
"query",
"public",
{
limit?: number;
model: string;
offset?: number;
select?: Array<string>;
sortBy?: { direction: "asc" | "desc"; field: string };
unique?: boolean;
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
},
any
>;
getCurrentSession: FunctionReference<"query", "public", {}, any>;
updateMany: FunctionReference<
"mutation",
"public",
{
input:
| {
limit?: number;
model: "user";
offset?: number;
paginationOpts: {
cursor: string | null;
endCursor?: string | null;
id?: number;
maximumBytesRead?: number;
maximumRowsRead?: number;
numItems: number;
};
select?: Array<string>;
sortBy?: { direction: "asc" | "desc"; field: string };
unique?: boolean;
update: {
banExpires?: number;
banReason?: string;
banned?: boolean;
createdAt?: number;
displayUsername?: string;
email?: string;
emailVerified?: boolean;
image?: string;
isAnonymous?: boolean;
name?: string;
phoneNumber?: string;
phoneNumberVerified?: boolean;
role?: string;
stripeCustomerId?: string;
twoFactorEnabled?: boolean;
updatedAt?: number;
userId?: string;
username?: string;
};
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
limit?: number;
model: "session";
offset?: number;
paginationOpts: {
cursor: string | null;
endCursor?: string | null;
id?: number;
maximumBytesRead?: number;
maximumRowsRead?: number;
numItems: number;
};
select?: Array<string>;
sortBy?: { direction: "asc" | "desc"; field: string };
unique?: boolean;
update: {
activeOrganizationId?: string;
createdAt?: number;
expiresAt?: number;
impersonatedBy?: string;
ipAddress?: string;
token?: string;
updatedAt?: number;
userAgent?: string;
userId?: string;
};
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
limit?: number;
model: "account";
offset?: number;
paginationOpts: {
cursor: string | null;
endCursor?: string | null;
id?: number;
maximumBytesRead?: number;
maximumRowsRead?: number;
numItems: number;
};
select?: Array<string>;
sortBy?: { direction: "asc" | "desc"; field: string };
unique?: boolean;
update: {
accessToken?: string;
accessTokenExpiresAt?: number;
accountId?: string;
createdAt?: number;
idToken?: string;
password?: string;
providerId?: string;
refreshToken?: string;
refreshTokenExpiresAt?: number;
scope?: string;
updatedAt?: number;
userId?: string;
};
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
limit?: number;
model: "verification";
offset?: number;
paginationOpts: {
cursor: string | null;
endCursor?: string | null;
id?: number;
maximumBytesRead?: number;
maximumRowsRead?: number;
numItems: number;
};
select?: Array<string>;
sortBy?: { direction: "asc" | "desc"; field: string };
unique?: boolean;
update: {
createdAt?: number;
expiresAt?: number;
identifier?: string;
updatedAt?: number;
value?: string;
};
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
limit?: number;
model: "twoFactor";
offset?: number;
paginationOpts: {
cursor: string | null;
endCursor?: string | null;
id?: number;
maximumBytesRead?: number;
maximumRowsRead?: number;
numItems: number;
};
select?: Array<string>;
sortBy?: { direction: "asc" | "desc"; field: string };
unique?: boolean;
update: {
backupCodes?: string;
secret?: string;
userId?: string;
};
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
limit?: number;
model: "passkey";
offset?: number;
paginationOpts: {
cursor: string | null;
endCursor?: string | null;
id?: number;
maximumBytesRead?: number;
maximumRowsRead?: number;
numItems: number;
};
select?: Array<string>;
sortBy?: { direction: "asc" | "desc"; field: string };
unique?: boolean;
update: {
aaguid?: string;
backedUp?: boolean;
counter?: number;
createdAt?: number;
credentialID?: string;
deviceType?: string;
name?: string;
publicKey?: string;
transports?: string;
userId?: string;
};
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
limit?: number;
model: "apikey";
offset?: number;
paginationOpts: {
cursor: string | null;
endCursor?: string | null;
id?: number;
maximumBytesRead?: number;
maximumRowsRead?: number;
numItems: number;
};
select?: Array<string>;
sortBy?: { direction: "asc" | "desc"; field: string };
unique?: boolean;
update: {
createdAt?: number;
enabled?: boolean;
expiresAt?: number;
key?: string;
lastRefillAt?: number;
lastRequest?: number;
metadata?: string;
name?: string;
permissions?: string;
prefix?: string;
rateLimitEnabled?: boolean;
rateLimitMax?: number;
rateLimitTimeWindow?: number;
refillAmount?: number;
refillInterval?: number;
remaining?: number;
requestCount?: number;
start?: string;
updatedAt?: number;
userId?: string;
};
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
limit?: number;
model: "oauthApplication";
offset?: number;
paginationOpts: {
cursor: string | null;
endCursor?: string | null;
id?: number;
maximumBytesRead?: number;
maximumRowsRead?: number;
numItems: number;
};
select?: Array<string>;
sortBy?: { direction: "asc" | "desc"; field: string };
unique?: boolean;
update: {
clientId?: string;
clientSecret?: string;
createdAt?: number;
disabled?: boolean;
icon?: string;
metadata?: string;
name?: string;
redirectURLs?: string;
type?: string;
updatedAt?: number;
userId?: string;
};
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
limit?: number;
model: "oauthAccessToken";
offset?: number;
paginationOpts: {
cursor: string | null;
endCursor?: string | null;
id?: number;
maximumBytesRead?: number;
maximumRowsRead?: number;
numItems: number;
};
select?: Array<string>;
sortBy?: { direction: "asc" | "desc"; field: string };
unique?: boolean;
update: {
accessToken?: string;
accessTokenExpiresAt?: number;
clientId?: string;
createdAt?: number;
refreshToken?: string;
refreshTokenExpiresAt?: number;
scopes?: string;
updatedAt?: number;
userId?: string;
};
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
limit?: number;
model: "oauthConsent";
offset?: number;
paginationOpts: {
cursor: string | null;
endCursor?: string | null;
id?: number;
maximumBytesRead?: number;
maximumRowsRead?: number;
numItems: number;
};
select?: Array<string>;
sortBy?: { direction: "asc" | "desc"; field: string };
unique?: boolean;
update: {
clientId?: string;
consentGiven?: boolean;
createdAt?: number;
scopes?: string;
updatedAt?: number;
userId?: string;
};
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
limit?: number;
model: "organization";
offset?: number;
paginationOpts: {
cursor: string | null;
endCursor?: string | null;
id?: number;
maximumBytesRead?: number;
maximumRowsRead?: number;
numItems: number;
};
select?: Array<string>;
sortBy?: { direction: "asc" | "desc"; field: string };
unique?: boolean;
update: {
createdAt?: number;
logo?: string;
metadata?: string;
name?: string;
slug?: string;
};
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
limit?: number;
model: "member";
offset?: number;
paginationOpts: {
cursor: string | null;
endCursor?: string | null;
id?: number;
maximumBytesRead?: number;
maximumRowsRead?: number;
numItems: number;
};
select?: Array<string>;
sortBy?: { direction: "asc" | "desc"; field: string };
unique?: boolean;
update: {
createdAt?: number;
organizationId?: string;
role?: string;
teamId?: string;
userId?: string;
};
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
limit?: number;
model: "invitation";
offset?: number;
paginationOpts: {
cursor: string | null;
endCursor?: string | null;
id?: number;
maximumBytesRead?: number;
maximumRowsRead?: number;
numItems: number;
};
select?: Array<string>;
sortBy?: { direction: "asc" | "desc"; field: string };
unique?: boolean;
update: {
email?: string;
expiresAt?: number;
inviterId?: string;
organizationId?: string;
role?: string;
status?: string;
teamId?: string;
};
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
limit?: number;
model: "team";
offset?: number;
paginationOpts: {
cursor: string | null;
endCursor?: string | null;
id?: number;
maximumBytesRead?: number;
maximumRowsRead?: number;
numItems: number;
};
select?: Array<string>;
sortBy?: { direction: "asc" | "desc"; field: string };
unique?: boolean;
update: {
createdAt?: number;
name?: string;
organizationId?: string;
updatedAt?: number;
};
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
limit?: number;
model: "ssoProvider";
offset?: number;
paginationOpts: {
cursor: string | null;
endCursor?: string | null;
id?: number;
maximumBytesRead?: number;
maximumRowsRead?: number;
numItems: number;
};
select?: Array<string>;
sortBy?: { direction: "asc" | "desc"; field: string };
unique?: boolean;
update: {
domain?: string;
issuer?: string;
oidcConfig?: string;
organizationId?: string;
providerId?: string;
samlConfig?: string;
userId?: string;
};
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
limit?: number;
model: "jwks";
offset?: number;
paginationOpts: {
cursor: string | null;
endCursor?: string | null;
id?: number;
maximumBytesRead?: number;
maximumRowsRead?: number;
numItems: number;
};
select?: Array<string>;
sortBy?: { direction: "asc" | "desc"; field: string };
unique?: boolean;
update: {
createdAt?: number;
privateKey?: string;
publicKey?: string;
};
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
limit?: number;
model: "subscription";
offset?: number;
paginationOpts: {
cursor: string | null;
endCursor?: string | null;
id?: number;
maximumBytesRead?: number;
maximumRowsRead?: number;
numItems: number;
};
select?: Array<string>;
sortBy?: { direction: "asc" | "desc"; field: string };
unique?: boolean;
update: {
cancelAtPeriodEnd?: boolean;
periodEnd?: number;
periodStart?: number;
plan?: string;
referenceId?: string;
seats?: number;
status?: string;
stripeCustomerId?: string;
stripeSubscriptionId?: string;
};
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string
| number
| boolean
| Array<string>
| Array<number>
| null;
}>;
}
| {
limit?: number;
model: "rateLimit";
offset?: number;
paginationOpts: {
cursor: string | null;
endCursor?: string | null;
id?: number;
maximumBytesRead?: number;
maximumRowsRead?: number;
numItems: number;
};
select?: Array<string>;
sortBy?: { direction: "asc" | "desc"; field: string };
unique?: boolean;
update: { count?: number; key?: string; lastRequest?: number };
where?: Array<{
connector?: "AND" | "OR";
field: string;
operator?:
| "lt"
| "lte"
| "gt"
| "gte"
| "eq"
| "in"
| "ne"
| "contains"
| "starts_with"
| "ends_with";
value:
| string