@terros-inc/sdk 1.0.15 → 1.0.16
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 +197 -102
- package/dist/index.mjs +32 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -33,24 +33,6 @@ declare class TerrosApiClient {
|
|
|
33
33
|
private determineBaseUrl;
|
|
34
34
|
}
|
|
35
35
|
//#endregion
|
|
36
|
-
//#region src/models/team/model.d.ts
|
|
37
|
-
type TinyTeam = {
|
|
38
|
-
teamId: TeamId;
|
|
39
|
-
name: string;
|
|
40
|
-
parentId?: TeamId;
|
|
41
|
-
isDeleted?: boolean;
|
|
42
|
-
externalId?: string;
|
|
43
|
-
avatarBlurhash?: string;
|
|
44
|
-
avatarUrl?: string;
|
|
45
|
-
restrictVisibility?: boolean;
|
|
46
|
-
level: number;
|
|
47
|
-
meetingTimes?: {
|
|
48
|
-
day: number;
|
|
49
|
-
start: number;
|
|
50
|
-
end: number;
|
|
51
|
-
}[];
|
|
52
|
-
};
|
|
53
|
-
//#endregion
|
|
54
36
|
//#region src/models/shared.d.ts
|
|
55
37
|
type AuditLog = {
|
|
56
38
|
userId: UserId;
|
|
@@ -67,6 +49,109 @@ type AuditProps = {
|
|
|
67
49
|
version?: number;
|
|
68
50
|
};
|
|
69
51
|
//#endregion
|
|
52
|
+
//#region src/models/company/model.d.ts
|
|
53
|
+
type CompanyKind = 'customer' | 'sandbox' | 'demo' | 'template' | 'development';
|
|
54
|
+
type AccessStatus = 'active' | 'suspended';
|
|
55
|
+
type BillingMethod = 'stripe' | 'none';
|
|
56
|
+
type CompanySize = number;
|
|
57
|
+
type CompanyIndustry = 'solar' | 'pest' | 'alarm' | 'roofing' | 'fiber' | 'insurance' | 'home_improvement' | 'windows' | 'satellite_tv' | 'retail' | 'other' | 'solar_cleaning';
|
|
58
|
+
type CompanyId = `C:${string}` | `C.${string}`;
|
|
59
|
+
type DemoState = 'Ready' | 'Copying' | 'Failed';
|
|
60
|
+
type ManualAccessOverride = AuditProps & {
|
|
61
|
+
accessStatus: AccessStatus;
|
|
62
|
+
note?: string;
|
|
63
|
+
expiresAt: number;
|
|
64
|
+
};
|
|
65
|
+
type UnsavedCompany = {
|
|
66
|
+
name: string;
|
|
67
|
+
legalName?: string;
|
|
68
|
+
kind?: CompanyKind;
|
|
69
|
+
accessStatus?: AccessStatus;
|
|
70
|
+
internalOwnerId?: UserId;
|
|
71
|
+
billingEmail?: string;
|
|
72
|
+
billingMethod?: BillingMethod;
|
|
73
|
+
maxUsers?: number;
|
|
74
|
+
parentCompanyId?: CompanyId;
|
|
75
|
+
salesforceAccountId?: string;
|
|
76
|
+
size?: CompanySize;
|
|
77
|
+
industries?: CompanyIndustry[];
|
|
78
|
+
salesChannels?: string[];
|
|
79
|
+
demoOwnerId?: UserId;
|
|
80
|
+
};
|
|
81
|
+
type CompanyData = AuditProps & UnsavedCompany & {
|
|
82
|
+
companyId: CompanyId;
|
|
83
|
+
kind: CompanyKind;
|
|
84
|
+
accessStatus: AccessStatus;
|
|
85
|
+
accessOverride?: ManualAccessOverride;
|
|
86
|
+
highestTeamLevel?: number;
|
|
87
|
+
lowestTeamLevel?: number;
|
|
88
|
+
levelNames?: Record<string, string>;
|
|
89
|
+
timeZone?: string;
|
|
90
|
+
avatarUrl?: string;
|
|
91
|
+
avatarBlurhash?: string;
|
|
92
|
+
uploadAvatarUrl?: string;
|
|
93
|
+
iconUrl?: string;
|
|
94
|
+
iconBlurhash?: string;
|
|
95
|
+
uploadIconUrl?: string;
|
|
96
|
+
demoState?: DemoState;
|
|
97
|
+
activeUserCount?: number;
|
|
98
|
+
isDeleted?: boolean;
|
|
99
|
+
};
|
|
100
|
+
type PartialCompanyData = Partial<CompanyData> & {
|
|
101
|
+
companyId: CompanyId;
|
|
102
|
+
legalName?: string | null;
|
|
103
|
+
internalOwnerId?: UserId | null;
|
|
104
|
+
salesforceAccountId?: string | null;
|
|
105
|
+
demoOwnerId?: UserId | null;
|
|
106
|
+
};
|
|
107
|
+
type TinyCompany = Pick<CompanyData, 'companyId' | 'name' | 'kind' | 'accessStatus' | 'modifiedBy' | 'demoState' | 'avatarUrl' | 'avatarBlurhash' | 'maxUsers' | 'activeUserCount' | 'salesforceAccountId'>;
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region src/models/company/api.d.ts
|
|
110
|
+
type CompanyListInput = {
|
|
111
|
+
archived?: true | false | 'all';
|
|
112
|
+
owners?: UserId[];
|
|
113
|
+
accessStatuses?: AccessStatus[];
|
|
114
|
+
billingMethods?: BillingMethod[];
|
|
115
|
+
kinds?: CompanyKind[];
|
|
116
|
+
};
|
|
117
|
+
type CompanyListSuccess = ApiSuccess<{
|
|
118
|
+
companies: TinyCompany[];
|
|
119
|
+
}>;
|
|
120
|
+
type CompanyGetInput = {
|
|
121
|
+
companyId?: CompanyId;
|
|
122
|
+
};
|
|
123
|
+
type CompanyGetSuccess = ApiSuccess<{
|
|
124
|
+
company: CompanyData;
|
|
125
|
+
}>;
|
|
126
|
+
type CompanyAddInput = UnsavedCompany;
|
|
127
|
+
type CompanyAddSuccess = ApiSuccess<{
|
|
128
|
+
company: CompanyData;
|
|
129
|
+
roles: RoleData[];
|
|
130
|
+
}>;
|
|
131
|
+
type CompanyUpdateInput = {
|
|
132
|
+
company: PartialCompanyData;
|
|
133
|
+
};
|
|
134
|
+
type CompanyUpdateSuccess = ApiSuccess<{
|
|
135
|
+
company: CompanyData;
|
|
136
|
+
}>;
|
|
137
|
+
type CompanyRemoveInput = {
|
|
138
|
+
companyId: CompanyId;
|
|
139
|
+
archive?: boolean;
|
|
140
|
+
};
|
|
141
|
+
type CompanyRemoveSuccess = ApiSuccess;
|
|
142
|
+
type CompanySetupInput = {
|
|
143
|
+
company: UnsavedCompany;
|
|
144
|
+
admin: UnsavedUser;
|
|
145
|
+
templateId?: CompanyId;
|
|
146
|
+
workflowId?: WorkflowId;
|
|
147
|
+
};
|
|
148
|
+
type CompanySetupSuccess = ApiSuccess<{
|
|
149
|
+
company: CompanyData;
|
|
150
|
+
roles: RoleData[];
|
|
151
|
+
user: UserProfileData;
|
|
152
|
+
password?: string;
|
|
153
|
+
}>;
|
|
154
|
+
//#endregion
|
|
70
155
|
//#region src/models/location/model.d.ts
|
|
71
156
|
type LatLng = {
|
|
72
157
|
latitude: number;
|
|
@@ -292,107 +377,101 @@ type CustomFieldFilterValue = {
|
|
|
292
377
|
exists: boolean;
|
|
293
378
|
};
|
|
294
379
|
//#endregion
|
|
295
|
-
//#region src/models/
|
|
296
|
-
type
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
type CompanyIndustry = 'solar' | 'pest' | 'alarm' | 'roofing' | 'fiber' | 'insurance' | 'home_improvement' | 'windows' | 'satellite_tv' | 'retail' | 'other' | 'solar_cleaning';
|
|
301
|
-
type CompanyId = `C:${string}` | `C.${string}`;
|
|
302
|
-
type DemoState = 'Ready' | 'Copying' | 'Failed';
|
|
303
|
-
type ManualAccessOverride = AuditProps & {
|
|
304
|
-
accessStatus: AccessStatus;
|
|
305
|
-
note?: string;
|
|
306
|
-
expiresAt: number;
|
|
380
|
+
//#region src/models/team/model.d.ts
|
|
381
|
+
type MeetingTime = {
|
|
382
|
+
day: number;
|
|
383
|
+
start: number;
|
|
384
|
+
end: number;
|
|
307
385
|
};
|
|
308
|
-
type
|
|
386
|
+
type UnsavedTeam = {
|
|
387
|
+
teamId?: TeamId;
|
|
309
388
|
name: string;
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
billingMethod?: BillingMethod;
|
|
316
|
-
maxUsers?: number;
|
|
317
|
-
parentCompanyId?: CompanyId;
|
|
318
|
-
salesforceAccountId?: string;
|
|
319
|
-
size?: CompanySize;
|
|
320
|
-
industries?: CompanyIndustry[];
|
|
321
|
-
salesChannels?: string[];
|
|
322
|
-
demoOwnerId?: UserId;
|
|
389
|
+
parentId?: TeamId;
|
|
390
|
+
level: number;
|
|
391
|
+
externalId?: string;
|
|
392
|
+
description?: string;
|
|
393
|
+
customFields?: CustomFieldMap;
|
|
323
394
|
};
|
|
324
|
-
type
|
|
325
|
-
|
|
326
|
-
kind: CompanyKind;
|
|
327
|
-
accessStatus: AccessStatus;
|
|
328
|
-
accessOverride?: ManualAccessOverride;
|
|
329
|
-
highestTeamLevel?: number;
|
|
330
|
-
lowestTeamLevel?: number;
|
|
331
|
-
levelNames?: Record<string, string>;
|
|
395
|
+
type TeamData = AuditProps & UnsavedTeam & {
|
|
396
|
+
teamId: TeamId;
|
|
332
397
|
timeZone?: string;
|
|
333
|
-
|
|
398
|
+
officeLocation?: LatLng;
|
|
399
|
+
officeAddress?: string;
|
|
400
|
+
meetingTimes?: MeetingTime[];
|
|
401
|
+
isCloserBoundary?: boolean;
|
|
402
|
+
restrictVisibility?: boolean;
|
|
334
403
|
avatarBlurhash?: string;
|
|
404
|
+
avatarUrl?: string;
|
|
405
|
+
parentTeamIds: TeamId[];
|
|
335
406
|
uploadAvatarUrl?: string;
|
|
336
|
-
iconUrl?: string;
|
|
337
|
-
iconBlurhash?: string;
|
|
338
|
-
uploadIconUrl?: string;
|
|
339
|
-
demoState?: DemoState;
|
|
340
|
-
activeUserCount?: number;
|
|
341
407
|
isDeleted?: boolean;
|
|
342
408
|
};
|
|
343
|
-
type
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
409
|
+
type TinyTeam = {
|
|
410
|
+
teamId: TeamId;
|
|
411
|
+
name: string;
|
|
412
|
+
parentId?: TeamId;
|
|
413
|
+
isDeleted?: boolean;
|
|
414
|
+
externalId?: string;
|
|
415
|
+
avatarBlurhash?: string;
|
|
416
|
+
avatarUrl?: string;
|
|
417
|
+
restrictVisibility?: boolean;
|
|
418
|
+
level: number;
|
|
419
|
+
meetingTimes?: MeetingTime[];
|
|
420
|
+
};
|
|
421
|
+
type PartialTeamData = Partial<TeamData> & {
|
|
422
|
+
teamId: TeamId;
|
|
423
|
+
};
|
|
424
|
+
type TeamMemberData = AuditProps & {
|
|
425
|
+
user: UserData; /** @deprecated Use roleIds instead. */
|
|
426
|
+
membership: string;
|
|
427
|
+
locked?: boolean;
|
|
428
|
+
roleIds?: RoleId[];
|
|
429
|
+
lastInterviewDate?: number;
|
|
430
|
+
lastShadowDate?: number;
|
|
349
431
|
};
|
|
350
|
-
type TinyCompany = Pick<CompanyData, 'companyId' | 'name' | 'kind' | 'accessStatus' | 'modifiedBy' | 'demoState' | 'avatarUrl' | 'avatarBlurhash' | 'maxUsers' | 'activeUserCount' | 'salesforceAccountId'>;
|
|
351
432
|
//#endregion
|
|
352
|
-
//#region src/models/
|
|
353
|
-
type
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
accessStatuses?: AccessStatus[];
|
|
357
|
-
billingMethods?: BillingMethod[];
|
|
358
|
-
kinds?: CompanyKind[];
|
|
433
|
+
//#region src/models/team/api.d.ts
|
|
434
|
+
type TeamListInput = {
|
|
435
|
+
showArchived?: true | false | 'all';
|
|
436
|
+
companyId?: CompanyId;
|
|
359
437
|
};
|
|
360
|
-
type
|
|
361
|
-
|
|
438
|
+
type TeamListSuccess = ApiSuccess<{
|
|
439
|
+
teams: TeamData[];
|
|
362
440
|
}>;
|
|
363
|
-
type
|
|
364
|
-
|
|
441
|
+
type TeamGetInput = {
|
|
442
|
+
teamId: TeamId;
|
|
365
443
|
};
|
|
366
|
-
type
|
|
367
|
-
|
|
444
|
+
type TeamGetSuccess = ApiSuccess<{
|
|
445
|
+
team: TeamData;
|
|
446
|
+
childTeams: TinyTeam[];
|
|
447
|
+
members: TeamMemberData[];
|
|
368
448
|
}>;
|
|
369
|
-
type
|
|
370
|
-
type
|
|
371
|
-
|
|
372
|
-
roles: RoleData[];
|
|
449
|
+
type TeamAddInput = UnsavedTeam;
|
|
450
|
+
type TeamAddSuccess = ApiSuccess<{
|
|
451
|
+
team: TeamData;
|
|
373
452
|
}>;
|
|
374
|
-
type
|
|
375
|
-
|
|
453
|
+
type TeamUpdateData = Omit<PartialTeamData, 'parentId'> & {
|
|
454
|
+
parentId?: TeamId | null;
|
|
376
455
|
};
|
|
377
|
-
type
|
|
378
|
-
|
|
456
|
+
type TeamUpdateInput = {
|
|
457
|
+
team: TeamUpdateData;
|
|
458
|
+
};
|
|
459
|
+
type TeamUpdateSuccess = ApiSuccess<{
|
|
460
|
+
team: TeamData;
|
|
461
|
+
childTeams: TinyTeam[];
|
|
462
|
+
members: TeamMemberData[];
|
|
379
463
|
}>;
|
|
380
|
-
type
|
|
381
|
-
|
|
464
|
+
type TeamRemoveInput = {
|
|
465
|
+
teamId: TeamId;
|
|
382
466
|
archive?: boolean;
|
|
383
467
|
};
|
|
384
|
-
type
|
|
385
|
-
type
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
templateId?: CompanyId;
|
|
389
|
-
workflowId?: WorkflowId;
|
|
468
|
+
type TeamRemoveSuccess = ApiSuccess;
|
|
469
|
+
type TeamDownlineInput = {
|
|
470
|
+
entityId: TeamId | CompanyId;
|
|
471
|
+
archived?: true | false | 'all';
|
|
390
472
|
};
|
|
391
|
-
type
|
|
392
|
-
|
|
393
|
-
roles: RoleData[];
|
|
394
|
-
user: UserProfileData;
|
|
395
|
-
password?: string;
|
|
473
|
+
type TeamDownlineSuccess = ApiSuccess<{
|
|
474
|
+
users: TinyUser[];
|
|
396
475
|
}>;
|
|
397
476
|
//#endregion
|
|
398
477
|
//#region src/models/user/model.d.ts
|
|
@@ -1213,15 +1292,18 @@ type ConfigSchemaField = {
|
|
|
1213
1292
|
description?: string;
|
|
1214
1293
|
dataType?: 'None' | 'Account' | 'User' | 'Event';
|
|
1215
1294
|
};
|
|
1295
|
+
type AuthSchemaField = string | {
|
|
1296
|
+
description: string;
|
|
1297
|
+
mapping?: boolean;
|
|
1298
|
+
};
|
|
1216
1299
|
type ScriptBase = {
|
|
1217
1300
|
appId: AppId;
|
|
1218
1301
|
appVersion: string;
|
|
1219
1302
|
name: string;
|
|
1220
1303
|
description?: string;
|
|
1221
1304
|
configSchema: ConfigSchemaField[];
|
|
1222
|
-
authSchema: Record<string,
|
|
1305
|
+
authSchema: Record<string, AuthSchemaField>;
|
|
1223
1306
|
scriptStorage?: 'inline' | 'blob';
|
|
1224
|
-
mainScript?: string;
|
|
1225
1307
|
permissions: string[];
|
|
1226
1308
|
slug?: string;
|
|
1227
1309
|
};
|
|
@@ -1424,6 +1506,18 @@ declare class ConnectClient {
|
|
|
1424
1506
|
constructor(api: TerrosApiClient);
|
|
1425
1507
|
}
|
|
1426
1508
|
//#endregion
|
|
1509
|
+
//#region src/clients/team.d.ts
|
|
1510
|
+
declare class TeamClient {
|
|
1511
|
+
private readonly api;
|
|
1512
|
+
constructor(api: TerrosApiClient);
|
|
1513
|
+
list(input?: TeamListInput): Promise<TeamListSuccess>;
|
|
1514
|
+
get(input: TeamGetInput): Promise<TeamGetSuccess>;
|
|
1515
|
+
add(input: TeamAddInput): Promise<TeamAddSuccess>;
|
|
1516
|
+
update(input: TeamUpdateInput): Promise<TeamUpdateSuccess>;
|
|
1517
|
+
remove(input: TeamRemoveInput): Promise<TeamRemoveSuccess>;
|
|
1518
|
+
downline(input: TeamDownlineInput): Promise<TeamDownlineSuccess>;
|
|
1519
|
+
}
|
|
1520
|
+
//#endregion
|
|
1427
1521
|
//#region src/clients/user.d.ts
|
|
1428
1522
|
declare class UserClient {
|
|
1429
1523
|
private readonly api;
|
|
@@ -1449,6 +1543,7 @@ declare class TerrosClient {
|
|
|
1449
1543
|
readonly calendar: CalendarClient;
|
|
1450
1544
|
readonly company: CompanyClient;
|
|
1451
1545
|
readonly connect: ConnectClient;
|
|
1546
|
+
readonly team: TeamClient;
|
|
1452
1547
|
readonly user: UserClient;
|
|
1453
1548
|
constructor(config?: TerrosClientConfig);
|
|
1454
1549
|
}
|
|
@@ -1472,4 +1567,4 @@ type ConnectExecutionInput<Payload> = {
|
|
|
1472
1567
|
type WrappedHandler<Input, Result> = (input: ConnectExecutionInput<Input>) => Promise<Result>;
|
|
1473
1568
|
declare function wrapConnectHandler<Input, Result = void>(handler: ConnectHandlerFunction<Input, Result>): WrappedHandler<Input, Result>;
|
|
1474
1569
|
//#endregion
|
|
1475
|
-
export { AccessStatus, AccountAddInput, AccountAddSuccess, AccountContact, AccountData, AccountDataResponse, AccountGetInput, AccountGetSuccess, AccountHooksInput, AccountId, AccountListInput, AccountListSuccess, AccountMatchInput, AccountMatchSuccess, AccountNote, AccountPartialUpdateInput, AccountRemoveInput, AccountSortBy, AccountSortOrder, AccountStatusAddInput, AccountStatusAddSuccess, AccountStatusCode, AccountStatusData, AccountStatusId, AccountStatusListInput, AccountStatusListSuccess, AccountStatusRemoveInput, AccountStatusSearchInput, AccountStatusUpdateInput, AccountStatusUpdateSuccess, AccountUpdateBatchInput, AccountUpdateBatchSuccess, AccountUpdateInput, AccountUpdateSuccess, AccountUpsertInput, AccountUpsertSuccess, AccountUserDetails, AccountWebhook, AccountWebhookData, Address, AppData, AppGetInput, AppGetSuccess, AppId, AppVersionData, AppVersionId, AreaAddInput, AreaAddSuccess, AreaAssignInput, AreaAssignmentConfig, AreaAssignmentType, AreaData, AreaFilters, AreaGetInput, AreaGetSuccess, AreaId, AreaJobInfo, AreaListInput, AreaListSortBy, AreaListSortOrder, AreaListSuccess, AreaRemoveInput, AreaRunHistoryEntry, AreaRunType, AreaScheduleEntry, AreaSortCursor, AreaStateName, AreaUpdateInput, AreaUpdateSuccess, AttachmentId, AuditLog, AuditProps, AvailableCloser, BillingMethod, BulkModifyAccountsAction, BulkModifyAccountsInput, CalendarAvailabilityInput, CalendarAvailabilitySuccess, CalendarClosersInput, CalendarClosersSuccess, CalendarEventAddInput, CalendarEventAddSuccess, CalendarEventConfirmInput, CalendarEventConfirmSuccess, CalendarEventData, CalendarEventDataWithDetails, CalendarEventGetInput, CalendarEventGetSuccess, CalendarEventId, CalendarEventListInput, CalendarEventListSuccess, CalendarEventLocation, CalendarEventRemoveInput, CalendarEventUpdateInput, CalendarEventUpdateSuccess, CalendarEventUpsertInput, CalendarEventUpsertSuccess, CalendarTimeslotsInput, CalendarTimeslotsSuccess, CloserSettings, CloserStatus, CompanyAddInput, CompanyAddSuccess, CompanyData, CompanyGetInput, CompanyGetSuccess, CompanyId, CompanyIndustry, CompanyKind, CompanyListInput, CompanyListSuccess, CompanyRemoveInput, CompanyRemoveSuccess, CompanySetupInput, CompanySetupSuccess, CompanySize, CompanyUpdateInput, CompanyUpdateSuccess, CompanyWebhook, CompanyWebhookData, ConfigSchemaField, ConnectHandlerFunction, ContactId, CustomFieldFilter, CustomFieldFilterValue, CustomFieldId, CustomFieldMap, CustomFieldType, DemoState, DispositionId, ElasticFilter, EntityId, EventOutcomeHistory, EventOutcomeId, EventType, IncomingScript, InterviewId, LatLng, LocationId, ManualAccessOverride, NoteId, NotificationPreference, OutgoingScript, PartialAddress, PartialCompanyData, PermissionMap, RangeFilter, RoleData, RoleId, ScheduledScript, ScriptAddInput, ScriptAddSuccess, ScriptBase, ScriptData, SmallAddress, SmallCloser, SmallUser, SortCursor, SpecialtyAttachments, StatusHistoryItem, SyncedCalendarEvent, TagId, TeamId, TerrosClient, TinyAccountStatus, TinyCloser, TinyCompany, TinyResidentData, TinyRole, TinyTeam, TinyUser, TinyWorkflowAccount, UnsavedAccount, UnsavedAccountContact, UnsavedAccountNote, UnsavedAccountStatus, UnsavedAppVersion, UnsavedArea, UnsavedCalendarEventData, UnsavedCompany, UnsavedScript, UnsavedUser, UpsertLatLng, UpsertTinyResidentData, UserAddInput, UserAddSuccess, UserBulkUpdateInput, UserBulkUpdateSuccess, UserClosersInput, UserClosersSuccess, UserData, UserGetInput, UserGetSuccess, UserHistory, UserId, UserIdentifier, UserListInput, UserListSuccess, UserManagerInput, UserManagerSuccess, UserPreferences, UserProfileData, UserProfileInput, UserProfileSuccess, UserRemoveInput, UserReportInput, UserReportSuccess, UserSearchInput, UserSearchSuccess, UserTeamData, UserTeamsByLevel, UserTimezoneInput, UserUpdateInput, UserUpdateSuccess, UserWebhook, UserWebhookData, VersionAddInput, VersionAddSuccess, VersionGetInput, VersionGetSuccess, VersionUpdateInput, VersionUpdateSuccess, WebhookAddUpdatePayload, WebhookAuditProps, WebhookPayload, WebhookRemovePayload, Weekday, WorkflowActionId, WorkflowHistoryItem, WorkflowId, WorkflowStageId, wrapConnectHandler };
|
|
1570
|
+
export { AccessStatus, AccountAddInput, AccountAddSuccess, AccountContact, AccountData, AccountDataResponse, AccountGetInput, AccountGetSuccess, AccountHooksInput, AccountId, AccountListInput, AccountListSuccess, AccountMatchInput, AccountMatchSuccess, AccountNote, AccountPartialUpdateInput, AccountRemoveInput, AccountSortBy, AccountSortOrder, AccountStatusAddInput, AccountStatusAddSuccess, AccountStatusCode, AccountStatusData, AccountStatusId, AccountStatusListInput, AccountStatusListSuccess, AccountStatusRemoveInput, AccountStatusSearchInput, AccountStatusUpdateInput, AccountStatusUpdateSuccess, AccountUpdateBatchInput, AccountUpdateBatchSuccess, AccountUpdateInput, AccountUpdateSuccess, AccountUpsertInput, AccountUpsertSuccess, AccountUserDetails, AccountWebhook, AccountWebhookData, Address, AppData, AppGetInput, AppGetSuccess, AppId, AppVersionData, AppVersionId, AreaAddInput, AreaAddSuccess, AreaAssignInput, AreaAssignmentConfig, AreaAssignmentType, AreaData, AreaFilters, AreaGetInput, AreaGetSuccess, AreaId, AreaJobInfo, AreaListInput, AreaListSortBy, AreaListSortOrder, AreaListSuccess, AreaRemoveInput, AreaRunHistoryEntry, AreaRunType, AreaScheduleEntry, AreaSortCursor, AreaStateName, AreaUpdateInput, AreaUpdateSuccess, AttachmentId, AuditLog, AuditProps, AuthSchemaField, AvailableCloser, BillingMethod, BulkModifyAccountsAction, BulkModifyAccountsInput, CalendarAvailabilityInput, CalendarAvailabilitySuccess, CalendarClosersInput, CalendarClosersSuccess, CalendarEventAddInput, CalendarEventAddSuccess, CalendarEventConfirmInput, CalendarEventConfirmSuccess, CalendarEventData, CalendarEventDataWithDetails, CalendarEventGetInput, CalendarEventGetSuccess, CalendarEventId, CalendarEventListInput, CalendarEventListSuccess, CalendarEventLocation, CalendarEventRemoveInput, CalendarEventUpdateInput, CalendarEventUpdateSuccess, CalendarEventUpsertInput, CalendarEventUpsertSuccess, CalendarTimeslotsInput, CalendarTimeslotsSuccess, CloserSettings, CloserStatus, CompanyAddInput, CompanyAddSuccess, CompanyData, CompanyGetInput, CompanyGetSuccess, CompanyId, CompanyIndustry, CompanyKind, CompanyListInput, CompanyListSuccess, CompanyRemoveInput, CompanyRemoveSuccess, CompanySetupInput, CompanySetupSuccess, CompanySize, CompanyUpdateInput, CompanyUpdateSuccess, CompanyWebhook, CompanyWebhookData, ConfigSchemaField, ConnectHandlerFunction, ContactId, CustomFieldFilter, CustomFieldFilterValue, CustomFieldId, CustomFieldMap, CustomFieldType, DemoState, DispositionId, ElasticFilter, EntityId, EventOutcomeHistory, EventOutcomeId, EventType, IncomingScript, InterviewId, LatLng, LocationId, ManualAccessOverride, MeetingTime, NoteId, NotificationPreference, OutgoingScript, PartialAddress, PartialCompanyData, PartialTeamData, PermissionMap, RangeFilter, RoleData, RoleId, ScheduledScript, ScriptAddInput, ScriptAddSuccess, ScriptBase, ScriptData, SmallAddress, SmallCloser, SmallUser, SortCursor, SpecialtyAttachments, StatusHistoryItem, SyncedCalendarEvent, TagId, TeamAddInput, TeamAddSuccess, TeamData, TeamDownlineInput, TeamDownlineSuccess, TeamGetInput, TeamGetSuccess, TeamId, TeamListInput, TeamListSuccess, TeamMemberData, TeamRemoveInput, TeamRemoveSuccess, TeamUpdateData, TeamUpdateInput, TeamUpdateSuccess, TerrosClient, TinyAccountStatus, TinyCloser, TinyCompany, TinyResidentData, TinyRole, TinyTeam, TinyUser, TinyWorkflowAccount, UnsavedAccount, UnsavedAccountContact, UnsavedAccountNote, UnsavedAccountStatus, UnsavedAppVersion, UnsavedArea, UnsavedCalendarEventData, UnsavedCompany, UnsavedScript, UnsavedTeam, UnsavedUser, UpsertLatLng, UpsertTinyResidentData, UserAddInput, UserAddSuccess, UserBulkUpdateInput, UserBulkUpdateSuccess, UserClosersInput, UserClosersSuccess, UserData, UserGetInput, UserGetSuccess, UserHistory, UserId, UserIdentifier, UserListInput, UserListSuccess, UserManagerInput, UserManagerSuccess, UserPreferences, UserProfileData, UserProfileInput, UserProfileSuccess, UserRemoveInput, UserReportInput, UserReportSuccess, UserSearchInput, UserSearchSuccess, UserTeamData, UserTeamsByLevel, UserTimezoneInput, UserUpdateInput, UserUpdateSuccess, UserWebhook, UserWebhookData, VersionAddInput, VersionAddSuccess, VersionGetInput, VersionGetSuccess, VersionUpdateInput, VersionUpdateSuccess, WebhookAddUpdatePayload, WebhookAuditProps, WebhookPayload, WebhookRemovePayload, Weekday, WorkflowActionId, WorkflowHistoryItem, WorkflowId, WorkflowStageId, wrapConnectHandler };
|
package/dist/index.mjs
CHANGED
|
@@ -146,8 +146,9 @@ var TerrosApiClient = class {
|
|
|
146
146
|
determineBaseUrl(config) {
|
|
147
147
|
if (config.baseUrl) return config.baseUrl;
|
|
148
148
|
const envEndpoint = readProcessEnv("TERROS_API_ENDPOINT");
|
|
149
|
-
if (envEndpoint) return
|
|
150
|
-
return
|
|
149
|
+
if (!envEndpoint) return PROD_BASE_URL;
|
|
150
|
+
if (/^https?:\/\//i.test(envEndpoint)) return envEndpoint;
|
|
151
|
+
return `https://${envEndpoint}`;
|
|
151
152
|
}
|
|
152
153
|
};
|
|
153
154
|
function readProcessEnv(key) {
|
|
@@ -156,7 +157,7 @@ function readProcessEnv(key) {
|
|
|
156
157
|
}
|
|
157
158
|
//#endregion
|
|
158
159
|
//#region package.json
|
|
159
|
-
var version = "1.0.
|
|
160
|
+
var version = "1.0.16";
|
|
160
161
|
//#endregion
|
|
161
162
|
//#region src/clients/account.ts
|
|
162
163
|
var AccountStatusClient = class {
|
|
@@ -358,6 +359,32 @@ var ConnectClient = class {
|
|
|
358
359
|
}
|
|
359
360
|
};
|
|
360
361
|
//#endregion
|
|
362
|
+
//#region src/clients/team.ts
|
|
363
|
+
var TeamClient = class {
|
|
364
|
+
api;
|
|
365
|
+
constructor(api) {
|
|
366
|
+
this.api = api;
|
|
367
|
+
}
|
|
368
|
+
list(input = {}) {
|
|
369
|
+
return this.api.call("team/list", input);
|
|
370
|
+
}
|
|
371
|
+
get(input) {
|
|
372
|
+
return this.api.call("team/get", input);
|
|
373
|
+
}
|
|
374
|
+
add(input) {
|
|
375
|
+
return this.api.call("team/add", input);
|
|
376
|
+
}
|
|
377
|
+
update(input) {
|
|
378
|
+
return this.api.call("team/update", input);
|
|
379
|
+
}
|
|
380
|
+
remove(input) {
|
|
381
|
+
return this.api.call("team/remove", input);
|
|
382
|
+
}
|
|
383
|
+
downline(input) {
|
|
384
|
+
return this.api.call("team/downline", input);
|
|
385
|
+
}
|
|
386
|
+
};
|
|
387
|
+
//#endregion
|
|
361
388
|
//#region src/clients/user.ts
|
|
362
389
|
var UserClient = class {
|
|
363
390
|
api;
|
|
@@ -409,6 +436,7 @@ var TerrosClient = class {
|
|
|
409
436
|
calendar;
|
|
410
437
|
company;
|
|
411
438
|
connect;
|
|
439
|
+
team;
|
|
412
440
|
user;
|
|
413
441
|
constructor(config = {}) {
|
|
414
442
|
const api = new TerrosApiClient({
|
|
@@ -420,6 +448,7 @@ var TerrosClient = class {
|
|
|
420
448
|
this.calendar = new CalendarClient(api);
|
|
421
449
|
this.company = new CompanyClient(api);
|
|
422
450
|
this.connect = new ConnectClient(api);
|
|
451
|
+
this.team = new TeamClient(api);
|
|
423
452
|
this.user = new UserClient(api);
|
|
424
453
|
}
|
|
425
454
|
};
|