@ethlete/query 5.40.1 → 5.41.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.
- package/CHANGELOG.md +12 -0
- package/fesm2022/ethlete-query.mjs +114 -138
- package/fesm2022/ethlete-query.mjs.map +1 -1
- package/index.d.ts +3591 -20
- package/package.json +5 -5
- package/lib/auth/auth-provider.types.d.ts +0 -133
- package/lib/auth/auth-provider.utils.d.ts +0 -9
- package/lib/auth/basic-auth-provider.d.ts +0 -10
- package/lib/auth/bearer-auth-provider.d.ts +0 -23
- package/lib/auth/custom-header-auth-provider.d.ts +0 -9
- package/lib/auth/index.d.ts +0 -5
- package/lib/class-validator/class-validator.types.d.ts +0 -6
- package/lib/class-validator/class-validator.utils.d.ts +0 -2
- package/lib/class-validator/index.d.ts +0 -2
- package/lib/devtools/components/query-devtools/index.d.ts +0 -1
- package/lib/devtools/components/query-devtools/query-devtools.component.d.ts +0 -151
- package/lib/devtools/pipes/index.d.ts +0 -1
- package/lib/devtools/pipes/query-short-name.pipe.d.ts +0 -8
- package/lib/devtools/utils/index.d.ts +0 -1
- package/lib/devtools/utils/query-client.utils.d.ts +0 -12
- package/lib/directives/index.d.ts +0 -3
- package/lib/directives/infinity-query-trigger.directive.d.ts +0 -15
- package/lib/directives/infinity-query.directive.d.ts +0 -49
- package/lib/directives/query.directive.d.ts +0 -64
- package/lib/entity/entity-store.d.ts +0 -25
- package/lib/entity/entity.types.d.ts +0 -25
- package/lib/entity/entity.utils.d.ts +0 -12
- package/lib/entity/index.d.ts +0 -3
- package/lib/experimental/auth/bearer-auth-provider-config.d.ts +0 -123
- package/lib/experimental/auth/bearer-auth-provider.d.ts +0 -69
- package/lib/experimental/auth/index.d.ts +0 -2
- package/lib/experimental/gql/gql-query-creator-templates.d.ts +0 -12
- package/lib/experimental/gql/gql-query-creator.d.ts +0 -14
- package/lib/experimental/gql/gql-query-execute.d.ts +0 -11
- package/lib/experimental/gql/gql-query.d.ts +0 -12
- package/lib/experimental/gql/index.d.ts +0 -4
- package/lib/experimental/http/http-request.d.ts +0 -119
- package/lib/experimental/http/index.d.ts +0 -21
- package/lib/experimental/http/paged-query-stack.d.ts +0 -172
- package/lib/experimental/http/query-client-config.d.ts +0 -45
- package/lib/experimental/http/query-client.d.ts +0 -10
- package/lib/experimental/http/query-creator-templates.d.ts +0 -24
- package/lib/experimental/http/query-creator.d.ts +0 -82
- package/lib/experimental/http/query-dependencies.d.ts +0 -26
- package/lib/experimental/http/query-error-response.d.ts +0 -19
- package/lib/experimental/http/query-errors.d.ts +0 -56
- package/lib/experimental/http/query-execute-utils.d.ts +0 -42
- package/lib/experimental/http/query-execute.d.ts +0 -25
- package/lib/experimental/http/query-features.d.ts +0 -121
- package/lib/experimental/http/query-repository.d.ts +0 -69
- package/lib/experimental/http/query-snapshot.d.ts +0 -10
- package/lib/experimental/http/query-stack.d.ts +0 -109
- package/lib/experimental/http/query-state.d.ts +0 -41
- package/lib/experimental/http/query-utils.d.ts +0 -61
- package/lib/experimental/http/query.d.ts +0 -75
- package/lib/experimental/http/secure-query-creator.d.ts +0 -7
- package/lib/experimental/http/secure-query-execute.d.ts +0 -7
- package/lib/experimental/http/secure-query.d.ts +0 -6
- package/lib/experimental/index.d.ts +0 -6
- package/lib/experimental/interop/index.d.ts +0 -2
- package/lib/experimental/interop/legacy-query-creator.d.ts +0 -45
- package/lib/experimental/interop/legacy-query.d.ts +0 -38
- package/lib/experimental/pipes/index.d.ts +0 -4
- package/lib/experimental/pipes/parse-http-error-code-de.d.ts +0 -3
- package/lib/experimental/pipes/parse-http-error-code-de.pipe.d.ts +0 -12
- package/lib/experimental/pipes/parse-http-error-code-en.d.ts +0 -3
- package/lib/experimental/pipes/parse-http-error-code-en.pipe.d.ts +0 -12
- package/lib/experimental/ws/index.d.ts +0 -2
- package/lib/experimental/ws/web-socket-client-config.d.ts +0 -17
- package/lib/experimental/ws/web-socket-client.d.ts +0 -37
- package/lib/experimental/ws/web-socket-errors.d.ts +0 -7
- package/lib/gql/gql.d.ts +0 -10
- package/lib/gql/index.d.ts +0 -1
- package/lib/infinite-query/index.d.ts +0 -3
- package/lib/infinite-query/infinity-query.d.ts +0 -30
- package/lib/infinite-query/infinity-query.types.d.ts +0 -105
- package/lib/infinite-query/infinity-query.utils.d.ts +0 -5
- package/lib/logger/index.d.ts +0 -1
- package/lib/logger/logger.d.ts +0 -12
- package/lib/query/index.d.ts +0 -3
- package/lib/query/query.d.ts +0 -60
- package/lib/query/query.types.d.ts +0 -397
- package/lib/query/query.utils.d.ts +0 -83
- package/lib/query-client/index.d.ts +0 -3
- package/lib/query-client/query-client.d.ts +0 -29
- package/lib/query-client/query-client.types.d.ts +0 -82
- package/lib/query-client/query-client.utils.d.ts +0 -4
- package/lib/query-creator/index.d.ts +0 -2
- package/lib/query-creator/query-creator.d.ts +0 -20
- package/lib/query-creator/query-creator.types.d.ts +0 -14
- package/lib/query-form/index.d.ts +0 -3
- package/lib/query-form/query-form.d.ts +0 -136
- package/lib/query-form/query-form.types.d.ts +0 -155
- package/lib/query-form/query-form.utils.d.ts +0 -15
- package/lib/query-store/index.d.ts +0 -1
- package/lib/query-store/query-store.d.ts +0 -31
- package/lib/request/index.d.ts +0 -3
- package/lib/request/request.d.ts +0 -3
- package/lib/request/request.types.d.ts +0 -131
- package/lib/request/request.util.d.ts +0 -26
- package/lib/symfony/index.d.ts +0 -2
- package/lib/symfony/symfony.types.d.ts +0 -19
- package/lib/symfony/symfony.utils.d.ts +0 -6
- package/lib/utils/data.utils.d.ts +0 -64
- package/lib/utils/deep-freeze.util.d.ts +0 -1
- package/lib/utils/def.util.d.ts +0 -7
- package/lib/utils/index.d.ts +0 -3
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { QueryArgs, QueryClientRef, QueryCreator, RequestArgs, ResponseType } from '../http';
|
|
3
|
-
import { BearerAuthProvider } from './bearer-auth-provider';
|
|
4
|
-
export type BearerAuthProviderTokens = {
|
|
5
|
-
accessToken: string;
|
|
6
|
-
refreshToken: string;
|
|
7
|
-
};
|
|
8
|
-
export type BearerAuthProviderRouteConfig<TArgs extends QueryArgs> = {
|
|
9
|
-
queryCreator: QueryCreator<TArgs>;
|
|
10
|
-
/**
|
|
11
|
-
* A function that transforms the response into the format that the auth provider expects
|
|
12
|
-
*
|
|
13
|
-
* The expected format is an object with the `accessToken` and `refreshToken` properties.
|
|
14
|
-
*
|
|
15
|
-
* @default (response) => response
|
|
16
|
-
*/
|
|
17
|
-
responseTransformer?: (response: ResponseType<TArgs>) => BearerAuthProviderTokens;
|
|
18
|
-
};
|
|
19
|
-
export type BearerAuthProviderCookieConfig<TTokenRefreshArgs extends QueryArgs> = {
|
|
20
|
-
/**
|
|
21
|
-
* The cookie name where the refresh token is stored
|
|
22
|
-
* @default 'etAuth'
|
|
23
|
-
*/
|
|
24
|
-
name?: string;
|
|
25
|
-
/**
|
|
26
|
-
* The domain of the cookie. If not set, the current origin will be used.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* "https://example.com" -> "example.com"
|
|
30
|
-
* "https://sub.example.com" -> "example.com"
|
|
31
|
-
*/
|
|
32
|
-
domain?: string;
|
|
33
|
-
/**
|
|
34
|
-
* The days until the cookie expires
|
|
35
|
-
* @default 30
|
|
36
|
-
*/
|
|
37
|
-
expiresInDays?: number;
|
|
38
|
-
/**
|
|
39
|
-
* The path of the cookie
|
|
40
|
-
* @default '/'
|
|
41
|
-
*/
|
|
42
|
-
path?: string;
|
|
43
|
-
/**
|
|
44
|
-
* Enable or disable the cookie
|
|
45
|
-
* @default true
|
|
46
|
-
*/
|
|
47
|
-
enabled?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* The same site property of the cookie
|
|
50
|
-
* @default 'lax'
|
|
51
|
-
*/
|
|
52
|
-
sameSite?: 'strict' | 'none' | 'lax';
|
|
53
|
-
/**
|
|
54
|
-
* A function that turns the token gotten from the cookie into the body for the refresh token request
|
|
55
|
-
* @default (token) => ({ token })
|
|
56
|
-
*/
|
|
57
|
-
refreshArgsTransformer?: (token: string) => RequestArgs<TTokenRefreshArgs>;
|
|
58
|
-
/**
|
|
59
|
-
* An array of routes where the auto login via cookie should not be triggered.
|
|
60
|
-
*
|
|
61
|
-
* This checks the current route against the array of routes using the `startsWith` method.
|
|
62
|
-
* Make sure to start each route with a `/`.
|
|
63
|
-
*
|
|
64
|
-
* @default []
|
|
65
|
-
* @example ['/login', '/register']
|
|
66
|
-
*/
|
|
67
|
-
autoLoginExcludeRoutes?: string[];
|
|
68
|
-
};
|
|
69
|
-
export type CreateBearerAuthProviderConfigOptions<TLoginArgs extends QueryArgs, TTokenLoginArgs extends QueryArgs, TTokenRefreshArgs extends QueryArgs, TSelectRoleArgs extends QueryArgs, TBearerData> = {
|
|
70
|
-
/**
|
|
71
|
-
* The name of the auth provider
|
|
72
|
-
*/
|
|
73
|
-
name: string;
|
|
74
|
-
/**
|
|
75
|
-
* The query client reference
|
|
76
|
-
*/
|
|
77
|
-
queryClientRef: QueryClientRef;
|
|
78
|
-
/**
|
|
79
|
-
* The login route configuration
|
|
80
|
-
*/
|
|
81
|
-
login?: BearerAuthProviderRouteConfig<TLoginArgs>;
|
|
82
|
-
/**
|
|
83
|
-
* The token login route configuration
|
|
84
|
-
*/
|
|
85
|
-
tokenLogin?: BearerAuthProviderRouteConfig<TTokenLoginArgs>;
|
|
86
|
-
/**
|
|
87
|
-
* The token refresh route configuration
|
|
88
|
-
*/
|
|
89
|
-
tokenRefresh?: BearerAuthProviderRouteConfig<TTokenRefreshArgs>;
|
|
90
|
-
/**
|
|
91
|
-
* The select role route configuration
|
|
92
|
-
*/
|
|
93
|
-
selectRole?: BearerAuthProviderRouteConfig<TSelectRoleArgs>;
|
|
94
|
-
/**
|
|
95
|
-
* The cookie configuration for the auth provider
|
|
96
|
-
*/
|
|
97
|
-
cookie?: BearerAuthProviderCookieConfig<TTokenRefreshArgs>;
|
|
98
|
-
/**
|
|
99
|
-
* The time in milliseconds before the token expires when the refresh should be triggered.
|
|
100
|
-
* @default 300000 // (5 minutes)
|
|
101
|
-
*/
|
|
102
|
-
refreshBuffer?: number;
|
|
103
|
-
/**
|
|
104
|
-
* The expires in property name inside the jwt body
|
|
105
|
-
* @default 'exp'
|
|
106
|
-
*/
|
|
107
|
-
expiresInPropertyName?: string;
|
|
108
|
-
/**
|
|
109
|
-
* Determines if the token should be refreshed if **any** query returns a 401 response.
|
|
110
|
-
* @default true
|
|
111
|
-
*/
|
|
112
|
-
refreshOnUnauthorizedResponse?: boolean;
|
|
113
|
-
/**
|
|
114
|
-
* A function that decrypts the bearer token
|
|
115
|
-
*/
|
|
116
|
-
bearerDecryptFn?: (token: string) => TBearerData;
|
|
117
|
-
};
|
|
118
|
-
export type BearerAuthProviderConfig<TLoginArgs extends QueryArgs, TTokenLoginArgs extends QueryArgs, TTokenRefreshArgs extends QueryArgs, TSelectRoleArgs extends QueryArgs, TBearerData> = CreateBearerAuthProviderConfigOptions<TLoginArgs, TTokenLoginArgs, TTokenRefreshArgs, TSelectRoleArgs, TBearerData> & {
|
|
119
|
-
token: BearerAuthProviderRef<TLoginArgs, TTokenLoginArgs, TTokenRefreshArgs, TSelectRoleArgs, TBearerData>;
|
|
120
|
-
};
|
|
121
|
-
export type AnyBearerAuthProviderConfig = BearerAuthProviderConfig<any, any, any, any, any>;
|
|
122
|
-
export type BearerAuthProviderRef<TLoginArgs extends QueryArgs, TTokenLoginArgs extends QueryArgs, TTokenRefreshArgs extends QueryArgs, TSelectRoleArgs extends QueryArgs, TBearerData> = InjectionToken<BearerAuthProvider<TLoginArgs, TTokenLoginArgs, TTokenRefreshArgs, TSelectRoleArgs, TBearerData>>;
|
|
123
|
-
export declare const createBearerAuthProviderConfig: <TLoginArgs extends QueryArgs, TTokenLoginArgs extends QueryArgs, TTokenRefreshArgs extends QueryArgs, TSelectRoleArgs extends QueryArgs, TBearerData>(options: CreateBearerAuthProviderConfigOptions<TLoginArgs, TTokenLoginArgs, TTokenRefreshArgs, TSelectRoleArgs, TBearerData>) => BearerAuthProviderConfig<TLoginArgs, TTokenLoginArgs, TTokenRefreshArgs, TSelectRoleArgs, TBearerData>;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { Signal } from '@angular/core';
|
|
2
|
-
import { QueryArgs, QuerySnapshot, RequestArgs } from '../http';
|
|
3
|
-
import { BearerAuthProviderConfig, BearerAuthProviderTokens } from './bearer-auth-provider-config';
|
|
4
|
-
type QuerySnapshotWithType<TLoginArgs extends QueryArgs, TTokenLoginArgs extends QueryArgs, TTokenRefreshArgs extends QueryArgs, TSelectRoleArgs extends QueryArgs> = ({
|
|
5
|
-
type: 'login';
|
|
6
|
-
} & QuerySnapshot<TLoginArgs>) | ({
|
|
7
|
-
type: 'tokenLogin';
|
|
8
|
-
} & QuerySnapshot<TTokenLoginArgs>) | ({
|
|
9
|
-
type: 'tokenRefresh';
|
|
10
|
-
} & QuerySnapshot<TTokenRefreshArgs>) | ({
|
|
11
|
-
type: 'selectRole';
|
|
12
|
-
} & QuerySnapshot<TSelectRoleArgs>);
|
|
13
|
-
export type BearerAuthProvider<TLoginArgs extends QueryArgs, TTokenLoginArgs extends QueryArgs, TTokenRefreshArgs extends QueryArgs, TSelectRoleArgs extends QueryArgs, TBearerData> = {
|
|
14
|
-
/**
|
|
15
|
-
* Logs in the user with the given args.
|
|
16
|
-
*/
|
|
17
|
-
login: (args: RequestArgs<TLoginArgs>) => QuerySnapshot<TLoginArgs>;
|
|
18
|
-
/**
|
|
19
|
-
* Logs in the user with the given token.
|
|
20
|
-
*/
|
|
21
|
-
loginWithToken: (args: RequestArgs<TTokenLoginArgs>) => QuerySnapshot<TTokenLoginArgs>;
|
|
22
|
-
/**
|
|
23
|
-
* Refreshes the token with the given refresh token.
|
|
24
|
-
*/
|
|
25
|
-
refreshToken: (args: RequestArgs<TTokenRefreshArgs>) => QuerySnapshot<TTokenRefreshArgs>;
|
|
26
|
-
/**
|
|
27
|
-
* Selects the role for the user.
|
|
28
|
-
*/
|
|
29
|
-
selectRole: (args: RequestArgs<TSelectRoleArgs>) => QuerySnapshot<TSelectRoleArgs>;
|
|
30
|
-
/**
|
|
31
|
-
* Logs out the user and removes the cookie.
|
|
32
|
-
*/
|
|
33
|
-
logout: () => void;
|
|
34
|
-
/**
|
|
35
|
-
* Enables cookie usage for the auth provider.
|
|
36
|
-
*/
|
|
37
|
-
enableCookie: () => void;
|
|
38
|
-
/**
|
|
39
|
-
* Disables cookie usage for the auth provider and removes the cookie.
|
|
40
|
-
*/
|
|
41
|
-
disableCookie: () => void;
|
|
42
|
-
/**
|
|
43
|
-
* Checks if the cookie is present.
|
|
44
|
-
*/
|
|
45
|
-
isCookiePresent: () => boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Tries to login with the given cookie config.
|
|
48
|
-
* Returns `true` if a cookie was found, `false` otherwise.
|
|
49
|
-
*/
|
|
50
|
-
tryLoginWithCookie: () => boolean;
|
|
51
|
-
/**
|
|
52
|
-
* The latest executed query that was not triggered internally.
|
|
53
|
-
*/
|
|
54
|
-
latestExecutedQuery: Signal<QuerySnapshotWithType<TLoginArgs, TTokenLoginArgs, TTokenRefreshArgs, TSelectRoleArgs> | null>;
|
|
55
|
-
/**
|
|
56
|
-
* A signal that contains the current access and refresh tokens.
|
|
57
|
-
*/
|
|
58
|
-
tokens: Signal<BearerAuthProviderTokens | null>;
|
|
59
|
-
/**
|
|
60
|
-
* The bearer data that was decrypted from the access token.
|
|
61
|
-
*/
|
|
62
|
-
bearerData: Signal<TBearerData | null>;
|
|
63
|
-
};
|
|
64
|
-
export declare const createBearerAuthProvider: <TLoginArgs extends QueryArgs, TTokenLoginArgs extends QueryArgs, TTokenRefreshArgs extends QueryArgs, TSelectRoleArgs extends QueryArgs, TBearerData>(options: BearerAuthProviderConfig<TLoginArgs, TTokenLoginArgs, TTokenRefreshArgs, TSelectRoleArgs, TBearerData>) => BearerAuthProvider<TLoginArgs, TTokenLoginArgs, TTokenRefreshArgs, TSelectRoleArgs, TBearerData>;
|
|
65
|
-
export declare const provideBearerAuthProvider: <TLoginArgs extends QueryArgs, TTokenLoginArgs extends QueryArgs, TTokenRefreshArgs extends QueryArgs, TSelectRoleArgs extends QueryArgs, TBearerData>(config: BearerAuthProviderConfig<TLoginArgs, TTokenLoginArgs, TTokenRefreshArgs, TSelectRoleArgs, TBearerData>) => {
|
|
66
|
-
provide: import("./bearer-auth-provider-config").BearerAuthProviderRef<TLoginArgs, TTokenLoginArgs, TTokenRefreshArgs, TSelectRoleArgs, TBearerData>;
|
|
67
|
-
useFactory: () => BearerAuthProvider<TLoginArgs, TTokenLoginArgs, TTokenRefreshArgs, TSelectRoleArgs, TBearerData>;
|
|
68
|
-
};
|
|
69
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { GQL } from '../../gql';
|
|
2
|
-
import { QueryClientConfig } from '../http';
|
|
3
|
-
import { GqlQueryArgs } from './gql-query';
|
|
4
|
-
import { CreateGqlQueryCreatorOptions } from './gql-query-creator';
|
|
5
|
-
/** A query creator that creates a GQL query where the payload is sent via GET (query params) */
|
|
6
|
-
export declare const createGqlQueryViaGet: (client: QueryClientConfig) => <TArgs extends GqlQueryArgs>(query: GQL, creatorOptions?: CreateGqlQueryCreatorOptions<TArgs>) => import("../http").QueryCreator<TArgs>;
|
|
7
|
-
/** A query creator that creates a GQL query where the payload is sent via POST (body) */
|
|
8
|
-
export declare const createGqlQueryViaPost: (client: QueryClientConfig) => <TArgs extends GqlQueryArgs>(query: GQL, creatorOptions?: CreateGqlQueryCreatorOptions<TArgs>) => import("../http").QueryCreator<TArgs>;
|
|
9
|
-
/** A query creator that creates a GQL mutation where the payload is sent via GET (query params) */
|
|
10
|
-
export declare const createGqlMutationViaGet: (client: QueryClientConfig) => <TArgs extends GqlQueryArgs>(query: GQL, creatorOptions?: CreateGqlQueryCreatorOptions<TArgs>) => import("../http").QueryCreator<TArgs>;
|
|
11
|
-
/** A query creator that creates a GQL mutation where the payload is sent via POST (body) */
|
|
12
|
-
export declare const createGqlMutationViaPost: (client: QueryClientConfig) => <TArgs extends GqlQueryArgs>(query: GQL, creatorOptions?: CreateGqlQueryCreatorOptions<TArgs>) => import("../http").QueryCreator<TArgs>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { CreateQueryCreatorOptions, QueryClientConfig, QueryCreator, RouteType } from '../http';
|
|
2
|
-
import { GqlQueryArgs } from './gql-query';
|
|
3
|
-
export type CreateGqlQueryCreatorOptions<TArgs extends GqlQueryArgs> = Omit<CreateQueryCreatorOptions, 'route'> & {
|
|
4
|
-
route?: RouteType<TArgs>;
|
|
5
|
-
};
|
|
6
|
-
export type GqlQueryMethod = 'QUERY' | 'MUTATE';
|
|
7
|
-
export type GqlQueryTransport = 'GET' | 'POST';
|
|
8
|
-
export type InternalCreateGqlQueryCreatorOptions = {
|
|
9
|
-
method: GqlQueryMethod;
|
|
10
|
-
transport: GqlQueryTransport;
|
|
11
|
-
client: QueryClientConfig;
|
|
12
|
-
query: string;
|
|
13
|
-
};
|
|
14
|
-
export declare const createGqlQueryCreator: <TArgs extends GqlQueryArgs>(options: CreateGqlQueryCreatorOptions<TArgs> | undefined, internals: InternalCreateGqlQueryCreatorOptions) => QueryCreator<TArgs>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { InternalQueryExecute, QueryArgs, QueryConfig, QueryDependencies, QueryState } from '../http';
|
|
2
|
-
import { GqlQueryArgs } from './gql-query';
|
|
3
|
-
import { CreateGqlQueryCreatorOptions, InternalCreateGqlQueryCreatorOptions } from './gql-query-creator';
|
|
4
|
-
export type CreateGqlQueryExecuteOptions<TArgs extends QueryArgs> = {
|
|
5
|
-
deps: QueryDependencies;
|
|
6
|
-
state: QueryState<TArgs>;
|
|
7
|
-
creator?: CreateGqlQueryCreatorOptions<TArgs>;
|
|
8
|
-
creatorInternals: InternalCreateGqlQueryCreatorOptions;
|
|
9
|
-
queryConfig: QueryConfig;
|
|
10
|
-
};
|
|
11
|
-
export declare const createGqlExecuteFn: <TArgs extends GqlQueryArgs>(executeOptions: CreateGqlQueryExecuteOptions<TArgs>) => InternalQueryExecute<TArgs>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { CreateQueryOptions, QueryArgs } from '../http';
|
|
2
|
-
import { CreateGqlQueryCreatorOptions, InternalCreateGqlQueryCreatorOptions } from './gql-query-creator';
|
|
3
|
-
export type GqlQueryArgs = QueryArgs & {
|
|
4
|
-
variables?: Record<string, unknown>;
|
|
5
|
-
};
|
|
6
|
-
export type CreateGqlQueryOptions<TArgs extends GqlQueryArgs> = Omit<CreateQueryOptions<TArgs>, 'creator' | 'creatorInternals'> & {
|
|
7
|
-
creator?: CreateGqlQueryCreatorOptions<TArgs>;
|
|
8
|
-
creatorInternals: InternalCreateGqlQueryCreatorOptions;
|
|
9
|
-
};
|
|
10
|
-
export type GqlVariablesType<T extends GqlQueryArgs | null> = T extends GqlQueryArgs ? T['variables'] : never;
|
|
11
|
-
export declare const isCreateGqlQueryOptions: <TArgs extends QueryArgs>(options: CreateQueryOptions<TArgs> | CreateGqlQueryOptions<TArgs>) => options is CreateGqlQueryOptions<TArgs>;
|
|
12
|
-
export declare const createGqlQuery: <TArgs extends GqlQueryArgs>(options: CreateGqlQueryOptions<TArgs>) => import("../http").Query<TArgs>;
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { HttpClient, HttpContext, HttpEvent } from '@angular/common/http';
|
|
2
|
-
import { ErrorHandler, Signal } from '@angular/core';
|
|
3
|
-
import { QueryArgs, RequestArgs, ResponseType } from './query';
|
|
4
|
-
import { CacheAdapterFn } from './query-client-config';
|
|
5
|
-
import { QueryMethod } from './query-creator';
|
|
6
|
-
import { QueryErrorResponse } from './query-error-response';
|
|
7
|
-
import { QueryRepositoryDependencies } from './query-repository';
|
|
8
|
-
import { ShouldRetryRequestFn } from './query-utils';
|
|
9
|
-
export declare const SPEED_BUFFER_TIME_IN_MS = 2000;
|
|
10
|
-
export type HttpRequestTransferCacheConfig = boolean | {
|
|
11
|
-
includeHeaders?: string[];
|
|
12
|
-
};
|
|
13
|
-
export type HttpRequestResponseType = 'json' | 'text' | 'blob' | 'arraybuffer';
|
|
14
|
-
export type CreateHttpRequestDependencies = {
|
|
15
|
-
/** The http client instance to use for the request */
|
|
16
|
-
httpClient: HttpClient;
|
|
17
|
-
/** The error handler instance to use for the request */
|
|
18
|
-
ngErrorHandler: ErrorHandler;
|
|
19
|
-
};
|
|
20
|
-
export type CreateHttpRequestClientOptions = {
|
|
21
|
-
/**
|
|
22
|
-
* Whether to report the progress of the request or not. If the fetch backend is used, this will only work for downloads.
|
|
23
|
-
* @see https://angular.dev/guide/http/making-requests#receiving-raw-progress-events
|
|
24
|
-
* @default false
|
|
25
|
-
*/
|
|
26
|
-
reportProgress?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Whether to include credentials in the request or not
|
|
29
|
-
* @default false
|
|
30
|
-
*/
|
|
31
|
-
withCredentials?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* This property accepts either a boolean to enable/disable transferring cache for eligible
|
|
34
|
-
* requests performed using `HttpClient`, or an object, which allows to configure cache
|
|
35
|
-
* parameters, such as which headers should be included (no headers are included by default).
|
|
36
|
-
*
|
|
37
|
-
* Setting this property will override the options passed to `provideClientHydration()` for this
|
|
38
|
-
* particular request
|
|
39
|
-
*/
|
|
40
|
-
transferCache?: HttpRequestTransferCacheConfig;
|
|
41
|
-
/**
|
|
42
|
-
* The response type of the request
|
|
43
|
-
* @default 'json'
|
|
44
|
-
*/
|
|
45
|
-
responseType?: HttpRequestResponseType;
|
|
46
|
-
/**
|
|
47
|
-
* The context of the request
|
|
48
|
-
* @default undefined
|
|
49
|
-
* @see https://angular.dev/guide/http/interceptors#request-and-response-metadata
|
|
50
|
-
*/
|
|
51
|
-
context?: HttpContext;
|
|
52
|
-
};
|
|
53
|
-
export type CreateHttpRequestOptions<TArgs extends QueryArgs> = {
|
|
54
|
-
/** The HTTP method of the request */
|
|
55
|
-
method: QueryMethod;
|
|
56
|
-
/**
|
|
57
|
-
* The full path of the request
|
|
58
|
-
* @example 'https://api.example.com/v1/users'
|
|
59
|
-
*/
|
|
60
|
-
fullPath: string;
|
|
61
|
-
/** The data of the request */
|
|
62
|
-
args?: RequestArgs<TArgs> | null;
|
|
63
|
-
/** The dependencies of the request */
|
|
64
|
-
dependencies: QueryRepositoryDependencies;
|
|
65
|
-
/** The client options of the request */
|
|
66
|
-
clientOptions?: CreateHttpRequestClientOptions;
|
|
67
|
-
/**
|
|
68
|
-
* The cache adapter function to use for the request
|
|
69
|
-
* @default extractExpiresInSeconds()
|
|
70
|
-
*/
|
|
71
|
-
cacheAdapter?: CacheAdapterFn;
|
|
72
|
-
/**
|
|
73
|
-
* The retry function to use for the request
|
|
74
|
-
* @default shouldRetryRequest()
|
|
75
|
-
*/
|
|
76
|
-
retryFn?: ShouldRetryRequestFn;
|
|
77
|
-
};
|
|
78
|
-
export type HttpRequestLoadingState = {
|
|
79
|
-
/** The time when the request was executed in ms */
|
|
80
|
-
executeTime: number;
|
|
81
|
-
/** The progress of the request. Null if reportProgress is false or progress is not available / unsupported */
|
|
82
|
-
progress: HttpRequestLoadingProgressState | null;
|
|
83
|
-
};
|
|
84
|
-
export type HttpRequestLoadingProgressState = {
|
|
85
|
-
/** The total number of bytes to be transferred */
|
|
86
|
-
total: number;
|
|
87
|
-
/** The number of bytes transferred */
|
|
88
|
-
loaded: number;
|
|
89
|
-
/** The percentage of the transfer that is completed */
|
|
90
|
-
percentage: number;
|
|
91
|
-
/** The speed of the transfer in bytes per millisecond */
|
|
92
|
-
speed: number | null;
|
|
93
|
-
/** The estimated remaining time in milliseconds */
|
|
94
|
-
remainingTime: number | null;
|
|
95
|
-
};
|
|
96
|
-
export type HttpRequest<TArgs extends QueryArgs> = {
|
|
97
|
-
/** Executes the request */
|
|
98
|
-
execute: (options?: {
|
|
99
|
-
allowCache?: boolean;
|
|
100
|
-
}) => boolean;
|
|
101
|
-
/** Destroys the request (cancels it if in progress) */
|
|
102
|
-
destroy: () => boolean;
|
|
103
|
-
/** The loading state of the request */
|
|
104
|
-
loading: Signal<HttpRequestLoadingState | null>;
|
|
105
|
-
/** The error state of the request */
|
|
106
|
-
error: Signal<QueryErrorResponse | null>;
|
|
107
|
-
/** The response state of the request */
|
|
108
|
-
response: Signal<ResponseType<TArgs> | null>;
|
|
109
|
-
/** The current event of the request */
|
|
110
|
-
currentEvent: Signal<HttpEvent<ResponseType<TArgs>> | HttpErrorEvent | null>;
|
|
111
|
-
/** Whether the request is stale or not aka the cache header has expired */
|
|
112
|
-
isStale: Signal<boolean>;
|
|
113
|
-
};
|
|
114
|
-
/** A custom error event since the Angular http client does not provide a specific event for errors */
|
|
115
|
-
export type HttpErrorEvent = {
|
|
116
|
-
type: 'error';
|
|
117
|
-
error: QueryErrorResponse;
|
|
118
|
-
};
|
|
119
|
-
export declare const createHttpRequest: <TArgs extends QueryArgs>(options: CreateHttpRequestOptions<TArgs>) => HttpRequest<TArgs>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export * from './http-request';
|
|
2
|
-
export * from './paged-query-stack';
|
|
3
|
-
export * from './query';
|
|
4
|
-
export * from './query-client';
|
|
5
|
-
export * from './query-client-config';
|
|
6
|
-
export * from './query-creator';
|
|
7
|
-
export * from './query-creator-templates';
|
|
8
|
-
export * from './query-dependencies';
|
|
9
|
-
export * from './query-error-response';
|
|
10
|
-
export * from './query-errors';
|
|
11
|
-
export * from './query-execute';
|
|
12
|
-
export * from './query-execute-utils';
|
|
13
|
-
export * from './query-features';
|
|
14
|
-
export * from './query-repository';
|
|
15
|
-
export * from './query-snapshot';
|
|
16
|
-
export * from './query-stack';
|
|
17
|
-
export * from './query-state';
|
|
18
|
-
export * from './query-utils';
|
|
19
|
-
export * from './secure-query';
|
|
20
|
-
export * from './secure-query-creator';
|
|
21
|
-
export * from './secure-query-execute';
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { Signal } from '@angular/core';
|
|
2
|
-
import { ContentfulGqlLikePaginated, DynLikePaginated, GgLikePaginated, NormalizedPagination, Paginated } from '@ethlete/types';
|
|
3
|
-
import { AnyQuery, Query, QueryArgs, RequestArgs, ResponseType } from './query';
|
|
4
|
-
import { AnyQueryCreator, QueryArgsOf, QueryCreator } from './query-creator';
|
|
5
|
-
import { QueryErrorResponse } from './query-error-response';
|
|
6
|
-
import { QueryFeature } from './query-features';
|
|
7
|
-
export declare const ethletePaginationAdapter: <T>(response: Paginated<T>) => NormalizedPagination<T>;
|
|
8
|
-
export declare const ggLikePaginationAdapter: <T>(response: GgLikePaginated<T>) => NormalizedPagination<T>;
|
|
9
|
-
export declare const dynLikePaginationAdapter: <T>(response: DynLikePaginated<T>) => NormalizedPagination<T>;
|
|
10
|
-
export declare const contentfulGqlLikePaginationAdapter: <T>(response: ContentfulGqlLikePaginated<T>) => NormalizedPagination<T>;
|
|
11
|
-
export declare const fakePaginationAdapter: (totalHits?: number) => <T>(response: T) => NormalizedPagination<T>;
|
|
12
|
-
export type CreatePagedQueryStackOptions<TArgs extends QueryArgs, TNormPagination extends NormalizedPagination<unknown>> = {
|
|
13
|
-
/**
|
|
14
|
-
* The normalizer function that will be used to normalize the response to a format that the paged query can understand.
|
|
15
|
-
*
|
|
16
|
-
* There are some built-in normalizers that can be used:
|
|
17
|
-
* - `ethletePaginationAdapter`
|
|
18
|
-
* - `ggLikePaginationAdapter`
|
|
19
|
-
* - `dynLikePaginationAdapter`
|
|
20
|
-
* - `contentfulGqlLikePaginationAdapter`
|
|
21
|
-
* - `fakePaginationAdapter` (for testing purposes)
|
|
22
|
-
*
|
|
23
|
-
* @param currentResponse The current response that was fetched.
|
|
24
|
-
* @param allResponses All responses that were fetched till now including the current response and pagination.
|
|
25
|
-
*/
|
|
26
|
-
responseNormalizer: (currentResponse: ResponseType<TArgs>, allResponses: NonNullable<ResponseType<TArgs>>[]) => TNormPagination;
|
|
27
|
-
/**
|
|
28
|
-
* The query creator function that will be used to create the paged query.
|
|
29
|
-
*/
|
|
30
|
-
queryCreator: QueryCreator<TArgs>;
|
|
31
|
-
/**
|
|
32
|
-
* The arguments to create the query.
|
|
33
|
-
* The current page will be passed as an argument.
|
|
34
|
-
* This function can be treated like a computed function. It reacts to signal changes.
|
|
35
|
-
* If a signal changes, the paged query will be reset to the initial page.
|
|
36
|
-
*
|
|
37
|
-
* @example (page) => ({ queryParams: { page, limit:20 } }),
|
|
38
|
-
*
|
|
39
|
-
* @param page The page to fetch next. **Do not modify this argument.**
|
|
40
|
-
* @param allResponses All responses that were fetched till now including pagination.
|
|
41
|
-
*/
|
|
42
|
-
args: (page: number, allResponses: NonNullable<ResponseType<TArgs>>[]) => RequestArgs<TArgs> | null;
|
|
43
|
-
/**
|
|
44
|
-
* The features that should be used for all queries in the stack.
|
|
45
|
-
*
|
|
46
|
-
* @throws If the `withArgs` feature is used. This feature is internally used.
|
|
47
|
-
*
|
|
48
|
-
* @example
|
|
49
|
-
* // Due to limitations in TypeScript, you have to manually add the needed generic types if needed.
|
|
50
|
-
* features: [E.withSuccessHandling<GetPostQueryArgs>({ handler: (post) => console.log(post.title) })]
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* // If typings are not needed, you can use the feature without generics.
|
|
54
|
-
* features: [E.withPolling({ interval: 5000 })]
|
|
55
|
-
*/
|
|
56
|
-
features?: QueryFeature<any>[];
|
|
57
|
-
/**
|
|
58
|
-
* The page to start this paged query from.
|
|
59
|
-
* @default 1
|
|
60
|
-
*/
|
|
61
|
-
initialPage?: number;
|
|
62
|
-
/**
|
|
63
|
-
* If true, no queries will be executed while the paged query is loading.
|
|
64
|
-
* This is useful if you need the current response to be used in the next query.
|
|
65
|
-
*/
|
|
66
|
-
blockExecutionDuringLoading?: boolean;
|
|
67
|
-
};
|
|
68
|
-
export type PagedQueryStackResetOptions = {
|
|
69
|
-
/**
|
|
70
|
-
* The page to reset this paged query to.
|
|
71
|
-
* This will clear everything and start from this page.
|
|
72
|
-
* @default 1 // or the value passed in the `initialPage` option when creating the paged query.
|
|
73
|
-
*/
|
|
74
|
-
initialPage?: number;
|
|
75
|
-
};
|
|
76
|
-
export type PagedQueryStackExecuteOptions<TNormPagination extends NormalizedPagination<unknown>> = {
|
|
77
|
-
/**
|
|
78
|
-
* If provided, only the queries that match the condition will be executed.
|
|
79
|
-
* This will also execute the previous and next query to the one that matched the condition.
|
|
80
|
-
* If not provided, all queries will be executed.
|
|
81
|
-
*
|
|
82
|
-
* @example
|
|
83
|
-
* myPagedQuery.execute({ where: (item) => item.id === 4 });
|
|
84
|
-
*/
|
|
85
|
-
where?: (item: TNormPagination['items'][number], index: number, array: TNormPagination['items']) => boolean;
|
|
86
|
-
/**
|
|
87
|
-
* If true, the cache will be used (if not expired) and the request will not be made.
|
|
88
|
-
* @default false
|
|
89
|
-
*/
|
|
90
|
-
allowCache?: boolean;
|
|
91
|
-
};
|
|
92
|
-
export type PagedQueryStackDirection = 'next' | 'previous';
|
|
93
|
-
export type AnyPagedQueryStack = PagedQueryStack<AnyQuery, NormalizedPagination<unknown>>;
|
|
94
|
-
export type PagedQueryStack<TQuery extends AnyQuery, TNormPagination extends NormalizedPagination<unknown>> = {
|
|
95
|
-
/**
|
|
96
|
-
* The pagination of the last executed query in the paged query.
|
|
97
|
-
*/
|
|
98
|
-
maxPagination: Signal<TNormPagination | null>;
|
|
99
|
-
/**
|
|
100
|
-
* The pagination of the first executed query in the paged query.
|
|
101
|
-
*/
|
|
102
|
-
minPagination: Signal<TNormPagination | null>;
|
|
103
|
-
/**
|
|
104
|
-
* Whether the last page of the paged query is loaded or not.
|
|
105
|
-
*/
|
|
106
|
-
isLastPageLoaded: Signal<boolean>;
|
|
107
|
-
/**
|
|
108
|
-
* Whether the first page of the paged query is loaded or not.
|
|
109
|
-
*/
|
|
110
|
-
isFirstPageLoaded: Signal<boolean>;
|
|
111
|
-
/**
|
|
112
|
-
* Fetches the previous page of the paged query.
|
|
113
|
-
*
|
|
114
|
-
* @throws If the paged query is already at the first page.
|
|
115
|
-
*/
|
|
116
|
-
fetchPreviousPage: () => TQuery | null;
|
|
117
|
-
/**
|
|
118
|
-
* Fetches the next page of the paged query.
|
|
119
|
-
*
|
|
120
|
-
* @throws If the paged query is already at the last page.
|
|
121
|
-
*/
|
|
122
|
-
fetchNextPage: () => TQuery | null;
|
|
123
|
-
/**
|
|
124
|
-
* Whether the previous page can be fetched or not.
|
|
125
|
-
*
|
|
126
|
-
* This will be false if the paged query is already at the first page or if the paged query is loading.
|
|
127
|
-
*/
|
|
128
|
-
canFetchPreviousPage: Signal<boolean>;
|
|
129
|
-
/**
|
|
130
|
-
* Whether the next page can be fetched or not.
|
|
131
|
-
*
|
|
132
|
-
* This will be false if the paged query is already at the last page or if the paged query is loading.
|
|
133
|
-
*/
|
|
134
|
-
canFetchNextPage: Signal<boolean>;
|
|
135
|
-
/**
|
|
136
|
-
* The items of the paged query.
|
|
137
|
-
*/
|
|
138
|
-
items: Signal<TNormPagination['items']>;
|
|
139
|
-
/**
|
|
140
|
-
* Whether the paged query is loading or not.
|
|
141
|
-
*/
|
|
142
|
-
loading: Signal<boolean>;
|
|
143
|
-
/**
|
|
144
|
-
* The error that occurred during the last execution of the paged query.
|
|
145
|
-
*/
|
|
146
|
-
error: Signal<QueryErrorResponse | null>;
|
|
147
|
-
/**
|
|
148
|
-
* The last query executed in the paged query.
|
|
149
|
-
*/
|
|
150
|
-
lastQuery: Signal<Query<QueryArgsOf<TQuery>> | null>;
|
|
151
|
-
/**
|
|
152
|
-
* Whether the paged query is on its first load or not.
|
|
153
|
-
*/
|
|
154
|
-
isFirstLoad: Signal<boolean>;
|
|
155
|
-
/**
|
|
156
|
-
* The queries in the paged query stack.
|
|
157
|
-
*/
|
|
158
|
-
queries: Signal<TQuery[]>;
|
|
159
|
-
/**
|
|
160
|
-
* Resets the paged query to the initial page.
|
|
161
|
-
*/
|
|
162
|
-
reset: (resetOptions?: PagedQueryStackResetOptions) => void;
|
|
163
|
-
/**
|
|
164
|
-
* Executes the paged query.
|
|
165
|
-
*/
|
|
166
|
-
execute: (options?: PagedQueryStackExecuteOptions<TNormPagination>) => void;
|
|
167
|
-
/**
|
|
168
|
-
* The current direction of the paged query.
|
|
169
|
-
*/
|
|
170
|
-
direction: Signal<PagedQueryStackDirection>;
|
|
171
|
-
};
|
|
172
|
-
export declare const createPagedQueryStack: <TCreator extends AnyQueryCreator, TArgs extends QueryArgsOf<TCreator>, TNormPagination extends NormalizedPagination<unknown>>(options: CreatePagedQueryStackOptions<TArgs, TNormPagination>) => PagedQueryStack<Query<TArgs>, TNormPagination>;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { HttpHeaders } from '@angular/common/http';
|
|
2
|
-
import { InjectionToken } from '@angular/core';
|
|
3
|
-
import { BuildQueryStringConfig } from '../../request';
|
|
4
|
-
import { QueryClient } from './query-client';
|
|
5
|
-
import { ShouldRetryRequestFn } from './query-utils';
|
|
6
|
-
export type CacheAdapterFn = (headers: HttpHeaders) => number | null;
|
|
7
|
-
export type CreateQueryClientConfigOptions = {
|
|
8
|
-
/**
|
|
9
|
-
* The base URL of the client
|
|
10
|
-
* @example 'https://api.example.com/v1'
|
|
11
|
-
*/
|
|
12
|
-
baseUrl: string;
|
|
13
|
-
/** Configuration for building query strings */
|
|
14
|
-
queryString?: BuildQueryStringConfig;
|
|
15
|
-
/** The name of the client */
|
|
16
|
-
name: string;
|
|
17
|
-
/**
|
|
18
|
-
* The cache adapter function to use for the client.
|
|
19
|
-
* It determines how long the response of a request can be cached.
|
|
20
|
-
*
|
|
21
|
-
* @default extractExpiresInSeconds()
|
|
22
|
-
*/
|
|
23
|
-
cacheAdapter?: CacheAdapterFn;
|
|
24
|
-
/**
|
|
25
|
-
* The retry function to use for the client.
|
|
26
|
-
* It determines if a request should be retried after it failed.
|
|
27
|
-
*
|
|
28
|
-
* @default shouldRetryRequest()
|
|
29
|
-
*/
|
|
30
|
-
retryFn?: ShouldRetryRequestFn;
|
|
31
|
-
};
|
|
32
|
-
export type QueryClientConfig = CreateQueryClientConfigOptions & {
|
|
33
|
-
/** A generated token for dependency injection */
|
|
34
|
-
token: QueryClientRef;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* A token for a query client.
|
|
38
|
-
* This token can be used to inject a query client into a service.
|
|
39
|
-
*/
|
|
40
|
-
export type QueryClientRef = InjectionToken<QueryClient>;
|
|
41
|
-
/**
|
|
42
|
-
* This function creates a query client config.
|
|
43
|
-
* The config is used to create a query client using the `provideQueryClient(myConfig)` function.
|
|
44
|
-
*/
|
|
45
|
-
export declare const createQueryClientConfig: (options: CreateQueryClientConfigOptions) => QueryClientConfig;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { QueryClientConfig } from './query-client-config';
|
|
2
|
-
import { QueryRepository } from './query-repository';
|
|
3
|
-
export type QueryClient = {
|
|
4
|
-
repository: QueryRepository;
|
|
5
|
-
};
|
|
6
|
-
export declare const createQueryClient: (config: QueryClientConfig) => QueryClient;
|
|
7
|
-
export declare const provideQueryClient: (config: QueryClientConfig) => {
|
|
8
|
-
provide: import("./query-client-config").QueryClientRef;
|
|
9
|
-
useFactory: () => QueryClient;
|
|
10
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { AnyBearerAuthProviderConfig } from '../auth/bearer-auth-provider-config';
|
|
2
|
-
import { QueryArgs } from './query';
|
|
3
|
-
import { QueryClientConfig } from './query-client-config';
|
|
4
|
-
import { CreateQueryCreatorOptions, RouteType } from './query-creator';
|
|
5
|
-
/** A query creator that creates a GET query */
|
|
6
|
-
export declare const createGetQuery: (client: QueryClientConfig) => <TArgs extends QueryArgs>(route: RouteType<TArgs>, creatorOptions?: CreateQueryCreatorOptions) => import("./query-creator").QueryCreator<TArgs>;
|
|
7
|
-
/** A query creator that creates a secure GET query (requires authentication) */
|
|
8
|
-
export declare const createSecureGetQuery: (client: QueryClientConfig, authProvider: AnyBearerAuthProviderConfig) => <TArgs extends QueryArgs>(route: RouteType<TArgs>, creatorOptions?: CreateQueryCreatorOptions) => import("./query-creator").QueryCreator<TArgs>;
|
|
9
|
-
/** A query creator that creates a POST query */
|
|
10
|
-
export declare const createPostQuery: (client: QueryClientConfig) => <TArgs extends QueryArgs>(route: RouteType<TArgs>, creatorOptions?: CreateQueryCreatorOptions) => import("./query-creator").QueryCreator<TArgs>;
|
|
11
|
-
/** A query creator that creates a secure POST query (requires authentication) */
|
|
12
|
-
export declare const createSecurePostQuery: (client: QueryClientConfig, authProvider: AnyBearerAuthProviderConfig) => <TArgs extends QueryArgs>(route: RouteType<TArgs>, creatorOptions?: CreateQueryCreatorOptions) => import("./query-creator").QueryCreator<TArgs>;
|
|
13
|
-
/** A query creator that creates a PUT query */
|
|
14
|
-
export declare const createPutQuery: (client: QueryClientConfig) => <TArgs extends QueryArgs>(route: RouteType<TArgs>, creatorOptions?: CreateQueryCreatorOptions) => import("./query-creator").QueryCreator<TArgs>;
|
|
15
|
-
/** A query creator that creates a secure PUT query (requires authentication) */
|
|
16
|
-
export declare const createSecurePutQuery: (client: QueryClientConfig, authProvider: AnyBearerAuthProviderConfig) => <TArgs extends QueryArgs>(route: RouteType<TArgs>, creatorOptions?: CreateQueryCreatorOptions) => import("./query-creator").QueryCreator<TArgs>;
|
|
17
|
-
/** A query creator that creates a DELETE query */
|
|
18
|
-
export declare const createDeleteQuery: (client: QueryClientConfig) => <TArgs extends QueryArgs>(route: RouteType<TArgs>, creatorOptions?: CreateQueryCreatorOptions) => import("./query-creator").QueryCreator<TArgs>;
|
|
19
|
-
/** A query creator that creates a secure DELETE query (requires authentication) */
|
|
20
|
-
export declare const createSecureDeleteQuery: (client: QueryClientConfig, authProvider: AnyBearerAuthProviderConfig) => <TArgs extends QueryArgs>(route: RouteType<TArgs>, creatorOptions?: CreateQueryCreatorOptions) => import("./query-creator").QueryCreator<TArgs>;
|
|
21
|
-
/** A query creator that creates a PATCH query */
|
|
22
|
-
export declare const createPatchQuery: (client: QueryClientConfig) => <TArgs extends QueryArgs>(route: RouteType<TArgs>, creatorOptions?: CreateQueryCreatorOptions) => import("./query-creator").QueryCreator<TArgs>;
|
|
23
|
-
/** A query creator that creates a secure PATCH query (requires authentication) */
|
|
24
|
-
export declare const createSecurePatchQuery: (client: QueryClientConfig, authProvider: AnyBearerAuthProviderConfig) => <TArgs extends QueryArgs>(route: RouteType<TArgs>, creatorOptions?: CreateQueryCreatorOptions) => import("./query-creator").QueryCreator<TArgs>;
|