@model-match/api 3.83.1 → 3.83.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { T as client, n as createClient } from "../src-hzB8r_3G.mjs";
1
+ import { T as client, n as createClient } from "../src-B2K7EFVL.mjs";
2
2
  //#region src/slim/sdk.gen.ts
3
3
  /**
4
4
  * Search agents with filters
@@ -6657,7 +6657,7 @@ const refreshStudioModel = (options) => (options.client ?? client).post({
6657
6657
  /**
6658
6658
  * The result of a question that ran in the background
6659
6659
  *
6660
- * What became of a question `runStudioQuery` answered `202` for. `running`: wait `pollAfterSeconds` and fetch again — after a few tries, tell the user it is still running and can be checked later. `succeeded`: the same answer a quick question gets (`columns`, `rows`, `rowCount`, `truncated`, `elapsedMs`), kept for an hour. `failed`: `error` and `code`, as the question itself would have been refused or stopped. `expired`: the answer is no longer kept. Fetching is free. A question that succeeded in the background costs 5 credits once, whether or not its result is fetched: `credits.pending` on the result says what your organization is charged for it. Only the organization that asked can fetch a result.
6660
+ * What became of a question `runStudioQuery` answered `202` for. `running`: wait `pollAfterSeconds` and fetch again — after a few tries, tell the user it is still running and can be checked later. `succeeded`: the same answer a quick question gets (`columns`, `rows`, `rowCount`, `truncated`, `elapsedMs`), kept for an hour. `failed`: `error` and `code`, as the question itself would have been refused or stopped. `expired`: the answer is no longer kept. A question that succeeded in the background is charged once, 1 credit per row returned in `rows`, at least 5 per answered question, whether or not its result is fetched — and its rows are handed out only once it is paid for. The first fetch that returns its rows pays for it, unless it has already been paid for (`credits.charged`, `credits.remaining`); fetching it again after that is free. When your organization does not have the credits, the fetch answers `402` with no rows and nothing charged: add credits and fetch it again (within the hour the answer is kept) — it is charged once, never twice. Fetching while it is `running`, and a `failed` question, are free. Only the organization that asked can fetch a result.
6661
6661
  */
