import { MarketScope_Value, PolicyAction } from "../../../gen/auth/v1/policies_pb.js"; import { DecodedEnum } from "../../../utils/types.js"; import * as v from "valibot"; //#region src/services/policies/api-key-policies/api-key-policies.schemas.d.ts declare const ListApiKeyPoliciesInputSchema: v.StrictObjectSchema<{ readonly keyId: v.OptionalSchema, v.TrimAction, v.MinLengthAction]>, undefined>; }, undefined>; declare const GetApiKeyPolicyInputSchema: v.SchemaWithPipe, v.TrimAction]>, undefined>; readonly keyId: v.OptionalSchema, v.TrimAction, v.MinLengthAction]>, undefined>; }, undefined>, v.TransformAction<{ policyId?: string | undefined; keyId?: string | undefined; }, { policyId: bigint | undefined; keyId: string | undefined; }>]>; /** * From the backend format to a usable frontend/UI format, so big ints to numbers, etc. * Shape matches auth.v1.ApiPolicyView. */ declare const ApiKeyPolicySchema: v.SchemaWithPipe, v.TransformAction]>; readonly name: v.StringSchema; readonly description: v.StringSchema; readonly spotMarkets: v.OptionalSchema, v.IntegerAction, v.GtValueAction, v.MaxValueAction]>; }, undefined>, undefined>, readonly []>; readonly spotMarketScope: v.SchemaWithPipe, v.TransformAction>]>; readonly actions: v.SchemaWithPipe, undefined>, readonly []>, v.TransformAction[]>]>; readonly isTemplate: v.OptionalSchema, false>; readonly sourceTemplateId: v.SchemaWithPipe, undefined>, v.TransformAction]>; readonly createdAt: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; }, number>]>; readonly updatedAt: v.ObjectSchema<{ readonly seconds: v.BigintSchema; readonly nanos: v.OptionalSchema, 0>; }, undefined>; readonly revision: v.SchemaWithPipe, v.TransformAction]>; }, undefined>, v.TransformAction<{ id: string; name: string; description: string; spotMarkets: { symbolId: number; }[]; spotMarketScope: DecodedEnum<"all" | "allowlist">; actions: DecodedEnum<"trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book">[]; isTemplate: boolean; sourceTemplateId?: string | undefined; createdAt: number; updatedAt: { seconds: bigint; nanos: number; }; revision: string; }, { updatedAt: number; updatedAtNs: string; id: string; name: string; description: string; spotMarkets: { symbolId: number; }[]; spotMarketScope: DecodedEnum<"all" | "allowlist">; actions: DecodedEnum<"trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book">[]; isTemplate: boolean; sourceTemplateId?: string | undefined; createdAt: number; revision: string; }>]>; type ApiKeyPolicy = v.InferOutput; declare const ListApiKeyPoliciesResponseSchema: v.SchemaWithPipe, v.TransformAction]>; readonly name: v.StringSchema; readonly description: v.StringSchema; readonly spotMarkets: v.OptionalSchema, v.IntegerAction, v.GtValueAction, v.MaxValueAction]>; }, undefined>, undefined>, readonly []>; readonly spotMarketScope: v.SchemaWithPipe, v.TransformAction>]>; readonly actions: v.SchemaWithPipe, undefined>, readonly []>, v.TransformAction[]>]>; readonly isTemplate: v.OptionalSchema, false>; readonly sourceTemplateId: v.SchemaWithPipe, undefined>, v.TransformAction]>; readonly createdAt: v.SchemaWithPipe; readonly nanos: v.OptionalSchema, 0>; }, undefined>, v.TransformAction<{ seconds: bigint; nanos: number; }, number>]>; readonly updatedAt: v.ObjectSchema<{ readonly seconds: v.BigintSchema; readonly nanos: v.OptionalSchema, 0>; }, undefined>; readonly revision: v.SchemaWithPipe, v.TransformAction]>; }, undefined>, v.TransformAction<{ id: string; name: string; description: string; spotMarkets: { symbolId: number; }[]; spotMarketScope: DecodedEnum<"all" | "allowlist">; actions: DecodedEnum<"trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book">[]; isTemplate: boolean; sourceTemplateId?: string | undefined; createdAt: number; updatedAt: { seconds: bigint; nanos: number; }; revision: string; }, { updatedAt: number; updatedAtNs: string; id: string; name: string; description: string; spotMarkets: { symbolId: number; }[]; spotMarketScope: DecodedEnum<"all" | "allowlist">; actions: DecodedEnum<"trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book">[]; isTemplate: boolean; sourceTemplateId?: string | undefined; createdAt: number; revision: string; }>]>, undefined>, readonly []>; }, undefined>, v.TransformAction<{ policies: { updatedAt: number; updatedAtNs: string; id: string; name: string; description: string; spotMarkets: { symbolId: number; }[]; spotMarketScope: DecodedEnum<"all" | "allowlist">; actions: DecodedEnum<"trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book">[]; isTemplate: boolean; sourceTemplateId?: string | undefined; createdAt: number; revision: string; }[]; }, { updatedAt: number; updatedAtNs: string; id: string; name: string; description: string; spotMarkets: { symbolId: number; }[]; spotMarketScope: DecodedEnum<"all" | "allowlist">; actions: DecodedEnum<"trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book">[]; isTemplate: boolean; sourceTemplateId?: string | undefined; createdAt: number; revision: string; }[]>]>; type ListApiKeyPoliciesResponse = v.InferOutput; declare const CreateApiKeyPolicyInputSchema: v.SchemaWithPipe; readonly description: v.OptionalSchema, "">; readonly spotMarkets: v.OptionalSchema, v.IntegerAction, v.GtValueAction, v.MaxValueAction]>; }, undefined>, undefined>, readonly []>; readonly spotMarketScope: v.SchemaWithPipe, v.TransformAction<"all" | "allowlist", MarketScope_Value.ALL | MarketScope_Value.ALLOWLIST>]>; readonly actions: v.SchemaWithPipe, undefined>, readonly []>, v.TransformAction<("trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book")[], (PolicyAction.TRADE_SPOT | PolicyAction.INTERNAL_TRANSFER | PolicyAction.EXTERNAL_WITHDRAW | PolicyAction.READ_BALANCES | PolicyAction.READ_SPOT | PolicyAction.READ_INTERNAL_TRANSFERS | PolicyAction.READ_ADDRESS_BOOK | PolicyAction.MANAGE_ADDRESS_BOOK)[]>]>; readonly isTemplate: v.OptionalSchema, false>; readonly assignToKeyId: v.OptionalSchema, v.TrimAction]>, undefined>; }, undefined>, v.TransformAction<{ name: string; description: string; spotMarkets: { symbolId: number; }[]; spotMarketScope: MarketScope_Value.ALL | MarketScope_Value.ALLOWLIST; actions: (PolicyAction.TRADE_SPOT | PolicyAction.INTERNAL_TRANSFER | PolicyAction.EXTERNAL_WITHDRAW | PolicyAction.READ_BALANCES | PolicyAction.READ_SPOT | PolicyAction.READ_INTERNAL_TRANSFERS | PolicyAction.READ_ADDRESS_BOOK | PolicyAction.MANAGE_ADDRESS_BOOK)[]; isTemplate: boolean; assignToKeyId?: string | undefined; }, { policy: { name: string; description: string; spotMarkets: { symbolId: number; }[]; spotMarketScope: MarketScope_Value.ALL | MarketScope_Value.ALLOWLIST; actions: (PolicyAction.TRADE_SPOT | PolicyAction.INTERNAL_TRANSFER | PolicyAction.EXTERNAL_WITHDRAW | PolicyAction.READ_BALANCES | PolicyAction.READ_SPOT | PolicyAction.READ_INTERNAL_TRANSFERS | PolicyAction.READ_ADDRESS_BOOK | PolicyAction.MANAGE_ADDRESS_BOOK)[]; isTemplate: boolean; }; assignToKeyId: string | undefined; }>]>; type ApiKeyPolicyCreateInput = v.InferInput; declare const UpdateApiKeyPolicyInputSchema: v.SchemaWithPipe, v.TransformAction]>; readonly expectedRevision: v.SchemaWithPipe, v.TrimAction]>, v.RegexAction, v.TransformAction]>, v.CheckAction]>; readonly name: v.OptionalSchema, undefined>; readonly description: v.OptionalSchema, undefined>; readonly spotMarkets: v.OptionalSchema, v.IntegerAction, v.GtValueAction, v.MaxValueAction]>; }, undefined>, undefined>, undefined>; readonly spotMarketScope: v.OptionalSchema, undefined>; readonly actions: v.OptionalSchema, undefined>, undefined>; readonly isTemplate: v.OptionalSchema, undefined>; }, undefined>, v.CheckAction<{ policyId: bigint; expectedRevision: bigint; name?: string | undefined; description?: string | undefined; spotMarkets?: { symbolId: number; }[] | undefined; spotMarketScope?: "all" | "allowlist" | undefined; actions?: ("trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book")[] | undefined; isTemplate?: boolean | undefined; }, "At least one API key policy field must be provided">, v.TransformAction<{ policyId: bigint; expectedRevision: bigint; name?: string | undefined; description?: string | undefined; spotMarkets?: { symbolId: number; }[] | undefined; spotMarketScope?: "all" | "allowlist" | undefined; actions?: ("trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book")[] | undefined; isTemplate?: boolean | undefined; }, { policyId: bigint; policy: Partial<{ name: string; } & { description: string; } & { spotMarkets: { symbolId: number; }[]; } & { spotMarketScope: MarketScope_Value.ALL | MarketScope_Value.ALLOWLIST; } & { actions: (PolicyAction.TRADE_SPOT | PolicyAction.INTERNAL_TRANSFER | PolicyAction.EXTERNAL_WITHDRAW | PolicyAction.READ_BALANCES | PolicyAction.READ_SPOT | PolicyAction.READ_INTERNAL_TRANSFERS | PolicyAction.READ_ADDRESS_BOOK | PolicyAction.MANAGE_ADDRESS_BOOK)[]; } & { isTemplate: boolean; }>; updateMask: { paths: string[]; }; expectedRevision: bigint; }>]>; type ApiKeyPolicyUpdateInput = v.InferInput; declare const ApplyApiKeyPolicyInputSchema: v.StrictObjectSchema<{ readonly keyId: v.SchemaWithPipe, v.TrimAction, v.MinLengthAction]>; readonly policyId: v.SchemaWithPipe, v.TrimAction]>, undefined>, v.TransformAction]>; }, undefined>; type ApiKeyPolicyApplyInput = v.InferInput; //#endregion export { ApiKeyPolicy, ApiKeyPolicyApplyInput, ApiKeyPolicyCreateInput, ApiKeyPolicySchema, ApiKeyPolicyUpdateInput, ApplyApiKeyPolicyInputSchema, CreateApiKeyPolicyInputSchema, GetApiKeyPolicyInputSchema, ListApiKeyPoliciesInputSchema, ListApiKeyPoliciesResponse, ListApiKeyPoliciesResponseSchema, UpdateApiKeyPolicyInputSchema }; //# sourceMappingURL=api-key-policies.schemas.d.ts.map