@blocklet/payment-types 1.16.17 → 1.16.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.
package/lib/customer.d.ts CHANGED
@@ -119,7 +119,7 @@ export declare class Customer extends Model<InferAttributes<Customer>, InferCrea
119
119
  };
120
120
  };
121
121
  getInvoiceNumber(): Promise<string>;
122
- getSummary(): Promise<{
122
+ getSummary(livemode?: boolean): Promise<{
123
123
  paid: any;
124
124
  due: any;
125
125
  refunded: any;
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' | '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', string>;
19
19
  currency_id: string;
20
20
  customer_id: string;
21
21
  payment_intent_id?: string;
@@ -353,11 +353,12 @@ export declare class Invoice extends Model<InferAttributes<Invoice>, InferCreati
353
353
  static associate(models: any): void;
354
354
  isImmutable(): boolean;
355
355
  private static _getUncollectibleAmount;
356
- static getUncollectibleAmount({ customerId, subscriptionId, currencyId, excludedInvoiceId, }: {
356
+ static getUncollectibleAmount({ customerId, subscriptionId, currencyId, excludedInvoiceId, livemode, }: {
357
357
  customerId?: string;
358
358
  subscriptionId?: string;
359
359
  currencyId?: string;
360
360
  excludedInvoiceId?: string;
361
+ livemode?: boolean;
361
362
  }): Promise<[GroupedBN, GroupedStrList]>;
362
363
  static getSummary(livemode?: boolean, field?: string): Promise<Invoice[]>;
363
364
  }
package/lib/lock.d.ts CHANGED
@@ -38,6 +38,7 @@ export declare class Lock extends Model<InferAttributes<Lock>, InferCreationAttr
38
38
  static initialize(sequelize: any): void;
39
39
  static acquire(id: string, releaseAt: number, reason?: string): Promise<boolean>;
40
40
  static isLocked(id: string): Promise<boolean>;
41
+ static release(id: string): Promise<void>;
41
42
  static associate(): void;
42
43
  }
43
44
  export type TLock = InferAttributes<Lock>;
@@ -69,6 +69,11 @@ export declare class Subscription extends Model<InferAttributes<Subscription>, I
69
69
  recovered_from?: string;
70
70
  created_at: CreationOptional<Date>;
71
71
  updated_at: CreationOptional<Date>;
72
+ overdraft_protection?: {
73
+ enabled: boolean;
74
+ payment_method_id: string;
75
+ payment_details: PaymentDetails;
76
+ };
72
77
  static readonly GENESIS_ATTRIBUTES: {
73
78
  id: {
74
79
  type: DataTypes.StringDataType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/payment-types",
3
- "version": "1.16.17",
3
+ "version": "1.16.19",
4
4
  "description": "Typings for Payment Kit SDK",
5
5
  "keywords": [
6
6
  "types",
@@ -48,5 +48,5 @@
48
48
  "sequelize": "^6.37.3",
49
49
  "type-fest": "^4.23.0"
50
50
  },
51
- "gitHead": "38b1da1771951e6a30f3cb643fadb108aceed5b6"
51
+ "gitHead": "a033985b46d5c80b56f2ed9dc86d808fb60d9db1"
52
52
  }