/* eslint-disable */ 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 const TransactionState_InputError_ErrorType = { INVALID: 0 as const, REQUIRED: 1 as const, UNRECOGNIZED: -1 as const, } export type TransactionState_InputError_ErrorType = 0 | 1 | -1; export const TransactionState_ProcessingError_ErrorType = { UNKNOWN: 0 as const, INACTIVE_DEVELOPER: 100 as const, INACTIVE_APPLICATION: 101 as const, UNRECOGNIZED: -1 as const, } export type TransactionState_ProcessingError_ErrorType = 0 | 100 | 101 | -1;