@blocklet/payment-types 1.25.8 → 1.25.9

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.
@@ -0,0 +1,41 @@
1
+ import { CreationOptional, DataTypes, InferAttributes, InferCreationAttributes, Model } from 'sequelize';
2
+ export declare class ArchiveLock extends Model<InferAttributes<ArchiveLock>, InferCreationAttributes<ArchiveLock>> {
3
+ id: CreationOptional<string>;
4
+ locked_by?: string | null;
5
+ locked_at?: number | null;
6
+ expires_at?: number | null;
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
+ locked_by: {
16
+ type: DataTypes.StringDataType;
17
+ allowNull: boolean;
18
+ };
19
+ locked_at: {
20
+ type: DataTypes.IntegerDataTypeConstructor;
21
+ allowNull: boolean;
22
+ };
23
+ expires_at: {
24
+ type: DataTypes.IntegerDataTypeConstructor;
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 associate(): void;
40
+ }
41
+ export type TArchiveLock = InferAttributes<ArchiveLock>;
@@ -0,0 +1,110 @@
1
+ import { CreationOptional, DataTypes, InferAttributes, InferCreationAttributes, Model } from 'sequelize';
2
+ export declare class ArchiveMetadata extends Model<InferAttributes<ArchiveMetadata>, InferCreationAttributes<ArchiveMetadata>> {
3
+ id: CreationOptional<string>;
4
+ archive_file: string;
5
+ created_at: CreationOptional<Date>;
6
+ updated_at: CreationOptional<Date>;
7
+ date_range_start: number;
8
+ date_range_end: number;
9
+ tables: Record<string, {
10
+ archived_count: number;
11
+ deleted_count: number;
12
+ failed_count: number;
13
+ failed_ids?: string[];
14
+ }>;
15
+ total_records: number;
16
+ checksum?: string;
17
+ file_size?: number;
18
+ duration_ms?: number;
19
+ triggered_by: 'cron' | 'manual';
20
+ triggered_by_user_id?: string;
21
+ status: 'completed' | 'failed' | 'in_progress';
22
+ error?: string;
23
+ query_count: number;
24
+ query_actor_ids?: string[];
25
+ last_queried_at?: number;
26
+ static readonly GENESIS_ATTRIBUTES: {
27
+ id: {
28
+ type: DataTypes.StringDataType;
29
+ primaryKey: boolean;
30
+ allowNull: boolean;
31
+ };
32
+ archive_file: {
33
+ type: DataTypes.StringDataType;
34
+ allowNull: boolean;
35
+ };
36
+ date_range_start: {
37
+ type: DataTypes.IntegerDataTypeConstructor;
38
+ allowNull: boolean;
39
+ };
40
+ date_range_end: {
41
+ type: DataTypes.IntegerDataTypeConstructor;
42
+ allowNull: boolean;
43
+ };
44
+ tables: {
45
+ type: DataTypes.AbstractDataTypeConstructor;
46
+ allowNull: boolean;
47
+ defaultValue: {};
48
+ };
49
+ total_records: {
50
+ type: DataTypes.IntegerDataTypeConstructor;
51
+ allowNull: boolean;
52
+ defaultValue: number;
53
+ };
54
+ checksum: {
55
+ type: DataTypes.StringDataType;
56
+ allowNull: boolean;
57
+ };
58
+ file_size: {
59
+ type: DataTypes.IntegerDataTypeConstructor;
60
+ allowNull: boolean;
61
+ };
62
+ duration_ms: {
63
+ type: DataTypes.IntegerDataTypeConstructor;
64
+ allowNull: boolean;
65
+ };
66
+ triggered_by: {
67
+ type: DataTypes.EnumDataType<"cron" | "manual">;
68
+ allowNull: boolean;
69
+ };
70
+ triggered_by_user_id: {
71
+ type: DataTypes.StringDataType;
72
+ allowNull: boolean;
73
+ };
74
+ status: {
75
+ type: DataTypes.EnumDataType<"completed" | "failed" | "in_progress">;
76
+ allowNull: boolean;
77
+ };
78
+ error: {
79
+ type: DataTypes.TextDataTypeConstructor;
80
+ allowNull: boolean;
81
+ };
82
+ query_count: {
83
+ type: DataTypes.IntegerDataTypeConstructor;
84
+ allowNull: boolean;
85
+ defaultValue: number;
86
+ };
87
+ query_actor_ids: {
88
+ type: DataTypes.AbstractDataTypeConstructor;
89
+ allowNull: boolean;
90
+ defaultValue: never[];
91
+ };
92
+ last_queried_at: {
93
+ type: DataTypes.IntegerDataTypeConstructor;
94
+ allowNull: boolean;
95
+ };
96
+ created_at: {
97
+ type: DataTypes.DateDataTypeConstructor;
98
+ defaultValue: DataTypes.AbstractDataTypeConstructor;
99
+ allowNull: boolean;
100
+ };
101
+ updated_at: {
102
+ type: DataTypes.DateDataTypeConstructor;
103
+ defaultValue: DataTypes.AbstractDataTypeConstructor;
104
+ allowNull: boolean;
105
+ };
106
+ };
107
+ static initialize(sequelize: any): void;
108
+ static associate(): void;
109
+ }
110
+ export type TArchiveMetadata = InferAttributes<ArchiveMetadata>;
@@ -74,7 +74,7 @@ export declare class CreditTransaction extends Model<InferAttributes<CreditTrans
74
74
  allowNull: boolean;
75
75
  };
