@tmlmobilidade/go-types-core 20261120.1734.34 → 20261123.1627.51

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.
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ export declare const OrganizationContactSchema: z.ZodObject<{
3
+ _id: z.ZodOptional<z.ZodString>;
4
+ email: z.ZodOptional<z.ZodEmail>;
5
+ job_description: z.ZodDefault<z.ZodString>;
6
+ name: z.ZodString;
7
+ phone: z.ZodOptional<z.ZodString>;
8
+ }, z.core.$strip>;
9
+ export type OrganizationContact = z.infer<typeof OrganizationContactSchema>;
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ export const OrganizationContactSchema = z.object({
3
+ _id: z.string().min(1).optional(),
4
+ email: z.email().optional(),
5
+ job_description: z.string().default(''),
6
+ name: z.string().trim().min(1),
7
+ phone: z.string().trim().min(1).optional(),
8
+ });
@@ -1,2 +1,4 @@
1
+ export * from './contact.js';
1
2
  export * from './open-data.js';
2
3
  export * from './organization.js';
4
+ export * from './type.js';
@@ -1,2 +1,4 @@
1
+ export * from './contact.js';
1
2
  export * from './open-data.js';
2
3
  export * from './organization.js';
4
+ export * from './type.js';
@@ -7,6 +7,39 @@ export declare const OrganizationSchema: z.ZodObject<{
7
7
  updated_at: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<import("@tmlmobilidade/go-types-shared").UnixMilliseconds, string | number>>;
8
8
  updated_by: z.ZodOptional<z.ZodString>;
9
9
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
10
+ contacts: z.ZodDefault<z.ZodArray<z.ZodObject<{
11
+ _id: z.ZodOptional<z.ZodString>;
12
+ email: z.ZodOptional<z.ZodEmail>;
13
+ job_description: z.ZodDefault<z.ZodString>;
14
+ name: z.ZodString;
15
+ phone: z.ZodOptional<z.ZodString>;
16
+ }, z.core.$strip>>>;
17
+ geojson: z.ZodDefault<z.ZodNullable<z.ZodObject<{
18
+ features: z.ZodDefault<z.ZodArray<z.ZodObject<{
19
+ geometry: z.ZodUnion<readonly [z.ZodObject<{
20
+ coordinates: z.ZodUnion<readonly [z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown]>>, z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number]>>]>;
21
+ type: z.ZodDefault<z.ZodLiteral<"Point">>;
22
+ }, z.core.$strip>, z.ZodObject<{
23
+ coordinates: z.ZodArray<z.ZodUnion<readonly [z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown]>>, z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number]>>]>>;
24
+ type: z.ZodDefault<z.ZodLiteral<"MultiPoint">>;
25
+ }, z.core.$strip>, z.ZodObject<{
26
+ coordinates: z.ZodArray<z.ZodUnion<readonly [z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown]>>, z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number]>>]>>;
27
+ type: z.ZodDefault<z.ZodLiteral<"LineString">>;
28
+ }, z.core.$strip>, z.ZodObject<{
29
+ coordinates: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown]>>, z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number]>>]>>>;
30
+ type: z.ZodDefault<z.ZodLiteral<"MultiLineString">>;
31
+ }, z.core.$strip>, z.ZodObject<{
32
+ coordinates: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown]>>, z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number]>>]>>>;
33
+ type: z.ZodDefault<z.ZodLiteral<"Polygon">>;
34
+ }, z.core.$strip>, z.ZodObject<{
35
+ coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown]>>, z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number]>>]>>>>;
36
+ type: z.ZodDefault<z.ZodLiteral<"MultiPolygon">>;
37
+ }, z.core.$strip>]>;
38
+ properties: z.ZodDefault<z.ZodNullable<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
39
+ type: z.ZodLiteral<"Feature">;
40
+ }, z.core.$strip>>>;
41
+ type: z.ZodDefault<z.ZodLiteral<"FeatureCollection">>;
42
+ }, z.core.$strip>>>;
10
43
  home_links: z.ZodDefault<z.ZodArray<z.ZodObject<{
11
44
  href: z.ZodString;
12
45
  icon: z.ZodString;
@@ -31,10 +64,22 @@ export declare const OrganizationSchema: z.ZodObject<{
31
64
  timestamp: z.ZodDefault<z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<import("@tmlmobilidade/go-types-shared").UnixMilliseconds, string | number>>>>;
32
65
  }, z.core.$strip>>;
33
66
  }, z.core.$strip>>;
