@terros-inc/sdk 1.0.5 → 1.0.7
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/dist/index.d.mts +1028 -0
- package/dist/index.mjs +222 -0
- package/package.json +8 -4
- package/dist/analytics.d.ts +0 -8
- package/dist/analytics.js +0 -22
- package/dist/apiCaller.d.ts +0 -12
- package/dist/apiCaller.js +0 -44
- package/dist/client.d.ts +0 -8
- package/dist/client.js +0 -13
- package/dist/client.test.d.ts +0 -1
- package/dist/client.test.js +0 -81
- package/dist/clients/account.d.ts +0 -24
- package/dist/clients/account.js +0 -53
- package/dist/clients/calendar.d.ts +0 -21
- package/dist/clients/calendar.js +0 -44
- package/dist/clients/index.d.ts +0 -3
- package/dist/clients/index.js +0 -3
- package/dist/clients/user.d.ts +0 -18
- package/dist/clients/user.js +0 -42
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -2
- package/dist/models/account/api.d.ts +0 -167
- package/dist/models/account/api.js +0 -1
- package/dist/models/account/index.d.ts +0 -2
- package/dist/models/account/index.js +0 -2
- package/dist/models/account/model.d.ts +0 -219
- package/dist/models/account/model.js +0 -1
- package/dist/models/calendar/api.d.ts +0 -122
- package/dist/models/calendar/api.js +0 -1
- package/dist/models/calendar/index.d.ts +0 -2
- package/dist/models/calendar/index.js +0 -2
- package/dist/models/calendar/model.d.ts +0 -83
- package/dist/models/calendar/model.js +0 -1
- package/dist/models/company/index.d.ts +0 -1
- package/dist/models/company/index.js +0 -1
- package/dist/models/company/model.d.ts +0 -37
- package/dist/models/company/model.js +0 -1
- package/dist/models/index.d.ts +0 -7
- package/dist/models/index.js +0 -7
- package/dist/models/location/index.d.ts +0 -1
- package/dist/models/location/index.js +0 -1
- package/dist/models/location/model.d.ts +0 -21
- package/dist/models/location/model.js +0 -1
- package/dist/models/shared.d.ts +0 -32
- package/dist/models/shared.js +0 -6
- package/dist/models/team/index.d.ts +0 -1
- package/dist/models/team/index.js +0 -1
- package/dist/models/team/model.d.ts +0 -17
- package/dist/models/team/model.js +0 -1
- package/dist/models/user/api.d.ts +0 -111
- package/dist/models/user/api.js +0 -1
- package/dist/models/user/index.d.ts +0 -2
- package/dist/models/user/index.js +0 -2
- package/dist/models/user/model.d.ts +0 -179
- package/dist/models/user/model.js +0 -1
package/dist/index.d.ts
DELETED
package/dist/index.js
DELETED
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
import type { RoleId, SmallUser, TeamId, UserId, UserIdentifier } from '../user';
|
|
2
|
-
import type { ApiSuccess, CustomFieldMap } from '../shared';
|
|
3
|
-
import type { LatLng } from '../location';
|
|
4
|
-
import type { CompanyId } from '../company';
|
|
5
|
-
import type { AccountData, AccountDataResponse, AccountId, AccountSortBy, AccountSortOrder, AccountStatusData, AccountStatusId, BulkModifyAccountsAction, ContactId, CustomFieldFilter, ElasticFilter, LocationId, NoteId, PartialAddress, RangeFilter, SortCursor, StatusHistoryItem, TagId, UnsavedAccount, UnsavedAccountContact, UnsavedAccountNote, UnsavedAccountStatus, UpsertLatLng, UpsertTinyResidentData, WorkflowActionId, WorkflowId, WorkflowStageId } from './model';
|
|
6
|
-
export type AccountStatusSearchInput = {
|
|
7
|
-
accountIds?: AccountId[];
|
|
8
|
-
workflowId?: WorkflowId;
|
|
9
|
-
stageIds?: WorkflowStageId[];
|
|
10
|
-
actionIds?: WorkflowActionId[];
|
|
11
|
-
/** @deprecated */
|
|
12
|
-
statusIds?: AccountStatusId[];
|
|
13
|
-
teamId?: TeamId;
|
|
14
|
-
userId?: UserId;
|
|
15
|
-
roleIds?: RoleId[];
|
|
16
|
-
startTime?: string | number;
|
|
17
|
-
endTime?: string | number;
|
|
18
|
-
sortTimestamp?: SortCursor;
|
|
19
|
-
query?: string;
|
|
20
|
-
searchByCurrentStage?: boolean;
|
|
21
|
-
tagIds?: TagId[];
|
|
22
|
-
cities?: string[];
|
|
23
|
-
states?: string[];
|
|
24
|
-
zipCodes?: string[];
|
|
25
|
-
customFields?: CustomFieldFilter;
|
|
26
|
-
coordinates?: LatLng[];
|
|
27
|
-
contactCount?: RangeFilter;
|
|
28
|
-
workflowActionCount?: RangeFilter;
|
|
29
|
-
lastActionDate?: RangeFilter;
|
|
30
|
-
sortBy?: AccountSortBy;
|
|
31
|
-
sortOrder?: AccountSortOrder;
|
|
32
|
-
};
|
|
33
|
-
/** Not modeled in detail by this SDK — treat as an opaque record. */
|
|
34
|
-
export type AccountHooksInput = Record<string, unknown>;
|
|
35
|
-
export type AccountAddInput = {
|
|
36
|
-
account: UnsavedAccount & {
|
|
37
|
-
hooks?: AccountHooksInput;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
export type AccountAddSuccess = ApiSuccess<{
|
|
41
|
-
account: AccountData;
|
|
42
|
-
duplicate?: boolean;
|
|
43
|
-
}>;
|
|
44
|
-
export type AccountPartialUpdateInput = Partial<Omit<AccountData, 'accountId' | 'contacts' | 'notes'>> & {
|
|
45
|
-
actorId?: UserIdentifier;
|
|
46
|
-
checkpoints?: WorkflowStageId[];
|
|
47
|
-
hooks?: AccountHooksInput;
|
|
48
|
-
contacts?: UnsavedAccountContact[];
|
|
49
|
-
notes?: UnsavedAccountNote[];
|
|
50
|
-
deletedContacts?: ContactId[];
|
|
51
|
-
deletedNotes?: NoteId[];
|
|
52
|
-
};
|
|
53
|
-
export type AccountUpdateInput = {
|
|
54
|
-
account: AccountPartialUpdateInput & {
|
|
55
|
-
accountId: AccountId;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
export type AccountUpdateSuccess = ApiSuccess<{
|
|
59
|
-
account: AccountData;
|
|
60
|
-
}>;
|
|
61
|
-
export type AccountUpdateBatchInput = {
|
|
62
|
-
accounts: (AccountPartialUpdateInput & {
|
|
63
|
-
accountId: AccountId;
|
|
64
|
-
})[];
|
|
65
|
-
};
|
|
66
|
-
export type AccountUpdateBatchSuccess = ApiSuccess<{
|
|
67
|
-
accounts: AccountData[];
|
|
68
|
-
}>;
|
|
69
|
-
export type AccountListInput = {
|
|
70
|
-
nearby?: LatLng;
|
|
71
|
-
searchInput?: AccountStatusSearchInput;
|
|
72
|
-
/** 10-1000 */
|
|
73
|
-
size?: number;
|
|
74
|
-
};
|
|
75
|
-
export type AccountListSuccess = ApiSuccess<AccountDataResponse>;
|
|
76
|
-
export type BulkModifyAccountsInput = {
|
|
77
|
-
filter: ElasticFilter;
|
|
78
|
-
actions: BulkModifyAccountsAction;
|
|
79
|
-
};
|
|
80
|
-
export type AccountGetInput = {
|
|
81
|
-
accountId: AccountId;
|
|
82
|
-
};
|
|
83
|
-
export type AccountGetSuccess = ApiSuccess<{
|
|
84
|
-
account: AccountData;
|
|
85
|
-
potentialDuplicates?: AccountData[];
|
|
86
|
-
}>;
|
|
87
|
-
type AccountMatchCriterion = 'accountId' | 'externalLeadId' | 'sourceId' | 'address';
|
|
88
|
-
export type AccountMatchInput = {
|
|
89
|
-
accountId?: AccountId;
|
|
90
|
-
externalLeadId?: string;
|
|
91
|
-
sourceId?: string;
|
|
92
|
-
location?: PartialAddress;
|
|
93
|
-
};
|
|
94
|
-
export type AccountMatchSuccess = ApiSuccess<{
|
|
95
|
-
account?: AccountData;
|
|
96
|
-
matchedOn?: AccountMatchCriterion;
|
|
97
|
-
additionalMatches?: AccountData[];
|
|
98
|
-
}>;
|
|
99
|
-
export type AccountRemoveInput = {
|
|
100
|
-
accountId: AccountId;
|
|
101
|
-
};
|
|
102
|
-
type AccountRequestType = 'add' | 'update' | 'upsert';
|
|
103
|
-
export type AccountUpsertInput = {
|
|
104
|
-
/** Defaults to 'upsert'. */
|
|
105
|
-
requestType?: AccountRequestType;
|
|
106
|
-
account: {
|
|
107
|
-
accountId?: AccountId;
|
|
108
|
-
actorId?: UserIdentifier;
|
|
109
|
-
/** @deprecated */
|
|
110
|
-
statusId?: AccountStatusId;
|
|
111
|
-
/** @deprecated */
|
|
112
|
-
statusHistory?: StatusHistoryItem[];
|
|
113
|
-
workflowId?: WorkflowId;
|
|
114
|
-
/** @deprecated use workflowTarget */
|
|
115
|
-
workflowActionOrStageId?: WorkflowActionId | WorkflowStageId;
|
|
116
|
-
workflowTarget?: string;
|
|
117
|
-
owner?: Partial<SmallUser>;
|
|
118
|
-
closer?: Partial<SmallUser>;
|
|
119
|
-
location?: Partial<PartialAddress & {
|
|
120
|
-
locationId?: LocationId;
|
|
121
|
-
latlng?: UpsertLatLng;
|
|
122
|
-
}>;
|
|
123
|
-
resident?: Partial<UpsertTinyResidentData>;
|
|
124
|
-
resident2?: Partial<UpsertTinyResidentData>;
|
|
125
|
-
accountSource?: string;
|
|
126
|
-
sourceStatus?: string;
|
|
127
|
-
lastActionDate?: number;
|
|
128
|
-
sourceId?: string;
|
|
129
|
-
externalLeadId?: string;
|
|
130
|
-
test?: boolean;
|
|
131
|
-
teamId?: TeamId;
|
|
132
|
-
customFields?: CustomFieldMap;
|
|
133
|
-
notes?: UnsavedAccountNote[];
|
|
134
|
-
};
|
|
135
|
-
opts?: {
|
|
136
|
-
/** Defaults to true. */
|
|
137
|
-
createCustomLocation?: boolean;
|
|
138
|
-
};
|
|
139
|
-
};
|
|
140
|
-
export type AccountUpsertSuccess = ApiSuccess<{
|
|
141
|
-
account?: AccountData;
|
|
142
|
-
}>;
|
|
143
|
-
export type AccountStatusAddInput = {
|
|
144
|
-
status: UnsavedAccountStatus;
|
|
145
|
-
};
|
|
146
|
-
export type AccountStatusAddSuccess = ApiSuccess<{
|
|
147
|
-
status: AccountStatusData;
|
|
148
|
-
}>;
|
|
149
|
-
export type AccountStatusUpdateInput = {
|
|
150
|
-
status: AccountStatusData;
|
|
151
|
-
};
|
|
152
|
-
export type AccountStatusUpdateSuccess = ApiSuccess<{
|
|
153
|
-
status: AccountStatusData;
|
|
154
|
-
}>;
|
|
155
|
-
export type AccountStatusListInput = {
|
|
156
|
-
archived?: true | false | 'all';
|
|
157
|
-
companyId?: CompanyId;
|
|
158
|
-
};
|
|
159
|
-
export type AccountStatusListSuccess = ApiSuccess<{
|
|
160
|
-
statuses: AccountStatusData[];
|
|
161
|
-
includesDefaults?: boolean;
|
|
162
|
-
}>;
|
|
163
|
-
export type AccountStatusRemoveInput = {
|
|
164
|
-
archive?: boolean;
|
|
165
|
-
statusId: AccountStatusId;
|
|
166
|
-
};
|
|
167
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import type { RoleId, SmallUser, TeamId, UserId } from '../user';
|
|
2
|
-
import type { CustomFieldMap } from '../shared';
|
|
3
|
-
import type { LatLng, SmallAddress } from '../location';
|
|
4
|
-
export type AccountId = `Account:${string}` | `Account.${string}`;
|
|
5
|
-
export type AccountStatusId = `AS.${string}`;
|
|
6
|
-
export type WorkflowId = `WF.${string}`;
|
|
7
|
-
export type WorkflowStageId = `S.${string}`;
|
|
8
|
-
export type WorkflowActionId = `A.${string}`;
|
|
9
|
-
export type ContactId = `Contact:${string}` | `Contact.${string}`;
|
|
10
|
-
export type NoteId = `Note.${string}`;
|
|
11
|
-
export type TagId = `Tag.${string}`;
|
|
12
|
-
export type LocationId = `Can.${string}` | `LocNew:${string}` | `LocNew.${string}` | `Loc:${string}` | `TLoc:${string}` | `TLoc.${string}` | `FA.${string}` | `PR.${string}`;
|
|
13
|
-
export type DispositionId = `Disposition:${string}` | `Disposition.${string}` | 'NotHome' | 'Comeback' | 'NotNow' | 'NotQualified' | 'PartialPitch' | 'NewAccount' | 'Competitor' | 'Custom1' | 'Custom2' | 'Custom3';
|
|
14
|
-
type ContactMethod = 'door' | 'phone';
|
|
15
|
-
export type RangeFilter = {
|
|
16
|
-
gte?: number;
|
|
17
|
-
lte?: number;
|
|
18
|
-
};
|
|
19
|
-
/** A cursor for paging through sorted account lists. */
|
|
20
|
-
export type SortCursor = number | number[];
|
|
21
|
-
export type AccountUserDetails = Omit<SmallUser, 'userId' | 'memberOf'>;
|
|
22
|
-
export type StatusHistoryItem = {
|
|
23
|
-
statusId: AccountStatusId;
|
|
24
|
-
sourceStatus?: string;
|
|
25
|
-
statusChangedDate: number;
|
|
26
|
-
};
|
|
27
|
-
export type WorkflowHistoryItem = {
|
|
28
|
-
stageId: WorkflowStageId;
|
|
29
|
-
actionId?: WorkflowActionId;
|
|
30
|
-
userId: UserId;
|
|
31
|
-
timestamp: number;
|
|
32
|
-
latlng?: LatLng;
|
|
33
|
-
sourceStatus?: string;
|
|
34
|
-
};
|
|
35
|
-
export type UserHistory = {
|
|
36
|
-
userId: UserId;
|
|
37
|
-
timestamp: number;
|
|
38
|
-
}[];
|
|
39
|
-
export type UnsavedAccountContact = {
|
|
40
|
-
timestamp: number;
|
|
41
|
-
method: ContactMethod;
|
|
42
|
-
userId: UserId;
|
|
43
|
-
contactId?: ContactId;
|
|
44
|
-
dispositionId: DispositionId;
|
|
45
|
-
deviceLocation?: LatLng;
|
|
46
|
-
isPitch?: boolean;
|
|
47
|
-
};
|
|
48
|
-
export type AccountContact = UnsavedAccountContact & {
|
|
49
|
-
contactId: ContactId;
|
|
50
|
-
};
|
|
51
|
-
export type UnsavedAccountNote = {
|
|
52
|
-
timestamp: number;
|
|
53
|
-
text: string;
|
|
54
|
-
userId: UserId;
|
|
55
|
-
noteId?: NoteId;
|
|
56
|
-
};
|
|
57
|
-
export type AccountNote = UnsavedAccountNote & {
|
|
58
|
-
noteId: NoteId;
|
|
59
|
-
};
|
|
60
|
-
type TagWithDate = {
|
|
61
|
-
tagId: TagId;
|
|
62
|
-
timestamp: number;
|
|
63
|
-
userId: UserId;
|
|
64
|
-
};
|
|
65
|
-
/** Not modeled in detail by this SDK — treat as an opaque record. */
|
|
66
|
-
export type TinyResidentData = Record<string, unknown>;
|
|
67
|
-
export type UnsavedAccount = {
|
|
68
|
-
customFields?: CustomFieldMap;
|
|
69
|
-
importId?: string;
|
|
70
|
-
workflowId?: WorkflowId;
|
|
71
|
-
workflowHistory?: WorkflowHistoryItem[];
|
|
72
|
-
workflowStageId?: WorkflowStageId;
|
|
73
|
-
workflowActionId?: WorkflowActionId;
|
|
74
|
-
deviceLocation?: LatLng;
|
|
75
|
-
checkpoints?: WorkflowStageId[];
|
|
76
|
-
accountId?: AccountId;
|
|
77
|
-
/** @deprecated use workflowStageId/workflowActionId */
|
|
78
|
-
statusId?: AccountStatusId;
|
|
79
|
-
accountSource?: string;
|
|
80
|
-
sourceStatus?: string;
|
|
81
|
-
sourceId?: string;
|
|
82
|
-
externalLeadId?: string;
|
|
83
|
-
locationId?: LocationId;
|
|
84
|
-
location?: SmallAddress;
|
|
85
|
-
ownerId?: UserId;
|
|
86
|
-
owner?: AccountUserDetails;
|
|
87
|
-
closerId?: UserId;
|
|
88
|
-
closer?: AccountUserDetails;
|
|
89
|
-
resident?: TinyResidentData;
|
|
90
|
-
resident2?: TinyResidentData;
|
|
91
|
-
language?: string;
|
|
92
|
-
/** @deprecated */
|
|
93
|
-
rescheduleCount?: number;
|
|
94
|
-
/** @deprecated */
|
|
95
|
-
dealSize?: number;
|
|
96
|
-
appointmentDate?: number;
|
|
97
|
-
test?: boolean;
|
|
98
|
-
teamId?: TeamId;
|
|
99
|
-
contacts?: UnsavedAccountContact[];
|
|
100
|
-
notes?: UnsavedAccountNote[];
|
|
101
|
-
isParent?: boolean;
|
|
102
|
-
parentAccountId?: AccountId;
|
|
103
|
-
tags?: TagWithDate[];
|
|
104
|
-
};
|
|
105
|
-
export type TinyWorkflowAccount = {
|
|
106
|
-
accountId: AccountId;
|
|
107
|
-
workflowId: WorkflowId;
|
|
108
|
-
workflowStageId: WorkflowStageId;
|
|
109
|
-
workflowActionId?: WorkflowActionId;
|
|
110
|
-
workflowLastActionDate?: number;
|
|
111
|
-
workflowHistory: WorkflowHistoryItem[];
|
|
112
|
-
customFields?: CustomFieldMap;
|
|
113
|
-
};
|
|
114
|
-
export type AccountData = Omit<UnsavedAccount, 'contacts' | 'notes'> & {
|
|
115
|
-
accountId: AccountId;
|
|
116
|
-
createdAt?: number;
|
|
117
|
-
createdBy?: UserId;
|
|
118
|
-
updatedAt?: number;
|
|
119
|
-
updatedBy?: UserId;
|
|
120
|
-
statusHistory: StatusHistoryItem[];
|
|
121
|
-
workflowStageName?: string;
|
|
122
|
-
workflowActionName?: string;
|
|
123
|
-
homeowner?: TinyResidentData;
|
|
124
|
-
userMissDate?: number;
|
|
125
|
-
locationMissDate?: number;
|
|
126
|
-
expiresAt?: number;
|
|
127
|
-
contacts?: AccountContact[];
|
|
128
|
-
notes?: AccountNote[];
|
|
129
|
-
lastActionDate?: number;
|
|
130
|
-
recruitId?: UserId;
|
|
131
|
-
ownerHistory?: UserHistory;
|
|
132
|
-
closerHistory?: UserHistory;
|
|
133
|
-
editable?: boolean;
|
|
134
|
-
};
|
|
135
|
-
export type AccountSortBy = 'createdDate' | 'lastActionDate' | 'lastUpdatedDate' | `CF.${string}`;
|
|
136
|
-
export type AccountSortOrder = 'asc' | 'desc';
|
|
137
|
-
/** Not modeled in detail by this SDK — treat as an opaque record. */
|
|
138
|
-
export type CustomFieldFilter = Record<string, unknown>;
|
|
139
|
-
export type AccountDataResponse = {
|
|
140
|
-
accounts: AccountData[];
|
|
141
|
-
sortTimestamp?: SortCursor;
|
|
142
|
-
total?: number;
|
|
143
|
-
};
|
|
144
|
-
export type BulkModifyAccountsAction = ({
|
|
145
|
-
actionType: 'updateStatus';
|
|
146
|
-
statusId: AccountStatusId;
|
|
147
|
-
} | {
|
|
148
|
-
actionType: 'updateStage';
|
|
149
|
-
stageId: WorkflowStageId;
|
|
150
|
-
} | {
|
|
151
|
-
actionType: 'delete' | 'clearDisposition';
|
|
152
|
-
})[];
|
|
153
|
-
/** Not modeled in detail by this SDK — treat as an opaque record. */
|
|
154
|
-
export type ElasticFilter = {
|
|
155
|
-
cities?: string[];
|
|
156
|
-
states?: string[];
|
|
157
|
-
zipCodes?: string[];
|
|
158
|
-
advancedCustomFields?: CustomFieldFilter;
|
|
159
|
-
statusIds?: AccountStatusId[];
|
|
160
|
-
workflowStageIds?: WorkflowStageId[];
|
|
161
|
-
tagIds?: TagId[];
|
|
162
|
-
teamIds?: TeamId[];
|
|
163
|
-
userIds?: UserId[];
|
|
164
|
-
coordinates?: LatLng[];
|
|
165
|
-
boundingBox?: {
|
|
166
|
-
top: LatLng;
|
|
167
|
-
bottom: LatLng;
|
|
168
|
-
};
|
|
169
|
-
workflowActionCount?: RangeFilter;
|
|
170
|
-
contactCount?: RangeFilter;
|
|
171
|
-
};
|
|
172
|
-
export type PartialAddress = Partial<Omit<SmallAddress, 'latlng'>> & {
|
|
173
|
-
latlng?: Partial<LatLng>;
|
|
174
|
-
};
|
|
175
|
-
export type UpsertLatLng = {
|
|
176
|
-
latitude?: string | number;
|
|
177
|
-
longitude?: string | number;
|
|
178
|
-
};
|
|
179
|
-
export type UpsertTinyResidentData = Record<string, unknown>;
|
|
180
|
-
export type AccountStatusCode = 'Lead' | 'Set' | 'Sit' | 'Closed' | 'Approved' | 'Permit Submitted' | 'Permit Approved' | 'Installed' | 'Archived' | 'Do Not Contact';
|
|
181
|
-
type SetterCloserConfig = {
|
|
182
|
-
includeOnPlan?: boolean;
|
|
183
|
-
allowPayment?: boolean;
|
|
184
|
-
};
|
|
185
|
-
/** The account/list entity scope this status applies to. */
|
|
186
|
-
type AccountStatusScope = string;
|
|
187
|
-
export type UnsavedAccountStatus = {
|
|
188
|
-
name: string;
|
|
189
|
-
/** @deprecated */
|
|
190
|
-
order?: number;
|
|
191
|
-
short?: string;
|
|
192
|
-
plural?: string;
|
|
193
|
-
description?: string;
|
|
194
|
-
legacyCode?: AccountStatusCode;
|
|
195
|
-
color?: string;
|
|
196
|
-
icon?: string;
|
|
197
|
-
restricted?: boolean;
|
|
198
|
-
roles?: Record<RoleId, SetterCloserConfig>;
|
|
199
|
-
integrationMapping?: string[];
|
|
200
|
-
scope: AccountStatusScope;
|
|
201
|
-
setter?: SetterCloserConfig;
|
|
202
|
-
closer?: SetterCloserConfig;
|
|
203
|
-
selfgen?: SetterCloserConfig;
|
|
204
|
-
isFinalState?: boolean;
|
|
205
|
-
createUser?: boolean;
|
|
206
|
-
columnVisibility?: TeamId[];
|
|
207
|
-
requiredFields?: string[];
|
|
208
|
-
isArchivedState?: boolean;
|
|
209
|
-
};
|
|
210
|
-
export type AccountStatusData = UnsavedAccountStatus & {
|
|
211
|
-
statusId: AccountStatusId;
|
|
212
|
-
isDeleted?: boolean;
|
|
213
|
-
createdAt?: number;
|
|
214
|
-
createdBy?: UserId;
|
|
215
|
-
updatedAt?: number;
|
|
216
|
-
updatedBy?: UserId;
|
|
217
|
-
};
|
|
218
|
-
export type TinyAccountStatus = Pick<AccountStatusData, 'name' | 'statusId'>;
|
|
219
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import type { AvailableCloser, RoleId, TeamId, TinyCloser, UserId } from '../user';
|
|
2
|
-
import type { ApiSuccess } from '../shared';
|
|
3
|
-
import type { LatLng } from '../location';
|
|
4
|
-
import type { AccountId, LocationId, UpsertLatLng } from '../account';
|
|
5
|
-
import type { CalendarEventData, CalendarEventDataWithDetails, CalendarEventId, EventType, UnsavedCalendarEventData } from './model';
|
|
6
|
-
type CalendarEventRoleFilter = 'owner' | 'attendee';
|
|
7
|
-
type OptionalCalendarEventLocation = UpsertLatLng & {
|
|
8
|
-
locationId?: LocationId;
|
|
9
|
-
oneLine?: string;
|
|
10
|
-
};
|
|
11
|
-
/** A yes/no/unset filter — matches events where the field is true, false, unset, or set to any value. */
|
|
12
|
-
type BooleanFilter = 'true' | 'false' | 'undefined' | 'defined';
|
|
13
|
-
export type CalendarAvailabilityInput = {
|
|
14
|
-
/** UTC milliseconds. */
|
|
15
|
-
startDate: number;
|
|
16
|
-
/** Minutes. Defaults to 30. */
|
|
17
|
-
duration?: number;
|
|
18
|
-
teamId?: TeamId;
|
|
19
|
-
};
|
|
20
|
-
export type CalendarAvailabilitySuccess = ApiSuccess<{
|
|
21
|
-
available: boolean;
|
|
22
|
-
}>;
|
|
23
|
-
export type CalendarClosersInput = CalendarAvailabilityInput & {
|
|
24
|
-
latLng?: LatLng;
|
|
25
|
-
};
|
|
26
|
-
export type CalendarClosersSuccess = ApiSuccess<{
|
|
27
|
-
closers: AvailableCloser[];
|
|
28
|
-
}>;
|
|
29
|
-
export type CalendarTimeslotsInput = {
|
|
30
|
-
targetId?: TeamId | UserId;
|
|
31
|
-
days?: number;
|
|
32
|
-
locationId?: LocationId;
|
|
33
|
-
/** UTC milliseconds. */
|
|
34
|
-
startTime?: number;
|
|
35
|
-
};
|
|
36
|
-
export type CalendarTimeslotsSuccess = ApiSuccess<{
|
|
37
|
-
closers: TinyCloser[];
|
|
38
|
-
}>;
|
|
39
|
-
export type CalendarEventAddInput = {
|
|
40
|
-
event: UnsavedCalendarEventData;
|
|
41
|
-
/** Defaults to true. */
|
|
42
|
-
errorOnCloserUnavailable?: boolean;
|
|
43
|
-
};
|
|
44
|
-
export type CalendarEventAddSuccess = ApiSuccess<{
|
|
45
|
-
event: CalendarEventData;
|
|
46
|
-
}>;
|
|
47
|
-
export type CalendarEventGetInput = {
|
|
48
|
-
eventId: CalendarEventId;
|
|
49
|
-
};
|
|
50
|
-
export type CalendarEventGetSuccess = ApiSuccess<{
|
|
51
|
-
event: CalendarEventDataWithDetails;
|
|
52
|
-
}>;
|
|
53
|
-
export type CalendarEventListInput = {
|
|
54
|
-
startTime?: number;
|
|
55
|
-
endTime?: number;
|
|
56
|
-
ownerId?: UserId;
|
|
57
|
-
locationId?: LocationId;
|
|
58
|
-
companyId?: string;
|
|
59
|
-
/** @deprecated use teamIds */
|
|
60
|
-
teamId?: TeamId;
|
|
61
|
-
teamIds?: TeamId[];
|
|
62
|
-
roleIds?: RoleId[];
|
|
63
|
-
occurred?: BooleanFilter;
|
|
64
|
-
closed?: BooleanFilter;
|
|
65
|
-
eventType?: EventType;
|
|
66
|
-
filterByRoles?: CalendarEventRoleFilter[];
|
|
67
|
-
};
|
|
68
|
-
export type CalendarEventListSuccess = ApiSuccess<{
|
|
69
|
-
events: CalendarEventDataWithDetails[];
|
|
70
|
-
}>;
|
|
71
|
-
export type CalendarEventUpdateInput = {
|
|
72
|
-
event: Partial<CalendarEventData> & {
|
|
73
|
-
eventId: CalendarEventId;
|
|
74
|
-
attendeeId?: UserId | null;
|
|
75
|
-
};
|
|
76
|
-
errorOnCloserUnavailable?: boolean;
|
|
77
|
-
};
|
|
78
|
-
export type CalendarEventUpdateSuccess = ApiSuccess<{
|
|
79
|
-
event: CalendarEventData;
|
|
80
|
-
}>;
|
|
81
|
-
export type CalendarEventUpsertInput = {
|
|
82
|
-
event: Partial<{
|
|
83
|
-
eventId: CalendarEventId;
|
|
84
|
-
sourceId: string;
|
|
85
|
-
/** Defaults to 'Consultation' on create. */
|
|
86
|
-
eventType: string;
|
|
87
|
-
title: string;
|
|
88
|
-
/** Defaults to now on create. */
|
|
89
|
-
eventDate: string | number;
|
|
90
|
-
/** An EventOutcomeId, integration mapping string, or case-insensitive name. */
|
|
91
|
-
outcomeId: string;
|
|
92
|
-
/** Minutes. */
|
|
93
|
-
duration: number;
|
|
94
|
-
accountId: AccountId;
|
|
95
|
-
location: OptionalCalendarEventLocation;
|
|
96
|
-
/** A UserId or email. Defaults to the authenticated user on create. */
|
|
97
|
-
ownerId: string;
|
|
98
|
-
/** A UserId or email. Pass null to clear on update. */
|
|
99
|
-
attendeeId: string | null;
|
|
100
|
-
/** A UserId or email. */
|
|
101
|
-
dispatcherId: string;
|
|
102
|
-
occurredOwner: boolean;
|
|
103
|
-
occurredAttendee: boolean;
|
|
104
|
-
notes: string;
|
|
105
|
-
previousEventId: CalendarEventId;
|
|
106
|
-
}>;
|
|
107
|
-
};
|
|
108
|
-
export type CalendarEventUpsertSuccess = ApiSuccess<{
|
|
109
|
-
event: CalendarEventData;
|
|
110
|
-
}>;
|
|
111
|
-
export type CalendarEventConfirmInput = {
|
|
112
|
-
eventId: CalendarEventId;
|
|
113
|
-
occurred?: boolean;
|
|
114
|
-
};
|
|
115
|
-
export type CalendarEventConfirmSuccess = ApiSuccess<{
|
|
116
|
-
event: CalendarEventData;
|
|
117
|
-
}>;
|
|
118
|
-
export type CalendarEventRemoveInput = {
|
|
119
|
-
archive?: boolean;
|
|
120
|
-
eventId: CalendarEventId;
|
|
121
|
-
};
|
|
122
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import type { SmallUser, TeamId, UserId } from '../user';
|
|
2
|
-
import type { TinyTeam } from '../team';
|
|
3
|
-
import type { Address, LatLng } from '../location';
|
|
4
|
-
import type { AccountId, DispositionId, LocationId, TinyResidentData, TinyWorkflowAccount } from '../account';
|
|
5
|
-
export type CalendarEventId = `Event:${string}` | `Event.${string}`;
|
|
6
|
-
/** @deprecated */
|
|
7
|
-
export type EventOutcomeId = `O.${string}`;
|
|
8
|
-
export type InterviewId = `Interview:${string}` | `Interview.${string}`;
|
|
9
|
-
export type AttachmentId = `Attachment:${string}` | `Attachment.${string}`;
|
|
10
|
-
export type EventType = 'Consultation' | 'Comeback' | 'Interview' | 'GeneralVisit' | 'Shadow' | 'Team';
|
|
11
|
-
export type SpecialtyAttachments = {
|
|
12
|
-
utilityBill?: AttachmentId;
|
|
13
|
-
customerVerification?: AttachmentId;
|
|
14
|
-
};
|
|
15
|
-
/** @deprecated */
|
|
16
|
-
export type SyncedCalendarEvent = {
|
|
17
|
-
calendarType: string;
|
|
18
|
-
calendarId: string;
|
|
19
|
-
userId: UserId;
|
|
20
|
-
deviceId: string;
|
|
21
|
-
eventId: string;
|
|
22
|
-
};
|
|
23
|
-
export type CalendarEventLocation = Pick<Address, 'oneLine'> & LatLng;
|
|
24
|
-
export type UnsavedCalendarEventData = {
|
|
25
|
-
importId?: string;
|
|
26
|
-
eventType: EventType;
|
|
27
|
-
title: string;
|
|
28
|
-
sourceId?: string;
|
|
29
|
-
/** UTC milliseconds. */
|
|
30
|
-
eventDate: number;
|
|
31
|
-
outcomeId?: EventOutcomeId;
|
|
32
|
-
dispositionId?: DispositionId;
|
|
33
|
-
/** Minutes. */
|
|
34
|
-
duration: number;
|
|
35
|
-
attachments?: AttachmentId[];
|
|
36
|
-
specialtyAttachments?: SpecialtyAttachments;
|
|
37
|
-
accountId?: AccountId;
|
|
38
|
-
locationId?: LocationId;
|
|
39
|
-
location?: CalendarEventLocation;
|
|
40
|
-
ownerId?: UserId;
|
|
41
|
-
attendeeId?: UserId;
|
|
42
|
-
dispatcherId?: UserId;
|
|
43
|
-
occurredOwner?: boolean;
|
|
44
|
-
occurredAttendee?: boolean;
|
|
45
|
-
interviewId?: InterviewId;
|
|
46
|
-
/** @deprecated */
|
|
47
|
-
notes?: string;
|
|
48
|
-
previousEventId?: CalendarEventId;
|
|
49
|
-
/** @deprecated */
|
|
50
|
-
syncedCalendarIds?: string[];
|
|
51
|
-
/** @deprecated */
|
|
52
|
-
syncedCalendarEvents?: SyncedCalendarEvent[];
|
|
53
|
-
teamId?: TeamId;
|
|
54
|
-
};
|
|
55
|
-
export type EventOutcomeHistory = {
|
|
56
|
-
outcomeId: EventOutcomeId;
|
|
57
|
-
userId: UserId;
|
|
58
|
-
timestamp: number;
|
|
59
|
-
};
|
|
60
|
-
type SitOutcomeFault = string;
|
|
61
|
-
export type CalendarEventData = UnsavedCalendarEventData & {
|
|
62
|
-
outcomeHistory?: EventOutcomeHistory[];
|
|
63
|
-
createdAt?: number;
|
|
64
|
-
createdBy?: UserId;
|
|
65
|
-
updatedAt?: number;
|
|
66
|
-
updatedBy?: UserId;
|
|
67
|
-
eventId: CalendarEventId;
|
|
68
|
-
ownerId: UserId;
|
|
69
|
-
occurred?: boolean;
|
|
70
|
-
closed?: boolean;
|
|
71
|
-
reasonNotOccurred?: string;
|
|
72
|
-
fault?: SitOutcomeFault;
|
|
73
|
-
allDay?: boolean;
|
|
74
|
-
canDelete?: boolean;
|
|
75
|
-
};
|
|
76
|
-
export type CalendarEventDataWithDetails = CalendarEventData & {
|
|
77
|
-
resident?: TinyResidentData;
|
|
78
|
-
owner?: SmallUser;
|
|
79
|
-
attendee?: SmallUser;
|
|
80
|
-
teams?: TinyTeam[];
|
|
81
|
-
account?: TinyWorkflowAccount;
|
|
82
|
-
};
|
|
83
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './model';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './model';
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { UserId } from '../user';
|
|
2
|
-
export type CompanyState = 'active' | 'trial' | 'internal' | 'demo' | 'sandbox' | 'template' | 'suspended';
|
|
3
|
-
export type CompanyKind = 'customer' | 'sandbox' | 'demo' | 'template' | 'development';
|
|
4
|
-
export type AccessStatus = 'active' | 'suspended';
|
|
5
|
-
export type BillingMethod = 'stripe' | 'none';
|
|
6
|
-
export type CompanyIndustry = 'solar' | 'pest' | 'alarm' | 'roofing' | 'fiber' | 'insurance' | 'home_improvement' | 'windows' | 'satellite_tv' | 'retail' | 'other' | 'solar_cleaning';
|
|
7
|
-
export type CompanyId = `C:${string}` | `C.${string}`;
|
|
8
|
-
export type CompanyData = {
|
|
9
|
-
companyId: CompanyId;
|
|
10
|
-
name: string;
|
|
11
|
-
legalName?: string;
|
|
12
|
-
kind?: CompanyKind;
|
|
13
|
-
accessStatus?: AccessStatus;
|
|
14
|
-
internalOwnerId?: UserId;
|
|
15
|
-
billingEmail?: string;
|
|
16
|
-
billingMethod?: BillingMethod;
|
|
17
|
-
state: CompanyState;
|
|
18
|
-
maxUsers?: number;
|
|
19
|
-
size?: number;
|
|
20
|
-
industries?: CompanyIndustry[];
|
|
21
|
-
salesChannels?: string[];
|
|
22
|
-
highestTeamLevel?: number;
|
|
23
|
-
lowestTeamLevel?: number;
|
|
24
|
-
levelNames?: Record<string, string>;
|
|
25
|
-
timeZone?: string;
|
|
26
|
-
avatarUrl?: string;
|
|
27
|
-
avatarBlurhash?: string;
|
|
28
|
-
uploadAvatarUrl?: string;
|
|
29
|
-
iconUrl?: string;
|
|
30
|
-
iconBlurhash?: string;
|
|
31
|
-
uploadIconUrl?: string;
|
|
32
|
-
isDeleted?: boolean;
|
|
33
|
-
createdAt?: number;
|
|
34
|
-
createdBy?: UserId;
|
|
35
|
-
updatedAt?: number;
|
|
36
|
-
updatedBy?: UserId;
|
|
37
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|