@model-match/api 3.35.0 → 3.37.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.
@@ -28,11 +28,46 @@ var AdminNmls = class {
28
28
  ...options
29
29
  });
30
30
  }
31
+ };
32
+ var AdminContactSubmissions = class {
31
33
  /**
32
- * Launch the NMLS loader (admin)
33
- * Starts the `load-cad` ECS task and returns its id. Poll `GET /v1/admin/cad/load/{taskId}`. The load writes the licensing database only; run `index-cad` afterwards (or pass `reindex: true`) to publish it.
34
+ * List contact submissions (admin)
35
+ * Newest first. Default `status=needs_review`: pre-checked submissions waiting for a decision.
34
36
  */
35
- static adminLaunchCadLoad(options) {
37
+ static adminListContactSubmissions(options) {
38
+ return (options?.client ?? client).get({
39
+ security: [{
40
+ name: "x-api-key",
41
+ type: "apiKey"
42
+ }, {
43
+ scheme: "bearer",
44
+ type: "http"
45
+ }],
46
+ url: "/v1/admin/contact-submissions",
47
+ ...options
48
+ });
49
+ }
50
+ /**
51
+ * Approved contact values for one person (admin)
52
+ */
53
+ static adminListApprovedContacts(options) {
54
+ return (options.client ?? client).get({
55
+ security: [{
56
+ name: "x-api-key",
57
+ type: "apiKey"
58
+ }, {
59
+ scheme: "bearer",
60
+ type: "http"
61
+ }],
62
+ url: "/v1/admin/contact-submissions/approved",
63
+ ...options
64
+ });
65
+ }
66
+ /**
67
+ * Revoke an approved contact value (admin)
68
+ * Already revoked → 200 with the row unchanged.
69
+ */
70
+ static adminRevokeApprovedContact(options) {
36
71
  return (options.client ?? client).post({
37
72
  security: [{
38
73
  name: "x-api-key",
@@ -41,7 +76,7 @@ var AdminNmls = class {
41
76
  scheme: "bearer",
42
77
  type: "http"
43
78
  }],
44
- url: "/v1/admin/cad/load",
79
+ url: "/v1/admin/contact-submissions/approved/{id}/revoke",
45
80
  ...options,
46
81
  headers: {
47
82
  "Content-Type": "application/json",
@@ -50,10 +85,9 @@ var AdminNmls = class {
50
85
  });
51
86
  }
52
87
  /**
53
- * Status of a loader task (admin)
54
- * ECS lifecycle of a `load-cad` task. `succeeded` = exited 0 (load completed or paused); `failed` = any other stop. Per-file progress is in the task logs and the load bookkeeping tables.
88
+ * One contact submission with its subject and approved values (admin)
55
89
  */
56
- static adminGetCadLoadTask(options) {
90
+ static adminGetContactSubmission(options) {
57
91
  return (options.client ?? client).get({
58
92
  security: [{
59
93
  name: "x-api-key",
@@ -62,10 +96,31 @@ var AdminNmls = class {
62
96
  scheme: "bearer",
63
97
  type: "http"
64
98
  }],
65
- url: "/v1/admin/cad/load/{taskId}",
99
+ url: "/v1/admin/contact-submissions/{id}",
66
100
  ...options
67
101
  });
68
102
  }
103
+ /**
104
+ * Approve or reject items of a contact submission (admin)
105
+ * Approving inserts (or reuses) the live approved value; changing an approval to a rejection revokes the value it created, unless another approval still holds it. Sending a decision already recorded is a no-op. Once every item is decided the submission is `reviewed`.
106
+ */
107
+ static adminReviewContactSubmission(options) {
108
+ return (options.client ?? client).post({
109
+ security: [{
110
+ name: "x-api-key",
111
+ type: "apiKey"
112
+ }, {
113
+ scheme: "bearer",
114
+ type: "http"
115
+ }],
116
+ url: "/v1/admin/contact-submissions/{id}/review",
117
+ ...options,
118
+ headers: {
119
+ "Content-Type": "application/json",
120
+ ...options?.headers
121
+ }
122
+ });
123
+ }
69
124
  };
70
125
  var AdminJobs = class {
71
126
  /**
@@ -86,6 +141,45 @@ var AdminJobs = class {
86
141
  });
87
142
  }
88
143
  };
144
+ var AdminLoEnrichment = class {
145
+ /**
146
+ * Enrichment Firecrawl balance (admin)
147
+ */
148
+ static adminGetLoEnrichmentBalance(options) {
149
+ return (options?.client ?? client).get({
150
+ security: [{
151
+ name: "x-api-key",
152
+ type: "apiKey"
153
+ }, {
154
+ scheme: "bearer",
155
+ type: "http"
156
+ }],
157
+ url: "/v1/admin/lo-enrichment/balance",
158
+ ...options
159
+ });
160
+ }
161
+ /**
162
+ * Launch an LO contact enrichment run (admin)
163
+ * Starts the `lo-enrichment` ECS task. Progress + outcome: the admin Job Runs page (job `lo-enrichment`). The run hard-stops at `creditBudget` and aborts if the enrichment Firecrawl account holds less than it.
164
+ */
165
+ static adminLaunchLoEnrichmentRun(options) {
166
+ return (options.client ?? client).post({
167
+ security: [{
168
+ name: "x-api-key",
169
+ type: "apiKey"
170
+ }, {
171
+ scheme: "bearer",
172
+ type: "http"
173
+ }],
174
+ url: "/v1/admin/lo-enrichment/runs",
175
+ ...options,
176
+ headers: {
177
+ "Content-Type": "application/json",
178
+ ...options?.headers
179
+ }
180
+ });
181
+ }
182
+ };
89
183
  var Agents = class {
90
184
  /**
91
185
  * Search agents with filters
@@ -233,6 +327,27 @@ var Agents = class {
233
327
  });
234
328
  }
235
329
  /**
330
+ * Submit contact details for a real estate agent
331
+ * Send contact details you know for a real estate agent — a phone number, an email address, a profile link, or the company they moved to. The submission is checked and reviewed before anything appears on the profile; this call only records it and answers immediately. Sending the same details for the same person again while the first submission is still being reviewed returns the first submission's `id`.
332
+ */
333
+ static createAgentContactSubmission(options) {
334
+ return (options?.client ?? client).post({
335
+ security: [{
336
+ name: "x-api-key",
337
+ type: "apiKey"
338
+ }, {
339
+ scheme: "bearer",
340
+ type: "http"
341
+ }],
342
+ url: "/v1/agents/contact-submissions",
343
+ ...options,
344
+ headers: {
345
+ "Content-Type": "application/json",
346
+ ...options?.headers
347
+ }
348
+ });
349
+ }
350
+ /**
236
351
  * Count agents matching filters
237
352
  * Return the exact number of agents matching the given filters. Accepts the same request body as `listAgents` (pagination and sort are ignored). Use this when you only need a total; to get the matching agents themselves, send the same request body to `listAgents`.
238
353
  */
@@ -395,7 +510,8 @@ var Agents = class {
395
510
  });
396
511
  }
397
512
  /**
398
- * Raw-name lenders encountered (pre-aggregated)
513
+ * Lenders on the agent's deals (pre-aggregated)
514
+ * Lenders that financed the agent's deals in the period. Each row's `id` is the lender id — pass it back as the `lender` filter on the loans routes to drill into that lender's loans — and `label` its display name. The row for deals with no lender attributed carries no `id`.
399
515
  */
400
516
  static lenders(options) {
401
517
  return (options.client ?? client).post({
@@ -415,8 +531,8 @@ var Agents = class {
415
531
  });
416
532
  }
417
533
  /**
418
- * Listing offices the agent has closed through
419
- * Ranks the agent's CLOSED sales (MLS status sold, a real sale price — rentals and lease listings excluded, duplicate MLS records of one sale counted once) by this dimension. The same population `POST /v1/agents/{id}/sales` returns with `flatFilters.mlsStatus: "SLD"` and the agent analytics routes count. `side` narrows to the deals the agent was on that side of (`buyer` includes deals on both sides; `buyer` + `listing` = `any`).
534
+ * Offices the agent closed deals through (their side of each sale)
535
+ * Ranks the agent's CLOSED sales (MLS status sold, a real sale price — rentals and lease listings excluded, duplicate MLS records of one sale counted once) by this dimension. The same population `POST /v1/agents/{id}/sales` returns with `flatFilters.mlsStatus: "SLD"` and the agent analytics routes count. `side` narrows to the deals the agent was on that side of (`buyer` includes deals on both sides; `buyer` + `listing` = `any`). Each sale is credited to the office recorded for the agent's OWN side of it (the listing office when the agent listed it, including dual deals; the buyer's office when the agent only represented the buyer), so every sale counts at most once. A sale with no office recorded on the agent's side lands in no row, so rows can sum to less than `totals`. Office names are as recorded and not normalized: one brokerage can appear under several spellings.
420
536
  */
421
537
  static offices(options) {
422
538
  return (options.client ?? client).post({
@@ -2936,6 +3052,27 @@ var Crm = class {
2936
3052
  });
2937
3053
  }
2938
3054
  /**
3055
+ * Apply accepted Market-Insights updates to several list records
3056
+ * Bulk form of `applyCrmMiUpdates` for records in one CRM list: for each record, persist ONLY the updates listed for it (copy them from `getCrmListMiUpdates` — `store`, `field` or `kind`, and the `incoming` value as `value`). Never send updates the user did not accept. Proposals on a record that were not accepted count as reviewed. Records not in the list are reported, not applied.
3057
+ */
3058
+ static applyCrmListMiUpdates(options) {
3059
+ return (options.client ?? client).post({
3060
+ security: [{
3061
+ name: "x-api-key",
3062
+ type: "apiKey"
3063
+ }, {
3064
+ scheme: "bearer",
3065
+ type: "http"
3066
+ }],
3067
+ url: "/v1/crm/lists/{id}/apply-mi-updates",
3068
+ ...options,
3069
+ headers: {
3070
+ "Content-Type": "application/json",
3071
+ ...options?.headers
3072
+ }
3073
+ });
3074
+ }
3075
+ /**
2939
3076
  * List who can be assigned on a list (access-filtered by visibility)
2940
3077
  */
2941
3078
  static listCrmListAssignees(options) {
@@ -2952,6 +3089,27 @@ var Crm = class {
2952
3089
  });
2953
3090
  }
2954
3091
  /**
3092
+ * Snooze Market-Insights updates on several list records
3093
+ * Bulk form of `dismissCrmMiUpdates` for records in one CRM list: marks the updates last shown for each record as reviewed for the 31-day check window, so `getCrmListMiUpdates` stops returning them. Nothing is written to the records. A proposal that was not shown yet (new Market-Insights data) still comes back.
3094
+ */
3095
+ static dismissCrmListMiUpdates(options) {
3096
+ return (options.client ?? client).post({
3097
+ security: [{
3098
+ name: "x-api-key",
3099
+ type: "apiKey"
3100
+ }, {
3101
+ scheme: "bearer",
3102
+ type: "http"
3103
+ }],
3104
+ url: "/v1/crm/lists/{id}/dismiss-mi-updates",
3105
+ ...options,
3106
+ headers: {
3107
+ "Content-Type": "application/json",
3108
+ ...options?.headers
3109
+ }
3110
+ });
3111
+ }
3112
+ /**
2955
3113
  * Filter a list's members by entity attributes (read)
2956
3114
  */
2957
3115
  static filterCrmListMembers(options) {
@@ -3048,6 +3206,27 @@ var Crm = class {
3048
3206
  });
3049
3207
  }
3050
3208
  /**
3209
+ * Find the records in a CRM list that have Market-Insights updates to review
3210
+ * Checks a CRM list's members against current Market-Insights data and returns ONLY the records that need attention, each with its proposed updates. Use this instead of calling `getCrmRecordProfile` + `getCrmMiUpdates` for every member: one call covers a page of up to 50 members, and records the user already reviewed (applied or dismissed) with nothing new since are left out. Page with `cursor` until `nextCursor` is null; a page may return no records and still have more to scan. Act on the results with `applyCrmListMiUpdates` (explicit per-record accepted updates) and `dismissCrmListMiUpdates` (snooze the rest). Each scan counts as a check of those records, exactly like `getCrmMiUpdates`.
3211
+ */
3212
+ static getCrmListMiUpdates(options) {
3213
+ return (options.client ?? client).post({
3214
+ security: [{
3215
+ name: "x-api-key",
3216
+ type: "apiKey"
3217
+ }, {
3218
+ scheme: "bearer",
3219
+ type: "http"
3220
+ }],
3221
+ url: "/v1/crm/lists/{id}/mi-updates",
3222
+ ...options,
3223
+ headers: {
3224
+ "Content-Type": "application/json",
3225
+ ...options?.headers
3226
+ }
3227
+ });
3228
+ }
3229
+ /**
3051
3230
  * List the org members a list can be shared with (manage-gated)
3052
3231
  */
3053
3232
  static listCrmListShareableMembers(options) {
@@ -4381,7 +4560,7 @@ var Crm = class {
4381
4560
  var Search = class {
4382
4561
  /**
4383
4562
  * Instant multi-entity typeahead search
4384
- * Fast typeahead/autocomplete search across agents, originators, companies, and offices. Returns top matches per entity type. A bare NMLS ID resolves directly to its originator, company, or branch. Use this for quick name lookups, not for filtered searches (use the entity-specific list endpoints for those). If you already have an entity ID, prefer getOriginator / getCompany / getBranch.
4563
+ * Fast typeahead/autocomplete search across agents, originators, companies, and offices. Returns top matches per entity type. A bare NMLS ID resolves directly to its originator, company, or branch — including an originator who is in the NMLS registry with no production record yet (returned with `hasScoredData: false`). Use this for quick name lookups, not for filtered searches (use the entity-specific list endpoints for those). If you already have an entity ID, prefer getOriginator / getCompany / getBranch.
4385
4564
  */
4386
4565
  static instant(options) {
4387
4566
  return (options?.client ?? client).post({
@@ -5266,7 +5445,7 @@ var Offices = class {
5266
5445
  var Originators = class {
5267
5446
  /**
5268
5447
  * Search originators with filters
5269
- * 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.) If you only need how many originators match and not the records themselves, send the same request body to `countOriginators`.
5448
+ * 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. NEWLY LICENSED / NO PRODUCTION: an originator who is in the NMLS registry but has no production record is returned only by an identity search — `nmlsId`, `name` or `namePrefix` as the ONLY filter — sent with `producersOnly: false`. Those rows come after the rows that have production, carry `hasScoredData: false`, and have `null` production fields. Under any other filter, or without `producersOnly: false`, they are not returned (use `getOriginator` for one by NMLS id). 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.) If you only need how many originators match and not the records themselves, send the same request body to `countOriginators`.
5270
5449
  */
5271
5450
  static list(options) {
5272
5451
  return (options?.client ?? client).post({
@@ -5410,6 +5589,27 @@ var Originators = class {
5410
5589
  });
5411
5590
  }
5412
5591
  /**
5592
+ * Submit contact details for a loan officer
5593
+ * Send contact details you know for a loan officer — a phone number, an email address, a profile link, or the company they moved to. The submission is checked and reviewed before anything appears on the profile; this call only records it and answers immediately. Sending the same details for the same person again while the first submission is still being reviewed returns the first submission's `id`.
5594
+ */
5595
+ static createOriginatorContactSubmission(options) {
5596
+ return (options?.client ?? client).post({
5597
+ security: [{
5598
+ name: "x-api-key",
5599
+ type: "apiKey"
5600
+ }, {
5601
+ scheme: "bearer",
5602
+ type: "http"
5603
+ }],
5604
+ url: "/v1/originators/contact-submissions",
5605
+ ...options,
5606
+ headers: {
5607
+ "Content-Type": "application/json",
5608
+ ...options?.headers
5609
+ }
5610
+ });
5611
+ }
5612
+ /**
5413
5613
  * Count originators matching filters
5414
5614
  * Return the exact number of originators matching the given filters. Accepts the same request body as `listOriginators` (pagination and sort are ignored). Use this when you only need a total; to get the matching originators themselves, send the same request body to `listOriginators`.
5415
5615
  */
@@ -5974,6 +6174,27 @@ var Properties = class {
5974
6174
  });
5975
6175
  }
5976
6176
  /**
6177
+ * Resolve a batch of addresses to property ids
6178
+ * Resolve up to 2,000 postal addresses to property ids in one call — e.g. a mailing list before a bulk delivery. Free. Returns one result per input, in order, keyed by your `ref`. `matched` carries the parcel `id` and `mmPropertyId` — pass them to bulk delivery `propertyIds` or the list `flatFilters.id`, then join the rows back on `ref`. Each address is first matched on the normalized number + street + unit + zip key (suffix, directional, punctuation and case insensitive); misses fall back to a ranked search that only accepts a hit with the same house number, the same zip or city, and a near-identical street name. `ambiguous` lists `candidates`: `unit_required` (a building whose units are separate parcels — resend with the unit), `duplicate_parcels` (one address on several parcel records; usually safe to take them all), `multiple_parcels`. `not_found` gives a `reason`: `no_parcel_at_number` (no parcel at that house number in that zip/city), `low_confidence`, or an input problem (`no_house_number`, `no_street`, `no_location`).
6179
+ */
6180
+ static resolve(options) {
6181
+ return (options?.client ?? client).post({
6182
+ security: [{
6183
+ name: "x-api-key",
6184
+ type: "apiKey"
6185
+ }, {
6186
+ scheme: "bearer",
6187
+ type: "http"
6188
+ }],
6189
+ url: "/v1/properties/resolve",
6190
+ ...options,
6191
+ headers: {
6192
+ "Content-Type": "application/json",
6193
+ ...options?.headers
6194
+ }
6195
+ });
6196
+ }
6197
+ /**
5977
6198
  * Free-text property search
5978
6199
  * Find properties by a single free-text query — a full or partial address, an owner name, or a place. Results are ranked by relevance and tolerate typos, missing components, and reordered street directionals (e.g. "112 5th ave nw" and "112 nw 5th ave" both match). Returns the same property summary rows as the list endpoint. Use this for a search box; use the list endpoint for structured filtering.
5979
6200
  */
@@ -6299,4 +6520,4 @@ function createClient$1(config = {}) {
6299
6520
  };
6300
6521
  }
6301
6522
  //#endregion
6302
- export { Search as C, SavedFilters as S, Originators as _, Agents as a, Related as b, Companies as c, Lenders as d, Loans as f, Offices as g, Me as h, AdminNmls as i, Crm as l, Market as m, createClient$1 as n, Alerts as o, Locations as p, AdminJobs as r, Branches as s, createApiClient as t, Integrations as u, Properties as v, client as w, Sales as x, Realtime as y };
6523
+ export { Sales as C, client as E, Related as S, Search as T, Me as _, AdminLoEnrichment as a, Properties as b, Alerts as c, Crm as d, Integrations as f, Market as g, Locations as h, AdminJobs as i, Branches as l, Loans as m, createClient$1 as n, AdminNmls as o, Lenders as p, AdminContactSubmissions as r, Agents as s, createApiClient as t, Companies as u, Offices as v, SavedFilters as w, Realtime as x, Originators as y };