@jaws-developers-customers/consulca-types 1.1.15 → 1.1.23
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/README.md +99 -86
- package/index.d.ts +311 -268
- package/index.js +153 -149
- package/index.mjs +31 -30
- package/package.json +51 -51
package/README.md
CHANGED
|
@@ -1,86 +1,99 @@
|
|
|
1
|
-
# @jaws-developers-customers/consulca-types
|
|
2
|
-
|
|
3
|
-
Pacchetto NPM con tipi del dominio Consulca e helper pronti all'uso per date, valuta e oggetti principali derivati dallo schema MariaDB.
|
|
4
|
-
|
|
5
|
-
## Installazione
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install @jaws-developers-customers/consulca-types
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Pubblicazione automatica
|
|
12
|
-
|
|
13
|
-
Ogni push su `master` esegue i test e pubblica automaticamente il pacchetto su npm tramite GitHub Actions.
|
|
14
|
-
|
|
15
|
-
Prerequisito:
|
|
16
|
-
|
|
17
|
-
- npm Trusted Publisher configurato nelle impostazioni del pacchetto su npm per l'organizzazione `JAWS-Developers-Customers`, il repository `15-NPMPackage` e il workflow `publish.yml` (senza environment).
|
|
18
|
-
|
|
19
|
-
Il trusted publishing richiede npm 11.5.1 o successivo: il workflow installa npm 11.21.0 prima della pubblicazione, senza usare `NPM_TOKEN`. La versione npm 10 inclusa in Node.js 22 non supporta questa autenticazione, anche se può generare la provenance.
|
|
20
|
-
|
|
21
|
-
Il workflow
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
- `
|
|
31
|
-
- `
|
|
32
|
-
- `
|
|
33
|
-
- `
|
|
34
|
-
- `
|
|
35
|
-
- `
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
console.log(
|
|
50
|
-
console.log(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
1
|
+
# @jaws-developers-customers/consulca-types
|
|
2
|
+
|
|
3
|
+
Pacchetto NPM con tipi del dominio Consulca e helper pronti all'uso per date, valuta e oggetti principali derivati dallo schema MariaDB.
|
|
4
|
+
|
|
5
|
+
## Installazione
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @jaws-developers-customers/consulca-types
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Pubblicazione automatica
|
|
12
|
+
|
|
13
|
+
Ogni push su `master` esegue i test e pubblica automaticamente il pacchetto su npm tramite GitHub Actions.
|
|
14
|
+
|
|
15
|
+
Prerequisito:
|
|
16
|
+
|
|
17
|
+
- npm Trusted Publisher configurato nelle impostazioni del pacchetto su npm per l'organizzazione `JAWS-Developers-Customers`, il repository `15-NPMPackage` e il workflow `publish.yml` (senza environment).
|
|
18
|
+
|
|
19
|
+
Il trusted publishing richiede npm 11.5.1 o successivo: il workflow installa npm 11.21.0 prima della pubblicazione, senza usare `NPM_TOKEN`. La versione npm 10 inclusa in Node.js 22 non supporta questa autenticazione, anche se può generare la provenance.
|
|
20
|
+
|
|
21
|
+
Il pacchetto viene sempre pubblicato con accesso pubblico. La visibilità del pacchetto npm è distinta da quella del repository GitHub: npm abilita automaticamente la provenance quando il token OIDC identifica un repository sorgente pubblico e il pacchetto è pubblico. Il workflow non forza `--provenance`, perché npm rifiuta la provenance di un repository identificato come privato con errore `E422`, anche se il pacchetto è pubblico. L'autenticazione OIDC rimane attiva anche senza provenance.
|
|
22
|
+
|
|
23
|
+
Il workflow genera una versione unica per ogni run su `master`, così la pubblicazione non fallisce per versioni duplicate.
|
|
24
|
+
|
|
25
|
+
## Cosa esporta
|
|
26
|
+
|
|
27
|
+
- tipi TypeScript per le entità principali (`User`, `Property`, `Lease`, `Inspection`, `Claim`, `Work`, ...)
|
|
28
|
+
- cataloghi `ENUM` dello schema (`USER_ROLES`, `ACCESS_CHANNELS`, `ACCESS_ROLES`, `DEVICE_TYPES`, ...)
|
|
29
|
+
- helper:
|
|
30
|
+
- `formatDate`
|
|
31
|
+
- `formatDateTime`
|
|
32
|
+
- `formatCurrency`
|
|
33
|
+
- `getUserFullName`
|
|
34
|
+
- `formatAddress`
|
|
35
|
+
- `hasUserRole`
|
|
36
|
+
- `hasAccessChannel`
|
|
37
|
+
- `Query.isSuccess`
|
|
38
|
+
|
|
39
|
+
## Esempio
|
|
40
|
+
|
|
41
|
+
```js
|
|
42
|
+
const {
|
|
43
|
+
formatCurrency,
|
|
44
|
+
formatDate,
|
|
45
|
+
getUserFullName,
|
|
46
|
+
hasUserRole,
|
|
47
|
+
} = require('@jaws-developers-customers/consulca-types');
|
|
48
|
+
|
|
49
|
+
console.log(formatDate('2026-09-16T10:30:00Z'));
|
|
50
|
+
console.log(formatCurrency(1250.5));
|
|
51
|
+
console.log(getUserFullName({ first_name: 'Mario', last_name: 'Rossi' }));
|
|
52
|
+
console.log(hasUserRole([{ role: 'manager' }], 'manager'));
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`Query.isSuccess(error_code)` restituisce `true` per i codici nel formato `xx.xx.xxx` il cui ultimo gruppo inizia con `0`.
|
|
56
|
+
|
|
57
|
+
### Esempio TypeScript
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
import {
|
|
61
|
+
formatDateTime,
|
|
62
|
+
type Inspection,
|
|
63
|
+
type User,
|
|
64
|
+
} from '@jaws-developers-customers/consulca-types';
|
|
65
|
+
|
|
66
|
+
const user: User = {
|
|
67
|
+
id: 'uuid',
|
|
68
|
+
email: 'mario.rossi@example.com',
|
|
69
|
+
first_name: 'Mario',
|
|
70
|
+
last_name: 'Rossi',
|
|
71
|
+
status: 'active',
|
|
72
|
+
country_code: 'CH',
|
|
73
|
+
access_channels: [{
|
|
74
|
+
channel: 'intranet_dashboard',
|
|
75
|
+
role: 'employee',
|
|
76
|
+
status: 'active',
|
|
77
|
+
created_at: '2026-10-05 18:29:50',
|
|
78
|
+
revoked_at: null,
|
|
79
|
+
}],
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const inspection: Inspection = {
|
|
83
|
+
id: 'uuid',
|
|
84
|
+
lease_id: 'lease-id',
|
|
85
|
+
inspector_id: user.id,
|
|
86
|
+
inspection_type: 'move_in',
|
|
87
|
+
status: 'draft',
|
|
88
|
+
created_at: new Date(),
|
|
89
|
+
updated_at: new Date(),
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
console.log(formatDateTime(inspection.created_at, 'it-CH'));
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
`User` accetta direttamente i dati di `/user/get/me`: `password_hash`, `created_at` e `updated_at` non sono obbligatori. Non salvare la password o il suo hash nello stato client. I canali sono contenuti in `user.access_channels`, senza richiedere `user_id` per ogni elemento; `AccessChannelAssignment` rappresenta invece una riga della tabella con `user_id` obbligatorio.
|
|
96
|
+
|
|
97
|
+
`ACCESS_ROLES` descrive i ruoli di `access_channels` e `user_invites`, mentre `USER_ROLES` descrive quelli della tabella `user_roles`. Per verificare l'accesso usa `hasAccessChannel(user.access_channels, 'intranet_dashboard')`: i canali revocati vengono esclusi.
|
|
98
|
+
|
|
99
|
+
I riferimenti agli appartamenti usano `apartment_id`, `Property` usa `apartment_number` e gli allegati delle ispezioni usano `inspection_item_id`. Sono disponibili anche `Device`, `UserInvite`, `Room`, `ApartmentRoom`, `ApartmentLessor` e `ApartmentManager`. I campi SQL nullable accettano `null`; i decimali accettano numeri o stringhe restituiti dal driver MariaDB.
|
package/index.d.ts
CHANGED
|
@@ -1,268 +1,311 @@
|
|
|
1
|
-
export type UserStatus = 'active' | 'invited' | 'suspended' | 'disabled';
|
|
2
|
-
export type UserRole = 'lessor' | 'manager' | 'website_manager' | 'inspector';
|
|
3
|
-
export type AccessChannel = 'intranet_dashboard' | 'mobile_app' | 'website_admin';
|
|
4
|
-
export type
|
|
5
|
-
export type
|
|
6
|
-
export type
|
|
7
|
-
export type
|
|
8
|
-
export type
|
|
9
|
-
export type
|
|
10
|
-
export type
|
|
11
|
-
export type
|
|
12
|
-
export type
|
|
13
|
-
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
created_at: string | Date;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
status:
|
|
126
|
-
created_at: string | Date;
|
|
127
|
-
updated_at: string | Date;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
export interface
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
export
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
export
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
export
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
export declare
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
1
|
+
export type UserStatus = 'active' | 'invited' | 'suspended' | 'disabled';
|
|
2
|
+
export type UserRole = 'lessor' | 'manager' | 'website_manager' | 'inspector';
|
|
3
|
+
export type AccessChannel = 'intranet_dashboard' | 'mobile_app' | 'website_admin';
|
|
4
|
+
export type AccessRole = 'admin' | 'manager' | 'employee' | 'lessor' | 'inspector' | 'editor';
|
|
5
|
+
export type AccessStatus = 'active' | 'revoked';
|
|
6
|
+
export type DeviceType = 'web' | 'mobile';
|
|
7
|
+
export type PropertyStatus = 'active' | 'inactive' | 'archived';
|
|
8
|
+
export type ManagementRole = 'primary' | 'secondary' | 'accounting' | 'technical' | 'other';
|
|
9
|
+
export type LeaseStatus = 'planned' | 'active' | 'ended' | 'cancelled';
|
|
10
|
+
export type InspectionType = 'move_in' | 'move_out';
|
|
11
|
+
export type InspectionStatus = 'draft' | 'in_progress' | 'submitted' | 'approved' | 'rejected';
|
|
12
|
+
export type ConditionStatus = 'good' | 'minor_damage' | 'major_damage' | 'not_checked';
|
|
13
|
+
export type ClaimStatus = 'draft' | 'submitted' | 'in_review' | 'approved' | 'rejected' | 'closed';
|
|
14
|
+
export type WorkStatus = 'planned' | 'assigned' | 'in_progress' | 'completed' | 'cancelled';
|
|
15
|
+
|
|
16
|
+
export interface ColorPalette {
|
|
17
|
+
primary: string;
|
|
18
|
+
secondary: string;
|
|
19
|
+
accent: string;
|
|
20
|
+
background: string;
|
|
21
|
+
text: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface Constants {
|
|
25
|
+
API_DEV: string;
|
|
26
|
+
API: string;
|
|
27
|
+
ICON: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface QueryHelpers {
|
|
31
|
+
isSuccess(errorCode: string): boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface Addressable {
|
|
35
|
+
address_line1?: string | null;
|
|
36
|
+
address_line2?: string | null;
|
|
37
|
+
postal_code?: string | null;
|
|
38
|
+
city?: string | null;
|
|
39
|
+
country_code?: string | null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface User extends Addressable {
|
|
43
|
+
id: string;
|
|
44
|
+
email: string;
|
|
45
|
+
password_hash?: string;
|
|
46
|
+
first_name: string;
|
|
47
|
+
last_name: string;
|
|
48
|
+
phone?: string | null;
|
|
49
|
+
country_code: string;
|
|
50
|
+
status: UserStatus;
|
|
51
|
+
email_verified_at?: string | Date | null;
|
|
52
|
+
last_login_at?: string | Date | null;
|
|
53
|
+
created_at?: string | Date;
|
|
54
|
+
updated_at?: string | Date;
|
|
55
|
+
access_channels?: UserAccessChannel[];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface UserRoleAssignment {
|
|
59
|
+
user_id: string;
|
|
60
|
+
role: UserRole;
|
|
61
|
+
created_at: string | Date;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface UserAccessChannel {
|
|
65
|
+
user_id?: string;
|
|
66
|
+
channel: AccessChannel;
|
|
67
|
+
role: AccessRole;
|
|
68
|
+
status: AccessStatus;
|
|
69
|
+
created_at: string | Date;
|
|
70
|
+
revoked_at?: string | Date | null;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface AccessChannelAssignment extends UserAccessChannel {
|
|
74
|
+
user_id: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface UserInvite {
|
|
78
|
+
email: string;
|
|
79
|
+
token_hash: string;
|
|
80
|
+
channel: AccessChannel;
|
|
81
|
+
role: AccessRole;
|
|
82
|
+
inviter_id: string;
|
|
83
|
+
expires_at: string | Date;
|
|
84
|
+
used_at?: string | Date | null;
|
|
85
|
+
created_at: string | Date;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface Device {
|
|
89
|
+
uuid: string;
|
|
90
|
+
user_id?: string | null;
|
|
91
|
+
type: DeviceType;
|
|
92
|
+
allowed: boolean | number;
|
|
93
|
+
os: string;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export interface Session {
|
|
97
|
+
token: string;
|
|
98
|
+
type: string;
|
|
99
|
+
expire: string | Date;
|
|
100
|
+
refresh_token: string;
|
|
101
|
+
refresh_expire: string | Date;
|
|
102
|
+
code?: string | null;
|
|
103
|
+
code_expire: string | Date;
|
|
104
|
+
user_id: string;
|
|
105
|
+
device_uuid: string;
|
|
106
|
+
ip: string;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface Building extends Addressable {
|
|
110
|
+
id: string;
|
|
111
|
+
name: string;
|
|
112
|
+
address_line1: string;
|
|
113
|
+
postal_code: string;
|
|
114
|
+
city: string;
|
|
115
|
+
created_at: string | Date;
|
|
116
|
+
updated_at: string | Date;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface Property {
|
|
120
|
+
id: string;
|
|
121
|
+
building_id: string;
|
|
122
|
+
apartment_number: string;
|
|
123
|
+
floor?: string | null;
|
|
124
|
+
area_m2?: number | string | null;
|
|
125
|
+
status: PropertyStatus;
|
|
126
|
+
created_at: string | Date;
|
|
127
|
+
updated_at: string | Date;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface PropertyLessor {
|
|
131
|
+
apartment_id: string;
|
|
132
|
+
user_id: string;
|
|
133
|
+
ownership_share?: number | string | null;
|
|
134
|
+
is_primary: boolean | number;
|
|
135
|
+
created_at: string | Date;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export interface PropertyManager {
|
|
139
|
+
apartment_id: string;
|
|
140
|
+
user_id: string;
|
|
141
|
+
management_role: ManagementRole;
|
|
142
|
+
valid_from?: string | Date | null;
|
|
143
|
+
valid_until?: string | Date | null;
|
|
144
|
+
created_at: string | Date;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface Lease {
|
|
148
|
+
id: string;
|
|
149
|
+
apartment_id: string;
|
|
150
|
+
tenant_name?: string | null;
|
|
151
|
+
tenant_email?: string | null;
|
|
152
|
+
tenant_phone?: string | null;
|
|
153
|
+
start_date: string | Date;
|
|
154
|
+
end_date?: string | Date | null;
|
|
155
|
+
status: LeaseStatus;
|
|
156
|
+
created_at: string | Date;
|
|
157
|
+
updated_at: string | Date;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface Inspection {
|
|
161
|
+
id: string;
|
|
162
|
+
lease_id: string;
|
|
163
|
+
inspector_id: string;
|
|
164
|
+
inspection_type: InspectionType;
|
|
165
|
+
status: InspectionStatus;
|
|
166
|
+
scheduled_at?: string | Date | null;
|
|
167
|
+
started_at?: string | Date | null;
|
|
168
|
+
submitted_at?: string | Date | null;
|
|
169
|
+
notes?: string | null;
|
|
170
|
+
created_at: string | Date;
|
|
171
|
+
updated_at: string | Date;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export interface InspectionItem {
|
|
175
|
+
id: string;
|
|
176
|
+
inspection_id: string;
|
|
177
|
+
room_id?: string | null;
|
|
178
|
+
item_name: string;
|
|
179
|
+
condition_status: ConditionStatus;
|
|
180
|
+
comment?: string | null;
|
|
181
|
+
created_at: string | Date;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export interface InspectionAttachment {
|
|
185
|
+
id: string;
|
|
186
|
+
inspection_item_id: string;
|
|
187
|
+
file_name: string;
|
|
188
|
+
storage_key: string;
|
|
189
|
+
mime_type?: string | null;
|
|
190
|
+
file_size?: number | null;
|
|
191
|
+
created_at: string | Date;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export interface Claim {
|
|
195
|
+
id: string;
|
|
196
|
+
apartment_id: string;
|
|
197
|
+
submitted_by: string;
|
|
198
|
+
status: ClaimStatus;
|
|
199
|
+
incident_date?: string | Date | null;
|
|
200
|
+
title: string;
|
|
201
|
+
description: string;
|
|
202
|
+
amount_estimate?: number | string | null;
|
|
203
|
+
submitted_at?: string | Date | null;
|
|
204
|
+
created_at: string | Date;
|
|
205
|
+
updated_at: string | Date;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export interface ClaimAttachment {
|
|
209
|
+
id: string;
|
|
210
|
+
claim_id: string;
|
|
211
|
+
file_name: string;
|
|
212
|
+
storage_key: string;
|
|
213
|
+
mime_type?: string | null;
|
|
214
|
+
file_size?: number | null;
|
|
215
|
+
created_at: string | Date;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export interface Manufacturer extends Pick<Addressable, 'address_line1' | 'postal_code' | 'city'> {
|
|
219
|
+
id: string;
|
|
220
|
+
name: string;
|
|
221
|
+
country_code: string;
|
|
222
|
+
email?: string | null;
|
|
223
|
+
phone?: string | null;
|
|
224
|
+
created_at: string | Date;
|
|
225
|
+
updated_at: string | Date;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export interface Work {
|
|
229
|
+
id: string;
|
|
230
|
+
apartment_id: string;
|
|
231
|
+
manufacturer_id?: string | null;
|
|
232
|
+
created_by: string;
|
|
233
|
+
title: string;
|
|
234
|
+
description?: string | null;
|
|
235
|
+
status: WorkStatus;
|
|
236
|
+
scheduled_at?: string | Date | null;
|
|
237
|
+
completed_at?: string | Date | null;
|
|
238
|
+
created_at: string | Date;
|
|
239
|
+
updated_at: string | Date;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export interface AuditLog {
|
|
243
|
+
action_id: string;
|
|
244
|
+
timestamp: string | Date;
|
|
245
|
+
user_id: string;
|
|
246
|
+
action: string;
|
|
247
|
+
other_data?: string | null;
|
|
248
|
+
ip: string;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export type ApartmentLessor = PropertyLessor;
|
|
252
|
+
export type ApartmentManager = PropertyManager;
|
|
253
|
+
|
|
254
|
+
export interface Room {
|
|
255
|
+
id: string;
|
|
256
|
+
name: string;
|
|
257
|
+
weight: number;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export interface ApartmentRoom {
|
|
261
|
+
apartment_id: string;
|
|
262
|
+
room_id: string;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export declare const USER_STATUSES: readonly UserStatus[];
|
|
266
|
+
export declare const USER_ROLES: readonly UserRole[];
|
|
267
|
+
export declare const ACCESS_CHANNELS: readonly AccessChannel[];
|
|
268
|
+
export declare const ACCESS_ROLES: readonly AccessRole[];
|
|
269
|
+
export declare const ACCESS_STATUSES: readonly AccessStatus[];
|
|
270
|
+
export declare const DEVICE_TYPES: readonly DeviceType[];
|
|
271
|
+
export declare const PROPERTY_STATUSES: readonly PropertyStatus[];
|
|
272
|
+
export declare const MANAGEMENT_ROLES: readonly ManagementRole[];
|
|
273
|
+
export declare const LEASE_STATUSES: readonly LeaseStatus[];
|
|
274
|
+
export declare const INSPECTION_TYPES: readonly InspectionType[];
|
|
275
|
+
export declare const INSPECTION_STATUSES: readonly InspectionStatus[];
|
|
276
|
+
export declare const CONDITION_STATUSES: readonly ConditionStatus[];
|
|
277
|
+
export declare const CLAIM_STATUSES: readonly ClaimStatus[];
|
|
278
|
+
export declare const WORK_STATUSES: readonly WorkStatus[];
|
|
279
|
+
export declare const COLOR_PALETTE: Readonly<ColorPalette>;
|
|
280
|
+
export declare const CONSTANTS: Readonly<Constants>;
|
|
281
|
+
export declare const Query: Readonly<QueryHelpers>;
|
|
282
|
+
|
|
283
|
+
export declare function toDate(value: string | number | Date | null | undefined): Date | null;
|
|
284
|
+
export declare function formatDate(
|
|
285
|
+
value: string | number | Date | null | undefined,
|
|
286
|
+
locales?: string | string[],
|
|
287
|
+
options?: Intl.DateTimeFormatOptions
|
|
288
|
+
): string;
|
|
289
|
+
export declare function formatDateTime(
|
|
290
|
+
value: string | number | Date | null | undefined,
|
|
291
|
+
locales?: string | string[],
|
|
292
|
+
options?: Intl.DateTimeFormatOptions
|
|
293
|
+
): string;
|
|
294
|
+
export declare function formatCurrency(
|
|
295
|
+
amount: string | number | null | undefined,
|
|
296
|
+
currency?: string,
|
|
297
|
+
locales?: string | string[],
|
|
298
|
+
options?: Intl.NumberFormatOptions
|
|
299
|
+
): string;
|
|
300
|
+
export declare function getUserFullName(
|
|
301
|
+
user: Pick<User, 'first_name' | 'last_name'> | Partial<Pick<User, 'first_name' | 'last_name'>> | null | undefined
|
|
302
|
+
): string;
|
|
303
|
+
export declare function formatAddress(entity: Addressable | null | undefined): string;
|
|
304
|
+
export declare function hasUserRole(
|
|
305
|
+
userRoles: ReadonlyArray<Pick<UserRoleAssignment, 'role'> | UserRole> | null | undefined,
|
|
306
|
+
role: UserRole
|
|
307
|
+
): boolean;
|
|
308
|
+
export declare function hasAccessChannel(
|
|
309
|
+
accessChannels: ReadonlyArray<Pick<UserAccessChannel, 'channel'> & Partial<Pick<UserAccessChannel, 'status'>> | AccessChannel> | null | undefined,
|
|
310
|
+
channel: AccessChannel
|
|
311
|
+
): boolean;
|
package/index.js
CHANGED
|
@@ -1,149 +1,153 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const USER_STATUSES = Object.freeze(['active', 'invited', 'suspended', 'disabled']);
|
|
4
|
-
const USER_ROLES = Object.freeze(['lessor', 'manager', 'website_manager', 'inspector']);
|
|
5
|
-
const ACCESS_CHANNELS = Object.freeze(['intranet_dashboard', 'mobile_app', 'website_admin']);
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const USER_STATUSES = Object.freeze(['active', 'invited', 'suspended', 'disabled']);
|
|
4
|
+
const USER_ROLES = Object.freeze(['lessor', 'manager', 'website_manager', 'inspector']);
|
|
5
|
+
const ACCESS_CHANNELS = Object.freeze(['intranet_dashboard', 'mobile_app', 'website_admin']);
|
|
6
|
+
const ACCESS_ROLES = Object.freeze(['admin', 'manager', 'employee', 'lessor', 'inspector', 'editor']);
|
|
7
|
+
const ACCESS_STATUSES = Object.freeze(['active', 'revoked']);
|
|
8
|
+
const DEVICE_TYPES = Object.freeze(['web', 'mobile']);
|
|
9
|
+
const PROPERTY_STATUSES = Object.freeze(['active', 'inactive', 'archived']);
|
|
10
|
+
const MANAGEMENT_ROLES = Object.freeze(['primary', 'secondary', 'accounting', 'technical', 'other']);
|
|
11
|
+
const LEASE_STATUSES = Object.freeze(['planned', 'active', 'ended', 'cancelled']);
|
|
12
|
+
const INSPECTION_TYPES = Object.freeze(['move_in', 'move_out']);
|
|
13
|
+
const INSPECTION_STATUSES = Object.freeze(['draft', 'in_progress', 'submitted', 'approved', 'rejected']);
|
|
14
|
+
const CONDITION_STATUSES = Object.freeze(['good', 'minor_damage', 'major_damage', 'not_checked']);
|
|
15
|
+
const CLAIM_STATUSES = Object.freeze(['draft', 'submitted', 'in_review', 'approved', 'rejected', 'closed']);
|
|
16
|
+
const WORK_STATUSES = Object.freeze(['planned', 'assigned', 'in_progress', 'completed', 'cancelled']);
|
|
17
|
+
const COLOR_PALETTE = Object.freeze({
|
|
18
|
+
primary: '#334E68',
|
|
19
|
+
secondary: '#829AB1',
|
|
20
|
+
accent: '#D64545',
|
|
21
|
+
background: '#F7F9FB',
|
|
22
|
+
text: '#102A43',
|
|
23
|
+
});
|
|
24
|
+
const CONSTANTS = Object.freeze({
|
|
25
|
+
API_DEV: 'https://test.jawsdevelopers.ch',
|
|
26
|
+
API: 'https://api.consulca.ch',
|
|
27
|
+
ICON: 'https://www.consulca.ch/wp-content/themes/consulca_theme2020/img/default_user.png'
|
|
28
|
+
});
|
|
29
|
+
const Query = Object.freeze({
|
|
30
|
+
isSuccess(errorCode) {
|
|
31
|
+
return typeof errorCode === 'string' && /^\d{2}\.\d{2}\.0\d{2}$/.test(errorCode);
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
function toDate(value) {
|
|
36
|
+
if (value === null || value === undefined || value === '') {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const date = value instanceof Date ? value : new Date(value);
|
|
41
|
+
return Number.isNaN(date.getTime()) ? null : date;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function formatDate(value, locales = 'it-CH', options = {}) {
|
|
45
|
+
const date = toDate(value);
|
|
46
|
+
if (!date) {
|
|
47
|
+
return '';
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return new Intl.DateTimeFormat(locales, {
|
|
51
|
+
year: 'numeric',
|
|
52
|
+
month: '2-digit',
|
|
53
|
+
day: '2-digit',
|
|
54
|
+
...options,
|
|
55
|
+
}).format(date);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function formatDateTime(value, locales = 'it-CH', options = {}) {
|
|
59
|
+
const date = toDate(value);
|
|
60
|
+
if (!date) {
|
|
61
|
+
return '';
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return new Intl.DateTimeFormat(locales, {
|
|
65
|
+
year: 'numeric',
|
|
66
|
+
month: '2-digit',
|
|
67
|
+
day: '2-digit',
|
|
68
|
+
hour: '2-digit',
|
|
69
|
+
minute: '2-digit',
|
|
70
|
+
...options,
|
|
71
|
+
}).format(date);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function formatCurrency(amount, currency = 'CHF', locales = 'it-CH', options = {}) {
|
|
75
|
+
if (amount === null || amount === undefined || amount === '') {
|
|
76
|
+
return '';
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const numericAmount = Number(amount);
|
|
80
|
+
if (Number.isNaN(numericAmount)) {
|
|
81
|
+
return '';
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return new Intl.NumberFormat(locales, {
|
|
85
|
+
style: 'currency',
|
|
86
|
+
currency,
|
|
87
|
+
...options,
|
|
88
|
+
}).format(numericAmount);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function getUserFullName(user) {
|
|
92
|
+
return [user?.first_name, user?.last_name].filter(Boolean).join(' ').trim();
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function formatAddress(entity) {
|
|
96
|
+
if (!entity) {
|
|
97
|
+
return '';
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const line1 = [entity.address_line1, entity.address_line2].filter(Boolean).join(', ');
|
|
101
|
+
const line2 = [entity.postal_code, entity.city].filter(Boolean).join(' ');
|
|
102
|
+
|
|
103
|
+
return [line1, line2, entity.country_code].filter(Boolean).join(', ');
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function hasUserRole(userRoles, role) {
|
|
107
|
+
return (userRoles ?? []).some((userRole) => {
|
|
108
|
+
if (typeof userRole === 'string') {
|
|
109
|
+
return userRole === role;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return userRole?.role === role;
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function hasAccessChannel(accessChannels, channel) {
|
|
117
|
+
return (accessChannels ?? []).some((accessChannel) => {
|
|
118
|
+
if (typeof accessChannel === 'string') {
|
|
119
|
+
return accessChannel === channel;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return accessChannel?.channel === channel && accessChannel?.status !== 'revoked';
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
module.exports = {
|
|
128
|
+
ACCESS_CHANNELS,
|
|
129
|
+
ACCESS_ROLES,
|
|
130
|
+
ACCESS_STATUSES,
|
|
131
|
+
CLAIM_STATUSES,
|
|
132
|
+
COLOR_PALETTE,
|
|
133
|
+
CONDITION_STATUSES,
|
|
134
|
+
DEVICE_TYPES,
|
|
135
|
+
INSPECTION_STATUSES,
|
|
136
|
+
INSPECTION_TYPES,
|
|
137
|
+
LEASE_STATUSES,
|
|
138
|
+
MANAGEMENT_ROLES,
|
|
139
|
+
PROPERTY_STATUSES,
|
|
140
|
+
USER_ROLES,
|
|
141
|
+
USER_STATUSES,
|
|
142
|
+
WORK_STATUSES,
|
|
143
|
+
CONSTANTS,
|
|
144
|
+
formatAddress,
|
|
145
|
+
formatCurrency,
|
|
146
|
+
formatDate,
|
|
147
|
+
formatDateTime,
|
|
148
|
+
getUserFullName,
|
|
149
|
+
hasAccessChannel,
|
|
150
|
+
hasUserRole,
|
|
151
|
+
Query,
|
|
152
|
+
toDate,
|
|
153
|
+
};
|
package/index.mjs
CHANGED
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
import pkg from './index.js';
|
|
2
|
-
|
|
3
|
-
export const {
|
|
4
|
-
ACCESS_CHANNELS,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
import pkg from './index.js';
|
|
2
|
+
|
|
3
|
+
export const {
|
|
4
|
+
ACCESS_CHANNELS,
|
|
5
|
+
ACCESS_ROLES,
|
|
6
|
+
ACCESS_STATUSES,
|
|
7
|
+
CLAIM_STATUSES,
|
|
8
|
+
COLOR_PALETTE,
|
|
9
|
+
CONDITION_STATUSES,
|
|
10
|
+
DEVICE_TYPES,
|
|
11
|
+
INSPECTION_STATUSES,
|
|
12
|
+
INSPECTION_TYPES,
|
|
13
|
+
LEASE_STATUSES,
|
|
14
|
+
MANAGEMENT_ROLES,
|
|
15
|
+
PROPERTY_STATUSES,
|
|
16
|
+
USER_ROLES,
|
|
17
|
+
USER_STATUSES,
|
|
18
|
+
WORK_STATUSES,
|
|
19
|
+
CONSTANTS,
|
|
20
|
+
formatAddress,
|
|
21
|
+
formatCurrency,
|
|
22
|
+
formatDate,
|
|
23
|
+
formatDateTime,
|
|
24
|
+
getUserFullName,
|
|
25
|
+
hasAccessChannel,
|
|
26
|
+
hasUserRole,
|
|
27
|
+
Query,
|
|
28
|
+
toDate,
|
|
29
|
+
} = pkg;
|
|
30
|
+
|
|
31
|
+
export default pkg;
|
package/package.json
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@jaws-developers-customers/consulca-types",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "Tipi e helper per il dominio Consulca.",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"consulca",
|
|
7
|
-
"mariadb",
|
|
8
|
-
"types",
|
|
9
|
-
"helpers",
|
|
10
|
-
"formatter"
|
|
11
|
-
],
|
|
12
|
-
"homepage": "https://github.com/JAWS-Developers-Customers/15-NPMPackage#readme",
|
|
13
|
-
"bugs": {
|
|
14
|
-
"url": "https://github.com/JAWS-Developers-Customers/15-NPMPackage/issues"
|
|
15
|
-
},
|
|
16
|
-
"repository": {
|
|
17
|
-
"type": "git",
|
|
18
|
-
"url": "git+https://github.com/JAWS-Developers-Customers/15-NPMPackage.git"
|
|
19
|
-
},
|
|
20
|
-
"license": "UNLICENSED",
|
|
21
|
-
"author": "JAWS-Developers-Customers",
|
|
22
|
-
"type": "commonjs",
|
|
23
|
-
"exports": {
|
|
24
|
-
".": {
|
|
25
|
-
"types": "./index.d.ts",
|
|
26
|
-
"require": "./index.js",
|
|
27
|
-
"import": "./index.mjs",
|
|
28
|
-
"default": "./index.js"
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"main": "index.js",
|
|
32
|
-
"types": "index.d.ts",
|
|
33
|
-
"directories": {
|
|
34
|
-
"test": "test"
|
|
35
|
-
},
|
|
36
|
-
"files": [
|
|
37
|
-
"index.js",
|
|
38
|
-
"index.mjs",
|
|
39
|
-
"index.d.ts",
|
|
40
|
-
"README.md"
|
|
41
|
-
],
|
|
42
|
-
"scripts": {
|
|
43
|
-
"test": "node --test"
|
|
44
|
-
},
|
|
45
|
-
"publishConfig": {
|
|
46
|
-
"access": "public"
|
|
47
|
-
},
|
|
48
|
-
"devDependencies": {
|
|
49
|
-
"jaws-helper": "^3.2.3"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@jaws-developers-customers/consulca-types",
|
|
3
|
+
"version": "1.1.23",
|
|
4
|
+
"description": "Tipi e helper per il dominio Consulca.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"consulca",
|
|
7
|
+
"mariadb",
|
|
8
|
+
"types",
|
|
9
|
+
"helpers",
|
|
10
|
+
"formatter"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://github.com/JAWS-Developers-Customers/15-NPMPackage#readme",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/JAWS-Developers-Customers/15-NPMPackage/issues"
|
|
15
|
+
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/JAWS-Developers-Customers/15-NPMPackage.git"
|
|
19
|
+
},
|
|
20
|
+
"license": "UNLICENSED",
|
|
21
|
+
"author": "JAWS-Developers-Customers",
|
|
22
|
+
"type": "commonjs",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./index.d.ts",
|
|
26
|
+
"require": "./index.js",
|
|
27
|
+
"import": "./index.mjs",
|
|
28
|
+
"default": "./index.js"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"main": "index.js",
|
|
32
|
+
"types": "index.d.ts",
|
|
33
|
+
"directories": {
|
|
34
|
+
"test": "test"
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
"index.js",
|
|
38
|
+
"index.mjs",
|
|
39
|
+
"index.d.ts",
|
|
40
|
+
"README.md"
|
|
41
|
+
],
|
|
42
|
+
"scripts": {
|
|
43
|
+
"test": "node --test"
|
|
44
|
+
},
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"jaws-helper": "^3.2.3"
|
|
50
|
+
}
|
|
51
|
+
}
|