@instruments/materialgraph 0.14.0 → 0.16.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/by-colour-types.d.ts +15 -0
- package/catalogue-client.d.ts +18 -0
- package/catalogue-client.js +20 -0
- package/catalogue-types.d.ts +65 -0
- package/catalogue-types.js +1 -0
- package/client.d.ts +6 -6
- package/client.js +6 -4
- package/codes-client.d.ts +1 -1
- package/codes-client.js +1 -1
- package/codes-types.d.ts +3 -3
- package/composition-types.d.ts +21 -0
- package/exploration-types.d.ts +2 -0
- package/index.d.ts +2 -0
- package/material-types.d.ts +10 -0
- package/operations.d.ts +1 -1
- package/operations.js +12 -0
- package/package.json +1 -1
- package/resolve-types.d.ts +1 -1
- package/search-response-receipt-types.d.ts +90 -0
- package/search-response-receipt-types.js +1 -0
- package/search-window-types.d.ts +17 -0
- package/search-window-types.js +1 -0
- package/types.d.ts +10 -10
package/by-colour-types.d.ts
CHANGED
|
@@ -100,6 +100,15 @@ export interface ColourFamilyGate {
|
|
|
100
100
|
*/
|
|
101
101
|
dropped: number;
|
|
102
102
|
}
|
|
103
|
+
/** Receipt for the hard category gate and its treatment of unknown typing. */
|
|
104
|
+
export interface ColourCategoryGate {
|
|
105
|
+
/** Category names or keys the caller asked the gate to keep. */
|
|
106
|
+
requested: string[];
|
|
107
|
+
/** Only accepted primary product types can establish membership. */
|
|
108
|
+
requiresAcceptedPrimaryProductType: true;
|
|
109
|
+
/** Unknown/unclassified variants were ineligible, not proven non-members. */
|
|
110
|
+
unclassifiedVariantsExcluded: true;
|
|
111
|
+
}
|
|
103
112
|
/**
|
|
104
113
|
* Receipt for the colour-identity collapse that turns a variant-grain ranking
|
|
105
114
|
* into a page of TILES — one per (brand, product, dominant hex), one per stored
|
|
@@ -177,6 +186,12 @@ export interface ByColourResponse {
|
|
|
177
186
|
* what says so in counts rather than adjectives.
|
|
178
187
|
*/
|
|
179
188
|
familyGate?: ColourFamilyGate;
|
|
189
|
+
/**
|
|
190
|
+
* Present only when `category` was asked for. It states that variants without
|
|
191
|
+
* an accepted primary product type were excluded by the hard gate; absence
|
|
192
|
+
* means no category gate ran.
|
|
193
|
+
*/
|
|
194
|
+
categoryGate?: ColourCategoryGate;
|
|
180
195
|
/**
|
|
181
196
|
* What the colour-identity collapse cost this page. Matches are TILES: a page
|
|
182
197
|
* can be SHORTER than `limit` when the pool collapsed harder than the
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CatalogueDocumentAccessResult, CatalogueReferenceBatchResponse } from "./catalogue-types.js";
|
|
2
|
+
import type { HttpTransport } from "./http-transport.js";
|
|
3
|
+
import type { VariantId } from "./identifiers.js";
|
|
4
|
+
/** Catalogue publication operations inherited by the public SDK client. */
|
|
5
|
+
export declare class CatalogueClient {
|
|
6
|
+
#private;
|
|
7
|
+
protected constructor(transport: HttpTransport);
|
|
8
|
+
/**
|
|
9
|
+
* Read exact, verified brand-publication page relationships for variants.
|
|
10
|
+
* Missing evidence stays explicit; this operation never guesses a page from
|
|
11
|
+
* a generic PDF.
|
|
12
|
+
*/
|
|
13
|
+
catalogueReferences(input: {
|
|
14
|
+
variantIds: VariantId[];
|
|
15
|
+
}, signal?: AbortSignal): Promise<CatalogueReferenceBatchResponse>;
|
|
16
|
+
/** Resolve browser-safe access to one immutable catalogue document. */
|
|
17
|
+
catalogueDocumentAccess(documentId: string, signal?: AbortSignal): Promise<CatalogueDocumentAccessResult>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { resolveOperation } from "./operations.js";
|
|
2
|
+
/** Catalogue publication operations inherited by the public SDK client. */
|
|
3
|
+
export class CatalogueClient {
|
|
4
|
+
#transport;
|
|
5
|
+
constructor(transport) {
|
|
6
|
+
this.#transport = transport;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Read exact, verified brand-publication page relationships for variants.
|
|
10
|
+
* Missing evidence stays explicit; this operation never guesses a page from
|
|
11
|
+
* a generic PDF.
|
|
12
|
+
*/
|
|
13
|
+
catalogueReferences(input, signal) {
|
|
14
|
+
return this.#transport.requestJson(resolveOperation("get_catalogue_references_batch"), { body: input, signal });
|
|
15
|
+
}
|
|
16
|
+
/** Resolve browser-safe access to one immutable catalogue document. */
|
|
17
|
+
catalogueDocumentAccess(documentId, signal) {
|
|
18
|
+
return this.#transport.requestJson(resolveOperation("get_catalogue_document_access"), { pathParams: { documentId }, signal });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/** A verified product location in a specific immutable brand publication. */
|
|
2
|
+
export interface CatalogueReference {
|
|
3
|
+
variantId: string;
|
|
4
|
+
brand: {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
};
|
|
8
|
+
catalogue: {
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
};
|
|
12
|
+
edition: {
|
|
13
|
+
id: string;
|
|
14
|
+
label: string;
|
|
15
|
+
title?: string;
|
|
16
|
+
};
|
|
17
|
+
document: {
|
|
18
|
+
id: string;
|
|
19
|
+
mediaType: "application/pdf";
|
|
20
|
+
};
|
|
21
|
+
page: {
|
|
22
|
+
documentPage: number;
|
|
23
|
+
printedPageLabel?: string;
|
|
24
|
+
pageCount?: number;
|
|
25
|
+
};
|
|
26
|
+
source: {
|
|
27
|
+
brandItemCode: string;
|
|
28
|
+
};
|
|
29
|
+
status: "verified";
|
|
30
|
+
isPrimary: true;
|
|
31
|
+
}
|
|
32
|
+
export type CatalogueReferenceResult = {
|
|
33
|
+
variantId: string;
|
|
34
|
+
status: "verified";
|
|
35
|
+
reference: CatalogueReference;
|
|
36
|
+
} | {
|
|
37
|
+
variantId: string;
|
|
38
|
+
status: "no_verified_reference" | "unresolved_variant" | "unavailable" | "upstream_failure";
|
|
39
|
+
};
|
|
40
|
+
export interface CatalogueReferenceBatchResponse {
|
|
41
|
+
results: CatalogueReferenceResult[];
|
|
42
|
+
coverage: {
|
|
43
|
+
requested: number;
|
|
44
|
+
verified: number;
|
|
45
|
+
noVerifiedReference: number;
|
|
46
|
+
unresolvedVariant: number;
|
|
47
|
+
unavailable: number;
|
|
48
|
+
upstreamFailure: number;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export interface CatalogueDocumentAccess {
|
|
52
|
+
documentId: string;
|
|
53
|
+
contentType: "application/pdf";
|
|
54
|
+
readerUrl: string;
|
|
55
|
+
originalUrl: string;
|
|
56
|
+
byteRanges: "supported" | "unknown";
|
|
57
|
+
}
|
|
58
|
+
export type CatalogueDocumentAccessResult = {
|
|
59
|
+
documentId: string;
|
|
60
|
+
status: "available";
|
|
61
|
+
access: CatalogueDocumentAccess;
|
|
62
|
+
} | {
|
|
63
|
+
documentId: string;
|
|
64
|
+
status: "unresolved_document" | "unavailable" | "forbidden" | "upstream_failure";
|
|
65
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/client.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CatalogueClient } from "./catalogue-client.js";
|
|
1
2
|
import type { MaterialGraphClientOptions } from "./client-config.js";
|
|
2
3
|
import { type RateLimit } from "./errors.js";
|
|
3
4
|
export * from "./client-config.js";
|
|
@@ -8,7 +9,7 @@ export type { ExplorationNamespace } from "./client-exploration.js";
|
|
|
8
9
|
import { type SourceMaterialCommentsNamespace } from "./client-source-material-comments.js";
|
|
9
10
|
export type { SourceMaterialCommentsNamespace } from "./client-source-material-comments.js";
|
|
10
11
|
import type { AssociatedOptions } from "./association-types.js";
|
|
11
|
-
import type {
|
|
12
|
+
import type { BrandsOptions } from "./brand-types.js";
|
|
12
13
|
import type { ByColourParams, ByColourResponse } from "./by-colour-types.js";
|
|
13
14
|
import { CodesClient } from "./codes-client.js";
|
|
14
15
|
import type { CodeAdvisoryInput, CodeAdvisoryResponse } from "./codes-types.js";
|
|
@@ -26,7 +27,7 @@ import type { CapabilityManifestResponse, CreatePublicRunRequest, CreatePublicRu
|
|
|
26
27
|
import type { FinishScheduleResponse, GetRunScheduleOptions } from "./schedule-types.js";
|
|
27
28
|
import type { SchemaResource, SchemaResourceResponse } from "./schema-resource-types.js";
|
|
28
29
|
import type { SlotPoolsRequest, SlotPoolsResponse } from "./slot-pool-types.js";
|
|
29
|
-
import type { ApplicableSpecsResponse, BrandOptions,
|
|
30
|
+
import type { ApplicableSpecsResponse, BrandOptions, BySpecOptions, BySpecResponse, ColourFacetsResponse, CoordinateInput, CoordinateResponse, DemandBatchInput, DemandBatchResponse, DemandParams, DemandResponse, ExtractPaletteInput, ExtractPaletteResponse, GlossaryTermResponse, MaterialResponse, MaterialsBatchDetailResponse, MaterialsBatchGetOptions, MaterialsBatchOptions, MaterialsBatchTileResponse, PairingsOptions, PairingsResponse, ResolveAttributeOptions, ResolveAttributeResponse, ResolveAttributeValueOptions, ResolveAttributeValueResponse, ResolveColourResponse, SearchGetParams, SearchInput, SearchResponse, SiblingsResponse, SpecFacetsDistributionResponse, SpecFacetsListResponse, SuggestColourResponse, SuggestOptions, SuggestResponse, TaxonomyResponse, VocabularySearchOptions, WhoamiResponse } from "./types.js";
|
|
30
31
|
/**
|
|
31
32
|
* The MaterialGraph client — every lens on the graph, on one object.
|
|
32
33
|
*
|
|
@@ -59,11 +60,10 @@ import type { ApplicableSpecsResponse, BrandOptions, BrandProfileResponse, BySpe
|
|
|
59
60
|
* `pairings()` returns companionship the graph INFERRED. The response shapes
|
|
60
61
|
* share no field, on purpose — render them as separate sections and never
|
|
61
62
|
* concatenate them.
|
|
62
|
-
*
|
|
63
63
|
* And three reading rules that apply to every lens: ids are opaque (see
|
|
64
64
|
* `./identifiers.ts`), absent is not false, and a page is not a corpus.
|
|
65
65
|
*/
|
|
66
|
-
export declare class MaterialGraphClient {
|
|
66
|
+
export declare class MaterialGraphClient extends CatalogueClient {
|
|
67
67
|
#private;
|
|
68
68
|
readonly baseUrl: string;
|
|
69
69
|
/**
|
|
@@ -483,9 +483,9 @@ export declare class MaterialGraphClient {
|
|
|
483
483
|
*/
|
|
484
484
|
glossary(term: string, signal?: AbortSignal): Promise<GlossaryTermResponse>;
|
|
485
485
|
/** "Whose catalogs are in here, and how big is each?" — {@link listBrands}. */
|
|
486
|
-
brands(options?: BrandsOptions, signal?: AbortSignal): Promise<BrandCatalogListPage>;
|
|
486
|
+
brands(options?: BrandsOptions, signal?: AbortSignal): Promise<import("./brand-types.js").BrandCatalogListPage>;
|
|
487
487
|
/** "Who is this brand, and what do they claim?" — {@link brandProfile}. */
|
|
488
|
-
brand(brandSlug: string, options?: BrandOptions, signal?: AbortSignal): Promise<BrandProfileResponse>;
|
|
488
|
+
brand(brandSlug: string, options?: BrandOptions, signal?: AbortSignal): Promise<import("./types.js").BrandProfileResponse>;
|
|
489
489
|
/** "This maker's whole range, the way a fan deck reads" — {@link brandColourDeck}. */
|
|
490
490
|
brandColourDeck(brandSlug: string, signal?: AbortSignal): Promise<import("./fan-deck-types.js").BrandFanDeck>;
|
|
491
491
|
/**
|
package/client.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CatalogueClient } from "./catalogue-client.js";
|
|
1
2
|
import { DEFAULT_BASE_URL, MAX_BATCH_IDS } from "./client-config.js";
|
|
2
3
|
import { MaterialGraphError } from "./errors.js";
|
|
3
4
|
import { HttpTransport } from "./http-transport.js";
|
|
@@ -52,11 +53,10 @@ import { suggestQuery } from "./suggest-types.js";
|
|
|
52
53
|
* `pairings()` returns companionship the graph INFERRED. The response shapes
|
|
53
54
|
* share no field, on purpose — render them as separate sections and never
|
|
54
55
|
* concatenate them.
|
|
55
|
-
*
|
|
56
56
|
* And three reading rules that apply to every lens: ids are opaque (see
|
|
57
57
|
* `./identifiers.ts`), absent is not false, and a page is not a corpus.
|
|
58
58
|
*/
|
|
59
|
-
export class MaterialGraphClient {
|
|
59
|
+
export class MaterialGraphClient extends CatalogueClient {
|
|
60
60
|
baseUrl;
|
|
61
61
|
/**
|
|
62
62
|
* THE QUESTION: "show me everything in this category / this brand, in a plain
|
|
@@ -112,12 +112,14 @@ export class MaterialGraphClient {
|
|
|
112
112
|
if (!options.apiKey) {
|
|
113
113
|
throw MaterialGraphError.unexpected("MaterialGraphClient: `apiKey` is required.");
|
|
114
114
|
}
|
|
115
|
-
|
|
115
|
+
const transport = new HttpTransport({
|
|
116
116
|
apiKey: options.apiKey,
|
|
117
117
|
baseUrl: options.baseUrl ?? DEFAULT_BASE_URL,
|
|
118
118
|
fetch: options.fetch ?? globalThis.fetch,
|
|
119
119
|
});
|
|
120
|
-
|
|
120
|
+
super(transport);
|
|
121
|
+
this.#transport = transport;
|
|
122
|
+
this.baseUrl = transport.baseUrl;
|
|
121
123
|
this.browse = createBrowseNamespace((params, signal) => this.#get("search_browse_by_colour", browseQuery(params), signal));
|
|
122
124
|
this.codes = new CodesClient({
|
|
123
125
|
get: (operationId, query, signal) => this.#get(operationId, query, signal),
|
package/codes-client.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ export declare class CodesClient {
|
|
|
45
45
|
* The vocabulary for stating a code context (GET `/api/v1/codes/context`):
|
|
46
46
|
* seeded jurisdictions and their coverage tier, the occupancy groups the
|
|
47
47
|
* registry keys on, finish locations, dimensions, classification scales with
|
|
48
|
-
* classes ordered best-first, and which `
|
|
48
|
+
* classes ordered best-first, and which `room` term correlates to which
|
|
49
49
|
* regulatory axes.
|
|
50
50
|
*
|
|
51
51
|
* Start here — every value the other two calls accept is listed in this one
|
package/codes-client.js
CHANGED
|
@@ -14,7 +14,7 @@ export class CodesClient {
|
|
|
14
14
|
* The vocabulary for stating a code context (GET `/api/v1/codes/context`):
|
|
15
15
|
* seeded jurisdictions and their coverage tier, the occupancy groups the
|
|
16
16
|
* registry keys on, finish locations, dimensions, classification scales with
|
|
17
|
-
* classes ordered best-first, and which `
|
|
17
|
+
* classes ordered best-first, and which `room` term correlates to which
|
|
18
18
|
* regulatory axes.
|
|
19
19
|
*
|
|
20
20
|
* Start here — every value the other two calls accept is listed in this one
|
package/codes-types.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ export interface CodeContextRequest {
|
|
|
62
62
|
*/
|
|
63
63
|
spaceType?: string;
|
|
64
64
|
/**
|
|
65
|
-
*
|
|
65
|
+
* A `room` term id (e.g. `"hotel_room"`) to correlate the regulatory axes
|
|
66
66
|
* from. Explicit `occupancyGroup` / `spaceType` always win. A room that
|
|
67
67
|
* correlates to neither axis is a 400 naming the axis — never a guess.
|
|
68
68
|
*/
|
|
@@ -224,7 +224,7 @@ export interface ResolvedCodeContext {
|
|
|
224
224
|
spaceType: string;
|
|
225
225
|
sprinklered: boolean;
|
|
226
226
|
basis: OpenEnum<"explicit" | "derived_from_room">;
|
|
227
|
-
/** The `
|
|
227
|
+
/** The `room` term the axes were correlated from, or null. */
|
|
228
228
|
roomType: string | null;
|
|
229
229
|
}
|
|
230
230
|
/**
|
|
@@ -271,7 +271,7 @@ export interface CodeContextResponse {
|
|
|
271
271
|
/** Ordered BEST FIRST: index 0 outranks index 1. */
|
|
272
272
|
classes: string[];
|
|
273
273
|
}[];
|
|
274
|
-
/** `
|
|
274
|
+
/** `room` → regulatory axes. `null` where the registry refuses to correlate. */
|
|
275
275
|
roomCorrelations: {
|
|
276
276
|
roomType: string;
|
|
277
277
|
label: string;
|
package/composition-types.d.ts
CHANGED
|
@@ -86,6 +86,23 @@ export interface CompliancePresetRule {
|
|
|
86
86
|
export interface CompliancePreset {
|
|
87
87
|
rules: CompliancePresetRule[];
|
|
88
88
|
}
|
|
89
|
+
/** Exact project regulatory axes used to attach bounded code citations. */
|
|
90
|
+
export interface ProgrammeRegulatoryAxes {
|
|
91
|
+
jurisdictionId: string;
|
|
92
|
+
occupancyGroup: string;
|
|
93
|
+
sprinklered: boolean;
|
|
94
|
+
}
|
|
95
|
+
/** One caller-declared Programme space. `spaceType` remains open descriptive text. */
|
|
96
|
+
export interface ComposeDeclaredSpace {
|
|
97
|
+
name: string;
|
|
98
|
+
spaceType?: string;
|
|
99
|
+
/** Exact active canonical `room` id used for bounded code evaluation. */
|
|
100
|
+
regulatoryRoomType?: string;
|
|
101
|
+
}
|
|
102
|
+
/** The spaces this run is explicitly for; omit to retain brief inference. */
|
|
103
|
+
export interface ComposeDeclaredScope {
|
|
104
|
+
spaces: ComposeDeclaredSpace[];
|
|
105
|
+
}
|
|
89
106
|
/**
|
|
90
107
|
* The `inputJson` for a `compose-material-schemes` run. `batchId` is required;
|
|
91
108
|
* everything else has a server default. `anchors` (max 24) carry externally
|
|
@@ -101,6 +118,10 @@ export interface ComposeMaterialSchemesInput {
|
|
|
101
118
|
exclusions?: SchemeExclusions;
|
|
102
119
|
anchors?: ComposeAnchorInput[];
|
|
103
120
|
compliancePreset?: CompliancePreset;
|
|
121
|
+
/** Omit to leave Programme code coverage explicitly unevaluated. */
|
|
122
|
+
regulatoryAxes?: ProgrammeRegulatoryAxes;
|
|
123
|
+
/** Explicit caller-held space facts; regulatoryRoomType is never inferred. */
|
|
124
|
+
scope?: ComposeDeclaredScope;
|
|
104
125
|
}
|
|
105
126
|
/**
|
|
106
127
|
* The state of one criterion verdict cell (MG-627: the shared MaterialGraph
|
package/exploration-types.d.ts
CHANGED
package/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export type { MaterialGraphErrorInit, MaterialGraphErrorKind, MaterialGraphReque
|
|
|
19
19
|
export type * from "./types.js";
|
|
20
20
|
export type * from "./match-types.js";
|
|
21
21
|
export type * from "./browse-types.js";
|
|
22
|
+
export type * from "./catalogue-types.js";
|
|
22
23
|
export type * from "./by-colour-types.js";
|
|
23
24
|
export { MATCH_IMAGE_TYPES, MATCH_OUTCOMES, MATCH_MATERIAL_FUNCTIONS, MATCH_STREAM_EVENT_TYPES, MATCH_SURFACE_STATUSES, MATCH_WORKFLOW_STEPS, } from "./match-stream-types.js";
|
|
24
25
|
export type * from "./match-stream-types.js";
|
|
@@ -37,6 +38,7 @@ export type * from "./material-asset-types.js";
|
|
|
37
38
|
export type * from "./material-block-types.js";
|
|
38
39
|
export type * from "./schema-resource-types.js";
|
|
39
40
|
export type * from "./search-refinement-types.js";
|
|
41
|
+
export type * from "./search-window-types.js";
|
|
40
42
|
export { CERTIFICATION_PROGRAMME_ATTRIBUTE_ID } from "./spec-types.js";
|
|
41
43
|
export type * from "./spec-types.js";
|
|
42
44
|
export { certificationProgramme, certificationProgrammeCriterion, hasSpec, specCriterion, specRangeCriterion, specTerm, } from "./specifications.js";
|
package/material-types.d.ts
CHANGED
|
@@ -120,6 +120,16 @@ export interface MaterialDetail extends MaterialTile {
|
|
|
120
120
|
color: string | null;
|
|
121
121
|
/** Material Bank's own opaque id, when one is mapped. Null = unmapped, not absent. */
|
|
122
122
|
materialBankId: string | null;
|
|
123
|
+
/**
|
|
124
|
+
* Explicit source-governed permission to save this exact source-coded variant
|
|
125
|
+
* to a Project. Absent means unknown/not allowed; never infer it from identity.
|
|
126
|
+
*/
|
|
127
|
+
projectSaveCapability?: "allowed";
|
|
128
|
+
/**
|
|
129
|
+
* The governed source status behind Project capture. Provisional remains
|
|
130
|
+
* source-backed, but is not a verified catalogue claim.
|
|
131
|
+
*/
|
|
132
|
+
sourceStatus?: "provisional";
|
|
123
133
|
installationImageUrl: string | null;
|
|
124
134
|
displayCategory: string | null;
|
|
125
135
|
categoryPath: string[];
|
package/operations.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const MATERIALGRAPH_API_VERSION = "0.7.0";
|
|
2
|
-
declare const OPERATION_DEFINITIONS: readonly [readonly ["search", "POST", "/api/v1/search", "search_materials_post"], readonly ["planQuery", "POST", "/api/v1/search/plan", "plan_material_query"], readonly ["searchGet", "GET", "/api/v1/search", "search_materials_get"], readonly ["match", "POST", "/api/v1/search/match", "match_material"], readonly ["byColour", "GET", "/api/v1/search/colours", "search_by_colour"], readonly ["material", "GET", "/api/v1/materials/{variantId}", "get_material"], readonly ["siblings", "GET", "/api/v1/materials/{variantId}/siblings", "get_material_siblings"], readonly ["materialBlocks", "GET", "/api/v1/materials/{variantId}/blocks", "list_material_blocks"], readonly ["materialAssets", "GET", "/api/v1/materials/{variantId}/assets", "list_material_assets"], readonly ["exploration.operators", "GET", "/api/v1/materials/{variantId}/operators", "list_material_operators"], readonly ["exploration.candidates", "POST", "/api/v1/materials/{variantId}/candidates", "read_material_candidates"], readonly ["schema", "GET", "/api/v1/schema/blocks", "list_schema_blocks"], readonly ["schema", "GET", "/api/v1/schema/attributes", "list_schema_attributes"], readonly ["schema", "GET", "/api/v1/schema/verticals", "list_schema_verticals"], readonly ["schema", "GET", "/api/v1/schema/product-types", "list_schema_product_types"], readonly ["schema", "GET", "/api/v1/schema/units", "list_schema_units"], readonly ["schema", "GET", "/api/v1/schema/value-dictionaries", "list_schema_value_dictionaries"], readonly ["schema", "GET", "/api/v1/schema/source-requirements", "list_schema_source_requirements"], readonly ["schema", "GET", "/api/v1/schema/product-type-templates", "list_schema_product_type_templates"], readonly ["schema", "GET", "/api/v1/schema/mappings", "list_schema_mappings"], readonly ["pairings", "GET", "/api/v1/materials/{variantId}/pairings", "get_material_pairings"], readonly ["associatedFinishes", "GET", "/api/v1/associated/finishes", "list_associated_finishes"], readonly ["associatedProducts", "GET", "/api/v1/associated/products", "list_associated_products"], readonly ["materials", "POST", "/api/v1/materials/batch", "get_materials_batch_post"], readonly ["materialsCached", "GET", "/api/v1/materials/batch", "get_materials_batch_get"], readonly ["browse", "GET", "/api/v1/search/browse", "search_browse_by_colour"], readonly ["colourFacets", "GET", "/api/v1/colours/facets", "get_colour_facets"], readonly ["colours.profiles", "GET", "/api/v1/colours/profiles", "get_category_colour_profiles"], readonly ["colours.stats", "GET", "/api/v1/colours/stats", "get_colour_stats"], readonly ["resolveColour", "GET", "/api/v1/search/colours/resolve", "resolve_colour_name"], readonly ["suggestColour", "GET", "/api/v1/search/colours/suggest", "suggest_colour_names"], readonly ["suggest", "GET", "/api/v1/search/suggest", "search_suggest"], readonly ["resolveAttribute", "GET", "/api/v1/catalog/attributes/resolve", "catalog_resolve_attribute"], readonly ["resolveAttributeValue", "GET", "/api/v1/catalog/attributes/{attributeId}/values/resolve", "catalog_resolve_value"], readonly ["searchVocabulary", "GET", "/api/v1/catalog/vocabulary/search", "catalog_vocabulary_search"], readonly ["resolve", "POST", "/api/v1/resolve", "resolve_phrases"], readonly ["bySpec", "GET", "/api/v1/search/specifications", "catalog_by_spec"], readonly ["taxonomy", "GET", "/api/v1/taxonomy/categories", "get_category_taxonomy"], readonly ["whoami", "GET", "/api/v1/whoami", "whoami"], readonly ["coordinate", "POST", "/api/v1/pairings/coordinate", "coordinate_materials"], readonly ["demand", "GET", "/api/v1/demand", "get_material_demand"], readonly ["colours.palette", "POST", "/api/v1/search/palettes", "search_by_palette"], readonly ["extractPalette", "POST", "/api/v1/search/palettes/extract", "extract_image_palette"], readonly ["colours.gradient", "POST", "/api/v1/search/gradients", "search_by_gradient"], readonly ["specificationFacets", "GET", "/api/v1/catalog/specifications/facets", "list_spec_facets"], readonly ["attributeValues", "GET", "/api/v1/catalog/attributes/{attributeId}/values", "list_attribute_values"], readonly ["applicableSpecs", "GET", "/api/v1/taxonomy/categories/{key}/specs", "get_applicable_specs"], readonly ["glossary", "GET", "/api/v1/glossary/{term}", "explain_material_term"], readonly ["brands", "GET", "/api/v1/brands", "list_brands"], readonly ["brand", "GET", "/api/v1/brands/{brandSlug}", "get_brand_profile"], readonly ["brandColourDeck", "GET", "/api/v1/brands/{brandSlug}/colours", "brand_colour_deck"], readonly ["uploadSourceMaterial", "POST", "/api/v1/source-material", "upload_source_material"], readonly ["sourceMaterialBatch", "GET", "/api/v1/source-material/{batchId}", "get_source_material_batch"], readonly ["sourceMaterialComments", "GET", "/api/v1/source-material/{batchId}/sources/{sourceId}/comments", "list_source_material_comments"], readonly ["sourceMaterialComments", "POST", "/api/v1/source-material/{batchId}/sources/{sourceId}/comments", "post_source_material_comment"], readonly ["capabilities", "GET", "/api/v1/capabilities", "list_public_capabilities"], readonly ["createRun", "POST", "/api/v1/runs", "create_public_run"], readonly ["listRuns", "GET", "/api/v1/runs", "list_public_runs"], readonly ["run", "GET", "/api/v1/runs/{runId}", "get_public_run"], readonly ["runSchedule", "GET", "/api/v1/runs/{runId}/schedule", "get_run_finish_schedule"], readonly ["streamRunEvents", "GET", "/api/v1/runs/{runId}/events", "list_public_run_events"], readonly ["resumeRun", "POST", "/api/v1/runs/{runId}/resume", "resume_public_run"], readonly ["cancelRun", "POST", "/api/v1/runs/{runId}/cancel", "cancel_public_run"], readonly ["varyScheme", "POST", "/api/v1/schemes/vary", "vary_schemes"], readonly ["slotPools", "POST", "/api/v1/schemes/pools", "slot_pools"], readonly ["createProject", "POST", "/api/v1/projects", "create_box_project"], readonly ["listProjects", "GET", "/api/v1/projects", "list_box_projects"], readonly ["getProject", "GET", "/api/v1/projects/{projectId}", "get_box_project"], readonly ["appendProjectEvent", "POST", "/api/v1/projects/{projectId}/events", "append_box_project_event"], readonly ["demandBatch", "POST", "/api/v1/demand/batch", "get_demand_batch"], readonly ["codeAdvisory", "POST", "/api/v1/codes/advisory", "resolveCodeAdvisory"], readonly ["codes.context", "GET", "/api/v1/codes/context", "list_code_context"], readonly ["codes.requirements", "GET", "/api/v1/codes/requirements", "list_code_requirements"]];
|
|
2
|
+
declare const OPERATION_DEFINITIONS: readonly [readonly ["search", "POST", "/api/v1/search", "search_materials_post"], readonly ["planQuery", "POST", "/api/v1/search/plan", "plan_material_query"], readonly ["searchGet", "GET", "/api/v1/search", "search_materials_get"], readonly ["match", "POST", "/api/v1/search/match", "match_material"], readonly ["byColour", "GET", "/api/v1/search/colours", "search_by_colour"], readonly ["material", "GET", "/api/v1/materials/{variantId}", "get_material"], readonly ["catalogueReferences", "POST", "/api/v1/catalogues/references", "get_catalogue_references_batch"], readonly ["catalogueDocumentAccess", "GET", "/api/v1/catalogues/documents/{documentId}", "get_catalogue_document_access"], readonly ["siblings", "GET", "/api/v1/materials/{variantId}/siblings", "get_material_siblings"], readonly ["materialBlocks", "GET", "/api/v1/materials/{variantId}/blocks", "list_material_blocks"], readonly ["materialAssets", "GET", "/api/v1/materials/{variantId}/assets", "list_material_assets"], readonly ["exploration.operators", "GET", "/api/v1/materials/{variantId}/operators", "list_material_operators"], readonly ["exploration.candidates", "POST", "/api/v1/materials/{variantId}/candidates", "read_material_candidates"], readonly ["schema", "GET", "/api/v1/schema/blocks", "list_schema_blocks"], readonly ["schema", "GET", "/api/v1/schema/attributes", "list_schema_attributes"], readonly ["schema", "GET", "/api/v1/schema/verticals", "list_schema_verticals"], readonly ["schema", "GET", "/api/v1/schema/product-types", "list_schema_product_types"], readonly ["schema", "GET", "/api/v1/schema/units", "list_schema_units"], readonly ["schema", "GET", "/api/v1/schema/value-dictionaries", "list_schema_value_dictionaries"], readonly ["schema", "GET", "/api/v1/schema/source-requirements", "list_schema_source_requirements"], readonly ["schema", "GET", "/api/v1/schema/product-type-templates", "list_schema_product_type_templates"], readonly ["schema", "GET", "/api/v1/schema/mappings", "list_schema_mappings"], readonly ["pairings", "GET", "/api/v1/materials/{variantId}/pairings", "get_material_pairings"], readonly ["associatedFinishes", "GET", "/api/v1/associated/finishes", "list_associated_finishes"], readonly ["associatedProducts", "GET", "/api/v1/associated/products", "list_associated_products"], readonly ["materials", "POST", "/api/v1/materials/batch", "get_materials_batch_post"], readonly ["materialsCached", "GET", "/api/v1/materials/batch", "get_materials_batch_get"], readonly ["browse", "GET", "/api/v1/search/browse", "search_browse_by_colour"], readonly ["colourFacets", "GET", "/api/v1/colours/facets", "get_colour_facets"], readonly ["colours.profiles", "GET", "/api/v1/colours/profiles", "get_category_colour_profiles"], readonly ["colours.stats", "GET", "/api/v1/colours/stats", "get_colour_stats"], readonly ["resolveColour", "GET", "/api/v1/search/colours/resolve", "resolve_colour_name"], readonly ["suggestColour", "GET", "/api/v1/search/colours/suggest", "suggest_colour_names"], readonly ["suggest", "GET", "/api/v1/search/suggest", "search_suggest"], readonly ["resolveAttribute", "GET", "/api/v1/catalog/attributes/resolve", "catalog_resolve_attribute"], readonly ["resolveAttributeValue", "GET", "/api/v1/catalog/attributes/{attributeId}/values/resolve", "catalog_resolve_value"], readonly ["searchVocabulary", "GET", "/api/v1/catalog/vocabulary/search", "catalog_vocabulary_search"], readonly ["resolve", "POST", "/api/v1/resolve", "resolve_phrases"], readonly ["bySpec", "GET", "/api/v1/search/specifications", "catalog_by_spec"], readonly ["taxonomy", "GET", "/api/v1/taxonomy/categories", "get_category_taxonomy"], readonly ["whoami", "GET", "/api/v1/whoami", "whoami"], readonly ["coordinate", "POST", "/api/v1/pairings/coordinate", "coordinate_materials"], readonly ["demand", "GET", "/api/v1/demand", "get_material_demand"], readonly ["colours.palette", "POST", "/api/v1/search/palettes", "search_by_palette"], readonly ["extractPalette", "POST", "/api/v1/search/palettes/extract", "extract_image_palette"], readonly ["colours.gradient", "POST", "/api/v1/search/gradients", "search_by_gradient"], readonly ["specificationFacets", "GET", "/api/v1/catalog/specifications/facets", "list_spec_facets"], readonly ["attributeValues", "GET", "/api/v1/catalog/attributes/{attributeId}/values", "list_attribute_values"], readonly ["applicableSpecs", "GET", "/api/v1/taxonomy/categories/{key}/specs", "get_applicable_specs"], readonly ["glossary", "GET", "/api/v1/glossary/{term}", "explain_material_term"], readonly ["brands", "GET", "/api/v1/brands", "list_brands"], readonly ["brand", "GET", "/api/v1/brands/{brandSlug}", "get_brand_profile"], readonly ["brandColourDeck", "GET", "/api/v1/brands/{brandSlug}/colours", "brand_colour_deck"], readonly ["uploadSourceMaterial", "POST", "/api/v1/source-material", "upload_source_material"], readonly ["sourceMaterialBatch", "GET", "/api/v1/source-material/{batchId}", "get_source_material_batch"], readonly ["sourceMaterialComments", "GET", "/api/v1/source-material/{batchId}/sources/{sourceId}/comments", "list_source_material_comments"], readonly ["sourceMaterialComments", "POST", "/api/v1/source-material/{batchId}/sources/{sourceId}/comments", "post_source_material_comment"], readonly ["capabilities", "GET", "/api/v1/capabilities", "list_public_capabilities"], readonly ["createRun", "POST", "/api/v1/runs", "create_public_run"], readonly ["listRuns", "GET", "/api/v1/runs", "list_public_runs"], readonly ["run", "GET", "/api/v1/runs/{runId}", "get_public_run"], readonly ["runSchedule", "GET", "/api/v1/runs/{runId}/schedule", "get_run_finish_schedule"], readonly ["streamRunEvents", "GET", "/api/v1/runs/{runId}/events", "list_public_run_events"], readonly ["resumeRun", "POST", "/api/v1/runs/{runId}/resume", "resume_public_run"], readonly ["cancelRun", "POST", "/api/v1/runs/{runId}/cancel", "cancel_public_run"], readonly ["varyScheme", "POST", "/api/v1/schemes/vary", "vary_schemes"], readonly ["slotPools", "POST", "/api/v1/schemes/pools", "slot_pools"], readonly ["createProject", "POST", "/api/v1/projects", "create_box_project"], readonly ["listProjects", "GET", "/api/v1/projects", "list_box_projects"], readonly ["getProject", "GET", "/api/v1/projects/{projectId}", "get_box_project"], readonly ["appendProjectEvent", "POST", "/api/v1/projects/{projectId}/events", "append_box_project_event"], readonly ["demandBatch", "POST", "/api/v1/demand/batch", "get_demand_batch"], readonly ["codeAdvisory", "POST", "/api/v1/codes/advisory", "resolveCodeAdvisory"], readonly ["codes.context", "GET", "/api/v1/codes/context", "list_code_context"], readonly ["codes.requirements", "GET", "/api/v1/codes/requirements", "list_code_requirements"]];
|
|
3
3
|
export type SdkOperationId = (typeof OPERATION_DEFINITIONS)[number][3];
|
|
4
4
|
export type SdkOperation = Readonly<{
|
|
5
5
|
clientMethod: (typeof OPERATION_DEFINITIONS)[number][0];
|
package/operations.js
CHANGED
|
@@ -7,6 +7,18 @@ const OPERATION_DEFINITIONS = [
|
|
|
7
7
|
["match", "POST", "/api/v1/search/match", "match_material"],
|
|
8
8
|
["byColour", "GET", "/api/v1/search/colours", "search_by_colour"],
|
|
9
9
|
["material", "GET", "/api/v1/materials/{variantId}", "get_material"],
|
|
10
|
+
[
|
|
11
|
+
"catalogueReferences",
|
|
12
|
+
"POST",
|
|
13
|
+
"/api/v1/catalogues/references",
|
|
14
|
+
"get_catalogue_references_batch",
|
|
15
|
+
],
|
|
16
|
+
[
|
|
17
|
+
"catalogueDocumentAccess",
|
|
18
|
+
"GET",
|
|
19
|
+
"/api/v1/catalogues/documents/{documentId}",
|
|
20
|
+
"get_catalogue_document_access",
|
|
21
|
+
],
|
|
10
22
|
[
|
|
11
23
|
"siblings",
|
|
12
24
|
"GET",
|
package/package.json
CHANGED
package/resolve-types.d.ts
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* - `category` — a product-category taxonomy node key.
|
|
26
26
|
* - `attribute` — a registry attribute id: the LEFT half of an `attribute:value`
|
|
27
27
|
* pair, for `mg.bySpec()` or `search({ filters })`.
|
|
28
|
-
* - `attribute_value` — a value-dictionary term, namespaced (`
|
|
28
|
+
* - `attribute_value` — a value-dictionary term, namespaced (`sheen.matte`):
|
|
29
29
|
* the RIGHT half.
|
|
30
30
|
* - `jurisdiction` — a code jurisdiction id (`us-tx`), for `mg.codeAdvisory()`.
|
|
31
31
|
* - `occupancy_group` — an IBC occupancy group (`R-1`), the other axis the code
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module sdk/search-response-receipt-types
|
|
3
|
+
* @description Inspectable routing, rerank, and compound-constraint receipts
|
|
4
|
+
* emitted by ordinary Search responses.
|
|
5
|
+
*/
|
|
6
|
+
import type { OpenEnum } from "./types.js";
|
|
7
|
+
/** The single candidate source a query resolved to. */
|
|
8
|
+
export type SearchMode = OpenEnum<"image" | "colour" | "text" | "lexical" | "entity-browse">;
|
|
9
|
+
/** Rerank-term report (absent in colour mode — there colour IS the source). */
|
|
10
|
+
export interface SearchRerankReport {
|
|
11
|
+
colour?: OpenEnum<"ok" | "failed" | "skipped">;
|
|
12
|
+
colourWeight?: number;
|
|
13
|
+
colourLabel?: string;
|
|
14
|
+
}
|
|
15
|
+
/** One stage in the explain-only ledger of transformations that actually ran. */
|
|
16
|
+
export type SearchQueryTransformStage = {
|
|
17
|
+
stage: OpenEnum<"normalise" | "resolve-spec" | "resolve-paint" | "resolve-brand">;
|
|
18
|
+
applied: true;
|
|
19
|
+
} | {
|
|
20
|
+
stage: OpenEnum<"normalise" | "resolve-spec" | "resolve-paint" | "resolve-brand">;
|
|
21
|
+
applied: false;
|
|
22
|
+
reason: string;
|
|
23
|
+
};
|
|
24
|
+
/** Explain-only category gate selected by query understanding. */
|
|
25
|
+
export interface SearchCategoryAnchor {
|
|
26
|
+
productTypeId: string;
|
|
27
|
+
displayName: string;
|
|
28
|
+
similarity: number;
|
|
29
|
+
margin: number | null;
|
|
30
|
+
source: OpenEnum<"synonym" | "display-name" | "vector">;
|
|
31
|
+
applied: boolean;
|
|
32
|
+
}
|
|
33
|
+
/** Explain-only brand gate selected by query understanding. */
|
|
34
|
+
export interface SearchBrandAnchor {
|
|
35
|
+
brandSlug: string;
|
|
36
|
+
brandName: string;
|
|
37
|
+
confidence: number;
|
|
38
|
+
margin: number | null;
|
|
39
|
+
tier: OpenEnum<"exact_id" | "exact_alias" | "lexical" | "semantic">;
|
|
40
|
+
variantCount: number;
|
|
41
|
+
applied: boolean;
|
|
42
|
+
}
|
|
43
|
+
/** A real brand candidate the engine deliberately declined to gate on. */
|
|
44
|
+
export interface SearchBrandSkip {
|
|
45
|
+
reason: OpenEnum<"ambiguous" | "weak-tier" | "too-broad">;
|
|
46
|
+
candidates?: string[];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* EXPLAIN-only receipt of the query shape that executed. This is distinct from
|
|
50
|
+
* the separate Search Plan compiler operation: it reports execution and never
|
|
51
|
+
* causes it.
|
|
52
|
+
*/
|
|
53
|
+
export interface SearchExecutionPlan {
|
|
54
|
+
grain: OpenEnum<"variant" | "product">;
|
|
55
|
+
weights: {
|
|
56
|
+
image: number;
|
|
57
|
+
category: number;
|
|
58
|
+
colour: number;
|
|
59
|
+
lexical: number;
|
|
60
|
+
text: number;
|
|
61
|
+
};
|
|
62
|
+
queryTransform: SearchQueryTransformStage[];
|
|
63
|
+
categoryAnchor?: SearchCategoryAnchor;
|
|
64
|
+
brandAnchor?: SearchBrandAnchor;
|
|
65
|
+
brandSkipped?: SearchBrandSkip;
|
|
66
|
+
}
|
|
67
|
+
/** Why a compound colour constraint returned a full or short page. */
|
|
68
|
+
export interface CompoundColourAbundanceReceipt {
|
|
69
|
+
grain: OpenEnum<"variant" | "product">;
|
|
70
|
+
requested: number;
|
|
71
|
+
eligible: number;
|
|
72
|
+
candidateWindow: number;
|
|
73
|
+
sourceExhausted: boolean;
|
|
74
|
+
state: OpenEnum<"filled" | "corpus_scarcity" | "evidence_unavailable" | "retrieval_window_exhausted">;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Eligibility proof for an explicit or taxonomy-backed colour inside a compound
|
|
78
|
+
* text query. Counts describe the bounded candidate pool, not the whole corpus.
|
|
79
|
+
*/
|
|
80
|
+
export interface CompoundColourConstraintReceipt {
|
|
81
|
+
provenance: OpenEnum<"explicit" | "detected-strong">;
|
|
82
|
+
family: string;
|
|
83
|
+
queryHexes: string[];
|
|
84
|
+
considered: number;
|
|
85
|
+
kept: number;
|
|
86
|
+
dropped: number;
|
|
87
|
+
unknown: number;
|
|
88
|
+
adjacent: number;
|
|
89
|
+
abundance?: CompoundColourAbundanceReceipt;
|
|
90
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** The bounded candidate window that produced a search page. */
|
|
2
|
+
export interface SearchWindowReceipt {
|
|
3
|
+
/** Versioned budget profile; interpret the remaining fields under this version. */
|
|
4
|
+
profile: "interactive-r1" | (string & {});
|
|
5
|
+
/** Candidate depth used by the final retrieval. */
|
|
6
|
+
candidateTier: number;
|
|
7
|
+
/** Every candidate retrieval, including required fallbacks and optional recovery. */
|
|
8
|
+
retrievalRounds: number;
|
|
9
|
+
/** Candidate-retrieval wall time only, in milliseconds. */
|
|
10
|
+
retrievalMs: number;
|
|
11
|
+
/** True when the serving source proved there were no more candidates. */
|
|
12
|
+
exhaustive: boolean;
|
|
13
|
+
/** True when product-grain scarcity caused one jump to the deep ceiling. */
|
|
14
|
+
deepened: boolean;
|
|
15
|
+
/** True when a still-short page exhausted its bounded recovery allowance. */
|
|
16
|
+
budgetExhausted: boolean;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/types.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { BySpecVerdict } from "./by-spec-types.js";
|
|
|
5
5
|
* These interfaces intentionally have NO runtime dependency on any
|
|
6
6
|
* `@materialgraph/*` package — they are a standalone, publishable mirror of the
|
|
7
7
|
* shapes in `apps/web/public/openapi.yaml` and the captured fixtures under
|
|
8
|
-
* `
|
|
8
|
+
* `src/__tests__/fixtures/v0.5.0/`. The `contract-parity` test re-checks them
|
|
9
9
|
* against the real Zod schemas so the mirror cannot silently drift.
|
|
10
10
|
* TOLERANT-PARSING CONTRACT: the public surface declares open response enums —
|
|
11
11
|
* "clients must tolerate unknown enum values and unknown fields". Every union
|
|
@@ -31,7 +31,9 @@ import type { Cursor, ProductId, VariantId } from "./identifiers.js";
|
|
|
31
31
|
import type { MaterialDetail, MaterialTile } from "./material-types.js";
|
|
32
32
|
import type { QueryUnderstanding } from "./query-understanding-types.js";
|
|
33
33
|
import type { SearchDisambiguation, SearchSuggestion } from "./search-refinement-types.js";
|
|
34
|
-
|
|
34
|
+
import type { CompoundColourConstraintReceipt, SearchExecutionPlan, SearchMode, SearchRerankReport } from "./search-response-receipt-types.js";
|
|
35
|
+
import type { SearchWindowReceipt } from "./search-window-types.js";
|
|
36
|
+
export type * from "./search-response-receipt-types.js";
|
|
35
37
|
export type OpenEnum<T extends string> = T | (string & {});
|
|
36
38
|
/**
|
|
37
39
|
* A JSON value, recursively — exactly what survives a `jsonb` round-trip
|
|
@@ -389,14 +391,6 @@ export interface SearchRefinementReceipt {
|
|
|
389
391
|
schemaVersion: string;
|
|
390
392
|
projectionVersion: number;
|
|
391
393
|
}
|
|
392
|
-
/** The single candidate source a query resolved to. */
|
|
393
|
-
export type SearchMode = OpenEnum<"image" | "colour" | "text" | "lexical" | "entity-browse">;
|
|
394
|
-
/** Rerank-term report (absent in colour mode — there colour IS the source). */
|
|
395
|
-
export interface SearchRerankReport {
|
|
396
|
-
colour?: OpenEnum<"ok" | "failed" | "skipped">;
|
|
397
|
-
colourWeight?: number;
|
|
398
|
-
colourLabel?: string;
|
|
399
|
-
}
|
|
400
394
|
/**
|
|
401
395
|
* The search response envelope. `view` discriminates the `results` union:
|
|
402
396
|
* `"full"` (default) carries {@link SearchResultItem}s, `"card"` the lean
|
|
@@ -418,7 +412,13 @@ export interface SearchResponse {
|
|
|
418
412
|
maxScore: number;
|
|
419
413
|
/** Opaque keyset for the next page. Absent = end of the walk, not an error. */
|
|
420
414
|
cursor?: Cursor;
|
|
415
|
+
/** Boundedness and retrieval-cost receipt on current Search responses. */
|
|
416
|
+
window?: SearchWindowReceipt;
|
|
421
417
|
rerank?: SearchRerankReport;
|
|
418
|
+
/** Hard compound-colour eligibility and abundance receipt, when applied. */
|
|
419
|
+
colourConstraint?: CompoundColourConstraintReceipt;
|
|
420
|
+
/** Explain-only receipt of the query shape and transform ledger that ran. */
|
|
421
|
+
plan?: SearchExecutionPlan;
|
|
422
422
|
counts?: SearchCounts;
|
|
423
423
|
/**
|
|
424
424
|
* The `#rrggbb` colours the colour signal ACTUALLY ran on, after
|