76
76
  transfer_status: {
77
- type: DataTypes.EnumDataType<"pending" | "completed" | "failed">;
77
+ type: DataTypes.EnumDataType<"completed" | "failed" | "pending">;
78
78
  allowNull: boolean;
79
79
  };
80
80
  transfer_hash: {
package/lib/index.d.ts CHANGED
@@ -36,6 +36,9 @@ import { ProductVendor } from './product-vendor';
36
36
  import { TaxRate } from './tax-rate';
37
37
  import { ExchangeRateProvider } from './exchange-rate-provider';
38
38
  import { PriceQuote } from './price-quote';
39
+ import { ArchiveMetadata } from './archive-metadata';
40
+ import { ArchiveLock } from './archive-lock';
41
+ import { RevenueSnapshot } from './revenue-snapshot';
39
42
  declare const models: {
40
43
  CheckoutSession: typeof CheckoutSession;
41
44
  Coupon: typeof Coupon;
@@ -74,6 +77,9 @@ declare const models: {
74
77
  TaxRate: typeof TaxRate;
75
78
  ExchangeRateProvider: typeof ExchangeRateProvider;
76
79
  PriceQuote: typeof PriceQuote;
80
+ ArchiveMetadata: typeof ArchiveMetadata;
81
+ ArchiveLock: typeof ArchiveLock;
82
+ RevenueSnapshot: typeof RevenueSnapshot;
77
83
  };
78
84
  export declare function initialize(sequelize: any): void;
79
85
  export default models;
@@ -115,6 +121,9 @@ export * from './product-vendor';
115
121
  export * from './tax-rate';
116
122
  export * from './exchange-rate-provider';
117
123
  export * from './price-quote';
124
+ export * from './archive-metadata';
125
+ export * from './archive-lock';
126
+ export * from './revenue-snapshot';
118
127
  export type TPriceExpanded = TPrice & {
119
128
  object: 'price';
120
129
  product: TProduct;
@@ -53,7 +53,7 @@ export declare class MeterEvent extends Model<InferAttributes<MeterEvent>, Infer
53
53
  allowNull: boolean;
54
54
  };
55
55
  status: {
56
- type: DataTypes.EnumDataType<"pending" | "processing" | "requires_action" | "requires_capture" | "completed" | "canceled">;
56
+ type: DataTypes.EnumDataType<"completed" | "pending" | "processing" | "requires_action" | "requires_capture" | "canceled">;
57
57
  defaultValue: string;
58
58
  allowNull: boolean;
59
59
  };
package/lib/meter.d.ts CHANGED
@@ -45,7 +45,7 @@ export declare class Meter extends Model<InferAttributes<Meter>, InferCreationAt
45
45
  unique: boolean;
46
46
  };
47
47
  aggregation_method: {
48
- type: DataTypes.EnumDataType<"sum" | "count" | "last">;
48
+ type: DataTypes.EnumDataType<"count" | "sum" | "last">;
49
49
  defaultValue: string;
50
50
  allowNull: boolean;
51
51
  };
@@ -119,11 +119,11 @@ export declare class PaymentIntent extends Model<InferAttributes<PaymentIntent>,
119
119
  allowNull: boolean;
120
120
  };
121
121
  capture_method: {
122
- type: DataTypes.EnumDataType<"automatic" | "manual">;
122
+ type: DataTypes.EnumDataType<"manual" | "automatic">;
123
123
  allowNull: boolean;
124
124
  };
125
125
  confirmation_method: {
126
- type: DataTypes.EnumDataType<"automatic" | "manual">;
126
+ type: DataTypes.EnumDataType<"manual" | "automatic">;
127
127
  allowNull: boolean;
128
128
  };
129
129
  payment_method_types: {
package/lib/payout.d.ts CHANGED
@@ -82,7 +82,7 @@ export declare class Payout extends Model<InferAttributes<Payout>, InferCreation
82
82
  allowNull: boolean;
83
83
  };
84
84
  status: {
85
- type: DataTypes.EnumDataType<"pending" | "canceled" | "paid" | "failed" | "in_transit" | "deferred" | "reverted">;
85
+ type: DataTypes.EnumDataType<"failed" | "pending" | "canceled" | "paid" | "in_transit" | "deferred" | "reverted">;
86
86
  allowNull: boolean;
87
87
  };
88
88
  failure_message: {
package/lib/refund.d.ts CHANGED
@@ -77,7 +77,7 @@ export declare class Refund extends Model<InferAttributes<Refund>, InferCreation
77
77
  allowNull: boolean;
78
78
  };
79
79
  status: {
80
- type: DataTypes.EnumDataType<"pending" | "requires_action" | "canceled" | "succeeded" | "failed">;
80
+ type: DataTypes.EnumDataType<"failed" | "pending" | "requires_action" | "canceled" | "succeeded">;
81
81
  allowNull: boolean;
82
82
  };
