@blocklet/payment-types 1.13.151 → 1.13.153
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/invoice.d.ts +2 -1
- package/lib/payment-intent.d.ts +2 -1
- package/lib/refund.d.ts +2 -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/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>;
|
|
@@ -133,5 +133,6 @@ export declare class Refund extends Model<InferAttributes<Refund>, InferCreation
|
|
|
133
133
|
static initialize(sequelize: any): void;
|
|
134
134
|
static associate(models: any): void;
|
|
135
135
|
isImmutable(): boolean;
|
|
136
|
+
static getRefundAmountByCustomer(customerId: string, status?: string): Promise<GroupedBN>;
|
|
136
137
|
}
|
|
137
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.153",
|
|
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": "db16f61414e8f72da55dfa2faf9c17d79fcb6655"
|
|
52
52
|
}
|