import { Message } from "@bufbuild/protobuf"; import { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; import { FieldMask, Timestamp } from "@bufbuild/protobuf/wkt"; declare namespace policies_pb_d_exports { export { ApiPolicySpec, ApiPolicySpecSchema, ApiPolicyView, ApiPolicyViewSchema, CreateApiPolicyRequest, CreateApiPolicyRequestSchema, CreateApiPolicyResponse, CreateApiPolicyResponseSchema, CreateSubaccountPolicyRequest, CreateSubaccountPolicyRequestSchema, CreateSubaccountPolicyResponse, CreateSubaccountPolicyResponseSchema, DeleteApiPolicyRequest, DeleteApiPolicyRequestSchema, DeleteApiPolicyResponse, DeleteApiPolicyResponseSchema, DeleteSubaccountPolicyRequest, DeleteSubaccountPolicyRequestSchema, DeleteSubaccountPolicyResponse, DeleteSubaccountPolicyResponseSchema, GetApiPolicyRequest, GetApiPolicyRequestSchema, GetApiPolicyResponse, GetApiPolicyResponseSchema, GetSubaccountPolicyRequest, GetSubaccountPolicyRequestSchema, GetSubaccountPolicyResponse, GetSubaccountPolicyResponseSchema, ListApiPoliciesRequest, ListApiPoliciesRequestSchema, ListApiPoliciesResponse, ListApiPoliciesResponseSchema, ListSubaccountPoliciesRequest, ListSubaccountPoliciesRequestSchema, ListSubaccountPoliciesResponse, ListSubaccountPoliciesResponseSchema, MarketScope, MarketScopeSchema, MarketScope_Value, MarketScope_ValueSchema, PolicyAction, PolicyActionSchema, PolicyService, SetApiKeyPolicyRequest, SetApiKeyPolicyRequestSchema, SetApiKeyPolicyResponse, SetApiKeyPolicyResponseSchema, SetSubaccountPolicyRequest, SetSubaccountPolicyRequestSchema, SetSubaccountPolicyResponse, SetSubaccountPolicyResponseSchema, SpotMarketRule, SpotMarketRuleSchema, SpotMarketSelector, SpotMarketSelectorSchema, SubaccountPolicySpec, SubaccountPolicySpecSchema, SubaccountPolicyView, SubaccountPolicyViewSchema, UpdateApiPolicyRequest, UpdateApiPolicyRequestSchema, UpdateApiPolicyResponse, UpdateApiPolicyResponseSchema, UpdateSubaccountPolicyRequest, UpdateSubaccountPolicyRequestSchema, UpdateSubaccountPolicyResponse, UpdateSubaccountPolicyResponseSchema, file_auth_v1_policies }; } /** * Describes the file auth/v1/policies.proto. */ declare const file_auth_v1_policies: GenFile; /** * MarketScope describes how a policy applies to spot markets. * * @generated from message auth.v1.MarketScope */ type MarketScope = Message<"auth.v1.MarketScope"> & {}; /** * Describes the message auth.v1.MarketScope. * Use `create(MarketScopeSchema)` to create a new message. */ declare const MarketScopeSchema: GenMessage; /** * Value is the market-level scope: * - ALL: no market-level restriction; new listings are automatically allowed. * - ALLOWLIST: only the listed markets are allowed. * * @generated from enum auth.v1.MarketScope.Value */ declare enum MarketScope_Value { /** * No scope selected. Create and update requests treat this as ALL. * * @generated from enum value: UNSPECIFIED = 0; */ UNSPECIFIED = 0, /** * Allow all current and future markets for this policy. * * @generated from enum value: ALL = 1; */ ALL = 1, /** * Allow only the markets listed on this policy. * * @generated from enum value: ALLOWLIST = 2; */ ALLOWLIST = 2 } /** * Describes the enum auth.v1.MarketScope.Value. */ declare const MarketScope_ValueSchema: GenEnum; /** * SpotMarketSelector identifies an allowed spot market in policy mutations. * * @generated from message auth.v1.SpotMarketSelector */ type SpotMarketSelector = Message<"auth.v1.SpotMarketSelector"> & { /** * Stable numeric pair ID from GetSpotConfig. * * @generated from field: uint32 symbol_id = 1; */ symbolId: number; }; /** * Describes the message auth.v1.SpotMarketSelector. * Use `create(SpotMarketSelectorSchema)` to create a new message. */ declare const SpotMarketSelectorSchema: GenMessage; /** * SpotMarketRule describes an allowed spot market in policy views. * * @generated from message auth.v1.SpotMarketRule */ type SpotMarketRule = Message<"auth.v1.SpotMarketRule"> & { /** * Stable numeric pair ID. * * @generated from field: uint32 symbol_id = 1; */ symbolId: number; }; /** * Describes the message auth.v1.SpotMarketRule. * Use `create(SpotMarketRuleSchema)` to create a new message. */ declare const SpotMarketRuleSchema: GenMessage; /** * SubaccountPolicyView is the public view of a sub-account policy. * * @generated from message auth.v1.SubaccountPolicyView */ type SubaccountPolicyView = Message<"auth.v1.SubaccountPolicyView"> & { /** * Policy identifier (opaque ID). * * @generated from field: fixed64 id = 1; */ id: bigint; /** * Human-readable policy name. * * @generated from field: string name = 2; */ name: string; /** * Optional policy description for dashboards and audits. * * @generated from field: string description = 3; */ description: string; /** * Allowed spot markets for this sub-account. * * @generated from field: repeated auth.v1.SpotMarketRule spot_markets = 4; */ spotMarkets: SpotMarketRule[]; /** * Market-level scope for spot markets. When ALL, spot_markets is returned * for display only and is not enforced. * * @generated from field: auth.v1.MarketScope.Value spot_market_scope = 6; */ spotMarketScope: MarketScope_Value; /** * Effective high-level actions enabled for the sub-account. Mandatory * read-only actions are always included. * * @generated from field: repeated auth.v1.PolicyAction actions = 8; */ actions: PolicyAction[]; /** * True if this policy is a reusable template; false if it is a * per-sub-account instance. * * @generated from field: bool is_template = 10; */ isTemplate: boolean; /** * Optional source template this policy was copied from (opaque ID). This is * audit metadata only and does not imply live linkage. * * @generated from field: fixed64 source_template_id = 11; */ sourceTemplateId: bigint; /** * Maximum notional size allowed for any single order on this sub-account, * expressed in canonical quote microunits (one unit is 0.000001 USDT). * A value of 0 means "no explicit cap". * * @generated from field: uint64 max_order_notional = 13; */ maxOrderNotional: bigint; /** * Maximum number of resting orders allowed on this sub-account at any time. * A value of 0 means "no explicit cap". * * @generated from field: uint32 max_open_orders = 14; */ maxOpenOrders: number; /** * When true, new orders and exposure-increasing order or trigger changes are * rejected regardless of other settings. Existing orders and triggers may * still be canceled or paused by an otherwise authorized caller. * * @generated from field: bool trading_halted = 23; */ tradingHalted: boolean; /** * When true, this policy is write-protected and requires an elevated approval * flow to modify it. * * @generated from field: bool locked = 27; */ locked: boolean; /** * Optional review time in UTC. This is governance metadata and does not * automatically disable the policy. * * @generated from field: google.protobuf.Timestamp review_at = 28; */ reviewAt?: Timestamp | undefined; /** * Optional expiry time in UTC. This is governance metadata and does not * automatically disable the policy. * * @generated from field: google.protobuf.Timestamp expires_at = 29; */ expiresAt?: Timestamp | undefined; /** * Creation time in UTC. * * @generated from field: google.protobuf.Timestamp created_at = 20; */ createdAt?: Timestamp | undefined; /** * Last update time in UTC. * * @generated from field: google.protobuf.Timestamp updated_at = 21; */ updatedAt?: Timestamp | undefined; /** * Monotonic resource revision used for conditional updates. * * @generated from field: uint64 revision = 30; */ revision: bigint; }; /** * Describes the message auth.v1.SubaccountPolicyView. * Use `create(SubaccountPolicyViewSchema)` to create a new message. */ declare const SubaccountPolicyViewSchema: GenMessage; /** * ListSubaccountPoliciesRequest lists the finite set of sub-account policies * visible in the requested account scope. Results are sorted by ascending * policy ID and are not paginated. * * @generated from message auth.v1.ListSubaccountPoliciesRequest */ type ListSubaccountPoliciesRequest = Message<"auth.v1.ListSubaccountPoliciesRequest"> & { /** * Optional sub-account context. When provided, a current member may read the * policy attached to that sub-account; the owner retains visibility of all * policies owned by their root account. When omitted, only policies owned by * the caller's root account are returned. * * @generated from field: optional fixed64 subaccount_id = 1; */ subaccountId?: bigint | undefined; }; /** * Describes the message auth.v1.ListSubaccountPoliciesRequest. * Use `create(ListSubaccountPoliciesRequestSchema)` to create a new message. */ declare const ListSubaccountPoliciesRequestSchema: GenMessage; /** * ListSubaccountPoliciesResponse contains sub-account policy templates sorted * by ascending policy ID. * * @generated from message auth.v1.ListSubaccountPoliciesResponse */ type ListSubaccountPoliciesResponse = Message<"auth.v1.ListSubaccountPoliciesResponse"> & { /** * Sub-account policy templates visible to the caller. * * @generated from field: repeated auth.v1.SubaccountPolicyView policies = 1; */ policies: SubaccountPolicyView[]; }; /** * Describes the message auth.v1.ListSubaccountPoliciesResponse. * Use `create(ListSubaccountPoliciesResponseSchema)` to create a new message. */ declare const ListSubaccountPoliciesResponseSchema: GenMessage; /** * GetSubaccountPolicyRequest fetches one sub-account policy template by ID. * * @generated from message auth.v1.GetSubaccountPolicyRequest */ type GetSubaccountPolicyRequest = Message<"auth.v1.GetSubaccountPolicyRequest"> & { /** * Policy identifier (opaque ID). * * @generated from field: fixed64 policy_id = 1; */ policyId: bigint; /** * Optional sub-account context. When provided, a current member may read the * policy attached to that sub-account; the owner may also read another policy * owned by their root account. When omitted, the policy must be owned by the * caller's root account. * * @generated from field: optional fixed64 subaccount_id = 2; */ subaccountId?: bigint | undefined; }; /** * Describes the message auth.v1.GetSubaccountPolicyRequest. * Use `create(GetSubaccountPolicyRequestSchema)` to create a new message. */ declare const GetSubaccountPolicyRequestSchema: GenMessage; /** * GetSubaccountPolicyResponse returns the requested sub-account policy. * * @generated from message auth.v1.GetSubaccountPolicyResponse */ type GetSubaccountPolicyResponse = Message<"auth.v1.GetSubaccountPolicyResponse"> & { /** * Matching sub-account policy. * * @generated from field: auth.v1.SubaccountPolicyView policy = 1; */ policy?: SubaccountPolicyView | undefined; }; /** * Describes the message auth.v1.GetSubaccountPolicyResponse. * Use `create(GetSubaccountPolicyResponseSchema)` to create a new message. */ declare const GetSubaccountPolicyResponseSchema: GenMessage; /** * SubaccountPolicySpec contains the mutable configuration of a sub-account policy. * * @generated from message auth.v1.SubaccountPolicySpec */ type SubaccountPolicySpec = Message<"auth.v1.SubaccountPolicySpec"> & { /** * Human-readable policy name. Create requires a non-empty value; update * validates it after merging fields selected by update_mask. * * @generated from field: string name = 1; */ name: string; /** * Optional policy description for dashboards and audits. Maximum 256 characters. * * @generated from field: string description = 2; */ description: string; /** * Allowed spot markets for this policy. * * @generated from field: repeated auth.v1.SpotMarketSelector spot_markets = 3; */ spotMarkets: SpotMarketSelector[]; /** * Market-level scope for spot markets. When unspecified, defaults to ALL. * * @generated from field: auth.v1.MarketScope.Value spot_market_scope = 5; */ spotMarketScope: MarketScope_Value; /** * High-level actions enabled for the sub-account policy. Mandatory read-only * actions are included when omitted. Up to 64 unique explicit actions are * allowed. * * @generated from field: repeated auth.v1.PolicyAction actions = 7; */ actions: PolicyAction[]; /** * Maximum notional size for any single order on this sub-account, expressed * in canonical quote microunits (one unit is 0.000001 USDT). A value of 0 * means no explicit cap. * * @generated from field: uint64 max_order_notional = 13; */ maxOrderNotional: bigint; /** * Maximum number of resting orders allowed on this sub-account at any time. * A value of 0 means no explicit cap. * * @generated from field: uint32 max_open_orders = 14; */ maxOpenOrders: number; /** * When true, new orders and exposure-increasing order or trigger changes are * rejected regardless of other settings. Existing orders and triggers may * still be canceled or paused by an otherwise authorized caller. * * @generated from field: bool trading_halted = 21; */ tradingHalted: boolean; /** * When true, the policy is write-protected and requires an elevated mutation path. * * @generated from field: bool locked = 25; */ locked: boolean; /** * Optional review time in UTC. This does not automatically disable the policy. * * @generated from field: google.protobuf.Timestamp review_at = 26; */ reviewAt?: Timestamp | undefined; /** * Optional expiry time in UTC. This does not automatically disable the policy. * * @generated from field: google.protobuf.Timestamp expires_at = 27; */ expiresAt?: Timestamp | undefined; }; /** * Describes the message auth.v1.SubaccountPolicySpec. * Use `create(SubaccountPolicySpecSchema)` to create a new message. */ declare const SubaccountPolicySpecSchema: GenMessage; /** * CreateSubaccountPolicyRequest defines a new sub-account policy template, with * an optional attach step for one target sub-account. * * @generated from message auth.v1.CreateSubaccountPolicyRequest */ type CreateSubaccountPolicyRequest = Message<"auth.v1.CreateSubaccountPolicyRequest"> & { /** * Complete mutable policy configuration. * * @generated from field: auth.v1.SubaccountPolicySpec policy = 1; */ policy?: SubaccountPolicySpec | undefined; /** * Optional target sub-account to attach atomically after creation. * * @generated from field: optional fixed64 subaccount_id = 2; */ subaccountId?: bigint | undefined; }; /** * Describes the message auth.v1.CreateSubaccountPolicyRequest. * Use `create(CreateSubaccountPolicyRequestSchema)` to create a new message. */ declare const CreateSubaccountPolicyRequestSchema: GenMessage; /** * CreateSubaccountPolicyResponse returns the created sub-account policy. * * @generated from message auth.v1.CreateSubaccountPolicyResponse */ type CreateSubaccountPolicyResponse = Message<"auth.v1.CreateSubaccountPolicyResponse"> & { /** * Created sub-account policy. * * @generated from field: auth.v1.SubaccountPolicyView policy = 1; */ policy?: SubaccountPolicyView | undefined; }; /** * Describes the message auth.v1.CreateSubaccountPolicyResponse. * Use `create(CreateSubaccountPolicyResponseSchema)` to create a new message. */ declare const CreateSubaccountPolicyResponseSchema: GenMessage; /** * UpdateSubaccountPolicyRequest changes selected mutable fields on an existing * sub-account policy. * * @generated from message auth.v1.UpdateSubaccountPolicyRequest */ type UpdateSubaccountPolicyRequest = Message<"auth.v1.UpdateSubaccountPolicyRequest"> & { /** * Policy identifier (opaque ID). * * @generated from field: fixed64 policy_id = 1; */ policyId: bigint; /** * Candidate values for fields selected by update_mask. * * @generated from field: auth.v1.SubaccountPolicySpec policy = 2; */ policy?: SubaccountPolicySpec | undefined; /** * Mutable fields to apply. Paths are relative to policy. The mask is required, * must be non-empty, and cannot contain "*". * * @generated from field: google.protobuf.FieldMask update_mask = 3; */ updateMask?: FieldMask | undefined; /** * Revision returned by the latest successful read. Stale revisions fail with * a conflict before no-op detection. * * @generated from field: uint64 expected_revision = 4; */ expectedRevision: bigint; }; /** * Describes the message auth.v1.UpdateSubaccountPolicyRequest. * Use `create(UpdateSubaccountPolicyRequestSchema)` to create a new message. */ declare const UpdateSubaccountPolicyRequestSchema: GenMessage; /** * UpdateSubaccountPolicyResponse returns the updated sub-account policy. * * @generated from message auth.v1.UpdateSubaccountPolicyResponse */ type UpdateSubaccountPolicyResponse = Message<"auth.v1.UpdateSubaccountPolicyResponse"> & { /** * Updated sub-account policy. * * @generated from field: auth.v1.SubaccountPolicyView policy = 1; */ policy?: SubaccountPolicyView | undefined; }; /** * Describes the message auth.v1.UpdateSubaccountPolicyResponse. * Use `create(UpdateSubaccountPolicyResponseSchema)` to create a new message. */ declare const UpdateSubaccountPolicyResponseSchema: GenMessage; /** * DeleteSubaccountPolicyRequest deletes a sub-account policy template when it * is not in use. * * @generated from message auth.v1.DeleteSubaccountPolicyRequest */ type DeleteSubaccountPolicyRequest = Message<"auth.v1.DeleteSubaccountPolicyRequest"> & { /** * Policy identifier (opaque ID). * * @generated from field: fixed64 policy_id = 1; */ policyId: bigint; }; /** * Describes the message auth.v1.DeleteSubaccountPolicyRequest. * Use `create(DeleteSubaccountPolicyRequestSchema)` to create a new message. */ declare const DeleteSubaccountPolicyRequestSchema: GenMessage; /** * DeleteSubaccountPolicyResponse is empty when the delete succeeds. * * @generated from message auth.v1.DeleteSubaccountPolicyResponse */ type DeleteSubaccountPolicyResponse = Message<"auth.v1.DeleteSubaccountPolicyResponse"> & {}; /** * Describes the message auth.v1.DeleteSubaccountPolicyResponse. * Use `create(DeleteSubaccountPolicyResponseSchema)` to create a new message. */ declare const DeleteSubaccountPolicyResponseSchema: GenMessage; /** * SetSubaccountPolicyRequest attaches or clears a policy template on a * sub-account. * * @generated from message auth.v1.SetSubaccountPolicyRequest */ type SetSubaccountPolicyRequest = Message<"auth.v1.SetSubaccountPolicyRequest"> & { /** * Sub-account identifier (opaque ID). * * @generated from field: fixed64 subaccount_id = 1; */ subaccountId: bigint; /** * Policy template to attach (opaque ID). A value of 0 clears the explicit * binding and restores the system Read Only policy. * * @generated from field: fixed64 policy_id = 2; */ policyId: bigint; }; /** * Describes the message auth.v1.SetSubaccountPolicyRequest. * Use `create(SetSubaccountPolicyRequestSchema)` to create a new message. */ declare const SetSubaccountPolicyRequestSchema: GenMessage; /** * SetSubaccountPolicyResponse is empty when the policy binding succeeds. * * @generated from message auth.v1.SetSubaccountPolicyResponse */ type SetSubaccountPolicyResponse = Message<"auth.v1.SetSubaccountPolicyResponse"> & {}; /** * Describes the message auth.v1.SetSubaccountPolicyResponse. * Use `create(SetSubaccountPolicyResponseSchema)` to create a new message. */ declare const SetSubaccountPolicyResponseSchema: GenMessage; /** * ApiPolicyView is the public view of an API key policy template. Its action * and spot-market floor cannot exceed an attached sub-account policy. * * @generated from message auth.v1.ApiPolicyView */ type ApiPolicyView = Message<"auth.v1.ApiPolicyView"> & { /** * Policy identifier (opaque ID). * * @generated from field: fixed64 id = 1; */ id: bigint; /** * Human-readable policy name. * * @generated from field: string name = 2; */ name: string; /** * Optional policy description for dashboards and audits. * * @generated from field: string description = 3; */ description: string; /** * Allowed spot markets for this API key policy. * * @generated from field: repeated auth.v1.SpotMarketRule spot_markets = 4; */ spotMarkets: SpotMarketRule[]; /** * High-level actions enabled for this API key. Up to 64 unique explicit * actions may be returned. * * @generated from field: repeated auth.v1.PolicyAction actions = 6; */ actions: PolicyAction[]; /** * Market-level scope for spot markets. When ALL, spot_markets is returned * for display only and is not enforced. * * --- Template / lifecycle metadata --- * * @generated from field: auth.v1.MarketScope.Value spot_market_scope = 7; */ spotMarketScope: MarketScope_Value; /** * When true, this policy is intended to be reused as a template across * multiple API keys. When false, it represents a single-key instance. * * @generated from field: bool is_template = 19; */ isTemplate: boolean; /** * Optional source template this policy was copied from (opaque ID). This is * audit metadata only and does not imply live linkage. * * @generated from field: fixed64 source_template_id = 20; */ sourceTemplateId: bigint; /** * Creation time in UTC. * * @generated from field: google.protobuf.Timestamp created_at = 21; */ createdAt?: Timestamp | undefined; /** * Last update time in UTC. * * @generated from field: google.protobuf.Timestamp updated_at = 22; */ updatedAt?: Timestamp | undefined; /** * Monotonic resource revision used for conditional updates. * * @generated from field: uint64 revision = 23; */ revision: bigint; }; /** * Describes the message auth.v1.ApiPolicyView. * Use `create(ApiPolicyViewSchema)` to create a new message. */ declare const ApiPolicyViewSchema: GenMessage; /** * ListApiPoliciesRequest lists the finite set of API key policies visible in * the requested account scope. Results are sorted by ascending policy ID and * are not paginated. * * @generated from message auth.v1.ListApiPoliciesRequest */ type ListApiPoliciesRequest = Message<"auth.v1.ListApiPoliciesRequest"> & { /** * Optional API key context for delegated administration. When omitted, only * policies owned by the caller's root account are returned. * * @generated from field: optional string key_id = 1; */ keyId?: string | undefined; }; /** * Describes the message auth.v1.ListApiPoliciesRequest. * Use `create(ListApiPoliciesRequestSchema)` to create a new message. */ declare const ListApiPoliciesRequestSchema: GenMessage; /** * ListApiPoliciesResponse contains API key policy templates sorted by ascending * policy ID. * * @generated from message auth.v1.ListApiPoliciesResponse */ type ListApiPoliciesResponse = Message<"auth.v1.ListApiPoliciesResponse"> & { /** * API key policy templates visible to the caller. * * @generated from field: repeated auth.v1.ApiPolicyView policies = 1; */ policies: ApiPolicyView[]; }; /** * Describes the message auth.v1.ListApiPoliciesResponse. * Use `create(ListApiPoliciesResponseSchema)` to create a new message. */ declare const ListApiPoliciesResponseSchema: GenMessage; /** * GetApiPolicyRequest fetches one API key policy template by ID. * * @generated from message auth.v1.GetApiPolicyRequest */ type GetApiPolicyRequest = Message<"auth.v1.GetApiPolicyRequest"> & { /** * Policy identifier (opaque ID). * * @generated from field: fixed64 policy_id = 1; */ policyId: bigint; /** * Optional API key context for delegated administration. When omitted, the * policy must be owned by the caller's root account. * * @generated from field: optional string key_id = 2; */ keyId?: string | undefined; }; /** * Describes the message auth.v1.GetApiPolicyRequest. * Use `create(GetApiPolicyRequestSchema)` to create a new message. */ declare const GetApiPolicyRequestSchema: GenMessage; /** * GetApiPolicyResponse returns the requested API key policy. * * @generated from message auth.v1.GetApiPolicyResponse */ type GetApiPolicyResponse = Message<"auth.v1.GetApiPolicyResponse"> & { /** * Matching API key policy. * * @generated from field: auth.v1.ApiPolicyView policy = 1; */ policy?: ApiPolicyView | undefined; }; /** * Describes the message auth.v1.GetApiPolicyResponse. * Use `create(GetApiPolicyResponseSchema)` to create a new message. */ declare const GetApiPolicyResponseSchema: GenMessage; /** * ApiPolicySpec contains the mutable configuration of an API key policy. * * @generated from message auth.v1.ApiPolicySpec */ type ApiPolicySpec = Message<"auth.v1.ApiPolicySpec"> & { /** * Human-readable policy name. Create requires a non-empty value; update * validates it after merging fields selected by update_mask. * * @generated from field: string name = 1; */ name: string; /** * Optional policy description for dashboards and audits. Maximum 256 characters. * * @generated from field: string description = 2; */ description: string; /** * Allowed spot markets for this API key policy. * * @generated from field: repeated auth.v1.SpotMarketSelector spot_markets = 3; */ spotMarkets: SpotMarketSelector[]; /** * Market-level scope for spot markets. When unspecified, defaults to ALL. * * @generated from field: auth.v1.MarketScope.Value spot_market_scope = 5; */ spotMarketScope: MarketScope_Value; /** * High-level actions enabled for the API key policy. An empty list grants no * access. Up to 64 unique explicit actions are allowed. * * @generated from field: repeated auth.v1.PolicyAction actions = 7; */ actions: PolicyAction[]; /** * Whether this policy should be treated as a reusable template. * * @generated from field: bool is_template = 19; */ isTemplate: boolean; }; /** * Describes the message auth.v1.ApiPolicySpec. * Use `create(ApiPolicySpecSchema)` to create a new message. */ declare const ApiPolicySpecSchema: GenMessage; /** * CreateApiPolicyRequest defines a new API key policy template. * * @generated from message auth.v1.CreateApiPolicyRequest */ type CreateApiPolicyRequest = Message<"auth.v1.CreateApiPolicyRequest"> & { /** * Complete mutable policy configuration. * * @generated from field: auth.v1.ApiPolicySpec policy = 1; */ policy?: ApiPolicySpec | undefined; /** * Optional API key identifier to bind this newly-created policy to * atomically. When set, the caller must be allowed to manage the key and the * create+assign operation consumes a single fresh step-up proof. * * @generated from field: string assign_to_key_id = 2; */ assignToKeyId: string; }; /** * Describes the message auth.v1.CreateApiPolicyRequest. * Use `create(CreateApiPolicyRequestSchema)` to create a new message. */ declare const CreateApiPolicyRequestSchema: GenMessage; /** * CreateApiPolicyResponse returns the created API key policy. * * @generated from message auth.v1.CreateApiPolicyResponse */ type CreateApiPolicyResponse = Message<"auth.v1.CreateApiPolicyResponse"> & { /** * Created API key policy. * * @generated from field: auth.v1.ApiPolicyView policy = 1; */ policy?: ApiPolicyView | undefined; }; /** * Describes the message auth.v1.CreateApiPolicyResponse. * Use `create(CreateApiPolicyResponseSchema)` to create a new message. */ declare const CreateApiPolicyResponseSchema: GenMessage; /** * UpdateApiPolicyRequest changes selected mutable fields on an existing API * key policy. * * @generated from message auth.v1.UpdateApiPolicyRequest */ type UpdateApiPolicyRequest = Message<"auth.v1.UpdateApiPolicyRequest"> & { /** * Policy identifier (opaque ID). * * @generated from field: fixed64 policy_id = 1; */ policyId: bigint; /** * Candidate values for fields selected by update_mask. * * @generated from field: auth.v1.ApiPolicySpec policy = 2; */ policy?: ApiPolicySpec | undefined; /** * Mutable fields to apply. Paths are relative to policy. The mask is required, * must be non-empty, and cannot contain "*". * * @generated from field: google.protobuf.FieldMask update_mask = 3; */ updateMask?: FieldMask | undefined; /** * Revision returned by the latest successful read. Stale revisions fail with * a conflict before no-op detection. * * @generated from field: uint64 expected_revision = 4; */ expectedRevision: bigint; }; /** * Describes the message auth.v1.UpdateApiPolicyRequest. * Use `create(UpdateApiPolicyRequestSchema)` to create a new message. */ declare const UpdateApiPolicyRequestSchema: GenMessage; /** * UpdateApiPolicyResponse returns the updated API key policy. * * @generated from message auth.v1.UpdateApiPolicyResponse */ type UpdateApiPolicyResponse = Message<"auth.v1.UpdateApiPolicyResponse"> & { /** * Updated API key policy. * * @generated from field: auth.v1.ApiPolicyView policy = 1; */ policy?: ApiPolicyView | undefined; }; /** * Describes the message auth.v1.UpdateApiPolicyResponse. * Use `create(UpdateApiPolicyResponseSchema)` to create a new message. */ declare const UpdateApiPolicyResponseSchema: GenMessage; /** * DeleteApiPolicyRequest deletes an API key policy template when it is not in use. * * @generated from message auth.v1.DeleteApiPolicyRequest */ type DeleteApiPolicyRequest = Message<"auth.v1.DeleteApiPolicyRequest"> & { /** * Policy identifier (opaque ID). * * @generated from field: fixed64 policy_id = 1; */ policyId: bigint; }; /** * Describes the message auth.v1.DeleteApiPolicyRequest. * Use `create(DeleteApiPolicyRequestSchema)` to create a new message. */ declare const DeleteApiPolicyRequestSchema: GenMessage; /** * DeleteApiPolicyResponse is empty when the delete succeeds. * * @generated from message auth.v1.DeleteApiPolicyResponse */ type DeleteApiPolicyResponse = Message<"auth.v1.DeleteApiPolicyResponse"> & {}; /** * Describes the message auth.v1.DeleteApiPolicyResponse. * Use `create(DeleteApiPolicyResponseSchema)` to create a new message. */ declare const DeleteApiPolicyResponseSchema: GenMessage; /** * SetApiKeyPolicyRequest attaches or clears a policy template on an API key. * * @generated from message auth.v1.SetApiKeyPolicyRequest */ type SetApiKeyPolicyRequest = Message<"auth.v1.SetApiKeyPolicyRequest"> & { /** * Opaque API key identifier, formatted as "ak_" followed by 32 lowercase hex * characters. * * @generated from field: string key_id = 1; */ keyId: string; /** * Policy template to attach (opaque ID). A value of 0 clears the binding. * An API key without an attached policy has no permissions. * * @generated from field: fixed64 policy_id = 2; */ policyId: bigint; }; /** * Describes the message auth.v1.SetApiKeyPolicyRequest. * Use `create(SetApiKeyPolicyRequestSchema)` to create a new message. */ declare const SetApiKeyPolicyRequestSchema: GenMessage; /** * SetApiKeyPolicyResponse is empty when the policy binding succeeds. * * @generated from message auth.v1.SetApiKeyPolicyResponse */ type SetApiKeyPolicyResponse = Message<"auth.v1.SetApiKeyPolicyResponse"> & {}; /** * Describes the message auth.v1.SetApiKeyPolicyResponse. * Use `create(SetApiKeyPolicyResponseSchema)` to create a new message. */ declare const SetApiKeyPolicyResponseSchema: GenMessage; /** * PolicyAction is a high-level permission that can be granted by a policy. * Write-style actions also grant the matching read visibility where needed by * the product experience. * * @generated from enum auth.v1.PolicyAction */ declare enum PolicyAction { /** * No policy action selected. An empty API-key action list grants no access; * sub-account policies retain their mandatory read-only actions. * * @generated from enum value: UNSPECIFIED = 0; */ UNSPECIFIED = 0, /** * Allow all spot order mutations: create, modify, replace, cancel, batch * operations, live cancel-all, and arming or disabling cancel-all-after. * Includes reading spot orders and trades and placing or modifying triggers. * Authorized cancellation remains available when trading activity is disabled; * this does not grant mutation access to a read-only API key. * * @generated from enum value: TRADE_SPOT = 1; */ TRADE_SPOT = 1, /** * Allow internal transfers between sub-accounts or linked Polyester accounts, * including reading internal transfer history. * * @generated from enum value: INTERNAL_TRANSFER = 3; */ INTERNAL_TRANSFER = 3, /** * Allow value to leave Trading through external withdrawals. Destination * authorization is enforced separately from this policy. * * @generated from enum value: EXTERNAL_WITHDRAW = 4; */ EXTERNAL_WITHDRAW = 4, /** * Allow reading balances and equity for a sub-account or API key. * * @generated from enum value: READ_BALANCES = 5; */ READ_BALANCES = 5, /** * Allow reading spot orders and trades, subscriptions, and cancel-all dry-run. * Strictly non-mutating: cancellation and cancel-all-after changes require TRADE_SPOT. * * @generated from enum value: READ_SPOT = 6; */ READ_SPOT = 6, /** * Allow reading internal transfer history. * * @generated from enum value: READ_INTERNAL_TRANSFERS = 8; */ READ_INTERNAL_TRANSFERS = 8, /** * Allow reading saved, recent, and whitelisted address-book destinations. * * @generated from enum value: READ_ADDRESS_BOOK = 11; */ READ_ADDRESS_BOOK = 11, /** * Allow creating, updating, deleting, and copying saved destination entries, * including reading the address book. * * @generated from enum value: MANAGE_ADDRESS_BOOK = 12; */ MANAGE_ADDRESS_BOOK = 12 } /** * Describes the enum auth.v1.PolicyAction. */ declare const PolicyActionSchema: GenEnum; /** * PolicyService manages sub-account and API key policy templates and bindings. * * @generated from service auth.v1.PolicyService */ declare const PolicyService: GenService<{ /** * List sub-account policy templates available to the caller. * * @generated from rpc auth.v1.PolicyService.ListSubaccountPolicies */ listSubaccountPolicies: { methodKind: "unary"; input: typeof ListSubaccountPoliciesRequestSchema; output: typeof ListSubaccountPoliciesResponseSchema; }; /** * Get a sub-account policy template by id. * * @generated from rpc auth.v1.PolicyService.GetSubaccountPolicy */ getSubaccountPolicy: { methodKind: "unary"; input: typeof GetSubaccountPolicyRequestSchema; output: typeof GetSubaccountPolicyResponseSchema; }; /** * Create a new sub-account policy template (optionally attach to a sub-account). * * @generated from rpc auth.v1.PolicyService.CreateSubaccountPolicy */ createSubaccountPolicy: { methodKind: "unary"; input: typeof CreateSubaccountPolicyRequestSchema; output: typeof CreateSubaccountPolicyResponseSchema; }; /** * Change selected fields on an existing sub-account policy template. * * @generated from rpc auth.v1.PolicyService.UpdateSubaccountPolicy */ updateSubaccountPolicy: { methodKind: "unary"; input: typeof UpdateSubaccountPolicyRequestSchema; output: typeof UpdateSubaccountPolicyResponseSchema; }; /** * Delete a sub-account policy template. * * @generated from rpc auth.v1.PolicyService.DeleteSubaccountPolicy */ deleteSubaccountPolicy: { methodKind: "unary"; input: typeof DeleteSubaccountPolicyRequestSchema; output: typeof DeleteSubaccountPolicyResponseSchema; }; /** * Attach or clear a sub-account policy for a sub-account. * * @generated from rpc auth.v1.PolicyService.SetSubaccountPolicy */ setSubaccountPolicy: { methodKind: "unary"; input: typeof SetSubaccountPolicyRequestSchema; output: typeof SetSubaccountPolicyResponseSchema; }; /** * List API key policy templates available to the caller. * * @generated from rpc auth.v1.PolicyService.ListApiPolicies */ listApiPolicies: { methodKind: "unary"; input: typeof ListApiPoliciesRequestSchema; output: typeof ListApiPoliciesResponseSchema; }; /** * Get an API key policy template by id. * * @generated from rpc auth.v1.PolicyService.GetApiPolicy */ getApiPolicy: { methodKind: "unary"; input: typeof GetApiPolicyRequestSchema; output: typeof GetApiPolicyResponseSchema; }; /** * Create a new API key policy template. * * @generated from rpc auth.v1.PolicyService.CreateApiPolicy */ createApiPolicy: { methodKind: "unary"; input: typeof CreateApiPolicyRequestSchema; output: typeof CreateApiPolicyResponseSchema; }; /** * Change selected fields on an existing API key policy template. * * @generated from rpc auth.v1.PolicyService.UpdateApiPolicy */ updateApiPolicy: { methodKind: "unary"; input: typeof UpdateApiPolicyRequestSchema; output: typeof UpdateApiPolicyResponseSchema; }; /** * Delete an API key policy template. * * @generated from rpc auth.v1.PolicyService.DeleteApiPolicy */ deleteApiPolicy: { methodKind: "unary"; input: typeof DeleteApiPolicyRequestSchema; output: typeof DeleteApiPolicyResponseSchema; }; /** * Attach or clear an API key policy for a key. * * @generated from rpc auth.v1.PolicyService.SetApiKeyPolicy */ setApiKeyPolicy: { methodKind: "unary"; input: typeof SetApiKeyPolicyRequestSchema; output: typeof SetApiKeyPolicyResponseSchema; }; }>; //#endregion export { ApiPolicySpec, ApiPolicySpecSchema, ApiPolicyView, ApiPolicyViewSchema, CreateApiPolicyRequest, CreateApiPolicyRequestSchema, CreateApiPolicyResponse, CreateApiPolicyResponseSchema, CreateSubaccountPolicyRequest, CreateSubaccountPolicyRequestSchema, CreateSubaccountPolicyResponse, CreateSubaccountPolicyResponseSchema, DeleteApiPolicyRequest, DeleteApiPolicyRequestSchema, DeleteApiPolicyResponse, DeleteApiPolicyResponseSchema, DeleteSubaccountPolicyRequest, DeleteSubaccountPolicyRequestSchema, DeleteSubaccountPolicyResponse, DeleteSubaccountPolicyResponseSchema, GetApiPolicyRequest, GetApiPolicyRequestSchema, GetApiPolicyResponse, GetApiPolicyResponseSchema, GetSubaccountPolicyRequest, GetSubaccountPolicyRequestSchema, GetSubaccountPolicyResponse, GetSubaccountPolicyResponseSchema, ListApiPoliciesRequest, ListApiPoliciesRequestSchema, ListApiPoliciesResponse, ListApiPoliciesResponseSchema, ListSubaccountPoliciesRequest, ListSubaccountPoliciesRequestSchema, ListSubaccountPoliciesResponse, ListSubaccountPoliciesResponseSchema, MarketScope, MarketScopeSchema, MarketScope_Value, MarketScope_ValueSchema, PolicyAction, PolicyActionSchema, PolicyService, SetApiKeyPolicyRequest, SetApiKeyPolicyRequestSchema, SetApiKeyPolicyResponse, SetApiKeyPolicyResponseSchema, SetSubaccountPolicyRequest, SetSubaccountPolicyRequestSchema, SetSubaccountPolicyResponse, SetSubaccountPolicyResponseSchema, SpotMarketRule, SpotMarketRuleSchema, SpotMarketSelector, SpotMarketSelectorSchema, SubaccountPolicySpec, SubaccountPolicySpecSchema, SubaccountPolicyView, SubaccountPolicyViewSchema, UpdateApiPolicyRequest, UpdateApiPolicyRequestSchema, UpdateApiPolicyResponse, UpdateApiPolicyResponseSchema, UpdateSubaccountPolicyRequest, UpdateSubaccountPolicyRequestSchema, UpdateSubaccountPolicyResponse, UpdateSubaccountPolicyResponseSchema, file_auth_v1_policies, policies_pb_d_exports }; //# sourceMappingURL=policies_pb.d.ts.map