@tmlmobilidade/types 20260717.1813.33 → 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.
- package/dist/app-configs/app-banner.d.ts +21 -0
- package/dist/app-configs/app-banner.js +12 -0
- package/dist/app-configs/app-config.d.ts +18 -0
- package/dist/app-configs/app-config.js +7 -0
- package/dist/app-configs/base.d.ts +29 -0
- package/dist/app-configs/base.js +7 -0
- package/dist/app-configs/index.d.ts +3 -0
- package/dist/app-configs/index.js +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/offer/route-path-type.d.ts +2 -2
- package/dist/offer/route.d.ts +6 -6
- package/package.json +1 -1
|
@@ -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,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>;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -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") => "
|
|
13
|
-
toGtfs: (value: "
|
|
12
|
+
fromGtfs: (value: "1" | "2" | "3") => "variant" | "partial" | "base";
|
|
13
|
+
toGtfs: (value: "variant" | "partial" | "base") => "1" | "2" | "3";
|
|
14
14
|
};
|
package/dist/offer/route.d.ts
CHANGED
|
@@ -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: "
|
|
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?: "
|
|
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: "
|
|
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?: "
|
|
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?: "
|
|
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?: "
|
|
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>;
|