import * as z from "zod"; import { OpenEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * **Field Dependencies:** * * @remarks * * Required if `type` is `REWARD`. */ export type FairMarketValue = { /** * The decimal value, as a string; Refer to [Google’s Decimal type protocol buffer](https://github.com/googleapis/googleapis/blob/40203ca1880849480bbff7b8715491060bbccdf1/google/type/decimal.proto#L33) for details */ value?: string | undefined; }; /** * Identifier type for the asset being moved */ export declare enum PositionJournalIdentifierType { IdentifierTypeUnspecified = "IDENTIFIER_TYPE_UNSPECIFIED", Cusip = "CUSIP", Symbol = "SYMBOL", AssetId = "ASSET_ID" } /** * Identifier type for the asset being moved */ export type PositionJournalIdentifierTypeOpen = OpenEnum; /** * Numeric quantity of securities being transferred. For Equities: Represents the number of shares, must be greater than zero and may not exceed 5 decimal places. */ export type Quantity = { /** * The decimal value, as a string; Refer to [Google’s Decimal type protocol buffer](https://github.com/googleapis/googleapis/blob/40203ca1880849480bbff7b8715491060bbccdf1/google/type/decimal.proto#L33) for details */ value?: string | undefined; }; /** * The high level state of a transfer, one of: * * @remarks * - `PROCESSING` - The transfer is being processed and will be posted if successful. * - `PENDING_REVIEW` - The transfer is pending review and will continue processing if approved. * - `POSTED` - The transfer has been posted to the ledger and will be completed at the end of the processing window if not canceled first. * - `COMPLETED` - The transfer has been batched and completed. * - `REJECTED` - The transfer was rejected. * - `CANCELED` - The transfer was canceled. * - `RETURNED` - The transfer was returned. * - `POSTPONED` - The transfer is postponed and will resume processing during the next processing window. */ export declare enum PositionJournalStateState { StateUnspecified = "STATE_UNSPECIFIED", Processing = "PROCESSING", PendingReview = "PENDING_REVIEW", Posted = "POSTED", Completed = "COMPLETED", Rejected = "REJECTED", Canceled = "CANCELED", Returned = "RETURNED", Postponed = "POSTPONED" } /** * The high level state of a transfer, one of: * * @remarks * - `PROCESSING` - The transfer is being processed and will be posted if successful. * - `PENDING_REVIEW` - The transfer is pending review and will continue processing if approved. * - `POSTED` - The transfer has been posted to the ledger and will be completed at the end of the processing window if not canceled first. * - `COMPLETED` - The transfer has been batched and completed. * - `REJECTED` - The transfer was rejected. * - `CANCELED` - The transfer was canceled. * - `RETURNED` - The transfer was returned. * - `POSTPONED` - The transfer is postponed and will resume processing during the next processing window. */ export type PositionJournalStateStateOpen = OpenEnum; /** * The current state of the position journal */ export type PositionJournalState = { /** * The user or service that triggered the state update. */ actor?: string | undefined; /** * Additional description of the transfer state. */ message?: string | undefined; /** * Additional metadata relating to the transfer state. Included data depends on the state, e.g.: * * @remarks * - Rejection reasons are included when the `state` is `REJECTED` * - Reason and comment are included when `state` is `CANCELED` */ metadata?: { [k: string]: any; } | null | undefined; /** * The high level state of a transfer, one of: * * @remarks * - `PROCESSING` - The transfer is being processed and will be posted if successful. * - `PENDING_REVIEW` - The transfer is pending review and will continue processing if approved. * - `POSTED` - The transfer has been posted to the ledger and will be completed at the end of the processing window if not canceled first. * - `COMPLETED` - The transfer has been batched and completed. * - `REJECTED` - The transfer was rejected. * - `CANCELED` - The transfer was canceled. * - `RETURNED` - The transfer was returned. * - `POSTPONED` - The transfer is postponed and will resume processing during the next processing window. */ state?: PositionJournalStateStateOpen | undefined; /** * The time of the state update. */ updateTime?: Date | null | undefined; }; /** * The type of position journal */ export declare enum PositionJournalType { TypeUnspecified = "TYPE_UNSPECIFIED", Reward = "REWARD" } /** * The type of position journal */ export type PositionJournalTypeOpen = OpenEnum; /** * A position journal transfer. Securities are moved from a source account to a destination account */ export type PositionJournal = { /** * The external identifier supplied by the API caller Each request must have a unique pairing of `client_transfer_id` and `source_account` */ clientTransferId?: string | undefined; /** * Optional description information that will attach to the transaction */ description?: string | undefined; /** * The account that securities will be moved to */ destinationAccount?: string | undefined; /** * **Field Dependencies:** * * @remarks * * Required if `type` is `REWARD`. */ fairMarketValue?: FairMarketValue | null | undefined; /** * Identifier (of the type specified in `identifier_type`). All identifiers are assumed to represent "US" issued securities. Responses will supply the originally requested identifier. */ identifier?: string | undefined; /** * Identifier type for the asset being moved */ identifierType?: PositionJournalIdentifierTypeOpen | undefined; /** * The resource name of the position journal */ name?: string | undefined; /** * Numeric quantity of securities being transferred. For Equities: Represents the number of shares, must be greater than zero and may not exceed 5 decimal places. */ quantity?: Quantity | null | undefined; /** * The account that securities will be moved from */ sourceAccount?: string | undefined; /** * The current state of the position journal */ state?: PositionJournalState | null | undefined; /** * The type of position journal */ type?: PositionJournalTypeOpen | undefined; }; /** @internal */ export declare const FairMarketValue$inboundSchema: z.ZodType; /** @internal */ export type FairMarketValue$Outbound = { value?: string | undefined; }; /** @internal */ export declare const FairMarketValue$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace FairMarketValue$ { /** @deprecated use `FairMarketValue$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `FairMarketValue$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `FairMarketValue$Outbound` instead. */ type Outbound = FairMarketValue$Outbound; } export declare function fairMarketValueToJSON(fairMarketValue: FairMarketValue): string; export declare function fairMarketValueFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const PositionJournalIdentifierType$inboundSchema: z.ZodType; /** @internal */ export declare const PositionJournalIdentifierType$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace PositionJournalIdentifierType$ { /** @deprecated use `PositionJournalIdentifierType$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `PositionJournalIdentifierType$outboundSchema` instead. */ const outboundSchema: z.ZodType; } /** @internal */ export declare const Quantity$inboundSchema: z.ZodType; /** @internal */ export type Quantity$Outbound = { value?: string | undefined; }; /** @internal */ export declare const Quantity$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace Quantity$ { /** @deprecated use `Quantity$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Quantity$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Quantity$Outbound` instead. */ type Outbound = Quantity$Outbound; } export declare function quantityToJSON(quantity: Quantity): string; export declare function quantityFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const PositionJournalStateState$inboundSchema: z.ZodType; /** @internal */ export declare const PositionJournalStateState$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace PositionJournalStateState$ { /** @deprecated use `PositionJournalStateState$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `PositionJournalStateState$outboundSchema` instead. */ const outboundSchema: z.ZodType; } /** @internal */ export declare const PositionJournalState$inboundSchema: z.ZodType; /** @internal */ export type PositionJournalState$Outbound = { actor?: string | undefined; message?: string | undefined; metadata?: { [k: string]: any; } | null | undefined; state?: string | undefined; update_time?: string | null | undefined; }; /** @internal */ export declare const PositionJournalState$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace PositionJournalState$ { /** @deprecated use `PositionJournalState$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `PositionJournalState$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `PositionJournalState$Outbound` instead. */ type Outbound = PositionJournalState$Outbound; } export declare function positionJournalStateToJSON(positionJournalState: PositionJournalState): string; export declare function positionJournalStateFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const PositionJournalType$inboundSchema: z.ZodType; /** @internal */ export declare const PositionJournalType$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace PositionJournalType$ { /** @deprecated use `PositionJournalType$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `PositionJournalType$outboundSchema` instead. */ const outboundSchema: z.ZodType; } /** @internal */ export declare const PositionJournal$inboundSchema: z.ZodType; /** @internal */ export type PositionJournal$Outbound = { client_transfer_id?: string | undefined; description?: string | undefined; destination_account?: string | undefined; fair_market_value?: FairMarketValue$Outbound | null | undefined; identifier?: string | undefined; identifier_type?: string | undefined; name?: string | undefined; quantity?: Quantity$Outbound | null | undefined; source_account?: string | undefined; state?: PositionJournalState$Outbound | null | undefined; type?: string | undefined; }; /** @internal */ export declare const PositionJournal$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace PositionJournal$ { /** @deprecated use `PositionJournal$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `PositionJournal$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `PositionJournal$Outbound` instead. */ type Outbound = PositionJournal$Outbound; } export declare function positionJournalToJSON(positionJournal: PositionJournal): string; export declare function positionJournalFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=positionjournal.d.ts.map