@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.
@@ -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';
@@ -6,49 +6,46 @@ import {
6
6
  } from '@bisondesk/commons-sdk/types';
7
7
  import { OpportunityType } from '../constants.js';
8
8
 
9
- export type NewUserRequest = {
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 ValidNewUserRequest = Omit<NewUserRequest, 'phone' | 'landline'> & {
25
- phone: PhoneNumberValue;
26
- landline?: PhoneNumberValue;
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 UpdateUserRequest = Omit<User, 'phone' | 'landline'> & {
30
- phone: PhoneNumberRawValue | PhoneNumberValue;
31
- landline?: PhoneNumberRawValue | PhoneNumberValue;
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
- jobTitle?: string;
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
- preferredBranchIds?: string[];
51
- preferredOpportunityTypes?: OpportunityType[];
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