@squonk/account-server-client 4.3.1 → 4.4.0-4-4.2174798239
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/rolldown_runtime.cjs +29 -0
- package/dist/api/actions/actions.cjs +85 -0
- package/dist/api/actions/actions.cjs.map +1 -0
- package/dist/api/actions/actions.d.cts +74 -0
- package/dist/api/actions/actions.d.cts.map +1 -0
- package/dist/api/actions/actions.d.ts +74 -0
- package/dist/api/actions/actions.d.ts.map +1 -0
- package/dist/api/actions/actions.js +79 -0
- package/dist/api/actions/actions.js.map +1 -0
- package/dist/api/api.schemas.cjs +142 -0
- package/dist/api/api.schemas.cjs.map +1 -0
- package/dist/api/api.schemas.d.cts +1032 -0
- package/dist/api/api.schemas.d.cts.map +1 -0
- package/dist/api/api.schemas.d.ts +1032 -0
- package/dist/api/api.schemas.d.ts.map +1 -0
- package/dist/api/api.schemas.js +118 -0
- package/dist/api/api.schemas.js.map +1 -0
- package/dist/api/asset/asset.cjs +464 -0
- package/dist/api/asset/asset.cjs.map +1 -0
- package/{asset → dist/api/asset}/asset.d.cts +132 -130
- package/dist/api/asset/asset.d.cts.map +1 -0
- package/{asset → dist/api/asset}/asset.d.ts +132 -130
- package/dist/api/asset/asset.d.ts.map +1 -0
- package/dist/api/asset/asset.js +431 -0
- package/dist/api/asset/asset.js.map +1 -0
- package/dist/api/charges/charges.cjs +272 -0
- package/dist/api/charges/charges.cjs.map +1 -0
- package/{charges → dist/api/charges}/charges.d.cts +106 -104
- package/dist/api/charges/charges.d.cts.map +1 -0
- package/{charges → dist/api/charges}/charges.d.ts +106 -104
- package/dist/api/charges/charges.d.ts.map +1 -0
- package/dist/api/charges/charges.js +248 -0
- package/dist/api/charges/charges.js.map +1 -0
- package/dist/api/event-stream/event-stream.cjs +230 -0
- package/dist/api/event-stream/event-stream.cjs.map +1 -0
- package/{event-stream → dist/api/event-stream}/event-stream.d.cts +75 -73
- package/dist/api/event-stream/event-stream.d.cts.map +1 -0
- package/{event-stream → dist/api/event-stream}/event-stream.d.ts +75 -73
- package/dist/api/event-stream/event-stream.d.ts.map +1 -0
- package/dist/api/event-stream/event-stream.js +212 -0
- package/dist/api/event-stream/event-stream.js.map +1 -0
- package/dist/api/merchant/merchant.cjs +139 -0
- package/dist/api/merchant/merchant.cjs.map +1 -0
- package/{merchant → dist/api/merchant}/merchant.d.cts +56 -54
- package/dist/api/merchant/merchant.d.cts.map +1 -0
- package/{merchant → dist/api/merchant}/merchant.d.ts +56 -54
- package/dist/api/merchant/merchant.d.ts.map +1 -0
- package/dist/api/merchant/merchant.js +127 -0
- package/dist/api/merchant/merchant.js.map +1 -0
- package/dist/api/organisation/organisation.cjs +341 -0
- package/dist/api/organisation/organisation.cjs.map +1 -0
- package/{organisation → dist/api/organisation}/organisation.d.cts +112 -110
- package/dist/api/organisation/organisation.d.cts.map +1 -0
- package/{organisation → dist/api/organisation}/organisation.d.ts +112 -110
- package/dist/api/organisation/organisation.d.ts.map +1 -0
- package/dist/api/organisation/organisation.js +314 -0
- package/dist/api/organisation/organisation.js.map +1 -0
- package/dist/api/product/product.cjs +513 -0
- package/dist/api/product/product.cjs.map +1 -0
- package/{product → dist/api/product}/product.d.cts +188 -186
- package/dist/api/product/product.d.cts.map +1 -0
- package/{product → dist/api/product}/product.d.ts +188 -186
- package/dist/api/product/product.d.ts.map +1 -0
- package/dist/api/product/product.js +468 -0
- package/dist/api/product/product.js.map +1 -0
- package/dist/api/state/state.cjs +76 -0
- package/dist/api/state/state.cjs.map +1 -0
- package/dist/api/state/state.d.cts +66 -0
- package/dist/api/state/state.d.cts.map +1 -0
- package/dist/api/state/state.d.ts +66 -0
- package/dist/api/state/state.d.ts.map +1 -0
- package/dist/api/state/state.js +70 -0
- package/dist/api/state/state.js.map +1 -0
- package/dist/api/unit/unit.cjs +568 -0
- package/dist/api/unit/unit.cjs.map +1 -0
- package/{unit → dist/api/unit}/unit.d.cts +167 -165
- package/dist/api/unit/unit.d.cts.map +1 -0
- package/{unit → dist/api/unit}/unit.d.ts +167 -165
- package/dist/api/unit/unit.d.ts.map +1 -0
- package/dist/api/unit/unit.js +523 -0
- package/dist/api/unit/unit.js.map +1 -0
- package/dist/api/user/user.cjs +380 -0
- package/dist/api/user/user.cjs.map +1 -0
- package/{user → dist/api/user}/user.d.cts +129 -127
- package/dist/api/user/user.d.cts.map +1 -0
- package/{user → dist/api/user}/user.d.ts +129 -127
- package/dist/api/user/user.d.ts.map +1 -0
- package/dist/api/user/user.js +350 -0
- package/dist/api/user/user.js.map +1 -0
- package/dist/custom-instance.cjs +49 -0
- package/dist/custom-instance.cjs.map +1 -0
- package/dist/custom-instance.d.cts +22 -0
- package/dist/custom-instance.d.cts.map +1 -0
- package/dist/custom-instance.d.ts +22 -0
- package/dist/custom-instance.d.ts.map +1 -0
- package/dist/custom-instance.js +44 -0
- package/dist/custom-instance.js.map +1 -0
- package/dist/index.cjs +31 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +4 -0
- package/dist/options-mutator.cjs +24 -0
- package/dist/options-mutator.cjs.map +1 -0
- package/dist/options-mutator.js +23 -0
- package/dist/options-mutator.js.map +1 -0
- package/orval.config.ts +24 -0
- package/package.json +163 -16
- package/pnpm-workspace.yaml +3 -0
- package/src/api/actions/actions.ts +249 -0
- package/src/{account-server-api.schemas.ts → api/api.schemas.ts} +82 -2
- package/src/{asset → api/asset}/asset.ts +8 -8
- package/src/{charges → api/charges}/charges.ts +9 -9
- package/src/{event-stream → api/event-stream}/event-stream.ts +7 -7
- package/src/{merchant → api/merchant}/merchant.ts +7 -7
- package/src/{organisation → api/organisation}/organisation.ts +8 -8
- package/src/{product → api/product}/product.ts +10 -10
- package/src/{state → api/state}/state.ts +6 -6
- package/src/{unit → api/unit}/unit.ts +9 -9
- package/src/{user → api/user}/user.ts +9 -9
- package/src/index.ts +2 -2
- package/src/options-mutator.ts +2 -2
- package/tsconfig.json +29 -0
- package/tsdown.config.ts +52 -0
- package/asset/asset.cjs +0 -281
- package/asset/asset.cjs.map +0 -1
- package/asset/asset.js +0 -281
- package/asset/asset.js.map +0 -1
- package/asset/package.json +0 -7
- package/charges/charges.cjs +0 -176
- package/charges/charges.cjs.map +0 -1
- package/charges/charges.js +0 -176
- package/charges/charges.js.map +0 -1
- package/charges/package.json +0 -7
- package/chunk-3WKSNKHE.js +0 -25
- package/chunk-3WKSNKHE.js.map +0 -1
- package/chunk-NY2VJJG7.cjs +0 -25
- package/chunk-NY2VJJG7.cjs.map +0 -1
- package/chunk-RB2KVIEK.cjs +0 -27
- package/chunk-RB2KVIEK.cjs.map +0 -1
- package/chunk-XYDLYMQ2.js +0 -27
- package/chunk-XYDLYMQ2.js.map +0 -1
- package/event-stream/event-stream.cjs +0 -144
- package/event-stream/event-stream.cjs.map +0 -1
- package/event-stream/event-stream.js +0 -144
- package/event-stream/event-stream.js.map +0 -1
- package/event-stream/package.json +0 -7
- package/index.cjs +0 -142
- package/index.cjs.map +0 -1
- package/index.d.cts +0 -979
- package/index.d.ts +0 -979
- package/index.js +0 -142
- package/index.js.map +0 -1
- package/merchant/merchant.cjs +0 -91
- package/merchant/merchant.cjs.map +0 -1
- package/merchant/merchant.js +0 -91
- package/merchant/merchant.js.map +0 -1
- package/merchant/package.json +0 -7
- package/organisation/organisation.cjs +0 -213
- package/organisation/organisation.cjs.map +0 -1
- package/organisation/organisation.js +0 -213
- package/organisation/organisation.js.map +0 -1
- package/organisation/package.json +0 -7
- package/product/package.json +0 -7
- package/product/product.cjs +0 -341
- package/product/product.cjs.map +0 -1
- package/product/product.js +0 -341
- package/product/product.js.map +0 -1
- package/state/package.json +0 -7
- package/state/state.cjs +0 -53
- package/state/state.cjs.map +0 -1
- package/state/state.d.cts +0 -64
- package/state/state.d.ts +0 -64
- package/state/state.js +0 -53
- package/state/state.js.map +0 -1
- package/unit/package.json +0 -7
- package/unit/unit.cjs +0 -339
- package/unit/unit.cjs.map +0 -1
- package/unit/unit.js +0 -339
- package/unit/unit.js.map +0 -1
- package/user/package.json +0 -7
- package/user/user.cjs +0 -226
- package/user/user.cjs.map +0 -1
- package/user/user.js +0 -226
- package/user/user.js.map +0 -1
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { customInstance } from "../../custom-instance.js";
|
|
2
|
+
import { mutationMutator, queryMutator } from "../../options-mutator.js";
|
|
3
|
+
import { useMutation, useQuery, useSuspenseQuery } from "@tanstack/react-query";
|
|
4
|
+
|
|
5
|
+
//#region src/api/event-stream/event-stream.ts
|
|
6
|
+
/**
|
|
7
|
+
* Generated by orval v7.16.1 🍺
|
|
8
|
+
* Do not edit manually.
|
|
9
|
+
* Account Server API
|
|
10
|
+
* The Informatics Matters Account Server API.
|
|
11
|
+
|
|
12
|
+
A service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.
|
|
13
|
+
|
|
14
|
+
* OpenAPI spec version: 4.4
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Gets the details of the installed event stream, which includes its **protocol**, and **name**.
|
|
18
|
+
|
|
19
|
+
* @summary Gets the details of the installed event stream
|
|
20
|
+
*/
|
|
21
|
+
const getEventStreamVersion = (options, signal) => {
|
|
22
|
+
return customInstance({
|
|
23
|
+
url: `/event-stream/version`,
|
|
24
|
+
method: "GET",
|
|
25
|
+
signal
|
|
26
|
+
}, options);
|
|
27
|
+
};
|
|
28
|
+
const getGetEventStreamVersionQueryKey = () => {
|
|
29
|
+
return [`/event-stream/version`];
|
|
30
|
+
};
|
|
31
|
+
const useGetEventStreamVersionQueryOptions = (options) => {
|
|
32
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
33
|
+
const queryKey = queryOptions?.queryKey ?? getGetEventStreamVersionQueryKey();
|
|
34
|
+
const queryFn = ({ signal }) => getEventStreamVersion(requestOptions, signal);
|
|
35
|
+
return queryMutator({
|
|
36
|
+
...queryOptions,
|
|
37
|
+
queryKey,
|
|
38
|
+
queryFn
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* @summary Gets the details of the installed event stream
|
|
43
|
+
*/
|
|
44
|
+
function useGetEventStreamVersion(options, queryClient) {
|
|
45
|
+
const queryOptions = useGetEventStreamVersionQueryOptions(options);
|
|
46
|
+
const query = useQuery(queryOptions, queryClient);
|
|
47
|
+
query.queryKey = queryOptions.queryKey;
|
|
48
|
+
return query;
|
|
49
|
+
}
|
|
50
|
+
const useGetEventStreamVersionSuspenseQueryOptions = (options) => {
|
|
51
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
52
|
+
const queryKey = queryOptions?.queryKey ?? getGetEventStreamVersionQueryKey();
|
|
53
|
+
const queryFn = ({ signal }) => getEventStreamVersion(requestOptions, signal);
|
|
54
|
+
return queryMutator({
|
|
55
|
+
...queryOptions,
|
|
56
|
+
queryKey,
|
|
57
|
+
queryFn
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* @summary Gets the details of the installed event stream
|
|
62
|
+
*/
|
|
63
|
+
function useGetEventStreamVersionSuspense(options, queryClient) {
|
|
64
|
+
const queryOptions = useGetEventStreamVersionSuspenseQueryOptions(options);
|
|
65
|
+
const query = useSuspenseQuery(queryOptions, queryClient);
|
|
66
|
+
query.queryKey = queryOptions.queryKey;
|
|
67
|
+
return query;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Gets the details of your event stream, if you have created one. The response includes the event stream **id** and the **location** where events can be accessed.
|
|
71
|
+
|
|
72
|
+
* @summary Gets the details of your event stream
|
|
73
|
+
*/
|
|
74
|
+
const getEventStream = (options, signal) => {
|
|
75
|
+
return customInstance({
|
|
76
|
+
url: `/event-stream`,
|
|
77
|
+
method: "GET",
|
|
78
|
+
signal
|
|
79
|
+
}, options);
|
|
80
|
+
};
|
|
81
|
+
const getGetEventStreamQueryKey = () => {
|
|
82
|
+
return [`/event-stream`];
|
|
83
|
+
};
|
|
84
|
+
const useGetEventStreamQueryOptions = (options) => {
|
|
85
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
86
|
+
const queryKey = queryOptions?.queryKey ?? getGetEventStreamQueryKey();
|
|
87
|
+
const queryFn = ({ signal }) => getEventStream(requestOptions, signal);
|
|
88
|
+
return queryMutator({
|
|
89
|
+
...queryOptions,
|
|
90
|
+
queryKey,
|
|
91
|
+
queryFn
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* @summary Gets the details of your event stream
|
|
96
|
+
*/
|
|
97
|
+
function useGetEventStream(options, queryClient) {
|
|
98
|
+
const queryOptions = useGetEventStreamQueryOptions(options);
|
|
99
|
+
const query = useQuery(queryOptions, queryClient);
|
|
100
|
+
query.queryKey = queryOptions.queryKey;
|
|
101
|
+
return query;
|
|
102
|
+
}
|
|
103
|
+
const useGetEventStreamSuspenseQueryOptions = (options) => {
|
|
104
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
105
|
+
const queryKey = queryOptions?.queryKey ?? getGetEventStreamQueryKey();
|
|
106
|
+
const queryFn = ({ signal }) => getEventStream(requestOptions, signal);
|
|
107
|
+
return queryMutator({
|
|
108
|
+
...queryOptions,
|
|
109
|
+
queryKey,
|
|
110
|
+
queryFn
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* @summary Gets the details of your event stream
|
|
115
|
+
*/
|
|
116
|
+
function useGetEventStreamSuspense(options, queryClient) {
|
|
117
|
+
const queryOptions = useGetEventStreamSuspenseQueryOptions(options);
|
|
118
|
+
const query = useSuspenseQuery(queryOptions, queryClient);
|
|
119
|
+
query.queryKey = queryOptions.queryKey;
|
|
120
|
+
return query;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Creates a new event stream for the authenticated user. Event streams deliver near-real-time events to the user, typically through a long-running *Socket*. The protocol is dependent on the Event Stream Service that has been installed. Our **Python FastAPI WebSocket** service is one such service.
|
|
124
|
+
|
|
125
|
+
Events are delivered to the client using the a `format` chosen here. Internally, events are **Protocol Buffer** objects that are delivered, by default as a single-line string using `MessageToString`. This is the `PROTOCOL_STRING` format. Clients can choose to receive messages as a JSON string using the format `JSON_STRING`. Using JSON strings will incur a small processing penalty but they are useful if the client does not have access to a library that can decode protocol buffer strings.
|
|
126
|
+
|
|
127
|
+
The response will include the event stream **id** and the **location** where events can be accessed.
|
|
128
|
+
|
|
129
|
+
The event streaming service is an optional component of the Account Server. If a service is not installed you will receive a corresponding **404** error response.
|
|
130
|
+
|
|
131
|
+
A user is only permitted one event stream.
|
|
132
|
+
|
|
133
|
+
* @summary Create a new event stream
|
|
134
|
+
*/
|
|
135
|
+
const createEventStream = (eventStreamPostBodyBody, options, signal) => {
|
|
136
|
+
return customInstance({
|
|
137
|
+
url: `/event-stream`,
|
|
138
|
+
method: "POST",
|
|
139
|
+
headers: { "Content-Type": "application/json" },
|
|
140
|
+
data: eventStreamPostBodyBody,
|
|
141
|
+
signal
|
|
142
|
+
}, options);
|
|
143
|
+
};
|
|
144
|
+
const useCreateEventStreamMutationOptions = (options) => {
|
|
145
|
+
const mutationKey = ["createEventStream"];
|
|
146
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
147
|
+
...options,
|
|
148
|
+
mutation: {
|
|
149
|
+
...options.mutation,
|
|
150
|
+
mutationKey
|
|
151
|
+
}
|
|
152
|
+
} : {
|
|
153
|
+
mutation: { mutationKey },
|
|
154
|
+
request: void 0
|
|
155
|
+
};
|
|
156
|
+
const mutationFn = (props) => {
|
|
157
|
+
const { data } = props ?? {};
|
|
158
|
+
return createEventStream(data, requestOptions);
|
|
159
|
+
};
|
|
160
|
+
return mutationMutator({
|
|
161
|
+
...mutationOptions,
|
|
162
|
+
mutationFn
|
|
163
|
+
});
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* @summary Create a new event stream
|
|
167
|
+
*/
|
|
168
|
+
const useCreateEventStream = (options, queryClient) => {
|
|
169
|
+
return useMutation(useCreateEventStreamMutationOptions(options), queryClient);
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* You must be the user who created the event stream.
|
|
173
|
+
|
|
174
|
+
* @summary Deletes an existing event stream (that you created)
|
|
175
|
+
*/
|
|
176
|
+
const deleteEventStream = (eventStreamId, options) => {
|
|
177
|
+
return customInstance({
|
|
178
|
+
url: `/event-stream/${eventStreamId}`,
|
|
179
|
+
method: "DELETE"
|
|
180
|
+
}, options);
|
|
181
|
+
};
|
|
182
|
+
const useDeleteEventStreamMutationOptions = (options) => {
|
|
183
|
+
const mutationKey = ["deleteEventStream"];
|
|
184
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
185
|
+
...options,
|
|
186
|
+
mutation: {
|
|
187
|
+
...options.mutation,
|
|
188
|
+
mutationKey
|
|
189
|
+
}
|
|
190
|
+
} : {
|
|
191
|
+
mutation: { mutationKey },
|
|
192
|
+
request: void 0
|
|
193
|
+
};
|
|
194
|
+
const mutationFn = (props) => {
|
|
195
|
+
const { eventStreamId } = props ?? {};
|
|
196
|
+
return deleteEventStream(eventStreamId, requestOptions);
|
|
197
|
+
};
|
|
198
|
+
return mutationMutator({
|
|
199
|
+
...mutationOptions,
|
|
200
|
+
mutationFn
|
|
201
|
+
});
|
|
202
|
+
};
|
|
203
|
+
/**
|
|
204
|
+
* @summary Deletes an existing event stream (that you created)
|
|
205
|
+
*/
|
|
206
|
+
const useDeleteEventStream = (options, queryClient) => {
|
|
207
|
+
return useMutation(useDeleteEventStreamMutationOptions(options), queryClient);
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
//#endregion
|
|
211
|
+
export { createEventStream, deleteEventStream, getEventStream, getEventStreamVersion, getGetEventStreamQueryKey, getGetEventStreamVersionQueryKey, useCreateEventStream, useCreateEventStreamMutationOptions, useDeleteEventStream, useDeleteEventStreamMutationOptions, useGetEventStream, useGetEventStreamQueryOptions, useGetEventStreamSuspense, useGetEventStreamSuspenseQueryOptions, useGetEventStreamVersion, useGetEventStreamVersionQueryOptions, useGetEventStreamVersionSuspense, useGetEventStreamVersionSuspenseQueryOptions };
|
|
212
|
+
//# sourceMappingURL=event-stream.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-stream.js","names":["queryFn: QueryFunction<Awaited<ReturnType<typeof getEventStreamVersion>>>","queryFn: QueryFunction<Awaited<ReturnType<typeof getEventStream>>>","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createEventStream>>,\n { data: EventStreamPostBodyBody }\n >","mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteEventStream>>,\n { eventStreamId: number }\n >"],"sources":["../../../src/api/event-stream/event-stream.ts"],"sourcesContent":["/**\n * Generated by orval v7.16.1 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 4.4\n */\nimport { useMutation, useQuery, useSuspenseQuery } from \"@tanstack/react-query\";\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryClient,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult,\n} from \"@tanstack/react-query\";\n\nimport type {\n AsError,\n EventStreamGetPostResponse,\n EventStreamPostBodyBody,\n EventStreamVersionGetResponse,\n} from \"../api.schemas\";\n\nimport { customInstance } from \"../../custom-instance\";\nimport type { ErrorType } from \"../../custom-instance\";\nimport { queryMutator } from \"../../options-mutator\";\nimport { mutationMutator } from \"../../options-mutator\";\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n/**\n * Gets the details of the installed event stream, which includes its **protocol**, and **name**.\n\n * @summary Gets the details of the installed event stream\n */\nexport const getEventStreamVersion = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<EventStreamVersionGetResponse>(\n { url: `/event-stream/version`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetEventStreamVersionQueryKey = () => {\n return [`/event-stream/version`] as const;\n};\n\nexport const useGetEventStreamVersionQueryOptions = <\n TData = Awaited<ReturnType<typeof getEventStreamVersion>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getEventStreamVersion>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetEventStreamVersionQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getEventStreamVersion>>> = ({ signal }) =>\n getEventStreamVersion(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof getEventStreamVersion>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetEventStreamVersionQueryResult = NonNullable<\n Awaited<ReturnType<typeof getEventStreamVersion>>\n>;\nexport type GetEventStreamVersionQueryError = ErrorType<void | AsError>;\n\nexport function useGetEventStreamVersion<\n TData = Awaited<ReturnType<typeof getEventStreamVersion>>,\n TError = ErrorType<void | AsError>,\n>(\n options: {\n query: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getEventStreamVersion>>, TError, TData>\n > &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getEventStreamVersion>>,\n TError,\n Awaited<ReturnType<typeof getEventStreamVersion>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetEventStreamVersion<\n TData = Awaited<ReturnType<typeof getEventStreamVersion>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getEventStreamVersion>>, TError, TData>\n > &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getEventStreamVersion>>,\n TError,\n Awaited<ReturnType<typeof getEventStreamVersion>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetEventStreamVersion<\n TData = Awaited<ReturnType<typeof getEventStreamVersion>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getEventStreamVersion>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets the details of the installed event stream\n */\n\nexport function useGetEventStreamVersion<\n TData = Awaited<ReturnType<typeof getEventStreamVersion>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getEventStreamVersion>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetEventStreamVersionQueryOptions(options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetEventStreamVersionSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getEventStreamVersion>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getEventStreamVersion>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetEventStreamVersionQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getEventStreamVersion>>> = ({ signal }) =>\n getEventStreamVersion(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getEventStreamVersion>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetEventStreamVersionSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getEventStreamVersion>>\n>;\nexport type GetEventStreamVersionSuspenseQueryError = ErrorType<void | AsError>;\n\nexport function useGetEventStreamVersionSuspense<\n TData = Awaited<ReturnType<typeof getEventStreamVersion>>,\n TError = ErrorType<void | AsError>,\n>(\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getEventStreamVersion>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetEventStreamVersionSuspense<\n TData = Awaited<ReturnType<typeof getEventStreamVersion>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getEventStreamVersion>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetEventStreamVersionSuspense<\n TData = Awaited<ReturnType<typeof getEventStreamVersion>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getEventStreamVersion>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets the details of the installed event stream\n */\n\nexport function useGetEventStreamVersionSuspense<\n TData = Awaited<ReturnType<typeof getEventStreamVersion>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getEventStreamVersion>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetEventStreamVersionSuspenseQueryOptions(options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Gets the details of your event stream, if you have created one. The response includes the event stream **id** and the **location** where events can be accessed.\n\n * @summary Gets the details of your event stream\n */\nexport const getEventStream = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<EventStreamGetPostResponse>(\n { url: `/event-stream`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetEventStreamQueryKey = () => {\n return [`/event-stream`] as const;\n};\n\nexport const useGetEventStreamQueryOptions = <\n TData = Awaited<ReturnType<typeof getEventStream>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetEventStreamQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getEventStream>>> = ({ signal }) =>\n getEventStream(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof getEventStream>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetEventStreamQueryResult = NonNullable<Awaited<ReturnType<typeof getEventStream>>>;\nexport type GetEventStreamQueryError = ErrorType<void | AsError>;\n\nexport function useGetEventStream<\n TData = Awaited<ReturnType<typeof getEventStream>>,\n TError = ErrorType<void | AsError>,\n>(\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getEventStream>>,\n TError,\n Awaited<ReturnType<typeof getEventStream>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetEventStream<\n TData = Awaited<ReturnType<typeof getEventStream>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getEventStream>>,\n TError,\n Awaited<ReturnType<typeof getEventStream>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetEventStream<\n TData = Awaited<ReturnType<typeof getEventStream>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets the details of your event stream\n */\n\nexport function useGetEventStream<\n TData = Awaited<ReturnType<typeof getEventStream>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetEventStreamQueryOptions(options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetEventStreamSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getEventStream>>,\n TError = ErrorType<void | AsError>,\n>(options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetEventStreamQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getEventStream>>> = ({ signal }) =>\n getEventStream(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getEventStream>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetEventStreamSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getEventStream>>\n>;\nexport type GetEventStreamSuspenseQueryError = ErrorType<void | AsError>;\n\nexport function useGetEventStreamSuspense<\n TData = Awaited<ReturnType<typeof getEventStream>>,\n TError = ErrorType<void | AsError>,\n>(\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetEventStreamSuspense<\n TData = Awaited<ReturnType<typeof getEventStream>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetEventStreamSuspense<\n TData = Awaited<ReturnType<typeof getEventStream>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets the details of your event stream\n */\n\nexport function useGetEventStreamSuspense<\n TData = Awaited<ReturnType<typeof getEventStream>>,\n TError = ErrorType<void | AsError>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetEventStreamSuspenseQueryOptions(options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Creates a new event stream for the authenticated user. Event streams deliver near-real-time events to the user, typically through a long-running *Socket*. The protocol is dependent on the Event Stream Service that has been installed. Our **Python FastAPI WebSocket** service is one such service.\n\nEvents are delivered to the client using the a `format` chosen here. Internally, events are **Protocol Buffer** objects that are delivered, by default as a single-line string using `MessageToString`. This is the `PROTOCOL_STRING` format. Clients can choose to receive messages as a JSON string using the format `JSON_STRING`. Using JSON strings will incur a small processing penalty but they are useful if the client does not have access to a library that can decode protocol buffer strings.\n\nThe response will include the event stream **id** and the **location** where events can be accessed.\n\nThe event streaming service is an optional component of the Account Server. If a service is not installed you will receive a corresponding **404** error response.\n\nA user is only permitted one event stream.\n\n * @summary Create a new event stream\n */\nexport const createEventStream = (\n eventStreamPostBodyBody: EventStreamPostBodyBody,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<EventStreamGetPostResponse>(\n {\n url: `/event-stream`,\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n data: eventStreamPostBodyBody,\n signal,\n },\n options,\n );\n};\n\nexport const useCreateEventStreamMutationOptions = <\n TError = ErrorType<AsError | void>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createEventStream>>,\n TError,\n { data: EventStreamPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof createEventStream>>,\n TError,\n { data: EventStreamPostBodyBody },\n TContext\n> => {\n const mutationKey = [\"createEventStream\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createEventStream>>,\n { data: EventStreamPostBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return createEventStream(data, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type CreateEventStreamMutationResult = NonNullable<\n Awaited<ReturnType<typeof createEventStream>>\n>;\nexport type CreateEventStreamMutationBody = EventStreamPostBodyBody;\nexport type CreateEventStreamMutationError = ErrorType<AsError | void>;\n\n/**\n * @summary Create a new event stream\n */\nexport const useCreateEventStream = <TError = ErrorType<AsError | void>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createEventStream>>,\n TError,\n { data: EventStreamPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof createEventStream>>,\n TError,\n { data: EventStreamPostBodyBody },\n TContext\n> => {\n const mutationOptions = useCreateEventStreamMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n/**\n * You must be the user who created the event stream.\n\n * @summary Deletes an existing event stream (that you created)\n */\nexport const deleteEventStream = (\n eventStreamId: number,\n options?: SecondParameter<typeof customInstance>,\n) => {\n return customInstance<void>({ url: `/event-stream/${eventStreamId}`, method: \"DELETE\" }, options);\n};\n\nexport const useDeleteEventStreamMutationOptions = <\n TError = ErrorType<void | AsError>,\n TContext = unknown,\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteEventStream>>,\n TError,\n { eventStreamId: number },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteEventStream>>,\n TError,\n { eventStreamId: number },\n TContext\n> => {\n const mutationKey = [\"deleteEventStream\"];\n const { mutation: mutationOptions, request: requestOptions } = options\n ? options.mutation && \"mutationKey\" in options.mutation && options.mutation.mutationKey\n ? options\n : { ...options, mutation: { ...options.mutation, mutationKey } }\n : { mutation: { mutationKey }, request: undefined };\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteEventStream>>,\n { eventStreamId: number }\n > = (props) => {\n const { eventStreamId } = props ?? {};\n\n return deleteEventStream(eventStreamId, requestOptions);\n };\n\n const customOptions = mutationMutator({ ...mutationOptions, mutationFn });\n\n return customOptions;\n};\n\nexport type DeleteEventStreamMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteEventStream>>\n>;\n\nexport type DeleteEventStreamMutationError = ErrorType<void | AsError>;\n\n/**\n * @summary Deletes an existing event stream (that you created)\n */\nexport const useDeleteEventStream = <TError = ErrorType<void | AsError>, TContext = unknown>(\n options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteEventStream>>,\n TError,\n { eventStreamId: number },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseMutationResult<\n Awaited<ReturnType<typeof deleteEventStream>>,\n TError,\n { eventStreamId: number },\n TContext\n> => {\n const mutationOptions = useDeleteEventStreamMutationOptions(options);\n\n return useMutation(mutationOptions, queryClient);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA+CA,MAAa,yBACX,SACA,WACG;AACH,QAAO,eACL;EAAE,KAAK;EAAyB,QAAQ;EAAO;EAAQ,EACvD,QACD;;AAGH,MAAa,yCAAyC;AACpD,QAAO,CAAC,wBAAwB;;AAGlC,MAAa,wCAGX,YAKI;CACJ,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WAAW,cAAc,YAAY,kCAAkC;CAE7E,MAAMA,WAA6E,EAAE,aACnF,sBAAsB,gBAAgB,OAAO;AAI/C,QAFsB,aAAa;EAAE,GAAG;EAAc;EAAU;EAAS,CAAC;;;;;AAsE5E,SAAgB,yBAId,SAMA,aACgF;CAChF,MAAM,eAAe,qCAAqC,QAAQ;CAElE,MAAM,QAAQ,SAAS,cAAc,YAAY;AAIjD,OAAM,WAAW,aAAa;AAE9B,QAAO;;AAGT,MAAa,gDAGX,YAKI;CACJ,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WAAW,cAAc,YAAY,kCAAkC;CAE7E,MAAMA,WAA6E,EAAE,aACnF,sBAAsB,gBAAgB,OAAO;AAI/C,QAFsB,aAAa;EAAE,GAAG;EAAc;EAAU;EAAS,CAAC;;;;;AAsD5E,SAAgB,iCAId,SAMA,aACwF;CACxF,MAAM,eAAe,6CAA6C,QAAQ;CAE1E,MAAM,QAAQ,iBAAiB,cAAc,YAAY;AAKzD,OAAM,WAAW,aAAa;AAE9B,QAAO;;;;;;;AAQT,MAAa,kBACX,SACA,WACG;AACH,QAAO,eACL;EAAE,KAAK;EAAiB,QAAQ;EAAO;EAAQ,EAC/C,QACD;;AAGH,MAAa,kCAAkC;AAC7C,QAAO,CAAC,gBAAgB;;AAG1B,MAAa,iCAGX,YAGI;CACJ,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WAAW,cAAc,YAAY,2BAA2B;CAEtE,MAAMC,WAAsE,EAAE,aAC5E,eAAe,gBAAgB,OAAO;AAIxC,QAFsB,aAAa;EAAE,GAAG;EAAc;EAAU;EAAS,CAAC;;;;;AA8D5E,SAAgB,kBAId,SAIA,aACgF;CAChF,MAAM,eAAe,8BAA8B,QAAQ;CAE3D,MAAM,QAAQ,SAAS,cAAc,YAAY;AAIjD,OAAM,WAAW,aAAa;AAE9B,QAAO;;AAGT,MAAa,yCAGX,YAKI;CACJ,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WAAW,cAAc,YAAY,2BAA2B;CAEtE,MAAMA,WAAsE,EAAE,aAC5E,eAAe,gBAAgB,OAAO;AAIxC,QAFsB,aAAa;EAAE,GAAG;EAAc;EAAU;EAAS,CAAC;;;;;AAsD5E,SAAgB,0BAId,SAMA,aACwF;CACxF,MAAM,eAAe,sCAAsC,QAAQ;CAEnE,MAAM,QAAQ,iBAAiB,cAAc,YAAY;AAKzD,OAAM,WAAW,aAAa;AAE9B,QAAO;;;;;;;;;;;;;;;AAgBT,MAAa,qBACX,yBACA,SACA,WACG;AACH,QAAO,eACL;EACE,KAAK;EACL,QAAQ;EACR,SAAS,EAAE,gBAAgB,oBAAoB;EAC/C,MAAM;EACN;EACD,EACD,QACD;;AAGH,MAAa,uCAGX,YAaG;CACH,MAAM,cAAc,CAAC,oBAAoB;CACzC,MAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,UAC3D,QAAQ,YAAY,iBAAiB,QAAQ,YAAY,QAAQ,SAAS,cACxE,UACA;EAAE,GAAG;EAAS,UAAU;GAAE,GAAG,QAAQ;GAAU;GAAa;EAAE,GAChE;EAAE,UAAU,EAAE,aAAa;EAAE,SAAS;EAAW;CAErD,MAAMC,cAGD,UAAU;EACb,MAAM,EAAE,SAAS,SAAS,EAAE;AAE5B,SAAO,kBAAkB,MAAM,eAAe;;AAKhD,QAFsB,gBAAgB;EAAE,GAAG;EAAiB;EAAY,CAAC;;;;;AAc3E,MAAa,wBACX,SASA,gBAMG;AAGH,QAAO,YAFiB,oCAAoC,QAAQ,EAEhC,YAAY;;;;;;;AAOlD,MAAa,qBACX,eACA,YACG;AACH,QAAO,eAAqB;EAAE,KAAK,iBAAiB;EAAiB,QAAQ;EAAU,EAAE,QAAQ;;AAGnG,MAAa,uCAGX,YAaG;CACH,MAAM,cAAc,CAAC,oBAAoB;CACzC,MAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,UAC3D,QAAQ,YAAY,iBAAiB,QAAQ,YAAY,QAAQ,SAAS,cACxE,UACA;EAAE,GAAG;EAAS,UAAU;GAAE,GAAG,QAAQ;GAAU;GAAa;EAAE,GAChE;EAAE,UAAU,EAAE,aAAa;EAAE,SAAS;EAAW;CAErD,MAAMC,cAGD,UAAU;EACb,MAAM,EAAE,kBAAkB,SAAS,EAAE;AAErC,SAAO,kBAAkB,eAAe,eAAe;;AAKzD,QAFsB,gBAAgB;EAAE,GAAG;EAAiB;EAAY,CAAC;;;;;AAc3E,MAAa,wBACX,SASA,gBAMG;AAGH,QAAO,YAFiB,oCAAoC,QAAQ,EAEhC,YAAY"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_custom_instance = require('../../custom-instance.cjs');
|
|
3
|
+
const require_options_mutator = require('../../options-mutator.cjs');
|
|
4
|
+
let __tanstack_react_query = require("@tanstack/react-query");
|
|
5
|
+
|
|
6
|
+
//#region src/api/merchant/merchant.ts
|
|
7
|
+
/**
|
|
8
|
+
* Generated by orval v7.16.1 🍺
|
|
9
|
+
* Do not edit manually.
|
|
10
|
+
* Account Server API
|
|
11
|
+
* The Informatics Matters Account Server API.
|
|
12
|
+
|
|
13
|
+
A service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.
|
|
14
|
+
|
|
15
|
+
* OpenAPI spec version: 4.4
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Gets Merchants known to the Account Server
|
|
19
|
+
|
|
20
|
+
Merchants are software services (SaaS assets) whose facilities are known to and controlled by the Account Server
|
|
21
|
+
|
|
22
|
+
* @summary Gets all Merchants
|
|
23
|
+
*/
|
|
24
|
+
const getMerchants = (options, signal) => {
|
|
25
|
+
return require_custom_instance.customInstance({
|
|
26
|
+
url: `/merchant`,
|
|
27
|
+
method: "GET",
|
|
28
|
+
signal
|
|
29
|
+
}, options);
|
|
30
|
+
};
|
|
31
|
+
const getGetMerchantsQueryKey = () => {
|
|
32
|
+
return [`/merchant`];
|
|
33
|
+
};
|
|
34
|
+
const useGetMerchantsQueryOptions = (options) => {
|
|
35
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
36
|
+
const queryKey = queryOptions?.queryKey ?? getGetMerchantsQueryKey();
|
|
37
|
+
const queryFn = ({ signal }) => getMerchants(requestOptions, signal);
|
|
38
|
+
return require_options_mutator.queryMutator({
|
|
39
|
+
...queryOptions,
|
|
40
|
+
queryKey,
|
|
41
|
+
queryFn
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* @summary Gets all Merchants
|
|
46
|
+
*/
|
|
47
|
+
function useGetMerchants(options, queryClient) {
|
|
48
|
+
const queryOptions = useGetMerchantsQueryOptions(options);
|
|
49
|
+
const query = (0, __tanstack_react_query.useQuery)(queryOptions, queryClient);
|
|
50
|
+
query.queryKey = queryOptions.queryKey;
|
|
51
|
+
return query;
|
|
52
|
+
}
|
|
53
|
+
const useGetMerchantsSuspenseQueryOptions = (options) => {
|
|
54
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
55
|
+
const queryKey = queryOptions?.queryKey ?? getGetMerchantsQueryKey();
|
|
56
|
+
const queryFn = ({ signal }) => getMerchants(requestOptions, signal);
|
|
57
|
+
return require_options_mutator.queryMutator({
|
|
58
|
+
...queryOptions,
|
|
59
|
+
queryKey,
|
|
60
|
+
queryFn
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* @summary Gets all Merchants
|
|
65
|
+
*/
|
|
66
|
+
function useGetMerchantsSuspense(options, queryClient) {
|
|
67
|
+
const queryOptions = useGetMerchantsSuspenseQueryOptions(options);
|
|
68
|
+
const query = (0, __tanstack_react_query.useSuspenseQuery)(queryOptions, queryClient);
|
|
69
|
+
query.queryKey = queryOptions.queryKey;
|
|
70
|
+
return query;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Gets a known Merchant
|
|
74
|
+
|
|
75
|
+
* @summary Gets a specific Merchant
|
|
76
|
+
*/
|
|
77
|
+
const getService = (mId, options, signal) => {
|
|
78
|
+
return require_custom_instance.customInstance({
|
|
79
|
+
url: `/merchant/${mId}`,
|
|
80
|
+
method: "GET",
|
|
81
|
+
signal
|
|
82
|
+
}, options);
|
|
83
|
+
};
|
|
84
|
+
const getGetServiceQueryKey = (mId) => {
|
|
85
|
+
return [`/merchant/${mId}`];
|
|
86
|
+
};
|
|
87
|
+
const useGetServiceQueryOptions = (mId, options) => {
|
|
88
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
89
|
+
const queryKey = queryOptions?.queryKey ?? getGetServiceQueryKey(mId);
|
|
90
|
+
const queryFn = ({ signal }) => getService(mId, requestOptions, signal);
|
|
91
|
+
return require_options_mutator.queryMutator({
|
|
92
|
+
...queryOptions,
|
|
93
|
+
queryKey,
|
|
94
|
+
queryFn
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* @summary Gets a specific Merchant
|
|
99
|
+
*/
|
|
100
|
+
function useGetService(mId, options, queryClient) {
|
|
101
|
+
const queryOptions = useGetServiceQueryOptions(mId, options);
|
|
102
|
+
const query = (0, __tanstack_react_query.useQuery)(queryOptions, queryClient);
|
|
103
|
+
query.queryKey = queryOptions.queryKey;
|
|
104
|
+
return query;
|
|
105
|
+
}
|
|
106
|
+
const useGetServiceSuspenseQueryOptions = (mId, options) => {
|
|
107
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
108
|
+
const queryKey = queryOptions?.queryKey ?? getGetServiceQueryKey(mId);
|
|
109
|
+
const queryFn = ({ signal }) => getService(mId, requestOptions, signal);
|
|
110
|
+
return require_options_mutator.queryMutator({
|
|
111
|
+
...queryOptions,
|
|
112
|
+
queryKey,
|
|
113
|
+
queryFn
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* @summary Gets a specific Merchant
|
|
118
|
+
*/
|
|
119
|
+
function useGetServiceSuspense(mId, options, queryClient) {
|
|
120
|
+
const queryOptions = useGetServiceSuspenseQueryOptions(mId, options);
|
|
121
|
+
const query = (0, __tanstack_react_query.useSuspenseQuery)(queryOptions, queryClient);
|
|
122
|
+
query.queryKey = queryOptions.queryKey;
|
|
123
|
+
return query;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
//#endregion
|
|
127
|
+
exports.getGetMerchantsQueryKey = getGetMerchantsQueryKey;
|
|
128
|
+
exports.getGetServiceQueryKey = getGetServiceQueryKey;
|
|
129
|
+
exports.getMerchants = getMerchants;
|
|
130
|
+
exports.getService = getService;
|
|
131
|
+
exports.useGetMerchants = useGetMerchants;
|
|
132
|
+
exports.useGetMerchantsQueryOptions = useGetMerchantsQueryOptions;
|
|
133
|
+
exports.useGetMerchantsSuspense = useGetMerchantsSuspense;
|
|
134
|
+
exports.useGetMerchantsSuspenseQueryOptions = useGetMerchantsSuspenseQueryOptions;
|
|
135
|
+
exports.useGetService = useGetService;
|
|
136
|
+
exports.useGetServiceQueryOptions = useGetServiceQueryOptions;
|
|
137
|
+
exports.useGetServiceSuspense = useGetServiceSuspense;
|
|
138
|
+
exports.useGetServiceSuspenseQueryOptions = useGetServiceSuspenseQueryOptions;
|
|
139
|
+
//# sourceMappingURL=merchant.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merchant.cjs","names":["customInstance","queryFn: QueryFunction<Awaited<ReturnType<typeof getMerchants>>>","queryMutator","queryFn: QueryFunction<Awaited<ReturnType<typeof getService>>>"],"sources":["../../../src/api/merchant/merchant.ts"],"sourcesContent":["/**\n * Generated by orval v7.16.1 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 4.4\n */\nimport { useQuery, useSuspenseQuery } from \"@tanstack/react-query\";\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n QueryClient,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult,\n} from \"@tanstack/react-query\";\n\nimport type { AsError, MerchantDetail, MerchantsGetResponse } from \"../api.schemas\";\n\nimport { customInstance } from \"../../custom-instance\";\nimport type { ErrorType } from \"../../custom-instance\";\nimport { queryMutator } from \"../../options-mutator\";\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n/**\n * Gets Merchants known to the Account Server\n\nMerchants are software services (SaaS assets) whose facilities are known to and controlled by the Account Server\n\n * @summary Gets all Merchants\n */\nexport const getMerchants = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<MerchantsGetResponse>({ url: `/merchant`, method: \"GET\", signal }, options);\n};\n\nexport const getGetMerchantsQueryKey = () => {\n return [`/merchant`] as const;\n};\n\nexport const useGetMerchantsQueryOptions = <\n TData = Awaited<ReturnType<typeof getMerchants>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMerchantsQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMerchants>>> = ({ signal }) =>\n getMerchants(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof getMerchants>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetMerchantsQueryResult = NonNullable<Awaited<ReturnType<typeof getMerchants>>>;\nexport type GetMerchantsQueryError = ErrorType<AsError | void>;\n\nexport function useGetMerchants<\n TData = Awaited<ReturnType<typeof getMerchants>>,\n TError = ErrorType<AsError | void>,\n>(\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMerchants>>,\n TError,\n Awaited<ReturnType<typeof getMerchants>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetMerchants<\n TData = Awaited<ReturnType<typeof getMerchants>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMerchants>>,\n TError,\n Awaited<ReturnType<typeof getMerchants>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetMerchants<\n TData = Awaited<ReturnType<typeof getMerchants>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets all Merchants\n */\n\nexport function useGetMerchants<\n TData = Awaited<ReturnType<typeof getMerchants>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetMerchantsQueryOptions(options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetMerchantsSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getMerchants>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMerchantsQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMerchants>>> = ({ signal }) =>\n getMerchants(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getMerchants>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetMerchantsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getMerchants>>>;\nexport type GetMerchantsSuspenseQueryError = ErrorType<AsError | void>;\n\nexport function useGetMerchantsSuspense<\n TData = Awaited<ReturnType<typeof getMerchants>>,\n TError = ErrorType<AsError | void>,\n>(\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetMerchantsSuspense<\n TData = Awaited<ReturnType<typeof getMerchants>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetMerchantsSuspense<\n TData = Awaited<ReturnType<typeof getMerchants>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets all Merchants\n */\n\nexport function useGetMerchantsSuspense<\n TData = Awaited<ReturnType<typeof getMerchants>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetMerchantsSuspenseQueryOptions(options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Gets a known Merchant\n\n * @summary Gets a specific Merchant\n */\nexport const getService = (\n mId: number,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<MerchantDetail>(\n { url: `/merchant/${mId}`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetServiceQueryKey = (mId?: number) => {\n return [`/merchant/${mId}`] as const;\n};\n\nexport const useGetServiceQueryOptions = <\n TData = Awaited<ReturnType<typeof getService>>,\n TError = ErrorType<AsError | void>,\n>(\n mId: number,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetServiceQueryKey(mId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getService>>> = ({ signal }) =>\n getService(mId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n};\n\nexport type GetServiceQueryResult = NonNullable<Awaited<ReturnType<typeof getService>>>;\nexport type GetServiceQueryError = ErrorType<AsError | void>;\n\nexport function useGetService<\n TData = Awaited<ReturnType<typeof getService>>,\n TError = ErrorType<AsError | void>,\n>(\n mId: number,\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getService>>,\n TError,\n Awaited<ReturnType<typeof getService>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetService<\n TData = Awaited<ReturnType<typeof getService>>,\n TError = ErrorType<AsError | void>,\n>(\n mId: number,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getService>>,\n TError,\n Awaited<ReturnType<typeof getService>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetService<\n TData = Awaited<ReturnType<typeof getService>>,\n TError = ErrorType<AsError | void>,\n>(\n mId: number,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets a specific Merchant\n */\n\nexport function useGetService<\n TData = Awaited<ReturnType<typeof getService>>,\n TError = ErrorType<AsError | void>,\n>(\n mId: number,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetServiceQueryOptions(mId, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetServiceSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getService>>,\n TError = ErrorType<AsError | void>,\n>(\n mId: number,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetServiceQueryKey(mId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getService>>> = ({ signal }) =>\n getService(mId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getService>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetServiceSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getService>>>;\nexport type GetServiceSuspenseQueryError = ErrorType<AsError | void>;\n\nexport function useGetServiceSuspense<\n TData = Awaited<ReturnType<typeof getService>>,\n TError = ErrorType<AsError | void>,\n>(\n mId: number,\n options: {\n query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetServiceSuspense<\n TData = Awaited<ReturnType<typeof getService>>,\n TError = ErrorType<AsError | void>,\n>(\n mId: number,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetServiceSuspense<\n TData = Awaited<ReturnType<typeof getService>>,\n TError = ErrorType<AsError | void>,\n>(\n mId: number,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets a specific Merchant\n */\n\nexport function useGetServiceSuspense<\n TData = Awaited<ReturnType<typeof getService>>,\n TError = ErrorType<AsError | void>,\n>(\n mId: number,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetServiceSuspenseQueryOptions(mId, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAwCA,MAAa,gBACX,SACA,WACG;AACH,QAAOA,uCAAqC;EAAE,KAAK;EAAa,QAAQ;EAAO;EAAQ,EAAE,QAAQ;;AAGnG,MAAa,gCAAgC;AAC3C,QAAO,CAAC,YAAY;;AAGtB,MAAa,+BAGX,YAGI;CACJ,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WAAW,cAAc,YAAY,yBAAyB;CAEpE,MAAMC,WAAoE,EAAE,aAC1E,aAAa,gBAAgB,OAAO;AAItC,QAFsBC,qCAAa;EAAE,GAAG;EAAc;EAAU;EAAS,CAAC;;;;;AA8D5E,SAAgB,gBAId,SAIA,aACgF;CAChF,MAAM,eAAe,4BAA4B,QAAQ;CAEzD,MAAM,6CAAiB,cAAc,YAAY;AAIjD,OAAM,WAAW,aAAa;AAE9B,QAAO;;AAGT,MAAa,uCAGX,YAGI;CACJ,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WAAW,cAAc,YAAY,yBAAyB;CAEpE,MAAMD,WAAoE,EAAE,aAC1E,aAAa,gBAAgB,OAAO;AAItC,QAFsBC,qCAAa;EAAE,GAAG;EAAc;EAAU;EAAS,CAAC;;;;;AAoD5E,SAAgB,wBAId,SAMA,aACwF;CACxF,MAAM,eAAe,oCAAoC,QAAQ;CAEjE,MAAM,qDAAyB,cAAc,YAAY;AAKzD,OAAM,WAAW,aAAa;AAE9B,QAAO;;;;;;;AAQT,MAAa,cACX,KACA,SACA,WACG;AACH,QAAOF,uCACL;EAAE,KAAK,aAAa;EAAO,QAAQ;EAAO;EAAQ,EAClD,QACD;;AAGH,MAAa,yBAAyB,QAAiB;AACrD,QAAO,CAAC,aAAa,MAAM;;AAG7B,MAAa,6BAIX,KACA,YAIG;CACH,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WAAW,cAAc,YAAY,sBAAsB,IAAI;CAErE,MAAMG,WAAkE,EAAE,aACxE,WAAW,KAAK,gBAAgB,OAAO;AAIzC,QAFsBD,qCAAa;EAAE,GAAG;EAAc;EAAU;EAAS,CAAC;;;;;AA+D5E,SAAgB,cAId,KACA,SAIA,aACgF;CAChF,MAAM,eAAe,0BAA0B,KAAK,QAAQ;CAE5D,MAAM,6CAAiB,cAAc,YAAY;AAIjD,OAAM,WAAW,aAAa;AAE9B,QAAO;;AAGT,MAAa,qCAIX,KACA,YAIG;CACH,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WAAW,cAAc,YAAY,sBAAsB,IAAI;CAErE,MAAMC,WAAkE,EAAE,aACxE,WAAW,KAAK,gBAAgB,OAAO;AAIzC,QAFsBD,qCAAa;EAAE,GAAG;EAAc;EAAU;EAAS,CAAC;;;;;AAiD5E,SAAgB,sBAId,KACA,SAIA,aACwF;CACxF,MAAM,eAAe,kCAAkC,KAAK,QAAQ;CAEpE,MAAM,qDAAyB,cAAc,YAAY;AAKzD,OAAM,WAAW,aAAa;AAE9B,QAAO"}
|