@wisemen/vue-core-api-utils 2.0.1 → 2.0.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.
package/dist/index.d.mts CHANGED
@@ -221,10 +221,7 @@ interface UseMutationReturnType<TReqData, TResData, TParams = void, TErrorCode e
221
221
  declare function useMutation<TReqData = void, TResData = void, TParams = void, TErrorCode extends string = RegisteredErrorCodes>(options: UseMutationOptions<TReqData, TResData, TParams, TErrorCode>): UseMutationReturnType<TReqData, TResData, TParams, TErrorCode>;
222
222
  //#endregion
223
223
  //#region src/types/sort.type.d.ts
224
- declare enum SortDirection {
225
- ASC = "asc",
226
- DESC = "desc",
227
- }
224
+ type SortDirection = 'asc' | 'desc';
228
225
  interface Sort<TKey extends string = string> {
229
226
  direction: SortDirection;
230
227
  key: TKey;
@@ -847,4 +844,4 @@ declare class SortUtil {
847
844
  }[];
848
845
  }
849
846
  //#endregion
850
- export { type ApiError, type ApiErrorObject, ApiErrorUtil, type ApiExpectedError, type ApiKnownErrorObject, type ApiResult, type ApiUnexpectedError, type ApiUnknownErrorObject, ApiUtil, type AsyncApiResult, AsyncResult, AsyncResultErr, AsyncResultLoading, AsyncResultOk, type InfiniteQueryOptions, type KeysetInfiniteQueryOptions, type KeysetPagination, type KeysetPaginationParams, type KeysetPaginationResponse, type KeysetPaginationResult, type OffsetInfiniteQueryOptions, type OffsetPagination, type OffsetPaginationParams, type OffsetPaginationResponse, type OffsetPaginationResult, type PaginatedDataDto, type PrefetchKeysetInfiniteQueryOptions, type PrefetchOffsetInfiniteQueryOptions, QueryClient, type QueryClientUpdateOptions, type QueryClientUpdateResult, type QueryConfig, type QueryParams, type Register, type RegisteredApiUseMutationOptions, type RegisteredErrorCodes, type RegisteredQueryKeyInput, type RegisteredQueryKeys, type Sort, SortDirection, SortUtil, type TanstackQueryClient, type UseKeysetInfiniteQueryReturnType, type UseMutationOptions, type UseMutationReturnType, type UseOffsetInfiniteQueryReturnType, type UseQueryOptions, type UseQueryReturnType, type WithFilterQuery, type WithSearchQuery, type WithSortQuery, type WithStaticFilterQuery, apiUtilsPlugin, getQueryClient as getTanstackQueryClient, initializeApiUtils, setQueryConfig, useKeysetInfiniteQuery, useMutation, useOffsetInfiniteQuery, usePrefetchKeysetInfiniteQuery, usePrefetchOffsetInfiniteQuery, usePrefetchQuery, useQuery };
847
+ export { type ApiError, type ApiErrorObject, ApiErrorUtil, type ApiExpectedError, type ApiKnownErrorObject, type ApiResult, type ApiUnexpectedError, type ApiUnknownErrorObject, ApiUtil, type AsyncApiResult, AsyncResult, AsyncResultErr, AsyncResultLoading, AsyncResultOk, type InfiniteQueryOptions, type KeysetInfiniteQueryOptions, type KeysetPagination, type KeysetPaginationParams, type KeysetPaginationResponse, type KeysetPaginationResult, type OffsetInfiniteQueryOptions, type OffsetPagination, type OffsetPaginationParams, type OffsetPaginationResponse, type OffsetPaginationResult, type PaginatedDataDto, type PrefetchKeysetInfiniteQueryOptions, type PrefetchOffsetInfiniteQueryOptions, QueryClient, type QueryClientUpdateOptions, type QueryClientUpdateResult, type QueryConfig, type QueryParams, type Register, type RegisteredApiUseMutationOptions, type RegisteredErrorCodes, type RegisteredQueryKeyInput, type RegisteredQueryKeys, type Sort, type SortDirection, SortUtil, type TanstackQueryClient, type UseKeysetInfiniteQueryReturnType, type UseMutationOptions, type UseMutationReturnType, type UseOffsetInfiniteQueryReturnType, type UseQueryOptions, type UseQueryReturnType, type WithFilterQuery, type WithSearchQuery, type WithSortQuery, type WithStaticFilterQuery, apiUtilsPlugin, getQueryClient as getTanstackQueryClient, initializeApiUtils, setQueryConfig, useKeysetInfiniteQuery, useMutation, useOffsetInfiniteQuery, usePrefetchKeysetInfiniteQuery, usePrefetchOffsetInfiniteQuery, usePrefetchQuery, useQuery };
package/dist/index.mjs CHANGED
@@ -496,14 +496,6 @@ function apiUtilsPlugin(config) {
496
496
  } };
