@model-match/api 3.74.0 → 3.77.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,4 +1,4 @@
1
- import { C as client, n as createClient } from "../src-DZvh-WnI.mjs";
1
+ import { n as createClient, w as client } from "../src-D7eIbeGl.mjs";
2
2
  //#region src/slim/sdk.gen.ts
3
3
  /**
4
4
  * Search agents with filters
@@ -2033,6 +2033,22 @@ const companyRetentionCaptured = (options) => (options.client ?? client).get({
2033
2033
  ...options
2034
2034
  });
2035
2035
  /**
2036
+ * Retained borrowers likely to list their home (weekly)
2037
+ *
2038
+ * The company's retained borrowers (their latest loan is still the company's) whose home looks likely to be listed for sale soon, each with the company loan officer who wrote that loan — only LOs the company employed on the loan, not brokers' LOs on loans it only funded. Each row carries a likely-to-list score from 0 to 100: a priority / likelihood ranking, not a probability. Highest score first; filter to one LO with `originator`. "Likely to list" is the LO Borrower Retention tab's rule: a score of 90 or more, and not listed for sale or under contract now (those are in `active-listings`). Checked weekly with the retention snapshot — `computedAt` says when. 404 means not computed for this company yet.
2039
+ */
2040
+ const companyRetentionLikelyToSell = (options) => (options.client ?? client).get({
2041
+ security: [{
2042
+ name: "x-api-key",
2043
+ type: "apiKey"
2044
+ }, {
2045
+ scheme: "bearer",
2046
+ type: "http"
2047
+ }],
2048
+ url: "/v1/companies/{nmlsId}/retention/likely-to-sell",
2049
+ ...options
2050
+ });
2051
+ /**
2036
2052
  * Loan originators sponsored by this company
2037
2053
  */
