import { type Selectable } from 'kysely'; import type * as Db from '../Db.js'; import type * as db_Schema from '../Schema.js'; /** Columns of the `verified_token_requests` table. */ export type Table = db_Schema.VerifiedTokenRequest; /** A stored verification request. */ export type Record = Selectable; /** Review status of a request. */ export type Status = Record['status']; /** * Inserts a pending request; `undefined` when a pending request for * (chainId, address) already exists. */ export declare function create(db: Db.Db, input: create.Input): Promise; export declare namespace create { /** Fields accepted when inserting a request. */ type Input = { /** Requested token contract address (lowercase). */ address: string; /** Chain the token belongs to. */ chainId: number; /** Display currency, e.g. `USD`. */ currency: string; /** Decimal precision. */ decimals: number; /** Inline SVG logo markup uploaded by the requester. */ logo?: string | undefined; /** HTTPS logo URL from chain metadata. */ logoUri?: string | undefined; /** Display name. */ name: string; /** Requester note to reviewers. */ note?: string | undefined; /** Requesting organization id (`org_…`). */ orgId: string; /** User id that submitted the request, or `super_admin`. */ requestedBy: string; /** Ticker symbol. */ symbol: string; }; } /** Lists an organization's requests, newest first. */ export declare function list(db: Db.Db, orgId: string): Promise; /** * Lists requests in one status globally, oldest first (review-queue order), * with the requesting organization's current name when it still exists. */ export declare function listByStatus(db: Db.Db, status: Status): Promise<(Record & { orgName: string | null; })[]>; /** Gets a request by id. */ export declare function get(db: Db.Db, id: string): Promise; /** Counts an organization's pending requests. */ export declare function countPending(db: Db.Db, orgId: string): Promise; /** Hard-deletes an org-scoped request while pending; `undefined` otherwise. */ export declare function remove(db: Db.Db, orgId: string, id: string): Promise; /** * Marks a pending request approved or denied with reviewer identity; * `undefined` when absent or already reviewed. */ export declare function review(db: Db.Db, id: string, input: review.Input): Promise; export declare namespace review { /** Review outcome fields. */ type Input = { /** Reviewer note shown on denial. */ reviewNote?: string | undefined; /** Reviewing admin email. */ reviewedBy: string; /** Review outcome. */ status: 'approved' | 'denied'; }; } /** Maps a stored row to the wire shape (null `logo`/`logoUri` map to absent). */ export declare function toRequest(record: Record): { logo?: string; logoUri?: string; address: string; chainId: number; createdAt: string; currency: string; decimals: number; id: string; name: string; note: string | null; orgId: string; requestedBy: string; reviewNote: string | null; reviewedAt: string | null; reviewedBy: string | null; status: "approved" | "denied" | "pending"; symbol: string; updatedAt: string; }; //# sourceMappingURL=verifiedTokenRequests.d.ts.map