@omerikanec/api-client-demo 2.0.2 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/{api.schemas.ts → api.schemas.d.ts} +2 -3
  2. package/dist/api.schemas.js +1 -0
  3. package/dist/auth/auth.d.ts +82 -0
  4. package/dist/auth/auth.js +71 -0
  5. package/dist/breed/breed.d.ts +147 -0
  6. package/dist/breed/breed.js +148 -0
  7. package/dist/club-documents/club-documents.d.ts +76 -0
  8. package/dist/club-documents/club-documents.js +78 -0
  9. package/dist/club-stats/club-stats.d.ts +37 -0
  10. package/dist/club-stats/club-stats.js +40 -0
  11. package/dist/content-dictionary/content-dictionary.d.ts +119 -0
  12. package/dist/content-dictionary/content-dictionary.js +116 -0
  13. package/dist/dog-references/dog-references.d.ts +360 -0
  14. package/dist/dog-references/dog-references.js +358 -0
  15. package/dist/dogs/dogs.d.ts +351 -0
  16. package/dist/dogs/dogs.js +329 -0
  17. package/dist/event-reports/event-reports.d.ts +76 -0
  18. package/dist/event-reports/event-reports.js +78 -0
  19. package/dist/events/events.d.ts +76 -0
  20. package/dist/events/events.js +78 -0
  21. package/dist/galleries/galleries.d.ts +108 -0
  22. package/dist/galleries/galleries.js +117 -0
  23. package/dist/home/home.d.ts +37 -0
  24. package/dist/home/home.js +40 -0
  25. package/dist/import-breedarchive/import-breedarchive.d.ts +177 -0
  26. package/dist/import-breedarchive/import-breedarchive.js +140 -0
  27. package/dist/import-hybrid/import-hybrid.d.ts +134 -0
  28. package/dist/import-hybrid/import-hybrid.js +107 -0
  29. package/dist/import-hybrid-full/import-hybrid-full.d.ts +134 -0
  30. package/dist/import-hybrid-full/import-hybrid-full.js +107 -0
  31. package/dist/import-zooportal/import-zooportal.d.ts +146 -0
  32. package/dist/import-zooportal/import-zooportal.js +107 -0
  33. package/dist/{index.ts → index.d.ts} +0 -1
  34. package/dist/index.js +31 -0
  35. package/dist/judges/judges.d.ts +147 -0
  36. package/dist/judges/judges.js +148 -0
  37. package/dist/leadership/leadership.d.ts +146 -0
  38. package/dist/leadership/leadership.js +148 -0
  39. package/dist/my-achievements/my-achievements.d.ts +87 -0
  40. package/dist/my-achievements/my-achievements.js +77 -0
  41. package/dist/my-applications/my-applications.d.ts +290 -0
  42. package/dist/my-applications/my-applications.js +207 -0
  43. package/dist/my-dogs/my-dogs.d.ts +329 -0
  44. package/dist/my-dogs/my-dogs.js +245 -0
  45. package/dist/my-kennels/my-kennels.d.ts +290 -0
  46. package/dist/my-kennels/my-kennels.js +207 -0
  47. package/dist/my-litters/my-litters.d.ts +290 -0
  48. package/dist/my-litters/my-litters.js +207 -0
  49. package/dist/news/news.d.ts +76 -0
  50. package/dist/news/news.js +78 -0
  51. package/dist/pages/pages.d.ts +76 -0
  52. package/dist/pages/pages.js +78 -0
  53. package/dist/profile/profile.d.ts +99 -0
  54. package/dist/profile/profile.js +72 -0
  55. package/dist/status-of-import-task/status-of-import-task.d.ts +44 -0
  56. package/dist/status-of-import-task/status-of-import-task.js +39 -0
  57. package/package.json +1 -1
  58. package/dist/.api-sync/incremental-spec.json +0 -71
  59. package/dist/auth/auth.ts +0 -221
  60. package/dist/breed/breed.ts +0 -434
  61. package/dist/club-documents/club-documents.ts +0 -231
  62. package/dist/club-stats/club-stats.ts +0 -122
  63. package/dist/content-dictionary/content-dictionary.ts +0 -345
  64. package/dist/dog-references/dog-references.ts +0 -1043
  65. package/dist/dogs/dogs.ts +0 -972
  66. package/dist/event-reports/event-reports.ts +0 -231
  67. package/dist/events/events.ts +0 -231
  68. package/dist/galleries/galleries.ts +0 -332
  69. package/dist/home/home.ts +0 -122
  70. package/dist/import-breedarchive/import-breedarchive.ts +0 -417
  71. package/dist/import-hybrid/import-hybrid.ts +0 -320
  72. package/dist/import-hybrid-full/import-hybrid-full.ts +0 -320
  73. package/dist/import-zooportal/import-zooportal.ts +0 -335
  74. package/dist/judges/judges.ts +0 -434
  75. package/dist/leadership/leadership.ts +0 -433
  76. package/dist/my-achievements/my-achievements.ts +0 -243
  77. package/dist/my-applications/my-applications.ts +0 -665
  78. package/dist/my-dogs/my-dogs.ts +0 -772
  79. package/dist/my-kennels/my-kennels.ts +0 -665
  80. package/dist/my-litters/my-litters.ts +0 -665
  81. package/dist/news/news.ts +0 -231
  82. package/dist/pages/pages.ts +0 -231
  83. package/dist/profile/profile.ts +0 -246
  84. package/dist/status-of-import-task/status-of-import-task.ts +0 -129
