@orlikfy/api-interfaces 2.0.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.
package/README.md ADDED
@@ -0,0 +1,48 @@
1
+ # @orlikfy/api-interfaces
2
+
3
+ TypeScript interfaces generated from the Orlikfy backend OpenAPI specification.
4
+
5
+ ## Publishing New Version
6
+
7
+ ### 1. Generate Latest OpenAPI Spec
8
+
9
+ Run the server locally to ensure the latest `openapi.yaml` is generated:
10
+
11
+ ```bash
12
+ cd server
13
+ npm run start:dev
14
+ ```
15
+
16
+ > Note: This step will be automated in the future.
17
+
18
+ ### 2. Generate TypeScript Interfaces
19
+
20
+ From the `server/` directory:
21
+
22
+ ```bash
23
+ npm run api:generate
24
+ ```
25
+
26
+ This generates TypeScript types from `openapi.yaml` into `npm-api-interfaces/src/api.ts`.
27
+
28
+ ### 3. Build
29
+
30
+ From the `npm-api-interfaces/` directory:
31
+
32
+ ```bash
33
+ npm run build
34
+ ```
35
+
36
+ ### 4. Update Version
37
+
38
+ Update the version in `package.json`:
39
+
40
+ ```bash
41
+ npm version patch # or minor/major
42
+ ```
43
+
44
+ ### 5. Publish
45
+
46
+ ```bash
47
+ npm publish
48
+ ```
package/dist/api.d.ts CHANGED
@@ -759,6 +759,23 @@ export interface paths {
759
759
  patch?: never;
760
760
  trace?: never;
761
761
  };
