colibris-types 2.0.0 → 2.1.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.
@@ -1,17 +1,17 @@
1
1
  import { z } from "zod";
2
- export declare const ImportsHistoryTypeSchema: z.ZodEnum<["import_assets", "import_telecom_lines", "import_people", "import_subsidiaries"]>;
2
+ export declare const ImportsHistoryTypeSchema: z.ZodEnum<["import_assets", "import_telecom_lines", "import_people", "import_subsidiaries", "import_licenses_traces"]>;
3
3
  export declare const ImportsHistoryStatusSchema: z.ZodEnum<["success", "error", "pending"]>;
4
4
  export declare const ImportsHistorySchema: z.ZodObject<{
5
5
  companyName: z.ZodString;
6
6
  id: z.ZodString;
7
- type: z.ZodEnum<["import_assets", "import_telecom_lines", "import_people", "import_subsidiaries"]>;
7
+ type: z.ZodEnum<["import_assets", "import_telecom_lines", "import_people", "import_subsidiaries", "import_licenses_traces"]>;
8
8
  params: z.ZodArray<z.ZodString, "many">;
9
9
  status: z.ZodEnum<["success", "error", "pending"]>;
10
10
  srcUrls: z.ZodArray<z.ZodString, "many">;
11
11
  date: z.ZodString;
12
12
  error: z.ZodOptional<z.ZodString>;
13
13
  }, "strip", z.ZodTypeAny, {
14
- type: "import_assets" | "import_telecom_lines" | "import_people" | "import_subsidiaries";
14
+ type: "import_assets" | "import_telecom_lines" | "import_people" | "import_subsidiaries" | "import_licenses_traces";
15
15
  date: string;
16
16
  params: string[];
17
17
  status: "success" | "error" | "pending";
@@ -20,7 +20,7 @@ export declare const ImportsHistorySchema: z.ZodObject<{
20
20
  srcUrls: string[];
21
21
  error?: string | undefined;
22
22
  }, {
23
- type: "import_assets" | "import_telecom_lines" | "import_people" | "import_subsidiaries";
23
+ type: "import_assets" | "import_telecom_lines" | "import_people" | "import_subsidiaries" | "import_licenses_traces";
24
24
  date: string;
25
25
  params: string[];
26
26
  status: "success" | "error" | "pending";
@@ -7,6 +7,7 @@ export const ImportsHistoryTypeSchema = z
7
7
  "import_telecom_lines",
8
8
  "import_people",
9
9
  "import_subsidiaries",
10
+ "import_licenses_traces",
10
11
  ])
11
12
  .openapi({ description: "Type of import operation" });
12
13
  export const ImportsHistoryStatusSchema = z
package/lib/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export { NotificationSchema, NotificationTypeSchema, type Notification, } from "./notification.js";
2
+ export { NotificationTypePreferenceSchema, NotificationPreferencesSchema, type NotificationTypePreference, type NotificationPreferences, } from "./notification-settings.js";
2
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";
package/lib/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  // Notification
2
2
  export { NotificationSchema, NotificationTypeSchema, } from "./notification.js";
3
+ // Notification Settings (user preferences)
4
+ export { NotificationTypePreferenceSchema, NotificationPreferencesSchema, } from "./notification-settings.js";
3
5
  // Imports (history + upload schemas)
