From aa49294b071b673ce60b6d6f5a74881de5d96213 Mon Sep 17 00:00:00 2001 From: BatchData API Date: Tue, 17 Nov 2026 05:59:02 -0700 Subject: [PATCH] Make v0.4.0: remove property monitor modules (hidden on Make for review) Co-Authored-By: Claude Opus 5.5 --- DEVELOPMENT.md | 18 +- README.md | 31 +- makecomapp.json | 133 +- .../createMonitor.communication.iml.json | 22 - .../createMonitor.interface.iml.json | 7 - .../createMonitor.mappable-params.iml.json | 425 ---- .../createMonitor.samples.iml.json | 3 - .../deleteMonitor.communication.iml.json | 10 - .../deleteMonitor.interface.iml.json | 12 - .../deleteMonitor.mappable-params.iml.json | 10 - .../deleteMonitor.samples.iml.json | 4 - .../getMonitor.communication.iml.json | 7 - .../getMonitor/getMonitor.interface.iml.json | 49 - .../getMonitor.mappable-params.iml.json | 10 - .../getMonitor/getMonitor.samples.iml.json | 14 - modules/groups.json | 13 +- .../listMonitors.communication.iml.json | 8 - .../listMonitors.interface.iml.json | 49 - .../listMonitors.mappable-params.iml.json | 1 - .../listMonitors.samples.iml.json | 14 - .../watchMonitorEvents.communication.iml.json | 1 - .../watchMonitorEvents.interface.iml.json | 53 - .../watchMonitorEvents.samples.iml.json | 13 - ...rEventsWithProperty.communication.iml.json | 22 - ...nitorEventsWithProperty.interface.iml.json | 1747 ----------------- ...MonitorEventsWithProperty.samples.iml.json | 550 ------ package.json | 2 +- .../listMonitors.communication.iml.json | 11 - .../listMonitors/listMonitors.params.iml.json | 1 - scripts/catalog-modules.mjs | 92 +- test/catalog.test.mjs | 69 +- test/replay.test.mjs | 15 +- test/structure.test.mjs | 46 +- .../monitorEvents.attach.iml.json | 21 - .../monitorEvents.communication.iml.json | 8 - .../monitorEvents.detach.iml.json | 4 - .../monitorEvents.params.iml.json | 340 ---- 37 files changed, 60 insertions(+), 3775 deletions(-) delete mode 100644 modules/createMonitor/createMonitor.communication.iml.json delete mode 100644 modules/createMonitor/createMonitor.interface.iml.json delete mode 100644 modules/createMonitor/createMonitor.mappable-params.iml.json delete mode 100644 modules/createMonitor/createMonitor.samples.iml.json delete mode 100644 modules/deleteMonitor/deleteMonitor.communication.iml.json delete mode 100644 modules/deleteMonitor/deleteMonitor.interface.iml.json delete mode 100644 modules/deleteMonitor/deleteMonitor.mappable-params.iml.json delete mode 100644 modules/deleteMonitor/deleteMonitor.samples.iml.json delete mode 100644 modules/getMonitor/getMonitor.communication.iml.json delete mode 100644 modules/getMonitor/getMonitor.interface.iml.json delete mode 100644 modules/getMonitor/getMonitor.mappable-params.iml.json delete mode 100644 modules/getMonitor/getMonitor.samples.iml.json delete mode 100644 modules/listMonitors/listMonitors.communication.iml.json delete mode 100644 modules/listMonitors/listMonitors.interface.iml.json delete mode 100644 modules/listMonitors/listMonitors.mappable-params.iml.json delete mode 100644 modules/listMonitors/listMonitors.samples.iml.json delete mode 100644 modules/watchMonitorEvents/watchMonitorEvents.communication.iml.json delete mode 100644 modules/watchMonitorEvents/watchMonitorEvents.interface.iml.json delete mode 100644 modules/watchMonitorEvents/watchMonitorEvents.samples.iml.json delete mode 100644 modules/watchMonitorEventsWithProperty/watchMonitorEventsWithProperty.communication.iml.json delete mode 100644 modules/watchMonitorEventsWithProperty/watchMonitorEventsWithProperty.interface.iml.json delete mode 100644 modules/watchMonitorEventsWithProperty/watchMonitorEventsWithProperty.samples.iml.json delete mode 100644 rpcs/listMonitors/listMonitors.communication.iml.json delete mode 100644 rpcs/listMonitors/listMonitors.params.iml.json delete mode 100644 webhooks/monitorEvents/monitorEvents.attach.iml.json delete mode 100644 webhooks/monitorEvents/monitorEvents.communication.iml.json delete mode 100644 webhooks/monitorEvents/monitorEvents.detach.iml.json delete mode 100644 webhooks/monitorEvents/monitorEvents.params.iml.json diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 7467a67..c1a5dad 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -33,16 +33,24 @@ Not verified, needs a Make account and a BatchData test token (a sandbox token r - Import with the VS Code extension (the file layout follows public examples, not a Make validator). - Connection check. It POSTs a fixed autocomplete query (`searchCriteria.query` = `1600 Penn`, `take` 1) to `/v1/address/autocomplete` and is valid on HTTP 2xx only when `body.result` is present, so a 200 HTML error page is rejected as `InvalidAccessTokenError`. An earlier empty `/v1/address/verify` check (valid on 400 or 2xx) failed in Make because HTTP 400-599 are errors and `response.valid` cannot override that. Autocomplete was chosen over `GET /v2/property/search-sessions?take=1` because search-sessions can return 403 for tokens without that permission. -- List-item outputs (Get Property Details, Verify Address, and the billed instant trigger's property lookup) use IML 1-based index access (`path[1]`) instead of `first()`, which throws `IMLError` when the value is not an array. `response.valid` marks a missing API object as `InvalidAccessTokenError`, so a 401 JSON body or a 200 HTML page does not surface as `IMLError: Function 'first' finished with error! Invalid array.` A first attempt used `first(ifempty(path, emptyarray))`, but `emptyarray` is a scenario-mapper constant and is not defined in custom-app IML. +- List-item outputs (Get Property Details and Verify Address) use IML 1-based index access (`path[1]`) instead of `first()`, which throws `IMLError` when the value is not an array. `response.valid` marks a missing API object as `InvalidAccessTokenError`, so a 401 JSON body or a 200 HTML page does not surface as `IMLError: Function 'first' finished with error! Invalid array.` A first attempt used `first(ifempty(path, emptyarray))`, but `emptyarray` is a scenario-mapper constant and is not defined in custom-app IML. - Optional fields. The templates use `ifempty(x, undefined)` and `omit()` so empty fields are not sent. Nested optional filters (for example Permit Status) are collection parameters that are dropped when empty. Check that an unfilled nested collection (for example Building) is not sent as `{}`. -- Instant triggers. Check that turning a scenario on creates the property subscription (attach), that a test event arrives with `eventId` set, and that turning it off deletes the subscription (detach, `externalHookId`). Create hooks only with a sandbox token: a subscription counts towards the team's limit of 5 and cannot be edited. - Polling triggers (`Watch New Search Sessions`, `Watch New Properties in a Search Session`): confirm the date ordering and that a first run does not replay old items as expected. -- Dynamic dropdowns (`rpc://listSearchSessions`, `rpc://listMonitors`): confirm the label and value mapping. +- Dynamic dropdown (`rpc://listSearchSessions`): confirm the label and value mapping. - The `{{...}}` spread in the Search Properties output (adds `searchMeta` next to each property). - Make an API Call: the wallet guard redirects any path containing `wallet` to a non-existent path. IML cannot raise a validation error, so this is best effort. Decide whether to keep the module. -- Webhook dedupe. The webhook sets `uid` to `body.eventId`; confirm in Make that a repeated event does not start a second run. -- Callback keys. IML cannot strip keys recursively. Make an API Call blocks (sends nothing) any body that contains `webhook` or a JSON unicode escape (`u00`). The Additional Criteria JSON fields on search, session and monitor modules are not stripped; BatchData's synchronous endpoints ignore callback keys, and the monitor and trigger modules fix `deliveryConfig` themselves. A Make custom function that strips the keys would close this gap. +- Callback keys. IML cannot strip keys recursively. Make an API Call blocks (sends nothing) any body that contains `webhook` or a JSON unicode escape (`u00`). The Additional Criteria JSON fields on search and session modules are not stripped; BatchData's synchronous endpoints ignore callback keys. A Make custom function that strips the keys would close this gap. + +## Property monitor modules (hidden on Make) + +Version 0.4.0 removed the six property monitor modules: Create Property Monitor (Stream Delivery), List Property Monitors, Get Property Monitor, Delete Property Monitor, Watch Property Monitor Events (Instant) and Watch Property Monitor Events with Property Record (Instant, Billed). It also removed the `monitorEvents` webhook and the `listMonitors` RPC, which only these modules used. The reason: the BatchData sandbox token for the Make review does not have the property-subscription permission, so the reviewers cannot test these modules. + +On Make, the app `batchdata-r6b83g` is public and in review, and Make does not let a public app delete components. The six modules are set to private there instead. The `monitorEvents` webhook and the `listMonitors` RPC stay on Make, and no module uses them. + +`scripts/catalog-modules.mjs` filters the monitor operations out of the vendored catalog, so `scripts/catalog.json` stays unchanged. Make an API Call still blocks POST, PUT and PATCH calls to `property-subscription`. + +To restore the modules, revert this commit, run `node scripts/generate.mjs`, deploy to Make, and set the six modules to public again. ## Decisions diff --git a/README.md b/README.md index 7fcfab7..72a14e2 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![BatchData](assets/logo-512.png) -BatchData gives you property, owner and address data through an API. This app brings it into your Make scenarios, so you can find properties, enrich them with owner contact details, verify addresses and phone numbers, and react to property changes without writing code. +BatchData gives you property, owner and address data through an API. This app brings it into your Make scenarios, so you can find properties, enrich them with owner contact details, and verify addresses and phone numbers without writing code. Typical uses: @@ -10,7 +10,6 @@ Typical uses: - Look up one address and add the full property record, ownership and sale history to a lead. - Find the owner's phone numbers and emails (skip trace) for a property, and check the numbers against Do Not Call and TCPA litigator lists. - Clean up addresses before mailing, or turn an address into coordinates. -- Start a scenario the moment a property you are watching changes. Support: support@batchservice.com @@ -71,24 +70,12 @@ A search session remembers what it has already returned, so each run gives you o | List Search Sessions | Lists the sessions on your team. | | Delete Search Session | Deletes a session. | -### Property monitors - -A monitor reports when a property is added to it, removed from it or changed. - -| Module | What it does | -| --- | --- | -| Create Property Monitor (Stream Delivery) | Creates a monitor that delivers to AWS Kinesis or Azure Event Hubs. | -| List Property Monitors, Get Property Monitor | Reads your monitors. | -| Delete Property Monitor | Deletes a monitor. | - ### Triggers | Module | Type | What it does | | --- | --- | --- | | Watch New Search Sessions | Polling | Runs when a new search session appears on your team. | | Watch New Properties in a Search Session (Billed) | Polling | Runs for each new property a session delivers. | -| Watch Property Monitor Events (Instant) | Instant | Runs when a property is added to, removed from or changed in a monitor. | -| Watch Property Monitor Events with Property Record (Instant, Billed) | Instant | The same, and adds the full property record to each event. | ### Other @@ -110,27 +97,11 @@ Your BatchData plan decides what each call costs. Each module's description in M - Skip trace modules bill per matched property. - Address, phone and compliance checks bill per item checked. - Autocomplete, geocoding and the modules that list, get or delete search sessions do not bill property records. -- Property monitors and the events they deliver are billed according to your BatchData plan. - Get Property Permits bills per property requested, not per permit. A Limit above 100 sends more than one request. - Watch New Properties in a Search Session (Billed) bills every property it delivers, on every scheduled run. -- Watch Property Monitor Events with Property Record (Instant, Billed) adds one property lookup per event. For pricing questions, contact support@batchservice.com. -## Property monitor events - -When you turn a scenario on, the instant trigger creates a monitor that delivers to that scenario's own Make webhook. When you turn it off, or delete the scenario, the monitor is deleted. You do not enter a callback URL. - -Each event contains the event ID, property ID, address and parcel hashes, the IDs of the monitors that added or removed the property, and the time it changed. It does not contain the property record. Use the module with **Property Record** to add it. Use the event ID to skip repeats. - -Good to know: - -- You can have up to 5 monitors per team, so avoid many scenarios that each create one. -- A monitor cannot be edited. Delete it and create a new one. -- A new monitor can take up to 7 days to start delivering. -- Delivery is best effort, with 4 attempts per event, so the same event can arrive more than once. -- Make has no polling trigger for new monitors. Use List Property Monitors on a schedule instead. - ## Phone compliance Skip trace and phone modules return data only. You are responsible for following the TCPA and Do Not Call rules before you contact anyone. Skip trace leaves out phone numbers flagged as TCPA litigators unless you switch on **Include phone numbers flagged as TCPA litigators**. diff --git a/makecomapp.json b/makecomapp.json index 7f30ea9..b2049d8 100644 --- a/makecomapp.json +++ b/makecomapp.json @@ -302,58 +302,6 @@ "samples": "modules/deleteSearchSession/deleteSearchSession.samples.iml.json" } }, - "listMonitors": { - "moduleType": "search", - "label": "List Property Monitors", - "description": "Lists your property monitors. Needs a token with the property subscription permission. Monitors and the events they deliver are billed according to your BatchData plan; contact support@batchservice.com for pricing. Limits: up to 5 monitors per team, a monitor cannot be edited after it is created (delete and recreate it), a new monitor can take up to 7 days to start delivering, and delivery is best effort (4 attempts per event).", - "actionCrud": "read", - "connection": "batchdata", - "codeFiles": { - "communication": "modules/listMonitors/listMonitors.communication.iml.json", - "mappableParams": "modules/listMonitors/listMonitors.mappable-params.iml.json", - "interface": "modules/listMonitors/listMonitors.interface.iml.json", - "samples": "modules/listMonitors/listMonitors.samples.iml.json" - } - }, - "getMonitor": { - "moduleType": "search", - "label": "Get Property Monitor", - "description": "Returns one property monitor with its search criteria and delivery settings (secrets are masked). Monitors and the events they deliver are billed according to your BatchData plan; contact support@batchservice.com for pricing. Limits: up to 5 monitors per team, a monitor cannot be edited after it is created (delete and recreate it), a new monitor can take up to 7 days to start delivering, and delivery is best effort (4 attempts per event).", - "actionCrud": "read", - "connection": "batchdata", - "codeFiles": { - "communication": "modules/getMonitor/getMonitor.communication.iml.json", - "mappableParams": "modules/getMonitor/getMonitor.mappable-params.iml.json", - "interface": "modules/getMonitor/getMonitor.interface.iml.json", - "samples": "modules/getMonitor/getMonitor.samples.iml.json" - } - }, - "createMonitor": { - "moduleType": "action", - "label": "Create Property Monitor (Stream Delivery)", - "description": "Creates a property monitor that streams changes for matching properties to your own AWS Kinesis stream or Azure Event Hub. For webhook delivery use the \"Watch Property Monitor Events (Instant)\" trigger, which sets up and removes its own monitor. Monitors and the events they deliver are billed according to your BatchData plan; contact support@batchservice.com for pricing. Limits: up to 5 monitors per team, a monitor cannot be edited after it is created (delete and recreate it), a new monitor can take up to 7 days to start delivering, and delivery is best effort (4 attempts per event).", - "actionCrud": "create", - "connection": "batchdata", - "codeFiles": { - "communication": "modules/createMonitor/createMonitor.communication.iml.json", - "mappableParams": "modules/createMonitor/createMonitor.mappable-params.iml.json", - "interface": "modules/createMonitor/createMonitor.interface.iml.json", - "samples": "modules/createMonitor/createMonitor.samples.iml.json" - } - }, - "deleteMonitor": { - "moduleType": "action", - "label": "Delete Property Monitor", - "description": "Deletes a property monitor so it stops delivering events. Monitors and the events they deliver are billed according to your BatchData plan; contact support@batchservice.com for pricing. Limits: up to 5 monitors per team, a monitor cannot be edited after it is created (delete and recreate it), a new monitor can take up to 7 days to start delivering, and delivery is best effort (4 attempts per event).", - "actionCrud": "delete", - "connection": "batchdata", - "codeFiles": { - "communication": "modules/deleteMonitor/deleteMonitor.communication.iml.json", - "mappableParams": "modules/deleteMonitor/deleteMonitor.mappable-params.iml.json", - "interface": "modules/deleteMonitor/deleteMonitor.interface.iml.json", - "samples": "modules/deleteMonitor/deleteMonitor.samples.iml.json" - } - }, "watchSearchSessions": { "moduleType": "trigger", "label": "Watch New Search Sessions", @@ -377,45 +325,9 @@ "interface": "modules/watchSessionProperties/watchSessionProperties.interface.iml.json", "samples": "modules/watchSessionProperties/watchSessionProperties.samples.iml.json" } - }, - "watchMonitorEvents": { - "moduleType": "instant_trigger", - "label": "Watch Property Monitor Events (Instant)", - "description": "Triggers when BatchData reports that a property matching your criteria was added to or removed from a monitor, or changed (instant). Turning the scenario on creates a monitor that delivers to this trigger's own hook URL; turning it off deletes that monitor. Each event carries the property ID and change details. Monitors and the events they deliver are billed according to your BatchData plan; contact support@batchservice.com for pricing. To get the full property record with each event, use \"Watch Property Monitor Events with Property Record (Instant, Billed)\" instead. Limits: up to 5 monitors per team, a monitor cannot be edited after it is created (delete and recreate it), a new monitor can take up to 7 days to start delivering, and delivery is best effort (4 attempts per event).", - "connection": "batchdata", - "webhook": "monitorEvents", - "codeFiles": { - "communication": "modules/watchMonitorEvents/watchMonitorEvents.communication.iml.json", - "interface": "modules/watchMonitorEvents/watchMonitorEvents.interface.iml.json", - "samples": "modules/watchMonitorEvents/watchMonitorEvents.samples.iml.json" - } - }, - "watchMonitorEventsWithProperty": { - "moduleType": "instant_trigger", - "label": "Watch Property Monitor Events with Property Record (Instant, Billed)", - "description": "Triggers when BatchData reports that a property matching your criteria was added to or removed from a monitor, or changed (instant). Turning the scenario on creates a monitor that delivers to this trigger's own hook URL; turning it off deletes that monitor. Each event carries the property ID and change details. Monitors and the events they deliver are billed according to your BatchData plan; contact support@batchservice.com for pricing. Limits: up to 5 monitors per team, a monitor cannot be edited after it is created (delete and recreate it), a new monitor can take up to 7 days to start delivering, and delivery is best effort (4 attempts per event). This version also looks up the full property record for every event and adds it to the output as \"property\". The lookup is billed per event, per matched property, on top of the monitor charges.", - "connection": "batchdata", - "webhook": "monitorEvents", - "codeFiles": { - "communication": "modules/watchMonitorEventsWithProperty/watchMonitorEventsWithProperty.communication.iml.json", - "interface": "modules/watchMonitorEventsWithProperty/watchMonitorEventsWithProperty.interface.iml.json", - "samples": "modules/watchMonitorEventsWithProperty/watchMonitorEventsWithProperty.samples.iml.json" - } - } - }, - "webhook": { - "monitorEvents": { - "label": "Property monitor events", - "webhookType": "web", - "connection": "batchdata", - "codeFiles": { - "communication": "webhooks/monitorEvents/monitorEvents.communication.iml.json", - "params": "webhooks/monitorEvents/monitorEvents.params.iml.json", - "attach": "webhooks/monitorEvents/monitorEvents.attach.iml.json", - "detach": "webhooks/monitorEvents/monitorEvents.detach.iml.json" - } } }, + "webhook": {}, "rpc": { "listSearchSessions": { "label": "List search sessions", @@ -424,14 +336,6 @@ "communication": "rpcs/listSearchSessions/listSearchSessions.communication.iml.json", "params": "rpcs/listSearchSessions/listSearchSessions.params.iml.json" } - }, - "listMonitors": { - "label": "List property monitors", - "connection": "batchdata", - "codeFiles": { - "communication": "rpcs/listMonitors/listMonitors.communication.iml.json", - "params": "rpcs/listMonitors/listMonitors.params.iml.json" - } } } }, @@ -538,22 +442,6 @@ "local": "deleteSearchSession", "remote": "deleteSearchSession" }, - { - "local": "listMonitors", - "remote": "listMonitors" - }, - { - "local": "getMonitor", - "remote": "getMonitor" - }, - { - "local": "createMonitor", - "remote": "createMonitor" - }, - { - "local": "deleteMonitor", - "remote": "deleteMonitor" - }, { "local": "watchSearchSessions", "remote": "watchSearchSessions" @@ -561,14 +449,6 @@ { "local": "watchSessionProperties", "remote": "watchSessionProperties" - }, - { - "local": "watchMonitorEvents", - "remote": "watchMonitorEvents" - }, - { - "local": "watchMonitorEventsWithProperty", - "remote": "watchMonitorEventsWithProperty" } ], "function": [], @@ -576,18 +456,9 @@ { "local": "listSearchSessions", "remote": "listSearchSessions" - }, - { - "local": "listMonitors", - "remote": "listMonitors" } ], - "webhook": [ - { - "local": "monitorEvents", - "remote": "batchdata-r6b83g" - } - ] + "webhook": [] } } ] diff --git a/modules/createMonitor/createMonitor.communication.iml.json b/modules/createMonitor/createMonitor.communication.iml.json deleted file mode 100644 index b94d27c..0000000 --- a/modules/createMonitor/createMonitor.communication.iml.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "url": "/v2/property-subscription", - "method": "POST", - "body": { - "searchCriteria": { - "{{...}}": "{{if(parameters.additionalCriteria, parseJSON(parameters.additionalCriteria), undefined)}}", - "query": "{{ifempty(parameters.query, undefined)}}", - "quickLists": "{{if(length(parameters.quickLists) > 0, parameters.quickLists, undefined)}}", - "orQuickLists": "{{if(length(parameters.orQuickLists) > 0, parameters.orQuickLists, undefined)}}" - }, - "deliveryConfig": { - "type": "{{parameters.deliveryType}}", - "{{...}}": "{{if(parameters.deliveryType == 'kinesis', parameters.kinesis, undefined)}}", - "eventHub": "{{if(parameters.deliveryType == 'event-hub', parameters.eventHub, undefined)}}" - } - }, - "response": { - "output": { - "subscriptionId": "{{body.result.subscriptionId}}" - } - } -} diff --git a/modules/createMonitor/createMonitor.interface.iml.json b/modules/createMonitor/createMonitor.interface.iml.json deleted file mode 100644 index 73574f8..0000000 --- a/modules/createMonitor/createMonitor.interface.iml.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "name": "subscriptionId", - "type": "text", - "label": "Subscription id" - } -] diff --git a/modules/createMonitor/createMonitor.mappable-params.iml.json b/modules/createMonitor/createMonitor.mappable-params.iml.json deleted file mode 100644 index 01ca9f9..0000000 --- a/modules/createMonitor/createMonitor.mappable-params.iml.json +++ /dev/null @@ -1,425 +0,0 @@ -[ - { - "name": "query", - "label": "Location Query", - "help": "City, county, ZIP code or address text, for example \"Phoenix, AZ\".", - "type": "text" - }, - { - "name": "quickLists", - "label": "Quick Lists (Include)", - "help": "Properties must match ALL selected lists.", - "type": "array", - "spec": { - "type": "select", - "options": [ - { - "label": "absentee-owner", - "value": "absentee-owner" - }, - { - "label": "active-auction", - "value": "active-auction" - }, - { - "label": "active-listing", - "value": "active-listing" - }, - { - "label": "canceled-listing", - "value": "canceled-listing" - }, - { - "label": "cash-buyer", - "value": "cash-buyer" - }, - { - "label": "corporate-owned", - "value": "corporate-owned" - }, - { - "label": "expired-listing", - "value": "expired-listing" - }, - { - "label": "failed-listing", - "value": "failed-listing" - }, - { - "label": "fix-and-flip", - "value": "fix-and-flip" - }, - { - "label": "free-and-clear", - "value": "free-and-clear" - }, - { - "label": "for-sale-by-owner", - "value": "for-sale-by-owner" - }, - { - "label": "has-hoa", - "value": "has-hoa" - }, - { - "label": "has-hoa-fees", - "value": "has-hoa-fees" - }, - { - "label": "high-equity", - "value": "high-equity" - }, - { - "label": "inherited", - "value": "inherited" - }, - { - "label": "involuntary-lien", - "value": "involuntary-lien" - }, - { - "label": "in-state-absentee-owner", - "value": "in-state-absentee-owner" - }, - { - "label": "listed-below-market-price", - "value": "listed-below-market-price" - }, - { - "label": "low-equity", - "value": "low-equity" - }, - { - "label": "mailing-address-vacant", - "value": "mailing-address-vacant" - }, - { - "label": "notice-of-default", - "value": "notice-of-default" - }, - { - "label": "notice-of-lis-pendens", - "value": "notice-of-lis-pendens" - }, - { - "label": "notice-of-sale", - "value": "notice-of-sale" - }, - { - "label": "on-market", - "value": "on-market" - }, - { - "label": "out-of-state-absentee-owner", - "value": "out-of-state-absentee-owner" - }, - { - "label": "out-of-state-owner", - "value": "out-of-state-owner" - }, - { - "label": "owner-occupied", - "value": "owner-occupied" - }, - { - "label": "pending-listing", - "value": "pending-listing" - }, - { - "label": "preforeclosure", - "value": "preforeclosure" - }, - { - "label": "recently-sold", - "value": "recently-sold" - }, - { - "label": "same-property-and-mailing-address", - "value": "same-property-and-mailing-address" - }, - { - "label": "senior-owner", - "value": "senior-owner" - }, - { - "label": "tax-default", - "value": "tax-default" - }, - { - "label": "tired-landlord", - "value": "tired-landlord" - }, - { - "label": "trust-owned", - "value": "trust-owned" - }, - { - "label": "unknown-equity", - "value": "unknown-equity" - }, - { - "label": "vacant", - "value": "vacant" - }, - { - "label": "vacant-lot", - "value": "vacant-lot" - } - ] - } - }, - { - "name": "orQuickLists", - "label": "Quick Lists (Match Any)", - "help": "Properties must match AT LEAST ONE selected list.", - "type": "array", - "spec": { - "type": "select", - "options": [ - { - "label": "absentee-owner", - "value": "absentee-owner" - }, - { - "label": "active-auction", - "value": "active-auction" - }, - { - "label": "active-listing", - "value": "active-listing" - }, - { - "label": "canceled-listing", - "value": "canceled-listing" - }, - { - "label": "cash-buyer", - "value": "cash-buyer" - }, - { - "label": "corporate-owned", - "value": "corporate-owned" - }, - { - "label": "expired-listing", - "value": "expired-listing" - }, - { - "label": "failed-listing", - "value": "failed-listing" - }, - { - "label": "fix-and-flip", - "value": "fix-and-flip" - }, - { - "label": "free-and-clear", - "value": "free-and-clear" - }, - { - "label": "for-sale-by-owner", - "value": "for-sale-by-owner" - }, - { - "label": "has-hoa", - "value": "has-hoa" - }, - { - "label": "has-hoa-fees", - "value": "has-hoa-fees" - }, - { - "label": "high-equity", - "value": "high-equity" - }, - { - "label": "inherited", - "value": "inherited" - }, - { - "label": "involuntary-lien", - "value": "involuntary-lien" - }, - { - "label": "in-state-absentee-owner", - "value": "in-state-absentee-owner" - }, - { - "label": "listed-below-market-price", - "value": "listed-below-market-price" - }, - { - "label": "low-equity", - "value": "low-equity" - }, - { - "label": "mailing-address-vacant", - "value": "mailing-address-vacant" - }, - { - "label": "notice-of-default", - "value": "notice-of-default" - }, - { - "label": "notice-of-lis-pendens", - "value": "notice-of-lis-pendens" - }, - { - "label": "notice-of-sale", - "value": "notice-of-sale" - }, - { - "label": "on-market", - "value": "on-market" - }, - { - "label": "out-of-state-absentee-owner", - "value": "out-of-state-absentee-owner" - }, - { - "label": "out-of-state-owner", - "value": "out-of-state-owner" - }, - { - "label": "owner-occupied", - "value": "owner-occupied" - }, - { - "label": "pending-listing", - "value": "pending-listing" - }, - { - "label": "preforeclosure", - "value": "preforeclosure" - }, - { - "label": "recently-sold", - "value": "recently-sold" - }, - { - "label": "same-property-and-mailing-address", - "value": "same-property-and-mailing-address" - }, - { - "label": "senior-owner", - "value": "senior-owner" - }, - { - "label": "tax-default", - "value": "tax-default" - }, - { - "label": "tired-landlord", - "value": "tired-landlord" - }, - { - "label": "trust-owned", - "value": "trust-owned" - }, - { - "label": "unknown-equity", - "value": "unknown-equity" - }, - { - "label": "vacant", - "value": "vacant" - }, - { - "label": "vacant-lot", - "value": "vacant-lot" - } - ] - } - }, - { - "name": "additionalCriteria", - "label": "Additional Criteria (JSON)", - "help": "Optional JSON object merged into the search criteria. The fields above win on conflict. Callback URL keys are ignored. Optional JSON object with extra filters, for example {\"general\":{\"propertyTypeCategory\":{\"equals\":\"Single Family\"}}}. Fields you fill in above take priority.", - "type": "text" - }, - { - "name": "deliveryType", - "label": "Delivery Type", - "required": true, - "type": "select", - "options": [ - { - "label": "AWS Kinesis", - "value": "kinesis" - }, - { - "label": "Azure Event Hub", - "value": "event-hub" - } - ], - "default": "kinesis" - }, - { - "name": "kinesis", - "type": "collection", - "label": "AWS Kinesis settings", - "help": "Used when Delivery type is \"kinesis\".", - "spec": [ - { - "name": "streamName", - "label": "Kinesis Stream Name", - "type": "text" - }, - { - "name": "region", - "label": "Kinesis AWS Region", - "help": "For example us-west-2.", - "type": "text" - }, - { - "name": "iamAccessKeyId", - "label": "Kinesis IAM Access Key ID", - "type": "text" - }, - { - "name": "iamSecretAccessKey", - "label": "Kinesis IAM Secret Access Key", - "type": "password" - } - ] - }, - { - "name": "eventHub", - "type": "collection", - "label": "Azure Event Hub settings", - "help": "Used when Delivery type is \"event-hub\".", - "spec": [ - { - "name": "eventHubName", - "label": "Event Hub Name", - "type": "text" - }, - { - "name": "connectionString", - "label": "Event Hub Connection String", - "help": "Use this, or the namespace and service principal fields below.", - "type": "password" - }, - { - "name": "fullyQualifiedNamespace", - "label": "Event Hub Fully Qualified Namespace", - "type": "text" - }, - { - "name": "clientId", - "label": "Event Hub Client ID", - "type": "text" - }, - { - "name": "tenantId", - "label": "Event Hub Tenant ID", - "type": "text" - }, - { - "name": "clientSecret", - "label": "Event Hub Client Secret", - "type": "password" - } - ] - } -] diff --git a/modules/createMonitor/createMonitor.samples.iml.json b/modules/createMonitor/createMonitor.samples.iml.json deleted file mode 100644 index 88fb2fd..0000000 --- a/modules/createMonitor/createMonitor.samples.iml.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "subscriptionId": "FXeLSlemePGGhvt" -} diff --git a/modules/deleteMonitor/deleteMonitor.communication.iml.json b/modules/deleteMonitor/deleteMonitor.communication.iml.json deleted file mode 100644 index ce3da9c..0000000 --- a/modules/deleteMonitor/deleteMonitor.communication.iml.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "url": "/v2/property-subscription/{{replace(replace(parameters.id, '/', '_'), '.', '_')}}", - "method": "DELETE", - "response": { - "output": { - "deleted": true, - "id": "{{parameters.id}}" - } - } -} diff --git a/modules/deleteMonitor/deleteMonitor.interface.iml.json b/modules/deleteMonitor/deleteMonitor.interface.iml.json deleted file mode 100644 index 257b776..0000000 --- a/modules/deleteMonitor/deleteMonitor.interface.iml.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "name": "deleted", - "type": "boolean", - "label": "Deleted" - }, - { - "name": "id", - "type": "text", - "label": "Id" - } -] diff --git a/modules/deleteMonitor/deleteMonitor.mappable-params.iml.json b/modules/deleteMonitor/deleteMonitor.mappable-params.iml.json deleted file mode 100644 index d41d60f..0000000 --- a/modules/deleteMonitor/deleteMonitor.mappable-params.iml.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "name": "id", - "label": "Monitor ID", - "required": true, - "help": "The ID of the monitor to delete.", - "type": "select", - "options": "rpc://listMonitors" - } -] diff --git a/modules/deleteMonitor/deleteMonitor.samples.iml.json b/modules/deleteMonitor/deleteMonitor.samples.iml.json deleted file mode 100644 index f857dec..0000000 --- a/modules/deleteMonitor/deleteMonitor.samples.iml.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "deleted": true, - "id": "FXeLSlemePGGhvt" -} diff --git a/modules/getMonitor/getMonitor.communication.iml.json b/modules/getMonitor/getMonitor.communication.iml.json deleted file mode 100644 index ac0a732..0000000 --- a/modules/getMonitor/getMonitor.communication.iml.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "url": "/v2/property-subscription/{{replace(replace(parameters.id, '/', '_'), '.', '_')}}", - "method": "GET", - "response": { - "output": "{{body.result}}" - } -} diff --git a/modules/getMonitor/getMonitor.interface.iml.json b/modules/getMonitor/getMonitor.interface.iml.json deleted file mode 100644 index 880e2d2..0000000 --- a/modules/getMonitor/getMonitor.interface.iml.json +++ /dev/null @@ -1,49 +0,0 @@ -[ - { - "name": "id", - "type": "text", - "label": "Id" - }, - { - "name": "searchCriteria", - "type": "collection", - "label": "Search criteria", - "spec": [ - { - "name": "query", - "type": "text", - "label": "Query" - }, - { - "name": "orQuickLists", - "type": "array", - "label": "Or quick lists", - "spec": { - "type": "text" - } - } - ] - }, - { - "name": "deliveryConfig", - "type": "collection", - "label": "Delivery config", - "spec": [ - { - "name": "type", - "type": "text", - "label": "Type" - }, - { - "name": "streamName", - "type": "text", - "label": "Stream name" - }, - { - "name": "region", - "type": "text", - "label": "Region" - } - ] - } -] diff --git a/modules/getMonitor/getMonitor.mappable-params.iml.json b/modules/getMonitor/getMonitor.mappable-params.iml.json deleted file mode 100644 index 631f8c8..0000000 --- a/modules/getMonitor/getMonitor.mappable-params.iml.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "name": "id", - "label": "Monitor ID", - "required": true, - "help": "The ID of the monitor.", - "type": "select", - "options": "rpc://listMonitors" - } -] diff --git a/modules/getMonitor/getMonitor.samples.iml.json b/modules/getMonitor/getMonitor.samples.iml.json deleted file mode 100644 index 6bac24d..0000000 --- a/modules/getMonitor/getMonitor.samples.iml.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "id": "cjui0E2T1LKxWOD", - "searchCriteria": { - "query": "Phoenix, AZ", - "orQuickLists": [ - "on-market" - ] - }, - "deliveryConfig": { - "type": "kinesis", - "streamName": "my-stream", - "region": "us-west-2" - } -} diff --git a/modules/groups.json b/modules/groups.json index 7f8a29b..a960d7c 100644 --- a/modules/groups.json +++ b/modules/groups.json @@ -50,22 +50,11 @@ "deleteSearchSession" ] }, - { - "label": "Property monitors", - "modules": [ - "createMonitor", - "listMonitors", - "getMonitor", - "deleteMonitor" - ] - }, { "label": "Triggers", "modules": [ "watchSearchSessions", - "watchSessionProperties", - "watchMonitorEvents", - "watchMonitorEventsWithProperty" + "watchSessionProperties" ] }, { diff --git a/modules/listMonitors/listMonitors.communication.iml.json b/modules/listMonitors/listMonitors.communication.iml.json deleted file mode 100644 index 34b3f91..0000000 --- a/modules/listMonitors/listMonitors.communication.iml.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "url": "/v2/property-subscription", - "method": "GET", - "response": { - "iterate": "{{body.results.subscriptions}}", - "output": "{{item}}" - } -} diff --git a/modules/listMonitors/listMonitors.interface.iml.json b/modules/listMonitors/listMonitors.interface.iml.json deleted file mode 100644 index 880e2d2..0000000 --- a/modules/listMonitors/listMonitors.interface.iml.json +++ /dev/null @@ -1,49 +0,0 @@ -[ - { - "name": "id", - "type": "text", - "label": "Id" - }, - { - "name": "searchCriteria", - "type": "collection", - "label": "Search criteria", - "spec": [ - { - "name": "query", - "type": "text", - "label": "Query" - }, - { - "name": "orQuickLists", - "type": "array", - "label": "Or quick lists", - "spec": { - "type": "text" - } - } - ] - }, - { - "name": "deliveryConfig", - "type": "collection", - "label": "Delivery config", - "spec": [ - { - "name": "type", - "type": "text", - "label": "Type" - }, - { - "name": "streamName", - "type": "text", - "label": "Stream name" - }, - { - "name": "region", - "type": "text", - "label": "Region" - } - ] - } -] diff --git a/modules/listMonitors/listMonitors.mappable-params.iml.json b/modules/listMonitors/listMonitors.mappable-params.iml.json deleted file mode 100644 index fe51488..0000000 --- a/modules/listMonitors/listMonitors.mappable-params.iml.json +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/modules/listMonitors/listMonitors.samples.iml.json b/modules/listMonitors/listMonitors.samples.iml.json deleted file mode 100644 index 6bac24d..0000000 --- a/modules/listMonitors/listMonitors.samples.iml.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "id": "cjui0E2T1LKxWOD", - "searchCriteria": { - "query": "Phoenix, AZ", - "orQuickLists": [ - "on-market" - ] - }, - "deliveryConfig": { - "type": "kinesis", - "streamName": "my-stream", - "region": "us-west-2" - } -} diff --git a/modules/watchMonitorEvents/watchMonitorEvents.communication.iml.json b/modules/watchMonitorEvents/watchMonitorEvents.communication.iml.json deleted file mode 100644 index 0967ef4..0000000 --- a/modules/watchMonitorEvents/watchMonitorEvents.communication.iml.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/modules/watchMonitorEvents/watchMonitorEvents.interface.iml.json b/modules/watchMonitorEvents/watchMonitorEvents.interface.iml.json deleted file mode 100644 index c4e6f23..0000000 --- a/modules/watchMonitorEvents/watchMonitorEvents.interface.iml.json +++ /dev/null @@ -1,53 +0,0 @@ -[ - { - "name": "id", - "type": "text", - "label": "Id" - }, - { - "name": "eventId", - "type": "text", - "label": "Event id" - }, - { - "name": "propertyId", - "type": "text", - "label": "Property id" - }, - { - "name": "parcelHash", - "type": "text", - "label": "Parcel hash" - }, - { - "name": "addressHash", - "type": "text", - "label": "Address hash" - }, - { - "name": "addedToSubscriptionIds", - "type": "array", - "label": "Added to subscription ids", - "spec": { - "type": "text" - } - }, - { - "name": "removedFromSubscriptionIds", - "type": "array", - "label": "Removed from subscription ids", - "spec": { - "type": "text" - } - }, - { - "name": "propertyChangedAt", - "type": "text", - "label": "Property changed at" - }, - { - "name": "sentAt", - "type": "text", - "label": "Sent at" - } -] diff --git a/modules/watchMonitorEvents/watchMonitorEvents.samples.iml.json b/modules/watchMonitorEvents/watchMonitorEvents.samples.iml.json deleted file mode 100644 index 755f690..0000000 --- a/modules/watchMonitorEvents/watchMonitorEvents.samples.iml.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "id": "evt_9c1f2a", - "eventId": "evt_9c1f2a", - "propertyId": "09201d3bd3134f9380704014781fb4c0", - "parcelHash": "a1b2c3d4e5f60718293a4b5c6d7e8f90", - "addressHash": "90a01b18e3834e349a8d1d07d7e086ba", - "addedToSubscriptionIds": [ - "FXeLSlemePGGhvt" - ], - "removedFromSubscriptionIds": [], - "propertyChangedAt": "2026-10-28T22:10:41.000Z", - "sentAt": "2026-10-28T22:10:45.000Z" -} diff --git a/modules/watchMonitorEventsWithProperty/watchMonitorEventsWithProperty.communication.iml.json b/modules/watchMonitorEventsWithProperty/watchMonitorEventsWithProperty.communication.iml.json deleted file mode 100644 index 643cc6c..0000000 --- a/modules/watchMonitorEventsWithProperty/watchMonitorEventsWithProperty.communication.iml.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "url": "/v1/property/lookup/all-attributes", - "method": "POST", - "body": { - "requests": [ - { - "propertyId": "{{payload.propertyId}}" - } - ] - }, - "response": { - "valid": { - "condition": "{{if(body.results, true, false)}}", - "type": "InvalidAccessTokenError", - "message": "The BatchData API did not return a usable response. Check that the API token is valid. Contact support@batchservice.com if it still fails." - }, - "output": { - "{{...}}": "{{payload}}", - "property": "{{body.results.properties[1]}}" - } - } -} diff --git a/modules/watchMonitorEventsWithProperty/watchMonitorEventsWithProperty.interface.iml.json b/modules/watchMonitorEventsWithProperty/watchMonitorEventsWithProperty.interface.iml.json deleted file mode 100644 index d0f1abb..0000000 --- a/modules/watchMonitorEventsWithProperty/watchMonitorEventsWithProperty.interface.iml.json +++ /dev/null @@ -1,1747 +0,0 @@ -[ - { - "name": "id", - "type": "text", - "label": "Id" - }, - { - "name": "eventId", - "type": "text", - "label": "Event id" - }, - { - "name": "propertyId", - "type": "text", - "label": "Property id" - }, - { - "name": "parcelHash", - "type": "text", - "label": "Parcel hash" - }, - { - "name": "addressHash", - "type": "text", - "label": "Address hash" - }, - { - "name": "addedToSubscriptionIds", - "type": "array", - "label": "Added to subscription ids", - "spec": { - "type": "text" - } - }, - { - "name": "removedFromSubscriptionIds", - "type": "array", - "label": "Removed from subscription ids", - "spec": { - "type": "text" - } - }, - { - "name": "propertyChangedAt", - "type": "text", - "label": "Property changed at" - }, - { - "name": "sentAt", - "type": "text", - "label": "Sent at" - }, - { - "name": "property", - "type": "collection", - "label": "Property", - "spec": [ - { - "name": "_id", - "type": "text", - "label": "Id" - }, - { - "name": "address", - "type": "collection", - "label": "Address", - "spec": [ - { - "name": "houseNumber", - "type": "text", - "label": "House number" - }, - { - "name": "street", - "type": "text", - "label": "Street" - }, - { - "name": "city", - "type": "text", - "label": "City" - }, - { - "name": "cityAliases", - "type": "array", - "label": "City aliases", - "spec": { - "type": "text" - } - }, - { - "name": "county", - "type": "text", - "label": "County" - }, - { - "name": "state", - "type": "text", - "label": "State" - }, - { - "name": "zip", - "type": "text", - "label": "Zip" - }, - { - "name": "zipPlus4", - "type": "text", - "label": "Zip plus4" - }, - { - "name": "formattedStreet", - "type": "text", - "label": "Formatted street" - }, - { - "name": "streetNoUnit", - "type": "text", - "label": "Street no unit" - }, - { - "name": "localities", - "type": "array", - "label": "Localities", - "spec": { - "type": "text" - } - }, - { - "name": "latitude", - "type": "number", - "label": "Latitude" - }, - { - "name": "longitude", - "type": "number", - "label": "Longitude" - }, - { - "name": "countyFipsCode", - "type": "text", - "label": "County fips code" - }, - { - "name": "hash", - "type": "text", - "label": "Hash" - }, - { - "name": "normalized", - "type": "boolean", - "label": "Normalized" - }, - { - "name": "geoStatus", - "type": "text", - "label": "Geo status" - }, - { - "name": "geoStatusCode", - "type": "text", - "label": "Geo status code" - } - ] - }, - { - "name": "assessment", - "type": "collection", - "label": "Assessment", - "spec": [ - { - "name": "assessedImprovementValue", - "type": "number", - "label": "Assessed improvement value" - }, - { - "name": "assessedLandValue", - "type": "number", - "label": "Assessed land value" - }, - { - "name": "totalAssessedValue", - "type": "number", - "label": "Total assessed value" - }, - { - "name": "assessmentYear", - "type": "number", - "label": "Assessment year" - }, - { - "name": "improvementMarketValue", - "type": "number", - "label": "Improvement market value" - }, - { - "name": "landMarketValue", - "type": "number", - "label": "Land market value" - }, - { - "name": "totalMarketValue", - "type": "number", - "label": "Total market value" - }, - { - "name": "marketValueYear", - "type": "number", - "label": "Market value year" - } - ] - }, - { - "name": "building", - "type": "collection", - "label": "Building", - "spec": [ - { - "name": "totalBuildingAreaSquareFeet", - "type": "number", - "label": "Total building area square feet" - }, - { - "name": "totalBuildingAreaCode", - "type": "text", - "label": "Total building area code" - }, - { - "name": "totalBuildingAreaCodeDescription", - "type": "text", - "label": "Total building area code description" - }, - { - "name": "livingAreaSquareFeet", - "type": "number", - "label": "Living area square feet" - }, - { - "name": "grossBuildingAreaSquareFeet", - "type": "number", - "label": "Gross building area square feet" - }, - { - "name": "adjustedBuildingAreaSquareFeet", - "type": "number", - "label": "Adjusted building area square feet" - }, - { - "name": "yearBuilt", - "type": "number", - "label": "Year built" - }, - { - "name": "effectiveYearBuilt", - "type": "number", - "label": "Effective year built" - }, - { - "name": "buildingCount", - "type": "number", - "label": "Building count" - }, - { - "name": "roomCount", - "type": "number", - "label": "Room count" - }, - { - "name": "unitCount", - "type": "number", - "label": "Unit count" - }, - { - "name": "calculatedBathroomCount", - "type": "number", - "label": "Calculated bathroom count" - }, - { - "name": "fullBathroomCount", - "type": "number", - "label": "Full bathroom count" - }, - { - "name": "bathroomCount", - "type": "number", - "label": "Bathroom count" - }, - { - "name": "bathFixtureCount", - "type": "number", - "label": "Bath fixture count" - }, - { - "name": "storyCount", - "type": "number", - "label": "Story count" - }, - { - "name": "garageParkingSpaceCount", - "type": "number", - "label": "Garage parking space count" - }, - { - "name": "residentialUnitCount", - "type": "number", - "label": "Residential unit count" - }, - { - "name": "features", - "type": "array", - "label": "Features", - "spec": { - "type": "text" - } - }, - { - "name": "airConditioningSourceCode", - "type": "text", - "label": "Air conditioning source code" - }, - { - "name": "airConditioningSource", - "type": "text", - "label": "Air conditioning source" - }, - { - "name": "buildingConditionCode", - "type": "text", - "label": "Building condition code" - }, - { - "name": "buildingCondition", - "type": "text", - "label": "Building condition" - }, - { - "name": "buildingQualityCode", - "type": "text", - "label": "Building quality code" - }, - { - "name": "buildingQuality", - "type": "text", - "label": "Building quality" - }, - { - "name": "constructionTypeCode", - "type": "text", - "label": "Construction type code" - }, - { - "name": "constructionType", - "type": "text", - "label": "Construction type" - }, - { - "name": "exteriorWallsCode", - "type": "text", - "label": "Exterior walls code" - }, - { - "name": "exteriorWalls", - "type": "text", - "label": "Exterior walls" - }, - { - "name": "garageCode", - "type": "text", - "label": "Garage code" - }, - { - "name": "garage", - "type": "text", - "label": "Garage" - }, - { - "name": "heatSourceCode", - "type": "text", - "label": "Heat source code" - }, - { - "name": "heatSource", - "type": "text", - "label": "Heat source" - }, - { - "name": "patioCode", - "type": "text", - "label": "Patio code" - }, - { - "name": "patio", - "type": "text", - "label": "Patio" - }, - { - "name": "poolCode", - "type": "text", - "label": "Pool code" - }, - { - "name": "pool", - "type": "text", - "label": "Pool" - }, - { - "name": "roofCoverCode", - "type": "text", - "label": "Roof cover code" - }, - { - "name": "roofCover", - "type": "text", - "label": "Roof cover" - }, - { - "name": "fireplaceCount", - "type": "number", - "label": "Fireplace count" - } - ] - }, - { - "name": "deedHistory", - "type": "array", - "label": "Deed history", - "spec": [ - { - "name": "buyers", - "type": "array", - "label": "Buyers", - "spec": { - "type": "text" - } - }, - { - "name": "sellers", - "type": "array", - "label": "Sellers", - "spec": { - "type": "text" - } - }, - { - "name": "recordingDate", - "type": "text", - "label": "Recording date" - }, - { - "name": "saleDate", - "type": "text", - "label": "Sale date" - }, - { - "name": "documentNumber", - "type": "text", - "label": "Document number" - }, - { - "name": "documentTypeCode", - "type": "text", - "label": "Document type code" - }, - { - "name": "documentType", - "type": "text", - "label": "Document type" - }, - { - "name": "salePrice", - "type": "number", - "label": "Sale price" - }, - { - "name": "salePriceCode", - "type": "text", - "label": "Sale price code" - }, - { - "name": "transferTax", - "type": "number", - "label": "Transfer tax" - }, - { - "name": "ownerRelationshipType", - "type": "text", - "label": "Owner relationship type" - }, - { - "name": "multipleOwners", - "type": "boolean", - "label": "Multiple owners" - } - ] - }, - { - "name": "demographics", - "type": "collection", - "label": "Demographics", - "spec": [ - { - "name": "age", - "type": "number", - "label": "Age" - }, - { - "name": "emailDomain", - "type": "text", - "label": "Email domain" - }, - { - "name": "householdSize", - "type": "number", - "label": "Household size" - }, - { - "name": "income", - "type": "number", - "label": "Income" - }, - { - "name": "netWorth", - "type": "number", - "label": "Net worth" - }, - { - "name": "discretionaryIncome", - "type": "number", - "label": "Discretionary income" - }, - { - "name": "homeownerRenterCode", - "type": "text", - "label": "Homeowner renter code" - }, - { - "name": "homeownerRenter", - "type": "text", - "label": "Homeowner renter" - }, - { - "name": "genderCode", - "type": "text", - "label": "Gender code" - }, - { - "name": "gender", - "type": "text", - "label": "Gender" - }, - { - "name": "maritalStatusCode", - "type": "text", - "label": "Marital status code" - }, - { - "name": "maritalStatus", - "type": "text", - "label": "Marital status" - }, - { - "name": "childCount", - "type": "number", - "label": "Child count" - }, - { - "name": "hasChildren", - "type": "boolean", - "label": "Has children" - }, - { - "name": "investments", - "type": "array", - "label": "Investments", - "spec": { - "type": "text" - } - }, - { - "name": "individualEducationCode", - "type": "text", - "label": "Individual education code" - }, - { - "name": "individualEducation", - "type": "text", - "label": "Individual education" - }, - { - "name": "individualOccupationCode", - "type": "text", - "label": "Individual occupation code" - }, - { - "name": "individualOccupation", - "type": "text", - "label": "Individual occupation" - }, - { - "name": "businessOwnerCode", - "type": "text", - "label": "Business owner code" - }, - { - "name": "businessOwner", - "type": "text", - "label": "Business owner" - }, - { - "name": "petOwner", - "type": "boolean", - "label": "Pet owner" - }, - { - "name": "millionaire", - "type": "boolean", - "label": "Millionaire" - }, - { - "name": "recentlyDivorced", - "type": "boolean", - "label": "Recently divorced" - }, - { - "name": "singleParent", - "type": "boolean", - "label": "Single parent" - }, - { - "name": "smoker", - "type": "boolean", - "label": "Smoker" - }, - { - "name": "religious", - "type": "boolean", - "label": "Religious" - }, - { - "name": "religiousAffiliationCode", - "type": "text", - "label": "Religious affiliation code" - }, - { - "name": "religiousAffiliation", - "type": "text", - "label": "Religious affiliation" - }, - { - "name": "recentlyMoved", - "type": "boolean", - "label": "Recently moved" - }, - { - "name": "estimatedAreaCreditRating", - "type": "text", - "label": "Estimated area credit rating" - } - ] - }, - { - "name": "foreclosure", - "type": "collection", - "label": "Foreclosure", - "spec": [] - }, - { - "name": "permit", - "type": "collection", - "label": "Permit", - "spec": [ - { - "name": "permitCount", - "type": "number", - "label": "Permit count" - }, - { - "name": "earliestDate", - "type": "text", - "label": "Earliest date" - }, - { - "name": "latestDate", - "type": "text", - "label": "Latest date" - }, - { - "name": "totalJobValue", - "type": "number", - "label": "Total job value" - }, - { - "name": "allTags", - "type": "array", - "label": "All tags", - "spec": { - "type": "text" - } - }, - { - "name": "tags", - "type": "collection", - "label": "Tags", - "spec": [ - { - "name": "addition", - "type": "boolean", - "label": "Addition" - }, - { - "name": "adu", - "type": "boolean", - "label": "Adu" - }, - { - "name": "bathroom", - "type": "boolean", - "label": "Bathroom" - }, - { - "name": "battery", - "type": "boolean", - "label": "Battery" - }, - { - "name": "demolition", - "type": "boolean", - "label": "Demolition" - }, - { - "name": "electrical", - "type": "boolean", - "label": "Electrical" - }, - { - "name": "electricMeter", - "type": "boolean", - "label": "Electric meter" - }, - { - "name": "evCharger", - "type": "boolean", - "label": "Ev charger" - }, - { - "name": "fireSprinkler", - "type": "boolean", - "label": "Fire sprinkler" - }, - { - "name": "gas", - "type": "boolean", - "label": "Gas" - }, - { - "name": "generator", - "type": "boolean", - "label": "Generator" - }, - { - "name": "grading", - "type": "boolean", - "label": "Grading" - }, - { - "name": "heatPump", - "type": "boolean", - "label": "Heat pump" - }, - { - "name": "hvac", - "type": "boolean", - "label": "Hvac" - }, - { - "name": "inspectionPassed", - "type": "boolean", - "label": "Inspection passed" - }, - { - "name": "kitchen", - "type": "boolean", - "label": "Kitchen" - }, - { - "name": "newConstruction", - "type": "boolean", - "label": "New construction" - }, - { - "name": "plumbing", - "type": "boolean", - "label": "Plumbing" - }, - { - "name": "poolAndHotTub", - "type": "boolean", - "label": "Pool and hot tub" - }, - { - "name": "remodel", - "type": "boolean", - "label": "Remodel" - }, - { - "name": "roofing", - "type": "boolean", - "label": "Roofing" - }, - { - "name": "solar", - "type": "boolean", - "label": "Solar" - }, - { - "name": "waterHeater", - "type": "boolean", - "label": "Water heater" - }, - { - "name": "windowDoor", - "type": "boolean", - "label": "Window door" - } - ] - } - ] - }, - { - "name": "general", - "type": "collection", - "label": "General", - "spec": [ - { - "name": "carrierRoute", - "type": "text", - "label": "Carrier route" - }, - { - "name": "vacant", - "type": "boolean", - "label": "Vacant" - }, - { - "name": "mailingAddressVacant", - "type": "boolean", - "label": "Mailing address vacant" - }, - { - "name": "vacantDate", - "type": "text", - "label": "Vacant date" - }, - { - "name": "mobileHome", - "type": "boolean", - "label": "Mobile home" - }, - { - "name": "standardizedLandUseCode", - "type": "text", - "label": "Standardized land use code" - }, - { - "name": "propertyTypeCategory", - "type": "text", - "label": "Property type category" - }, - { - "name": "propertyTypeDetail", - "type": "text", - "label": "Property type detail" - }, - { - "name": "congressionalDistrict", - "type": "text", - "label": "Congressional district" - }, - { - "name": "timeZone", - "type": "text", - "label": "Time zone" - }, - { - "name": "utcOffset", - "type": "number", - "label": "Utc offset" - }, - { - "name": "daylightSavingsTime", - "type": "boolean", - "label": "Daylight savings time" - }, - { - "name": "censusTract", - "type": "text", - "label": "Census tract" - }, - { - "name": "primaryParcel", - "type": "boolean", - "label": "Primary parcel" - }, - { - "name": "parcelCount", - "type": "number", - "label": "Parcel count" - } - ] - }, - { - "name": "ids", - "type": "collection", - "label": "Ids", - "spec": [ - { - "name": "addressHash", - "type": "text", - "label": "Address hash" - }, - { - "name": "apn", - "type": "text", - "label": "Apn" - }, - { - "name": "oldApn", - "type": "text", - "label": "Old apn" - }, - { - "name": "fipsCode", - "type": "text", - "label": "Fips code" - } - ] - }, - { - "name": "legal", - "type": "collection", - "label": "Legal", - "spec": [ - { - "name": "assessorsMapReference", - "type": "text", - "label": "Assessors map reference" - }, - { - "name": "cityTownshipMunicipality", - "type": "text", - "label": "City township municipality" - }, - { - "name": "legalDescription", - "type": "text", - "label": "Legal description" - }, - { - "name": "lotCode", - "type": "text", - "label": "Lot code" - }, - { - "name": "lotNumber", - "type": "text", - "label": "Lot number" - }, - { - "name": "sectionTownshipRangeMeridian", - "type": "text", - "label": "Section township range meridian" - }, - { - "name": "subdivisionName", - "type": "text", - "label": "Subdivision name" - }, - { - "name": "tractNumber", - "type": "text", - "label": "Tract number" - } - ] - }, - { - "name": "lot", - "type": "collection", - "label": "Lot", - "spec": [ - { - "name": "lotSizeAcres", - "type": "number", - "label": "Lot size acres" - }, - { - "name": "lotSizeSquareFeet", - "type": "number", - "label": "Lot size square feet" - }, - { - "name": "zoningCode", - "type": "text", - "label": "Zoning code" - } - ] - }, - { - "name": "mortgageHistory", - "type": "array", - "label": "Mortgage history", - "spec": [ - { - "name": "borrowers", - "type": "array", - "label": "Borrowers", - "spec": { - "type": "text" - } - }, - { - "name": "saleDate", - "type": "text", - "label": "Sale date" - }, - { - "name": "recordingDate", - "type": "text", - "label": "Recording date" - }, - { - "name": "dueDate", - "type": "text", - "label": "Due date" - }, - { - "name": "lenderName", - "type": "text", - "label": "Lender name" - }, - { - "name": "lenderType", - "type": "text", - "label": "Lender type" - }, - { - "name": "lenderTypeCode", - "type": "text", - "label": "Lender type code" - }, - { - "name": "loanAmount", - "type": "number", - "label": "Loan amount" - }, - { - "name": "loanTermMonths", - "type": "number", - "label": "Loan term months" - }, - { - "name": "interestRate", - "type": "text", - "label": "Interest rate" - } - ] - }, - { - "name": "openLien", - "type": "collection", - "label": "Open lien", - "spec": [ - { - "name": "allLoanTypes", - "type": "array", - "label": "All loan types", - "spec": { - "type": "text" - } - }, - { - "name": "juniorLoanTypes", - "type": "array", - "label": "Junior loan types", - "spec": { - "type": "text" - } - }, - { - "name": "totalOpenLienCount", - "type": "number", - "label": "Total open lien count" - }, - { - "name": "mortgages", - "type": "array", - "label": "Mortgages", - "spec": [ - { - "name": "lenderName", - "type": "text", - "label": "Lender name" - }, - { - "name": "lenderType", - "type": "text", - "label": "Lender type" - }, - { - "name": "loanAmount", - "type": "number", - "label": "Loan amount" - }, - { - "name": "loanTermMonths", - "type": "number", - "label": "Loan term months" - }, - { - "name": "interestRate", - "type": "number", - "label": "Interest rate" - }, - { - "name": "loanType", - "type": "text", - "label": "Loan type" - }, - { - "name": "subordinateLoanFlag", - "type": "boolean", - "label": "Subordinate loan flag" - }, - { - "name": "equityFlag", - "type": "boolean", - "label": "Equity flag" - }, - { - "name": "helocFlag", - "type": "boolean", - "label": "Heloc flag" - }, - { - "name": "pudRider", - "type": "boolean", - "label": "Pud rider" - }, - { - "name": "condoRider", - "type": "boolean", - "label": "Condo rider" - }, - { - "name": "multiFamilyRider", - "type": "boolean", - "label": "Multi family rider" - }, - { - "name": "assumable", - "type": "boolean", - "label": "Assumable" - }, - { - "name": "privateLender", - "type": "boolean", - "label": "Private lender" - }, - { - "name": "secondHomeRider", - "type": "boolean", - "label": "Second home rider" - }, - { - "name": "sellerCarryBack", - "type": "boolean", - "label": "Seller carry back" - }, - { - "name": "balloonRider", - "type": "boolean", - "label": "Balloon rider" - } - ] - } - ] - }, - { - "name": "owner", - "type": "collection", - "label": "Owner", - "spec": [ - { - "name": "fullName", - "type": "text", - "label": "Full name" - }, - { - "name": "mailingAddress", - "type": "collection", - "label": "Mailing address", - "spec": [ - { - "name": "houseNumber", - "type": "text", - "label": "House number" - }, - { - "name": "street", - "type": "text", - "label": "Street" - }, - { - "name": "city", - "type": "text", - "label": "City" - }, - { - "name": "county", - "type": "text", - "label": "County" - }, - { - "name": "state", - "type": "text", - "label": "State" - }, - { - "name": "zip", - "type": "text", - "label": "Zip" - }, - { - "name": "zipPlus4", - "type": "text", - "label": "Zip plus4" - }, - { - "name": "formattedStreet", - "type": "text", - "label": "Formatted street" - }, - { - "name": "streetNoUnit", - "type": "text", - "label": "Street no unit" - }, - { - "name": "hash", - "type": "text", - "label": "Hash" - } - ] - }, - { - "name": "names", - "type": "array", - "label": "Names", - "spec": [ - { - "name": "first", - "type": "text", - "label": "First" - }, - { - "name": "last", - "type": "text", - "label": "Last" - }, - { - "name": "full", - "type": "text", - "label": "Full" - } - ] - }, - { - "name": "ownerOccupied", - "type": "boolean", - "label": "Owner occupied" - }, - { - "name": "mailingOptOut", - "type": "boolean", - "label": "Mailing opt out" - }, - { - "name": "hasLandline", - "type": "boolean", - "label": "Has landline" - }, - { - "name": "ownerStatusTypeCode", - "type": "text", - "label": "Owner status type code" - }, - { - "name": "ownerStatusType", - "type": "text", - "label": "Owner status type" - }, - { - "name": "ownershipRightsCode", - "type": "text", - "label": "Ownership rights code" - }, - { - "name": "ownershipRights", - "type": "text", - "label": "Ownership rights" - } - ] - }, - { - "name": "propertyOwnerProfile", - "type": "collection", - "label": "Property owner profile", - "spec": [ - { - "name": "averageYearBuilt", - "type": "number", - "label": "Average year built" - }, - { - "name": "propertiesCount", - "type": "number", - "label": "Properties count" - }, - { - "name": "propertiesTotalEquity", - "type": "number", - "label": "Properties total equity" - }, - { - "name": "propertiesTotalEstimatedValue", - "type": "number", - "label": "Properties total estimated value" - } - ] - }, - { - "name": "quickLists", - "type": "collection", - "label": "Quick lists", - "spec": [ - { - "name": "absenteeOwner", - "type": "boolean", - "label": "Absentee owner" - }, - { - "name": "absenteeOwnerInState", - "type": "boolean", - "label": "Absentee owner in state" - }, - { - "name": "absenteeOwnerOutOfState", - "type": "boolean", - "label": "Absentee owner out of state" - }, - { - "name": "activeListing", - "type": "boolean", - "label": "Active listing" - }, - { - "name": "activeAuction", - "type": "boolean", - "label": "Active auction" - }, - { - "name": "cashBuyer", - "type": "boolean", - "label": "Cash buyer" - }, - { - "name": "corporateOwned", - "type": "boolean", - "label": "Corporate owned" - }, - { - "name": "expiredListing", - "type": "boolean", - "label": "Expired listing" - }, - { - "name": "freeAndClear", - "type": "boolean", - "label": "Free and clear" - }, - { - "name": "highEquity", - "type": "boolean", - "label": "High equity" - }, - { - "name": "inherited", - "type": "boolean", - "label": "Inherited" - }, - { - "name": "listedBelowMarketPrice", - "type": "boolean", - "label": "Listed below market price" - }, - { - "name": "lowEquity", - "type": "boolean", - "label": "Low equity" - }, - { - "name": "mailingAddressVacant", - "type": "boolean", - "label": "Mailing address vacant" - }, - { - "name": "onMarket", - "type": "boolean", - "label": "On market" - }, - { - "name": "outOfStateOwner", - "type": "boolean", - "label": "Out of state owner" - }, - { - "name": "ownerOccupied", - "type": "boolean", - "label": "Owner occupied" - }, - { - "name": "pendingListing", - "type": "boolean", - "label": "Pending listing" - }, - { - "name": "preforeclosure", - "type": "boolean", - "label": "Preforeclosure" - }, - { - "name": "recentlySold", - "type": "boolean", - "label": "Recently sold" - }, - { - "name": "samePropertyAndMailingAddress", - "type": "boolean", - "label": "Same property and mailing address" - }, - { - "name": "taxDefault", - "type": "boolean", - "label": "Tax default" - }, - { - "name": "tiredLandlord", - "type": "boolean", - "label": "Tired landlord" - }, - { - "name": "unknownEquity", - "type": "boolean", - "label": "Unknown equity" - }, - { - "name": "vacant", - "type": "boolean", - "label": "Vacant" - }, - { - "name": "hasHoa", - "type": "boolean", - "label": "Has hoa" - }, - { - "name": "hasHoaFees", - "type": "boolean", - "label": "Has hoa fees" - }, - { - "name": "canceledListing", - "type": "boolean", - "label": "Canceled listing" - }, - { - "name": "noticeOfSale", - "type": "boolean", - "label": "Notice of sale" - }, - { - "name": "noticeOfDefault", - "type": "boolean", - "label": "Notice of default" - }, - { - "name": "noticeOfLisPendens", - "type": "boolean", - "label": "Notice of lis pendens" - } - ] - }, - { - "name": "sale", - "type": "collection", - "label": "Sale", - "spec": [ - { - "name": "lastTransfer", - "type": "collection", - "label": "Last transfer", - "spec": [ - { - "name": "documentNumber", - "type": "text", - "label": "Document number" - }, - { - "name": "documentType", - "type": "text", - "label": "Document type" - }, - { - "name": "priceCodeDescription", - "type": "text", - "label": "Price code description" - }, - { - "name": "priceCode", - "type": "text", - "label": "Price code" - }, - { - "name": "recordingDate", - "type": "text", - "label": "Recording date" - }, - { - "name": "saleDate", - "type": "text", - "label": "Sale date" - } - ] - }, - { - "name": "lastSale", - "type": "collection", - "label": "Last sale", - "spec": [ - { - "name": "saleBuyers", - "type": "array", - "label": "Sale buyers", - "spec": { - "type": "text" - } - }, - { - "name": "saleSellers", - "type": "array", - "label": "Sale sellers", - "spec": { - "type": "text" - } - }, - { - "name": "salePriceIsEstimated", - "type": "boolean", - "label": "Sale price is estimated" - } - ] - }, - { - "name": "flipLength", - "type": "number", - "label": "Flip length" - }, - { - "name": "flipLengthCategory", - "type": "number", - "label": "Flip length category" - }, - { - "name": "flipProfit", - "type": "number", - "label": "Flip profit" - }, - { - "name": "priorTransfer", - "type": "collection", - "label": "Prior transfer", - "spec": [ - { - "name": "documentNumber", - "type": "text", - "label": "Document number" - }, - { - "name": "documentType", - "type": "text", - "label": "Document type" - }, - { - "name": "priceCodeDescription", - "type": "text", - "label": "Price code description" - }, - { - "name": "priceCode", - "type": "text", - "label": "Price code" - }, - { - "name": "salePriceIsEstimated", - "type": "boolean", - "label": "Sale price is estimated" - } - ] - }, - { - "name": "priorSale", - "type": "collection", - "label": "Prior sale", - "spec": [ - { - "name": "recordingDate", - "type": "text", - "label": "Recording date" - }, - { - "name": "saleBuyers", - "type": "array", - "label": "Sale buyers", - "spec": { - "type": "text" - } - }, - { - "name": "saleSellers", - "type": "array", - "label": "Sale sellers", - "spec": { - "type": "text" - } - }, - { - "name": "salePriceIsEstimated", - "type": "boolean", - "label": "Sale price is estimated" - } - ] - } - ] - }, - { - "name": "tax", - "type": "collection", - "label": "Tax", - "spec": [ - { - "name": "taxAmount", - "type": "number", - "label": "Tax amount" - }, - { - "name": "taxYear", - "type": "number", - "label": "Tax year" - }, - { - "name": "taxDelinquentYear", - "type": "number", - "label": "Tax delinquent year" - }, - { - "name": "taxRateCodeArea", - "type": "text", - "label": "Tax rate code area" - } - ] - }, - { - "name": "valuation", - "type": "collection", - "label": "Valuation", - "spec": [ - { - "name": "estimatedValue", - "type": "number", - "label": "Estimated value" - }, - { - "name": "priceRangeMin", - "type": "number", - "label": "Price range min" - }, - { - "name": "priceRangeMax", - "type": "number", - "label": "Price range max" - }, - { - "name": "standardDeviation", - "type": "number", - "label": "Standard deviation" - }, - { - "name": "confidenceScore", - "type": "number", - "label": "Confidence score" - }, - { - "name": "asOfDate", - "type": "text", - "label": "As of date" - }, - { - "name": "equityCurrentEstimatedBalance", - "type": "number", - "label": "Equity current estimated balance" - }, - { - "name": "ltv", - "type": "number", - "label": "Ltv" - }, - { - "name": "equityPercent", - "type": "number", - "label": "Equity percent" - } - ] - }, - { - "name": "meta", - "type": "collection", - "label": "Meta", - "spec": [ - { - "name": "propertyDateModified", - "type": "text", - "label": "Property date modified" - } - ] - } - ] - } -] diff --git a/modules/watchMonitorEventsWithProperty/watchMonitorEventsWithProperty.samples.iml.json b/modules/watchMonitorEventsWithProperty/watchMonitorEventsWithProperty.samples.iml.json deleted file mode 100644 index aac0ae5..0000000 --- a/modules/watchMonitorEventsWithProperty/watchMonitorEventsWithProperty.samples.iml.json +++ /dev/null @@ -1,550 +0,0 @@ -{ - "id": "evt_9c1f2a", - "eventId": "evt_9c1f2a", - "propertyId": "09201d3bd3134f9380704014781fb4c0", - "parcelHash": "a1b2c3d4e5f60718293a4b5c6d7e8f90", - "addressHash": "90a01b18e3834e349a8d1d07d7e086ba", - "addedToSubscriptionIds": [ - "FXeLSlemePGGhvt" - ], - "removedFromSubscriptionIds": [], - "propertyChangedAt": "2026-10-28T22:10:41.000Z", - "sentAt": "2026-10-28T22:10:45.000Z", - "property": { - "_id": "76ef71f2bc0c999e87592cd8302c5d32", - "address": { - "houseNumber": "26823", - "street": "26823 N 31st Dr", - "city": "Phoenix", - "cityAliases": [ - "phoenix" - ], - "county": "Maricopa", - "state": "AZ", - "zip": "85083", - "zipPlus4": "5837", - "formattedStreet": "N 31st Dr", - "streetNoUnit": "26823 N 31st Dr", - "localities": [ - "arizona hillcrest" - ], - "latitude": 33.728785, - "longitude": -112.126019, - "countyFipsCode": "04013", - "hash": "fae16e6adfaf0bb0f306ba89bf7b4c1e", - "normalized": true, - "geoStatus": "Rooftop", - "geoStatusCode": "A" - }, - "assessment": { - "assessedImprovementValue": 27730, - "assessedLandValue": 6930, - "totalAssessedValue": 43300, - "assessmentYear": 2024, - "improvementMarketValue": 346400, - "landMarketValue": 86600, - "totalMarketValue": 433000, - "marketValueYear": 2024 - }, - "building": { - "totalBuildingAreaSquareFeet": 1761, - "totalBuildingAreaCode": "B", - "totalBuildingAreaCodeDescription": "Living Area", - "livingAreaSquareFeet": 1761, - "grossBuildingAreaSquareFeet": 2480, - "adjustedBuildingAreaSquareFeet": 2100, - "yearBuilt": 2001, - "effectiveYearBuilt": 2001, - "buildingCount": 1, - "roomCount": 6, - "unitCount": 1, - "calculatedBathroomCount": 2, - "fullBathroomCount": 2, - "bathroomCount": 2, - "bathFixtureCount": 7, - "storyCount": 1, - "garageParkingSpaceCount": 2, - "residentialUnitCount": 1, - "features": [ - "Air Conditioning", - "Refrigeration Air Conditioning", - "Sauna/Steam Room", - "Koi Pond", - "Mobile Home Hookup", - "Patio", - "Garage", - "Pool", - "Elevator" - ], - "airConditioningSourceCode": "J", - "airConditioningSource": "Refrigeration", - "buildingConditionCode": "F", - "buildingCondition": "Average", - "buildingQualityCode": "D", - "buildingQuality": "B", - "constructionTypeCode": "C", - "constructionType": "Frame", - "exteriorWallsCode": "S", - "exteriorWalls": "Stucco", - "garageCode": "I", - "garage": "Garage", - "heatSourceCode": "X", - "heatSource": "Yes", - "patioCode": "A", - "patio": "Patio", - "poolCode": "H", - "pool": "Pool - Yes", - "roofCoverCode": "I", - "roofCover": "Concrete", - "fireplaceCount": 0 - }, - "deedHistory": [ - { - "buyers": [ - "KB HOME SALES PHOENIX INC" - ], - "sellers": [ - "KB HOME PHOENIX INC", - "KAUFMAN & BROAD OF ARIZONA INC" - ], - "recordingDate": "2001-07-30T00:00:00.000Z", - "saleDate": "2001-07-20T00:00:00.000Z", - "documentNumber": "2001-0688814", - "documentTypeCode": "Z", - "documentType": "Corporation Deed", - "salePrice": 0, - "salePriceCode": "Full Consideration", - "transferTax": 412, - "ownerRelationshipType": "Arm's Length", - "multipleOwners": false - }, - { - "buyers": [ - "CHENEY RHONDA" - ], - "sellers": [ - "NUNEZ JR ROBERTO" - ], - "recordingDate": "2002-08-30T00:00:00.000Z", - "saleDate": "2002-08-19T00:00:00.000Z", - "documentNumber": "2002-0890956", - "documentTypeCode": "BF", - "documentType": "Quit Claim Deed", - "salePrice": 0 - }, - { - "buyers": [ - "ANDERSON RHONDA K" - ], - "sellers": [ - "ANDERSON KYLE DOUGLAS" - ], - "recordingDate": "2005-01-20T00:00:00.000Z", - "saleDate": "2005-01-14T00:00:00.000Z", - "documentNumber": "2005-0080877", - "documentTypeCode": "AQ", - "documentType": "Intra-Family Transfer", - "salePrice": 0, - "interFamily": true - }, - { - "buyers": [ - "ANDERSON RHONDA K" - ], - "sellers": [ - "ANDERSON RHONDA K", - "CHENEY RHONDA" - ], - "recordingDate": "2005-01-20T00:00:00.000Z", - "saleDate": "2005-01-14T00:00:00.000Z", - "documentNumber": "2005-0080876", - "documentTypeCode": "AQ", - "documentType": "Intra-Family Transfer", - "salePrice": 0, - "interFamily": true - }, - { - "buyers": [ - "ANDERSON KYLE", - "ANDERSON RHONDA K" - ], - "sellers": [], - "recordingDate": "2006-12-29T00:00:00.000Z", - "saleDate": "2006-12-11T00:00:00.000Z", - "documentNumber": "2006-1700576", - "documentTypeCode": "DN", - "documentType": "Stand Alone Mortgage" - }, - { - "buyers": [ - "ANDRESON RHONDA K", - "ANDERSON KYLE" - ], - "sellers": [ - "ANDRESON RHONDA K", - "ANDRESON KYLE" - ], - "recordingDate": "2013-01-18T00:00:00.000Z", - "saleDate": "2012-11-13T00:00:00.000Z", - "documentNumber": "2013-0056003", - "documentTypeCode": "AQ", - "documentType": "Intra-Family Transfer", - "salePrice": 0, - "interFamily": true - } - ], - "demographics": { - "age": 52, - "emailDomain": "gmail.com", - "householdSize": 3, - "income": 95000, - "netWorth": 425000, - "discretionaryIncome": 38000, - "homeownerRenterCode": "O", - "homeownerRenter": "Home Owner", - "genderCode": "M", - "gender": "Male", - "maritalStatusCode": "M", - "maritalStatus": "Married", - "childCount": 2, - "hasChildren": true, - "investments": [ - "Real Estate", - "Personal" - ], - "individualEducationCode": "BA", - "individualEducation": "Bachelor's Degree", - "individualOccupationCode": "PRO", - "individualOccupation": "Professional", - "businessOwnerCode": "A", - "businessOwner": "Real Estate", - "petOwner": true, - "millionaire": false, - "recentlyDivorced": false, - "singleParent": false, - "smoker": false, - "religious": true, - "religiousAffiliationCode": "C", - "religiousAffiliation": "Catholic", - "recentlyMoved": false, - "estimatedAreaCreditRating": "B" - }, - "foreclosure": {}, - "permit": { - "permitCount": 3, - "earliestDate": "2015-04-10", - "latestDate": "2022-08-22", - "totalJobValue": 48500, - "allTags": [ - "roofing", - "solar", - "electrical" - ], - "tags": { - "addition": false, - "adu": false, - "bathroom": false, - "battery": false, - "demolition": false, - "electrical": true, - "electricMeter": false, - "evCharger": false, - "fireSprinkler": false, - "gas": false, - "generator": false, - "grading": false, - "heatPump": false, - "hvac": false, - "inspectionPassed": true, - "kitchen": false, - "newConstruction": false, - "plumbing": false, - "poolAndHotTub": false, - "remodel": false, - "roofing": true, - "solar": true, - "waterHeater": false, - "windowDoor": false - } - }, - "general": { - "carrierRoute": "R087", - "vacant": false, - "mailingAddressVacant": false, - "vacantDate": "2021-05-14", - "mobileHome": false, - "standardizedLandUseCode": "R2", - "propertyTypeCategory": "Residential", - "propertyTypeDetail": "Single Family", - "congressionalDistrict": "8", - "timeZone": "Mountain", - "utcOffset": -7, - "daylightSavingsTime": false, - "censusTract": "040136119.001008", - "primaryParcel": true, - "parcelCount": 1 - }, - "ids": { - "addressHash": "fae16e6adfaf0bb0f306ba89bf7b4c1e", - "apn": "205-03-224", - "oldApn": "205032242", - "fipsCode": "04013" - }, - "legal": { - "assessorsMapReference": "MB 51824", - "cityTownshipMunicipality": "Phoenix", - "legalDescription": "ARIZONA HILLCREST MCR 518-24", - "lotCode": "S", - "lotNumber": "199", - "sectionTownshipRangeMeridian": "SEC 35 TWN 5N RNG 2E", - "subdivisionName": "ARIZONA HILLCREST", - "tractNumber": "ARIZONA HILLCREST" - }, - "lot": { - "lotSizeAcres": 0.14637281910009184, - "lotSizeSquareFeet": 6376, - "zoningCode": "R-8" - }, - "mortgageHistory": [ - { - "borrowers": [ - "CHENEY RHONDA" - ], - "saleDate": "2002-08-19T00:00:00.000Z", - "recordingDate": "2002-08-30T00:00:00.000Z", - "dueDate": "2032-09-01T00:00:00.000Z", - "lenderName": "CAPITOL COMMERCE MTG CO", - "lenderType": "Mortgage Company", - "lenderTypeCode": "M", - "loanAmount": 160500, - "loanTermMonths": 360, - "interestRate": "6.43" - }, - { - "borrowers": [ - "ANDERSON RHONDA K" - ], - "saleDate": "2005-01-14T00:00:00.000Z", - "recordingDate": "2005-01-20T00:00:00.000Z", - "dueDate": "2035-02-01T00:00:00.000Z", - "lenderName": "JPMORGAN CHASE BANK NA", - "lenderType": "Bank", - "lenderTypeCode": "B", - "loanTypeCode": "AH", - "loanType": "Unknown (DEFAULT)", - "loanAmount": 156800, - "loanTermMonths": 360, - "interestRate": "5.67" - }, - { - "borrowers": [ - "ANDERSON RHONDA K" - ], - "saleDate": "2005-01-14T00:00:00.000Z", - "recordingDate": "2005-01-20T00:00:00.000Z", - "dueDate": "2035-01-28T00:00:00.000Z", - "lenderName": "JPMORGAN CHASE BANK NA", - "lenderType": "Bank", - "lenderTypeCode": "B", - "loanTypeCode": "K", - "loanType": "Credit Line (Revolving)", - "loanAmount": 19000, - "loanTermMonths": 360, - "interestRate": "5.67" - }, - { - "borrowers": [ - "ANDERSON KYLE", - "ANDERSON RHONDA K" - ], - "saleDate": "2006-12-11T00:00:00.000Z", - "recordingDate": "2006-12-29T00:00:00.000Z", - "dueDate": "2026-12-19T00:00:00.000Z", - "lenderName": "USAA FSB", - "lenderType": "Bank", - "lenderTypeCode": "B", - "loanTypeCode": "K", - "loanType": "Credit Line (Revolving)", - "loanAmount": 75299, - "loanTermMonths": 240, - "interestRate": "6.33" - }, - { - "borrowers": [ - "ANDRESON RHONDA K", - "ANDERSON KYLE" - ], - "saleDate": "2012-11-13T00:00:00.000Z", - "recordingDate": "2013-01-18T00:00:00.000Z", - "dueDate": "2027-12-01T00:00:00.000Z", - "lenderName": "USAA FSB", - "lenderType": "Bank", - "lenderTypeCode": "B", - "loanTypeCode": "U", - "loanType": "New Conventional", - "loanAmount": 112000, - "loanTermMonths": 180, - "interestRate": "3.31" - } - ], - "openLien": { - "allLoanTypes": [], - "juniorLoanTypes": [], - "totalOpenLienCount": 1, - "mortgages": [ - { - "lenderName": "CAPITOL COMMERCE MTG CO", - "lenderType": "Mortgage Company", - "loanAmount": 160500, - "loanTermMonths": 360, - "interestRate": 6.43, - "loanType": "New Conventional", - "subordinateLoanFlag": false, - "equityFlag": false, - "helocFlag": false, - "pudRider": false, - "condoRider": false, - "multiFamilyRider": false, - "assumable": false, - "privateLender": false, - "secondHomeRider": false, - "sellerCarryBack": false, - "balloonRider": false - } - ] - }, - "owner": { - "fullName": "Kyle Anderson; Rhonda K Anderson", - "mailingAddress": { - "houseNumber": "26823", - "street": "26823 N 31st Dr", - "city": "Phoenix", - "county": "Maricopa", - "state": "AZ", - "zip": "85083", - "zipPlus4": "5837", - "formattedStreet": "N 31st Dr", - "streetNoUnit": "26823 N 31st Dr", - "hash": "fae16e6adfaf0bb0f306ba89bf7b4c1e" - }, - "names": [ - { - "first": "Kyle", - "last": "Anderson", - "full": "Kyle Anderson" - }, - { - "first": "Rhonda", - "middle": "K", - "last": "Anderson", - "full": "Rhonda K Anderson" - } - ], - "ownerOccupied": true, - "mailingOptOut": false, - "hasLandline": true, - "ownerStatusTypeCode": "B", - "ownerStatusType": "Individual", - "ownershipRightsCode": "AT", - "ownershipRights": "Joint Tenants" - }, - "propertyOwnerProfile": { - "averageYearBuilt": 2001, - "propertiesCount": 1, - "propertiesTotalEquity": 449821, - "propertiesTotalEstimatedValue": 449821 - }, - "quickLists": { - "absenteeOwner": false, - "absenteeOwnerInState": false, - "absenteeOwnerOutOfState": false, - "activeListing": false, - "activeAuction": false, - "cashBuyer": false, - "corporateOwned": false, - "expiredListing": false, - "freeAndClear": true, - "highEquity": true, - "inherited": false, - "listedBelowMarketPrice": false, - "lowEquity": false, - "mailingAddressVacant": false, - "onMarket": false, - "outOfStateOwner": false, - "ownerOccupied": true, - "pendingListing": false, - "preforeclosure": false, - "recentlySold": false, - "samePropertyAndMailingAddress": true, - "taxDefault": false, - "tiredLandlord": false, - "unknownEquity": false, - "vacant": false, - "hasHoa": true, - "hasHoaFees": true, - "canceledListing": false, - "noticeOfSale": false, - "noticeOfDefault": false, - "noticeOfLisPendens": false - }, - "sale": { - "lastTransfer": { - "documentNumber": "2013-0056003", - "documentType": "Intra-Family Transfer", - "priceCodeDescription": "Transfer Tax on document indicated as EXEMPT.", - "priceCode": "Z", - "recordingDate": "2013-01-18T00:00:00.000Z", - "saleDate": "2012-11-13T00:00:00.000Z" - }, - "lastSale": { - "saleBuyers": [ - "Michael R Torres" - ], - "saleSellers": [ - "BlueSky Holdings LLC" - ], - "salePriceIsEstimated": false - }, - "flipLength": 0, - "flipLengthCategory": 0, - "flipProfit": 0, - "priorTransfer": { - "documentNumber": "2005-0080877", - "documentType": "Intra-Family Transfer", - "priceCodeDescription": "Non-arms length transaction.", - "priceCode": "N", - "salePriceIsEstimated": false - }, - "priorSale": { - "recordingDate": "2005-01-20T00:00:00.000Z", - "saleBuyers": [ - "BlueSky Holdings LLC" - ], - "saleSellers": [ - "Estate Of Dorothy J Miller" - ], - "salePriceIsEstimated": false - } - }, - "tax": { - "taxAmount": 19, - "taxYear": 2023, - "taxDelinquentYear": 2022, - "taxRateCodeArea": "971300" - }, - "valuation": { - "estimatedValue": 449821, - "priceRangeMin": 382348, - "priceRangeMax": 517294, - "standardDeviation": 12, - "confidenceScore": 88, - "asOfDate": "2024-02-28T00:00:00.000Z", - "equityCurrentEstimatedBalance": 449821, - "ltv": 0, - "equityPercent": 100 - }, - "meta": { - "propertyDateModified": "2024-04-11T09:54:59.574Z" - } - } -} diff --git a/package.json b/package.json index b3c09c3..a0026c4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "batchdata-make", - "version": "0.3.3", + "version": "0.4.0", "private": true, "description": "BatchData custom app for Make", "type": "module", diff --git a/rpcs/listMonitors/listMonitors.communication.iml.json b/rpcs/listMonitors/listMonitors.communication.iml.json deleted file mode 100644 index f75f025..0000000 --- a/rpcs/listMonitors/listMonitors.communication.iml.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "url": "/v2/property-subscription", - "method": "GET", - "response": { - "iterate": "{{body.results.subscriptions}}", - "output": { - "label": "{{item.id}}", - "value": "{{item.id}}" - } - } -} diff --git a/rpcs/listMonitors/listMonitors.params.iml.json b/rpcs/listMonitors/listMonitors.params.iml.json deleted file mode 100644 index fe51488..0000000 --- a/rpcs/listMonitors/listMonitors.params.iml.json +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/scripts/catalog-modules.mjs b/scripts/catalog-modules.mjs index 1a3a113..ebdbb2c 100644 --- a/scripts/catalog-modules.mjs +++ b/scripts/catalog-modules.mjs @@ -1,11 +1,12 @@ // Turns the shared catalog (scripts/catalog.json) into Make modules, webhooks and RPCs. // The catalog is the single source of truth shared with the Zapier and n8n integrations. import fs from 'node:fs'; -import { root, firstItem, requireApiObject } from './lib.mjs'; +import { root } from './lib.mjs'; import { limitParam, offsetPaging, cursorPaging } from './paging.mjs'; export const catalog = JSON.parse(fs.readFileSync(`${root}/scripts/catalog.json`, 'utf8')); -const fx = (n) => JSON.parse(fs.readFileSync(`${root}/test/fixtures/${n}.json`, 'utf8')); +const MONITOR_OPS = new Set(['list_monitors', 'get_monitor', 'create_monitor', 'delete_monitor']); +const makeOps = catalog.ops.filter((op) => !MONITOR_OPS.has(op.key)); const camel = (s) => s.replace(/[-_]+([a-z0-9])/g, (_, c) => c.toUpperCase()); const moduleKey = (key) => camel(key); @@ -63,7 +64,7 @@ const paramFor = (f, name = camel(f.key), dynamicRpc) => { } }; -const RPC_FOR = { new_search_session: 'listSearchSessions', new_monitor: 'listMonitors' }; +const RPC_FOR = { new_search_session: 'listSearchSessions' }; // Optional nested filters (for example request.status.equals) are grouped into one collection // parameter that mirrors the wire shape, so an untouched group is dropped instead of sent as {}. @@ -253,14 +254,14 @@ const SAMPLE_FILL = { warnings: [], nextPageCursor: 'eyJwYWdlIjoyfQ' }; // ---------- modules ---------- export const catalogModules = {}; -for (const op of catalog.ops) { +for (const op of makeOps) { const key = moduleKey(op.key); catalogModules[key] = { moduleType: op.kind === 'search' ? 'search' : 'action', actionCrud: CRUD(op), catalogKey: op.key, label: op.label, - description: describe(op).replace('the "New Property Monitor Event" trigger', 'the "Watch Property Monitor Events (Instant)" trigger'), + description: describe(op), communication: requestFor(op), params: paramsFor(op), sampleFrom: () => ({ ...op.sample, ...Object.fromEntries(Object.keys(op.result.attach ?? {}).filter((k) => !(k in op.sample)).map((k) => [k, SAMPLE_FILL[k] ?? {}])) }), @@ -329,74 +330,7 @@ const trig = (key) => catalog.triggers.find((t) => t.key === key); take.help = 'Whole number from 1 to 100. Default 5. You are billed per property delivered on each check. Use a low number while you test.'; } -// ---------- instant trigger: webhook component + two modules ---------- -const ev = trig('monitor_event'); -const criteriaOnly = (f) => !f.local; -const webhookParams = ev.fields.filter(criteriaOnly).map((f) => paramFor(f)); -export const webhooks = { - monitorEvents: { - label: 'Property monitor events', - webhookType: 'web', - communication: { - condition: "{{length(ifempty(body.eventId, '')) > 0}}", - uid: '{{body.eventId}}', - output: { '{{...}}': '{{body}}', id: '{{body.eventId}}' }, - }, - params: webhookParams, - attach: { - url: api(ev.http.path), - method: 'POST', - body: { - ...buildBody(ev, { only: criteriaOnly }), - deliveryConfig: { type: 'webhook', url: '{{webhook.url}}' }, - }, - response: { data: { externalHookId: '{{body.result.subscriptionId}}' } }, - }, - detach: { - url: api(ev.http.deletePath).replace('{id}', '{{webhook.externalHookId}}'), - method: 'DELETE', - }, - }, -}; -export const EVENT_LIMITS_NOTE = - 'Limits: up to 5 monitors per team, a monitor cannot be edited after it is created (delete and recreate it), a new monitor can take up to 7 days to start delivering, and delivery is best effort (4 attempts per event), so the same event can arrive more than once. Use the Event ID to skip repeats.'; - -const evCore = ev.description - .replace('Turning the Zap or scenario on', 'Turning the scenario on') - .replace('; turn on "Include Property Record" to also look up the full property record.', '.') - .replace(/ The optional property lookup is billed per event, per matched property\./, ''); -if (evCore.includes('Include Property Record') || evCore.includes('Zap')) throw new Error('monitor event description still has catalog-only wording'); -// The plain trigger points to the property-record version; the property-record version describes itself. -const evBase = evCore.replace('Limits:', 'To get the full property record with each event, use "Watch Property Monitor Events with Property Record (Instant, Billed)" instead. Limits:'); - -catalogModules.watchMonitorEvents = { - moduleType: 'instant_trigger', - catalogKey: ev.key, - webhook: 'monitorEvents', - label: 'Watch Property Monitor Events (Instant)', - description: evBase, - communication: {}, - staticParams: [], - sampleFrom: () => ev.sample, -}; -catalogModules.watchMonitorEventsWithProperty = { - moduleType: 'instant_trigger', - catalogKey: ev.key, - webhook: 'monitorEvents', - label: 'Watch Property Monitor Events with Property Record (Instant, Billed)', - description: `${evCore} This version also looks up the full property record for every event and adds it to the output as "property". The lookup is billed per event, per matched property, on top of the monitor charges.`, - communication: { - url: api(ev.hydrate.path), - method: 'POST', - body: { requests: [{ propertyId: '{{payload.propertyId}}' }] }, - response: { - valid: requireApiObject('body.results'), - output: { '{{...}}': '{{payload}}', [ev.hydrate.into]: firstItem(`body.${ev.hydrate.listPath}`) }, - }, - }, - staticParams: [], - sampleFrom: () => ({ ...ev.sample, property: fx('property-lookup-all-attributes').results.properties[0] }), -}; +export const webhooks = {}; // ---------- Make limit and pagination for the catalog list modules ---------- const swapTakeForLimit = (m, param) => { @@ -446,15 +380,6 @@ export const rpcs = { }, params: [], }, - listMonitors: { - label: 'List property monitors', - communication: { - url: '/v2/property-subscription', - method: 'GET', - response: { iterate: '{{body.results.subscriptions}}', output: { label: '{{item.id}}', value: '{{item.id}}' } }, - }, - params: [], - }, }; export const catalogGroups = [ @@ -463,6 +388,5 @@ export const catalogGroups = [ { label: 'Addresses', modules: ['autocompleteAddress', 'geocodeAddress', 'reverseGeocode', 'batchVerifyAddress'] }, { label: 'Investors', modules: ['investorBuybox', 'investorProperties'] }, { label: 'Search sessions', modules: ['createSearchSession', 'listSearchSessions', 'deleteSearchSession'] }, - { label: 'Property monitors', modules: ['createMonitor', 'listMonitors', 'getMonitor', 'deleteMonitor'] }, - { label: 'Triggers', modules: ['watchSearchSessions', 'watchSessionProperties', 'watchMonitorEvents', 'watchMonitorEventsWithProperty'] }, + { label: 'Triggers', modules: ['watchSearchSessions', 'watchSessionProperties'] }, ]; diff --git a/test/catalog.test.mjs b/test/catalog.test.mjs index e404f28..a54fd01 100644 --- a/test/catalog.test.mjs +++ b/test/catalog.test.mjs @@ -10,6 +10,8 @@ const read = (rel) => JSON.parse(fs.readFileSync(path.join(root, rel), 'utf8')); const catalog = read('scripts/catalog.json'); const app = read('makecomapp.json'); const camel = (s) => s.replace(/[-_]+([a-z0-9])/g, (_, c) => c.toUpperCase()); +const MONITOR_OPS = new Set(['list_monitors', 'get_monitor', 'create_monitor', 'delete_monitor']); +const ops = catalog.ops.filter((op) => !MONITOR_OPS.has(op.key)); const files = (key) => app.components.module[key].codeFiles; const comm = (key) => read(files(key).communication); const params = (key) => read(files(key).mappableParams); @@ -46,17 +48,18 @@ test('vendored catalog matches its recorded hash and the shared source when pres if (fs.existsSync(shared)) assert.equal(fs.readFileSync(shared, 'utf8'), raw); }); -test('every catalog operation and the polling and instant triggers are present as modules', () => { - for (const op of catalog.ops) assert.ok(app.components.module[camel(op.key)], op.key); - for (const key of ['watchSearchSessions', 'watchSessionProperties', 'watchMonitorEvents', 'watchMonitorEventsWithProperty']) { +test('every catalog operation except the property monitors and the polling triggers are present as modules', () => { + for (const op of ops) assert.ok(app.components.module[camel(op.key)], op.key); + for (const key of ['watchSearchSessions', 'watchSessionProperties']) { assert.ok(app.components.module[key], key); } - assert.equal(Object.keys(app.components.module).length, 30); + for (const op of catalog.ops.filter((o) => MONITOR_OPS.has(o.key))) assert.equal(app.components.module[camel(op.key)], undefined, op.key); + assert.equal(Object.keys(app.components.module).length, 24); }); test('copy lint: one contact, no retired names, no callback fields, no Zapier wording', () => { const banned = new RegExp(['batch' + 'leads', 'batch\\s*' + 'dialer'].join('|'), 'i'); - const dirs = ['modules', 'webhooks', 'rpcs', 'connections', 'general']; + const dirs = ['modules', 'webhooks', 'rpcs', 'connections', 'general'].filter((d) => fs.existsSync(path.join(root, d))); const all = dirs.flatMap((d) => fs.readdirSync(path.join(root, d), { recursive: true }).map((f) => path.join(root, d, f))).filter((f) => f.endsWith('.json')); for (const f of [...all, path.join(root, 'makecomapp.json')]) { const text = fs.readFileSync(f, 'utf8'); @@ -69,7 +72,7 @@ test('copy lint: one contact, no retired names, no callback fields, no Zapier wo }); test('request sweep: every operation builds a versioned URL and a body that renders cleanly', () => { - for (const op of catalog.ops) { + for (const op of ops) { const key = camel(op.key); const p = {}; for (const f of op.fields) { @@ -92,7 +95,7 @@ test('request sweep: every operation builds a versioned URL and a body that rend }); test('output sweep: every operation yields the sample fields from a realistic response', () => { - for (const op of catalog.ops) { + for (const op of ops) { const key = camel(op.key); const c = comm(key); const body = fakeBody(op); @@ -173,21 +176,6 @@ test('search sessions: the session ID and cursor pagination are sent, deletes sa assert.equal(idParam.options, 'rpc://listSearchSessions'); }); -test('monitor creation is stream delivery only and never offers a webhook delivery type', () => { - const m = params('createMonitor'); - const type = m.find((p) => p.name === 'deliveryType'); - assert.deepEqual(type.options.map((o) => o.value), ['kinesis', 'event-hub']); - const k = request('createMonitor', { deliveryType: 'kinesis', query: 'Phoenix, AZ', kinesis: { streamName: 's', region: 'us-west-2' }, eventHub: { eventHubName: 'ignored' } }); - assert.deepEqual(k.body, { searchCriteria: { query: 'Phoenix, AZ' }, deliveryConfig: { type: 'kinesis', streamName: 's', region: 'us-west-2' } }); - const e = request('createMonitor', { deliveryType: 'event-hub', eventHub: { eventHubName: 'h' }, kinesis: { streamName: 'ignored' } }); - assert.deepEqual(e.body.deliveryConfig, { type: 'event-hub', eventHub: { eventHubName: 'h' } }); - assert.equal(request('deleteMonitor', { id: 'abc' }).url, '/v2/property-subscription/abc'); - assert.equal(request('getMonitor', { id: 'abc' }).method, 'GET'); - for (const key of ['createMonitor', 'listMonitors', 'getMonitor', 'deleteMonitor']) { - assert.match(app.components.module[key].description, /5 monitors per team/, key); - } -}); - test('polling triggers: sessions by creation date, session properties by poll time, billing disclosed', () => { const s = comm('watchSearchSessions'); assert.deepEqual(render(s.qs, { parameters: {} }), { take: 100 }); @@ -204,40 +192,6 @@ test('polling triggers: sessions by creation date, session properties by poll ti assert.equal(read(files('watchSessionProperties').staticParams).find((p) => p.name === 'sessionId').required, true); }); -test('instant trigger: the hook is the trigger\'s own, criteria come from the webhook parameters', () => { - const w = app.components.webhook.monitorEvents; - const attach = read(w.codeFiles.attach); - const scope = { parameters: { query: 'Phoenix, AZ', quickLists: ['vacant'] }, webhook: { url: 'https://hook.make.com/abc' } }; - assert.deepEqual(render(attach.body, scope), { - searchCriteria: { query: 'Phoenix, AZ', quickLists: ['vacant'] }, - deliveryConfig: { type: 'webhook', url: 'https://hook.make.com/abc' }, - }); - const detach = read(w.codeFiles.detach); - assert.equal(render(detach.url, { webhook: { externalHookId: 'sub1' } }), '/v2/property-subscription/sub1'); - assert.equal(render(attach.response.data.externalHookId, { body: { result: { subscriptionId: 'sub1' } } }), 'sub1'); - const hook = read(w.codeFiles.communication); - const payload = { eventId: 'e1', propertyId: 'p1', addedToSubscriptionIds: ['sub1'] }; - assert.equal(render(hook.condition, { body: payload }), true); - assert.equal(render(hook.condition, { body: { hello: 1 } }), false); - assert.equal(render(hook.output, { body: payload }).id, 'e1'); - assert.equal(render(hook.output, { body: payload }).propertyId, 'p1'); - const params_ = read(w.codeFiles.params).map((p) => p.name); - assert.ok(!params_.some((n) => /include|webhook|url/i.test(n)), params_.join()); -}); - -test('instant trigger: property lookup only happens in the billed variant', () => { - assert.deepEqual(comm('watchMonitorEvents'), {}); - const c = comm('watchMonitorEventsWithProperty'); - const payload = { id: 'e1', eventId: 'e1', propertyId: 'p1' }; - assert.equal(c.url, '/v1/property/lookup/all-attributes'); - assert.deepEqual(render(c.body, { payload }), { requests: [{ propertyId: 'p1' }] }); - const out = render(c.response.output, { payload, body: { results: { properties: [{ _id: 'p1' }] } } }); - assert.deepEqual(out, { ...payload, property: { _id: 'p1' } }); - assert.match(app.components.module.watchMonitorEventsWithProperty.description, /billed per event, per matched property/i); - assert.match(app.components.module.watchMonitorEvents.description, /4 attempts per event/); - assert.match(app.components.module.watchMonitorEvents.description, /Property Record/); -}); - test('generic API call: wallet, async, path tricks and monitor creation are blocked', () => { const c = comm('makeAnApiCall'); const url = (u, method = 'GET') => render(c.url, { parameters: { url: u, method } }); @@ -253,10 +207,9 @@ test('generic API call: wallet, async, path tricks and monitor creation are bloc } }); -test('blocked API calls send no body or query; the webhook dedupes on eventId', () => { +test('blocked API calls send no body or query', () => { const c = comm('makeAnApiCall'); const scope = { parameters: { url: 'v1/wallet', method: 'POST', body: '{"a":1}', qs: [{ key: 'x', value: '1' }] } }; assert.equal(render(c.body, scope), undefined); assert.deepEqual(render(c.qs, scope), {}); - assert.equal(JSON.parse(fs.readFileSync(path.join(root, 'webhooks/monitorEvents/monitorEvents.communication.iml.json'), 'utf8')).uid, '{{body.eventId}}'); }); diff --git a/test/replay.test.mjs b/test/replay.test.mjs index 31592e2..5452f5d 100644 --- a/test/replay.test.mjs +++ b/test/replay.test.mjs @@ -187,7 +187,7 @@ test('base: bearer header comes from the connection and errors read the BatchDat assert.equal(b.response.error['401'].type, 'InvalidAccessTokenError'); }); -test('lookup, verify address and the billed instant trigger do not throw on a 401 or HTML body', () => { +test('lookup and verify address do not throw on a 401 or HTML body', () => { const html = 'BatchData'; const unauthorized = { status: { code: 401, text: 'Unauthorized', message: 'Invalid token.', data: [] } }; const lookupFx = fixture('property-lookup-all-attributes'); @@ -210,17 +210,4 @@ test('lookup, verify address and the billed instant trigger do not throw on a 40 assert.equal(respond('verifyAddress', verifyFx).hash, verifyFx.results.addresses[0].hash); assert.equal(respond('verifyAddress', unauthorized), undefined); assert.equal(respond('verifyAddress', html), undefined); - - const billed = comm('watchMonitorEventsWithProperty'); - const payload = { eventId: 'e1', propertyId: 'p1' }; - assert.equal(render(billed.response.valid.condition, { body: lookupFx, payload }), true); - assert.equal(render(billed.response.valid.condition, { body: unauthorized, payload }), false); - assert.equal(render(billed.response.valid.condition, { body: html, payload }), false); - assert.equal(billed.response.valid.type, 'InvalidAccessTokenError'); - const hydrated = respond('watchMonitorEventsWithProperty', lookupFx, { payload }); - assert.equal(hydrated.eventId, 'e1'); - assert.equal(hydrated.property._id, lookupFx.results.properties[0]._id); - const failed = respond('watchMonitorEventsWithProperty', html, { payload }); - assert.equal(failed.eventId, 'e1'); - assert.equal(failed.property, undefined); }); diff --git a/test/structure.test.mjs b/test/structure.test.mjs index 4505b2b..7c6b551 100644 --- a/test/structure.test.mjs +++ b/test/structure.test.mjs @@ -41,11 +41,11 @@ test('id mapping covers every module and groups cover every module', () => { assert.deepEqual(grouped, keys); }); -test('triggers: polling ones declare a trigger rule, instant ones point at a declared webhook', () => { +test('triggers: the two polling ones declare a trigger rule and there are no instant triggers', () => { const polling = Object.entries(app.components.module).filter(([, m]) => m.moduleType === 'trigger'); const instant = Object.entries(app.components.module).filter(([, m]) => m.moduleType === 'instant_trigger'); assert.equal(polling.length, 2); - assert.equal(instant.length, 2); + assert.equal(instant.length, 0); for (const [key, m] of polling) { const rule = read(m.codeFiles.communication).response.trigger; assert.ok(['id', 'date'].includes(rule.type), key); @@ -53,31 +53,16 @@ test('triggers: polling ones declare a trigger rule, instant ones point at a dec assert.ok(m.codeFiles.staticParams, key); assert.equal(m.codeFiles.mappableParams, undefined, key); } - for (const [key, m] of instant) { - assert.ok(app.components.webhook[m.webhook], key); - assert.equal(m.actionCrud, undefined, key); - } }); -test('the webhook component creates and removes its own monitor and nothing else', () => { - const w = app.components.webhook.monitorEvents; - assert.equal(w.webhookType, 'web'); - assert.equal(w.connection, 'batchdata'); - for (const rel of Object.values(w.codeFiles)) assert.ok(fs.existsSync(path.join(root, rel)), rel); - const attach = read(w.codeFiles.attach); - assert.equal(attach.method, 'POST'); - assert.equal(attach.url, '/v2/property-subscription'); - assert.deepEqual(attach.body.deliveryConfig, { type: 'webhook', url: '{{webhook.url}}' }); - assert.equal(attach.response.data.externalHookId, '{{body.result.subscriptionId}}'); - const detach = read(w.codeFiles.detach); - assert.equal(detach.method, 'DELETE'); - assert.equal(detach.url, '/v2/property-subscription/{{webhook.externalHookId}}'); - assert.deepEqual(app.origins[0].idMapping.webhook.map((x) => x.local), ['monitorEvents']); +test('the app declares no webhook component', () => { + assert.deepEqual(app.components.webhook, {}); + assert.deepEqual(app.origins[0].idMapping.webhook, []); }); test('RPC dropdowns are declared, mapped and used', () => { - assert.deepEqual(Object.keys(app.components.rpc).sort(), ['listMonitors', 'listSearchSessions']); - assert.deepEqual(app.origins[0].idMapping.rpc.map((x) => x.local).sort(), ['listMonitors', 'listSearchSessions']); + assert.deepEqual(Object.keys(app.components.rpc).sort(), ['listSearchSessions']); + assert.deepEqual(app.origins[0].idMapping.rpc.map((x) => x.local).sort(), ['listSearchSessions']); for (const r of Object.values(app.components.rpc)) for (const rel of Object.values(r.codeFiles)) assert.ok(fs.existsSync(path.join(root, rel)), rel); const used = JSON.stringify(read(app.components.module.deleteSearchSession.codeFiles.mappableParams)); assert.match(used, /rpc:\/\/listSearchSessions/); @@ -210,12 +195,11 @@ test('list outputs use a 1-based index instead of first(), and mark a missing AP const matches = [...text.matchAll(/\{\{([^{}\]]+\[1\])\}\}/g)]; found += matches.length; } - assert.ok(found >= 3, `expected at least 3 [1] list-item mappings, found ${found}`); + assert.ok(found >= 2, `expected at least 2 [1] list-item mappings, found ${found}`); for (const [rel, parent] of [ ['modules/lookupProperty/lookupProperty.communication.iml.json', 'body.results'], ['modules/verifyAddress/verifyAddress.communication.iml.json', 'body.results'], - ['modules/watchMonitorEventsWithProperty/watchMonitorEventsWithProperty.communication.iml.json', 'body.results'], ]) { const comm = read(rel); assert.equal(comm.response.valid.type, 'InvalidAccessTokenError', rel); @@ -223,3 +207,17 @@ test('list outputs use a 1-based index instead of first(), and mark a missing AP assert.match(comm.response.valid.message, /API token is valid/); } }); + +test('the property monitor modules, their webhook and their RPC are not generated', () => { + const removed = ['createMonitor', 'getMonitor', 'deleteMonitor', 'listMonitors', 'watchMonitorEvents', 'watchMonitorEventsWithProperty', 'monitorEvents', 'rpc://listMonitors']; + const generatedDirs = ['modules', 'webhooks', 'rpcs', 'connections', 'general']; + const generated = allFiles.filter((f) => generatedDirs.some((d) => path.relative(root, f).startsWith(`${d}${path.sep}`))); + assert.ok(generated.length > 30); + for (const f of [path.join(root, 'makecomapp.json'), ...generated]) { + const text = fs.readFileSync(f, 'utf8'); + for (const name of removed) assert.ok(!text.includes(name), `${path.relative(root, f)} mentions ${name}`); + } + for (const name of removed.slice(0, 6)) assert.equal(app.components.module[name], undefined, name); + assert.equal(app.components.rpc.listMonitors, undefined); + for (const dir of ['webhooks/monitorEvents', 'rpcs/listMonitors', ...removed.slice(0, 6).map((n) => `modules/${n}`)]) assert.ok(!fs.existsSync(path.join(root, dir)), dir); +}); diff --git a/webhooks/monitorEvents/monitorEvents.attach.iml.json b/webhooks/monitorEvents/monitorEvents.attach.iml.json deleted file mode 100644 index e4ad6dc..0000000 --- a/webhooks/monitorEvents/monitorEvents.attach.iml.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "url": "/v2/property-subscription", - "method": "POST", - "body": { - "searchCriteria": { - "{{...}}": "{{if(parameters.additionalCriteria, parseJSON(parameters.additionalCriteria), undefined)}}", - "query": "{{ifempty(parameters.query, undefined)}}", - "quickLists": "{{if(length(parameters.quickLists) > 0, parameters.quickLists, undefined)}}", - "orQuickLists": "{{if(length(parameters.orQuickLists) > 0, parameters.orQuickLists, undefined)}}" - }, - "deliveryConfig": { - "type": "webhook", - "url": "{{webhook.url}}" - } - }, - "response": { - "data": { - "externalHookId": "{{body.result.subscriptionId}}" - } - } -} diff --git a/webhooks/monitorEvents/monitorEvents.communication.iml.json b/webhooks/monitorEvents/monitorEvents.communication.iml.json deleted file mode 100644 index 55a8e56..0000000 --- a/webhooks/monitorEvents/monitorEvents.communication.iml.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "condition": "{{length(ifempty(body.eventId, '')) > 0}}", - "uid": "{{body.eventId}}", - "output": { - "{{...}}": "{{body}}", - "id": "{{body.eventId}}" - } -} diff --git a/webhooks/monitorEvents/monitorEvents.detach.iml.json b/webhooks/monitorEvents/monitorEvents.detach.iml.json deleted file mode 100644 index 63f2b43..0000000 --- a/webhooks/monitorEvents/monitorEvents.detach.iml.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "url": "/v2/property-subscription/{{webhook.externalHookId}}", - "method": "DELETE" -} diff --git a/webhooks/monitorEvents/monitorEvents.params.iml.json b/webhooks/monitorEvents/monitorEvents.params.iml.json deleted file mode 100644 index 9dab103..0000000 --- a/webhooks/monitorEvents/monitorEvents.params.iml.json +++ /dev/null @@ -1,340 +0,0 @@ -[ - { - "name": "query", - "label": "Location Query", - "help": "City, county, ZIP code or address text, for example \"Phoenix, AZ\".", - "type": "text" - }, - { - "name": "quickLists", - "label": "Quick Lists (Include)", - "help": "Properties must match ALL selected lists.", - "type": "array", - "spec": { - "type": "select", - "options": [ - { - "label": "absentee-owner", - "value": "absentee-owner" - }, - { - "label": "active-auction", - "value": "active-auction" - }, - { - "label": "active-listing", - "value": "active-listing" - }, - { - "label": "canceled-listing", - "value": "canceled-listing" - }, - { - "label": "cash-buyer", - "value": "cash-buyer" - }, - { - "label": "corporate-owned", - "value": "corporate-owned" - }, - { - "label": "expired-listing", - "value": "expired-listing" - }, - { - "label": "failed-listing", - "value": "failed-listing" - }, - { - "label": "fix-and-flip", - "value": "fix-and-flip" - }, - { - "label": "free-and-clear", - "value": "free-and-clear" - }, - { - "label": "for-sale-by-owner", - "value": "for-sale-by-owner" - }, - { - "label": "has-hoa", - "value": "has-hoa" - }, - { - "label": "has-hoa-fees", - "value": "has-hoa-fees" - }, - { - "label": "high-equity", - "value": "high-equity" - }, - { - "label": "inherited", - "value": "inherited" - }, - { - "label": "involuntary-lien", - "value": "involuntary-lien" - }, - { - "label": "in-state-absentee-owner", - "value": "in-state-absentee-owner" - }, - { - "label": "listed-below-market-price", - "value": "listed-below-market-price" - }, - { - "label": "low-equity", - "value": "low-equity" - }, - { - "label": "mailing-address-vacant", - "value": "mailing-address-vacant" - }, - { - "label": "notice-of-default", - "value": "notice-of-default" - }, - { - "label": "notice-of-lis-pendens", - "value": "notice-of-lis-pendens" - }, - { - "label": "notice-of-sale", - "value": "notice-of-sale" - }, - { - "label": "on-market", - "value": "on-market" - }, - { - "label": "out-of-state-absentee-owner", - "value": "out-of-state-absentee-owner" - }, - { - "label": "out-of-state-owner", - "value": "out-of-state-owner" - }, - { - "label": "owner-occupied", - "value": "owner-occupied" - }, - { - "label": "pending-listing", - "value": "pending-listing" - }, - { - "label": "preforeclosure", - "value": "preforeclosure" - }, - { - "label": "recently-sold", - "value": "recently-sold" - }, - { - "label": "same-property-and-mailing-address", - "value": "same-property-and-mailing-address" - }, - { - "label": "senior-owner", - "value": "senior-owner" - }, - { - "label": "tax-default", - "value": "tax-default" - }, - { - "label": "tired-landlord", - "value": "tired-landlord" - }, - { - "label": "trust-owned", - "value": "trust-owned" - }, - { - "label": "unknown-equity", - "value": "unknown-equity" - }, - { - "label": "vacant", - "value": "vacant" - }, - { - "label": "vacant-lot", - "value": "vacant-lot" - } - ] - } - }, - { - "name": "orQuickLists", - "label": "Quick Lists (Match Any)", - "help": "Properties must match AT LEAST ONE selected list.", - "type": "array", - "spec": { - "type": "select", - "options": [ - { - "label": "absentee-owner", - "value": "absentee-owner" - }, - { - "label": "active-auction", - "value": "active-auction" - }, - { - "label": "active-listing", - "value": "active-listing" - }, - { - "label": "canceled-listing", - "value": "canceled-listing" - }, - { - "label": "cash-buyer", - "value": "cash-buyer" - }, - { - "label": "corporate-owned", - "value": "corporate-owned" - }, - { - "label": "expired-listing", - "value": "expired-listing" - }, - { - "label": "failed-listing", - "value": "failed-listing" - }, - { - "label": "fix-and-flip", - "value": "fix-and-flip" - }, - { - "label": "free-and-clear", - "value": "free-and-clear" - }, - { - "label": "for-sale-by-owner", - "value": "for-sale-by-owner" - }, - { - "label": "has-hoa", - "value": "has-hoa" - }, - { - "label": "has-hoa-fees", - "value": "has-hoa-fees" - }, - { - "label": "high-equity", - "value": "high-equity" - }, - { - "label": "inherited", - "value": "inherited" - }, - { - "label": "involuntary-lien", - "value": "involuntary-lien" - }, - { - "label": "in-state-absentee-owner", - "value": "in-state-absentee-owner" - }, - { - "label": "listed-below-market-price", - "value": "listed-below-market-price" - }, - { - "label": "low-equity", - "value": "low-equity" - }, - { - "label": "mailing-address-vacant", - "value": "mailing-address-vacant" - }, - { - "label": "notice-of-default", - "value": "notice-of-default" - }, - { - "label": "notice-of-lis-pendens", - "value": "notice-of-lis-pendens" - }, - { - "label": "notice-of-sale", - "value": "notice-of-sale" - }, - { - "label": "on-market", - "value": "on-market" - }, - { - "label": "out-of-state-absentee-owner", - "value": "out-of-state-absentee-owner" - }, - { - "label": "out-of-state-owner", - "value": "out-of-state-owner" - }, - { - "label": "owner-occupied", - "value": "owner-occupied" - }, - { - "label": "pending-listing", - "value": "pending-listing" - }, - { - "label": "preforeclosure", - "value": "preforeclosure" - }, - { - "label": "recently-sold", - "value": "recently-sold" - }, - { - "label": "same-property-and-mailing-address", - "value": "same-property-and-mailing-address" - }, - { - "label": "senior-owner", - "value": "senior-owner" - }, - { - "label": "tax-default", - "value": "tax-default" - }, - { - "label": "tired-landlord", - "value": "tired-landlord" - }, - { - "label": "trust-owned", - "value": "trust-owned" - }, - { - "label": "unknown-equity", - "value": "unknown-equity" - }, - { - "label": "vacant", - "value": "vacant" - }, - { - "label": "vacant-lot", - "value": "vacant-lot" - } - ] - } - }, - { - "name": "additionalCriteria", - "label": "Additional Criteria (JSON)", - "help": "Optional JSON object merged into the search criteria. The fields above win on conflict. Callback URL keys are ignored. Optional JSON object with extra filters, for example {\"general\":{\"propertyTypeCategory\":{\"equals\":\"Single Family\"}}}. Fields you fill in above take priority.", - "type": "text" - } -]