@blocklet/payment-types 1.13.205 → 1.13.207

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
@@ -6,6 +6,7 @@ import { Event, TEvent } from './event';
6
6
  import { Invoice, TInvoice } from './invoice';
7
7
  import { InvoiceItem, TInvoiceItem } from './invoice-item';
8
8
  import { Job } from './job';
9
+ import { Lock } from './lock';
9
10
  import { PaymentCurrency, TPaymentCurrency } from './payment-currency';
10
11
  import { PaymentIntent, TPaymentIntent } from './payment-intent';
11
12
  import { PaymentLink, TPaymentLink } from './payment-link';
@@ -48,6 +49,7 @@ declare const models: {
48
49
  WebhookEndpoint: typeof WebhookEndpoint;
49
50
  WebhookAttempt: typeof WebhookAttempt;
50
51
  Job: typeof Job;
52
+ Lock: typeof Lock;
51
53
  };
52
54
  export declare function initialize(sequelize: any): void;
53
55
  export default models;
@@ -59,6 +61,7 @@ export * from './event';
59
61
  export * from './invoice';
60
62
  export * from './invoice-item';
61
63
  export * from './job';
64
+ export * from './lock';
62
65
  export * from './payment-currency';
63
66
  export * from './payment-intent';
64
67
  export * from './payment-link';
package/lib/lock.d.ts ADDED
@@ -0,0 +1,43 @@
1
+ import { CreationOptional, DataTypes, InferAttributes, InferCreationAttributes, Model } from 'sequelize';
2
+ export declare class Lock extends Model<InferAttributes<Lock>, InferCreationAttributes<Lock>> {
3
+ id: CreationOptional<string>;
4
+ lock_at: number;
5
+ release_at: number;
6
+ reason?: string;
7
+ created_at: CreationOptional<Date>;
8
+ updated_at: CreationOptional<Date>;
9
+ static readonly GENESIS_ATTRIBUTES: {
10
+ id: {
11
+ type: DataTypes.StringDataType;
12
+ primaryKey: boolean;
13
+ allowNull: boolean;
14
+ };
15
+ lock_at: {
16
+ type: DataTypes.IntegerDataTypeConstructor;
17
+ defaultValue: number;
18
+ };
19
+ release_at: {
20
+ type: DataTypes.IntegerDataTypeConstructor;
21
+ defaultValue: number;
22
+ };
23
+ reason: {
24
+ type: DataTypes.StringDataType;
25
+ allowNull: boolean;
26
+ };
27
+ created_at: {
28
+ type: DataTypes.DateDataTypeConstructor;
29
+ defaultValue: DataTypes.AbstractDataTypeConstructor;
30
+ allowNull: boolean;
31
+ };
32
+ updated_at: {
33
+ type: DataTypes.DateDataTypeConstructor;
34
+ defaultValue: DataTypes.AbstractDataTypeConstructor;
35
+ allowNull: boolean;
36
+ };
37
+ };
38
+ static initialize(sequelize: any): void;
39
+ static acquire(id: string, releaseAt: number, reason?: string): Promise<boolean>;
40
+ static isLocked(id: string): Promise<boolean>;
41
+ static associate(): void;
42
+ }
43
+ export type TLock = InferAttributes<Lock>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/payment-types",
3
- "version": "1.13.205",
3
+ "version": "1.13.207",
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": "8c16c5d362df5c497c7a95a0ae20e2ef61f747b3"
51
+ "gitHead": "7b4918ac7bb09317df0b2a78e337312cc4b50b67"
52
52
  }