@venulog/phasing-engine-schemas 0.1.0 → 0.2.0-alpha.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 CHANGED
@@ -1,4 +1,4 @@
1
- # @phasing-engine/schemas
1
+ # @venulog/phasing-engine-schemas
2
2
 
3
3
  Shared schemas and types for Phasing Engine API. Provides Zod validation schemas, TypeScript types, and OpenAPI documentation support.
4
4
 
@@ -7,7 +7,7 @@ Shared schemas and types for Phasing Engine API. Provides Zod validation schemas
7
7
  This package is designed to be used as a local workspace package:
8
8
 
9
9
  ```bash
10
- npm install @phasing-engine/schemas
10
+ npm install @venulog/phasing-engine-schemas
11
11
  ```
12
12
 
13
13
  ## Usage
@@ -18,7 +18,7 @@ import {
18
18
  PhaseBooking,
19
19
  BookingStatus,
20
20
  SlotStatus
21
- } from '@phasing-engine/schemas';
21
+ } from '@venulog/phasing-engine-schemas';
22
22
 
23
23
  // Use schemas for validation
24
24
  const booking = phaseBookingSchema.parse(data);
package/dist/index.d.ts CHANGED
@@ -3,7 +3,6 @@ export * from './pagination.js';
3
3
  export * from './auth.js';
4
4
  export * from './phaseBooking.js';
5
5
  export * from './phaseSlot.js';
6
- export * from './company.js';
7
6
  export * from './enums/bookingStatus.js';
8
7
  export * from './enums/slotStatus.js';
9
8
  export { z } from './zod.js';
package/dist/index.js CHANGED
@@ -4,7 +4,6 @@ export * from './pagination.js';
4
4
  export * from './auth.js';
5
5
  export * from './phaseBooking.js';
6
6
  export * from './phaseSlot.js';
7
- export * from './company.js';
8
7
  // Enum exports
9
8
  export * from './enums/bookingStatus.js';
10
9
  export * from './enums/slotStatus.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@venulog/phasing-engine-schemas",
3
- "version": "0.1.0",
3
+ "version": "0.2.0-alpha.0",
4
4
  "description": "Shared schemas and types for Phasing Engine API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -29,10 +29,6 @@
29
29
  "./phaseSlot": {
30
30
  "types": "./dist/phaseSlot.d.ts",
31
31
  "import": "./dist/phaseSlot.js"
32
- },
33
- "./company": {
34
- "types": "./dist/company.d.ts",
35
- "import": "./dist/company.js"
36
32
  }
37
33
  },
