@proveanything/smartlinks 2.0.31 → 2.0.32
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/dist/api/appObjects.js +26 -11
- package/dist/docs/API_SUMMARY.md +1 -1
- package/dist/openapi.yaml +24 -0
- package/dist/types/appObjects.d.ts +12 -1
- package/docs/API_SUMMARY.md +1 -1
- package/openapi.yaml +24 -0
- package/package.json +1 -1
package/dist/api/appObjects.js
CHANGED
|
@@ -421,15 +421,30 @@ export var app;
|
|
|
421
421
|
* Build a query string from an object of parameters
|
|
422
422
|
*/
|
|
423
423
|
function buildQueryString(params) {
|
|
424
|
-
const
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
.
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
.
|
|
434
|
-
|
|
424
|
+
const parts = [];
|
|
425
|
+
const add = (key, value) => {
|
|
426
|
+
if (value === undefined || value === null)
|
|
427
|
+
return;
|
|
428
|
+
parts.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
|
|
429
|
+
};
|
|
430
|
+
for (const [key, value] of Object.entries(params)) {
|
|
431
|
+
if (value === undefined || value === null)
|
|
432
|
+
continue;
|
|
433
|
+
if (Array.isArray(value)) {
|
|
434
|
+
add(key, value.join(',')); // unchanged: top-level arrays are sent comma-joined
|
|
435
|
+
}
|
|
436
|
+
else if (typeof value === 'object' && !(value instanceof Date)) {
|
|
437
|
+
// Nested filter objects (e.g. dataFilter: { versionId: 'x', zone: 'in:a,b' }) → dataFilter[versionId]=x
|
|
438
|
+
for (const [sub, subValue] of Object.entries(value)) {
|
|
439
|
+
if (Array.isArray(subValue))
|
|
440
|
+
subValue.forEach((v) => add(`${key}[${sub}]`, v));
|
|
441
|
+
else
|
|
442
|
+
add(`${key}[${sub}]`, subValue);
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
else {
|
|
446
|
+
add(key, value instanceof Date ? value.toISOString() : value);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
return parts.length ? `?${parts.join('&')}` : '';
|
|
435
450
|
}
|
package/dist/docs/API_SUMMARY.md
CHANGED
package/dist/openapi.yaml
CHANGED
|
@@ -14509,6 +14509,21 @@ paths:
|
|
|
14509
14509
|
required: false
|
|
14510
14510
|
schema:
|
|
14511
14511
|
type: string
|
|
14512
|
+
- name: qFields
|
|
14513
|
+
in: query
|
|
14514
|
+
required: false
|
|
14515
|
+
schema:
|
|
14516
|
+
type: string
|
|
14517
|
+
- name: dataFilter
|
|
14518
|
+
in: query
|
|
14519
|
+
required: false
|
|
14520
|
+
schema:
|
|
14521
|
+
type: object
|
|
14522
|
+
additionalProperties:
|
|
14523
|
+
type: array
|
|
14524
|
+
items:
|
|
14525
|
+
type: object
|
|
14526
|
+
additionalProperties: true
|
|
14512
14527
|
- name: authorId
|
|
14513
14528
|
in: query
|
|
14514
14529
|
required: false
|
|
@@ -20052,6 +20067,15 @@ components:
|
|
|
20052
20067
|
type: string
|
|
20053
20068
|
q:
|
|
20054
20069
|
type: string
|
|
20070
|
+
qFields:
|
|
20071
|
+
type: string
|
|
20072
|
+
dataFilter:
|
|
20073
|
+
type: object
|
|
20074
|
+
additionalProperties:
|
|
20075
|
+
type: array
|
|
20076
|
+
items:
|
|
20077
|
+
type: object
|
|
20078
|
+
additionalProperties: true
|
|
20055
20079
|
authorId:
|
|
20056
20080
|
type: string
|
|
20057
20081
|
parentType:
|
|
@@ -620,8 +620,19 @@ export interface RecordListQueryParams extends ListQueryParams {
|
|
|
620
620
|
variantId?: string;
|
|
621
621
|
/** Filter by batchId (indexed flat column) */
|
|
622
622
|
batchId?: string;
|
|
623
|
-
/** Full-text filter on data.label (
|
|
623
|
+
/** Full-text filter (case-insensitive substring) on data.label — or on `qFields` (admin) */
|
|
624
624
|
q?: string;
|
|
625
|
+
/**
|
|
626
|
+
* Admin only: which top-level `data` keys `q` searches (comma-separated, max 5).
|
|
627
|
+
* Default `label`. Example: `'value,label'`.
|
|
628
|
+
*/
|
|
629
|
+
qFields?: string;
|
|
630
|
+
/**
|
|
631
|
+
* Admin only: filter on top-level `data` keys. Each value is an exact match, an
|
|
632
|
+
* `in:a,b,c` list, or an array of values (any match). Max 10 keys.
|
|
633
|
+
* Example: `{ versionId: 'v1', zone: 'in:on_pack,unclear' }`.
|
|
634
|
+
*/
|
|
635
|
+
dataFilter?: Record<string, string | string[]>;
|
|
625
636
|
authorId?: string;
|
|
626
637
|
parentType?: string;
|
|
627
638
|
parentId?: string;
|
package/docs/API_SUMMARY.md
CHANGED
package/openapi.yaml
CHANGED
|
@@ -14509,6 +14509,21 @@ paths:
|
|
|
14509
14509
|
required: false
|
|
14510
14510
|
schema:
|
|
14511
14511
|
type: string
|
|
14512
|
+
- name: qFields
|
|
14513
|
+
in: query
|
|
14514
|
+
required: false
|
|
14515
|
+
schema:
|
|
14516
|
+
type: string
|
|
14517
|
+
- name: dataFilter
|
|
14518
|
+
in: query
|
|
14519
|
+
required: false
|
|
14520
|
+
schema:
|
|
14521
|
+
type: object
|
|
14522
|
+
additionalProperties:
|
|
14523
|
+
type: array
|
|
14524
|
+
items:
|
|
14525
|
+
type: object
|
|
14526
|
+
additionalProperties: true
|
|
14512
14527
|
- name: authorId
|
|
14513
14528
|
in: query
|
|
14514
14529
|
required: false
|
|
@@ -20052,6 +20067,15 @@ components:
|
|
|
20052
20067
|
type: string
|
|
20053
20068
|
q:
|
|
20054
20069
|
type: string
|
|
20070
|
+
qFields:
|
|
20071
|
+
type: string
|
|
20072
|
+
dataFilter:
|
|
20073
|
+
type: object
|
|
20074
|
+
additionalProperties:
|
|
20075
|
+
type: array
|
|
20076
|
+
items:
|
|
20077
|
+
type: object
|
|
20078
|
+
additionalProperties: true
|
|
20055
20079
|
authorId:
|
|
20056
20080
|
type: string
|
|
20057
20081
|
parentType:
|