6662
6662
  const getStudioQueryResult = (options) => (options.client ?? client).get({
6663
6663
  security: [{
@@ -6673,7 +6673,7 @@ const getStudioQueryResult = (options) => (options.client ?? client).get({
6673
6673
  /**
6674
6674
  * Answer one question with SQL
6675
6675
  *
6676
- * Run one read-only SQL SELECT over the tables in the catalog and get the rows back. Use it for questions the list and analytics routes cannot answer in one call: a ranking across every company or agent in a market, a join between loans and sales, a custom roll-up. The data is stored by state: filter by `state` (and a date range) whenever the question allows, and aggregate in SQL instead of fetching rows. `rows` carries up to `limit` rows (default 200, at most 1000); `rowCount` is always the full count and `truncated` says when there are more. A quick question is answered here (`200`). One that is still running after about twelve seconds is NOT stopped: this call answers `202` with `status: "running"` and a `queryId`, the question carries on in the background for up to five minutes, and `getStudioQueryResult` returns its answer. A `202` is not a failure — do not ask the question again (that starts a second run) and do not rewrite it; wait `pollAfterSeconds` and fetch the result. One question per organization runs in the background at a time. Only tables in the catalog can be read; nothing can be written. 5 credits per answered question, charged once whether it was answered here or in the background; a refused or failed question is free. `credits` in the answer says what this question was charged and how many credits are left; on `202`, `credits.pending` is what will be charged if the question succeeds.
6676
+ * Run one read-only SQL SELECT over the tables in the catalog and get the rows back. Use it for questions the list and analytics routes cannot answer in one call: a ranking across every company or agent in a market, a join between loans and sales, a custom roll-up. The data is stored by state: filter by `state` (and a date range) whenever the question allows, and aggregate in SQL instead of fetching rows. `rows` carries up to `limit` rows (default 200, at most 1000); `rowCount` is always the full count and `truncated` says when there are more. A quick question is answered here (`200`). One that is still running after about twelve seconds is NOT stopped: this call answers `202` with `status: "running"` and a `queryId`, the question carries on in the background for up to five minutes, and `getStudioQueryResult` returns its answer. A `202` is not a failure — do not ask the question again (that starts a second run) and do not rewrite it; wait `pollAfterSeconds` and fetch the result. One question per organization runs in the background at a time. Only tables in the catalog can be read; nothing can be written. 1 credit per row returned in `rows`, at least 5 per answered question (an aggregate that returns one row costs 5; 1,000 rows cost 1,000), charged once whether it was answered here or in the background; a refused or failed question is free. Set `limit` to the rows you need and aggregate in SQL. `credits` in the answer says what this question was charged and how many credits are left; on `202`, `credits.pending` is the least it will be charged if it succeeds — the result says the exact amount.
6677
6677
  */
6678
6678
  const runStudioQuery = (options) => (options.client ?? client).post({
6679
6679
  security: [{
@@ -8078,7 +8078,7 @@ var Studio = class {
8078
8078
  /**
8079
8079
  * The result of a question that ran in the background
8080
8080
  *
8081
- * What became of a question `runStudioQuery` answered `202` for. `running`: wait `pollAfterSeconds` and fetch again — after a few tries, tell the user it is still running and can be checked later. `succeeded`: the same answer a quick question gets (`columns`, `rows`, `rowCount`, `truncated`, `elapsedMs`), kept for an hour. `failed`: `error` and `code`, as the question itself would have been refused or stopped. `expired`: the answer is no longer kept. Fetching is free. A question that succeeded in the background costs 5 credits once, whether or not its result is fetched: `credits.pending` on the result says what your organization is charged for it. Only the organization that asked can fetch a result.
8081
+ * What became of a question `runStudioQuery` answered `202` for. `running`: wait `pollAfterSeconds` and fetch again — after a few tries, tell the user it is still running and can be checked later. `succeeded`: the same answer a quick question gets (`columns`, `rows`, `rowCount`, `truncated`, `elapsedMs`), kept for an hour. `failed`: `error` and `code`, as the question itself would have been refused or stopped. `expired`: the answer is no longer kept. A question that succeeded in the background is charged once, 1 credit per row returned in `rows`, at least 5 per answered question, whether or not its result is fetched — and its rows are handed out only once it is paid for. The first fetch that returns its rows pays for it, unless it has already been paid for (`credits.charged`, `credits.remaining`); fetching it again after that is free. When your organization does not have the credits, the fetch answers `402` with no rows and nothing charged: add credits and fetch it again (within the hour the answer is kept) — it is charged once, never twice. Fetching while it is `running`, and a `failed` question, are free. Only the organization that asked can fetch a result.
8082
8082
  */
8083
8083
  static getStudioQueryResult(options) {
8084
8084
  return (options.client ?? client).get({
@@ -8096,7 +8096,7 @@ var Studio = class {
8096
8096
  /**
8097
8097
  * Answer one question with SQL
8098
8098
  *
8099
- * Run one read-only SQL SELECT over the tables in the catalog and get the rows back. Use it for questions the list and analytics routes cannot answer in one call: a ranking across every company or agent in a market, a join between loans and sales, a custom roll-up. The data is stored by state: filter by `state` (and a date range) whenever the question allows, and aggregate in SQL instead of fetching rows. `rows` carries up to `limit` rows (default 200, at most 1000); `rowCount` is always the full count and `truncated` says when there are more. A quick question is answered here (`200`). One that is still running after about twelve seconds is NOT stopped: this call answers `202` with `status: "running"` and a `queryId`, the question carries on in the background for up to five minutes, and `getStudioQueryResult` returns its answer. A `202` is not a failure — do not ask the question again (that starts a second run) and do not rewrite it; wait `pollAfterSeconds` and fetch the result. One question per organization runs in the background at a time. Only tables in the catalog can be read; nothing can be written. 5 credits per answered question, charged once whether it was answered here or in the background; a refused or failed question is free. `credits` in the answer says what this question was charged and how many credits are left; on `202`, `credits.pending` is what will be charged if the question succeeds.
8099
+ * Run one read-only SQL SELECT over the tables in the catalog and get the rows back. Use it for questions the list and analytics routes cannot answer in one call: a ranking across every company or agent in a market, a join between loans and sales, a custom roll-up. The data is stored by state: filter by `state` (and a date range) whenever the question allows, and aggregate in SQL instead of fetching rows. `rows` carries up to `limit` rows (default 200, at most 1000); `rowCount` is always the full count and `truncated` says when there are more. A quick question is answered here (`200`). One that is still running after about twelve seconds is NOT stopped: this call answers `202` with `status: "running"` and a `queryId`, the question carries on in the background for up to five minutes, and `getStudioQueryResult` returns its answer. A `202` is not a failure — do not ask the question again (that starts a second run) and do not rewrite it; wait `pollAfterSeconds` and fetch the result. One question per organization runs in the background at a time. Only tables in the catalog can be read; nothing can be written. 1 credit per row returned in `rows`, at least 5 per answered question (an aggregate that returns one row costs 5; 1,000 rows cost 1,000), charged once whether it was answered here or in the background; a refused or failed question is free. Set `limit` to the rows you need and aggregate in SQL. `credits` in the answer says what this question was charged and how many credits are left; on `202`, `credits.pending` is the least it will be charged if it succeeds — the result says the exact amount.
8100
8100
  */
8101
8101
  static runStudioQuery(options) {
8102
8102
  return (options.client ?? client).post({
package/openapi.json CHANGED
@@ -47330,6 +47330,16 @@
47330
47330
  "description": "Most rows one answer can carry.",
47331
47331
  "type": "number"
47332
47332
  },
47333
+ "queryCreditsPerRow": {
47334
+ "description": "Credits one question costs per row it returns in `rows` (not per row it reads or counts).",
47335
+ "example": 1,
47336
+ "type": "number"
47337
+ },
47338
+ "queryMinCredits": {
47339
+ "description": "The least an answered question costs, however few rows it returns.",
47340
+ "example": 5,
47341
+ "type": "number"
47342
+ },
47333
47343
  "queryTimeoutSeconds": {
47334
47344
  "description": "How long one question may run.",
47335
47345
  "type": "number"
@@ -47341,7 +47351,9 @@
47341
47351
  "queryTimeoutSeconds",
47342
47352
  "jobTimeoutSeconds",
47343
47353
  "maxJobs",
47344
- "maxJobRows"
47354
+ "maxJobRows",
47355
+ "queryCreditsPerRow",
47356
+ "queryMinCredits"
47345
47357
  ],
47346
47358
  "type": "object"
47347
47359
  },
@@ -49941,6 +49953,36 @@
49941
49953
  ],
49942
49954
  "type": "object"
49943
49955
  },
49956
+ "StudioPaymentRequired": {
49957
+ "properties": {
49958
+ "balance": {
49959
+ "description": "Credits available.",
49960
+ "type": "number"
49961
+ },
49962
+ "cost": {
49963
+ "description": "What the answer costs.",
49964
+ "type": "number"
49965
+ },
49966
+ "error": {
49967
+ "enum": [
49968
+ "payment_required"
49969
+ ],
49970
+ "type": "string"
49971
+ },
49972
+ "message": {
49973
+ "type": "string"
49974
+ },
49975
+ "reason": {
49976
+ "type": "string"
49977
+ }
49978
+ },
49979
+ "required": [
49980
+ "error",
49981
+ "balance",
49982
+ "cost"
49983
+ ],
49984
+ "type": "object"
49985
+ },
49944
49986
  "StudioPublishedModel": {
49945
49987
  "properties": {
49946
49988
  "asOf": {
@@ -50282,7 +50324,7 @@
50282
50324
  "type": "boolean"
50283
50325
  },
50284
50326
  "limit": {
50285
- "description": "Rows to return (1–1000, default 200). `rowCount` is always the full count.",
50327
+ "description": "Rows to return (1–1000, default 200). Each row returned costs 1 credit (at least 5 per question): ask for the rows you need. `rowCount` is always the full count.",
50286
50328
  "maximum": 1000,
50287
50329
  "minimum": 1,
50288
50330
  "type": "integer"
@@ -50399,14 +50441,19 @@
50399
50441
  "description": "What this question costs.",
50400
50442
  "properties": {
50401
50443
  "charged": {
50402
- "description": "Always `0` here: a question in the background is not charged by this request.",
50444
+ "description": "Credits this request cost. `0` while the question is running, when it was already paid for (fetching a paid result again is free), and for a request from the web app or an account that is not metered. On `succeeded`, when the question had not been paid for yet, this fetch pays for it: exactly once, however often it is fetched.",
50403
50445
  "example": 0,
50404
50446
  "type": "number"
50405
50447
  },
50406
50448
  "pending": {
50407
- "description": "Credits your organization is charged, once, for this question if it succeeds (while `running`) or because it succeeded (on `succeeded`) — whether or not its result is fetched. Absent when nothing will be charged: a question asked from the web app, or an account that is not metered.",
50449
+ "description": "Credits your organization is charged, once, for this question — whether or not its result is fetched — that have not been charged yet. While `running`: the least it will be charged if it succeeds (the price is 1 credit per row returned, at least 5). On `succeeded`: only for a caller this request does not charge (the web app), exactly what the question is charged, for the rows it returned. Absent when nothing more will be charged.",
50408
50450
  "example": 5,
50409
50451
  "type": "number"
50452
+ },
50453
+ "remaining": {
50454
+ "description": "Credits left after this request's charge. Present only when this request charged something and the balance is known.",
50455
+ "example": 1995,
50456
+ "type": "number"
50410
50457
  }
50411
50458
  },
50412
50459
  "required": [
@@ -50482,14 +50529,19 @@
50482
50529
  "description": "What this question costs.",
50483
50530
  "properties": {
50484
50531
  "charged": {
50485
- "description": "Always `0` here: a question in the background is not charged by this request.",
50532
+ "description": "Credits this request cost. `0` while the question is running, when it was already paid for (fetching a paid result again is free), and for a request from the web app or an account that is not metered. On `succeeded`, when the question had not been paid for yet, this fetch pays for it: exactly once, however often it is fetched.",
50486
50533
  "example": 0,
50487
50534
  "type": "number"
50488
50535
  },
50489
50536
  "pending": {
50490
- "description": "Credits your organization is charged, once, for this question if it succeeds (while `running`) or because it succeeded (on `succeeded`) — whether or not its result is fetched. Absent when nothing will be charged: a question asked from the web app, or an account that is not metered.",
50537
+ "description": "Credits your organization is charged, once, for this question — whether or not its result is fetched — that have not been charged yet. While `running`: the least it will be charged if it succeeds (the price is 1 credit per row returned, at least 5). On `succeeded`: only for a caller this request does not charge (the web app), exactly what the question is charged, for the rows it returned. Absent when nothing more will be charged.",
50491
50538
  "example": 5,
50492
50539
  "type": "number"
50540
+ },
50541
+ "remaining": {
50542
+ "description": "Credits left after this request's charge. Present only when this request charged something and the balance is known.",
50543
+ "example": 1995,
50544
+ "type": "number"
50493
50545
  }
50494
50546
  },
50495
50547
  "required": [
@@ -51630,7 +51682,7 @@
51630
51682
  "info": {
51631
51683
  "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.",
51632
51684
  "title": "ModelMatch API",
51633
- "version": "3.167.1"
51685
+ "version": "3.167.3"
51634
51686
  },
51635
51687
  "openapi": "3.1.0",
51636
51688
  "paths": {
@@ -92243,7 +92295,7 @@
92243
92295
  },
92244
92296
  "/v1/studio/queries/{queryId}": {
92245
92297
  "get": {
92246
- "description": "What became of a question `runStudioQuery` answered `202` for. `running`: wait `pollAfterSeconds` and fetch again — after a few tries, tell the user it is still running and can be checked later. `succeeded`: the same answer a quick question gets (`columns`, `rows`, `rowCount`, `truncated`, `elapsedMs`), kept for an hour. `failed`: `error` and `code`, as the question itself would have been refused or stopped. `expired`: the answer is no longer kept. Fetching is free. A question that succeeded in the background costs 5 credits once, whether or not its result is fetched: `credits.pending` on the result says what your organization is charged for it. Only the organization that asked can fetch a result.",
92298
+ "description": "What became of a question `runStudioQuery` answered `202` for. `running`: wait `pollAfterSeconds` and fetch again — after a few tries, tell the user it is still running and can be checked later. `succeeded`: the same answer a quick question gets (`columns`, `rows`, `rowCount`, `truncated`, `elapsedMs`), kept for an hour. `failed`: `error` and `code`, as the question itself would have been refused or stopped. `expired`: the answer is no longer kept. A question that succeeded in the background is charged once, 1 credit per row returned in `rows`, at least 5 per answered question, whether or not its result is fetched — and its rows are handed out only once it is paid for. The first fetch that returns its rows pays for it, unless it has already been paid for (`credits.charged`, `credits.remaining`); fetching it again after that is free. When your organization does not have the credits, the fetch answers `402` with no rows and nothing charged: add credits and fetch it again (within the hour the answer is kept) — it is charged once, never twice. Fetching while it is `running`, and a `failed` question, are free. Only the organization that asked can fetch a result.",
92247
92299
  "operationId": "getStudioQueryResult",
92248
92300
  "parameters": [
92249
92301
  {
@@ -92290,6 +92342,16 @@
92290
92342
  },
92291
92343
  "description": "Authentication required."
92292
92344
  },
92345
+ "402": {
92346
+ "content": {
92347
+ "application/json": {
92348
+ "schema": {
92349
+ "$ref": "#/components/schemas/StudioPaymentRequired"
92350
+ }
92351
+ }
92352
+ },
92353
+ "description": "The question succeeded, but its answer has not been paid for and your organization does not have the credits for it (`cost`). No rows are returned and nothing was charged. Add credits and fetch it again: it does not need to be asked again."
92354
+ },
92293
92355
  "403": {
92294
92356
  "content": {
92295
92357
  "application/json": {
@@ -92348,7 +92410,7 @@
92348
92410
  }
92349
92411
  }
92350
92412
  },
92351
- "description": "`studio_unavailable` — Studio is not available right now."
92413
+ "description": "`studio_unavailable` — Studio is not available right now. `billing_unavailable` — the question succeeded, but the charge for its answer could not be made right now, so no rows were returned; fetch it again in a minute (it is never charged twice)."
92352
92414
  }
92353
92415
  },
92354
92416
  "summary": "The result of a question that ran in the background",
@@ -92359,7 +92421,7 @@
92359
92421
  },
92360
92422
  "/v1/studio/query": {
92361
92423
  "post": {
92362
- "description": "Run one read-only SQL SELECT over the tables in the catalog and get the rows back. Use it for questions the list and analytics routes cannot answer in one call: a ranking across every company or agent in a market, a join between loans and sales, a custom roll-up. The data is stored by state: filter by `state` (and a date range) whenever the question allows, and aggregate in SQL instead of fetching rows. `rows` carries up to `limit` rows (default 200, at most 1000); `rowCount` is always the full count and `truncated` says when there are more. A quick question is answered here (`200`). One that is still running after about twelve seconds is NOT stopped: this call answers `202` with `status: \"running\"` and a `queryId`, the question carries on in the background for up to five minutes, and `getStudioQueryResult` returns its answer. A `202` is not a failure — do not ask the question again (that starts a second run) and do not rewrite it; wait `pollAfterSeconds` and fetch the result. One question per organization runs in the background at a time. Only tables in the catalog can be read; nothing can be written. 5 credits per answered question, charged once whether it was answered here or in the background; a refused or failed question is free. `credits` in the answer says what this question was charged and how many credits are left; on `202`, `credits.pending` is what will be charged if the question succeeds.",
92424
+ "description": "Run one read-only SQL SELECT over the tables in the catalog and get the rows back. Use it for questions the list and analytics routes cannot answer in one call: a ranking across every company or agent in a market, a join between loans and sales, a custom roll-up. The data is stored by state: filter by `state` (and a date range) whenever the question allows, and aggregate in SQL instead of fetching rows. `rows` carries up to `limit` rows (default 200, at most 1000); `rowCount` is always the full count and `truncated` says when there are more. A quick question is answered here (`200`). One that is still running after about twelve seconds is NOT stopped: this call answers `202` with `status: \"running\"` and a `queryId`, the question carries on in the background for up to five minutes, and `getStudioQueryResult` returns its answer. A `202` is not a failure — do not ask the question again (that starts a second run) and do not rewrite it; wait `pollAfterSeconds` and fetch the result. One question per organization runs in the background at a time. Only tables in the catalog can be read; nothing can be written. 1 credit per row returned in `rows`, at least 5 per answered question (an aggregate that returns one row costs 5; 1,000 rows cost 1,000), charged once whether it was answered here or in the background; a refused or failed question is free. Set `limit` to the rows you need and aggregate in SQL. `credits` in the answer says what this question was charged and how many credits are left; on `202`, `credits.pending` is the least it will be charged if it succeeds — the result says the exact amount.",
92363
92425
  "operationId": "runStudioQuery",
92364
92426
  "requestBody": {
92365
92427
  "content": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@model-match/api",
3
- "version": "3.83.1",
3
+ "version": "3.83.3",
4
4
  "description": "TypeScript client for the ModelMatch API",
5
5
  "license": "MIT",
6
6
  "files": [