@model-match/api 3.103.1 → 3.105.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
@@ -27787,9 +27787,13 @@
27787
27787
  "type": "string"
27788
27788
  },
27789
27789
  "sha256": {
27790
- "description": "Hex SHA-256 of the bytes. Empty while an upload that declared none is in progress; set when it completes.",
27790
+ "description": "Hex SHA-256 of the bytes. Empty while `sha256Pending` is true.",
27791
27791
  "type": "string"
27792
27792
  },
27793
+ "sha256Pending": {
27794
+ "description": "True while the SHA-256 is not known yet: the upload (or the latest replacement) declared none, so it is computed in the background after `complete`, usually within a minute or two for large files. The file opens and downloads as usual meanwhile; `sha256` is empty until it is set.",
27795
+ "type": "boolean"
27796
+ },
27793
27797
  "sizeBytes": {
27794
27798
  "type": "integer"
27795
27799
  },
@@ -27812,6 +27816,7 @@
27812
27816
  "mediaType",
27813
27817
  "sizeBytes",
27814
27818
  "sha256",
27819
+ "sha256Pending",
27815
27820
  "revision",
27816
27821
  "origin",
27817
27822
  "kind",
@@ -27981,7 +27986,7 @@
27981
27986
  "type": "object"
27982
27987
  },
27983
27988
  "sha256": {
27984
- "description": "Hex SHA-256 of the bytes, if you have it: the upload is then refused when the bytes differ. Leave it out and it is computed when the upload completes.",
27989
+ "description": "Hex SHA-256 of the bytes, if you have it: the upload is then refused when the bytes differ. Leave it out and it is computed in the background after the upload completes (`sha256Pending` is true until then).",
27985
27990
  "pattern": "^[0-9a-fA-F]{64}$",
27986
27991
  "type": "string"
27987
27992
  },
@@ -28076,7 +28081,7 @@
28076
28081
  "type": "string"
28077
28082
  },
28078
28083
  "sha256": {
28079
- "description": "Hex SHA-256 of the new bytes, if you have it. Leave it out and it is computed on complete.",
28084
+ "description": "Hex SHA-256 of the new bytes, if you have it. Leave it out and it is computed in the background after complete (`sha256Pending` is true until then).",
28080
28085
  "pattern": "^[0-9a-fA-F]{64}$",
28081
28086
  "type": "string"
28082
28087
  },
@@ -51314,6 +51319,33 @@
51314
51319
  "lastRun": {
51315
51320
  "$ref": "#/components/schemas/StudioJobRun"
51316
51321
  },
51322
+ "limits": {
51323
+ "description": "What one run of this job may use, as things stand now.",
51324
+ "properties": {
51325
+ "maxRows": {
51326
+ "description": "Most rows one run's result may hold.",
51327
+ "type": "number"
51328
+ },
51329
+ "runsOn": {
51330
+ "description": "`dedicated`: each run gets capacity of its own, with more memory (a `heavy` job, when available). `shared`: runs on the shared capacity.",
51331
+ "enum": [
51332
+ "dedicated",
51333
+ "shared"
51334
+ ],
51335
+ "type": "string"
51336
+ },
51337
+ "timeoutSeconds": {
51338
+ "description": "How long one run may take before it is stopped.",
51339
+ "type": "number"
51340
+ }
51341
+ },
51342
+ "required": [
51343
+ "timeoutSeconds",
51344
+ "maxRows",
51345
+ "runsOn"
51346
+ ],
51347
+ "type": "object"
51348
+ },
51317
51349
  "name": {
51318
51350
  "type": "string"
51319
51351
  },
@@ -51334,6 +51366,10 @@
51334
51366
  ],
51335
51367
  "type": "object"
51336
51368
  },
51369
+ "perState": {
51370
+ "description": "Heavy only: per state, joined. Not for national totals.",
51371
+ "type": "boolean"
51372
+ },
51337
51373
  "schedule": {
51338
51374
  "enum": [
51339
51375
  "manual",
@@ -51780,6 +51816,10 @@
51780
51816
  ],
51781
51817
  "type": "object"
51782
51818
  },
