@equinor/roma-framework 5.0.1 → 6.0.0
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/_commonjsHelpers-DKlypwS6.mjs +3277 -0
- package/cypress.mjs +31958 -49
- package/dev-portal/BAGVG3AX-CZ4YnljQ.mjs +37 -0
- package/dev-portal/KZB72KQG-Dk7Ih0xn.mjs +46 -0
- package/dev-portal/NITRNJ62-7tOtp9d-.mjs +12375 -0
- package/dev-portal/index-DYpA1xV-.mjs +102056 -0
- package/dev-portal/index.html +3 -2
- package/dev-portal/lib/api/roma/api/alarm-controller/alarm-controller.d.ts +97 -0
- package/dev-portal/lib/api/roma/api/alarm-group-controller/alarm-group-controller.d.ts +186 -0
- package/dev-portal/lib/api/roma/api/alarm-sse-controller/alarm-sse-controller.d.ts +36 -0
- package/dev-portal/lib/api/roma/api/app-controller/app-controller.d.ts +65 -31
- package/dev-portal/lib/api/roma/api/category-controller/category-controller.d.ts +57 -26
- package/dev-portal/lib/api/roma/api/environment-controller/environment-controller.d.ts +23 -10
- package/dev-portal/lib/api/roma/api/feedback-controller/feedback-controller.d.ts +29 -13
- package/dev-portal/lib/api/roma/api/health-controller/health-controller.d.ts +38 -0
- package/dev-portal/lib/api/roma/api/roma-configuration-controller/roma-configuration-controller.d.ts +99 -41
- package/dev-portal/lib/api/roma/api/server-side-event-controller/server-side-event-controller.d.ts +23 -7
- package/dev-portal/lib/api/roma/api/service-controller/service-controller.d.ts +57 -26
- package/dev-portal/lib/api/roma/api/setting-controller/setting-controller.d.ts +114 -47
- package/dev-portal/lib/api/roma/index.d.ts +4 -0
- package/dev-portal/lib/api/roma/model/adminDto.d.ts +6 -0
- package/dev-portal/lib/api/roma/model/adminDtoAdminType.d.ts +12 -0
- package/dev-portal/lib/api/roma/model/alarmDto.d.ts +19 -0
- package/dev-portal/lib/api/roma/model/alarmDtoPayload.d.ts +10 -0
- package/dev-portal/lib/api/roma/model/alarmDtoSeverity.d.ts +14 -0
- package/dev-portal/lib/api/roma/model/alarmDtoState.d.ts +12 -0
- package/dev-portal/lib/api/roma/model/alarmGroupDto.d.ts +16 -0
- package/dev-portal/lib/api/roma/model/appDto.d.ts +36 -11
- package/dev-portal/lib/api/roma/model/buildDto.d.ts +14 -0
- package/dev-portal/lib/api/roma/model/categoryDto.d.ts +4 -3
- package/dev-portal/lib/api/roma/model/clearAlarmRequest.d.ts +13 -0
- package/dev-portal/lib/api/roma/model/configDto.d.ts +6 -0
- package/dev-portal/lib/api/roma/model/environmentDto.d.ts +4 -4
- package/dev-portal/lib/api/roma/model/feedbackDetailsDto.d.ts +6 -3
- package/dev-portal/lib/api/roma/model/feedbackDto.d.ts +1 -1
- package/dev-portal/lib/api/roma/model/feedbackExpandedResponseDetailsDto.d.ts +7 -3
- package/dev-portal/lib/api/roma/model/feedbackExpandedResponseIssueDto.d.ts +3 -1
- package/dev-portal/lib/api/roma/model/feedbackPage.d.ts +7 -7
- package/dev-portal/lib/api/roma/model/feedbackResponseIssueDto.d.ts +3 -1
- package/dev-portal/lib/api/roma/model/feedbackSolutionDto.d.ts +2 -1
- package/dev-portal/lib/api/roma/model/getAllParams.d.ts +14 -0
- package/dev-portal/lib/api/roma/model/getAllRomaConfigurationTypes200Item.d.ts +1 -1
- package/dev-portal/lib/api/roma/model/index.d.ts +17 -1
- package/dev-portal/lib/api/roma/model/listFeedbacksByCurrentUserParams.d.ts +1 -1
- package/dev-portal/lib/api/roma/model/pageableObject.d.ts +2 -2
- package/dev-portal/lib/api/roma/model/raiseAlarmRequest.d.ts +15 -0
- package/dev-portal/lib/api/roma/model/raiseAlarmRequestPayload.d.ts +10 -0
- package/dev-portal/lib/api/roma/model/raiseAlarmRequestSeverity.d.ts +14 -0
- package/dev-portal/lib/api/roma/model/romaConfigurationDto.d.ts +10 -2
- package/dev-portal/lib/api/roma/model/serverSentEventAlarmDto.d.ts +9 -0
- package/dev-portal/lib/api/roma/model/serverSentEventStandardEventDto.d.ts +1 -2
- package/dev-portal/lib/api/roma/model/serviceDto.d.ts +13 -4
- package/dev-portal/lib/api/roma/model/settingDto.d.ts +10 -4
- package/dev-portal/lib/api/roma/model/sortObject.d.ts +3 -3
- package/dev-portal/lib/api/roma/model/uploadBundleBody.d.ts +1 -1
- package/dev-portal/lib/api/roma/model/versionDto.d.ts +4 -4
- package/dev-portal/lib/api/roma/model/visualizationDto.d.ts +12 -0
- package/dev-portal/lib/api/roma/use-client.d.ts +7 -7
- package/dev-portal/lib/dev-portal/AppLoader.d.ts +7 -1
- package/dev-portal/lib/dev-portal/AppViewer.d.ts +10 -0
- package/dev-portal/lib/dev-portal/EquinorLoader.d.ts +2 -2
- package/dev-portal/lib/dev-portal/PortalStyles.d.ts +8 -16
- package/dev-portal/lib/dev-portal/config/AppClient.d.ts +26 -16
- package/dev-portal/lib/style-provider.d.ts +2 -1
- package/dev-portal/package.json +41 -4
- package/dev-portal/roma-framework.css +478 -0
- package/lib/api/roma/api/alarm-controller/alarm-controller.d.ts +97 -0
- package/lib/api/roma/api/alarm-group-controller/alarm-group-controller.d.ts +186 -0
- package/lib/api/roma/api/alarm-sse-controller/alarm-sse-controller.d.ts +36 -0
- package/lib/api/roma/api/app-controller/app-controller.d.ts +65 -31
- package/lib/api/roma/api/category-controller/category-controller.d.ts +57 -26
- package/lib/api/roma/api/environment-controller/environment-controller.d.ts +23 -10
- package/lib/api/roma/api/feedback-controller/feedback-controller.d.ts +29 -13
- package/lib/api/roma/api/health-controller/health-controller.d.ts +38 -0
- package/lib/api/roma/api/roma-configuration-controller/roma-configuration-controller.d.ts +99 -41
- package/lib/api/roma/api/server-side-event-controller/server-side-event-controller.d.ts +23 -7
- package/lib/api/roma/api/service-controller/service-controller.d.ts +57 -26
- package/lib/api/roma/api/setting-controller/setting-controller.d.ts +114 -47
- package/lib/api/roma/index.d.ts +4 -0
- package/lib/api/roma/model/adminDto.d.ts +6 -0
- package/lib/api/roma/model/adminDtoAdminType.d.ts +12 -0
- package/lib/api/roma/model/alarmDto.d.ts +19 -0
- package/lib/api/roma/model/alarmDtoPayload.d.ts +10 -0
- package/lib/api/roma/model/alarmDtoSeverity.d.ts +14 -0
- package/lib/api/roma/model/alarmDtoState.d.ts +12 -0
- package/lib/api/roma/model/alarmGroupDto.d.ts +16 -0
- package/lib/api/roma/model/appDto.d.ts +36 -11
- package/lib/api/roma/model/buildDto.d.ts +14 -0
- package/lib/api/roma/model/categoryDto.d.ts +4 -3
- package/lib/api/roma/model/clearAlarmRequest.d.ts +13 -0
- package/lib/api/roma/model/configDto.d.ts +6 -0
- package/lib/api/roma/model/environmentDto.d.ts +4 -4
- package/lib/api/roma/model/feedbackDetailsDto.d.ts +6 -3
- package/lib/api/roma/model/feedbackDto.d.ts +1 -1
- package/lib/api/roma/model/feedbackExpandedResponseDetailsDto.d.ts +7 -3
- package/lib/api/roma/model/feedbackExpandedResponseIssueDto.d.ts +3 -1
- package/lib/api/roma/model/feedbackPage.d.ts +7 -7
- package/lib/api/roma/model/feedbackResponseIssueDto.d.ts +3 -1
- package/lib/api/roma/model/feedbackSolutionDto.d.ts +2 -1
- package/lib/api/roma/model/getAllParams.d.ts +14 -0
- package/lib/api/roma/model/getAllRomaConfigurationTypes200Item.d.ts +1 -1
- package/lib/api/roma/model/index.d.ts +17 -1
- package/lib/api/roma/model/listFeedbacksByCurrentUserParams.d.ts +1 -1
- package/lib/api/roma/model/pageableObject.d.ts +2 -2
- package/lib/api/roma/model/raiseAlarmRequest.d.ts +15 -0
- package/lib/api/roma/model/raiseAlarmRequestPayload.d.ts +10 -0
- package/lib/api/roma/model/raiseAlarmRequestSeverity.d.ts +14 -0
- package/lib/api/roma/model/romaConfigurationDto.d.ts +10 -2
- package/lib/api/roma/model/serverSentEventAlarmDto.d.ts +9 -0
- package/lib/api/roma/model/serverSentEventStandardEventDto.d.ts +1 -2
- package/lib/api/roma/model/serviceDto.d.ts +13 -4
- package/lib/api/roma/model/settingDto.d.ts +10 -4
- package/lib/api/roma/model/sortObject.d.ts +3 -3
- package/lib/api/roma/model/uploadBundleBody.d.ts +1 -1
- package/lib/api/roma/model/versionDto.d.ts +4 -4
- package/lib/api/roma/model/visualizationDto.d.ts +12 -0
- package/lib/api/roma/use-client.d.ts +7 -7
- package/lib/dev-portal/AppLoader.d.ts +7 -1
- package/lib/dev-portal/AppViewer.d.ts +10 -0
- package/lib/dev-portal/EquinorLoader.d.ts +2 -2
- package/lib/dev-portal/PortalStyles.d.ts +8 -16
- package/lib/dev-portal/config/AppClient.d.ts +26 -16
- package/lib/style-provider.d.ts +2 -1
- package/package.json +41 -4
- package/roma-framework.mjs +1076 -1161
- package/dev-portal/roma-framework.umd.js +0 -109513
- package/router-BRrTrnno.mjs +0 -6322
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { DataTag, DefinedInitialDataOptions, DefinedUseQueryResult, QueryClient, QueryKey, UndefinedInitialDataOptions, UseMutationOptions, UseMutationResult, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import { AlarmGroupDto } from '../../model';
|
|
3
|
+
import { useCustomClient, ErrorType, BodyType } from '../../use-client';
|
|
4
|
+
type AwaitedInput<T> = PromiseLike<T> | T;
|
|
5
|
+
type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
|
6
|
+
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
7
|
+
/**
|
|
8
|
+
* @summary Get alarm group by id
|
|
9
|
+
*/
|
|
10
|
+
export declare const getGetByIdUrl: (id: string) => string;
|
|
11
|
+
export declare const useGetByIdHook: () => ((id: string, options?: RequestInit) => Promise<AlarmGroupDto>);
|
|
12
|
+
export declare const getGetByIdQueryKey: (id: string) => readonly [`/api/alarm-groups/${string}`];
|
|
13
|
+
export declare const useGetByIdQueryOptions: <TData = Awaited<ReturnType<ReturnType<typeof useGetByIdHook>>>, TError = ErrorType<AlarmGroupDto>>(id: string, options?: {
|
|
14
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetByIdHook>>>, TError, TData>>;
|
|
15
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
16
|
+
}) => UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetByIdHook>>>, TError, TData> & {
|
|
17
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
18
|
+
};
|
|
19
|
+
export type GetByIdQueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useGetByIdHook>>>>;
|
|
20
|
+
export type GetByIdQueryError = ErrorType<AlarmGroupDto>;
|
|
21
|
+
export declare function useGetById<TData = Awaited<ReturnType<ReturnType<typeof useGetByIdHook>>>, TError = ErrorType<AlarmGroupDto>>(id: string, options: {
|
|
22
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetByIdHook>>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<ReturnType<typeof useGetByIdHook>>>, TError, Awaited<ReturnType<ReturnType<typeof useGetByIdHook>>>>, 'initialData'>;
|
|
23
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
24
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
25
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
26
|
+
};
|
|
27
|
+
export declare function useGetById<TData = Awaited<ReturnType<ReturnType<typeof useGetByIdHook>>>, TError = ErrorType<AlarmGroupDto>>(id: string, options?: {
|
|
28
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetByIdHook>>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<ReturnType<typeof useGetByIdHook>>>, TError, Awaited<ReturnType<ReturnType<typeof useGetByIdHook>>>>, 'initialData'>;
|
|
29
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
30
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
31
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
32
|
+
};
|
|
33
|
+
export declare function useGetById<TData = Awaited<ReturnType<ReturnType<typeof useGetByIdHook>>>, TError = ErrorType<AlarmGroupDto>>(id: string, options?: {
|
|
34
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetByIdHook>>>, TError, TData>>;
|
|
35
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
36
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
37
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* @summary Update alarm group
|
|
41
|
+
*/
|
|
42
|
+
export declare const getUpdateUrl: (id: string) => string;
|
|
43
|
+
export declare const useUpdateHook: () => ((id: string, alarmGroupDto: AlarmGroupDto, options?: RequestInit) => Promise<AlarmGroupDto>);
|
|
44
|
+
export declare const useUpdateMutationOptions: <TError = ErrorType<AlarmGroupDto>, TContext = unknown>(options?: {
|
|
45
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<ReturnType<typeof useUpdateHook>>>, TError, {
|
|
46
|
+
id: string;
|
|
47
|
+
data: BodyType<AlarmGroupDto>;
|
|
48
|
+
}, TContext>;
|
|
49
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
50
|
+
}) => UseMutationOptions<Awaited<ReturnType<ReturnType<typeof useUpdateHook>>>, TError, {
|
|
51
|
+
id: string;
|
|
52
|
+
data: BodyType<AlarmGroupDto>;
|
|
53
|
+
}, TContext>;
|
|
54
|
+
export type UpdateMutationResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useUpdateHook>>>>;
|
|
55
|
+
export type UpdateMutationBody = BodyType<AlarmGroupDto>;
|
|
56
|
+
export type UpdateMutationError = ErrorType<AlarmGroupDto>;
|
|
57
|
+
/**
|
|
58
|
+
* @summary Update alarm group
|
|
59
|
+
*/
|
|
60
|
+
export declare const useUpdate: <TError = ErrorType<AlarmGroupDto>, TContext = unknown>(options?: {
|
|
61
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<ReturnType<typeof useUpdateHook>>>, TError, {
|
|
62
|
+
id: string;
|
|
63
|
+
data: BodyType<AlarmGroupDto>;
|
|
64
|
+
}, TContext>;
|
|
65
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
66
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<ReturnType<typeof useUpdateHook>>>, TError, {
|
|
67
|
+
id: string;
|
|
68
|
+
data: BodyType<AlarmGroupDto>;
|
|
69
|
+
}, TContext>;
|
|
70
|
+
/**
|
|
71
|
+
* @summary Delete alarm group (Administrator only)
|
|
72
|
+
*/
|
|
73
|
+
export declare const getDeleteUrl: (id: string) => string;
|
|
74
|
+
export declare const use_DeleteHook: () => ((id: string, options?: RequestInit) => Promise<void>);
|
|
75
|
+
export declare const useDeleteMutationOptions: <TError = ErrorType<void>, TContext = unknown>(options?: {
|
|
76
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<ReturnType<typeof use_DeleteHook>>>, TError, {
|
|
77
|
+
id: string;
|
|
78
|
+
}, TContext>;
|
|
79
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
80
|
+
}) => UseMutationOptions<Awaited<ReturnType<ReturnType<typeof use_DeleteHook>>>, TError, {
|
|
81
|
+
id: string;
|
|
82
|
+
}, TContext>;
|
|
83
|
+
export type _DeleteMutationResult = NonNullable<Awaited<ReturnType<ReturnType<typeof use_DeleteHook>>>>;
|
|
84
|
+
export type _DeleteMutationError = ErrorType<void>;
|
|
85
|
+
/**
|
|
86
|
+
* @summary Delete alarm group (Administrator only)
|
|
87
|
+
*/
|
|
88
|
+
export declare const useDelete: <TError = ErrorType<void>, TContext = unknown>(options?: {
|
|
89
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<ReturnType<typeof use_DeleteHook>>>, TError, {
|
|
90
|
+
id: string;
|
|
91
|
+
}, TContext>;
|
|
92
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
93
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<ReturnType<typeof use_DeleteHook>>>, TError, {
|
|
94
|
+
id: string;
|
|
95
|
+
}, TContext>;
|
|
96
|
+
/**
|
|
97
|
+
* @summary Replace alarm group member list (creator only)
|
|
98
|
+
*/
|
|
99
|
+
export declare const getReplaceMembersUrl: (id: string) => string;
|
|
100
|
+
export declare const useReplaceMembersHook: () => ((id: string, replaceMembersBody: string[], options?: RequestInit) => Promise<AlarmGroupDto>);
|
|
101
|
+
export declare const useReplaceMembersMutationOptions: <TError = ErrorType<AlarmGroupDto>, TContext = unknown>(options?: {
|
|
102
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<ReturnType<typeof useReplaceMembersHook>>>, TError, {
|
|
103
|
+
id: string;
|
|
104
|
+
data: BodyType<string[]>;
|
|
105
|
+
}, TContext>;
|
|
106
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
107
|
+
}) => UseMutationOptions<Awaited<ReturnType<ReturnType<typeof useReplaceMembersHook>>>, TError, {
|
|
108
|
+
id: string;
|
|
109
|
+
data: BodyType<string[]>;
|
|
110
|
+
}, TContext>;
|
|
111
|
+
export type ReplaceMembersMutationResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useReplaceMembersHook>>>>;
|
|
112
|
+
export type ReplaceMembersMutationBody = BodyType<string[]>;
|
|
113
|
+
export type ReplaceMembersMutationError = ErrorType<AlarmGroupDto>;
|
|
114
|
+
/**
|
|
115
|
+
* @summary Replace alarm group member list (creator only)
|
|
116
|
+
*/
|
|
117
|
+
export declare const useReplaceMembers: <TError = ErrorType<AlarmGroupDto>, TContext = unknown>(options?: {
|
|
118
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<ReturnType<typeof useReplaceMembersHook>>>, TError, {
|
|
119
|
+
id: string;
|
|
120
|
+
data: BodyType<string[]>;
|
|
121
|
+
}, TContext>;
|
|
122
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
123
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<ReturnType<typeof useReplaceMembersHook>>>, TError, {
|
|
124
|
+
id: string;
|
|
125
|
+
data: BodyType<string[]>;
|
|
126
|
+
}, TContext>;
|
|
127
|
+
/**
|
|
128
|
+
* @summary List all alarm groups
|
|
129
|
+
*/
|
|
130
|
+
export declare const getGetAll1Url: () => string;
|
|
131
|
+
export declare const useGetAll1Hook: () => ((options?: RequestInit) => Promise<AlarmGroupDto[]>);
|
|
132
|
+
export declare const getGetAll1QueryKey: () => readonly ["/api/alarm-groups"];
|
|
133
|
+
export declare const useGetAll1QueryOptions: <TData = Awaited<ReturnType<ReturnType<typeof useGetAll1Hook>>>, TError = ErrorType<AlarmGroupDto[]>>(options?: {
|
|
134
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetAll1Hook>>>, TError, TData>>;
|
|
135
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
136
|
+
}) => UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetAll1Hook>>>, TError, TData> & {
|
|
137
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
138
|
+
};
|
|
139
|
+
export type GetAll1QueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useGetAll1Hook>>>>;
|
|
140
|
+
export type GetAll1QueryError = ErrorType<AlarmGroupDto[]>;
|
|
141
|
+
export declare function useGetAll1<TData = Awaited<ReturnType<ReturnType<typeof useGetAll1Hook>>>, TError = ErrorType<AlarmGroupDto[]>>(options: {
|
|
142
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetAll1Hook>>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<ReturnType<typeof useGetAll1Hook>>>, TError, Awaited<ReturnType<ReturnType<typeof useGetAll1Hook>>>>, 'initialData'>;
|
|
143
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
144
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
145
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
146
|
+
};
|
|
147
|
+
export declare function useGetAll1<TData = Awaited<ReturnType<ReturnType<typeof useGetAll1Hook>>>, TError = ErrorType<AlarmGroupDto[]>>(options?: {
|
|
148
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetAll1Hook>>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<ReturnType<typeof useGetAll1Hook>>>, TError, Awaited<ReturnType<ReturnType<typeof useGetAll1Hook>>>>, 'initialData'>;
|
|
149
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
150
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
151
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
152
|
+
};
|
|
153
|
+
export declare function useGetAll1<TData = Awaited<ReturnType<ReturnType<typeof useGetAll1Hook>>>, TError = ErrorType<AlarmGroupDto[]>>(options?: {
|
|
154
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetAll1Hook>>>, TError, TData>>;
|
|
155
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
156
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
157
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
158
|
+
};
|
|
159
|
+
/**
|
|
160
|
+
* @summary Create alarm group
|
|
161
|
+
*/
|
|
162
|
+
export declare const getCreateUrl: () => string;
|
|
163
|
+
export declare const useCreateHook: () => ((alarmGroupDto: AlarmGroupDto, options?: RequestInit) => Promise<AlarmGroupDto>);
|
|
164
|
+
export declare const useCreateMutationOptions: <TError = ErrorType<AlarmGroupDto>, TContext = unknown>(options?: {
|
|
165
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<ReturnType<typeof useCreateHook>>>, TError, {
|
|
166
|
+
data: BodyType<AlarmGroupDto>;
|
|
167
|
+
}, TContext>;
|
|
168
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
169
|
+
}) => UseMutationOptions<Awaited<ReturnType<ReturnType<typeof useCreateHook>>>, TError, {
|
|
170
|
+
data: BodyType<AlarmGroupDto>;
|
|
171
|
+
}, TContext>;
|
|
172
|
+
export type CreateMutationResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useCreateHook>>>>;
|
|
173
|
+
export type CreateMutationBody = BodyType<AlarmGroupDto>;
|
|
174
|
+
export type CreateMutationError = ErrorType<AlarmGroupDto>;
|
|
175
|
+
/**
|
|
176
|
+
* @summary Create alarm group
|
|
177
|
+
*/
|
|
178
|
+
export declare const useCreate: <TError = ErrorType<AlarmGroupDto>, TContext = unknown>(options?: {
|
|
179
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<ReturnType<typeof useCreateHook>>>, TError, {
|
|
180
|
+
data: BodyType<AlarmGroupDto>;
|
|
181
|
+
}, TContext>;
|
|
182
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
183
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<ReturnType<typeof useCreateHook>>>, TError, {
|
|
184
|
+
data: BodyType<AlarmGroupDto>;
|
|
185
|
+
}, TContext>;
|
|
186
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { DataTag, DefinedInitialDataOptions, DefinedUseQueryResult, QueryClient, QueryKey, UndefinedInitialDataOptions, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import { ServerSentEventAlarmDto } from '../../model';
|
|
3
|
+
import { useCustomClient, ErrorType } from '../../use-client';
|
|
4
|
+
type AwaitedInput<T> = PromiseLike<T> | T;
|
|
5
|
+
type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
|
6
|
+
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
7
|
+
export declare const getStreamAlarmsUrl: () => string;
|
|
8
|
+
export declare const useStreamAlarmsHook: () => ((options?: RequestInit) => Promise<ServerSentEventAlarmDto[]>);
|
|
9
|
+
export declare const getStreamAlarmsQueryKey: () => readonly ["/eventstream/alarm"];
|
|
10
|
+
export declare const useStreamAlarmsQueryOptions: <TData = Awaited<ReturnType<ReturnType<typeof useStreamAlarmsHook>>>, TError = ErrorType<unknown>>(options?: {
|
|
11
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useStreamAlarmsHook>>>, TError, TData>>;
|
|
12
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
13
|
+
}) => UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useStreamAlarmsHook>>>, TError, TData> & {
|
|
14
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
15
|
+
};
|
|
16
|
+
export type StreamAlarmsQueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useStreamAlarmsHook>>>>;
|
|
17
|
+
export type StreamAlarmsQueryError = ErrorType<unknown>;
|
|
18
|
+
export declare function useStreamAlarms<TData = Awaited<ReturnType<ReturnType<typeof useStreamAlarmsHook>>>, TError = ErrorType<unknown>>(options: {
|
|
19
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useStreamAlarmsHook>>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<ReturnType<typeof useStreamAlarmsHook>>>, TError, Awaited<ReturnType<ReturnType<typeof useStreamAlarmsHook>>>>, 'initialData'>;
|
|
20
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
21
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
22
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
23
|
+
};
|
|
24
|
+
export declare function useStreamAlarms<TData = Awaited<ReturnType<ReturnType<typeof useStreamAlarmsHook>>>, TError = ErrorType<unknown>>(options?: {
|
|
25
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useStreamAlarmsHook>>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<ReturnType<typeof useStreamAlarmsHook>>>, TError, Awaited<ReturnType<ReturnType<typeof useStreamAlarmsHook>>>>, 'initialData'>;
|
|
26
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
27
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
28
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
29
|
+
};
|
|
30
|
+
export declare function useStreamAlarms<TData = Awaited<ReturnType<ReturnType<typeof useStreamAlarmsHook>>>, TError = ErrorType<unknown>>(options?: {
|
|
31
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useStreamAlarmsHook>>>, TError, TData>>;
|
|
32
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
33
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
34
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
35
|
+
};
|
|
36
|
+
export {};
|
|
@@ -1,64 +1,82 @@
|
|
|
1
|
-
import { QueryKey, UseMutationOptions, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import { AppDto,
|
|
3
|
-
import { ErrorType, BodyType } from '../../use-client';
|
|
1
|
+
import { DataTag, DefinedInitialDataOptions, DefinedUseQueryResult, QueryClient, QueryKey, UndefinedInitialDataOptions, UseMutationOptions, UseMutationResult, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import { AppDto, UploadBundleBody } from '../../model';
|
|
3
|
+
import { useCustomClient, ErrorType, BodyType } from '../../use-client';
|
|
4
4
|
type AwaitedInput<T> = PromiseLike<T> | T;
|
|
5
5
|
type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
|
6
|
+
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
6
7
|
/**
|
|
7
8
|
* @summary Upload an application bundle file
|
|
8
9
|
*/
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const getUploadBundleUrl: (key: string) => string;
|
|
11
|
+
export declare const useUploadBundleHook: () => ((key: string, uploadBundleBody: UploadBundleBody, options?: RequestInit) => Promise<void>);
|
|
12
|
+
export declare const useUploadBundleMutationOptions: <TError = ErrorType<void>, TContext = unknown>(options?: {
|
|
11
13
|
mutation?: UseMutationOptions<Awaited<ReturnType<ReturnType<typeof useUploadBundleHook>>>, TError, {
|
|
12
14
|
key: string;
|
|
13
15
|
data: BodyType<UploadBundleBody>;
|
|
14
16
|
}, TContext>;
|
|
17
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
15
18
|
}) => UseMutationOptions<Awaited<ReturnType<ReturnType<typeof useUploadBundleHook>>>, TError, {
|
|
16
19
|
key: string;
|
|
17
20
|
data: BodyType<UploadBundleBody>;
|
|
18
21
|
}, TContext>;
|
|
19
22
|
export type UploadBundleMutationResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useUploadBundleHook>>>>;
|
|
20
23
|
export type UploadBundleMutationBody = BodyType<UploadBundleBody>;
|
|
21
|
-
export type UploadBundleMutationError = ErrorType<
|
|
24
|
+
export type UploadBundleMutationError = ErrorType<void>;
|
|
22
25
|
/**
|
|
23
26
|
* @summary Upload an application bundle file
|
|
24
27
|
*/
|
|
25
|
-
export declare const useUploadBundle: <TError = ErrorType<
|
|
28
|
+
export declare const useUploadBundle: <TError = ErrorType<void>, TContext = unknown>(options?: {
|
|
26
29
|
mutation?: UseMutationOptions<Awaited<ReturnType<ReturnType<typeof useUploadBundleHook>>>, TError, {
|
|
27
30
|
key: string;
|
|
28
31
|
data: BodyType<UploadBundleBody>;
|
|
29
32
|
}, TContext>;
|
|
30
|
-
|
|
33
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
34
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<ReturnType<typeof useUploadBundleHook>>>, TError, {
|
|
31
35
|
key: string;
|
|
32
36
|
data: BodyType<UploadBundleBody>;
|
|
33
37
|
}, TContext>;
|
|
34
38
|
/**
|
|
35
39
|
* @summary List apps
|
|
36
40
|
*/
|
|
37
|
-
export declare const
|
|
41
|
+
export declare const getGetAllAppsUrl: () => string;
|
|
42
|
+
export declare const useGetAllAppsHook: () => ((options?: RequestInit) => Promise<AppDto[]>);
|
|
38
43
|
export declare const getGetAllAppsQueryKey: () => readonly ["/api/apps"];
|
|
39
44
|
export declare const useGetAllAppsQueryOptions: <TData = Awaited<ReturnType<ReturnType<typeof useGetAllAppsHook>>>, TError = ErrorType<void>>(options?: {
|
|
40
45
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetAllAppsHook>>>, TError, TData>>;
|
|
46
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
41
47
|
}) => UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetAllAppsHook>>>, TError, TData> & {
|
|
42
|
-
queryKey: QueryKey
|
|
48
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
43
49
|
};
|
|
44
50
|
export type GetAllAppsQueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useGetAllAppsHook>>>>;
|
|
45
51
|
export type GetAllAppsQueryError = ErrorType<void>;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
52
|
+
export declare function useGetAllApps<TData = Awaited<ReturnType<ReturnType<typeof useGetAllAppsHook>>>, TError = ErrorType<void>>(options: {
|
|
53
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetAllAppsHook>>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<ReturnType<typeof useGetAllAppsHook>>>, TError, Awaited<ReturnType<ReturnType<typeof useGetAllAppsHook>>>>, 'initialData'>;
|
|
54
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
55
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
56
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
57
|
+
};
|
|
58
|
+
export declare function useGetAllApps<TData = Awaited<ReturnType<ReturnType<typeof useGetAllAppsHook>>>, TError = ErrorType<void>>(options?: {
|
|
59
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetAllAppsHook>>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<ReturnType<typeof useGetAllAppsHook>>>, TError, Awaited<ReturnType<ReturnType<typeof useGetAllAppsHook>>>>, 'initialData'>;
|
|
60
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
61
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
62
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
63
|
+
};
|
|
64
|
+
export declare function useGetAllApps<TData = Awaited<ReturnType<ReturnType<typeof useGetAllAppsHook>>>, TError = ErrorType<void>>(options?: {
|
|
50
65
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetAllAppsHook>>>, TError, TData>>;
|
|
51
|
-
|
|
52
|
-
|
|
66
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
67
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
68
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
53
69
|
};
|
|
54
70
|
/**
|
|
55
71
|
* @summary Create or update App
|
|
56
72
|
*/
|
|
57
|
-
export declare const
|
|
73
|
+
export declare const getCreateOrUpdateAppUrl: () => string;
|
|
74
|
+
export declare const useCreateOrUpdateAppHook: () => ((appDto: AppDto, options?: RequestInit) => Promise<Blob>);
|
|
58
75
|
export declare const useCreateOrUpdateAppMutationOptions: <TError = ErrorType<void>, TContext = unknown>(options?: {
|
|
59
76
|
mutation?: UseMutationOptions<Awaited<ReturnType<ReturnType<typeof useCreateOrUpdateAppHook>>>, TError, {
|
|
60
77
|
data: BodyType<AppDto>;
|
|
61
78
|
}, TContext>;
|
|
79
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
62
80
|
}) => UseMutationOptions<Awaited<ReturnType<ReturnType<typeof useCreateOrUpdateAppHook>>>, TError, {
|
|
63
81
|
data: BodyType<AppDto>;
|
|
64
82
|
}, TContext>;
|
|
@@ -72,50 +90,66 @@ export declare const useCreateOrUpdateApp: <TError = ErrorType<void>, TContext =
|
|
|
72
90
|
mutation?: UseMutationOptions<Awaited<ReturnType<ReturnType<typeof useCreateOrUpdateAppHook>>>, TError, {
|
|
73
91
|
data: BodyType<AppDto>;
|
|
74
92
|
}, TContext>;
|
|
75
|
-
|
|
93
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
94
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<ReturnType<typeof useCreateOrUpdateAppHook>>>, TError, {
|
|
76
95
|
data: BodyType<AppDto>;
|
|
77
96
|
}, TContext>;
|
|
78
97
|
/**
|
|
79
98
|
* @summary Get app by key
|
|
80
99
|
*/
|
|
81
|
-
export declare const
|
|
100
|
+
export declare const getGetAppByKeyUrl: (key: string) => string;
|
|
101
|
+
export declare const useGetAppByKeyHook: () => ((key: string, options?: RequestInit) => Promise<AppDto>);
|
|
82
102
|
export declare const getGetAppByKeyQueryKey: (key: string) => readonly [`/api/apps/key/${string}`];
|
|
83
103
|
export declare const useGetAppByKeyQueryOptions: <TData = Awaited<ReturnType<ReturnType<typeof useGetAppByKeyHook>>>, TError = ErrorType<void>>(key: string, options?: {
|
|
84
104
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetAppByKeyHook>>>, TError, TData>>;
|
|
105
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
85
106
|
}) => UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetAppByKeyHook>>>, TError, TData> & {
|
|
86
|
-
queryKey: QueryKey
|
|
107
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
87
108
|
};
|
|
88
109
|
export type GetAppByKeyQueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useGetAppByKeyHook>>>>;
|
|
89
110
|
export type GetAppByKeyQueryError = ErrorType<void>;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
111
|
+
export declare function useGetAppByKey<TData = Awaited<ReturnType<ReturnType<typeof useGetAppByKeyHook>>>, TError = ErrorType<void>>(key: string, options: {
|
|
112
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetAppByKeyHook>>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<ReturnType<typeof useGetAppByKeyHook>>>, TError, Awaited<ReturnType<ReturnType<typeof useGetAppByKeyHook>>>>, 'initialData'>;
|
|
113
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
114
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
115
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
116
|
+
};
|
|
117
|
+
export declare function useGetAppByKey<TData = Awaited<ReturnType<ReturnType<typeof useGetAppByKeyHook>>>, TError = ErrorType<void>>(key: string, options?: {
|
|
118
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetAppByKeyHook>>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<ReturnType<typeof useGetAppByKeyHook>>>, TError, Awaited<ReturnType<ReturnType<typeof useGetAppByKeyHook>>>>, 'initialData'>;
|
|
119
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
120
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
121
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
122
|
+
};
|
|
123
|
+
export declare function useGetAppByKey<TData = Awaited<ReturnType<ReturnType<typeof useGetAppByKeyHook>>>, TError = ErrorType<void>>(key: string, options?: {
|
|
94
124
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetAppByKeyHook>>>, TError, TData>>;
|
|
95
|
-
|
|
96
|
-
|
|
125
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
126
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
127
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
97
128
|
};
|
|
98
129
|
/**
|
|
99
130
|
* @summary Delete app by key
|
|
100
131
|
*/
|
|
101
|
-
export declare const
|
|
102
|
-
export declare const
|
|
132
|
+
export declare const getDeleteAppByKeyUrl: (key: string) => string;
|
|
133
|
+
export declare const useDeleteAppByKeyHook: () => ((key: string, options?: RequestInit) => Promise<void>);
|
|
134
|
+
export declare const useDeleteAppByKeyMutationOptions: <TError = ErrorType<void>, TContext = unknown>(options?: {
|
|
103
135
|
mutation?: UseMutationOptions<Awaited<ReturnType<ReturnType<typeof useDeleteAppByKeyHook>>>, TError, {
|
|
104
136
|
key: string;
|
|
105
137
|
}, TContext>;
|
|
138
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
106
139
|
}) => UseMutationOptions<Awaited<ReturnType<ReturnType<typeof useDeleteAppByKeyHook>>>, TError, {
|
|
107
140
|
key: string;
|
|
108
141
|
}, TContext>;
|
|
109
142
|
export type DeleteAppByKeyMutationResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useDeleteAppByKeyHook>>>>;
|
|
110
|
-
export type DeleteAppByKeyMutationError = ErrorType<
|
|
143
|
+
export type DeleteAppByKeyMutationError = ErrorType<void>;
|
|
111
144
|
/**
|
|
112
145
|
* @summary Delete app by key
|
|
113
146
|
*/
|
|
114
|
-
export declare const useDeleteAppByKey: <TError = ErrorType<
|
|
147
|
+
export declare const useDeleteAppByKey: <TError = ErrorType<void>, TContext = unknown>(options?: {
|
|
115
148
|
mutation?: UseMutationOptions<Awaited<ReturnType<ReturnType<typeof useDeleteAppByKeyHook>>>, TError, {
|
|
116
149
|
key: string;
|
|
117
150
|
}, TContext>;
|
|
118
|
-
|
|
151
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
152
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<ReturnType<typeof useDeleteAppByKeyHook>>>, TError, {
|
|
119
153
|
key: string;
|
|
120
154
|
}, TContext>;
|
|
121
155
|
export {};
|
|
@@ -1,36 +1,51 @@
|
|
|
1
|
-
import { QueryKey, UseMutationOptions, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import { CategoryDto
|
|
3
|
-
import { ErrorType, BodyType } from '../../use-client';
|
|
1
|
+
import { DataTag, DefinedInitialDataOptions, DefinedUseQueryResult, QueryClient, QueryKey, UndefinedInitialDataOptions, UseMutationOptions, UseMutationResult, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import { CategoryDto } from '../../model';
|
|
3
|
+
import { useCustomClient, ErrorType, BodyType } from '../../use-client';
|
|
4
4
|
type AwaitedInput<T> = PromiseLike<T> | T;
|
|
5
5
|
type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
|
6
|
+
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
6
7
|
/**
|
|
7
8
|
* @summary List categories
|
|
8
9
|
*/
|
|
9
|
-
export declare const
|
|
10
|
+
export declare const getGetAllCategoriesUrl: () => string;
|
|
11
|
+
export declare const useGetAllCategoriesHook: () => ((options?: RequestInit) => Promise<CategoryDto[]>);
|
|
10
12
|
export declare const getGetAllCategoriesQueryKey: () => readonly ["/api/apps/categories"];
|
|
11
13
|
export declare const useGetAllCategoriesQueryOptions: <TData = Awaited<ReturnType<ReturnType<typeof useGetAllCategoriesHook>>>, TError = ErrorType<void>>(options?: {
|
|
12
14
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetAllCategoriesHook>>>, TError, TData>>;
|
|
15
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
13
16
|
}) => UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetAllCategoriesHook>>>, TError, TData> & {
|
|
14
|
-
queryKey: QueryKey
|
|
17
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
15
18
|
};
|
|
16
19
|
export type GetAllCategoriesQueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useGetAllCategoriesHook>>>>;
|
|
17
20
|
export type GetAllCategoriesQueryError = ErrorType<void>;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
export declare function useGetAllCategories<TData = Awaited<ReturnType<ReturnType<typeof useGetAllCategoriesHook>>>, TError = ErrorType<void>>(options: {
|
|
22
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetAllCategoriesHook>>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<ReturnType<typeof useGetAllCategoriesHook>>>, TError, Awaited<ReturnType<ReturnType<typeof useGetAllCategoriesHook>>>>, 'initialData'>;
|
|
23
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
24
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
25
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
26
|
+
};
|
|
27
|
+
export declare function useGetAllCategories<TData = Awaited<ReturnType<ReturnType<typeof useGetAllCategoriesHook>>>, TError = ErrorType<void>>(options?: {
|
|
28
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetAllCategoriesHook>>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<ReturnType<typeof useGetAllCategoriesHook>>>, TError, Awaited<ReturnType<ReturnType<typeof useGetAllCategoriesHook>>>>, 'initialData'>;
|
|
29
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
30
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
31
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
32
|
+
};
|
|
33
|
+
export declare function useGetAllCategories<TData = Awaited<ReturnType<ReturnType<typeof useGetAllCategoriesHook>>>, TError = ErrorType<void>>(options?: {
|
|
22
34
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetAllCategoriesHook>>>, TError, TData>>;
|
|
23
|
-
|
|
24
|
-
|
|
35
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
36
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
37
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
25
38
|
};
|
|
26
39
|
/**
|
|
27
40
|
* @summary Create or update category
|
|
28
41
|
*/
|
|
29
|
-
export declare const
|
|
42
|
+
export declare const getCreateOrUpdateCategoryUrl: () => string;
|
|
43
|
+
export declare const useCreateOrUpdateCategoryHook: () => ((categoryDto: CategoryDto, options?: RequestInit) => Promise<Blob>);
|
|
30
44
|
export declare const useCreateOrUpdateCategoryMutationOptions: <TError = ErrorType<void>, TContext = unknown>(options?: {
|
|
31
45
|
mutation?: UseMutationOptions<Awaited<ReturnType<ReturnType<typeof useCreateOrUpdateCategoryHook>>>, TError, {
|
|
32
46
|
data: BodyType<CategoryDto>;
|
|
33
47
|
}, TContext>;
|
|
48
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
34
49
|
}) => UseMutationOptions<Awaited<ReturnType<ReturnType<typeof useCreateOrUpdateCategoryHook>>>, TError, {
|
|
35
50
|
data: BodyType<CategoryDto>;
|
|
36
51
|
}, TContext>;
|
|
@@ -44,50 +59,66 @@ export declare const useCreateOrUpdateCategory: <TError = ErrorType<void>, TCont
|
|
|
44
59
|
mutation?: UseMutationOptions<Awaited<ReturnType<ReturnType<typeof useCreateOrUpdateCategoryHook>>>, TError, {
|
|
45
60
|
data: BodyType<CategoryDto>;
|
|
46
61
|
}, TContext>;
|
|
47
|
-
|
|
62
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
63
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<ReturnType<typeof useCreateOrUpdateCategoryHook>>>, TError, {
|
|
48
64
|
data: BodyType<CategoryDto>;
|
|
49
65
|
}, TContext>;
|
|
50
66
|
/**
|
|
51
67
|
* @summary Get category by id
|
|
52
68
|
*/
|
|
53
|
-
export declare const
|
|
69
|
+
export declare const getGetCategoryByIdUrl: (id: string) => string;
|
|
70
|
+
export declare const useGetCategoryByIdHook: () => ((id: string, options?: RequestInit) => Promise<CategoryDto>);
|
|
54
71
|
export declare const getGetCategoryByIdQueryKey: (id: string) => readonly [`/api/apps/categories/id/${string}`];
|
|
55
72
|
export declare const useGetCategoryByIdQueryOptions: <TData = Awaited<ReturnType<ReturnType<typeof useGetCategoryByIdHook>>>, TError = ErrorType<void>>(id: string, options?: {
|
|
56
73
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetCategoryByIdHook>>>, TError, TData>>;
|
|
74
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
57
75
|
}) => UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetCategoryByIdHook>>>, TError, TData> & {
|
|
58
|
-
queryKey: QueryKey
|
|
76
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
59
77
|
};
|
|
60
78
|
export type GetCategoryByIdQueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useGetCategoryByIdHook>>>>;
|
|
61
79
|
export type GetCategoryByIdQueryError = ErrorType<void>;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
80
|
+
export declare function useGetCategoryById<TData = Awaited<ReturnType<ReturnType<typeof useGetCategoryByIdHook>>>, TError = ErrorType<void>>(id: string, options: {
|
|
81
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetCategoryByIdHook>>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<ReturnType<typeof useGetCategoryByIdHook>>>, TError, Awaited<ReturnType<ReturnType<typeof useGetCategoryByIdHook>>>>, 'initialData'>;
|
|
82
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
83
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
84
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
85
|
+
};
|
|
86
|
+
export declare function useGetCategoryById<TData = Awaited<ReturnType<ReturnType<typeof useGetCategoryByIdHook>>>, TError = ErrorType<void>>(id: string, options?: {
|
|
87
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetCategoryByIdHook>>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<ReturnType<typeof useGetCategoryByIdHook>>>, TError, Awaited<ReturnType<ReturnType<typeof useGetCategoryByIdHook>>>>, 'initialData'>;
|
|
88
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
89
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
90
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
91
|
+
};
|
|
92
|
+
export declare function useGetCategoryById<TData = Awaited<ReturnType<ReturnType<typeof useGetCategoryByIdHook>>>, TError = ErrorType<void>>(id: string, options?: {
|
|
66
93
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetCategoryByIdHook>>>, TError, TData>>;
|
|
67
|
-
|
|
68
|
-
|
|
94
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
95
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
96
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
69
97
|
};
|
|
70
98
|
/**
|
|
71
99
|
* @summary Delete category by id
|
|
72
100
|
*/
|
|
73
|
-
export declare const
|
|
74
|
-
export declare const
|
|
101
|
+
export declare const getDeleteCategoryByIdUrl: (id: string) => string;
|
|
102
|
+
export declare const useDeleteCategoryByIdHook: () => ((id: string, options?: RequestInit) => Promise<void>);
|
|
103
|
+
export declare const useDeleteCategoryByIdMutationOptions: <TError = ErrorType<void>, TContext = unknown>(options?: {
|
|
75
104
|
mutation?: UseMutationOptions<Awaited<ReturnType<ReturnType<typeof useDeleteCategoryByIdHook>>>, TError, {
|
|
76
105
|
id: string;
|
|
77
106
|
}, TContext>;
|
|
107
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
78
108
|
}) => UseMutationOptions<Awaited<ReturnType<ReturnType<typeof useDeleteCategoryByIdHook>>>, TError, {
|
|
79
109
|
id: string;
|
|
80
110
|
}, TContext>;
|
|
81
111
|
export type DeleteCategoryByIdMutationResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useDeleteCategoryByIdHook>>>>;
|
|
82
|
-
export type DeleteCategoryByIdMutationError = ErrorType<
|
|
112
|
+
export type DeleteCategoryByIdMutationError = ErrorType<void>;
|
|
83
113
|
/**
|
|
84
114
|
* @summary Delete category by id
|
|
85
115
|
*/
|
|
86
|
-
export declare const useDeleteCategoryById: <TError = ErrorType<
|
|
116
|
+
export declare const useDeleteCategoryById: <TError = ErrorType<void>, TContext = unknown>(options?: {
|
|
87
117
|
mutation?: UseMutationOptions<Awaited<ReturnType<ReturnType<typeof useDeleteCategoryByIdHook>>>, TError, {
|
|
88
118
|
id: string;
|
|
89
119
|
}, TContext>;
|
|
90
|
-
|
|
120
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
121
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<ReturnType<typeof useDeleteCategoryByIdHook>>>, TError, {
|
|
91
122
|
id: string;
|
|
92
123
|
}, TContext>;
|
|
93
124
|
export {};
|
|
@@ -1,26 +1,39 @@
|
|
|
1
|
-
import { QueryKey, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
|
|
1
|
+
import { DataTag, DefinedInitialDataOptions, DefinedUseQueryResult, QueryClient, QueryKey, UndefinedInitialDataOptions, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
|
|
2
2
|
import { EnvironmentDto } from '../../model';
|
|
3
|
-
import { ErrorType } from '../../use-client';
|
|
3
|
+
import { useCustomClient, ErrorType } from '../../use-client';
|
|
4
4
|
type AwaitedInput<T> = PromiseLike<T> | T;
|
|
5
5
|
type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
|
6
|
+
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
6
7
|
/**
|
|
7
8
|
* @summary Get current environment
|
|
8
9
|
*/
|
|
9
|
-
export declare const
|
|
10
|
+
export declare const getGetCurrentEnvironmentUrl: () => string;
|
|
11
|
+
export declare const useGetCurrentEnvironmentHook: () => ((options?: RequestInit) => Promise<EnvironmentDto>);
|
|
10
12
|
export declare const getGetCurrentEnvironmentQueryKey: () => readonly ["/_discovery/environments/current"];
|
|
11
13
|
export declare const useGetCurrentEnvironmentQueryOptions: <TData = Awaited<ReturnType<ReturnType<typeof useGetCurrentEnvironmentHook>>>, TError = ErrorType<void>>(options?: {
|
|
12
14
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetCurrentEnvironmentHook>>>, TError, TData>>;
|
|
15
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
13
16
|
}) => UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetCurrentEnvironmentHook>>>, TError, TData> & {
|
|
14
|
-
queryKey: QueryKey
|
|
17
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
15
18
|
};
|
|
16
19
|
export type GetCurrentEnvironmentQueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useGetCurrentEnvironmentHook>>>>;
|
|
17
20
|
export type GetCurrentEnvironmentQueryError = ErrorType<void>;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
export declare function useGetCurrentEnvironment<TData = Awaited<ReturnType<ReturnType<typeof useGetCurrentEnvironmentHook>>>, TError = ErrorType<void>>(options: {
|
|
22
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetCurrentEnvironmentHook>>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<ReturnType<typeof useGetCurrentEnvironmentHook>>>, TError, Awaited<ReturnType<ReturnType<typeof useGetCurrentEnvironmentHook>>>>, 'initialData'>;
|
|
23
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
24
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
25
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
26
|
+
};
|
|
27
|
+
export declare function useGetCurrentEnvironment<TData = Awaited<ReturnType<ReturnType<typeof useGetCurrentEnvironmentHook>>>, TError = ErrorType<void>>(options?: {
|
|
28
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetCurrentEnvironmentHook>>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<ReturnType<typeof useGetCurrentEnvironmentHook>>>, TError, Awaited<ReturnType<ReturnType<typeof useGetCurrentEnvironmentHook>>>>, 'initialData'>;
|
|
29
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
30
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
31
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
32
|
+
};
|
|
33
|
+
export declare function useGetCurrentEnvironment<TData = Awaited<ReturnType<ReturnType<typeof useGetCurrentEnvironmentHook>>>, TError = ErrorType<void>>(options?: {
|
|
22
34
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<ReturnType<typeof useGetCurrentEnvironmentHook>>>, TError, TData>>;
|
|
23
|
-
|
|
24
|
-
|
|
35
|
+
request?: SecondParameter<ReturnType<typeof useCustomClient>>;
|
|
36
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
37
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
25
38
|
};
|
|
26
39
|
export {};
|