@wix/sdk-types 1.17.10 → 1.17.11

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.
@@ -454,6 +454,14 @@ declare const SORT_CAPABILITIES: {
454
454
  readonly ASC: "ASC";
455
455
  readonly DESC: "DESC";
456
456
  };
457
+ /**
458
+ * Origin point for geo-distance sorting on a GEO field.
459
+ * Results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
460
+ */
461
+ type SortingOrigin = {
462
+ latitude?: number | null;
463
+ longitude?: number | null;
464
+ };
457
465
  /**
458
466
  * Helper type to get the fields from a WQL group
459
467
  * @template WQLGroup The WQL group type
@@ -471,6 +479,7 @@ type Sorting<Spec extends WQLSpec> = Spec['wql'] extends {
471
479
  fieldName?: string;
472
480
  order?: SortOrder;
473
481
  selectItemsBy?: Record<string, any>[] | null;
482
+ origin?: SortingOrigin | null;
474
483
  } : {
475
484
  [WQLGroupIndex in keyof Spec['wql']]: Spec['wql'][WQLGroupIndex] extends {
476
485
  fields: readonly string[];
@@ -479,18 +488,22 @@ type Sorting<Spec extends WQLSpec> = Spec['wql'] extends {
479
488
  fieldName: WQLFields<Spec['wql'][WQLGroupIndex]>;
480
489
  order: typeof SORT_DIRECTIONS.ASC;
481
490
  selectItemsBy?: Record<string, any>[] | null;
491
+ origin?: SortingOrigin | null;
482
492
  } : GroupSortCapability extends typeof SORT_DIRECTIONS.DESC ? {
483
493
  fieldName: WQLFields<Spec['wql'][WQLGroupIndex]>;
484
494
  order: typeof SORT_DIRECTIONS.DESC;
485
495
  selectItemsBy?: Record<string, any>[] | null;
496
+ origin?: SortingOrigin | null;
486
497
  } : GroupSortCapability extends typeof SORT_CAPABILITIES.BOTH ? {
487
498
  fieldName: WQLFields<Spec['wql'][WQLGroupIndex]>;
488
499
  order: SortOrder;
489
500
  selectItemsBy?: Record<string, any>[] | null;
501
+ origin?: SortingOrigin | null;
490
502
  } : GroupSortCapability extends typeof SORT_CAPABILITIES.NONE ? {
491
503
  fieldName?: never;
492
504
  order?: never;
493
505
  selectItemsBy?: Record<string, any>[] | null;
506
+ origin?: SortingOrigin | null;
494
507
  } : never : never;
495
508
  }[keyof Spec['wql']];
496
509
 
@@ -1300,4 +1313,4 @@ interface QueryHelpers<T, S extends QuerySpec, R = QueryRequest<T, S>> {
1300
1313
  Sort: SortFactory<S>;
1301
1314
  }
1302
1315
 
1303
- export { type APIMetadata, type AccessToken, type AccountInfo, type AggregatableFields, type Aggregation, type AggregationBuilder, type AggregationExpression, type AggregationFactory, type AggregationType, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type CursorPaging, type DateHistogramAggregationBuilder, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type ExposeFieldsBasedOnToggle, type FieldFilter, type FieldSort, type Filter, type FilterExpression, type FilterFactory, type FilterableFields, type GetNestedType, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type IdentityProvider, type MaybeContext, type Method, type MigrationOptions, type NestedAggregationBuilder, type NonNullablePaths, type OffsetPaging, type PagingFor, type PublicMetadata, type Query, type QueryBuilder, type QueryHelpers, type QueryRequest, type QuerySpec, type RESTFunctionDescriptor, type RangeAggregationBuilder, type RefreshToken, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, SORT_CAPABILITIES, SORT_DIRECTIONS, type ScalarAggregationBuilder, type Search, type SearchBuilder, type SearchDetails, type SearchExpression, type SearchHelpers, type SearchParamsBuilder, type SearchParamsFactory, type SearchRequest, type SearchSpec, type SearchableFields, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata, type SortCapability, type SortExpression, type SortFactory, type SortOrder, type Sorting, type Token, type TokenStorage, type Tokens, type ValueAggregationBuilder, type ValueAggregationSort, type WQL, type WQLSpec };
1316
+ export { type APIMetadata, type AccessToken, type AccountInfo, type AggregatableFields, type Aggregation, type AggregationBuilder, type AggregationExpression, type AggregationFactory, type AggregationType, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type CursorPaging, type DateHistogramAggregationBuilder, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type ExposeFieldsBasedOnToggle, type FieldFilter, type FieldSort, type Filter, type FilterExpression, type FilterFactory, type FilterableFields, type GetNestedType, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type IdentityProvider, type MaybeContext, type Method, type MigrationOptions, type NestedAggregationBuilder, type NonNullablePaths, type OffsetPaging, type PagingFor, type PublicMetadata, type Query, type QueryBuilder, type QueryHelpers, type QueryRequest, type QuerySpec, type RESTFunctionDescriptor, type RangeAggregationBuilder, type RefreshToken, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, SORT_CAPABILITIES, SORT_DIRECTIONS, type ScalarAggregationBuilder, type Search, type SearchBuilder, type SearchDetails, type SearchExpression, type SearchHelpers, type SearchParamsBuilder, type SearchParamsFactory, type SearchRequest, type SearchSpec, type SearchableFields, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata, type SortCapability, type SortExpression, type SortFactory, type SortOrder, type Sorting, type SortingOrigin, type Token, type TokenStorage, type Tokens, type ValueAggregationBuilder, type ValueAggregationSort, type WQL, type WQLSpec };
package/build/index.d.mts CHANGED
@@ -454,6 +454,14 @@ declare const SORT_CAPABILITIES: {
454
454
  readonly ASC: "ASC";
455
455
  readonly DESC: "DESC";
456
456
  };
457
+ /**
458
+ * Origin point for geo-distance sorting on a GEO field.
459
+ * Results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
460
+ */
461
+ type SortingOrigin = {
462
+ latitude?: number | null;
463
+ longitude?: number | null;
464
+ };
457
465
  /**
458
466
  * Helper type to get the fields from a WQL group
459
467
  * @template WQLGroup The WQL group type
@@ -471,6 +479,7 @@ type Sorting<Spec extends WQLSpec> = Spec['wql'] extends {
471
479
  fieldName?: string;
472
480
  order?: SortOrder;
473
481
  selectItemsBy?: Record<string, any>[] | null;
482
+ origin?: SortingOrigin | null;
474
483
  } : {
475
484
  [WQLGroupIndex in keyof Spec['wql']]: Spec['wql'][WQLGroupIndex] extends {
476
485
  fields: readonly string[];
@@ -479,18 +488,22 @@ type Sorting<Spec extends WQLSpec> = Spec['wql'] extends {
479
488
  fieldName: WQLFields<Spec['wql'][WQLGroupIndex]>;
480
489
  order: typeof SORT_DIRECTIONS.ASC;
481
490
  selectItemsBy?: Record<string, any>[] | null;
491
+ origin?: SortingOrigin | null;
482
492
  } : GroupSortCapability extends typeof SORT_DIRECTIONS.DESC ? {
483
493
  fieldName: WQLFields<Spec['wql'][WQLGroupIndex]>;
484
494
  order: typeof SORT_DIRECTIONS.DESC;
485
495
  selectItemsBy?: Record<string, any>[] | null;
496
+ origin?: SortingOrigin | null;
486
497
  } : GroupSortCapability extends typeof SORT_CAPABILITIES.BOTH ? {
487
498
  fieldName: WQLFields<Spec['wql'][WQLGroupIndex]>;
488
499
  order: SortOrder;
489
500
  selectItemsBy?: Record<string, any>[] | null;
501
+ origin?: SortingOrigin | null;
490
502
  } : GroupSortCapability extends typeof SORT_CAPABILITIES.NONE ? {
491
503
  fieldName?: never;
492
504
  order?: never;
493
505
  selectItemsBy?: Record<string, any>[] | null;
506
+ origin?: SortingOrigin | null;
494
507
  } : never : never;
495
508
  }[keyof Spec['wql']];
496
509
 
@@ -1300,4 +1313,4 @@ interface QueryHelpers<T, S extends QuerySpec, R = QueryRequest<T, S>> {
1300
1313
  Sort: SortFactory<S>;
1301
1314
  }
1302
1315
 
1303
- export { type APIMetadata, type AccessToken, type AccountInfo, type AggregatableFields, type Aggregation, type AggregationBuilder, type AggregationExpression, type AggregationFactory, type AggregationType, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type CursorPaging, type DateHistogramAggregationBuilder, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type ExposeFieldsBasedOnToggle, type FieldFilter, type FieldSort, type Filter, type FilterExpression, type FilterFactory, type FilterableFields, type GetNestedType, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type IdentityProvider, type MaybeContext, type Method, type MigrationOptions, type NestedAggregationBuilder, type NonNullablePaths, type OffsetPaging, type PagingFor, type PublicMetadata, type Query, type QueryBuilder, type QueryHelpers, type QueryRequest, type QuerySpec, type RESTFunctionDescriptor, type RangeAggregationBuilder, type RefreshToken, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, SORT_CAPABILITIES, SORT_DIRECTIONS, type ScalarAggregationBuilder, type Search, type SearchBuilder, type SearchDetails, type SearchExpression, type SearchHelpers, type SearchParamsBuilder, type SearchParamsFactory, type SearchRequest, type SearchSpec, type SearchableFields, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata, type SortCapability, type SortExpression, type SortFactory, type SortOrder, type Sorting, type Token, type TokenStorage, type Tokens, type ValueAggregationBuilder, type ValueAggregationSort, type WQL, type WQLSpec };
1316
+ export { type APIMetadata, type AccessToken, type AccountInfo, type AggregatableFields, type Aggregation, type AggregationBuilder, type AggregationExpression, type AggregationFactory, type AggregationType, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type CursorPaging, type DateHistogramAggregationBuilder, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type ExposeFieldsBasedOnToggle, type FieldFilter, type FieldSort, type Filter, type FilterExpression, type FilterFactory, type FilterableFields, type GetNestedType, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type IdentityProvider, type MaybeContext, type Method, type MigrationOptions, type NestedAggregationBuilder, type NonNullablePaths, type OffsetPaging, type PagingFor, type PublicMetadata, type Query, type QueryBuilder, type QueryHelpers, type QueryRequest, type QuerySpec, type RESTFunctionDescriptor, type RangeAggregationBuilder, type RefreshToken, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, SORT_CAPABILITIES, SORT_DIRECTIONS, type ScalarAggregationBuilder, type Search, type SearchBuilder, type SearchDetails, type SearchExpression, type SearchHelpers, type SearchParamsBuilder, type SearchParamsFactory, type SearchRequest, type SearchSpec, type SearchableFields, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata, type SortCapability, type SortExpression, type SortFactory, type SortOrder, type Sorting, type SortingOrigin, type Token, type TokenStorage, type Tokens, type ValueAggregationBuilder, type ValueAggregationSort, type WQL, type WQLSpec };
package/build/index.d.ts CHANGED
@@ -454,6 +454,14 @@ declare const SORT_CAPABILITIES: {
454
454
  readonly ASC: "ASC";
455
455
  readonly DESC: "DESC";
456
456
  };
457
+ /**
458
+ * Origin point for geo-distance sorting on a GEO field.
459
+ * Results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
460
+ */
461
+ type SortingOrigin = {
462
+ latitude?: number | null;
463
+ longitude?: number | null;
464
+ };
457
465
  /**
458
466
  * Helper type to get the fields from a WQL group
459
467
  * @template WQLGroup The WQL group type
@@ -471,6 +479,7 @@ type Sorting<Spec extends WQLSpec> = Spec['wql'] extends {
471
479
  fieldName?: string;
472
480
  order?: SortOrder;
473
481
  selectItemsBy?: Record<string, any>[] | null;
482
+ origin?: SortingOrigin | null;
474
483
  } : {
475
484
  [WQLGroupIndex in keyof Spec['wql']]: Spec['wql'][WQLGroupIndex] extends {
476
485
  fields: readonly string[];
@@ -479,18 +488,22 @@ type Sorting<Spec extends WQLSpec> = Spec['wql'] extends {
479
488
  fieldName: WQLFields<Spec['wql'][WQLGroupIndex]>;
480
489
  order: typeof SORT_DIRECTIONS.ASC;
481
490
  selectItemsBy?: Record<string, any>[] | null;
491
+ origin?: SortingOrigin | null;
482
492
  } : GroupSortCapability extends typeof SORT_DIRECTIONS.DESC ? {
483
493
  fieldName: WQLFields<Spec['wql'][WQLGroupIndex]>;
484
494
  order: typeof SORT_DIRECTIONS.DESC;
485
495
  selectItemsBy?: Record<string, any>[] | null;
496
+ origin?: SortingOrigin | null;
486
497
  } : GroupSortCapability extends typeof SORT_CAPABILITIES.BOTH ? {
487
498
  fieldName: WQLFields<Spec['wql'][WQLGroupIndex]>;
488
499
  order: SortOrder;
489
500
  selectItemsBy?: Record<string, any>[] | null;
501
+ origin?: SortingOrigin | null;
490
502
  } : GroupSortCapability extends typeof SORT_CAPABILITIES.NONE ? {
491
503
  fieldName?: never;
492
504
  order?: never;
493
505
  selectItemsBy?: Record<string, any>[] | null;
506
+ origin?: SortingOrigin | null;
494
507
  } : never : never;
495
508
  }[keyof Spec['wql']];
496
509
 
@@ -1300,4 +1313,4 @@ interface QueryHelpers<T, S extends QuerySpec, R = QueryRequest<T, S>> {
1300
1313
  Sort: SortFactory<S>;
1301
1314
  }
1302
1315
 
1303
- export { type APIMetadata, type AccessToken, type AccountInfo, type AggregatableFields, type Aggregation, type AggregationBuilder, type AggregationExpression, type AggregationFactory, type AggregationType, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type CursorPaging, type DateHistogramAggregationBuilder, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type ExposeFieldsBasedOnToggle, type FieldFilter, type FieldSort, type Filter, type FilterExpression, type FilterFactory, type FilterableFields, type GetNestedType, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type IdentityProvider, type MaybeContext, type Method, type MigrationOptions, type NestedAggregationBuilder, type NonNullablePaths, type OffsetPaging, type PagingFor, type PublicMetadata, type Query, type QueryBuilder, type QueryHelpers, type QueryRequest, type QuerySpec, type RESTFunctionDescriptor, type RangeAggregationBuilder, type RefreshToken, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, SORT_CAPABILITIES, SORT_DIRECTIONS, type ScalarAggregationBuilder, type Search, type SearchBuilder, type SearchDetails, type SearchExpression, type SearchHelpers, type SearchParamsBuilder, type SearchParamsFactory, type SearchRequest, type SearchSpec, type SearchableFields, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata, type SortCapability, type SortExpression, type SortFactory, type SortOrder, type Sorting, type Token, type TokenStorage, type Tokens, type ValueAggregationBuilder, type ValueAggregationSort, type WQL, type WQLSpec };
1316
+ export { type APIMetadata, type AccessToken, type AccountInfo, type AggregatableFields, type Aggregation, type AggregationBuilder, type AggregationExpression, type AggregationFactory, type AggregationType, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type CursorPaging, type DateHistogramAggregationBuilder, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type ExposeFieldsBasedOnToggle, type FieldFilter, type FieldSort, type Filter, type FilterExpression, type FilterFactory, type FilterableFields, type GetNestedType, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type IdentityProvider, type MaybeContext, type Method, type MigrationOptions, type NestedAggregationBuilder, type NonNullablePaths, type OffsetPaging, type PagingFor, type PublicMetadata, type Query, type QueryBuilder, type QueryHelpers, type QueryRequest, type QuerySpec, type RESTFunctionDescriptor, type RangeAggregationBuilder, type RefreshToken, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, SORT_CAPABILITIES, SORT_DIRECTIONS, type ScalarAggregationBuilder, type Search, type SearchBuilder, type SearchDetails, type SearchExpression, type SearchHelpers, type SearchParamsBuilder, type SearchParamsFactory, type SearchRequest, type SearchSpec, type SearchableFields, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata, type SortCapability, type SortExpression, type SortFactory, type SortOrder, type Sorting, type SortingOrigin, type Token, type TokenStorage, type Tokens, type ValueAggregationBuilder, type ValueAggregationSort, type WQL, type WQLSpec };
@@ -512,6 +512,14 @@ declare const SORT_CAPABILITIES: {
512
512
  readonly ASC: "ASC";
513
513
  readonly DESC: "DESC";
514
514
  };
515
+ /**
516
+ * Origin point for geo-distance sorting on a GEO field.
517
+ * Results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
518
+ */
519
+ type SortingOrigin = {
520
+ latitude?: number | null;
521
+ longitude?: number | null;
522
+ };
515
523
  /**
516
524
  * Helper type to get the fields from a WQL group
517
525
  * @template WQLGroup The WQL group type
@@ -529,6 +537,7 @@ type Sorting<Spec extends WQLSpec> = Spec['wql'] extends {
529
537
  fieldName?: string;
530
538
  order?: SortOrder;
531
539
  selectItemsBy?: Record<string, any>[] | null;
540
+ origin?: SortingOrigin | null;
532
541
  } : {
533
542
  [WQLGroupIndex in keyof Spec['wql']]: Spec['wql'][WQLGroupIndex] extends {
534
543
  fields: readonly string[];
@@ -537,18 +546,22 @@ type Sorting<Spec extends WQLSpec> = Spec['wql'] extends {
537
546
  fieldName: WQLFields<Spec['wql'][WQLGroupIndex]>;
538
547
  order: typeof SORT_DIRECTIONS.ASC;
539
548
  selectItemsBy?: Record<string, any>[] | null;
549
+ origin?: SortingOrigin | null;
540
550
  } : GroupSortCapability extends typeof SORT_DIRECTIONS.DESC ? {
541
551
  fieldName: WQLFields<Spec['wql'][WQLGroupIndex]>;
542
552
  order: typeof SORT_DIRECTIONS.DESC;
543
553
  selectItemsBy?: Record<string, any>[] | null;
554
+ origin?: SortingOrigin | null;
544
555
  } : GroupSortCapability extends typeof SORT_CAPABILITIES.BOTH ? {
545
556
  fieldName: WQLFields<Spec['wql'][WQLGroupIndex]>;
546
557
  order: SortOrder;
547
558
  selectItemsBy?: Record<string, any>[] | null;
559
+ origin?: SortingOrigin | null;
548
560
  } : GroupSortCapability extends typeof SORT_CAPABILITIES.NONE ? {
549
561
  fieldName?: never;
550
562
  order?: never;
551
563
  selectItemsBy?: Record<string, any>[] | null;
564
+ origin?: SortingOrigin | null;
552
565
  } : never : never;
553
566
  }[keyof Spec['wql']];
554
567
 
@@ -1358,4 +1371,4 @@ interface QueryHelpers<T, S extends QuerySpec, R = QueryRequest<T, S>> {
1358
1371
  Sort: SortFactory<S>;
1359
1372
  }
1360
1373
 
1361
- export { type APIMetadata, type AccessToken, type AccountInfo, type AggregatableFields, type Aggregation, type AggregationBuilder, type AggregationExpression, type AggregationFactory, type AggregationType, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type CursorPaging, type DateHistogramAggregationBuilder, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type ExposeFieldsBasedOnToggle, type FieldFilter, type FieldSort, type Filter, type FilterExpression, type FilterFactory, type FilterableFields, type GetNestedType, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type IdentityProvider, type MaybeContext, type Method, type MigrationOptions, type NestedAggregationBuilder, type NonNullablePaths, type OffsetPaging, type PagingFor, type PublicMetadata, type Query, type QueryBuilder, type QueryHelpers, type QueryRequest, type QuerySpec, type RESTFunctionDescriptor, type RangeAggregationBuilder, type RefreshToken, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, SORT_CAPABILITIES, SORT_DIRECTIONS, type ScalarAggregationBuilder, type Search, type SearchBuilder, type SearchDetails, type SearchExpression, type SearchHelpers, type SearchParamsBuilder, type SearchParamsFactory, type SearchRequest, type SearchSpec, type SearchableFields, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata, type SortCapability, type SortExpression, type SortFactory, type SortOrder, type Sorting, type Token, type TokenStorage, type Tokens, type ValueAggregationBuilder, type ValueAggregationSort, type WQL, type WQLSpec };
1374
+ export { type APIMetadata, type AccessToken, type AccountInfo, type AggregatableFields, type Aggregation, type AggregationBuilder, type AggregationExpression, type AggregationFactory, type AggregationType, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type CursorPaging, type DateHistogramAggregationBuilder, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type ExposeFieldsBasedOnToggle, type FieldFilter, type FieldSort, type Filter, type FilterExpression, type FilterFactory, type FilterableFields, type GetNestedType, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type IdentityProvider, type MaybeContext, type Method, type MigrationOptions, type NestedAggregationBuilder, type NonNullablePaths, type OffsetPaging, type PagingFor, type PublicMetadata, type Query, type QueryBuilder, type QueryHelpers, type QueryRequest, type QuerySpec, type RESTFunctionDescriptor, type RangeAggregationBuilder, type RefreshToken, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, SORT_CAPABILITIES, SORT_DIRECTIONS, type ScalarAggregationBuilder, type Search, type SearchBuilder, type SearchDetails, type SearchExpression, type SearchHelpers, type SearchParamsBuilder, type SearchParamsFactory, type SearchRequest, type SearchSpec, type SearchableFields, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata, type SortCapability, type SortExpression, type SortFactory, type SortOrder, type Sorting, type SortingOrigin, type Token, type TokenStorage, type Tokens, type ValueAggregationBuilder, type ValueAggregationSort, type WQL, type WQLSpec };
@@ -512,6 +512,14 @@ declare const SORT_CAPABILITIES: {
512
512
  readonly ASC: "ASC";
513
513
  readonly DESC: "DESC";
514
514
  };
515
+ /**
516
+ * Origin point for geo-distance sorting on a GEO field.
517
+ * Results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
518
+ */
519
+ type SortingOrigin = {
520
+ latitude?: number | null;
521
+ longitude?: number | null;
522
+ };
515
523
  /**
516
524
  * Helper type to get the fields from a WQL group
517
525
  * @template WQLGroup The WQL group type
@@ -529,6 +537,7 @@ type Sorting<Spec extends WQLSpec> = Spec['wql'] extends {
529
537
  fieldName?: string;
530
538
  order?: SortOrder;
531
539
  selectItemsBy?: Record<string, any>[] | null;
540
+ origin?: SortingOrigin | null;
532
541
  } : {
533
542
  [WQLGroupIndex in keyof Spec['wql']]: Spec['wql'][WQLGroupIndex] extends {
534
543
  fields: readonly string[];
@@ -537,18 +546,22 @@ type Sorting<Spec extends WQLSpec> = Spec['wql'] extends {
537
546
  fieldName: WQLFields<Spec['wql'][WQLGroupIndex]>;
538
547
  order: typeof SORT_DIRECTIONS.ASC;
539
548
  selectItemsBy?: Record<string, any>[] | null;
549
+ origin?: SortingOrigin | null;
540
550
  } : GroupSortCapability extends typeof SORT_DIRECTIONS.DESC ? {
541
551
  fieldName: WQLFields<Spec['wql'][WQLGroupIndex]>;
542
552
  order: typeof SORT_DIRECTIONS.DESC;
543
553
  selectItemsBy?: Record<string, any>[] | null;
554
+ origin?: SortingOrigin | null;
544
555
  } : GroupSortCapability extends typeof SORT_CAPABILITIES.BOTH ? {
545
556
  fieldName: WQLFields<Spec['wql'][WQLGroupIndex]>;
546
557
  order: SortOrder;
547
558
  selectItemsBy?: Record<string, any>[] | null;
559
+ origin?: SortingOrigin | null;
548
560
  } : GroupSortCapability extends typeof SORT_CAPABILITIES.NONE ? {
549
561
  fieldName?: never;
550
562
  order?: never;
551
563
  selectItemsBy?: Record<string, any>[] | null;
564
+ origin?: SortingOrigin | null;
552
565
  } : never : never;
553
566
  }[keyof Spec['wql']];
554
567
 
@@ -1358,4 +1371,4 @@ interface QueryHelpers<T, S extends QuerySpec, R = QueryRequest<T, S>> {
1358
1371
  Sort: SortFactory<S>;
1359
1372
  }
1360
1373
 
1361
- export { type APIMetadata, type AccessToken, type AccountInfo, type AggregatableFields, type Aggregation, type AggregationBuilder, type AggregationExpression, type AggregationFactory, type AggregationType, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type CursorPaging, type DateHistogramAggregationBuilder, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type ExposeFieldsBasedOnToggle, type FieldFilter, type FieldSort, type Filter, type FilterExpression, type FilterFactory, type FilterableFields, type GetNestedType, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type IdentityProvider, type MaybeContext, type Method, type MigrationOptions, type NestedAggregationBuilder, type NonNullablePaths, type OffsetPaging, type PagingFor, type PublicMetadata, type Query, type QueryBuilder, type QueryHelpers, type QueryRequest, type QuerySpec, type RESTFunctionDescriptor, type RangeAggregationBuilder, type RefreshToken, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, SORT_CAPABILITIES, SORT_DIRECTIONS, type ScalarAggregationBuilder, type Search, type SearchBuilder, type SearchDetails, type SearchExpression, type SearchHelpers, type SearchParamsBuilder, type SearchParamsFactory, type SearchRequest, type SearchSpec, type SearchableFields, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata, type SortCapability, type SortExpression, type SortFactory, type SortOrder, type Sorting, type Token, type TokenStorage, type Tokens, type ValueAggregationBuilder, type ValueAggregationSort, type WQL, type WQLSpec };
1374
+ export { type APIMetadata, type AccessToken, type AccountInfo, type AggregatableFields, type Aggregation, type AggregationBuilder, type AggregationExpression, type AggregationFactory, type AggregationType, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type CursorPaging, type DateHistogramAggregationBuilder, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type ExposeFieldsBasedOnToggle, type FieldFilter, type FieldSort, type Filter, type FilterExpression, type FilterFactory, type FilterableFields, type GetNestedType, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type IdentityProvider, type MaybeContext, type Method, type MigrationOptions, type NestedAggregationBuilder, type NonNullablePaths, type OffsetPaging, type PagingFor, type PublicMetadata, type Query, type QueryBuilder, type QueryHelpers, type QueryRequest, type QuerySpec, type RESTFunctionDescriptor, type RangeAggregationBuilder, type RefreshToken, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, SORT_CAPABILITIES, SORT_DIRECTIONS, type ScalarAggregationBuilder, type Search, type SearchBuilder, type SearchDetails, type SearchExpression, type SearchHelpers, type SearchParamsBuilder, type SearchParamsFactory, type SearchRequest, type SearchSpec, type SearchableFields, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata, type SortCapability, type SortExpression, type SortFactory, type SortOrder, type Sorting, type SortingOrigin, type Token, type TokenStorage, type Tokens, type ValueAggregationBuilder, type ValueAggregationSort, type WQL, type WQLSpec };
@@ -512,6 +512,14 @@ declare const SORT_CAPABILITIES: {
512
512
  readonly ASC: "ASC";
513
513
  readonly DESC: "DESC";
514
514
  };
515
+ /**
516
+ * Origin point for geo-distance sorting on a GEO field.
517
+ * Results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
518
+ */
519
+ type SortingOrigin = {
520
+ latitude?: number | null;
521
+ longitude?: number | null;
522
+ };
515
523
  /**
516
524
  * Helper type to get the fields from a WQL group
517
525
  * @template WQLGroup The WQL group type
@@ -529,6 +537,7 @@ type Sorting<Spec extends WQLSpec> = Spec['wql'] extends {
529
537
  fieldName?: string;
530
538
  order?: SortOrder;
531
539
  selectItemsBy?: Record<string, any>[] | null;
540
+ origin?: SortingOrigin | null;
532
541
  } : {
533
542
  [WQLGroupIndex in keyof Spec['wql']]: Spec['wql'][WQLGroupIndex] extends {
534
543
  fields: readonly string[];
@@ -537,18 +546,22 @@ type Sorting<Spec extends WQLSpec> = Spec['wql'] extends {
537
546
  fieldName: WQLFields<Spec['wql'][WQLGroupIndex]>;
538
547
  order: typeof SORT_DIRECTIONS.ASC;
539
548
  selectItemsBy?: Record<string, any>[] | null;
549
+ origin?: SortingOrigin | null;
540
550
  } : GroupSortCapability extends typeof SORT_DIRECTIONS.DESC ? {
541
551
  fieldName: WQLFields<Spec['wql'][WQLGroupIndex]>;
542
552
  order: typeof SORT_DIRECTIONS.DESC;
543
553
  selectItemsBy?: Record<string, any>[] | null;
554
+ origin?: SortingOrigin | null;
544
555
  } : GroupSortCapability extends typeof SORT_CAPABILITIES.BOTH ? {
545
556
  fieldName: WQLFields<Spec['wql'][WQLGroupIndex]>;
546
557
  order: SortOrder;
547
558
  selectItemsBy?: Record<string, any>[] | null;
559
+ origin?: SortingOrigin | null;
548
560
  } : GroupSortCapability extends typeof SORT_CAPABILITIES.NONE ? {
549
561
  fieldName?: never;
550
562
  order?: never;
551
563
  selectItemsBy?: Record<string, any>[] | null;
564
+ origin?: SortingOrigin | null;
552
565
  } : never : never;
553
566
  }[keyof Spec['wql']];
554
567
 
@@ -1358,4 +1371,4 @@ interface QueryHelpers<T, S extends QuerySpec, R = QueryRequest<T, S>> {
1358
1371
  Sort: SortFactory<S>;
1359
1372
  }
1360
1373
 
1361
- export { type APIMetadata, type AccessToken, type AccountInfo, type AggregatableFields, type Aggregation, type AggregationBuilder, type AggregationExpression, type AggregationFactory, type AggregationType, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type CursorPaging, type DateHistogramAggregationBuilder, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type ExposeFieldsBasedOnToggle, type FieldFilter, type FieldSort, type Filter, type FilterExpression, type FilterFactory, type FilterableFields, type GetNestedType, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type IdentityProvider, type MaybeContext, type Method, type MigrationOptions, type NestedAggregationBuilder, type NonNullablePaths, type OffsetPaging, type PagingFor, type PublicMetadata, type Query, type QueryBuilder, type QueryHelpers, type QueryRequest, type QuerySpec, type RESTFunctionDescriptor, type RangeAggregationBuilder, type RefreshToken, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, SORT_CAPABILITIES, SORT_DIRECTIONS, type ScalarAggregationBuilder, type Search, type SearchBuilder, type SearchDetails, type SearchExpression, type SearchHelpers, type SearchParamsBuilder, type SearchParamsFactory, type SearchRequest, type SearchSpec, type SearchableFields, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata, type SortCapability, type SortExpression, type SortFactory, type SortOrder, type Sorting, type Token, type TokenStorage, type Tokens, type ValueAggregationBuilder, type ValueAggregationSort, type WQL, type WQLSpec };
1374
+ export { type APIMetadata, type AccessToken, type AccountInfo, type AggregatableFields, type Aggregation, type AggregationBuilder, type AggregationExpression, type AggregationFactory, type AggregationType, type AmbassadorFactory, type AmbassadorFunctionDescriptor, type AmbassadorRequestOptions, type AuthenticationStrategy, type BaseEventMetadata, type BoundAuthenticationStrategy, type BuildAmbassadorFunction, type BuildDescriptors, type BuildEventDefinition, type BuildRESTFunction, type BuildServicePluginDefinition, type CursorPaging, type DateHistogramAggregationBuilder, type Descriptors, EventDefinition, type EventHandler, type EventIdentity, type ExposeFieldsBasedOnToggle, type FieldFilter, type FieldSort, type Filter, type FilterExpression, type FilterFactory, type FilterableFields, type GetNestedType, type HTTPMethod, type Host, type HostModule, type HostModuleAPI, type HttpClient, type HttpResponse, type IdentityProvider, type MaybeContext, type Method, type MigrationOptions, type NestedAggregationBuilder, type NonNullablePaths, type OffsetPaging, type PagingFor, type PublicMetadata, type Query, type QueryBuilder, type QueryHelpers, type QueryRequest, type QuerySpec, type RESTFunctionDescriptor, type RangeAggregationBuilder, type RefreshToken, type RequestContext, type RequestOptions, type RequestOptionsFactory, type RestModuleMeta, SERVICE_PLUGIN_ERROR_TYPE, SORT_CAPABILITIES, SORT_DIRECTIONS, type ScalarAggregationBuilder, type Search, type SearchBuilder, type SearchDetails, type SearchExpression, type SearchHelpers, type SearchParamsBuilder, type SearchParamsFactory, type SearchRequest, type SearchSpec, type SearchableFields, type ServicePluginContract, ServicePluginDefinition, type ServicePluginMethodInput, type ServicePluginMethodMetadata, type SortCapability, type SortExpression, type SortFactory, type SortOrder, type Sorting, type SortingOrigin, type Token, type TokenStorage, type Tokens, type ValueAggregationBuilder, type ValueAggregationSort, type WQL, type WQLSpec };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/sdk-types",
3
- "version": "1.17.10",
3
+ "version": "1.17.11",
4
4
  "author": {
5
5
  "name": "Ronny Ringel",
6
6
  "email": "ronnyr@wix.com"
@@ -62,5 +62,5 @@
62
62
  ]
63
63
  }
64
64
  },
65
- "falconPackageHash": "0c07d4af6ff579e93680872233ba8af1ab54b1c6f61127f1b820ddf4"
65
+ "falconPackageHash": "1da777a5d84bf4a8c619897e838f26d5fd1992d2ee20c0665485bce0"
66
66
  }