import { ChartOptions } from "chart.js/auto"; export declare const PAYMENT_STATUSES: { PRE_PAYMENT: string; REQUIRES_ACTION: string; PENDING: string; FAILED: string; SETTLED: string; UNKNOWN: string; NOT_NEEDED: string; }; import { CallToActionProps } from "./components/atoms"; import { ValidPeriods } from "./utils"; export type DimensionMap = Record; export type GraphType = "cost" | "usage" | "total-cost"; export type CHART_TYPE = "line" | "bar" | "horizontalBar" | "stackedBar"; export type USAGE_GRAPHS_VIEW_FUNCTION = "linear" | "cumulative"; export type CustomCurrencyNumberFormat = "decimal" | "integer"; export type StatusChipVariant = "neutral" | "warning" | "success" | "error" | "info"; export type DatePickerType = "date-range" | "month"; export interface BasicResponse { error?: string; message?: string; } export interface Plan { billingPeriod: { interval: ValidPeriods; intervalsCount: number; }; description: string; fees: never[]; id: string; invoiceBasedFeeIds: null; isCustomProductPlan: boolean; isDefault: boolean; lastUpdateTimeInMillis: number; lockingStatus: string; planGenerator: PlanGenerator; planLevelFreeTier: null; productId: string; productItems: ProductItem[]; productPlanName: string; successorPlanId: null; transitionStrategy: null; } export interface PlanGenerator { billingPeriod: BillingPeriod; description: string; entitlements?: null; id: string; invoiceBasedFeeIds?: null; invoiceBasedFees?: null; isDefault: boolean; lockingStatus: string; minimumPaymentGranularity?: null; planCurrency?: null; planLevelFreeTier?: null; planMinimumPayment?: null; planName: string; priceGenerators: PriceGenerator[]; realTimePricing: boolean; successorPlanId?: null; transitionStrategy?: null; type: string; } export interface BillingPeriod { interval: string; intervalsCount: number; } export interface CreditUnit { active: boolean; description: string | null; id: string; lastUpdateTimeInMillis: number; name: string; ratioToCurrency: number; shortName: string; } export interface PlanDetails { creditUnit: CreditUnit; productPlan: Plan; promotions: Promotion[]; } interface CostItem { meterUnitsPercentageDiff: number; meteredUnits: number; price: number; pricePercentageDiff: number; startTimeInSeconds: number; } export interface ErrorMessage { errorMessage?: string; status?: number; } export declare enum InvoiceCurrency { BaseCurrency = "baseCurrency", CustomCurrency = "customCurrency", PaymentCurrency = "paymentCurrency" } export interface InvoiceComponent extends Component { currency?: InvoiceCurrency; } export interface Component { callToAction?: CallToActionProps; extraRequestQueryParameters?: T; hideLoader?: boolean; onError?: (error: ErrorMessage) => void; onLoadingChange?: (status: boolean) => void; title?: string; withContainer?: boolean; withTitle?: boolean; } export type PeriodValue = "daily" | "weekly" | "monthly" | "hour" | "hourly" | "day" | "week" | "month"; export interface ComponentWithGraph extends Component { customGraphOptions?: ChartOptions; graphTextColor?: string; } export type ComponentWithGraphAndDatePicker = ComponentWithGraph & ComponentWithDatePicker; export interface ComponentWithDatePicker extends Component { endDate?: number; onDateChange?: (startDate: number | null, endDate: number | null) => void; onPeriodChange?: (period: PeriodValue) => void; periodValue?: PeriodValue; startDate?: number; withDatePicker?: boolean; } export interface Period { days: number; label: string; value: PeriodValue; } export interface CostListItem { costs: CostItem[]; groupInfos: { product_item_name: string; }; meteredUnits: number; price: number; } export interface ParsedRevenueData { dates: Record; firstColumn: string; label: string; measure: string; } export interface ProductItemDefinition { description: string; id: string; lastUpdateTimeInMillis: number; lockingStatus: string; meterApiName: string; productId: string; productItemName: string; } export interface ProductItemPriceDimensionPrice { dimensionValues: string[]; leafNode: ProductItemPriceItem; } interface SubscriptionSettings { cancellationRule: string; chargeExecution: string; isCancellable: boolean; purchaseRule: string; } export declare enum PriceMachinesGeneratorTypesApiValues { FlatRate = "flat_rate", FlatRateWithOverages = "flat_rate_with_overages", SubscriptionWithOverage = "subscription_with_overage", TieredSeatBased = "tiered_seat_based", TieredSeatBasedDimension = "tiered_seat_based_dimension", UltraFrequency = "ultra_frequency", UltraFrequencyDimension = "ultra_frequency_dimension", UltraFrequencySubscriptionWithOverage = "ultra_frequency_subscription_with_overage", UsageBasedDimension = "usage_based_dimension", UsageBasedDimensionWithMax = "usage_based_dimension_with_max", UsageBasedNoDimension = "usage_based_no_dimension", UsageBasedNoDimensionWithMax = "usage_based_no_dimension_with_max", UsageBasedVolume = "usage_based_volume" } export interface PriceGenerator { [key: string]: any; dimensionKeys?: string[]; dimensionalScalars?: null; distinctDimensions?: string[]; groupDimensions?: null; id: string; leafNodeType?: string; lockingStatus?: string; paymentMinimums?: null; productItemId?: string; productItemInvoiceLabel?: null; productItemPriceName?: string; scalar?: null; subscriptionSettings?: { cancellationRule: string; chargeExecution: string; isCancellable: boolean; isPricedPerRate: boolean; purchaseRule: string; subscriptionRate: string; }; type: PriceMachinesGeneratorTypesApiValues; usageGranularity?: string; usageTransformer?: null; useAverageReducer?: null; } export interface ProductItemPrice { id: string; lastUpdateTimeInMillis: number; lockingStatus: string; price: ProductItemPriceItem; priceGenerator: PriceGenerator | null; productItemInvoiceLabel: string | null; productItemPriceName: string; scalar: string | null; subscriptionPrice: ProductItemPriceItem | null; subscriptionSettings: SubscriptionSettings | null; } export interface ProductItem extends ProductItemDefinition { productItemPrice: ProductItemPrice; } interface Promotion { appliedTimeInSeconds: number; productId: string; promotion: { description: string; discount: number; id: string; lastUpdateTimeInMillis: number; lockingStatus: string; promotionName: string; promotionTimeLimit: { cycles: number; months: number; }; targetProductId: string; type: string; }; relationId: string; } export interface CreditUnit { active: boolean; shortName: string; } export interface PricingPlanResponse { creditUnit: CreditUnit; productPlan: Plan; promotions: Promotion[]; } export interface OrderItem { dimensions: Record | null; quantity: number; resourceId: null | string; } export interface Order extends BasicResponse { addedTimeInSeconds: null; appliedTimeRange: { endTimeInSeconds: number; startTimeInSeconds: number; }; commitmentId: null | string; customerId: string; id: string; label: null; orderItems: OrderItem[]; productId: null | string; productItemId: string; removalContext: null; removedTimeInSeconds: null; } export interface CostResponse extends BasicResponse { costList: CostListItem[]; key: { filters: { customer_id: string[]; }; groupBy: string[]; productId: number | string; take: null; timeGroupingInterval: string; timeRange: { endTimeInSeconds: number; startTimeInSeconds: number; }; }; secondsSinceEpochIntervals: number[]; } interface Metadata { account: string; aggregation: string; filter: { customerId: string[]; } | null; groupBy?: string[] | null; meterApiName: string; take: { isAscending: boolean; limit: number; } | null; timeGroupingInterval: string; timeRange: { endTimeInSeconds: number; startTimeInSeconds: number; }; valuesTimeGroupingInterval?: string; } export interface MeterValue { percentageFromPrevious: number; secondsSinceEpochUtc: number; value: number; } export interface UsageResponse { clientMeters: Array<{ group: Record; groupValue?: number; values?: MeterValue[]; }>; metadata: Metadata; secondsSinceEpochIntervals: number[]; } export interface Meter { aggregation: string; aggregationDimensions?: string[]; createTime: string | number; description: string; dimensions: string[]; enabled: boolean; eventIdDimension?: string; eventType: string; id: string; isUnique?: boolean; label: string; lockingStatus?: string; longLasting: boolean; measurementType: string; meterApiName: string; meterType?: string; timeoutInHours?: number; ultraFrequencyUniqueMeter?: boolean; uniqueDimension?: string; updateTime: string | number; viewGroupingFunction?: string; } export interface GraphData { backgroundColor: string; barPercentage: number; borderColor: string; categoryPercentage: number; data: number[]; hoverBackgroundColor: string; hoverBorderColor: string; label: string; } export declare enum MeterAggregation { Avg = "AVG", Max = "MAX", MaxCount = "MAX_COUNT", Min = "MIN", Seats = "SEATS", Sum = "SUM" } export interface AppliedPromotion { canBeUsedForPayAsYouGo: boolean; discount: number; discountInBaseCurrency: number; discountInCredits: number | null; maxDiscountInBaseCurrency: number; maxDiscountPossible: number; promotionAppliedTimeInSeconds: number; promotionId: string; promotionName: string; promotionType: string; } export interface TotalBill { commitmentsFees: number | null; discountableBasePrice: number; discountableFixPrice: number; endTimeInSeconds: null | number; fixPrice: number; invoiceBasedFees: number | null; itemPrice: number; prepaid: number; prepaidableFixPrice: number; prepayableNotDiscountableFees: number; startTimeInSeconds: null | number; totalDiscount: number; totalPrepayablePrice: number; totalPrice: number; totalPriceBeforeDiscount: number; totalPriceBeforePrepaid: number; } export interface BillInfo { endTimeInSeconds: null | number; meterUnits: number; meteredUnitsPerTier: null | Record; price: number; priceInBaseCurrency: number; priceInCredits: number | null; startTimeInSeconds: null | number; } export interface ProductItemVariant { dimensionLabel: string | null; hourlyBillInfos: BillInfo[] | null; itemDimensions: Record; key: string; lateArrivalMeters: number; totalBill: BillInfo; } interface InvoiceProductItemKey extends InvoiceKey { productItemKey: string; } export interface InvoiceProductItem { key: InvoiceProductItemKey; meterApiName: string; productItemId: string; productItemName: string; productItemVariants: ProductItemVariant[]; productPlanName: string; totalBill: BillInfo; } interface InvoiceKey { accountId: string; customerId: string; day: number; month: number; productId: string; productPlanId: string; year: number; } interface PlanPeriod { interval: string; intervalsCount: number; } export interface InvoiceConfiguration { name: string; productItemsIds: string[]; } export interface CurrencySetting { baseCurrency: string; } export interface AccountSetting { displayCachedInvoices: boolean; invoiceConfiguration: InvoiceConfiguration[]; } export type PaymentStatuses = (typeof PAYMENT_STATUSES)[keyof typeof PAYMENT_STATUSES]; export interface PaginationInfo { pageNumber: number; pageSize: number; pageToken: string | null; totalPages: number; totalResults: number; } export interface InvoicePaginated { data: Invoice[]; pageInfo: PaginationInfo; } export interface AppliedInvoiceBasedFees { feeAmount: number | null; feeInCredits: number | null; feeName: string | null; } export interface Invoice { appliedInvoiceBasedFees?: AppliedInvoiceBasedFees[]; appliedPromotions: AppliedPromotion[]; availablePayAsYouGoMoney: number | null; availablePayAsYouGoMoneyInBaseCurrency: number | null; availablePayAsYouGoMoneyInCredits: number | null; availablePrepaidLeft: number | null; availablePrepaidLeftBaseCurrency: number | null; availablePrepaidLeftInCredits: number | null; creditUnit: null | { active: boolean; description: string; id: string; lastUpdateTimeInMillis: number; name: string; ratioToCurrency: number; shortName: string; }; details?: any[]; externalSystemStatus: string | null; gracePeriodInHours: number | null; invoiceBillInBaseCurrency: TotalBill; invoiceBillInCredits: TotalBill | null; invoiceEndTimeInSeconds: number; invoiceKey: InvoiceKey; invoicePriceStatus: string; invoiceStartTimeInSeconds: number; invoiceUri: string; items?: any[]; paymentCreatedInSeconds: number | null; paymentCurrencyInfo: null | { basePlanCurrency: string; exchangeRate: number; paymentCurrency: string; }; paymentStatus: PaymentStatuses; planBillingPeriod: PlanPeriod; planName: string; productItemInvoices: InvoiceProductItem[]; productPlanFees?: ProductPlanFee[]; totalAmount?: null | number; totalBill: TotalBill; } export interface ProductPlanFee { cost: number; costInBaseCurrency: number; costInCredits?: number; name: string; } export interface PrepaidCards { creditUnit: CreditUnit; prepaidCards: PrepaidItem[]; } export interface SimpleTableCols { alignment?: "left" | "right" | "center"; id: string; label: string; } export interface PrepaidItem { amountLeft: number; amountLeftInCredits: number | null; cardType: string | null; expirationTimeInMillis: number; label: string | null; paymentCurrencyInfo: { basePlanCurrency: string | null; exchangeRate: number; paymentCurrency: string | null; }; paymentId: string | null; paymentStatus: string; paymentSystemName: string | null; prepaidUri: string; price: number; priceInBaseCurrency: number; priceInCredits: number | null; sourceUri: string; startTimeInMillis: number; usedAmount: number; usedAmountInCredits: number | null; worth: number; worthInCredits: number | null; } export type PrepaidItemWithCreditUnit = PrepaidItem & { creditUnit?: CreditUnit; }; export interface SDKTheme { barChartColors?: string[]; brandColor?: string; customFontUrl?: string; fontFamily?: string; fontSize?: number; pieChartColors?: string[]; } export interface CustomerDetails { address: Record; name: string; } export interface PaymentMethod { brand: string; expMonth: number; expYear: number; last4: number; } export interface ProductItemPriceTier { batchSize: number; pricePerBatch: number; startAfterUnit: number; } export interface ProductItemPriceItem { allowPartialBatch?: boolean; dimensionKeys?: string[]; dimensionsPrices?: ProductItemPriceDimensionPrice[]; nextNode?: ProductItemPriceItem; tiers?: ProductItemPriceTier[]; type: string; volumeToUnitPriceMap?: Record; } export type CardType = "one_time" | "recurrence" | "rewards" | "external_one_time" | "external_recurrence" | "credit_one_time" | "commitment_rewards"; export interface LedgerEntry { balanceAfterTransaction: number; invoiceUrl?: string | null; prepaidCardType: CardType; prepaidLabel?: string; prepaidTransactionType: string; prepaidUri: string; transactionAmount: number; transactionTimeSeconds: number; } export interface CreditLedger { accountId: string; availableAmount: number; consumedAmount: number; currency: string; currentEntries: LedgerEntry[]; customerId: string; expiredAmount: number; pastEntries: LedgerEntry[]; totalAmount: number; } export interface CreditLedgerRow { balanceAfterTransaction: number; invoiceUri: any; prepaidCardType: string; prepaidLabel: string; prepaidTransactionType: string; prepaidUri: string; transactionAmount: number; transactionTimeSeconds: number; } export type PaymentCurrencyInfo = { basePlanCurrency?: string; exchangeRate?: number; paymentCurrency?: string; } | null; export type PaymentStatus = "pre_payment" | "requires_action" | "pending" | "failed" | "settled" | "not_needed" | "unknown"; export interface PrepaidCard { amountLeft: number; amountLeftInCredits: number | null; cardType: CardType; expirationTimeInMillis: number; externalPaymentMethod: boolean; label: string | null; paymentCurrencyInfo: PaymentCurrencyInfo; paymentId: string | null; paymentStatus: PaymentStatus; paymentSystemName: string | null; prepaidConditions: number | null; prepaidUri: string; price: number; priceInBaseCurrency: number; priceInCredits: number | null; productInvoices: any[]; sourceUri: string; startTimeInMillis: number; usedAmount: number; usedAmountInCredits: number | null; worth: number; worthInCredits: number | null; } export interface PrepaidCardList { creditUnit: CreditUnit; key: { accountId: string; customerId: string; productId: string; }; prepaidCards: PrepaidCard[]; } export interface SelectOption { label: string; value: ValueType; } export {};