@blocklet/payment-types 1.13.113
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.
- package/README.md +9 -0
- package/index.js +1 -0
- package/lib/.gitkeep +0 -0
- package/lib/checkout-session.d.ts +291 -0
- package/lib/coupon.d.ts +99 -0
- package/lib/customer.d.ts +137 -0
- package/lib/discount.d.ts +81 -0
- package/lib/event.d.ts +76 -0
- package/lib/index.d.ts +196 -0
- package/lib/invoice-item.d.ts +127 -0
- package/lib/invoice.d.ts +356 -0
- package/lib/job.d.ts +56 -0
- package/lib/payment-currency.d.ts +99 -0
- package/lib/payment-intent.d.ts +158 -0
- package/lib/payment-link.d.ts +143 -0
- package/lib/payment-method.d.ts +102 -0
- package/lib/price.d.ts +156 -0
- package/lib/pricing-table.d.ts +109 -0
- package/lib/product.d.ts +104 -0
- package/lib/promotion-code.d.ts +81 -0
- package/lib/setup-intent.d.ts +112 -0
- package/lib/subscription-item.d.ts +61 -0
- package/lib/subscription-schedule.d.ts +110 -0
- package/lib/subscription.d.ts +216 -0
- package/lib/types.d.ts +285 -0
- package/lib/usage-record.d.ts +54 -0
- package/lib/webhook-attempt.d.ts +63 -0
- package/lib/webhook-endpoint.d.ts +68 -0
- package/package.json +52 -0
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { CheckoutSession, TCheckoutSession } from './checkout-session';
|
|
2
|
+
import { Coupon } from './coupon';
|
|
3
|
+
import { Customer, TCustomer } from './customer';
|
|
4
|
+
import { Discount } from './discount';
|
|
5
|
+
import { Event, TEvent } from './event';
|
|
6
|
+
import { Invoice, TInvoice } from './invoice';
|
|
7
|
+
import { InvoiceItem, TInvoiceItem } from './invoice-item';
|
|
8
|
+
import { Job } from './job';
|
|
9
|
+
import { PaymentCurrency, TPaymentCurrency } from './payment-currency';
|
|
10
|
+
import { PaymentIntent, TPaymentIntent } from './payment-intent';
|
|
11
|
+
import { PaymentLink, TPaymentLink } from './payment-link';
|
|
12
|
+
import { PaymentMethod, TPaymentMethod } from './payment-method';
|
|
13
|
+
import { Price, TPrice } from './price';
|
|
14
|
+
import { PricingTable, TPricingTable } from './pricing-table';
|
|
15
|
+
import { Product, TProduct } from './product';
|
|
16
|
+
import { PromotionCode } from './promotion-code';
|
|
17
|
+
import { SetupIntent, TSetupIntent } from './setup-intent';
|
|
18
|
+
import { Subscription, TSubscription } from './subscription';
|
|
19
|
+
import { SubscriptionItem, TSubscriptionItem } from './subscription-item';
|
|
20
|
+
import { SubscriptionSchedule } from './subscription-schedule';
|
|
21
|
+
import type { LineItem, PricingTableItem } from './types';
|
|
22
|
+
import { TUsageRecord, UsageRecord } from './usage-record';
|
|
23
|
+
import { TWebhookAttempt, WebhookAttempt } from './webhook-attempt';
|
|
24
|
+
import { TWebhookEndpoint, WebhookEndpoint } from './webhook-endpoint';
|
|
25
|
+
declare const models: {
|
|
26
|
+
CheckoutSession: typeof CheckoutSession;
|
|
27
|
+
Coupon: typeof Coupon;
|
|
28
|
+
Customer: typeof Customer;
|
|
29
|
+
Discount: typeof Discount;
|
|
30
|
+
Event: typeof Event;
|
|
31
|
+
Invoice: typeof Invoice;
|
|
32
|
+
InvoiceItem: typeof InvoiceItem;
|
|
33
|
+
PaymentCurrency: typeof PaymentCurrency;
|
|
34
|
+
PaymentIntent: typeof PaymentIntent;
|
|
35
|
+
PaymentLink: typeof PaymentLink;
|
|
36
|
+
PaymentMethod: typeof PaymentMethod;
|
|
37
|
+
Price: typeof Price;
|
|
38
|
+
PricingTable: typeof PricingTable;
|
|
39
|
+
Product: typeof Product;
|
|
40
|
+
PromotionCode: typeof PromotionCode;
|
|
41
|
+
SetupIntent: typeof SetupIntent;
|
|
42
|
+
Subscription: typeof Subscription;
|
|
43
|
+
SubscriptionItem: typeof SubscriptionItem;
|
|
44
|
+
SubscriptionSchedule: typeof SubscriptionSchedule;
|
|
45
|
+
UsageRecord: typeof UsageRecord;
|
|
46
|
+
WebhookEndpoint: typeof WebhookEndpoint;
|
|
47
|
+
WebhookAttempt: typeof WebhookAttempt;
|
|
48
|
+
Job: typeof Job;
|
|
49
|
+
};
|
|
50
|
+
export declare function initialize(sequelize: any): void;
|
|
51
|
+
export default models;
|
|
52
|
+
export * from './checkout-session';
|
|
53
|
+
export * from './coupon';
|
|
54
|
+
export * from './customer';
|
|
55
|
+
export * from './discount';
|
|
56
|
+
export * from './event';
|
|
57
|
+
export * from './invoice';
|
|
58
|
+
export * from './invoice-item';
|
|
59
|
+
export * from './job';
|
|
60
|
+
export * from './payment-currency';
|
|
61
|
+
export * from './payment-intent';
|
|
62
|
+
export * from './payment-link';
|
|
63
|
+
export * from './payment-method';
|
|
64
|
+
export * from './price';
|
|
65
|
+
export * from './pricing-table';
|
|
66
|
+
export * from './product';
|
|
67
|
+
export * from './promotion-code';
|
|
68
|
+
export * from './setup-intent';
|
|
69
|
+
export * from './subscription';
|
|
70
|
+
export * from './subscription-item';
|
|
71
|
+
export * from './subscription-schedule';
|
|
72
|
+
export * from './usage-record';
|
|
73
|
+
export * from './webhook-attempt';
|
|
74
|
+
export * from './webhook-endpoint';
|
|
75
|
+
export * from './types';
|
|
76
|
+
export type TPriceExpanded = TPrice & {
|
|
77
|
+
object: 'price';
|
|
78
|
+
product: TProduct;
|
|
79
|
+
currency: TPaymentCurrency;
|
|
80
|
+
upsell?: {
|
|
81
|
+
upsells_to: TPriceExpanded;
|
|
82
|
+
upsells_to_id: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
export type TLineItemExpanded = LineItem & {
|
|
86
|
+
price: TPriceExpanded;
|
|
87
|
+
upsell_price: TPriceExpanded;
|
|
88
|
+
metadata?: Record<string, any>;
|
|
89
|
+
[key: string]: any;
|
|
90
|
+
};
|
|
91
|
+
export type TProductExpanded = TProduct & {
|
|
92
|
+
object: 'price';
|
|
93
|
+
prices: TPriceExpanded[];
|
|
94
|
+
default_price: TPriceExpanded;
|
|
95
|
+
cross_sell?: {
|
|
96
|
+
cross_sells_to: TProductExpanded;
|
|
97
|
+
cross_sells_to_id: string;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
export type TPaymentLinkExpanded = TPaymentLink & {
|
|
101
|
+
object: 'payment_link';
|
|
102
|
+
line_items: TLineItemExpanded[];
|
|
103
|
+
};
|
|
104
|
+
export type TPaymentMethodExpanded = TPaymentMethod & {
|
|
105
|
+
object: 'payment_method';
|
|
106
|
+
payment_currencies: TPaymentCurrency[];
|
|
107
|
+
};
|
|
108
|
+
export type TPaymentCurrencyExpanded = TPaymentCurrency & {
|
|
109
|
+
object: 'payment_currency';
|
|
110
|
+
};
|
|
111
|
+
export type TCheckoutSessionExpanded = TCheckoutSession & {
|
|
112
|
+
object: 'checkout_session';
|
|
113
|
+
line_items: TLineItemExpanded[];
|
|
114
|
+
payment_link?: TPaymentLink;
|
|
115
|
+
payment_intent?: TPaymentIntent;
|
|
116
|
+
subscription?: TSubscription;
|
|
117
|
+
};
|
|
118
|
+
export type TPaymentIntentExpanded = TPaymentIntent & {
|
|
119
|
+
object: 'payment_intent';
|
|
120
|
+
customer: TCustomer;
|
|
121
|
+
paymentCurrency: TPaymentCurrency;
|
|
122
|
+
paymentMethod: TPaymentMethod;
|
|
123
|
+
checkoutSession?: TCheckoutSession;
|
|
124
|
+
subscription?: TSubscription;
|
|
125
|
+
invoice?: TInvoice;
|
|
126
|
+
};
|
|
127
|
+
export type TSubscriptionExpanded = TSubscription & {
|
|
128
|
+
object: 'subscription';
|
|
129
|
+
customer: TCustomer;
|
|
130
|
+
paymentCurrency: TPaymentCurrency;
|
|
131
|
+
paymentMethod: TPaymentMethod;
|
|
132
|
+
items: TSubscriptionItemExpanded[];
|
|
133
|
+
};
|
|
134
|
+
export type TSubscriptionItemExpanded = TSubscriptionItem & {
|
|
135
|
+
object: 'subscription';
|
|
136
|
+
price: TPriceExpanded;
|
|
137
|
+
};
|
|
138
|
+
export type TCustomerExpanded = TCustomer & {
|
|
139
|
+
object: 'subscription';
|
|
140
|
+
payments: TPaymentIntent[];
|
|
141
|
+
subscriptions: TSubscription[];
|
|
142
|
+
invoices: TInvoice[];
|
|
143
|
+
};
|
|
144
|
+
export type TInvoiceExpanded = TInvoice & {
|
|
145
|
+
object: 'invoice';
|
|
146
|
+
customer: TCustomer;
|
|
147
|
+
paymentCurrency: TPaymentCurrency;
|
|
148
|
+
paymentMethod: TPaymentMethod;
|
|
149
|
+
paymentIntent: TPaymentIntent;
|
|
150
|
+
subscription?: TSubscription;
|
|
151
|
+
lines: TInvoiceItemExpanded[];
|
|
152
|
+
};
|
|
153
|
+
export type TInvoiceItemExpanded = TInvoiceItem & {
|
|
154
|
+
object: 'invoice_item';
|
|
155
|
+
price: TPriceExpanded;
|
|
156
|
+
};
|
|
157
|
+
export type TEventExpanded = TEvent & {
|
|
158
|
+
object: 'event';
|
|
159
|
+
webhooks: TWebhookEndpointExpanded[];
|
|
160
|
+
};
|
|
161
|
+
export type TWebhookAttemptExpanded = TWebhookAttempt & {
|
|
162
|
+
object: 'webhook_attempt';
|
|
163
|
+
event: TEvent;
|
|
164
|
+
endpoint: TWebhookEndpoint;
|
|
165
|
+
};
|
|
166
|
+
export type TWebhookEndpointExpanded = TWebhookEndpoint & {
|
|
167
|
+
object: 'webhook_endpoint';
|
|
168
|
+
attempts: TWebhookAttemptExpanded[];
|
|
169
|
+
};
|
|
170
|
+
export type TUsageRecordExpanded = TUsageRecord & {
|
|
171
|
+
object: 'usage_record';
|
|
172
|
+
};
|
|
173
|
+
export type TUsageRecordSummary = {
|
|
174
|
+
object: 'usage_record_summary';
|
|
175
|
+
livemode: boolean;
|
|
176
|
+
invoice_id: string;
|
|
177
|
+
subscription_item_id: string;
|
|
178
|
+
total_usage: number;
|
|
179
|
+
period: {
|
|
180
|
+
start: number;
|
|
181
|
+
end: number;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
export type TSetupIntentExpanded = TSetupIntent & {
|
|
185
|
+
object: 'setup_intent';
|
|
186
|
+
};
|
|
187
|
+
export type TPricingTableItem = PricingTableItem & {
|
|
188
|
+
price: TPrice;
|
|
189
|
+
product: TProduct;
|
|
190
|
+
is_selected?: boolean;
|
|
191
|
+
is_disabled?: boolean;
|
|
192
|
+
};
|
|
193
|
+
export type TPricingTableExpanded = TPricingTable & {
|
|
194
|
+
items: TPricingTableItem[];
|
|
195
|
+
currency: TPaymentCurrency;
|
|
196
|
+
};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { CreationOptional, DataTypes, InferAttributes, InferCreationAttributes, Model } from 'sequelize';
|
|
2
|
+
import type { DiscountAmount } from './types';
|
|
3
|
+
export declare const nextInvoiceItemId: (size?: number | undefined) => string;
|
|
4
|
+
export type InvoiceLineItem = {
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
7
|
+
export declare class InvoiceItem extends Model<InferAttributes<InvoiceItem>, InferCreationAttributes<InvoiceItem>> {
|
|
8
|
+
id: CreationOptional<string>;
|
|
9
|
+
livemode: boolean;
|
|
10
|
+
amount: string;
|
|
11
|
+
quantity: number;
|
|
12
|
+
description: string;
|
|
13
|
+
period?: {
|
|
14
|
+
start: number;
|
|
15
|
+
end: number;
|
|
16
|
+
};
|
|
17
|
+
currency_id: string;
|
|
18
|
+
customer_id: string;
|
|
19
|
+
price_id: string;
|
|
20
|
+
invoice_id: string;
|
|
21
|
+
subscription_id?: string;
|
|
22
|
+
subscription_item_id?: string;
|
|
23
|
+
test_clock_id?: string;
|
|
24
|
+
discountable: boolean;
|
|
25
|
+
discount_amounts: DiscountAmount[];
|
|
26
|
+
discounts: string[];
|
|
27
|
+
proration: boolean;
|
|
28
|
+
proration_details: {
|
|
29
|
+
credited_items?: {
|
|
30
|
+
invoice_id: string;
|
|
31
|
+
invoice_line_items: string[];
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
metadata: Record<string, any>;
|
|
35
|
+
created_at: CreationOptional<Date>;
|
|
36
|
+
updated_at: CreationOptional<Date>;
|
|
37
|
+
static readonly GENESIS_ATTRIBUTES: {
|
|
38
|
+
id: {
|
|
39
|
+
type: DataTypes.StringDataType;
|
|
40
|
+
primaryKey: boolean;
|
|
41
|
+
allowNull: boolean;
|
|
42
|
+
defaultValue: (size?: number | undefined) => string;
|
|
43
|
+
};
|
|
44
|
+
livemode: {
|
|
45
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
46
|
+
allowNull: boolean;
|
|
47
|
+
};
|
|
48
|
+
amount: {
|
|
49
|
+
type: DataTypes.StringDataType;
|
|
50
|
+
allowNull: boolean;
|
|
51
|
+
};
|
|
52
|
+
quantity: {
|
|
53
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
54
|
+
allowNull: boolean;
|
|
55
|
+
};
|
|
56
|
+
description: {
|
|
57
|
+
type: DataTypes.StringDataType;
|
|
58
|
+
allowNull: boolean;
|
|
59
|
+
};
|
|
60
|
+
period: {
|
|
61
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
62
|
+
allowNull: boolean;
|
|
63
|
+
};
|
|
64
|
+
customer_id: {
|
|
65
|
+
type: DataTypes.StringDataType;
|
|
66
|
+
allowNull: boolean;
|
|
67
|
+
};
|
|
68
|
+
currency_id: {
|
|
69
|
+
type: DataTypes.StringDataType;
|
|
70
|
+
allowNull: boolean;
|
|
71
|
+
};
|
|
72
|
+
price_id: {
|
|
73
|
+
type: DataTypes.StringDataType;
|
|
74
|
+
allowNull: boolean;
|
|
75
|
+
};
|
|
76
|
+
invoice_id: {
|
|
77
|
+
type: DataTypes.StringDataType;
|
|
78
|
+
allowNull: boolean;
|
|
79
|
+
};
|
|
80
|
+
subscription_id: {
|
|
81
|
+
type: DataTypes.StringDataType;
|
|
82
|
+
allowNull: boolean;
|
|
83
|
+
};
|
|
84
|
+
subscription_item_id: {
|
|
85
|
+
type: DataTypes.StringDataType;
|
|
86
|
+
allowNull: boolean;
|
|
87
|
+
};
|
|
88
|
+
discountable: {
|
|
89
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
90
|
+
allowNull: boolean;
|
|
91
|
+
};
|
|
92
|
+
discount_amounts: {
|
|
93
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
94
|
+
defaultValue: never[];
|
|
95
|
+
};
|
|
96
|
+
discounts: {
|
|
97
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
98
|
+
defaultValue: never[];
|
|
99
|
+
};
|
|
100
|
+
proration: {
|
|
101
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
102
|
+
defaultValue: boolean;
|
|
103
|
+
};
|
|
104
|
+
proration_details: {
|
|
105
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
106
|
+
allowNull: boolean;
|
|
107
|
+
};
|
|
108
|
+
metadata: {
|
|
109
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
110
|
+
defaultValue: {};
|
|
111
|
+
};
|
|
112
|
+
created_at: {
|
|
113
|
+
type: DataTypes.DateDataTypeConstructor;
|
|
114
|
+
defaultValue: DataTypes.AbstractDataTypeConstructor;
|
|
115
|
+
allowNull: boolean;
|
|
116
|
+
};
|
|
117
|
+
updated_at: {
|
|
118
|
+
type: DataTypes.DateDataTypeConstructor;
|
|
119
|
+
defaultValue: DataTypes.AbstractDataTypeConstructor;
|
|
120
|
+
allowNull: boolean;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
static initialize(sequelize: any): void;
|
|
124
|
+
static associate(models: any): void;
|
|
125
|
+
static isPriceUsed(priceId: string): Promise<boolean>;
|
|
126
|
+
}
|
|
127
|
+
export type TInvoiceItem = InferAttributes<InvoiceItem>;
|
package/lib/invoice.d.ts
ADDED
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
import { CreationOptional, DataTypes, InferAttributes, InferCreationAttributes, Model } from 'sequelize';
|
|
2
|
+
import type { LiteralUnion } from 'type-fest';
|
|
3
|
+
import type { CustomerAddress, CustomerShipping, DiscountAmount, PaymentError, PaymentSettings, SimpleCustomField } from './types';
|
|
4
|
+
export declare const nextInvoiceId: (size?: number | undefined) => string;
|
|
5
|
+
export declare class Invoice extends Model<InferAttributes<Invoice>, InferCreationAttributes<Invoice>> {
|
|
6
|
+
id: CreationOptional<string>;
|
|
7
|
+
number: string;
|
|
8
|
+
livemode: boolean;
|
|
9
|
+
description?: string;
|
|
10
|
+
statement_descriptor: string;
|
|
11
|
+
period_end: number;
|
|
12
|
+
period_start: number;
|
|
13
|
+
auto_advance: boolean;
|
|
14
|
+
paid: boolean;
|
|
15
|
+
paid_out_of_band: boolean;
|
|
16
|
+
status: LiteralUnion<'draft' | 'open' | 'void' | 'paid' | 'uncollectible', string>;
|
|
17
|
+
collection_method: LiteralUnion<'charge_automatically' | 'send_invoice', string>;
|
|
18
|
+
billing_reason: LiteralUnion<'subscription_create' | 'subscription_cycle' | 'subscription_update' | 'subscription_threshold' | 'subscription_cancel' | 'subscription' | 'manual' | 'upcoming', string>;
|
|
19
|
+
currency_id: string;
|
|
20
|
+
customer_id: string;
|
|
21
|
+
payment_intent_id?: string;
|
|
22
|
+
subscription_id?: string;
|
|
23
|
+
checkout_session_id?: string;
|
|
24
|
+
quote_id?: string;
|
|
25
|
+
charge_id?: string;
|
|
26
|
+
subscription_details?: any;
|
|
27
|
+
subscription_proration_date?: number;
|
|
28
|
+
subtotal: string;
|
|
29
|
+
subtotal_excluding_tax: string;
|
|
30
|
+
tax: string;
|
|
31
|
+
total: string;
|
|
32
|
+
amount_due: string;
|
|
33
|
+
amount_paid: string;
|
|
34
|
+
amount_remaining: string;
|
|
35
|
+
amount_shipping: string;
|
|
36
|
+
starting_balance: string;
|
|
37
|
+
ending_balance: string;
|
|
38
|
+
starting_token_balance?: Record<string, string>;
|
|
39
|
+
ending_token_balance?: Record<string, string>;
|
|
40
|
+
attempt_count: number;
|
|
41
|
+
attempted: boolean;
|
|
42
|
+
next_payment_attempt?: number;
|
|
43
|
+
custom_fields?: SimpleCustomField[];
|
|
44
|
+
customer_address?: CustomerAddress;
|
|
45
|
+
customer_email?: string;
|
|
46
|
+
customer_name?: string;
|
|
47
|
+
customer_phone?: string;
|
|
48
|
+
customer_shipping?: CustomerShipping;
|
|
49
|
+
discounts?: string[];
|
|
50
|
+
total_discount_amounts?: DiscountAmount[];
|
|
51
|
+
due_date?: number;
|
|
52
|
+
effective_at?: number;
|
|
53
|
+
footer?: string;
|
|
54
|
+
from_invoice?: any;
|
|
55
|
+
account_country?: string;
|
|
56
|
+
account_name?: string;
|
|
57
|
+
hosted_invoice_url?: string;
|
|
58
|
+
invoice_pdf?: string;
|
|
59
|
+
last_finalization_error?: PaymentError;
|
|
60
|
+
latest_revision?: string;
|
|
61
|
+
payment_settings?: PaymentSettings;
|
|
62
|
+
default_payment_method_id: string;
|
|
63
|
+
post_payment_credit_notes_amount?: string;
|
|
64
|
+
pre_payment_credit_notes_amount?: string;
|
|
65
|
+
rendering_options?: any;
|
|
66
|
+
status_transitions?: {
|
|
67
|
+
finalized_at?: number;
|
|
68
|
+
marked_uncollectible_at?: number;
|
|
69
|
+
paid_at?: number;
|
|
70
|
+
voided_at?: number;
|
|
71
|
+
};
|
|
72
|
+
test_clock_id?: string;
|
|
73
|
+
threshold_reason?: any;
|
|
74
|
+
webhooks_delivered_at?: number;
|
|
75
|
+
receipt_number?: string;
|
|
76
|
+
metadata?: Record<string, any>;
|
|
77
|
+
created_at: CreationOptional<Date>;
|
|
78
|
+
updated_at: CreationOptional<Date>;
|
|
79
|
+
static readonly GENESIS_ATTRIBUTES: {
|
|
80
|
+
id: {
|
|
81
|
+
type: DataTypes.StringDataType;
|
|
82
|
+
primaryKey: boolean;
|
|
83
|
+
allowNull: boolean;
|
|
84
|
+
defaultValue: (size?: number | undefined) => string;
|
|
85
|
+
};
|
|
86
|
+
livemode: {
|
|
87
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
88
|
+
allowNull: boolean;
|
|
89
|
+
};
|
|
90
|
+
auto_advance: {
|
|
91
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
92
|
+
allowNull: boolean;
|
|
93
|
+
};
|
|
94
|
+
account_country: {
|
|
95
|
+
type: DataTypes.StringDataType;
|
|
96
|
+
allowNull: boolean;
|
|
97
|
+
};
|
|
98
|
+
account_name: {
|
|
99
|
+
type: DataTypes.StringDataType;
|
|
100
|
+
allowNull: boolean;
|
|
101
|
+
};
|
|
102
|
+
charge_id: {
|
|
103
|
+
type: DataTypes.StringDataType;
|
|
104
|
+
allowNull: boolean;
|
|
105
|
+
};
|
|
106
|
+
collection_method: {
|
|
107
|
+
type: DataTypes.EnumDataType<"charge_automatically" | "send_invoice">;
|
|
108
|
+
allowNull: boolean;
|
|
109
|
+
};
|
|
110
|
+
currency_id: {
|
|
111
|
+
type: DataTypes.StringDataType;
|
|
112
|
+
allowNull: boolean;
|
|
113
|
+
};
|
|
114
|
+
customer_id: {
|
|
115
|
+
type: DataTypes.StringDataType;
|
|
116
|
+
allowNull: boolean;
|
|
117
|
+
};
|
|
118
|
+
description: {
|
|
119
|
+
type: DataTypes.StringDataType;
|
|
120
|
+
allowNull: boolean;
|
|
121
|
+
};
|
|
122
|
+
hosted_invoice_url: {
|
|
123
|
+
type: DataTypes.StringDataType;
|
|
124
|
+
allowNull: boolean;
|
|
125
|
+
};
|
|
126
|
+
payment_intent_id: {
|
|
127
|
+
type: DataTypes.StringDataType;
|
|
128
|
+
allowNull: boolean;
|
|
129
|
+
};
|
|
130
|
+
period_end: {
|
|
131
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
132
|
+
defaultValue: number;
|
|
133
|
+
};
|
|
134
|
+
period_start: {
|
|
135
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
136
|
+
defaultValue: number;
|
|
137
|
+
};
|
|
138
|
+
status: {
|
|
139
|
+
type: DataTypes.EnumDataType<"paid" | "draft" | "open" | "void" | "uncollectible">;
|
|
140
|
+
allowNull: boolean;
|
|
141
|
+
};
|
|
142
|
+
checkout_session_id: {
|
|
143
|
+
type: DataTypes.StringDataType;
|
|
144
|
+
allowNull: boolean;
|
|
145
|
+
};
|
|
146
|
+
subscription_id: {
|
|
147
|
+
type: DataTypes.StringDataType;
|
|
148
|
+
allowNull: boolean;
|
|
149
|
+
};
|
|
150
|
+
subscription_details: {
|
|
151
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
152
|
+
defaultValue: {};
|
|
153
|
+
};
|
|
154
|
+
subscription_proration_date: {
|
|
155
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
156
|
+
allowNull: boolean;
|
|
157
|
+
};
|
|
158
|
+
total: {
|
|
159
|
+
type: DataTypes.StringDataType;
|
|
160
|
+
allowNull: boolean;
|
|
161
|
+
};
|
|
162
|
+
subtotal: {
|
|
163
|
+
type: DataTypes.StringDataType;
|
|
164
|
+
allowNull: boolean;
|
|
165
|
+
};
|
|
166
|
+
subtotal_excluding_tax: {
|
|
167
|
+
type: DataTypes.StringDataType;
|
|
168
|
+
allowNull: boolean;
|
|
169
|
+
};
|
|
170
|
+
tax: {
|
|
171
|
+
type: DataTypes.StringDataType;
|
|
172
|
+
defaultValue: string;
|
|
173
|
+
};
|
|
174
|
+
amount_due: {
|
|
175
|
+
type: DataTypes.StringDataType;
|
|
176
|
+
allowNull: boolean;
|
|
177
|
+
};
|
|
178
|
+
amount_paid: {
|
|
179
|
+
type: DataTypes.StringDataType;
|
|
180
|
+
defaultValue: string;
|
|
181
|
+
};
|
|
182
|
+
amount_remaining: {
|
|
183
|
+
type: DataTypes.StringDataType;
|
|
184
|
+
allowNull: boolean;
|
|
185
|
+
};
|
|
186
|
+
amount_shipping: {
|
|
187
|
+
type: DataTypes.StringDataType;
|
|
188
|
+
defaultValue: string;
|
|
189
|
+
};
|
|
190
|
+
attempt_count: {
|
|
191
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
192
|
+
defaultValue: number;
|
|
193
|
+
};
|
|
194
|
+
attempted: {
|
|
195
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
196
|
+
defaultValue: boolean;
|
|
197
|
+
};
|
|
198
|
+
next_payment_attempt: {
|
|
199
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
200
|
+
allowNull: boolean;
|
|
201
|
+
};
|
|
202
|
+
billing_reason: {
|
|
203
|
+
type: DataTypes.EnumDataType<"subscription_create" | "subscription_cycle" | "subscription_update" | "subscription_threshold" | "subscription_cancel" | "subscription" | "manual" | "upcoming">;
|
|
204
|
+
};
|
|
205
|
+
custom_fields: {
|
|
206
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
207
|
+
defaultValue: never[];
|
|
208
|
+
};
|
|
209
|
+
customer_address: {
|
|
210
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
211
|
+
allowNull: boolean;
|
|
212
|
+
};
|
|
213
|
+
customer_name: {
|
|
214
|
+
type: DataTypes.StringDataType;
|
|
215
|
+
allowNull: boolean;
|
|
216
|
+
};
|
|
217
|
+
customer_email: {
|
|
218
|
+
type: DataTypes.StringDataType;
|
|
219
|
+
allowNull: boolean;
|
|
220
|
+
};
|
|
221
|
+
customer_phone: {
|
|
222
|
+
type: DataTypes.StringDataType;
|
|
223
|
+
allowNull: boolean;
|
|
224
|
+
};
|
|
225
|
+
customer_shipping: {
|
|
226
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
227
|
+
allowNull: boolean;
|
|
228
|
+
};
|
|
229
|
+
default_payment_method_id: {
|
|
230
|
+
type: DataTypes.StringDataType;
|
|
231
|
+
allowNull: boolean;
|
|
232
|
+
};
|
|
233
|
+
discounts: {
|
|
234
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
235
|
+
defaultValue: never[];
|
|
236
|
+
};
|
|
237
|
+
due_date: {
|
|
238
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
239
|
+
allowNull: boolean;
|
|
240
|
+
};
|
|
241
|
+
effective_at: {
|
|
242
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
243
|
+
allowNull: boolean;
|
|
244
|
+
};
|
|
245
|
+
ending_balance: {
|
|
246
|
+
type: DataTypes.StringDataType;
|
|
247
|
+
defaultValue: string;
|
|
248
|
+
};
|
|
249
|
+
footer: {
|
|
250
|
+
type: DataTypes.StringDataType;
|
|
251
|
+
allowNull: boolean;
|
|
252
|
+
};
|
|
253
|
+
from_invoice_id: {
|
|
254
|
+
type: DataTypes.StringDataType;
|
|
255
|
+
allowNull: boolean;
|
|
256
|
+
};
|
|
257
|
+
invoice_pdf: {
|
|
258
|
+
type: DataTypes.StringDataType;
|
|
259
|
+
allowNull: boolean;
|
|
260
|
+
};
|
|
261
|
+
last_finalization_error: {
|
|
262
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
263
|
+
allowNull: boolean;
|
|
264
|
+
};
|
|
265
|
+
latest_revision: {
|
|
266
|
+
type: DataTypes.StringDataType;
|
|
267
|
+
allowNull: boolean;
|
|
268
|
+
};
|
|
269
|
+
number: {
|
|
270
|
+
type: DataTypes.StringDataType;
|
|
271
|
+
allowNull: boolean;
|
|
272
|
+
};
|
|
273
|
+
paid: {
|
|
274
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
275
|
+
defaultValue: boolean;
|
|
276
|
+
};
|
|
277
|
+
paid_out_of_band: {
|
|
278
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
279
|
+
defaultValue: boolean;
|
|
280
|
+
};
|
|
281
|
+
payment_settings: {
|
|
282
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
283
|
+
allowNull: boolean;
|
|
284
|
+
};
|
|
285
|
+
post_payment_credit_notes_amount: {
|
|
286
|
+
type: DataTypes.StringDataType;
|
|
287
|
+
defaultValue: string;
|
|
288
|
+
};
|
|
289
|
+
pre_payment_credit_notes_amount: {
|
|
290
|
+
type: DataTypes.StringDataType;
|
|
291
|
+
defaultValue: string;
|
|
292
|
+
};
|
|
293
|
+
quote_id: {
|
|
294
|
+
type: DataTypes.StringDataType;
|
|
295
|
+
allowNull: boolean;
|
|
296
|
+
};
|
|
297
|
+
receipt_number: {
|
|
298
|
+
type: DataTypes.StringDataType;
|
|
299
|
+
allowNull: boolean;
|
|
300
|
+
};
|
|
301
|
+
days_until_due: {
|
|
302
|
+
type: DataTypes.NumberDataTypeConstructor;
|
|
303
|
+
allowNull: boolean;
|
|
304
|
+
};
|
|
305
|
+
rendering_options: {
|
|
306
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
307
|
+
allowNull: boolean;
|
|
308
|
+
};
|
|
309
|
+
starting_balance: {
|
|
310
|
+
type: DataTypes.StringDataType;
|
|
311
|
+
defaultValue: string;
|
|
312
|
+
};
|
|
313
|
+
statement_descriptor: {
|
|
314
|
+
type: DataTypes.StringDataType;
|
|
315
|
+
allowNull: boolean;
|
|
316
|
+
};
|
|
317
|
+
status_transitions: {
|
|
318
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
319
|
+
defaultValue: {};
|
|
320
|
+
};
|
|
321
|
+
test_clock_id: {
|
|
322
|
+
type: DataTypes.StringDataType;
|
|
323
|
+
allowNull: boolean;
|
|
324
|
+
};
|
|
325
|
+
threshold_reason: {
|
|
326
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
327
|
+
allowNull: boolean;
|
|
328
|
+
};
|
|
329
|
+
total_discount_amounts: {
|
|
330
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
331
|
+
defaultValue: never[];
|
|
332
|
+
};
|
|
333
|
+
webhooks_delivered_at: {
|
|
334
|
+
type: DataTypes.IntegerDataTypeConstructor;
|
|
335
|
+
allowNull: boolean;
|
|
336
|
+
};
|
|
337
|
+
metadata: {
|
|
338
|
+
type: DataTypes.AbstractDataTypeConstructor;
|
|
339
|
+
allowNull: boolean;
|
|
340
|
+
};
|
|
341
|
+
created_at: {
|
|
342
|
+
type: DataTypes.DateDataTypeConstructor;
|
|
343
|
+
defaultValue: DataTypes.AbstractDataTypeConstructor;
|
|
344
|
+
allowNull: boolean;
|
|
345
|
+
};
|
|
346
|
+
updated_at: {
|
|
347
|
+
type: DataTypes.DateDataTypeConstructor;
|
|
348
|
+
defaultValue: DataTypes.AbstractDataTypeConstructor;
|
|
349
|
+
allowNull: boolean;
|
|
350
|
+
};
|
|
351
|
+
};
|
|
352
|
+
static initialize(sequelize: any): void;
|
|
353
|
+
static associate(models: any): void;
|
|
354
|
+
isImmutable(): boolean;
|
|
355
|
+
}
|
|
356
|
+
export type TInvoice = InferAttributes<Invoice>;
|