payment-kit 1.13.16 → 1.13.18
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/api/src/routes/products.ts +11 -1
- package/blocklet.yml +3 -1
- package/package.json +28 -28
|
@@ -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
|
|
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.
|
|
17
|
+
version: 1.13.18
|
|
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.
|
|
3
|
+
"version": "1.13.18",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "blocklet dev",
|
|
6
6
|
"eject": "vite eject",
|
|
@@ -42,18 +42,18 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@arcblock/did": "^1.18.92",
|
|
44
44
|
"@arcblock/did-auth-storage-nedb": "^1.7.1",
|
|
45
|
-
"@arcblock/did-connect": "^2.7.
|
|
45
|
+
"@arcblock/did-connect": "^2.7.28",
|
|
46
46
|
"@arcblock/did-util": "^1.18.92",
|
|
47
|
-
"@arcblock/ux": "^2.7.
|
|
47
|
+
"@arcblock/ux": "^2.7.28",
|
|
48
48
|
"@blocklet/logger": "^1.16.16",
|
|
49
49
|
"@blocklet/sdk": "^1.16.16",
|
|
50
|
-
"@blocklet/ui-react": "^2.7.
|
|
50
|
+
"@blocklet/ui-react": "^2.7.28",
|
|
51
51
|
"@blocklet/uploader": "^0.0.26",
|
|
52
|
-
"@mui/icons-material": "^5.14.
|
|
53
|
-
"@mui/lab": "^5.0.0-alpha.
|
|
54
|
-
"@mui/material": "^5.14.
|
|
55
|
-
"@mui/styles": "^5.14.
|
|
56
|
-
"@mui/system": "^5.14.
|
|
52
|
+
"@mui/icons-material": "^5.14.13",
|
|
53
|
+
"@mui/lab": "^5.0.0-alpha.148",
|
|
54
|
+
"@mui/material": "^5.14.13",
|
|
55
|
+
"@mui/styles": "^5.14.13",
|
|
56
|
+
"@mui/system": "^5.14.13",
|
|
57
57
|
"@ocap/client": "^1.18.92",
|
|
58
58
|
"@ocap/mcrypto": "^1.18.92",
|
|
59
59
|
"@ocap/util": "^1.18.92",
|
|
@@ -62,49 +62,49 @@
|
|
|
62
62
|
"axios": "^0.27.2",
|
|
63
63
|
"cookie-parser": "^1.4.6",
|
|
64
64
|
"cors": "^2.8.5",
|
|
65
|
-
"dayjs": "^1.11.
|
|
66
|
-
"dotenv-flow": "^3.
|
|
65
|
+
"dayjs": "^1.11.10",
|
|
66
|
+
"dotenv-flow": "^3.3.0",
|
|
67
67
|
"express": "^4.18.2",
|
|
68
68
|
"express-async-errors": "^3.1.1",
|
|
69
69
|
"express-history-api-fallback": "^2.2.1",
|
|
70
70
|
"fastq": "^1.15.0",
|
|
71
71
|
"flat": "^5.0.2",
|
|
72
72
|
"iframe-resizer-react": "^1.1.0",
|
|
73
|
-
"joi": "^17.
|
|
73
|
+
"joi": "^17.11.0",
|
|
74
74
|
"json-stable-stringify": "^1.0.2",
|
|
75
75
|
"lodash": "^4.17.21",
|
|
76
76
|
"morgan": "^1.10.0",
|
|
77
|
-
"nanoid": "3",
|
|
77
|
+
"nanoid": "3.3.6",
|
|
78
78
|
"p-wait-for": "^5.0.2",
|
|
79
79
|
"pretty-ms-i18n": "^1.0.3",
|
|
80
80
|
"react": "^18.2.0",
|
|
81
81
|
"react-dom": "^18.2.0",
|
|
82
82
|
"react-error-boundary": "^4.0.11",
|
|
83
|
-
"react-hook-form": "^7.
|
|
84
|
-
"react-router-dom": "^6.
|
|
83
|
+
"react-hook-form": "^7.47.0",
|
|
84
|
+
"react-router-dom": "^6.16.0",
|
|
85
85
|
"rimraf": "^3.0.2",
|
|
86
86
|
"sequelize": "^6.33.0",
|
|
87
87
|
"sqlite3": "^5.1.6",
|
|
88
88
|
"typewriter-effect": "^2.21.0",
|
|
89
|
-
"ufo": "^1.3.
|
|
89
|
+
"ufo": "^1.3.1",
|
|
90
90
|
"umzug": "^3.3.1",
|
|
91
91
|
"use-bus": "^2.5.2"
|
|
92
92
|
},
|
|
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.
|
|
97
|
-
"@types/cookie-parser": "^1.4.
|
|
98
|
-
"@types/cors": "^2.8.
|
|
99
|
-
"@types/dotenv-flow": "^3.
|
|
100
|
-
"@types/express": "^4.17.
|
|
101
|
-
"@types/node": "^18.
|
|
102
|
-
"@types/react": "^18.2.
|
|
103
|
-
"@types/react-dom": "^18.2.
|
|
96
|
+
"@did-pay/types": "1.13.18",
|
|
97
|
+
"@types/cookie-parser": "^1.4.4",
|
|
98
|
+
"@types/cors": "^2.8.14",
|
|
99
|
+
"@types/dotenv-flow": "^3.3.1",
|
|
100
|
+
"@types/express": "^4.17.19",
|
|
101
|
+
"@types/node": "^18.18.5",
|
|
102
|
+
"@types/react": "^18.2.28",
|
|
103
|
+
"@types/react-dom": "^18.2.13",
|
|
104
104
|
"@vitejs/plugin-react": "^2.2.0",
|
|
105
105
|
"bumpp": "^8.2.1",
|
|
106
106
|
"cross-env": "^7.0.3",
|
|
107
|
-
"eslint": "^8.
|
|
107
|
+
"eslint": "^8.51.0",
|
|
108
108
|
"import-sort-style-module": "^6.0.0",
|
|
109
109
|
"lint-staged": "^12.5.0",
|
|
110
110
|
"nodemon": "^2.0.22",
|
|
@@ -112,9 +112,9 @@
|
|
|
112
112
|
"prettier": "^2.8.8",
|
|
113
113
|
"prettier-plugin-import-sort": "^0.0.7",
|
|
114
114
|
"ts-node": "^10.9.1",
|
|
115
|
-
"type-fest": "^4.
|
|
115
|
+
"type-fest": "^4.4.0",
|
|
116
116
|
"typescript": "^4.9.5",
|
|
117
|
-
"vite": "^4.4.
|
|
117
|
+
"vite": "^4.4.11",
|
|
118
118
|
"vite-plugin-blocklet": "^0.6.15",
|
|
119
119
|
"vite-plugin-node-polyfills": "^0.7.0",
|
|
120
120
|
"vite-plugin-svgr": "^2.4.0",
|
|
@@ -130,5 +130,5 @@
|
|
|
130
130
|
"parser": "typescript"
|
|
131
131
|
}
|
|
132
132
|
},
|
|
133
|
-
"gitHead": "
|
|
133
|
+
"gitHead": "0ead128fae75087e5d817d6315b94c3378d7e5e9"
|
|
134
134
|
}
|