@tmlmobilidade/go-types-shared 20261105.106.56 → 20261106.1057.56

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/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export * from './api/index.js';
2
2
  export * from './conditions/index.js';
3
3
  export * from './datetime/index.js';
4
4
  export * from './documents/index.js';
5
+ export * from './modules/index.js';
5
6
  export * from './numbers/index.js';
6
7
  export * from './status/index.js';
7
8
  export * from './theme/index.js';
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@ export * from './api/index.js';
2
2
  export * from './conditions/index.js';
3
3
  export * from './datetime/index.js';
4
4
  export * from './documents/index.js';
5
+ export * from './modules/index.js';
5
6
  export * from './numbers/index.js';
6
7
  export * from './status/index.js';
7
8
  export * from './theme/index.js';
@@ -0,0 +1,2 @@
1
+ export * from './module-id.js';
2
+ export * from './module-scope.js';
@@ -0,0 +1,2 @@
1
+ export * from './module-id.js';
2
+ export * from './module-scope.js';
@@ -0,0 +1,4 @@
1
+ import { z } from 'zod';
2
+ export declare const ModuleIdValues: readonly ["apex", "core", "dates", "exporter", "hub", "infrastructure", "offer", "operation", "performance", "tracker"];
3
+ export declare const ModuleIdSchema: z.ZodEnum<["apex", "core", "dates", "exporter", "hub", "infrastructure", "offer", "operation", "performance", "tracker"]>;
4
+ export type ModuleId = z.infer<typeof ModuleIdSchema>;
@@ -0,0 +1,5 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ export const ModuleIdValues = ['apex', 'core', 'dates', 'exporter', 'hub', 'infrastructure', 'offer', 'operation', 'performance', 'tracker'];
5
+ export const ModuleIdSchema = z.enum(ModuleIdValues);
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ export declare const ModuleScopeSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3
+ type: z.ZodLiteral<"platform">;
4
+ }, "strict", z.ZodTypeAny, {
5
+ type: "platform";
6
+ }, {
7
+ type: "platform";
8
+ }>, z.ZodObject<{
9
+ module_ids: z.ZodEffects<z.ZodArray<z.ZodEnum<["apex", "core", "dates", "exporter", "hub", "infrastructure", "offer", "operation", "performance", "tracker"]>, "atleastone">, ["apex" | "core" | "dates" | "exporter" | "hub" | "infrastructure" | "offer" | "operation" | "performance" | "tracker", ...("apex" | "core" | "dates" | "exporter" | "hub" | "infrastructure" | "offer" | "operation" | "performance" | "tracker")[]], ["apex" | "core" | "dates" | "exporter" | "hub" | "infrastructure" | "offer" | "operation" | "performance" | "tracker", ...("apex" | "core" | "dates" | "exporter" | "hub" | "infrastructure" | "offer" | "operation" | "performance" | "tracker")[]]>;
10
+ type: z.ZodLiteral<"modules">;
11
+ }, "strict", z.ZodTypeAny, {
12
+ type: "modules";
13
+ module_ids: ["apex" | "core" | "dates" | "exporter" | "hub" | "infrastructure" | "offer" | "operation" | "performance" | "tracker", ...("apex" | "core" | "dates" | "exporter" | "hub" | "infrastructure" | "offer" | "operation" | "performance" | "tracker")[]];
14
+ }, {
15
+ type: "modules";
16
+ module_ids: ["apex" | "core" | "dates" | "exporter" | "hub" | "infrastructure" | "offer" | "operation" | "performance" | "tracker", ...("apex" | "core" | "dates" | "exporter" | "hub" | "infrastructure" | "offer" | "operation" | "performance" | "tracker")[]];
17
+ }>]>;
18
+ export type ModuleScope = z.infer<typeof ModuleScopeSchema>;
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+ import { ModuleIdSchema } from './module-id.js';
3
+ /* * */
4
+ export const ModuleScopeSchema = z.discriminatedUnion('type', [
5
+ z.object({ type: z.literal('platform') }).strict(),
6
+ z.object({
7
+ module_ids: z.array(ModuleIdSchema).nonempty().refine(ids => new Set(ids).size === ids.length, 'Module IDs must be unique'),
8
+ type: z.literal('modules'),
9
+ }).strict(),
10
+ ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmlmobilidade/go-types-shared",
3
- "version": "20261105.106.56",
3
+ "version": "20261106.1057.56",
4
4
  "author": {
5
5
  "email": "iso@tmlmobilidade.pt",
6
6
  "name": "TML-ISO"