2038
2054
  const companySponsoredIndividuals = (options) => (options.client ?? client).post({
@@ -6382,5 +6398,193 @@ const listLoMoveSignals = (options) => (options.client ?? client).get({
6382
6398
  url: "/v1/signals/lo-move",
6383
6399
  ...options
6384
6400
  });
6401
+ /**
6402
+ * Tables you can query in Studio, with their columns
6403
+ *
6404
+ * Everything a Studio question can read: the market tables (recorded mortgage loans, home listings and sales), the result tables of your organization's own saved jobs, the files your organization uploaded (`upload_…`) and your organization's CRM (`crm_…`: the lists shared with the whole organization and the records in them, refreshed about every 15 minutes; they join to market data on NMLS ids). Each table lists its columns with a type and a plain-language description, and notes worth reading before writing SQL. `limits` says how many rows an answer can carry and how long a question may run; `guidance` says how to write SQL that works here. `notes` carries anything worth telling the user about the catalog itself, such as why there are no CRM tables yet. Read this before the first question in a conversation. Free.
6405
+ */
6406
+ const getStudioCatalog = (options) => (options?.client ?? client).get({
6407
+ security: [{
6408
+ name: "x-api-key",
6409
+ type: "apiKey"
6410
+ }, {
6411
+ scheme: "bearer",
6412
+ type: "http"
6413
+ }],
6414
+ url: "/v1/studio/catalog",
6415
+ ...options
6416
+ });
6417
+ /**
6418
+ * Your organization's saved jobs
6419
+ *
6420
+ * Every job your organization has saved, each with its schedule, when it next runs, the table its result is in, and how its last run went. Free.
6421
+ */
6422
+ const listStudioJobs = (options) => (options?.client ?? client).get({
6423
+ security: [{
6424
+ name: "x-api-key",
6425
+ type: "apiKey"
6426
+ }, {
6427
+ scheme: "bearer",
6428
+ type: "http"
6429
+ }],
6430
+ url: "/v1/studio/jobs",
6431
+ ...options
6432
+ });
6433
+ /**
6434
+ * Save a question as a job
6435
+ *
6436
+ * Save a SQL question to run again: on a schedule (`daily`, `weekly`) or only when asked (`manual`). Each run stores its result as a table named after the job, which later questions — and later jobs — can query like any other table. Name the `keys` (the columns that identify one row) to get 'what changed since the last run', and add `alerts` to flag new rows, removed rows or a number crossing a threshold. The SQL is checked when the job is saved: an unknown table or column, or a key that is not in the result, is refused here rather than at the first run. Saving does not run the job. Saving is free; each run that succeeds costs 10 credits, including the runs a `daily` or `weekly` schedule starts.
6437
+ */
6438
+ const createStudioJob = (options) => (options.client ?? client).post({
6439
+ security: [{
6440
+ name: "x-api-key",
6441
+ type: "apiKey"
6442
+ }, {
6443
+ scheme: "bearer",
6444
+ type: "http"
6445
+ }],
6446
+ url: "/v1/studio/jobs",
6447
+ ...options,
6448
+ headers: {
6449
+ "Content-Type": "application/json",
6450
+ ...options.headers
6451
+ }
6452
+ });
6453
+ /**
6454
+ * Delete a job and its results
6455
+ *
6456
+ * Delete a saved job, its run history and its result tables. Questions and jobs that read its table stop working. Free.
6457
+ */
6458
+ const deleteStudioJob = (options) => (options.client ?? client).delete({
6459
+ security: [{
6460
+ name: "x-api-key",
6461
+ type: "apiKey"
6462
+ }, {
6463
+ scheme: "bearer",
6464
+ type: "http"
6465
+ }],
6466
+ url: "/v1/studio/jobs/{name}",
6467
+ ...options
6468
+ });
6469
+ /**
6470
+ * One job: its runs, what changed, and where its result is
6471
+ *
6472
+ * A saved job with its recent runs (newest first), what changed in the latest successful run since the one before it, the alert rules that matched, and `result.table` — the table to query for its rows. Poll this after starting a run that answered `running`. Free.
6473
+ */
6474
+ const getStudioJob = (options) => (options.client ?? client).get({
6475
+ security: [{
6476
+ name: "x-api-key",
6477
+ type: "apiKey"
6478
+ }, {
6479
+ scheme: "bearer",
6480
+ type: "http"
6481
+ }],
6482
+ url: "/v1/studio/jobs/{name}",
6483
+ ...options
6484
+ });
6485
+ /**
6486
+ * Run a job now
6487
+ *
6488
+ * Run a saved job now. Answers `200` with the finished run (its row count, what changed and any alerts) when it ends within a few seconds; otherwise `202` with `status: running`, and the run carries on — read the job to see how it ended. A run that fails answers `422` with `code: job_failed` and the reason. One job runs at a time per organization. 10 credits for a run that succeeds; a failed run is free. A run that has succeeded by the time this returns is charged now (`credits.charged`, with `credits.remaining`). One still running is charged when it finishes successfully: `credits.charged` is 0 and `credits.pending` says what it will cost.
6489
+ */
6490
+ const runStudioJob = (options) => (options.client ?? client).post({
6491
+ security: [{
6492
+ name: "x-api-key",
6493
+ type: "apiKey"
6494
+ }, {
6495
+ scheme: "bearer",
6496
+ type: "http"
6497
+ }],
6498
+ url: "/v1/studio/jobs/{name}/run",
6499
+ ...options
6500
+ });
6501
+ /**
6502
+ * Answer one question with SQL
6503
+ *
6504
+ * Run one read-only SQL SELECT over the tables in the catalog and get the rows back. Use it for questions the list and analytics routes cannot answer in one call: a ranking across every company or agent in a market, a join between loans and sales, a custom roll-up. The data is stored by state: filter by `state` (and a date range) whenever the question allows, and aggregate in SQL instead of fetching rows. `rows` carries up to `limit` rows (default 200, at most 1000); `rowCount` is always the full count and `truncated` says when there are more. A question that runs too long is stopped with `timeout`: narrow it, or save it as a job. Only tables in the catalog can be read; nothing can be written. 5 credits per answered question; a refused or failed question is free. `credits` in the answer says what this question was charged and how many credits are left.
6505
+ */
6506
+ const runStudioQuery = (options) => (options.client ?? client).post({
6507
+ security: [{
6508
+ name: "x-api-key",
6509
+ type: "apiKey"
6510
+ }, {
6511
+ scheme: "bearer",
6512
+ type: "http"
6513
+ }],
6514
+ url: "/v1/studio/query",
6515
+ ...options,
6516
+ headers: {
6517
+ "Content-Type": "application/json",
6518
+ ...options.headers
6519
+ }
6520
+ });
6521
+ /**
6522
+ * Your organization's uploads
6523
+ *
6524
+ * Every file your organization has uploaded: its name, the table it is queried as, its columns and row count, when it was uploaded and by whom, and its status. Only your organization's uploads are listed; no other organization can see or query them. Free.
6525
+ */
6526
+ const listStudioUploads = (options) => (options?.client ?? client).get({
6527
+ security: [{
6528
+ name: "x-api-key",
6529
+ type: "apiKey"
6530
+ }, {
6531
+ scheme: "bearer",
6532
+ type: "http"
6533
+ }],
6534
+ url: "/v1/studio/uploads",
6535
+ ...options
6536
+ });
6537
+ /**
6538
+ * Start an upload: get a URL to send a file to
6539
+ *
6540
+ * Turn a file of your own data — leads, closed and lost loans, a client list — into a table only your organization can query and join to the market tables. This is step one of three: it reserves the name and answers with `uploadUrl`. Step two: send the file to `uploadUrl` with HTTP PUT (the file's bytes as the body; it must be exactly `sizeBytes` long). Step three: call complete. Files can be CSV, TSV, Excel (.xlsx) or Parquet, up to 100 MB, 2,000,000 rows and 200 columns; an organization can keep 25 uploads and 1 GB in total. The table will be `upload_<name>`. Asking again for a name whose file never arrived replaces the earlier request. Free.
6541
+ */
6542
+ const createStudioUpload = (options) => (options.client ?? client).post({
6543
+ security: [{
6544
+ name: "x-api-key",
6545
+ type: "apiKey"
6546
+ }, {
6547
+ scheme: "bearer",
6548
+ type: "http"
6549
+ }],
6550
+ url: "/v1/studio/uploads",
6551
+ ...options,
6552
+ headers: {
6553
+ "Content-Type": "application/json",
6554
+ ...options.headers
6555
+ }
6556
+ });
6557
+ /**
6558
+ * Delete an upload and its table, permanently
6559
+ *
6560
+ * Delete an upload: its table, the rows that were read from the file, and its record. It leaves the catalog at once, and questions and jobs that read the table stop working. This cannot be undone — to get the table back, upload the file again. Free.
6561
+ */
6562
+ const deleteStudioUpload = (options) => (options.client ?? client).delete({
6563
+ security: [{
6564
+ name: "x-api-key",
6565
+ type: "apiKey"
6566
+ }, {
6567
+ scheme: "bearer",
6568
+ type: "http"
6569
+ }],
6570
+ url: "/v1/studio/uploads/{name}",
6571
+ ...options
6572
+ });
6573
+ /**
6574
+ * Finish an upload: turn the file into a table
6575
+ *
6576
+ * Call this after the file has been sent to the upload URL. The file is read into the table `upload_<name>`, and the answer says what it holds: `columns` (names made safe for SQL, with a type each), `rowCount`, `warnings` (anything that was changed, skipped or kept as text — read them to the user) and `joinHints` (which columns line up with the market tables, with a join condition to copy). A small file answers `200` with `status: ready`. A large one answers `202` with `status: ingesting`: call complete again in a few seconds to collect the result. Calling it again on a ready upload is safe and answers with the same table. A file that cannot be used answers `422` and says why; create the upload again to send a corrected file. The original file is deleted once it has been read. Free.
6577
+ */
6578
+ const completeStudioUpload = (options) => (options.client ?? client).post({
6579
+ security: [{
6580
+ name: "x-api-key",
6581
+ type: "apiKey"
6582
+ }, {
6583
+ scheme: "bearer",
6584
+ type: "http"
6585
+ }],
6586
+ url: "/v1/studio/uploads/{name}/complete",
6587
+ ...options
6588
+ });
6385
6589
  //#endregion
6386
- export { client as _heyApiClient, actionCrmCallerId, addCrmContactMethod, addCrmListMember, addCrmListMembersBulk, addCrmNote, addCrmRecord, addCrmRecordsBulk, addWatchedAgent, addWatchedArea, addWatchedDocument, agentAnalyticsChart, agentAnalyticsSummary, agentAnalyticsTimeSeries, agentBuilders, agentCities, agentCompanies, agentCounties, agentLenders, agentLoanMix, agentMarkets, agentMortgagedTimeSeries, agentOffices, agentOriginators, agentProperties, agentRelated, agentSales, agentStates, agentTitleCompanies, agentTitleCompaniesTimeSeries, agentZipCodes, analyzeCrmCall, applyCrmEnrichment, applyCrmListMiUpdates, applyCrmListTemplate, applyCrmMiUpdates, branchAnalyticsChart, branchAnalyticsSummary, branchAnalyticsTimeSeries, branchCities, branchCommunityLendingMap, branchCounties, branchLenders, branchLoans, branchOriginators, branchRoster, branchStates, branchStats, branchTitleCompanies, cancelAgentsBulkDeliveryJob, cancelBranchesBulkDeliveryJob, cancelCompaniesBulkDeliveryJob, cancelEnrichBulkJob, cancelLoansBulkDeliveryJob, cancelOriginatorsBulkDeliveryJob, cancelPropertiesBulkDeliveryJob, checkCrmImport, companyAgents, companyAnalyticsChart, companyAnalyticsSummary, companyAnalyticsTimeSeries, companyBranches, companyBrokers, companyCities, companyCommunityLendingBenchmark, companyCommunityLendingMap, companyCounties, companyDepartureStatus, companyEarlyExits, companyEmployeeStats, companyEmployment, companyHeadcount, companyLenders, companyMarkets, companyMoverProduction, companyOffices, companyOriginators, companyRelated, companyRetention, companyRetentionActiveListings, companyRetentionCaptured, companySponsoredIndividuals, companySponsorshipMovement, companyStates, companyTalentFlow, companyTitleCompanies, companyZipCodes, countAgents, countBranches, countCompanies, countLenders, countLoans, countOffices, countOriginators, countProperties, countSales, createAgentContactSubmission, createAlertSubscription, createClient, createCrmList, createCrmListField, createCrmManualRecord, createCrmMeeting, createCrmObjectField, createCrmRecord, createCrmTask, createCrmTemplate, createMyAlertRecipe, createOriginatorContactSubmission, createPropertyTransactionFlag, createSavedFilter, crmLenderChannels, crmLoLoanMix, crmLoMomentum, crmLoSponsorLocation, crmSimilarOriginators, declineCrmMiUpdate, deleteAlertSubscription, deleteCrmCallerId, deleteCrmList, deleteCrmListField, deleteCrmMeeting, deleteCrmNote, deleteCrmObjectField, deleteCrmRecord, deleteCrmRecords, deleteCrmTask, deleteCrmTemplate, deleteMyAlertRecipe, deleteSavedFilter, describeCrmRecordsOnAdd, dismissCrmListMiUpdates, dismissCrmMiUpdates, editCrmLoggedActivity, editCrmNote, enrichPropertiesBatch, enrichPropertiesBulk, enrichProperty, filterCrmListMembers, findCrmRecordByNmls, generateCrmRecordDescription, getAgent, getAgentsBulkDeliveryJob, getAlertConditions, getAlertEmailTokens, getAlertUnreadCount, getBranch, getBranchesBulkDeliveryJob, getCompaniesBulkDeliveryJob, getCompany, getCrmActiveCall, getCrmActivityReport, getCrmCall, getCrmCallTranscript, getCrmCustomValues, getCrmImport, getCrmImportJob, getCrmList, getCrmListMemberIds, getCrmListMiUpdates, getCrmListShares, getCrmMiUpdates, getCrmOutcomesReport, getCrmOverrides, getCrmProductionEnrichJob, getCrmRecordAccess, getCrmRecordAccessRequest, getCrmRecordConnections, getCrmRecordMemberIds, getCrmRecordProfile, getCrmTemplate, getCrmTemplateShares, getEnrichBulkJob, getHubspotPushStatus, getLender, getLoan, getLoansBulkDeliveryJob, getMe, getMeCredits, getMePlan, getOffice, getOriginator, getOriginatorAgentPulseSignals, getOriginatorClientRetentionSignals, getOriginatorLoMoveSignal, getOriginatorsBulkDeliveryJob, getPropertiesBulkDeliveryJob, getProperty, getRealtimeConfig, getSale, getSavedFilter, getSavedFilterShares, getSearchToken, grantCrmListAccess, grantCrmRecordAccess, grantCrmRecordAccessRequest, grantSavedFilterAccess, hangupCrmCall, importCrmRecords, instantSearch, lenderCities, lenderCompanies, lenderCounties, lenderOriginators, lenderStates, linkCrmRecord, listAgentOfficeGroups, listAgents, listAlertDigests, listAlertLog, listAlertRecipes, listAlertSubscriptions, listBranches, listCompanies, listCrmActivity, listCrmCallerIds, listCrmContactMethods, listCrmCustomFields, listCrmImportRows, listCrmImports, listCrmListAssignees, listCrmListFields, listCrmListMemberships, listCrmListShareableMembers, listCrmLists, listCrmMeetings, listCrmMembers, listCrmOrgMembers, listCrmRecordShareableMembers, listCrmRecordShares, listCrmReferencedActivity, listCrmTasks, listCrmTemplates, listCrmWorkspaceMeetings, listCrmWorkspaceTasks, listEnrichments, listLenders, listLoMoveSignals, listLoans, listMyAlertRecipes, listOffices, listOriginators, listProperties, listSales, listSavedFilterShareableMembers, listSavedFilters, listWatchedAgents, listWatchedAreas, listWatchedDocuments, loanRelated, loansAnalyticsChart, loansAnalyticsSummary, loansAnalyticsTimeSeries, logCrmActivity, lookupCompanies, mapSales, markAlertDigestRead, markAlertRead, markAllAlertsRead, marketAnalyticsChart, marketAnalyticsSummary, marketAnalyticsTimeSeries, marketCommunityLending, marketMovementActivity, marketMovementByState, marketMovementCohortPayoff, marketMovementMostGained, marketMovementMostLost, marketMovementMovers, marketMovementRankings, marketMovementStats, marketMovementTransitions, marketSignals, officeAgents, officeBuilders, officeLenders, officeLoanTypes, officeOriginators, originatorAgents, originatorAnalyticsChart, originatorAnalyticsSummary, originatorAnalyticsTimeSeries, originatorBranches, originatorBrokers, originatorBuilders, originatorCitiesBreakdown, originatorCommunityLendingBenchmark, originatorCommunityLendingMap, originatorCompanies, originatorCountiesBreakdown, originatorLenders, originatorLoans, originatorMarkets, originatorOffices, originatorProperties, originatorRelated, originatorRetention, originatorRetentionCaptured, originatorStatesBreakdown, originatorTitleCompanies, originatorZipCodes, placeCrmCall, previewAlertEmailTemplate, previewAlertRecipe, previewAlerts, previewMyAlertRecipe, propertiesAnalyticsChart, propertiesAnalyticsSummary, propertyRelated, pushToHubspot, reconcileCrmMeetings, refreshCrmRecordMirror, removeCrmContactMethod, removeCrmListMember, removeWatchedAgent, removeWatchedArea, removeWatchedDocument, requestCrmAccess, requestCrmRecordAccess, resolveProperties, retrieveLocation, revokeCrmListAccess, revokeCrmRecordAccess, revokeSavedFilterAccess, saleRelated, salesAnalyticsChart, salesAnalyticsSummary, salesAnalyticsTimeSeries, salesMarketStats, searchCrmEmailRecipients, searchCrmMatchCandidates, searchCrmMentionRecords, searchCrmRecords, searchProperties, sendCrmEmail, setCrmCallAnalysis, setCrmCustomValue, setCrmOverride, setCrmRecordOwner, setDefaultCrmCallerId, shareCrmTemplate, submitAgentsBulkDelivery, submitBranchesBulkDelivery, submitCompaniesBulkDelivery, submitLoansBulkDelivery, submitOriginatorsBulkDelivery, submitPropertiesBulkDelivery, subscribeAlertRecipe, suggestLocations, suggestOfficeNames, transcribeCrmCall, transferCrmListOwnership, undoCrmImport, unshareCrmTemplate, unsubscribeAlertRecipe, updateAlertConditions, updateCrmContactMethod, updateCrmList, updateCrmListField, updateCrmMeeting, updateCrmObjectField, updateCrmTask, updateCrmTemplate, updateMe, updateMyAlertRecipe, updateSavedFilter };
6590
+ export { client as _heyApiClient, actionCrmCallerId, addCrmContactMethod, addCrmListMember, addCrmListMembersBulk, addCrmNote, addCrmRecord, addCrmRecordsBulk, addWatchedAgent, addWatchedArea, addWatchedDocument, agentAnalyticsChart, agentAnalyticsSummary, agentAnalyticsTimeSeries, agentBuilders, agentCities, agentCompanies, agentCounties, agentLenders, agentLoanMix, agentMarkets, agentMortgagedTimeSeries, agentOffices, agentOriginators, agentProperties, agentRelated, agentSales, agentStates, agentTitleCompanies, agentTitleCompaniesTimeSeries, agentZipCodes, analyzeCrmCall, applyCrmEnrichment, applyCrmListMiUpdates, applyCrmListTemplate, applyCrmMiUpdates, branchAnalyticsChart, branchAnalyticsSummary, branchAnalyticsTimeSeries, branchCities, branchCommunityLendingMap, branchCounties, branchLenders, branchLoans, branchOriginators, branchRoster, branchStates, branchStats, branchTitleCompanies, cancelAgentsBulkDeliveryJob, cancelBranchesBulkDeliveryJob, cancelCompaniesBulkDeliveryJob, cancelEnrichBulkJob, cancelLoansBulkDeliveryJob, cancelOriginatorsBulkDeliveryJob, cancelPropertiesBulkDeliveryJob, checkCrmImport, companyAgents, companyAnalyticsChart, companyAnalyticsSummary, companyAnalyticsTimeSeries, companyBranches, companyBrokers, companyCities, companyCommunityLendingBenchmark, companyCommunityLendingMap, companyCounties, companyDepartureStatus, companyEarlyExits, companyEmployeeStats, companyEmployment, companyHeadcount, companyLenders, companyMarkets, companyMoverProduction, companyOffices, companyOriginators, companyRelated, companyRetention, companyRetentionActiveListings, companyRetentionCaptured, companyRetentionLikelyToSell, companySponsoredIndividuals, companySponsorshipMovement, companyStates, companyTalentFlow, companyTitleCompanies, companyZipCodes, completeStudioUpload, countAgents, countBranches, countCompanies, countLenders, countLoans, countOffices, countOriginators, countProperties, countSales, createAgentContactSubmission, createAlertSubscription, createClient, createCrmList, createCrmListField, createCrmManualRecord, createCrmMeeting, createCrmObjectField, createCrmRecord, createCrmTask, createCrmTemplate, createMyAlertRecipe, createOriginatorContactSubmission, createPropertyTransactionFlag, createSavedFilter, createStudioJob, createStudioUpload, crmLenderChannels, crmLoLoanMix, crmLoMomentum, crmLoSponsorLocation, crmSimilarOriginators, declineCrmMiUpdate, deleteAlertSubscription, deleteCrmCallerId, deleteCrmList, deleteCrmListField, deleteCrmMeeting, deleteCrmNote, deleteCrmObjectField, deleteCrmRecord, deleteCrmRecords, deleteCrmTask, deleteCrmTemplate, deleteMyAlertRecipe, deleteSavedFilter, deleteStudioJob, deleteStudioUpload, describeCrmRecordsOnAdd, dismissCrmListMiUpdates, dismissCrmMiUpdates, editCrmLoggedActivity, editCrmNote, enrichPropertiesBatch, enrichPropertiesBulk, enrichProperty, filterCrmListMembers, findCrmRecordByNmls, generateCrmRecordDescription, getAgent, getAgentsBulkDeliveryJob, getAlertConditions, getAlertEmailTokens, getAlertUnreadCount, getBranch, getBranchesBulkDeliveryJob, getCompaniesBulkDeliveryJob, getCompany, getCrmActiveCall, getCrmActivityReport, getCrmCall, getCrmCallTranscript, getCrmCustomValues, getCrmImport, getCrmImportJob, getCrmList, getCrmListMemberIds, getCrmListMiUpdates, getCrmListShares, getCrmMiUpdates, getCrmOutcomesReport, getCrmOverrides, getCrmProductionEnrichJob, getCrmRecordAccess, getCrmRecordAccessRequest, getCrmRecordConnections, getCrmRecordMemberIds, getCrmRecordProfile, getCrmTemplate, getCrmTemplateShares, getEnrichBulkJob, getHubspotPushStatus, getLender, getLoan, getLoansBulkDeliveryJob, getMe, getMeCredits, getMePlan, getOffice, getOriginator, getOriginatorAgentPulseSignals, getOriginatorClientRetentionSignals, getOriginatorLoMoveSignal, getOriginatorsBulkDeliveryJob, getPropertiesBulkDeliveryJob, getProperty, getRealtimeConfig, getSale, getSavedFilter, getSavedFilterShares, getSearchToken, getStudioCatalog, getStudioJob, grantCrmListAccess, grantCrmRecordAccess, grantCrmRecordAccessRequest, grantSavedFilterAccess, hangupCrmCall, importCrmRecords, instantSearch, lenderCities, lenderCompanies, lenderCounties, lenderOriginators, lenderStates, linkCrmRecord, listAgentOfficeGroups, listAgents, listAlertDigests, listAlertLog, listAlertRecipes, listAlertSubscriptions, listBranches, listCompanies, listCrmActivity, listCrmCallerIds, listCrmContactMethods, listCrmCustomFields, listCrmImportRows, listCrmImports, listCrmListAssignees, listCrmListFields, listCrmListMemberships, listCrmListShareableMembers, listCrmLists, listCrmMeetings, listCrmMembers, listCrmOrgMembers, listCrmRecordShareableMembers, listCrmRecordShares, listCrmReferencedActivity, listCrmTasks, listCrmTemplates, listCrmWorkspaceMeetings, listCrmWorkspaceTasks, listEnrichments, listLenders, listLoMoveSignals, listLoans, listMyAlertRecipes, listOffices, listOriginators, listProperties, listSales, listSavedFilterShareableMembers, listSavedFilters, listStudioJobs, listStudioUploads, listWatchedAgents, listWatchedAreas, listWatchedDocuments, loanRelated, loansAnalyticsChart, loansAnalyticsSummary, loansAnalyticsTimeSeries, logCrmActivity, lookupCompanies, mapSales, markAlertDigestRead, markAlertRead, markAllAlertsRead, marketAnalyticsChart, marketAnalyticsSummary, marketAnalyticsTimeSeries, marketCommunityLending, marketMovementActivity, marketMovementByState, marketMovementCohortPayoff, marketMovementMostGained, marketMovementMostLost, marketMovementMovers, marketMovementRankings, marketMovementStats, marketMovementTransitions, marketSignals, officeAgents, officeBuilders, officeLenders, officeLoanTypes, officeOriginators, originatorAgents, originatorAnalyticsChart, originatorAnalyticsSummary, originatorAnalyticsTimeSeries, originatorBranches, originatorBrokers, originatorBuilders, originatorCitiesBreakdown, originatorCommunityLendingBenchmark, originatorCommunityLendingMap, originatorCompanies, originatorCountiesBreakdown, originatorLenders, originatorLoans, originatorMarkets, originatorOffices, originatorProperties, originatorRelated, originatorRetention, originatorRetentionCaptured, originatorStatesBreakdown, originatorTitleCompanies, originatorZipCodes, placeCrmCall, previewAlertEmailTemplate, previewAlertRecipe, previewAlerts, previewMyAlertRecipe, propertiesAnalyticsChart, propertiesAnalyticsSummary, propertyRelated, pushToHubspot, reconcileCrmMeetings, refreshCrmRecordMirror, removeCrmContactMethod, removeCrmListMember, removeWatchedAgent, removeWatchedArea, removeWatchedDocument, requestCrmAccess, requestCrmRecordAccess, resolveProperties, retrieveLocation, revokeCrmListAccess, revokeCrmRecordAccess, revokeSavedFilterAccess, runStudioJob, runStudioQuery, saleRelated, salesAnalyticsChart, salesAnalyticsSummary, salesAnalyticsTimeSeries, salesMarketStats, searchCrmEmailRecipients, searchCrmMatchCandidates, searchCrmMentionRecords, searchCrmRecords, searchProperties, sendCrmEmail, setCrmCallAnalysis, setCrmCustomValue, setCrmOverride, setCrmRecordOwner, setDefaultCrmCallerId, shareCrmTemplate, submitAgentsBulkDelivery, submitBranchesBulkDelivery, submitCompaniesBulkDelivery, submitLoansBulkDelivery, submitOriginatorsBulkDelivery, submitPropertiesBulkDelivery, subscribeAlertRecipe, suggestLocations, suggestOfficeNames, transcribeCrmCall, transferCrmListOwnership, undoCrmImport, unshareCrmTemplate, unsubscribeAlertRecipe, updateAlertConditions, updateCrmContactMethod, updateCrmList, updateCrmListField, updateCrmMeeting, updateCrmObjectField, updateCrmTask, updateCrmTemplate, updateMe, updateMyAlertRecipe, updateSavedFilter };
@@ -2958,6 +2958,24 @@ var Companies = class {
2958
2958
  });
2959
2959
  }
