@blocklet/payment-types 1.19.17 → 1.19.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,129 @@
1
+ import { CreationOptional, DataTypes, InferAttributes, InferCreationAttributes, Model } from 'sequelize';
2
+ import { PaymentDetails, PaymentSettings } from './types';
3
+ export declare class AutoRechargeConfig extends Model<InferAttributes<AutoRechargeConfig>, InferCreationAttributes<AutoRechargeConfig>> {
4
+ id: CreationOptional<string>;
5
+ customer_id: string;
6
+ livemode: boolean;
7
+ enabled: boolean;
8
+ threshold: string;
9
+ currency_id: string;
10
+ recharge_currency_id?: string;
11
+ price_id: string;
12
+ quantity: number;
13
+ payment_method_id?: string;
14
+ payment_settings?: PaymentSettings;
15
+ payment_details?: PaymentDetails;
16
+ daily_limits?: {
17
+ max_attempts: number;
18
+ max_amount: string;
19
+ };
20
+ last_recharge_date?: string;
21
+ daily_stats?: {
22
+ attempt_count: number;
23
+ total_amount: string;
24
+ };
25
+ metadata?: Record<string, any>;
26
+ created_at: CreationOptional<Date>;
27
+ updated_at: CreationOptional<Date>;
28
+ static readonly GENESIS_ATTRIBUTES: {
29
+ id: {
30
+ type: DataTypes.StringDataType;
31
+ primaryKey: boolean;
32
+ allowNull: boolean;
33
+ defaultValue: (size?: number) => string;
34
+ };
35
+ customer_id: {
36
+ type: DataTypes.StringDataType;
37
+ allowNull: boolean;
38
+ references: {
39
+ model: string;
40
+ key: string;
41
+ };
42
+ };
43
+ livemode: {
44
+ type: DataTypes.AbstractDataTypeConstructor;
45
+ allowNull: boolean;
46
+ };
47
+ enabled: {
48
+ type: DataTypes.AbstractDataTypeConstructor;
49
+ allowNull: boolean;
50
+ defaultValue: boolean;
51
+ };
52
+ threshold: {
53
+ type: DataTypes.StringDataType;
54
+ allowNull: boolean;
55
+ };
56
+ payment_method_id: {
57
+ type: DataTypes.StringDataType;
58
+ allowNull: boolean;
59
+ };
60
+ currency_id: {
61
+ type: DataTypes.StringDataType;
62
+ allowNull: boolean;
63
+ };
64
+ recharge_currency_id: {
65
+ type: DataTypes.StringDataType;
66
+ allowNull: boolean;
67
+ };
68
+ price_id: {
69
+ type: DataTypes.StringDataType;
70
+ allowNull: boolean;
71
+ };
72
+ quantity: {
73
+ type: DataTypes.IntegerDataTypeConstructor;
74
+ defaultValue: number;
75
+ allowNull: boolean;
76
+ };
77
+ payment_settings: {
78
+ type: DataTypes.AbstractDataTypeConstructor;
79
+ allowNull: boolean;
80
+ defaultValue: {
81
+ payment_method_types: never[];
82
+ payment_method_options: {};
83
+ };
84
+ };
85
+ payment_details: {
86
+ type: DataTypes.AbstractDataTypeConstructor;
87
+ allowNull: boolean;
88
+ };
89
+ daily_limits: {
90
+ type: DataTypes.AbstractDataTypeConstructor;
91
+ allowNull: boolean;
92
+ defaultValue: {
93
+ max_attempts: number;
94
+ max_amount: string;
95
+ };
96
+ };
97
+ last_recharge_date: {
98
+ type: DataTypes.StringDataType;
99
+ allowNull: boolean;
100
+ };
101
+ daily_stats: {
102
+ type: DataTypes.AbstractDataTypeConstructor;
103
+ allowNull: boolean;
104
+ defaultValue: {
105
+ attempt_count: number;
106
+ total_amount: string;
107
+ };
108
+ };
109
+ metadata: {
110
+ type: DataTypes.AbstractDataTypeConstructor;
111
+ allowNull: boolean;
112
+ };
113
+ created_at: {
114
+ type: DataTypes.DateDataTypeConstructor;
115
+ defaultValue: DataTypes.AbstractDataTypeConstructor;
116
+ allowNull: boolean;
117
+ };
118
+ updated_at: {
119
+ type: DataTypes.DateDataTypeConstructor;
120
+ defaultValue: DataTypes.AbstractDataTypeConstructor;
121
+ allowNull: boolean;
122
+ };
123
+ };
124
+ static initialize(sequelize: any): void;
125
+ static associate(models: any): void;
126
+ canRechargeToday(nextAmount: string): boolean;
127
+ updateDailyStats(amount: string): Promise<void>;
128
+ }
129
+ export type TAutoRechargeConfig = InferAttributes<AutoRechargeConfig>;
@@ -157,7 +157,7 @@ export declare class CheckoutSession extends Model<InferAttributes<CheckoutSessi
157
157
  allowNull: boolean;
