import { AlertChannel, AlertDirection, AlertPriceSource, AlertStatus } from "../../gen/alerts/v1/price_alerts_pb.js"; import * as v from "valibot"; //#region src/services/price-alerts/price-alerts.schemas.d.ts declare const CreatePriceAlertInputSchema: v.SchemaWithPipe, v.IntegerAction, v.GtValueAction, v.MaxValueAction]>; readonly direction: v.PicklistSchema; /** Omit to watch the index price on markets that have one, else the last price. */ readonly priceSource: v.OptionalSchema, undefined>; /** Alert price as a decimal string, e.g. `"90000"`. */ readonly price: v.SchemaWithPipe, v.TransformAction]>; readonly channels: v.SchemaWithPipe, undefined>, v.MinLengthAction<("in_app" | "telegram")[], 1, "At least one channel is required.">, v.MaxLengthAction<("in_app" | "telegram")[], 2, "At most two channels are allowed.">, v.CheckAction<("in_app" | "telegram")[], "Channels must be distinct.">, v.TransformAction<("in_app" | "telegram")[], (AlertChannel.IN_APP | AlertChannel.TELEGRAM)[]>]>; /** Reusing a key with the same request returns the alert it created. */ readonly idempotencyKey: v.OptionalSchema, v.TrimAction, v.MinLengthAction]>, undefined>; }, undefined>, v.TransformAction<{ symbolId: number; direction: "above" | "below"; priceSource?: "last_price" | "index_price" | undefined; price: bigint; channels: (AlertChannel.IN_APP | AlertChannel.TELEGRAM)[]; idempotencyKey?: string | undefined; }, { direction: AlertDirection.ABOVE | AlertDirection.BELOW; priceSource: AlertPriceSource.LAST_PRICE | AlertPriceSource.INDEX_PRICE | undefined; priceTicks: bigint; symbolId: number; channels: (AlertChannel.IN_APP | AlertChannel.TELEGRAM)[]; idempotencyKey?: string | undefined; }>]>; type CreatePriceAlertInput = v.InferInput; declare const ListPriceAlertsInputSchema: v.SchemaWithPipe, undefined>, undefined>; /** Only alerts on this market. */ readonly symbolId: v.OptionalSchema, v.IntegerAction, v.GtValueAction, v.MaxValueAction]>, undefined>; /** Page size: default 50, at most 200. */ readonly limit: v.OptionalSchema, v.IntegerAction, v.MinValueAction, v.MaxValueAction]>, undefined>; /** Previous `nextPageToken`; reuse only with the same filters. */ readonly pageToken: v.OptionalSchema, v.TrimAction]>, undefined>; }, undefined>, v.TransformAction<{ statuses?: ("active" | "triggered" | "cancelled")[] | undefined; symbolId?: number | undefined; limit?: number | undefined; pageToken?: string | undefined; }, { statuses: (AlertStatus.ACTIVE | AlertStatus.TRIGGERED | AlertStatus.CANCELLED)[] | undefined; symbolId?: number | undefined; limit?: number | undefined; pageToken?: string | undefined; }>]>; type ListPriceAlertsInput = v.InferInput; declare const UpdatePriceAlertInputSchema: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction, v.TransformAction]>; /** The alert's `revision` from the last read. */ readonly expectedRevision: v.SchemaWithPipe, v.TrimAction]>, v.RegexAction, v.TransformAction]>, v.CheckAction]>, v.MaxValueAction]>; readonly direction: v.OptionalSchema, undefined>; readonly price: v.OptionalSchema, v.TransformAction]>, undefined>; readonly channels: v.OptionalSchema, undefined>, v.MinLengthAction<("in_app" | "telegram")[], 1, "At least one channel is required.">, v.MaxLengthAction<("in_app" | "telegram")[], 2, "At most two channels are allowed.">, v.CheckAction<("in_app" | "telegram")[], "Channels must be distinct.">, v.TransformAction<("in_app" | "telegram")[], (AlertChannel.IN_APP | AlertChannel.TELEGRAM)[]>]>, undefined>; readonly idempotencyKey: v.OptionalSchema, v.TrimAction, v.MinLengthAction]>, undefined>; }, undefined>, v.TransformAction<{ alertId: bigint; expectedRevision: bigint; direction?: "above" | "below" | undefined; price?: bigint | undefined; channels?: (AlertChannel.IN_APP | AlertChannel.TELEGRAM)[] | undefined; idempotencyKey?: string | undefined; }, { alertId: bigint; expectedRevision: bigint; idempotencyKey: string | undefined; update: Partial<{ direction: AlertDirection.ABOVE | AlertDirection.BELOW; } & { priceTicks: bigint; } & { channels: number[]; }>; updateMask: { paths: string[]; }; }>]>; type UpdatePriceAlertInput = v.InferInput; declare const CancelPriceAlertInputSchema: v.StrictObjectSchema<{ readonly alertId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction, v.TransformAction]>; }, undefined>; type CancelPriceAlertInput = v.InferInput; /** A price alert of the caller's root account. Prices are decimal strings. */ declare const PriceAlertSchema: v.SchemaWithPipe, v.TransformAction]>; readonly symbolId: v.NumberSchema; readonly direction: v.SchemaWithPipe, v.TransformAction]>; readonly priceSource: v.SchemaWithPipe, v.TransformAction]>; readonly priceTicks: v.SchemaWithPipe, v.TransformAction]>; readonly referencePriceTicks: v.SchemaWithPipe, v.TransformAction]>; readonly armed: v.BooleanSchema; readonly status: v.SchemaWithPipe, v.TransformAction]>; readonly channels: v.ArraySchema, v.TransformAction]>, undefined>; readonly revision: v.SchemaWithPipe, v.TransformAction]>; readonly createdAt: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; } | undefined, number | undefined>]>; readonly updatedAt: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; } | undefined, number | undefined>]>; readonly triggeredAt: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; } | undefined, number | undefined>]>; readonly triggeredPriceTicks: v.BigintSchema; }, undefined>, v.TransformAction<{ alertId: string; symbolId: number; direction: "unspecified" | "above" | "below"; priceSource: "unspecified" | "last_price" | "index_price"; priceTicks: string; referencePriceTicks: string; armed: boolean; status: "unspecified" | "active" | "triggered" | "cancelled"; channels: ("unspecified" | "in_app" | "telegram")[]; revision: string; createdAt?: number | undefined; updatedAt?: number | undefined; triggeredAt?: number | undefined; triggeredPriceTicks: bigint; }, { alertId: string; symbolId: number; direction: "unspecified" | "above" | "below"; priceSource: "unspecified" | "last_price" | "index_price"; /** Alert price. */ price: string; /** Price when the alert was created or last set again; it fires on a crossing from here. */ referencePrice: string; /** False while an alert created past its price waits for the price to move back first. */ armed: boolean; status: "unspecified" | "active" | "triggered" | "cancelled"; channels: ("unspecified" | "in_app" | "telegram")[]; /** Pass as `expectedRevision` to `update`. */ revision: string; createdAt: number | null; updatedAt: number | null; /** Set only once the alert fired. */ triggeredAt: number | null; /** Price that fired the alert; null unless it fired. */ triggeredPrice: string | null; }>]>; type PriceAlert = v.InferOutput; declare const ListPriceAlertsResultSchema: v.ObjectSchema<{ readonly alerts: v.ArraySchema, v.TransformAction]>; readonly symbolId: v.NumberSchema; readonly direction: v.SchemaWithPipe, v.TransformAction]>; readonly priceSource: v.SchemaWithPipe, v.TransformAction]>; readonly priceTicks: v.SchemaWithPipe, v.TransformAction]>; readonly referencePriceTicks: v.SchemaWithPipe, v.TransformAction]>; readonly armed: v.BooleanSchema; readonly status: v.SchemaWithPipe, v.TransformAction]>; readonly channels: v.ArraySchema, v.TransformAction]>, undefined>; readonly revision: v.SchemaWithPipe, v.TransformAction]>; readonly createdAt: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; } | undefined, number | undefined>]>; readonly updatedAt: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; } | undefined, number | undefined>]>; readonly triggeredAt: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; } | undefined, number | undefined>]>; readonly triggeredPriceTicks: v.BigintSchema; }, undefined>, v.TransformAction<{ alertId: string; symbolId: number; direction: "unspecified" | "above" | "below"; priceSource: "unspecified" | "last_price" | "index_price"; priceTicks: string; referencePriceTicks: string; armed: boolean; status: "unspecified" | "active" | "triggered" | "cancelled"; channels: ("unspecified" | "in_app" | "telegram")[]; revision: string; createdAt?: number | undefined; updatedAt?: number | undefined; triggeredAt?: number | undefined; triggeredPriceTicks: bigint; }, { alertId: string; symbolId: number; direction: "unspecified" | "above" | "below"; priceSource: "unspecified" | "last_price" | "index_price"; /** Alert price. */ price: string; /** Price when the alert was created or last set again; it fires on a crossing from here. */ referencePrice: string; /** False while an alert created past its price waits for the price to move back first. */ armed: boolean; status: "unspecified" | "active" | "triggered" | "cancelled"; channels: ("unspecified" | "in_app" | "telegram")[]; /** Pass as `expectedRevision` to `update`. */ revision: string; createdAt: number | null; updatedAt: number | null; /** Set only once the alert fired. */ triggeredAt: number | null; /** Price that fired the alert; null unless it fired. */ triggeredPrice: string | null; }>]>, undefined>; readonly nextPageToken: v.OptionalSchema, "">; }, undefined>; /** One page of alerts, newest first; an empty `nextPageToken` means no more. */ type ListPriceAlertsResult = v.InferOutput; declare const UpdatePriceAlertResultSchema: v.ObjectSchema<{ readonly alert: v.SchemaWithPipe, v.TransformAction]>; readonly symbolId: v.NumberSchema; readonly direction: v.SchemaWithPipe, v.TransformAction]>; readonly priceSource: v.SchemaWithPipe, v.TransformAction]>; readonly priceTicks: v.SchemaWithPipe, v.TransformAction]>; readonly referencePriceTicks: v.SchemaWithPipe, v.TransformAction]>; readonly armed: v.BooleanSchema; readonly status: v.SchemaWithPipe, v.TransformAction]>; readonly channels: v.ArraySchema, v.TransformAction]>, undefined>; readonly revision: v.SchemaWithPipe, v.TransformAction]>; readonly createdAt: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; } | undefined, number | undefined>]>; readonly updatedAt: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; } | undefined, number | undefined>]>; readonly triggeredAt: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; } | undefined, number | undefined>]>; readonly triggeredPriceTicks: v.BigintSchema; }, undefined>, v.TransformAction<{ alertId: string; symbolId: number; direction: "unspecified" | "above" | "below"; priceSource: "unspecified" | "last_price" | "index_price"; priceTicks: string; referencePriceTicks: string; armed: boolean; status: "unspecified" | "active" | "triggered" | "cancelled"; channels: ("unspecified" | "in_app" | "telegram")[]; revision: string; createdAt?: number | undefined; updatedAt?: number | undefined; triggeredAt?: number | undefined; triggeredPriceTicks: bigint; }, { alertId: string; symbolId: number; direction: "unspecified" | "above" | "below"; priceSource: "unspecified" | "last_price" | "index_price"; /** Alert price. */ price: string; /** Price when the alert was created or last set again; it fires on a crossing from here. */ referencePrice: string; /** False while an alert created past its price waits for the price to move back first. */ armed: boolean; status: "unspecified" | "active" | "triggered" | "cancelled"; channels: ("unspecified" | "in_app" | "telegram")[]; /** Pass as `expectedRevision` to `update`. */ revision: string; createdAt: number | null; updatedAt: number | null; /** Set only once the alert fired. */ triggeredAt: number | null; /** Price that fired the alert; null unless it fired. */ triggeredPrice: string | null; }>]>; readonly outcome: v.SchemaWithPipe, v.TransformAction]>; }, undefined>; type UpdatePriceAlertResult = v.InferOutput; //#endregion export { CancelPriceAlertInput, CancelPriceAlertInputSchema, CreatePriceAlertInput, CreatePriceAlertInputSchema, ListPriceAlertsInput, ListPriceAlertsInputSchema, ListPriceAlertsResult, ListPriceAlertsResultSchema, PriceAlert, PriceAlertSchema, UpdatePriceAlertInput, UpdatePriceAlertInputSchema, UpdatePriceAlertResult, UpdatePriceAlertResultSchema }; //# sourceMappingURL=price-alerts.schemas.d.ts.map