2960
2960
  /**
2961
+ * Retained borrowers likely to list their home (weekly)
2962
+ *
2963
+ * The company's retained borrowers (their latest loan is still the company's) whose home looks likely to be listed for sale soon, each with the company loan officer who wrote that loan — only LOs the company employed on the loan, not brokers' LOs on loans it only funded. Each row carries a likely-to-list score from 0 to 100: a priority / likelihood ranking, not a probability. Highest score first; filter to one LO with `originator`. "Likely to list" is the LO Borrower Retention tab's rule: a score of 90 or more, and not listed for sale or under contract now (those are in `active-listings`). Checked weekly with the retention snapshot — `computedAt` says when. 404 means not computed for this company yet.
2964
+ */
2965
+ static retentionLikelyToSell(options) {
2966
+ return (options.client ?? client).get({
2967
+ security: [{
2968
+ name: "x-api-key",
2969
+ type: "apiKey"
2970
+ }, {
2971
+ scheme: "bearer",
2972
+ type: "http"
2973
+ }],
2974
+ url: "/v1/companies/{nmlsId}/retention/likely-to-sell",
2975
+ ...options
2976
+ });
2977
+ }
2978
+ /**
2961
2979
  * Loan originators sponsored by this company
2962
2980
  */
2963
2981
  static sponsoredIndividuals(options) {
@@ -7768,6 +7786,218 @@ var SavedFilters = class {
7768
7786
  });
