@okam/directus-query 1.4.0 → 1.4.2

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/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ ## 1.4.2 (2025-07-24)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - update vite-plugin-dts to version 3 ([5d33c77](https://github.com/OKAMca/stack/commit/5d33c77))
6
+ - package deps error ([b665a45](https://github.com/OKAMca/stack/commit/b665a45))
7
+ - search field icon ([0850fde](https://github.com/OKAMca/stack/commit/0850fde))
8
+
9
+ ### 🧱 Updated Dependencies
10
+
11
+ - Updated core-lib to 1.17.0
12
+
13
+ ### ❤️ Thank You
14
+
15
+ - Marie-Maxime Tanguay
16
+ - Pierre-Olivier Clerson @poclerson
17
+
1
18
  ## 1.3.0 (2024-11-06)
2
19
 
3
20
 
package/lib/init.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import { type TypedDocumentNode } from '@graphql-typed-document-node/core';
2
2
  import { GraphQLClient } from 'graphql-request';
3
+ import type { Variables } from 'graphql-request';
3
4
  import type { RequestConfig } from 'node_modules/graphql-request/build/legacy/helpers/types';
4
5
  declare const initDirectusQuery: (graphqlEndPoint?: string, requestConfig?: RequestConfig) => {
5
- queryGql: <TResult, TVariables extends object>(document: TypedDocumentNode<TResult, TVariables>, queryKey?: TVariables | undefined) => Promise<TResult>;
6
+ queryGql: <TResult, TVariables extends Variables>(document: TypedDocumentNode<TResult, TVariables>, queryKey?: TVariables) => Promise<TResult>;
6
7
  client: GraphQLClient;
7
8
  };
8
9
  export default initDirectusQuery;
@@ -0,0 +1,4 @@
1
+ import type { TGQLQueryContextProps, TGQLQueryProviderProps } from './interface';
2
+ declare const useGql: () => TGQLQueryContextProps;
3
+ export { useGql };
4
+ export declare function GqlQueryContextProvider({ children, client }: Readonly<TGQLQueryProviderProps>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { type TypedDocumentNode } from '@graphql-typed-document-node/core';
2
+ import type { UseQueryResult } from '@tanstack/react-query';
3
+ import type { GraphQLClient, Variables } from 'graphql-request';
4
+ import type React from 'react';
5
+ export type TGQLQueryProviderProps = {
6
+ children: React.ReactNode;
7
+ client: GraphQLClient;
8
+ };
9
+ export type TGQLQueryContextProps = {
10
+ useGqlQuery: <TResult, TVariables extends Variables>(document: TypedDocumentNode<TResult, TVariables>, queryKey?: TVariables) => UseQueryResult;
11
+ };
package/package.json CHANGED
@@ -1,12 +1,18 @@
1
1
  {
2
2
  "name": "@okam/directus-query",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
7
7
  ".": {
8
- "import": "./index.mjs",
9
- "require": "./index.js"
8
+ "import": {
9
+ "types": "./index.d.ts",
10
+ "default": "./index.mjs"
11
+ },
12
+ "require": {
13
+ "types": "./index.d.ts",
14
+ "default": "./index.js"
15
+ }
10
16
  }
11
17
  },
12
18
  "publishConfig": {
@@ -18,7 +24,7 @@
18
24
  "dependencies": {
19
25
  "@graphql-codegen/cli": "^5.0.3",
20
26
  "@graphql-typed-document-node/core": "3.2.0",
21
- "@okam/core-lib": "1.16.0",
27
+ "@okam/core-lib": "1.17.0",
22
28
  "@okam/logger": "1.1.0",
23
29
  "@tanstack/react-query": "^5.62.3",
24
30
  "graphql-request": "^7.1.2",
package/server.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export * from './lib/query';
2
+ export { default as initDirectusQuery } from './lib/init';
3
+ export { logger as DirectusQueryLogger } from './logger';