@omerikanec/api-client-demo 3.1.0 → 4.1.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.
@@ -1,61 +1 @@
1
- export const ApplicationTypeEnum = {
2
- membership: 'membership',
3
- litter_registration: 'litter_registration',
4
- kennel_registration: 'kennel_registration',
5
- document_request: 'document_request',
6
- complaint: 'complaint',
7
- other: 'other',
8
- };
9
- export const ApplicationStatusEnum = {
10
- new: 'new',
11
- in_progress: 'in_progress',
12
- done: 'done',
13
- rejected: 'rejected',
14
- };
15
- export const BlankEnum = {
16
- '': '',
17
- };
18
- export const CategoryEnum = {
19
- history: 'history',
20
- character: 'character',
21
- care: 'care',
22
- grooming: 'grooming',
23
- feeding: 'feeding',
24
- };
25
- export const BreedArticleCategory = { ...CategoryEnum, ...BlankEnum, };
26
- export const DocumentTypeEnum = {
27
- charter: 'charter',
28
- regulation: 'regulation',
29
- standard: 'standard',
30
- form: 'form',
31
- };
32
- export const DogSexEnum = {
33
- male: 'male',
34
- female: 'female',
35
- };
36
- export const DogSex = { ...DogSexEnum, ...BlankEnum, };
37
- export const Sex6bbEnum = {
38
- NUMBER_1: 1,
39
- NUMBER_2: 2,
40
- };
41
- export const DogRequestSex = { ...DogSexEnum, ...BlankEnum, };
42
- export const EventTypeEnum = {
43
- exhibition: 'exhibition',
44
- seminar: 'seminar',
45
- meeting: 'meeting',
46
- other: 'other',
47
- };
48
- export const EventEventType = { ...EventTypeEnum, ...BlankEnum, };
49
- export const LitterStatusEnum = {
50
- announced: 'announced',
51
- born: 'born',
52
- sold: 'sold',
53
- };
54
- export const MembershipTypeEnum = {
55
- physical: 'physical',
56
- legal: 'legal',
57
- };
58
- export const NullEnum = {};
59
- export const PatchedDogRequestSex = { ...DogSexEnum, ...BlankEnum, };
60
- export const UserProfileMembershipType = { ...MembershipTypeEnum, ...BlankEnum, };
61
- export const UserProfileRequestMembershipType = { ...MembershipTypeEnum, ...BlankEnum, };
1
+ export {};
@@ -1,33 +1,33 @@
1
1
  import type { QueryKey, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
2
- import type { HomeResponse } from '../api.schemas';
2
+ import type { ActivityFeedResponse } from '../api.schemas';
3
3
  /**
4
- * Возвращает избранные новости (до 3), ближайшие мероприятия (до 5) и избранные галереи (до 2).
5
- * @summary Данные для главной страницы
4
+ * Возвращает последние сообщения из Telegram-канала клуба (кешируется на 1 минуту).
5
+ * @summary Лента активности
6
6
  */
7
- export type homeRetrieveResponse200 = {
8
- data: HomeResponse;
7
+ export type activityFeedRetrieveResponse200 = {
8
+ data: ActivityFeedResponse;
9
9
  status: 200;
10
10
  };
11
- export type homeRetrieveResponseSuccess = (homeRetrieveResponse200) & {
11
+ export type activityFeedRetrieveResponseSuccess = (activityFeedRetrieveResponse200) & {
12
12
  headers: Headers;
13
13
  };
14
- export type homeRetrieveResponse = (homeRetrieveResponseSuccess);
15
- export declare const getHomeRetrieveUrl: () => string;
16
- export declare const homeRetrieve: (options?: RequestInit) => Promise<homeRetrieveResponse>;
17
- export declare const getHomeRetrieveQueryKey: () => readonly ["/api/home/"];
18
- export declare const getHomeRetrieveQueryOptions: <TData = Awaited<ReturnType<typeof homeRetrieve>>, TError = unknown>(options?: {
19
- query?: UseQueryOptions<Awaited<ReturnType<typeof homeRetrieve>>, TError, TData>;
14
+ export type activityFeedRetrieveResponse = (activityFeedRetrieveResponseSuccess);
15
+ export declare const getActivityFeedRetrieveUrl: () => string;
16
+ export declare const activityFeedRetrieve: (options?: RequestInit) => Promise<activityFeedRetrieveResponse>;
17
+ export declare const getActivityFeedRetrieveQueryKey: () => readonly ["/api/activity-feed/"];
18
+ export declare const getActivityFeedRetrieveQueryOptions: <TData = Awaited<ReturnType<typeof activityFeedRetrieve>>, TError = unknown>(options?: {
19
+ query?: UseQueryOptions<Awaited<ReturnType<typeof activityFeedRetrieve>>, TError, TData>;
20
20
  fetch?: RequestInit;
21
- }) => UseQueryOptions<Awaited<ReturnType<typeof homeRetrieve>>, TError, TData> & {
21
+ }) => UseQueryOptions<Awaited<ReturnType<typeof activityFeedRetrieve>>, TError, TData> & {
22
22
  queryKey: QueryKey;
23
23
  };
24
- export type HomeRetrieveQueryResult = NonNullable<Awaited<ReturnType<typeof homeRetrieve>>>;
25
- export type HomeRetrieveQueryError = unknown;
24
+ export type ActivityFeedRetrieveQueryResult = NonNullable<Awaited<ReturnType<typeof activityFeedRetrieve>>>;
25
+ export type ActivityFeedRetrieveQueryError = unknown;
26
26
  /**
27
- * @summary Данные для главной страницы
27
+ * @summary Лента активности
28
28
  */
29
- export declare function useHomeRetrieve<TData = Awaited<ReturnType<typeof homeRetrieve>>, TError = unknown>(options?: {
30
- query?: UseQueryOptions<Awaited<ReturnType<typeof homeRetrieve>>, TError, TData>;
29
+ export declare function useActivityFeedRetrieve<TData = Awaited<ReturnType<typeof activityFeedRetrieve>>, TError = unknown>(options?: {
30
+ query?: UseQueryOptions<Awaited<ReturnType<typeof activityFeedRetrieve>>, TError, TData>;
31
31
  fetch?: RequestInit;
32
32
  }): UseQueryResult<TData, TError> & {
33
33
  queryKey: QueryKey;
package/dist/home/home.js CHANGED
@@ -7,11 +7,11 @@
7
7
  */
8
8
  import { useQuery } from '@tanstack/react-query';
9
9
  ;
10
- export const getHomeRetrieveUrl = () => {
11
- return `/api/home/`;
10
+ export const getActivityFeedRetrieveUrl = () => {
11
+ return `/api/activity-feed/`;
12
12
  };
13
- export const homeRetrieve = async (options) => {
14
- const res = await fetch(getHomeRetrieveUrl(), {
13
+ export const activityFeedRetrieve = async (options) => {
14
+ const res = await fetch(getActivityFeedRetrieveUrl(), {
15
15
  ...options,
16
16
  method: 'GET'
17
17
  });
@@ -19,22 +19,22 @@ export const homeRetrieve = async (options) => {
19
19
  const data = body ? JSON.parse(body) : {};
20
20
  return { data, status: res.status, headers: res.headers };
21
21
  };
22
- export const getHomeRetrieveQueryKey = () => {
22
+ export const getActivityFeedRetrieveQueryKey = () => {
23
23
  return [
24
- `/api/home/`
24
+ `/api/activity-feed/`
25
25
  ];
26
26
  };
27
- export const getHomeRetrieveQueryOptions = (options) => {
27
+ export const getActivityFeedRetrieveQueryOptions = (options) => {
28
28
  const { query: queryOptions, fetch: fetchOptions } = options ?? {};
29
- const queryKey = queryOptions?.queryKey ?? getHomeRetrieveQueryKey();
30
- const queryFn = ({ signal }) => homeRetrieve({ signal, ...fetchOptions });
29
+ const queryKey = queryOptions?.queryKey ?? getActivityFeedRetrieveQueryKey();
30
+ const queryFn = ({ signal }) => activityFeedRetrieve({ signal, ...fetchOptions });
31
31
  return { queryKey, queryFn, ...queryOptions };
32
32
  };
33
33
  /**
34
- * @summary Данные для главной страницы
34
+ * @summary Лента активности
35
35
  */
36
- export function useHomeRetrieve(options) {
37
- const queryOptions = getHomeRetrieveQueryOptions(options);
36
+ export function useActivityFeedRetrieve(options) {
37
+ const queryOptions = getActivityFeedRetrieveQueryOptions(options);
38
38
  const query = useQuery(queryOptions);
39
39
  return { ...query, queryKey: queryOptions.queryKey };
40
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omerikanec/api-client-demo",
3
- "version": "3.1.0",
3
+ "version": "4.1.0",
4
4
  "description": "Auto-generated typed API client",
5
5
  "license": "MIT",
6
6
  "type": "module",