@tmlmobilidade/types 20251103.1255.55 → 20251202.1817.5
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/{src/_common → _common}/index.d.ts +4 -2
- package/dist/{src/_common → _common}/index.js +4 -2
- package/dist/_common/mongo.d.ts +3 -0
- package/dist/_common/status.d.ts +13 -0
- package/dist/_common/status.js +20 -0
- package/dist/_common/utility.js +1 -0
- package/dist/{src/agency.d.ts → agency.d.ts} +4 -15
- package/dist/{src/agency.js → agency.js} +1 -6
- package/dist/{src/alert.d.ts → alert.d.ts} +20 -21
- package/dist/{src/alert.js → alert.js} +8 -14
- package/dist/{src/simplified-apex → apex}/simplified-apex-validation.d.ts +20 -20
- package/dist/{src/auth → auth}/index.d.ts +1 -1
- package/dist/{src/auth → auth}/index.js +1 -1
- package/dist/{src/auth → auth}/password-requirements.js +2 -1
- package/dist/auth/role.d.ts +958 -0
- package/dist/{src/auth → auth}/role.js +2 -2
- package/dist/{src/auth → auth}/session.d.ts +13 -9
- package/dist/{src/auth → auth}/session.js +1 -1
- package/dist/auth/user.d.ts +1281 -0
- package/dist/{src/auth → auth}/user.js +11 -14
- package/dist/{src/file-exports → file-exports}/common.d.ts +9 -8
- package/dist/{src/file-exports → file-exports}/common.js +1 -1
- package/dist/file-exports/index.d.ts +121 -0
- package/dist/file-exports/ride-export.d.ts +410 -0
- package/dist/file-exports/ride-export.js +131 -0
- package/dist/{src/file.d.ts → file.d.ts} +18 -18
- package/dist/gtfs/agency.d.ts +30 -0
- package/dist/gtfs/agency.js +13 -0
- package/dist/gtfs/feed-info.d.ts +33 -0
- package/dist/{src/gtfs.js → gtfs/feed-info.js} +1 -11
- package/dist/{src/gtfs → gtfs}/index.d.ts +3 -0
- package/dist/{src/gtfs → gtfs}/index.js +3 -0
- package/dist/gtfs/service-alert.d.ts +26 -0
- package/dist/index.d.ts +22 -22
- package/dist/index.js +22 -22
- package/dist/locations/census.d.ts +211 -0
- package/dist/locations/census.js +2 -0
- package/dist/locations/district.d.ts +24 -0
- package/dist/locations/district.js +2 -0
- package/dist/locations/index.d.ts +6 -0
- package/dist/locations/index.js +6 -0
- package/dist/locations/locality.d.ts +27 -0
- package/dist/locations/locality.js +2 -0
- package/dist/locations/municipality.d.ts +25 -0
- package/dist/locations/municipality.js +2 -0
- package/dist/locations/parish.d.ts +26 -0
- package/dist/locations/parish.js +2 -0
- package/dist/locations/queries.d.ts +117 -0
- package/dist/{src/locations.js → locations/queries.js} +5 -16
- package/dist/metrics/demand/demand_by_agency.d.ts +210 -0
- package/dist/metrics/demand/demand_by_agency.js +39 -0
- package/dist/metrics/demand/demand_by_category.d.ts +475 -0
- package/dist/metrics/demand/demand_by_category.js +114 -0
- package/dist/metrics/demand/demand_by_line.d.ts +246 -0
- package/dist/metrics/demand/demand_by_line.js +56 -0
- package/dist/metrics/demand/demand_by_pattern.d.ts +332 -0
- package/dist/metrics/demand/demand_by_pattern.js +56 -0
- package/dist/metrics/demand/demand_by_product.d.ts +475 -0
- package/dist/metrics/demand/demand_by_product.js +114 -0
- package/dist/metrics/demand/index.d.ts +6 -0
- package/dist/metrics/demand/index.js +8 -0
- package/dist/metrics/demand/records.d.ts +320 -0
- package/dist/metrics/demand/records.js +53 -0
- package/dist/metrics/index.d.ts +2647 -0
- package/dist/metrics/index.js +48 -0
- package/dist/metrics/realtime.d.ts +667 -0
- package/dist/metrics/realtime.js +41 -0
- package/dist/{src/notification.d.ts → notification.d.ts} +4 -4
- package/dist/{src/organization.d.ts → organization.d.ts} +32 -32
- package/dist/{src/organization.js → organization.js} +7 -7
- package/dist/permissions/agencies.d.ts +12 -0
- package/dist/permissions/agencies.js +13 -0
- package/dist/permissions/alerts.d.ts +36 -0
- package/dist/permissions/alerts.js +25 -0
- package/dist/permissions/controller.d.ts +36 -0
- package/dist/permissions/controller.js +30 -0
- package/dist/permissions/gtfs-validations.d.ts +25 -0
- package/dist/permissions/gtfs-validations.js +14 -0
- package/dist/permissions/home.d.ts +12 -0
- package/dist/permissions/home.js +10 -0
- package/dist/permissions/index.d.ts +268 -0
- package/dist/permissions/index.js +149 -0
- package/dist/permissions/organizations.d.ts +12 -0
- package/dist/permissions/organizations.js +12 -0
- package/dist/permissions/performance.d.ts +12 -0
- package/dist/permissions/performance.js +9 -0
- package/dist/permissions/plans.d.ts +25 -0
- package/dist/permissions/plans.js +22 -0
- package/dist/permissions/roles.d.ts +12 -0
- package/dist/permissions/roles.js +12 -0
- package/dist/permissions/stops.d.ts +30 -0
- package/dist/permissions/stops.js +17 -0
- package/dist/permissions/users.d.ts +12 -0
- package/dist/permissions/users.js +12 -0
- package/dist/{src/plans → plans}/gtfs-validation.d.ts +55 -63
- package/dist/{src/plans → plans}/gtfs-validation.js +3 -6
- package/dist/plans/plan-app-status.d.ts +15 -0
- package/dist/plans/plan-app-status.js +10 -0
- package/dist/{src/plans → plans}/plan.d.ts +240 -104
- package/dist/{src/plans → plans}/plan.js +8 -10
- package/dist/{src/_common/proposed-change.d.ts → proposed-change.d.ts} +21 -22
- package/dist/{src/_common/proposed-change.js → proposed-change.js} +5 -7
- package/dist/{src/rides → rides}/index.d.ts +1 -0
- package/dist/{src/rides → rides}/index.js +1 -0
- package/dist/{src/rides → rides}/ride-acceptance.d.ts +65 -65
- package/dist/{src/rides → rides}/ride-analysis.d.ts +34 -34
- package/dist/{src/rides → rides}/ride-audit.d.ts +10 -10
- package/dist/rides/ride-normalized.d.ts +29 -0
- package/dist/rides/ride-normalized.js +2 -0
- package/dist/{src/rides → rides}/ride.d.ts +523 -567
- package/dist/{src/rides → rides}/ride.js +2 -16
- package/dist/{src/sams → sams}/sam-analysis.d.ts +11 -11
- package/dist/{src/sams → sams}/sam-analysis.js +4 -4
- package/dist/{src/sams → sams}/sam.d.ts +76 -76
- package/dist/{src/sams → sams}/sam.js +1 -1
- package/dist/{src/stop.d.ts → stop.d.ts} +32 -43
- package/dist/{src/stop.js → stop.js} +3 -8
- package/dist/vehicle-events/gtfs-rt-vehicle-event-extended.d.ts +77 -0
- package/dist/vehicle-events/gtfs-rt-vehicle-event-extended.js +21 -0
- package/dist/vehicle-events/index.d.ts +2 -0
- package/dist/vehicle-events/index.js +2 -0
- package/dist/{src/vehicle-event.d.ts → vehicle-events/simplified-vehicle-event.d.ts} +9 -9
- package/dist/{src/vehicle-event.js → vehicle-events/simplified-vehicle-event.js} +3 -3
- package/dist/wiki.js +2 -0
- package/dist/{src/zone.d.ts → zone.d.ts} +2 -16
- package/dist/{src/zone.js → zone.js} +0 -6
- package/package.json +18 -21
- package/README.md +0 -13
- package/dist/src/_common/email.d.ts +0 -4
- package/dist/src/_common/email.js +0 -7
- package/dist/src/auth/permission.d.ts +0 -19
- package/dist/src/auth/permission.js +0 -8
- package/dist/src/auth/role.d.ts +0 -127
- package/dist/src/auth/user.d.ts +0 -311
- package/dist/src/file-exports/index.d.ts +0 -121
- package/dist/src/file-exports/ride-export.d.ts +0 -407
- package/dist/src/file-exports/ride-export.js +0 -120
- package/dist/src/gtfs.d.ts +0 -88
- package/dist/src/locations.d.ts +0 -319
- package/dist/src/metrics/demand.d.ts +0 -803
- package/dist/src/metrics/demand.js +0 -153
- package/dist/src/metrics/index.d.ts +0 -806
- package/dist/src/metrics/index.js +0 -19
- package/dist/src/plans/plan-controller.d.ts +0 -15
- package/dist/src/plans/plan-controller.js +0 -10
- package/dist/src/system/index.d.ts +0 -2
- package/dist/src/system/index.js +0 -2
- package/dist/src/system/processing-status.d.ts +0 -9
- package/dist/src/system/processing-status.js +0 -5
- package/dist/{src/_common → _common}/comment.d.ts +8 -8
- package/dist/{src/_common → _common}/comment.js +0 -0
- package/dist/{src/_common → _common}/document.d.ts +0 -0
- package/dist/{src/_common → _common}/document.js +0 -0
- package/dist/{src/system → _common}/environment.d.ts +0 -0
- package/dist/{src/system → _common}/environment.js +0 -0
- package/dist/{src/_common → _common}/fastify.d.ts +0 -0
- package/dist/{src/_common → _common}/fastify.js +0 -0
- package/dist/{src/_common/utility.js → _common/mongo.js} +0 -0
- package/dist/{src/_common → _common}/operational-date.d.ts +0 -0
- package/dist/{src/_common → _common}/operational-date.js +0 -0
- package/dist/{src/_common → _common}/unix-timestamp.d.ts +0 -0
- package/dist/{src/_common → _common}/unix-timestamp.js +0 -0
- package/dist/{src/_common → _common}/utility.d.ts +0 -0
- package/dist/{src/simplified-apex → apex}/index.d.ts +0 -0
- package/dist/{src/simplified-apex → apex}/index.js +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-inspection-decision.d.ts +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-inspection-decision.js +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-inspection.d.ts +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-inspection.js +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-location.d.ts +16 -16
- package/dist/{src/simplified-apex → apex}/simplified-apex-location.js +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-on-board-refund.d.ts +20 -20
- package/dist/{src/simplified-apex → apex}/simplified-apex-on-board-refund.js +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-on-board-sale.d.ts +25 -25
- package/dist/{src/simplified-apex → apex}/simplified-apex-on-board-sale.js +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-type.d.ts +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-type.js +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-validation.js +0 -0
- package/dist/{src/auth → auth}/login.d.ts +0 -0
- package/dist/{src/auth → auth}/login.js +0 -0
- package/dist/{src/auth → auth}/password-requirements.d.ts +0 -0
- package/dist/{src/auth → auth}/verification-token.d.ts +0 -0
- package/dist/{src/auth → auth}/verification-token.js +0 -0
- package/dist/{src/file-exports → file-exports}/index.js +0 -0
- package/dist/{src/file.js → file.js} +0 -0
- package/dist/{src/gtfs → gtfs}/calendar-dates.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/calendar-dates.js +0 -0
- package/dist/{src/gtfs → gtfs}/calendar.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/calendar.js +0 -0
- package/dist/{src/gtfs → gtfs}/cause-effetcs.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/cause-effetcs.js +0 -0
- package/dist/{src/gtfs → gtfs}/common.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/common.js +0 -0
- package/dist/{src/gtfs → gtfs}/routes.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/routes.js +0 -0
- package/dist/{src/pcgi/pcgi-apex-location.js → gtfs/service-alert.js} +0 -0
- package/dist/{src/gtfs → gtfs}/shapes.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/shapes.js +0 -0
- package/dist/{src/gtfs → gtfs}/stop-times.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/stop-times.js +0 -0
- package/dist/{src/gtfs → gtfs}/stops.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/stops.js +0 -0
- package/dist/{src/gtfs → gtfs}/trips.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/trips.js +0 -0
- package/dist/{src/metrics → metrics}/common.d.ts +0 -0
- package/dist/{src/metrics → metrics}/common.js +0 -0
- package/dist/{src/notification.js → notification.js} +0 -0
- package/dist/{src/pcgi → pcgi}/index.d.ts +0 -0
- package/dist/{src/pcgi → pcgi}/index.js +0 -0
- package/dist/{src/pcgi → pcgi}/pcgi-apex-location.d.ts +0 -0
- package/dist/{src/pcgi/pcgi-apex-refund.js → pcgi/pcgi-apex-location.js} +0 -0
- package/dist/{src/pcgi → pcgi}/pcgi-apex-refund.d.ts +0 -0
- package/dist/{src/pcgi/pcgi-apex-sale.js → pcgi/pcgi-apex-refund.js} +0 -0
- package/dist/{src/pcgi → pcgi}/pcgi-apex-sale.d.ts +0 -0
- package/dist/{src/pcgi/pcgi-apex-validation.js → pcgi/pcgi-apex-sale.js} +0 -0
- package/dist/{src/pcgi → pcgi}/pcgi-apex-validation.d.ts +0 -0
- package/dist/{src/pcgi/pcgi-transaction-entity.js → pcgi/pcgi-apex-validation.js} +0 -0
- package/dist/{src/pcgi → pcgi}/pcgi-transaction-entity.d.ts +0 -0
- package/dist/{src/rides/hashed-shape.js → pcgi/pcgi-transaction-entity.js} +0 -0
- package/dist/{src/plans → plans}/index.d.ts +0 -0
- package/dist/{src/plans → plans}/index.js +0 -0
- package/dist/{src/plans → plans}/plan-pcgi-legacy.d.ts +0 -0
- package/dist/{src/plans → plans}/plan-pcgi-legacy.js +0 -0
- package/dist/{src/rides → rides}/hashed-shape.d.ts +0 -0
- package/dist/{src/rides/hashed-trip.js → rides/hashed-shape.js} +0 -0
- package/dist/{src/rides → rides}/hashed-trip.d.ts +0 -0
- package/dist/{src/wiki.js → rides/hashed-trip.js} +0 -0
- package/dist/{src/rides → rides}/ride-acceptance.js +1 -1
- /package/dist/{src/rides → rides}/ride-analysis.js +0 -0
- /package/dist/{src/rides → rides}/ride-audit.js +0 -0
- /package/dist/{src/rides → rides}/ride-overrides.d.ts +0 -0
- /package/dist/{src/rides → rides}/ride-overrides.js +0 -0
- /package/dist/{src/sams → sams}/index.d.ts +0 -0
- /package/dist/{src/sams → sams}/index.js +0 -0
- /package/dist/{src/wiki.d.ts → wiki.d.ts} +0 -0
|
@@ -0,0 +1,475 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const DemandByProductByAgencyByDaySchema: z.ZodObject<{
|
|
3
|
+
description: z.ZodOptional<z.ZodString>;
|
|
4
|
+
generated_at: z.ZodDate;
|
|
5
|
+
} & {
|
|
6
|
+
data: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
7
|
+
day_type: z.ZodEnum<["1", "2", "3"]>;
|
|
8
|
+
holiday: z.ZodEnum<["0", "1"]>;
|
|
9
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
10
|
+
period: z.ZodEnum<["1", "2", "3"]>;
|
|
11
|
+
qty: z.ZodNumber;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
qty: number;
|
|
14
|
+
day_type: "1" | "2" | "3";
|
|
15
|
+
holiday: "0" | "1";
|
|
16
|
+
notes: string | null;
|
|
17
|
+
period: "1" | "2" | "3";
|
|
18
|
+
}, {
|
|
19
|
+
qty: number;
|
|
20
|
+
day_type: "1" | "2" | "3";
|
|
21
|
+
holiday: "0" | "1";
|
|
22
|
+
notes: string | null;
|
|
23
|
+
period: "1" | "2" | "3";
|
|
24
|
+
}>>;
|
|
25
|
+
metric: z.ZodLiteral<"demand_by_product_by_agency_by_day">;
|
|
26
|
+
properties: z.ZodObject<{
|
|
27
|
+
agency_id: z.ZodString;
|
|
28
|
+
product_id: z.ZodString;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
agency_id: string;
|
|
31
|
+
product_id: string;
|
|
32
|
+
}, {
|
|
33
|
+
agency_id: string;
|
|
34
|
+
product_id: string;
|
|
35
|
+
}>;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
properties: {
|
|
38
|
+
agency_id: string;
|
|
39
|
+
product_id: string;
|
|
40
|
+
};
|
|
41
|
+
generated_at: Date;
|
|
42
|
+
metric: "demand_by_product_by_agency_by_day";
|
|
43
|
+
data: Record<string, {
|
|
44
|
+
qty: number;
|
|
45
|
+
day_type: "1" | "2" | "3";
|
|
46
|
+
holiday: "0" | "1";
|
|
47
|
+
notes: string | null;
|
|
48
|
+
period: "1" | "2" | "3";
|
|
49
|
+
}>;
|
|
50
|
+
description?: string | undefined;
|
|
51
|
+
}, {
|
|
52
|
+
properties: {
|
|
53
|
+
agency_id: string;
|
|
54
|
+
product_id: string;
|
|
55
|
+
};
|
|
56
|
+
generated_at: Date;
|
|
57
|
+
metric: "demand_by_product_by_agency_by_day";
|
|
58
|
+
data: Record<string, {
|
|
59
|
+
qty: number;
|
|
60
|
+
day_type: "1" | "2" | "3";
|
|
61
|
+
holiday: "0" | "1";
|
|
62
|
+
notes: string | null;
|
|
63
|
+
period: "1" | "2" | "3";
|
|
64
|
+
}>;
|
|
65
|
+
description?: string | undefined;
|
|
66
|
+
}>;
|
|
67
|
+
export declare const DemandByProductByAgencyByMonthSchema: z.ZodObject<{
|
|
68
|
+
description: z.ZodOptional<z.ZodString>;
|
|
69
|
+
generated_at: z.ZodDate;
|
|
70
|
+
} & {
|
|
71
|
+
data: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
72
|
+
qty: z.ZodNumber;
|
|
73
|
+
}, "strip", z.ZodTypeAny, {
|
|
74
|
+
qty: number;
|
|
75
|
+
}, {
|
|
76
|
+
qty: number;
|
|
77
|
+
}>>;
|
|
78
|
+
metric: z.ZodLiteral<"demand_by_product_by_agency_by_month">;
|
|
79
|
+
properties: z.ZodObject<{
|
|
80
|
+
agency_id: z.ZodString;
|
|
81
|
+
product_id: z.ZodString;
|
|
82
|
+
}, "strip", z.ZodTypeAny, {
|
|
83
|
+
agency_id: string;
|
|
84
|
+
product_id: string;
|
|
85
|
+
}, {
|
|
86
|
+
agency_id: string;
|
|
87
|
+
product_id: string;
|
|
88
|
+
}>;
|
|
89
|
+
}, "strip", z.ZodTypeAny, {
|
|
90
|
+
properties: {
|
|
91
|
+
agency_id: string;
|
|
92
|
+
product_id: string;
|
|
93
|
+
};
|
|
94
|
+
generated_at: Date;
|
|
95
|
+
metric: "demand_by_product_by_agency_by_month";
|
|
96
|
+
data: Record<string, {
|
|
97
|
+
qty: number;
|
|
98
|
+
}>;
|
|
99
|
+
description?: string | undefined;
|
|
100
|
+
}, {
|
|
101
|
+
properties: {
|
|
102
|
+
agency_id: string;
|
|
103
|
+
product_id: string;
|
|
104
|
+
};
|
|
105
|
+
generated_at: Date;
|
|
106
|
+
metric: "demand_by_product_by_agency_by_month";
|
|
107
|
+
data: Record<string, {
|
|
108
|
+
qty: number;
|
|
109
|
+
}>;
|
|
110
|
+
description?: string | undefined;
|
|
111
|
+
}>;
|
|
112
|
+
export declare const DemandByProductByAgencyByYearSchema: z.ZodObject<{
|
|
113
|
+
description: z.ZodOptional<z.ZodString>;
|
|
114
|
+
generated_at: z.ZodDate;
|
|
115
|
+
} & {
|
|
116
|
+
data: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
117
|
+
qty: z.ZodNumber;
|
|
118
|
+
}, "strip", z.ZodTypeAny, {
|
|
119
|
+
qty: number;
|
|
120
|
+
}, {
|
|
121
|
+
qty: number;
|
|
122
|
+
}>>;
|
|
123
|
+
metric: z.ZodLiteral<"demand_by_product_by_agency_by_year">;
|
|
124
|
+
properties: z.ZodObject<{
|
|
125
|
+
agency_id: z.ZodString;
|
|
126
|
+
product_id: z.ZodString;
|
|
127
|
+
}, "strip", z.ZodTypeAny, {
|
|
128
|
+
agency_id: string;
|
|
129
|
+
product_id: string;
|
|
130
|
+
}, {
|
|
131
|
+
agency_id: string;
|
|
132
|
+
product_id: string;
|
|
133
|
+
}>;
|
|
134
|
+
}, "strip", z.ZodTypeAny, {
|
|
135
|
+
properties: {
|
|
136
|
+
agency_id: string;
|
|
137
|
+
product_id: string;
|
|
138
|
+
};
|
|
139
|
+
generated_at: Date;
|
|
140
|
+
metric: "demand_by_product_by_agency_by_year";
|
|
141
|
+
data: Record<string, {
|
|
142
|
+
qty: number;
|
|
143
|
+
}>;
|
|
144
|
+
description?: string | undefined;
|
|
145
|
+
}, {
|
|
146
|
+
properties: {
|
|
147
|
+
agency_id: string;
|
|
148
|
+
product_id: string;
|
|
149
|
+
};
|
|
150
|
+
generated_at: Date;
|
|
151
|
+
metric: "demand_by_product_by_agency_by_year";
|
|
152
|
+
data: Record<string, {
|
|
153
|
+
qty: number;
|
|
154
|
+
}>;
|
|
155
|
+
description?: string | undefined;
|
|
156
|
+
}>;
|
|
157
|
+
export declare const DemandByProductByLineByDaySchema: z.ZodObject<{
|
|
158
|
+
description: z.ZodOptional<z.ZodString>;
|
|
159
|
+
generated_at: z.ZodDate;
|
|
160
|
+
} & {
|
|
161
|
+
data: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
162
|
+
day_type: z.ZodEnum<["1", "2", "3"]>;
|
|
163
|
+
holiday: z.ZodEnum<["0", "1"]>;
|
|
164
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
165
|
+
period: z.ZodEnum<["1", "2", "3"]>;
|
|
166
|
+
qty: z.ZodNumber;
|
|
167
|
+
}, "strip", z.ZodTypeAny, {
|
|
168
|
+
qty: number;
|
|
169
|
+
day_type: "1" | "2" | "3";
|
|
170
|
+
holiday: "0" | "1";
|
|
171
|
+
notes: string | null;
|
|
172
|
+
period: "1" | "2" | "3";
|
|
173
|
+
}, {
|
|
174
|
+
qty: number;
|
|
175
|
+
day_type: "1" | "2" | "3";
|
|
176
|
+
holiday: "0" | "1";
|
|
177
|
+
notes: string | null;
|
|
178
|
+
period: "1" | "2" | "3";
|
|
179
|
+
}>>;
|
|
180
|
+
metric: z.ZodLiteral<"demand_by_product_by_line_by_day">;
|
|
181
|
+
properties: z.ZodObject<{
|
|
182
|
+
line_id: z.ZodString;
|
|
183
|
+
product_id: z.ZodString;
|
|
184
|
+
}, "strip", z.ZodTypeAny, {
|
|
185
|
+
line_id: string;
|
|
186
|
+
product_id: string;
|
|
187
|
+
}, {
|
|
188
|
+
line_id: string;
|
|
189
|
+
product_id: string;
|
|
190
|
+
}>;
|
|
191
|
+
}, "strip", z.ZodTypeAny, {
|
|
192
|
+
properties: {
|
|
193
|
+
line_id: string;
|
|
194
|
+
product_id: string;
|
|
195
|
+
};
|
|
196
|
+
generated_at: Date;
|
|
197
|
+
metric: "demand_by_product_by_line_by_day";
|
|
198
|
+
data: Record<string, {
|
|
199
|
+
qty: number;
|
|
200
|
+
day_type: "1" | "2" | "3";
|
|
201
|
+
holiday: "0" | "1";
|
|
202
|
+
notes: string | null;
|
|
203
|
+
period: "1" | "2" | "3";
|
|
204
|
+
}>;
|
|
205
|
+
description?: string | undefined;
|
|
206
|
+
}, {
|
|
207
|
+
properties: {
|
|
208
|
+
line_id: string;
|
|
209
|
+
product_id: string;
|
|
210
|
+
};
|
|
211
|
+
generated_at: Date;
|
|
212
|
+
metric: "demand_by_product_by_line_by_day";
|
|
213
|
+
data: Record<string, {
|
|
214
|
+
qty: number;
|
|
215
|
+
day_type: "1" | "2" | "3";
|
|
216
|
+
holiday: "0" | "1";
|
|
217
|
+
notes: string | null;
|
|
218
|
+
period: "1" | "2" | "3";
|
|
219
|
+
}>;
|
|
220
|
+
description?: string | undefined;
|
|
221
|
+
}>;
|
|
222
|
+
export declare const DemandByProductByLineByMonthSchema: z.ZodObject<{
|
|
223
|
+
description: z.ZodOptional<z.ZodString>;
|
|
224
|
+
generated_at: z.ZodDate;
|
|
225
|
+
} & {
|
|
226
|
+
data: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
227
|
+
qty: z.ZodNumber;
|
|
228
|
+
}, "strip", z.ZodTypeAny, {
|
|
229
|
+
qty: number;
|
|
230
|
+
}, {
|
|
231
|
+
qty: number;
|
|
232
|
+
}>>;
|
|
233
|
+
metric: z.ZodLiteral<"demand_by_product_by_line_by_month">;
|
|
234
|
+
properties: z.ZodObject<{
|
|
235
|
+
line_id: z.ZodString;
|
|
236
|
+
product_id: z.ZodString;
|
|
237
|
+
}, "strip", z.ZodTypeAny, {
|
|
238
|
+
line_id: string;
|
|
239
|
+
product_id: string;
|
|
240
|
+
}, {
|
|
241
|
+
line_id: string;
|
|
242
|
+
product_id: string;
|
|
243
|
+
}>;
|
|
244
|
+
}, "strip", z.ZodTypeAny, {
|
|
245
|
+
properties: {
|
|
246
|
+
line_id: string;
|
|
247
|
+
product_id: string;
|
|
248
|
+
};
|
|
249
|
+
generated_at: Date;
|
|
250
|
+
metric: "demand_by_product_by_line_by_month";
|
|
251
|
+
data: Record<string, {
|
|
252
|
+
qty: number;
|
|
253
|
+
}>;
|
|
254
|
+
description?: string | undefined;
|
|
255
|
+
}, {
|
|
256
|
+
properties: {
|
|
257
|
+
line_id: string;
|
|
258
|
+
product_id: string;
|
|
259
|
+
};
|
|
260
|
+
generated_at: Date;
|
|
261
|
+
metric: "demand_by_product_by_line_by_month";
|
|
262
|
+
data: Record<string, {
|
|
263
|
+
qty: number;
|
|
264
|
+
}>;
|
|
265
|
+
description?: string | undefined;
|
|
266
|
+
}>;
|
|
267
|
+
export declare const DemandByProductByLineByYearSchema: z.ZodObject<{
|
|
268
|
+
description: z.ZodOptional<z.ZodString>;
|
|
269
|
+
generated_at: z.ZodDate;
|
|
270
|
+
} & {
|
|
271
|
+
data: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
272
|
+
qty: z.ZodNumber;
|
|
273
|
+
}, "strip", z.ZodTypeAny, {
|
|
274
|
+
qty: number;
|
|
275
|
+
}, {
|
|
276
|
+
qty: number;
|
|
277
|
+
}>>;
|
|
278
|
+
metric: z.ZodLiteral<"demand_by_product_by_line_by_year">;
|
|
279
|
+
properties: z.ZodObject<{
|
|
280
|
+
line_id: z.ZodString;
|
|
281
|
+
product_id: z.ZodString;
|
|
282
|
+
}, "strip", z.ZodTypeAny, {
|
|
283
|
+
line_id: string;
|
|
284
|
+
product_id: string;
|
|
285
|
+
}, {
|
|
286
|
+
line_id: string;
|
|
287
|
+
product_id: string;
|
|
288
|
+
}>;
|
|
289
|
+
}, "strip", z.ZodTypeAny, {
|
|
290
|
+
properties: {
|
|
291
|
+
line_id: string;
|
|
292
|
+
product_id: string;
|
|
293
|
+
};
|
|
294
|
+
generated_at: Date;
|
|
295
|
+
metric: "demand_by_product_by_line_by_year";
|
|
296
|
+
data: Record<string, {
|
|
297
|
+
qty: number;
|
|
298
|
+
}>;
|
|
299
|
+
description?: string | undefined;
|
|
300
|
+
}, {
|
|
301
|
+
properties: {
|
|
302
|
+
line_id: string;
|
|
303
|
+
product_id: string;
|
|
304
|
+
};
|
|
305
|
+
generated_at: Date;
|
|
306
|
+
metric: "demand_by_product_by_line_by_year";
|
|
307
|
+
data: Record<string, {
|
|
308
|
+
qty: number;
|
|
309
|
+
}>;
|
|
310
|
+
description?: string | undefined;
|
|
311
|
+
}>;
|
|
312
|
+
export declare const DemandByProductByPatternByDaySchema: z.ZodObject<{
|
|
313
|
+
description: z.ZodOptional<z.ZodString>;
|
|
314
|
+
generated_at: z.ZodDate;
|
|
315
|
+
} & {
|
|
316
|
+
data: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
317
|
+
day_type: z.ZodEnum<["1", "2", "3"]>;
|
|
318
|
+
holiday: z.ZodBoolean;
|
|
319
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
320
|
+
period: z.ZodEnum<["1", "2", "3"]>;
|
|
321
|
+
qty: z.ZodNumber;
|
|
322
|
+
}, "strip", z.ZodTypeAny, {
|
|
323
|
+
qty: number;
|
|
324
|
+
day_type: "1" | "2" | "3";
|
|
325
|
+
holiday: boolean;
|
|
326
|
+
notes: string | null;
|
|
327
|
+
period: "1" | "2" | "3";
|
|
328
|
+
}, {
|
|
329
|
+
qty: number;
|
|
330
|
+
day_type: "1" | "2" | "3";
|
|
331
|
+
holiday: boolean;
|
|
332
|
+
notes: string | null;
|
|
333
|
+
period: "1" | "2" | "3";
|
|
334
|
+
}>>;
|
|
335
|
+
metric: z.ZodLiteral<"demand_by_product_by_pattern_by_day">;
|
|
336
|
+
properties: z.ZodObject<{
|
|
337
|
+
pattern_id: z.ZodString;
|
|
338
|
+
product_id: z.ZodString;
|
|
339
|
+
}, "strip", z.ZodTypeAny, {
|
|
340
|
+
pattern_id: string;
|
|
341
|
+
product_id: string;
|
|
342
|
+
}, {
|
|
343
|
+
pattern_id: string;
|
|
344
|
+
product_id: string;
|
|
345
|
+
}>;
|
|
346
|
+
}, "strip", z.ZodTypeAny, {
|
|
347
|
+
properties: {
|
|
348
|
+
pattern_id: string;
|
|
349
|
+
product_id: string;
|
|
350
|
+
};
|
|
351
|
+
generated_at: Date;
|
|
352
|
+
metric: "demand_by_product_by_pattern_by_day";
|
|
353
|
+
data: Record<string, {
|
|
354
|
+
qty: number;
|
|
355
|
+
day_type: "1" | "2" | "3";
|
|
356
|
+
holiday: boolean;
|
|
357
|
+
notes: string | null;
|
|
358
|
+
period: "1" | "2" | "3";
|
|
359
|
+
}>;
|
|
360
|
+
description?: string | undefined;
|
|
361
|
+
}, {
|
|
362
|
+
properties: {
|
|
363
|
+
pattern_id: string;
|
|
364
|
+
product_id: string;
|
|
365
|
+
};
|
|
366
|
+
generated_at: Date;
|
|
367
|
+
metric: "demand_by_product_by_pattern_by_day";
|
|
368
|
+
data: Record<string, {
|
|
369
|
+
qty: number;
|
|
370
|
+
day_type: "1" | "2" | "3";
|
|
371
|
+
holiday: boolean;
|
|
372
|
+
notes: string | null;
|
|
373
|
+
period: "1" | "2" | "3";
|
|
374
|
+
}>;
|
|
375
|
+
description?: string | undefined;
|
|
376
|
+
}>;
|
|
377
|
+
export declare const DemandByProductByPatternByMonthSchema: z.ZodObject<{
|
|
378
|
+
description: z.ZodOptional<z.ZodString>;
|
|
379
|
+
generated_at: z.ZodDate;
|
|
380
|
+
} & {
|
|
381
|
+
data: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
382
|
+
qty: z.ZodNumber;
|
|
383
|
+
}, "strip", z.ZodTypeAny, {
|
|
384
|
+
qty: number;
|
|
385
|
+
}, {
|
|
386
|
+
qty: number;
|
|
387
|
+
}>>;
|
|
388
|
+
metric: z.ZodLiteral<"demand_by_product_by_pattern_by_month">;
|
|
389
|
+
properties: z.ZodObject<{
|
|
390
|
+
pattern_id: z.ZodString;
|
|
391
|
+
product_id: z.ZodString;
|
|
392
|
+
}, "strip", z.ZodTypeAny, {
|
|
393
|
+
pattern_id: string;
|
|
394
|
+
product_id: string;
|
|
395
|
+
}, {
|
|
396
|
+
pattern_id: string;
|
|
397
|
+
product_id: string;
|
|
398
|
+
}>;
|
|
399
|
+
}, "strip", z.ZodTypeAny, {
|
|
400
|
+
properties: {
|
|
401
|
+
pattern_id: string;
|
|
402
|
+
product_id: string;
|
|
403
|
+
};
|
|
404
|
+
generated_at: Date;
|
|
405
|
+
metric: "demand_by_product_by_pattern_by_month";
|
|
406
|
+
data: Record<string, {
|
|
407
|
+
qty: number;
|
|
408
|
+
}>;
|
|
409
|
+
description?: string | undefined;
|
|
410
|
+
}, {
|
|
411
|
+
properties: {
|
|
412
|
+
pattern_id: string;
|
|
413
|
+
product_id: string;
|
|
414
|
+
};
|
|
415
|
+
generated_at: Date;
|
|
416
|
+
metric: "demand_by_product_by_pattern_by_month";
|
|
417
|
+
data: Record<string, {
|
|
418
|
+
qty: number;
|
|
419
|
+
}>;
|
|
420
|
+
description?: string | undefined;
|
|
421
|
+
}>;
|
|
422
|
+
export declare const DemandByProductByPatternByYearSchema: z.ZodObject<{
|
|
423
|
+
description: z.ZodOptional<z.ZodString>;
|
|
424
|
+
generated_at: z.ZodDate;
|
|
425
|
+
} & {
|
|
426
|
+
data: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
427
|
+
qty: z.ZodNumber;
|
|
428
|
+
}, "strip", z.ZodTypeAny, {
|
|
429
|
+
qty: number;
|
|
430
|
+
}, {
|
|
431
|
+
qty: number;
|
|
432
|
+
}>>;
|
|
433
|
+
metric: z.ZodLiteral<"demand_by_product_by_pattern_by_year">;
|
|
434
|
+
properties: z.ZodObject<{
|
|
435
|
+
pattern_id: z.ZodString;
|
|
436
|
+
product_id: z.ZodString;
|
|
437
|
+
}, "strip", z.ZodTypeAny, {
|
|
438
|
+
pattern_id: string;
|
|
439
|
+
product_id: string;
|
|
440
|
+
}, {
|
|
441
|
+
pattern_id: string;
|
|
442
|
+
product_id: string;
|
|
443
|
+
}>;
|
|
444
|
+
}, "strip", z.ZodTypeAny, {
|
|
445
|
+
properties: {
|
|
446
|
+
pattern_id: string;
|
|
447
|
+
product_id: string;
|
|
448
|
+
};
|
|
449
|
+
generated_at: Date;
|
|
450
|
+
metric: "demand_by_product_by_pattern_by_year";
|
|
451
|
+
data: Record<string, {
|
|
452
|
+
qty: number;
|
|
453
|
+
}>;
|
|
454
|
+
description?: string | undefined;
|
|
455
|
+
}, {
|
|
456
|
+
properties: {
|
|
457
|
+
pattern_id: string;
|
|
458
|
+
product_id: string;
|
|
459
|
+
};
|
|
460
|
+
generated_at: Date;
|
|
461
|
+
metric: "demand_by_product_by_pattern_by_year";
|
|
462
|
+
data: Record<string, {
|
|
463
|
+
qty: number;
|
|
464
|
+
}>;
|
|
465
|
+
description?: string | undefined;
|
|
466
|
+
}>;
|
|
467
|
+
export type DemandByProductByAgencyByDay = z.infer<typeof DemandByProductByAgencyByDaySchema>;
|
|
468
|
+
export type DemandByProductByAgencyByMonth = z.infer<typeof DemandByProductByAgencyByMonthSchema>;
|
|
469
|
+
export type DemandByProductByAgencyByYear = z.infer<typeof DemandByProductByAgencyByYearSchema>;
|
|
470
|
+
export type DemandByProductByLineByDay = z.infer<typeof DemandByProductByLineByDaySchema>;
|
|
471
|
+
export type DemandByProductByLineByMonth = z.infer<typeof DemandByProductByLineByMonthSchema>;
|
|
472
|
+
export type DemandByProductByLineByYear = z.infer<typeof DemandByProductByLineByYearSchema>;
|
|
473
|
+
export type DemandByProductByPatternByDay = z.infer<typeof DemandByProductByPatternByDaySchema>;
|
|
474
|
+
export type DemandByProductByPatternByMonth = z.infer<typeof DemandByProductByPatternByMonthSchema>;
|
|
475
|
+
export type DemandByProductByPatternByYear = z.infer<typeof DemandByProductByPatternByYearSchema>;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { MetricBaseSchema } from '../common.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
/* DEMAND BY PRODUCT */
|
|
5
|
+
const DemandByProductSchema = MetricBaseSchema.extend({
|
|
6
|
+
data: z.record(z.string(), z.object({
|
|
7
|
+
qty: z.number(),
|
|
8
|
+
})),
|
|
9
|
+
properties: z.object({
|
|
10
|
+
product_id: z.string(),
|
|
11
|
+
}),
|
|
12
|
+
});
|
|
13
|
+
export const DemandByProductByAgencyByDaySchema = DemandByProductSchema.extend({
|
|
14
|
+
data: z.record(z.string().describe('Date in \'YYYY-MM-DD\' format'), z.object({
|
|
15
|
+
day_type: z.enum(['1', '2', '3']),
|
|
16
|
+
holiday: z.enum(['0', '1']),
|
|
17
|
+
notes: z.string().nullable(),
|
|
18
|
+
period: z.enum(['1', '2', '3']),
|
|
19
|
+
qty: z.number(),
|
|
20
|
+
})),
|
|
21
|
+
metric: z.literal('demand_by_product_by_agency_by_day'),
|
|
22
|
+
properties: z.object({
|
|
23
|
+
agency_id: z.string(),
|
|
24
|
+
product_id: z.string(),
|
|
25
|
+
}),
|
|
26
|
+
});
|
|
27
|
+
export const DemandByProductByAgencyByMonthSchema = DemandByProductSchema.extend({
|
|
28
|
+
data: z.record(z.string().describe('Date in \'YYYY-MM\' format'), z.object({
|
|
29
|
+
qty: z.number(),
|
|
30
|
+
})),
|
|
31
|
+
metric: z.literal('demand_by_product_by_agency_by_month'),
|
|
32
|
+
properties: z.object({
|
|
33
|
+
agency_id: z.string(),
|
|
34
|
+
product_id: z.string(),
|
|
35
|
+
}),
|
|
36
|
+
});
|
|
37
|
+
export const DemandByProductByAgencyByYearSchema = DemandByProductSchema.extend({
|
|
38
|
+
data: z.record(z.string().describe('Date in \'YYYY\' format'), z.object({
|
|
39
|
+
qty: z.number(),
|
|
40
|
+
})),
|
|
41
|
+
metric: z.literal('demand_by_product_by_agency_by_year'),
|
|
42
|
+
properties: z.object({
|
|
43
|
+
agency_id: z.string(),
|
|
44
|
+
product_id: z.string(),
|
|
45
|
+
}),
|
|
46
|
+
});
|
|
47
|
+
export const DemandByProductByLineByDaySchema = DemandByProductSchema.extend({
|
|
48
|
+
data: z.record(z.string().describe('Date in \'YYYY-MM-DD\' format'), z.object({
|
|
49
|
+
day_type: z.enum(['1', '2', '3']),
|
|
50
|
+
holiday: z.enum(['0', '1']),
|
|
51
|
+
notes: z.string().nullable(),
|
|
52
|
+
period: z.enum(['1', '2', '3']),
|
|
53
|
+
qty: z.number(),
|
|
54
|
+
})),
|
|
55
|
+
metric: z.literal('demand_by_product_by_line_by_day'),
|
|
56
|
+
properties: z.object({
|
|
57
|
+
line_id: z.string(),
|
|
58
|
+
product_id: z.string(),
|
|
59
|
+
}),
|
|
60
|
+
});
|
|
61
|
+
export const DemandByProductByLineByMonthSchema = DemandByProductSchema.extend({
|
|
62
|
+
data: z.record(z.string().describe('Date in \'YYYY-MM\' format'), z.object({
|
|
63
|
+
qty: z.number(),
|
|
64
|
+
})),
|
|
65
|
+
metric: z.literal('demand_by_product_by_line_by_month'),
|
|
66
|
+
properties: z.object({
|
|
67
|
+
line_id: z.string(),
|
|
68
|
+
product_id: z.string(),
|
|
69
|
+
}),
|
|
70
|
+
});
|
|
71
|
+
export const DemandByProductByLineByYearSchema = DemandByProductSchema.extend({
|
|
72
|
+
data: z.record(z.string().describe('Date in \'YYYY\' format'), z.object({
|
|
73
|
+
qty: z.number(),
|
|
74
|
+
})),
|
|
75
|
+
metric: z.literal('demand_by_product_by_line_by_year'),
|
|
76
|
+
properties: z.object({
|
|
77
|
+
line_id: z.string(),
|
|
78
|
+
product_id: z.string(),
|
|
79
|
+
}),
|
|
80
|
+
});
|
|
81
|
+
export const DemandByProductByPatternByDaySchema = DemandByProductSchema.extend({
|
|
82
|
+
data: z.record(z.string().describe('Date in \'YYYY-MM-DD\' format'), z.object({
|
|
83
|
+
day_type: z.enum(['1', '2', '3']),
|
|
84
|
+
holiday: z.boolean(),
|
|
85
|
+
notes: z.string().nullable(),
|
|
86
|
+
period: z.enum(['1', '2', '3']),
|
|
87
|
+
qty: z.number(),
|
|
88
|
+
})),
|
|
89
|
+
metric: z.literal('demand_by_product_by_pattern_by_day'),
|
|
90
|
+
properties: z.object({
|
|
91
|
+
pattern_id: z.string(),
|
|
92
|
+
product_id: z.string(),
|
|
93
|
+
}),
|
|
94
|
+
});
|
|
95
|
+
export const DemandByProductByPatternByMonthSchema = DemandByProductSchema.extend({
|
|
96
|
+
data: z.record(z.string().describe('Date in \'YYYY-MM\' format'), z.object({
|
|
97
|
+
qty: z.number(),
|
|
98
|
+
})),
|
|
99
|
+
metric: z.literal('demand_by_product_by_pattern_by_month'),
|
|
100
|
+
properties: z.object({
|
|
101
|
+
pattern_id: z.string(),
|
|
102
|
+
product_id: z.string(),
|
|
103
|
+
}),
|
|
104
|
+
});
|
|
105
|
+
export const DemandByProductByPatternByYearSchema = DemandByProductSchema.extend({
|
|
106
|
+
data: z.record(z.string().describe('Date in \'YYYY\' format'), z.object({
|
|
107
|
+
qty: z.number(),
|
|
108
|
+
})),
|
|
109
|
+
metric: z.literal('demand_by_product_by_pattern_by_year'),
|
|
110
|
+
properties: z.object({
|
|
111
|
+
pattern_id: z.string(),
|
|
112
|
+
product_id: z.string(),
|
|
113
|
+
}),
|
|
114
|
+
});
|