@model-match/api 3.83.1 → 3.83.2

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/RELEASE_NOTES.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  Changes to `@model-match/api` that affect how you use it. Each version is generated from the ModelMatch API's OpenAPI spec, so new endpoints and fields appear in the [API reference](https://docs.modelmatch.com/developers) as they ship.
4
4
 
5
+ ## 3.83.2
6
+
7
+ - Regenerated from the latest API spec. No changes to the client itself.
8
+
5
9
  ## 3.83.1
6
10
 
7
11
  - Regenerated from the latest API spec. No changes to the client itself.
@@ -13941,6 +13941,14 @@ type StudioCatalog = {
13941
13941
  * Most rows one answer can carry.
13942
13942
  */
13943
13943
  maxRows: number;
13944
+ /**
13945
+ * Credits one question costs per row it returns in `rows` (not per row it reads or counts).
13946
+ */
13947
+ queryCreditsPerRow: number;
13948
+ /**
13949
+ * The least an answered question costs, however few rows it returns.
13950
+ */
13951
+ queryMinCredits: number;
13944
13952
  /**
13945
13953
  * How long one question may run.
13946
13954
  */
@@ -15153,7 +15161,7 @@ type StudioQueryRequest = {
15153
15161
  */
15154
15162
  background?: boolean;
15155
15163
  /**
15156
- * Rows to return (1–1000, default 200). `rowCount` is always the full count.
15164
+ * 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.
15157
15165
  */
15158
15166
  limit?: number;
15159
15167
  /**
@@ -15213,7 +15221,7 @@ type StudioQueryResultState = {
15213
15221
  */
15214
15222
  charged: number;
15215
15223
  /**
15216
- * 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.
15224
+ * Credits your organization is charged, once, for this question — whether or not its result is fetched. While `running`: the least it will be charged if it succeeds (the price is 1 credit per row returned, at least 5). On `succeeded`: exactly what it is charged, for the rows it returned. Absent when nothing will be charged: a question asked from the web app, or an account that is not metered.
15217
15225
  */
15218
15226
  pending?: number;
15219
15227
  };
@@ -15266,7 +15274,7 @@ type StudioQueryRunning = {
15266
15274
  */
15267
15275
  charged: number;
15268
15276
  /**
15269
- * 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.
15277
+ * Credits your organization is charged, once, for this question — whether or not its result is fetched. While `running`: the least it will be charged if it succeeds (the price is 1 credit per row returned, at least 5). On `succeeded`: exactly what it is charged, for the rows it returned. Absent when nothing will be charged: a question asked from the web app, or an account that is not metered.
15270
15278
  */
15271
15279
  pending?: number;
15272
15280
  };
@@ -35729,13 +35737,13 @@ declare class Studio {
35729
35737
  /**
35730
35738
  * The result of a question that ran in the background
35731
35739
  *
35732
- * 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.
35740
+ * 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, however often. A question that succeeded in the background is charged once, whether or not its result is fetched, 1 credit per row returned in `rows`, at least 5 per answered question: `credits.pending` on the result says what your organization is charged for it. Only the organization that asked can fetch a result.
35733
35741
  */
35734
35742
  static getStudioQueryResult<ThrowOnError extends boolean = false>(options: Options<GetStudioQueryResultData, ThrowOnError>): RequestResult<GetStudioQueryResultResponses, GetStudioQueryResultErrors, ThrowOnError>;
35735
35743
  /**
35736
35744
  * Answer one question with SQL
35737
35745
  *
35738
- * 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.
35746
+ * 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.
35739
35747
  */
35740
35748
  static runStudioQuery<ThrowOnError extends boolean = false>(options: Options<RunStudioQueryData, ThrowOnError>): RequestResult<RunStudioQueryResponses, RunStudioQueryErrors, ThrowOnError>;
35741
35749
  /**