@blocklet/payment-types 1.13.217 → 1.13.219

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/index.d.ts CHANGED
@@ -11,6 +11,7 @@ import { PaymentCurrency, TPaymentCurrency } from './payment-currency';
11
11
  import { PaymentIntent, TPaymentIntent } from './payment-intent';
12
12
  import { PaymentLink, TPaymentLink } from './payment-link';
13
13
  import { PaymentMethod, TPaymentMethod } from './payment-method';
14
+ import { PaymentStat } from './payment-stat';
14
15
  import { Payout, TPayout } from './payout';
15
16
  import { Price, TPrice } from './price';
16
17
  import { PricingTable, TPricingTable } from './pricing-table';
@@ -36,6 +37,7 @@ declare const models: {
36
37
  PaymentCurrency: typeof PaymentCurrency;
37
38
  PaymentIntent: typeof PaymentIntent;
38
39
  PaymentLink: typeof PaymentLink;
40
+ PaymentStat: typeof PaymentStat;
39
41
  Payout: typeof Payout;
40
42
  PaymentMethod: typeof PaymentMethod;
41
43
  Price: typeof Price;
@@ -68,6 +70,7 @@ export * from './payment-currency';
68
70
  export * from './payment-intent';
69
71
  export * from './payment-link';
70
72
  export * from './payment-method';
73
+ export * from './payment-stat';
71
74
  export * from './payout';
72
75
  export * from './price';
73
76
  export * from './pricing-table';
package/lib/invoice.d.ts CHANGED
@@ -359,5 +359,6 @@ export declare class Invoice extends Model<InferAttributes<Invoice>, InferCreati
359
359
  currencyId?: string;
360
360
  excludedInvoiceId?: string;
361
361
  }): Promise<[GroupedBN, GroupedStrList]>;
362
+ static getSummary(livemode?: boolean, field?: string): Promise<Invoice[]>;
362
363
  }
363
364
  export type TInvoice = InferAttributes<Invoice>;
@@ -156,5 +156,6 @@ export declare class PaymentIntent extends Model<InferAttributes<PaymentIntent>,
156
156
  static associate(models: any): void;
157
157
  isImmutable(): boolean;
158
158
  static getPaidAmountByCustomer(customerId: string): Promise<GroupedBN>;
159
+ static getSummary(livemode?: boolean, field?: string): Promise<PaymentIntent[]>;
159
160
  }
160
161
  export type TPaymentIntent = InferAttributes<PaymentIntent>;
@@ -0,0 +1,57 @@
1
+ import { CreationOptional, DataTypes, InferAttributes, InferCreationAttributes, Model } from 'sequelize';
2
+ export declare class PaymentStat extends Model<InferAttributes<PaymentStat>, InferCreationAttributes<PaymentStat>> {
3
+ id: CreationOptional<string>;
4
+ livemode: boolean;
5
+ timestamp: number;
6
+ currency_id: string;
7
+ amount_paid: string;
8
+ amount_payout: string;
9
+ amount_refund: string;
10
+ created_at: CreationOptional<Date>;
11
+ updated_at: CreationOptional<Date>;
12
+ static readonly GENESIS_ATTRIBUTES: {
13
+ id: {
14
+ type: DataTypes.StringDataType;
15
+ primaryKey: boolean;
16
+ allowNull: boolean;
17
+ defaultValue: (size?: number | undefined) => string;
18
+ };
19
+ livemode: {
20
+ type: DataTypes.AbstractDataTypeConstructor;
21
+ allowNull: boolean;
22
+ };
23
+ timestamp: {
24
+ type: DataTypes.IntegerDataTypeConstructor;
25
+ defaultValue: number;
26
+ };
27
+ currency_id: {
28
+ type: DataTypes.StringDataType;
29
+ allowNull: boolean;
30
+ };
31
+ amount_paid: {
32
+ type: DataTypes.StringDataType;
33
+ defaultValue: string;
34
+ };
35
+ amount_payout: {
36
+ type: DataTypes.StringDataType;
37
+ defaultValue: string;
38
+ };
39
+ amount_refund: {
40
+ type: DataTypes.StringDataType;
41
+ defaultValue: string;
42
+ };
43
+ created_at: {
44
+ type: DataTypes.DateDataTypeConstructor;
45
+ defaultValue: DataTypes.AbstractDataTypeConstructor;
46
+ allowNull: boolean;
47
+ };
48
+ updated_at: {
49
+ type: DataTypes.DateDataTypeConstructor;
50
+ defaultValue: DataTypes.AbstractDataTypeConstructor;
51
+ allowNull: boolean;
52
+ };
53
+ };
54
+ static initialize(sequelize: any): void;
55
+ static associate(): void;
56
+ }
57
+ export type TPaymentStat = InferAttributes<PaymentStat>;
package/lib/payout.d.ts CHANGED
@@ -118,5 +118,6 @@ export declare class Payout extends Model<InferAttributes<Payout>, InferCreation
118
118
  static associate(models: any): void;
119
119
  isImmutable(): boolean;
120
120
  static getPayoutAmountByCustomer(customerId: string, status?: string): Promise<GroupedBN>;
121
+ static getSummary(livemode?: boolean, field?: string): Promise<Payout[]>;
121
122
  }
122
123
  export type TPayout = InferAttributes<Payout>;
package/lib/product.d.ts CHANGED
@@ -100,5 +100,6 @@ export declare class Product extends Model<InferAttributes<Product>, InferCreati
100
100
  static expand(id: string): Promise<InferAttributes<Product, {
101
101
  omit: never;
102
102
  }> | null>;
103
+ static getSummary(livemode?: boolean, field?: string): Promise<Product[]>;
103
104
  }
104
105
  export type TProduct = InferAttributes<Product>;
package/lib/refund.d.ts CHANGED
@@ -134,5 +134,6 @@ export declare class Refund extends Model<InferAttributes<Refund>, InferCreation
134
134
  static associate(models: any): void;
135
135
  isImmutable(): boolean;
136
136
  static getRefundAmountByCustomer(customerId: string, status?: string): Promise<GroupedBN>;
137
+ static getSummary(livemode?: boolean, field?: string): Promise<Refund[]>;
137
138
  }
138
139
  export type TRefund = InferAttributes<Refund>;
@@ -201,6 +201,7 @@ export declare class Subscription extends Model<InferAttributes<Subscription>, I
201
201
  isActive(): boolean;
202
202
  isScheduledToCancel(): boolean;
203
203
  start(): Promise<boolean>;
204
+ static getSummary(livemode?: boolean, field?: string): Promise<Subscription[]>;
204
205
  }
205
206
  export type TSubscription = InferAttributes<Subscription>;
206
207
  export declare function getSubscriptionEventType(current: TSubscription, previous: Partial<TSubscription>): "" | "paused" | "resumed";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/payment-types",
3
- "version": "1.13.217",
3
+ "version": "1.13.219",
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": "3ce8954d7c26c881e0a7a46925447318954adca9"
51
+ "gitHead": "02726a2c2c6e3f6006ef65b041304c61209a1a11"
52
52
  }