51819
+ "perState": {
51820
+ "description": "Heavy only: per state, joined. Not for national totals.",
51821
+ "type": "boolean"
51822
+ },
51783
51823
  "schedule": {
51784
51824
  "description": "`manual` — runs only when asked. `daily` — about every 24 hours. `weekly` — every 7 days. Counted from when the job is saved.",
51785
51825
  "enum": [
@@ -52044,12 +52084,41 @@
52044
52084
  "finishedAt": {
52045
52085
  "type": "string"
52046
52086
  },
52087
+ "limits": {
52088
+ "description": "The limits this run had.",
52089
+ "properties": {
52090
+ "maxRows": {
52091
+ "description": "Most rows one run's result may hold.",
52092
+ "type": "number"
52093
+ },
52094
+ "timeoutSeconds": {
52095
+ "description": "How long one run may take before it is stopped.",
52096
+ "type": "number"
52097
+ }
52098
+ },
52099
+ "required": [
52100
+ "timeoutSeconds",
52101
+ "maxRows"
52102
+ ],
52103
+ "type": "object"
52104
+ },
52105
+ "perState": {
52106
+ "description": "True: the SQL ran once for each state (`perState`).",
52107
+ "type": "boolean"
52108
+ },
52047
52109
  "rowCount": {
52048
52110
  "type": "number"
52049
52111
  },
52050
52112
  "runId": {
52051
52113
  "type": "string"
52052
52114
  },
52115
+ "runsOn": {
52116
+ "description": "`dedicated`: ran on capacity of its own, with more memory than an ordinary run. Absent: the shared capacity.",
52117
+ "enum": [
52118
+ "dedicated"
52119
+ ],
52120
+ "type": "string"
52121
+ },
52053
52122
  "size": {
52054
52123
  "description": "`heavy`: ran with a heavy job's limits and price.",
52055
52124
  "enum": [
@@ -52060,6 +52129,56 @@
52060
52129
  "startedAt": {
52061
52130
  "type": "string"
52062
52131
  },
52132
+ "states": {
52133
+ "description": "A per-state run: how each state went.",
52134
+ "items": {
52135
+ "properties": {
52136
+ "attempts": {
52137
+ "description": "2 when the first try failed and it was tried again.",
52138
+ "type": "number"
52139
+ },
52140
+ "elapsedMs": {
52141
+ "type": "number"
52142
+ },
52143
+ "error": {
52144
+ "properties": {
52145
+ "code": {
52146
+ "type": "string"
52147
+ },
52148
+ "message": {
52149
+ "type": "string"
52150
+ }
52151
+ },
52152
+ "required": [
52153
+ "code",
52154
+ "message"
52155
+ ],
52156
+ "type": "object"
52157
+ },
52158
+ "rowCount": {
52159
+ "type": "number"
52160
+ },
52161
+ "state": {
52162
+ "description": "Two-letter state code; `other` for records whose state is not known.",
52163
+ "type": "string"
52164
+ },
52165
+ "status": {
52166
+ "enum": [
52167
+ "succeeded",
52168
+ "failed"
52169
+ ],
52170
+ "type": "string"
52171
+ }
52172
+ },
52173
+ "required": [
52174
+ "state",
52175
+ "status",
52176
+ "attempts"
52177
+ ],
52178
+ "type": "object"
52179
+ },
52180
+ "type": "array"
52181
+ },
52063
52182
  "status": {
52064
52183
  "enum": [
52065
52184
  "running",
@@ -52163,6 +52282,10 @@
52163
52282
  ],
52164
52283
  "type": "object"
52165
52284
  },
52285
+ "perState": {
52286
+ "description": "Heavy only: per state, joined. Not for national totals.",
52287
+ "type": "boolean"
52288
+ },
52166
52289
  "size": {
52167
52290
  "description": "`heavy`: more time and rows per run (catalog `limits.heavyJobs`), if enabled for the organization.",
52168
52291
  "enum": [
@@ -57644,7 +57767,7 @@
57644
57767
  "info": {
57645
57768
  "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.",
57646
57769
  "title": "ModelMatch API",
57647
- "version": "3.200.0"
57770
+ "version": "3.202.0"
57648
57771
  },
57649
57772
  "openapi": "3.1.0",
57650
57773
  "paths": {
@@ -100945,7 +101068,7 @@
100945
101068
  ]
100946
101069
  },
100947
101070
  "post": {
100948
- "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. `size: heavy`: more time and rows per run (the catalog's `limits.heavyJobs`), 100 credits a run, for organizations with heavy runs enabled (`403 entitlement_missing` otherwise); the SQL rules are the same.",
101071
+ "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. `size: heavy`: more time and rows per run (the catalog's `limits.heavyJobs`), 100 credits a run, for organizations with heavy runs enabled (`403 entitlement_missing` otherwise); the SQL rules are the same. A heavy run gets capacity of its own with more memory and takes minutes rather than seconds; the job's `limits` say how long a run may take. `perState: true` (heavy jobs only; off unless set) runs the SQL once for each state and puts the results together. It is correct ONLY when every row of the result depends on one state's data — a list of homes, a join per property. It is wrong for national rankings, totals or averages: a top 10 would become a top 10 in every state. SQL ending in `LIMIT` is refused for it. A state that fails is tried once more, and the run lists how each state went (`states`).",
100949
101072
  "operationId": "createStudioJob",
100950
101073
  "requestBody": {
100951
101074
  "content": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@model-match/api",
3
- "version": "3.103.1",
3
+ "version": "3.105.0",
4
4
  "description": "TypeScript client for the ModelMatch API",
5
5
  "license": "MIT",
6
6
  "files": [