@wisemen/vue-core-api-utils 2.0.3 → 2.0.4

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/dist/index.d.mts CHANGED
@@ -837,10 +837,14 @@ declare class QueryClient<TQueryKeys extends object> {
837
837
  }
838
838
  //#endregion
839
839
  //#region src/utils/sort/sort.utils.d.ts
840
+ declare enum SortDirectionDto {
841
+ ASC = "asc",
842
+ DESC = "desc",
843
+ }
840
844
  declare class SortUtil {
841
845
  static toDto<SortKey extends string, QueryKey>(sort: Sort<SortKey>[], sortKeyMap: Record<SortKey, QueryKey>): {
842
846
  key: QueryKey;
843
- order: SortDirection;
847
+ order: SortDirectionDto;
844
848
  }[];
845
849
  }
846
850
  //#endregion
package/dist/index.mjs CHANGED
@@ -691,11 +691,16 @@ var QueryClient = class {
691
691
 
692
692
  //#endregion
693
693
  //#region src/utils/sort/sort.utils.ts
694
+ var SortDirectionDto = /* @__PURE__ */ function(SortDirectionDto$1) {
695
+ SortDirectionDto$1["ASC"] = "asc";
696
+ SortDirectionDto$1["DESC"] = "desc";
697
+ return SortDirectionDto$1;
698
+ }(SortDirectionDto || {});
694
699
  var SortUtil = class {
695
700
  static toDto(sort, sortKeyMap) {
696
701
  return sort.filter((s) => s.direction !== null).map((s) => ({
697
702
  key: sortKeyMap[s.key],
698
- order: s.direction === "asc" ? "asc" : "desc"
703
+ order: s.direction === "asc" ? SortDirectionDto.ASC : SortDirectionDto.DESC
699
704
  }));
700
705
  }
701
706
  };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "type": "module",
7
- "version": "2.0.3",
7
+ "version": "2.0.4",
8
8
  "license": "SEE LICENSE IN LICENSE.md",
9
9
  "repository": {
10
10
  "type": "git",
@@ -58,6 +58,6 @@
58
58
  "lint": "eslint .",
59
59
  "lint:fix": "eslint . --fix",
60
60
  "test": "vitest --run",
61
- "typecheck": "pnpm tsc"
61
+ "type-check": "pnpm tsc"
62
62
  }
63
63
  }