@@ -1,332 +0,0 @@
1
- /**
2
- * Generated by orval v8.5.3 🍺
3
- * Do not edit manually.
4
- * НКП Сибирский Хаски API
5
- * API для Национального клуба породы Сибирский хаски
6
- * OpenAPI spec version: 1.0.0
7
- */
8
- import {
9
- useQuery
10
- } from '@tanstack/react-query';
11
- import type {
12
- QueryFunction,
13
- QueryKey,
14
- UseQueryOptions,
15
- UseQueryResult
16
- } from '@tanstack/react-query';
17
-
18
- import type {
19
- GalleriesHighlightsListParams,
20
- GalleriesListParams,
21
- Gallery,
22
- PaginatedGalleryList
23
- } from '../api.schemas';
24
-
25
-
26
- type AwaitedInput<T> = PromiseLike<T> | T;
27
-
28
- type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
29
-
30
-
31
-
32
-
33
- /**
34
- * API галерей
35
- * @summary Список галерей
36
- */
37
- export type galleriesListResponse200 = {
38
- data: PaginatedGalleryList
39
- status: 200
40
- }
41
-
42
- export type galleriesListResponseSuccess = (galleriesListResponse200) & {
43
- headers: Headers;
44
- };
45
- ;
46
-
47
- export type galleriesListResponse = (galleriesListResponseSuccess)
48
-
49
- export const getGalleriesListUrl = (params?: GalleriesListParams,) => {
50
- const normalizedParams = new URLSearchParams();
51
-
52
- Object.entries(params || {}).forEach(([key, value]) => {
53
-
54
- if (value !== undefined) {
55
- normalizedParams.append(key, value === null ? 'null' : value.toString())
56
- }
57
- });
58
-
59
- const stringifiedParams = normalizedParams.toString();
60
-
61
- return stringifiedParams.length > 0 ? `/api/galleries/?${stringifiedParams}` : `/api/galleries/`
62
- }
63
-
64
- export const galleriesList = async (params?: GalleriesListParams, options?: RequestInit): Promise<galleriesListResponse> => {
65
-
66
- const res = await fetch(getGalleriesListUrl(params),
67
- {
68
- ...options,
69
- method: 'GET'
70
-
71
-
72
- }
73
- )
74
-
75
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
76
-
77
- const data: galleriesListResponse['data'] = body ? JSON.parse(body) : {}
78
- return { data, status: res.status, headers: res.headers } as galleriesListResponse
79
- }
80
-
81
-
82
-
83
-
84
-
85
- export const getGalleriesListQueryKey = (params?: GalleriesListParams,) => {
86
- return [
87
- `/api/galleries/`, ...(params ? [params] : [])
88
- ] as const;
89
- }
90
-
91
-
92
- export const getGalleriesListQueryOptions = <TData = Awaited<ReturnType<typeof galleriesList>>, TError = unknown>(params?: GalleriesListParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof galleriesList>>, TError, TData>, fetch?: RequestInit}
93
- ) => {
94
-
95
- const {query: queryOptions, fetch: fetchOptions} = options ?? {};
96
-
97
- const queryKey = queryOptions?.queryKey ?? getGalleriesListQueryKey(params);
98
-
99
-
100
-
101
- const queryFn: QueryFunction<Awaited<ReturnType<typeof galleriesList>>> = ({ signal }) => galleriesList(params, { signal, ...fetchOptions });
102
-
103
-
104
-
105
-
106
-
107
- return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof galleriesList>>, TError, TData> & { queryKey: QueryKey }
108
- }
109
-
110
- export type GalleriesListQueryResult = NonNullable<Awaited<ReturnType<typeof galleriesList>>>
111
- export type GalleriesListQueryError = unknown
112
-
113
-
114
- /**
115
- * @summary Список галерей
116
- */
117
-
118
- export function useGalleriesList<TData = Awaited<ReturnType<typeof galleriesList>>, TError = unknown>(
119
- params?: GalleriesListParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof galleriesList>>, TError, TData>, fetch?: RequestInit}
120
-
121
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
122
-
123
- const queryOptions = getGalleriesListQueryOptions(params,options)
124
-
125
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
126
-
127
- return { ...query, queryKey: queryOptions.queryKey };
128
- }
129
-
130
-
131
-
132
-
133
- /**
134
- * API галерей
135
- * @summary Получить галерею по ID
136
- */
137
- export type galleriesRetrieveResponse200 = {
138
- data: Gallery
139
- status: 200
140
- }
141
-
142
- export type galleriesRetrieveResponse404 = {
143
- data: void
144
- status: 404
145
- }
146
-
147
- export type galleriesRetrieveResponseSuccess = (galleriesRetrieveResponse200) & {
148
- headers: Headers;
149
- };
150
- export type galleriesRetrieveResponseError = (galleriesRetrieveResponse404) & {
151
- headers: Headers;
152
- };
153
-
154
- export type galleriesRetrieveResponse = (galleriesRetrieveResponseSuccess | galleriesRetrieveResponseError)
155
-
156
- export const getGalleriesRetrieveUrl = (id: number,) => {
157
-
158
-
159
-
160
-
161
- return `/api/galleries/${id}/`
162
- }
163
-
164
- export const galleriesRetrieve = async (id: number, options?: RequestInit): Promise<galleriesRetrieveResponse> => {
165
-
166
- const res = await fetch(getGalleriesRetrieveUrl(id),
167
- {
168
- ...options,
169
- method: 'GET'
170
-
171
-
172
- }
173
- )
174
-
175
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
176
-
177
- const data: galleriesRetrieveResponse['data'] = body ? JSON.parse(body) : {}
178
- return { data, status: res.status, headers: res.headers } as galleriesRetrieveResponse
179
- }
180
-
181
-
182
-
183
-
184
-
185
- export const getGalleriesRetrieveQueryKey = (id: number,) => {
186
- return [
187
- `/api/galleries/${id}/`
188
- ] as const;
189
- }
190
-
191
-
192
- export const getGalleriesRetrieveQueryOptions = <TData = Awaited<ReturnType<typeof galleriesRetrieve>>, TError = void>(id: number, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof galleriesRetrieve>>, TError, TData>, fetch?: RequestInit}
193
- ) => {
194
-
195
- const {query: queryOptions, fetch: fetchOptions} = options ?? {};
196
-
197
- const queryKey = queryOptions?.queryKey ?? getGalleriesRetrieveQueryKey(id);
198
-
199
-
200
-
201
- const queryFn: QueryFunction<Awaited<ReturnType<typeof galleriesRetrieve>>> = ({ signal }) => galleriesRetrieve(id, { signal, ...fetchOptions });
202
-
203
-
204
-
205
-
206
-
207
- return { queryKey, queryFn, enabled: !!(id), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof galleriesRetrieve>>, TError, TData> & { queryKey: QueryKey }
208
- }
209
-
210
- export type GalleriesRetrieveQueryResult = NonNullable<Awaited<ReturnType<typeof galleriesRetrieve>>>
211
- export type GalleriesRetrieveQueryError = void
212
-
213
-
214
- /**
215
- * @summary Получить галерею по ID
216
- */
217
-
218
- export function useGalleriesRetrieve<TData = Awaited<ReturnType<typeof galleriesRetrieve>>, TError = void>(
219
- id: number, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof galleriesRetrieve>>, TError, TData>, fetch?: RequestInit}
220
-
221
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
222
-
223
- const queryOptions = getGalleriesRetrieveQueryOptions(id,options)
224
-
225
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
226
-
227
- return { ...query, queryKey: queryOptions.queryKey };
228
- }
229
-
230
-
231
-
232
-
233
- /**
234
- * Возвращает галереи, отмеченные как избранные (для главной страницы).
235
- * @summary Избранные галереи
236
- */
237
- export type galleriesHighlightsListResponse200 = {
238
- data: PaginatedGalleryList
239
- status: 200
240
- }
241
-
242
- export type galleriesHighlightsListResponseSuccess = (galleriesHighlightsListResponse200) & {
243
- headers: Headers;
244
- };
245
- ;
246
-
247
- export type galleriesHighlightsListResponse = (galleriesHighlightsListResponseSuccess)
248
-
249
- export const getGalleriesHighlightsListUrl = (params?: GalleriesHighlightsListParams,) => {
250
- const normalizedParams = new URLSearchParams();
251
-
252
- Object.entries(params || {}).forEach(([key, value]) => {
253
-
254
- if (value !== undefined) {
255
- normalizedParams.append(key, value === null ? 'null' : value.toString())
256
- }
257
- });
258
-
259
- const stringifiedParams = normalizedParams.toString();
260
-
261
- return stringifiedParams.length > 0 ? `/api/galleries/highlights/?${stringifiedParams}` : `/api/galleries/highlights/`
262
- }
263
-
264
- export const galleriesHighlightsList = async (params?: GalleriesHighlightsListParams, options?: RequestInit): Promise<galleriesHighlightsListResponse> => {
265
-
266
- const res = await fetch(getGalleriesHighlightsListUrl(params),
267
- {
268
- ...options,
269
- method: 'GET'
270
-
271
-
272
- }
273
- )
274
-
275
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
276
-
277
- const data: galleriesHighlightsListResponse['data'] = body ? JSON.parse(body) : {}
278
- return { data, status: res.status, headers: res.headers } as galleriesHighlightsListResponse
279
- }
280
-
281
-
282
-
283
-
284
-
285
- export const getGalleriesHighlightsListQueryKey = (params?: GalleriesHighlightsListParams,) => {
286
- return [
287
- `/api/galleries/highlights/`, ...(params ? [params] : [])
288
- ] as const;
289
- }
290
-
291
-
292
- export const getGalleriesHighlightsListQueryOptions = <TData = Awaited<ReturnType<typeof galleriesHighlightsList>>, TError = unknown>(params?: GalleriesHighlightsListParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof galleriesHighlightsList>>, TError, TData>, fetch?: RequestInit}
293
- ) => {
294
-
295
- const {query: queryOptions, fetch: fetchOptions} = options ?? {};
296
-
297
- const queryKey = queryOptions?.queryKey ?? getGalleriesHighlightsListQueryKey(params);
298
-
299
-
300
-
301
- const queryFn: QueryFunction<Awaited<ReturnType<typeof galleriesHighlightsList>>> = ({ signal }) => galleriesHighlightsList(params, { signal, ...fetchOptions });
302
-
303
-
304
-
305
-
306
-
307
- return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof galleriesHighlightsList>>, TError, TData> & { queryKey: QueryKey }
308
- }
309
-
310
- export type GalleriesHighlightsListQueryResult = NonNullable<Awaited<ReturnType<typeof galleriesHighlightsList>>>
311
- export type GalleriesHighlightsListQueryError = unknown
312
-
313
-
314
- /**
315
- * @summary Избранные галереи
316
- */
317
-
318
- export function useGalleriesHighlightsList<TData = Awaited<ReturnType<typeof galleriesHighlightsList>>, TError = unknown>(
319
- params?: GalleriesHighlightsListParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof galleriesHighlightsList>>, TError, TData>, fetch?: RequestInit}
320
-
321
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
322
-
323
- const queryOptions = getGalleriesHighlightsListQueryOptions(params,options)
324
-
325
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
326
-
327
- return { ...query, queryKey: queryOptions.queryKey };
328
- }
329
-
330
-
331
-
332
-
package/dist/home/home.ts DELETED
@@ -1,122 +0,0 @@
1
- /**
2
- * Generated by orval v8.5.3 🍺
3
- * Do not edit manually.
4
- * НКП Сибирский Хаски API
5
- * API для Национального клуба породы Сибирский хаски
6
- * OpenAPI spec version: 1.0.0
7
- */
8
- import {
9
- useQuery
10
- } from '@tanstack/react-query';
11
- import type {
12
- QueryFunction,
13
- QueryKey,
14
- UseQueryOptions,
15
- UseQueryResult
16
- } from '@tanstack/react-query';
17
-
18
- import type {
19
- ActivityFeedResponse
20
- } from '../api.schemas';
21
-
22
-
23
- type AwaitedInput<T> = PromiseLike<T> | T;
24
-
25
- type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
26
-
27
-
28
-
29
-
30
- /**
31
- * Возвращает последние сообщения из Telegram-канала клуба (кешируется на 1 минуту).
32
- * @summary Лента активности
33
- */
34
- export type activityFeedRetrieveResponse200 = {
35
- data: ActivityFeedResponse
36
- status: 200
37
- }
38
-
39
- export type activityFeedRetrieveResponseSuccess = (activityFeedRetrieveResponse200) & {
40
- headers: Headers;
41
- };
42
- ;
43
-
44
- export type activityFeedRetrieveResponse = (activityFeedRetrieveResponseSuccess)
45
-
46
- export const getActivityFeedRetrieveUrl = () => {
47
-
48
-
49
-
50
-
51
- return `/api/activity-feed/`
52
- }
53
-
54
- export const activityFeedRetrieve = async ( options?: RequestInit): Promise<activityFeedRetrieveResponse> => {
55
-
56
- const res = await fetch(getActivityFeedRetrieveUrl(),
57
- {
58
- ...options,
59
- method: 'GET'
60
-
61
-
62
- }
63
- )
64
-
65
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
66
-
67
- const data: activityFeedRetrieveResponse['data'] = body ? JSON.parse(body) : {}
68
- return { data, status: res.status, headers: res.headers } as activityFeedRetrieveResponse
69
- }
70
-
71
-
72
-
73
-
74
-
75
- export const getActivityFeedRetrieveQueryKey = () => {
76
- return [
77
- `/api/activity-feed/`
78
- ] as const;
79
- }
80
-
81
-
82
- export const getActivityFeedRetrieveQueryOptions = <TData = Awaited<ReturnType<typeof activityFeedRetrieve>>, TError = unknown>( options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof activityFeedRetrieve>>, TError, TData>, fetch?: RequestInit}
83
- ) => {
84
-
85
- const {query: queryOptions, fetch: fetchOptions} = options ?? {};
86
-
87
- const queryKey = queryOptions?.queryKey ?? getActivityFeedRetrieveQueryKey();
88
-
89
-
90
-
91
- const queryFn: QueryFunction<Awaited<ReturnType<typeof activityFeedRetrieve>>> = ({ signal }) => activityFeedRetrieve({ signal, ...fetchOptions });
92
-
93
-
94
-
95
-
96
-
97
- return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof activityFeedRetrieve>>, TError, TData> & { queryKey: QueryKey }
98
- }
99
-
100
- export type ActivityFeedRetrieveQueryResult = NonNullable<Awaited<ReturnType<typeof activityFeedRetrieve>>>
101
- export type ActivityFeedRetrieveQueryError = unknown
102
-
103
-
104
- /**
105
- * @summary Лента активности
106
- */
107
-
108
- export function useActivityFeedRetrieve<TData = Awaited<ReturnType<typeof activityFeedRetrieve>>, TError = unknown>(
109
- options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof activityFeedRetrieve>>, TError, TData>, fetch?: RequestInit}
110
-
111
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
112
-
113
- const queryOptions = getActivityFeedRetrieveQueryOptions(options)
114
-
115
- const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
116
-
117
- return { ...query, queryKey: queryOptions.queryKey };
118
- }
119
-
120
-
121
-
122
-