@tmlmobilidade/types 20251031.1051.3 → 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.
Files changed (235) hide show
  1. package/dist/{src/_common → _common}/index.d.ts +4 -2
  2. package/dist/{src/_common → _common}/index.js +4 -2
  3. package/dist/_common/mongo.d.ts +3 -0
  4. package/dist/_common/status.d.ts +13 -0
  5. package/dist/_common/status.js +20 -0
  6. package/dist/_common/utility.js +1 -0
  7. package/dist/{src/agency.d.ts → agency.d.ts} +4 -15
  8. package/dist/{src/agency.js → agency.js} +1 -6
  9. package/dist/{src/alert.d.ts → alert.d.ts} +20 -21
  10. package/dist/{src/alert.js → alert.js} +8 -14
  11. package/dist/{src/simplified-apex → apex}/simplified-apex-validation.d.ts +20 -20
  12. package/dist/{src/auth → auth}/index.d.ts +1 -1
  13. package/dist/{src/auth → auth}/index.js +1 -1
  14. package/dist/{src/auth → auth}/password-requirements.js +2 -1
  15. package/dist/auth/role.d.ts +958 -0
  16. package/dist/{src/auth → auth}/role.js +2 -2
  17. package/dist/{src/auth → auth}/session.d.ts +13 -9
  18. package/dist/{src/auth → auth}/session.js +1 -1
  19. package/dist/auth/user.d.ts +1281 -0
  20. package/dist/{src/auth → auth}/user.js +11 -14
  21. package/dist/{src/file-exports → file-exports}/common.d.ts +9 -8
  22. package/dist/{src/file-exports → file-exports}/common.js +1 -1
  23. package/dist/file-exports/index.d.ts +121 -0
  24. package/dist/file-exports/ride-export.d.ts +410 -0
  25. package/dist/file-exports/ride-export.js +131 -0
  26. package/dist/{src/file.d.ts → file.d.ts} +18 -18
  27. package/dist/gtfs/agency.d.ts +30 -0
  28. package/dist/gtfs/agency.js +13 -0
  29. package/dist/gtfs/feed-info.d.ts +33 -0
  30. package/dist/{src/gtfs.js → gtfs/feed-info.js} +1 -11
  31. package/dist/{src/gtfs → gtfs}/index.d.ts +3 -0
  32. package/dist/{src/gtfs → gtfs}/index.js +3 -0
  33. package/dist/gtfs/service-alert.d.ts +26 -0
  34. package/dist/index.d.ts +22 -22
  35. package/dist/index.js +22 -22
  36. package/dist/locations/census.d.ts +211 -0
  37. package/dist/locations/census.js +2 -0
  38. package/dist/locations/district.d.ts +24 -0
  39. package/dist/locations/district.js +2 -0
  40. package/dist/locations/index.d.ts +6 -0
  41. package/dist/locations/index.js +6 -0
  42. package/dist/locations/locality.d.ts +27 -0
  43. package/dist/locations/locality.js +2 -0
  44. package/dist/locations/municipality.d.ts +25 -0
  45. package/dist/locations/municipality.js +2 -0
  46. package/dist/locations/parish.d.ts +26 -0
  47. package/dist/locations/parish.js +2 -0
  48. package/dist/locations/queries.d.ts +117 -0
  49. package/dist/{src/locations.js → locations/queries.js} +5 -16
  50. package/dist/metrics/demand/demand_by_agency.d.ts +210 -0
  51. package/dist/metrics/demand/demand_by_agency.js +39 -0
  52. package/dist/metrics/demand/demand_by_category.d.ts +475 -0
  53. package/dist/metrics/demand/demand_by_category.js +114 -0
  54. package/dist/metrics/demand/demand_by_line.d.ts +246 -0
  55. package/dist/metrics/demand/demand_by_line.js +56 -0
  56. package/dist/metrics/demand/demand_by_pattern.d.ts +332 -0
  57. package/dist/metrics/demand/demand_by_pattern.js +56 -0
  58. package/dist/metrics/demand/demand_by_product.d.ts +475 -0
  59. package/dist/metrics/demand/demand_by_product.js +114 -0
  60. package/dist/metrics/demand/index.d.ts +6 -0
  61. package/dist/metrics/demand/index.js +8 -0
  62. package/dist/metrics/demand/records.d.ts +320 -0
  63. package/dist/metrics/demand/records.js +53 -0
  64. package/dist/metrics/index.d.ts +2647 -0
  65. package/dist/metrics/index.js +48 -0
  66. package/dist/metrics/realtime.d.ts +667 -0
  67. package/dist/metrics/realtime.js +41 -0
  68. package/dist/{src/notification.d.ts → notification.d.ts} +4 -4
  69. package/dist/{src/organization.d.ts → organization.d.ts} +32 -32
  70. package/dist/{src/organization.js → organization.js} +7 -7
  71. package/dist/permissions/agencies.d.ts +12 -0
  72. package/dist/permissions/agencies.js +13 -0
  73. package/dist/permissions/alerts.d.ts +36 -0
  74. package/dist/permissions/alerts.js +25 -0
  75. package/dist/permissions/controller.d.ts +36 -0
  76. package/dist/permissions/controller.js +30 -0
  77. package/dist/permissions/gtfs-validations.d.ts +25 -0
  78. package/dist/permissions/gtfs-validations.js +14 -0
  79. package/dist/permissions/home.d.ts +12 -0
  80. package/dist/permissions/home.js +10 -0
  81. package/dist/permissions/index.d.ts +268 -0
  82. package/dist/permissions/index.js +149 -0
  83. package/dist/permissions/organizations.d.ts +12 -0
  84. package/dist/permissions/organizations.js +12 -0
  85. package/dist/permissions/performance.d.ts +12 -0
  86. package/dist/permissions/performance.js +9 -0
  87. package/dist/permissions/plans.d.ts +25 -0
  88. package/dist/permissions/plans.js +22 -0
  89. package/dist/permissions/roles.d.ts +12 -0
  90. package/dist/permissions/roles.js +12 -0
  91. package/dist/permissions/stops.d.ts +30 -0
  92. package/dist/permissions/stops.js +17 -0
  93. package/dist/permissions/users.d.ts +12 -0
  94. package/dist/permissions/users.js +12 -0
  95. package/dist/{src/plans → plans}/gtfs-validation.d.ts +55 -63
  96. package/dist/{src/plans → plans}/gtfs-validation.js +3 -6
  97. package/dist/plans/plan-app-status.d.ts +15 -0
  98. package/dist/plans/plan-app-status.js +10 -0
  99. package/dist/{src/plans → plans}/plan.d.ts +240 -104
  100. package/dist/{src/plans → plans}/plan.js +8 -10
  101. package/dist/{src/_common/proposed-change.d.ts → proposed-change.d.ts} +21 -22
  102. package/dist/{src/_common/proposed-change.js → proposed-change.js} +5 -7
  103. package/dist/{src/rides → rides}/index.d.ts +1 -0
  104. package/dist/{src/rides → rides}/index.js +1 -0
  105. package/dist/{src/rides → rides}/ride-acceptance.d.ts +65 -65
  106. package/dist/{src/rides → rides}/ride-analysis.d.ts +34 -34
  107. package/dist/{src/rides → rides}/ride-audit.d.ts +10 -10
  108. package/dist/rides/ride-normalized.d.ts +29 -0
  109. package/dist/rides/ride-normalized.js +2 -0
  110. package/dist/{src/rides → rides}/ride.d.ts +523 -567
  111. package/dist/{src/rides → rides}/ride.js +2 -16
  112. package/dist/{src/sams → sams}/sam-analysis.d.ts +11 -11
  113. package/dist/{src/sams → sams}/sam-analysis.js +4 -4
  114. package/dist/{src/sams → sams}/sam.d.ts +76 -76
  115. package/dist/{src/sams → sams}/sam.js +1 -1
  116. package/dist/{src/stop.d.ts → stop.d.ts} +32 -43
  117. package/dist/{src/stop.js → stop.js} +3 -8
  118. package/dist/vehicle-events/gtfs-rt-vehicle-event-extended.d.ts +77 -0
  119. package/dist/vehicle-events/gtfs-rt-vehicle-event-extended.js +21 -0
  120. package/dist/vehicle-events/index.d.ts +2 -0
  121. package/dist/vehicle-events/index.js +2 -0
  122. package/dist/{src/vehicle-event.d.ts → vehicle-events/simplified-vehicle-event.d.ts} +9 -9
  123. package/dist/{src/vehicle-event.js → vehicle-events/simplified-vehicle-event.js} +3 -3
  124. package/dist/wiki.js +2 -0
  125. package/dist/{src/zone.d.ts → zone.d.ts} +2 -16
  126. package/dist/{src/zone.js → zone.js} +0 -6
  127. package/package.json +18 -21
  128. package/README.md +0 -13
  129. package/dist/src/_common/email.d.ts +0 -4
  130. package/dist/src/_common/email.js +0 -7
  131. package/dist/src/auth/permission.d.ts +0 -19
  132. package/dist/src/auth/permission.js +0 -8
  133. package/dist/src/auth/role.d.ts +0 -127
  134. package/dist/src/auth/user.d.ts +0 -311
  135. package/dist/src/file-exports/index.d.ts +0 -121
  136. package/dist/src/file-exports/ride-export.d.ts +0 -470
  137. package/dist/src/file-exports/ride-export.js +0 -128
  138. package/dist/src/gtfs.d.ts +0 -88
  139. package/dist/src/locations.d.ts +0 -319
  140. package/dist/src/metrics/demand.d.ts +0 -803
  141. package/dist/src/metrics/demand.js +0 -153
  142. package/dist/src/metrics/index.d.ts +0 -806
  143. package/dist/src/metrics/index.js +0 -19
  144. package/dist/src/plans/plan-controller.d.ts +0 -15
  145. package/dist/src/plans/plan-controller.js +0 -10
  146. package/dist/src/system/index.d.ts +0 -2
  147. package/dist/src/system/index.js +0 -2
  148. package/dist/src/system/processing-status.d.ts +0 -9
  149. package/dist/src/system/processing-status.js +0 -5
  150. package/dist/{src/_common → _common}/comment.d.ts +8 -8
  151. package/dist/{src/_common → _common}/comment.js +0 -0
  152. package/dist/{src/_common → _common}/document.d.ts +0 -0
  153. package/dist/{src/_common → _common}/document.js +0 -0
  154. package/dist/{src/system → _common}/environment.d.ts +0 -0
  155. package/dist/{src/system → _common}/environment.js +0 -0
  156. package/dist/{src/_common → _common}/fastify.d.ts +0 -0
  157. package/dist/{src/_common → _common}/fastify.js +0 -0
  158. package/dist/{src/_common/utility.js → _common/mongo.js} +0 -0
  159. package/dist/{src/_common → _common}/operational-date.d.ts +0 -0
  160. package/dist/{src/_common → _common}/operational-date.js +0 -0
  161. package/dist/{src/_common → _common}/unix-timestamp.d.ts +0 -0
  162. package/dist/{src/_common → _common}/unix-timestamp.js +0 -0
  163. package/dist/{src/_common → _common}/utility.d.ts +0 -0
  164. package/dist/{src/simplified-apex → apex}/index.d.ts +0 -0
  165. package/dist/{src/simplified-apex → apex}/index.js +0 -0
  166. package/dist/{src/simplified-apex → apex}/simplified-apex-inspection-decision.d.ts +0 -0
  167. package/dist/{src/simplified-apex → apex}/simplified-apex-inspection-decision.js +0 -0
  168. package/dist/{src/simplified-apex → apex}/simplified-apex-inspection.d.ts +0 -0
  169. package/dist/{src/simplified-apex → apex}/simplified-apex-inspection.js +0 -0
  170. package/dist/{src/simplified-apex → apex}/simplified-apex-location.d.ts +16 -16
  171. package/dist/{src/simplified-apex → apex}/simplified-apex-location.js +0 -0
  172. package/dist/{src/simplified-apex → apex}/simplified-apex-on-board-refund.d.ts +20 -20
  173. package/dist/{src/simplified-apex → apex}/simplified-apex-on-board-refund.js +0 -0
  174. package/dist/{src/simplified-apex → apex}/simplified-apex-on-board-sale.d.ts +25 -25
  175. package/dist/{src/simplified-apex → apex}/simplified-apex-on-board-sale.js +0 -0
  176. package/dist/{src/simplified-apex → apex}/simplified-apex-type.d.ts +0 -0
  177. package/dist/{src/simplified-apex → apex}/simplified-apex-type.js +0 -0
  178. package/dist/{src/simplified-apex → apex}/simplified-apex-validation.js +0 -0
  179. package/dist/{src/auth → auth}/login.d.ts +0 -0
  180. package/dist/{src/auth → auth}/login.js +0 -0
  181. package/dist/{src/auth → auth}/password-requirements.d.ts +0 -0
  182. package/dist/{src/auth → auth}/verification-token.d.ts +0 -0
  183. package/dist/{src/auth → auth}/verification-token.js +0 -0
  184. package/dist/{src/file-exports → file-exports}/index.js +0 -0
  185. package/dist/{src/file.js → file.js} +0 -0
  186. package/dist/{src/gtfs → gtfs}/calendar-dates.d.ts +0 -0
  187. package/dist/{src/gtfs → gtfs}/calendar-dates.js +0 -0
  188. package/dist/{src/gtfs → gtfs}/calendar.d.ts +0 -0
  189. package/dist/{src/gtfs → gtfs}/calendar.js +0 -0
  190. package/dist/{src/gtfs → gtfs}/cause-effetcs.d.ts +0 -0
  191. package/dist/{src/gtfs → gtfs}/cause-effetcs.js +0 -0
  192. package/dist/{src/gtfs → gtfs}/common.d.ts +0 -0
  193. package/dist/{src/gtfs → gtfs}/common.js +0 -0
  194. package/dist/{src/gtfs → gtfs}/routes.d.ts +0 -0
  195. package/dist/{src/gtfs → gtfs}/routes.js +0 -0
  196. package/dist/{src/pcgi/pcgi-apex-location.js → gtfs/service-alert.js} +0 -0
  197. package/dist/{src/gtfs → gtfs}/shapes.d.ts +0 -0
  198. package/dist/{src/gtfs → gtfs}/shapes.js +0 -0
  199. package/dist/{src/gtfs → gtfs}/stop-times.d.ts +0 -0
  200. package/dist/{src/gtfs → gtfs}/stop-times.js +0 -0
  201. package/dist/{src/gtfs → gtfs}/stops.d.ts +0 -0
  202. package/dist/{src/gtfs → gtfs}/stops.js +0 -0
  203. package/dist/{src/gtfs → gtfs}/trips.d.ts +0 -0
  204. package/dist/{src/gtfs → gtfs}/trips.js +0 -0
  205. package/dist/{src/metrics → metrics}/common.d.ts +0 -0
  206. package/dist/{src/metrics → metrics}/common.js +0 -0
  207. package/dist/{src/notification.js → notification.js} +0 -0
  208. package/dist/{src/pcgi → pcgi}/index.d.ts +0 -0
  209. package/dist/{src/pcgi → pcgi}/index.js +0 -0
  210. package/dist/{src/pcgi → pcgi}/pcgi-apex-location.d.ts +0 -0
  211. package/dist/{src/pcgi/pcgi-apex-refund.js → pcgi/pcgi-apex-location.js} +0 -0
  212. package/dist/{src/pcgi → pcgi}/pcgi-apex-refund.d.ts +0 -0
  213. package/dist/{src/pcgi/pcgi-apex-sale.js → pcgi/pcgi-apex-refund.js} +0 -0
  214. package/dist/{src/pcgi → pcgi}/pcgi-apex-sale.d.ts +0 -0
  215. package/dist/{src/pcgi/pcgi-apex-validation.js → pcgi/pcgi-apex-sale.js} +0 -0
  216. package/dist/{src/pcgi → pcgi}/pcgi-apex-validation.d.ts +0 -0
  217. package/dist/{src/pcgi/pcgi-transaction-entity.js → pcgi/pcgi-apex-validation.js} +0 -0
  218. package/dist/{src/pcgi → pcgi}/pcgi-transaction-entity.d.ts +0 -0
  219. package/dist/{src/rides/hashed-shape.js → pcgi/pcgi-transaction-entity.js} +0 -0
  220. package/dist/{src/plans → plans}/index.d.ts +0 -0
  221. package/dist/{src/plans → plans}/index.js +0 -0
  222. package/dist/{src/plans → plans}/plan-pcgi-legacy.d.ts +0 -0
  223. package/dist/{src/plans → plans}/plan-pcgi-legacy.js +0 -0
  224. package/dist/{src/rides → rides}/hashed-shape.d.ts +0 -0
  225. package/dist/{src/rides/hashed-trip.js → rides/hashed-shape.js} +0 -0
  226. package/dist/{src/rides → rides}/hashed-trip.d.ts +0 -0
  227. package/dist/{src/wiki.js → rides/hashed-trip.js} +0 -0
  228. package/dist/{src/rides → rides}/ride-acceptance.js +1 -1
  229. /package/dist/{src/rides → rides}/ride-analysis.js +0 -0
  230. /package/dist/{src/rides → rides}/ride-audit.js +0 -0
  231. /package/dist/{src/rides → rides}/ride-overrides.d.ts +0 -0
  232. /package/dist/{src/rides → rides}/ride-overrides.js +0 -0
  233. /package/dist/{src/sams → sams}/index.d.ts +0 -0
  234. /package/dist/{src/sams → sams}/index.js +0 -0
  235. /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
+ });
@@ -0,0 +1,6 @@
1
+ export * from './demand_by_agency.js';
2
+ export * from './demand_by_category.js';
3
+ export * from './demand_by_line.js';
4
+ export * from './demand_by_pattern.js';
5
+ export * from './demand_by_product.js';
6
+ export * from './records.js';
@@ -0,0 +1,8 @@
1
+ /* * */
2
+ export * from './demand_by_agency.js';
3
+ export * from './demand_by_category.js';
4
+ export * from './demand_by_line.js';
5
+ export * from './demand_by_pattern.js';
6
+ export * from './demand_by_product.js';
7
+ export * from './records.js';
8
+ /* * */