67
+ organization_type: z.ZodDefault<z.ZodEnum<{
68
+ agency: "agency";
69
+ cim: "cim";
70
+ metropolitan_area: "metropolitan_area";
71
+ autonomous_region: "autonomous_region";
72
+ municipality: "municipality";
73
+ transport_authority: "transport_authority";
74
+ transport_network: "transport_network";
75
+ other: "other";
76
+ }>>;
34
77
  short_name: z.ZodString;
35
78
  theme: z.ZodDefault<z.ZodNullable<z.ZodString>>;
79
+ website_url: z.ZodDefault<z.ZodNullable<z.ZodURL>>;
36
80
  }, z.core.$strip>;
37
81
  export declare const CreateOrganizationSchema: z.ZodObject<{
82
+ website_url: z.ZodDefault<z.ZodNullable<z.ZodURL>>;
38
83
  open_data: z.ZodPrefault<z.ZodObject<{
39
84
  enabled: z.ZodDefault<z.ZodBoolean>;
40
85
  plans: z.ZodPrefault<z.ZodObject<{
@@ -54,6 +99,39 @@ export declare const CreateOrganizationSchema: z.ZodObject<{
54
99
  is_locked: z.ZodDefault<z.ZodBoolean>;
55
100
  updated_by: z.ZodOptional<z.ZodString>;
56
101
  agency_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
102
+ contacts: z.ZodDefault<z.ZodArray<z.ZodObject<{
103
+ _id: z.ZodOptional<z.ZodString>;
104
+ email: z.ZodOptional<z.ZodEmail>;
105
+ job_description: z.ZodDefault<z.ZodString>;
106
+ name: z.ZodString;
107
+ phone: z.ZodOptional<z.ZodString>;
108
+ }, z.core.$strip>>>;
109
+ geojson: z.ZodDefault<z.ZodNullable<z.ZodObject<{
110
+ features: z.ZodDefault<z.ZodArray<z.ZodObject<{
111
+ geometry: z.ZodUnion<readonly [z.ZodObject<{
112
+ coordinates: z.ZodUnion<readonly [z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown]>>, z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number]>>]>;
113
+ type: z.ZodDefault<z.ZodLiteral<"Point">>;
114
+ }, z.core.$strip>, z.ZodObject<{
115
+ coordinates: z.ZodArray<z.ZodUnion<readonly [z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown]>>, z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number]>>]>>;
116
+ type: z.ZodDefault<z.ZodLiteral<"MultiPoint">>;
117
+ }, z.core.$strip>, z.ZodObject<{
118
+ coordinates: z.ZodArray<z.ZodUnion<readonly [z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown]>>, z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number]>>]>>;
119
+ type: z.ZodDefault<z.ZodLiteral<"LineString">>;
120
+ }, z.core.$strip>, z.ZodObject<{
121
+ coordinates: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown]>>, z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number]>>]>>>;
122
+ type: z.ZodDefault<z.ZodLiteral<"MultiLineString">>;
123
+ }, z.core.$strip>, z.ZodObject<{
124
+ coordinates: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown]>>, z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number]>>]>>>;
125
+ type: z.ZodDefault<z.ZodLiteral<"Polygon">>;
126
+ }, z.core.$strip>, z.ZodObject<{
127
+ coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown]>>, z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number]>>]>>>>;
128
+ type: z.ZodDefault<z.ZodLiteral<"MultiPolygon">>;
129
+ }, z.core.$strip>]>;
130
+ properties: z.ZodDefault<z.ZodNullable<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
131
+ type: z.ZodLiteral<"Feature">;
132
+ }, z.core.$strip>>>;
133
+ type: z.ZodDefault<z.ZodLiteral<"FeatureCollection">>;
134
+ }, z.core.$strip>>>;
57
135
  home_links: z.ZodDefault<z.ZodArray<z.ZodObject<{
58
136
  href: z.ZodString;
59
137
  icon: z.ZodString;
@@ -64,9 +142,20 @@ export declare const CreateOrganizationSchema: z.ZodObject<{
64
142
  logo_dark: z.ZodDefault<z.ZodNullable<z.ZodString>>;
65
143
  logo_light: z.ZodDefault<z.ZodNullable<z.ZodString>>;
66
144
  long_name: z.ZodString;
145
+ organization_type: z.ZodDefault<z.ZodEnum<{
146
+ agency: "agency";
147
+ cim: "cim";
148
+ metropolitan_area: "metropolitan_area";
149
+ autonomous_region: "autonomous_region";
150
+ municipality: "municipality";
151
+ transport_authority: "transport_authority";
152
+ transport_network: "transport_network";
153
+ other: "other";
154
+ }>>;
67
155
  theme: z.ZodDefault<z.ZodNullable<z.ZodString>>;
68
156
  }, z.core.$strip>;
69
157
  export declare const UpdateOrganizationSchema: z.ZodObject<{
158
+ website_url: z.ZodOptional<z.ZodPreprocess<z.ZodDefault<z.ZodNullable<z.ZodURL>>, string | null | undefined>>;
70
159
  open_data: z.ZodOptional<z.ZodPreprocess<z.ZodPrefault<z.ZodObject<{
71
160
  enabled: z.ZodDefault<z.ZodBoolean>;
72
161
  plans: z.ZodPrefault<z.ZodObject<{
@@ -92,6 +181,70 @@ export declare const UpdateOrganizationSchema: z.ZodObject<{
92
181
  is_locked: z.ZodOptional<z.ZodPreprocess<z.ZodDefault<z.ZodBoolean>, boolean | undefined>>;
93
182
  updated_by: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>, string | undefined>>;
94
183
  agency_ids: z.ZodOptional<z.ZodPreprocess<z.ZodDefault<z.ZodArray<z.ZodString>>, string[] | undefined>>;
184
+ contacts: z.ZodOptional<z.ZodPreprocess<z.ZodDefault<z.ZodArray<z.ZodObject<{
185
+ _id: z.ZodOptional<z.ZodString>;
186
+ email: z.ZodOptional<z.ZodEmail>;
187
+ job_description: z.ZodDefault<z.ZodString>;
188
+ name: z.ZodString;
189
+ phone: z.ZodOptional<z.ZodString>;
190
+ }, z.core.$strip>>>, {
191
+ name: string;
192
+ _id?: string | undefined;
193
+ email?: string | undefined;
194
+ job_description?: string | undefined;
195
+ phone?: string | undefined;
196
+ }[] | undefined>>;
197
+ geojson: z.ZodOptional<z.ZodPreprocess<z.ZodDefault<z.ZodNullable<z.ZodObject<{
198
+ features: z.ZodDefault<z.ZodArray<z.ZodObject<{
199
+ geometry: z.ZodUnion<readonly [z.ZodObject<{
200
+ coordinates: z.ZodUnion<readonly [z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown]>>, z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number]>>]>;
201
+ type: z.ZodDefault<z.ZodLiteral<"Point">>;
202
+ }, z.core.$strip>, z.ZodObject<{
203
+ coordinates: z.ZodArray<z.ZodUnion<readonly [z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown]>>, z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number]>>]>>;
204
+ type: z.ZodDefault<z.ZodLiteral<"MultiPoint">>;
205
+ }, z.core.$strip>, z.ZodObject<{
206
+ coordinates: z.ZodArray<z.ZodUnion<readonly [z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown]>>, z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number]>>]>>;
207
+ type: z.ZodDefault<z.ZodLiteral<"LineString">>;
208
+ }, z.core.$strip>, z.ZodObject<{
209
+ coordinates: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown]>>, z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number]>>]>>>;
210
+ type: z.ZodDefault<z.ZodLiteral<"MultiLineString">>;
211
+ }, z.core.$strip>, z.ZodObject<{
212
+ coordinates: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown]>>, z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number]>>]>>>;
213
+ type: z.ZodDefault<z.ZodLiteral<"Polygon">>;
214
+ }, z.core.$strip>, z.ZodObject<{
215
+ coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson2dPosition, [unknown, unknown]>>, z.ZodType<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number], z.core.$ZodTypeInternals<import("@tmlmobilidade/go-types-geo").GeoJson3dPosition, [unknown, unknown, number]>>]>>>>;
216
+ type: z.ZodDefault<z.ZodLiteral<"MultiPolygon">>;
217
+ }, z.core.$strip>]>;
218
+ properties: z.ZodDefault<z.ZodNullable<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
219
+ type: z.ZodLiteral<"Feature">;
220
+ }, z.core.$strip>>>;
221
+ type: z.ZodDefault<z.ZodLiteral<"FeatureCollection">>;
222
+ }, z.core.$strip>>>, {
223
+ features?: {
224
+ geometry: {
225
+ coordinates: [unknown, unknown] | [unknown, unknown, number];
226
+ type?: "Point" | undefined;
227
+ } | {
228
+ coordinates: ([unknown, unknown] | [unknown, unknown, number])[];
229
+ type?: "MultiPoint" | undefined;
230
+ } | {
231
+ coordinates: ([unknown, unknown] | [unknown, unknown, number])[];
232
+ type?: "LineString" | undefined;
233
+ } | {
234
+ coordinates: ([unknown, unknown] | [unknown, unknown, number])[][];
235
+ type?: "MultiLineString" | undefined;
236
+ } | {
237
+ coordinates: ([unknown, unknown] | [unknown, unknown, number])[][];
238
+ type?: "Polygon" | undefined;
239
+ } | {
240
+ coordinates: ([unknown, unknown] | [unknown, unknown, number])[][][];
241
+ type?: "MultiPolygon" | undefined;
242
+ };
243
+ type: "Feature";
244
+ properties?: Record<string, unknown> | null | undefined;
245
+ }[] | undefined;
246
+ type?: "FeatureCollection" | undefined;
247
+ } | null | undefined>>;
95
248
  home_links: z.ZodOptional<z.ZodPreprocess<z.ZodDefault<z.ZodArray<z.ZodObject<{
96
249
  href: z.ZodString;
97
250
  icon: z.ZodString;
@@ -107,6 +260,16 @@ export declare const UpdateOrganizationSchema: z.ZodObject<{
107
260
  logo_dark: z.ZodOptional<z.ZodPreprocess<z.ZodDefault<z.ZodNullable<z.ZodString>>, string | null | undefined>>;
108
261
  logo_light: z.ZodOptional<z.ZodPreprocess<z.ZodDefault<z.ZodNullable<z.ZodString>>, string | null | undefined>>;
109
262
  long_name: z.ZodOptional<z.ZodPreprocess<z.ZodString, string>>;
263
+ organization_type: z.ZodOptional<z.ZodPreprocess<z.ZodDefault<z.ZodEnum<{
264
+ agency: "agency";
265
+ cim: "cim";
266
+ metropolitan_area: "metropolitan_area";
267
+ autonomous_region: "autonomous_region";
268
+ municipality: "municipality";
269
+ transport_authority: "transport_authority";
270
+ transport_network: "transport_network";
271
+ other: "other";
272
+ }>>, "agency" | "cim" | "metropolitan_area" | "autonomous_region" | "municipality" | "transport_authority" | "transport_network" | "other" | undefined>>;
110
273
  theme: z.ZodOptional<z.ZodPreprocess<z.ZodDefault<z.ZodNullable<z.ZodString>>, string | null | undefined>>;
111
274
  }, z.core.$strip>;
112
275
  export type Organization = z.infer<typeof OrganizationSchema>;
@@ -1,19 +1,26 @@
1
1
  /* * */
2
2
  import { HomeQuickLinkSchema } from '../home/quick-link.js';
3
+ import { GeoJsonFeatureCollectionSchema } from '@tmlmobilidade/go-types-geo';
3
4
  import { BaseDocumentSchema, partialWithoutDefaults } from '@tmlmobilidade/go-types-shared';
4
5
  import { z } from 'zod';
6
+ import { OrganizationContactSchema } from './contact.js';
5
7
  import { OrganizationOpenDataSchema } from './open-data.js';
8
+ import { OrganizationTypeSchema } from './type.js';
6
9
  /* * */
7
10
  export const OrganizationSchema = BaseDocumentSchema.extend({
8
11
  agency_ids: z.array(z.string()).default([]),
12
+ contacts: z.array(OrganizationContactSchema).default([]),
13
+ geojson: GeoJsonFeatureCollectionSchema().nullable().default(null),
9
14
  home_links: z.array(HomeQuickLinkSchema).default([]),
10
15
  home_wikis: z.array(z.string()).default([]),
11
16
  logo_dark: z.string().nullable().default(null),
12
17
  logo_light: z.string().nullable().default(null),
13
18
  long_name: z.string().min(1),
14
19
  open_data: OrganizationOpenDataSchema,
20
+ organization_type: OrganizationTypeSchema.default('other'),
15
21
  short_name: z.string().min(1).max(6),
16
22
  theme: z.string().nullable().default(null),
23
+ website_url: z.url().nullable().default(null),
17
24
  });
18
25
  export const CreateOrganizationSchema = OrganizationSchema.omit({ _id: true, created_at: true, updated_at: true });
19
26
  export const UpdateOrganizationSchema = partialWithoutDefaults(CreateOrganizationSchema.omit({ created_by: true }));
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ export declare const OrganizationTypeSchema: z.ZodEnum<{
3
+ agency: "agency";
4
+ cim: "cim";
5
+ metropolitan_area: "metropolitan_area";
6
+ autonomous_region: "autonomous_region";
7
+ municipality: "municipality";
8
+ transport_authority: "transport_authority";
9
+ transport_network: "transport_network";
10
+ other: "other";
11
+ }>;
12
+ export type OrganizationType = z.infer<typeof OrganizationTypeSchema>;
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ export const OrganizationTypeSchema = z.enum([
3
+ 'agency',
4
+ 'cim',
5
+ 'metropolitan_area',
6
+ 'autonomous_region',
7
+ 'municipality',
8
+ 'transport_authority',
9
+ 'transport_network',
10
+ 'other',
11
+ ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmlmobilidade/go-types-core",
3
- "version": "20261120.1734.34",
3
+ "version": "20261123.1627.51",
4
4
  "author": {
5
5
  "email": "iso@tmlmobilidade.pt",
6
6
  "name": "TML-ISO"
@@ -36,6 +36,7 @@
36
36
  "watch": "tsc-watch --onSuccess 'resolve-tspaths'"
37
37
  },
38
38
  "dependencies": {
39
+ "@tmlmobilidade/go-types-geo": "*",
39
40
  "@tmlmobilidade/go-types-operation": "*",
40
41
  "@tmlmobilidade/go-types-permissions": "*",
41
42
  "@tmlmobilidade/go-types-shared": "*",