@model-match/api 3.19.0 → 3.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-Jxa7eF3K.d.mts → index-B37G0lV3.d.mts} +722 -7
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/slim/index.d.mts +38 -2
- package/dist/slim/index.mjs +134 -2
- package/dist/{src-CjmGJZ9U.mjs → src-CkGOuklD.mjs} +132 -0
- package/openapi.json +2269 -653
- package/package.json +2 -2
package/dist/slim/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as createClient, w as client } from "../src-
|
|
1
|
+
import { n as createClient, w as client } from "../src-CkGOuklD.mjs";
|
|
2
2
|
//#region src/slim/sdk.gen.ts
|
|
3
3
|
/**
|
|
4
4
|
* An LO's sponsorship / registration links (admin)
|
|
@@ -510,6 +510,7 @@ const getAlertConditions = (options) => {
|
|
|
510
510
|
};
|
|
511
511
|
/**
|
|
512
512
|
* Update your alert settings
|
|
513
|
+
* Saves your NMLS id, contact identity and tunables. The per-trigger `enabled` flags are deprecated: subscribe to alert recipes or manage subscriptions instead. While still accepted, `enabled[type]: true` turns the trigger on for every watched subject that supports it, and `false` turns it off everywhere.
|
|
513
514
|
*/
|
|
514
515
|
const updateAlertConditions = (options) => {
|
|
515
516
|
return (options?.client ?? client).put({
|
|
@@ -630,6 +631,137 @@ const previewAlerts = (options) => {
|
|
|
630
631
|
});
|
|
631
632
|
};
|
|
632
633
|
/**
|
|
634
|
+
* List alert recipes
|
|
635
|
+
* The alert recipes — named bundles of alert triggers — with the inputs each needs and whether you are subscribed.
|
|
636
|
+
*/
|
|
637
|
+
const listAlertRecipes = (options) => {
|
|
638
|
+
return (options?.client ?? client).get({
|
|
639
|
+
security: [{
|
|
640
|
+
name: "x-api-key",
|
|
641
|
+
type: "apiKey"
|
|
642
|
+
}, {
|
|
643
|
+
scheme: "bearer",
|
|
644
|
+
type: "http"
|
|
645
|
+
}],
|
|
646
|
+
url: "/v1/alerts/recipes",
|
|
647
|
+
...options
|
|
648
|
+
});
|
|
649
|
+
};
|
|
650
|
+
/**
|
|
651
|
+
* Unsubscribe from an alert recipe
|
|
652
|
+
* Turns the recipe's alert triggers off. Saved agents, areas and records stay; remove them with the watch-list endpoints.
|
|
653
|
+
*/
|
|
654
|
+
const unsubscribeAlertRecipe = (options) => {
|
|
655
|
+
return (options.client ?? client).delete({
|
|
656
|
+
security: [{
|
|
657
|
+
name: "x-api-key",
|
|
658
|
+
type: "apiKey"
|
|
659
|
+
}, {
|
|
660
|
+
scheme: "bearer",
|
|
661
|
+
type: "http"
|
|
662
|
+
}],
|
|
663
|
+
url: "/v1/alerts/recipes/{id}",
|
|
664
|
+
...options
|
|
665
|
+
});
|
|
666
|
+
};
|
|
667
|
+
/**
|
|
668
|
+
* Subscribe to an alert recipe
|
|
669
|
+
* Turns on the recipe's alert triggers, saves its inputs (NMLS id, agents, areas or a record), and backfills recent matches. For watch-record, empty rules apply the default for the record type: property — foreclosure status changes, or sale propensity reaches 50; sale — listing status changes; loan — interest rate moves by 0.125 points or more.
|
|
670
|
+
*/
|
|
671
|
+
const subscribeAlertRecipe = (options) => {
|
|
672
|
+
return (options.client ?? client).post({
|
|
673
|
+
security: [{
|
|
674
|
+
name: "x-api-key",
|
|
675
|
+
type: "apiKey"
|
|
676
|
+
}, {
|
|
677
|
+
scheme: "bearer",
|
|
678
|
+
type: "http"
|
|
679
|
+
}],
|
|
680
|
+
url: "/v1/alerts/recipes/{id}",
|
|
681
|
+
...options,
|
|
682
|
+
headers: {
|
|
683
|
+
"Content-Type": "application/json",
|
|
684
|
+
...options?.headers
|
|
685
|
+
}
|
|
686
|
+
});
|
|
687
|
+
};
|
|
688
|
+
/**
|
|
689
|
+
* Preview an alert recipe
|
|
690
|
+
* Dry-run the recipe over the last 30 days for you, with the given inputs applied on top of your saved ones. Writes nothing.
|
|
691
|
+
*/
|
|
692
|
+
const previewAlertRecipe = (options) => {
|
|
693
|
+
return (options.client ?? client).post({
|
|
694
|
+
security: [{
|
|
695
|
+
name: "x-api-key",
|
|
696
|
+
type: "apiKey"
|
|
697
|
+
}, {
|
|
698
|
+
scheme: "bearer",
|
|
699
|
+
type: "http"
|
|
700
|
+
}],
|
|
701
|
+
url: "/v1/alerts/recipes/{id}/preview",
|
|
702
|
+
...options,
|
|
703
|
+
headers: {
|
|
704
|
+
"Content-Type": "application/json",
|
|
705
|
+
...options?.headers
|
|
706
|
+
}
|
|
707
|
+
});
|
|
708
|
+
};
|
|
709
|
+
/**
|
|
710
|
+
* List your alert subscriptions
|
|
711
|
+
* Every subject you watch — agents, areas, your NMLS id, records — with the alert kinds that fire on it and the recipes that turned them on.
|
|
712
|
+
*/
|
|
713
|
+
const listAlertSubscriptions = (options) => {
|
|
714
|
+
return (options?.client ?? client).get({
|
|
715
|
+
security: [{
|
|
716
|
+
name: "x-api-key",
|
|
717
|
+
type: "apiKey"
|
|
718
|
+
}, {
|
|
719
|
+
scheme: "bearer",
|
|
720
|
+
type: "http"
|
|
721
|
+
}],
|
|
722
|
+
url: "/v1/alerts/subscriptions",
|
|
723
|
+
...options
|
|
724
|
+
});
|
|
725
|
+
};
|
|
726
|
+
/**
|
|
727
|
+
* Subscribe to alerts on a subject
|
|
728
|
+
* Watch a subject (an agent, an area, your NMLS id, or a sale / property / loan with rules) for the given alert kinds. Re-posting the same subject replaces the kinds you set directly; kinds a recipe turned on stay. Recent matches are backfilled when kinds are added.
|
|
729
|
+
*/
|
|
730
|
+
const createAlertSubscription = (options) => {
|
|
731
|
+
return (options?.client ?? client).post({
|
|
732
|
+
security: [{
|
|
733
|
+
name: "x-api-key",
|
|
734
|
+
type: "apiKey"
|
|
735
|
+
}, {
|
|
736
|
+
scheme: "bearer",
|
|
737
|
+
type: "http"
|
|
738
|
+
}],
|
|
739
|
+
url: "/v1/alerts/subscriptions",
|
|
740
|
+
...options,
|
|
741
|
+
headers: {
|
|
742
|
+
"Content-Type": "application/json",
|
|
743
|
+
...options?.headers
|
|
744
|
+
}
|
|
745
|
+
});
|
|
746
|
+
};
|
|
747
|
+
/**
|
|
748
|
+
* Remove an alert subscription
|
|
749
|
+
* Stops watching the subject (idempotent). For a record watch this also forgets its baseline, so watching it again starts fresh.
|
|
750
|
+
*/
|
|
751
|
+
const deleteAlertSubscription = (options) => {
|
|
752
|
+
return (options.client ?? client).delete({
|
|
753
|
+
security: [{
|
|
754
|
+
name: "x-api-key",
|
|
755
|
+
type: "apiKey"
|
|
756
|
+
}, {
|
|
757
|
+
scheme: "bearer",
|
|
758
|
+
type: "http"
|
|
759
|
+
}],
|
|
760
|
+
url: "/v1/alerts/subscriptions/{id}",
|
|
761
|
+
...options
|
|
762
|
+
});
|
|
763
|
+
};
|
|
764
|
+
/**
|
|
633
765
|
* Get your unread alert count
|
|
634
766
|
*/
|
|
635
767
|
const getAlertUnreadCount = (options) => {
|
|
@@ -5831,4 +5963,4 @@ const getSearchToken = (options) => {
|
|
|
5831
5963
|
});
|
|
5832
5964
|
};
|
|
5833
5965
|
//#endregion
|
|
5834
|
-
export { client as _heyApiClient, actionCrmCallerId, addCrmContactMethod, addCrmListMember, addCrmListMembersBulk, addCrmNote, addCrmRecord, addCrmRecordsBulk, addWatchedAgent, addWatchedArea, addWatchedDocument, adminGetBulkJob, adminGetCadLinks, adminGetCadLoadTask, adminLaunchCadLoad, agentAnalyticsChart, agentAnalyticsSummary, agentAnalyticsTimeSeries, agentCities, agentCompanies, agentCounties, agentLenders, agentMarkets, agentOffices, agentOriginators, agentProperties, agentRelated, agentSales, agentStates, agentZipCodes, analyzeCrmCall, applyCrmEnrichment, applyCrmListTemplate, applyCrmMiUpdates, branchAnalyticsChart, branchAnalyticsSummary, branchAnalyticsTimeSeries, branchCities, branchCounties, branchLenders, branchLoans, branchOriginators, branchRoster, branchStates, branchTitleCompanies, cancelAgentsBulkDeliveryJob, cancelBranchesBulkDeliveryJob, cancelCompaniesBulkDeliveryJob, cancelEnrichBulkJob, cancelLoansBulkDeliveryJob, cancelOriginatorsBulkDeliveryJob, cancelPropertiesBulkDeliveryJob, companyAgents, companyAnalyticsChart, companyAnalyticsSummary, companyAnalyticsTimeSeries, companyBranches, companyBrokers, companyCities, companyCounties, companyEarlyExits, companyEmployeeStats, companyEmployment, companyHeadcount, companyLenders, companyMarkets, companyOffices, companyOriginators, companyRelated, companySponsoredIndividuals, companySponsorshipMovement, companyStates, companyTalentFlow, companyTitleCompanies, companyZipCodes, countAgents, countBranches, countCompanies, countLenders, countLoans, countOffices, countOriginators, countProperties, countSales, createClient, createCrmList, createCrmListField, createCrmManualRecord, createCrmMeeting, createCrmObjectField, createCrmRecord, createCrmTask, createCrmTemplate, createSavedFilter, crmLenderChannels, crmLoLoanMix, crmLoMomentum, crmLoSponsorLocation, crmSimilarOriginators, declineCrmMiUpdate, deleteCrmCallerId, deleteCrmList, deleteCrmListField, deleteCrmMeeting, deleteCrmNote, deleteCrmObjectField, deleteCrmRecord, deleteCrmRecords, deleteCrmTask, deleteCrmTemplate, deleteSavedFilter, describeCrmRecordsOnAdd, dismissCrmMiUpdates, editCrmLoggedActivity, editCrmNote, enrichPropertiesBatch, enrichPropertiesBulk, enrichProperty, filterCrmListMembers, findCrmRecordByNmls, generateCrmRecordDescription, getAgent, getAgentsBulkDeliveryJob, getAlertConditions, getAlertUnreadCount, getBranch, getBranchesBulkDeliveryJob, getCompaniesBulkDeliveryJob, getCompany, getCrmActiveCall, getCrmActivityReport, getCrmCall, getCrmCallTranscript, getCrmCustomValues, getCrmImportJob, getCrmList, getCrmListMemberIds, getCrmListShares, getCrmMiUpdates, getCrmOutcomesReport, getCrmOverrides, getCrmProductionEnrichJob, getCrmRecordAccess, getCrmRecordAccessRequest, getCrmRecordConnections, getCrmRecordMemberIds, getCrmRecordProfile, getCrmTemplate, getCrmTemplateShares, getEnrichBulkJob, getHubspotPushStatus, getLender, getLoan, getLoansBulkDeliveryJob, getMe, getMeCredits, getMePlan, getOffice, getOriginator, getOriginatorsBulkDeliveryJob, getPropertiesBulkDeliveryJob, getProperty, getRealtimeConfig, getSale, getSavedFilter, getSearchToken, grantCrmListAccess, grantCrmRecordAccess, grantCrmRecordAccessRequest, hangupCrmCall, importCrmRecords, instantSearch, lenderCities, lenderCompanies, lenderCounties, lenderOriginators, lenderStates, linkCrmRecord, listAgents, listAlertDigests, listAlertLog, listBranches, listCompanies, listCrmActivity, listCrmCallerIds, listCrmCustomFields, listCrmListAssignees, listCrmListFields, listCrmListMemberships, listCrmListShareableMembers, listCrmLists, listCrmMeetings, listCrmMembers, listCrmOrgMembers, listCrmRecordShareableMembers, listCrmRecordShares, listCrmReferencedActivity, listCrmTasks, listCrmTemplates, listCrmWorkspaceMeetings, listCrmWorkspaceTasks, listEnrichments, listLenders, listLoans, listMarket, listOffices, listOriginators, listProperties, listSales, listSavedFilters, listWatchedAgents, listWatchedAreas, listWatchedDocuments, loanRelated, loansAnalyticsChart, loansAnalyticsSummary, loansAnalyticsTimeSeries, logCrmActivity, lookupCompanies, markAlertDigestRead, markAlertRead, markAllAlertsRead, marketAnalyticsChart, marketAnalyticsSummary, marketAnalyticsTimeSeries, marketCommunityLending, marketMovementActivity, marketMovementByState, marketMovementCohortPayoff, marketMovementMostGained, marketMovementMostLost, marketMovementMovers, marketMovementRankings, marketMovementStats, marketMovementTransitions, officeAgents, originatorAgents, originatorAnalyticsChart, originatorAnalyticsSummary, originatorAnalyticsTimeSeries, originatorBranches, originatorBrokers, originatorCitiesBreakdown, originatorCompanies, originatorCountiesBreakdown, originatorLenders, originatorLoans, originatorMarkets, originatorOffices, originatorProperties, originatorRelated, originatorStatesBreakdown, originatorTitleCompanies, originatorZipCodes, placeCrmCall, previewAlerts, propertiesAnalyticsChart, propertiesAnalyticsSummary, propertyRelated, pushToHubspot, reconcileCrmMeetings, refreshCrmRecordMirror, removeCrmContactMethod, removeCrmListMember, removeWatchedAgent, removeWatchedArea, removeWatchedDocument, requestCrmAccess, requestCrmRecordAccess, retrieveLocation, revokeCrmListAccess, revokeCrmRecordAccess, saleRelated, salesAnalyticsChart, salesAnalyticsSummary, salesAnalyticsTimeSeries, searchCrmEmailRecipients, searchCrmMatchCandidates, searchCrmMentionRecords, searchCrmRecords, searchProperties, sendCrmEmail, setCrmCallAnalysis, setCrmCustomValue, setCrmOverride, setCrmRecordOwner, setDefaultCrmCallerId, shareCrmTemplate, submitAgentsBulkDelivery, submitBranchesBulkDelivery, submitCompaniesBulkDelivery, submitLoansBulkDelivery, submitOriginatorsBulkDelivery, submitPropertiesBulkDelivery, suggestLocations, transcribeCrmCall, transferCrmListOwnership, unshareCrmTemplate, updateAlertConditions, updateCrmContactMethod, updateCrmList, updateCrmListField, updateCrmMeeting, updateCrmObjectField, updateCrmTask, updateCrmTemplate, updateMe, updateSavedFilter };
|
|
5966
|
+
export { client as _heyApiClient, actionCrmCallerId, addCrmContactMethod, addCrmListMember, addCrmListMembersBulk, addCrmNote, addCrmRecord, addCrmRecordsBulk, addWatchedAgent, addWatchedArea, addWatchedDocument, adminGetBulkJob, adminGetCadLinks, adminGetCadLoadTask, adminLaunchCadLoad, agentAnalyticsChart, agentAnalyticsSummary, agentAnalyticsTimeSeries, agentCities, agentCompanies, agentCounties, agentLenders, agentMarkets, agentOffices, agentOriginators, agentProperties, agentRelated, agentSales, agentStates, agentZipCodes, analyzeCrmCall, applyCrmEnrichment, applyCrmListTemplate, applyCrmMiUpdates, branchAnalyticsChart, branchAnalyticsSummary, branchAnalyticsTimeSeries, branchCities, branchCounties, branchLenders, branchLoans, branchOriginators, branchRoster, branchStates, branchTitleCompanies, cancelAgentsBulkDeliveryJob, cancelBranchesBulkDeliveryJob, cancelCompaniesBulkDeliveryJob, cancelEnrichBulkJob, cancelLoansBulkDeliveryJob, cancelOriginatorsBulkDeliveryJob, cancelPropertiesBulkDeliveryJob, companyAgents, companyAnalyticsChart, companyAnalyticsSummary, companyAnalyticsTimeSeries, companyBranches, companyBrokers, companyCities, companyCounties, companyEarlyExits, companyEmployeeStats, companyEmployment, companyHeadcount, companyLenders, companyMarkets, companyOffices, companyOriginators, companyRelated, companySponsoredIndividuals, companySponsorshipMovement, companyStates, companyTalentFlow, companyTitleCompanies, companyZipCodes, countAgents, countBranches, countCompanies, countLenders, countLoans, countOffices, countOriginators, countProperties, countSales, createAlertSubscription, createClient, createCrmList, createCrmListField, createCrmManualRecord, createCrmMeeting, createCrmObjectField, createCrmRecord, createCrmTask, createCrmTemplate, createSavedFilter, crmLenderChannels, crmLoLoanMix, crmLoMomentum, crmLoSponsorLocation, crmSimilarOriginators, declineCrmMiUpdate, deleteAlertSubscription, deleteCrmCallerId, deleteCrmList, deleteCrmListField, deleteCrmMeeting, deleteCrmNote, deleteCrmObjectField, deleteCrmRecord, deleteCrmRecords, deleteCrmTask, deleteCrmTemplate, deleteSavedFilter, describeCrmRecordsOnAdd, dismissCrmMiUpdates, editCrmLoggedActivity, editCrmNote, enrichPropertiesBatch, enrichPropertiesBulk, enrichProperty, filterCrmListMembers, findCrmRecordByNmls, generateCrmRecordDescription, getAgent, getAgentsBulkDeliveryJob, getAlertConditions, getAlertUnreadCount, getBranch, getBranchesBulkDeliveryJob, getCompaniesBulkDeliveryJob, getCompany, getCrmActiveCall, getCrmActivityReport, getCrmCall, getCrmCallTranscript, getCrmCustomValues, getCrmImportJob, getCrmList, getCrmListMemberIds, getCrmListShares, getCrmMiUpdates, getCrmOutcomesReport, getCrmOverrides, getCrmProductionEnrichJob, getCrmRecordAccess, getCrmRecordAccessRequest, getCrmRecordConnections, getCrmRecordMemberIds, getCrmRecordProfile, getCrmTemplate, getCrmTemplateShares, getEnrichBulkJob, getHubspotPushStatus, getLender, getLoan, getLoansBulkDeliveryJob, getMe, getMeCredits, getMePlan, getOffice, getOriginator, getOriginatorsBulkDeliveryJob, getPropertiesBulkDeliveryJob, getProperty, getRealtimeConfig, getSale, getSavedFilter, getSearchToken, grantCrmListAccess, grantCrmRecordAccess, grantCrmRecordAccessRequest, hangupCrmCall, importCrmRecords, instantSearch, lenderCities, lenderCompanies, lenderCounties, lenderOriginators, lenderStates, linkCrmRecord, listAgents, listAlertDigests, listAlertLog, listAlertRecipes, listAlertSubscriptions, listBranches, listCompanies, listCrmActivity, listCrmCallerIds, listCrmCustomFields, listCrmListAssignees, listCrmListFields, listCrmListMemberships, listCrmListShareableMembers, listCrmLists, listCrmMeetings, listCrmMembers, listCrmOrgMembers, listCrmRecordShareableMembers, listCrmRecordShares, listCrmReferencedActivity, listCrmTasks, listCrmTemplates, listCrmWorkspaceMeetings, listCrmWorkspaceTasks, listEnrichments, listLenders, listLoans, listMarket, listOffices, listOriginators, listProperties, listSales, listSavedFilters, listWatchedAgents, listWatchedAreas, listWatchedDocuments, loanRelated, loansAnalyticsChart, loansAnalyticsSummary, loansAnalyticsTimeSeries, logCrmActivity, lookupCompanies, markAlertDigestRead, markAlertRead, markAllAlertsRead, marketAnalyticsChart, marketAnalyticsSummary, marketAnalyticsTimeSeries, marketCommunityLending, marketMovementActivity, marketMovementByState, marketMovementCohortPayoff, marketMovementMostGained, marketMovementMostLost, marketMovementMovers, marketMovementRankings, marketMovementStats, marketMovementTransitions, officeAgents, originatorAgents, originatorAnalyticsChart, originatorAnalyticsSummary, originatorAnalyticsTimeSeries, originatorBranches, originatorBrokers, originatorCitiesBreakdown, originatorCompanies, originatorCountiesBreakdown, originatorLenders, originatorLoans, originatorMarkets, originatorOffices, originatorProperties, originatorRelated, originatorStatesBreakdown, originatorTitleCompanies, originatorZipCodes, placeCrmCall, previewAlertRecipe, previewAlerts, propertiesAnalyticsChart, propertiesAnalyticsSummary, propertyRelated, pushToHubspot, reconcileCrmMeetings, refreshCrmRecordMirror, removeCrmContactMethod, removeCrmListMember, removeWatchedAgent, removeWatchedArea, removeWatchedDocument, requestCrmAccess, requestCrmRecordAccess, retrieveLocation, revokeCrmListAccess, revokeCrmRecordAccess, saleRelated, salesAnalyticsChart, salesAnalyticsSummary, salesAnalyticsTimeSeries, searchCrmEmailRecipients, searchCrmMatchCandidates, searchCrmMentionRecords, searchCrmRecords, searchProperties, sendCrmEmail, setCrmCallAnalysis, setCrmCustomValue, setCrmOverride, setCrmRecordOwner, setDefaultCrmCallerId, shareCrmTemplate, submitAgentsBulkDelivery, submitBranchesBulkDelivery, submitCompaniesBulkDelivery, submitLoansBulkDelivery, submitOriginatorsBulkDelivery, submitPropertiesBulkDelivery, subscribeAlertRecipe, suggestLocations, transcribeCrmCall, transferCrmListOwnership, unshareCrmTemplate, unsubscribeAlertRecipe, updateAlertConditions, updateCrmContactMethod, updateCrmList, updateCrmListField, updateCrmMeeting, updateCrmObjectField, updateCrmTask, updateCrmTemplate, updateMe, updateSavedFilter };
|
|
@@ -614,6 +614,7 @@ var Alerts = class {
|
|
|
614
614
|
}
|
|
615
615
|
/**
|
|
616
616
|
* Update your alert settings
|
|
617
|
+
* Saves your NMLS id, contact identity and tunables. The per-trigger `enabled` flags are deprecated: subscribe to alert recipes or manage subscriptions instead. While still accepted, `enabled[type]: true` turns the trigger on for every watched subject that supports it, and `false` turns it off everywhere.
|
|
617
618
|
*/
|
|
618
619
|
static updateAlertConditions(options) {
|
|
619
620
|
return (options?.client ?? client).put({
|
|
@@ -734,6 +735,137 @@ var Alerts = class {
|
|
|
734
735
|
});
|
|
735
736
|
}
|
|
736
737
|
/**
|
|
738
|
+
* List alert recipes
|
|
739
|
+
* The alert recipes — named bundles of alert triggers — with the inputs each needs and whether you are subscribed.
|
|
740
|
+
*/
|
|
741
|
+
static listAlertRecipes(options) {
|
|
742
|
+
return (options?.client ?? client).get({
|
|
743
|
+
security: [{
|
|
744
|
+
name: "x-api-key",
|
|
745
|
+
type: "apiKey"
|
|
746
|
+
}, {
|
|
747
|
+
scheme: "bearer",
|
|
748
|
+
type: "http"
|
|
749
|
+
}],
|
|
750
|
+
url: "/v1/alerts/recipes",
|
|
751
|
+
...options
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
/**
|
|
755
|
+
* Unsubscribe from an alert recipe
|
|
756
|
+
* Turns the recipe's alert triggers off. Saved agents, areas and records stay; remove them with the watch-list endpoints.
|
|
757
|
+
*/
|
|
758
|
+
static unsubscribeAlertRecipe(options) {
|
|
759
|
+
return (options.client ?? client).delete({
|
|
760
|
+
security: [{
|
|
761
|
+
name: "x-api-key",
|
|
762
|
+
type: "apiKey"
|
|
763
|
+
}, {
|
|
764
|
+
scheme: "bearer",
|
|
765
|
+
type: "http"
|
|
766
|
+
}],
|
|
767
|
+
url: "/v1/alerts/recipes/{id}",
|
|
768
|
+
...options
|
|
769
|
+
});
|
|
770
|
+
}
|
|
771
|
+
/**
|
|
772
|
+
* Subscribe to an alert recipe
|
|
773
|
+
* Turns on the recipe's alert triggers, saves its inputs (NMLS id, agents, areas or a record), and backfills recent matches. For watch-record, empty rules apply the default for the record type: property — foreclosure status changes, or sale propensity reaches 50; sale — listing status changes; loan — interest rate moves by 0.125 points or more.
|
|
774
|
+
*/
|
|
775
|
+
static subscribeAlertRecipe(options) {
|
|
776
|
+
return (options.client ?? client).post({
|
|
777
|
+
security: [{
|
|
778
|
+
name: "x-api-key",
|
|
779
|
+
type: "apiKey"
|
|
780
|
+
}, {
|
|
781
|
+
scheme: "bearer",
|
|
782
|
+
type: "http"
|
|
783
|
+
}],
|
|
784
|
+
url: "/v1/alerts/recipes/{id}",
|
|
785
|
+
...options,
|
|
786
|
+
headers: {
|
|
787
|
+
"Content-Type": "application/json",
|
|
788
|
+
...options?.headers
|
|
789
|
+
}
|
|
790
|
+
});
|
|
791
|
+
}
|
|
792
|
+
/**
|
|
793
|
+
* Preview an alert recipe
|
|
794
|
+
* Dry-run the recipe over the last 30 days for you, with the given inputs applied on top of your saved ones. Writes nothing.
|
|
795
|
+
*/
|
|
796
|
+
static previewAlertRecipe(options) {
|
|
797
|
+
return (options.client ?? client).post({
|
|
798
|
+
security: [{
|
|
799
|
+
name: "x-api-key",
|
|
800
|
+
type: "apiKey"
|
|
801
|
+
}, {
|
|
802
|
+
scheme: "bearer",
|
|
803
|
+
type: "http"
|
|
804
|
+
}],
|
|
805
|
+
url: "/v1/alerts/recipes/{id}/preview",
|
|
806
|
+
...options,
|
|
807
|
+
headers: {
|
|
808
|
+
"Content-Type": "application/json",
|
|
809
|
+
...options?.headers
|
|
810
|
+
}
|
|
811
|
+
});
|
|
812
|
+
}
|
|
813
|
+
/**
|
|
814
|
+
* List your alert subscriptions
|
|
815
|
+
* Every subject you watch — agents, areas, your NMLS id, records — with the alert kinds that fire on it and the recipes that turned them on.
|
|
816
|
+
*/
|
|
817
|
+
static listAlertSubscriptions(options) {
|
|
818
|
+
return (options?.client ?? client).get({
|
|
819
|
+
security: [{
|
|
820
|
+
name: "x-api-key",
|
|
821
|
+
type: "apiKey"
|
|
822
|
+
}, {
|
|
823
|
+
scheme: "bearer",
|
|
824
|
+
type: "http"
|
|
825
|
+
}],
|
|
826
|
+
url: "/v1/alerts/subscriptions",
|
|
827
|
+
...options
|
|
828
|
+
});
|
|
829
|
+
}
|
|
830
|
+
/**
|
|
831
|
+
* Subscribe to alerts on a subject
|
|
832
|
+
* Watch a subject (an agent, an area, your NMLS id, or a sale / property / loan with rules) for the given alert kinds. Re-posting the same subject replaces the kinds you set directly; kinds a recipe turned on stay. Recent matches are backfilled when kinds are added.
|
|
833
|
+
*/
|
|
834
|
+
static createAlertSubscription(options) {
|
|
835
|
+
return (options?.client ?? client).post({
|
|
836
|
+
security: [{
|
|
837
|
+
name: "x-api-key",
|
|
838
|
+
type: "apiKey"
|
|
839
|
+
}, {
|
|
840
|
+
scheme: "bearer",
|
|
841
|
+
type: "http"
|
|
842
|
+
}],
|
|
843
|
+
url: "/v1/alerts/subscriptions",
|
|
844
|
+
...options,
|
|
845
|
+
headers: {
|
|
846
|
+
"Content-Type": "application/json",
|
|
847
|
+
...options?.headers
|
|
848
|
+
}
|
|
849
|
+
});
|
|
850
|
+
}
|
|
851
|
+
/**
|
|
852
|
+
* Remove an alert subscription
|
|
853
|
+
* Stops watching the subject (idempotent). For a record watch this also forgets its baseline, so watching it again starts fresh.
|
|
854
|
+
*/
|
|
855
|
+
static deleteAlertSubscription(options) {
|
|
856
|
+
return (options.client ?? client).delete({
|
|
857
|
+
security: [{
|
|
858
|
+
name: "x-api-key",
|
|
859
|
+
type: "apiKey"
|
|
860
|
+
}, {
|
|
861
|
+
scheme: "bearer",
|
|
862
|
+
type: "http"
|
|
863
|
+
}],
|
|
864
|
+
url: "/v1/alerts/subscriptions/{id}",
|
|
865
|
+
...options
|
|
866
|
+
});
|
|
867
|
+
}
|
|
868
|
+
/**
|
|
737
869
|
* Get your unread alert count
|
|
738
870
|
*/
|
|
739
871
|
static getAlertUnreadCount(options) {
|