@omerikanec/api-client-demo 4.1.0 → 5.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.
@@ -1 +1,61 @@
1
- export {};
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,33 +1,33 @@
1
1
  import type { QueryKey, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
2
- import type { ActivityFeedResponse } from '../api.schemas';
2
+ import type { HomeResponse } from '../api.schemas';
3
3
  /**
4
- * Возвращает последние сообщения из Telegram-канала клуба (кешируется на 1 минуту).
5
- * @summary Лента активности
4
+ * Возвращает избранные новости (до 3), ближайшие мероприятия (до 5) и избранные галереи (до 2).
5
+ * @summary Данные для главной страницы
6
6
  */
7
- export type activityFeedRetrieveResponse200 = {
8
- data: ActivityFeedResponse;
7
+ export type homeRetrieveResponse200 = {
8
+ data: HomeResponse;
9
9
  status: 200;
10
10
  };
11
- export type activityFeedRetrieveResponseSuccess = (activityFeedRetrieveResponse200) & {
11
+ export type homeRetrieveResponseSuccess = (homeRetrieveResponse200) & {
12
12
  headers: Headers;
13
13
  };
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>;
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>;
20
20
  fetch?: RequestInit;
21
- }) => UseQueryOptions<Awaited<ReturnType<typeof activityFeedRetrieve>>, TError, TData> & {
21
+ }) => UseQueryOptions<Awaited<ReturnType<typeof homeRetrieve>>, TError, TData> & {
22
22
  queryKey: QueryKey;
23
23
  };
24
- export type ActivityFeedRetrieveQueryResult = NonNullable<Awaited<ReturnType<typeof activityFeedRetrieve>>>;
25
- export type ActivityFeedRetrieveQueryError = unknown;
24
+ export type HomeRetrieveQueryResult = NonNullable<Awaited<ReturnType<typeof homeRetrieve>>>;
25
+ export type HomeRetrieveQueryError = unknown;
26
26
  /**
27
- * @summary Лента активности
27
+ * @summary Данные для главной страницы
28
28
  */
