@bisondesk/core-sdk 1.0.610 → 1.0.611
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/types/activities.d.ts +3 -2
- package/lib/types/activities.d.ts.map +1 -1
- package/lib/types/activities.js.map +1 -1
- package/lib/types/opportunities.d.ts +2 -1
- package/lib/types/opportunities.d.ts.map +1 -1
- package/lib/types/opportunities.js +1 -0
- package/lib/types/opportunities.js.map +1 -1
- package/lib/types/reports-leasing.d.ts +5 -0
- package/lib/types/reports-leasing.d.ts.map +1 -1
- package/lib/types/reports-leasing.js.map +1 -1
- package/lib/types/tenants.d.ts +1 -0
- package/lib/types/tenants.d.ts.map +1 -1
- package/lib/types/tenants.js.map +1 -1
- package/lib/types/users.d.ts +17 -20
- package/lib/types/users.d.ts.map +1 -1
- package/lib/types/users.js.map +1 -1
- package/package.json +1 -1
- package/src/types/activities.ts +4 -3
- package/src/types/opportunities.ts +1 -0
- package/src/types/reports-leasing.ts +9 -0
- package/src/types/tenants.ts +2 -0
- package/src/types/users.ts +18 -21
- package/tsconfig.tsbuildinfo +1 -1
package/src/types/tenants.ts
CHANGED
|
@@ -59,6 +59,8 @@ export type Tenant = PublicTenant & {
|
|
|
59
59
|
accounting?: {
|
|
60
60
|
costCenterPerLine?: boolean;
|
|
61
61
|
};
|
|
62
|
+
// E.164 Twilio caller ID used as a fallback when a user has no own number configured
|
|
63
|
+
defaultTwilioPhoneNumber?: string;
|
|
62
64
|
};
|
|
63
65
|
|
|
64
66
|
export type AccountingProvider = 'exact' | 'odoo';
|
package/src/types/users.ts
CHANGED
|
@@ -6,49 +6,46 @@ import {
|
|
|
6
6
|
} from '@bisondesk/commons-sdk/types';
|
|
7
7
|
import { OpportunityType } from '../constants.js';
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
type BaseUser = {
|
|
10
10
|
email: string;
|
|
11
11
|
firstName: string;
|
|
12
12
|
googleEmail?: string;
|
|
13
13
|
jobTitle?: string;
|
|
14
|
-
landline?: PhoneNumberRawValue; // landline phone number
|
|
15
14
|
language: string;
|
|
16
15
|
lastName: string;
|
|
17
|
-
phone: PhoneNumberRawValue;
|
|
18
16
|
picture?: AttachmentValue;
|
|
19
17
|
roles: AppRoles[];
|
|
20
18
|
preferredBranchIds?: string[];
|
|
21
19
|
preferredOpportunityTypes?: OpportunityType[];
|
|
22
20
|
};
|
|
23
21
|
|
|
24
|
-
export type
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
export type NewUserRequest = BaseUser & {
|
|
23
|
+
landline?: PhoneNumberRawValue;
|
|
24
|
+
phone: PhoneNumberRawValue;
|
|
25
|
+
twilioPhoneNumber?: PhoneNumberRawValue; // Twilio caller ID used when placing calls
|
|
27
26
|
};
|
|
28
27
|
|
|
29
|
-
export type
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
export type ValidNewUserRequest = BaseUser & {
|
|
29
|
+
landline?: PhoneNumberValue;
|
|
30
|
+
phone: PhoneNumberValue;
|
|
31
|
+
twilioPhoneNumber?: PhoneNumberValue;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
export type User = {
|
|
34
|
+
export type User = BaseUser & {
|
|
35
35
|
active: boolean;
|
|
36
36
|
createdAt: string;
|
|
37
|
-
email: string;
|
|
38
|
-
firstName: string;
|
|
39
|
-
googleEmail?: string;
|
|
40
37
|
id: string;
|
|
41
|
-
|
|
42
|
-
landline?: PhoneNumberValue; // landline phone number
|
|
43
|
-
language: string;
|
|
44
|
-
lastName: string;
|
|
38
|
+
landline?: PhoneNumberValue;
|
|
45
39
|
phone: PhoneNumberValue;
|
|
46
|
-
picture?: AttachmentValue;
|
|
47
40
|
roleActions?: TopLevelActions[]; // auto-generated based on the roles provided in the request
|
|
48
|
-
roles: AppRoles[];
|
|
49
41
|
updatedAt: string;
|
|
50
|
-
|
|
51
|
-
|
|
42
|
+
twilioPhoneNumber?: PhoneNumberValue; // Twilio caller ID used when placing calls
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export type UpdateUserRequest = Omit<User, 'phone' | 'landline' | 'twilioPhoneNumber'> & {
|
|
46
|
+
phone: PhoneNumberRawValue | PhoneNumberValue;
|
|
47
|
+
landline?: PhoneNumberRawValue | PhoneNumberValue;
|
|
48
|
+
twilioPhoneNumber?: PhoneNumberRawValue | PhoneNumberValue;
|
|
52
49
|
};
|
|
53
50
|
|
|
54
51
|
// Short version of the User entity, with only the properties
|