@ryneex/api-client 1.0.0-beta.0 → 1.0.0-beta.1

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.
Files changed (3) hide show
  1. package/index.d.ts +2 -0
  2. package/index.js +2 -0
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -33,6 +33,8 @@ declare function createClient(axios: AxiosInstance): {
33
33
  create: <TOutputSchema extends z.ZodType, TInputSchema extends z.ZodType, TVariablesSchema extends z.ZodType, TOutput = z.core.output<TOutputSchema>, TInput = z.core.output<TInputSchema>, TVariables = z.core.output<TVariablesSchema>>(opts: ClientOptions<TOutputSchema, TInputSchema, TVariablesSchema, TOutput, TInput, TVariables>) => ((_payload: OptionalPayload<ClientPayload<TInput, TVariables>>) => Promise<axios.AxiosResponse<TOutput, any, {}>>) & {
34
34
  queryOptions: (_opts: object extends ClientPayload<TInput, TVariables> ? ReactQueryOptions<TOutput, TInput, TVariables> | void : ReactQueryOptions<TOutput, TInput, TVariables>) => UseQueryOptions<TOutput, ZodError<TOutput> | AxiosError>;
35
35
  mutationOptions: (_opts: ReactMutationOptions<TOutput, TInput, TVariables> | void) => UseMutationOptions<TOutput, ZodError<TOutput> | AxiosError, object extends ClientPayload<TInput, TVariables> ? void : ClientPayload<TInput, TVariables>>;
36
+ queryKey: (data?: ClientPayload<TInput, TVariables>) => (string | ClientPayload<TInput, TVariables>)[];
37
+ mutationKey: () => string[];
36
38
  config: {
37
39
  inputSchema: undefined extends TInputSchema ? undefined : NonNullable<TInputSchema>;
38
40
  variablesSchema: undefined extends TVariablesSchema ? undefined : NonNullable<TVariablesSchema>;
package/index.js CHANGED
@@ -101,6 +101,8 @@ function createClient(axios) {
101
101
  return Object.assign(call, {
102
102
  queryOptions,
103
103
  mutationOptions,
104
+ queryKey,
105
+ mutationKey,
104
106
  config: {
105
107
  ...apiOptionas,
106
108
  inputSchema: opts.inputSchema,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@ryneex/api-client",
3
3
  "module": "src/index.ts",
4
4
  "type": "module",
5
- "version": "1.0.0-beta.0",
5
+ "version": "1.0.0-beta.1",
6
6
  "exports": {
7
7
  ".": "./index.js"
8
8
  },