7769
7787
  }
7770
7788
  };
7789
+ var Studio = class {
7790
+ /**
7791
+ * Tables you can query in Studio, with their columns
7792
+ *
7793
+ * Everything a Studio question can read: the market tables (recorded mortgage loans, home listings and sales), the result tables of your organization's own saved jobs, the files your organization uploaded (`upload_…`) and your organization's CRM (`crm_…`: the lists shared with the whole organization and the records in them, refreshed about every 15 minutes; they join to market data on NMLS ids). Each table lists its columns with a type and a plain-language description, and notes worth reading before writing SQL. `limits` says how many rows an answer can carry and how long a question may run; `guidance` says how to write SQL that works here. `notes` carries anything worth telling the user about the catalog itself, such as why there are no CRM tables yet. Read this before the first question in a conversation. Free.
7794
+ */
7795
+ static getStudioCatalog(options) {
7796
+ return (options?.client ?? client).get({
7797
+ security: [{
7798
+ name: "x-api-key",
7799
+ type: "apiKey"
7800
+ }, {
7801
+ scheme: "bearer",
7802
+ type: "http"
7803
+ }],
7804
+ url: "/v1/studio/catalog",
7805
+ ...options
7806
+ });
7807
+ }
7808
+ /**
7809
+ * Your organization's saved jobs
7810
+ *
7811
+ * Every job your organization has saved, each with its schedule, when it next runs, the table its result is in, and how its last run went. Free.
7812
+ */
7813
+ static listStudioJobs(options) {
7814
+ return (options?.client ?? client).get({
7815
+ security: [{
7816
+ name: "x-api-key",
7817
+ type: "apiKey"
7818
+ }, {
7819
+ scheme: "bearer",
7820
+ type: "http"
7821
+ }],
7822
+ url: "/v1/studio/jobs",
7823
+ ...options
7824
+ });
7825
+ }
7826
+ /**
7827
+ * Save a question as a job
7828
+ *
7829
+ * Save a SQL question to run again: on a schedule (`daily`, `weekly`) or only when asked (`manual`). Each run stores its result as a table named after the job, which later questions — and later jobs — can query like any other table. Name the `keys` (the columns that identify one row) to get 'what changed since the last run', and add `alerts` to flag new rows, removed rows or a number crossing a threshold. The SQL is checked when the job is saved: an unknown table or column, or a key that is not in the result, is refused here rather than at the first run. Saving does not run the job. Saving is free; each run that succeeds costs 10 credits, including the runs a `daily` or `weekly` schedule starts.
7830
+ */
7831
+ static createStudioJob(options) {
7832
+ return (options.client ?? client).post({
7833
+ security: [{
7834
+ name: "x-api-key",
7835
+ type: "apiKey"
7836
+ }, {
7837
+ scheme: "bearer",
7838
+ type: "http"
7839
+ }],
7840
+ url: "/v1/studio/jobs",
7841
+ ...options,
7842
+ headers: {
7843
+ "Content-Type": "application/json",
7844
+ ...options.headers
7845
+ }
7846
+ });
7847
+ }
7848
+ /**
7849
+ * Delete a job and its results
7850
+ *
7851
+ * Delete a saved job, its run history and its result tables. Questions and jobs that read its table stop working. Free.
7852
+ */
7853
+ static deleteStudioJob(options) {
7854
+ return (options.client ?? client).delete({
7855
+ security: [{
7856
+ name: "x-api-key",
7857
+ type: "apiKey"
7858
+ }, {
7859
+ scheme: "bearer",
7860
+ type: "http"
7861
+ }],
7862
+ url: "/v1/studio/jobs/{name}",
7863
+ ...options
7864
+ });
7865
+ }
7866
+ /**
7867
+ * One job: its runs, what changed, and where its result is
7868
+ *
7869
+ * A saved job with its recent runs (newest first), what changed in the latest successful run since the one before it, the alert rules that matched, and `result.table` — the table to query for its rows. Poll this after starting a run that answered `running`. Free.
7870
+ */
7871
+ static getStudioJob(options) {
7872
+ return (options.client ?? client).get({
7873
+ security: [{
7874
+ name: "x-api-key",
7875
+ type: "apiKey"
7876
+ }, {
7877
+ scheme: "bearer",
7878
+ type: "http"
7879
+ }],
7880
+ url: "/v1/studio/jobs/{name}",
7881
+ ...options
7882
+ });
7883
+ }
7884
+ /**
7885
+ * Run a job now
7886
+ *
7887
+ * Run a saved job now. Answers `200` with the finished run (its row count, what changed and any alerts) when it ends within a few seconds; otherwise `202` with `status: running`, and the run carries on — read the job to see how it ended. A run that fails answers `422` with `code: job_failed` and the reason. One job runs at a time per organization. 10 credits for a run that succeeds; a failed run is free. A run that has succeeded by the time this returns is charged now (`credits.charged`, with `credits.remaining`). One still running is charged when it finishes successfully: `credits.charged` is 0 and `credits.pending` says what it will cost.
7888
+ */
7889
+ static runStudioJob(options) {
7890
+ return (options.client ?? client).post({
7891
+ security: [{
7892
+ name: "x-api-key",
7893
+ type: "apiKey"
7894
+ }, {
7895
+ scheme: "bearer",
7896
+ type: "http"
7897
+ }],
7898
+ url: "/v1/studio/jobs/{name}/run",
7899
+ ...options
7900
+ });
7901
+ }
7902
+ /**
7903
+ * Answer one question with SQL
7904
+ *
7905
+ * Run one read-only SQL SELECT over the tables in the catalog and get the rows back. Use it for questions the list and analytics routes cannot answer in one call: a ranking across every company or agent in a market, a join between loans and sales, a custom roll-up. The data is stored by state: filter by `state` (and a date range) whenever the question allows, and aggregate in SQL instead of fetching rows. `rows` carries up to `limit` rows (default 200, at most 1000); `rowCount` is always the full count and `truncated` says when there are more. A question that runs too long is stopped with `timeout`: narrow it, or save it as a job. Only tables in the catalog can be read; nothing can be written. 5 credits per answered question; a refused or failed question is free. `credits` in the answer says what this question was charged and how many credits are left.
7906
+ */
7907
+ static runStudioQuery(options) {
7908
+ return (options.client ?? client).post({
7909
+ security: [{
7910
+ name: "x-api-key",
7911
+ type: "apiKey"
7912
+ }, {
7913
+ scheme: "bearer",
7914
+ type: "http"
7915
+ }],
7916
+ url: "/v1/studio/query",
7917
+ ...options,
7918
+ headers: {
7919
+ "Content-Type": "application/json",
7920
+ ...options.headers
7921
+ }
7922
+ });
7923
+ }
7924
+ /**
7925
+ * Your organization's uploads
7926
+ *
7927
+ * Every file your organization has uploaded: its name, the table it is queried as, its columns and row count, when it was uploaded and by whom, and its status. Only your organization's uploads are listed; no other organization can see or query them. Free.
7928
+ */
7929
+ static listStudioUploads(options) {
7930
+ return (options?.client ?? client).get({
7931
+ security: [{
7932
+ name: "x-api-key",
7933
+ type: "apiKey"
7934
+ }, {
7935
+ scheme: "bearer",
7936
+ type: "http"
7937
+ }],
7938
+ url: "/v1/studio/uploads",
7939
+ ...options
7940
+ });
7941
+ }
7942
+ /**
7943
+ * Start an upload: get a URL to send a file to
7944
+ *
7945
+ * Turn a file of your own data — leads, closed and lost loans, a client list — into a table only your organization can query and join to the market tables. This is step one of three: it reserves the name and answers with `uploadUrl`. Step two: send the file to `uploadUrl` with HTTP PUT (the file's bytes as the body; it must be exactly `sizeBytes` long). Step three: call complete. Files can be CSV, TSV, Excel (.xlsx) or Parquet, up to 100 MB, 2,000,000 rows and 200 columns; an organization can keep 25 uploads and 1 GB in total. The table will be `upload_<name>`. Asking again for a name whose file never arrived replaces the earlier request. Free.
7946
+ */
7947
+ static createStudioUpload(options) {
7948
+ return (options.client ?? client).post({
7949
+ security: [{
7950
+ name: "x-api-key",
7951
+ type: "apiKey"
7952
+ }, {
7953
+ scheme: "bearer",
7954
+ type: "http"
7955
+ }],
7956
+ url: "/v1/studio/uploads",
7957
+ ...options,
7958
+ headers: {
7959
+ "Content-Type": "application/json",
7960
+ ...options.headers
7961
+ }
7962
+ });
7963
+ }
7964
+ /**
7965
+ * Delete an upload and its table, permanently
7966
+ *
7967
+ * Delete an upload: its table, the rows that were read from the file, and its record. It leaves the catalog at once, and questions and jobs that read the table stop working. This cannot be undone — to get the table back, upload the file again. Free.
7968
+ */
7969
+ static deleteStudioUpload(options) {
7970
+ return (options.client ?? client).delete({
7971
+ security: [{
7972
+ name: "x-api-key",
7973
+ type: "apiKey"
7974
+ }, {
7975
+ scheme: "bearer",
7976
+ type: "http"
7977
+ }],
7978
+ url: "/v1/studio/uploads/{name}",
7979
+ ...options
7980
+ });
7981
+ }
7982
+ /**
7983
+ * Finish an upload: turn the file into a table
7984
+ *
7985
+ * Call this after the file has been sent to the upload URL. The file is read into the table `upload_<name>`, and the answer says what it holds: `columns` (names made safe for SQL, with a type each), `rowCount`, `warnings` (anything that was changed, skipped or kept as text — read them to the user) and `joinHints` (which columns line up with the market tables, with a join condition to copy). A small file answers `200` with `status: ready`. A large one answers `202` with `status: ingesting`: call complete again in a few seconds to collect the result. Calling it again on a ready upload is safe and answers with the same table. A file that cannot be used answers `422` and says why; create the upload again to send a corrected file. The original file is deleted once it has been read. Free.
7986
+ */
7987
+ static completeStudioUpload(options) {
7988
+ return (options.client ?? client).post({
7989
+ security: [{
7990
+ name: "x-api-key",
7991
+ type: "apiKey"
7992
+ }, {
7993
+ scheme: "bearer",
7994
+ type: "http"
7995
+ }],
7996
+ url: "/v1/studio/uploads/{name}/complete",
7997
+ ...options
7998
+ });
7999
+ }
8000
+ };
7771
8001
  //#endregion
7772
8002
  //#region src/index.ts
7773
8003
  /**
@@ -7818,4 +8048,4 @@ function createClient(config = {}) {
7818
8048
  };
7819
8049
  }
7820
8050
  //#endregion
7821
- export { client as C, Signals as S, Realtime as _, Branches as a, SavedFilters as b, Integrations as c, Locations as d, Market as f, Properties as g, Originators as h, Alerts as i, Lenders as l, Offices as m, createClient as n, Companies as o, Me as p, Agents as r, Crm as s, createApiClient as t, Loans as u, Related as v, Search as x, Sales as y };
8051
+ export { Studio as C, Signals as S, Realtime as _, Branches as a, SavedFilters as b, Integrations as c, Locations as d, Market as f, Properties as g, Originators as h, Alerts as i, Lenders as l, Offices as m, createClient as n, Companies as o, Me as p, Agents as r, Crm as s, createApiClient as t, Loans as u, Related as v, client as w, Search as x, Sales as y };