@tmlmobilidade/types 20260717.1747.14 → 20260717.2210.46

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,21 @@
1
+ import { z } from 'zod';
2
+ export declare const APP_BANNER_CONFIG_ID = "app-banner";
3
+ export declare const AppBannerVariantSchema: z.ZodEnum<["danger", "info", "success", "warning"]>;
4
+ export declare const AppBannerSchema: z.ZodObject<{
5
+ _id: z.ZodLiteral<"app-banner">;
6
+ enabled: z.ZodDefault<z.ZodBoolean>;
7
+ title: z.ZodString;
8
+ variant: z.ZodDefault<z.ZodEnum<["danger", "info", "success", "warning"]>>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ _id: "app-banner";
11
+ title: string;
12
+ enabled: boolean;
13
+ variant: "danger" | "info" | "success" | "warning";
14
+ }, {
15
+ _id: "app-banner";
16
+ title: string;
17
+ enabled?: boolean | undefined;
18
+ variant?: "danger" | "info" | "success" | "warning" | undefined;
19
+ }>;
20
+ export type AppBanner = z.infer<typeof AppBannerSchema>;
21
+ export type AppBannerVariant = z.infer<typeof AppBannerVariantSchema>;
@@ -0,0 +1,12 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ export const APP_BANNER_CONFIG_ID = 'app-banner';
5
+ /* * */
6
+ export const AppBannerVariantSchema = z.enum(['danger', 'info', 'success', 'warning']);
7
+ export const AppBannerSchema = z.object({
8
+ _id: z.literal(APP_BANNER_CONFIG_ID),
9
+ enabled: z.boolean().default(false),
10
+ title: z.string(),
11
+ variant: AppBannerVariantSchema.default('info'),
12
+ });
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ export declare const AppConfigSchema: z.ZodDiscriminatedUnion<"_id", [z.ZodObject<{
3
+ _id: z.ZodLiteral<"app-banner">;
4
+ enabled: z.ZodDefault<z.ZodBoolean>;
5
+ title: z.ZodString;
6
+ variant: z.ZodDefault<z.ZodEnum<["danger", "info", "success", "warning"]>>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ _id: "app-banner";
9
+ title: string;
10
+ enabled: boolean;
11
+ variant: "danger" | "info" | "success" | "warning";
12
+ }, {
13
+ _id: "app-banner";
14
+ title: string;
15
+ enabled?: boolean | undefined;
16
+ variant?: "danger" | "info" | "success" | "warning" | undefined;
17
+ }>]>;
18
+ export type AppConfig = z.infer<typeof AppConfigSchema>;
@@ -0,0 +1,7 @@
1
+ /* * */
2
+ import { AppBannerSchema } from './app-banner.js';
3
+ import { z } from 'zod';
4
+ /* * */
5
+ export const AppConfigSchema = z.discriminatedUnion('_id', [
6
+ AppBannerSchema,
7
+ ]);
@@ -0,0 +1,29 @@
1
+ import { z } from 'zod';
2
+ export declare const AppConfigBaseSchema: z.ZodObject<{
3
+ created_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
4
+ created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
5
+ is_locked: z.ZodDefault<z.ZodBoolean>;
6
+ updated_at: z.ZodEffects<z.ZodNumber, import("@tmlmobilidade/go-types-shared").UnixTimestamp, number>;
7
+ updated_by: z.ZodOptional<z.ZodString>;
8
+ } & {
9
+ _id: z.ZodString;
10
+ }, "strip", z.ZodTypeAny, {
11
+ _id: string;
12
+ created_at: number & {
13
+ __brand: "UnixTimestamp";
14
+ };
15
+ created_by: string | null;
16
+ is_locked: boolean;
17
+ updated_at: number & {
18
+ __brand: "UnixTimestamp";
19
+ };
20
+ updated_by?: string | undefined;
21
+ }, {
22
+ _id: string;
23
+ created_at: number;
24
+ updated_at: number;
25
+ created_by?: string | null | undefined;
26
+ is_locked?: boolean | undefined;
27
+ updated_by?: string | undefined;
28
+ }>;
29
+ export type AppConfigBase = z.infer<typeof AppConfigBaseSchema>;
@@ -0,0 +1,7 @@
1
+ /* * */
2
+ import { DocumentSchema } from '@tmlmobilidade/go-types-shared';
3
+ import { z } from 'zod';
4
+ /* * */
5
+ export const AppConfigBaseSchema = DocumentSchema.extend({
6
+ _id: z.string(),
7
+ });
@@ -0,0 +1,3 @@
1
+ export * from './app-banner.js';
2
+ export * from './app-config.js';
3
+ export * from './base.js';
@@ -0,0 +1,3 @@
1
+ export * from './app-banner.js';
2
+ export * from './app-config.js';
3
+ export * from './base.js';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from './agencies/index.js';
2
2
  export * from './alerts/index.js';
