@blocklet/payment-types 1.20.12 → 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.
@@ -110,12 +110,12 @@ export declare class CheckoutSession extends Model<InferAttributes<CheckoutSessi
110
110
  verification_method?: string;
111
111
  verification_data?: Record<string, any>;
112
112
  }>;
113
- fulfillment_status?: LiteralUnion<'pending' | 'processing' | 'completed' | 'failed' | 'cancelled' | 'max_retries_exceeded' | 'return_requested' | 'sent', string>;
113
+ fulfillment_status?: LiteralUnion<'pending' | 'processing' | 'completed' | 'failed' | 'cancelled' | 'max_retries_exceeded' | 'return_requested' | 'sent' | 'returning' | 'returned', string>;
114
114
  vendor_info?: Array<{
115
115
  vendor_id: string;
116
116
  vendor_key: string;
117
117
  order_id: string;
118
- status: 'pending' | 'processing' | 'completed' | 'failed' | 'cancelled' | 'max_retries_exceeded' | 'return_requested' | 'sent';
118
+ status: 'pending' | 'processing' | 'completed' | 'failed' | 'cancelled' | 'max_retries_exceeded' | 'return_requested' | 'sent' | 'returned';
119
119
  service_url?: string;
120
120
  app_url?: string;
121
121
  error_message?: string;
@@ -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>;
@@ -12,6 +12,7 @@ export declare class ProductVendor extends Model<InferAttributes<ProductVendor>,
12
12
  vendor_did?: string;
13
13
  status: 'active' | 'inactive';
14
14
  metadata: Record<string, any>;
15
+ extends: Record<string, any>;
15
16
  created_by: string;
16
17
  created_at: CreationOptional<Date>;
17
18
  updated_at: CreationOptional<Date>;
@@ -66,6 +67,11 @@ export declare class ProductVendor extends Model<InferAttributes<ProductVendor>,
66
67
  allowNull: boolean;
67
68
  defaultValue: {};
68
69
  };
70
+ extends: {
71
+ type: DataTypes.AbstractDataTypeConstructor;
72
+ allowNull: boolean;
73
+ defaultValue: {};
74
+ };
69
75
  created_by: {
70
76
  type: DataTypes.StringDataType;
71
77
  allowNull: boolean;
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.12",
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": "e6c432f89c2bf305efc903c0809f4a0557c07774"
51
+ "gitHead": "365b60721b7f3a372c472f774cda290d56dad365"
52
52
  }