158
158
  };
159
159
  status: {
160
- type: DataTypes.EnumDataType<"open" | "expired" | "complete">;
160
+ type: DataTypes.EnumDataType<"open" | "complete" | "expired">;
161
161
  allowNull: boolean;
162
162
  };
163
163
  payment_status: {
@@ -102,7 +102,7 @@ export declare class CreditGrant extends Model<InferAttributes<CreditGrant>, Inf
102
102
  allowNull: boolean;
103
103
  };
104
104
  status: {
105
- type: DataTypes.EnumDataType<"pending" | "voided" | "depleted" | "expired" | "granted">;
105
+ type: DataTypes.EnumDataType<"pending" | "voided" | "expired" | "depleted" | "granted">;
106
106
  defaultValue: string;
107
107
  allowNull: boolean;
108
108
  };
@@ -134,7 +134,7 @@ export declare class CreditGrant extends Model<InferAttributes<CreditGrant>, Inf
134
134
  };
135
135
  };
136
136
  isAvailable(): boolean;
137
- consumeCredit(amount: string, context: {
137
+ consumeCredit(amount: string, _context: {
138
138
  subscription_id?: string;
139
139
  meter_event_id?: string;
140
140
  }, dryRun?: boolean): Promise<{
package/lib/index.d.ts CHANGED
@@ -31,6 +31,7 @@ import { CreditGrant, TCreditGrant } from './credit-grant';
31
31
  import { CreditTransaction, TCreditTransaction } from './credit-transaction';
32
32
  import { Meter, TMeter } from './meter';
33
33
  import { MeterEvent, TMeterEvent } from './meter-event';
34
+ import { AutoRechargeConfig } from './auto-recharge-config';
34
35
  declare const models: {
35
36
  CheckoutSession: typeof CheckoutSession;
36
37
  Coupon: typeof Coupon;
@@ -64,6 +65,7 @@ declare const models: {
64
65
  CreditTransaction: typeof CreditTransaction;
65
66
  Meter: typeof Meter;
66
67
  MeterEvent: typeof MeterEvent;
68
+ AutoRechargeConfig: typeof AutoRechargeConfig;
67
69
  };
68
70
  export declare function initialize(sequelize: any): void;
69
71
  export default models;
@@ -100,6 +102,7 @@ export * from './credit-grant';
100
102
  export * from './credit-transaction';
101
103
  export * from './meter';
102
104
  export * from './meter-event';
105
+ export * from './auto-recharge-config';
103
106
  export type TPriceExpanded = TPrice & {
104
107
  object: 'price';
105
108
  product: TProduct;
package/lib/invoice.d.ts CHANGED
@@ -15,7 +15,7 @@ export declare class Invoice extends Model<InferAttributes<Invoice>, InferCreati
15
15
  paid_out_of_band: boolean;
16
16
  status: LiteralUnion<'draft' | 'open' | 'void' | 'paid' | 'uncollectible', string>;
17
17
  collection_method: LiteralUnion<'charge_automatically' | 'send_invoice', string>;
18
- billing_reason: LiteralUnion<'subscription_create' | 'subscription_cycle' | 'subscription_update' | 'subscription_recover' | 'subscription_threshold' | 'subscription_cancel' | 'subscription' | 'manual' | 'upcoming' | 'slash_stake' | 'stake' | 'overdraft_protection' | 'stake_overdraft_protection' | 'recharge', string>;
18
+ billing_reason: LiteralUnion<'subscription_create' | 'subscription_cycle' | 'subscription_update' | 'subscription_recover' | 'subscription_threshold' | 'subscription_cancel' | 'subscription' | 'manual' | 'upcoming' | 'slash_stake' | 'stake' | 'overdraft_protection' | 'stake_overdraft_protection' | 'recharge' | 'auto_recharge', string>;
19
19
  currency_id: string;
20
20
  customer_id: string;
21
21
  payment_intent_id?: string;
package/lib/meter.d.ts CHANGED
@@ -45,7 +45,7 @@ export declare class Meter extends Model<InferAttributes<Meter>, InferCreationAt
45
45
  unique: boolean;
46
46
  };
47
47
  aggregation_method: {
48
- type: DataTypes.EnumDataType<"count" | "sum" | "last">;
48
+ type: DataTypes.EnumDataType<"sum" | "count" | "last">;
49
49
  defaultValue: string;
50
50
  allowNull: boolean;
51
51
  };
@@ -1,6 +1,6 @@
1
1
  import { CreationOptional, DataTypes, FindOptions, InferAttributes, InferCreationAttributes, Model } from 'sequelize';
2
2
  import type { LiteralUnion } from 'type-fest';
3
- import { VaultConfig } from './types';
3
+ import { RechargeConfig, VaultConfig } from './types';
4
4
  export declare class PaymentCurrency extends Model<InferAttributes<PaymentCurrency>, InferCreationAttributes<PaymentCurrency>> {
5
5
  id: CreationOptional<string>;
6
6
  payment_method_id: string;
@@ -22,6 +22,7 @@ export declare class PaymentCurrency extends Model<InferAttributes<PaymentCurren
22
22
  updated_at: CreationOptional<Date>;
23
23
  vault_config?: VaultConfig;
24
24
  type: LiteralUnion<'standard' | 'credit', string>;
25
+ recharge_config?: RechargeConfig;
25
26
  static readonly GENESIS_ATTRIBUTES: {
26
27
  id: {
27
28
  type: DataTypes.StringDataType;
@@ -47,7 +47,7 @@ export declare class PaymentMethod extends Model<InferAttributes<PaymentMethod>,
47
47
  defaultValue: boolean;
48
48
  };
49
49
  type: {
50
- type: DataTypes.EnumDataType<"arcblock" | "ethereum" | "stripe" | "bitcoin" | "base">;
50
+ type: DataTypes.EnumDataType<"arcblock" | "ethereum" | "base" | "bitcoin" | "stripe">;
51
51
  };
52
52
  name: {
53
53
  type: DataTypes.StringDataType;
@@ -100,7 +100,7 @@ export declare class PricingTable extends Model<InferAttributes<PricingTable>, I
100
100
  };
101
101
  submit_type: string;
102
102
  cross_sell_behavior: string;
103
- } & Pick<any, "custom_fields" | "price_id" | "after_completion" | "allow_promotion_codes" | "consent_collection" | "phone_number_collection" | "billing_address_collection" | "submit_type" | "subscription_data" | "nft_mint_settings" | "cross_sell_behavior" | "product_id" | "adjustable_quantity" | "highlight_text" | "is_highlight">;
103
+ } & Pick<any, "custom_fields" | "allow_promotion_codes" | "consent_collection" | "phone_number_collection" | "submit_type" | "billing_address_collection" | "subscription_data" | "nft_mint_settings" | "cross_sell_behavior" | "price_id" | "adjustable_quantity" | "after_completion" | "product_id" | "highlight_text" | "is_highlight">;
104
104
  static format(payload: any): Partial<PricingTable>;
105
105
  expand(): Promise<InferAttributes<PricingTable, {
106
106
  omit: never;
@@ -70,7 +70,7 @@ export declare class SubscriptionSchedule extends Model<InferAttributes<Subscrip
70
70
  allowNull: boolean;
71
71
  };
72
72
  end_behavior: {
73
- type: DataTypes.EnumDataType<"release" | "cancel">;
73
+ type: DataTypes.EnumDataType<"cancel" | "release">;
74
74
  allowNull: boolean;
75
75
  };
76
76
  test_clock_id: {
package/lib/types.d.ts CHANGED
@@ -279,6 +279,7 @@ export type PaymentDetails = {
279
279
  subscription_id?: string;
280
280
  customer_id?: string;
281
281
  refund_id?: string;
282
+ payment_method_id?: string;
282
283
  };
283
284
  ethereum?: {
284
285
  tx_hash: string;
@@ -423,7 +424,7 @@ export type SubscriptionUpdateItem = {
423
424
  price_id?: string;
424
425
  quantity?: number;
425
426
  };
426
- export type EventType = LiteralUnion<'account.application.authorized' | 'account.application.deauthorized' | 'account.external_account.created' | 'account.external_account.deleted' | 'account.external_account.updated' | 'account.updated' | 'application_fee.created' | 'application_fee.refund.updated' | 'application_fee.refunded' | 'balance.available' | 'billing_portal.configuration.created' | 'billing_portal.configuration.updated' | 'billing_portal.session.created' | 'capability.updated' | 'cash_balance.funds_available' | 'charge.captured' | 'charge.dispute.closed' | 'charge.dispute.created' | 'charge.dispute.funds_reinstated' | 'charge.dispute.funds_withdrawn' | 'charge.dispute.updated' | 'charge.expired' | 'charge.failed' | 'charge.pending' | 'charge.refund.updated' | 'charge.refunded' | 'charge.succeeded' | 'charge.updated' | 'checkout.session.async_payment_failed' | 'checkout.session.async_payment_succeeded' | 'checkout.session.nft_minted' | 'checkout.session.completed' | 'checkout.session.expired' | 'checkout.session.created' | 'coupon.created' | 'coupon.deleted' | 'coupon.updated' | 'credit_note.created' | 'credit_note.updated' | 'credit_note.voided' | 'customer_cash_balance_transaction.created' | 'customer.created' | 'customer.deleted' | 'customer.discount.created' | 'customer.discount.deleted' | 'customer.discount.updated' | 'customer.source.created' | 'customer.source.deleted' | 'customer.source.expiring' | 'customer.source.updated' | 'customer.subscription.created' | 'customer.subscription.deleted' | 'customer.subscription.paused' | 'customer.subscription.past_due' | 'customer.subscription.pending_update_applied' | 'customer.subscription.pending_update_expired' | 'customer.subscription.resumed' | 'customer.subscription.renewed' | 'customer.subscription.recovered' | 'customer.subscription.upgraded' | 'customer.subscription.renew_failed' | 'customer.subscription.trial_start' | 'customer.subscription.trial_will_end' | 'customer.subscription.trial_end' | 'customer.subscription.started' | 'customer.subscription.updated' | 'customer.tax_id.created' | 'customer.tax_id.deleted' | 'customer.tax_id.updated' | 'customer.updated' | 'file.created' | 'financial_connections.account.created' | 'financial_connections.account.deactivated' | 'financial_connections.account.disconnected' | 'financial_connections.account.reactivated' | 'financial_connections.account.refreshed_balance' | 'identity.verification_session.canceled' | 'identity.verification_session.created' | 'identity.verification_session.processing' | 'identity.verification_session.redacted' | 'identity.verification_session.requires_input' | 'identity.verification_session.verified' | 'invoice.created' | 'invoice.deleted' | 'invoice.finalization_failed' | 'invoice.finalized' | 'invoice.marked_uncollectible' | 'invoice.paid' | 'invoice.payment_action_required' | 'invoice.payment_failed' | 'invoice.payment_succeeded' | 'invoice.sent' | 'invoice.upcoming' | 'invoice.updated' | 'invoice.voided' | 'invoiceitem.created' | 'invoiceitem.deleted' | 'issuing_authorization.created' | 'issuing_authorization.request' | 'issuing_authorization.updated' | 'issuing_card.created' | 'issuing_card.updated' | 'issuing_cardholder.created' | 'issuing_cardholder.updated' | 'issuing_dispute.closed' | 'issuing_dispute.created' | 'issuing_dispute.funds_reinstated' | 'issuing_dispute.submitted' | 'issuing_dispute.updated' | 'issuing_transaction.created' | 'issuing_transaction.updated' | 'mandate.updated' | 'order.created' | 'payment_intent.amount_capturable_updated' | 'payment_intent.canceled' | 'payment_intent.created' | 'payment_intent.partially_funded' | 'payment_intent.payment_failed' | 'payment_intent.processing' | 'payment_intent.requires_action' | 'payment_intent.succeeded' | 'payment_link.created' | 'payment_link.updated' | 'payment_method.attached' | 'payment_method.automatically_updated' | 'payment_method.detached' | 'payment_method.updated' | 'payout.canceled' | 'payout.created' | 'payout.failed' | 'payout.paid' | 'payout.reconciliation_completed' | 'payout.updated' | 'person.created' | 'person.deleted' | 'person.updated' | 'plan.created' | 'plan.deleted' | 'plan.updated' | 'price.created' | 'price.deleted' | 'price.updated' | 'product.created' | 'product.deleted' | 'product.updated' | 'promotion_code.created' | 'promotion_code.updated' | 'quote.accepted' | 'quote.canceled' | 'quote.created' | 'quote.finalized' | 'radar.early_fraud_warning.created' | 'radar.early_fraud_warning.updated' | 'recipient.created' | 'recipient.deleted' | 'recipient.updated' | 'refund.created' | 'refund.updated' | 'refund.succeeded' | 'refund.canceled' | 'reporting.report_run.failed' | 'reporting.report_run.succeeded' | 'reporting.report_type.updated' | 'review.closed' | 'review.opened' | 'setup_intent.canceled' | 'setup_intent.created' | 'setup_intent.requires_action' | 'setup_intent.setup_failed' | 'setup_intent.succeeded' | 'sigma.scheduled_query_run.created' | 'sku.created' | 'sku.deleted' | 'sku.updated' | 'source.canceled' | 'source.chargeable' | 'source.failed' | 'source.mandate_notification' | 'source.refund_attributes_required' | 'source.transaction.created' | 'source.transaction.updated' | 'subscription_schedule.aborted' | 'subscription_schedule.canceled' | 'subscription_schedule.completed' | 'subscription_schedule.created' | 'subscription_schedule.expiring' | 'subscription_schedule.released' | 'subscription_schedule.updated' | 'tax_rate.created' | 'tax_rate.updated' | 'tax.settings.updated' | 'terminal.reader.action_failed' | 'terminal.reader.action_succeeded' | 'test_helpers.test_clock.advancing' | 'test_helpers.test_clock.created' | 'test_helpers.test_clock.deleted' | 'test_helpers.test_clock.internal_failure' | 'test_helpers.test_clock.ready' | 'topup.canceled' | 'topup.created' | 'topup.failed' | 'topup.reversed' | 'topup.succeeded' | 'transfer.created' | 'transfer.reversed' | 'transfer.updated' | 'billing.discrepancy' | 'usage.report.empty' | 'customer.credit.insufficient' | 'customer.credit_grant.granted' | 'customer.credit_grant.low_balance' | 'customer.credit_grant.depleted', string>;
427
+ export type EventType = LiteralUnion<'account.application.authorized' | 'account.application.deauthorized' | 'account.external_account.created' | 'account.external_account.deleted' | 'account.external_account.updated' | 'account.updated' | 'application_fee.created' | 'application_fee.refund.updated' | 'application_fee.refunded' | 'balance.available' | 'billing_portal.configuration.created' | 'billing_portal.configuration.updated' | 'billing_portal.session.created' | 'capability.updated' | 'cash_balance.funds_available' | 'charge.captured' | 'charge.dispute.closed' | 'charge.dispute.created' | 'charge.dispute.funds_reinstated' | 'charge.dispute.funds_withdrawn' | 'charge.dispute.updated' | 'charge.expired' | 'charge.failed' | 'charge.pending' | 'charge.refund.updated' | 'charge.refunded' | 'charge.succeeded' | 'charge.updated' | 'checkout.session.async_payment_failed' | 'checkout.session.async_payment_succeeded' | 'checkout.session.nft_minted' | 'checkout.session.completed' | 'checkout.session.expired' | 'checkout.session.created' | 'coupon.created' | 'coupon.deleted' | 'coupon.updated' | 'credit_note.created' | 'credit_note.updated' | 'credit_note.voided' | 'customer_cash_balance_transaction.created' | 'customer.created' | 'customer.deleted' | 'customer.discount.created' | 'customer.discount.deleted' | 'customer.discount.updated' | 'customer.source.created' | 'customer.source.deleted' | 'customer.source.expiring' | 'customer.source.updated' | 'customer.subscription.created' | 'customer.subscription.deleted' | 'customer.subscription.paused' | 'customer.subscription.past_due' | 'customer.subscription.pending_update_applied' | 'customer.subscription.pending_update_expired' | 'customer.subscription.resumed' | 'customer.subscription.renewed' | 'customer.subscription.recovered' | 'customer.subscription.upgraded' | 'customer.subscription.renew_failed' | 'customer.subscription.trial_start' | 'customer.subscription.trial_will_end' | 'customer.subscription.trial_end' | 'customer.subscription.started' | 'customer.subscription.updated' | 'customer.tax_id.created' | 'customer.tax_id.deleted' | 'customer.tax_id.updated' | 'customer.updated' | 'file.created' | 'financial_connections.account.created' | 'financial_connections.account.deactivated' | 'financial_connections.account.disconnected' | 'financial_connections.account.reactivated' | 'financial_connections.account.refreshed_balance' | 'identity.verification_session.canceled' | 'identity.verification_session.created' | 'identity.verification_session.processing' | 'identity.verification_session.redacted' | 'identity.verification_session.requires_input' | 'identity.verification_session.verified' | 'invoice.created' | 'invoice.deleted' | 'invoice.finalization_failed' | 'invoice.finalized' | 'invoice.marked_uncollectible' | 'invoice.paid' | 'invoice.payment_action_required' | 'invoice.payment_failed' | 'invoice.payment_succeeded' | 'invoice.sent' | 'invoice.upcoming' | 'invoice.updated' | 'invoice.voided' | 'invoiceitem.created' | 'invoiceitem.deleted' | 'issuing_authorization.created' | 'issuing_authorization.request' | 'issuing_authorization.updated' | 'issuing_card.created' | 'issuing_card.updated' | 'issuing_cardholder.created' | 'issuing_cardholder.updated' | 'issuing_dispute.closed' | 'issuing_dispute.created' | 'issuing_dispute.funds_reinstated' | 'issuing_dispute.submitted' | 'issuing_dispute.updated' | 'issuing_transaction.created' | 'issuing_transaction.updated' | 'mandate.updated' | 'order.created' | 'payment_intent.amount_capturable_updated' | 'payment_intent.canceled' | 'payment_intent.created' | 'payment_intent.partially_funded' | 'payment_intent.payment_failed' | 'payment_intent.processing' | 'payment_intent.requires_action' | 'payment_intent.succeeded' | 'payment_link.created' | 'payment_link.updated' | 'payment_method.attached' | 'payment_method.automatically_updated' | 'payment_method.detached' | 'payment_method.updated' | 'payout.canceled' | 'payout.created' | 'payout.failed' | 'payout.paid' | 'payout.reconciliation_completed' | 'payout.updated' | 'person.created' | 'person.deleted' | 'person.updated' | 'plan.created' | 'plan.deleted' | 'plan.updated' | 'price.created' | 'price.deleted' | 'price.updated' | 'product.created' | 'product.deleted' | 'product.updated' | 'promotion_code.created' | 'promotion_code.updated' | 'quote.accepted' | 'quote.canceled' | 'quote.created' | 'quote.finalized' | 'radar.early_fraud_warning.created' | 'radar.early_fraud_warning.updated' | 'recipient.created' | 'recipient.deleted' | 'recipient.updated' | 'refund.created' | 'refund.updated' | 'refund.succeeded' | 'refund.canceled' | 'reporting.report_run.failed' | 'reporting.report_run.succeeded' | 'reporting.report_type.updated' | 'review.closed' | 'review.opened' | 'setup_intent.canceled' | 'setup_intent.created' | 'setup_intent.requires_action' | 'setup_intent.setup_failed' | 'setup_intent.succeeded' | 'sigma.scheduled_query_run.created' | 'sku.created' | 'sku.deleted' | 'sku.updated' | 'source.canceled' | 'source.chargeable' | 'source.failed' | 'source.mandate_notification' | 'source.refund_attributes_required' | 'source.transaction.created' | 'source.transaction.updated' | 'subscription_schedule.aborted' | 'subscription_schedule.canceled' | 'subscription_schedule.completed' | 'subscription_schedule.created' | 'subscription_schedule.expiring' | 'subscription_schedule.released' | 'subscription_schedule.updated' | 'tax_rate.created' | 'tax_rate.updated' | 'tax.settings.updated' | 'terminal.reader.action_failed' | 'terminal.reader.action_succeeded' | 'test_helpers.test_clock.advancing' | 'test_helpers.test_clock.created' | 'test_helpers.test_clock.deleted' | 'test_helpers.test_clock.internal_failure' | 'test_helpers.test_clock.ready' | 'topup.canceled' | 'topup.created' | 'topup.failed' | 'topup.reversed' | 'topup.succeeded' | 'transfer.created' | 'transfer.reversed' | 'transfer.updated' | 'billing.discrepancy' | 'usage.report.empty' | 'customer.credit.insufficient' | 'customer.credit.low_balance' | 'customer.credit_grant.granted' | 'customer.credit_grant.depleted', string>;
427
428
  export type StripeRefundReason = 'duplicate' | 'fraudulent' | 'requested_by_customer';
428
429
  export type SettingType = LiteralUnion<'donate' | 'notification', string>;
429
430
  export type NotificationFrequency = 'default' | 'daily' | 'weekly' | 'monthly';
@@ -455,4 +456,13 @@ export type MeterEventPayload = {
455
456
  value: string;
456
457
  subscription_id?: string;
457
458
  };
459
+ export type RechargeConfig = {
460
+ base_price_id: string;
461
+ payment_link_id?: string;
462
+ checkout_url?: string;
463
+ settings?: {
464
+ min_recharge_amount?: number;
465
+ max_recharge_amount?: number;
466
+ };
467
+ };
458
468
  export {};
@@ -45,7 +45,7 @@ export declare class WebhookEndpoint extends Model<InferAttributes<WebhookEndpoi
45
45
  allowNull: boolean;
46
46
  };
47
47
  status: {
48
- type: DataTypes.EnumDataType<"disabled" | "enabled">;
48
+ type: DataTypes.EnumDataType<"enabled" | "disabled">;
49
49
  allowNull: boolean;
50
50
  };
51
51
  created_at: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/payment-types",
3
- "version": "1.19.17",
3
+ "version": "1.19.19",
4
4
  "description": "Typings for Payment Kit SDK",
5
5
  "keywords": [
6
6
  "types",
@@ -48,5 +48,5 @@
48
48
  "sequelize": "^6.37.7",
49
49
  "type-fest": "^4.41.0"
50
50
  },
51
- "gitHead": "718d307a13b0c11e11316cdd28fff2f335e23de7"
51
+ "gitHead": "76facca620eda1132f8c6d5b8f42d8fd9ef78b05"
52
52
  }