@model-match/api 3.6.1 → 3.8.0
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-C2yk67yZ.d.mts +14550 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/slim/index.d.mts +577 -15
- package/dist/slim/index.mjs +2827 -233
- package/dist/src-D7ciHm-w.mjs +4642 -0
- package/openapi.json +25179 -5161
- package/package.json +2 -2
- package/dist/index-DzwdNBnm.d.mts +0 -6781
- package/dist/src-DLvn1DCD.mjs +0 -2044
package/dist/slim/index.mjs
CHANGED
|
@@ -1,7 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as createClient, y as client } from "../src-D7ciHm-w.mjs";
|
|
2
2
|
//#region src/slim/sdk.gen.ts
|
|
3
3
|
/**
|
|
4
|
+
* Get a bulk job and a signed download URL (admin)
|
|
5
|
+
* Returns any org's bulk job (delivery or enrichment) with a freshly signed download URL for its result file. Cross-org: signs against the job's own stored org. `resultsUrl` is null until the job is completed.
|
|
6
|
+
*/
|
|
7
|
+
const adminGetBulkJob = (options) => {
|
|
8
|
+
return (options.client ?? client).get({
|
|
9
|
+
security: [{
|
|
10
|
+
name: "x-api-key",
|
|
11
|
+
type: "apiKey"
|
|
12
|
+
}, {
|
|
13
|
+
scheme: "bearer",
|
|
14
|
+
type: "http"
|
|
15
|
+
}],
|
|
16
|
+
url: "/v1/admin/jobs/{jobId}",
|
|
17
|
+
...options
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
4
21
|
* Search agents with filters
|
|
22
|
+
* Search and list individual real-estate agents with filters — one row per agent. Filter by name, location (state, city, zip), brokerage/office, and production metrics (sales volume, transaction units, price range), with sorting and cursor pagination. LOCATION SEMANTICS: the state/city/zip filters match ANY of an agent's location signals — their listed city/state, their office address(es), AND the markets where they actually closed transactions (production) — combined with OR. So an agent matches a searched location if their office OR their production is there. A search for city "Long Beach" can therefore return agents whose office or displayed primary market is in a different city/state, because they transacted in Long Beach. The `state`/`city` returned on each row reflect the agent's primary market and may differ from the searched location. (Use the `office` filter to match by brokerage/office name, and the per-agent city/county/state breakdown endpoints to rank an agent's volume within a specific market.) This is the per-agent record search: use it to find specific real-estate agents or build a filtered agent list. (For a single agent by ID use the agent detail endpoint.)
|
|
5
23
|
*/
|
|
6
24
|
const listAgents = (options) => {
|
|
7
25
|
return (options?.client ?? client).post({
|
|
@@ -21,7 +39,7 @@ const listAgents = (options) => {
|
|
|
21
39
|
});
|
|
22
40
|
};
|
|
23
41
|
/**
|
|
24
|
-
* Get agent by ID
|
|
42
|
+
* Get agent by ID
|
|
25
43
|
*/
|
|
26
44
|
const getAgent = (options) => {
|
|
27
45
|
return (options.client ?? client).get({
|
|
@@ -474,6 +492,58 @@ const removeWatchedArea = (options) => {
|
|
|
474
492
|
});
|
|
475
493
|
};
|
|
476
494
|
/**
|
|
495
|
+
* List the documents you watch
|
|
496
|
+
*/
|
|
497
|
+
const listWatchedDocuments = (options) => {
|
|
498
|
+
return (options?.client ?? client).get({
|
|
499
|
+
security: [{
|
|
500
|
+
name: "x-api-key",
|
|
501
|
+
type: "apiKey"
|
|
502
|
+
}, {
|
|
503
|
+
scheme: "bearer",
|
|
504
|
+
type: "http"
|
|
505
|
+
}],
|
|
506
|
+
url: "/v1/alerts/watched-documents",
|
|
507
|
+
...options
|
|
508
|
+
});
|
|
509
|
+
};
|
|
510
|
+
/**
|
|
511
|
+
* Watch a document
|
|
512
|
+
*/
|
|
513
|
+
const addWatchedDocument = (options) => {
|
|
514
|
+
return (options?.client ?? client).post({
|
|
515
|
+
security: [{
|
|
516
|
+
name: "x-api-key",
|
|
517
|
+
type: "apiKey"
|
|
518
|
+
}, {
|
|
519
|
+
scheme: "bearer",
|
|
520
|
+
type: "http"
|
|
521
|
+
}],
|
|
522
|
+
url: "/v1/alerts/watched-documents",
|
|
523
|
+
...options,
|
|
524
|
+
headers: {
|
|
525
|
+
"Content-Type": "application/json",
|
|
526
|
+
...options?.headers
|
|
527
|
+
}
|
|
528
|
+
});
|
|
529
|
+
};
|
|
530
|
+
/**
|
|
531
|
+
* Stop watching a document
|
|
532
|
+
*/
|
|
533
|
+
const removeWatchedDocument = (options) => {
|
|
534
|
+
return (options.client ?? client).delete({
|
|
535
|
+
security: [{
|
|
536
|
+
name: "x-api-key",
|
|
537
|
+
type: "apiKey"
|
|
538
|
+
}, {
|
|
539
|
+
scheme: "bearer",
|
|
540
|
+
type: "http"
|
|
541
|
+
}],
|
|
542
|
+
url: "/v1/alerts/watched-documents/{documentType}/{documentId}",
|
|
543
|
+
...options
|
|
544
|
+
});
|
|
545
|
+
};
|
|
546
|
+
/**
|
|
477
547
|
* List your alerts (newest first)
|
|
478
548
|
*/
|
|
479
549
|
const listAlertLog = (options) => {
|
|
@@ -570,8 +640,29 @@ const markAlertDigestRead = (options) => {
|
|
|
570
640
|
});
|
|
571
641
|
};
|
|
572
642
|
/**
|
|
643
|
+
* Preview the alerts that would fire for you
|
|
644
|
+
* Runs all six detectors scoped to your own token, in-process and synchronously, as a dry-run: returns the alerts that WOULD fire (per detector, with the decision payloads) without writing the feed, publishing events, or sending email.
|
|
645
|
+
*/
|
|
646
|
+
const previewAlerts = (options) => {
|
|
647
|
+
return (options?.client ?? client).post({
|
|
648
|
+
security: [{
|
|
649
|
+
name: "x-api-key",
|
|
650
|
+
type: "apiKey"
|
|
651
|
+
}, {
|
|
652
|
+
scheme: "bearer",
|
|
653
|
+
type: "http"
|
|
654
|
+
}],
|
|
655
|
+
url: "/v1/alerts/preview",
|
|
656
|
+
...options,
|
|
657
|
+
headers: {
|
|
658
|
+
"Content-Type": "application/json",
|
|
659
|
+
...options?.headers
|
|
660
|
+
}
|
|
661
|
+
});
|
|
662
|
+
};
|
|
663
|
+
/**
|
|
573
664
|
* Search branches with filters
|
|
574
|
-
* Search NMLS-registered mortgage company branch offices (not MLS real estate offices — use listOffices for those). Returns branch name, address, parent company, managers, and NMLS ID. Each row
|
|
665
|
+
* Search NMLS-registered mortgage company branch offices (not MLS real estate offices — use listOffices for those). Returns branch name, address, parent company, managers, and NMLS ID. Each row carries branch-level production metrics for the selected period.
|
|
575
666
|
*/
|
|
576
667
|
const listBranches = (options) => {
|
|
577
668
|
return (options?.client ?? client).post({
|
|
@@ -592,7 +683,7 @@ const listBranches = (options) => {
|
|
|
592
683
|
};
|
|
593
684
|
/**
|
|
594
685
|
* Get branch by NMLS ID
|
|
595
|
-
* Retrieve full details for a single NMLS mortgage branch including name, address, parent company, managers, trade names, and
|
|
686
|
+
* Retrieve full details for a single NMLS mortgage branch including name, address, parent company, managers, trade names, licensing, and branch-level production for the selected period.
|
|
596
687
|
*/
|
|
597
688
|
const getBranch = (options) => {
|
|
598
689
|
return (options.client ?? client).get({
|
|
@@ -646,6 +737,7 @@ const getBranchesBulkDeliveryJob = (options) => {
|
|
|
646
737
|
};
|
|
647
738
|
/**
|
|
648
739
|
* Search companies with filters
|
|
740
|
+
* Search and list individual mortgage companies with filters — one row per company. Filter by name, NMLS ID, location (state, county, city, zip), and production metrics (loan volume, units, market share) by period and geography, with sorting and cursor pagination. This is the per-company record search: use it to find specific mortgage lenders/companies or build a filtered company list. (For a single company by ID use the company detail endpoint.)
|
|
649
741
|
*/
|
|
650
742
|
const listCompanies = (options) => {
|
|
651
743
|
return (options?.client ?? client).post({
|
|
@@ -821,6 +913,26 @@ const companyLenders = (options) => {
|
|
|
821
913
|
});
|
|
822
914
|
};
|
|
823
915
|
/**
|
|
916
|
+
* Broker shops that originated loans funding through this company. For a wholesale/TPO lender this is its top broker partners.
|
|
917
|
+
*/
|
|
918
|
+
const companyBrokers = (options) => {
|
|
919
|
+
return (options.client ?? client).post({
|
|
920
|
+
security: [{
|
|
921
|
+
name: "x-api-key",
|
|
922
|
+
type: "apiKey"
|
|
923
|
+
}, {
|
|
924
|
+
scheme: "bearer",
|
|
925
|
+
type: "http"
|
|
926
|
+
}],
|
|
927
|
+
url: "/v1/companies/{nmlsId}/breakdowns/brokers",
|
|
928
|
+
...options,
|
|
929
|
+
headers: {
|
|
930
|
+
"Content-Type": "application/json",
|
|
931
|
+
...options?.headers
|
|
932
|
+
}
|
|
933
|
+
});
|
|
934
|
+
};
|
|
935
|
+
/**
|
|
824
936
|
* Broker offices this company originated through
|
|
825
937
|
*/
|
|
826
938
|
const companyOffices = (options) => {
|
|
@@ -958,10 +1070,25 @@ const getCompaniesBulkDeliveryJob = (options) => {
|
|
|
958
1070
|
});
|
|
959
1071
|
};
|
|
960
1072
|
/**
|
|
961
|
-
*
|
|
962
|
-
* Fast typeahead/autocomplete search across agents, originators, companies, and offices. Returns top matches per entity type. Use this for quick name lookups, not for filtered searches (use the entity-specific list endpoints for those).
|
|
1073
|
+
* Find an existing CRM record by NMLS id
|
|
963
1074
|
*/
|
|
964
|
-
const
|
|
1075
|
+
const findCrmRecordByNmls = (options) => {
|
|
1076
|
+
return (options.client ?? client).get({
|
|
1077
|
+
security: [{
|
|
1078
|
+
name: "x-api-key",
|
|
1079
|
+
type: "apiKey"
|
|
1080
|
+
}, {
|
|
1081
|
+
scheme: "bearer",
|
|
1082
|
+
type: "http"
|
|
1083
|
+
}],
|
|
1084
|
+
url: "/v1/crm/records/by-nmls",
|
|
1085
|
+
...options
|
|
1086
|
+
});
|
|
1087
|
+
};
|
|
1088
|
+
/**
|
|
1089
|
+
* Add a record to the CRM (and optionally a list)
|
|
1090
|
+
*/
|
|
1091
|
+
const addCrmRecord = (options) => {
|
|
965
1092
|
return (options?.client ?? client).post({
|
|
966
1093
|
security: [{
|
|
967
1094
|
name: "x-api-key",
|
|
@@ -970,7 +1097,7 @@ const instantSearch = (options) => {
|
|
|
970
1097
|
scheme: "bearer",
|
|
971
1098
|
type: "http"
|
|
972
1099
|
}],
|
|
973
|
-
url: "/v1/
|
|
1100
|
+
url: "/v1/crm/records/add",
|
|
974
1101
|
...options,
|
|
975
1102
|
headers: {
|
|
976
1103
|
"Content-Type": "application/json",
|
|
@@ -979,11 +1106,10 @@ const instantSearch = (options) => {
|
|
|
979
1106
|
});
|
|
980
1107
|
};
|
|
981
1108
|
/**
|
|
982
|
-
*
|
|
983
|
-
* Returns a short-lived scoped search token plus the host to query, so a trusted client can search the entity indexes directly with per-query controls (e.g. attributesToSearchOn for name-only matching).
|
|
1109
|
+
* Remove one or more records from the CRM
|
|
984
1110
|
*/
|
|
985
|
-
const
|
|
986
|
-
return (options?.client ?? client).
|
|
1111
|
+
const deleteCrmRecords = (options) => {
|
|
1112
|
+
return (options?.client ?? client).post({
|
|
987
1113
|
security: [{
|
|
988
1114
|
name: "x-api-key",
|
|
989
1115
|
type: "apiKey"
|
|
@@ -991,14 +1117,18 @@ const getSearchToken = (options) => {
|
|
|
991
1117
|
scheme: "bearer",
|
|
992
1118
|
type: "http"
|
|
993
1119
|
}],
|
|
994
|
-
url: "/v1/
|
|
995
|
-
...options
|
|
1120
|
+
url: "/v1/crm/records/delete",
|
|
1121
|
+
...options,
|
|
1122
|
+
headers: {
|
|
1123
|
+
"Content-Type": "application/json",
|
|
1124
|
+
...options?.headers
|
|
1125
|
+
}
|
|
996
1126
|
});
|
|
997
1127
|
};
|
|
998
1128
|
/**
|
|
999
|
-
*
|
|
1129
|
+
* Create a manual (unmatched) CRM record
|
|
1000
1130
|
*/
|
|
1001
|
-
const
|
|
1131
|
+
const createCrmManualRecord = (options) => {
|
|
1002
1132
|
return (options?.client ?? client).post({
|
|
1003
1133
|
security: [{
|
|
1004
1134
|
name: "x-api-key",
|
|
@@ -1007,7 +1137,7 @@ const listLenders = (options) => {
|
|
|
1007
1137
|
scheme: "bearer",
|
|
1008
1138
|
type: "http"
|
|
1009
1139
|
}],
|
|
1010
|
-
url: "/v1/
|
|
1140
|
+
url: "/v1/crm/records/create",
|
|
1011
1141
|
...options,
|
|
1012
1142
|
headers: {
|
|
1013
1143
|
"Content-Type": "application/json",
|
|
@@ -1016,10 +1146,10 @@ const listLenders = (options) => {
|
|
|
1016
1146
|
});
|
|
1017
1147
|
};
|
|
1018
1148
|
/**
|
|
1019
|
-
*
|
|
1149
|
+
* Remove a record from the workspace CRM
|
|
1020
1150
|
*/
|
|
1021
|
-
const
|
|
1022
|
-
return (options.client ?? client).
|
|
1151
|
+
const deleteCrmRecord = (options) => {
|
|
1152
|
+
return (options.client ?? client).delete({
|
|
1023
1153
|
security: [{
|
|
1024
1154
|
name: "x-api-key",
|
|
1025
1155
|
type: "apiKey"
|
|
@@ -1027,15 +1157,15 @@ const getLender = (options) => {
|
|
|
1027
1157
|
scheme: "bearer",
|
|
1028
1158
|
type: "http"
|
|
1029
1159
|
}],
|
|
1030
|
-
url: "/v1/
|
|
1160
|
+
url: "/v1/crm/records",
|
|
1031
1161
|
...options
|
|
1032
1162
|
});
|
|
1033
1163
|
};
|
|
1034
1164
|
/**
|
|
1035
|
-
*
|
|
1165
|
+
* (Re)assign a record's working owner
|
|
1036
1166
|
*/
|
|
1037
|
-
const
|
|
1038
|
-
return (options?.client ?? client).
|
|
1167
|
+
const setCrmRecordOwner = (options) => {
|
|
1168
|
+
return (options?.client ?? client).patch({
|
|
1039
1169
|
security: [{
|
|
1040
1170
|
name: "x-api-key",
|
|
1041
1171
|
type: "apiKey"
|
|
@@ -1043,7 +1173,7 @@ const listLoans = (options) => {
|
|
|
1043
1173
|
scheme: "bearer",
|
|
1044
1174
|
type: "http"
|
|
1045
1175
|
}],
|
|
1046
|
-
url: "/v1/
|
|
1176
|
+
url: "/v1/crm/records",
|
|
1047
1177
|
...options,
|
|
1048
1178
|
headers: {
|
|
1049
1179
|
"Content-Type": "application/json",
|
|
@@ -1052,10 +1182,10 @@ const listLoans = (options) => {
|
|
|
1052
1182
|
});
|
|
1053
1183
|
};
|
|
1054
1184
|
/**
|
|
1055
|
-
*
|
|
1185
|
+
* Create (or refresh) a canonical record from a match
|
|
1056
1186
|
*/
|
|
1057
|
-
const
|
|
1058
|
-
return (options
|
|
1187
|
+
const createCrmRecord = (options) => {
|
|
1188
|
+
return (options?.client ?? client).post({
|
|
1059
1189
|
security: [{
|
|
1060
1190
|
name: "x-api-key",
|
|
1061
1191
|
type: "apiKey"
|
|
@@ -1063,14 +1193,18 @@ const getLoan = (options) => {
|
|
|
1063
1193
|
scheme: "bearer",
|
|
1064
1194
|
type: "http"
|
|
1065
1195
|
}],
|
|
1066
|
-
url: "/v1/
|
|
1067
|
-
...options
|
|
1196
|
+
url: "/v1/crm/records",
|
|
1197
|
+
...options,
|
|
1198
|
+
headers: {
|
|
1199
|
+
"Content-Type": "application/json",
|
|
1200
|
+
...options?.headers
|
|
1201
|
+
}
|
|
1068
1202
|
});
|
|
1069
1203
|
};
|
|
1070
1204
|
/**
|
|
1071
|
-
*
|
|
1205
|
+
* Free-text search over CRM records
|
|
1072
1206
|
*/
|
|
1073
|
-
const
|
|
1207
|
+
const searchCrmRecords = (options) => {
|
|
1074
1208
|
return (options?.client ?? client).post({
|
|
1075
1209
|
security: [{
|
|
1076
1210
|
name: "x-api-key",
|
|
@@ -1079,7 +1213,7 @@ const loansAnalyticsSummary = (options) => {
|
|
|
1079
1213
|
scheme: "bearer",
|
|
1080
1214
|
type: "http"
|
|
1081
1215
|
}],
|
|
1082
|
-
url: "/v1/
|
|
1216
|
+
url: "/v1/crm/records/search",
|
|
1083
1217
|
...options,
|
|
1084
1218
|
headers: {
|
|
1085
1219
|
"Content-Type": "application/json",
|
|
@@ -1088,9 +1222,9 @@ const loansAnalyticsSummary = (options) => {
|
|
|
1088
1222
|
});
|
|
1089
1223
|
};
|
|
1090
1224
|
/**
|
|
1091
|
-
*
|
|
1225
|
+
* Bulk add records to the canonical CRM (listless)
|
|
1092
1226
|
*/
|
|
1093
|
-
const
|
|
1227
|
+
const addCrmRecordsBulk = (options) => {
|
|
1094
1228
|
return (options?.client ?? client).post({
|
|
1095
1229
|
security: [{
|
|
1096
1230
|
name: "x-api-key",
|
|
@@ -1099,7 +1233,7 @@ const loansAnalyticsTimeSeries = (options) => {
|
|
|
1099
1233
|
scheme: "bearer",
|
|
1100
1234
|
type: "http"
|
|
1101
1235
|
}],
|
|
1102
|
-
url: "/v1/
|
|
1236
|
+
url: "/v1/crm/records/add/bulk",
|
|
1103
1237
|
...options,
|
|
1104
1238
|
headers: {
|
|
1105
1239
|
"Content-Type": "application/json",
|
|
@@ -1108,10 +1242,10 @@ const loansAnalyticsTimeSeries = (options) => {
|
|
|
1108
1242
|
});
|
|
1109
1243
|
};
|
|
1110
1244
|
/**
|
|
1111
|
-
*
|
|
1245
|
+
* Get an add-time production-enrich job's status
|
|
1112
1246
|
*/
|
|
1113
|
-
const
|
|
1114
|
-
return (options
|
|
1247
|
+
const getCrmProductionEnrichJob = (options) => {
|
|
1248
|
+
return (options.client ?? client).get({
|
|
1115
1249
|
security: [{
|
|
1116
1250
|
name: "x-api-key",
|
|
1117
1251
|
type: "apiKey"
|
|
@@ -1119,19 +1253,14 @@ const loansAnalyticsChart = (options) => {
|
|
|
1119
1253
|
scheme: "bearer",
|
|
1120
1254
|
type: "http"
|
|
1121
1255
|
}],
|
|
1122
|
-
url: "/v1/
|
|
1123
|
-
...options
|
|
1124
|
-
headers: {
|
|
1125
|
-
"Content-Type": "application/json",
|
|
1126
|
-
...options?.headers
|
|
1127
|
-
}
|
|
1256
|
+
url: "/v1/crm/production-enrich/{jobId}",
|
|
1257
|
+
...options
|
|
1128
1258
|
});
|
|
1129
1259
|
};
|
|
1130
1260
|
/**
|
|
1131
|
-
*
|
|
1132
|
-
* Queues an ECS task that dumps every matching loans document (subject to the org's `bulk-delivery.loans` entitlement scope) to S3 in the requested format. Returns 202 with a jobId; poll `GET /loans/bulk-delivery/{jobId}` for status + the signed download URL.
|
|
1261
|
+
* Relationship cross-reference for a record (in-CRM partners + colleagues)
|
|
1133
1262
|
*/
|
|
1134
|
-
const
|
|
1263
|
+
const getCrmRecordConnections = (options) => {
|
|
1135
1264
|
return (options?.client ?? client).post({
|
|
1136
1265
|
security: [{
|
|
1137
1266
|
name: "x-api-key",
|
|
@@ -1140,7 +1269,7 @@ const submitLoansBulkDelivery = (options) => {
|
|
|
1140
1269
|
scheme: "bearer",
|
|
1141
1270
|
type: "http"
|
|
1142
1271
|
}],
|
|
1143
|
-
url: "/v1/
|
|
1272
|
+
url: "/v1/crm/records/connections",
|
|
1144
1273
|
...options,
|
|
1145
1274
|
headers: {
|
|
1146
1275
|
"Content-Type": "application/json",
|
|
@@ -1149,10 +1278,10 @@ const submitLoansBulkDelivery = (options) => {
|
|
|
1149
1278
|
});
|
|
1150
1279
|
};
|
|
1151
1280
|
/**
|
|
1152
|
-
*
|
|
1281
|
+
* Name-first search over visible CRM records for the mention picker
|
|
1153
1282
|
*/
|
|
1154
|
-
const
|
|
1155
|
-
return (options
|
|
1283
|
+
const searchCrmMentionRecords = (options) => {
|
|
1284
|
+
return (options?.client ?? client).post({
|
|
1156
1285
|
security: [{
|
|
1157
1286
|
name: "x-api-key",
|
|
1158
1287
|
type: "apiKey"
|
|
@@ -1160,15 +1289,18 @@ const getLoansBulkDeliveryJob = (options) => {
|
|
|
1160
1289
|
scheme: "bearer",
|
|
1161
1290
|
type: "http"
|
|
1162
1291
|
}],
|
|
1163
|
-
url: "/v1/
|
|
1164
|
-
...options
|
|
1292
|
+
url: "/v1/crm/records/mention-search",
|
|
1293
|
+
...options,
|
|
1294
|
+
headers: {
|
|
1295
|
+
"Content-Type": "application/json",
|
|
1296
|
+
...options?.headers
|
|
1297
|
+
}
|
|
1165
1298
|
});
|
|
1166
1299
|
};
|
|
1167
1300
|
/**
|
|
1168
|
-
*
|
|
1169
|
-
* Autocomplete location search powered by Mapbox. Returns location suggestions (cities, states, counties, zip codes, addresses) for a query string. Use the `mapbox_id` from a suggestion with `retrieveLocation` to get normalized geographic details for filtering.
|
|
1301
|
+
* Aggregate profile read for a CRM record
|
|
1170
1302
|
*/
|
|
1171
|
-
const
|
|
1303
|
+
const getCrmRecordProfile = (options) => {
|
|
1172
1304
|
return (options.client ?? client).get({
|
|
1173
1305
|
security: [{
|
|
1174
1306
|
name: "x-api-key",
|
|
@@ -1177,15 +1309,14 @@ const suggestLocations = (options) => {
|
|
|
1177
1309
|
scheme: "bearer",
|
|
1178
1310
|
type: "http"
|
|
1179
1311
|
}],
|
|
1180
|
-
url: "/v1/
|
|
1312
|
+
url: "/v1/crm/profile",
|
|
1181
1313
|
...options
|
|
1182
1314
|
});
|
|
1183
1315
|
};
|
|
1184
1316
|
/**
|
|
1185
|
-
*
|
|
1186
|
-
* Retrieve normalized location details (city, state, county, zip, coordinates) for a Mapbox suggestion ID. Use this after `suggestLocations` to get structured geographic data for filtering other endpoints.
|
|
1317
|
+
* List curated CRM records of an object type
|
|
1187
1318
|
*/
|
|
1188
|
-
const
|
|
1319
|
+
const listCrmMembers = (options) => {
|
|
1189
1320
|
return (options.client ?? client).get({
|
|
1190
1321
|
security: [{
|
|
1191
1322
|
name: "x-api-key",
|
|
@@ -1194,16 +1325,15 @@ const retrieveLocation = (options) => {
|
|
|
1194
1325
|
scheme: "bearer",
|
|
1195
1326
|
type: "http"
|
|
1196
1327
|
}],
|
|
1197
|
-
url: "/v1/
|
|
1328
|
+
url: "/v1/crm/members",
|
|
1198
1329
|
...options
|
|
1199
1330
|
});
|
|
1200
1331
|
};
|
|
1201
1332
|
/**
|
|
1202
|
-
*
|
|
1203
|
-
* Search aggregated loan origination market data. Filterable dimensions cover geography (state, county, zip), product (loan purpose / type / amortization), borrower demographics, and loan numerics.
|
|
1333
|
+
* Batch-read record overrides
|
|
1204
1334
|
*/
|
|
1205
|
-
const
|
|
1206
|
-
return (options
|
|
1335
|
+
const getCrmOverrides = (options) => {
|
|
1336
|
+
return (options.client ?? client).get({
|
|
1207
1337
|
security: [{
|
|
1208
1338
|
name: "x-api-key",
|
|
1209
1339
|
type: "apiKey"
|
|
@@ -1211,19 +1341,15 @@ const listMarket = (options) => {
|
|
|
1211
1341
|
scheme: "bearer",
|
|
1212
1342
|
type: "http"
|
|
1213
1343
|
}],
|
|
1214
|
-
url: "/v1/
|
|
1215
|
-
...options
|
|
1216
|
-
headers: {
|
|
1217
|
-
"Content-Type": "application/json",
|
|
1218
|
-
...options?.headers
|
|
1219
|
-
}
|
|
1344
|
+
url: "/v1/crm/overrides",
|
|
1345
|
+
...options
|
|
1220
1346
|
});
|
|
1221
1347
|
};
|
|
1222
1348
|
/**
|
|
1223
|
-
*
|
|
1349
|
+
* Set a single override field on a record
|
|
1224
1350
|
*/
|
|
1225
|
-
const
|
|
1226
|
-
return (options?.client ?? client).
|
|
1351
|
+
const setCrmOverride = (options) => {
|
|
1352
|
+
return (options?.client ?? client).patch({
|
|
1227
1353
|
security: [{
|
|
1228
1354
|
name: "x-api-key",
|
|
1229
1355
|
type: "apiKey"
|
|
@@ -1231,7 +1357,7 @@ const marketAnalyticsSummary = (options) => {
|
|
|
1231
1357
|
scheme: "bearer",
|
|
1232
1358
|
type: "http"
|
|
1233
1359
|
}],
|
|
1234
|
-
url: "/v1/
|
|
1360
|
+
url: "/v1/crm/overrides",
|
|
1235
1361
|
...options,
|
|
1236
1362
|
headers: {
|
|
1237
1363
|
"Content-Type": "application/json",
|
|
@@ -1240,9 +1366,9 @@ const marketAnalyticsSummary = (options) => {
|
|
|
1240
1366
|
});
|
|
1241
1367
|
};
|
|
1242
1368
|
/**
|
|
1243
|
-
*
|
|
1369
|
+
* Auto-generate a record's description from the web
|
|
1244
1370
|
*/
|
|
1245
|
-
const
|
|
1371
|
+
const generateCrmRecordDescription = (options) => {
|
|
1246
1372
|
return (options?.client ?? client).post({
|
|
1247
1373
|
security: [{
|
|
1248
1374
|
name: "x-api-key",
|
|
@@ -1251,7 +1377,7 @@ const marketAnalyticsTimeSeries = (options) => {
|
|
|
1251
1377
|
scheme: "bearer",
|
|
1252
1378
|
type: "http"
|
|
1253
1379
|
}],
|
|
1254
|
-
url: "/v1/
|
|
1380
|
+
url: "/v1/crm/records/generate-description",
|
|
1255
1381
|
...options,
|
|
1256
1382
|
headers: {
|
|
1257
1383
|
"Content-Type": "application/json",
|
|
@@ -1260,10 +1386,10 @@ const marketAnalyticsTimeSeries = (options) => {
|
|
|
1260
1386
|
});
|
|
1261
1387
|
};
|
|
1262
1388
|
/**
|
|
1263
|
-
*
|
|
1389
|
+
* List the caller's lists (picker mode with ?entityId adds hasMember)
|
|
1264
1390
|
*/
|
|
1265
|
-
const
|
|
1266
|
-
return (options?.client ?? client).
|
|
1391
|
+
const listCrmLists = (options) => {
|
|
1392
|
+
return (options?.client ?? client).get({
|
|
1267
1393
|
security: [{
|
|
1268
1394
|
name: "x-api-key",
|
|
1269
1395
|
type: "apiKey"
|
|
@@ -1271,18 +1397,14 @@ const marketAnalyticsChart = (options) => {
|
|
|
1271
1397
|
scheme: "bearer",
|
|
1272
1398
|
type: "http"
|
|
1273
1399
|
}],
|
|
1274
|
-
url: "/v1/
|
|
1275
|
-
...options
|
|
1276
|
-
headers: {
|
|
1277
|
-
"Content-Type": "application/json",
|
|
1278
|
-
...options?.headers
|
|
1279
|
-
}
|
|
1400
|
+
url: "/v1/crm/lists",
|
|
1401
|
+
...options
|
|
1280
1402
|
});
|
|
1281
1403
|
};
|
|
1282
1404
|
/**
|
|
1283
|
-
*
|
|
1405
|
+
* Create a list
|
|
1284
1406
|
*/
|
|
1285
|
-
const
|
|
1407
|
+
const createCrmList = (options) => {
|
|
1286
1408
|
return (options?.client ?? client).post({
|
|
1287
1409
|
security: [{
|
|
1288
1410
|
name: "x-api-key",
|
|
@@ -1291,7 +1413,7 @@ const officeAgents = (options) => {
|
|
|
1291
1413
|
scheme: "bearer",
|
|
1292
1414
|
type: "http"
|
|
1293
1415
|
}],
|
|
1294
|
-
url: "/v1/
|
|
1416
|
+
url: "/v1/crm/lists",
|
|
1295
1417
|
...options,
|
|
1296
1418
|
headers: {
|
|
1297
1419
|
"Content-Type": "application/json",
|
|
@@ -1300,11 +1422,10 @@ const officeAgents = (options) => {
|
|
|
1300
1422
|
});
|
|
1301
1423
|
};
|
|
1302
1424
|
/**
|
|
1303
|
-
*
|
|
1304
|
-
* NOT NMLS mortgage branches — use `/branches` for those. Returns office company, address, agent count, and coordinates. Default sort is by agent count descending.
|
|
1425
|
+
* Delete a list
|
|
1305
1426
|
*/
|
|
1306
|
-
const
|
|
1307
|
-
return (options
|
|
1427
|
+
const deleteCrmList = (options) => {
|
|
1428
|
+
return (options.client ?? client).delete({
|
|
1308
1429
|
security: [{
|
|
1309
1430
|
name: "x-api-key",
|
|
1310
1431
|
type: "apiKey"
|
|
@@ -1312,18 +1433,14 @@ const listOffices = (options) => {
|
|
|
1312
1433
|
scheme: "bearer",
|
|
1313
1434
|
type: "http"
|
|
1314
1435
|
}],
|
|
1315
|
-
url: "/v1/
|
|
1316
|
-
...options
|
|
1317
|
-
headers: {
|
|
1318
|
-
"Content-Type": "application/json",
|
|
1319
|
-
...options?.headers
|
|
1320
|
-
}
|
|
1436
|
+
url: "/v1/crm/lists/{id}",
|
|
1437
|
+
...options
|
|
1321
1438
|
});
|
|
1322
1439
|
};
|
|
1323
1440
|
/**
|
|
1324
|
-
* Get
|
|
1441
|
+
* Get a list with its members
|
|
1325
1442
|
*/
|
|
1326
|
-
const
|
|
1443
|
+
const getCrmList = (options) => {
|
|
1327
1444
|
return (options.client ?? client).get({
|
|
1328
1445
|
security: [{
|
|
1329
1446
|
name: "x-api-key",
|
|
@@ -1332,15 +1449,15 @@ const getOffice = (options) => {
|
|
|
1332
1449
|
scheme: "bearer",
|
|
1333
1450
|
type: "http"
|
|
1334
1451
|
}],
|
|
1335
|
-
url: "/v1/
|
|
1452
|
+
url: "/v1/crm/lists/{id}",
|
|
1336
1453
|
...options
|
|
1337
1454
|
});
|
|
1338
1455
|
};
|
|
1339
1456
|
/**
|
|
1340
|
-
*
|
|
1457
|
+
* Update a list's name, visibility, or whole-org role
|
|
1341
1458
|
*/
|
|
1342
|
-
const
|
|
1343
|
-
return (options
|
|
1459
|
+
const updateCrmList = (options) => {
|
|
1460
|
+
return (options.client ?? client).patch({
|
|
1344
1461
|
security: [{
|
|
1345
1462
|
name: "x-api-key",
|
|
1346
1463
|
type: "apiKey"
|
|
@@ -1348,7 +1465,7 @@ const listOriginators = (options) => {
|
|
|
1348
1465
|
scheme: "bearer",
|
|
1349
1466
|
type: "http"
|
|
1350
1467
|
}],
|
|
1351
|
-
url: "/v1/
|
|
1468
|
+
url: "/v1/crm/lists/{id}",
|
|
1352
1469
|
...options,
|
|
1353
1470
|
headers: {
|
|
1354
1471
|
"Content-Type": "application/json",
|
|
@@ -1357,10 +1474,10 @@ const listOriginators = (options) => {
|
|
|
1357
1474
|
});
|
|
1358
1475
|
};
|
|
1359
1476
|
/**
|
|
1360
|
-
*
|
|
1477
|
+
* Remove a member from a list
|
|
1361
1478
|
*/
|
|
1362
|
-
const
|
|
1363
|
-
return (options.client ?? client).
|
|
1479
|
+
const removeCrmListMember = (options) => {
|
|
1480
|
+
return (options.client ?? client).delete({
|
|
1364
1481
|
security: [{
|
|
1365
1482
|
name: "x-api-key",
|
|
1366
1483
|
type: "apiKey"
|
|
@@ -1368,15 +1485,19 @@ const getOriginator = (options) => {
|
|
|
1368
1485
|
scheme: "bearer",
|
|
1369
1486
|
type: "http"
|
|
1370
1487
|
}],
|
|
1371
|
-
url: "/v1/
|
|
1372
|
-
...options
|
|
1488
|
+
url: "/v1/crm/lists/{id}/members",
|
|
1489
|
+
...options,
|
|
1490
|
+
headers: {
|
|
1491
|
+
"Content-Type": "application/json",
|
|
1492
|
+
...options?.headers
|
|
1493
|
+
}
|
|
1373
1494
|
});
|
|
1374
1495
|
};
|
|
1375
1496
|
/**
|
|
1376
|
-
*
|
|
1497
|
+
* Add a member to a list
|
|
1377
1498
|
*/
|
|
1378
|
-
const
|
|
1379
|
-
return (options
|
|
1499
|
+
const addCrmListMember = (options) => {
|
|
1500
|
+
return (options.client ?? client).post({
|
|
1380
1501
|
security: [{
|
|
1381
1502
|
name: "x-api-key",
|
|
1382
1503
|
type: "apiKey"
|
|
@@ -1384,7 +1505,7 @@ const originatorAnalyticsSummary = (options) => {
|
|
|
1384
1505
|
scheme: "bearer",
|
|
1385
1506
|
type: "http"
|
|
1386
1507
|
}],
|
|
1387
|
-
url: "/v1/
|
|
1508
|
+
url: "/v1/crm/lists/{id}/members",
|
|
1388
1509
|
...options,
|
|
1389
1510
|
headers: {
|
|
1390
1511
|
"Content-Type": "application/json",
|
|
@@ -1393,10 +1514,10 @@ const originatorAnalyticsSummary = (options) => {
|
|
|
1393
1514
|
});
|
|
1394
1515
|
};
|
|
1395
1516
|
/**
|
|
1396
|
-
*
|
|
1517
|
+
* Filter a list's members by entity attributes (read)
|
|
1397
1518
|
*/
|
|
1398
|
-
const
|
|
1399
|
-
return (options
|
|
1519
|
+
const filterCrmListMembers = (options) => {
|
|
1520
|
+
return (options.client ?? client).post({
|
|
1400
1521
|
security: [{
|
|
1401
1522
|
name: "x-api-key",
|
|
1402
1523
|
type: "apiKey"
|
|
@@ -1404,7 +1525,7 @@ const originatorAnalyticsTimeSeries = (options) => {
|
|
|
1404
1525
|
scheme: "bearer",
|
|
1405
1526
|
type: "http"
|
|
1406
1527
|
}],
|
|
1407
|
-
url: "/v1/
|
|
1528
|
+
url: "/v1/crm/lists/{id}/filter-members",
|
|
1408
1529
|
...options,
|
|
1409
1530
|
headers: {
|
|
1410
1531
|
"Content-Type": "application/json",
|
|
@@ -1413,10 +1534,1752 @@ const originatorAnalyticsTimeSeries = (options) => {
|
|
|
1413
1534
|
});
|
|
1414
1535
|
};
|
|
1415
1536
|
/**
|
|
1416
|
-
*
|
|
1537
|
+
* Add many members to a list
|
|
1417
1538
|
*/
|
|
1418
|
-
const
|
|
1419
|
-
return (options
|
|
1539
|
+
const addCrmListMembersBulk = (options) => {
|
|
1540
|
+
return (options.client ?? client).post({
|
|
1541
|
+
security: [{
|
|
1542
|
+
name: "x-api-key",
|
|
1543
|
+
type: "apiKey"
|
|
1544
|
+
}, {
|
|
1545
|
+
scheme: "bearer",
|
|
1546
|
+
type: "http"
|
|
1547
|
+
}],
|
|
1548
|
+
url: "/v1/crm/lists/{id}/members/bulk",
|
|
1549
|
+
...options,
|
|
1550
|
+
headers: {
|
|
1551
|
+
"Content-Type": "application/json",
|
|
1552
|
+
...options?.headers
|
|
1553
|
+
}
|
|
1554
|
+
});
|
|
1555
|
+
};
|
|
1556
|
+
/**
|
|
1557
|
+
* Revoke a member's access to a list
|
|
1558
|
+
*/
|
|
1559
|
+
const revokeCrmListAccess = (options) => {
|
|
1560
|
+
return (options.client ?? client).delete({
|
|
1561
|
+
security: [{
|
|
1562
|
+
name: "x-api-key",
|
|
1563
|
+
type: "apiKey"
|
|
1564
|
+
}, {
|
|
1565
|
+
scheme: "bearer",
|
|
1566
|
+
type: "http"
|
|
1567
|
+
}],
|
|
1568
|
+
url: "/v1/crm/lists/{id}/shares",
|
|
1569
|
+
...options,
|
|
1570
|
+
headers: {
|
|
1571
|
+
"Content-Type": "application/json",
|
|
1572
|
+
...options?.headers
|
|
1573
|
+
}
|
|
1574
|
+
});
|
|
1575
|
+
};
|
|
1576
|
+
/**
|
|
1577
|
+
* Get a list's sharing state (+ owner display, canManageSharing)
|
|
1578
|
+
*/
|
|
1579
|
+
const getCrmListShares = (options) => {
|
|
1580
|
+
return (options.client ?? client).get({
|
|
1581
|
+
security: [{
|
|
1582
|
+
name: "x-api-key",
|
|
1583
|
+
type: "apiKey"
|
|
1584
|
+
}, {
|
|
1585
|
+
scheme: "bearer",
|
|
1586
|
+
type: "http"
|
|
1587
|
+
}],
|
|
1588
|
+
url: "/v1/crm/lists/{id}/shares",
|
|
1589
|
+
...options
|
|
1590
|
+
});
|
|
1591
|
+
};
|
|
1592
|
+
/**
|
|
1593
|
+
* Transfer a list's ownership to another member
|
|
1594
|
+
*/
|
|
1595
|
+
const transferCrmListOwnership = (options) => {
|
|
1596
|
+
return (options.client ?? client).patch({
|
|
1597
|
+
security: [{
|
|
1598
|
+
name: "x-api-key",
|
|
1599
|
+
type: "apiKey"
|
|
1600
|
+
}, {
|
|
1601
|
+
scheme: "bearer",
|
|
1602
|
+
type: "http"
|
|
1603
|
+
}],
|
|
1604
|
+
url: "/v1/crm/lists/{id}/shares",
|
|
1605
|
+
...options,
|
|
1606
|
+
headers: {
|
|
1607
|
+
"Content-Type": "application/json",
|
|
1608
|
+
...options?.headers
|
|
1609
|
+
}
|
|
1610
|
+
});
|
|
1611
|
+
};
|
|
1612
|
+
/**
|
|
1613
|
+
* Grant a member access to a list
|
|
1614
|
+
*/
|
|
1615
|
+
const grantCrmListAccess = (options) => {
|
|
1616
|
+
return (options.client ?? client).post({
|
|
1617
|
+
security: [{
|
|
1618
|
+
name: "x-api-key",
|
|
1619
|
+
type: "apiKey"
|
|
1620
|
+
}, {
|
|
1621
|
+
scheme: "bearer",
|
|
1622
|
+
type: "http"
|
|
1623
|
+
}],
|
|
1624
|
+
url: "/v1/crm/lists/{id}/shares",
|
|
1625
|
+
...options,
|
|
1626
|
+
headers: {
|
|
1627
|
+
"Content-Type": "application/json",
|
|
1628
|
+
...options?.headers
|
|
1629
|
+
}
|
|
1630
|
+
});
|
|
1631
|
+
};
|
|
1632
|
+
/**
|
|
1633
|
+
* Delete a custom field
|
|
1634
|
+
*/
|
|
1635
|
+
const deleteCrmListField = (options) => {
|
|
1636
|
+
return (options.client ?? client).delete({
|
|
1637
|
+
security: [{
|
|
1638
|
+
name: "x-api-key",
|
|
1639
|
+
type: "apiKey"
|
|
1640
|
+
}, {
|
|
1641
|
+
scheme: "bearer",
|
|
1642
|
+
type: "http"
|
|
1643
|
+
}],
|
|
1644
|
+
url: "/v1/crm/lists/{id}/fields",
|
|
1645
|
+
...options,
|
|
1646
|
+
headers: {
|
|
1647
|
+
"Content-Type": "application/json",
|
|
1648
|
+
...options?.headers
|
|
1649
|
+
}
|
|
1650
|
+
});
|
|
1651
|
+
};
|
|
1652
|
+
/**
|
|
1653
|
+
* List the custom fields applicable to a list
|
|
1654
|
+
*/
|
|
1655
|
+
const listCrmListFields = (options) => {
|
|
1656
|
+
return (options.client ?? client).get({
|
|
1657
|
+
security: [{
|
|
1658
|
+
name: "x-api-key",
|
|
1659
|
+
type: "apiKey"
|
|
1660
|
+
}, {
|
|
1661
|
+
scheme: "bearer",
|
|
1662
|
+
type: "http"
|
|
1663
|
+
}],
|
|
1664
|
+
url: "/v1/crm/lists/{id}/fields",
|
|
1665
|
+
...options
|
|
1666
|
+
});
|
|
1667
|
+
};
|
|
1668
|
+
/**
|
|
1669
|
+
* Update a custom field's mutable props
|
|
1670
|
+
*/
|
|
1671
|
+
const updateCrmListField = (options) => {
|
|
1672
|
+
return (options.client ?? client).patch({
|
|
1673
|
+
security: [{
|
|
1674
|
+
name: "x-api-key",
|
|
1675
|
+
type: "apiKey"
|
|
1676
|
+
}, {
|
|
1677
|
+
scheme: "bearer",
|
|
1678
|
+
type: "http"
|
|
1679
|
+
}],
|
|
1680
|
+
url: "/v1/crm/lists/{id}/fields",
|
|
1681
|
+
...options,
|
|
1682
|
+
headers: {
|
|
1683
|
+
"Content-Type": "application/json",
|
|
1684
|
+
...options?.headers
|
|
1685
|
+
}
|
|
1686
|
+
});
|
|
1687
|
+
};
|
|
1688
|
+
/**
|
|
1689
|
+
* Create a list-scoped custom field
|
|
1690
|
+
*/
|
|
1691
|
+
const createCrmListField = (options) => {
|
|
1692
|
+
return (options.client ?? client).post({
|
|
1693
|
+
security: [{
|
|
1694
|
+
name: "x-api-key",
|
|
1695
|
+
type: "apiKey"
|
|
1696
|
+
}, {
|
|
1697
|
+
scheme: "bearer",
|
|
1698
|
+
type: "http"
|
|
1699
|
+
}],
|
|
1700
|
+
url: "/v1/crm/lists/{id}/fields",
|
|
1701
|
+
...options,
|
|
1702
|
+
headers: {
|
|
1703
|
+
"Content-Type": "application/json",
|
|
1704
|
+
...options?.headers
|
|
1705
|
+
}
|
|
1706
|
+
});
|
|
1707
|
+
};
|
|
1708
|
+
/**
|
|
1709
|
+
* Replay a template's fields onto a list
|
|
1710
|
+
*/
|
|
1711
|
+
const applyCrmListTemplate = (options) => {
|
|
1712
|
+
return (options.client ?? client).post({
|
|
1713
|
+
security: [{
|
|
1714
|
+
name: "x-api-key",
|
|
1715
|
+
type: "apiKey"
|
|
1716
|
+
}, {
|
|
1717
|
+
scheme: "bearer",
|
|
1718
|
+
type: "http"
|
|
1719
|
+
}],
|
|
1720
|
+
url: "/v1/crm/lists/{id}/apply-template",
|
|
1721
|
+
...options,
|
|
1722
|
+
headers: {
|
|
1723
|
+
"Content-Type": "application/json",
|
|
1724
|
+
...options?.headers
|
|
1725
|
+
}
|
|
1726
|
+
});
|
|
1727
|
+
};
|
|
1728
|
+
/**
|
|
1729
|
+
* List the active org's members
|
|
1730
|
+
*/
|
|
1731
|
+
const listCrmOrgMembers = (options) => {
|
|
1732
|
+
return (options?.client ?? client).get({
|
|
1733
|
+
security: [{
|
|
1734
|
+
name: "x-api-key",
|
|
1735
|
+
type: "apiKey"
|
|
1736
|
+
}, {
|
|
1737
|
+
scheme: "bearer",
|
|
1738
|
+
type: "http"
|
|
1739
|
+
}],
|
|
1740
|
+
url: "/v1/crm/org-members",
|
|
1741
|
+
...options
|
|
1742
|
+
});
|
|
1743
|
+
};
|
|
1744
|
+
/**
|
|
1745
|
+
* List who can be assigned on a list (access-filtered by visibility)
|
|
1746
|
+
*/
|
|
1747
|
+
const listCrmListAssignees = (options) => {
|
|
1748
|
+
return (options.client ?? client).get({
|
|
1749
|
+
security: [{
|
|
1750
|
+
name: "x-api-key",
|
|
1751
|
+
type: "apiKey"
|
|
1752
|
+
}, {
|
|
1753
|
+
scheme: "bearer",
|
|
1754
|
+
type: "http"
|
|
1755
|
+
}],
|
|
1756
|
+
url: "/v1/crm/lists/{id}/assignees",
|
|
1757
|
+
...options
|
|
1758
|
+
});
|
|
1759
|
+
};
|
|
1760
|
+
/**
|
|
1761
|
+
* Soft-delete a note
|
|
1762
|
+
*/
|
|
1763
|
+
const deleteCrmNote = (options) => {
|
|
1764
|
+
return (options?.client ?? client).delete({
|
|
1765
|
+
security: [{
|
|
1766
|
+
name: "x-api-key",
|
|
1767
|
+
type: "apiKey"
|
|
1768
|
+
}, {
|
|
1769
|
+
scheme: "bearer",
|
|
1770
|
+
type: "http"
|
|
1771
|
+
}],
|
|
1772
|
+
url: "/v1/crm/activity",
|
|
1773
|
+
...options,
|
|
1774
|
+
headers: {
|
|
1775
|
+
"Content-Type": "application/json",
|
|
1776
|
+
...options?.headers
|
|
1777
|
+
}
|
|
1778
|
+
});
|
|
1779
|
+
};
|
|
1780
|
+
/**
|
|
1781
|
+
* List a record's activity timeline (newest first)
|
|
1782
|
+
*/
|
|
1783
|
+
const listCrmActivity = (options) => {
|
|
1784
|
+
return (options.client ?? client).get({
|
|
1785
|
+
security: [{
|
|
1786
|
+
name: "x-api-key",
|
|
1787
|
+
type: "apiKey"
|
|
1788
|
+
}, {
|
|
1789
|
+
scheme: "bearer",
|
|
1790
|
+
type: "http"
|
|
1791
|
+
}],
|
|
1792
|
+
url: "/v1/crm/activity",
|
|
1793
|
+
...options
|
|
1794
|
+
});
|
|
1795
|
+
};
|
|
1796
|
+
/**
|
|
1797
|
+
* Edit a note's body
|
|
1798
|
+
*/
|
|
1799
|
+
const editCrmNote = (options) => {
|
|
1800
|
+
return (options?.client ?? client).patch({
|
|
1801
|
+
security: [{
|
|
1802
|
+
name: "x-api-key",
|
|
1803
|
+
type: "apiKey"
|
|
1804
|
+
}, {
|
|
1805
|
+
scheme: "bearer",
|
|
1806
|
+
type: "http"
|
|
1807
|
+
}],
|
|
1808
|
+
url: "/v1/crm/activity",
|
|
1809
|
+
...options,
|
|
1810
|
+
headers: {
|
|
1811
|
+
"Content-Type": "application/json",
|
|
1812
|
+
...options?.headers
|
|
1813
|
+
}
|
|
1814
|
+
});
|
|
1815
|
+
};
|
|
1816
|
+
/**
|
|
1817
|
+
* Append a note to a record's timeline
|
|
1818
|
+
*/
|
|
1819
|
+
const addCrmNote = (options) => {
|
|
1820
|
+
return (options?.client ?? client).post({
|
|
1821
|
+
security: [{
|
|
1822
|
+
name: "x-api-key",
|
|
1823
|
+
type: "apiKey"
|
|
1824
|
+
}, {
|
|
1825
|
+
scheme: "bearer",
|
|
1826
|
+
type: "http"
|
|
1827
|
+
}],
|
|
1828
|
+
url: "/v1/crm/activity",
|
|
1829
|
+
...options,
|
|
1830
|
+
headers: {
|
|
1831
|
+
"Content-Type": "application/json",
|
|
1832
|
+
...options?.headers
|
|
1833
|
+
}
|
|
1834
|
+
});
|
|
1835
|
+
};
|
|
1836
|
+
/**
|
|
1837
|
+
* Delete a task
|
|
1838
|
+
*/
|
|
1839
|
+
const deleteCrmTask = (options) => {
|
|
1840
|
+
return (options?.client ?? client).delete({
|
|
1841
|
+
security: [{
|
|
1842
|
+
name: "x-api-key",
|
|
1843
|
+
type: "apiKey"
|
|
1844
|
+
}, {
|
|
1845
|
+
scheme: "bearer",
|
|
1846
|
+
type: "http"
|
|
1847
|
+
}],
|
|
1848
|
+
url: "/v1/crm/tasks",
|
|
1849
|
+
...options,
|
|
1850
|
+
headers: {
|
|
1851
|
+
"Content-Type": "application/json",
|
|
1852
|
+
...options?.headers
|
|
1853
|
+
}
|
|
1854
|
+
});
|
|
1855
|
+
};
|
|
1856
|
+
/**
|
|
1857
|
+
* List tasks for a record or for an assignee
|
|
1858
|
+
*/
|
|
1859
|
+
const listCrmTasks = (options) => {
|
|
1860
|
+
return (options?.client ?? client).get({
|
|
1861
|
+
security: [{
|
|
1862
|
+
name: "x-api-key",
|
|
1863
|
+
type: "apiKey"
|
|
1864
|
+
}, {
|
|
1865
|
+
scheme: "bearer",
|
|
1866
|
+
type: "http"
|
|
1867
|
+
}],
|
|
1868
|
+
url: "/v1/crm/tasks",
|
|
1869
|
+
...options
|
|
1870
|
+
});
|
|
1871
|
+
};
|
|
1872
|
+
/**
|
|
1873
|
+
* Edit a task, or transition it to completed/cancelled
|
|
1874
|
+
*/
|
|
1875
|
+
const updateCrmTask = (options) => {
|
|
1876
|
+
return (options?.client ?? client).patch({
|
|
1877
|
+
security: [{
|
|
1878
|
+
name: "x-api-key",
|
|
1879
|
+
type: "apiKey"
|
|
1880
|
+
}, {
|
|
1881
|
+
scheme: "bearer",
|
|
1882
|
+
type: "http"
|
|
1883
|
+
}],
|
|
1884
|
+
url: "/v1/crm/tasks",
|
|
1885
|
+
...options,
|
|
1886
|
+
headers: {
|
|
1887
|
+
"Content-Type": "application/json",
|
|
1888
|
+
...options?.headers
|
|
1889
|
+
}
|
|
1890
|
+
});
|
|
1891
|
+
};
|
|
1892
|
+
/**
|
|
1893
|
+
* Create a task on a record
|
|
1894
|
+
*/
|
|
1895
|
+
const createCrmTask = (options) => {
|
|
1896
|
+
return (options?.client ?? client).post({
|
|
1897
|
+
security: [{
|
|
1898
|
+
name: "x-api-key",
|
|
1899
|
+
type: "apiKey"
|
|
1900
|
+
}, {
|
|
1901
|
+
scheme: "bearer",
|
|
1902
|
+
type: "http"
|
|
1903
|
+
}],
|
|
1904
|
+
url: "/v1/crm/tasks",
|
|
1905
|
+
...options,
|
|
1906
|
+
headers: {
|
|
1907
|
+
"Content-Type": "application/json",
|
|
1908
|
+
...options?.headers
|
|
1909
|
+
}
|
|
1910
|
+
});
|
|
1911
|
+
};
|
|
1912
|
+
/**
|
|
1913
|
+
* Cross-record task inbox for the caller's visible records
|
|
1914
|
+
*/
|
|
1915
|
+
const listCrmWorkspaceTasks = (options) => {
|
|
1916
|
+
return (options?.client ?? client).get({
|
|
1917
|
+
security: [{
|
|
1918
|
+
name: "x-api-key",
|
|
1919
|
+
type: "apiKey"
|
|
1920
|
+
}, {
|
|
1921
|
+
scheme: "bearer",
|
|
1922
|
+
type: "http"
|
|
1923
|
+
}],
|
|
1924
|
+
url: "/v1/crm/tasks/workspace",
|
|
1925
|
+
...options
|
|
1926
|
+
});
|
|
1927
|
+
};
|
|
1928
|
+
/**
|
|
1929
|
+
* Pull calendar changes and apply them (one record, or user-wide)
|
|
1930
|
+
*/
|
|
1931
|
+
const reconcileCrmMeetings = (options) => {
|
|
1932
|
+
return (options?.client ?? client).post({
|
|
1933
|
+
security: [{
|
|
1934
|
+
name: "x-api-key",
|
|
1935
|
+
type: "apiKey"
|
|
1936
|
+
}, {
|
|
1937
|
+
scheme: "bearer",
|
|
1938
|
+
type: "http"
|
|
1939
|
+
}],
|
|
1940
|
+
url: "/v1/crm/meetings/reconcile",
|
|
1941
|
+
...options,
|
|
1942
|
+
headers: {
|
|
1943
|
+
"Content-Type": "application/json",
|
|
1944
|
+
...options?.headers
|
|
1945
|
+
}
|
|
1946
|
+
});
|
|
1947
|
+
};
|
|
1948
|
+
/**
|
|
1949
|
+
* Delete a meeting (and its provider event)
|
|
1950
|
+
*/
|
|
1951
|
+
const deleteCrmMeeting = (options) => {
|
|
1952
|
+
return (options.client ?? client).delete({
|
|
1953
|
+
security: [{
|
|
1954
|
+
name: "x-api-key",
|
|
1955
|
+
type: "apiKey"
|
|
1956
|
+
}, {
|
|
1957
|
+
scheme: "bearer",
|
|
1958
|
+
type: "http"
|
|
1959
|
+
}],
|
|
1960
|
+
url: "/v1/crm/meetings",
|
|
1961
|
+
...options
|
|
1962
|
+
});
|
|
1963
|
+
};
|
|
1964
|
+
/**
|
|
1965
|
+
* List meetings for a record
|
|
1966
|
+
*/
|
|
1967
|
+
const listCrmMeetings = (options) => {
|
|
1968
|
+
return (options.client ?? client).get({
|
|
1969
|
+
security: [{
|
|
1970
|
+
name: "x-api-key",
|
|
1971
|
+
type: "apiKey"
|
|
1972
|
+
}, {
|
|
1973
|
+
scheme: "bearer",
|
|
1974
|
+
type: "http"
|
|
1975
|
+
}],
|
|
1976
|
+
url: "/v1/crm/meetings",
|
|
1977
|
+
...options
|
|
1978
|
+
});
|
|
1979
|
+
};
|
|
1980
|
+
/**
|
|
1981
|
+
* Update, cancel, complete, or re-sync a meeting
|
|
1982
|
+
*/
|
|
1983
|
+
const updateCrmMeeting = (options) => {
|
|
1984
|
+
return (options?.client ?? client).patch({
|
|
1985
|
+
security: [{
|
|
1986
|
+
name: "x-api-key",
|
|
1987
|
+
type: "apiKey"
|
|
1988
|
+
}, {
|
|
1989
|
+
scheme: "bearer",
|
|
1990
|
+
type: "http"
|
|
1991
|
+
}],
|
|
1992
|
+
url: "/v1/crm/meetings",
|
|
1993
|
+
...options,
|
|
1994
|
+
headers: {
|
|
1995
|
+
"Content-Type": "application/json",
|
|
1996
|
+
...options?.headers
|
|
1997
|
+
}
|
|
1998
|
+
});
|
|
1999
|
+
};
|
|
2000
|
+
/**
|
|
2001
|
+
* Create a meeting (optionally syncing it to a calendar provider)
|
|
2002
|
+
*/
|
|
2003
|
+
const createCrmMeeting = (options) => {
|
|
2004
|
+
return (options?.client ?? client).post({
|
|
2005
|
+
security: [{
|
|
2006
|
+
name: "x-api-key",
|
|
2007
|
+
type: "apiKey"
|
|
2008
|
+
}, {
|
|
2009
|
+
scheme: "bearer",
|
|
2010
|
+
type: "http"
|
|
2011
|
+
}],
|
|
2012
|
+
url: "/v1/crm/meetings",
|
|
2013
|
+
...options,
|
|
2014
|
+
headers: {
|
|
2015
|
+
"Content-Type": "application/json",
|
|
2016
|
+
...options?.headers
|
|
2017
|
+
}
|
|
2018
|
+
});
|
|
2019
|
+
};
|
|
2020
|
+
/**
|
|
2021
|
+
* Apply the Market-Insights updates the user accepted
|
|
2022
|
+
*/
|
|
2023
|
+
const applyCrmMiUpdates = (options) => {
|
|
2024
|
+
return (options?.client ?? client).post({
|
|
2025
|
+
security: [{
|
|
2026
|
+
name: "x-api-key",
|
|
2027
|
+
type: "apiKey"
|
|
2028
|
+
}, {
|
|
2029
|
+
scheme: "bearer",
|
|
2030
|
+
type: "http"
|
|
2031
|
+
}],
|
|
2032
|
+
url: "/v1/crm/records/apply-mi-updates",
|
|
2033
|
+
...options,
|
|
2034
|
+
headers: {
|
|
2035
|
+
"Content-Type": "application/json",
|
|
2036
|
+
...options?.headers
|
|
2037
|
+
}
|
|
2038
|
+
});
|
|
2039
|
+
};
|
|
2040
|
+
/**
|
|
2041
|
+
* Dismiss surfaced MI updates (remember them in the seen-ledger)
|
|
2042
|
+
*/
|
|
2043
|
+
const dismissCrmMiUpdates = (options) => {
|
|
2044
|
+
return (options?.client ?? client).post({
|
|
2045
|
+
security: [{
|
|
2046
|
+
name: "x-api-key",
|
|
2047
|
+
type: "apiKey"
|
|
2048
|
+
}, {
|
|
2049
|
+
scheme: "bearer",
|
|
2050
|
+
type: "http"
|
|
2051
|
+
}],
|
|
2052
|
+
url: "/v1/crm/records/dismiss-mi-updates",
|
|
2053
|
+
...options,
|
|
2054
|
+
headers: {
|
|
2055
|
+
"Content-Type": "application/json",
|
|
2056
|
+
...options?.headers
|
|
2057
|
+
}
|
|
2058
|
+
});
|
|
2059
|
+
};
|
|
2060
|
+
/**
|
|
2061
|
+
* Compute which Market-Insights fields differ from a record snapshot
|
|
2062
|
+
*/
|
|
2063
|
+
const getCrmMiUpdates = (options) => {
|
|
2064
|
+
return (options?.client ?? client).post({
|
|
2065
|
+
security: [{
|
|
2066
|
+
name: "x-api-key",
|
|
2067
|
+
type: "apiKey"
|
|
2068
|
+
}, {
|
|
2069
|
+
scheme: "bearer",
|
|
2070
|
+
type: "http"
|
|
2071
|
+
}],
|
|
2072
|
+
url: "/v1/crm/records/mi-updates",
|
|
2073
|
+
...options,
|
|
2074
|
+
headers: {
|
|
2075
|
+
"Content-Type": "application/json",
|
|
2076
|
+
...options?.headers
|
|
2077
|
+
}
|
|
2078
|
+
});
|
|
2079
|
+
};
|
|
2080
|
+
/**
|
|
2081
|
+
* Ask the org owner(s) to enable the CRM (membership-gated)
|
|
2082
|
+
*/
|
|
2083
|
+
const requestCrmAccess = (options) => {
|
|
2084
|
+
return (options?.client ?? client).post({
|
|
2085
|
+
security: [{
|
|
2086
|
+
name: "x-api-key",
|
|
2087
|
+
type: "apiKey"
|
|
2088
|
+
}, {
|
|
2089
|
+
scheme: "bearer",
|
|
2090
|
+
type: "http"
|
|
2091
|
+
}],
|
|
2092
|
+
url: "/v1/crm/request-access",
|
|
2093
|
+
...options,
|
|
2094
|
+
headers: {
|
|
2095
|
+
"Content-Type": "application/json",
|
|
2096
|
+
...options?.headers
|
|
2097
|
+
}
|
|
2098
|
+
});
|
|
2099
|
+
};
|
|
2100
|
+
/**
|
|
2101
|
+
* Remove a user-added contact method
|
|
2102
|
+
*/
|
|
2103
|
+
const removeCrmContactMethod = (options) => {
|
|
2104
|
+
return (options?.client ?? client).delete({
|
|
2105
|
+
security: [{
|
|
2106
|
+
name: "x-api-key",
|
|
2107
|
+
type: "apiKey"
|
|
2108
|
+
}, {
|
|
2109
|
+
scheme: "bearer",
|
|
2110
|
+
type: "http"
|
|
2111
|
+
}],
|
|
2112
|
+
url: "/v1/crm/contacts",
|
|
2113
|
+
...options,
|
|
2114
|
+
headers: {
|
|
2115
|
+
"Content-Type": "application/json",
|
|
2116
|
+
...options?.headers
|
|
2117
|
+
}
|
|
2118
|
+
});
|
|
2119
|
+
};
|
|
2120
|
+
/**
|
|
2121
|
+
* Update or suppress a contact method
|
|
2122
|
+
*/
|
|
2123
|
+
const updateCrmContactMethod = (options) => {
|
|
2124
|
+
return (options?.client ?? client).patch({
|
|
2125
|
+
security: [{
|
|
2126
|
+
name: "x-api-key",
|
|
2127
|
+
type: "apiKey"
|
|
2128
|
+
}, {
|
|
2129
|
+
scheme: "bearer",
|
|
2130
|
+
type: "http"
|
|
2131
|
+
}],
|
|
2132
|
+
url: "/v1/crm/contacts",
|
|
2133
|
+
...options,
|
|
2134
|
+
headers: {
|
|
2135
|
+
"Content-Type": "application/json",
|
|
2136
|
+
...options?.headers
|
|
2137
|
+
}
|
|
2138
|
+
});
|
|
2139
|
+
};
|
|
2140
|
+
/**
|
|
2141
|
+
* Add a contact method to a record
|
|
2142
|
+
*/
|
|
2143
|
+
const addCrmContactMethod = (options) => {
|
|
2144
|
+
return (options?.client ?? client).post({
|
|
2145
|
+
security: [{
|
|
2146
|
+
name: "x-api-key",
|
|
2147
|
+
type: "apiKey"
|
|
2148
|
+
}, {
|
|
2149
|
+
scheme: "bearer",
|
|
2150
|
+
type: "http"
|
|
2151
|
+
}],
|
|
2152
|
+
url: "/v1/crm/contacts",
|
|
2153
|
+
...options,
|
|
2154
|
+
headers: {
|
|
2155
|
+
"Content-Type": "application/json",
|
|
2156
|
+
...options?.headers
|
|
2157
|
+
}
|
|
2158
|
+
});
|
|
2159
|
+
};
|
|
2160
|
+
/**
|
|
2161
|
+
* List custom fields applicable to a view
|
|
2162
|
+
*/
|
|
2163
|
+
const listCrmCustomFields = (options) => {
|
|
2164
|
+
return (options.client ?? client).get({
|
|
2165
|
+
security: [{
|
|
2166
|
+
name: "x-api-key",
|
|
2167
|
+
type: "apiKey"
|
|
2168
|
+
}, {
|
|
2169
|
+
scheme: "bearer",
|
|
2170
|
+
type: "http"
|
|
2171
|
+
}],
|
|
2172
|
+
url: "/v1/crm/fields",
|
|
2173
|
+
...options
|
|
2174
|
+
});
|
|
2175
|
+
};
|
|
2176
|
+
/**
|
|
2177
|
+
* Get custom-field values for one or many records
|
|
2178
|
+
*/
|
|
2179
|
+
const getCrmCustomValues = (options) => {
|
|
2180
|
+
return (options?.client ?? client).get({
|
|
2181
|
+
security: [{
|
|
2182
|
+
name: "x-api-key",
|
|
2183
|
+
type: "apiKey"
|
|
2184
|
+
}, {
|
|
2185
|
+
scheme: "bearer",
|
|
2186
|
+
type: "http"
|
|
2187
|
+
}],
|
|
2188
|
+
url: "/v1/crm/custom-values",
|
|
2189
|
+
...options
|
|
2190
|
+
});
|
|
2191
|
+
};
|
|
2192
|
+
/**
|
|
2193
|
+
* Set a record's value for one custom field
|
|
2194
|
+
*/
|
|
2195
|
+
const setCrmCustomValue = (options) => {
|
|
2196
|
+
return (options?.client ?? client).patch({
|
|
2197
|
+
security: [{
|
|
2198
|
+
name: "x-api-key",
|
|
2199
|
+
type: "apiKey"
|
|
2200
|
+
}, {
|
|
2201
|
+
scheme: "bearer",
|
|
2202
|
+
type: "http"
|
|
2203
|
+
}],
|
|
2204
|
+
url: "/v1/crm/custom-values",
|
|
2205
|
+
...options,
|
|
2206
|
+
headers: {
|
|
2207
|
+
"Content-Type": "application/json",
|
|
2208
|
+
...options?.headers
|
|
2209
|
+
}
|
|
2210
|
+
});
|
|
2211
|
+
};
|
|
2212
|
+
/**
|
|
2213
|
+
* Send an outbound email via the user's connected Gmail or Outlook
|
|
2214
|
+
*/
|
|
2215
|
+
const sendCrmEmail = (options) => {
|
|
2216
|
+
return (options?.client ?? client).post({
|
|
2217
|
+
security: [{
|
|
2218
|
+
name: "x-api-key",
|
|
2219
|
+
type: "apiKey"
|
|
2220
|
+
}, {
|
|
2221
|
+
scheme: "bearer",
|
|
2222
|
+
type: "http"
|
|
2223
|
+
}],
|
|
2224
|
+
url: "/v1/crm/email/send",
|
|
2225
|
+
...options,
|
|
2226
|
+
headers: {
|
|
2227
|
+
"Content-Type": "application/json",
|
|
2228
|
+
...options?.headers
|
|
2229
|
+
}
|
|
2230
|
+
});
|
|
2231
|
+
};
|
|
2232
|
+
/**
|
|
2233
|
+
* List attribute templates the caller can load
|
|
2234
|
+
*/
|
|
2235
|
+
const listCrmTemplates = (options) => {
|
|
2236
|
+
return (options?.client ?? client).get({
|
|
2237
|
+
security: [{
|
|
2238
|
+
name: "x-api-key",
|
|
2239
|
+
type: "apiKey"
|
|
2240
|
+
}, {
|
|
2241
|
+
scheme: "bearer",
|
|
2242
|
+
type: "http"
|
|
2243
|
+
}],
|
|
2244
|
+
url: "/v1/crm/templates",
|
|
2245
|
+
...options
|
|
2246
|
+
});
|
|
2247
|
+
};
|
|
2248
|
+
/**
|
|
2249
|
+
* Create a template (optionally captured from a list)
|
|
2250
|
+
*/
|
|
2251
|
+
const createCrmTemplate = (options) => {
|
|
2252
|
+
return (options?.client ?? client).post({
|
|
2253
|
+
security: [{
|
|
2254
|
+
name: "x-api-key",
|
|
2255
|
+
type: "apiKey"
|
|
2256
|
+
}, {
|
|
2257
|
+
scheme: "bearer",
|
|
2258
|
+
type: "http"
|
|
2259
|
+
}],
|
|
2260
|
+
url: "/v1/crm/templates",
|
|
2261
|
+
...options,
|
|
2262
|
+
headers: {
|
|
2263
|
+
"Content-Type": "application/json",
|
|
2264
|
+
...options?.headers
|
|
2265
|
+
}
|
|
2266
|
+
});
|
|
2267
|
+
};
|
|
2268
|
+
/**
|
|
2269
|
+
* Delete a template (its fields + shares cascade)
|
|
2270
|
+
*/
|
|
2271
|
+
const deleteCrmTemplate = (options) => {
|
|
2272
|
+
return (options.client ?? client).delete({
|
|
2273
|
+
security: [{
|
|
2274
|
+
name: "x-api-key",
|
|
2275
|
+
type: "apiKey"
|
|
2276
|
+
}, {
|
|
2277
|
+
scheme: "bearer",
|
|
2278
|
+
type: "http"
|
|
2279
|
+
}],
|
|
2280
|
+
url: "/v1/crm/templates/{id}",
|
|
2281
|
+
...options
|
|
2282
|
+
});
|
|
2283
|
+
};
|
|
2284
|
+
/**
|
|
2285
|
+
* Load one template with its fields
|
|
2286
|
+
*/
|
|
2287
|
+
const getCrmTemplate = (options) => {
|
|
2288
|
+
return (options.client ?? client).get({
|
|
2289
|
+
security: [{
|
|
2290
|
+
name: "x-api-key",
|
|
2291
|
+
type: "apiKey"
|
|
2292
|
+
}, {
|
|
2293
|
+
scheme: "bearer",
|
|
2294
|
+
type: "http"
|
|
2295
|
+
}],
|
|
2296
|
+
url: "/v1/crm/templates/{id}",
|
|
2297
|
+
...options
|
|
2298
|
+
});
|
|
2299
|
+
};
|
|
2300
|
+
/**
|
|
2301
|
+
* Rename a template
|
|
2302
|
+
*/
|
|
2303
|
+
const updateCrmTemplate = (options) => {
|
|
2304
|
+
return (options.client ?? client).patch({
|
|
2305
|
+
security: [{
|
|
2306
|
+
name: "x-api-key",
|
|
2307
|
+
type: "apiKey"
|
|
2308
|
+
}, {
|
|
2309
|
+
scheme: "bearer",
|
|
2310
|
+
type: "http"
|
|
2311
|
+
}],
|
|
2312
|
+
url: "/v1/crm/templates/{id}",
|
|
2313
|
+
...options,
|
|
2314
|
+
headers: {
|
|
2315
|
+
"Content-Type": "application/json",
|
|
2316
|
+
...options?.headers
|
|
2317
|
+
}
|
|
2318
|
+
});
|
|
2319
|
+
};
|
|
2320
|
+
/**
|
|
2321
|
+
* Revoke a teammate's template grant
|
|
2322
|
+
*/
|
|
2323
|
+
const unshareCrmTemplate = (options) => {
|
|
2324
|
+
return (options.client ?? client).delete({
|
|
2325
|
+
security: [{
|
|
2326
|
+
name: "x-api-key",
|
|
2327
|
+
type: "apiKey"
|
|
2328
|
+
}, {
|
|
2329
|
+
scheme: "bearer",
|
|
2330
|
+
type: "http"
|
|
2331
|
+
}],
|
|
2332
|
+
url: "/v1/crm/templates/{id}/shares",
|
|
2333
|
+
...options
|
|
2334
|
+
});
|
|
2335
|
+
};
|
|
2336
|
+
/**
|
|
2337
|
+
* A template's share panel (owner display, canManage, grantees)
|
|
2338
|
+
*/
|
|
2339
|
+
const getCrmTemplateShares = (options) => {
|
|
2340
|
+
return (options.client ?? client).get({
|
|
2341
|
+
security: [{
|
|
2342
|
+
name: "x-api-key",
|
|
2343
|
+
type: "apiKey"
|
|
2344
|
+
}, {
|
|
2345
|
+
scheme: "bearer",
|
|
2346
|
+
type: "http"
|
|
2347
|
+
}],
|
|
2348
|
+
url: "/v1/crm/templates/{id}/shares",
|
|
2349
|
+
...options
|
|
2350
|
+
});
|
|
2351
|
+
};
|
|
2352
|
+
/**
|
|
2353
|
+
* Grant a teammate load access to a template
|
|
2354
|
+
*/
|
|
2355
|
+
const shareCrmTemplate = (options) => {
|
|
2356
|
+
return (options.client ?? client).post({
|
|
2357
|
+
security: [{
|
|
2358
|
+
name: "x-api-key",
|
|
2359
|
+
type: "apiKey"
|
|
2360
|
+
}, {
|
|
2361
|
+
scheme: "bearer",
|
|
2362
|
+
type: "http"
|
|
2363
|
+
}],
|
|
2364
|
+
url: "/v1/crm/templates/{id}/shares",
|
|
2365
|
+
...options,
|
|
2366
|
+
headers: {
|
|
2367
|
+
"Content-Type": "application/json",
|
|
2368
|
+
...options?.headers
|
|
2369
|
+
}
|
|
2370
|
+
});
|
|
2371
|
+
};
|
|
2372
|
+
/**
|
|
2373
|
+
* Revoke a user's access to a record
|
|
2374
|
+
*/
|
|
2375
|
+
const revokeCrmRecordAccess = (options) => {
|
|
2376
|
+
return (options?.client ?? client).delete({
|
|
2377
|
+
security: [{
|
|
2378
|
+
name: "x-api-key",
|
|
2379
|
+
type: "apiKey"
|
|
2380
|
+
}, {
|
|
2381
|
+
scheme: "bearer",
|
|
2382
|
+
type: "http"
|
|
2383
|
+
}],
|
|
2384
|
+
url: "/v1/crm/record-shares",
|
|
2385
|
+
...options,
|
|
2386
|
+
headers: {
|
|
2387
|
+
"Content-Type": "application/json",
|
|
2388
|
+
...options?.headers
|
|
2389
|
+
}
|
|
2390
|
+
});
|
|
2391
|
+
};
|
|
2392
|
+
/**
|
|
2393
|
+
* List the direct shares on a record (+ display, canManageShares)
|
|
2394
|
+
*/
|
|
2395
|
+
const listCrmRecordShares = (options) => {
|
|
2396
|
+
return (options.client ?? client).get({
|
|
2397
|
+
security: [{
|
|
2398
|
+
name: "x-api-key",
|
|
2399
|
+
type: "apiKey"
|
|
2400
|
+
}, {
|
|
2401
|
+
scheme: "bearer",
|
|
2402
|
+
type: "http"
|
|
2403
|
+
}],
|
|
2404
|
+
url: "/v1/crm/record-shares",
|
|
2405
|
+
...options
|
|
2406
|
+
});
|
|
2407
|
+
};
|
|
2408
|
+
/**
|
|
2409
|
+
* Grant a user access to a record
|
|
2410
|
+
*/
|
|
2411
|
+
const grantCrmRecordAccess = (options) => {
|
|
2412
|
+
return (options?.client ?? client).post({
|
|
2413
|
+
security: [{
|
|
2414
|
+
name: "x-api-key",
|
|
2415
|
+
type: "apiKey"
|
|
2416
|
+
}, {
|
|
2417
|
+
scheme: "bearer",
|
|
2418
|
+
type: "http"
|
|
2419
|
+
}],
|
|
2420
|
+
url: "/v1/crm/record-shares",
|
|
2421
|
+
...options,
|
|
2422
|
+
headers: {
|
|
2423
|
+
"Content-Type": "application/json",
|
|
2424
|
+
...options?.headers
|
|
2425
|
+
}
|
|
2426
|
+
});
|
|
2427
|
+
};
|
|
2428
|
+
/**
|
|
2429
|
+
* Who can access a record, and whether the caller may manage shares
|
|
2430
|
+
*/
|
|
2431
|
+
const getCrmRecordAccess = (options) => {
|
|
2432
|
+
return (options.client ?? client).get({
|
|
2433
|
+
security: [{
|
|
2434
|
+
name: "x-api-key",
|
|
2435
|
+
type: "apiKey"
|
|
2436
|
+
}, {
|
|
2437
|
+
scheme: "bearer",
|
|
2438
|
+
type: "http"
|
|
2439
|
+
}],
|
|
2440
|
+
url: "/v1/crm/record-access",
|
|
2441
|
+
...options
|
|
2442
|
+
});
|
|
2443
|
+
};
|
|
2444
|
+
/**
|
|
2445
|
+
* Typeahead search for email recipients the caller can see
|
|
2446
|
+
*/
|
|
2447
|
+
const searchCrmEmailRecipients = (options) => {
|
|
2448
|
+
return (options.client ?? client).get({
|
|
2449
|
+
security: [{
|
|
2450
|
+
name: "x-api-key",
|
|
2451
|
+
type: "apiKey"
|
|
2452
|
+
}, {
|
|
2453
|
+
scheme: "bearer",
|
|
2454
|
+
type: "http"
|
|
2455
|
+
}],
|
|
2456
|
+
url: "/v1/crm/recipients",
|
|
2457
|
+
...options
|
|
2458
|
+
});
|
|
2459
|
+
};
|
|
2460
|
+
/**
|
|
2461
|
+
* Bulk import records (create or update), optionally into a list
|
|
2462
|
+
*/
|
|
2463
|
+
const importCrmRecords = (options) => {
|
|
2464
|
+
return (options?.client ?? client).post({
|
|
2465
|
+
security: [{
|
|
2466
|
+
name: "x-api-key",
|
|
2467
|
+
type: "apiKey"
|
|
2468
|
+
}, {
|
|
2469
|
+
scheme: "bearer",
|
|
2470
|
+
type: "http"
|
|
2471
|
+
}],
|
|
2472
|
+
url: "/v1/crm/import",
|
|
2473
|
+
...options,
|
|
2474
|
+
headers: {
|
|
2475
|
+
"Content-Type": "application/json",
|
|
2476
|
+
...options?.headers
|
|
2477
|
+
}
|
|
2478
|
+
});
|
|
2479
|
+
};
|
|
2480
|
+
/**
|
|
2481
|
+
* Apply a match to an imported record (link + seed contacts)
|
|
2482
|
+
*/
|
|
2483
|
+
const applyCrmEnrichment = (options) => {
|
|
2484
|
+
return (options?.client ?? client).post({
|
|
2485
|
+
security: [{
|
|
2486
|
+
name: "x-api-key",
|
|
2487
|
+
type: "apiKey"
|
|
2488
|
+
}, {
|
|
2489
|
+
scheme: "bearer",
|
|
2490
|
+
type: "http"
|
|
2491
|
+
}],
|
|
2492
|
+
url: "/v1/crm/enrich/apply",
|
|
2493
|
+
...options,
|
|
2494
|
+
headers: {
|
|
2495
|
+
"Content-Type": "application/json",
|
|
2496
|
+
...options?.headers
|
|
2497
|
+
}
|
|
2498
|
+
});
|
|
2499
|
+
};
|
|
2500
|
+
/**
|
|
2501
|
+
* Link a record to a chosen candidate
|
|
2502
|
+
*/
|
|
2503
|
+
const linkCrmRecord = (options) => {
|
|
2504
|
+
return (options?.client ?? client).patch({
|
|
2505
|
+
security: [{
|
|
2506
|
+
name: "x-api-key",
|
|
2507
|
+
type: "apiKey"
|
|
2508
|
+
}, {
|
|
2509
|
+
scheme: "bearer",
|
|
2510
|
+
type: "http"
|
|
2511
|
+
}],
|
|
2512
|
+
url: "/v1/crm/match",
|
|
2513
|
+
...options,
|
|
2514
|
+
headers: {
|
|
2515
|
+
"Content-Type": "application/json",
|
|
2516
|
+
...options?.headers
|
|
2517
|
+
}
|
|
2518
|
+
});
|
|
2519
|
+
};
|
|
2520
|
+
/**
|
|
2521
|
+
* Find candidate entities to link an unmatched record to
|
|
2522
|
+
*/
|
|
2523
|
+
const searchCrmMatchCandidates = (options) => {
|
|
2524
|
+
return (options?.client ?? client).post({
|
|
2525
|
+
security: [{
|
|
2526
|
+
name: "x-api-key",
|
|
2527
|
+
type: "apiKey"
|
|
2528
|
+
}, {
|
|
2529
|
+
scheme: "bearer",
|
|
2530
|
+
type: "http"
|
|
2531
|
+
}],
|
|
2532
|
+
url: "/v1/crm/match",
|
|
2533
|
+
...options,
|
|
2534
|
+
headers: {
|
|
2535
|
+
"Content-Type": "application/json",
|
|
2536
|
+
...options?.headers
|
|
2537
|
+
}
|
|
2538
|
+
});
|
|
2539
|
+
};
|
|
2540
|
+
/**
|
|
2541
|
+
* Recent-vs-prior 3-month closed-loan units for a set of LOs (by NMLS)
|
|
2542
|
+
*/
|
|
2543
|
+
const crmLoMomentum = (options) => {
|
|
2544
|
+
return (options?.client ?? client).post({
|
|
2545
|
+
security: [{
|
|
2546
|
+
name: "x-api-key",
|
|
2547
|
+
type: "apiKey"
|
|
2548
|
+
}, {
|
|
2549
|
+
scheme: "bearer",
|
|
2550
|
+
type: "http"
|
|
2551
|
+
}],
|
|
2552
|
+
url: "/v1/crm/lo-momentum",
|
|
2553
|
+
...options,
|
|
2554
|
+
headers: {
|
|
2555
|
+
"Content-Type": "application/json",
|
|
2556
|
+
...options?.headers
|
|
2557
|
+
}
|
|
2558
|
+
});
|
|
2559
|
+
};
|
|
2560
|
+
/**
|
|
2561
|
+
* Loan-type mix (percentage + top type) for a single LO (by NMLS)
|
|
2562
|
+
*/
|
|
2563
|
+
const crmLoLoanMix = (options) => {
|
|
2564
|
+
return (options?.client ?? client).post({
|
|
2565
|
+
security: [{
|
|
2566
|
+
name: "x-api-key",
|
|
2567
|
+
type: "apiKey"
|
|
2568
|
+
}, {
|
|
2569
|
+
scheme: "bearer",
|
|
2570
|
+
type: "http"
|
|
2571
|
+
}],
|
|
2572
|
+
url: "/v1/crm/lo-loan-mix",
|
|
2573
|
+
...options,
|
|
2574
|
+
headers: {
|
|
2575
|
+
"Content-Type": "application/json",
|
|
2576
|
+
...options?.headers
|
|
2577
|
+
}
|
|
2578
|
+
});
|
|
2579
|
+
};
|
|
2580
|
+
/**
|
|
2581
|
+
* Rank an agent's LO partners by product-mix + size similarity to a viewing LO
|
|
2582
|
+
*/
|
|
2583
|
+
const crmSimilarOriginators = (options) => {
|
|
2584
|
+
return (options?.client ?? client).post({
|
|
2585
|
+
security: [{
|
|
2586
|
+
name: "x-api-key",
|
|
2587
|
+
type: "apiKey"
|
|
2588
|
+
}, {
|
|
2589
|
+
scheme: "bearer",
|
|
2590
|
+
type: "http"
|
|
2591
|
+
}],
|
|
2592
|
+
url: "/v1/crm/similar-originators",
|
|
2593
|
+
...options,
|
|
2594
|
+
headers: {
|
|
2595
|
+
"Content-Type": "application/json",
|
|
2596
|
+
...options?.headers
|
|
2597
|
+
}
|
|
2598
|
+
});
|
|
2599
|
+
};
|
|
2600
|
+
/**
|
|
2601
|
+
* Current-sponsor office location + sponsored flag for a set of LOs
|
|
2602
|
+
*/
|
|
2603
|
+
const crmLoSponsorLocation = (options) => {
|
|
2604
|
+
return (options?.client ?? client).post({
|
|
2605
|
+
security: [{
|
|
2606
|
+
name: "x-api-key",
|
|
2607
|
+
type: "apiKey"
|
|
2608
|
+
}, {
|
|
2609
|
+
scheme: "bearer",
|
|
2610
|
+
type: "http"
|
|
2611
|
+
}],
|
|
2612
|
+
url: "/v1/crm/lo-sponsor-location",
|
|
2613
|
+
...options,
|
|
2614
|
+
headers: {
|
|
2615
|
+
"Content-Type": "application/json",
|
|
2616
|
+
...options?.headers
|
|
2617
|
+
}
|
|
2618
|
+
});
|
|
2619
|
+
};
|
|
2620
|
+
/**
|
|
2621
|
+
* Bank / Credit Union / Broker / Retail channel per LO (by NMLS)
|
|
2622
|
+
*/
|
|
2623
|
+
const crmLenderChannels = (options) => {
|
|
2624
|
+
return (options?.client ?? client).post({
|
|
2625
|
+
security: [{
|
|
2626
|
+
name: "x-api-key",
|
|
2627
|
+
type: "apiKey"
|
|
2628
|
+
}, {
|
|
2629
|
+
scheme: "bearer",
|
|
2630
|
+
type: "http"
|
|
2631
|
+
}],
|
|
2632
|
+
url: "/v1/crm/lender-channels",
|
|
2633
|
+
...options,
|
|
2634
|
+
headers: {
|
|
2635
|
+
"Content-Type": "application/json",
|
|
2636
|
+
...options?.headers
|
|
2637
|
+
}
|
|
2638
|
+
});
|
|
2639
|
+
};
|
|
2640
|
+
/**
|
|
2641
|
+
* The current user's still-live call (for reload resume)
|
|
2642
|
+
*/
|
|
2643
|
+
const getCrmActiveCall = (options) => {
|
|
2644
|
+
return (options?.client ?? client).get({
|
|
2645
|
+
security: [{
|
|
2646
|
+
name: "x-api-key",
|
|
2647
|
+
type: "apiKey"
|
|
2648
|
+
}, {
|
|
2649
|
+
scheme: "bearer",
|
|
2650
|
+
type: "http"
|
|
2651
|
+
}],
|
|
2652
|
+
url: "/v1/crm/calls/active",
|
|
2653
|
+
...options
|
|
2654
|
+
});
|
|
2655
|
+
};
|
|
2656
|
+
/**
|
|
2657
|
+
* Persist an AI analysis of a recorded call
|
|
2658
|
+
*/
|
|
2659
|
+
const setCrmCallAnalysis = (options) => {
|
|
2660
|
+
return (options?.client ?? client).post({
|
|
2661
|
+
security: [{
|
|
2662
|
+
name: "x-api-key",
|
|
2663
|
+
type: "apiKey"
|
|
2664
|
+
}, {
|
|
2665
|
+
scheme: "bearer",
|
|
2666
|
+
type: "http"
|
|
2667
|
+
}],
|
|
2668
|
+
url: "/v1/crm/calls/analysis",
|
|
2669
|
+
...options,
|
|
2670
|
+
headers: {
|
|
2671
|
+
"Content-Type": "application/json",
|
|
2672
|
+
...options?.headers
|
|
2673
|
+
}
|
|
2674
|
+
});
|
|
2675
|
+
};
|
|
2676
|
+
/**
|
|
2677
|
+
* Poll a recorded call's transcript (advances the pipeline)
|
|
2678
|
+
*/
|
|
2679
|
+
const getCrmCallTranscript = (options) => {
|
|
2680
|
+
return (options.client ?? client).get({
|
|
2681
|
+
security: [{
|
|
2682
|
+
name: "x-api-key",
|
|
2683
|
+
type: "apiKey"
|
|
2684
|
+
}, {
|
|
2685
|
+
scheme: "bearer",
|
|
2686
|
+
type: "http"
|
|
2687
|
+
}],
|
|
2688
|
+
url: "/v1/crm/calls/transcript",
|
|
2689
|
+
...options
|
|
2690
|
+
});
|
|
2691
|
+
};
|
|
2692
|
+
/**
|
|
2693
|
+
* Remove a caller ID from the registry
|
|
2694
|
+
*/
|
|
2695
|
+
const deleteCrmCallerId = (options) => {
|
|
2696
|
+
return (options.client ?? client).delete({
|
|
2697
|
+
security: [{
|
|
2698
|
+
name: "x-api-key",
|
|
2699
|
+
type: "apiKey"
|
|
2700
|
+
}, {
|
|
2701
|
+
scheme: "bearer",
|
|
2702
|
+
type: "http"
|
|
2703
|
+
}],
|
|
2704
|
+
url: "/v1/crm/caller-ids",
|
|
2705
|
+
...options
|
|
2706
|
+
});
|
|
2707
|
+
};
|
|
2708
|
+
/**
|
|
2709
|
+
* List the current user's caller IDs
|
|
2710
|
+
*/
|
|
2711
|
+
const listCrmCallerIds = (options) => {
|
|
2712
|
+
return (options?.client ?? client).get({
|
|
2713
|
+
security: [{
|
|
2714
|
+
name: "x-api-key",
|
|
2715
|
+
type: "apiKey"
|
|
2716
|
+
}, {
|
|
2717
|
+
scheme: "bearer",
|
|
2718
|
+
type: "http"
|
|
2719
|
+
}],
|
|
2720
|
+
url: "/v1/crm/caller-ids",
|
|
2721
|
+
...options
|
|
2722
|
+
});
|
|
2723
|
+
};
|
|
2724
|
+
/**
|
|
2725
|
+
* Make a verified caller ID the default
|
|
2726
|
+
*/
|
|
2727
|
+
const setDefaultCrmCallerId = (options) => {
|
|
2728
|
+
return (options?.client ?? client).patch({
|
|
2729
|
+
security: [{
|
|
2730
|
+
name: "x-api-key",
|
|
2731
|
+
type: "apiKey"
|
|
2732
|
+
}, {
|
|
2733
|
+
scheme: "bearer",
|
|
2734
|
+
type: "http"
|
|
2735
|
+
}],
|
|
2736
|
+
url: "/v1/crm/caller-ids",
|
|
2737
|
+
...options,
|
|
2738
|
+
headers: {
|
|
2739
|
+
"Content-Type": "application/json",
|
|
2740
|
+
...options?.headers
|
|
2741
|
+
}
|
|
2742
|
+
});
|
|
2743
|
+
};
|
|
2744
|
+
/**
|
|
2745
|
+
* Start caller-ID verification or re-check its outcome
|
|
2746
|
+
*/
|
|
2747
|
+
const actionCrmCallerId = (options) => {
|
|
2748
|
+
return (options?.client ?? client).post({
|
|
2749
|
+
security: [{
|
|
2750
|
+
name: "x-api-key",
|
|
2751
|
+
type: "apiKey"
|
|
2752
|
+
}, {
|
|
2753
|
+
scheme: "bearer",
|
|
2754
|
+
type: "http"
|
|
2755
|
+
}],
|
|
2756
|
+
url: "/v1/crm/caller-ids",
|
|
2757
|
+
...options,
|
|
2758
|
+
headers: {
|
|
2759
|
+
"Content-Type": "application/json",
|
|
2760
|
+
...options?.headers
|
|
2761
|
+
}
|
|
2762
|
+
});
|
|
2763
|
+
};
|
|
2764
|
+
/**
|
|
2765
|
+
* Poll one call's status (syncs + finalizes on terminal)
|
|
2766
|
+
*/
|
|
2767
|
+
const getCrmCall = (options) => {
|
|
2768
|
+
return (options.client ?? client).get({
|
|
2769
|
+
security: [{
|
|
2770
|
+
name: "x-api-key",
|
|
2771
|
+
type: "apiKey"
|
|
2772
|
+
}, {
|
|
2773
|
+
scheme: "bearer",
|
|
2774
|
+
type: "http"
|
|
2775
|
+
}],
|
|
2776
|
+
url: "/v1/crm/calls",
|
|
2777
|
+
...options
|
|
2778
|
+
});
|
|
2779
|
+
};
|
|
2780
|
+
/**
|
|
2781
|
+
* Hang up an in-flight call
|
|
2782
|
+
*/
|
|
2783
|
+
const hangupCrmCall = (options) => {
|
|
2784
|
+
return (options?.client ?? client).patch({
|
|
2785
|
+
security: [{
|
|
2786
|
+
name: "x-api-key",
|
|
2787
|
+
type: "apiKey"
|
|
2788
|
+
}, {
|
|
2789
|
+
scheme: "bearer",
|
|
2790
|
+
type: "http"
|
|
2791
|
+
}],
|
|
2792
|
+
url: "/v1/crm/calls",
|
|
2793
|
+
...options,
|
|
2794
|
+
headers: {
|
|
2795
|
+
"Content-Type": "application/json",
|
|
2796
|
+
...options?.headers
|
|
2797
|
+
}
|
|
2798
|
+
});
|
|
2799
|
+
};
|
|
2800
|
+
/**
|
|
2801
|
+
* Place an outbound bridge call
|
|
2802
|
+
*/
|
|
2803
|
+
const placeCrmCall = (options) => {
|
|
2804
|
+
return (options?.client ?? client).post({
|
|
2805
|
+
security: [{
|
|
2806
|
+
name: "x-api-key",
|
|
2807
|
+
type: "apiKey"
|
|
2808
|
+
}, {
|
|
2809
|
+
scheme: "bearer",
|
|
2810
|
+
type: "http"
|
|
2811
|
+
}],
|
|
2812
|
+
url: "/v1/crm/calls",
|
|
2813
|
+
...options,
|
|
2814
|
+
headers: {
|
|
2815
|
+
"Content-Type": "application/json",
|
|
2816
|
+
...options?.headers
|
|
2817
|
+
}
|
|
2818
|
+
});
|
|
2819
|
+
};
|
|
2820
|
+
/**
|
|
2821
|
+
* Instant multi-entity typeahead search
|
|
2822
|
+
* Fast typeahead/autocomplete search across agents, originators, companies, and offices. Returns top matches per entity type. Use this for quick name lookups, not for filtered searches (use the entity-specific list endpoints for those).
|
|
2823
|
+
*/
|
|
2824
|
+
const instantSearch = (options) => {
|
|
2825
|
+
return (options?.client ?? client).post({
|
|
2826
|
+
security: [{
|
|
2827
|
+
name: "x-api-key",
|
|
2828
|
+
type: "apiKey"
|
|
2829
|
+
}, {
|
|
2830
|
+
scheme: "bearer",
|
|
2831
|
+
type: "http"
|
|
2832
|
+
}],
|
|
2833
|
+
url: "/v1/instant-search",
|
|
2834
|
+
...options,
|
|
2835
|
+
headers: {
|
|
2836
|
+
"Content-Type": "application/json",
|
|
2837
|
+
...options?.headers
|
|
2838
|
+
}
|
|
2839
|
+
});
|
|
2840
|
+
};
|
|
2841
|
+
/**
|
|
2842
|
+
* Mint a scoped search token
|
|
2843
|
+
* Returns a short-lived scoped search token plus the host to query, so a trusted client can search the entity indexes directly with per-query controls (e.g. attributesToSearchOn for name-only matching).
|
|
2844
|
+
*/
|
|
2845
|
+
const getSearchToken = (options) => {
|
|
2846
|
+
return (options?.client ?? client).get({
|
|
2847
|
+
security: [{
|
|
2848
|
+
name: "x-api-key",
|
|
2849
|
+
type: "apiKey"
|
|
2850
|
+
}, {
|
|
2851
|
+
scheme: "bearer",
|
|
2852
|
+
type: "http"
|
|
2853
|
+
}],
|
|
2854
|
+
url: "/v1/search-token",
|
|
2855
|
+
...options
|
|
2856
|
+
});
|
|
2857
|
+
};
|
|
2858
|
+
/**
|
|
2859
|
+
* Search lenders with filters
|
|
2860
|
+
* Search and list normalized lender names/identities with filters — resolves raw or variant lender names to canonical lender records. Use it to look up a lender by name or reconcile lender-name variants to a single canonical entity.
|
|
2861
|
+
*/
|
|
2862
|
+
const listLenders = (options) => {
|
|
2863
|
+
return (options?.client ?? client).post({
|
|
2864
|
+
security: [{
|
|
2865
|
+
name: "x-api-key",
|
|
2866
|
+
type: "apiKey"
|
|
2867
|
+
}, {
|
|
2868
|
+
scheme: "bearer",
|
|
2869
|
+
type: "http"
|
|
2870
|
+
}],
|
|
2871
|
+
url: "/v1/lenders",
|
|
2872
|
+
...options,
|
|
2873
|
+
headers: {
|
|
2874
|
+
"Content-Type": "application/json",
|
|
2875
|
+
...options?.headers
|
|
2876
|
+
}
|
|
2877
|
+
});
|
|
2878
|
+
};
|
|
2879
|
+
/**
|
|
2880
|
+
* Get lender by ID
|
|
2881
|
+
*/
|
|
2882
|
+
const getLender = (options) => {
|
|
2883
|
+
return (options.client ?? client).get({
|
|
2884
|
+
security: [{
|
|
2885
|
+
name: "x-api-key",
|
|
2886
|
+
type: "apiKey"
|
|
2887
|
+
}, {
|
|
2888
|
+
scheme: "bearer",
|
|
2889
|
+
type: "http"
|
|
2890
|
+
}],
|
|
2891
|
+
url: "/v1/lenders/{id}",
|
|
2892
|
+
...options
|
|
2893
|
+
});
|
|
2894
|
+
};
|
|
2895
|
+
/**
|
|
2896
|
+
* Search individual loan records with filters
|
|
2897
|
+
* Search and list individual public-record mortgage and deed loan records — one row per loan (purchase, refinance, origination). Filter by geography (state, county, city, zip), lender, originator, loan amount, interest rate, loan type/purpose, and recording date, with sorting and cursor pagination. This is the discrete per-loan record search: use it to find specific loans or build a filtered loan list. (For aggregate market rates and volumes use the market search; for one loan by its ID use the loan detail endpoint.)
|
|
2898
|
+
*/
|
|
2899
|
+
const listLoans = (options) => {
|
|
2900
|
+
return (options?.client ?? client).post({
|
|
2901
|
+
security: [{
|
|
2902
|
+
name: "x-api-key",
|
|
2903
|
+
type: "apiKey"
|
|
2904
|
+
}, {
|
|
2905
|
+
scheme: "bearer",
|
|
2906
|
+
type: "http"
|
|
2907
|
+
}],
|
|
2908
|
+
url: "/v1/loans",
|
|
2909
|
+
...options,
|
|
2910
|
+
headers: {
|
|
2911
|
+
"Content-Type": "application/json",
|
|
2912
|
+
...options?.headers
|
|
2913
|
+
}
|
|
2914
|
+
});
|
|
2915
|
+
};
|
|
2916
|
+
/**
|
|
2917
|
+
* Get loan by ID
|
|
2918
|
+
*/
|
|
2919
|
+
const getLoan = (options) => {
|
|
2920
|
+
return (options.client ?? client).get({
|
|
2921
|
+
security: [{
|
|
2922
|
+
name: "x-api-key",
|
|
2923
|
+
type: "apiKey"
|
|
2924
|
+
}, {
|
|
2925
|
+
scheme: "bearer",
|
|
2926
|
+
type: "http"
|
|
2927
|
+
}],
|
|
2928
|
+
url: "/v1/loans/{id}",
|
|
2929
|
+
...options
|
|
2930
|
+
});
|
|
2931
|
+
};
|
|
2932
|
+
/**
|
|
2933
|
+
* Market summary with previous-period comparison
|
|
2934
|
+
*/
|
|
2935
|
+
const loansAnalyticsSummary = (options) => {
|
|
2936
|
+
return (options?.client ?? client).post({
|
|
2937
|
+
security: [{
|
|
2938
|
+
name: "x-api-key",
|
|
2939
|
+
type: "apiKey"
|
|
2940
|
+
}, {
|
|
2941
|
+
scheme: "bearer",
|
|
2942
|
+
type: "http"
|
|
2943
|
+
}],
|
|
2944
|
+
url: "/v1/loans/analytics/summary",
|
|
2945
|
+
...options,
|
|
2946
|
+
headers: {
|
|
2947
|
+
"Content-Type": "application/json",
|
|
2948
|
+
...options?.headers
|
|
2949
|
+
}
|
|
2950
|
+
});
|
|
2951
|
+
};
|
|
2952
|
+
/**
|
|
2953
|
+
* Volume / units over time
|
|
2954
|
+
*/
|
|
2955
|
+
const loansAnalyticsTimeSeries = (options) => {
|
|
2956
|
+
return (options?.client ?? client).post({
|
|
2957
|
+
security: [{
|
|
2958
|
+
name: "x-api-key",
|
|
2959
|
+
type: "apiKey"
|
|
2960
|
+
}, {
|
|
2961
|
+
scheme: "bearer",
|
|
2962
|
+
type: "http"
|
|
2963
|
+
}],
|
|
2964
|
+
url: "/v1/loans/analytics/time-series",
|
|
2965
|
+
...options,
|
|
2966
|
+
headers: {
|
|
2967
|
+
"Content-Type": "application/json",
|
|
2968
|
+
...options?.headers
|
|
2969
|
+
}
|
|
2970
|
+
});
|
|
2971
|
+
};
|
|
2972
|
+
/**
|
|
2973
|
+
* Configurable chart data (measure × slice)
|
|
2974
|
+
*/
|
|
2975
|
+
const loansAnalyticsChart = (options) => {
|
|
2976
|
+
return (options?.client ?? client).post({
|
|
2977
|
+
security: [{
|
|
2978
|
+
name: "x-api-key",
|
|
2979
|
+
type: "apiKey"
|
|
2980
|
+
}, {
|
|
2981
|
+
scheme: "bearer",
|
|
2982
|
+
type: "http"
|
|
2983
|
+
}],
|
|
2984
|
+
url: "/v1/loans/analytics/chart",
|
|
2985
|
+
...options,
|
|
2986
|
+
headers: {
|
|
2987
|
+
"Content-Type": "application/json",
|
|
2988
|
+
...options?.headers
|
|
2989
|
+
}
|
|
2990
|
+
});
|
|
2991
|
+
};
|
|
2992
|
+
/**
|
|
2993
|
+
* Submit a bulk-delivery job for loans
|
|
2994
|
+
* Queues an ECS task that dumps every matching loans document (subject to the org's `bulk-delivery.loans` entitlement scope) to S3 in the requested format. Returns 202 with a jobId; poll `GET /loans/bulk-delivery/{jobId}` for status + the signed download URL.
|
|
2995
|
+
*/
|
|
2996
|
+
const submitLoansBulkDelivery = (options) => {
|
|
2997
|
+
return (options?.client ?? client).post({
|
|
2998
|
+
security: [{
|
|
2999
|
+
name: "x-api-key",
|
|
3000
|
+
type: "apiKey"
|
|
3001
|
+
}, {
|
|
3002
|
+
scheme: "bearer",
|
|
3003
|
+
type: "http"
|
|
3004
|
+
}],
|
|
3005
|
+
url: "/v1/loans/bulk-delivery",
|
|
3006
|
+
...options,
|
|
3007
|
+
headers: {
|
|
3008
|
+
"Content-Type": "application/json",
|
|
3009
|
+
...options?.headers
|
|
3010
|
+
}
|
|
3011
|
+
});
|
|
3012
|
+
};
|
|
3013
|
+
/**
|
|
3014
|
+
* Get bulk-delivery job status for loans
|
|
3015
|
+
*/
|
|
3016
|
+
const getLoansBulkDeliveryJob = (options) => {
|
|
3017
|
+
return (options.client ?? client).get({
|
|
3018
|
+
security: [{
|
|
3019
|
+
name: "x-api-key",
|
|
3020
|
+
type: "apiKey"
|
|
3021
|
+
}, {
|
|
3022
|
+
scheme: "bearer",
|
|
3023
|
+
type: "http"
|
|
3024
|
+
}],
|
|
3025
|
+
url: "/v1/loans/bulk-delivery/{jobId}",
|
|
3026
|
+
...options
|
|
3027
|
+
});
|
|
3028
|
+
};
|
|
3029
|
+
/**
|
|
3030
|
+
* Autocomplete location search
|
|
3031
|
+
* Autocomplete location search powered by Mapbox. Returns location suggestions (cities, states, counties, zip codes, addresses) for a query string. Use the `mapbox_id` from a suggestion with `retrieveLocation` to get normalized geographic details for filtering.
|
|
3032
|
+
*/
|
|
3033
|
+
const suggestLocations = (options) => {
|
|
3034
|
+
return (options.client ?? client).get({
|
|
3035
|
+
security: [{
|
|
3036
|
+
name: "x-api-key",
|
|
3037
|
+
type: "apiKey"
|
|
3038
|
+
}, {
|
|
3039
|
+
scheme: "bearer",
|
|
3040
|
+
type: "http"
|
|
3041
|
+
}],
|
|
3042
|
+
url: "/v1/locations/suggest",
|
|
3043
|
+
...options
|
|
3044
|
+
});
|
|
3045
|
+
};
|
|
3046
|
+
/**
|
|
3047
|
+
* Retrieve normalized location details
|
|
3048
|
+
* Retrieve normalized location details (city, state, county, zip, coordinates) for a Mapbox suggestion ID. Use this after `suggestLocations` to get structured geographic data for filtering other endpoints.
|
|
3049
|
+
*/
|
|
3050
|
+
const retrieveLocation = (options) => {
|
|
3051
|
+
return (options.client ?? client).get({
|
|
3052
|
+
security: [{
|
|
3053
|
+
name: "x-api-key",
|
|
3054
|
+
type: "apiKey"
|
|
3055
|
+
}, {
|
|
3056
|
+
scheme: "bearer",
|
|
3057
|
+
type: "http"
|
|
3058
|
+
}],
|
|
3059
|
+
url: "/v1/locations/retrieve/{mapboxId}",
|
|
3060
|
+
...options
|
|
3061
|
+
});
|
|
3062
|
+
};
|
|
3063
|
+
/**
|
|
3064
|
+
* Search aggregated market data with filters
|
|
3065
|
+
* Search aggregated loan origination market data. Filterable dimensions cover geography (state, county, zip), product (loan purpose / type / amortization), borrower demographics, and loan numerics.
|
|
3066
|
+
*/
|
|
3067
|
+
const listMarket = (options) => {
|
|
3068
|
+
return (options?.client ?? client).post({
|
|
3069
|
+
security: [{
|
|
3070
|
+
name: "x-api-key",
|
|
3071
|
+
type: "apiKey"
|
|
3072
|
+
}, {
|
|
3073
|
+
scheme: "bearer",
|
|
3074
|
+
type: "http"
|
|
3075
|
+
}],
|
|
3076
|
+
url: "/v1/market",
|
|
3077
|
+
...options,
|
|
3078
|
+
headers: {
|
|
3079
|
+
"Content-Type": "application/json",
|
|
3080
|
+
...options?.headers
|
|
3081
|
+
}
|
|
3082
|
+
});
|
|
3083
|
+
};
|
|
3084
|
+
/**
|
|
3085
|
+
* Market summary (volume, units, rate, loan amount, credit score, LTV, DTI, income, etc.) with previous-period comparison
|
|
3086
|
+
*/
|
|
3087
|
+
const marketAnalyticsSummary = (options) => {
|
|
3088
|
+
return (options?.client ?? client).post({
|
|
3089
|
+
security: [{
|
|
3090
|
+
name: "x-api-key",
|
|
3091
|
+
type: "apiKey"
|
|
3092
|
+
}, {
|
|
3093
|
+
scheme: "bearer",
|
|
3094
|
+
type: "http"
|
|
3095
|
+
}],
|
|
3096
|
+
url: "/v1/market/analytics/summary",
|
|
3097
|
+
...options,
|
|
3098
|
+
headers: {
|
|
3099
|
+
"Content-Type": "application/json",
|
|
3100
|
+
...options?.headers
|
|
3101
|
+
}
|
|
3102
|
+
});
|
|
3103
|
+
};
|
|
3104
|
+
/**
|
|
3105
|
+
* Market metrics over time
|
|
3106
|
+
*/
|
|
3107
|
+
const marketAnalyticsTimeSeries = (options) => {
|
|
3108
|
+
return (options?.client ?? client).post({
|
|
3109
|
+
security: [{
|
|
3110
|
+
name: "x-api-key",
|
|
3111
|
+
type: "apiKey"
|
|
3112
|
+
}, {
|
|
3113
|
+
scheme: "bearer",
|
|
3114
|
+
type: "http"
|
|
3115
|
+
}],
|
|
3116
|
+
url: "/v1/market/analytics/time-series",
|
|
3117
|
+
...options,
|
|
3118
|
+
headers: {
|
|
3119
|
+
"Content-Type": "application/json",
|
|
3120
|
+
...options?.headers
|
|
3121
|
+
}
|
|
3122
|
+
});
|
|
3123
|
+
};
|
|
3124
|
+
/**
|
|
3125
|
+
* Market measure by dimension breakdown
|
|
3126
|
+
*/
|
|
3127
|
+
const marketAnalyticsChart = (options) => {
|
|
3128
|
+
return (options?.client ?? client).post({
|
|
3129
|
+
security: [{
|
|
3130
|
+
name: "x-api-key",
|
|
3131
|
+
type: "apiKey"
|
|
3132
|
+
}, {
|
|
3133
|
+
scheme: "bearer",
|
|
3134
|
+
type: "http"
|
|
3135
|
+
}],
|
|
3136
|
+
url: "/v1/market/analytics/chart",
|
|
3137
|
+
...options,
|
|
3138
|
+
headers: {
|
|
3139
|
+
"Content-Type": "application/json",
|
|
3140
|
+
...options?.headers
|
|
3141
|
+
}
|
|
3142
|
+
});
|
|
3143
|
+
};
|
|
3144
|
+
/**
|
|
3145
|
+
* Agents at an office
|
|
3146
|
+
*/
|
|
3147
|
+
const officeAgents = (options) => {
|
|
3148
|
+
return (options?.client ?? client).post({
|
|
3149
|
+
security: [{
|
|
3150
|
+
name: "x-api-key",
|
|
3151
|
+
type: "apiKey"
|
|
3152
|
+
}, {
|
|
3153
|
+
scheme: "bearer",
|
|
3154
|
+
type: "http"
|
|
3155
|
+
}],
|
|
3156
|
+
url: "/v1/offices/agents",
|
|
3157
|
+
...options,
|
|
3158
|
+
headers: {
|
|
3159
|
+
"Content-Type": "application/json",
|
|
3160
|
+
...options?.headers
|
|
3161
|
+
}
|
|
3162
|
+
});
|
|
3163
|
+
};
|
|
3164
|
+
/**
|
|
3165
|
+
* Search real-estate offices with filters
|
|
3166
|
+
* NOT NMLS mortgage branches — use `/branches` for those. Returns office name, address, agent count, coordinates, and office-level production for the selected period. Default sort is by agent count descending.
|
|
3167
|
+
*/
|
|
3168
|
+
const listOffices = (options) => {
|
|
3169
|
+
return (options?.client ?? client).post({
|
|
3170
|
+
security: [{
|
|
3171
|
+
name: "x-api-key",
|
|
3172
|
+
type: "apiKey"
|
|
3173
|
+
}, {
|
|
3174
|
+
scheme: "bearer",
|
|
3175
|
+
type: "http"
|
|
3176
|
+
}],
|
|
3177
|
+
url: "/v1/offices",
|
|
3178
|
+
...options,
|
|
3179
|
+
headers: {
|
|
3180
|
+
"Content-Type": "application/json",
|
|
3181
|
+
...options?.headers
|
|
3182
|
+
}
|
|
3183
|
+
});
|
|
3184
|
+
};
|
|
3185
|
+
/**
|
|
3186
|
+
* Get office by key with office-level production
|
|
3187
|
+
*/
|
|
3188
|
+
const getOffice = (options) => {
|
|
3189
|
+
return (options.client ?? client).get({
|
|
3190
|
+
security: [{
|
|
3191
|
+
name: "x-api-key",
|
|
3192
|
+
type: "apiKey"
|
|
3193
|
+
}, {
|
|
3194
|
+
scheme: "bearer",
|
|
3195
|
+
type: "http"
|
|
3196
|
+
}],
|
|
3197
|
+
url: "/v1/offices/{id}",
|
|
3198
|
+
...options
|
|
3199
|
+
});
|
|
3200
|
+
};
|
|
3201
|
+
/**
|
|
3202
|
+
* Search originators with filters
|
|
3203
|
+
* Search and list individual loan originators (LOs — NMLS-registered mortgage loan officers) with filters — one row per originator. Filter by name, NMLS ID, location (state, city), employer/company, and production metrics (loan volume, units, product mix), with sorting and cursor pagination. LOCATION SEMANTICS: the state/city filters match an originator's PRODUCTION GEOGRAPHY — the markets where they actually originated loans in the selected period — not where their office or employer sits. An LO who lends across several markets matches a filter for ANY of those markets, while the `state`/`city` returned on each row reflect only their PRIMARY (highest-volume) market. So a search for city "Long Beach" can return an LO whose displayed location is a different city/state (e.g. their top market is in Arizona) — they still originated loans in Long Beach, it just isn't their #1 market. To rank originators by their volume within a specific market, sort by volume after filtering, or use the per-originator city/county/state breakdown endpoints. This is the per-originator record search: use it to find specific loan officers or build a filtered LO list. (For a single originator by NMLS ID use the originator detail endpoint.)
|
|
3204
|
+
*/
|
|
3205
|
+
const listOriginators = (options) => {
|
|
3206
|
+
return (options?.client ?? client).post({
|
|
3207
|
+
security: [{
|
|
3208
|
+
name: "x-api-key",
|
|
3209
|
+
type: "apiKey"
|
|
3210
|
+
}, {
|
|
3211
|
+
scheme: "bearer",
|
|
3212
|
+
type: "http"
|
|
3213
|
+
}],
|
|
3214
|
+
url: "/v1/originators",
|
|
3215
|
+
...options,
|
|
3216
|
+
headers: {
|
|
3217
|
+
"Content-Type": "application/json",
|
|
3218
|
+
...options?.headers
|
|
3219
|
+
}
|
|
3220
|
+
});
|
|
3221
|
+
};
|
|
3222
|
+
/**
|
|
3223
|
+
* Get originator by NMLS ID
|
|
3224
|
+
*/
|
|
3225
|
+
const getOriginator = (options) => {
|
|
3226
|
+
return (options.client ?? client).get({
|
|
3227
|
+
security: [{
|
|
3228
|
+
name: "x-api-key",
|
|
3229
|
+
type: "apiKey"
|
|
3230
|
+
}, {
|
|
3231
|
+
scheme: "bearer",
|
|
3232
|
+
type: "http"
|
|
3233
|
+
}],
|
|
3234
|
+
url: "/v1/originators/{nmlsId}",
|
|
3235
|
+
...options
|
|
3236
|
+
});
|
|
3237
|
+
};
|
|
3238
|
+
/**
|
|
3239
|
+
* Production summary with previous-period comparison
|
|
3240
|
+
*/
|
|
3241
|
+
const originatorAnalyticsSummary = (options) => {
|
|
3242
|
+
return (options?.client ?? client).post({
|
|
3243
|
+
security: [{
|
|
3244
|
+
name: "x-api-key",
|
|
3245
|
+
type: "apiKey"
|
|
3246
|
+
}, {
|
|
3247
|
+
scheme: "bearer",
|
|
3248
|
+
type: "http"
|
|
3249
|
+
}],
|
|
3250
|
+
url: "/v1/originators/analytics/summary",
|
|
3251
|
+
...options,
|
|
3252
|
+
headers: {
|
|
3253
|
+
"Content-Type": "application/json",
|
|
3254
|
+
...options?.headers
|
|
3255
|
+
}
|
|
3256
|
+
});
|
|
3257
|
+
};
|
|
3258
|
+
/**
|
|
3259
|
+
* Originator volume / units over time
|
|
3260
|
+
*/
|
|
3261
|
+
const originatorAnalyticsTimeSeries = (options) => {
|
|
3262
|
+
return (options?.client ?? client).post({
|
|
3263
|
+
security: [{
|
|
3264
|
+
name: "x-api-key",
|
|
3265
|
+
type: "apiKey"
|
|
3266
|
+
}, {
|
|
3267
|
+
scheme: "bearer",
|
|
3268
|
+
type: "http"
|
|
3269
|
+
}],
|
|
3270
|
+
url: "/v1/originators/analytics/time-series",
|
|
3271
|
+
...options,
|
|
3272
|
+
headers: {
|
|
3273
|
+
"Content-Type": "application/json",
|
|
3274
|
+
...options?.headers
|
|
3275
|
+
}
|
|
3276
|
+
});
|
|
3277
|
+
};
|
|
3278
|
+
/**
|
|
3279
|
+
* Configurable chart (measure × slice) over one LO's loans
|
|
3280
|
+
*/
|
|
3281
|
+
const originatorAnalyticsChart = (options) => {
|
|
3282
|
+
return (options?.client ?? client).post({
|
|
1420
3283
|
security: [{
|
|
1421
3284
|
name: "x-api-key",
|
|
1422
3285
|
type: "apiKey"
|
|
@@ -1433,9 +3296,682 @@ const originatorAnalyticsChart = (options) => {
|
|
|
1433
3296
|
});
|
|
1434
3297
|
};
|
|
1435
3298
|
/**
|
|
1436
|
-
* Loans originated by this LO
|
|
3299
|
+
* Loans originated by this LO
|
|
3300
|
+
*/
|
|
3301
|
+
const originatorLoans = (options) => {
|
|
3302
|
+
return (options.client ?? client).post({
|
|
3303
|
+
security: [{
|
|
3304
|
+
name: "x-api-key",
|
|
3305
|
+
type: "apiKey"
|
|
3306
|
+
}, {
|
|
3307
|
+
scheme: "bearer",
|
|
3308
|
+
type: "http"
|
|
3309
|
+
}],
|
|
3310
|
+
url: "/v1/originators/{nmlsId}/loans",
|
|
3311
|
+
...options,
|
|
3312
|
+
headers: {
|
|
3313
|
+
"Content-Type": "application/json",
|
|
3314
|
+
...options?.headers
|
|
3315
|
+
}
|
|
3316
|
+
});
|
|
3317
|
+
};
|
|
3318
|
+
/**
|
|
3319
|
+
* Real-estate agents this LO co-closed with
|
|
3320
|
+
*/
|
|
3321
|
+
const originatorAgents = (options) => {
|
|
3322
|
+
return (options.client ?? client).post({
|
|
3323
|
+
security: [{
|
|
3324
|
+
name: "x-api-key",
|
|
3325
|
+
type: "apiKey"
|
|
3326
|
+
}, {
|
|
3327
|
+
scheme: "bearer",
|
|
3328
|
+
type: "http"
|
|
3329
|
+
}],
|
|
3330
|
+
url: "/v1/originators/{nmlsId}/breakdowns/agents",
|
|
3331
|
+
...options,
|
|
3332
|
+
headers: {
|
|
3333
|
+
"Content-Type": "application/json",
|
|
3334
|
+
...options?.headers
|
|
3335
|
+
}
|
|
3336
|
+
});
|
|
3337
|
+
};
|
|
3338
|
+
/**
|
|
3339
|
+
* Funding companies (employer history) for this LO
|
|
3340
|
+
*/
|
|
3341
|
+
const originatorCompanies = (options) => {
|
|
3342
|
+
return (options.client ?? client).post({
|
|
3343
|
+
security: [{
|
|
3344
|
+
name: "x-api-key",
|
|
3345
|
+
type: "apiKey"
|
|
3346
|
+
}, {
|
|
3347
|
+
scheme: "bearer",
|
|
3348
|
+
type: "http"
|
|
3349
|
+
}],
|
|
3350
|
+
url: "/v1/originators/{nmlsId}/breakdowns/companies",
|
|
3351
|
+
...options,
|
|
3352
|
+
headers: {
|
|
3353
|
+
"Content-Type": "application/json",
|
|
3354
|
+
...options?.headers
|
|
3355
|
+
}
|
|
3356
|
+
});
|
|
3357
|
+
};
|
|
3358
|
+
/**
|
|
3359
|
+
* Lenders this LO has originated through
|
|
3360
|
+
*/
|
|
3361
|
+
const originatorLenders = (options) => {
|
|
3362
|
+
return (options.client ?? client).post({
|
|
3363
|
+
security: [{
|
|
3364
|
+
name: "x-api-key",
|
|
3365
|
+
type: "apiKey"
|
|
3366
|
+
}, {
|
|
3367
|
+
scheme: "bearer",
|
|
3368
|
+
type: "http"
|
|
3369
|
+
}],
|
|
3370
|
+
url: "/v1/originators/{nmlsId}/breakdowns/lenders",
|
|
3371
|
+
...options,
|
|
3372
|
+
headers: {
|
|
3373
|
+
"Content-Type": "application/json",
|
|
3374
|
+
...options?.headers
|
|
3375
|
+
}
|
|
3376
|
+
});
|
|
3377
|
+
};
|
|
3378
|
+
/**
|
|
3379
|
+
* Zip-code volume breakdown
|
|
3380
|
+
*/
|
|
3381
|
+
const originatorZipCodes = (options) => {
|
|
3382
|
+
return (options.client ?? client).post({
|
|
3383
|
+
security: [{
|
|
3384
|
+
name: "x-api-key",
|
|
3385
|
+
type: "apiKey"
|
|
3386
|
+
}, {
|
|
3387
|
+
scheme: "bearer",
|
|
3388
|
+
type: "http"
|
|
3389
|
+
}],
|
|
3390
|
+
url: "/v1/originators/{nmlsId}/breakdowns/zip-codes",
|
|
3391
|
+
...options,
|
|
3392
|
+
headers: {
|
|
3393
|
+
"Content-Type": "application/json",
|
|
3394
|
+
...options?.headers
|
|
3395
|
+
}
|
|
3396
|
+
});
|
|
3397
|
+
};
|
|
3398
|
+
/**
|
|
3399
|
+
* Broker shops this LO originated loans through (name-resolved)
|
|
3400
|
+
*/
|
|
3401
|
+
const originatorBrokers = (options) => {
|
|
3402
|
+
return (options.client ?? client).post({
|
|
3403
|
+
security: [{
|
|
3404
|
+
name: "x-api-key",
|
|
3405
|
+
type: "apiKey"
|
|
3406
|
+
}, {
|
|
3407
|
+
scheme: "bearer",
|
|
3408
|
+
type: "http"
|
|
3409
|
+
}],
|
|
3410
|
+
url: "/v1/originators/{nmlsId}/breakdowns/brokers",
|
|
3411
|
+
...options,
|
|
3412
|
+
headers: {
|
|
3413
|
+
"Content-Type": "application/json",
|
|
3414
|
+
...options?.headers
|
|
3415
|
+
}
|
|
3416
|
+
});
|
|
3417
|
+
};
|
|
3418
|
+
/**
|
|
3419
|
+
* Branch (broker) history for this LO
|
|
3420
|
+
*/
|
|
3421
|
+
const originatorBranches = (options) => {
|
|
3422
|
+
return (options.client ?? client).post({
|
|
3423
|
+
security: [{
|
|
3424
|
+
name: "x-api-key",
|
|
3425
|
+
type: "apiKey"
|
|
3426
|
+
}, {
|
|
3427
|
+
scheme: "bearer",
|
|
3428
|
+
type: "http"
|
|
3429
|
+
}],
|
|
3430
|
+
url: "/v1/originators/{nmlsId}/breakdowns/branches",
|
|
3431
|
+
...options,
|
|
3432
|
+
headers: {
|
|
3433
|
+
"Content-Type": "application/json",
|
|
3434
|
+
...options?.headers
|
|
3435
|
+
}
|
|
3436
|
+
});
|
|
3437
|
+
};
|
|
3438
|
+
/**
|
|
3439
|
+
* City volume breakdown across this LO's loans
|
|
3440
|
+
*/
|
|
3441
|
+
const originatorCitiesBreakdown = (options) => {
|
|
3442
|
+
return (options.client ?? client).post({
|
|
3443
|
+
security: [{
|
|
3444
|
+
name: "x-api-key",
|
|
3445
|
+
type: "apiKey"
|
|
3446
|
+
}, {
|
|
3447
|
+
scheme: "bearer",
|
|
3448
|
+
type: "http"
|
|
3449
|
+
}],
|
|
3450
|
+
url: "/v1/originators/{nmlsId}/breakdowns/cities",
|
|
3451
|
+
...options,
|
|
3452
|
+
headers: {
|
|
3453
|
+
"Content-Type": "application/json",
|
|
3454
|
+
...options?.headers
|
|
3455
|
+
}
|
|
3456
|
+
});
|
|
3457
|
+
};
|
|
3458
|
+
/**
|
|
3459
|
+
* State volume breakdown across this LO's loans
|
|
3460
|
+
*/
|
|
3461
|
+
const originatorStatesBreakdown = (options) => {
|
|
3462
|
+
return (options.client ?? client).post({
|
|
3463
|
+
security: [{
|
|
3464
|
+
name: "x-api-key",
|
|
3465
|
+
type: "apiKey"
|
|
3466
|
+
}, {
|
|
3467
|
+
scheme: "bearer",
|
|
3468
|
+
type: "http"
|
|
3469
|
+
}],
|
|
3470
|
+
url: "/v1/originators/{nmlsId}/breakdowns/states",
|
|
3471
|
+
...options,
|
|
3472
|
+
headers: {
|
|
3473
|
+
"Content-Type": "application/json",
|
|
3474
|
+
...options?.headers
|
|
3475
|
+
}
|
|
3476
|
+
});
|
|
3477
|
+
};
|
|
3478
|
+
/**
|
|
3479
|
+
* County (FIPS) volume breakdown across this LO's loans
|
|
3480
|
+
*/
|
|
3481
|
+
const originatorCountiesBreakdown = (options) => {
|
|
3482
|
+
return (options.client ?? client).post({
|
|
3483
|
+
security: [{
|
|
3484
|
+
name: "x-api-key",
|
|
3485
|
+
type: "apiKey"
|
|
3486
|
+
}, {
|
|
3487
|
+
scheme: "bearer",
|
|
3488
|
+
type: "http"
|
|
3489
|
+
}],
|
|
3490
|
+
url: "/v1/originators/{nmlsId}/breakdowns/counties",
|
|
3491
|
+
...options,
|
|
3492
|
+
headers: {
|
|
3493
|
+
"Content-Type": "application/json",
|
|
3494
|
+
...options?.headers
|
|
3495
|
+
}
|
|
3496
|
+
});
|
|
3497
|
+
};
|
|
3498
|
+
/**
|
|
3499
|
+
* Real-estate offices this LO closed through (with sponsoring company)
|
|
3500
|
+
*/
|
|
3501
|
+
const originatorOffices = (options) => {
|
|
3502
|
+
return (options.client ?? client).post({
|
|
3503
|
+
security: [{
|
|
3504
|
+
name: "x-api-key",
|
|
3505
|
+
type: "apiKey"
|
|
3506
|
+
}, {
|
|
3507
|
+
scheme: "bearer",
|
|
3508
|
+
type: "http"
|
|
3509
|
+
}],
|
|
3510
|
+
url: "/v1/originators/{nmlsId}/breakdowns/offices",
|
|
3511
|
+
...options,
|
|
3512
|
+
headers: {
|
|
3513
|
+
"Content-Type": "application/json",
|
|
3514
|
+
...options?.headers
|
|
3515
|
+
}
|
|
3516
|
+
});
|
|
3517
|
+
};
|
|
3518
|
+
/**
|
|
3519
|
+
* Submit a bulk-delivery job for originators
|
|
3520
|
+
* Queues an ECS task that dumps every matching originators document (subject to the org's `bulk-delivery.originators` entitlement scope) to S3 in the requested format. Returns 202 with a jobId; poll `GET /originators/bulk-delivery/{jobId}` for status + the signed download URL.
|
|
3521
|
+
*/
|
|
3522
|
+
const submitOriginatorsBulkDelivery = (options) => {
|
|
3523
|
+
return (options?.client ?? client).post({
|
|
3524
|
+
security: [{
|
|
3525
|
+
name: "x-api-key",
|
|
3526
|
+
type: "apiKey"
|
|
3527
|
+
}, {
|
|
3528
|
+
scheme: "bearer",
|
|
3529
|
+
type: "http"
|
|
3530
|
+
}],
|
|
3531
|
+
url: "/v1/originators/bulk-delivery",
|
|
3532
|
+
...options,
|
|
3533
|
+
headers: {
|
|
3534
|
+
"Content-Type": "application/json",
|
|
3535
|
+
...options?.headers
|
|
3536
|
+
}
|
|
3537
|
+
});
|
|
3538
|
+
};
|
|
3539
|
+
/**
|
|
3540
|
+
* Get bulk-delivery job status for originators
|
|
3541
|
+
*/
|
|
3542
|
+
const getOriginatorsBulkDeliveryJob = (options) => {
|
|
3543
|
+
return (options.client ?? client).get({
|
|
3544
|
+
security: [{
|
|
3545
|
+
name: "x-api-key",
|
|
3546
|
+
type: "apiKey"
|
|
3547
|
+
}, {
|
|
3548
|
+
scheme: "bearer",
|
|
3549
|
+
type: "http"
|
|
3550
|
+
}],
|
|
3551
|
+
url: "/v1/originators/bulk-delivery/{jobId}",
|
|
3552
|
+
...options
|
|
3553
|
+
});
|
|
3554
|
+
};
|
|
3555
|
+
/**
|
|
3556
|
+
* List enriched properties for the current user
|
|
3557
|
+
*/
|
|
3558
|
+
const listEnrichments = (options) => {
|
|
3559
|
+
return (options?.client ?? client).get({
|
|
3560
|
+
security: [{
|
|
3561
|
+
name: "x-api-key",
|
|
3562
|
+
type: "apiKey"
|
|
3563
|
+
}, {
|
|
3564
|
+
scheme: "bearer",
|
|
3565
|
+
type: "http"
|
|
3566
|
+
}],
|
|
3567
|
+
url: "/v1/properties/enrichments",
|
|
3568
|
+
...options
|
|
3569
|
+
});
|
|
3570
|
+
};
|
|
3571
|
+
/**
|
|
3572
|
+
* Enrich a property with owner contact info
|
|
3573
|
+
* Looks up owner contact information via skip-trace. Uses the canonical address first; falls back to an associated loan or sale record address if the canonical is missing.
|
|
3574
|
+
*/
|
|
3575
|
+
const enrichProperty = (options) => {
|
|
3576
|
+
return (options.client ?? client).post({
|
|
3577
|
+
security: [{
|
|
3578
|
+
name: "x-api-key",
|
|
3579
|
+
type: "apiKey"
|
|
3580
|
+
}, {
|
|
3581
|
+
scheme: "bearer",
|
|
3582
|
+
type: "http"
|
|
3583
|
+
}],
|
|
3584
|
+
url: "/v1/properties/{id}/enrich",
|
|
3585
|
+
...options
|
|
3586
|
+
});
|
|
3587
|
+
};
|
|
3588
|
+
/**
|
|
3589
|
+
* Enrich several properties with owner contact info in one request
|
|
3590
|
+
* Looks up owner contact information for up to 50 properties in a single synchronous request. Each id is resolved independently and returned in the `results` array with its own status — a bad id never fails the batch. Each match debits one credit; cache hits and no-matches are free. For larger sets use the asynchronous bulk job.
|
|
3591
|
+
*/
|
|
3592
|
+
const enrichPropertiesBatch = (options) => {
|
|
3593
|
+
return (options?.client ?? client).post({
|
|
3594
|
+
security: [{
|
|
3595
|
+
name: "x-api-key",
|
|
3596
|
+
type: "apiKey"
|
|
3597
|
+
}, {
|
|
3598
|
+
scheme: "bearer",
|
|
3599
|
+
type: "http"
|
|
3600
|
+
}],
|
|
3601
|
+
url: "/v1/properties/enrich",
|
|
3602
|
+
...options,
|
|
3603
|
+
headers: {
|
|
3604
|
+
"Content-Type": "application/json",
|
|
3605
|
+
...options?.headers
|
|
3606
|
+
}
|
|
3607
|
+
});
|
|
3608
|
+
};
|
|
3609
|
+
/**
|
|
3610
|
+
* Submit a bulk skip-trace job
|
|
3611
|
+
* Queues an ECS task that enriches up to 50000 properties. Returns 202 with a jobId; poll `GET /enrich-bulk/{jobId}` or subscribe to the `enrichment.bulk.*` EventBridge / webhook events for completion.
|
|
3612
|
+
*/
|
|
3613
|
+
const enrichPropertiesBulk = (options) => {
|
|
3614
|
+
return (options?.client ?? client).post({
|
|
3615
|
+
security: [{
|
|
3616
|
+
name: "x-api-key",
|
|
3617
|
+
type: "apiKey"
|
|
3618
|
+
}, {
|
|
3619
|
+
scheme: "bearer",
|
|
3620
|
+
type: "http"
|
|
3621
|
+
}],
|
|
3622
|
+
url: "/v1/properties/enrich-bulk",
|
|
3623
|
+
...options,
|
|
3624
|
+
headers: {
|
|
3625
|
+
"Content-Type": "application/json",
|
|
3626
|
+
...options?.headers
|
|
3627
|
+
}
|
|
3628
|
+
});
|
|
3629
|
+
};
|
|
3630
|
+
/**
|
|
3631
|
+
* Get bulk enrichment job status
|
|
3632
|
+
*/
|
|
3633
|
+
const getEnrichBulkJob = (options) => {
|
|
3634
|
+
return (options.client ?? client).get({
|
|
3635
|
+
security: [{
|
|
3636
|
+
name: "x-api-key",
|
|
3637
|
+
type: "apiKey"
|
|
3638
|
+
}, {
|
|
3639
|
+
scheme: "bearer",
|
|
3640
|
+
type: "http"
|
|
3641
|
+
}],
|
|
3642
|
+
url: "/v1/properties/enrich-bulk/{jobId}",
|
|
3643
|
+
...options
|
|
3644
|
+
});
|
|
3645
|
+
};
|
|
3646
|
+
/**
|
|
3647
|
+
* Search properties with filters
|
|
3648
|
+
* Search and list individual properties/parcels with filters — one row per parcel. Filter by location (state, county, city, zip, address), owner name, property characteristics (beds, baths, square footage, year built, property type), value, and ownership or transaction history, with sorting and cursor pagination. This is the discrete per-property record search: use it to find specific properties or build a filtered property list. (For a single property by its ID use the property detail endpoint.)
|
|
3649
|
+
*/
|
|
3650
|
+
const listProperties = (options) => {
|
|
3651
|
+
return (options?.client ?? client).post({
|
|
3652
|
+
security: [{
|
|
3653
|
+
name: "x-api-key",
|
|
3654
|
+
type: "apiKey"
|
|
3655
|
+
}, {
|
|
3656
|
+
scheme: "bearer",
|
|
3657
|
+
type: "http"
|
|
3658
|
+
}],
|
|
3659
|
+
url: "/v1/properties",
|
|
3660
|
+
...options,
|
|
3661
|
+
headers: {
|
|
3662
|
+
"Content-Type": "application/json",
|
|
3663
|
+
...options?.headers
|
|
3664
|
+
}
|
|
3665
|
+
});
|
|
3666
|
+
};
|
|
3667
|
+
/**
|
|
3668
|
+
* Get property by ID (with mm_property_id fallback)
|
|
3669
|
+
*/
|
|
3670
|
+
const getProperty = (options) => {
|
|
3671
|
+
return (options.client ?? client).get({
|
|
3672
|
+
security: [{
|
|
3673
|
+
name: "x-api-key",
|
|
3674
|
+
type: "apiKey"
|
|
3675
|
+
}, {
|
|
3676
|
+
scheme: "bearer",
|
|
3677
|
+
type: "http"
|
|
3678
|
+
}],
|
|
3679
|
+
url: "/v1/properties/{id}",
|
|
3680
|
+
...options
|
|
3681
|
+
});
|
|
3682
|
+
};
|
|
3683
|
+
/**
|
|
3684
|
+
* Property count and average AVM
|
|
3685
|
+
*/
|
|
3686
|
+
const propertiesAnalyticsSummary = (options) => {
|
|
3687
|
+
return (options?.client ?? client).post({
|
|
3688
|
+
security: [{
|
|
3689
|
+
name: "x-api-key",
|
|
3690
|
+
type: "apiKey"
|
|
3691
|
+
}, {
|
|
3692
|
+
scheme: "bearer",
|
|
3693
|
+
type: "http"
|
|
3694
|
+
}],
|
|
3695
|
+
url: "/v1/properties/analytics/summary",
|
|
3696
|
+
...options,
|
|
3697
|
+
headers: {
|
|
3698
|
+
"Content-Type": "application/json",
|
|
3699
|
+
...options?.headers
|
|
3700
|
+
}
|
|
3701
|
+
});
|
|
3702
|
+
};
|
|
3703
|
+
/**
|
|
3704
|
+
* Configurable chart data (measure × slice)
|
|
3705
|
+
*/
|
|
3706
|
+
const propertiesAnalyticsChart = (options) => {
|
|
3707
|
+
return (options?.client ?? client).post({
|
|
3708
|
+
security: [{
|
|
3709
|
+
name: "x-api-key",
|
|
3710
|
+
type: "apiKey"
|
|
3711
|
+
}, {
|
|
3712
|
+
scheme: "bearer",
|
|
3713
|
+
type: "http"
|
|
3714
|
+
}],
|
|
3715
|
+
url: "/v1/properties/analytics/chart",
|
|
3716
|
+
...options,
|
|
3717
|
+
headers: {
|
|
3718
|
+
"Content-Type": "application/json",
|
|
3719
|
+
...options?.headers
|
|
3720
|
+
}
|
|
3721
|
+
});
|
|
3722
|
+
};
|
|
3723
|
+
/**
|
|
3724
|
+
* Submit a bulk-delivery job for properties
|
|
3725
|
+
* Queues an ECS task that dumps every matching properties document (subject to the org's `bulk-delivery.properties` entitlement scope) to S3 in the requested format. Returns 202 with a jobId; poll `GET /properties/bulk-delivery/{jobId}` for status + the signed download URL.
|
|
3726
|
+
*/
|
|
3727
|
+
const submitPropertiesBulkDelivery = (options) => {
|
|
3728
|
+
return (options?.client ?? client).post({
|
|
3729
|
+
security: [{
|
|
3730
|
+
name: "x-api-key",
|
|
3731
|
+
type: "apiKey"
|
|
3732
|
+
}, {
|
|
3733
|
+
scheme: "bearer",
|
|
3734
|
+
type: "http"
|
|
3735
|
+
}],
|
|
3736
|
+
url: "/v1/properties/bulk-delivery",
|
|
3737
|
+
...options,
|
|
3738
|
+
headers: {
|
|
3739
|
+
"Content-Type": "application/json",
|
|
3740
|
+
...options?.headers
|
|
3741
|
+
}
|
|
3742
|
+
});
|
|
3743
|
+
};
|
|
3744
|
+
/**
|
|
3745
|
+
* Get bulk-delivery job status for properties
|
|
3746
|
+
*/
|
|
3747
|
+
const getPropertiesBulkDeliveryJob = (options) => {
|
|
3748
|
+
return (options.client ?? client).get({
|
|
3749
|
+
security: [{
|
|
3750
|
+
name: "x-api-key",
|
|
3751
|
+
type: "apiKey"
|
|
3752
|
+
}, {
|
|
3753
|
+
scheme: "bearer",
|
|
3754
|
+
type: "http"
|
|
3755
|
+
}],
|
|
3756
|
+
url: "/v1/properties/bulk-delivery/{jobId}",
|
|
3757
|
+
...options
|
|
3758
|
+
});
|
|
3759
|
+
};
|
|
3760
|
+
/**
|
|
3761
|
+
* Get realtime connection config
|
|
3762
|
+
* Returns the realtime/notifications connection info (endpoint, authorizer, app, stage) merged with the caller's userId, so a trusted client can connect to its per-user IoT MQTT topic.
|
|
3763
|
+
*/
|
|
3764
|
+
const getRealtimeConfig = (options) => {
|
|
3765
|
+
return (options?.client ?? client).get({
|
|
3766
|
+
security: [{
|
|
3767
|
+
name: "x-api-key",
|
|
3768
|
+
type: "apiKey"
|
|
3769
|
+
}, {
|
|
3770
|
+
scheme: "bearer",
|
|
3771
|
+
type: "http"
|
|
3772
|
+
}],
|
|
3773
|
+
url: "/v1/realtime/config",
|
|
3774
|
+
...options
|
|
3775
|
+
});
|
|
3776
|
+
};
|
|
3777
|
+
/**
|
|
3778
|
+
* Search sales with filters
|
|
3779
|
+
* Search and list individual real-estate sale transactions and active listings with filters — one row per sale/listing. Filter by location (state, county, city, zip), sale price, sale or listing date, property characteristics (beds, baths, square footage, property type), and listing status, with sorting and cursor pagination. This is the discrete per-transaction sales-record search: use it to find specific sales or build a filtered list of sold/active listings.
|
|
3780
|
+
*/
|
|
3781
|
+
const listSales = (options) => {
|
|
3782
|
+
return (options?.client ?? client).post({
|
|
3783
|
+
security: [{
|
|
3784
|
+
name: "x-api-key",
|
|
3785
|
+
type: "apiKey"
|
|
3786
|
+
}, {
|
|
3787
|
+
scheme: "bearer",
|
|
3788
|
+
type: "http"
|
|
3789
|
+
}],
|
|
3790
|
+
url: "/v1/sales",
|
|
3791
|
+
...options,
|
|
3792
|
+
headers: {
|
|
3793
|
+
"Content-Type": "application/json",
|
|
3794
|
+
...options?.headers
|
|
3795
|
+
}
|
|
3796
|
+
});
|
|
3797
|
+
};
|
|
3798
|
+
/**
|
|
3799
|
+
* Get sale by ID
|
|
3800
|
+
*/
|
|
3801
|
+
const getSale = (options) => {
|
|
3802
|
+
return (options.client ?? client).get({
|
|
3803
|
+
security: [{
|
|
3804
|
+
name: "x-api-key",
|
|
3805
|
+
type: "apiKey"
|
|
3806
|
+
}, {
|
|
3807
|
+
scheme: "bearer",
|
|
3808
|
+
type: "http"
|
|
3809
|
+
}],
|
|
3810
|
+
url: "/v1/sales/{id}",
|
|
3811
|
+
...options
|
|
3812
|
+
});
|
|
3813
|
+
};
|
|
3814
|
+
/**
|
|
3815
|
+
* Market summary with buyer/seller/dual split + previous period
|
|
3816
|
+
*/
|
|
3817
|
+
const salesAnalyticsSummary = (options) => {
|
|
3818
|
+
return (options?.client ?? client).post({
|
|
3819
|
+
security: [{
|
|
3820
|
+
name: "x-api-key",
|
|
3821
|
+
type: "apiKey"
|
|
3822
|
+
}, {
|
|
3823
|
+
scheme: "bearer",
|
|
3824
|
+
type: "http"
|
|
3825
|
+
}],
|
|
3826
|
+
url: "/v1/sales/analytics/summary",
|
|
3827
|
+
...options,
|
|
3828
|
+
headers: {
|
|
3829
|
+
"Content-Type": "application/json",
|
|
3830
|
+
...options?.headers
|
|
3831
|
+
}
|
|
3832
|
+
});
|
|
3833
|
+
};
|
|
3834
|
+
/**
|
|
3835
|
+
* Volume/units over time with buyer/seller/dual split
|
|
3836
|
+
*/
|
|
3837
|
+
const salesAnalyticsTimeSeries = (options) => {
|
|
3838
|
+
return (options?.client ?? client).post({
|
|
3839
|
+
security: [{
|
|
3840
|
+
name: "x-api-key",
|
|
3841
|
+
type: "apiKey"
|
|
3842
|
+
}, {
|
|
3843
|
+
scheme: "bearer",
|
|
3844
|
+
type: "http"
|
|
3845
|
+
}],
|
|
3846
|
+
url: "/v1/sales/analytics/time-series",
|
|
3847
|
+
...options,
|
|
3848
|
+
headers: {
|
|
3849
|
+
"Content-Type": "application/json",
|
|
3850
|
+
...options?.headers
|
|
3851
|
+
}
|
|
3852
|
+
});
|
|
3853
|
+
};
|
|
3854
|
+
/**
|
|
3855
|
+
* Configurable chart (measure × slice) over the market
|
|
3856
|
+
*/
|
|
3857
|
+
const salesAnalyticsChart = (options) => {
|
|
3858
|
+
return (options?.client ?? client).post({
|
|
3859
|
+
security: [{
|
|
3860
|
+
name: "x-api-key",
|
|
3861
|
+
type: "apiKey"
|
|
3862
|
+
}, {
|
|
3863
|
+
scheme: "bearer",
|
|
3864
|
+
type: "http"
|
|
3865
|
+
}],
|
|
3866
|
+
url: "/v1/sales/analytics/chart",
|
|
3867
|
+
...options,
|
|
3868
|
+
headers: {
|
|
3869
|
+
"Content-Type": "application/json",
|
|
3870
|
+
...options?.headers
|
|
3871
|
+
}
|
|
3872
|
+
});
|
|
3873
|
+
};
|
|
3874
|
+
/**
|
|
3875
|
+
* Search agents with filters
|
|
3876
|
+
* Search and list individual real-estate agents with filters — one row per agent. Filter by name, location (state, city, zip), brokerage/office, and production metrics (sales volume, transaction units, price range), with sorting and cursor pagination. LOCATION SEMANTICS: the state/city/zip filters match ANY of an agent's location signals — their listed city/state, their office address(es), AND the markets where they actually closed transactions (production) — combined with OR. So an agent matches a searched location if their office OR their production is there. A search for city "Long Beach" can therefore return agents whose office or displayed primary market is in a different city/state, because they transacted in Long Beach. The `state`/`city` returned on each row reflect the agent's primary market and may differ from the searched location. (Use the `office` filter to match by brokerage/office name, and the per-agent city/county/state breakdown endpoints to rank an agent's volume within a specific market.) This is the per-agent record search: use it to find specific real-estate agents or build a filtered agent list. (For a single agent by ID use the agent detail endpoint.)
|
|
3877
|
+
*/
|
|
3878
|
+
const listAgents2 = (options) => {
|
|
3879
|
+
return (options?.client ?? client).post({
|
|
3880
|
+
security: [{
|
|
3881
|
+
name: "x-api-key",
|
|
3882
|
+
type: "apiKey"
|
|
3883
|
+
}, {
|
|
3884
|
+
scheme: "bearer",
|
|
3885
|
+
type: "http"
|
|
3886
|
+
}],
|
|
3887
|
+
url: "/agents",
|
|
3888
|
+
...options,
|
|
3889
|
+
headers: {
|
|
3890
|
+
"Content-Type": "application/json",
|
|
3891
|
+
...options?.headers
|
|
3892
|
+
}
|
|
3893
|
+
});
|
|
3894
|
+
};
|
|
3895
|
+
/**
|
|
3896
|
+
* Get agent by ID
|
|
3897
|
+
*/
|
|
3898
|
+
const getAgent2 = (options) => {
|
|
3899
|
+
return (options.client ?? client).get({
|
|
3900
|
+
security: [{
|
|
3901
|
+
name: "x-api-key",
|
|
3902
|
+
type: "apiKey"
|
|
3903
|
+
}, {
|
|
3904
|
+
scheme: "bearer",
|
|
3905
|
+
type: "http"
|
|
3906
|
+
}],
|
|
3907
|
+
url: "/agents/{id}",
|
|
3908
|
+
...options
|
|
3909
|
+
});
|
|
3910
|
+
};
|
|
3911
|
+
/**
|
|
3912
|
+
* Production summary with buyer/seller/dual split + previous period
|
|
3913
|
+
*/
|
|
3914
|
+
const agentAnalyticsSummary2 = (options) => {
|
|
3915
|
+
return (options?.client ?? client).post({
|
|
3916
|
+
security: [{
|
|
3917
|
+
name: "x-api-key",
|
|
3918
|
+
type: "apiKey"
|
|
3919
|
+
}, {
|
|
3920
|
+
scheme: "bearer",
|
|
3921
|
+
type: "http"
|
|
3922
|
+
}],
|
|
3923
|
+
url: "/agents/analytics/summary",
|
|
3924
|
+
...options,
|
|
3925
|
+
headers: {
|
|
3926
|
+
"Content-Type": "application/json",
|
|
3927
|
+
...options?.headers
|
|
3928
|
+
}
|
|
3929
|
+
});
|
|
3930
|
+
};
|
|
3931
|
+
/**
|
|
3932
|
+
* Agent volume/units over time with buyer/seller/dual split
|
|
1437
3933
|
*/
|
|
1438
|
-
const
|
|
3934
|
+
const agentAnalyticsTimeSeries2 = (options) => {
|
|
3935
|
+
return (options?.client ?? client).post({
|
|
3936
|
+
security: [{
|
|
3937
|
+
name: "x-api-key",
|
|
3938
|
+
type: "apiKey"
|
|
3939
|
+
}, {
|
|
3940
|
+
scheme: "bearer",
|
|
3941
|
+
type: "http"
|
|
3942
|
+
}],
|
|
3943
|
+
url: "/agents/analytics/time-series",
|
|
3944
|
+
...options,
|
|
3945
|
+
headers: {
|
|
3946
|
+
"Content-Type": "application/json",
|
|
3947
|
+
...options?.headers
|
|
3948
|
+
}
|
|
3949
|
+
});
|
|
3950
|
+
};
|
|
3951
|
+
/**
|
|
3952
|
+
* Configurable chart (measure × slice) over the agent's sales
|
|
3953
|
+
*/
|
|
3954
|
+
const agentAnalyticsChart2 = (options) => {
|
|
3955
|
+
return (options?.client ?? client).post({
|
|
3956
|
+
security: [{
|
|
3957
|
+
name: "x-api-key",
|
|
3958
|
+
type: "apiKey"
|
|
3959
|
+
}, {
|
|
3960
|
+
scheme: "bearer",
|
|
3961
|
+
type: "http"
|
|
3962
|
+
}],
|
|
3963
|
+
url: "/agents/analytics/chart",
|
|
3964
|
+
...options,
|
|
3965
|
+
headers: {
|
|
3966
|
+
"Content-Type": "application/json",
|
|
3967
|
+
...options?.headers
|
|
3968
|
+
}
|
|
3969
|
+
});
|
|
3970
|
+
};
|
|
3971
|
+
/**
|
|
3972
|
+
* Sales transactions where this agent was listing or selling side
|
|
3973
|
+
*/
|
|
3974
|
+
const agentSales2 = (options) => {
|
|
1439
3975
|
return (options.client ?? client).post({
|
|
1440
3976
|
security: [{
|
|
1441
3977
|
name: "x-api-key",
|
|
@@ -1444,7 +3980,7 @@ const originatorLoans = (options) => {
|
|
|
1444
3980
|
scheme: "bearer",
|
|
1445
3981
|
type: "http"
|
|
1446
3982
|
}],
|
|
1447
|
-
url: "/
|
|
3983
|
+
url: "/agents/{id}/sales",
|
|
1448
3984
|
...options,
|
|
1449
3985
|
headers: {
|
|
1450
3986
|
"Content-Type": "application/json",
|
|
@@ -1453,9 +3989,9 @@ const originatorLoans = (options) => {
|
|
|
1453
3989
|
});
|
|
1454
3990
|
};
|
|
1455
3991
|
/**
|
|
1456
|
-
*
|
|
3992
|
+
* Properties this agent has transacted on
|
|
1457
3993
|
*/
|
|
1458
|
-
const
|
|
3994
|
+
const agentProperties2 = (options) => {
|
|
1459
3995
|
return (options.client ?? client).post({
|
|
1460
3996
|
security: [{
|
|
1461
3997
|
name: "x-api-key",
|
|
@@ -1464,7 +4000,7 @@ const originatorAgents = (options) => {
|
|
|
1464
4000
|
scheme: "bearer",
|
|
1465
4001
|
type: "http"
|
|
1466
4002
|
}],
|
|
1467
|
-
url: "/
|
|
4003
|
+
url: "/agents/{id}/properties",
|
|
1468
4004
|
...options,
|
|
1469
4005
|
headers: {
|
|
1470
4006
|
"Content-Type": "application/json",
|
|
@@ -1473,9 +4009,9 @@ const originatorAgents = (options) => {
|
|
|
1473
4009
|
});
|
|
1474
4010
|
};
|
|
1475
4011
|
/**
|
|
1476
|
-
*
|
|
4012
|
+
* Listing offices the agent has closed through
|
|
1477
4013
|
*/
|
|
1478
|
-
const
|
|
4014
|
+
const agentOffices2 = (options) => {
|
|
1479
4015
|
return (options.client ?? client).post({
|
|
1480
4016
|
security: [{
|
|
1481
4017
|
name: "x-api-key",
|
|
@@ -1484,7 +4020,7 @@ const originatorCompanies = (options) => {
|
|
|
1484
4020
|
scheme: "bearer",
|
|
1485
4021
|
type: "http"
|
|
1486
4022
|
}],
|
|
1487
|
-
url: "/
|
|
4023
|
+
url: "/agents/{id}/breakdowns/offices",
|
|
1488
4024
|
...options,
|
|
1489
4025
|
headers: {
|
|
1490
4026
|
"Content-Type": "application/json",
|
|
@@ -1493,9 +4029,9 @@ const originatorCompanies = (options) => {
|
|
|
1493
4029
|
});
|
|
1494
4030
|
};
|
|
1495
4031
|
/**
|
|
1496
|
-
*
|
|
4032
|
+
* City volume breakdown across the agent's sales
|
|
1497
4033
|
*/
|
|
1498
|
-
const
|
|
4034
|
+
const agentCities2 = (options) => {
|
|
1499
4035
|
return (options.client ?? client).post({
|
|
1500
4036
|
security: [{
|
|
1501
4037
|
name: "x-api-key",
|
|
@@ -1504,7 +4040,7 @@ const originatorLenders = (options) => {
|
|
|
1504
4040
|
scheme: "bearer",
|
|
1505
4041
|
type: "http"
|
|
1506
4042
|
}],
|
|
1507
|
-
url: "/
|
|
4043
|
+
url: "/agents/{id}/breakdowns/cities",
|
|
1508
4044
|
...options,
|
|
1509
4045
|
headers: {
|
|
1510
4046
|
"Content-Type": "application/json",
|
|
@@ -1513,9 +4049,9 @@ const originatorLenders = (options) => {
|
|
|
1513
4049
|
});
|
|
1514
4050
|
};
|
|
1515
4051
|
/**
|
|
1516
|
-
*
|
|
4052
|
+
* County (FIPS) volume breakdown
|
|
1517
4053
|
*/
|
|
1518
|
-
const
|
|
4054
|
+
const agentCounties2 = (options) => {
|
|
1519
4055
|
return (options.client ?? client).post({
|
|
1520
4056
|
security: [{
|
|
1521
4057
|
name: "x-api-key",
|
|
@@ -1524,7 +4060,7 @@ const originatorZipCodes = (options) => {
|
|
|
1524
4060
|
scheme: "bearer",
|
|
1525
4061
|
type: "http"
|
|
1526
4062
|
}],
|
|
1527
|
-
url: "/
|
|
4063
|
+
url: "/agents/{id}/breakdowns/counties",
|
|
1528
4064
|
...options,
|
|
1529
4065
|
headers: {
|
|
1530
4066
|
"Content-Type": "application/json",
|
|
@@ -1533,9 +4069,9 @@ const originatorZipCodes = (options) => {
|
|
|
1533
4069
|
});
|
|
1534
4070
|
};
|
|
1535
4071
|
/**
|
|
1536
|
-
*
|
|
4072
|
+
* State volume breakdown
|
|
1537
4073
|
*/
|
|
1538
|
-
const
|
|
4074
|
+
const agentStates2 = (options) => {
|
|
1539
4075
|
return (options.client ?? client).post({
|
|
1540
4076
|
security: [{
|
|
1541
4077
|
name: "x-api-key",
|
|
@@ -1544,7 +4080,7 @@ const originatorBranches = (options) => {
|
|
|
1544
4080
|
scheme: "bearer",
|
|
1545
4081
|
type: "http"
|
|
1546
4082
|
}],
|
|
1547
|
-
url: "/
|
|
4083
|
+
url: "/agents/{id}/breakdowns/states",
|
|
1548
4084
|
...options,
|
|
1549
4085
|
headers: {
|
|
1550
4086
|
"Content-Type": "application/json",
|
|
@@ -1553,9 +4089,9 @@ const originatorBranches = (options) => {
|
|
|
1553
4089
|
});
|
|
1554
4090
|
};
|
|
1555
4091
|
/**
|
|
1556
|
-
*
|
|
4092
|
+
* Zip-code volume breakdown
|
|
1557
4093
|
*/
|
|
1558
|
-
const
|
|
4094
|
+
const agentZipCodes2 = (options) => {
|
|
1559
4095
|
return (options.client ?? client).post({
|
|
1560
4096
|
security: [{
|
|
1561
4097
|
name: "x-api-key",
|
|
@@ -1564,7 +4100,7 @@ const originatorOffices = (options) => {
|
|
|
1564
4100
|
scheme: "bearer",
|
|
1565
4101
|
type: "http"
|
|
1566
4102
|
}],
|
|
1567
|
-
url: "/
|
|
4103
|
+
url: "/agents/{id}/breakdowns/zip-codes",
|
|
1568
4104
|
...options,
|
|
1569
4105
|
headers: {
|
|
1570
4106
|
"Content-Type": "application/json",
|
|
@@ -1573,9 +4109,9 @@ const originatorOffices = (options) => {
|
|
|
1573
4109
|
});
|
|
1574
4110
|
};
|
|
1575
4111
|
/**
|
|
1576
|
-
*
|
|
4112
|
+
* Loan officers the agent worked with (pre-aggregated)
|
|
1577
4113
|
*/
|
|
1578
|
-
const
|
|
4114
|
+
const agentOriginators2 = (options) => {
|
|
1579
4115
|
return (options.client ?? client).post({
|
|
1580
4116
|
security: [{
|
|
1581
4117
|
name: "x-api-key",
|
|
@@ -1584,7 +4120,7 @@ const originatorCitiesBreakdown = (options) => {
|
|
|
1584
4120
|
scheme: "bearer",
|
|
1585
4121
|
type: "http"
|
|
1586
4122
|
}],
|
|
1587
|
-
url: "/
|
|
4123
|
+
url: "/agents/{id}/breakdowns/originators",
|
|
1588
4124
|
...options,
|
|
1589
4125
|
headers: {
|
|
1590
4126
|
"Content-Type": "application/json",
|
|
@@ -1593,9 +4129,9 @@ const originatorCitiesBreakdown = (options) => {
|
|
|
1593
4129
|
});
|
|
1594
4130
|
};
|
|
1595
4131
|
/**
|
|
1596
|
-
*
|
|
4132
|
+
* Mortgage companies the agent dealt with (pre-aggregated)
|
|
1597
4133
|
*/
|
|
1598
|
-
const
|
|
4134
|
+
const agentCompanies2 = (options) => {
|
|
1599
4135
|
return (options.client ?? client).post({
|
|
1600
4136
|
security: [{
|
|
1601
4137
|
name: "x-api-key",
|
|
@@ -1604,7 +4140,7 @@ const originatorCountiesBreakdown = (options) => {
|
|
|
1604
4140
|
scheme: "bearer",
|
|
1605
4141
|
type: "http"
|
|
1606
4142
|
}],
|
|
1607
|
-
url: "/
|
|
4143
|
+
url: "/agents/{id}/breakdowns/companies",
|
|
1608
4144
|
...options,
|
|
1609
4145
|
headers: {
|
|
1610
4146
|
"Content-Type": "application/json",
|
|
@@ -1613,9 +4149,9 @@ const originatorCountiesBreakdown = (options) => {
|
|
|
1613
4149
|
});
|
|
1614
4150
|
};
|
|
1615
4151
|
/**
|
|
1616
|
-
*
|
|
4152
|
+
* Raw-name lenders encountered (pre-aggregated)
|
|
1617
4153
|
*/
|
|
1618
|
-
const
|
|
4154
|
+
const agentLenders2 = (options) => {
|
|
1619
4155
|
return (options.client ?? client).post({
|
|
1620
4156
|
security: [{
|
|
1621
4157
|
name: "x-api-key",
|
|
@@ -1624,7 +4160,7 @@ const originatorStatesBreakdown = (options) => {
|
|
|
1624
4160
|
scheme: "bearer",
|
|
1625
4161
|
type: "http"
|
|
1626
4162
|
}],
|
|
1627
|
-
url: "/
|
|
4163
|
+
url: "/agents/{id}/breakdowns/lenders",
|
|
1628
4164
|
...options,
|
|
1629
4165
|
headers: {
|
|
1630
4166
|
"Content-Type": "application/json",
|
|
@@ -1633,10 +4169,10 @@ const originatorStatesBreakdown = (options) => {
|
|
|
1633
4169
|
});
|
|
1634
4170
|
};
|
|
1635
4171
|
/**
|
|
1636
|
-
* Submit a bulk-delivery job for
|
|
1637
|
-
* Queues an ECS task that dumps every matching
|
|
4172
|
+
* Submit a bulk-delivery job for agents
|
|
4173
|
+
* Queues an ECS task that dumps every matching agents document (subject to the org's `bulk-delivery.agents` entitlement scope) to S3 in the requested format. Returns 202 with a jobId; poll `GET /agents/bulk-delivery/{jobId}` for status + the signed download URL.
|
|
1638
4174
|
*/
|
|
1639
|
-
const
|
|
4175
|
+
const submitAgentsBulkDelivery2 = (options) => {
|
|
1640
4176
|
return (options?.client ?? client).post({
|
|
1641
4177
|
security: [{
|
|
1642
4178
|
name: "x-api-key",
|
|
@@ -1645,7 +4181,7 @@ const submitOriginatorsBulkDelivery = (options) => {
|
|
|
1645
4181
|
scheme: "bearer",
|
|
1646
4182
|
type: "http"
|
|
1647
4183
|
}],
|
|
1648
|
-
url: "/
|
|
4184
|
+
url: "/agents/bulk-delivery",
|
|
1649
4185
|
...options,
|
|
1650
4186
|
headers: {
|
|
1651
4187
|
"Content-Type": "application/json",
|
|
@@ -1654,9 +4190,9 @@ const submitOriginatorsBulkDelivery = (options) => {
|
|
|
1654
4190
|
});
|
|
1655
4191
|
};
|
|
1656
4192
|
/**
|
|
1657
|
-
* Get bulk-delivery job status for
|
|
4193
|
+
* Get bulk-delivery job status for agents
|
|
1658
4194
|
*/
|
|
1659
|
-
const
|
|
4195
|
+
const getAgentsBulkDeliveryJob2 = (options) => {
|
|
1660
4196
|
return (options.client ?? client).get({
|
|
1661
4197
|
security: [{
|
|
1662
4198
|
name: "x-api-key",
|
|
@@ -1665,15 +4201,16 @@ const getOriginatorsBulkDeliveryJob = (options) => {
|
|
|
1665
4201
|
scheme: "bearer",
|
|
1666
4202
|
type: "http"
|
|
1667
4203
|
}],
|
|
1668
|
-
url: "/
|
|
4204
|
+
url: "/agents/bulk-delivery/{jobId}",
|
|
1669
4205
|
...options
|
|
1670
4206
|
});
|
|
1671
4207
|
};
|
|
1672
4208
|
/**
|
|
1673
|
-
*
|
|
4209
|
+
* Search originators with filters
|
|
4210
|
+
* Search and list individual loan originators (LOs — NMLS-registered mortgage loan officers) with filters — one row per originator. Filter by name, NMLS ID, location (state, city), employer/company, and production metrics (loan volume, units, product mix), with sorting and cursor pagination. LOCATION SEMANTICS: the state/city filters match an originator's PRODUCTION GEOGRAPHY — the markets where they actually originated loans in the selected period — not where their office or employer sits. An LO who lends across several markets matches a filter for ANY of those markets, while the `state`/`city` returned on each row reflect only their PRIMARY (highest-volume) market. So a search for city "Long Beach" can return an LO whose displayed location is a different city/state (e.g. their top market is in Arizona) — they still originated loans in Long Beach, it just isn't their #1 market. To rank originators by their volume within a specific market, sort by volume after filtering, or use the per-originator city/county/state breakdown endpoints. This is the per-originator record search: use it to find specific loan officers or build a filtered LO list. (For a single originator by NMLS ID use the originator detail endpoint.)
|
|
1674
4211
|
*/
|
|
1675
|
-
const
|
|
1676
|
-
return (options?.client ?? client).
|
|
4212
|
+
const listOriginators2 = (options) => {
|
|
4213
|
+
return (options?.client ?? client).post({
|
|
1677
4214
|
security: [{
|
|
1678
4215
|
name: "x-api-key",
|
|
1679
4216
|
type: "apiKey"
|
|
@@ -1681,16 +4218,19 @@ const listEnrichments = (options) => {
|
|
|
1681
4218
|
scheme: "bearer",
|
|
1682
4219
|
type: "http"
|
|
1683
4220
|
}],
|
|
1684
|
-
url: "/
|
|
1685
|
-
...options
|
|
4221
|
+
url: "/originators",
|
|
4222
|
+
...options,
|
|
4223
|
+
headers: {
|
|
4224
|
+
"Content-Type": "application/json",
|
|
4225
|
+
...options?.headers
|
|
4226
|
+
}
|
|
1686
4227
|
});
|
|
1687
4228
|
};
|
|
1688
4229
|
/**
|
|
1689
|
-
*
|
|
1690
|
-
* Looks up owner contact information via skip-trace. Uses the canonical address first; falls back to an associated loan or sale record address if the canonical is missing.
|
|
4230
|
+
* Get originator by NMLS ID
|
|
1691
4231
|
*/
|
|
1692
|
-
const
|
|
1693
|
-
return (options.client ?? client).
|
|
4232
|
+
const getOriginator2 = (options) => {
|
|
4233
|
+
return (options.client ?? client).get({
|
|
1694
4234
|
security: [{
|
|
1695
4235
|
name: "x-api-key",
|
|
1696
4236
|
type: "apiKey"
|
|
@@ -1698,15 +4238,14 @@ const enrichProperty = (options) => {
|
|
|
1698
4238
|
scheme: "bearer",
|
|
1699
4239
|
type: "http"
|
|
1700
4240
|
}],
|
|
1701
|
-
url: "/
|
|
4241
|
+
url: "/originators/{nmlsId}",
|
|
1702
4242
|
...options
|
|
1703
4243
|
});
|
|
1704
4244
|
};
|
|
1705
4245
|
/**
|
|
1706
|
-
*
|
|
1707
|
-
* Queues an ECS task that enriches up to 50000 properties. Returns 202 with a jobId; poll `GET /enrich-bulk/{jobId}` or subscribe to the `enrichment.bulk.*` EventBridge / webhook events for completion.
|
|
4246
|
+
* Production summary with previous-period comparison
|
|
1708
4247
|
*/
|
|
1709
|
-
const
|
|
4248
|
+
const originatorAnalyticsSummary2 = (options) => {
|
|
1710
4249
|
return (options?.client ?? client).post({
|
|
1711
4250
|
security: [{
|
|
1712
4251
|
name: "x-api-key",
|
|
@@ -1715,7 +4254,7 @@ const enrichPropertiesBulk = (options) => {
|
|
|
1715
4254
|
scheme: "bearer",
|
|
1716
4255
|
type: "http"
|
|
1717
4256
|
}],
|
|
1718
|
-
url: "/
|
|
4257
|
+
url: "/originators/analytics/summary",
|
|
1719
4258
|
...options,
|
|
1720
4259
|
headers: {
|
|
1721
4260
|
"Content-Type": "application/json",
|
|
@@ -1724,10 +4263,10 @@ const enrichPropertiesBulk = (options) => {
|
|
|
1724
4263
|
});
|
|
1725
4264
|
};
|
|
1726
4265
|
/**
|
|
1727
|
-
*
|
|
4266
|
+
* Originator volume / units over time
|
|
1728
4267
|
*/
|
|
1729
|
-
const
|
|
1730
|
-
return (options
|
|
4268
|
+
const originatorAnalyticsTimeSeries2 = (options) => {
|
|
4269
|
+
return (options?.client ?? client).post({
|
|
1731
4270
|
security: [{
|
|
1732
4271
|
name: "x-api-key",
|
|
1733
4272
|
type: "apiKey"
|
|
@@ -1735,14 +4274,18 @@ const getEnrichBulkJob = (options) => {
|
|
|
1735
4274
|
scheme: "bearer",
|
|
1736
4275
|
type: "http"
|
|
1737
4276
|
}],
|
|
1738
|
-
url: "/
|
|
1739
|
-
...options
|
|
4277
|
+
url: "/originators/analytics/time-series",
|
|
4278
|
+
...options,
|
|
4279
|
+
headers: {
|
|
4280
|
+
"Content-Type": "application/json",
|
|
4281
|
+
...options?.headers
|
|
4282
|
+
}
|
|
1740
4283
|
});
|
|
1741
4284
|
};
|
|
1742
4285
|
/**
|
|
1743
|
-
*
|
|
4286
|
+
* Configurable chart (measure × slice) over one LO's loans
|
|
1744
4287
|
*/
|
|
1745
|
-
const
|
|
4288
|
+
const originatorAnalyticsChart2 = (options) => {
|
|
1746
4289
|
return (options?.client ?? client).post({
|
|
1747
4290
|
security: [{
|
|
1748
4291
|
name: "x-api-key",
|
|
@@ -1751,7 +4294,7 @@ const listProperties = (options) => {
|
|
|
1751
4294
|
scheme: "bearer",
|
|
1752
4295
|
type: "http"
|
|
1753
4296
|
}],
|
|
1754
|
-
url: "/
|
|
4297
|
+
url: "/originators/analytics/chart",
|
|
1755
4298
|
...options,
|
|
1756
4299
|
headers: {
|
|
1757
4300
|
"Content-Type": "application/json",
|
|
@@ -1760,10 +4303,10 @@ const listProperties = (options) => {
|
|
|
1760
4303
|
});
|
|
1761
4304
|
};
|
|
1762
4305
|
/**
|
|
1763
|
-
*
|
|
4306
|
+
* Loans originated by this LO
|
|
1764
4307
|
*/
|
|
1765
|
-
const
|
|
1766
|
-
return (options.client ?? client).
|
|
4308
|
+
const originatorLoans2 = (options) => {
|
|
4309
|
+
return (options.client ?? client).post({
|
|
1767
4310
|
security: [{
|
|
1768
4311
|
name: "x-api-key",
|
|
1769
4312
|
type: "apiKey"
|
|
@@ -1771,15 +4314,19 @@ const getProperty = (options) => {
|
|
|
1771
4314
|
scheme: "bearer",
|
|
1772
4315
|
type: "http"
|
|
1773
4316
|
}],
|
|
1774
|
-
url: "/
|
|
1775
|
-
...options
|
|
4317
|
+
url: "/originators/{nmlsId}/loans",
|
|
4318
|
+
...options,
|
|
4319
|
+
headers: {
|
|
4320
|
+
"Content-Type": "application/json",
|
|
4321
|
+
...options?.headers
|
|
4322
|
+
}
|
|
1776
4323
|
});
|
|
1777
4324
|
};
|
|
1778
4325
|
/**
|
|
1779
|
-
*
|
|
4326
|
+
* Real-estate agents this LO co-closed with
|
|
1780
4327
|
*/
|
|
1781
|
-
const
|
|
1782
|
-
return (options
|
|
4328
|
+
const originatorAgents2 = (options) => {
|
|
4329
|
+
return (options.client ?? client).post({
|
|
1783
4330
|
security: [{
|
|
1784
4331
|
name: "x-api-key",
|
|
1785
4332
|
type: "apiKey"
|
|
@@ -1787,7 +4334,7 @@ const propertiesAnalyticsSummary = (options) => {
|
|
|
1787
4334
|
scheme: "bearer",
|
|
1788
4335
|
type: "http"
|
|
1789
4336
|
}],
|
|
1790
|
-
url: "/
|
|
4337
|
+
url: "/originators/{nmlsId}/breakdowns/agents",
|
|
1791
4338
|
...options,
|
|
1792
4339
|
headers: {
|
|
1793
4340
|
"Content-Type": "application/json",
|
|
@@ -1796,10 +4343,10 @@ const propertiesAnalyticsSummary = (options) => {
|
|
|
1796
4343
|
});
|
|
1797
4344
|
};
|
|
1798
4345
|
/**
|
|
1799
|
-
*
|
|
4346
|
+
* Funding companies (employer history) for this LO
|
|
1800
4347
|
*/
|
|
1801
|
-
const
|
|
1802
|
-
return (options
|
|
4348
|
+
const originatorCompanies2 = (options) => {
|
|
4349
|
+
return (options.client ?? client).post({
|
|
1803
4350
|
security: [{
|
|
1804
4351
|
name: "x-api-key",
|
|
1805
4352
|
type: "apiKey"
|
|
@@ -1807,7 +4354,7 @@ const propertiesAnalyticsChart = (options) => {
|
|
|
1807
4354
|
scheme: "bearer",
|
|
1808
4355
|
type: "http"
|
|
1809
4356
|
}],
|
|
1810
|
-
url: "/
|
|
4357
|
+
url: "/originators/{nmlsId}/breakdowns/companies",
|
|
1811
4358
|
...options,
|
|
1812
4359
|
headers: {
|
|
1813
4360
|
"Content-Type": "application/json",
|
|
@@ -1816,11 +4363,10 @@ const propertiesAnalyticsChart = (options) => {
|
|
|
1816
4363
|
});
|
|
1817
4364
|
};
|
|
1818
4365
|
/**
|
|
1819
|
-
*
|
|
1820
|
-
* Queues an ECS task that dumps every matching properties document (subject to the org's `bulk-delivery.properties` entitlement scope) to S3 in the requested format. Returns 202 with a jobId; poll `GET /properties/bulk-delivery/{jobId}` for status + the signed download URL.
|
|
4366
|
+
* Lenders this LO has originated through
|
|
1821
4367
|
*/
|
|
1822
|
-
const
|
|
1823
|
-
return (options
|
|
4368
|
+
const originatorLenders2 = (options) => {
|
|
4369
|
+
return (options.client ?? client).post({
|
|
1824
4370
|
security: [{
|
|
1825
4371
|
name: "x-api-key",
|
|
1826
4372
|
type: "apiKey"
|
|
@@ -1828,7 +4374,7 @@ const submitPropertiesBulkDelivery = (options) => {
|
|
|
1828
4374
|
scheme: "bearer",
|
|
1829
4375
|
type: "http"
|
|
1830
4376
|
}],
|
|
1831
|
-
url: "/
|
|
4377
|
+
url: "/originators/{nmlsId}/breakdowns/lenders",
|
|
1832
4378
|
...options,
|
|
1833
4379
|
headers: {
|
|
1834
4380
|
"Content-Type": "application/json",
|
|
@@ -1837,10 +4383,10 @@ const submitPropertiesBulkDelivery = (options) => {
|
|
|
1837
4383
|
});
|
|
1838
4384
|
};
|
|
1839
4385
|
/**
|
|
1840
|
-
*
|
|
4386
|
+
* Zip-code volume breakdown
|
|
1841
4387
|
*/
|
|
1842
|
-
const
|
|
1843
|
-
return (options.client ?? client).
|
|
4388
|
+
const originatorZipCodes2 = (options) => {
|
|
4389
|
+
return (options.client ?? client).post({
|
|
1844
4390
|
security: [{
|
|
1845
4391
|
name: "x-api-key",
|
|
1846
4392
|
type: "apiKey"
|
|
@@ -1848,16 +4394,19 @@ const getPropertiesBulkDeliveryJob = (options) => {
|
|
|
1848
4394
|
scheme: "bearer",
|
|
1849
4395
|
type: "http"
|
|
1850
4396
|
}],
|
|
1851
|
-
url: "/
|
|
1852
|
-
...options
|
|
4397
|
+
url: "/originators/{nmlsId}/breakdowns/zip-codes",
|
|
4398
|
+
...options,
|
|
4399
|
+
headers: {
|
|
4400
|
+
"Content-Type": "application/json",
|
|
4401
|
+
...options?.headers
|
|
4402
|
+
}
|
|
1853
4403
|
});
|
|
1854
4404
|
};
|
|
1855
4405
|
/**
|
|
1856
|
-
*
|
|
1857
|
-
* Returns the realtime/notifications connection info (endpoint, authorizer, app, stage) merged with the caller's userId, so a trusted client can connect to its per-user IoT MQTT topic.
|
|
4406
|
+
* Broker shops this LO originated loans through (name-resolved)
|
|
1858
4407
|
*/
|
|
1859
|
-
const
|
|
1860
|
-
return (options
|
|
4408
|
+
const originatorBrokers2 = (options) => {
|
|
4409
|
+
return (options.client ?? client).post({
|
|
1861
4410
|
security: [{
|
|
1862
4411
|
name: "x-api-key",
|
|
1863
4412
|
type: "apiKey"
|
|
@@ -1865,15 +4414,19 @@ const getRealtimeConfig = (options) => {
|
|
|
1865
4414
|
scheme: "bearer",
|
|
1866
4415
|
type: "http"
|
|
1867
4416
|
}],
|
|
1868
|
-
url: "/
|
|
1869
|
-
...options
|
|
4417
|
+
url: "/originators/{nmlsId}/breakdowns/brokers",
|
|
4418
|
+
...options,
|
|
4419
|
+
headers: {
|
|
4420
|
+
"Content-Type": "application/json",
|
|
4421
|
+
...options?.headers
|
|
4422
|
+
}
|
|
1870
4423
|
});
|
|
1871
4424
|
};
|
|
1872
4425
|
/**
|
|
1873
|
-
*
|
|
4426
|
+
* Branch (broker) history for this LO
|
|
1874
4427
|
*/
|
|
1875
|
-
const
|
|
1876
|
-
return (options
|
|
4428
|
+
const originatorBranches2 = (options) => {
|
|
4429
|
+
return (options.client ?? client).post({
|
|
1877
4430
|
security: [{
|
|
1878
4431
|
name: "x-api-key",
|
|
1879
4432
|
type: "apiKey"
|
|
@@ -1881,7 +4434,7 @@ const listSales = (options) => {
|
|
|
1881
4434
|
scheme: "bearer",
|
|
1882
4435
|
type: "http"
|
|
1883
4436
|
}],
|
|
1884
|
-
url: "/
|
|
4437
|
+
url: "/originators/{nmlsId}/breakdowns/branches",
|
|
1885
4438
|
...options,
|
|
1886
4439
|
headers: {
|
|
1887
4440
|
"Content-Type": "application/json",
|
|
@@ -1890,10 +4443,10 @@ const listSales = (options) => {
|
|
|
1890
4443
|
});
|
|
1891
4444
|
};
|
|
1892
4445
|
/**
|
|
1893
|
-
*
|
|
4446
|
+
* City volume breakdown across this LO's loans
|
|
1894
4447
|
*/
|
|
1895
|
-
const
|
|
1896
|
-
return (options.client ?? client).
|
|
4448
|
+
const originatorCitiesBreakdown2 = (options) => {
|
|
4449
|
+
return (options.client ?? client).post({
|
|
1897
4450
|
security: [{
|
|
1898
4451
|
name: "x-api-key",
|
|
1899
4452
|
type: "apiKey"
|
|
@@ -1901,15 +4454,19 @@ const getSale = (options) => {
|
|
|
1901
4454
|
scheme: "bearer",
|
|
1902
4455
|
type: "http"
|
|
1903
4456
|
}],
|
|
1904
|
-
url: "/
|
|
1905
|
-
...options
|
|
4457
|
+
url: "/originators/{nmlsId}/breakdowns/cities",
|
|
4458
|
+
...options,
|
|
4459
|
+
headers: {
|
|
4460
|
+
"Content-Type": "application/json",
|
|
4461
|
+
...options?.headers
|
|
4462
|
+
}
|
|
1906
4463
|
});
|
|
1907
4464
|
};
|
|
1908
4465
|
/**
|
|
1909
|
-
*
|
|
4466
|
+
* State volume breakdown across this LO's loans
|
|
1910
4467
|
*/
|
|
1911
|
-
const
|
|
1912
|
-
return (options
|
|
4468
|
+
const originatorStatesBreakdown2 = (options) => {
|
|
4469
|
+
return (options.client ?? client).post({
|
|
1913
4470
|
security: [{
|
|
1914
4471
|
name: "x-api-key",
|
|
1915
4472
|
type: "apiKey"
|
|
@@ -1917,7 +4474,7 @@ const salesAnalyticsSummary = (options) => {
|
|
|
1917
4474
|
scheme: "bearer",
|
|
1918
4475
|
type: "http"
|
|
1919
4476
|
}],
|
|
1920
|
-
url: "/
|
|
4477
|
+
url: "/originators/{nmlsId}/breakdowns/states",
|
|
1921
4478
|
...options,
|
|
1922
4479
|
headers: {
|
|
1923
4480
|
"Content-Type": "application/json",
|
|
@@ -1926,10 +4483,10 @@ const salesAnalyticsSummary = (options) => {
|
|
|
1926
4483
|
});
|
|
1927
4484
|
};
|
|
1928
4485
|
/**
|
|
1929
|
-
*
|
|
4486
|
+
* County (FIPS) volume breakdown across this LO's loans
|
|
1930
4487
|
*/
|
|
1931
|
-
const
|
|
1932
|
-
return (options
|
|
4488
|
+
const originatorCountiesBreakdown2 = (options) => {
|
|
4489
|
+
return (options.client ?? client).post({
|
|
1933
4490
|
security: [{
|
|
1934
4491
|
name: "x-api-key",
|
|
1935
4492
|
type: "apiKey"
|
|
@@ -1937,7 +4494,7 @@ const salesAnalyticsTimeSeries = (options) => {
|
|
|
1937
4494
|
scheme: "bearer",
|
|
1938
4495
|
type: "http"
|
|
1939
4496
|
}],
|
|
1940
|
-
url: "/
|
|
4497
|
+
url: "/originators/{nmlsId}/breakdowns/counties",
|
|
1941
4498
|
...options,
|
|
1942
4499
|
headers: {
|
|
1943
4500
|
"Content-Type": "application/json",
|
|
@@ -1946,9 +4503,30 @@ const salesAnalyticsTimeSeries = (options) => {
|
|
|
1946
4503
|
});
|
|
1947
4504
|
};
|
|
1948
4505
|
/**
|
|
1949
|
-
*
|
|
4506
|
+
* Real-estate offices this LO closed through (with sponsoring company)
|
|
1950
4507
|
*/
|
|
1951
|
-
const
|
|
4508
|
+
const originatorOffices2 = (options) => {
|
|
4509
|
+
return (options.client ?? client).post({
|
|
4510
|
+
security: [{
|
|
4511
|
+
name: "x-api-key",
|
|
4512
|
+
type: "apiKey"
|
|
4513
|
+
}, {
|
|
4514
|
+
scheme: "bearer",
|
|
4515
|
+
type: "http"
|
|
4516
|
+
}],
|
|
4517
|
+
url: "/originators/{nmlsId}/breakdowns/offices",
|
|
4518
|
+
...options,
|
|
4519
|
+
headers: {
|
|
4520
|
+
"Content-Type": "application/json",
|
|
4521
|
+
...options?.headers
|
|
4522
|
+
}
|
|
4523
|
+
});
|
|
4524
|
+
};
|
|
4525
|
+
/**
|
|
4526
|
+
* Submit a bulk-delivery job for originators
|
|
4527
|
+
* Queues an ECS task that dumps every matching originators document (subject to the org's `bulk-delivery.originators` entitlement scope) to S3 in the requested format. Returns 202 with a jobId; poll `GET /originators/bulk-delivery/{jobId}` for status + the signed download URL.
|
|
4528
|
+
*/
|
|
4529
|
+
const submitOriginatorsBulkDelivery2 = (options) => {
|
|
1952
4530
|
return (options?.client ?? client).post({
|
|
1953
4531
|
security: [{
|
|
1954
4532
|
name: "x-api-key",
|
|
@@ -1957,7 +4535,7 @@ const salesAnalyticsChart = (options) => {
|
|
|
1957
4535
|
scheme: "bearer",
|
|
1958
4536
|
type: "http"
|
|
1959
4537
|
}],
|
|
1960
|
-
url: "/
|
|
4538
|
+
url: "/originators/bulk-delivery",
|
|
1961
4539
|
...options,
|
|
1962
4540
|
headers: {
|
|
1963
4541
|
"Content-Type": "application/json",
|
|
@@ -1965,5 +4543,21 @@ const salesAnalyticsChart = (options) => {
|
|
|
1965
4543
|
}
|
|
1966
4544
|
});
|
|
1967
4545
|
};
|
|
4546
|
+
/**
|
|
4547
|
+
* Get bulk-delivery job status for originators
|
|
4548
|
+
*/
|
|
4549
|
+
const getOriginatorsBulkDeliveryJob2 = (options) => {
|
|
4550
|
+
return (options.client ?? client).get({
|
|
4551
|
+
security: [{
|
|
4552
|
+
name: "x-api-key",
|
|
4553
|
+
type: "apiKey"
|
|
4554
|
+
}, {
|
|
4555
|
+
scheme: "bearer",
|
|
4556
|
+
type: "http"
|
|
4557
|
+
}],
|
|
4558
|
+
url: "/originators/bulk-delivery/{jobId}",
|
|
4559
|
+
...options
|
|
4560
|
+
});
|
|
4561
|
+
};
|
|
1968
4562
|
//#endregion
|
|
1969
|
-
export { client as _heyApiClient, addWatchedAgent, addWatchedArea, agentAnalyticsChart, agentAnalyticsSummary, agentAnalyticsTimeSeries, agentCities, agentCompanies, agentCounties, agentLenders, agentOffices, agentOriginators, agentProperties, agentSales, agentStates, agentZipCodes, companyAnalyticsChart, companyAnalyticsSummary, companyAnalyticsTimeSeries, companyBranches, companyCities, companyCounties, companyLenders, companyOffices, companyOriginators, companySponsoredIndividuals, companySponsorshipMovement, companyStates, createClient, enrichPropertiesBulk, enrichProperty, getAgent, getAgentsBulkDeliveryJob, getAlertConditions, getAlertUnreadCount, getBranch, getBranchesBulkDeliveryJob, getCompaniesBulkDeliveryJob, getCompany, getEnrichBulkJob, getLender, getLoan, getLoansBulkDeliveryJob, getOffice, getOriginator, getOriginatorsBulkDeliveryJob, getPropertiesBulkDeliveryJob, getProperty, getRealtimeConfig, getSale, getSearchToken, instantSearch, listAgents, listAlertDigests, listAlertLog, listBranches, listCompanies, listEnrichments, listLenders, listLoans, listMarket, listOffices, listOriginators, listProperties, listSales, listWatchedAgents, listWatchedAreas, loansAnalyticsChart, loansAnalyticsSummary, loansAnalyticsTimeSeries, markAlertDigestRead, markAlertRead, markAllAlertsRead, marketAnalyticsChart, marketAnalyticsSummary, marketAnalyticsTimeSeries, officeAgents, originatorAgents, originatorAnalyticsChart, originatorAnalyticsSummary, originatorAnalyticsTimeSeries, originatorBranches, originatorCitiesBreakdown, originatorCompanies, originatorCountiesBreakdown, originatorLenders, originatorLoans, originatorOffices, originatorStatesBreakdown, originatorZipCodes, propertiesAnalyticsChart, propertiesAnalyticsSummary, removeWatchedAgent, removeWatchedArea, retrieveLocation, salesAnalyticsChart, salesAnalyticsSummary, salesAnalyticsTimeSeries, submitAgentsBulkDelivery, submitBranchesBulkDelivery, submitCompaniesBulkDelivery, submitLoansBulkDelivery, submitOriginatorsBulkDelivery, submitPropertiesBulkDelivery, suggestLocations, updateAlertConditions };
|
|
4563
|
+
export { client as _heyApiClient, actionCrmCallerId, addCrmContactMethod, addCrmListMember, addCrmListMembersBulk, addCrmNote, addCrmRecord, addCrmRecordsBulk, addWatchedAgent, addWatchedArea, addWatchedDocument, adminGetBulkJob, agentAnalyticsChart, agentAnalyticsChart2, agentAnalyticsSummary, agentAnalyticsSummary2, agentAnalyticsTimeSeries, agentAnalyticsTimeSeries2, agentCities, agentCities2, agentCompanies, agentCompanies2, agentCounties, agentCounties2, agentLenders, agentLenders2, agentOffices, agentOffices2, agentOriginators, agentOriginators2, agentProperties, agentProperties2, agentSales, agentSales2, agentStates, agentStates2, agentZipCodes, agentZipCodes2, applyCrmEnrichment, applyCrmListTemplate, applyCrmMiUpdates, companyAnalyticsChart, companyAnalyticsSummary, companyAnalyticsTimeSeries, companyBranches, companyBrokers, companyCities, companyCounties, companyLenders, companyOffices, companyOriginators, companySponsoredIndividuals, companySponsorshipMovement, companyStates, createClient, createCrmList, createCrmListField, createCrmManualRecord, createCrmMeeting, createCrmRecord, createCrmTask, createCrmTemplate, crmLenderChannels, crmLoLoanMix, crmLoMomentum, crmLoSponsorLocation, crmSimilarOriginators, deleteCrmCallerId, deleteCrmList, deleteCrmListField, deleteCrmMeeting, deleteCrmNote, deleteCrmRecord, deleteCrmRecords, deleteCrmTask, deleteCrmTemplate, dismissCrmMiUpdates, editCrmNote, enrichPropertiesBatch, enrichPropertiesBulk, enrichProperty, filterCrmListMembers, findCrmRecordByNmls, generateCrmRecordDescription, getAgent, getAgent2, getAgentsBulkDeliveryJob, getAgentsBulkDeliveryJob2, getAlertConditions, getAlertUnreadCount, getBranch, getBranchesBulkDeliveryJob, getCompaniesBulkDeliveryJob, getCompany, getCrmActiveCall, getCrmCall, getCrmCallTranscript, getCrmCustomValues, getCrmList, getCrmListShares, getCrmMiUpdates, getCrmOverrides, getCrmProductionEnrichJob, getCrmRecordAccess, getCrmRecordConnections, getCrmRecordProfile, getCrmTemplate, getCrmTemplateShares, getEnrichBulkJob, getLender, getLoan, getLoansBulkDeliveryJob, getOffice, getOriginator, getOriginator2, getOriginatorsBulkDeliveryJob, getOriginatorsBulkDeliveryJob2, getPropertiesBulkDeliveryJob, getProperty, getRealtimeConfig, getSale, getSearchToken, grantCrmListAccess, grantCrmRecordAccess, hangupCrmCall, importCrmRecords, instantSearch, linkCrmRecord, listAgents, listAgents2, listAlertDigests, listAlertLog, listBranches, listCompanies, listCrmActivity, listCrmCallerIds, listCrmCustomFields, listCrmListAssignees, listCrmListFields, listCrmLists, listCrmMeetings, listCrmMembers, listCrmOrgMembers, listCrmRecordShares, listCrmTasks, listCrmTemplates, listCrmWorkspaceTasks, listEnrichments, listLenders, listLoans, listMarket, listOffices, listOriginators, listOriginators2, listProperties, listSales, listWatchedAgents, listWatchedAreas, listWatchedDocuments, loansAnalyticsChart, loansAnalyticsSummary, loansAnalyticsTimeSeries, markAlertDigestRead, markAlertRead, markAllAlertsRead, marketAnalyticsChart, marketAnalyticsSummary, marketAnalyticsTimeSeries, officeAgents, originatorAgents, originatorAgents2, originatorAnalyticsChart, originatorAnalyticsChart2, originatorAnalyticsSummary, originatorAnalyticsSummary2, originatorAnalyticsTimeSeries, originatorAnalyticsTimeSeries2, originatorBranches, originatorBranches2, originatorBrokers, originatorBrokers2, originatorCitiesBreakdown, originatorCitiesBreakdown2, originatorCompanies, originatorCompanies2, originatorCountiesBreakdown, originatorCountiesBreakdown2, originatorLenders, originatorLenders2, originatorLoans, originatorLoans2, originatorOffices, originatorOffices2, originatorStatesBreakdown, originatorStatesBreakdown2, originatorZipCodes, originatorZipCodes2, placeCrmCall, previewAlerts, propertiesAnalyticsChart, propertiesAnalyticsSummary, reconcileCrmMeetings, removeCrmContactMethod, removeCrmListMember, removeWatchedAgent, removeWatchedArea, removeWatchedDocument, requestCrmAccess, retrieveLocation, revokeCrmListAccess, revokeCrmRecordAccess, salesAnalyticsChart, salesAnalyticsSummary, salesAnalyticsTimeSeries, searchCrmEmailRecipients, searchCrmMatchCandidates, searchCrmMentionRecords, searchCrmRecords, sendCrmEmail, setCrmCallAnalysis, setCrmCustomValue, setCrmOverride, setCrmRecordOwner, setDefaultCrmCallerId, shareCrmTemplate, submitAgentsBulkDelivery, submitAgentsBulkDelivery2, submitBranchesBulkDelivery, submitCompaniesBulkDelivery, submitLoansBulkDelivery, submitOriginatorsBulkDelivery, submitOriginatorsBulkDelivery2, submitPropertiesBulkDelivery, suggestLocations, transferCrmListOwnership, unshareCrmTemplate, updateAlertConditions, updateCrmContactMethod, updateCrmList, updateCrmListField, updateCrmMeeting, updateCrmTask, updateCrmTemplate };
|