@omerikanec/api-client-demo 2.0.3 → 3.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.
Files changed (89) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/api.schemas.d.ts +1809 -0
  3. package/dist/api.schemas.js +61 -0
  4. package/dist/auth/auth.d.ts +79 -0
  5. package/dist/auth/auth.js +71 -0
  6. package/dist/breed/breed.d.ts +144 -0
  7. package/dist/breed/breed.js +148 -0
  8. package/dist/club-documents/club-documents.d.ts +73 -0
  9. package/dist/club-documents/club-documents.js +78 -0
  10. package/dist/club-stats/club-stats.d.ts +34 -0
  11. package/dist/club-stats/club-stats.js +40 -0
  12. package/dist/content-dictionary/content-dictionary.d.ts +116 -0
  13. package/dist/content-dictionary/content-dictionary.js +116 -0
  14. package/dist/dog-references/dog-references.d.ts +357 -0
  15. package/dist/dog-references/dog-references.js +358 -0
  16. package/dist/dogs/dogs.d.ts +348 -0
  17. package/dist/dogs/dogs.js +329 -0
  18. package/dist/event-reports/event-reports.d.ts +73 -0
  19. package/dist/event-reports/event-reports.js +78 -0
  20. package/dist/events/events.d.ts +73 -0
  21. package/dist/events/events.js +78 -0
  22. package/dist/galleries/galleries.d.ts +105 -0
  23. package/dist/galleries/galleries.js +117 -0
  24. package/dist/home/home.d.ts +34 -0
  25. package/dist/home/home.js +40 -0
  26. package/dist/import-breedarchive/import-breedarchive.d.ts +174 -0
  27. package/dist/import-breedarchive/import-breedarchive.js +140 -0
  28. package/dist/import-hybrid/import-hybrid.d.ts +131 -0
  29. package/dist/import-hybrid/import-hybrid.js +107 -0
  30. package/dist/import-hybrid-full/import-hybrid-full.d.ts +131 -0
  31. package/dist/import-hybrid-full/import-hybrid-full.js +107 -0
  32. package/dist/import-zooportal/import-zooportal.d.ts +143 -0
  33. package/dist/import-zooportal/import-zooportal.js +107 -0
  34. package/dist/{index.ts → index.d.ts} +0 -1
  35. package/dist/index.js +31 -0
  36. package/dist/judges/judges.d.ts +144 -0
  37. package/dist/judges/judges.js +148 -0
  38. package/dist/leadership/leadership.d.ts +143 -0
  39. package/dist/leadership/leadership.js +148 -0
  40. package/dist/my-achievements/my-achievements.d.ts +84 -0
  41. package/dist/my-achievements/my-achievements.js +77 -0
  42. package/dist/my-applications/my-applications.d.ts +287 -0
  43. package/dist/my-applications/my-applications.js +207 -0
  44. package/dist/my-dogs/my-dogs.d.ts +326 -0
  45. package/dist/my-dogs/my-dogs.js +245 -0
  46. package/dist/my-kennels/my-kennels.d.ts +287 -0
  47. package/dist/my-kennels/my-kennels.js +207 -0
  48. package/dist/my-litters/my-litters.d.ts +287 -0
  49. package/dist/my-litters/my-litters.js +207 -0
  50. package/dist/news/news.d.ts +73 -0
  51. package/dist/news/news.js +78 -0
  52. package/dist/pages/pages.d.ts +73 -0
  53. package/dist/pages/pages.js +78 -0
  54. package/dist/profile/profile.d.ts +96 -0
  55. package/dist/profile/profile.js +72 -0
  56. package/dist/status-of-import-task/status-of-import-task.d.ts +41 -0
  57. package/dist/status-of-import-task/status-of-import-task.js +39 -0
  58. package/impact-report.html +108 -0
  59. package/impact-report.json +52 -0
  60. package/package.json +6 -2
  61. package/postinstall.js +29 -0
  62. package/dist/.api-sync/incremental-spec.json +0 -71
  63. package/dist/api.schemas.ts +0 -12
  64. package/dist/auth/auth.ts +0 -221
  65. package/dist/breed/breed.ts +0 -434
  66. package/dist/club-documents/club-documents.ts +0 -231
  67. package/dist/club-stats/club-stats.ts +0 -122
  68. package/dist/content-dictionary/content-dictionary.ts +0 -345
  69. package/dist/dog-references/dog-references.ts +0 -1043
  70. package/dist/dogs/dogs.ts +0 -972
  71. package/dist/event-reports/event-reports.ts +0 -231
  72. package/dist/events/events.ts +0 -231
  73. package/dist/galleries/galleries.ts +0 -332
  74. package/dist/home/home.ts +0 -122
  75. package/dist/import-breedarchive/import-breedarchive.ts +0 -417
  76. package/dist/import-hybrid/import-hybrid.ts +0 -320
  77. package/dist/import-hybrid-full/import-hybrid-full.ts +0 -320
  78. package/dist/import-zooportal/import-zooportal.ts +0 -335
  79. package/dist/judges/judges.ts +0 -434
  80. package/dist/leadership/leadership.ts +0 -433
  81. package/dist/my-achievements/my-achievements.ts +0 -243
  82. package/dist/my-applications/my-applications.ts +0 -665
  83. package/dist/my-dogs/my-dogs.ts +0 -772
  84. package/dist/my-kennels/my-kennels.ts +0 -665
  85. package/dist/my-litters/my-litters.ts +0 -665
  86. package/dist/news/news.ts +0 -231
  87. package/dist/pages/pages.ts +0 -231
  88. package/dist/profile/profile.ts +0 -246
  89. package/dist/status-of-import-task/status-of-import-task.ts +0 -129
