payment-kit 1.13.16 → 1.13.17

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.
@@ -2,7 +2,7 @@ import { fromTokenToUnit } from '@ocap/util';
2
2
  import { Router } from 'express';
3
3
  import Joi from 'joi';
4
4
  import pick from 'lodash/pick';
5
- import type { WhereOptions } from 'sequelize';
5
+ import { Op, WhereOptions } from 'sequelize';
6
6
 
7
7
  import { authenticate } from '../libs/security';
8
8
  import { formatMetadata } from '../libs/util';
@@ -70,11 +70,15 @@ const paginationSchema = Joi.object<{
70
70
  page: number;
71
71
  size: number;
72
72
  active?: boolean;
73
+ name?: string;
74
+ description?: string;
73
75
  livemode?: boolean;
74
76
  }>({
75
77
  page: Joi.number().integer().min(1).default(1),
76
78
  size: Joi.number().integer().min(1).max(100).default(20),
77
79
  active: Joi.boolean().empty(''),
80
+ name: Joi.string().empty(''),
81
+ description: Joi.string().empty(''),
78
82
  livemode: Joi.boolean().empty(''),
79
83
  });
80
84
  router.get('/', auth, async (req, res) => {
@@ -87,6 +91,12 @@ router.get('/', auth, async (req, res) => {
87
91
  if (typeof query.livemode === 'boolean') {
88
92
  where.livemode = query.livemode;
89
93
  }
94
+ if (query.name) {
95
+ where.name = { [Op.like]: `%${query.name}%` };
96
+ }
97
+ if (query.description) {
98
+ where.description = { [Op.like]: `%${query.description}%` };
99
+ }
90
100
 
91
101
  const { rows: list, count } = await Product.findAndCountAll({
92
102
  where,
package/blocklet.yml CHANGED
@@ -14,7 +14,7 @@ repository:
14
14
  type: git
15
15
  url: git+https://github.com/blocklet/payment-kit.git
16
16
  specVersion: 1.2.8
17
- version: 1.13.16
17
+ version: 1.13.17
18
18
  logo: logo.png
19
19
  files:
20
20
  - dist
@@ -71,6 +71,7 @@ navigation:
71
71
  link: /admin
72
72
  section:
73
73
  - dashboard
74
+ - sessionManager
74
75
  role:
75
76
  - admin
76
77
  - owner
@@ -82,6 +83,7 @@ navigation:
82
83
  link: /customer
83
84
  section:
84
85
  - dashboard
86
+ - sessionManager
85
87
  role:
86
88
  - owner
87
89
  - admin
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payment-kit",
3
- "version": "1.13.16",
3
+ "version": "1.13.17",
4
4
  "scripts": {
5
5
  "dev": "blocklet dev",
6
6
  "eject": "vite eject",
@@ -93,7 +93,7 @@
93
93
  "devDependencies": {
94
94
  "@arcblock/eslint-config": "^0.2.4",
95
95
  "@arcblock/eslint-config-ts": "^0.2.4",
96
- "@did-pay/types": "1.13.16",
96
+ "@did-pay/types": "1.13.17",
97
97
  "@types/cookie-parser": "^1.4.3",
98
98
  "@types/cors": "^2.8.13",
99
99
  "@types/dotenv-flow": "^3.2.0",
@@ -130,5 +130,5 @@
130
130
  "parser": "typescript"
131
131
  }
132
132
  },
133
- "gitHead": "c373817d035b5af72e98e333f36922c296be0ea6"
133
+ "gitHead": "edb5d7c50f0c1beab50a0fa99e0a85f3d028e150"
134
134
  }