Skip to content

Releases: lawvs/fn-sphere

@fn-sphere/core@0.2.0

31 Jul 20:17
7a6872c
Compare
Choose a tag to compare
@fn-sphere/core@0.2.0

@fn-sphere/filter@0.1.3

29 Jul 14:38
57a3a33
Compare
Choose a tag to compare

Patch Changes

@fn-sphere/filter@0.1.2

29 Jul 13:29
b14c6d8
Compare
Choose a tag to compare

Patch Changes

  • b9d3b0a: chore: add type export for filter specs

  • b9d3b0a: Rename and export FilterRule

    interface SingleFilter {
      type: "Filter";
      /**
       * Field path
       *
       * If it's a empty array, it means the root object.
       * If not provided, it means user didn't select a field.
       */
      path?: FilterPath;
      /**
       * Filter name
       *
       * If not provided, it means user didn't select a filter.
       */
      name?: string;
      /**
       * Arguments for the filter function
       */
      args: unknown[];
      invert?: boolean;
    }
    
    interface SingleFilter extends SingleFilterInput {
      /**
       * Unique id, used for tracking changes or resorting
       */
      id: FilterId;
    }
    
    export interface FilterGroupInput {
      type: "FilterGroup";
      op: "and" | "or";
      conditions: (SingleFilter | FilterGroup)[];
      invert?: boolean;
    }
    
    export interface FilterGroup extends FilterGroupInput {
      /**
       * Unique id, used for tracking changes or resorting
       */
      id: FilterId;
    }
    
    export type FilterRule = SingleFilter | FilterGroup;
  • Updated dependencies [336fe84]

  • Updated dependencies [b9d3b0a]

    • @fn-sphere/core@0.1.2

@fn-sphere/core@0.1.2

29 Jul 13:29
b14c6d8
Compare
Choose a tag to compare

Patch Changes

  • 336fe84: getParametersExceptFirst now returns an array instead of a Zod tuple.

    import { getParametersExceptFirst } from "@fn-sphere/core";
    
    const schema = {
      name: "test",
      define: z.function().args(z.number(), z.boolean()).returns(z.void()),
      implement: () => {},
    };
    
    isSameType(z.tuple(getParametersExceptFirst(schema)), z.tuple([z.boolean()]));
    // true
  • b9d3b0a: Rename and export FilterRule

    interface SingleFilter {
      type: "Filter";
      /**
       * Field path
       *
       * If it's a empty array, it means the root object.
       * If not provided, it means user didn't select a field.
       */
      path?: FilterPath;
      /**
       * Filter name
       *
       * If not provided, it means user didn't select a filter.
       */
      name?: string;
      /**
       * Arguments for the filter function
       */
      args: unknown[];
      invert?: boolean;
    }
    
    interface SingleFilter extends SingleFilterInput {
      /**
       * Unique id, used for tracking changes or resorting
       */
      id: FilterId;
    }
    
    export interface FilterGroupInput {
      type: "FilterGroup";
      op: "and" | "or";
      conditions: (SingleFilter | FilterGroup)[];
      invert?: boolean;
    }
    
    export interface FilterGroup extends FilterGroupInput {
      /**
       * Unique id, used for tracking changes or resorting
       */
      id: FilterId;
    }
    
    export type FilterRule = SingleFilter | FilterGroup;

@fn-sphere/filter@0.1.1

25 Jul 13:12
2f40b12
Compare
Choose a tag to compare

Patch Changes

@fn-sphere/filter@0.1.0

25 Jul 11:39
Compare
Choose a tag to compare

Minor Changes

Patch Changes

  • Updated dependencies [5c84d94]
    • @fn-sphere/core@0.1.0

@fn-sphere/core@0.1.0

25 Jul 11:39
Compare
Choose a tag to compare

Minor Changes