@storecraft/database-sql-base 1.0.11 → 1.0.12
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/index.js +23 -25
- package/migrations.mysql/00002_seed_email_templates.js +1 -0
- package/migrations.postgres/00002_seed_email_templates.js +1 -0
- package/migrations.shared/00002_seed_email_templates.js +27 -0
- package/migrations.sqlite/00002_seed_email_templates.js +1 -0
- package/package.json +1 -1
- package/src/con.auth_users.js +5 -5
- package/src/con.collections.js +3 -3
- package/src/con.customers.js +3 -3
- package/src/con.discounts.js +3 -3
- package/src/con.discounts.utils.js +22 -14
- package/src/con.images.js +7 -5
- package/src/con.notifications.js +3 -3
- package/src/con.orders.js +4 -3
- package/src/con.posts.js +4 -3
- package/src/con.products.js +8 -7
- package/src/con.search.js +9 -10
- package/src/con.shared.js +37 -36
- package/src/con.shipping.js +8 -8
- package/src/con.storefronts.js +3 -3
- package/src/con.tags.js +13 -4
- package/src/con.templates.js +16 -6
- package/src/kysely.sanitize.plugin.js +10 -8
- package/src/utils.funcs.js +5 -1
- package/src/utils.query.js +13 -10
- package/types.public.d.ts +2 -2
- package/migrations.mssql/00000_init_tables.js +0 -268
- package/migrations.shared/00001_seed_email_templates copy.js +0 -262
- package/tests/runner.mssql-local.test.js +0 -122
package/index.js
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
/**
|
2
|
+
* @import { db_driver } from '@storecraft/core/database'
|
3
|
+
* @import { Database } from './types.sql.tables.js'
|
4
|
+
* @import { Config } from './types.public.js'
|
5
|
+
* @import { Dialect } from 'kysely'
|
6
|
+
*/
|
7
|
+
|
1
8
|
import { App } from '@storecraft/core';
|
2
9
|
import { impl as auth_users } from './src/con.auth_users.js';
|
3
10
|
import { impl as collections } from './src/con.collections.js';
|
@@ -25,15 +32,10 @@ const assert = (b, msg) => {
|
|
25
32
|
if(!Boolean(b)) throw new Error(msg);
|
26
33
|
}
|
27
34
|
|
28
|
-
/**
|
29
|
-
* @typedef {import('./types.public.d.ts').Config} Config
|
30
|
-
* @typedef {import('./types.sql.tables.d.ts').Database} Database
|
31
|
-
* @typedef {import('kysely').Dialect} Dialect
|
32
|
-
* @typedef {import('@storecraft/core/database').db_driver} db_driver
|
33
|
-
*/
|
34
35
|
|
35
36
|
/**
|
36
|
-
* @
|
37
|
+
* @template {Config} [ConfigType=Config]
|
38
|
+
* @implements {db_driver<ConfigType>}
|
37
39
|
*/
|
38
40
|
export class SQL {
|
39
41
|
|
@@ -43,7 +45,7 @@ export class SQL {
|
|
43
45
|
/** @type {App<any, any, any>} */
|
44
46
|
#_app;
|
45
47
|
|
46
|
-
/** @type {
|
48
|
+
/** @type {ConfigType} */
|
47
49
|
#_config;
|
48
50
|
|
49
51
|
/** @type {Kysely<Database>} */
|
@@ -54,7 +56,7 @@ export class SQL {
|
|
54
56
|
|
55
57
|
/**
|
56
58
|
*
|
57
|
-
* @param {
|
59
|
+
* @param {ConfigType} [config] config
|
58
60
|
*/
|
59
61
|
constructor(config) {
|
60
62
|
this.#_is_ready = false;
|
@@ -69,16 +71,6 @@ export class SQL {
|
|
69
71
|
this.#_config.dialect_type,
|
70
72
|
'No Dialect Type specified !'
|
71
73
|
);
|
72
|
-
|
73
|
-
this.#_client = new Kysely(
|
74
|
-
{
|
75
|
-
dialect: this.#_config.dialect,
|
76
|
-
plugins: [
|
77
|
-
new ParseJSONResultsPlugin(),
|
78
|
-
new SanitizePlugin()
|
79
|
-
]
|
80
|
-
}
|
81
|
-
);
|
82
74
|
}
|
83
75
|
|
84
76
|
throwIfNotReady() {
|
@@ -89,13 +81,9 @@ export class SQL {
|
|
89
81
|
}
|
90
82
|
|
91
83
|
/**
|
92
|
-
*
|
93
|
-
* @param {App<any, any, any>} app
|
94
|
-
*
|
95
|
-
*
|
96
|
-
* @returns {Promise<this>}
|
84
|
+
* @type {db_driver["init"]}
|
97
85
|
*/
|
98
|
-
|
86
|
+
init(app) {
|
99
87
|
if(this.isReady)
|
100
88
|
return this;
|
101
89
|
|
@@ -144,6 +132,16 @@ export class SQL {
|
|
144
132
|
}
|
145
133
|
|
146
134
|
get client() {
|
135
|
+
this.#_client = this.#_client ?? new Kysely(
|
136
|
+
{
|
137
|
+
dialect: this.config.dialect,
|
138
|
+
plugins: [
|
139
|
+
new ParseJSONResultsPlugin(),
|
140
|
+
new SanitizePlugin()
|
141
|
+
]
|
142
|
+
}
|
143
|
+
);
|
144
|
+
|
147
145
|
return this.#_client;
|
148
146
|
}
|
149
147
|
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from '../migrations.shared/00002_seed_email_templates.js'
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from '../migrations.shared/00002_seed_email_templates.js'
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { Kysely } from 'kysely'
|
2
|
+
import { upsert } from '../src/con.templates.js'
|
3
|
+
import { templates } from '@storecraft/core/assets/seed-templates-v2.js';
|
4
|
+
|
5
|
+
/**
|
6
|
+
* @typedef {import('../types.sql.tables.js').Database} Database
|
7
|
+
*/
|
8
|
+
|
9
|
+
/**
|
10
|
+
*
|
11
|
+
* @param {Kysely<Database>} db
|
12
|
+
*/
|
13
|
+
export async function up(db) {
|
14
|
+
|
15
|
+
for (const template of templates.slice(0)) {
|
16
|
+
const result = await upsert(db)(template, template.search);
|
17
|
+
if(!result)
|
18
|
+
throw new Error('Failed to write a template object')
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
/**
|
23
|
+
*
|
24
|
+
* @param {Kysely<Database>} db
|
25
|
+
*/
|
26
|
+
export async function down(db) {
|
27
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from '../migrations.shared/00002_seed_email_templates.js'
|
package/package.json
CHANGED
package/src/con.auth_users.js
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
+
/**
|
2
|
+
* @import { db_auth_users as db_col } from '@storecraft/core/database'
|
3
|
+
*/
|
1
4
|
import { SQL } from '../index.js'
|
2
5
|
import { sanitize, sanitize_array } from './utils.funcs.js'
|
3
6
|
import {
|
4
|
-
count_regular, delete_me, insert_search_of, insert_tags_of,
|
5
|
-
where_id_or_handle_table, with_media, with_tags
|
7
|
+
count_regular, delete_me, insert_search_of, insert_tags_of,
|
8
|
+
regular_upsert_me, where_id_or_handle_table, with_media, with_tags
|
6
9
|
} from './con.shared.js'
|
7
10
|
import { query_to_eb, query_to_sort } from './utils.query.js';
|
8
11
|
|
9
|
-
/**
|
10
|
-
* @typedef {import('@storecraft/core/database').db_auth_users} db_col
|
11
|
-
*/
|
12
12
|
|
13
13
|
export const table_name = 'auth_users';
|
14
14
|
|
package/src/con.collections.js
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
/**
|
2
|
+
* @import { db_collections as db_col } from '@storecraft/core/database'
|
3
|
+
*/
|
1
4
|
import { SQL } from '../index.js'
|
2
5
|
import { report_document_media } from './con.images.js'
|
3
6
|
import { delete_entity_values_by_value_or_reporter, delete_me,
|
@@ -12,9 +15,6 @@ import { sanitize, sanitize_array } from './utils.funcs.js'
|
|
12
15
|
import { query_to_eb, query_to_sort } from './utils.query.js'
|
13
16
|
|
14
17
|
|
15
|
-
/**
|
16
|
-
* @typedef {import('@storecraft/core/database').db_collections} db_col
|
17
|
-
*/
|
18
18
|
export const table_name = 'collections'
|
19
19
|
|
20
20
|
/**
|
package/src/con.customers.js
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
/**
|
2
|
+
* @import { db_customers as db_col } from '@storecraft/core/database'
|
3
|
+
*/
|
1
4
|
import { SQL } from '../index.js'
|
2
5
|
import { report_document_media } from './con.images.js'
|
3
6
|
import { count_regular, delete_me, delete_media_of, delete_search_of,
|
@@ -7,9 +10,6 @@ import { count_regular, delete_me, delete_media_of, delete_search_of,
|
|
7
10
|
import { sanitize, sanitize_array } from './utils.funcs.js'
|
8
11
|
import { query_to_eb, query_to_sort } from './utils.query.js'
|
9
12
|
|
10
|
-
/**
|
11
|
-
* @typedef {import('@storecraft/core/database').db_customers} db_col
|
12
|
-
*/
|
13
13
|
export const table_name = 'customers'
|
14
14
|
|
15
15
|
/**
|
package/src/con.discounts.js
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
/**
|
2
|
+
* @import { db_discounts as db_col } from '@storecraft/core/database'
|
3
|
+
*/
|
1
4
|
import { enums } from '@storecraft/core/api'
|
2
5
|
import { SQL } from '../index.js'
|
3
6
|
import { discount_to_conjunctions } from './con.discounts.utils.js'
|
@@ -12,9 +15,6 @@ import { sanitize, sanitize_array } from './utils.funcs.js'
|
|
12
15
|
import { query_to_eb, query_to_sort } from './utils.query.js'
|
13
16
|
import { report_document_media } from './con.images.js'
|
14
17
|
|
15
|
-
/**
|
16
|
-
* @typedef {import('@storecraft/core/database').db_discounts} db_col
|
17
|
-
*/
|
18
18
|
export const table_name = 'discounts'
|
19
19
|
|
20
20
|
/**
|
@@ -1,11 +1,20 @@
|
|
1
|
+
/**
|
2
|
+
* @import {
|
3
|
+
* DiscountType, FilterValue_p_in_price_range, FilterValue_p_not_in_collections,
|
4
|
+
* FilterValue_p_in_collections, FilterValue_p_not_in_tags, FilterValue_p_in_tags,
|
5
|
+
* FilterValue_p_in_products, FilterValue_p_not_in_products
|
6
|
+
* } from '@storecraft/core/api'
|
7
|
+
* @import { Database } from '../types.sql.tables.js'
|
8
|
+
* @import { ExpressionBuilder, BinaryOperator } from 'kysely'
|
9
|
+
*/
|
1
10
|
import { enums } from "@storecraft/core/api";
|
2
11
|
|
3
|
-
/** @param {
|
12
|
+
/** @param {DiscountType} d */
|
4
13
|
const is_order_discount = d => {
|
5
14
|
return (d.info.details.meta.id===enums.DiscountMetaEnum.order.id);
|
6
15
|
}
|
7
16
|
|
8
|
-
/** @param {
|
17
|
+
/** @param {DiscountType} d */
|
9
18
|
const is_automatic_discount = d => {
|
10
19
|
return (d.application.id===enums.DiscountApplicationEnum.Auto.id);
|
11
20
|
}
|
@@ -14,10 +23,9 @@ const extract_abs_number = v => {
|
|
14
23
|
return v && !isNaN(v) && v!==Infinity && Math.abs(v);
|
15
24
|
}
|
16
25
|
/**
|
17
|
-
* @
|
18
|
-
* @param {import("kysely").ExpressionBuilder<Database, 'products'>} eb
|
26
|
+
* @param {ExpressionBuilder<Database, 'products'>} eb
|
19
27
|
* @param {keyof Pick<Database, 'entity_to_tags_projections' | 'products_to_collections'>} table
|
20
|
-
* @param {
|
28
|
+
* @param {BinaryOperator} op
|
21
29
|
* @param {string[]} value
|
22
30
|
*/
|
23
31
|
const eb_in = (eb, table, op, value) => {
|
@@ -42,8 +50,8 @@ const eb_in = (eb, table, op, value) => {
|
|
42
50
|
/**
|
43
51
|
* create a mongodb conjunctions clauses from discount, intended
|
44
52
|
* for filtering.
|
45
|
-
* @param {
|
46
|
-
* @param {
|
53
|
+
* @param {ExpressionBuilder<Database, 'products'>} eb
|
54
|
+
* @param {DiscountType} d
|
47
55
|
*/
|
48
56
|
export const discount_to_conjunctions = (eb, d) => {
|
49
57
|
// discount has to be product discount + automatic + active + has filters
|
@@ -67,7 +75,7 @@ export const discount_to_conjunctions = (eb, d) => {
|
|
67
75
|
case enums.FilterMetaEnum.p_in_products.op:
|
68
76
|
{
|
69
77
|
|
70
|
-
const cast = /** @type {
|
78
|
+
const cast = /** @type {FilterValue_p_in_products} */ (
|
71
79
|
Array.isArray(filter?.value) ? filter.value : []
|
72
80
|
);
|
73
81
|
|
@@ -82,7 +90,7 @@ export const discount_to_conjunctions = (eb, d) => {
|
|
82
90
|
case enums.FilterMetaEnum.p_not_in_products.op:
|
83
91
|
{
|
84
92
|
|
85
|
-
const cast = /** @type {
|
93
|
+
const cast = /** @type {FilterValue_p_not_in_products} */ (
|
86
94
|
Array.isArray(filter?.value) ? filter.value : []
|
87
95
|
);
|
88
96
|
|
@@ -97,7 +105,7 @@ export const discount_to_conjunctions = (eb, d) => {
|
|
97
105
|
case enums.FilterMetaEnum.p_in_tags.op:
|
98
106
|
{
|
99
107
|
|
100
|
-
const cast = /** @type {
|
108
|
+
const cast = /** @type {FilterValue_p_in_tags} */(
|
101
109
|
Array.isArray(filter?.value) ? filter.value : []
|
102
110
|
);
|
103
111
|
|
@@ -111,7 +119,7 @@ export const discount_to_conjunctions = (eb, d) => {
|
|
111
119
|
break;
|
112
120
|
case enums.FilterMetaEnum.p_not_in_tags.op:
|
113
121
|
{
|
114
|
-
const cast = /** @type {
|
122
|
+
const cast = /** @type {FilterValue_p_not_in_tags} */ (
|
115
123
|
Array.isArray(filter?.value) ? filter.value : []
|
116
124
|
);
|
117
125
|
|
@@ -127,7 +135,7 @@ export const discount_to_conjunctions = (eb, d) => {
|
|
127
135
|
break;
|
128
136
|
case enums.FilterMetaEnum.p_in_collections.op:
|
129
137
|
{
|
130
|
-
const cast = /** @type {
|
138
|
+
const cast = /** @type {FilterValue_p_in_collections} */ (
|
131
139
|
Array.isArray(filter?.value) ? filter.value : []
|
132
140
|
);
|
133
141
|
|
@@ -142,7 +150,7 @@ export const discount_to_conjunctions = (eb, d) => {
|
|
142
150
|
break;
|
143
151
|
case enums.FilterMetaEnum.p_not_in_collections.op:
|
144
152
|
{
|
145
|
-
const cast = /** @type {
|
153
|
+
const cast = /** @type {FilterValue_p_not_in_collections} */ (
|
146
154
|
Array.isArray(filter?.value) ? filter.value : []
|
147
155
|
);
|
148
156
|
|
@@ -158,7 +166,7 @@ export const discount_to_conjunctions = (eb, d) => {
|
|
158
166
|
break;
|
159
167
|
case enums.FilterMetaEnum.p_in_price_range.op:
|
160
168
|
{
|
161
|
-
const cast = /** @type {
|
169
|
+
const cast = /** @type {FilterValue_p_in_price_range} */ (
|
162
170
|
{
|
163
171
|
from: 0,
|
164
172
|
to: Number.POSITIVE_INFINITY,
|
package/src/con.images.js
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
/**
|
2
|
+
* @import { db_images as db_col } from '@storecraft/core/database'
|
3
|
+
* @import { Database } from '../types.sql.tables.js'
|
4
|
+
*/
|
5
|
+
|
1
6
|
import { func } from '@storecraft/core/api'
|
2
7
|
import { SQL } from '../index.js'
|
3
8
|
import { count_regular, delete_me, delete_search_of,
|
@@ -11,9 +16,6 @@ import {
|
|
11
16
|
image_url_to_handle, image_url_to_name
|
12
17
|
} from '@storecraft/core/api/con.images.logic.js'
|
13
18
|
|
14
|
-
/**
|
15
|
-
* @typedef {import('@storecraft/core/database').db_images} db_col
|
16
|
-
*/
|
17
19
|
export const table_name = 'images'
|
18
20
|
|
19
21
|
/**
|
@@ -106,7 +108,7 @@ const remove = (driver) => {
|
|
106
108
|
*/
|
107
109
|
export const report_document_media = (driver) => {
|
108
110
|
/**
|
109
|
-
* @param {Transaction<
|
111
|
+
* @param {Transaction<Database>} [transaction]
|
110
112
|
*/
|
111
113
|
return async (item, transaction) => {
|
112
114
|
if(!(item?.media?.length))
|
@@ -114,7 +116,7 @@ export const report_document_media = (driver) => {
|
|
114
116
|
|
115
117
|
/**
|
116
118
|
*
|
117
|
-
* @param {Transaction<
|
119
|
+
* @param {Transaction<Database>} trx
|
118
120
|
*/
|
119
121
|
const doit = async (trx) => {
|
120
122
|
const dates = func.apply_dates({});
|
package/src/con.notifications.js
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
/**
|
2
|
+
* @import { db_notifications as db_col } from '@storecraft/core/database'
|
3
|
+
*/
|
1
4
|
import { SQL } from '../index.js'
|
2
5
|
import { count_regular, delete_me, delete_search_of,
|
3
6
|
insert_search_of, regular_upsert_me, where_id_or_handle_table,
|
@@ -5,9 +8,6 @@ import { count_regular, delete_me, delete_search_of,
|
|
5
8
|
import { sanitize_array } from './utils.funcs.js'
|
6
9
|
import { query_to_eb, query_to_sort } from './utils.query.js'
|
7
10
|
|
8
|
-
/**
|
9
|
-
* @typedef {import('@storecraft/core/database').db_notifications} db_col
|
10
|
-
*/
|
11
11
|
export const table_name = 'notifications'
|
12
12
|
|
13
13
|
/**
|
package/src/con.orders.js
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
/**
|
2
|
+
* @import { db_orders as db_col } from '@storecraft/core/database'
|
3
|
+
*/
|
4
|
+
|
1
5
|
import { SQL } from '../index.js'
|
2
6
|
import { report_document_media } from './con.images.js'
|
3
7
|
import { count_regular, delete_me, delete_media_of, delete_search_of,
|
@@ -7,9 +11,6 @@ import { count_regular, delete_me, delete_media_of, delete_search_of,
|
|
7
11
|
import { sanitize, sanitize_array } from './utils.funcs.js'
|
8
12
|
import { query_to_eb, query_to_sort } from './utils.query.js'
|
9
13
|
|
10
|
-
/**
|
11
|
-
* @typedef {import('@storecraft/core/database').db_orders} db_col
|
12
|
-
*/
|
13
14
|
export const table_name = 'orders'
|
14
15
|
|
15
16
|
/**
|
package/src/con.posts.js
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
/**
|
2
|
+
* @import { db_posts as db_col } from '@storecraft/core/database'
|
3
|
+
*/
|
4
|
+
|
1
5
|
import { SQL } from '../index.js'
|
2
6
|
import { stringArrayFrom } from './con.helpers.json.js'
|
3
7
|
import { report_document_media } from './con.images.js'
|
@@ -9,9 +13,6 @@ import { count_regular, delete_entity_values_by_value_or_reporter,
|
|
9
13
|
import { sanitize, sanitize_array } from './utils.funcs.js'
|
10
14
|
import { query_to_eb, query_to_sort } from './utils.query.js'
|
11
15
|
|
12
|
-
/**
|
13
|
-
* @typedef {import('@storecraft/core/database').db_posts} db_col
|
14
|
-
*/
|
15
16
|
export const table_name = 'posts'
|
16
17
|
|
17
18
|
/**
|
package/src/con.products.js
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
/**
|
2
|
+
* @import { ProductType, VariantType } from '@storecraft/core/api'
|
3
|
+
* @import { db_products as db_col } from '@storecraft/core/database'
|
4
|
+
* @import { Database } from '../types.sql.tables.js'
|
5
|
+
*/
|
6
|
+
|
1
7
|
import { enums } from '@storecraft/core/api'
|
2
8
|
import { SQL } from '../index.js'
|
3
9
|
import { delete_entity_values_of_by_entity_id_or_handle, delete_me, delete_media_of,
|
@@ -19,9 +25,6 @@ import { report_document_media } from './con.images.js'
|
|
19
25
|
import { union } from '@storecraft/core/api/utils.func.js'
|
20
26
|
|
21
27
|
|
22
|
-
/**
|
23
|
-
* @typedef {import('@storecraft/core/database').db_products} db_col
|
24
|
-
*/
|
25
28
|
export const table_name = 'products'
|
26
29
|
|
27
30
|
/**
|
@@ -263,10 +266,8 @@ const getBulk = (driver) => {
|
|
263
266
|
*/
|
264
267
|
const remove_internal = (driver) => {
|
265
268
|
/**
|
266
|
-
* @param {
|
267
|
-
*
|
268
|
-
* } product
|
269
|
-
* @param {Transaction<import('../index.js').Database>} trx
|
269
|
+
* @param {ProductType | VariantType} product
|
270
|
+
* @param {Transaction<Database>} trx
|
270
271
|
*/
|
271
272
|
return async (product, trx) => {
|
272
273
|
// entities
|
package/src/con.search.js
CHANGED
@@ -1,15 +1,14 @@
|
|
1
|
-
import { SQL } from '../index.js'
|
2
|
-
import { jsonArrayFrom } from './con.helpers.json.js';
|
3
|
-
import { query_to_eb, query_to_sort } from './utils.query.js';
|
4
|
-
|
5
1
|
/**
|
6
|
-
* @
|
2
|
+
* @import { QuickSearchResult } from '@storecraft/core/api'
|
3
|
+
* @import { search as db_col, db_driver } from '@storecraft/core/database'
|
7
4
|
*/
|
8
5
|
|
9
|
-
|
6
|
+
import { SQL } from '../index.js'
|
7
|
+
import { jsonArrayFrom } from './con.helpers.json.js';
|
8
|
+
import { query_to_eb, query_to_sort } from './utils.query.js';
|
10
9
|
|
11
10
|
/**
|
12
|
-
* @type {(keyof
|
11
|
+
* @type {(keyof db_driver["resources"])[]}
|
13
12
|
*/
|
14
13
|
const tables = [
|
15
14
|
'tags',
|
@@ -27,7 +26,7 @@ const tables = [
|
|
27
26
|
]
|
28
27
|
|
29
28
|
/**
|
30
|
-
* @type {Record<string, keyof
|
29
|
+
* @type {Record<string, keyof db_driver["resources"]>}
|
31
30
|
*/
|
32
31
|
const prefix_to_resource = {
|
33
32
|
'au': 'auth_users',
|
@@ -65,7 +64,7 @@ const resource_to_props = {
|
|
65
64
|
*
|
66
65
|
* @param {string} id
|
67
66
|
*
|
68
|
-
* @returns {keyof
|
67
|
+
* @returns {keyof db_driver["resources"]}
|
69
68
|
*/
|
70
69
|
export const id_to_resource = id => {
|
71
70
|
let result = undefined;
|
@@ -121,7 +120,7 @@ export const quicksearch = (driver) => {
|
|
121
120
|
)
|
122
121
|
|
123
122
|
|
124
|
-
const items = (/** @type {
|
123
|
+
const items = (/** @type {QuickSearchResult} */(
|
125
124
|
await sts.executeTakeFirst())
|
126
125
|
);
|
127
126
|
|