@blocklet/payment-types 1.13.163 → 1.13.165

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/invoice.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { CreationOptional, DataTypes, InferAttributes, InferCreationAttributes, Model, WhereOptions } from 'sequelize';
1
+ import { CreationOptional, DataTypes, InferAttributes, InferCreationAttributes, Model } from 'sequelize';
2
2
  import type { LiteralUnion } from 'type-fest';
3
- import type { CustomerAddress, CustomerShipping, DiscountAmount, GroupedBN, PaymentError, PaymentSettings, SimpleCustomField } from './types';
3
+ import type { CustomerAddress, CustomerShipping, DiscountAmount, GroupedBN, GroupedStrList, 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,8 +352,12 @@ 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 getUncollectibleAmount(where: WhereOptions<Invoice>): Promise<GroupedBN>;
356
- static getUncollectibleAmountByCustomer(customerId: string, excludedInvoiceId?: string): Promise<GroupedBN>;
357
- static getUncollectibleAmountBySubscription(subscriptionId: string, excludedInvoiceId?: string): Promise<GroupedBN>;
355
+ private static _getUncollectibleAmount;
356
+ static getUncollectibleAmount({ customerId, subscriptionId, currencyId, excludedInvoiceId, }: {
357
+ customerId?: string;
358
+ subscriptionId?: string;
359
+ currencyId?: string;
360
+ excludedInvoiceId?: string;
361
+ }): Promise<[GroupedBN, GroupedStrList]>;
358
362
  }
359
363
  export type TInvoice = InferAttributes<Invoice>;
package/lib/types.d.ts CHANGED
@@ -2,6 +2,9 @@ import type { LiteralUnion } from 'type-fest';
2
2
  export type GroupedBN = {
3
3
  [currencyId: string]: string;
4
4
  };
5
+ export type GroupedStrList = {
6
+ [currencyId: string]: string[];
7
+ };
5
8
  export type Pagination<T = any> = T & {
6
9
  page?: number;
7
10
  pageSize?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/payment-types",
3
- "version": "1.13.163",
3
+ "version": "1.13.165",
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": "2f485afbabe92bb6e63b09c4e69cb2ae06d3d2be"
51
+ "gitHead": "24fadab6620ca13856393399efd6a1dffc431d66"
52
52
  }