@model-match/api 3.84.0 → 3.85.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/openapi.json CHANGED
@@ -47588,7 +47588,7 @@
47588
47588
  "type": "string"
47589
47589
  },
47590
47590
  "on": {
47591
- "description": "`rows_added` — a key that was not in the previous run. `rows_removed` — a key the previous run had and this one does not. `threshold` — `column` `op` `value` holds for a key now and did not in the previous run.",
47591
+ "description": "`rows_added`: a key new since the previous run. `rows_removed`: a key gone since. `threshold`: `column` `op` `value` holds for a key now and did not before.",
47592
47592
  "enum": [
47593
47593
  "rows_added",
47594
47594
  "rows_removed",
@@ -47618,6 +47618,18 @@
47618
47618
  },
47619
47619
  "type": "array"
47620
47620
  },
47621
+ "copiedFrom": {
47622
+ "description": "When it was saved as a copy: the job (`job`) or the ModelMatch table (`published`) it came from.",
47623
+ "properties": {
47624
+ "job": {
47625
+ "type": "string"
47626
+ },
47627
+ "published": {
47628
+ "type": "string"
47629
+ }
47630
+ },
47631
+ "type": "object"
47632
+ },
47621
47633
  "createdAt": {
47622
47634
  "type": "string"
47623
47635
  },
@@ -47764,7 +47776,7 @@
47764
47776
  "type": "string"
47765
47777
  },