83
83
  reason: {
@@ -0,0 +1,88 @@
1
+ import { CreationOptional, DataTypes, InferAttributes, InferCreationAttributes, Model } from 'sequelize';
2
+ export declare class RevenueSnapshot extends Model<InferAttributes<RevenueSnapshot>, InferCreationAttributes<RevenueSnapshot>> {
3
+ id: CreationOptional<string>;
4
+ livemode: boolean;
5
+ currency_id: string;
6
+ timestamp: number;
7
+ period_type: 'monthly' | 'quarterly';
8
+ total_revenue: string;
9
+ refund_amount: string;
10
+ promotion_cost: string;
11
+ credit_grant_cost: string;
12
+ vendor_cost: string;
13
+ taxed_revenue: string;
14
+ net_revenue: string;
15
+ archive_metadata_id: CreationOptional<string>;
16
+ created_at: CreationOptional<Date>;
17
+ updated_at: CreationOptional<Date>;
18
+ static readonly GENESIS_ATTRIBUTES: {
19
+ id: {
20
+ type: DataTypes.StringDataType;
21
+ primaryKey: boolean;
22
+ allowNull: boolean;
23
+ defaultValue: (size?: number) => string;
24
+ };
25
+ livemode: {
26
+ type: DataTypes.AbstractDataTypeConstructor;
27
+ allowNull: boolean;
28
+ };
29
+ currency_id: {
30
+ type: DataTypes.StringDataType;
31
+ allowNull: boolean;
32
+ };
33
+ timestamp: {
34
+ type: DataTypes.IntegerDataTypeConstructor;
35
+ allowNull: boolean;
36
+ };
37
+ period_type: {
38
+ type: DataTypes.EnumDataType<"monthly" | "quarterly">;
39
+ allowNull: boolean;
40
+ defaultValue: string;
41
+ };
42
+ total_revenue: {
43
+ type: DataTypes.StringDataType;
44
+ defaultValue: string;
45
+ };
46
+ refund_amount: {
47
+ type: DataTypes.StringDataType;
48
+ defaultValue: string;
49
+ };
50
+ promotion_cost: {
51
+ type: DataTypes.StringDataType;
52
+ defaultValue: string;
53
+ };
54
+ credit_grant_cost: {
55
+ type: DataTypes.StringDataType;
56
+ defaultValue: string;
57
+ };
58
+ vendor_cost: {
59
+ type: DataTypes.StringDataType;
60
+ defaultValue: string;
61
+ };
62
+ taxed_revenue: {
63
+ type: DataTypes.StringDataType;
64
+ defaultValue: string;
65
+ };
66
+ net_revenue: {
67
+ type: DataTypes.StringDataType;
68
+ defaultValue: string;
69
+ };
70
+ archive_metadata_id: {
71
+ type: DataTypes.StringDataType;
72
+ allowNull: boolean;
73
+ };
74
+ created_at: {
75
+ type: DataTypes.DateDataTypeConstructor;
76
+ defaultValue: DataTypes.AbstractDataTypeConstructor;
77
+ allowNull: boolean;
78
+ };
79
+ updated_at: {
80
+ type: DataTypes.DateDataTypeConstructor;
81
+ defaultValue: DataTypes.AbstractDataTypeConstructor;
82
+ allowNull: boolean;
83
+ };
84
+ };
85
+ static initialize(sequelize: any): void;
86
+ static associate(): void;
87
+ }
88
+ export type TRevenueSnapshot = InferAttributes<RevenueSnapshot>;
@@ -62,7 +62,7 @@ export declare class SubscriptionSchedule extends Model<InferAttributes<Subscrip
62
62
  allowNull: boolean;
63
63
  };
64
64
  status: {
65
- type: DataTypes.EnumDataType<"active" | "completed" | "canceled" | "not_started" | "released">;
65
+ type: DataTypes.EnumDataType<"completed" | "active" | "canceled" | "not_started" | "released">;
66
66
  allowNull: boolean;
67
67
  };
68
68
  default_settings: {
@@ -31,7 +31,7 @@ export declare class WebhookAttempt extends Model<InferAttributes<WebhookAttempt
31
31
  allowNull: boolean;
32
32
  };
33
33
  status: {
34
- type: DataTypes.EnumDataType<"succeeded" | "failed">;
34
+ type: DataTypes.EnumDataType<"failed" | "succeeded">;
35
35
  allowNull: boolean;
36
36
  };
37
37
  response_status: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/payment-types",
3
- "version": "1.25.8",
3
+ "version": "1.25.9",
4
4
  "description": "Typings for Payment Kit SDK",
5
5
  "keywords": [
6
6
  "types",
@@ -48,5 +48,5 @@
48
48
  "sequelize": "^6.37.7",
49
49
  "type-fest": "^4.41.0"
50
50
  },
51
- "gitHead": "b40c46bcf52d4c1758bb10eb4c4583355960e18f"
51
+ "gitHead": "09d86ef40faede3782f54c9d4df01e4821425d3b"
52
52
  }