@model-match/api 3.77.0 → 3.78.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 { n as createClient, w as client } from "../src-D7eIbeGl.mjs";
1
+ import { n as createClient, w as client } from "../src-Ccn-ewCn.mjs";
2
2
  //#region src/slim/sdk.gen.ts
3
3
  /**
4
4
  * Search agents with filters
@@ -6499,6 +6499,110 @@ const runStudioJob = (options) => (options.client ?? client).post({
6499
6499
  ...options
6500
6500
  });
6501
6501
  /**
6502
+ * Your organization's models
6503
+ *
6504
+ * Every model your organization has: its status, what it predicts, the data points it uses, its report card and where its scores are. Only your organization's models are listed. Listing is free; a model that has just finished is charged for here if this is the first call to see it (`credits`), exactly as getStudioModel would.
6505
+ */
6506
+ const listStudioModels = (options) => (options?.client ?? client).get({
6507
+ security: [{
6508
+ name: "x-api-key",
6509
+ type: "apiKey"
6510
+ }, {
6511
+ scheme: "bearer",
6512
+ type: "http"
6513
+ }],
6514
+ url: "/v1/studio/models",
6515
+ ...options
6516
+ });
6517
+ /**
6518
+ * Create a prediction model and start training it
6519
+ *
6520
+ * Define a model — what to predict, for whom, in which state, and the data points to use — and start training it. It answers at once with `status: training`; training takes a few minutes, so read the model with getStudioModel until it is `ready` or `refused`. `features` is the heart of it: the data points the person believes matter. Their own knowledge can be data points too — columns of their uploaded outcomes table such as a lead source or a rating their team gives. To learn from their own results instead of a market outcome, pass `outcomeSource` (an uploaded table with a home, a date and what happened on every row); that usually helps most. Everything a model learns from is taken strictly before each case's date, and a data point that could show it the answer is refused with the reason. To try a different list of data points, send the same `name` with `replace: true`, or a new name with `basedOn`: the new report card says what changed. A request that cannot work is refused now with a clear reason (`error`, `code`, and the numbers in `details`). One model trains at a time per organization, up to 10 models. 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free.
6521
+ */
6522
+ const createStudioModel = (options) => (options.client ?? client).post({
6523
+ security: [{
6524
+ name: "x-api-key",
6525
+ type: "apiKey"
6526
+ }, {
6527
+ scheme: "bearer",
6528
+ type: "http"
6529
+ }],
6530
+ url: "/v1/studio/models",
6531
+ ...options,
6532
+ headers: {
6533
+ "Content-Type": "application/json",
6534
+ ...options.headers
6535
+ }
6536
+ });
6537
+ /**
6538
+ * What a prediction model can be built from
6539
+ *
6540
+ * Everything needed to define a model: the outcomes that can be predicted, who can be scored (`populations`), the data points a model may use, grouped by theme, each with a line on why someone might believe it matters, the limits, and what a table of your own outcomes must contain. Call this first, show the themes, and ASK which data points the person believes matter: a model is trained on exactly their picks, and its report card tests that belief. Free.
6541
+ */
6542
+ const getStudioModelOptions = (options) => (options?.client ?? client).get({
6543
+ security: [{
6544
+ name: "x-api-key",
6545
+ type: "apiKey"
6546
+ }, {
6547
+ scheme: "bearer",
6548
+ type: "http"
6549
+ }],
6550
+ url: "/v1/studio/models/options",
6551
+ ...options
6552
+ });
6553
+ /**
6554
+ * Delete a model, its report card and its scores, permanently
6555
+ *
6556
+ * Delete a model: the trained model, its report card and its scores table. The table leaves the catalog at once, and questions and jobs that read it stop working. A run in progress is stopped. This cannot be undone. Free.
6557
+ */
6558
+ const deleteStudioModel = (options) => (options.client ?? client).delete({
6559
+ security: [{
6560
+ name: "x-api-key",
6561
+ type: "apiKey"
6562
+ }, {
6563
+ scheme: "bearer",
6564
+ type: "http"
6565
+ }],
6566
+ url: "/v1/studio/models/{name}",
6567
+ ...options
6568
+ });
6569
+ /**
6570
+ * A model: its status and its report card
6571
+ *
6572
+ * The model and, once training has finished, its report card (`card`). Read the card as it is written. It says how many past cases the model learned from and was tested on; the lift (`in the top 10% of the list, X of every 100 had the outcome, against Y at random and Z for the best simple rule`); three checks, each passed or not; how much each chosen data point mattered; how the person's picks compare with using every data point; and the caveats. Never promise accuracy, and never call a score a probability unless `card.calibration.calibrated` is true (then `estimatedChance` is an estimate from past cases). `status: refused` means the model is not dependable enough to publish: `card.refusal.reason` says why and `card.refusal.whatWouldHelp` what to try; a refused model has no scores. When `scores` is not null, query `scores.table` with runStudioQuery: one row per home with `rank`, `percentile`, `score`, `topReason`, and `propertyId` to join to `loans` and `sales`. Reading is free. 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free. 10 credits for refreshed scores, charged once, the same way (a scheduled refresh too). The charge is reported in `credits`.
6573
+ */
6574
+ const getStudioModel = (options) => (options.client ?? client).get({
6575
+ security: [{
6576
+ name: "x-api-key",
6577
+ type: "apiKey"
6578
+ }, {
6579
+ scheme: "bearer",
6580
+ type: "http"
6581
+ }],
6582
+ url: "/v1/studio/models/{name}",
6583
+ ...options
6584
+ });
6585
+ /**
6586
+ * Refresh a model's scores with the latest data
6587
+ *
6588
+ * Score the model's population again as of today, with the trained model as it is. The current scores stay queryable until the new ones are ready; read the model with getStudioModel to see when (`refresh` goes back to null and `scores.asOf` moves). Pass `retrain: true` to also train it again on the latest data (the same data points, a fresh report card; if it no longer passes its checks it becomes `refused` and its scores are taken down). A model with a `weekly` or `monthly` schedule is refreshed on its own. 10 credits for refreshed scores, charged once, the same way (a scheduled refresh too). 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free.
6589
+ */
6590
+ const refreshStudioModel = (options) => (options.client ?? client).post({
6591
+ security: [{
6592
+ name: "x-api-key",
6593
+ type: "apiKey"
6594
+ }, {
6595
+ scheme: "bearer",
6596
+ type: "http"
6597
+ }],
6598
+ url: "/v1/studio/models/{name}/refresh",
6599
+ ...options,
6600
+ headers: {
6601
+ "Content-Type": "application/json",
6602
+ ...options.headers
6603
+ }
6604
+ });
6605
+ /**
6502
6606
  * Answer one question with SQL
6503
6607
  *
6504
6608
  * 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.
@@ -6587,4 +6691,4 @@ const completeStudioUpload = (options) => (options.client ?? client).post({
6587
6691
  ...options
6588
6692
  });
6589
6693
  //#endregion
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 };
6694
+ 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, createStudioModel, createStudioUpload, crmLenderChannels, crmLoLoanMix, crmLoMomentum, crmLoSponsorLocation, crmSimilarOriginators, declineCrmMiUpdate, deleteAlertSubscription, deleteCrmCallerId, deleteCrmList, deleteCrmListField, deleteCrmMeeting, deleteCrmNote, deleteCrmObjectField, deleteCrmRecord, deleteCrmRecords, deleteCrmTask, deleteCrmTemplate, deleteMyAlertRecipe, deleteSavedFilter, deleteStudioJob, deleteStudioModel, 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, getStudioModel, getStudioModelOptions, 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, listStudioModels, 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, refreshStudioModel, 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 };
@@ -7900,6 +7900,122 @@ var Studio = class {
7900
7900
  });
7901
7901
  }
7902
7902
  /**
7903
+ * Your organization's models
7904
+ *
7905
+ * Every model your organization has: its status, what it predicts, the data points it uses, its report card and where its scores are. Only your organization's models are listed. Listing is free; a model that has just finished is charged for here if this is the first call to see it (`credits`), exactly as getStudioModel would.
7906
+ */
7907
+ static listStudioModels(options) {
7908
+ return (options?.client ?? client).get({
7909
+ security: [{
7910
+ name: "x-api-key",
7911
+ type: "apiKey"
7912
+ }, {
7913
+ scheme: "bearer",
7914
+ type: "http"
7915
+ }],
7916
+ url: "/v1/studio/models",
7917
+ ...options
7918
+ });
7919
+ }
7920
+ /**
7921
+ * Create a prediction model and start training it
7922
+ *
7923
+ * Define a model — what to predict, for whom, in which state, and the data points to use — and start training it. It answers at once with `status: training`; training takes a few minutes, so read the model with getStudioModel until it is `ready` or `refused`. `features` is the heart of it: the data points the person believes matter. Their own knowledge can be data points too — columns of their uploaded outcomes table such as a lead source or a rating their team gives. To learn from their own results instead of a market outcome, pass `outcomeSource` (an uploaded table with a home, a date and what happened on every row); that usually helps most. Everything a model learns from is taken strictly before each case's date, and a data point that could show it the answer is refused with the reason. To try a different list of data points, send the same `name` with `replace: true`, or a new name with `basedOn`: the new report card says what changed. A request that cannot work is refused now with a clear reason (`error`, `code`, and the numbers in `details`). One model trains at a time per organization, up to 10 models. 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free.
7924
+ */
7925
+ static createStudioModel(options) {
7926
+ return (options.client ?? client).post({
7927
+ security: [{
7928
+ name: "x-api-key",
7929
+ type: "apiKey"
7930
+ }, {
7931
+ scheme: "bearer",
7932
+ type: "http"
7933
+ }],
7934
+ url: "/v1/studio/models",
7935
+ ...options,
7936
+ headers: {
7937
+ "Content-Type": "application/json",
7938
+ ...options.headers
7939
+ }
7940
+ });
7941
+ }
7942
+ /**
7943
+ * What a prediction model can be built from
7944
+ *
7945
+ * Everything needed to define a model: the outcomes that can be predicted, who can be scored (`populations`), the data points a model may use, grouped by theme, each with a line on why someone might believe it matters, the limits, and what a table of your own outcomes must contain. Call this first, show the themes, and ASK which data points the person believes matter: a model is trained on exactly their picks, and its report card tests that belief. Free.
7946
+ */
7947
+ static getStudioModelOptions(options) {
7948
+ return (options?.client ?? client).get({
7949
+ security: [{
7950
+ name: "x-api-key",
7951
+ type: "apiKey"
7952
+ }, {
7953
+ scheme: "bearer",
7954
+ type: "http"
7955
+ }],
7956
+ url: "/v1/studio/models/options",
7957
+ ...options
7958
+ });
7959
+ }
7960
+ /**
7961
+ * Delete a model, its report card and its scores, permanently
7962
+ *
7963
+ * Delete a model: the trained model, its report card and its scores table. The table leaves the catalog at once, and questions and jobs that read it stop working. A run in progress is stopped. This cannot be undone. Free.
7964
+ */
7965
+ static deleteStudioModel(options) {
7966
+ return (options.client ?? client).delete({
7967
+ security: [{
7968
+ name: "x-api-key",
7969
+ type: "apiKey"
7970
+ }, {
7971
+ scheme: "bearer",
7972
+ type: "http"
7973
+ }],
7974
+ url: "/v1/studio/models/{name}",
7975
+ ...options
7976
+ });
7977
+ }
7978
+ /**
7979
+ * A model: its status and its report card
7980
+ *
7981
+ * The model and, once training has finished, its report card (`card`). Read the card as it is written. It says how many past cases the model learned from and was tested on; the lift (`in the top 10% of the list, X of every 100 had the outcome, against Y at random and Z for the best simple rule`); three checks, each passed or not; how much each chosen data point mattered; how the person's picks compare with using every data point; and the caveats. Never promise accuracy, and never call a score a probability unless `card.calibration.calibrated` is true (then `estimatedChance` is an estimate from past cases). `status: refused` means the model is not dependable enough to publish: `card.refusal.reason` says why and `card.refusal.whatWouldHelp` what to try; a refused model has no scores. When `scores` is not null, query `scores.table` with runStudioQuery: one row per home with `rank`, `percentile`, `score`, `topReason`, and `propertyId` to join to `loans` and `sales`. Reading is free. 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free. 10 credits for refreshed scores, charged once, the same way (a scheduled refresh too). The charge is reported in `credits`.
7982
+ */
7983
+ static getStudioModel(options) {
7984
+ return (options.client ?? client).get({
7985
+ security: [{
7986
+ name: "x-api-key",
7987
+ type: "apiKey"
7988
+ }, {
7989
+ scheme: "bearer",
7990
+ type: "http"
7991
+ }],
7992
+ url: "/v1/studio/models/{name}",
7993
+ ...options
7994
+ });
7995
+ }
7996
+ /**
7997
+ * Refresh a model's scores with the latest data
7998
+ *
7999
+ * Score the model's population again as of today, with the trained model as it is. The current scores stay queryable until the new ones are ready; read the model with getStudioModel to see when (`refresh` goes back to null and `scores.asOf` moves). Pass `retrain: true` to also train it again on the latest data (the same data points, a fresh report card; if it no longer passes its checks it becomes `refused` and its scores are taken down). A model with a `weekly` or `monthly` schedule is refreshed on its own. 10 credits for refreshed scores, charged once, the same way (a scheduled refresh too). 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free.
8000
+ */
8001
+ static refreshStudioModel(options) {
8002
+ return (options.client ?? client).post({
8003
+ security: [{
8004
+ name: "x-api-key",
8005
+ type: "apiKey"
8006
+ }, {
8007
+ scheme: "bearer",
8008
+ type: "http"
8009
+ }],
8010
+ url: "/v1/studio/models/{name}/refresh",
8011
+ ...options,
8012
+ headers: {
8013
+ "Content-Type": "application/json",
8014
+ ...options.headers
8015
+ }
8016
+ });
8017
+ }
8018
+ /**
7903
8019
  * Answer one question with SQL
7904
8020
  *
7905
8021
  * 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.