497
497
  }
498
498
 
499
- //#endregion
500
- //#region src/types/sort.type.ts
501
- let SortDirection = /* @__PURE__ */ function(SortDirection$1) {
502
- SortDirection$1["ASC"] = "asc";
503
- SortDirection$1["DESC"] = "desc";
504
- return SortDirection$1;
505
- }({});
506
-
507
499
  //#endregion
508
500
  //#region src/utils/api-error/apiError.util.ts
509
501
  var ApiErrorUtil = class ApiErrorUtil {
@@ -703,10 +695,10 @@ var SortUtil = class {
703
695
  static toDto(sort, sortKeyMap) {
704
696
  return sort.filter((s) => s.direction !== null).map((s) => ({
705
697
  key: sortKeyMap[s.key],
706
- order: s.direction === SortDirection.ASC ? SortDirection.ASC : SortDirection.DESC
698
+ order: s.direction === "asc" ? "asc" : "desc"
707
699
  }));
708
700
  }
709
701
  };
710
702
 
711
703
  //#endregion
712
- export { ApiErrorUtil, ApiUtil, AsyncResult, AsyncResultErr, AsyncResultLoading, AsyncResultOk, QueryClient, SortDirection, SortUtil, apiUtilsPlugin, getQueryClient as getTanstackQueryClient, initializeApiUtils, setQueryConfig, useKeysetInfiniteQuery, useMutation, useOffsetInfiniteQuery, usePrefetchKeysetInfiniteQuery, usePrefetchOffsetInfiniteQuery, usePrefetchQuery, useQuery };
704
+ export { ApiErrorUtil, ApiUtil, AsyncResult, AsyncResultErr, AsyncResultLoading, AsyncResultOk, QueryClient, SortUtil, apiUtilsPlugin, getQueryClient as getTanstackQueryClient, initializeApiUtils, setQueryConfig, useKeysetInfiniteQuery, useMutation, useOffsetInfiniteQuery, usePrefetchKeysetInfiniteQuery, usePrefetchOffsetInfiniteQuery, usePrefetchQuery, useQuery };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "type": "module",
7
- "version": "2.0.1",
7
+ "version": "2.0.3",
8
8
  "license": "SEE LICENSE IN LICENSE.md",
9
9
  "repository": {
10
10
  "type": "git",
@@ -33,10 +33,10 @@
33
33
  "skills"
34
34
  ],
35
35
  "peerDependencies": {
36
- "@tanstack/vue-query": ">=5.90.5",
37
- "neverthrow": ">=8.2.0",
38
- "zod": ">=4.3.5",
39
- "vue": ">=3.5.22"
36
+ "@tanstack/vue-query": "^5.100.6",
37
+ "neverthrow": "^8.2.0",
38
+ "zod": "^4.3.5",
39
+ "vue": "^3.5.27"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@tanstack/intent": "^0.0.29",
@@ -46,7 +46,7 @@
46
46
  "typescript": "5.9.3",
47
47
  "vue": "3.5.27",
48
48
  "vitest": "4.1.0",
49
- "@wisemen/eslint-config-vue": "2.1.3"
49
+ "@wisemen/eslint-config-vue": "2.1.4"
50
50
  },
51
51
  "scripts": {
52
52
  "build": "tsdown",