mirror of
https://github.com/s-frick/effigenix.git
synced 2026-03-28 10:29:35 +01:00
chore(types): OpenAPI-Spec update
This commit is contained in:
parent
d27dbaa843
commit
d20fb4108a
11 changed files with 2468 additions and 45 deletions
|
|
@ -3,12 +3,22 @@
|
|||
"version": "0.1.0",
|
||||
"description": "HTTP client for the Effigenix ERP API",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"main": "./src/index.ts",
|
||||
"types": "./src/index.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
"types": "./src/index.ts",
|
||||
"default": "./src/index.ts"
|
||||
}
|
||||
},
|
||||
"publishConfig": {
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -3,12 +3,22 @@
|
|||
"version": "0.1.0",
|
||||
"description": "Shared configuration constants for Effigenix ERP",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"main": "./src/index.ts",
|
||||
"types": "./src/index.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
"types": "./src/index.ts",
|
||||
"default": "./src/index.ts"
|
||||
}
|
||||
},
|
||||
"publishConfig": {
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -3,17 +3,28 @@
|
|||
"version": "0.1.0",
|
||||
"description": "TypeScript types for Effigenix ERP (auto-generated from OpenAPI)",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"main": "./src/index.ts",
|
||||
"types": "./src/index.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
"types": "./src/index.ts",
|
||||
"default": "./src/index.ts"
|
||||
}
|
||||
},
|
||||
"publishConfig": {
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"generate:types": "openapi-typescript http://localhost:8080/api-docs -o src/generated/api.ts",
|
||||
"build": "pnpm run generate:types && tsup",
|
||||
"generate:types": "openapi-typescript ../../openapi.json -o src/generated/api.ts",
|
||||
"generate:spec": "curl -sf http://localhost:8080/api-docs -o ../../openapi.json",
|
||||
"build": "tsup",
|
||||
"dev": "tsup --watch",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"clean": "rm -rf dist .turbo"
|
||||
|
|
|
|||
|
|
@ -12,9 +12,6 @@ export type LoginResponse = components['schemas']['LoginResponse'];
|
|||
// Token Refresh
|
||||
export type RefreshTokenRequest = components['schemas']['RefreshTokenRequest'];
|
||||
|
||||
// Session Token
|
||||
export type SessionToken = components['schemas']['SessionToken'];
|
||||
|
||||
/**
|
||||
* Custom types not in OpenAPI spec
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -3,15 +3,17 @@
|
|||
* Re-exports types from the auto-generated OpenAPI schema
|
||||
*/
|
||||
|
||||
import type { components } from './generated/api';
|
||||
|
||||
// Error handling
|
||||
export type ErrorResponse = components['schemas']['ErrorResponse'];
|
||||
|
||||
/**
|
||||
* Custom common types
|
||||
*/
|
||||
|
||||
export interface ErrorResponse {
|
||||
message: string;
|
||||
status?: number;
|
||||
timestamp?: string;
|
||||
path?: string;
|
||||
}
|
||||
|
||||
export interface ValidationError {
|
||||
field: string;
|
||||
message: string;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -7,8 +7,8 @@ import type { components } from './generated/api';
|
|||
|
||||
// Role DTOs
|
||||
export type RoleDTO = components['schemas']['RoleDTO'];
|
||||
export type RoleName = components['schemas']['RoleName'];
|
||||
export type Permission = components['schemas']['Permission'];
|
||||
export type RoleName = NonNullable<RoleDTO['name']>;
|
||||
export type Permission = NonNullable<RoleDTO['permissions']>[number];
|
||||
|
||||
/**
|
||||
* Custom types for UI
|
||||
|
|
|
|||
|
|
@ -3,12 +3,22 @@
|
|||
"version": "0.1.0",
|
||||
"description": "Zod validation schemas for Effigenix ERP",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"main": "./src/index.ts",
|
||||
"types": "./src/index.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
"types": "./src/index.ts",
|
||||
"default": "./src/index.ts"
|
||||
}
|
||||
},
|
||||
"publishConfig": {
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue