@xata.io/client 0.18.1 → 0.18.2
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/CHANGELOG.md +6 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +40 -2
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
@@ -478,6 +478,23 @@ declare type FuzzinessExpression = number;
|
|
478
478
|
* If the prefix type is set to "disabled" (the default), the search only matches full words. If the prefix type is set to "phrase", the search will return results that match prefixes of the search phrase.
|
479
479
|
*/
|
480
480
|
declare type PrefixExpression = 'phrase' | 'disabled';
|
481
|
+
/**
|
482
|
+
* The target expression is used to filter the search results by the target columns.
|
483
|
+
*/
|
484
|
+
declare type TargetExpression = (string | {
|
485
|
+
/**
|
486
|
+
* The name of the column.
|
487
|
+
*/
|
488
|
+
column: string;
|
489
|
+
/**
|
490
|
+
* The weight of the column.
|
491
|
+
*
|
492
|
+
* @default 1
|
493
|
+
* @maximum 10
|
494
|
+
* @minimum 1
|
495
|
+
*/
|
496
|
+
weight?: number;
|
497
|
+
})[];
|
481
498
|
/**
|
482
499
|
* @minProperties 1
|
483
500
|
*/
|
@@ -816,6 +833,7 @@ type schemas_SortExpression = SortExpression;
|
|
816
833
|
type schemas_SortOrder = SortOrder;
|
817
834
|
type schemas_FuzzinessExpression = FuzzinessExpression;
|
818
835
|
type schemas_PrefixExpression = PrefixExpression;
|
836
|
+
type schemas_TargetExpression = TargetExpression;
|
819
837
|
type schemas_FilterExpression = FilterExpression;
|
820
838
|
type schemas_SummaryExpressionList = SummaryExpressionList;
|
821
839
|
type schemas_SummaryExpression = SummaryExpression;
|
@@ -891,6 +909,7 @@ declare namespace schemas {
|
|
891
909
|
schemas_SortOrder as SortOrder,
|
892
910
|
schemas_FuzzinessExpression as FuzzinessExpression,
|
893
911
|
schemas_PrefixExpression as PrefixExpression,
|
912
|
+
schemas_TargetExpression as TargetExpression,
|
894
913
|
schemas_FilterExpression as FilterExpression,
|
895
914
|
schemas_SummaryExpressionList as SummaryExpressionList,
|
896
915
|
schemas_SummaryExpression as SummaryExpression,
|
@@ -974,6 +993,7 @@ declare type SummarizeResponse = {
|
|
974
993
|
};
|
975
994
|
declare type SearchResponse = {
|
976
995
|
records: XataRecord$1[];
|
996
|
+
warning?: string;
|
977
997
|
};
|
978
998
|
/**
|
979
999
|
* @example {"migrationID":"mig_c7m19ilcefoebpqj12p0"}
|
@@ -3825,8 +3845,8 @@ declare type QueryTableVariables = {
|
|
3825
3845
|
*
|
3826
3846
|
* ### Pagination
|
3827
3847
|
*
|
3828
|
-
* We offer cursor pagination and offset pagination.
|
3829
|
-
*
|
3848
|
+
* We offer cursor pagination and offset pagination. For queries that are expected to return more than 1000 records,
|
3849
|
+
* cursor pagination is needed in order to retrieve all of their results. The offset pagination method is limited to 1000 records.
|
3830
3850
|
*
|
3831
3851
|
* Example of size + offset pagination:
|
3832
3852
|
*
|
@@ -3955,6 +3975,7 @@ declare type SearchTableRequestBody = {
|
|
3955
3975
|
*/
|
3956
3976
|
query: string;
|
3957
3977
|
fuzziness?: FuzzinessExpression;
|
3978
|
+
target?: TargetExpression;
|
3958
3979
|
prefix?: PrefixExpression;
|
3959
3980
|
filter?: FilterExpression;
|
3960
3981
|
highlight?: HighlightExpression;
|
@@ -3999,6 +4020,7 @@ declare type SearchBranchRequestBody = {
|
|
3999
4020
|
*/
|
4000
4021
|
table: string;
|
4001
4022
|
filter?: FilterExpression;
|
4023
|
+
target?: TargetExpression;
|
4002
4024
|
boosters?: BoosterExpression[];
|
4003
4025
|
})[];
|
4004
4026
|
/**
|
@@ -4560,6 +4582,21 @@ declare type Boosters<O extends XataRecord> = Values<{
|
|
4560
4582
|
} : never;
|
4561
4583
|
}>;
|
4562
4584
|
|
4585
|
+
declare type TargetColumn<T extends XataRecord> = SelectableColumn<T> | {
|
4586
|
+
/**
|
4587
|
+
* The name of the column.
|
4588
|
+
*/
|
4589
|
+
column: SelectableColumn<T>;
|
4590
|
+
/**
|
4591
|
+
* The weight of the column.
|
4592
|
+
*
|
4593
|
+
* @default 1
|
4594
|
+
* @maximum 10
|
4595
|
+
* @minimum 1
|
4596
|
+
*/
|
4597
|
+
weight?: number;
|
4598
|
+
};
|
4599
|
+
|
4563
4600
|
declare type SearchOptions<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = {
|
4564
4601
|
fuzziness?: FuzzinessExpression;
|
4565
4602
|
prefix?: PrefixExpression;
|
@@ -4567,6 +4604,7 @@ declare type SearchOptions<Schemas extends Record<string, BaseData>, Tables exte
|
|
4567
4604
|
tables?: Array<Tables | Values<{
|
4568
4605
|
[Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
|
4569
4606
|
table: Model;
|
4607
|
+
target?: TargetColumn<Schemas[Model] & XataRecord>[];
|
4570
4608
|
filter?: Filter<SelectedPick<Schemas[Model] & XataRecord, ['*']>>;
|
4571
4609
|
boosters?: Boosters<Schemas[Model] & XataRecord>[];
|
4572
4610
|
};
|