3
3
  export * from './api/index.js';
4
+ export * from './app-configs/index.js';
4
5
  export * from './auth/index.js';
5
6
  export * from './calendar/index.js';
6
7
  export * from './dates/index.js';
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from './agencies/index.js';
2
2
  export * from './alerts/index.js';
3
3
  export * from './api/index.js';
4
+ export * from './app-configs/index.js';
4
5
  export * from './auth/index.js';
5
6
  export * from './calendar/index.js';
6
7
  export * from './dates/index.js';
@@ -9,6 +9,6 @@ export declare const RoutePathTypeValues: readonly ["base", "partial", "variant"
9
9
  export declare const RoutePathTypeSchema: z.ZodEnum<["base", "partial", "variant"]>;
10
10
  export type RoutePathType = z.infer<typeof RoutePathTypeSchema>;
11
11
  export declare const pathTypeMapper: {
12
- fromGtfs: (value: "1" | "2" | "3") => "partial" | "base" | "variant";
13
- toGtfs: (value: "partial" | "base" | "variant") => "1" | "2" | "3";
12
+ fromGtfs: (value: "1" | "2" | "3") => "variant" | "partial" | "base";
13
+ toGtfs: (value: "variant" | "partial" | "base") => "1" | "2" | "3";
14
14
  };
@@ -48,7 +48,7 @@ export declare const RouteSchema: z.ZodObject<{
48
48
  code: string;
49
49
  name: string;
50
50
  line_id: string;
51
- path_type: "partial" | "base" | "variant";
51
+ path_type: "variant" | "partial" | "base";
52
52
  updated_by?: string | undefined;
53
53
  patterns?: {
54
54
  _id: string;
@@ -67,7 +67,7 @@ export declare const RouteSchema: z.ZodObject<{
67
67
  created_by?: string | null | undefined;
68
68
  is_locked?: boolean | undefined;
69
69
  updated_by?: string | undefined;
70
- path_type?: "partial" | "base" | "variant" | undefined;
70
+ path_type?: "variant" | "partial" | "base" | undefined;
71
71
  patterns?: {
72
72
  _id: string;
73
73
  code: string;
@@ -126,7 +126,7 @@ export declare const CreateRouteSchema: z.ZodObject<Omit<{
126
126
  code: string;
127
127
  name: string;
128
128
  line_id: string;
129
- path_type: "partial" | "base" | "variant";
129
+ path_type: "variant" | "partial" | "base";
130
130
  updated_by?: string | undefined;
131
131
  }, {
132
132
  code: string;
@@ -135,7 +135,7 @@ export declare const CreateRouteSchema: z.ZodObject<Omit<{
135
135
  created_by?: string | null | undefined;
136
136
  is_locked?: boolean | undefined;
137
137
  updated_by?: string | undefined;
138
- path_type?: "partial" | "base" | "variant" | undefined;
138
+ path_type?: "variant" | "partial" | "base" | undefined;
139
139
  }>;
140
140
  export declare const UpdateRouteSchema: z.ZodObject<{
141
141
  is_locked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
@@ -150,14 +150,14 @@ export declare const UpdateRouteSchema: z.ZodObject<{
150
150
  code?: string | undefined;
151
151
  name?: string | undefined;
152
152
  line_id?: string | undefined;
153
- path_type?: "partial" | "base" | "variant" | undefined;
153
+ path_type?: "variant" | "partial" | "base" | undefined;
154
154
  }, {
155
155
  is_locked?: boolean | undefined;
156
156
  updated_by?: string | undefined;
157
157
  code?: string | undefined;
158
158
  name?: string | undefined;
159
159
  line_id?: string | undefined;
160
- path_type?: "partial" | "base" | "variant" | undefined;
160
+ path_type?: "variant" | "partial" | "base" | undefined;
161
161
  }>;
162
162
  export type Route = z.infer<typeof RouteSchema>;
163
163
  export type CreateRouteDto = z.infer<typeof CreateRouteSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmlmobilidade/types",
3
- "version": "20260717.1747.14",
3
+ "version": "20260717.2210.46",
4
4
  "author": {
5
5
  "email": "iso@tmlmobilidade.pt",
6
6
  "name": "TML-ISO"