@instruments/materialgraph 0.24.0 → 0.26.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/association-types.d.ts +20 -20
- package/associations-client.d.ts +4 -4
- package/associations-client.js +3 -10
- package/attribution-types.d.ts +3 -3
- package/brand-most-sampled-types.d.ts +4 -4
- package/brand-types.d.ts +6 -6
- package/brands-client.d.ts +4 -4
- package/brands-client.js +9 -13
- package/browse-types.d.ts +8 -8
- package/by-colour-types.d.ts +18 -18
- package/by-spec-types.d.ts +14 -14
- package/catalog-discovery-types.d.ts +14 -14
- package/catalogue-client.d.ts +4 -4
- package/catalogue-client.js +38 -37
- package/catalogue-types.d.ts +4 -4
- package/citation-types.d.ts +4 -4
- package/client-browse.d.ts +4 -4
- package/client-browse.js +24 -25
- package/client-config.d.ts +2 -2
- package/client-exploration.d.ts +3 -3
- package/client-exploration.js +4 -6
- package/client-source-material-comments.d.ts +4 -4
- package/client-source-material-comments.js +4 -38
- package/client-vocabulary.d.ts +8 -8
- package/client-vocabulary.js +20 -30
- package/client.d.ts +11 -45
- package/client.js +143 -188
- package/codes-client.d.ts +2 -2
- package/codes-client.js +8 -8
- package/codes-types.d.ts +34 -34
- package/colour-aggregate-types.d.ts +24 -24
- package/colours-client.d.ts +2 -2
- package/colours-client.js +15 -15
- package/compare-types.d.ts +10 -10
- package/composition-client.d.ts +3 -3
- package/composition-client.js +8 -7
- package/composition-types.d.ts +12 -12
- package/coordinate-client.d.ts +2 -2
- package/coordinate-client.js +1 -13
- package/corpus-scope-types.d.ts +3 -3
- package/corpus-scope-types.js +1 -25
- package/correction-types.d.ts +10 -10
- package/demand-batch-types.d.ts +18 -18
- package/demand-types.d.ts +24 -24
- package/errors.d.ts +12 -12
- package/errors.js +53 -52
- package/exploration-types.d.ts +29 -22
- package/fan-deck-types.d.ts +6 -6
- package/http-transport.d.ts +13 -21
- package/http-transport.js +31 -28
- package/identify-types.d.ts +10 -10
- package/index.d.ts +0 -6
- package/index.js +0 -2
- package/match-rejection-types.d.ts +6 -6
- package/match-stream-types.d.ts +32 -32
- package/match-stream.d.ts +2 -2
- package/match-stream.js +55 -41
- package/match-types.d.ts +8 -8
- package/material-asset-types.d.ts +26 -26
- package/material-block-types.d.ts +6 -6
- package/material-query-plan-types.d.ts +26 -26
- package/material-resources-client.d.ts +5 -5
- package/material-resources-client.js +10 -20
- package/material-types.d.ts +12 -12
- package/ndjson.js +16 -8
- package/operations.d.ts +6 -6
- package/operations.js +9 -39
- package/package.json +2 -2
- package/palette-completion-types.d.ts +22 -22
- package/palette-search-types.d.ts +28 -28
- package/query-understanding-types.d.ts +43 -36
- package/render-assets-types.d.ts +8 -8
- package/resolve-client.d.ts +2 -2
- package/resolve-client.js +4 -6
- package/resolve-colour-types.d.ts +22 -6
- package/resolve-types.d.ts +10 -10
- package/run-types.d.ts +70 -70
- package/runs.d.ts +13 -26
- package/runs.js +77 -89
- package/samplize-catalogue-types.d.ts +18 -18
- package/samplize-colorvec.d.ts +20 -20
- package/samplize-colorvec.js +66 -42
- package/schema-resource-types.d.ts +38 -38
- package/schema-resource-types.js +5 -5
- package/search-card-types.d.ts +14 -5
- package/search-collapse-types.d.ts +4 -4
- package/search-mood-types.d.ts +2 -2
- package/search-refinement-types.d.ts +8 -8
- package/search-request-types.d.ts +6 -6
- package/search-response-receipt-types.d.ts +135 -34
- package/search-response-types.d.ts +2 -2
- package/search-result-validation.d.ts +3 -3
- package/search-result-validation.js +53 -36
- package/search-window-types.d.ts +2 -2
- package/slot-pool-types.d.ts +20 -20
- package/source-material-validation.d.ts +3 -3
- package/source-material-validation.js +35 -39
- package/spec-facet-types.d.ts +10 -10
- package/spec-types.d.ts +6 -6
- package/specifications.d.ts +9 -25
- package/specifications.js +15 -21
- package/sse.d.ts +2 -2
- package/sse.js +32 -16
- package/substitute-types.d.ts +22 -22
- package/suggest-types.d.ts +7 -7
- package/suggest-types.js +3 -3
- package/taxonomy-coverage-types.d.ts +8 -8
- package/types.d.ts +119 -119
- package/validation.d.ts +26 -26
- package/validation.js +97 -92
- package/webmcp.d.ts +2 -2
- package/webmcp.generated.js +94 -87
- package/project-types.d.ts +0 -79
- package/project-types.js +0 -9
- package/projects.d.ts +0 -13
- package/projects.js +0 -46
- package/run-events.d.ts +0 -106
- package/run-events.js +0 -32
- package/schedule-reference-types.d.ts +0 -46
- package/schedule-reference-types.js +0 -1
- package/schedule-references-client.d.ts +0 -14
- package/schedule-references-client.js +0 -26
- package/schedule-types.d.ts +0 -261
- package/schedule-types.js +0 -1
package/client.js
CHANGED
|
@@ -1,28 +1,26 @@
|
|
|
1
|
-
import { CatalogueClient } from "./catalogue-client.js";
|
|
2
|
-
import { DEFAULT_BASE_URL, MAX_BATCH_IDS } from "./client-config.js";
|
|
3
|
-
import { MaterialGraphError } from "./errors.js";
|
|
4
|
-
import { HttpTransport } from "./http-transport.js";
|
|
5
|
-
// Aliased to `operation` — the local name every call site here already used.
|
|
6
|
-
import { resolveOperation as operation, } from "./operations.js";
|
|
7
|
-
import { cancelRun, capabilities as capabilitiesRun, createRun, drainRunEvents, getRun, getRunSchedule, getSourceMaterialBatch as getSourceMaterialBatchCall, listRuns, resumeRun, streamRunEvents, uploadSourceMaterial, } from "./runs.js";
|
|
8
|
-
import { ScheduleReferencesClient } from "./schedule-references-client.js";
|
|
9
|
-
// Re-exported whole so `index.ts` and every existing importer keep their path.
|
|
10
|
-
export * from "./client-config.js";
|
|
11
|
-
import { browseQuery, createBrowseNamespace, } from "./client-browse.js";
|
|
12
|
-
import { createExplorationNamespace, } from "./client-exploration.js";
|
|
13
|
-
import { createSourceMaterialCommentsNamespace, } from "./client-source-material-comments.js";
|
|
14
1
|
import * as assoc from "./associations-client.js";
|
|
15
2
|
import { brandColourDeck, brandProfile, listBrands } from "./brands-client.js";
|
|
3
|
+
import { CatalogueClient } from "./catalogue-client.js";
|
|
4
|
+
import { browseQuery, createBrowseNamespace } from "./client-browse.js";
|
|
5
|
+
import { DEFAULT_BASE_URL, MAX_BATCH_IDS } from "./client-config.js";
|
|
6
|
+
import { createExplorationNamespace } from "./client-exploration.js";
|
|
7
|
+
import { createSourceMaterialCommentsNamespace } from "./client-source-material-comments.js";
|
|
16
8
|
import { colourFacets as colourFacetsCall, resolveAttribute as resolveAttributeCall, resolveAttributeValue as resolveAttributeValueCall, resolveColour as resolveColourCall, suggest as suggestCall, suggestColour as suggestColourCall, } from "./client-vocabulary.js";
|
|
17
9
|
import { CodesClient } from "./codes-client.js";
|
|
18
10
|
import { ColoursClient } from "./colours-client.js";
|
|
19
11
|
import { slotPools as slotPoolsCall, varyScheme as varySchemeCall, } from "./composition-client.js";
|
|
20
12
|
import { coordinate as coordinateCall } from "./coordinate-client.js";
|
|
13
|
+
import { MaterialGraphError } from "./errors.js";
|
|
14
|
+
import { HttpTransport } from "./http-transport.js";
|
|
21
15
|
import { matchStream as matchStreamCall } from "./match-stream.js";
|
|
22
16
|
import { materialAssets as materialAssetsCall, materialRenderAssets as materialRenderAssetsCall, materialBlocks as materialBlocksCall, materialDocuments as materialDocumentsCall, } from "./material-resources-client.js";
|
|
23
|
-
|
|
17
|
+
// Aliased to `operation` — the local name every call site here already used.
|
|
18
|
+
import { resolveOperation as operation } from "./operations.js";
|
|
24
19
|
import { resolvePhrasesRequest as resolvePhrases, searchVocabularyRequest, } from "./resolve-client.js";
|
|
20
|
+
import { cancelRun, capabilities as capabilitiesRun, createRun, drainRunEvents, getRun, getSourceMaterialBatch as getSourceMaterialBatchCall, listRuns, resumeRun, streamRunEvents, uploadSourceMaterial, } from "./runs.js";
|
|
25
21
|
import { SCHEMA_RESOURCE_OPERATION_IDS } from "./schema-resource-types.js";
|
|
22
|
+
// Re-exported whole so `index.ts` and every existing importer keep their path.
|
|
23
|
+
export * from "./client-config.js";
|
|
26
24
|
/**
|
|
27
25
|
* The MaterialGraph client — every lens on the graph, on one object.
|
|
28
26
|
*
|
|
@@ -59,7 +57,6 @@ import { SCHEMA_RESOURCE_OPERATION_IDS } from "./schema-resource-types.js";
|
|
|
59
57
|
* `./identifiers.ts`), absent is not false, and a page is not a corpus.
|
|
60
58
|
*/
|
|
61
59
|
export class MaterialGraphClient extends CatalogueClient {
|
|
62
|
-
scheduleReferences;
|
|
63
60
|
baseUrl;
|
|
64
61
|
/**
|
|
65
62
|
* THE QUESTION: "show me everything in this category / this brand, in a plain
|
|
@@ -123,15 +120,14 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
123
120
|
super(transport);
|
|
124
121
|
this.#transport = transport;
|
|
125
122
|
this.baseUrl = transport.baseUrl;
|
|
126
|
-
this.
|
|
127
|
-
this.browse = createBrowseNamespace((params, signal) => this.#get("search_browse_by_colour", browseQuery(params), signal));
|
|
123
|
+
this.browse = createBrowseNamespace(async (params, signal) => await this.#get("search_browse_by_colour", browseQuery(params), signal));
|
|
128
124
|
this.codes = new CodesClient({
|
|
129
|
-
get: (operationId, query, signal) => this.#get(operationId, query, signal),
|
|
130
|
-
post: (operationId, body, signal) => this.#post(operationId, body, signal),
|
|
125
|
+
get: async (operationId, query, signal) => await this.#get(operationId, query, signal),
|
|
126
|
+
post: async (operationId, body, signal) => await this.#post(operationId, body, signal),
|
|
131
127
|
});
|
|
132
128
|
this.colours = new ColoursClient({
|
|
133
|
-
get: (operationId, query, signal) => this.#get(operationId, query, signal),
|
|
134
|
-
post: (operationId, body, signal) => this.#post(operationId, body, signal),
|
|
129
|
+
get: async (operationId, query, signal) => await this.#get(operationId, query, signal),
|
|
130
|
+
post: async (operationId, body, signal) => await this.#post(operationId, body, signal),
|
|
135
131
|
});
|
|
136
132
|
this.exploration = createExplorationNamespace(this.#transport);
|
|
137
133
|
this.sourceMaterialComments = createSourceMaterialCommentsNamespace(this.#transport);
|
|
@@ -139,18 +135,18 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
139
135
|
get lastRateLimit() {
|
|
140
136
|
return this.#transport.lastRateLimit;
|
|
141
137
|
}
|
|
142
|
-
#get(operationId, query, signal, pathParams) {
|
|
143
|
-
return this.#transport.requestJson(operation(operationId), {
|
|
138
|
+
async #get(operationId, query, signal, pathParams) {
|
|
139
|
+
return await this.#transport.requestJson(operation(operationId), {
|
|
140
|
+
pathParams,
|
|
144
141
|
query,
|
|
145
142
|
signal,
|
|
146
|
-
pathParams,
|
|
147
143
|
});
|
|
148
144
|
}
|
|
149
|
-
#post(operationId, body, signal, pathParams) {
|
|
150
|
-
return this.#transport.requestJson(operation(operationId), {
|
|
145
|
+
async #post(operationId, body, signal, pathParams) {
|
|
146
|
+
return await this.#transport.requestJson(operation(operationId), {
|
|
151
147
|
body,
|
|
152
|
-
signal,
|
|
153
148
|
pathParams,
|
|
149
|
+
signal,
|
|
154
150
|
});
|
|
155
151
|
}
|
|
156
152
|
/**
|
|
@@ -168,12 +164,12 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
168
164
|
* specification gates onto ranked colour/visual/lexical/seed search. Build
|
|
169
165
|
* them with `certificationProgramme`, `specTerm`, or `hasSpec`.
|
|
170
166
|
*/
|
|
171
|
-
search(input, signal) {
|
|
172
|
-
return this.#post("search_materials_post", input, signal);
|
|
167
|
+
async search(input, signal) {
|
|
168
|
+
return await this.#post("search_materials_post", input, signal);
|
|
173
169
|
}
|
|
174
170
|
/** Whole materials ask → inspectable meanings and complete safe search requests. */
|
|
175
|
-
planQuery(query, signal) {
|
|
176
|
-
return this.#post("plan_material_query", { query }, signal);
|
|
171
|
+
async planQuery(query, signal) {
|
|
172
|
+
return await this.#post("plan_material_query", { query }, signal);
|
|
177
173
|
}
|
|
178
174
|
/**
|
|
179
175
|
* The same question as {@link MaterialGraphClient.search}; the difference is
|
|
@@ -181,8 +177,8 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
181
177
|
* a URL. `filters`, `preferences`, `verdicts`, image bytes and `weights` have
|
|
182
178
|
* no query-string form, so anything using those must go through `search`.
|
|
183
179
|
*/
|
|
184
|
-
searchGet(params, signal) {
|
|
185
|
-
return this.#get("search_materials_get", { ...params }, signal);
|
|
180
|
+
async searchGet(params, signal) {
|
|
181
|
+
return await this.#get("search_materials_get", { ...params }, signal);
|
|
186
182
|
}
|
|
187
183
|
/**
|
|
188
184
|
* THE QUESTION: "what materials are in this PHOTO?" — Material Match classifies
|
|
@@ -197,8 +193,8 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
197
193
|
* `droppedBelowFloor` before reporting an empty result: "nothing was good
|
|
198
194
|
* enough" and "nothing was found" are different answers.
|
|
199
195
|
*/
|
|
200
|
-
match(input, signal) {
|
|
201
|
-
return this.#post("match_material", input, signal);
|
|
196
|
+
async match(input, signal) {
|
|
197
|
+
return await this.#post("match_material", input, signal);
|
|
202
198
|
}
|
|
203
199
|
/**
|
|
204
200
|
* Material Match as a PROGRESSIVE stream — the same POST
|
|
@@ -238,21 +234,21 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
238
234
|
* Report matches as visual likeness, never a stated colour specification.
|
|
239
235
|
* `family` gates to ONE colorscope family (a gated page can be short); `brand` gates to named brands — one brand's nearest colour to another's.
|
|
240
236
|
*/
|
|
241
|
-
byColour(params, signal) {
|
|
242
|
-
return this.#get("search_by_colour", {
|
|
243
|
-
q: params.q,
|
|
244
|
-
hex: params.hex,
|
|
245
|
-
colour: params.colour,
|
|
246
|
-
l: params.l,
|
|
237
|
+
async byColour(params, signal) {
|
|
238
|
+
return await this.#get("search_by_colour", {
|
|
247
239
|
a: params.a,
|
|
248
240
|
b: params.b,
|
|
249
|
-
category: params.category,
|
|
250
241
|
brand: params.brand,
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
maxColourDistance: params.maxColourDistance,
|
|
242
|
+
category: params.category,
|
|
243
|
+
colour: params.colour,
|
|
254
244
|
corpusScope: params.corpusScope,
|
|
245
|
+
family: params.family,
|
|
246
|
+
hex: params.hex,
|
|
247
|
+
l: params.l,
|
|
255
248
|
limit: params.limit,
|
|
249
|
+
maxColourDistance: params.maxColourDistance,
|
|
250
|
+
order: params.order,
|
|
251
|
+
q: params.q,
|
|
256
252
|
}, signal);
|
|
257
253
|
}
|
|
258
254
|
// ── Materials ──────────────────────────────────────────────────────────────
|
|
@@ -269,8 +265,8 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
269
265
|
*
|
|
270
266
|
* @param variantId Opaque — pass back exactly what you were given.
|
|
271
267
|
*/
|
|
272
|
-
material(variantId, options, signal) {
|
|
273
|
-
return this.#get("get_material", options?.includeSiblings ? { include: "siblings" } : undefined, signal, { variantId });
|
|
268
|
+
async material(variantId, options, signal) {
|
|
269
|
+
return await this.#get("get_material", options?.includeSiblings ? { include: "siblings" } : undefined, signal, { variantId });
|
|
274
270
|
}
|
|
275
271
|
/**
|
|
276
272
|
* THE QUESTION: "what other colourways and finishes does this product come in?"
|
|
@@ -279,20 +275,20 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
279
275
|
* Instead use {@link MaterialGraphClient.pairings} for a DIFFERENT product that
|
|
280
276
|
* goes with this one, and `search({ similarTo })` for one that LOOKS like it.
|
|
281
277
|
*/
|
|
282
|
-
siblings(variantId, signal) {
|
|
283
|
-
return this.#get("get_material_siblings", undefined, signal, { variantId });
|
|
278
|
+
async siblings(variantId, signal) {
|
|
279
|
+
return await this.#get("get_material_siblings", undefined, signal, { variantId });
|
|
284
280
|
}
|
|
285
|
-
materialBlocks(variantId, signal) {
|
|
286
|
-
return materialBlocksCall(this.#transport, variantId, signal);
|
|
281
|
+
async materialBlocks(variantId, signal) {
|
|
282
|
+
return await materialBlocksCall(this.#transport, variantId, signal);
|
|
287
283
|
}
|
|
288
|
-
materialAssets(variantId, signal) {
|
|
289
|
-
return materialAssetsCall(this.#transport, variantId, signal);
|
|
284
|
+
async materialAssets(variantId, signal) {
|
|
285
|
+
return await materialAssetsCall(this.#transport, variantId, signal);
|
|
290
286
|
}
|
|
291
|
-
materialRenderAssets(variantId, signal) {
|
|
292
|
-
return materialRenderAssetsCall(this.#transport, variantId, signal);
|
|
287
|
+
async materialRenderAssets(variantId, signal) {
|
|
288
|
+
return await materialRenderAssetsCall(this.#transport, variantId, signal);
|
|
293
289
|
}
|
|
294
|
-
materialDocuments(variantId, options, signal) {
|
|
295
|
-
return materialDocumentsCall(this.#transport, variantId, options, signal);
|
|
290
|
+
async materialDocuments(variantId, options, signal) {
|
|
291
|
+
return await materialDocumentsCall(this.#transport, variantId, options, signal);
|
|
296
292
|
}
|
|
297
293
|
/**
|
|
298
294
|
* THE QUESTION: "what does the schema DEFINE?" — the governed static registry.
|
|
@@ -301,8 +297,8 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
301
297
|
* what the corpus actually holds and {@link MaterialGraphClient.glossary} to
|
|
302
298
|
* explain one term.
|
|
303
299
|
*/
|
|
304
|
-
schema(resource, signal) {
|
|
305
|
-
return this.#get(SCHEMA_RESOURCE_OPERATION_IDS[resource], undefined, signal);
|
|
300
|
+
async schema(resource, signal) {
|
|
301
|
+
return await this.#get(SCHEMA_RESOURCE_OPERATION_IDS[resource], undefined, signal);
|
|
306
302
|
}
|
|
307
303
|
/**
|
|
308
304
|
* THE QUESTION: "what goes WITH this material?" — the companionship rail, hung
|
|
@@ -318,78 +314,78 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
318
314
|
* look-alike). Only `cospec` supports "sampled together". `cospecCount` tells
|
|
319
315
|
* you how much of the rail is real order evidence.
|
|
320
316
|
*/
|
|
321
|
-
pairings(variantId, options, signal) {
|
|
322
|
-
return this.#get("get_material_pairings", { ...options }, signal, {
|
|
317
|
+
async pairings(variantId, options, signal) {
|
|
318
|
+
return await this.#get("get_material_pairings", { ...options }, signal, {
|
|
323
319
|
variantId,
|
|
324
320
|
});
|
|
325
321
|
}
|
|
326
322
|
/** Find bounded, exact-spec substitutes for one opaque variant id. */
|
|
327
|
-
findSubstitutes(variantId, options = {}, signal) {
|
|
328
|
-
return this.#post("find_material_substitutes", options, signal, { variantId });
|
|
323
|
+
async findSubstitutes(variantId, options = {}, signal) {
|
|
324
|
+
return await this.#post("find_material_substitutes", options, signal, { variantId });
|
|
329
325
|
}
|
|
330
326
|
/** "What finishes does the manufacturer declare for THIS product?" — {@link declaredFinishes}. */
|
|
331
|
-
associatedFinishes(variantId, options, signal) {
|
|
332
|
-
return assoc.declaredFinishes(this.#transport, variantId, options, signal);
|
|
327
|
+
async associatedFinishes(variantId, options, signal) {
|
|
328
|
+
return await assoc.declaredFinishes(this.#transport, variantId, options, signal);
|
|
333
329
|
}
|
|
334
330
|
/** "What products does the manufacturer declare THIS finish for?" — {@link declaredProducts}. */
|
|
335
|
-
associatedProducts(variantId, options, signal) {
|
|
336
|
-
return assoc.declaredProducts(this.#transport, variantId, options, signal);
|
|
331
|
+
async associatedProducts(variantId, options, signal) {
|
|
332
|
+
return await assoc.declaredProducts(this.#transport, variantId, options, signal);
|
|
337
333
|
}
|
|
338
|
-
applicability(options, signal) {
|
|
339
|
-
return assoc.applicability(this.#transport, options, signal);
|
|
334
|
+
async applicability(options, signal) {
|
|
335
|
+
return await assoc.applicability(this.#transport, options, signal);
|
|
340
336
|
}
|
|
341
|
-
materials(ids, options, signal) {
|
|
337
|
+
async materials(ids, options, signal) {
|
|
342
338
|
if (ids.length > MAX_BATCH_IDS) {
|
|
343
339
|
throw MaterialGraphError.unexpected(`MaterialGraphClient.materials(): at most ${MAX_BATCH_IDS} ids per call, received ${ids.length}. Split into multiple batches.`);
|
|
344
340
|
}
|
|
345
|
-
return this.#post("get_materials_batch_post", {
|
|
341
|
+
return await this.#post("get_materials_batch_post", {
|
|
342
|
+
idKind: options?.idKind ?? "variantId",
|
|
346
343
|
ids,
|
|
347
344
|
view: options?.view ?? "tile",
|
|
348
|
-
idKind: options?.idKind ?? "variantId",
|
|
349
345
|
}, signal);
|
|
350
346
|
}
|
|
351
|
-
materialsCached(ids, options, signal) {
|
|
347
|
+
async materialsCached(ids, options, signal) {
|
|
352
348
|
if (ids.length > MAX_BATCH_IDS) {
|
|
353
349
|
throw MaterialGraphError.unexpected(`MaterialGraphClient.materialsCached(): at most ${MAX_BATCH_IDS} ids per call, received ${ids.length}. Split into multiple batches.`);
|
|
354
350
|
}
|
|
355
|
-
return this.#get("get_materials_batch_get", {
|
|
351
|
+
return await this.#get("get_materials_batch_get", {
|
|
352
|
+
idKind: options?.idKind ?? "variantId",
|
|
356
353
|
ids: ids.join(","),
|
|
357
354
|
view: options?.view ?? "tile",
|
|
358
|
-
idKind: options?.idKind ?? "variantId",
|
|
359
355
|
}, signal);
|
|
360
356
|
}
|
|
361
357
|
/** Vocabulary families and counts; use `colours.profiles()` for a material palette. */
|
|
362
|
-
colourFacets(signal) {
|
|
363
|
-
return colourFacetsCall(this.#transport, signal);
|
|
358
|
+
async colourFacets(signal) {
|
|
359
|
+
return await colourFacetsCall(this.#transport, signal);
|
|
364
360
|
}
|
|
365
361
|
/** Resolve a colour name to its hex, and the named paint's catalogue variant. */
|
|
366
|
-
resolveColour(name, signal, options) {
|
|
367
|
-
return resolveColourCall(this.#transport, name, signal, options);
|
|
362
|
+
async resolveColour(name, signal, options) {
|
|
363
|
+
return await resolveColourCall(this.#transport, name, signal, options);
|
|
368
364
|
}
|
|
369
365
|
/** Ranked colour-name typeahead (GET `/api/v1/search/colours/suggest`). */
|
|
370
|
-
suggestColour(q, options, signal) {
|
|
371
|
-
return suggestColourCall(this.#transport, q, options, signal);
|
|
366
|
+
async suggestColour(q, options, signal) {
|
|
367
|
+
return await suggestColourCall(this.#transport, q, options, signal);
|
|
372
368
|
}
|
|
373
369
|
/** Entity typeahead. Navigate using the selected `refId`; use `search()` for materials. */
|
|
374
|
-
suggest(q, options, signal) {
|
|
375
|
-
return suggestCall(this.#transport, q, options, signal);
|
|
370
|
+
async suggest(q, options, signal) {
|
|
371
|
+
return await suggestCall(this.#transport, q, options, signal);
|
|
376
372
|
}
|
|
377
373
|
// ── Catalog ──────────────────────────────────────────────────────────────────
|
|
378
374
|
/** Resolve free text to a canonical attribute id. */
|
|
379
|
-
resolveAttribute(q, options, signal) {
|
|
380
|
-
return resolveAttributeCall(this.#transport, q, options, signal);
|
|
375
|
+
async resolveAttribute(q, options, signal) {
|
|
376
|
+
return await resolveAttributeCall(this.#transport, q, options, signal);
|
|
381
377
|
}
|
|
382
378
|
/** Resolve a value under a canonical attribute id; inspect `recommendedAction` for ambiguity. */
|
|
383
|
-
resolveAttributeValue(attributeId, query, options, signal) {
|
|
384
|
-
return resolveAttributeValueCall(this.#transport, attributeId, query, options, signal);
|
|
379
|
+
async resolveAttributeValue(attributeId, query, options, signal) {
|
|
380
|
+
return await resolveAttributeValueCall(this.#transport, attributeId, query, options, signal);
|
|
385
381
|
}
|
|
386
382
|
/** "Is this phrase an attribute or a value?" — see {@link searchVocabularyRequest}. */
|
|
387
|
-
searchVocabulary(query, options, signal) {
|
|
388
|
-
return searchVocabularyRequest(this.#transport, query, options, signal);
|
|
383
|
+
async searchVocabulary(query, options, signal) {
|
|
384
|
+
return await searchVocabularyRequest(this.#transport, query, options, signal);
|
|
389
385
|
}
|
|
390
386
|
/** "I have words — what do they mean, and what stands behind them?" — see {@link resolvePhrases}. */
|
|
391
|
-
resolve(phrases, scope) {
|
|
392
|
-
return resolvePhrases(this.#transport, phrases, scope);
|
|
387
|
+
async resolve(phrases, scope) {
|
|
388
|
+
return await resolvePhrases(this.#transport, phrases, scope);
|
|
393
389
|
}
|
|
394
390
|
/**
|
|
395
391
|
* THE QUESTION: "which materials, from ANYONE, are ASTM E84 Class A AND
|
|
@@ -413,8 +409,8 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
413
409
|
* { min: 60 })`; bounds are inclusive, at least one is required, and a
|
|
414
410
|
* non-numeric stored value is excluded rather than read as zero.
|
|
415
411
|
*/
|
|
416
|
-
bySpec(spec, options, signal) {
|
|
417
|
-
return this.#get("catalog_by_spec", {
|
|
412
|
+
async bySpec(spec, options, signal) {
|
|
413
|
+
return await this.#get("catalog_by_spec", {
|
|
418
414
|
spec: Array.isArray(spec) ? spec : [spec],
|
|
419
415
|
...(options?.ranges?.length ? { specRange: options.ranges } : {}),
|
|
420
416
|
limit: options?.limit,
|
|
@@ -427,29 +423,29 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
427
423
|
* (`search({ category })`, `colours.profiles()`,
|
|
428
424
|
* {@link MaterialGraphClient.applicableSpecs}). Discover, never hand-write.
|
|
429
425
|
*/
|
|
430
|
-
taxonomy(signal) {
|
|
431
|
-
return this.#get("get_category_taxonomy", undefined, signal);
|
|
426
|
+
async taxonomy(signal) {
|
|
427
|
+
return await this.#get("get_category_taxonomy", undefined, signal);
|
|
432
428
|
}
|
|
433
429
|
/**
|
|
434
430
|
* Exact current primary-type status counts by retained source category path.
|
|
435
431
|
* `comparisonThreshold` is a reporting cutoff only: it never promotes a
|
|
436
432
|
* proposal into an accepted category.
|
|
437
433
|
*/
|
|
438
|
-
productTypeCoverage(options, signal) {
|
|
439
|
-
return this.#get("get_product_type_status_coverage", options, signal);
|
|
434
|
+
async productTypeCoverage(options, signal) {
|
|
435
|
+
return await this.#get("get_product_type_status_coverage", options, signal);
|
|
440
436
|
}
|
|
441
437
|
/**
|
|
442
438
|
* THE QUESTION: "what is this key allowed to do?" Check `scopes` before
|
|
443
439
|
* offering a capability: the write surfaces need `mg:ingest` / `mg:compose`,
|
|
444
440
|
* and `mg:admin` unlocks extra evidence fields.
|
|
445
441
|
*/
|
|
446
|
-
whoami(signal) {
|
|
447
|
-
return this.#get("whoami", undefined, signal);
|
|
442
|
+
async whoami(signal) {
|
|
443
|
+
return await this.#get("whoami", undefined, signal);
|
|
448
444
|
}
|
|
449
445
|
// ── Pairings / demand ────────────────────────────────────────────────────────
|
|
450
446
|
/** What completes a scheme already part-chosen. See {@link coordinateCall}. */
|
|
451
|
-
coordinate(input, signal) {
|
|
452
|
-
return coordinateCall(this.#transport, input, signal);
|
|
447
|
+
async coordinate(input, signal) {
|
|
448
|
+
return await coordinateCall(this.#transport, input, signal);
|
|
453
449
|
}
|
|
454
450
|
/**
|
|
455
451
|
* THE QUESTION: "how much is this material actually specified, and what gets
|
|
@@ -460,8 +456,8 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
460
456
|
* {@link MaterialGraphClient.pairings} for a presentable rail. A null `demand`
|
|
461
457
|
* means UNREAD, never zero. Provide EXACTLY ONE of `variantId` or `material`.
|
|
462
458
|
*/
|
|
463
|
-
demand(params, signal) {
|
|
464
|
-
return this.#get("get_material_demand", {
|
|
459
|
+
async demand(params, signal) {
|
|
460
|
+
return await this.#get("get_material_demand", { material: params.material, variantId: params.variantId }, signal);
|
|
465
461
|
}
|
|
466
462
|
/**
|
|
467
463
|
* THE QUESTION: "for each of these picks I already hold, how much momentum does
|
|
@@ -490,8 +486,8 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
490
486
|
* (r) => r.state === "available" && r.momentum.state === "rising",
|
|
491
487
|
* );
|
|
492
488
|
*/
|
|
493
|
-
demandBatch(input, signal) {
|
|
494
|
-
return this.#post("get_demand_batch", input, signal);
|
|
489
|
+
async demandBatch(input, signal) {
|
|
490
|
+
return await this.#post("get_demand_batch", input, signal);
|
|
495
491
|
}
|
|
496
492
|
// ── Codes (advisory building-code compliance) ────────────────────────────────
|
|
497
493
|
/**
|
|
@@ -503,8 +499,8 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
503
499
|
* `mg.codes.advisory()` in new code, and start at `mg.codes.context()` to
|
|
504
500
|
* discover every accepted context value. `unverified` is not a pass.
|
|
505
501
|
*/
|
|
506
|
-
codeAdvisory(input, signal) {
|
|
507
|
-
return this.codes.advisory(input, signal);
|
|
502
|
+
async codeAdvisory(input, signal) {
|
|
503
|
+
return await this.codes.advisory(input, signal);
|
|
508
504
|
}
|
|
509
505
|
// ── Colour helpers (extract) ─────────────────────────────────────────────────
|
|
510
506
|
/**
|
|
@@ -514,8 +510,8 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
514
510
|
* {@link MaterialGraphClient.byColour}. Instead use
|
|
515
511
|
* {@link MaterialGraphClient.match} for the MATERIALS in the photo.
|
|
516
512
|
*/
|
|
517
|
-
extractPalette(input, signal) {
|
|
518
|
-
return this.#post("extract_image_palette", input, signal);
|
|
513
|
+
async extractPalette(input, signal) {
|
|
514
|
+
return await this.#post("extract_image_palette", input, signal);
|
|
519
515
|
}
|
|
520
516
|
// ── Catalog (facets / applicable specs / glossary) ───────────────────────────
|
|
521
517
|
/**
|
|
@@ -536,8 +532,8 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
536
532
|
* numeric specs (e.g. `slip_resistance_dcof`, a 0–1 DCOF range) are NOT
|
|
537
533
|
* token-facetable and do not appear here — read those per-attribute.
|
|
538
534
|
*/
|
|
539
|
-
specificationFacets(signal) {
|
|
540
|
-
return this.#get("list_spec_facets", undefined, signal);
|
|
535
|
+
async specificationFacets(signal) {
|
|
536
|
+
return await this.#get("list_spec_facets", undefined, signal);
|
|
541
537
|
}
|
|
542
538
|
/**
|
|
543
539
|
* List the live value distribution for ONE canonical attribute (GET
|
|
@@ -546,8 +542,8 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
546
542
|
* {@link specificationFacets} — e.g. every certification programme on record,
|
|
547
543
|
* or every fire classification and how many variants carry each.
|
|
548
544
|
*/
|
|
549
|
-
attributeValues(attributeId, signal) {
|
|
550
|
-
return this.#get("list_attribute_values", undefined, signal, {
|
|
545
|
+
async attributeValues(attributeId, signal) {
|
|
546
|
+
return await this.#get("list_attribute_values", undefined, signal, {
|
|
551
547
|
attributeId,
|
|
552
548
|
});
|
|
553
549
|
}
|
|
@@ -559,8 +555,8 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
559
555
|
*
|
|
560
556
|
* @param key A canonical taxonomy key from {@link MaterialGraphClient.taxonomy}.
|
|
561
557
|
*/
|
|
562
|
-
applicableSpecs(key, signal) {
|
|
563
|
-
return this.#get("get_applicable_specs", undefined, signal, { key });
|
|
558
|
+
async applicableSpecs(key, signal) {
|
|
559
|
+
return await this.#get("get_applicable_specs", undefined, signal, { key });
|
|
564
560
|
}
|
|
565
561
|
/**
|
|
566
562
|
* THE QUESTION: "what does 'DCOF' MEAN?" — one term explained, for a human.
|
|
@@ -568,21 +564,21 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
568
564
|
* {@link MaterialGraphClient.searchVocabulary} to FIND a token and
|
|
569
565
|
* {@link MaterialGraphClient.attributeValues} for the values it takes.
|
|
570
566
|
*/
|
|
571
|
-
glossary(term, signal) {
|
|
572
|
-
return this.#get("explain_material_term", undefined, signal, { term });
|
|
567
|
+
async glossary(term, signal) {
|
|
568
|
+
return await this.#get("explain_material_term", undefined, signal, { term });
|
|
573
569
|
}
|
|
574
570
|
// ── Brands ───────────────────────────────────────────────────────────────────
|
|
575
571
|
/** "Whose catalogs are in here, and how big is each?" — {@link listBrands}. */
|
|
576
|
-
brands(options = {}, signal) {
|
|
577
|
-
return listBrands(this.#transport, options, signal);
|
|
572
|
+
async brands(options = {}, signal) {
|
|
573
|
+
return await listBrands(this.#transport, options, signal);
|
|
578
574
|
}
|
|
579
575
|
/** "Who is this brand, and what do they claim?" — {@link brandProfile}. */
|
|
580
|
-
brand(brandSlug, options, signal) {
|
|
581
|
-
return brandProfile(this.#transport, brandSlug, options, signal);
|
|
576
|
+
async brand(brandSlug, options, signal) {
|
|
577
|
+
return await brandProfile(this.#transport, brandSlug, options, signal);
|
|
582
578
|
}
|
|
583
579
|
/** "This maker's whole range, the way a fan deck reads" — {@link brandColourDeck}. */
|
|
584
|
-
brandColourDeck(brandSlug, signal) {
|
|
585
|
-
return brandColourDeck(this.#transport, brandSlug, signal);
|
|
580
|
+
async brandColourDeck(brandSlug, signal) {
|
|
581
|
+
return await brandColourDeck(this.#transport, brandSlug, signal);
|
|
586
582
|
}
|
|
587
583
|
// ── Runs (the hosted agentic surface) ────────────────────────────────────────
|
|
588
584
|
/**
|
|
@@ -591,8 +587,8 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
591
587
|
* text/markdown, and images — the server classifies each) or the legacy
|
|
592
588
|
* `{ brief, references }` shape. Requires the `mg:ingest` scope.
|
|
593
589
|
*/
|
|
594
|
-
uploadSourceMaterial(input, signal) {
|
|
595
|
-
return uploadSourceMaterial(this.#transport, input, signal);
|
|
590
|
+
async uploadSourceMaterial(input, signal) {
|
|
591
|
+
return await uploadSourceMaterial(this.#transport, input, signal);
|
|
596
592
|
}
|
|
597
593
|
/**
|
|
598
594
|
* Read back an uploaded batch (GET `/api/v1/source-material/{batchId}`): every
|
|
@@ -602,8 +598,8 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
602
598
|
* immediately. A batch you do not own raises the same 404 as one that does not
|
|
603
599
|
* exist. Requires the `mg:compose` scope.
|
|
604
600
|
*/
|
|
605
|
-
sourceMaterialBatch(batchId, signal) {
|
|
606
|
-
return getSourceMaterialBatchCall(this.#transport, batchId, signal);
|
|
601
|
+
async sourceMaterialBatch(batchId, signal) {
|
|
602
|
+
return await getSourceMaterialBatchCall(this.#transport, batchId, signal);
|
|
607
603
|
}
|
|
608
604
|
/**
|
|
609
605
|
* THE QUESTION: "what can the hosted agentic surface be asked to DO?" Start
|
|
@@ -611,8 +607,8 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
611
607
|
* live input/output schemas, scopes and side-effect class, so nothing about a
|
|
612
608
|
* Run need be hardcoded.
|
|
613
609
|
*/
|
|
614
|
-
capabilities(signal) {
|
|
615
|
-
return capabilitiesRun(this.#transport, signal);
|
|
610
|
+
async capabilities(signal) {
|
|
611
|
+
return await capabilitiesRun(this.#transport, signal);
|
|
616
612
|
}
|
|
617
613
|
/**
|
|
618
614
|
* THE QUESTION: "do a whole job for me" — the ASYNC lens. Everything else here
|
|
@@ -623,8 +619,8 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
623
619
|
* {@link MaterialGraphClient.capabilities}. Pass `idempotencyKey` so a retry
|
|
624
620
|
* replays rather than duplicates.
|
|
625
621
|
*/
|
|
626
|
-
createRun(body, signal) {
|
|
627
|
-
return createRun(this.#transport, body, signal);
|
|
622
|
+
async createRun(body, signal) {
|
|
623
|
+
return await createRun(this.#transport, body, signal);
|
|
628
624
|
}
|
|
629
625
|
/**
|
|
630
626
|
* THE QUESTION: "where has this Run got to?" — the caller-owned, redacted
|
|
@@ -632,8 +628,8 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
632
628
|
* when a human is waiting. `suspended` is not a failure — it means the Run is
|
|
633
629
|
* asking you something (see {@link MaterialGraphClient.resumeRun}).
|
|
634
630
|
*/
|
|
635
|
-
run(runId, signal) {
|
|
636
|
-
return getRun(this.#transport, runId, signal);
|
|
631
|
+
async run(runId, signal) {
|
|
632
|
+
return await getRun(this.#transport, runId, signal);
|
|
637
633
|
}
|
|
638
634
|
/**
|
|
639
635
|
* THE QUESTION: "which Runs are mine?" — your own Runs, newest first, paged
|
|
@@ -644,22 +640,12 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
644
640
|
* Only your own Runs are ever returned. Page by following `nextCursor` until
|
|
645
641
|
* it is ABSENT — a full page is not the signal to stop.
|
|
646
642
|
*/
|
|
647
|
-
listRuns(options) {
|
|
648
|
-
return listRuns(this.#transport, options);
|
|
649
|
-
}
|
|
650
|
-
/**
|
|
651
|
-
* Export a completed compose Run's scheme as a finish schedule — one row per
|
|
652
|
-
* slot, every attribute value carrying its source and verification state
|
|
653
|
-
* (GET `/api/v1/runs/{runId}/schedule`). Unknown values are explicit
|
|
654
|
-
* `missing` cells, never blanks. The `.xlsx` form is a direct-URL download:
|
|
655
|
-
* `GET /api/v1/runs/{runId}/schedule.xlsx` with the same bearer key.
|
|
656
|
-
*/
|
|
657
|
-
runSchedule(runId, options) {
|
|
658
|
-
return getRunSchedule(this.#transport, runId, options);
|
|
643
|
+
async listRuns(options) {
|
|
644
|
+
return await listRuns(this.#transport, options);
|
|
659
645
|
}
|
|
660
646
|
/** Follow a verdict cell's citation handle to its canonical claim source. */
|
|
661
|
-
citation(citationId, signal) {
|
|
662
|
-
return this.#get("get_verdict_citation", undefined, signal, { citationId });
|
|
647
|
+
async citation(citationId, signal) {
|
|
648
|
+
return await this.#get("get_verdict_citation", undefined, signal, { citationId });
|
|
663
649
|
}
|
|
664
650
|
/**
|
|
665
651
|
* Resume a suspended Run (POST `/api/v1/runs/{runId}/resume`).
|
|
@@ -668,24 +654,24 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
668
654
|
* {@link ResumeRunOptions}, whose `stepId` guards against resuming a step the
|
|
669
655
|
* run has already moved past — the API answers 409 on a mismatch (MG-608).
|
|
670
656
|
*/
|
|
671
|
-
resumeRun(runId, resumeData, signalOrOptions) {
|
|
672
|
-
return resumeRun(this.#transport, runId, resumeData, signalOrOptions);
|
|
657
|
+
async resumeRun(runId, resumeData, signalOrOptions) {
|
|
658
|
+
return await resumeRun(this.#transport, runId, resumeData, signalOrOptions);
|
|
673
659
|
}
|
|
674
660
|
/**
|
|
675
661
|
* THE QUESTION: "stop this Run." Requests DURABLE cancellation — the Run
|
|
676
662
|
* acknowledges and unwinds; the call returning does not mean it has stopped.
|
|
677
663
|
* Poll {@link MaterialGraphClient.run} for the terminal state.
|
|
678
664
|
*/
|
|
679
|
-
cancelRun(runId, signal) {
|
|
680
|
-
return cancelRun(this.#transport, runId, signal);
|
|
665
|
+
async cancelRun(runId, signal) {
|
|
666
|
+
return await cancelRun(this.#transport, runId, signal);
|
|
681
667
|
}
|
|
682
668
|
/** Option B from a composed Run, along one axis. See {@link varySchemeCall}. */
|
|
683
|
-
varyScheme(body, signal) {
|
|
684
|
-
return varySchemeCall(this.#transport, body, signal);
|
|
669
|
+
async varyScheme(body, signal) {
|
|
670
|
+
return await varySchemeCall(this.#transport, body, signal);
|
|
685
671
|
}
|
|
686
672
|
/** Ranked candidate pools for up to 24 slots. See {@link slotPoolsCall}. */
|
|
687
|
-
slotPools(body, signal) {
|
|
688
|
-
return slotPoolsCall(this.#transport, body, signal);
|
|
673
|
+
async slotPools(body, signal) {
|
|
674
|
+
return await slotPoolsCall(this.#transport, body, signal);
|
|
689
675
|
}
|
|
690
676
|
/**
|
|
691
677
|
* Stream ordered Run events as an async iterator (GET
|
|
@@ -695,42 +681,11 @@ export class MaterialGraphClient extends CatalogueClient {
|
|
|
695
681
|
streamRunEvents(runId, options) {
|
|
696
682
|
return streamRunEvents(this.#transport, runId, options);
|
|
697
683
|
}
|
|
698
|
-
// ── Projects (the persistent Material Box entity) ────────────────────────────
|
|
699
|
-
/**
|
|
700
|
-
* Create a persistent project owned by the caller (POST `/api/v1/projects`).
|
|
701
|
-
* Returns the freshly assembled state (an empty event log). Requires the
|
|
702
|
-
* `mg:ingest` scope.
|
|
703
|
-
*/
|
|
704
|
-
createProject(body = {}, signal) {
|
|
705
|
-
return createProjectCall(this.#transport, body, signal);
|
|
706
|
-
}
|
|
707
|
-
/**
|
|
708
|
-
* THE QUESTION: "what has happened on this project?" — the append-only event log
|
|
709
|
-
* FOLDED into a read model, plus the raw `events`. Read the folded collections;
|
|
710
|
-
* the log is there for audit.
|
|
711
|
-
*/
|
|
712
|
-
getProject(projectId, signal) {
|
|
713
|
-
return getProjectCall(this.#transport, projectId, signal);
|
|
714
|
-
}
|
|
715
|
-
/**
|
|
716
|
-
* Append one event to a project's append-only process trail (POST
|
|
717
|
-
* `/api/v1/projects/{projectId}/events`). Requires the `mg:ingest` scope.
|
|
718
|
-
*/
|
|
719
|
-
appendProjectEvent(projectId, body, signal) {
|
|
720
|
-
return appendProjectEventCall(this.#transport, projectId, body, signal);
|
|
721
|
-
}
|
|
722
|
-
/**
|
|
723
|
-
* THE QUESTION: "what Boxes do I have?" Scoped to the authenticated principal —
|
|
724
|
-
* another key's projects are invisible, not forbidden.
|
|
725
|
-
*/
|
|
726
|
-
listProjects(signal) {
|
|
727
|
-
return listProjectsCall(this.#transport, signal);
|
|
728
|
-
}
|
|
729
684
|
/**
|
|
730
685
|
* Collect Run events until a terminal event, the deadline, or the stream ends
|
|
731
686
|
* — the bounded events-log pattern (a single pass over {@link streamRunEvents}).
|
|
732
687
|
*/
|
|
733
|
-
drainRunEvents(runId, options) {
|
|
734
|
-
return drainRunEvents(this.#transport, runId, options);
|
|
688
|
+
async drainRunEvents(runId, options) {
|
|
689
|
+
return await drainRunEvents(this.#transport, runId, options);
|
|
735
690
|
}
|
|
736
691
|
}
|
package/codes-client.d.ts
CHANGED
|
@@ -27,10 +27,10 @@ import type { CodeAdvisoryInput, CodeAdvisoryResponse, CodeContextRequest, CodeC
|
|
|
27
27
|
import type { QueryParams } from "./http-transport.js";
|
|
28
28
|
import type { SdkOperationId } from "./operations.js";
|
|
29
29
|
/** The client's own request primitives, handed down so this file owns no transport. */
|
|
30
|
-
export
|
|
30
|
+
export type CodesTransport = {
|
|
31
31
|
get<T>(operationId: SdkOperationId, query?: QueryParams, signal?: AbortSignal): Promise<T>;
|
|
32
32
|
post<T>(operationId: SdkOperationId, body: unknown, signal?: AbortSignal): Promise<T>;
|
|
33
|
-
}
|
|
33
|
+
};
|
|
34
34
|
export declare class CodesClient {
|
|
35
35
|
#private;
|
|
36
36
|
constructor(transport: CodesTransport);
|