@@ -1,71 +0,0 @@
1
- {
2
- "openapi": "3.0.3",
3
- "info": {
4
- "title": "НКП Сибирский Хаски API",
5
- "version": "1.0.0",
6
- "description": "API для Национального клуба породы Сибирский хаски"
7
- },
8
- "paths": {
9
- "/api/activity-feed/": {
10
- "get": {
11
- "operationId": "activity_feed_retrieve",
12
- "description": "Возвращает последние сообщения из Telegram-канала клуба (кешируется на 1 минуту).",
13
- "summary": "Лента активности",
14
- "tags": [
15
- "Home"
16
- ],
17
- "security": [
18
- {
19
- "cookieAuth": []
20
- },
21
- {
22
- "tokenAuth": []
23
- },
24
- {}
25
- ],
26
- "responses": {
27
- "200": {
28
- "content": {
29
- "application/json": {
30
- "schema": {
31
- "$ref": "#/components/schemas/ActivityFeedResponse"
32
- }
33
- }
34
- },
35
- "description": ""
36
- }
37
- }
38
- }
39
- }
40
- },
41
- "components": {
42
- "schemas": {
43
- "ActivityFeedResponse": {
44
- "type": "object",
45
- "properties": {
46
- "results": {
47
- "type": "array",
48
- "items": {},
49
- "description": "Список последних сообщений из Telegram-канала"
50
- }
51
- },
52
- "required": [
53
- "results"
54
- ]
55
- }
56
- },
57
- "securitySchemes": {
58
- "cookieAuth": {
59
- "type": "apiKey",
60
- "in": "cookie",
61
- "name": "sessionid"
62
- },
63
- "tokenAuth": {
64
- "type": "apiKey",
65
- "in": "header",
66
- "name": "Authorization",
67
- "description": "Token-based authentication with required prefix \"Token\""
68
- }
69
- }
70
- }
71
- }
@@ -1,12 +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
- export interface ActivityFeedResponse {
9
- /** Список последних сообщений из Telegram-канала */
10
- results: unknown[];
11
- }
12
-
package/dist/auth/auth.ts DELETED
@@ -1,221 +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
- useMutation
10
- } from '@tanstack/react-query';
11
- import type {
12
- MutationFunction,
13
- UseMutationOptions,
14
- UseMutationResult
15
- } from '@tanstack/react-query';
16
-
17
- import type {
18
- LoginRequestRequest,
19
- LoginSuccess
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
- * Аутентификация пользователя по email и паролю. Устанавливает сессионный cookie.
32
- * @summary Вход в систему
33
- */
34
- export type authLoginCreateResponse200 = {
35
- data: LoginSuccess
36
- status: 200
37
- }
38
-
39
- export type authLoginCreateResponse401 = {
40
- data: void
41
- status: 401
42
- }
43
-
44
- export type authLoginCreateResponseSuccess = (authLoginCreateResponse200) & {
45
- headers: Headers;
46
- };
47
- export type authLoginCreateResponseError = (authLoginCreateResponse401) & {
48
- headers: Headers;
49
- };
50
-
51
- export type authLoginCreateResponse = (authLoginCreateResponseSuccess | authLoginCreateResponseError)
52
-
53
- export const getAuthLoginCreateUrl = () => {
54
-
55
-
56
-
57
-
58
- return `/api/auth/login/`
59
- }
60
-
61
- export const authLoginCreate = async (loginRequestRequest: LoginRequestRequest, options?: RequestInit): Promise<authLoginCreateResponse> => {
62
-
63
- const res = await fetch(getAuthLoginCreateUrl(),
64
- {
65
- ...options,
66
- method: 'POST',
67
- headers: { 'Content-Type': 'application/json', ...options?.headers },
68
- body: JSON.stringify(
69
- loginRequestRequest,)
70
- }
71
- )
72
-
73
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
74
-
75
- const data: authLoginCreateResponse['data'] = body ? JSON.parse(body) : {}
76
- return { data, status: res.status, headers: res.headers } as authLoginCreateResponse
77
- }
78
-
79
-
80
-
81
-
82
- export const getAuthLoginCreateMutationOptions = <TError = void,
83
- TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof authLoginCreate>>, TError,{data: LoginRequestRequest}, TContext>, fetch?: RequestInit}
84
- ): UseMutationOptions<Awaited<ReturnType<typeof authLoginCreate>>, TError,{data: LoginRequestRequest}, TContext> => {
85
-
86
- const mutationKey = ['authLoginCreate'];
87
- const {mutation: mutationOptions, fetch: fetchOptions} = options ?
88
- options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
89
- options
90
- : {...options, mutation: {...options.mutation, mutationKey}}
91
- : {mutation: { mutationKey, }, fetch: undefined};
92
-
93
-
94
-
95
-
96
- const mutationFn: MutationFunction<Awaited<ReturnType<typeof authLoginCreate>>, {data: LoginRequestRequest}> = (props) => {
97
- const {data} = props ?? {};
98
-
99
- return authLoginCreate(data,fetchOptions)
100
- }
101
-
102
-
103
-
104
-
105
-
106
-
107
- return { mutationFn, ...mutationOptions }}
108
-
109
- export type AuthLoginCreateMutationResult = NonNullable<Awaited<ReturnType<typeof authLoginCreate>>>
110
- export type AuthLoginCreateMutationBody = LoginRequestRequest
111
- export type AuthLoginCreateMutationError = void
112
-
113
- /**
114
- * @summary Вход в систему
115
- */
116
- export const useAuthLoginCreate = <TError = void,
117
- TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof authLoginCreate>>, TError,{data: LoginRequestRequest}, TContext>, fetch?: RequestInit}
118
- ): UseMutationResult<
119
- Awaited<ReturnType<typeof authLoginCreate>>,
120
- TError,
121
- {data: LoginRequestRequest},
122
- TContext
123
- > => {
124
- return useMutation(getAuthLoginCreateMutationOptions(options));
125
- }
126
- /**
127
- * Завершает текущую сессию пользователя.
128
- * @summary Выход из системы
129
- */
130
- export type authLogoutCreateResponse200 = {
131
- data: void
132
- status: 200
133
- }
134
-
135
- export type authLogoutCreateResponse401 = {
136
- data: void
137
- status: 401
138
- }
139
-
140
- export type authLogoutCreateResponseSuccess = (authLogoutCreateResponse200) & {
141
- headers: Headers;
142
- };
143
- export type authLogoutCreateResponseError = (authLogoutCreateResponse401) & {
144
- headers: Headers;
145
- };
146
-
147
- export type authLogoutCreateResponse = (authLogoutCreateResponseSuccess | authLogoutCreateResponseError)
148
-
149
- export const getAuthLogoutCreateUrl = () => {
150
-
151
-
152
-
153
-
154
- return `/api/auth/logout/`
155
- }
156
-
157
- export const authLogoutCreate = async ( options?: RequestInit): Promise<authLogoutCreateResponse> => {
158
-
159
- const res = await fetch(getAuthLogoutCreateUrl(),
160
- {
161
- ...options,
162
- method: 'POST'
163
-
164
-
165
- }
166
- )
167
-
168
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
169
-
170
- const data: authLogoutCreateResponse['data'] = body ? JSON.parse(body) : {}
171
- return { data, status: res.status, headers: res.headers } as authLogoutCreateResponse
172
- }
173
-
174
-
175
-
176
-
177
- export const getAuthLogoutCreateMutationOptions = <TError = void,
178
- TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof authLogoutCreate>>, TError,void, TContext>, fetch?: RequestInit}
179
- ): UseMutationOptions<Awaited<ReturnType<typeof authLogoutCreate>>, TError,void, TContext> => {
180
-
181
- const mutationKey = ['authLogoutCreate'];
182
- const {mutation: mutationOptions, fetch: fetchOptions} = options ?
183
- options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
184
- options
185
- : {...options, mutation: {...options.mutation, mutationKey}}
186
- : {mutation: { mutationKey, }, fetch: undefined};
187
-
188
-
189
-
190
-
191
- const mutationFn: MutationFunction<Awaited<ReturnType<typeof authLogoutCreate>>, void> = () => {
192
-
193
-
194
- return authLogoutCreate(fetchOptions)
195
- }
196
-
197
-
198
-
199
-
200
-
201
-
202
- return { mutationFn, ...mutationOptions }}
203
-
204
- export type AuthLogoutCreateMutationResult = NonNullable<Awaited<ReturnType<typeof authLogoutCreate>>>
205
-
206
- export type AuthLogoutCreateMutationError = void
207
-
208
- /**
209
- * @summary Выход из системы
210
- */
211
- export const useAuthLogoutCreate = <TError = void,
212
- TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof authLogoutCreate>>, TError,void, TContext>, fetch?: RequestInit}
213
- ): UseMutationResult<
214
- Awaited<ReturnType<typeof authLogoutCreate>>,
215
- TError,
216
- void,
217
- TContext
218
- > => {
219
- return useMutation(getAuthLogoutCreateMutationOptions(options));
220
- }
221
-