@blocklet/payment-types 1.13.127 → 1.13.129

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.
@@ -83,6 +83,7 @@ export declare class CheckoutSession extends Model<InferAttributes<CheckoutSessi
83
83
  description: string;
84
84
  trial_period_days: number;
85
85
  billing_cycle_anchor?: number;
86
+ billing_threshold_amount?: number;
86
87
  metadata?: Record<string, any>;
87
88
  proration_behavior?: LiteralUnion<'create_prorations' | 'none', string>;
88
89
  trial_end?: number;
package/lib/price.d.ts CHANGED
@@ -131,6 +131,7 @@ export declare class Price extends Model<InferAttributes<Price>, InferCreationAt
131
131
  static initialize(sequelize: any): void;
132
132
  static associate(models: any): void;
133
133
  static getModel(price: TPrice): LiteralUnion<"graduated" | "volume", string> | "package" | "standard" | null;
134
+ transformQuantity(quantity: number): number;
134
135
  static formatBeforeSave(price: Partial<TPrice & {
135
136
  model: string;
136
137
  }>): Partial<InferAttributes<Price, {
@@ -3,6 +3,7 @@ import type { LiteralUnion } from 'type-fest';
3
3
  export declare class UsageRecord extends Model<InferAttributes<UsageRecord>, InferCreationAttributes<UsageRecord>> {
4
4
  id: CreationOptional<string>;
5
5
  livemode: boolean;
6
+ billed: boolean;
6
7
  timestamp: number;
7
8
  quantity: number;
8
9
  subscription_item_id: string;
@@ -49,6 +50,12 @@ export declare class UsageRecord extends Model<InferAttributes<UsageRecord>, Inf
49
50
  };
50
51
  static initialize(sequelize: any): void;
51
52
  static associate(models: any): void;
52
- static getSummary(subscription_item_id: string, period_start: number, period_end: number, method: LiteralUnion<'sum' | 'last_during_period' | 'max' | 'last_ever', string>): Promise<number>;
53
+ static getSummary({ id, start, end, method, dryRun, }: {
54
+ id: string;
55
+ start: number;
56
+ end: number;
57
+ method: LiteralUnion<'sum' | 'last_during_period' | 'max' | 'last_ever', string>;
58
+ dryRun: boolean;
59
+ }): Promise<number>;
53
60
  }
54
61
  export type TUsageRecord = InferAttributes<UsageRecord>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/payment-types",
3
- "version": "1.13.127",
3
+ "version": "1.13.129",
4
4
  "description": "Typings for Payment Kit SDK",
5
5
  "keywords": [
6
6
  "types",
@@ -48,5 +48,5 @@
48
48
  "sequelize": "^6.35.1",
49
49
  "type-fest": "^4.8.3"
50
50
  },
51
- "gitHead": "6a90c9de4836dede89733d1ba85929b1e712f6d5"
51
+ "gitHead": "4ad81bea01de3268d9cf0bda552a0a0a67abd85d"
52
52
  }