29
- export declare function useActivityFeedRetrieve<TData = Awaited<ReturnType<typeof activityFeedRetrieve>>, TError = unknown>(options?: {
30
- query?: UseQueryOptions<Awaited<ReturnType<typeof activityFeedRetrieve>>, TError, TData>;
29
+ export declare function useHomeRetrieve<TData = Awaited<ReturnType<typeof homeRetrieve>>, TError = unknown>(options?: {
30
+ query?: UseQueryOptions<Awaited<ReturnType<typeof homeRetrieve>>, 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 getActivityFeedRetrieveUrl = () => {
11
- return `/api/activity-feed/`;
10
+ export const getHomeRetrieveUrl = () => {
11
+ return `/api/home/`;
12
12
  };
13
- export const activityFeedRetrieve = async (options) => {
14
- const res = await fetch(getActivityFeedRetrieveUrl(), {
13
+ export const homeRetrieve = async (options) => {
14
+ const res = await fetch(getHomeRetrieveUrl(), {
15
15
  ...options,
16
16
  method: 'GET'
17
17
  });
@@ -19,22 +19,22 @@ export const activityFeedRetrieve = 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 getActivityFeedRetrieveQueryKey = () => {
22
+ export const getHomeRetrieveQueryKey = () => {
23
23
  return [
24
- `/api/activity-feed/`
24
+ `/api/home/`
25
25
  ];
26
26
  };
27
- export const getActivityFeedRetrieveQueryOptions = (options) => {
27
+ export const getHomeRetrieveQueryOptions = (options) => {
28
28
  const { query: queryOptions, fetch: fetchOptions } = options ?? {};
29
- const queryKey = queryOptions?.queryKey ?? getActivityFeedRetrieveQueryKey();
30
- const queryFn = ({ signal }) => activityFeedRetrieve({ signal, ...fetchOptions });
29
+ const queryKey = queryOptions?.queryKey ?? getHomeRetrieveQueryKey();
30
+ const queryFn = ({ signal }) => homeRetrieve({ signal, ...fetchOptions });
31
31
  return { queryKey, queryFn, ...queryOptions };
32
32
  };
33
33
  /**
34
- * @summary Лента активности
34
+ * @summary Данные для главной страницы
35
35
  */
36
- export function useActivityFeedRetrieve(options) {
37
- const queryOptions = getActivityFeedRetrieveQueryOptions(options);
36
+ export function useHomeRetrieve(options) {
37
+ const queryOptions = getHomeRetrieveQueryOptions(options);
38
38
  const query = useQuery(queryOptions);
39
39
  return { ...query, queryKey: queryOptions.queryKey };
40
40
  }
@@ -51,35 +51,33 @@
51
51
  </style>
52
52
  </head>
53
53
  <body>
54
- <h1>API Client Impact Report <span class="badge" style="background: var(--orange);">MINOR</span></h1>
54
+ <h1>API Client Impact Report <span class="badge" style="background: var(--red);">MAJOR</span></h1>
55
55
  <div class="meta">Unreleased — 2026-06-21</div>
56
56
 
57
57
  <div class="stats">
58
58
  <div class="stat"><div class="stat-val" style="color: var(--purple);">1</div><div class="stat-lbl">Types</div></div>
59
59
  <div class="stat"><div class="stat-val" style="color: var(--blue);">1</div><div class="stat-lbl">Endpoints</div></div>
60
60
  <div class="stat"><div class="stat-val" style="color: var(--teal);">1</div><div class="stat-lbl">Hooks</div></div>
61
- <div class="stat"><div class="stat-val" style="color: var(--green);">3</div><div class="stat-lbl">Added</div></div>
61
+ <div class="stat"><div class="stat-val" style="color: var(--green);">0</div><div class="stat-lbl">Added</div></div>
62
62
  <div class="stat"><div class="stat-val" style="color: var(--orange);">0</div><div class="stat-lbl">Modified</div></div>
63
- <div class="stat"><div class="stat-val" style="color: var(--red);">0</div><div class="stat-lbl">Removed / Breaking</div></div>
63
+ <div class="stat"><div class="stat-val" style="color: var(--red);">3</div><div class="stat-lbl">Removed / Breaking</div></div>
64
64
  </div>
65
65
 
66
66
 
67
-
68
-
69
67
  <div class="section">
70
- <div class="section-title">Other Changes</div>
68
+ <div class="section-title" style="color: var(--red);">⚠ Breaking Changes</div>
71
69
  <div class="group">
72
70
  <div class="group-name">/api/activity-feed/ (3)</div>
73
71
  <div>
74
- <div class="artifact change-added">
72
+ <div class="artifact change-breaking">
75
73
  <span class="kind kind-hook">hook</span>
76
74
  <span class="name">useActivity_feed_retrieve</span>
77
75
  </div>
78
- <div class="artifact change-added">
76
+ <div class="artifact change-breaking">
79
77
  <span class="kind kind-endpoint">endpoint</span>
80
78
  <span class="name">activity_feed_retrieve</span>
81
79
  </div>
82
- <div class="artifact change-added">
80
+ <div class="artifact change-breaking">
83
81
  <span class="kind kind-type">type</span>
84
82
  <span class="name">Activity_feed_retrieveResponse</span>
85
83
  </div>
@@ -88,10 +86,12 @@
88
86
  </div>
89
87
 
90
88
 
89
+
90
+
91
91
  <div class="changelog">
92
92
  <div class="section-title">Spec Changelog</div>
93
+ <h4 style="margin: 8px 0 4px; color: var(--red); font-size: 0.9em;">Breaking</h4><ul><li>Path removed: /api/activity-feed/</li></ul>
93
94
 
94
- <h4 style="margin: 8px 0 4px; font-size: 0.9em;">Non-breaking</h4><ul><li>Path added: /api/activity-feed/</li></ul>
95
95
  </div>
96
96
 
97
97
  <footer>Generated by <strong>api-sync</strong> on 2026-06-21</footer>
@@ -2,21 +2,21 @@
2
2
  "generatedBy": "api-sync",
3
3
  "version": "unknown",
4
4
  "date": "2026-06-21",
5
- "bump": "minor",
6
- "breakingChanges": [],
7
- "nonBreakingChanges": [
8
- "Path added: /api/activity-feed/"
5
+ "bump": "major",
6
+ "breakingChanges": [
7
+ "Path removed: /api/activity-feed/"
9
8
  ],
9
+ "nonBreakingChanges": [],
10
10
  "frontendImpact": {
11
11
  "stats": {
12
12
  "totalAffected": 3,
13
13
  "typesAffected": 1,
14
14
  "endpointsAffected": 1,
15
15
  "hooksAffected": 1,
16
- "added": 3,
16
+ "added": 0,
17
17
  "removed": 0,
18
18
  "modified": 0,
19
- "breaking": 0,
19
+ "breaking": 3,
20
20
  "deprecated": 0
21
21
  },
22
22
  "affected": [
@@ -24,27 +24,27 @@
24
24
  "source": "/api/activity-feed/",
25
25
  "name": "useActivity_feed_retrieve",
26
26
  "kind": "hook",
27
- "change": "added",
27
+ "change": "breaking",
28
28
  "reasons": [
29
- "Path added: /api/activity-feed/"
29
+ "Path removed: /api/activity-feed/"
30
30
  ]
31
31
  },
32
32
  {
33
33
  "source": "/api/activity-feed/",
34
34
  "name": "activity_feed_retrieve",
35
35
  "kind": "endpoint",
36
- "change": "added",
36
+ "change": "breaking",
37
37
  "reasons": [
38
- "Path added: /api/activity-feed/"
38
+ "Path removed: /api/activity-feed/"
39
39
  ]
40
40
  },
41
41
  {
42
42
  "source": "/api/activity-feed/",
43
43
  "name": "Activity_feed_retrieveResponse",
44
44
  "kind": "type",
45
- "change": "added",
45
+ "change": "breaking",
46
46
  "reasons": [
47
- "Path added: /api/activity-feed/"
47
+ "Path removed: /api/activity-feed/"
48
48
  ]
49
49
  }
50
50
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omerikanec/api-client-demo",
3
- "version": "4.1.0",
3
+ "version": "5.0.0",
4
4
  "description": "Auto-generated typed API client",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -21,7 +21,8 @@
21
21
  "dist",
22
22
  "impact-report.json",
23
23
  "impact-report.html",
24
- "CHANGELOG.md"
24
+ "CHANGELOG.md",
25
+ "postinstall.cjs"
25
26
  ],
26
27
  "publishConfig": {
27
28
  "registry": "https://registry.npmjs.org",
@@ -30,6 +31,9 @@
30
31
  "engines": {
31
32
  "node": ">=18"
32
33
  },
34
+ "scripts": {
35
+ "postinstall": "node postinstall.cjs"
36
+ },
33
37
  "peerDependencies": {
34
38
  "@tanstack/react-query": ">=4.0.0",
35
39
  "react": ">=17.0.0"
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env node
2
+ try {
3
+ const path = require('node:path');
4
+ const pkgDir = __dirname;
5
+ const htmlReport = path.join(pkgDir, 'impact-report.html');
6
+ const jsonReport = path.join(pkgDir, 'impact-report.json');
7
+ const changelog = path.join(pkgDir, 'CHANGELOG.md');
8
+
9
+ const lines = [];
10
+ lines.push('');
11
+ lines.push(' ⚠ @omerikanec/api-client-demo@new — BREAKING CHANGES');
12
+ lines.push('');
13
+ lines.push(' 3 frontend artifact(s) affected:');
14
+ lines.push(' ✗ hook: useActivity_feed_retrieve');
15
+ lines.push(' ✗ endpoint: activity_feed_retrieve');
16
+ lines.push(' ✗ type: Activity_feed_retrieveResponse');
17
+
18
+ lines.push('');
19
+ lines.push(' Full details:');
20
+ lines.push(' HTML report : ' + htmlReport);
21
+ lines.push(' JSON report : ' + jsonReport);
22
+ lines.push(' Changelog : ' + changelog);
23
+ lines.push('');
24
+ lines.push(' Open the HTML report in your browser for a visual overview.');
25
+ lines.push('');
26
+
27
+ console.log(lines.join('\n'));
28
+ } catch {
29
+ // Best-effort warning only. Never block npm install.
30
+ }
31
+ process.exitCode = 0;