762
+ "/admin/users/stats": {
763
+ parameters: {
764
+ query?: never;
765
+ header?: never;
766
+ path?: never;
767
+ cookie?: never;
768
+ };
769
+ /** getUsersStatsForAdmin */
770
+ get: operations["getUsersStats"];
771
+ put?: never;
772
+ post?: never;
773
+ delete?: never;
774
+ options?: never;
775
+ head?: never;
776
+ patch?: never;
777
+ trace?: never;
778
+ };
762
779
  "/admin/games": {
763
780
  parameters: {
764
781
  query?: never;
@@ -2036,10 +2053,6 @@ export interface components {
2036
2053
  role: string;
2037
2054
  thumbnail: string | null;
2038
2055
  thumbnailUrl: string | null;
2039
- /** @description Is user marked manually as a host */
2040
- isHost: boolean;
2041
- /** @description Is user marked manually as a paid host */
2042
- isPaidHost: boolean;
2043
2056
  playerPreferences: components["schemas"]["PlayerPreferences"];
2044
2057
  hostRating: string | null;
2045
2058
  hostRatingCount: number;
@@ -2816,11 +2829,6 @@ export interface components {
2816
2829
  playedGames: number;
2817
2830
  gameApplications: number;
2818
2831
  };
2819
- ReferralDto: {
2820
- referralId: string | null;
2821
- displayName: string | null;
2822
- email: string | null;
2823
- };
2824
2832
  AdminUserDto: {
2825
2833
  userId: string;
2826
2834
  name: string;
@@ -2833,16 +2841,29 @@ export interface components {
2833
2841
  versionInfo: string | null;
2834
2842
  platform: string | null;
2835
2843
  stats: components["schemas"]["AdminUserStatsDto"];
2836
- /** @description Is user marked manually as a host */
2837
- isHost: boolean;
2838
- /** @description Is user marked manually as a paid host */
2839
- isPaidHost: boolean;
2840
- referral: components["schemas"]["ReferralDto"] | null;
2841
- referralToken: string;
2842
2844
  };
2843
2845
  GetAdminUsersDto: {
2844
2846
  users: components["schemas"]["AdminUserDto"][];
2845
2847
  };
2848
+ PlatformStatsDto: {
2849
+ platform: string;
2850
+ count: number;
2851
+ };
2852
+ VersionStatsDto: {
2853
+ version: string;
2854
+ count: number;
2855
+ };
2856
+ PlatformVersionStatsDto: {
2857
+ platform: string;
2858
+ version: string;
2859
+ count: number;
2860
+ };
2861
+ GetAdminUsersStatsDto: {
2862
+ totalUsers: number;
2863
+ platformStats: components["schemas"]["PlatformStatsDto"][];
2864
+ versionStats: components["schemas"]["VersionStatsDto"][];
2865
+ platformVersionStats: components["schemas"]["PlatformVersionStatsDto"][];
2866
+ };
2846
2867
  AdminGamePlayerDto: {
2847
2868
  playerId: string;
2848
2869
  gamePlayerId: string;
@@ -3295,9 +3316,12 @@ export type Payload = components['schemas']['Payload'];
3295
3316
  export type CreateShortLinkDto = components['schemas']['CreateShortLinkDto'];
3296
3317
  export type ShortLinkDto = components['schemas']['ShortLinkDto'];
3297
3318
  export type AdminUserStatsDto = components['schemas']['AdminUserStatsDto'];
3298
- export type ReferralDto = components['schemas']['ReferralDto'];
3299
3319
  export type AdminUserDto = components['schemas']['AdminUserDto'];
3300
3320
  export type GetAdminUsersDto = components['schemas']['GetAdminUsersDto'];
3321
+ export type PlatformStatsDto = components['schemas']['PlatformStatsDto'];
3322
+ export type VersionStatsDto = components['schemas']['VersionStatsDto'];
3323
+ export type PlatformVersionStatsDto = components['schemas']['PlatformVersionStatsDto'];
3324
+ export type GetAdminUsersStatsDto = components['schemas']['GetAdminUsersStatsDto'];
3301
3325
  export type AdminGamePlayerDto = components['schemas']['AdminGamePlayerDto'];
3302
3326
  export type AdminGameDto = components['schemas']['AdminGameDto'];
3303
3327
  export type AdminGamesDto = components['schemas']['AdminGamesDto'];
@@ -5240,7 +5264,10 @@ export interface operations {
5240
5264
  };
5241
5265
  getUsers: {
5242
5266
  parameters: {
5243
- query?: never;
5267
+ query?: {
5268
+ /** @description Search term to filter users by name, surname, email, userId, or phone number */
5269
+ search?: string;
5270
+ };
5244
5271
  header?: {
5245
5272
  /** @description Request trace id for logs */
5246
5273
  "x-trace-request-id"?: string;
@@ -5273,6 +5300,41 @@ export interface operations {
5273
5300
  };
5274
5301
  };
5275
5302
  };
5303
+ getUsersStats: {
5304
+ parameters: {
5305
+ query?: never;
5306
+ header?: {
5307
+ /** @description Request trace id for logs */
5308
+ "x-trace-request-id"?: string;
5309
+ /** @description Session trace id for logs */
5310
+ "x-trace-session-id"?: string;
5311
+ /** @description IANA Timezone */
5312
+ "x-timezone"?: string;
5313
+ };
5314
+ path?: never;
5315
+ cookie?: never;
5316
+ };
5317
+ requestBody?: never;
5318
+ responses: {
5319
+ 200: {
5320
+ headers: {
5321
+ [name: string]: unknown;
5322
+ };
5323
+ content: {
5324
+ "application/json": components["schemas"]["GetAdminUsersStatsDto"];
5325
+ };
5326
+ };
5327
+ /** @description Application Error */
5328
+ 500: {
5329
+ headers: {
5330
+ [name: string]: unknown;
5331
+ };
5332
+ content: {
5333
+ "application/json": components["schemas"]["ErrorResponse"];
5334
+ };
5335
+ };
5336
+ };
5337
+ };
5276
5338
  getGames: {
5277
5339
  parameters: {
5278
5340
  query?: {
@@ -7218,13 +7280,11 @@ export interface operations {
7218
7280
  };
7219
7281
  requestBody?: never;
7220
7282
  responses: {
7221
- 200: {
7283
+ 201: {
7222
7284
  headers: {
7223
7285
  [name: string]: unknown;
7224
7286
  };
7225
- content: {
7226
- "application/json": components["schemas"]["CreateReassignTokenResponseDto"];
7227
- };
7287
+ content?: never;
7228
7288
  };
7229
7289
  /** @description Application Error */
7230
7290
  500: {
@@ -7578,6 +7638,7 @@ export declare enum ApiPaths {
7578
7638
  createShortLink = "/short-link",
7579
7639
  createRecurringGame = "/recurring-games",
7580
7640
  getUsers = "/admin/users",
7641
+ getUsersStats = "/admin/users/stats",
7581
7642
  getGames = "/admin/games",
7582
7643
  getGamesForPost = "/admin/games-for-post",
7583
7644
  getKnownCitiesForPost = "/admin/known-cities",
package/dist/api.js CHANGED
@@ -314,6 +314,7 @@ var ApiPaths;
314
314
  ApiPaths["createShortLink"] = "/short-link";
315
315
  ApiPaths["createRecurringGame"] = "/recurring-games";
316
316
  ApiPaths["getUsers"] = "/admin/users";
317
+ ApiPaths["getUsersStats"] = "/admin/users/stats";
317
318
  ApiPaths["getGames"] = "/admin/games";
318
319
  ApiPaths["getGamesForPost"] = "/admin/games-for-post";
319
320
  ApiPaths["getKnownCitiesForPost"] = "/admin/known-cities";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orlikfy/api-interfaces",
3
- "version": "2.0.0",
3
+ "version": "4.1.0",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "kruligh",