@blocklet/payment-js 1.15.4 → 1.15.5

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
@@ -15,6 +15,7 @@ declare const _default: {
15
15
  omit: never;
16
16
  }>>;
17
17
  list: (_params: import("@blocklet/payment-types").Pagination<{
18
+ [key: `metadata.${string}`]: string;
18
19
  status?: string;
19
20
  payment_status?: string;
20
21
  nft_mint_status?: string;
@@ -62,6 +63,7 @@ declare const _default: {
62
63
  omit: never;
63
64
  }>>) => Promise<import("@blocklet/payment-types").TProductExpanded>;
64
65
  list: (_params: import("@blocklet/payment-types").Pagination<{
66
+ [key: `metadata.${string}`]: string;
65
67
  active?: boolean;
66
68
  name?: string;
67
69
  description?: string;
@@ -87,6 +89,7 @@ declare const _default: {
87
89
  omit: never;
88
90
  }>>;
89
91
  list: (_params: import("@blocklet/payment-types").Pagination<{
92
+ [key: `metadata.${string}`]: string;
90
93
  status?: string;
91
94
  invoice_id?: string;
92
95
  customer_id?: string;
@@ -182,12 +185,25 @@ declare const _default: {
182
185
  omit: never;
183
186
  }>>;
184
187
  list: (_params: import("@blocklet/payment-types").Pagination<{
188
+ [key: `metadata.${string}`]: string;
185
189
  status?: string;
186
190
  customer_id?: string;
187
191
  customer_did?: string;
192
+ order?: string | string[] | import("sequelize").OrderItem | import("sequelize").OrderItem[];
193
+ activeFirst?: boolean;
188
194
  }>, data?: never) => Promise<import("@blocklet/payment-types").Paginated<import("@blocklet/payment-types").TSubscriptionExpanded>>;
189
195
  search: (_params: any, data?: never) => Promise<import("@blocklet/payment-types").Paginated<import("@blocklet/payment-types").TSubscriptionExpanded>>;
190
- cancel: (_params: string, data?: never) => Promise<import("sequelize").InferAttributes<import("@blocklet/payment-types").Subscription, {
196
+ cancel: (_params: string, data?: {
197
+ at?: "now" | "current_period_end" | "custom";
198
+ time?: number | string;
199
+ refund?: "none" | "proration" | "last";
200
+ feedback?: string;
201
+ comment?: string;
202
+ reason?: import("type-fest").LiteralUnion<"cancellation_requested" | "payment_disputed" | "payment_failed" | "stake_revoked", string>;
203
+ staking?: "none" | "proration" | "slash";
204
+ slashReason?: string;
205
+ cancel_from?: "customer" | "admin";
206
+ }) => Promise<import("sequelize").InferAttributes<import("@blocklet/payment-types").Subscription, {
191
207
  omit: never;
192
208
  }>>;
193
209
  recover: (_params: string, data?: never) => Promise<import("sequelize").InferAttributes<import("@blocklet/payment-types").Subscription, {
@@ -14,6 +14,7 @@ declare const _default: {
14
14
  omit: never;
15
15
  }>>;
16
16
  list: (_params: Pagination<{
17
+ [key: `metadata.${string}`]: string;
17
18
  status?: string;
18
19
  payment_status?: string;
19
20
  nft_mint_status?: string;
@@ -12,6 +12,7 @@ declare const _default: {
12
12
  omit: never;
13
13
  }>>;
14
14
  list: (_params: Pagination<{
15
+ [key: `metadata.${string}`]: string;
15
16
  status?: string;
16
17
  invoice_id?: string;
17
18
  customer_id?: string;
@@ -12,6 +12,7 @@ declare const _default: {
12
12
  omit: never;
13
13
  }>>) => Promise<TProductExpanded>;
14
14
  list: (_params: Pagination<{
15
+ [key: `metadata.${string}`]: string;
15
16
  active?: boolean;
16
17
  name?: string;
17
18
  description?: string;
@@ -1,4 +1,17 @@
1
+ import type { OrderItem } from 'sequelize';
1
2
  import type { Paginated, Pagination, TSubscriptionExpanded } from '@blocklet/payment-types';
3
+ import type { LiteralUnion } from 'type-fest';
4
+ type CancelBodyType = {
5
+ at?: 'now' | 'current_period_end' | 'custom';
6
+ time?: number | string;
7
+ refund?: 'none' | 'proration' | 'last';
8
+ feedback?: string;
9
+ comment?: string;
10
+ reason?: LiteralUnion<'cancellation_requested' | 'payment_disputed' | 'payment_failed' | 'stake_revoked', string>;
11
+ staking?: 'none' | 'proration' | 'slash';
12
+ slashReason?: string;
13
+ cancel_from?: 'customer' | 'admin';
14
+ };
2
15
  declare const _default: {
3
16
  create: (data: Partial<TSubscriptionExpanded>, params?: never) => Promise<import("sequelize").InferAttributes<import("@blocklet/payment-types").Subscription, {
4
17
  omit: never;
@@ -10,12 +23,15 @@ declare const _default: {
10
23
  omit: never;
11
24
  }>>;
12
25
  list: (_params: Pagination<{
26
+ [key: `metadata.${string}`]: string;
13
27
  status?: string;
14
28
  customer_id?: string;
15
29
  customer_did?: string;
30
+ order?: string | string[] | OrderItem | OrderItem[];
31
+ activeFirst?: boolean;
16
32
  }>, data?: never) => Promise<Paginated<TSubscriptionExpanded>>;
17
33
  search: (_params: any, data?: never) => Promise<Paginated<TSubscriptionExpanded>>;
18
- cancel: (_params: string, data?: never) => Promise<import("sequelize").InferAttributes<import("@blocklet/payment-types").Subscription, {
34
+ cancel: (_params: string, data?: CancelBodyType) => Promise<import("sequelize").InferAttributes<import("@blocklet/payment-types").Subscription, {
19
35
  omit: never;
20
36
  }>>;
21
37
  recover: (_params: string, data?: never) => Promise<import("sequelize").InferAttributes<import("@blocklet/payment-types").Subscription, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/payment-js",
3
- "version": "1.15.4",
3
+ "version": "1.15.5",
4
4
  "description": "Node.js client for Payment Kit",
5
5
  "keywords": [
6
6
  "types",
@@ -36,7 +36,7 @@
36
36
  "url": "https://github.com/blocklet/payment-kit/issues"
37
37
  },
38
38
  "dependencies": {
39
- "@blocklet/payment-types": "1.15.4",
39
+ "@blocklet/payment-types": "1.15.5",
40
40
  "@blocklet/sdk": "1.16.30"
41
41
  },
42
42
  "importSort": {
@@ -62,5 +62,5 @@
62
62
  "type-fest": "^4.23.0",
63
63
  "typescript": "^5.5.4"
64
64
  },
65
- "gitHead": "d1c51f0dffe33e5d42b3dc601a554df6c8f88828"
65
+ "gitHead": "013d9fb8161d6021b66da18916f49242dc156580"
66
66
  }