@blocklet/payment-types 1.20.13 → 1.20.15
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/checkout-session.d.ts +1 -0
- package/lib/meter-event.d.ts +2 -1
- package/lib/types.d.ts +14 -0
- package/package.json +2 -2
|
@@ -319,5 +319,6 @@ export declare class CheckoutSession extends Model<InferAttributes<CheckoutSessi
|
|
|
319
319
|
isImmutable(): boolean;
|
|
320
320
|
static findBySubscriptionId(subscriptionId: string, options?: FindOptions<CheckoutSession>): Promise<CheckoutSession | null>;
|
|
321
321
|
static findByPaymentIntentId(paymentIntentId: string): Promise<CheckoutSession | null>;
|
|
322
|
+
static findByInvoiceId(invoiceId: string): Promise<CheckoutSession | null>;
|
|
322
323
|
}
|
|
323
324
|
export type TCheckoutSession = InferAttributes<CheckoutSession>;
|
package/lib/meter-event.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CreationOptional, DataTypes, InferAttributes, InferCreationAttributes, Model } from 'sequelize';
|
|
2
2
|
import type { LiteralUnion } from 'type-fest';
|
|
3
|
-
import { GroupedBN, GroupedStrList, MeterEventPayload, MeterEventStatus } from './types';
|
|
3
|
+
import { GroupedBN, GroupedStrList, MeterEventPayload, MeterEventStatus, SourceData } from './types';
|
|
4
4
|
export declare const nextMeterEventId: (size?: number) => string;
|
|
5
5
|
export declare class MeterEvent extends Model<InferAttributes<MeterEvent>, InferCreationAttributes<MeterEvent>> {
|
|
6
6
|
id: CreationOptional<string>;
|
|
@@ -16,6 +16,7 @@ export declare class MeterEvent extends Model<InferAttributes<MeterEvent>, Infer
|
|
|
16
16
|
credit_consumed: string;
|
|
17
17
|
credit_pending: string;
|
|
18
18
|
metadata?: Record<string, any>;
|
|
19
|
+
source_data?: SourceData;
|
|
19
20
|
created_by?: string;
|
|
20
21
|
created_via: LiteralUnion<'api' | 'dashboard' | 'webhook' | 'batch', string>;
|
|
21
22
|
created_at: CreationOptional<Date>;
|
package/lib/types.d.ts
CHANGED
|
@@ -487,4 +487,18 @@ export type Restrictions = {
|
|
|
487
487
|
minimum_amount?: string;
|
|
488
488
|
minimum_amount_currency?: string;
|
|
489
489
|
};
|
|
490
|
+
export type LocalizedText = {
|
|
491
|
+
zh: string;
|
|
492
|
+
en: string;
|
|
493
|
+
};
|
|
494
|
+
export type SimpleSourceData = Record<string, string>;
|
|
495
|
+
export type StructuredSourceDataField = {
|
|
496
|
+
key: string;
|
|
497
|
+
label: string | LocalizedText;
|
|
498
|
+
value: string;
|
|
499
|
+
type?: 'text' | 'image' | 'url';
|
|
500
|
+
url?: string;
|
|
501
|
+
group?: string;
|
|
502
|
+
};
|
|
503
|
+
export type SourceData = SimpleSourceData | StructuredSourceDataField[];
|
|
490
504
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/payment-types",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.15",
|
|
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": "
|
|
51
|
+
"gitHead": "d205c3b1ec7d2b819e375ed2eb8b70c9d48f0bcb"
|
|
52
52
|
}
|