38
34
  "files": [
package/dist/company.d.ts DELETED
@@ -1,45 +0,0 @@
1
- import { z } from './zod.js';
2
- export declare const fullCompanySchema: z.ZodObject<{
3
- id: z.ZodNumber;
4
- company_name: z.ZodString;
5
- vat_number: z.ZodNullable<z.ZodString>;
6
- siret_code: z.ZodNullable<z.ZodString>;
7
- tva_intracom: z.ZodNullable<z.ZodString>;
8
- type: z.ZodString;
9
- company_role: z.ZodNullable<z.ZodString>;
10
- company_street: z.ZodNullable<z.ZodString>;
11
- company_city: z.ZodNullable<z.ZodString>;
12
- company_postal_code: z.ZodNullable<z.ZodString>;
13
- company_country: z.ZodNullable<z.ZodString>;
14
- company_address: z.ZodNullable<z.ZodString>;
15
- contact_first_name: z.ZodNullable<z.ZodString>;
16
- contact_last_name: z.ZodNullable<z.ZodString>;
17
- contact_email: z.ZodNullable<z.ZodString>;
18
- contact_phone: z.ZodNullable<z.ZodString>;
19
- is_active: z.ZodBoolean;
20
- created_at: z.ZodString;
21
- updated_at: z.ZodString;
22
- created_by: z.ZodNullable<z.ZodString>;
23
- updated_by: z.ZodNullable<z.ZodString>;
24
- company_id: z.ZodNullable<z.ZodNumber>;
25
- }, z.core.$strip>;
26
- export declare const companyRoleSchema: z.ZodObject<{
27
- role: z.ZodString;
28
- }, z.core.$strip>;
29
- export declare const companyRolesDataSchema: z.ZodObject<{
30
- roles: z.ZodArray<z.ZodObject<{
31
- role: z.ZodString;
32
- }, z.core.$strip>>;
33
- }, z.core.$strip>;
34
- export declare const getCompanyRolesResponseSchema: z.ZodObject<{
35
- success: z.ZodBoolean;
36
- data: z.ZodObject<{
37
- roles: z.ZodArray<z.ZodObject<{
38
- role: z.ZodString;
39
- }, z.core.$strip>>;
40
- }, z.core.$strip>;
41
- }, z.core.$strip>;
42
- export type FullCompany = z.infer<typeof fullCompanySchema>;
43
- export type CompanyRole = z.infer<typeof companyRoleSchema>;
44
- export type CompanyRolesData = z.infer<typeof companyRolesDataSchema>;
45
- export type GetCompanyRolesResponse = z.infer<typeof getCompanyRolesResponseSchema>;
package/dist/company.js DELETED
@@ -1,120 +0,0 @@
1
- import { z } from './zod.js';
2
- import { createSuccessResponseSchema } from './common.js';
3
- // ------------------------------
4
- // Company schemas
5
- // ------------------------------
6
- export const fullCompanySchema = z
7
- .object({
8
- id: z.number().openapi({
9
- description: 'Company unique identifier',
10
- example: 1
11
- }),
12
- company_name: z.string().openapi({
13
- description: 'Company name',
14
- example: 'Acme Corporation'
15
- }),
16
- vat_number: z.string().nullable().openapi({
17
- description: 'VAT number',
18
- example: 'FR12345678901'
19
- }),
20
- siret_code: z.string().nullable().openapi({
21
- description: 'SIRET code',
22
- example: '12345678901234'
23
- }),
24
- tva_intracom: z.string().nullable().openapi({
25
- description: 'Intra-community VAT number',
26
- example: 'FR12345678901'
27
- }),
28
- type: z.string().openapi({
29
- description: 'Company type',
30
- example: 'corporate'
31
- }),
32
- company_role: z.string().nullable().openapi({
33
- description: 'Company role in the system',
34
- example: 'exhibitor'
35
- }),
36
- company_street: z.string().nullable().openapi({
37
- description: 'Company street address',
38
- example: '123 Business Street'
39
- }),
40
- company_city: z.string().nullable().openapi({
41
- description: 'Company city',
42
- example: 'Paris'
43
- }),
44
- company_postal_code: z.string().nullable().openapi({
45
- description: 'Company postal code',
46
- example: '75001'
47
- }),
48
- company_country: z.string().nullable().openapi({
49
- description: 'Company country',
50
- example: 'France'
51
- }),
52
- company_address: z.string().nullable().openapi({
53
- description: 'Full company address',
54
- example: '123 Business Street, 75001 Paris, France'
55
- }),
56
- contact_first_name: z.string().nullable().openapi({
57
- description: 'Contact person first name',
58
- example: 'John'
59
- }),
60
- contact_last_name: z.string().nullable().openapi({
61
- description: 'Contact person last name',
62
- example: 'Doe'
63
- }),
64
- contact_email: z.string().email().nullable().openapi({
65
- description: 'Contact email address',
66
- example: 'john.doe@acme.com'
67
- }),
68
- contact_phone: z.string().nullable().openapi({
69
- description: 'Contact phone number',
70
- example: '+33123456789'
71
- }),
72
- is_active: z.boolean().openapi({
73
- description: 'Whether the company is active',
74
- example: true
75
- }),
76
- created_at: z.string().openapi({
77
- description: 'Timestamp when company was created',
78
- example: '2025-12-04T10:30:00.000Z'
79
- }),
80
- updated_at: z.string().openapi({
81
- description: 'Timestamp when company was last updated',
82
- example: '2025-12-04T10:30:00.000Z'
83
- }),
84
- created_by: z.string().uuid().nullable().openapi({
85
- description: 'User who created the company',
86
- example: '123e4567-e89b-12d3-a456-426614174000'
87
- }),
88
- updated_by: z.string().uuid().nullable().openapi({
89
- description: 'User who last updated the company',
90
- example: '123e4567-e89b-12d3-a456-426614174000'
91
- }),
92
- company_id: z.number().nullable().openapi({
93
- description: 'Parent company ID if this is a subsidiary',
94
- example: null
95
- })
96
- })
97
- .openapi('FullCompany');
98
- // ------------------------------
99
- // Company roles response schemas
100
- // ------------------------------
101
- export const companyRoleSchema = z
102
- .object({
103
- role: z.string().openapi({
104
- description: 'Distinct company role',
105
- example: 'exhibitor'
106
- })
107
- })
108
- .openapi('CompanyRole');
109
- export const companyRolesDataSchema = z
110
- .object({
111
- roles: z.array(companyRoleSchema).openapi({
112
- description: 'List of distinct company roles',
113
- example: [{ role: 'exhibitor' }, { role: 'sponsor' }, { role: 'visitor' }]
114
- })
115
- })
116
- .openapi('CompanyRolesData');
117
- // ------------------------------
118
- // Response schemas
119
- // ------------------------------
120
- export const getCompanyRolesResponseSchema = createSuccessResponseSchema(companyRolesDataSchema, 'GetCompanyRolesResponse', 'List of distinct company roles with counts');