@venulog/phasing-engine-schemas 0.2.1 → 0.2.2-alpha.7
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 +67 -67
- package/package.json +67 -67
package/README.md
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
# @venulog/phasing-engine-schemas
|
|
2
|
-
|
|
3
|
-
Shared schemas and types for Phasing Engine API. Provides Zod validation schemas, TypeScript types, and OpenAPI documentation support.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
This package is designed to be used as a local workspace package:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm install @venulog/phasing-engine-schemas
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
```typescript
|
|
16
|
-
import {
|
|
17
|
-
phaseBookingSchema,
|
|
18
|
-
PhaseBooking,
|
|
19
|
-
BookingStatus,
|
|
20
|
-
SlotStatus
|
|
21
|
-
} from '@venulog/phasing-engine-schemas';
|
|
22
|
-
|
|
23
|
-
// Use schemas for validation
|
|
24
|
-
const booking = phaseBookingSchema.parse(data);
|
|
25
|
-
|
|
26
|
-
// Use types for type safety
|
|
27
|
-
const createBooking = (booking: PhaseBooking) => {
|
|
28
|
-
// ...
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
// Use enums for status values
|
|
32
|
-
if (booking.status === BookingStatus.CONFIRMED) {
|
|
33
|
-
// ...
|
|
34
|
-
}
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Available Exports
|
|
38
|
-
|
|
39
|
-
### Schemas
|
|
40
|
-
|
|
41
|
-
- `auth` - Authentication related schemas
|
|
42
|
-
- `common` - Base response schemas and factory functions
|
|
43
|
-
- `pagination` - Pagination and sorting schemas
|
|
44
|
-
- `phaseBooking` - Phase booking operation schemas
|
|
45
|
-
- `phaseSlot` - Phase slot management schemas
|
|
46
|
-
|
|
47
|
-
### Enums
|
|
48
|
-
|
|
49
|
-
- `BookingStatus` - Booking status values
|
|
50
|
-
- `SlotStatus` - Slot status values
|
|
51
|
-
|
|
52
|
-
### Types
|
|
53
|
-
|
|
54
|
-
All schemas export corresponding TypeScript types using Zod's `z.infer<>`.
|
|
55
|
-
|
|
56
|
-
## Development
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
# Build the package
|
|
60
|
-
npm run build
|
|
61
|
-
|
|
62
|
-
# Watch mode for development
|
|
63
|
-
npm run dev
|
|
64
|
-
|
|
65
|
-
# Clean build artifacts
|
|
66
|
-
npm run clean
|
|
67
|
-
```
|
|
1
|
+
# @venulog/phasing-engine-schemas
|
|
2
|
+
|
|
3
|
+
Shared schemas and types for Phasing Engine API. Provides Zod validation schemas, TypeScript types, and OpenAPI documentation support.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
This package is designed to be used as a local workspace package:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @venulog/phasing-engine-schemas
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import {
|
|
17
|
+
phaseBookingSchema,
|
|
18
|
+
PhaseBooking,
|
|
19
|
+
BookingStatus,
|
|
20
|
+
SlotStatus
|
|
21
|
+
} from '@venulog/phasing-engine-schemas';
|
|
22
|
+
|
|
23
|
+
// Use schemas for validation
|
|
24
|
+
const booking = phaseBookingSchema.parse(data);
|
|
25
|
+
|
|
26
|
+
// Use types for type safety
|
|
27
|
+
const createBooking = (booking: PhaseBooking) => {
|
|
28
|
+
// ...
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
// Use enums for status values
|
|
32
|
+
if (booking.status === BookingStatus.CONFIRMED) {
|
|
33
|
+
// ...
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Available Exports
|
|
38
|
+
|
|
39
|
+
### Schemas
|
|
40
|
+
|
|
41
|
+
- `auth` - Authentication related schemas
|
|
42
|
+
- `common` - Base response schemas and factory functions
|
|
43
|
+
- `pagination` - Pagination and sorting schemas
|
|
44
|
+
- `phaseBooking` - Phase booking operation schemas
|
|
45
|
+
- `phaseSlot` - Phase slot management schemas
|
|
46
|
+
|
|
47
|
+
### Enums
|
|
48
|
+
|
|
49
|
+
- `BookingStatus` - Booking status values
|
|
50
|
+
- `SlotStatus` - Slot status values
|
|
51
|
+
|
|
52
|
+
### Types
|
|
53
|
+
|
|
54
|
+
All schemas export corresponding TypeScript types using Zod's `z.infer<>`.
|
|
55
|
+
|
|
56
|
+
## Development
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Build the package
|
|
60
|
+
npm run build
|
|
61
|
+
|
|
62
|
+
# Watch mode for development
|
|
63
|
+
npm run dev
|
|
64
|
+
|
|
65
|
+
# Clean build artifacts
|
|
66
|
+
npm run clean
|
|
67
|
+
```
|
package/package.json
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@venulog/phasing-engine-schemas",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "Shared schemas and types for Phasing Engine API",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/index.js",
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"import": "./dist/index.js"
|
|
12
|
-
},
|
|
13
|
-
"./auth": {
|
|
14
|
-
"types": "./dist/auth.d.ts",
|
|
15
|
-
"import": "./dist/auth.js"
|
|
16
|
-
},
|
|
17
|
-
"./common": {
|
|
18
|
-
"types": "./dist/common.d.ts",
|
|
19
|
-
"import": "./dist/common.js"
|
|
20
|
-
},
|
|
21
|
-
"./pagination": {
|
|
22
|
-
"types": "./dist/pagination.d.ts",
|
|
23
|
-
"import": "./dist/pagination.js"
|
|
24
|
-
},
|
|
25
|
-
"./phaseBooking": {
|
|
26
|
-
"types": "./dist/phaseBooking.d.ts",
|
|
27
|
-
"import": "./dist/phaseBooking.js"
|
|
28
|
-
},
|
|
29
|
-
"./phaseSlot": {
|
|
30
|
-
"types": "./dist/phaseSlot.d.ts",
|
|
31
|
-
"import": "./dist/phaseSlot.js"
|
|
32
|
-
},
|
|
33
|
-
"./event": {
|
|
34
|
-
"types": "./dist/event.d.ts",
|
|
35
|
-
"import": "./dist/event.js"
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
"files": [
|
|
39
|
-
"dist"
|
|
40
|
-
],
|
|
41
|
-
"scripts": {
|
|
42
|
-
"build": "npm run clean && tsc",
|
|
43
|
-
"dev": "tsc --watch",
|
|
44
|
-
"clean": "rm -rf dist",
|
|
45
|
-
"prepublishOnly": "npm run build"
|
|
46
|
-
},
|
|
47
|
-
"keywords": [
|
|
48
|
-
"schemas",
|
|
49
|
-
"validation",
|
|
50
|
-
"types",
|
|
51
|
-
"zod",
|
|
52
|
-
"phasing-engine"
|
|
53
|
-
],
|
|
54
|
-
"license": "MIT",
|
|
55
|
-
"dependencies": {
|
|
56
|
-
"@asteasolutions/zod-to-openapi": "^8.1.0",
|
|
57
|
-
"zod": "^4.1.13"
|
|
58
|
-
},
|
|
59
|
-
"devDependencies": {
|
|
60
|
-
"typescript": "^5.6.3"
|
|
61
|
-
},
|
|
62
|
-
"repository": {
|
|
63
|
-
"type": "git",
|
|
64
|
-
"url": "git+https://github.com/manaty/phasing_engine.git",
|
|
65
|
-
"directory": "packages/phasing-schemas"
|
|
66
|
-
}
|
|
67
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@venulog/phasing-engine-schemas",
|
|
3
|
+
"version": "0.2.2-alpha.7",
|
|
4
|
+
"description": "Shared schemas and types for Phasing Engine API",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./auth": {
|
|
14
|
+
"types": "./dist/auth.d.ts",
|
|
15
|
+
"import": "./dist/auth.js"
|
|
16
|
+
},
|
|
17
|
+
"./common": {
|
|
18
|
+
"types": "./dist/common.d.ts",
|
|
19
|
+
"import": "./dist/common.js"
|
|
20
|
+
},
|
|
21
|
+
"./pagination": {
|
|
22
|
+
"types": "./dist/pagination.d.ts",
|
|
23
|
+
"import": "./dist/pagination.js"
|
|
24
|
+
},
|
|
25
|
+
"./phaseBooking": {
|
|
26
|
+
"types": "./dist/phaseBooking.d.ts",
|
|
27
|
+
"import": "./dist/phaseBooking.js"
|
|
28
|
+
},
|
|
29
|
+
"./phaseSlot": {
|
|
30
|
+
"types": "./dist/phaseSlot.d.ts",
|
|
31
|
+
"import": "./dist/phaseSlot.js"
|
|
32
|
+
},
|
|
33
|
+
"./event": {
|
|
34
|
+
"types": "./dist/event.d.ts",
|
|
35
|
+
"import": "./dist/event.js"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"files": [
|
|
39
|
+
"dist"
|
|
40
|
+
],
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "npm run clean && tsc",
|
|
43
|
+
"dev": "tsc --watch",
|
|
44
|
+
"clean": "rm -rf dist",
|
|
45
|
+
"prepublishOnly": "npm run build"
|
|
46
|
+
},
|
|
47
|
+
"keywords": [
|
|
48
|
+
"schemas",
|
|
49
|
+
"validation",
|
|
50
|
+
"types",
|
|
51
|
+
"zod",
|
|
52
|
+
"phasing-engine"
|
|
53
|
+
],
|
|
54
|
+
"license": "MIT",
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"@asteasolutions/zod-to-openapi": "^8.1.0",
|
|
57
|
+
"zod": "^4.1.13"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"typescript": "^5.6.3"
|
|
61
|
+
},
|
|
62
|
+
"repository": {
|
|
63
|
+
"type": "git",
|
|
64
|
+
"url": "git+https://github.com/manaty/phasing_engine.git",
|
|
65
|
+
"directory": "packages/phasing-schemas"
|
|
66
|
+
}
|
|
67
|
+
}
|