@mastra/upstash 0.1.6-alpha.1 → 0.1.6-alpha.3

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.
@@ -1,5 +1,5 @@
1
- import { BaseFilterTranslator } from '@mastra/core/filter';
2
- import type { Filter, FieldCondition, OperatorSupport } from '@mastra/core/filter';
1
+ import { BaseFilterTranslator } from '@mastra/core/vector/filter';
2
+ import type { FieldCondition, OperatorSupport, VectorFilter } from '@mastra/core/vector/filter';
3
3
 
4
4
  export class UpstashFilterTranslator extends BaseFilterTranslator {
5
5
  protected override getSupportedOperators(): OperatorSupport {
@@ -11,13 +11,13 @@ export class UpstashFilterTranslator extends BaseFilterTranslator {
11
11
  };
12
12
  }
13
13
 
14
- translate(filter?: Filter): string | undefined {
14
+ translate(filter?: VectorFilter): string | undefined {
15
15
  if (this.isEmpty(filter)) return undefined;
16
- this.validateFilter(filter as Filter);
16
+ this.validateFilter(filter);
17
17
  return this.translateNode(filter);
18
18
  }
19
19
 
20
- private translateNode(node: Filter | FieldCondition, path: string = ''): string {
20
+ private translateNode(node: VectorFilter | FieldCondition, path: string = ''): string {
21
21
  if (this.isRegex(node)) {
22
22
  throw new Error('Direct regex pattern format is not supported in Upstash');
23
23
  }