@blocklet/payment-types 1.13.150 → 1.13.152
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/lib/customer.d.ts +6 -0
- package/lib/index.d.ts +1 -1
- package/lib/invoice.d.ts +2 -1
- package/lib/payment-intent.d.ts +2 -1
- package/lib/refund.d.ts +3 -1
- package/lib/types.d.ts +3 -0
- package/package.json +2 -2
package/lib/customer.d.ts
CHANGED
|
@@ -117,6 +117,12 @@ export declare class Customer extends Model<InferAttributes<Customer>, InferCrea
|
|
|
117
117
|
};
|
|
118
118
|
};
|
|
119
119
|
getInvoiceNumber(): Promise<string>;
|
|
120
|
+
getSummary(): Promise<{
|
|
121
|
+
paid: any;
|
|
122
|
+
due: any;
|
|
123
|
+
refunded: any;
|
|
124
|
+
}>;
|
|
125
|
+
canMakeNewPurchase(excludedInvoiceId?: string): Promise<boolean>;
|
|
120
126
|
getBalanceToApply(currencyId: string, amount: string): string;
|
|
121
127
|
decreaseTokenBalance(currencyId: string, amount: string, dryRun?: boolean): Promise<{
|
|
122
128
|
starting: Record<string, string>;
|
package/lib/index.d.ts
CHANGED
|
@@ -200,7 +200,7 @@ export type TPricingTableExpanded = TPricingTable & {
|
|
|
200
200
|
export type TRefundExpanded = TRefund & {
|
|
201
201
|
customer: TCustomer;
|
|
202
202
|
paymentCurrency: TPaymentCurrency;
|
|
203
|
-
paymentMethod
|
|
203
|
+
paymentMethod: TPaymentMethod;
|
|
204
204
|
paymentIntent: TPaymentIntent;
|
|
205
205
|
invoice?: TInvoice;
|
|
206
206
|
subscription?: TSubscription;
|
package/lib/invoice.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CreationOptional, DataTypes, InferAttributes, InferCreationAttributes, Model } from 'sequelize';
|
|
2
2
|
import type { LiteralUnion } from 'type-fest';
|
|
3
|
-
import type { CustomerAddress, CustomerShipping, DiscountAmount, PaymentError, PaymentSettings, SimpleCustomField } from './types';
|
|
3
|
+
import type { CustomerAddress, CustomerShipping, DiscountAmount, GroupedBN, PaymentError, PaymentSettings, SimpleCustomField } from './types';
|
|
4
4
|
export declare const nextInvoiceId: (size?: number | undefined) => string;
|
|
5
5
|
export declare class Invoice extends Model<InferAttributes<Invoice>, InferCreationAttributes<Invoice>> {
|
|
6
6
|
id: CreationOptional<string>;
|
|
@@ -352,5 +352,6 @@ export declare class Invoice extends Model<InferAttributes<Invoice>, InferCreati
|
|
|
352
352
|
static initialize(sequelize: any): void;
|
|
353
353
|
static associate(models: any): void;
|
|
354
354
|
isImmutable(): boolean;
|
|
355
|
+
static getUncollectibleAmountByCustomer(customerId: string, excludedInvoiceId?: string): Promise<GroupedBN>;
|
|
355
356
|
}
|
|
356
357
|
export type TInvoice = InferAttributes<Invoice>;
|
package/lib/payment-intent.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CreationOptional, DataTypes, InferAttributes, InferCreationAttributes, Model } from 'sequelize';
|
|
2
2
|
import type { LiteralUnion } from 'type-fest';
|
|
3
|
-
import type { PaymentDetails, PaymentError } from './types';
|
|
3
|
+
import type { GroupedBN, PaymentDetails, PaymentError } from './types';
|
|
4
4
|
export declare const nextPaymentIntentId: (size?: number | undefined) => string;
|
|
5
5
|
export declare class PaymentIntent extends Model<InferAttributes<PaymentIntent>, InferCreationAttributes<PaymentIntent>> {
|
|
6
6
|
id: CreationOptional<string>;
|
|
@@ -154,5 +154,6 @@ export declare class PaymentIntent extends Model<InferAttributes<PaymentIntent>,
|
|
|
154
154
|
static initialize(sequelize: any): void;
|
|
155
155
|
static associate(models: any): void;
|
|
156
156
|
isImmutable(): boolean;
|
|
157
|
+
static getPaidAmountByCustomer(customerId: string): Promise<GroupedBN>;
|
|
157
158
|
}
|
|
158
159
|
export type TPaymentIntent = InferAttributes<PaymentIntent>;
|
package/lib/refund.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CreationOptional, DataTypes, InferAttributes, InferCreationAttributes, Model } from 'sequelize';
|
|
2
2
|
import type { LiteralUnion } from 'type-fest';
|
|
3
|
-
import type { PaymentDetails, PaymentError } from './types';
|
|
3
|
+
import type { GroupedBN, PaymentDetails, PaymentError } from './types';
|
|
4
4
|
export declare const nextRefundId: (size?: number | undefined) => string;
|
|
5
5
|
export declare class Refund extends Model<InferAttributes<Refund>, InferCreationAttributes<Refund>> {
|
|
6
6
|
id: CreationOptional<string>;
|
|
@@ -11,6 +11,7 @@ export declare class Refund extends Model<InferAttributes<Refund>, InferCreation
|
|
|
11
11
|
currency_id: string;
|
|
12
12
|
customer_id: string;
|
|
13
13
|
payment_intent_id: string;
|
|
14
|
+
payment_method_id: string;
|
|
14
15
|
invoice_id?: string;
|
|
15
16
|
subscription_id?: string;
|
|
16
17
|
metadata?: Record<string, any>;
|
|
@@ -132,5 +133,6 @@ export declare class Refund extends Model<InferAttributes<Refund>, InferCreation
|
|
|
132
133
|
static initialize(sequelize: any): void;
|
|
133
134
|
static associate(models: any): void;
|
|
134
135
|
isImmutable(): boolean;
|
|
136
|
+
static getRefundAmountByCustomer(customerId: string, status?: string): Promise<GroupedBN>;
|
|
135
137
|
}
|
|
136
138
|
export type TRefund = InferAttributes<Refund>;
|
package/lib/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/payment-types",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.152",
|
|
4
4
|
"description": "Typings for Payment Kit SDK",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"types",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"sequelize": "^6.36.0",
|
|
49
49
|
"type-fest": "^4.10.2"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "5d6d2b6a8c0422e1055ddcec4e3179fd734cdbc5"
|
|
52
52
|
}
|