export interface TransactionState { accepted: boolean; processingErrors: TransactionState_ProcessingError[]; inputErrors: TransactionState_InputError[]; } export interface TransactionState_InputError { field: string; message: string; type: TransactionState_InputError_ErrorType; } export interface TransactionState_ProcessingError { message: string; details: string; type: TransactionState_ProcessingError_ErrorType; } export interface CreateTransactionPayload { applicationKey: string; developerKey: string; /** * unique public identifier for the transaction */ trackingKey: string; /** * currently unused; in the future we use for connecting transactions */ parentTrackingKey: string; /** * symbolic name for the transaction */ name: string; /** * transaction creation ts (milliseconds from unix epoch start) */ startedAt: number; /** * transaction completion ts */ finishedAt: number; /** * various metadata */ metadata: { [key: string]: string; }; } export interface CreateTransactionPayload_MetadataEntry { key: string; value: string; } export interface CreateTransactionResponse { state: TransactionState | undefined; trackingKey: string; callId: string; } export interface Transaction { CreateTransaction(request: CreateTransactionPayload): Promise; } export declare const TransactionState_InputError_ErrorType: { INVALID: 0; REQUIRED: 1; UNRECOGNIZED: -1; }; export declare type TransactionState_InputError_ErrorType = 0 | 1 | -1; export declare const TransactionState_ProcessingError_ErrorType: { UNKNOWN: 0; INACTIVE_DEVELOPER: 100; INACTIVE_APPLICATION: 101; UNRECOGNIZED: -1; }; export declare type TransactionState_ProcessingError_ErrorType = 0 | 100 | 101 | -1;