@opengis/fastify-table 2.5.3 → 2.5.4

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.
@@ -12,7 +12,7 @@ export default async function getSelect(name, pg = pgClients.client, nocache = f
12
12
  return loadCls[name];
13
13
  }
14
14
  const clsDataGIT = await getTemplate(["cls", "select"], name);
15
- const { type } = pg.pk?.["admin.user_cls"]
15
+ const { type } = pg.pk?.["admin.user_cls"] && false
16
16
  ? await pg
17
17
  .query("select type from admin.user_cls where parent is null and name=$1 union all select type from admin.cls where parent is null and name=$1 limit 1", [name])
18
18
  .then((el) => el.rows?.[0] || {})
@@ -1,8 +1,8 @@
1
1
  import cronApi from "./controllers/cronApi.js";
2
2
  const cronSchema = {
3
- type: "object",
4
- properties: {
5
- params: {
3
+ params: {
4
+ type: "object",
5
+ properties: {
6
6
  name: { type: "string", pattern: "^([\\d\\w._-]+)$" },
7
7
  },
8
8
  },
@@ -3,9 +3,9 @@ import insert from "./controllers/insert.js";
3
3
  import deleteCrud from "./controllers/deleteCrud.js";
4
4
  import table from "./controllers/table.js";
5
5
  const tableSchema = {
6
- type: "object",
7
- properties: {
8
- params: {
6
+ params: {
7
+ type: "object",
8
+ properties: {
9
9
  id: { type: "string", pattern: "^([\\w\\d_.]+)$" },
10
10
  table: { type: "string", pattern: "^([\\w\\d_.]+)$" },
11
11
  },
@@ -2,9 +2,9 @@ import getAppSettings from "./controllers/properties.get.js";
2
2
  import postAppSettings from "./controllers/properties.post.js";
3
3
  const tags = ["core", "properties"];
4
4
  const propertiesSchema = {
5
- type: "object",
6
- properties: {
7
- params: {
5
+ params: {
6
+ type: "object",
7
+ properties: {
8
8
  entity: { type: "string", pattern: "^([\\d\\w]+)$" },
9
9
  },
10
10
  },
@@ -38,7 +38,10 @@ declare const tableDataSchema: {
38
38
  type: string;
39
39
  };
40
40
  };
41
- params: {
41
+ };
42
+ params: {
43
+ type: string;
44
+ properties: {
42
45
  id: {
43
46
  type: string;
44
47
  pattern: string;
@@ -51,9 +54,9 @@ declare const tableDataSchema: {
51
54
  };
52
55
  };
53
56
  declare const tableSchema: {
54
- type: string;
55
- properties: {
56
- querystring: {
57
+ querystring: {
58
+ type: string;
59
+ properties: {
57
60
  limit: {
58
61
  type: string;
59
62
  minimum: number;
@@ -86,7 +89,10 @@ declare const tableSchema: {
86
89
  type: string;
87
90
  };
88
91
  };
89
- params: {
92
+ };
93
+ params: {
94
+ type: string;
95
+ properties: {
90
96
  id: {
91
97
  type: string;
92
98
  pattern: string;
@@ -99,9 +105,9 @@ declare const tableSchema: {
99
105
  };
100
106
  };
101
107
  declare const searchSchema: {
102
- type: string;
103
- properties: {
104
- querystring: {
108
+ querystring: {
109
+ type: string;
110
+ properties: {
105
111
  page: {
106
112
  type: string;
107
113
  minimum: number;
@@ -134,9 +140,9 @@ declare const searchSchema: {
134
140
  };
135
141
  };
136
142
  declare const suggestSchema: {
137
- type: string;
138
- properties: {
139
- querystring: {
143
+ querystring: {
144
+ type: string;
145
+ properties: {
140
146
  lang: {
141
147
  type: string;
142
148
  pattern: string;
@@ -164,13 +170,16 @@ declare const suggestSchema: {
164
170
  type: string;
165
171
  };
166
172
  };
167
- params: {};
173
+ };
174
+ params: {
175
+ type: string;
176
+ properties: {};
168
177
  };
169
178
  };
170
179
  declare const formSchema: {
171
- type: string;
172
- properties: {
173
- params: {
180
+ params: {
181
+ type: string;
182
+ properties: {
174
183
  name: {
175
184
  type: string;
176
185
  pattern: string;
@@ -183,9 +192,9 @@ declare const formSchema: {
183
192
  };
184
193
  };
185
194
  declare const filterSchema: {
186
- type: string;
187
- properties: {
188
- params: {
195
+ params: {
196
+ type: string;
197
+ properties: {
189
198
  table: {
190
199
  type: string;
191
200
  pattern: string;
@@ -194,15 +203,18 @@ declare const filterSchema: {
194
203
  };
195
204
  };
196
205
  declare const cardTabDataSchema: {
197
- type: string;
198
- properties: {
199
- querystring: {
206
+ querystring: {
207
+ type: string;
208
+ properties: {
200
209
  sql: {
201
210
  type: string;
202
211
  pattern: string;
203
212
  };
204
213
  };
205
- params: {
214
+ };
215
+ params: {
216
+ type: string;
217
+ properties: {
206
218
  token: {
207
219
  type: string;
208
220
  pattern: string;
@@ -211,9 +223,9 @@ declare const cardTabDataSchema: {
211
223
  };
212
224
  };
213
225
  declare const tableDataIdSchema: {
214
- type: string;
215
- properties: {
216
- params: {
226
+ params: {
227
+ type: string;
228
+ properties: {
217
229
  id: {
218
230
  type: string;
219
231
  pattern: string;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../server/routes/table/schema.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsBpB,CAAC;AAEF,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuBhB,CAAC;AAEF,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAajB,CAAC;AAEF,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiBlB,CAAC;AAEF,QAAA,MAAM,UAAU;;;;;;;;;;;;;;CAQf,CAAC;AAEF,QAAA,MAAM,YAAY;;;;;;;;;;CAOjB,CAAC;AAEF,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;CAUtB,CAAC;AAEF,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;CAQtB,CAAC;AAEF,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,UAAU,EACV,YAAY,EACZ,iBAAiB,GAClB,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../server/routes/table/schema.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyBpB,CAAC;AAEF,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BhB,CAAC;AAEF,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAajB,CAAC;AAEF,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoBlB,CAAC;AAEF,QAAA,MAAM,UAAU;;;;;;;;;;;;;;CAQf,CAAC;AAEF,QAAA,MAAM,YAAY;;;;;;;;;;CAOjB,CAAC;AAEF,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;CAatB,CAAC;AAEF,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;CAQtB,CAAC;AAEF,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,UAAU,EACV,YAAY,EACZ,iBAAiB,GAClB,CAAC"}
@@ -15,16 +15,19 @@ const tableDataSchema = {
15
15
  // key: { type: 'string', pattern: '^([\\d\\w_]+)$' },
16
16
  sql: { type: "number" },
17
17
  },
18
- params: {
18
+ },
19
+ params: {
20
+ type: "object",
21
+ properties: {
19
22
  id: { type: "string", pattern: "^([\\d\\w_.-]+)$" },
20
23
  table: { type: "string", pattern: "^([\\d\\w_.-]+)$" },
21
24
  },
22
25
  },
23
26
  };
24
27
  const tableSchema = {
25
- type: "object",
26
- properties: {
27
- querystring: {
28
+ querystring: {
29
+ type: "object",
30
+ properties: {
28
31
  limit: { type: "number", minimum: 1 },
29
32
  page: { type: "number", minimum: 1 },
30
33
  // filter: { type: 'string', pattern: '^([\\w\\d_-]+)=([А-Яа-яҐґЄєІіЇї\\d\\w\\s\\/\\[\\]\\(\\)\\{\\}\\|,.!?;:—_=-@%#$&^*+=`~]+)$' },
@@ -39,16 +42,19 @@ const tableSchema = {
39
42
  uid: { type: "string", pattern: "^([\\d\\w_.-]+)$" },
40
43
  sql: { type: "number" },
41
44
  },
42
- params: {
45
+ },
46
+ params: {
47
+ type: "object",
48
+ properties: {
43
49
  id: { type: "string", pattern: "^([\\d\\w]+)$" },
44
50
  table: { type: "string", pattern: "^([\\d\\w_.-]+)$" },
45
51
  },
46
52
  },
47
53
  };
48
54
  const searchSchema = {
49
- type: "object",
50
- properties: {
51
- querystring: {
55
+ querystring: {
56
+ type: "object",
57
+ properties: {
52
58
  page: { type: "number", minimum: 1 },
53
59
  limit: { type: "number", minimum: 1 },
54
60
  order: { type: "string", pattern: "^([\\d\\w_.-]+)$" },
@@ -60,9 +66,9 @@ const searchSchema = {
60
66
  },
61
67
  };
62
68
  const suggestSchema = {
63
- type: "object",
64
- properties: {
65
- querystring: {
69
+ querystring: {
70
+ type: "object",
71
+ properties: {
66
72
  lang: { type: "string", pattern: "^([\\w]+)$" },
67
73
  parent: { type: "string", pattern: "^([\\d\\w_.-]+)$" },
68
74
  sel: { type: "string", pattern: "^([\\d\\w_.-]+)$" },
@@ -72,43 +78,49 @@ const suggestSchema = {
72
78
  sql: { type: "number" },
73
79
  count: { type: "number" },
74
80
  },
75
- params: {
81
+ },
82
+ params: {
83
+ type: "object",
84
+ properties: {
76
85
  // data: { type: 'string', pattern: '^([\\d\\w]+)$' },
77
- },
86
+ }
78
87
  },
79
88
  };
80
89
  const formSchema = {
81
- type: "object",
82
- properties: {
83
- params: {
90
+ params: {
91
+ type: "object",
92
+ properties: {
84
93
  name: { type: "string", pattern: "^([\\d\\w_.-]+)$" },
85
94
  id: { type: "string", pattern: "^([\\d\\w_.-]+)$" },
86
95
  },
87
96
  },
88
97
  };
89
98
  const filterSchema = {
90
- type: "object",
91
- properties: {
92
- params: {
99
+ params: {
100
+ type: "object",
101
+ properties: {
93
102
  table: { type: "string", pattern: "^([\\d\\w_.-]+)$" },
94
103
  },
95
104
  },
96
105
  };
97
106
  const cardTabDataSchema = {
98
- type: "object",
99
- properties: {
100
- querystring: {
107
+ querystring: {
108
+ type: "object",
109
+ properties: {
101
110
  sql: { type: "string", pattern: "^(\\d)$" },
102
111
  },
103
- params: {
112
+ },
113
+ params: {
114
+ type: "object",
115
+ properties: {
104
116
  token: { type: "string", pattern: "^([\\d\\w]+)$" },
105
117
  },
106
- },
118
+ }
107
119
  };
108
120
  const tableDataIdSchema = {
109
- type: "object",
110
- properties: {
111
- params: {
121
+ params: {
122
+ type: "object",
123
+ properties: {
112
124
  id: { type: "string", pattern: "^([\\d\\w_.-]+)$" },
113
125
  name: { type: "string", pattern: "^([\\d\\w._-]+)$" },
114
126
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/fastify-table",
3
- "version": "2.5.3",
3
+ "version": "2.5.4",
4
4
  "type": "module",
5
5
  "description": "core-plugins",
6
6
  "keywords": [