colibris-types 2.1.0 → 2.2.0

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,111 @@
1
+ import { z } from "zod";
2
+ export declare const ChartRefLineSchema: z.ZodObject<{
3
+ key: z.ZodString;
4
+ tabKey: z.ZodOptional<z.ZodString>;
5
+ value: z.ZodOptional<z.ZodNumber>;
6
+ alert: z.ZodOptional<z.ZodObject<{
7
+ direction: z.ZodEnum<["up", "down"]>;
8
+ apiEndpoint: z.ZodString;
9
+ metricKey: z.ZodString;
10
+ aggregation: z.ZodEnum<["last", "sum"]>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ direction: "up" | "down";
13
+ apiEndpoint: string;
14
+ metricKey: string;
15
+ aggregation: "last" | "sum";
16
+ }, {
17
+ direction: "up" | "down";
18
+ apiEndpoint: string;
19
+ metricKey: string;
20
+ aggregation: "last" | "sum";
21
+ }>>;
22
+ }, "strip", z.ZodTypeAny, {
23
+ key: string;
24
+ value?: number | undefined;
25
+ tabKey?: string | undefined;
26
+ alert?: {
27
+ direction: "up" | "down";
28
+ apiEndpoint: string;
29
+ metricKey: string;
30
+ aggregation: "last" | "sum";
31
+ } | undefined;
32
+ }, {
33
+ key: string;
34
+ value?: number | undefined;
35
+ tabKey?: string | undefined;
36
+ alert?: {
37
+ direction: "up" | "down";
38
+ apiEndpoint: string;
39
+ metricKey: string;
40
+ aggregation: "last" | "sum";
41
+ } | undefined;
42
+ }>;
43
+ export declare const ChartSettingsSchema: z.ZodObject<{
44
+ charts: z.ZodArray<z.ZodObject<{
45
+ key: z.ZodString;
46
+ tabKey: z.ZodOptional<z.ZodString>;
47
+ value: z.ZodOptional<z.ZodNumber>;
48
+ alert: z.ZodOptional<z.ZodObject<{
49
+ direction: z.ZodEnum<["up", "down"]>;
50
+ apiEndpoint: z.ZodString;
51
+ metricKey: z.ZodString;
52
+ aggregation: z.ZodEnum<["last", "sum"]>;
53
+ }, "strip", z.ZodTypeAny, {
54
+ direction: "up" | "down";
55
+ apiEndpoint: string;
56
+ metricKey: string;
57
+ aggregation: "last" | "sum";
58
+ }, {
59
+ direction: "up" | "down";
60
+ apiEndpoint: string;
61
+ metricKey: string;
62
+ aggregation: "last" | "sum";
63
+ }>>;
64
+ }, "strip", z.ZodTypeAny, {
65
+ key: string;
66
+ value?: number | undefined;
67
+ tabKey?: string | undefined;
68
+ alert?: {
69
+ direction: "up" | "down";
70
+ apiEndpoint: string;
71
+ metricKey: string;
72
+ aggregation: "last" | "sum";
73
+ } | undefined;
74
+ }, {
75
+ key: string;
76
+ value?: number | undefined;
77
+ tabKey?: string | undefined;
78
+ alert?: {
79
+ direction: "up" | "down";
80
+ apiEndpoint: string;
81
+ metricKey: string;
82
+ aggregation: "last" | "sum";
83
+ } | undefined;
84
+ }>, "many">;
85
+ }, "strip", z.ZodTypeAny, {
86
+ charts: {
87
+ key: string;
88
+ value?: number | undefined;
89
+ tabKey?: string | undefined;
90
+ alert?: {
91
+ direction: "up" | "down";
92
+ apiEndpoint: string;
93
+ metricKey: string;
94
+ aggregation: "last" | "sum";
95
+ } | undefined;
96
+ }[];
97
+ }, {
98
+ charts: {
99
+ key: string;
100
+ value?: number | undefined;
101
+ tabKey?: string | undefined;
102
+ alert?: {
103
+ direction: "up" | "down";
104
+ apiEndpoint: string;
105
+ metricKey: string;
106
+ aggregation: "last" | "sum";
107
+ } | undefined;
108
+ }[];
109
+ }>;
110
+ export type ChartRefLine = z.infer<typeof ChartRefLineSchema>;
111
+ export type ChartSettings = z.infer<typeof ChartSettingsSchema>;
@@ -0,0 +1,24 @@
1
+ import { z } from "zod";
2
+ import { extendZodWithOpenApi } from "@asteasolutions/zod-to-openapi";
3
+ extendZodWithOpenApi(z);
4
+ export const ChartRefLineSchema = z
5
+ .object({
6
+ key: z.string().openapi({ description: "Chart identifier for notification navigation" }),
7
+ tabKey: z.string().optional().openapi({ description: "Tab identifier for multi-tab charts" }),
8
+ value: z.number().optional().openapi({ description: "Threshold value" }),
9
+ alert: z
10
+ .object({
11
+ direction: z.enum(["up", "down"]).openapi({ description: "Alert direction" }),
12
+ apiEndpoint: z.string().openapi({ description: "API endpoint to fetch metric" }),
13
+ metricKey: z.string().openapi({ description: "Metric key to compare" }),
14
+ aggregation: z.enum(["last", "sum"]).openapi({ description: "Aggregation method" }),
15
+ })
16
+ .optional()
17
+ .openapi({ description: "Alert configuration" }),
18
+ })
19
+ .openapi("ChartRefLine");
20
+ export const ChartSettingsSchema = z
21
+ .object({
22
+ charts: z.array(ChartRefLineSchema).openapi({ description: "User chart reference lines" }),
23
+ })
24
+ .openapi("ChartSettings");
@@ -40,6 +40,7 @@ export declare const ComputerUploadRowSchema: z.ZodObject<{
40
40
  Loyer: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>>;
41
41
  "B\u00E9n\u00E9ficiaire du Don": z.ZodOptional<z.ZodString>;
42
42
  "Date du Don": z.ZodOptional<z.ZodString>;
43
+ "Etat Acquisition": z.ZodOptional<z.ZodEnum<["neuf", "reconditionné", "remanufacturé"]>>;
43
44
  }, "strip", z.ZodTypeAny, {
44
45
  ID: string;
45
46
  Label: string;
@@ -81,6 +82,7 @@ export declare const ComputerUploadRowSchema: z.ZodObject<{
81
82
  Loyer?: number | undefined;
82
83
  "B\u00E9n\u00E9ficiaire du Don"?: string | undefined;
83
84
  "Date du Don"?: string | undefined;
85
+ "Etat Acquisition"?: "neuf" | "reconditionné" | "remanufacturé" | undefined;
84
86
  }, {
85
87
  ID: string;
86
88
  Label: string;
@@ -122,6 +124,7 @@ export declare const ComputerUploadRowSchema: z.ZodObject<{
122
124
  Loyer?: string | undefined;
123
125
  "B\u00E9n\u00E9ficiaire du Don"?: string | undefined;
124
126
  "Date du Don"?: string | undefined;
127
+ "Etat Acquisition"?: "neuf" | "reconditionné" | "remanufacturé" | undefined;
125
128
  }>;
126
129
  export declare const ComputerUploadSchema: z.ZodArray<z.ZodObject<{
127
130
  ID: z.ZodString;
@@ -164,6 +167,7 @@ export declare const ComputerUploadSchema: z.ZodArray<z.ZodObject<{
164
167
  Loyer: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>>;
165
168
  "B\u00E9n\u00E9ficiaire du Don": z.ZodOptional<z.ZodString>;
166
169
  "Date du Don": z.ZodOptional<z.ZodString>;
170
+ "Etat Acquisition": z.ZodOptional<z.ZodEnum<["neuf", "reconditionné", "remanufacturé"]>>;
167
171
  }, "strip", z.ZodTypeAny, {
168
172
  ID: string;
169
173
  Label: string;
@@ -205,6 +209,7 @@ export declare const ComputerUploadSchema: z.ZodArray<z.ZodObject<{
205
209
  Loyer?: number | undefined;
206
210
  "B\u00E9n\u00E9ficiaire du Don"?: string | undefined;
207
211
  "Date du Don"?: string | undefined;
212
+ "Etat Acquisition"?: "neuf" | "reconditionné" | "remanufacturé" | undefined;
208
213
  }, {
209
214
  ID: string;
210
215
  Label: string;
@@ -246,6 +251,7 @@ export declare const ComputerUploadSchema: z.ZodArray<z.ZodObject<{
246
251
  Loyer?: string | undefined;
247
252
  "B\u00E9n\u00E9ficiaire du Don"?: string | undefined;
248
253
  "Date du Don"?: string | undefined;
254
+ "Etat Acquisition"?: "neuf" | "reconditionné" | "remanufacturé" | undefined;
249
255
  }>, "many">;
250
256
  export type ComputerUpload = z.infer<typeof ComputerUploadSchema>;
251
257
  export declare const assetDefinitions: {
@@ -290,6 +296,7 @@ export declare const assetDefinitions: {
290
296
  Loyer: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>>;
291
297
  "B\u00E9n\u00E9ficiaire du Don": z.ZodOptional<z.ZodString>;
292
298
  "Date du Don": z.ZodOptional<z.ZodString>;
299
+ "Etat Acquisition": z.ZodOptional<z.ZodEnum<["neuf", "reconditionné", "remanufacturé"]>>;
293
300
  }, "strip", z.ZodTypeAny, {
294
301
  ID: string;
295
302
  Label: string;
@@ -331,6 +338,7 @@ export declare const assetDefinitions: {
331
338
  Loyer?: number | undefined;
332
339
  "B\u00E9n\u00E9ficiaire du Don"?: string | undefined;
333
340
  "Date du Don"?: string | undefined;
341
+ "Etat Acquisition"?: "neuf" | "reconditionné" | "remanufacturé" | undefined;
334
342
  }, {
335
343
  ID: string;
336
344
  Label: string;
@@ -372,5 +380,6 @@ export declare const assetDefinitions: {
372
380
  Loyer?: string | undefined;
373
381
  "B\u00E9n\u00E9ficiaire du Don"?: string | undefined;
374
382
  "Date du Don"?: string | undefined;
383
+ "Etat Acquisition"?: "neuf" | "reconditionné" | "remanufacturé" | undefined;
375
384
  }>, "many">;
376
385
  };
@@ -152,6 +152,10 @@ export const ComputerUploadRowSchema = z
152
152
  .regex(DATE_REGEX)
153
153
  .optional()
154
154
  .openapi({ description: "Donation date (DD/MM/YYYY)" }),
155
+ "Etat Acquisition": z
156
+ .enum(["neuf", "reconditionné", "remanufacturé"])
157
+ .optional()
158
+ .openapi({ description: "Acquisition state" }),
155
159
  })
156
160
  .openapi("ComputerUploadRow");
157
161
  export const ComputerUploadSchema = z
@@ -338,6 +338,7 @@ export declare const schemasDefinitions: {
338
338
  Loyer: import("zod").ZodOptional<import("zod").ZodPipeline<import("zod").ZodEffects<import("zod").ZodString, number, string>, import("zod").ZodNumber>>;
339
339
  "B\u00E9n\u00E9ficiaire du Don": import("zod").ZodOptional<import("zod").ZodString>;
340
340
  "Date du Don": import("zod").ZodOptional<import("zod").ZodString>;
341
+ "Etat Acquisition": import("zod").ZodOptional<import("zod").ZodEnum<["neuf", "reconditionné", "remanufacturé"]>>;
341
342
  }, "strip", import("zod").ZodTypeAny, {
342
343
  ID: string;
343
344
  Label: string;
@@ -379,6 +380,7 @@ export declare const schemasDefinitions: {
379
380
  Loyer?: number | undefined;
380
381
  "B\u00E9n\u00E9ficiaire du Don"?: string | undefined;
381
382
  "Date du Don"?: string | undefined;
383
+ "Etat Acquisition"?: "neuf" | "reconditionné" | "remanufacturé" | undefined;
382
384
  }, {
383
385
  ID: string;
384
386
  Label: string;
@@ -420,6 +422,7 @@ export declare const schemasDefinitions: {
420
422
  Loyer?: string | undefined;
421
423
  "B\u00E9n\u00E9ficiaire du Don"?: string | undefined;
422
424
  "Date du Don"?: string | undefined;
425
+ "Etat Acquisition"?: "neuf" | "reconditionné" | "remanufacturé" | undefined;
423
426
  }>, "many">;
424
427
  people_upload: import("zod").ZodArray<import("zod").ZodObject<{
425
428
  Matricule: import("zod").ZodString;
package/lib/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export { NotificationSchema, NotificationTypeSchema, type Notification, } from "./notification.js";
2
2
  export { NotificationTypePreferenceSchema, NotificationPreferencesSchema, type NotificationTypePreference, type NotificationPreferences, } from "./notification-settings.js";
3
3
  export { ImportsHistorySchema, ImportsHistoryTypeSchema, ImportsHistoryStatusSchema, type ImportsHistory, PeopleUploadSchema, PeopleUploadRowSchema, SubsidiaryUploadSchema, SubsidiaryUploadRowSchema, organizationDefinitions, type PeopleUpload, type SubsidiaryUpload, ComputerUploadSchema, ComputerUploadRowSchema, assetDefinitions, type ComputerUpload, BouyguesGlobalInvoiceUploadSchema, BouyguesGlobalInvoiceUploadRowSchema, BouyguesDetailedInvoiceUploadSchema, BouyguesDetailedInvoiceUploadRowSchema, BouyguesFleetUploadSchema, BouyguesFleetUploadRowSchema, OrangeDetailedInvoiceUploadSchema, OrangeDetailedInvoiceUploadRowSchema, OrangeFleetUploadSchema, OrangeFleetUploadRowSchema, SfrDetailedInvoiceUploadSchema, SfrDetailedInvoiceUploadRowSchema, telecomDefinitions, type BouyguesGlobalInvoiceUpload, type BouyguesDetailedInvoiceUpload, type BouyguesFleetUpload, type OrangeDetailedInvoiceUpload, type OrangeFleetUpload, type SfrDetailedInvoiceUpload, schemasDefinitions, } from "./imports/index.js";
4
+ export { ChartRefLineSchema, ChartSettingsSchema, type ChartRefLine, type ChartSettings, } from "./chart-settings.js";
package/lib/index.js CHANGED
@@ -14,3 +14,5 @@ ComputerUploadSchema, ComputerUploadRowSchema, assetDefinitions,
14
14
  BouyguesGlobalInvoiceUploadSchema, BouyguesGlobalInvoiceUploadRowSchema, BouyguesDetailedInvoiceUploadSchema, BouyguesDetailedInvoiceUploadRowSchema, BouyguesFleetUploadSchema, BouyguesFleetUploadRowSchema, OrangeDetailedInvoiceUploadSchema, OrangeDetailedInvoiceUploadRowSchema, OrangeFleetUploadSchema, OrangeFleetUploadRowSchema, SfrDetailedInvoiceUploadSchema, SfrDetailedInvoiceUploadRowSchema, telecomDefinitions,
15
15
  // Consolidated definitions
16
16
  schemasDefinitions, } from "./imports/index.js";
17
+ // Chart Settings (user chart reference lines & thresholds)
18
+ export { ChartRefLineSchema, ChartSettingsSchema, } from "./chart-settings.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "colibris-types",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "Shared TypeScript types and Zod schemas for Colibris platform",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",