colibris-types 1.0.42 → 2.0.1

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/lib/computers.js DELETED
@@ -1,221 +0,0 @@
1
- import { z } from "zod";
2
- import { Model } from "./base.js";
3
- //begin asset data section
4
- const AssetGenre = Model.extend({
5
- id_asset_genre: z.number(),
6
- label: z.string(),
7
- });
8
- const AssetStatus = Model.extend({
9
- id_asset_status: z.number(),
10
- label: z.string(),
11
- });
12
- const AssetType = Model.extend({
13
- id_asset_type: z.number(),
14
- label: z.string(),
15
- });
16
- const Asset = Model.extend({
17
- id_asset: z.number(),
18
- id_asset_type: z.number(),
19
- id_company: z.number(),
20
- id_owner_company: z.number(),
21
- serial_number: z.string().max(100).optional(),
22
- external_serial_number: z.string().max(100),
23
- master_record_number: z.string().max(100).optional(),
24
- id_contract: z.number().optional(),
25
- id_asset_status: z.number().optional(),
26
- id_people: z.number().optional(),
27
- id_subsidiary: z.number().optional(),
28
- affectation_date: z.coerce.date().optional(),
29
- });
30
- const Computer = Asset.extend({
31
- id_site: z.number(),
32
- brand: z.string().max(50),
33
- id_asset_genre: z.number(),
34
- age: z.number(),
35
- description: z.string().max(100),
36
- product_code: z.string().max(50).optional(),
37
- order_number: z.string().optional(),
38
- order_date: z.coerce.date().optional(),
39
- deliverydate: z.coerce.date().optional(),
40
- entry_date: z.coerce.date().optional(),
41
- exit__date: z.coerce.date().optional(),
42
- replacement_date: z.coerce.date().optional(),
43
- audit_date: z.coerce.date().optional(),
44
- exit_reason: z.string().max(50).optional(),
45
- pv_number: z.string().max(50).optional(),
46
- cpu: z.string().max(800).optional(),
47
- hdd: z.string().max(50).optional(),
48
- ip_address: z.string().max(100).optional(),
49
- os: z.string().max(100).optional(),
50
- power_consumption: z.string().max(100).optional(),
51
- ram: z.string().max(100).optional(),
52
- unit_price: z.number().optional(),
53
- donations: z.string().max(100).optional(),
54
- rent: z.number().optional(),
55
- repair: z.string().max(50).optional(),
56
- repair_amount: z.number().optional(),
57
- insurance_refund: z.number().optional(),
58
- retrologistic_cost: z.number().optional(),
59
- state: z.string().max(50).optional(),
60
- valorisation_amount: z.number().optional(),
61
- });
62
- const CsrData = Model.extend({
63
- id_asset: z.number(),
64
- carbon_footprint: z.number().optional(),
65
- co2_year: z.number().optional(),
66
- re_use: z.string().optional(),
67
- recycling: z.number().optional(),
68
- EPEAT_grade: z.string().max(50).optional(),
69
- EPEAT_medal: z.string().max(50).optional(),
70
- });
71
- const GroupGenre = Model.extend({
72
- id_asset_group_genre: z.number(),
73
- id_asset_group: z.number(),
74
- id_asset_genre: z.number(),
75
- });
76
- const Group = Model.extend({
77
- id_asset_group: z.number(),
78
- label: z.string().max(50),
79
- });
80
- const PhoneLine = Asset.extend({});
81
- const TelecomInvoiceSummary = z.object({
82
- id_telecom_invoice: z.number(),
83
- id_asset: z.number(),
84
- phone_number: z.string().max(50),
85
- date: z.coerce.date(),
86
- invoice_number: z.string().max(200),
87
- device: z.string().max(200),
88
- amount: z.coerce.number(),
89
- total_overage_amount: z.coerce.number(),
90
- });
91
- const TicketAssetDetail = Model.extend({
92
- id_ticket_asset_detail: z.number(),
93
- id_ticket: z.number(),
94
- id_asset: z.number(),
95
- });
96
- const TicketPriority = Model.extend({
97
- id_ticket_priority: z.number(),
98
- label: z.string().max(50),
99
- });
100
- const TicketStatus = Model.extend({
101
- id_ticket_status: z.number(),
102
- label: z.string().max(50),
103
- });
104
- const TicketType = Model.extend({
105
- id_ticket_type: z.number(),
106
- label: z.string().max(50),
107
- });
108
- const AssetGenreUpload = z.object({ Genre: z.string().max(50) });
109
- const AssetStatusUpload = z.object({ Status: z.string().max(50) });
110
- const AssetTypeUpload = z.object({ Type: z.string().max(50) });
111
- const OptLabelsUpload = AssetGenreUpload.partial().merge(AssetStatusUpload.partial());
112
- const PeopleUploadKey = z.object({ PersonNumber: z.string().max(50) });
113
- const SubsidiaryUploadKey = z.object({ SubsidiaryName: z.string().max(200) });
114
- const SiteUploadKey = z.object({ SiteName: z.string().max(200) });
115
- const OptAssetAffectationUplad = PeopleUploadKey.partial()
116
- .merge(SubsidiaryUploadKey.partial())
117
- .merge(z.object({ AffectationDate: z.coerce.date().optional() }));
118
- const AssetUpload = z
119
- .object({
120
- OwnerCompanyName: z.string().max(100),
121
- SerialNumber: z.string().max(200),
122
- ExternalIdNumber: z.string().max(200),
123
- })
124
- .merge(AssetTypeUpload)
125
- .merge(OptLabelsUpload)
126
- .merge(OptAssetAffectationUplad);
127
- const DATE_REGEX = /^\d{2}\/\d{2}\/\d{4}$/;
128
- const ComputerUpload = z.array(z.object({
129
- ID: z.string(),
130
- "N° de série": z.string().optional(),
131
- "N° Interne": z.string().optional(),
132
- Propriétaire: z.string().max(100).optional(),
133
- Type: z.string().optional(),
134
- Constructeur: z.string().optional(),
135
- "Code produit": z.string().optional(),
136
- Label: z.string(),
137
- CPU: z.string().optional(),
138
- OS: z.string().optional(),
139
- RAM: z.string().optional(),
140
- "Mémoire Disque": z.string().optional(),
141
- "Adresse IP": z.string().optional(),
142
- "N° de Commande": z.string().optional(),
143
- "Date de la Commande": z.string().regex(DATE_REGEX).optional(),
144
- "Date de livraison": z.string().regex(DATE_REGEX).optional(),
145
- "Date d'entrée": z.string().regex(DATE_REGEX).optional(),
146
- "Date prévi": z.string().regex(DATE_REGEX).optional(),
147
- "Date de sortie": z.string().regex(DATE_REGEX).optional(),
148
- "Motif de sortie": z.string().optional(),
149
- "Montant de la valorisation": z
150
- .string()
151
- .transform((v) => parseFloat(v.replace(",", ".")))
152
- .pipe(z.number())
153
- .optional(),
154
- "Coûts de rétrologistique": z
155
- .string()
156
- .transform((v) => parseFloat(v.replace(",", ".")))
157
- .pipe(z.number())
158
- .optional(),
159
- Grade: z.string().optional(),
160
- "Montant Remboursement Assurance": z
161
- .string()
162
- .transform((v) => parseFloat(v.replace(",", ".")))
163
- .pipe(z.number())
164
- .optional(),
165
- "Montant de la franchise": z
166
- .string()
167
- .transform((v) => parseFloat(v.replace(",", ".")))
168
- .pipe(z.number())
169
- .optional(),
170
- "Date de Remboursement Assurance": z.string().regex(DATE_REGEX).optional(),
171
- "Date de facture": z.string().regex(DATE_REGEX).optional(),
172
- "N° Facture": z.string().optional(),
173
- Avenant: z.string().optional(),
174
- "Prix unitaire": z
175
- .string()
176
- .transform((v) => parseFloat(v.replace(",", ".")))
177
- .pipe(z.number())
178
- .optional(),
179
- "Valeur Nette Résiduelle Comptable": z
180
- .string()
181
- .transform((v) => parseFloat(v.replace(",", ".")))
182
- .pipe(z.number())
183
- .optional(),
184
- Matricule: z.string().optional(),
185
- Statut: z.string().optional(),
186
- Site: z.string().optional(),
187
- Filiale: z.string().optional(),
188
- "Montant Réparation": z
189
- .string()
190
- .transform((v) => parseFloat(v.replace(",", ".")))
191
- .pipe(z.number())
192
- .optional(),
193
- "N° de PV": z.string().max(50).optional(),
194
- Loyer: z
195
- .string()
196
- .transform((v) => parseFloat(v.replace(",", ".")))
197
- .pipe(z.number())
198
- .optional(),
199
- "Bénéficiaire du Don": z.string().optional(),
200
- "Date du Don": z.string().regex(DATE_REGEX).optional(),
201
- }));
202
- export const assetDefinitions = {
203
- asset_genre: AssetGenre,
204
- asset_status: AssetStatus,
205
- asset_types: AssetType,
206
- asset: Asset,
207
- asset_upload: AssetUpload,
208
- computer: Computer,
209
- computer_upload: ComputerUpload,
210
- csr_data: CsrData,
211
- group_genre: GroupGenre,
212
- group: Group,
213
- phone_line: PhoneLine,
214
- telecom_invoice_summary: TelecomInvoiceSummary,
215
- ticket_asset_detail: TicketAssetDetail,
216
- ticket_priority: TicketPriority,
217
- ticket_status: TicketStatus,
218
- ticket_type: TicketType,
219
- };
220
- export { AssetGenre, AssetStatus, AssetType, Asset, AssetUpload, Computer, ComputerUpload, CsrData, GroupGenre, Group, PhoneLine, TelecomInvoiceSummary, TicketAssetDetail, TicketPriority, TicketStatus, TicketType, };
221
- //end asset data section
package/lib/licenses.d.ts DELETED
@@ -1,96 +0,0 @@
1
- import { z } from "zod";
2
- declare const LicenseTraceUpload: z.ZodObject<{
3
- usageDate: z.ZodDate;
4
- productName: z.ZodOptional<z.ZodString>;
5
- productVersion: z.ZodOptional<z.ZodNumber>;
6
- userName: z.ZodString;
7
- machineName: z.ZodOptional<z.ZodString>;
8
- licenseServerName: z.ZodOptional<z.ZodString>;
9
- usageType: z.ZodOptional<z.ZodString>;
10
- country: z.ZodOptional<z.ZodString>;
11
- subsidiary: z.ZodOptional<z.ZodString>;
12
- site: z.ZodOptional<z.ZodString>;
13
- employeeId: z.ZodOptional<z.ZodString>;
14
- tokensConsumed: z.ZodOptional<z.ZodNumber>;
15
- useCount: z.ZodOptional<z.ZodNumber>;
16
- usageHours: z.ZodOptional<z.ZodNumber>;
17
- }, "strip", z.ZodTypeAny, {
18
- usageDate: Date;
19
- userName: string;
20
- country?: string | undefined;
21
- productName?: string | undefined;
22
- productVersion?: number | undefined;
23
- machineName?: string | undefined;
24
- licenseServerName?: string | undefined;
25
- usageType?: string | undefined;
26
- subsidiary?: string | undefined;
27
- site?: string | undefined;
28
- employeeId?: string | undefined;
29
- tokensConsumed?: number | undefined;
30
- useCount?: number | undefined;
31
- usageHours?: number | undefined;
32
- }, {
33
- usageDate: Date;
34
- userName: string;
35
- country?: string | undefined;
36
- productName?: string | undefined;
37
- productVersion?: number | undefined;
38
- machineName?: string | undefined;
39
- licenseServerName?: string | undefined;
40
- usageType?: string | undefined;
41
- subsidiary?: string | undefined;
42
- site?: string | undefined;
43
- employeeId?: string | undefined;
44
- tokensConsumed?: number | undefined;
45
- useCount?: number | undefined;
46
- usageHours?: number | undefined;
47
- }>;
48
- export declare const licenseDefintions: {
49
- license_trace_upload: z.ZodObject<{
50
- usageDate: z.ZodDate;
51
- productName: z.ZodOptional<z.ZodString>;
52
- productVersion: z.ZodOptional<z.ZodNumber>;
53
- userName: z.ZodString;
54
- machineName: z.ZodOptional<z.ZodString>;
55
- licenseServerName: z.ZodOptional<z.ZodString>;
56
- usageType: z.ZodOptional<z.ZodString>;
57
- country: z.ZodOptional<z.ZodString>;
58
- subsidiary: z.ZodOptional<z.ZodString>;
59
- site: z.ZodOptional<z.ZodString>;
60
- employeeId: z.ZodOptional<z.ZodString>;
61
- tokensConsumed: z.ZodOptional<z.ZodNumber>;
62
- useCount: z.ZodOptional<z.ZodNumber>;
63
- usageHours: z.ZodOptional<z.ZodNumber>;
64
- }, "strip", z.ZodTypeAny, {
65
- usageDate: Date;
66
- userName: string;
67
- country?: string | undefined;
68
- productName?: string | undefined;
69
- productVersion?: number | undefined;
70
- machineName?: string | undefined;
71
- licenseServerName?: string | undefined;
72
- usageType?: string | undefined;
73
- subsidiary?: string | undefined;
74
- site?: string | undefined;
75
- employeeId?: string | undefined;
76
- tokensConsumed?: number | undefined;
77
- useCount?: number | undefined;
78
- usageHours?: number | undefined;
79
- }, {
80
- usageDate: Date;
81
- userName: string;
82
- country?: string | undefined;
83
- productName?: string | undefined;
84
- productVersion?: number | undefined;
85
- machineName?: string | undefined;
86
- licenseServerName?: string | undefined;
87
- usageType?: string | undefined;
88
- subsidiary?: string | undefined;
89
- site?: string | undefined;
90
- employeeId?: string | undefined;
91
- tokensConsumed?: number | undefined;
92
- useCount?: number | undefined;
93
- usageHours?: number | undefined;
94
- }>;
95
- };
96
- export { LicenseTraceUpload };
package/lib/licenses.js DELETED
@@ -1,21 +0,0 @@
1
- import { z } from "zod";
2
- const LicenseTraceUpload = z.object({
3
- usageDate: z.coerce.date(),
4
- productName: z.string().optional(),
5
- productVersion: z.coerce.number().optional(),
6
- userName: z.string(),
7
- machineName: z.string().optional(),
8
- licenseServerName: z.string().optional(),
9
- usageType: z.string().optional(),
10
- country: z.string().optional(),
11
- subsidiary: z.string().optional(),
12
- site: z.string().optional(),
13
- employeeId: z.string().optional(),
14
- tokensConsumed: z.coerce.number().optional(),
15
- useCount: z.coerce.number().optional(),
16
- usageHours: z.coerce.number().optional(),
17
- });
18
- export const licenseDefintions = {
19
- license_trace_upload: LicenseTraceUpload,
20
- };
21
- export { LicenseTraceUpload };