4
6
  export {
5
7
  // History
@@ -0,0 +1,53 @@
1
+ import { z } from "zod";
2
+ export declare const NotificationTypePreferenceSchema: z.ZodObject<{
3
+ inApp: z.ZodBoolean;
4
+ email: z.ZodBoolean;
5
+ }, "strip", z.ZodTypeAny, {
6
+ inApp: boolean;
7
+ email: boolean;
8
+ }, {
9
+ inApp: boolean;
10
+ email: boolean;
11
+ }>;
12
+ export declare const NotificationPreferencesSchema: z.ZodObject<{
13
+ monthlyReport: z.ZodObject<{
14
+ inApp: z.ZodBoolean;
15
+ email: z.ZodBoolean;
16
+ }, "strip", z.ZodTypeAny, {
17
+ inApp: boolean;
18
+ email: boolean;
19
+ }, {
20
+ inApp: boolean;
21
+ email: boolean;
22
+ }>;
23
+ thresholds: z.ZodObject<{
24
+ inApp: z.ZodBoolean;
25
+ email: z.ZodBoolean;
26
+ }, "strip", z.ZodTypeAny, {
27
+ inApp: boolean;
28
+ email: boolean;
29
+ }, {
30
+ inApp: boolean;
31
+ email: boolean;
32
+ }>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ monthlyReport: {
35
+ inApp: boolean;
36
+ email: boolean;
37
+ };
38
+ thresholds: {
39
+ inApp: boolean;
40
+ email: boolean;
41
+ };
42
+ }, {
43
+ monthlyReport: {
44
+ inApp: boolean;
45
+ email: boolean;
46
+ };
47
+ thresholds: {
48
+ inApp: boolean;
49
+ email: boolean;
50
+ };
51
+ }>;
52
+ export type NotificationTypePreference = z.infer<typeof NotificationTypePreferenceSchema>;
53
+ export type NotificationPreferences = z.infer<typeof NotificationPreferencesSchema>;
@@ -0,0 +1,19 @@
1
+ import { z } from "zod";
2
+ import { extendZodWithOpenApi } from "@asteasolutions/zod-to-openapi";
3
+ extendZodWithOpenApi(z);
4
+ export const NotificationTypePreferenceSchema = z
5
+ .object({
6
+ inApp: z.boolean().openapi({ description: "Enable in-app notifications" }),
7
+ email: z.boolean().openapi({ description: "Enable email notifications" }),
8
+ })
9
+ .openapi("NotificationTypePreference");
10
+ export const NotificationPreferencesSchema = z
11
+ .object({
12
+ monthlyReport: NotificationTypePreferenceSchema.openapi({
13
+ description: "Monthly report notification preferences",
14
+ }),
15
+ thresholds: NotificationTypePreferenceSchema.openapi({
16
+ description: "Threshold alerts notification preferences",
17
+ }),
18
+ })
19
+ .openapi("NotificationPreferences");
@@ -10,6 +10,7 @@ export declare const NotificationSchema: z.ZodObject<{
10
10
  url: z.ZodOptional<z.ZodString>;
11
11
  to: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
12
12
  type: z.ZodOptional<z.ZodEnum<["success", "error", "warning", "info", "pending"]>>;
13
+ contentParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
13
14
  isDownloadable: z.ZodOptional<z.ZodBoolean>;
14
15
  }, "strip", z.ZodTypeAny, {
15
16
  title: string;
@@ -21,6 +22,7 @@ export declare const NotificationSchema: z.ZodObject<{
21
22
  type?: "success" | "error" | "warning" | "info" | "pending" | undefined;
22
23
  url?: string | undefined;
23
24
  to?: string[] | undefined;
25
+ contentParams?: Record<string, string | number> | undefined;
24
26
  isDownloadable?: boolean | undefined;
25
27
  }, {
26
28
  title: string;
@@ -32,6 +34,7 @@ export declare const NotificationSchema: z.ZodObject<{
32
34
  type?: "success" | "error" | "warning" | "info" | "pending" | undefined;
33
35
  url?: string | undefined;
34
36
  to?: string[] | undefined;
37
+ contentParams?: Record<string, string | number> | undefined;
35
38
  isDownloadable?: boolean | undefined;
36
39
  }>;
37
40
  export type Notification = z.infer<typeof NotificationSchema>;
@@ -29,6 +29,10 @@ export const NotificationSchema = z
29
29
  .optional()
30
30
  .openapi({ description: "Optional list of recipients" }),
31
31
  type: NotificationTypeSchema.optional(),
32
+ contentParams: z
33
+ .record(z.union([z.string(), z.number()]))
34
+ .optional()
35
+ .openapi({ description: "Optional interpolation params for content i18n key" }),
32
36
  isDownloadable: z
33
37
  .boolean()
34
38
  .optional()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "colibris-types",
3
- "version": "2.0.0",
3
+ "version": "2.1.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",