@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.
@@ -1,2044 +0,0 @@
1
- import { createClient, createClient as createApiClient, createConfig } from "@hey-api/client-fetch";
2
- //#region src/runtime-config.ts
3
- const createClientConfig = (config) => ({
4
- ...config,
5
- throwOnError: true,
6
- baseUrl: config?.baseUrl ?? (typeof process === "undefined" ? void 0 : process.env?.MMR_API_URL) ?? "http://localhost:3001"
7
- });
8
- //#endregion
9
- //#region src/client.gen.ts
10
- const client = createClient(createClientConfig(createConfig()));
11
- //#endregion
12
- //#region src/sdk.gen.ts
13
- var Agents = class {
14
- /**
15
- * Search agents with filters
16
- */
17
- static list(options) {
18
- return (options?.client ?? client).post({
19
- security: [{
20
- name: "x-api-key",
21
- type: "apiKey"
22
- }, {
23
- scheme: "bearer",
24
- type: "http"
25
- }],
26
- url: "/v1/agents",
27
- ...options,
28
- headers: {
29
- "Content-Type": "application/json",
30
- ...options?.headers
31
- }
32
- });
33
- }
34
- /**
35
- * Get agent by ID (with legacy_mma_ids fallback)
36
- */
37
- static get(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/agents/{id}",
47
- ...options
48
- });
49
- }
50
- /**
51
- * Production summary with buyer/seller/dual split + previous period
52
- */
53
- static analyticsSummary(options) {
54
- return (options?.client ?? client).post({
55
- security: [{
56
- name: "x-api-key",
57
- type: "apiKey"
58
- }, {
59
- scheme: "bearer",
60
- type: "http"
61
- }],
62
- url: "/v1/agents/analytics/summary",
63
- ...options,
64
- headers: {
65
- "Content-Type": "application/json",
66
- ...options?.headers
67
- }
68
- });
69
- }
70
- /**
71
- * Agent volume/units over time with buyer/seller/dual split
72
- */
73
- static analyticsTimeSeries(options) {
74
- return (options?.client ?? client).post({
75
- security: [{
76
- name: "x-api-key",
77
- type: "apiKey"
78
- }, {
79
- scheme: "bearer",
80
- type: "http"
81
- }],
82
- url: "/v1/agents/analytics/time-series",
83
- ...options,
84
- headers: {
85
- "Content-Type": "application/json",
86
- ...options?.headers
87
- }
88
- });
89
- }
90
- /**
91
- * Configurable chart (measure × slice) over the agent's sales
92
- */
93
- static analyticsChart(options) {
94
- return (options?.client ?? client).post({
95
- security: [{
96
- name: "x-api-key",
97
- type: "apiKey"
98
- }, {
99
- scheme: "bearer",
100
- type: "http"
101
- }],
102
- url: "/v1/agents/analytics/chart",
103
- ...options,
104
- headers: {
105
- "Content-Type": "application/json",
106
- ...options?.headers
107
- }
108
- });
109
- }
110
- /**
111
- * Sales transactions where this agent was listing or selling side
112
- */
113
- static sales(options) {
114
- return (options.client ?? client).post({
115
- security: [{
116
- name: "x-api-key",
117
- type: "apiKey"
118
- }, {
119
- scheme: "bearer",
120
- type: "http"
121
- }],
122
- url: "/v1/agents/{id}/sales",
123
- ...options,
124
- headers: {
125
- "Content-Type": "application/json",
126
- ...options?.headers
127
- }
128
- });
129
- }
130
- /**
131
- * Properties this agent has transacted on
132
- */
133
- static properties(options) {
134
- return (options.client ?? client).post({
135
- security: [{
136
- name: "x-api-key",
137
- type: "apiKey"
138
- }, {
139
- scheme: "bearer",
140
- type: "http"
141
- }],
142
- url: "/v1/agents/{id}/properties",
143
- ...options,
144
- headers: {
145
- "Content-Type": "application/json",
146
- ...options?.headers
147
- }
148
- });
149
- }
150
- /**
151
- * Listing offices the agent has closed through
152
- */
153
- static offices(options) {
154
- return (options.client ?? client).post({
155
- security: [{
156
- name: "x-api-key",
157
- type: "apiKey"
158
- }, {
159
- scheme: "bearer",
160
- type: "http"
161
- }],
162
- url: "/v1/agents/{id}/breakdowns/offices",
163
- ...options,
164
- headers: {
165
- "Content-Type": "application/json",
166
- ...options?.headers
167
- }
168
- });
169
- }
170
- /**
171
- * City volume breakdown across the agent's sales
172
- */
173
- static cities(options) {
174
- return (options.client ?? client).post({
175
- security: [{
176
- name: "x-api-key",
177
- type: "apiKey"
178
- }, {
179
- scheme: "bearer",
180
- type: "http"
181
- }],
182
- url: "/v1/agents/{id}/breakdowns/cities",
183
- ...options,
184
- headers: {
185
- "Content-Type": "application/json",
186
- ...options?.headers
187
- }
188
- });
189
- }
190
- /**
191
- * County (FIPS) volume breakdown
192
- */
193
- static counties(options) {
194
- return (options.client ?? client).post({
195
- security: [{
196
- name: "x-api-key",
197
- type: "apiKey"
198
- }, {
199
- scheme: "bearer",
200
- type: "http"
201
- }],
202
- url: "/v1/agents/{id}/breakdowns/counties",
203
- ...options,
204
- headers: {
205
- "Content-Type": "application/json",
206
- ...options?.headers
207
- }
208
- });
209
- }
210
- /**
211
- * State volume breakdown
212
- */
213
- static states(options) {
214
- return (options.client ?? client).post({
215
- security: [{
216
- name: "x-api-key",
217
- type: "apiKey"
218
- }, {
219
- scheme: "bearer",
220
- type: "http"
221
- }],
222
- url: "/v1/agents/{id}/breakdowns/states",
223
- ...options,
224
- headers: {
225
- "Content-Type": "application/json",
226
- ...options?.headers
227
- }
228
- });
229
- }
230
- /**
231
- * Zip-code volume breakdown
232
- */
233
- static zipCodes(options) {
234
- return (options.client ?? client).post({
235
- security: [{
236
- name: "x-api-key",
237
- type: "apiKey"
238
- }, {
239
- scheme: "bearer",
240
- type: "http"
241
- }],
242
- url: "/v1/agents/{id}/breakdowns/zip-codes",
243
- ...options,
244
- headers: {
245
- "Content-Type": "application/json",
246
- ...options?.headers
247
- }
248
- });
249
- }
250
- /**
251
- * Loan officers the agent worked with (pre-aggregated)
252
- */
253
- static originators(options) {
254
- return (options.client ?? client).post({
255
- security: [{
256
- name: "x-api-key",
257
- type: "apiKey"
258
- }, {
259
- scheme: "bearer",
260
- type: "http"
261
- }],
262
- url: "/v1/agents/{id}/breakdowns/originators",
263
- ...options,
264
- headers: {
265
- "Content-Type": "application/json",
266
- ...options?.headers
267
- }
268
- });
269
- }
270
- /**
271
- * Mortgage companies the agent dealt with (pre-aggregated)
272
- */
273
- static companies(options) {
274
- return (options.client ?? client).post({
275
- security: [{
276
- name: "x-api-key",
277
- type: "apiKey"
278
- }, {
279
- scheme: "bearer",
280
- type: "http"
281
- }],
282
- url: "/v1/agents/{id}/breakdowns/companies",
283
- ...options,
284
- headers: {
285
- "Content-Type": "application/json",
286
- ...options?.headers
287
- }
288
- });
289
- }
290
- /**
291
- * Raw-name lenders encountered (pre-aggregated)
292
- */
293
- static lenders(options) {
294
- return (options.client ?? client).post({
295
- security: [{
296
- name: "x-api-key",
297
- type: "apiKey"
298
- }, {
299
- scheme: "bearer",
300
- type: "http"
301
- }],
302
- url: "/v1/agents/{id}/breakdowns/lenders",
303
- ...options,
304
- headers: {
305
- "Content-Type": "application/json",
306
- ...options?.headers
307
- }
308
- });
309
- }
310
- /**
311
- * Submit a bulk-delivery job for agents
312
- * 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.
313
- */
314
- static submitAgentsBulkDelivery(options) {
315
- return (options?.client ?? client).post({
316
- security: [{
317
- name: "x-api-key",
318
- type: "apiKey"
319
- }, {
320
- scheme: "bearer",
321
- type: "http"
322
- }],
323
- url: "/v1/agents/bulk-delivery",
324
- ...options,
325
- headers: {
326
- "Content-Type": "application/json",
327
- ...options?.headers
328
- }
329
- });
330
- }
331
- /**
332
- * Get bulk-delivery job status for agents
333
- */
334
- static getAgentsBulkDeliveryJob(options) {
335
- return (options.client ?? client).get({
336
- security: [{
337
- name: "x-api-key",
338
- type: "apiKey"
339
- }, {
340
- scheme: "bearer",
341
- type: "http"
342
- }],
343
- url: "/v1/agents/bulk-delivery/{jobId}",
344
- ...options
345
- });
346
- }
347
- };
348
- var Alerts = class {
349
- /**
350
- * Get your alert settings
351
- */
352
- static getAlertConditions(options) {
353
- return (options?.client ?? client).get({
354
- security: [{
355
- name: "x-api-key",
356
- type: "apiKey"
357
- }, {
358
- scheme: "bearer",
359
- type: "http"
360
- }],
361
- url: "/v1/alerts/conditions",
362
- ...options
363
- });
364
- }
365
- /**
366
- * Update your alert settings
367
- */
368
- static updateAlertConditions(options) {
369
- return (options?.client ?? client).put({
370
- security: [{
371
- name: "x-api-key",
372
- type: "apiKey"
373
- }, {
374
- scheme: "bearer",
375
- type: "http"
376
- }],
377
- url: "/v1/alerts/conditions",
378
- ...options,
379
- headers: {
380
- "Content-Type": "application/json",
381
- ...options?.headers
382
- }
383
- });
384
- }
385
- /**
386
- * List the agents you watch
387
- */
388
- static listWatchedAgents(options) {
389
- return (options?.client ?? client).get({
390
- security: [{
391
- name: "x-api-key",
392
- type: "apiKey"
393
- }, {
394
- scheme: "bearer",
395
- type: "http"
396
- }],
397
- url: "/v1/alerts/watched-agents",
398
- ...options
399
- });
400
- }
401
- /**
402
- * Watch an agent
403
- */
404
- static addWatchedAgent(options) {
405
- return (options?.client ?? client).post({
406
- security: [{
407
- name: "x-api-key",
408
- type: "apiKey"
409
- }, {
410
- scheme: "bearer",
411
- type: "http"
412
- }],
413
- url: "/v1/alerts/watched-agents",
414
- ...options,
415
- headers: {
416
- "Content-Type": "application/json",
417
- ...options?.headers
418
- }
419
- });
420
- }
421
- /**
422
- * Stop watching an agent
423
- */
424
- static removeWatchedAgent(options) {
425
- return (options.client ?? client).delete({
426
- security: [{
427
- name: "x-api-key",
428
- type: "apiKey"
429
- }, {
430
- scheme: "bearer",
431
- type: "http"
432
- }],
433
- url: "/v1/alerts/watched-agents/{id}",
434
- ...options
435
- });
436
- }
437
- /**
438
- * List the areas you watch
439
- */
440
- static listWatchedAreas(options) {
441
- return (options?.client ?? client).get({
442
- security: [{
443
- name: "x-api-key",
444
- type: "apiKey"
445
- }, {
446
- scheme: "bearer",
447
- type: "http"
448
- }],
449
- url: "/v1/alerts/watched-areas",
450
- ...options
451
- });
452
- }
453
- /**
454
- * Watch an area
455
- */
456
- static addWatchedArea(options) {
457
- return (options?.client ?? client).post({
458
- security: [{
459
- name: "x-api-key",
460
- type: "apiKey"
461
- }, {
462
- scheme: "bearer",
463
- type: "http"
464
- }],
465
- url: "/v1/alerts/watched-areas",
466
- ...options,
467
- headers: {
468
- "Content-Type": "application/json",
469
- ...options?.headers
470
- }
471
- });
472
- }
473
- /**
474
- * Stop watching an area
475
- */
476
- static removeWatchedArea(options) {
477
- return (options.client ?? client).delete({
478
- security: [{
479
- name: "x-api-key",
480
- type: "apiKey"
481
- }, {
482
- scheme: "bearer",
483
- type: "http"
484
- }],
485
- url: "/v1/alerts/watched-areas/{id}",
486
- ...options
487
- });
488
- }
489
- /**
490
- * List your alerts (newest first)
491
- */
492
- static listAlertLog(options) {
493
- return (options?.client ?? client).get({
494
- security: [{
495
- name: "x-api-key",
496
- type: "apiKey"
497
- }, {
498
- scheme: "bearer",
499
- type: "http"
500
- }],
501
- url: "/v1/alerts/log",
502
- ...options
503
- });
504
- }
505
- /**
506
- * Clear the unread badge
507
- */
508
- static markAllAlertsRead(options) {
509
- return (options?.client ?? client).post({
510
- security: [{
511
- name: "x-api-key",
512
- type: "apiKey"
513
- }, {
514
- scheme: "bearer",
515
- type: "http"
516
- }],
517
- url: "/v1/alerts/log/mark-all-read",
518
- ...options
519
- });
520
- }
521
- /**
522
- * Mark one alert read
523
- */
524
- static markAlertRead(options) {
525
- return (options.client ?? client).post({
526
- security: [{
527
- name: "x-api-key",
528
- type: "apiKey"
529
- }, {
530
- scheme: "bearer",
531
- type: "http"
532
- }],
533
- url: "/v1/alerts/log/{id}/read",
534
- ...options
535
- });
536
- }
537
- /**
538
- * Get your unread alert count
539
- */
540
- static getAlertUnreadCount(options) {
541
- return (options?.client ?? client).get({
542
- security: [{
543
- name: "x-api-key",
544
- type: "apiKey"
545
- }, {
546
- scheme: "bearer",
547
- type: "http"
548
- }],
549
- url: "/v1/alerts/unread-count",
550
- ...options
551
- });
552
- }
553
- /**
554
- * List your alert digests (newest first)
555
- */
556
- static listAlertDigests(options) {
557
- return (options?.client ?? client).get({
558
- security: [{
559
- name: "x-api-key",
560
- type: "apiKey"
561
- }, {
562
- scheme: "bearer",
563
- type: "http"
564
- }],
565
- url: "/v1/alerts/digests",
566
- ...options
567
- });
568
- }
569
- /**
570
- * Mark one digest read
571
- */
572
- static markAlertDigestRead(options) {
573
- return (options.client ?? client).post({
574
- security: [{
575
- name: "x-api-key",
576
- type: "apiKey"
577
- }, {
578
- scheme: "bearer",
579
- type: "http"
580
- }],
581
- url: "/v1/alerts/digests/{id}/read",
582
- ...options
583
- });
584
- }
585
- };
586
- var Branches = class {
587
- /**
588
- * Search branches with filters
589
- * 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 is enriched with the parent company's period production metrics.
590
- */
591
- static list(options) {
592
- return (options?.client ?? client).post({
593
- security: [{
594
- name: "x-api-key",
595
- type: "apiKey"
596
- }, {
597
- scheme: "bearer",
598
- type: "http"
599
- }],
600
- url: "/v1/branches",
601
- ...options,
602
- headers: {
603
- "Content-Type": "application/json",
604
- ...options?.headers
605
- }
606
- });
607
- }
608
- /**
609
- * Get branch by NMLS ID
610
- * Retrieve full details for a single NMLS mortgage branch including name, address, parent company, managers, trade names, and licensing.
611
- */
612
- static get(options) {
613
- return (options.client ?? client).get({
614
- security: [{
615
- name: "x-api-key",
616
- type: "apiKey"
617
- }, {
618
- scheme: "bearer",
619
- type: "http"
620
- }],
621
- url: "/v1/branches/{nmlsId}",
622
- ...options
623
- });
624
- }
625
- /**
626
- * Submit a bulk-delivery job for branches
627
- * Queues an ECS task that dumps every matching branches document (subject to the org's `bulk-delivery.branches` entitlement scope) to S3 in the requested format. Returns 202 with a jobId; poll `GET /branches/bulk-delivery/{jobId}` for status + the signed download URL.
628
- */
629
- static submitBranchesBulkDelivery(options) {
630
- return (options?.client ?? client).post({
631
- security: [{
632
- name: "x-api-key",
633
- type: "apiKey"
634
- }, {
635
- scheme: "bearer",
636
- type: "http"
637
- }],
638
- url: "/v1/branches/bulk-delivery",
639
- ...options,
640
- headers: {
641
- "Content-Type": "application/json",
642
- ...options?.headers
643
- }
644
- });
645
- }
646
- /**
647
- * Get bulk-delivery job status for branches
648
- */
649
- static getBranchesBulkDeliveryJob(options) {
650
- return (options.client ?? client).get({
651
- security: [{
652
- name: "x-api-key",
653
- type: "apiKey"
654
- }, {
655
- scheme: "bearer",
656
- type: "http"
657
- }],
658
- url: "/v1/branches/bulk-delivery/{jobId}",
659
- ...options
660
- });
661
- }
662
- };
663
- var Companies = class {
664
- /**
665
- * Search companies with filters
666
- */
667
- static list(options) {
668
- return (options?.client ?? client).post({
669
- security: [{
670
- name: "x-api-key",
671
- type: "apiKey"
672
- }, {
673
- scheme: "bearer",
674
- type: "http"
675
- }],
676
- url: "/v1/companies",
677
- ...options,
678
- headers: {
679
- "Content-Type": "application/json",
680
- ...options?.headers
681
- }
682
- });
683
- }
684
- /**
685
- * Get company by NMLS ID
686
- */
687
- static get(options) {
688
- return (options.client ?? client).get({
689
- security: [{
690
- name: "x-api-key",
691
- type: "apiKey"
692
- }, {
693
- scheme: "bearer",
694
- type: "http"
695
- }],
696
- url: "/v1/companies/{nmlsId}",
697
- ...options
698
- });
699
- }
700
- /**
701
- * Production summary with previous-period comparison
702
- */
703
- static analyticsSummary(options) {
704
- return (options?.client ?? client).post({
705
- security: [{
706
- name: "x-api-key",
707
- type: "apiKey"
708
- }, {
709
- scheme: "bearer",
710
- type: "http"
711
- }],
712
- url: "/v1/companies/analytics/summary",
713
- ...options,
714
- headers: {
715
- "Content-Type": "application/json",
716
- ...options?.headers
717
- }
718
- });
719
- }
720
- /**
721
- * Company volume / units over time
722
- */
723
- static analyticsTimeSeries(options) {
724
- return (options?.client ?? client).post({
725
- security: [{
726
- name: "x-api-key",
727
- type: "apiKey"
728
- }, {
729
- scheme: "bearer",
730
- type: "http"
731
- }],
732
- url: "/v1/companies/analytics/time-series",
733
- ...options,
734
- headers: {
735
- "Content-Type": "application/json",
736
- ...options?.headers
737
- }
738
- });
739
- }
740
- /**
741
- * Configurable chart (measure × slice) over company's loans
742
- */
743
- static analyticsChart(options) {
744
- return (options?.client ?? client).post({
745
- security: [{
746
- name: "x-api-key",
747
- type: "apiKey"
748
- }, {
749
- scheme: "bearer",
750
- type: "http"
751
- }],
752
- url: "/v1/companies/analytics/chart",
753
- ...options,
754
- headers: {
755
- "Content-Type": "application/json",
756
- ...options?.headers
757
- }
758
- });
759
- }
760
- /**
761
- * Loan originators sponsored by this company
762
- */
763
- static sponsoredIndividuals(options) {
764
- return (options.client ?? client).post({
765
- security: [{
766
- name: "x-api-key",
767
- type: "apiKey"
768
- }, {
769
- scheme: "bearer",
770
- type: "http"
771
- }],
772
- url: "/v1/companies/{nmlsId}/sponsored-individuals",
773
- ...options,
774
- headers: {
775
- "Content-Type": "application/json",
776
- ...options?.headers
777
- }
778
- });
779
- }
780
- /**
781
- * Branch locations for this company
782
- */
783
- static branches(options) {
784
- return (options.client ?? client).post({
785
- security: [{
786
- name: "x-api-key",
787
- type: "apiKey"
788
- }, {
789
- scheme: "bearer",
790
- type: "http"
791
- }],
792
- url: "/v1/companies/{nmlsId}/branches",
793
- ...options,
794
- headers: {
795
- "Content-Type": "application/json",
796
- ...options?.headers
797
- }
798
- });
799
- }
800
- /**
801
- * Loan officers who originated through this company
802
- */
803
- static originators(options) {
804
- return (options.client ?? client).post({
805
- security: [{
806
- name: "x-api-key",
807
- type: "apiKey"
808
- }, {
809
- scheme: "bearer",
810
- type: "http"
811
- }],
812
- url: "/v1/companies/{nmlsId}/breakdowns/originators",
813
- ...options,
814
- headers: {
815
- "Content-Type": "application/json",
816
- ...options?.headers
817
- }
818
- });
819
- }
820
- /**
821
- * Lenders this company originated through
822
- */
823
- static lenders(options) {
824
- return (options.client ?? client).post({
825
- security: [{
826
- name: "x-api-key",
827
- type: "apiKey"
828
- }, {
829
- scheme: "bearer",
830
- type: "http"
831
- }],
832
- url: "/v1/companies/{nmlsId}/breakdowns/lenders",
833
- ...options,
834
- headers: {
835
- "Content-Type": "application/json",
836
- ...options?.headers
837
- }
838
- });
839
- }
840
- /**
841
- * Broker offices this company originated through
842
- */
843
- static offices(options) {
844
- return (options.client ?? client).post({
845
- security: [{
846
- name: "x-api-key",
847
- type: "apiKey"
848
- }, {
849
- scheme: "bearer",
850
- type: "http"
851
- }],
852
- url: "/v1/companies/{nmlsId}/breakdowns/offices",
853
- ...options,
854
- headers: {
855
- "Content-Type": "application/json",
856
- ...options?.headers
857
- }
858
- });
859
- }
860
- /**
861
- * City volume breakdown across this company's loans
862
- */
863
- static cities(options) {
864
- return (options.client ?? client).post({
865
- security: [{
866
- name: "x-api-key",
867
- type: "apiKey"
868
- }, {
869
- scheme: "bearer",
870
- type: "http"
871
- }],
872
- url: "/v1/companies/{nmlsId}/breakdowns/cities",
873
- ...options,
874
- headers: {
875
- "Content-Type": "application/json",
876
- ...options?.headers
877
- }
878
- });
879
- }
880
- /**
881
- * State volume breakdown across this company's loans
882
- */
883
- static states(options) {
884
- return (options.client ?? client).post({
885
- security: [{
886
- name: "x-api-key",
887
- type: "apiKey"
888
- }, {
889
- scheme: "bearer",
890
- type: "http"
891
- }],
892
- url: "/v1/companies/{nmlsId}/breakdowns/states",
893
- ...options,
894
- headers: {
895
- "Content-Type": "application/json",
896
- ...options?.headers
897
- }
898
- });
899
- }
900
- /**
901
- * County (FIPS) volume breakdown across this company's loans
902
- */
903
- static counties(options) {
904
- return (options.client ?? client).post({
905
- security: [{
906
- name: "x-api-key",
907
- type: "apiKey"
908
- }, {
909
- scheme: "bearer",
910
- type: "http"
911
- }],
912
- url: "/v1/companies/{nmlsId}/breakdowns/counties",
913
- ...options,
914
- headers: {
915
- "Content-Type": "application/json",
916
- ...options?.headers
917
- }
918
- });
919
- }
920
- /**
921
- * Analyze LO arrivals and departures for a company
922
- */
923
- static sponsorshipMovement(options) {
924
- return (options.client ?? client).post({
925
- security: [{
926
- name: "x-api-key",
927
- type: "apiKey"
928
- }, {
929
- scheme: "bearer",
930
- type: "http"
931
- }],
932
- url: "/v1/companies/{nmlsId}/sponsorship-movement",
933
- ...options,
934
- headers: {
935
- "Content-Type": "application/json",
936
- ...options?.headers
937
- }
938
- });
939
- }
940
- /**
941
- * Submit a bulk-delivery job for companies
942
- * Queues an ECS task that dumps every matching companies document (subject to the org's `bulk-delivery.companies` entitlement scope) to S3 in the requested format. Returns 202 with a jobId; poll `GET /companies/bulk-delivery/{jobId}` for status + the signed download URL.
943
- */
944
- static submitCompaniesBulkDelivery(options) {
945
- return (options?.client ?? client).post({
946
- security: [{
947
- name: "x-api-key",
948
- type: "apiKey"
949
- }, {
950
- scheme: "bearer",
951
- type: "http"
952
- }],
953
- url: "/v1/companies/bulk-delivery",
954
- ...options,
955
- headers: {
956
- "Content-Type": "application/json",
957
- ...options?.headers
958
- }
959
- });
960
- }
961
- /**
962
- * Get bulk-delivery job status for companies
963
- */
964
- static getCompaniesBulkDeliveryJob(options) {
965
- return (options.client ?? client).get({
966
- security: [{
967
- name: "x-api-key",
968
- type: "apiKey"
969
- }, {
970
- scheme: "bearer",
971
- type: "http"
972
- }],
973
- url: "/v1/companies/bulk-delivery/{jobId}",
974
- ...options
975
- });
976
- }
977
- };
978
- var Search = class {
979
- /**
980
- * Instant multi-entity typeahead search
981
- * 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).
982
- */
983
- static instant(options) {
984
- return (options?.client ?? client).post({
985
- security: [{
986
- name: "x-api-key",
987
- type: "apiKey"
988
- }, {
989
- scheme: "bearer",
990
- type: "http"
991
- }],
992
- url: "/v1/instant-search",
993
- ...options,
994
- headers: {
995
- "Content-Type": "application/json",
996
- ...options?.headers
997
- }
998
- });
999
- }
1000
- /**
1001
- * Mint a scoped search token
1002
- * 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).
1003
- */
1004
- static getSearchToken(options) {
1005
- return (options?.client ?? client).get({
1006
- security: [{
1007
- name: "x-api-key",
1008
- type: "apiKey"
1009
- }, {
1010
- scheme: "bearer",
1011
- type: "http"
1012
- }],
1013
- url: "/v1/search-token",
1014
- ...options
1015
- });
1016
- }
1017
- };
1018
- var Lenders = class {
1019
- /**
1020
- * Search lenders with filters
1021
- */
1022
- static list(options) {
1023
- return (options?.client ?? client).post({
1024
- security: [{
1025
- name: "x-api-key",
1026
- type: "apiKey"
1027
- }, {
1028
- scheme: "bearer",
1029
- type: "http"
1030
- }],
1031
- url: "/v1/lenders",
1032
- ...options,
1033
- headers: {
1034
- "Content-Type": "application/json",
1035
- ...options?.headers
1036
- }
1037
- });
1038
- }
1039
- /**
1040
- * Get lender by ID
1041
- */
1042
- static get(options) {
1043
- return (options.client ?? client).get({
1044
- security: [{
1045
- name: "x-api-key",
1046
- type: "apiKey"
1047
- }, {
1048
- scheme: "bearer",
1049
- type: "http"
1050
- }],
1051
- url: "/v1/lenders/{id}",
1052
- ...options
1053
- });
1054
- }
1055
- };
1056
- var Loans = class {
1057
- /**
1058
- * Search loans with filters
1059
- */
1060
- static list(options) {
1061
- return (options?.client ?? client).post({
1062
- security: [{
1063
- name: "x-api-key",
1064
- type: "apiKey"
1065
- }, {
1066
- scheme: "bearer",
1067
- type: "http"
1068
- }],
1069
- url: "/v1/loans",
1070
- ...options,
1071
- headers: {
1072
- "Content-Type": "application/json",
1073
- ...options?.headers
1074
- }
1075
- });
1076
- }
1077
- /**
1078
- * Get loan by ID
1079
- */
1080
- static get(options) {
1081
- return (options.client ?? client).get({
1082
- security: [{
1083
- name: "x-api-key",
1084
- type: "apiKey"
1085
- }, {
1086
- scheme: "bearer",
1087
- type: "http"
1088
- }],
1089
- url: "/v1/loans/{id}",
1090
- ...options
1091
- });
1092
- }
1093
- /**
1094
- * Market summary with previous-period comparison
1095
- */
1096
- static analyticsSummary(options) {
1097
- return (options?.client ?? client).post({
1098
- security: [{
1099
- name: "x-api-key",
1100
- type: "apiKey"
1101
- }, {
1102
- scheme: "bearer",
1103
- type: "http"
1104
- }],
1105
- url: "/v1/loans/analytics/summary",
1106
- ...options,
1107
- headers: {
1108
- "Content-Type": "application/json",
1109
- ...options?.headers
1110
- }
1111
- });
1112
- }
1113
- /**
1114
- * Volume / units over time
1115
- */
1116
- static analyticsTimeSeries(options) {
1117
- return (options?.client ?? client).post({
1118
- security: [{
1119
- name: "x-api-key",
1120
- type: "apiKey"
1121
- }, {
1122
- scheme: "bearer",
1123
- type: "http"
1124
- }],
1125
- url: "/v1/loans/analytics/time-series",
1126
- ...options,
1127
- headers: {
1128
- "Content-Type": "application/json",
1129
- ...options?.headers
1130
- }
1131
- });
1132
- }
1133
- /**
1134
- * Configurable chart data (measure × slice)
1135
- */
1136
- static analyticsChart(options) {
1137
- return (options?.client ?? client).post({
1138
- security: [{
1139
- name: "x-api-key",
1140
- type: "apiKey"
1141
- }, {
1142
- scheme: "bearer",
1143
- type: "http"
1144
- }],
1145
- url: "/v1/loans/analytics/chart",
1146
- ...options,
1147
- headers: {
1148
- "Content-Type": "application/json",
1149
- ...options?.headers
1150
- }
1151
- });
1152
- }
1153
- /**
1154
- * Submit a bulk-delivery job for loans
1155
- * 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.
1156
- */
1157
- static submitLoansBulkDelivery(options) {
1158
- return (options?.client ?? client).post({
1159
- security: [{
1160
- name: "x-api-key",
1161
- type: "apiKey"
1162
- }, {
1163
- scheme: "bearer",
1164
- type: "http"
1165
- }],
1166
- url: "/v1/loans/bulk-delivery",
1167
- ...options,
1168
- headers: {
1169
- "Content-Type": "application/json",
1170
- ...options?.headers
1171
- }
1172
- });
1173
- }
1174
- /**
1175
- * Get bulk-delivery job status for loans
1176
- */
1177
- static getLoansBulkDeliveryJob(options) {
1178
- return (options.client ?? client).get({
1179
- security: [{
1180
- name: "x-api-key",
1181
- type: "apiKey"
1182
- }, {
1183
- scheme: "bearer",
1184
- type: "http"
1185
- }],
1186
- url: "/v1/loans/bulk-delivery/{jobId}",
1187
- ...options
1188
- });
1189
- }
1190
- };
1191
- var Locations = class {
1192
- /**
1193
- * Autocomplete location search
1194
- * 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.
1195
- */
1196
- static suggest(options) {
1197
- return (options.client ?? client).get({
1198
- security: [{
1199
- name: "x-api-key",
1200
- type: "apiKey"
1201
- }, {
1202
- scheme: "bearer",
1203
- type: "http"
1204
- }],
1205
- url: "/v1/locations/suggest",
1206
- ...options
1207
- });
1208
- }
1209
- /**
1210
- * Retrieve normalized location details
1211
- * 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.
1212
- */
1213
- static retrieve(options) {
1214
- return (options.client ?? client).get({
1215
- security: [{
1216
- name: "x-api-key",
1217
- type: "apiKey"
1218
- }, {
1219
- scheme: "bearer",
1220
- type: "http"
1221
- }],
1222
- url: "/v1/locations/retrieve/{mapboxId}",
1223
- ...options
1224
- });
1225
- }
1226
- };
1227
- var Market = class {
1228
- /**
1229
- * Search aggregated market data with filters
1230
- * Search aggregated loan origination market data. Filterable dimensions cover geography (state, county, zip), product (loan purpose / type / amortization), borrower demographics, and loan numerics.
1231
- */
1232
- static list(options) {
1233
- return (options?.client ?? client).post({
1234
- security: [{
1235
- name: "x-api-key",
1236
- type: "apiKey"
1237
- }, {
1238
- scheme: "bearer",
1239
- type: "http"
1240
- }],
1241
- url: "/v1/market",
1242
- ...options,
1243
- headers: {
1244
- "Content-Type": "application/json",
1245
- ...options?.headers
1246
- }
1247
- });
1248
- }
1249
- /**
1250
- * Market summary (volume, units, rate, loan amount, credit score, LTV, DTI, income, etc.) with previous-period comparison
1251
- */
1252
- static analyticsSummary(options) {
1253
- return (options?.client ?? client).post({
1254
- security: [{
1255
- name: "x-api-key",
1256
- type: "apiKey"
1257
- }, {
1258
- scheme: "bearer",
1259
- type: "http"
1260
- }],
1261
- url: "/v1/market/analytics/summary",
1262
- ...options,
1263
- headers: {
1264
- "Content-Type": "application/json",
1265
- ...options?.headers
1266
- }
1267
- });
1268
- }
1269
- /**
1270
- * Market metrics over time
1271
- */
1272
- static analyticsTimeSeries(options) {
1273
- return (options?.client ?? client).post({
1274
- security: [{
1275
- name: "x-api-key",
1276
- type: "apiKey"
1277
- }, {
1278
- scheme: "bearer",
1279
- type: "http"
1280
- }],
1281
- url: "/v1/market/analytics/time-series",
1282
- ...options,
1283
- headers: {
1284
- "Content-Type": "application/json",
1285
- ...options?.headers
1286
- }
1287
- });
1288
- }
1289
- /**
1290
- * Market measure by dimension breakdown
1291
- */
1292
- static analyticsChart(options) {
1293
- return (options?.client ?? client).post({
1294
- security: [{
1295
- name: "x-api-key",
1296
- type: "apiKey"
1297
- }, {
1298
- scheme: "bearer",
1299
- type: "http"
1300
- }],
1301
- url: "/v1/market/analytics/chart",
1302
- ...options,
1303
- headers: {
1304
- "Content-Type": "application/json",
1305
- ...options?.headers
1306
- }
1307
- });
1308
- }
1309
- };
1310
- var Offices = class {
1311
- /**
1312
- * Agents at an office
1313
- */
1314
- static agents(options) {
1315
- return (options?.client ?? client).post({
1316
- security: [{
1317
- name: "x-api-key",
1318
- type: "apiKey"
1319
- }, {
1320
- scheme: "bearer",
1321
- type: "http"
1322
- }],
1323
- url: "/v1/offices/agents",
1324
- ...options,
1325
- headers: {
1326
- "Content-Type": "application/json",
1327
- ...options?.headers
1328
- }
1329
- });
1330
- }
1331
- /**
1332
- * Search real-estate offices with filters
1333
- * NOT NMLS mortgage branches — use `/branches` for those. Returns office company, address, agent count, and coordinates. Default sort is by agent count descending.
1334
- */
1335
- static list(options) {
1336
- return (options?.client ?? client).post({
1337
- security: [{
1338
- name: "x-api-key",
1339
- type: "apiKey"
1340
- }, {
1341
- scheme: "bearer",
1342
- type: "http"
1343
- }],
1344
- url: "/v1/offices",
1345
- ...options,
1346
- headers: {
1347
- "Content-Type": "application/json",
1348
- ...options?.headers
1349
- }
1350
- });
1351
- }
1352
- /**
1353
- * Get office by ID with best-effort production enrichment
1354
- */
1355
- static get(options) {
1356
- return (options.client ?? client).get({
1357
- security: [{
1358
- name: "x-api-key",
1359
- type: "apiKey"
1360
- }, {
1361
- scheme: "bearer",
1362
- type: "http"
1363
- }],
1364
- url: "/v1/offices/{id}",
1365
- ...options
1366
- });
1367
- }
1368
- };
1369
- var Originators = class {
1370
- /**
1371
- * Search originators with filters
1372
- */
1373
- static list(options) {
1374
- return (options?.client ?? client).post({
1375
- security: [{
1376
- name: "x-api-key",
1377
- type: "apiKey"
1378
- }, {
1379
- scheme: "bearer",
1380
- type: "http"
1381
- }],
1382
- url: "/v1/originators",
1383
- ...options,
1384
- headers: {
1385
- "Content-Type": "application/json",
1386
- ...options?.headers
1387
- }
1388
- });
1389
- }
1390
- /**
1391
- * Get originator by NMLS ID
1392
- */
1393
- static get(options) {
1394
- return (options.client ?? client).get({
1395
- security: [{
1396
- name: "x-api-key",
1397
- type: "apiKey"
1398
- }, {
1399
- scheme: "bearer",
1400
- type: "http"
1401
- }],
1402
- url: "/v1/originators/{nmlsId}",
1403
- ...options
1404
- });
1405
- }
1406
- /**
1407
- * Production summary with previous-period comparison
1408
- */
1409
- static analyticsSummary(options) {
1410
- return (options?.client ?? client).post({
1411
- security: [{
1412
- name: "x-api-key",
1413
- type: "apiKey"
1414
- }, {
1415
- scheme: "bearer",
1416
- type: "http"
1417
- }],
1418
- url: "/v1/originators/analytics/summary",
1419
- ...options,
1420
- headers: {
1421
- "Content-Type": "application/json",
1422
- ...options?.headers
1423
- }
1424
- });
1425
- }
1426
- /**
1427
- * Originator volume / units over time
1428
- */
1429
- static analyticsTimeSeries(options) {
1430
- return (options?.client ?? client).post({
1431
- security: [{
1432
- name: "x-api-key",
1433
- type: "apiKey"
1434
- }, {
1435
- scheme: "bearer",
1436
- type: "http"
1437
- }],
1438
- url: "/v1/originators/analytics/time-series",
1439
- ...options,
1440
- headers: {
1441
- "Content-Type": "application/json",
1442
- ...options?.headers
1443
- }
1444
- });
1445
- }
1446
- /**
1447
- * Configurable chart (measure × slice) over one LO's loans
1448
- */
1449
- static analyticsChart(options) {
1450
- return (options?.client ?? client).post({
1451
- security: [{
1452
- name: "x-api-key",
1453
- type: "apiKey"
1454
- }, {
1455
- scheme: "bearer",
1456
- type: "http"
1457
- }],
1458
- url: "/v1/originators/analytics/chart",
1459
- ...options,
1460
- headers: {
1461
- "Content-Type": "application/json",
1462
- ...options?.headers
1463
- }
1464
- });
1465
- }
1466
- /**
1467
- * Loans originated by this LO
1468
- */
1469
- static loans(options) {
1470
- return (options.client ?? client).post({
1471
- security: [{
1472
- name: "x-api-key",
1473
- type: "apiKey"
1474
- }, {
1475
- scheme: "bearer",
1476
- type: "http"
1477
- }],
1478
- url: "/v1/originators/{nmlsId}/loans",
1479
- ...options,
1480
- headers: {
1481
- "Content-Type": "application/json",
1482
- ...options?.headers
1483
- }
1484
- });
1485
- }
1486
- /**
1487
- * Real-estate agents this LO co-closed with
1488
- */
1489
- static agents(options) {
1490
- return (options.client ?? client).post({
1491
- security: [{
1492
- name: "x-api-key",
1493
- type: "apiKey"
1494
- }, {
1495
- scheme: "bearer",
1496
- type: "http"
1497
- }],
1498
- url: "/v1/originators/{nmlsId}/breakdowns/agents",
1499
- ...options,
1500
- headers: {
1501
- "Content-Type": "application/json",
1502
- ...options?.headers
1503
- }
1504
- });
1505
- }
1506
- /**
1507
- * Funding companies (employer history) for this LO
1508
- */
1509
- static companies(options) {
1510
- return (options.client ?? client).post({
1511
- security: [{
1512
- name: "x-api-key",
1513
- type: "apiKey"
1514
- }, {
1515
- scheme: "bearer",
1516
- type: "http"
1517
- }],
1518
- url: "/v1/originators/{nmlsId}/breakdowns/companies",
1519
- ...options,
1520
- headers: {
1521
- "Content-Type": "application/json",
1522
- ...options?.headers
1523
- }
1524
- });
1525
- }
1526
- /**
1527
- * Lenders this LO has originated through
1528
- */
1529
- static lenders(options) {
1530
- return (options.client ?? client).post({
1531
- security: [{
1532
- name: "x-api-key",
1533
- type: "apiKey"
1534
- }, {
1535
- scheme: "bearer",
1536
- type: "http"
1537
- }],
1538
- url: "/v1/originators/{nmlsId}/breakdowns/lenders",
1539
- ...options,
1540
- headers: {
1541
- "Content-Type": "application/json",
1542
- ...options?.headers
1543
- }
1544
- });
1545
- }
1546
- /**
1547
- * Zip-code volume breakdown
1548
- */
1549
- static zipCodes(options) {
1550
- return (options.client ?? client).post({
1551
- security: [{
1552
- name: "x-api-key",
1553
- type: "apiKey"
1554
- }, {
1555
- scheme: "bearer",
1556
- type: "http"
1557
- }],
1558
- url: "/v1/originators/{nmlsId}/breakdowns/zip-codes",
1559
- ...options,
1560
- headers: {
1561
- "Content-Type": "application/json",
1562
- ...options?.headers
1563
- }
1564
- });
1565
- }
1566
- /**
1567
- * Branch (broker) history for this LO
1568
- */
1569
- static branches(options) {
1570
- return (options.client ?? client).post({
1571
- security: [{
1572
- name: "x-api-key",
1573
- type: "apiKey"
1574
- }, {
1575
- scheme: "bearer",
1576
- type: "http"
1577
- }],
1578
- url: "/v1/originators/{nmlsId}/breakdowns/branches",
1579
- ...options,
1580
- headers: {
1581
- "Content-Type": "application/json",
1582
- ...options?.headers
1583
- }
1584
- });
1585
- }
1586
- /**
1587
- * Real-estate offices this LO closed through (with sponsoring company)
1588
- */
1589
- static offices(options) {
1590
- return (options.client ?? client).post({
1591
- security: [{
1592
- name: "x-api-key",
1593
- type: "apiKey"
1594
- }, {
1595
- scheme: "bearer",
1596
- type: "http"
1597
- }],
1598
- url: "/v1/originators/{nmlsId}/breakdowns/offices",
1599
- ...options,
1600
- headers: {
1601
- "Content-Type": "application/json",
1602
- ...options?.headers
1603
- }
1604
- });
1605
- }
1606
- /**
1607
- * Per-city volume breakdown (pre-aggregated)
1608
- */
1609
- static citiesBreakdown(options) {
1610
- return (options.client ?? client).post({
1611
- security: [{
1612
- name: "x-api-key",
1613
- type: "apiKey"
1614
- }, {
1615
- scheme: "bearer",
1616
- type: "http"
1617
- }],
1618
- url: "/v1/originators/{nmlsId}/breakdowns/cities",
1619
- ...options,
1620
- headers: {
1621
- "Content-Type": "application/json",
1622
- ...options?.headers
1623
- }
1624
- });
1625
- }
1626
- /**
1627
- * Per-county volume breakdown (pre-aggregated)
1628
- */
1629
- static countiesBreakdown(options) {
1630
- return (options.client ?? client).post({
1631
- security: [{
1632
- name: "x-api-key",
1633
- type: "apiKey"
1634
- }, {
1635
- scheme: "bearer",
1636
- type: "http"
1637
- }],
1638
- url: "/v1/originators/{nmlsId}/breakdowns/counties",
1639
- ...options,
1640
- headers: {
1641
- "Content-Type": "application/json",
1642
- ...options?.headers
1643
- }
1644
- });
1645
- }
1646
- /**
1647
- * Per-state volume breakdown (pre-aggregated)
1648
- */
1649
- static statesBreakdown(options) {
1650
- return (options.client ?? client).post({
1651
- security: [{
1652
- name: "x-api-key",
1653
- type: "apiKey"
1654
- }, {
1655
- scheme: "bearer",
1656
- type: "http"
1657
- }],
1658
- url: "/v1/originators/{nmlsId}/breakdowns/states",
1659
- ...options,
1660
- headers: {
1661
- "Content-Type": "application/json",
1662
- ...options?.headers
1663
- }
1664
- });
1665
- }
1666
- /**
1667
- * Submit a bulk-delivery job for originators
1668
- * 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.
1669
- */
1670
- static submitOriginatorsBulkDelivery(options) {
1671
- return (options?.client ?? client).post({
1672
- security: [{
1673
- name: "x-api-key",
1674
- type: "apiKey"
1675
- }, {
1676
- scheme: "bearer",
1677
- type: "http"
1678
- }],
1679
- url: "/v1/originators/bulk-delivery",
1680
- ...options,
1681
- headers: {
1682
- "Content-Type": "application/json",
1683
- ...options?.headers
1684
- }
1685
- });
1686
- }
1687
- /**
1688
- * Get bulk-delivery job status for originators
1689
- */
1690
- static getOriginatorsBulkDeliveryJob(options) {
1691
- return (options.client ?? client).get({
1692
- security: [{
1693
- name: "x-api-key",
1694
- type: "apiKey"
1695
- }, {
1696
- scheme: "bearer",
1697
- type: "http"
1698
- }],
1699
- url: "/v1/originators/bulk-delivery/{jobId}",
1700
- ...options
1701
- });
1702
- }
1703
- };
1704
- var Properties = class {
1705
- /**
1706
- * List enriched properties for the current user
1707
- */
1708
- static listEnrichments(options) {
1709
- return (options?.client ?? client).get({
1710
- security: [{
1711
- name: "x-api-key",
1712
- type: "apiKey"
1713
- }, {
1714
- scheme: "bearer",
1715
- type: "http"
1716
- }],
1717
- url: "/v1/properties/enrichments",
1718
- ...options
1719
- });
1720
- }
1721
- /**
1722
- * Enrich a property with owner contact info
1723
- * 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.
1724
- */
1725
- static enrich(options) {
1726
- return (options.client ?? client).post({
1727
- security: [{
1728
- name: "x-api-key",
1729
- type: "apiKey"
1730
- }, {
1731
- scheme: "bearer",
1732
- type: "http"
1733
- }],
1734
- url: "/v1/properties/{id}/enrich",
1735
- ...options
1736
- });
1737
- }
1738
- /**
1739
- * Submit a bulk skip-trace job
1740
- * 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.
1741
- */
1742
- static enrichPropertiesBulk(options) {
1743
- return (options?.client ?? client).post({
1744
- security: [{
1745
- name: "x-api-key",
1746
- type: "apiKey"
1747
- }, {
1748
- scheme: "bearer",
1749
- type: "http"
1750
- }],
1751
- url: "/v1/properties/enrich-bulk",
1752
- ...options,
1753
- headers: {
1754
- "Content-Type": "application/json",
1755
- ...options?.headers
1756
- }
1757
- });
1758
- }
1759
- /**
1760
- * Get bulk enrichment job status
1761
- */
1762
- static getEnrichBulkJob(options) {
1763
- return (options.client ?? client).get({
1764
- security: [{
1765
- name: "x-api-key",
1766
- type: "apiKey"
1767
- }, {
1768
- scheme: "bearer",
1769
- type: "http"
1770
- }],
1771
- url: "/v1/properties/enrich-bulk/{jobId}",
1772
- ...options
1773
- });
1774
- }
1775
- /**
1776
- * Search properties with filters
1777
- */
1778
- static list(options) {
1779
- return (options?.client ?? client).post({
1780
- security: [{
1781
- name: "x-api-key",
1782
- type: "apiKey"
1783
- }, {
1784
- scheme: "bearer",
1785
- type: "http"
1786
- }],
1787
- url: "/v1/properties",
1788
- ...options,
1789
- headers: {
1790
- "Content-Type": "application/json",
1791
- ...options?.headers
1792
- }
1793
- });
1794
- }
1795
- /**
1796
- * Get property by ID (with mm_property_id fallback)
1797
- */
1798
- static get(options) {
1799
- return (options.client ?? client).get({
1800
- security: [{
1801
- name: "x-api-key",
1802
- type: "apiKey"
1803
- }, {
1804
- scheme: "bearer",
1805
- type: "http"
1806
- }],
1807
- url: "/v1/properties/{id}",
1808
- ...options
1809
- });
1810
- }
1811
- /**
1812
- * Property count and average AVM
1813
- */
1814
- static analyticsSummary(options) {
1815
- return (options?.client ?? client).post({
1816
- security: [{
1817
- name: "x-api-key",
1818
- type: "apiKey"
1819
- }, {
1820
- scheme: "bearer",
1821
- type: "http"
1822
- }],
1823
- url: "/v1/properties/analytics/summary",
1824
- ...options,
1825
- headers: {
1826
- "Content-Type": "application/json",
1827
- ...options?.headers
1828
- }
1829
- });
1830
- }
1831
- /**
1832
- * Configurable chart data (measure × slice)
1833
- */
1834
- static analyticsChart(options) {
1835
- return (options?.client ?? client).post({
1836
- security: [{
1837
- name: "x-api-key",
1838
- type: "apiKey"
1839
- }, {
1840
- scheme: "bearer",
1841
- type: "http"
1842
- }],
1843
- url: "/v1/properties/analytics/chart",
1844
- ...options,
1845
- headers: {
1846
- "Content-Type": "application/json",
1847
- ...options?.headers
1848
- }
1849
- });
1850
- }
1851
- /**
1852
- * Submit a bulk-delivery job for properties
1853
- * 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.
1854
- */
1855
- static submitPropertiesBulkDelivery(options) {
1856
- return (options?.client ?? client).post({
1857
- security: [{
1858
- name: "x-api-key",
1859
- type: "apiKey"
1860
- }, {
1861
- scheme: "bearer",
1862
- type: "http"
1863
- }],
1864
- url: "/v1/properties/bulk-delivery",
1865
- ...options,
1866
- headers: {
1867
- "Content-Type": "application/json",
1868
- ...options?.headers
1869
- }
1870
- });
1871
- }
1872
- /**
1873
- * Get bulk-delivery job status for properties
1874
- */
1875
- static getPropertiesBulkDeliveryJob(options) {
1876
- return (options.client ?? client).get({
1877
- security: [{
1878
- name: "x-api-key",
1879
- type: "apiKey"
1880
- }, {
1881
- scheme: "bearer",
1882
- type: "http"
1883
- }],
1884
- url: "/v1/properties/bulk-delivery/{jobId}",
1885
- ...options
1886
- });
1887
- }
1888
- };
1889
- var Realtime = class {
1890
- /**
1891
- * Get realtime connection config
1892
- * 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.
1893
- */
1894
- static getRealtimeConfig(options) {
1895
- return (options?.client ?? client).get({
1896
- security: [{
1897
- name: "x-api-key",
1898
- type: "apiKey"
1899
- }, {
1900
- scheme: "bearer",
1901
- type: "http"
1902
- }],
1903
- url: "/v1/realtime/config",
1904
- ...options
1905
- });
1906
- }
1907
- };
1908
- var Sales = class {
1909
- /**
1910
- * Search sales with filters
1911
- */
1912
- static list(options) {
1913
- return (options?.client ?? client).post({
1914
- security: [{
1915
- name: "x-api-key",
1916
- type: "apiKey"
1917
- }, {
1918
- scheme: "bearer",
1919
- type: "http"
1920
- }],
1921
- url: "/v1/sales",
1922
- ...options,
1923
- headers: {
1924
- "Content-Type": "application/json",
1925
- ...options?.headers
1926
- }
1927
- });
1928
- }
1929
- /**
1930
- * Get sale by ID
1931
- */
1932
- static get(options) {
1933
- return (options.client ?? client).get({
1934
- security: [{
1935
- name: "x-api-key",
1936
- type: "apiKey"
1937
- }, {
1938
- scheme: "bearer",
1939
- type: "http"
1940
- }],
1941
- url: "/v1/sales/{id}",
1942
- ...options
1943
- });
1944
- }
1945
- /**
1946
- * Market summary with buyer/seller/dual split + previous period
1947
- */
1948
- static analyticsSummary(options) {
1949
- return (options?.client ?? client).post({
1950
- security: [{
1951
- name: "x-api-key",
1952
- type: "apiKey"
1953
- }, {
1954
- scheme: "bearer",
1955
- type: "http"
1956
- }],
1957
- url: "/v1/sales/analytics/summary",
1958
- ...options,
1959
- headers: {
1960
- "Content-Type": "application/json",
1961
- ...options?.headers
1962
- }
1963
- });
1964
- }
1965
- /**
1966
- * Volume/units over time with buyer/seller/dual split
1967
- */
1968
- static analyticsTimeSeries(options) {
1969
- return (options?.client ?? client).post({
1970
- security: [{
1971
- name: "x-api-key",
1972
- type: "apiKey"
1973
- }, {
1974
- scheme: "bearer",
1975
- type: "http"
1976
- }],
1977
- url: "/v1/sales/analytics/time-series",
1978
- ...options,
1979
- headers: {
1980
- "Content-Type": "application/json",
1981
- ...options?.headers
1982
- }
1983
- });
1984
- }
1985
- /**
1986
- * Configurable chart (measure × slice) over the market
1987
- */
1988
- static analyticsChart(options) {
1989
- return (options?.client ?? client).post({
1990
- security: [{
1991
- name: "x-api-key",
1992
- type: "apiKey"
1993
- }, {
1994
- scheme: "bearer",
1995
- type: "http"
1996
- }],
1997
- url: "/v1/sales/analytics/chart",
1998
- ...options,
1999
- headers: {
2000
- "Content-Type": "application/json",
2001
- ...options?.headers
2002
- }
2003
- });
2004
- }
2005
- };
2006
- //#endregion
2007
- //#region src/index.ts
2008
- /**
2009
- * Configures the singleton hey-api fetch client and returns a namespace-grouped
2010
- * facade. The static service classes share the global client, so a process
2011
- * should call `createClient()` once at startup. For multi-tenant scenarios,
2012
- * pass a custom `client` per call via the per-method `Options.client` field.
2013
- */
2014
- function createClient$1(config = {}) {
2015
- if (config.baseUrl || config.headers || config.token) client.setConfig({
2016
- ...config.baseUrl ? { baseUrl: config.baseUrl } : {},
2017
- ...config.headers ? { headers: config.headers } : {},
2018
- ...config.token ? { auth: config.token } : {}
2019
- });
2020
- if (config.apiKey) {
2021
- const apiKey = config.apiKey;
2022
- client.interceptors.request.use((req) => {
2023
- req.headers.set("x-api-key", apiKey);
2024
- return req;
2025
- });
2026
- }
2027
- return {
2028
- agents: Agents,
2029
- alerts: Alerts,
2030
- branches: Branches,
2031
- companies: Companies,
2032
- lenders: Lenders,
2033
- loans: Loans,
2034
- locations: Locations,
2035
- market: Market,
2036
- offices: Offices,
2037
- originators: Originators,
2038
- properties: Properties,
2039
- sales: Sales,
2040
- search: Search
2041
- };
2042
- }
2043
- //#endregion
2044
- export { client as _, Branches as a, Loans as c, Offices as d, Originators as f, Search as g, Sales as h, Alerts as i, Locations as l, Realtime as m, createClient$1 as n, Companies as o, Properties as p, Agents as r, Lenders as s, createApiClient as t, Market as u };