@blocklet/payment-types 1.20.13 → 1.20.14

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.
@@ -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.13",
3
+ "version": "1.20.14",
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": "0cbe918549f7d06561b5307fb947bfbbd2250984"
51
+ "gitHead": "365b60721b7f3a372c472f774cda290d56dad365"
52
52
  }