@wix/sdk-types 1.13.22 → 1.13.24

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.
@@ -107,6 +107,7 @@ type AuthenticationStrategy<Host = unknown> = {
107
107
  * @returns the token that is currently active in the context of the strategy
108
108
  */
109
109
  getActiveToken?: () => string | undefined;
110
+ shouldUseCDN?: boolean;
110
111
  };
111
112
  type BoundAuthenticationStrategy = {
112
113
  getAuthHeaders: () => Promise<{
@@ -643,7 +644,9 @@ interface DateHistogramAggregation {
643
644
  /**
644
645
  * Nested aggregation item
645
646
  */
646
- type NestedAggregationItem<Spec extends SearchSpec> = BaseAggregation<Spec>;
647
+ type NestedAggregationItem<Spec extends SearchSpec> = BaseAggregationWithoutType<Spec> & {
648
+ type?: NonNestedAggregationType;
649
+ };
647
650
  /**
648
651
  * Nested aggregation configuration
649
652
  */
@@ -660,34 +663,22 @@ type AggregatableFields<Spec extends SearchSpec> = Spec extends {
660
663
  /**
661
664
  * Base aggregation type that can be used for both top-level and nested aggregations
662
665
  */
663
- type BaseAggregation<Spec extends SearchSpec> = {
666
+ type NonNestedAggregationType = 'DATE_HISTOGRAM' | 'RANGE' | 'SCALAR' | 'VALUE';
667
+ type AggregationTypeWithNested = 'NESTED' | NonNestedAggregationType;
668
+ type BaseAggregationWithoutType<Spec extends SearchSpec> = {
664
669
  name?: string | null;
665
670
  fieldPath?: AggregatableFields<Spec>;
666
- } & ({
667
- type?: 'VALUE';
668
- value?: ValueAggregation;
669
- } | {
670
- type?: 'RANGE';
671
+ dateHistogram?: DateHistogramAggregation;
671
672
  range?: RangeAggregation;
672
- } | {
673
- type?: 'SCALAR';
674
673
  scalar?: ScalarAggregation;
675
- } | {
676
- type?: 'DATE_HISTOGRAM';
677
- dateHistogram?: DateHistogramAggregation;
678
- });
674
+ value?: ValueAggregation;
675
+ };
679
676
  /**
680
677
  * Base aggregation interface
681
678
  * @template Spec The search specification type
682
679
  */
683
- type Aggregation<Spec extends SearchSpec> = {
684
- type?: 'DATE_HISTOGRAM' | 'RANGE' | 'SCALAR' | 'VALUE' | 'NESTED';
685
- name?: string | null;
686
- fieldPath?: AggregatableFields<Spec>;
687
- dateHistogram?: DateHistogramAggregation;
688
- range?: RangeAggregation;
689
- scalar?: ScalarAggregation;
690
- value?: ValueAggregation;
680
+ type Aggregation<Spec extends SearchSpec> = BaseAggregationWithoutType<Spec> & {
681
+ type?: AggregationTypeWithNested;
691
682
  nested?: NestedAggregation<Spec>;
692
683
  };
693
684
 
package/build/index.d.mts CHANGED
@@ -107,6 +107,7 @@ type AuthenticationStrategy<Host = unknown> = {
107
107
  * @returns the token that is currently active in the context of the strategy
108
108
  */
109
109
  getActiveToken?: () => string | undefined;
110
+ shouldUseCDN?: boolean;
110
111
  };
111
112
  type BoundAuthenticationStrategy = {
112
113
  getAuthHeaders: () => Promise<{
@@ -643,7 +644,9 @@ interface DateHistogramAggregation {
643
644
  /**
644
645
  * Nested aggregation item
645
646
  */
646
- type NestedAggregationItem<Spec extends SearchSpec> = BaseAggregation<Spec>;
647
+ type NestedAggregationItem<Spec extends SearchSpec> = BaseAggregationWithoutType<Spec> & {
648
+ type?: NonNestedAggregationType;
649
+ };
647
650
  /**
648
651
  * Nested aggregation configuration
649
652
  */
@@ -660,34 +663,22 @@ type AggregatableFields<Spec extends SearchSpec> = Spec extends {
660
663
  /**
661
664
  * Base aggregation type that can be used for both top-level and nested aggregations
662
665
  */
663
- type BaseAggregation<Spec extends SearchSpec> = {
666
+ type NonNestedAggregationType = 'DATE_HISTOGRAM' | 'RANGE' | 'SCALAR' | 'VALUE';
667
+ type AggregationTypeWithNested = 'NESTED' | NonNestedAggregationType;
668
+ type BaseAggregationWithoutType<Spec extends SearchSpec> = {
664
669
  name?: string | null;
665
670
  fieldPath?: AggregatableFields<Spec>;
666
- } & ({
667
- type?: 'VALUE';
668
- value?: ValueAggregation;
669
- } | {
670
- type?: 'RANGE';
671
+ dateHistogram?: DateHistogramAggregation;
671
672
  range?: RangeAggregation;
672
- } | {
673
- type?: 'SCALAR';
674
673
  scalar?: ScalarAggregation;
675
- } | {
676
- type?: 'DATE_HISTOGRAM';
677
- dateHistogram?: DateHistogramAggregation;
678
- });
674
+ value?: ValueAggregation;
675
+ };
679
676
  /**
680
677
  * Base aggregation interface
681
678
  * @template Spec The search specification type
682
679
  */
683
- type Aggregation<Spec extends SearchSpec> = {
684
- type?: 'DATE_HISTOGRAM' | 'RANGE' | 'SCALAR' | 'VALUE' | 'NESTED';
685
- name?: string | null;
686
- fieldPath?: AggregatableFields<Spec>;
687
- dateHistogram?: DateHistogramAggregation;
688
- range?: RangeAggregation;
689
- scalar?: ScalarAggregation;
690
- value?: ValueAggregation;
680
+ type Aggregation<Spec extends SearchSpec> = BaseAggregationWithoutType<Spec> & {
681
+ type?: AggregationTypeWithNested;
691
682
  nested?: NestedAggregation<Spec>;
692
683
  };
693
684
 
package/build/index.d.ts CHANGED
@@ -107,6 +107,7 @@ type AuthenticationStrategy<Host = unknown> = {
107
107
  * @returns the token that is currently active in the context of the strategy
108
108
  */
109
109
  getActiveToken?: () => string | undefined;
110
+ shouldUseCDN?: boolean;
110
111
  };
111
112
  type BoundAuthenticationStrategy = {
112
113
  getAuthHeaders: () => Promise<{
@@ -643,7 +644,9 @@ interface DateHistogramAggregation {
643
644
  /**
644
645
  * Nested aggregation item
645
646
  */
646
- type NestedAggregationItem<Spec extends SearchSpec> = BaseAggregation<Spec>;
647
+ type NestedAggregationItem<Spec extends SearchSpec> = BaseAggregationWithoutType<Spec> & {
648
+ type?: NonNestedAggregationType;
649
+ };
647
650
  /**
648
651
  * Nested aggregation configuration
649
652
  */
@@ -660,34 +663,22 @@ type AggregatableFields<Spec extends SearchSpec> = Spec extends {
660
663
  /**
661
664
  * Base aggregation type that can be used for both top-level and nested aggregations
662
665
  */
663
- type BaseAggregation<Spec extends SearchSpec> = {
666
+ type NonNestedAggregationType = 'DATE_HISTOGRAM' | 'RANGE' | 'SCALAR' | 'VALUE';
667
+ type AggregationTypeWithNested = 'NESTED' | NonNestedAggregationType;
668
+ type BaseAggregationWithoutType<Spec extends SearchSpec> = {
664
669
  name?: string | null;
665
670
  fieldPath?: AggregatableFields<Spec>;
666
- } & ({
667
- type?: 'VALUE';
668
- value?: ValueAggregation;
669
- } | {
670
- type?: 'RANGE';
671
+ dateHistogram?: DateHistogramAggregation;
671
672
  range?: RangeAggregation;
672
- } | {
673
- type?: 'SCALAR';
674
673
  scalar?: ScalarAggregation;
675
- } | {
676
- type?: 'DATE_HISTOGRAM';
677
- dateHistogram?: DateHistogramAggregation;
678
- });
674
+ value?: ValueAggregation;
675
+ };
679
676
  /**
680
677
  * Base aggregation interface
681
678
  * @template Spec The search specification type
682
679
  */
683
- type Aggregation<Spec extends SearchSpec> = {
684
- type?: 'DATE_HISTOGRAM' | 'RANGE' | 'SCALAR' | 'VALUE' | 'NESTED';
685
- name?: string | null;
686
- fieldPath?: AggregatableFields<Spec>;
687
- dateHistogram?: DateHistogramAggregation;
688
- range?: RangeAggregation;
689
- scalar?: ScalarAggregation;
690
- value?: ValueAggregation;
680
+ type Aggregation<Spec extends SearchSpec> = BaseAggregationWithoutType<Spec> & {
681
+ type?: AggregationTypeWithNested;
691
682
  nested?: NestedAggregation<Spec>;
692
683
  };
693
684
 
@@ -170,6 +170,7 @@ type AuthenticationStrategy<Host = unknown> = {
170
170
  * @returns the token that is currently active in the context of the strategy
171
171
  */
172
172
  getActiveToken?: () => string | undefined;
173
+ shouldUseCDN?: boolean;
173
174
  };
174
175
  type BoundAuthenticationStrategy = {
175
176
  getAuthHeaders: () => Promise<{
@@ -706,7 +707,9 @@ interface DateHistogramAggregation {
706
707
  /**
707
708
  * Nested aggregation item
708
709
  */
709
- type NestedAggregationItem<Spec extends SearchSpec> = BaseAggregation<Spec>;
710
+ type NestedAggregationItem<Spec extends SearchSpec> = BaseAggregationWithoutType<Spec> & {
711
+ type?: NonNestedAggregationType;
712
+ };
710
713
  /**
711
714
  * Nested aggregation configuration
712
715
  */
@@ -723,34 +726,22 @@ type AggregatableFields<Spec extends SearchSpec> = Spec extends {
723
726
  /**
724
727
  * Base aggregation type that can be used for both top-level and nested aggregations
725
728
  */
726
- type BaseAggregation<Spec extends SearchSpec> = {
729
+ type NonNestedAggregationType = 'DATE_HISTOGRAM' | 'RANGE' | 'SCALAR' | 'VALUE';
730
+ type AggregationTypeWithNested = 'NESTED' | NonNestedAggregationType;
731
+ type BaseAggregationWithoutType<Spec extends SearchSpec> = {
727
732
  name?: string | null;
728
733
  fieldPath?: AggregatableFields<Spec>;
729
- } & ({
730
- type?: 'VALUE';
731
- value?: ValueAggregation;
732
- } | {
733
- type?: 'RANGE';
734
+ dateHistogram?: DateHistogramAggregation;
734
735
  range?: RangeAggregation;
735
- } | {
736
- type?: 'SCALAR';
737
736
  scalar?: ScalarAggregation;
738
- } | {
739
- type?: 'DATE_HISTOGRAM';
740
- dateHistogram?: DateHistogramAggregation;
741
- });
737
+ value?: ValueAggregation;
738
+ };
742
739
  /**
743
740
  * Base aggregation interface
744
741
  * @template Spec The search specification type
745
742
  */
746
- type Aggregation<Spec extends SearchSpec> = {
747
- type?: 'DATE_HISTOGRAM' | 'RANGE' | 'SCALAR' | 'VALUE' | 'NESTED';
748
- name?: string | null;
749
- fieldPath?: AggregatableFields<Spec>;
750
- dateHistogram?: DateHistogramAggregation;
751
- range?: RangeAggregation;
752
- scalar?: ScalarAggregation;
753
- value?: ValueAggregation;
743
+ type Aggregation<Spec extends SearchSpec> = BaseAggregationWithoutType<Spec> & {
744
+ type?: AggregationTypeWithNested;
754
745
  nested?: NestedAggregation<Spec>;
755
746
  };
756
747
 
@@ -170,6 +170,7 @@ type AuthenticationStrategy<Host = unknown> = {
170
170
  * @returns the token that is currently active in the context of the strategy
171
171
  */
172
172
  getActiveToken?: () => string | undefined;
173
+ shouldUseCDN?: boolean;
173
174
  };
174
175
  type BoundAuthenticationStrategy = {
175
176
  getAuthHeaders: () => Promise<{
@@ -706,7 +707,9 @@ interface DateHistogramAggregation {
706
707
  /**
707
708
  * Nested aggregation item
708
709
  */
709
- type NestedAggregationItem<Spec extends SearchSpec> = BaseAggregation<Spec>;
710
+ type NestedAggregationItem<Spec extends SearchSpec> = BaseAggregationWithoutType<Spec> & {
711
+ type?: NonNestedAggregationType;
712
+ };
710
713
  /**
711
714
  * Nested aggregation configuration
712
715
  */
@@ -723,34 +726,22 @@ type AggregatableFields<Spec extends SearchSpec> = Spec extends {
723
726
  /**
724
727
  * Base aggregation type that can be used for both top-level and nested aggregations
725
728
  */
726
- type BaseAggregation<Spec extends SearchSpec> = {
729
+ type NonNestedAggregationType = 'DATE_HISTOGRAM' | 'RANGE' | 'SCALAR' | 'VALUE';
730
+ type AggregationTypeWithNested = 'NESTED' | NonNestedAggregationType;
731
+ type BaseAggregationWithoutType<Spec extends SearchSpec> = {
727
732
  name?: string | null;
728
733
  fieldPath?: AggregatableFields<Spec>;
729
- } & ({
730
- type?: 'VALUE';
731
- value?: ValueAggregation;
732
- } | {
733
- type?: 'RANGE';
734
+ dateHistogram?: DateHistogramAggregation;
734
735
  range?: RangeAggregation;
735
- } | {
736
- type?: 'SCALAR';
737
736
  scalar?: ScalarAggregation;
738
- } | {
739
- type?: 'DATE_HISTOGRAM';
740
- dateHistogram?: DateHistogramAggregation;
741
- });
737
+ value?: ValueAggregation;
738
+ };
742
739
  /**
743
740
  * Base aggregation interface
744
741
  * @template Spec The search specification type
745
742
  */
746
- type Aggregation<Spec extends SearchSpec> = {
747
- type?: 'DATE_HISTOGRAM' | 'RANGE' | 'SCALAR' | 'VALUE' | 'NESTED';
748
- name?: string | null;
749
- fieldPath?: AggregatableFields<Spec>;
750
- dateHistogram?: DateHistogramAggregation;
751
- range?: RangeAggregation;
752
- scalar?: ScalarAggregation;
753
- value?: ValueAggregation;
743
+ type Aggregation<Spec extends SearchSpec> = BaseAggregationWithoutType<Spec> & {
744
+ type?: AggregationTypeWithNested;
754
745
  nested?: NestedAggregation<Spec>;
755
746
  };
756
747
 
@@ -170,6 +170,7 @@ type AuthenticationStrategy<Host = unknown> = {
170
170
  * @returns the token that is currently active in the context of the strategy
171
171
  */
172
172
  getActiveToken?: () => string | undefined;
173
+ shouldUseCDN?: boolean;
173
174
  };
174
175
  type BoundAuthenticationStrategy = {
175
176
  getAuthHeaders: () => Promise<{
@@ -706,7 +707,9 @@ interface DateHistogramAggregation {
706
707
  /**
707
708
  * Nested aggregation item
708
709
  */
709
- type NestedAggregationItem<Spec extends SearchSpec> = BaseAggregation<Spec>;
710
+ type NestedAggregationItem<Spec extends SearchSpec> = BaseAggregationWithoutType<Spec> & {
711
+ type?: NonNestedAggregationType;
712
+ };
710
713
  /**
711
714
  * Nested aggregation configuration
712
715
  */
@@ -723,34 +726,22 @@ type AggregatableFields<Spec extends SearchSpec> = Spec extends {
723
726
  /**
724
727
  * Base aggregation type that can be used for both top-level and nested aggregations
725
728
  */
726
- type BaseAggregation<Spec extends SearchSpec> = {
729
+ type NonNestedAggregationType = 'DATE_HISTOGRAM' | 'RANGE' | 'SCALAR' | 'VALUE';
730
+ type AggregationTypeWithNested = 'NESTED' | NonNestedAggregationType;
731
+ type BaseAggregationWithoutType<Spec extends SearchSpec> = {
727
732
  name?: string | null;
728
733
  fieldPath?: AggregatableFields<Spec>;
729
- } & ({
730
- type?: 'VALUE';
731
- value?: ValueAggregation;
732
- } | {
733
- type?: 'RANGE';
734
+ dateHistogram?: DateHistogramAggregation;
734
735
  range?: RangeAggregation;
735
- } | {
736
- type?: 'SCALAR';
737
736
  scalar?: ScalarAggregation;
738
- } | {
739
- type?: 'DATE_HISTOGRAM';
740
- dateHistogram?: DateHistogramAggregation;
741
- });
737
+ value?: ValueAggregation;
738
+ };
742
739
  /**
743
740
  * Base aggregation interface
744
741
  * @template Spec The search specification type
745
742
  */
746
- type Aggregation<Spec extends SearchSpec> = {
747
- type?: 'DATE_HISTOGRAM' | 'RANGE' | 'SCALAR' | 'VALUE' | 'NESTED';
748
- name?: string | null;
749
- fieldPath?: AggregatableFields<Spec>;
750
- dateHistogram?: DateHistogramAggregation;
751
- range?: RangeAggregation;
752
- scalar?: ScalarAggregation;
753
- value?: ValueAggregation;
743
+ type Aggregation<Spec extends SearchSpec> = BaseAggregationWithoutType<Spec> & {
744
+ type?: AggregationTypeWithNested;
754
745
  nested?: NestedAggregation<Spec>;
755
746
  };
756
747
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/sdk-types",
3
- "version": "1.13.22",
3
+ "version": "1.13.24",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "Ronny Ringel",
@@ -61,5 +61,5 @@
61
61
  "wallaby": {
62
62
  "autoDetect": true
63
63
  },
64
- "falconPackageHash": "892f0dbe6ccf91945553cc4ce0d7036251c70222bbcc4d63869100d4"
64
+ "falconPackageHash": "916d89a7a8e2282f012a208af0a45f2f3eaf366c3e2c89893e932d2b"
65
65
  }