47766
47778
  "on": {
47767
- "description": "`rows_added` — a key that was not in the previous run. `rows_removed` — a key the previous run had and this one does not. `threshold` — `column` `op` `value` holds for a key now and did not in the previous run.",
47779
+ "description": "`rows_added`: a key new since the previous run. `rows_removed`: a key gone since. `threshold`: `column` `op` `value` holds for a key now and did not before.",
47768
47780
  "enum": [
47769
47781
  "rows_added",
47770
47782
  "rows_removed",
@@ -48011,7 +48023,7 @@
48011
48023
  "additionalProperties": false,
48012
48024
  "properties": {
48013
48025
  "alerts": {
48014
- "description": "Changes between one run and the next worth flagging. A match is recorded on the run and, on a scheduled run, emailed to the job's creator.",
48026
+ "description": "Changes between runs to flag; on a scheduled run a match is emailed to the creator.",
48015
48027
  "items": {
48016
48028
  "properties": {
48017
48029
  "column": {
@@ -48019,7 +48031,7 @@
48019
48031
  "type": "string"
48020
48032
  },
48021
48033
  "on": {
48022
- "description": "`rows_added` — a key that was not in the previous run. `rows_removed` — a key the previous run had and this one does not. `threshold` — `column` `op` `value` holds for a key now and did not in the previous run.",
48034
+ "description": "`rows_added`: a key new since the previous run. `rows_removed`: a key gone since. `threshold`: `column` `op` `value` holds for a key now and did not before.",
48023
48035
  "enum": [
48024
48036
  "rows_added",
48025
48037
  "rows_removed",
@@ -48050,13 +48062,21 @@
48050
48062
  "maxItems": 5,
48051
48063
  "type": "array"
48052
48064
  },
48065
+ "copyFrom": {
48066
+ "description": "Copy one of your jobs by name; fields given override it.",
48067
+ "type": "string"
48068
+ },
48069
+ "copyFromPublished": {
48070
+ "description": "Or copy a ModelMatch `mm_*` table's job.",
48071
+ "type": "string"
48072
+ },
48053
48073
  "description": {
48054
48074
  "description": "What the job is for. Shown in the catalog.",
48055
48075
  "maxLength": 500,
48056
48076
  "type": "string"
48057
48077
  },
48058
48078
  "keys": {
48059
- "description": "The column or columns that identify one row of the result (for example `companyNmlsId`). Needed for 'what changed' and for alerts; one row per key.",
48079
+ "description": "Columns identifying one row (e.g. `companyNmlsId`); needed for 'what changed' and alerts.",
48060
48080
  "items": {
48061
48081
  "minLength": 1,
48062
48082
  "type": "string"
@@ -48092,16 +48112,14 @@
48092
48112
  "type": "string"
48093
48113
  },
48094
48114
  "sql": {
48095
- "description": "One read-only SELECT, checked when the job is saved. It may use `$as_of`, the date of the run (a DATE), so the same job can be re-run for any day.",
48115
+ "description": "One read-only SELECT, checked when the job is saved. It may use `$as_of`, the date of the run (a DATE), so the same job can be re-run for any day. Required unless copying.",
48096
48116
  "maxLength": 20000,
48097
48117
  "minLength": 1,
48098
48118
  "type": "string"
48099
48119
  }
48100
48120
  },
48101
48121
  "required": [
48102
- "name",
48103
- "sql",
48104
- "schedule"
48122
+ "name"
48105
48123
  ],
48106
48124
  "type": "object"
48107
48125
  },
@@ -48153,7 +48171,7 @@
48153
48171
  "type": "string"
48154
48172
  },
48155
48173
  "on": {
48156
- "description": "`rows_added` — a key that was not in the previous run. `rows_removed` — a key the previous run had and this one does not. `threshold` — `column` `op` `value` holds for a key now and did not in the previous run.",
48174
+ "description": "`rows_added`: a key new since the previous run. `rows_removed`: a key gone since. `threshold`: `column` `op` `value` holds for a key now and did not before.",
48157
48175
  "enum": [
48158
48176
  "rows_added",
48159
48177
  "rows_removed",
@@ -48464,6 +48482,11 @@
48464
48482
  "nullable": true,
48465
48483
  "type": "string"
48466
48484
  },
48485
+ "basedOnPublished": {
48486
+ "description": "The ModelMatch model this one was copied from (its table); its card compares against it.",
48487
+ "nullable": true,
48488
+ "type": "string"
48489
+ },
48467
48490
  "boosts": {
48468
48491
  "description": "The priority boosts (empty when none). When there are any, the scores table also has `priorityScore`, `priorityRank` and `priorityMultiplier`: sort by `priorityRank` for the boosted list; `score` and `rank` stay the model's own.",
48469
48492
  "items": {
@@ -49198,6 +49221,10 @@
49198
49221
  "pattern": "^[a-z][a-z0-9_]{2,39}$",
49199
49222
  "type": "string"
49200
49223
  },
49224
+ "basedOnPublished": {
49225
+ "description": "Copy a ModelMatch model (`mm_model_*` table); fields given override it.",
49226
+ "type": "string"
49227
+ },
49201
49228
  "boosts": {
49202
49229
  "description": "After the model: matching homes' score × `multiply` is `priorityScore`; `score` and the card are unchanged. Text: `in`/`notIn`; numbers: `gte`/`lte`; dates: `onOrAfter`/`onOrBefore`.",
49203
49230
  "items": {
@@ -49405,7 +49432,7 @@
49405
49432
  "StudioModelError": {
49406
49433
  "properties": {
49407
49434
  "code": {
49408
- "description": "Stable code. The request: `invalid_request`, `invalid_model`, `invalid_model_name`, `unknown_outcome`, `unknown_data_point`, `blocked_data_point` (a data point that describes today, not the as-of date), `unknown_table`, `unknown_column`, `unsupported_key`, `direction_not_allowed` (a direction on a data point that is not a number), `invalid_boost`. The model: `model_not_found`, `model_exists`, `model_limit_reached`, `model_training_in_progress`, `model_not_ready`. Your own data: `no_date_column`, `data_point_is_outcome`, `data_point_is_key`, `data_point_after_outcome`, `data_point_needs_outcomes_table`, `data_points_missing_for_population`, `too_few_examples`, `too_few_positives`, `outcomes_all_one_class`, `outcome_dates_in_future`, `match_rate_too_low`. Access: `entitlement_missing` (the model uses neighborhood data points, or a boost or direction on where a home is, that your organization has not enabled; `details.dataPoints`, `details.boostColumns`, `details.directionRules`), `entitlement_unavailable`. Shared: `busy`, `rate_limited`, `no_organization`, `models_unavailable`, `studio_unavailable`.",
49435
+ "description": "Stable code. The request: `invalid_request`, `invalid_model`, `invalid_model_name`, `unknown_outcome`, `unknown_data_point`, `blocked_data_point` (a data point that describes today, not the as-of date), `unknown_table`, `unknown_column`, `unsupported_key`, `direction_not_allowed` (a direction on a data point that is not a number), `invalid_boost`. The model: `model_not_found`, `published_model_not_found` (`basedOnPublished` names no published model), `model_exists`, `model_limit_reached`, `model_training_in_progress`, `model_not_ready`. Your own data: `no_date_column`, `data_point_is_outcome`, `data_point_is_key`, `data_point_after_outcome`, `data_point_needs_outcomes_table`, `data_points_missing_for_population`, `too_few_examples`, `too_few_positives`, `outcomes_all_one_class`, `outcome_dates_in_future`, `match_rate_too_low`. Access: `entitlement_missing` (the model uses neighborhood data points, or a boost or direction on where a home is, that your organization has not enabled; `details.dataPoints`, `details.boostColumns`, `details.directionRules`), `entitlement_unavailable`. Shared: `busy`, `rate_limited`, `no_organization`, `models_unavailable`, `studio_unavailable`.",
49409
49436
  "example": "match_rate_too_low",
49410
49437
  "type": "string"
49411
49438
  },
@@ -50546,6 +50573,13 @@
50546
50573
  "description": "The table its scores are in, the same for every organization. Query it with Studio.",
50547
50574
  "example": "mm_model_refi_watch",
50548
50575
  "type": "string"
50576
+ },
50577
+ "weighting": {
50578
+ "description": "How it was weighted — recent history, direction rules, priority boosts — one sentence each; empty when it was not. A copy (`basedOnPublished` on createStudioModel) starts with the same settings.",
50579
+ "items": {
50580
+ "type": "string"
50581
+ },
50582
+ "type": "array"
50549
50583
  }
50550
50584
  },
50551
50585
  "required": [
@@ -50561,6 +50595,7 @@
50561
50595
  "learnedFrom",
50562
50596
  "metrics",
50563
50597
  "dataPoints",
50598
+ "weighting",
50564
50599
  "caveats"
50565
50600
  ],
50566
50601
  "type": "object"
@@ -51942,7 +51977,7 @@
51942
51977
  "info": {
51943
51978
  "description": "ModelMatch API — mortgage and real-estate market data.\n\n## Bulk delivery limits\n\nThe `POST /{entity}/bulk-delivery` endpoints export a full result set to\nS3 as NDJSON, JSON, CSV, or Parquet.\n\n- **Up to 5,000 rows per delivery: no entitlement required.** Available to\n every authenticated caller.\n- **Above 5,000 rows: requires the entity's `bulk-delivery.{entity}`\n entitlement** (e.g. `bulk-delivery.loans`). The grant's scope sets your\n row ceiling and may also restrict which rows and fields you receive.\n\nA delivery that would exceed the limit available to you is rejected with\n`403 entitlement_missing`, reporting the matched row count and the ceiling\nthat applied. To stay under the limit, pass `limit` — the job then delivers\n(and bills for) only the first `limit` rows of a broader query.\n\n**Need a higher limit?** Email support@modelmatch.com to request the\nentitlement. Limits are raised per organization and per entity.\n\nBulk delivery is billed at 1 credit per delivered row whether or not\nan entitlement is held.\n\nInstead of a download, a delivery can be sent to a push target configured\non your workspace: pass `destination: { type: \"push-target\", targetId }`.\nThe same limits and billing apply.",
51944
51979
  "title": "ModelMatch API",
51945
- "version": "3.168.0"
51980
+ "version": "3.169.0"
51946
51981
  },
51947
51982
  "openapi": "3.1.0",
51948
51983
  "paths": {
@@ -91157,7 +91192,7 @@
91157
91192
  ]
91158
91193
  },
91159
91194
  "post": {
91160
- "description": "Save a SQL question to run again: on a schedule (`daily`, `weekly`) or only when asked (`manual`). Each run stores its result as a table named after the job, which later questions — and later jobs — can query like any other table. Name the `keys` (the columns that identify one row) to get 'what changed since the last run', and add `alerts` to flag new rows, removed rows or a number crossing a threshold. When an alert matches on a scheduled run, the job's creator is emailed (once per hourly tick, every job of theirs in one email, also in their notifications); `notify: { email: false }` saves the job without those emails, and `updateStudioJob` changes it later. Webhooks are not available yet. The SQL is checked when the job is saved: an unknown table or column, or a key that is not in the result, is refused here rather than at the first run. Saving does not run the job. Saving is free; each run that succeeds costs 10 credits, including the runs a `daily` or `weekly` schedule starts.",
91195
+ "description": "Save a SQL question to run again: on a schedule (`daily`, `weekly`) or only when asked (`manual`). Each run stores its result as a table named after the job, which later questions — and later jobs — can query like any other table. Name the `keys` (the columns that identify one row) to get 'what changed since the last run', and add `alerts` to flag new rows, removed rows or a number crossing a threshold. When an alert matches on a scheduled run, the job's creator is emailed (once per hourly tick, every job of theirs in one email, also in their notifications); `notify: { email: false }` saves the job without those emails, and `updateStudioJob` changes it later. Webhooks are not available yet. The SQL is checked when the job is saved: an unknown table or column, or a key that is not in the result, is refused here rather than at the first run. Saving does not run the job. To start from an existing job, give `copyFrom` (one of your jobs) or `copyFromPublished` (the `mm_*` table of a job ModelMatch publishes) instead of `sql`: its SQL, keys, alerts and description are copied into an editable job of your own — anything the request gives overrides them — checked like any other, starting `manual`; the job keeps `copiedFrom`. A published table built by a program, or a published model (copy that with createStudioModel and `basedOnPublished`), cannot be copied as a job. Saving is free; each run that succeeds costs 10 credits, including the runs a `daily` or `weekly` schedule starts.",
91161
91196
  "operationId": "createStudioJob",
91162
91197
  "requestBody": {
91163
91198
  "content": {
@@ -91800,7 +91835,7 @@
91800
91835
  }
91801
91836
  }
91802
91837
  },
91803
- "description": "`model_not_found` — your organization has no model of that name."
91838
+ "description": "`model_not_found` — your organization has no model of that name. `published_model_not_found` — `basedOnPublished` names no model ModelMatch publishes."
91804
91839
  },
91805
91840
  "409": {
91806
91841
  "content": {
@@ -91849,7 +91884,7 @@
91849
91884
  ]
91850
91885
  },
91851
91886
  "post": {
91852
- "description": "Define a model — what to predict, for whom, in which state, and the data points to use — and start training it. It answers at once with `status: training` and `expectedMinutes`, a range that depends on the size of the state: a couple of minutes for a small state, 15 to 25 for the largest (an estimate; say the range, and say it is an estimate). Read the model with getStudioModel until it is `ready` or `refused`: `progress` gives the numbered step it is on and how long is left. `features` is the heart of it: the data points the person believes matter. Their own knowledge can be data points too — columns of their uploaded outcomes table such as a lead source or a rating their team gives. To learn from their own results instead of a market outcome, pass `outcomeSource` (an uploaded table with a home, a date and what happened on every row); that usually helps most. Everything a model learns from is taken strictly before each case's date, and a data point that could show it the answer is refused with the reason. To try a different list of data points, send the same `name` with `replace: true`, or a new name with `basedOn`: the new report card says what changed. An uploaded file's table is named `upload_<name>` (the upload `my_deals` is the table `upload_my_deals`); a wrong name is refused with the names that exist. Data points marked `needsFairLendingReview` describe the neighborhood and need neighborhood data enabled for the organization (`neighborhoodDataAllowed` on getStudioModelOptions): without it a model that uses them — including one that leaves `features` out, which means every data point — is refused with `403 entitlement_missing`, naming them in `details.dataPoints`; so is a priority boost on ZIP code or city, or a direction rule on a place (`details.boostColumns`, `details.directionRules`); tell the person to ask their ModelMatch admin, or pick other data points. Weighting is optional: `recencyWeighting` counts recent past cases more while learning (testing stays unweighted), a `direction` on a number data point holds the model to it, and `boosts` add `priorityScore` and `priorityRank` to the scores table after the model; the report card is about `score`, never the boosted order. A request that cannot work is refused now with a clear reason (`error`, `code`, and the numbers in `details`). An organization can have a few models running at once (3 by default; past that, `409 model_training_in_progress` says how many are running and the limit), and a model runs once at a time; up to 10 models. 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free.",
91887
+ "description": "Define a model — what to predict, for whom, in which state, and the data points to use — and start training it. It answers at once with `status: training` and `expectedMinutes`, a range that depends on the size of the state: a couple of minutes for a small state, 15 to 25 for the largest (an estimate; say the range, and say it is an estimate). Read the model with getStudioModel until it is `ready` or `refused`: `progress` gives the numbered step it is on and how long is left. `features` is the heart of it: the data points the person believes matter. Their own knowledge can be data points too — columns of their uploaded outcomes table such as a lead source or a rating their team gives. To learn from their own results instead of a market outcome, pass `outcomeSource` (an uploaded table with a home, a date and what happened on every row); that usually helps most. Everything a model learns from is taken strictly before each case's date, and a data point that could show it the answer is refused with the reason. To try a different list of data points, send the same `name` with `replace: true`, or a new name with `basedOn`: the new report card says what changed. An uploaded file's table is named `upload_<name>` (the upload `my_deals` is the table `upload_my_deals`); a wrong name is refused with the names that exist. Data points marked `needsFairLendingReview` describe the neighborhood and need neighborhood data enabled for the organization (`neighborhoodDataAllowed` on getStudioModelOptions): without it a model that uses them — including one that leaves `features` out, which means every data point — is refused with `403 entitlement_missing`, naming them in `details.dataPoints`; so is a priority boost on ZIP code or city, or a direction rule on a place (`details.boostColumns`, `details.directionRules`); tell the person to ask their ModelMatch admin, or pick other data points. `basedOnPublished` starts from a model ModelMatch publishes (its `mm_model_*` table): its outcome, data points and weighting are copied into your organization as your own model — anything this request gives overrides them — and trained on your scope; its report card compares with the published original. Neighborhood data points, boosts or directions it carries need neighborhood data enabled like your own (or override `features` / `boosts` to leave them out). Weighting is optional: `recencyWeighting` counts recent past cases more while learning (testing stays unweighted), a `direction` on a number data point holds the model to it, and `boosts` add `priorityScore` and `priorityRank` to the scores table after the model; the report card is about `score`, never the boosted order. A request that cannot work is refused now with a clear reason (`error`, `code`, and the numbers in `details`). An organization can have a few models running at once (3 by default; past that, `409 model_training_in_progress` says how many are running and the limit), and a model runs once at a time; up to 10 models. 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free.",
91853
91888
  "operationId": "createStudioModel",
91854
91889
  "requestBody": {
91855
91890
  "content": {
@@ -91910,7 +91945,7 @@
91910
91945
  }
91911
91946
  }
91912
91947
  },
91913
- "description": "`model_not_found` — your organization has no model of that name."
91948
+ "description": "`model_not_found` — your organization has no model of that name. `published_model_not_found` — `basedOnPublished` names no model ModelMatch publishes."
91914
91949
  },
91915
91950
  "409": {
91916
91951
  "content": {
@@ -92022,7 +92057,7 @@
92022
92057
  }
92023
92058
  }
92024
92059
  },
92025
- "description": "`model_not_found` — your organization has no model of that name."
92060
+ "description": "`model_not_found` — your organization has no model of that name. `published_model_not_found` — `basedOnPublished` names no model ModelMatch publishes."
92026
92061
  },
92027
92062
  "409": {
92028
92063
  "content": {
@@ -92234,7 +92269,7 @@
92234
92269
  }
92235
92270
  }
92236
92271
  },
92237
- "description": "`model_not_found` — your organization has no model of that name."
92272
+ "description": "`model_not_found` — your organization has no model of that name. `published_model_not_found` — `basedOnPublished` names no model ModelMatch publishes."
92238
92273
  },
92239
92274
  "409": {
92240
92275
  "content": {
@@ -92358,7 +92393,7 @@
92358
92393
  }
92359
92394
  }
92360
92395
  },
92361
- "description": "`model_not_found` — your organization has no model of that name."
92396
+ "description": "`model_not_found` — your organization has no model of that name. `published_model_not_found` — `basedOnPublished` names no model ModelMatch publishes."
92362
92397
  },
92363
92398
  "409": {
92364
92399
  "content": {
@@ -92494,7 +92529,7 @@
92494
92529
  }
92495
92530
  }
92496
92531
  },
92497
- "description": "`model_not_found` — your organization has no model of that name."
92532
+ "description": "`model_not_found` — your organization has no model of that name. `published_model_not_found` — `basedOnPublished` names no model ModelMatch publishes."
92498
92533
  },
92499
92534
  "409": {
92500
92535
  "content": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@model-match/api",
3
- "version": "3.84.0",
3
+ "version": "3.85.0",
4
4
  "description": "TypeScript client for the ModelMatch API",
5
5
  "license": "MIT",
6
6
  "files": [