@terros-inc/sdk 1.0.12 → 1.0.14
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 +169 -15
- package/dist/index.mjs +43 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -295,21 +295,36 @@ type CustomFieldFilterValue = {
|
|
|
295
295
|
type CompanyKind = 'customer' | 'sandbox' | 'demo' | 'template' | 'development';
|
|
296
296
|
type AccessStatus = 'active' | 'suspended';
|
|
297
297
|
type BillingMethod = 'stripe' | 'none';
|
|
298
|
+
type CompanySize = number;
|
|
298
299
|
type CompanyIndustry = 'solar' | 'pest' | 'alarm' | 'roofing' | 'fiber' | 'insurance' | 'home_improvement' | 'windows' | 'satellite_tv' | 'retail' | 'other' | 'solar_cleaning';
|
|
299
300
|
type CompanyId = `C:${string}` | `C.${string}`;
|
|
300
|
-
type
|
|
301
|
-
|
|
301
|
+
type DemoState = 'Ready' | 'Copying' | 'Failed';
|
|
302
|
+
type ManualAccessOverride = AuditProps & {
|
|
303
|
+
accessStatus: AccessStatus;
|
|
304
|
+
note?: string;
|
|
305
|
+
expiresAt: number;
|
|
306
|
+
};
|
|
307
|
+
type UnsavedCompany = {
|
|
302
308
|
name: string;
|
|
303
309
|
legalName?: string;
|
|
304
|
-
kind
|
|
305
|
-
accessStatus
|
|
310
|
+
kind?: CompanyKind;
|
|
311
|
+
accessStatus?: AccessStatus;
|
|
306
312
|
internalOwnerId?: UserId;
|
|
307
313
|
billingEmail?: string;
|
|
308
314
|
billingMethod?: BillingMethod;
|
|
309
315
|
maxUsers?: number;
|
|
310
|
-
|
|
316
|
+
parentCompanyId?: CompanyId;
|
|
317
|
+
salesforceAccountId?: string;
|
|
318
|
+
size?: CompanySize;
|
|
311
319
|
industries?: CompanyIndustry[];
|
|
312
320
|
salesChannels?: string[];
|
|
321
|
+
demoOwnerId?: UserId;
|
|
322
|
+
};
|
|
323
|
+
type CompanyData = AuditProps & UnsavedCompany & {
|
|
324
|
+
companyId: CompanyId;
|
|
325
|
+
kind: CompanyKind;
|
|
326
|
+
accessStatus: AccessStatus;
|
|
327
|
+
accessOverride?: ManualAccessOverride;
|
|
313
328
|
highestTeamLevel?: number;
|
|
314
329
|
lowestTeamLevel?: number;
|
|
315
330
|
levelNames?: Record<string, string>;
|
|
@@ -320,12 +335,64 @@ type CompanyData = {
|
|
|
320
335
|
iconUrl?: string;
|
|
321
336
|
iconBlurhash?: string;
|
|
322
337
|
uploadIconUrl?: string;
|
|
338
|
+
demoState?: DemoState;
|
|
339
|
+
activeUserCount?: number;
|
|
323
340
|
isDeleted?: boolean;
|
|
324
|
-
createdAt?: number;
|
|
325
|
-
createdBy?: UserId;
|
|
326
|
-
updatedAt?: number;
|
|
327
|
-
updatedBy?: UserId;
|
|
328
341
|
};
|
|
342
|
+
type PartialCompanyData = Partial<CompanyData> & {
|
|
343
|
+
companyId: CompanyId;
|
|
344
|
+
legalName?: string | null;
|
|
345
|
+
internalOwnerId?: UserId | null;
|
|
346
|
+
salesforceAccountId?: string | null;
|
|
347
|
+
demoOwnerId?: UserId | null;
|
|
348
|
+
};
|
|
349
|
+
type TinyCompany = Pick<CompanyData, 'companyId' | 'name' | 'kind' | 'accessStatus' | 'modifiedBy' | 'demoState' | 'avatarUrl' | 'avatarBlurhash' | 'maxUsers' | 'activeUserCount' | 'salesforceAccountId'>;
|
|
350
|
+
//#endregion
|
|
351
|
+
//#region src/models/company/api.d.ts
|
|
352
|
+
type CompanyListInput = {
|
|
353
|
+
archived?: true | false | 'all';
|
|
354
|
+
owners?: UserId[];
|
|
355
|
+
accessStatuses?: AccessStatus[];
|
|
356
|
+
billingMethods?: BillingMethod[];
|
|
357
|
+
kinds?: CompanyKind[];
|
|
358
|
+
};
|
|
359
|
+
type CompanyListSuccess = ApiSuccess<{
|
|
360
|
+
companies: TinyCompany[];
|
|
361
|
+
}>;
|
|
362
|
+
type CompanyGetInput = {
|
|
363
|
+
companyId?: CompanyId;
|
|
364
|
+
};
|
|
365
|
+
type CompanyGetSuccess = ApiSuccess<{
|
|
366
|
+
company: CompanyData;
|
|
367
|
+
}>;
|
|
368
|
+
type CompanyAddInput = UnsavedCompany;
|
|
369
|
+
type CompanyAddSuccess = ApiSuccess<{
|
|
370
|
+
company: CompanyData;
|
|
371
|
+
roles: RoleData[];
|
|
372
|
+
}>;
|
|
373
|
+
type CompanyUpdateInput = {
|
|
374
|
+
company: PartialCompanyData;
|
|
375
|
+
};
|
|
376
|
+
type CompanyUpdateSuccess = ApiSuccess<{
|
|
377
|
+
company: CompanyData;
|
|
378
|
+
}>;
|
|
379
|
+
type CompanyRemoveInput = {
|
|
380
|
+
companyId: CompanyId;
|
|
381
|
+
archive?: boolean;
|
|
382
|
+
};
|
|
383
|
+
type CompanyRemoveSuccess = ApiSuccess;
|
|
384
|
+
type CompanySetupInput = {
|
|
385
|
+
company: UnsavedCompany;
|
|
386
|
+
admin: UnsavedUser;
|
|
387
|
+
templateId?: CompanyId;
|
|
388
|
+
workflowId?: WorkflowId;
|
|
389
|
+
};
|
|
390
|
+
type CompanySetupSuccess = ApiSuccess<{
|
|
391
|
+
company: CompanyData;
|
|
392
|
+
roles: RoleData[];
|
|
393
|
+
user: UserProfileData;
|
|
394
|
+
password?: string;
|
|
395
|
+
}>;
|
|
329
396
|
//#endregion
|
|
330
397
|
//#region src/models/user/model.d.ts
|
|
331
398
|
type UserId = `U:${string}` | `U.${string}`;
|
|
@@ -339,6 +406,19 @@ type TinyRole = {
|
|
|
339
406
|
roleType: 'admin' | 'manager' | 'recruit' | null;
|
|
340
407
|
name: string;
|
|
341
408
|
};
|
|
409
|
+
type RoleData = AuditProps & {
|
|
410
|
+
roleId: RoleId;
|
|
411
|
+
companyId: CompanyId;
|
|
412
|
+
name: string;
|
|
413
|
+
roleType?: 'admin' | 'manager' | 'recruit' | null;
|
|
414
|
+
description?: string;
|
|
415
|
+
assignment?: 'user' | 'team';
|
|
416
|
+
avatarBlurhash?: string;
|
|
417
|
+
avatarUrl?: string;
|
|
418
|
+
uploadAvatarUrl?: string;
|
|
419
|
+
canAssign?: boolean;
|
|
420
|
+
isDeleted?: boolean;
|
|
421
|
+
};
|
|
342
422
|
type TinyUser = {
|
|
343
423
|
userId: UserId;
|
|
344
424
|
clientUserId?: string;
|
|
@@ -387,6 +467,19 @@ type TinyCloser = {
|
|
|
387
467
|
startTime: number;
|
|
388
468
|
duration: number;
|
|
389
469
|
}[];
|
|
470
|
+
bookingPercent: number;
|
|
471
|
+
serviceArea: {
|
|
472
|
+
type: 'unrestricted';
|
|
473
|
+
} | {
|
|
474
|
+
type: 'radius';
|
|
475
|
+
center: {
|
|
476
|
+
latitude: number;
|
|
477
|
+
longitude: number;
|
|
478
|
+
};
|
|
479
|
+
radiusMeters: number;
|
|
480
|
+
} | {
|
|
481
|
+
type: 'unknown';
|
|
482
|
+
};
|
|
390
483
|
};
|
|
391
484
|
type SmallCloser = TinyUser & CloserSettings & {
|
|
392
485
|
timezone: string;
|
|
@@ -725,8 +818,6 @@ type AccountData = Omit<UnsavedAccount, 'contacts' | 'notes'> & {
|
|
|
725
818
|
workflowStageName?: string;
|
|
726
819
|
workflowActionName?: string;
|
|
727
820
|
homeowner?: TinyResidentData;
|
|
728
|
-
userMissDate?: number;
|
|
729
|
-
locationMissDate?: number;
|
|
730
821
|
expiresAt?: number;
|
|
731
822
|
contacts?: AccountContact[];
|
|
732
823
|
notes?: AccountNote[];
|
|
@@ -821,6 +912,7 @@ type ElasticFilter = {
|
|
|
821
912
|
};
|
|
822
913
|
workflowActionCount?: RangeFilter;
|
|
823
914
|
contactCount?: RangeFilter;
|
|
915
|
+
stageEntryDate?: RangeFilter;
|
|
824
916
|
};
|
|
825
917
|
type AccountStatusSearchInput = {
|
|
826
918
|
accountIds?: AccountId[];
|
|
@@ -829,6 +921,7 @@ type AccountStatusSearchInput = {
|
|
|
829
921
|
actionIds?: WorkflowActionId[]; /** @deprecated */
|
|
830
922
|
statusIds?: AccountStatusId[];
|
|
831
923
|
teamId?: TeamId;
|
|
924
|
+
teamIds?: TeamId[];
|
|
832
925
|
userId?: UserId;
|
|
833
926
|
roleIds?: RoleId[];
|
|
834
927
|
startTime?: string | number;
|
|
@@ -845,6 +938,7 @@ type AccountStatusSearchInput = {
|
|
|
845
938
|
contactCount?: RangeFilter;
|
|
846
939
|
workflowActionCount?: RangeFilter;
|
|
847
940
|
lastActionDate?: RangeFilter;
|
|
941
|
+
stageEntryDate?: RangeFilter;
|
|
848
942
|
sortBy?: AccountSortBy;
|
|
849
943
|
sortOrder?: AccountSortOrder;
|
|
850
944
|
};
|
|
@@ -980,6 +1074,7 @@ type AccountStatusRemoveInput = {
|
|
|
980
1074
|
//#region src/models/area/model.d.ts
|
|
981
1075
|
type AreaId = `Area.${string}`;
|
|
982
1076
|
type AreaAssignmentType = 'user' | 'team' | 'company' | 'draft';
|
|
1077
|
+
type AreaStateName = 'draft' | 'scheduled' | 'assigned' | 'expiring' | 'unassigned';
|
|
983
1078
|
type AreaRunType = 'assign' | 'unassign' | 'reassign';
|
|
984
1079
|
type AreaFilters = {
|
|
985
1080
|
cities?: string[];
|
|
@@ -1050,6 +1145,12 @@ type AreaData = UnsavedArea & AuditProps & {
|
|
|
1050
1145
|
//#endregion
|
|
1051
1146
|
//#region src/models/area/api.d.ts
|
|
1052
1147
|
type AreaSortCursor = string | number | boolean | (string | number | boolean)[];
|
|
1148
|
+
type AreaListSortBy = 'order' | 'name' | 'status' | 'lastRunAt' | 'createdAt' | 'updatedAt' | 'areaId';
|
|
1149
|
+
type AreaListSortOrder = 'asc' | 'desc';
|
|
1150
|
+
type OptionalDateRange = {
|
|
1151
|
+
startTime?: string | number;
|
|
1152
|
+
endTime?: string | number;
|
|
1153
|
+
};
|
|
1053
1154
|
type AreaGetInput = {
|
|
1054
1155
|
areaId: AreaId;
|
|
1055
1156
|
};
|
|
@@ -1061,12 +1162,24 @@ type AreaListInput = {
|
|
|
1061
1162
|
teamId?: TeamId;
|
|
1062
1163
|
teamIds?: TeamId[];
|
|
1063
1164
|
downlineTeamIds?: TeamId[];
|
|
1064
|
-
|
|
1165
|
+
query?: string;
|
|
1166
|
+
boundingBox?: {
|
|
1167
|
+
top: LatLng;
|
|
1168
|
+
bottom: LatLng;
|
|
1169
|
+
};
|
|
1170
|
+
areaStates?: AreaStateName[];
|
|
1171
|
+
createdDate?: OptionalDateRange;
|
|
1172
|
+
lastAssignmentDate?: OptionalDateRange;
|
|
1173
|
+
expirationDate?: OptionalDateRange;
|
|
1174
|
+
sortBy?: AreaListSortBy;
|
|
1175
|
+
sortOrder?: AreaListSortOrder;
|
|
1176
|
+
sortTimestamp?: AreaSortCursor;
|
|
1065
1177
|
size?: number;
|
|
1066
1178
|
};
|
|
1067
1179
|
type AreaListSuccess = ApiSuccess<{
|
|
1068
1180
|
areas: AreaData[];
|
|
1069
|
-
|
|
1181
|
+
sortTimestamp?: AreaSortCursor;
|
|
1182
|
+
total?: number;
|
|
1070
1183
|
}>;
|
|
1071
1184
|
type AreaAddInput = UnsavedArea;
|
|
1072
1185
|
type AreaAddSuccess = ApiSuccess<{
|
|
@@ -1081,12 +1194,16 @@ type AreaRemoveInput = {
|
|
|
1081
1194
|
archive?: boolean;
|
|
1082
1195
|
};
|
|
1083
1196
|
type AreaAssignInput = {
|
|
1084
|
-
areas
|
|
1197
|
+
areas?: AreaData[];
|
|
1198
|
+
areaListInput?: AreaListInput;
|
|
1085
1199
|
runType: AreaRunType;
|
|
1086
1200
|
};
|
|
1087
1201
|
//#endregion
|
|
1088
1202
|
//#region src/models/connect/app/model.d.ts
|
|
1089
1203
|
type AppId = `App.${string}`;
|
|
1204
|
+
type AppData = {
|
|
1205
|
+
appId: AppId;
|
|
1206
|
+
};
|
|
1090
1207
|
//#endregion
|
|
1091
1208
|
//#region src/models/connect/script/model.d.ts
|
|
1092
1209
|
type ConfigSchemaField = {
|
|
@@ -1152,6 +1269,14 @@ type AppVersionData = UnsavedAppVersion & {
|
|
|
1152
1269
|
};
|
|
1153
1270
|
//#endregion
|
|
1154
1271
|
//#region src/models/connect/version/api.d.ts
|
|
1272
|
+
type VersionGetInput = {
|
|
1273
|
+
appId: AppId;
|
|
1274
|
+
appVersion: string;
|
|
1275
|
+
};
|
|
1276
|
+
type VersionGetSuccess = ApiSuccess<{
|
|
1277
|
+
appVersion: AppVersionData;
|
|
1278
|
+
scripts: ScriptData[];
|
|
1279
|
+
}>;
|
|
1155
1280
|
type VersionAddInput = {
|
|
1156
1281
|
versionData: UnsavedAppVersion;
|
|
1157
1282
|
};
|
|
@@ -1165,6 +1290,15 @@ type VersionUpdateSuccess = ApiSuccess<{
|
|
|
1165
1290
|
appVersion: AppVersionData;
|
|
1166
1291
|
}>;
|
|
1167
1292
|
//#endregion
|
|
1293
|
+
//#region src/models/connect/app/api.d.ts
|
|
1294
|
+
type AppGetInput = {
|
|
1295
|
+
appId: AppId;
|
|
1296
|
+
};
|
|
1297
|
+
type AppGetSuccess = ApiSuccess<{
|
|
1298
|
+
app: AppData;
|
|
1299
|
+
versions: AppVersionData[];
|
|
1300
|
+
}>;
|
|
1301
|
+
//#endregion
|
|
1168
1302
|
//#region src/models/webhook.d.ts
|
|
1169
1303
|
type WebhookAuditProps = {
|
|
1170
1304
|
createdAt: string;
|
|
@@ -1251,10 +1385,28 @@ declare class CalendarClient {
|
|
|
1251
1385
|
timeslots(input: CalendarTimeslotsInput): Promise<CalendarTimeslotsSuccess>;
|
|
1252
1386
|
}
|
|
1253
1387
|
//#endregion
|
|
1388
|
+
//#region src/clients/company.d.ts
|
|
1389
|
+
declare class CompanyClient {
|
|
1390
|
+
private readonly api;
|
|
1391
|
+
constructor(api: TerrosApiClient);
|
|
1392
|
+
list(input?: CompanyListInput): Promise<CompanyListSuccess>;
|
|
1393
|
+
get(input?: CompanyGetInput): Promise<CompanyGetSuccess>;
|
|
1394
|
+
add(input: CompanyAddInput): Promise<CompanyAddSuccess>;
|
|
1395
|
+
update(input: CompanyUpdateInput): Promise<CompanyUpdateSuccess>;
|
|
1396
|
+
remove(input: CompanyRemoveInput): Promise<CompanyRemoveSuccess>;
|
|
1397
|
+
setup(input: CompanySetupInput): Promise<CompanySetupSuccess>;
|
|
1398
|
+
}
|
|
1399
|
+
//#endregion
|
|
1254
1400
|
//#region src/clients/connect.d.ts
|
|
1401
|
+
declare class ConnectAppClient {
|
|
1402
|
+
private readonly api;
|
|
1403
|
+
constructor(api: TerrosApiClient);
|
|
1404
|
+
get(input: AppGetInput): Promise<AppGetSuccess>;
|
|
1405
|
+
}
|
|
1255
1406
|
declare class ConnectAppVersionClient {
|
|
1256
1407
|
private readonly api;
|
|
1257
1408
|
constructor(api: TerrosApiClient);
|
|
1409
|
+
get(input: VersionGetInput): Promise<VersionGetSuccess>;
|
|
1258
1410
|
add(input: VersionAddInput): Promise<VersionAddSuccess>;
|
|
1259
1411
|
update(input: VersionUpdateInput): Promise<VersionUpdateSuccess>;
|
|
1260
1412
|
}
|
|
@@ -1265,6 +1417,7 @@ declare class ConnectScriptClient {
|
|
|
1265
1417
|
}
|
|
1266
1418
|
declare class ConnectClient {
|
|
1267
1419
|
private readonly api;
|
|
1420
|
+
readonly app: ConnectAppClient;
|
|
1268
1421
|
readonly version: ConnectAppVersionClient;
|
|
1269
1422
|
readonly script: ConnectScriptClient;
|
|
1270
1423
|
constructor(api: TerrosApiClient);
|
|
@@ -1293,6 +1446,7 @@ declare class TerrosClient {
|
|
|
1293
1446
|
readonly account: AccountClient;
|
|
1294
1447
|
readonly area: AreaClient;
|
|
1295
1448
|
readonly calendar: CalendarClient;
|
|
1449
|
+
readonly company: CompanyClient;
|
|
1296
1450
|
readonly connect: ConnectClient;
|
|
1297
1451
|
readonly user: UserClient;
|
|
1298
1452
|
constructor(config?: TerrosClientConfig);
|
|
@@ -1316,4 +1470,4 @@ type ConnectExecutionInput<Payload> = {
|
|
|
1316
1470
|
type WrappedHandler<Input, Result> = (input: ConnectExecutionInput<Input>) => Promise<Result>;
|
|
1317
1471
|
declare function wrapConnectHandler<Input, Result = void>(handler: ConnectHandlerFunction<Input, Result>): WrappedHandler<Input, Result>;
|
|
1318
1472
|
//#endregion
|
|
1319
|
-
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, AppId, AppVersionData, AppVersionId, AreaAddInput, AreaAddSuccess, AreaAssignInput, AreaAssignmentConfig, AreaAssignmentType, AreaData, AreaFilters, AreaGetInput, AreaGetSuccess, AreaId, AreaJobInfo, AreaListInput, AreaListSuccess, AreaRemoveInput, AreaRunHistoryEntry, AreaRunType, AreaScheduleEntry, AreaSortCursor, 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, CompanyData, CompanyId, CompanyIndustry, CompanyKind, CompanyWebhook, CompanyWebhookData, ConfigSchemaField, ConnectHandlerFunction, ContactId, CustomFieldFilter, CustomFieldFilterValue, CustomFieldId, CustomFieldMap, CustomFieldType, DispositionId, ElasticFilter, EntityId, EventOutcomeHistory, EventOutcomeId, EventType, IncomingScript, InterviewId, LatLng, LocationId, NoteId, NotificationPreference, OutgoingScript, PartialAddress, PermissionMap, RangeFilter, RoleId, ScheduledScript, ScriptAddInput, ScriptAddSuccess, ScriptBase, ScriptData, SmallAddress, SmallCloser, SmallUser, SortCursor, SpecialtyAttachments, StatusHistoryItem, SyncedCalendarEvent, TagId, TeamId, TerrosClient, TinyAccountStatus, TinyCloser, TinyResidentData, TinyRole, TinyTeam, TinyUser, TinyWorkflowAccount, UnsavedAccount, UnsavedAccountContact, UnsavedAccountNote, UnsavedAccountStatus, UnsavedAppVersion, UnsavedArea, UnsavedCalendarEventData, 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, VersionUpdateInput, VersionUpdateSuccess, WebhookAddUpdatePayload, WebhookAuditProps, WebhookPayload, WebhookRemovePayload, Weekday, WorkflowActionId, WorkflowHistoryItem, WorkflowId, WorkflowStageId, wrapConnectHandler };
|
|
1473
|
+
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 };
|
package/dist/index.mjs
CHANGED
|
@@ -153,7 +153,7 @@ function readProcessEnv(key) {
|
|
|
153
153
|
}
|
|
154
154
|
//#endregion
|
|
155
155
|
//#region package.json
|
|
156
|
-
var version = "1.0.
|
|
156
|
+
var version = "1.0.14";
|
|
157
157
|
//#endregion
|
|
158
158
|
//#region src/clients/account.ts
|
|
159
159
|
var AccountStatusClient = class {
|
|
@@ -282,12 +282,50 @@ var CalendarClient = class {
|
|
|
282
282
|
}
|
|
283
283
|
};
|
|
284
284
|
//#endregion
|
|
285
|
+
//#region src/clients/company.ts
|
|
286
|
+
var CompanyClient = class {
|
|
287
|
+
api;
|
|
288
|
+
constructor(api) {
|
|
289
|
+
this.api = api;
|
|
290
|
+
}
|
|
291
|
+
list(input = {}) {
|
|
292
|
+
return this.api.call("company/list", input);
|
|
293
|
+
}
|
|
294
|
+
get(input = {}) {
|
|
295
|
+
return this.api.call("company/get", input);
|
|
296
|
+
}
|
|
297
|
+
add(input) {
|
|
298
|
+
return this.api.call("company/add", input);
|
|
299
|
+
}
|
|
300
|
+
update(input) {
|
|
301
|
+
return this.api.call("company/update", input);
|
|
302
|
+
}
|
|
303
|
+
remove(input) {
|
|
304
|
+
return this.api.call("company/remove", input);
|
|
305
|
+
}
|
|
306
|
+
setup(input) {
|
|
307
|
+
return this.api.call("company/setup", input);
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
//#endregion
|
|
285
311
|
//#region src/clients/connect.ts
|
|
312
|
+
var ConnectAppClient = class {
|
|
313
|
+
api;
|
|
314
|
+
constructor(api) {
|
|
315
|
+
this.api = api;
|
|
316
|
+
}
|
|
317
|
+
get(input) {
|
|
318
|
+
return this.api.call("connect/app/get", input);
|
|
319
|
+
}
|
|
320
|
+
};
|
|
286
321
|
var ConnectAppVersionClient = class {
|
|
287
322
|
api;
|
|
288
323
|
constructor(api) {
|
|
289
324
|
this.api = api;
|
|
290
325
|
}
|
|
326
|
+
get(input) {
|
|
327
|
+
return this.api.call("connect/app/version/get", input);
|
|
328
|
+
}
|
|
291
329
|
add(input) {
|
|
292
330
|
return this.api.call("connect/app/version/add", input);
|
|
293
331
|
}
|
|
@@ -306,10 +344,12 @@ var ConnectScriptClient = class {
|
|
|
306
344
|
};
|
|
307
345
|
var ConnectClient = class {
|
|
308
346
|
api;
|
|
347
|
+
app;
|
|
309
348
|
version;
|
|
310
349
|
script;
|
|
311
350
|
constructor(api) {
|
|
312
351
|
this.api = api;
|
|
352
|
+
this.app = new ConnectAppClient(api);
|
|
313
353
|
this.version = new ConnectAppVersionClient(api);
|
|
314
354
|
this.script = new ConnectScriptClient(api);
|
|
315
355
|
}
|
|
@@ -364,6 +404,7 @@ var TerrosClient = class {
|
|
|
364
404
|
account;
|
|
365
405
|
area;
|
|
366
406
|
calendar;
|
|
407
|
+
company;
|
|
367
408
|
connect;
|
|
368
409
|
user;
|
|
369
410
|
constructor(config = {}) {
|
|
@@ -374,6 +415,7 @@ var TerrosClient = class {
|
|
|
374
415
|
this.account = new AccountClient(api);
|
|
375
416
|
this.area = new AreaClient(api);
|
|
376
417
|
this.calendar = new CalendarClient(api);
|
|
418
|
+
this.company = new CompanyClient(api);
|
|
377
419
|
this.connect = new ConnectClient(api);
|
|
378
420
|
this.user = new UserClient(api);
|
|
379
421
|
}
|