@purveyors/sdk 0.1.0 → 0.3.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/dist/index.d.ts +1304 -11
- package/dist/index.js +47 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -141,6 +141,24 @@ interface paths {
|
|
|
141
141
|
"application/json": components["schemas"]["CatalogAccessResponse"];
|
|
142
142
|
};
|
|
143
143
|
};
|
|
144
|
+
/** @description Authentication required */
|
|
145
|
+
401: {
|
|
146
|
+
headers: {
|
|
147
|
+
[name: string]: unknown;
|
|
148
|
+
};
|
|
149
|
+
content: {
|
|
150
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
/** @description Insufficient entitlement (plan or role) */
|
|
154
|
+
403: {
|
|
155
|
+
headers: {
|
|
156
|
+
[name: string]: unknown;
|
|
157
|
+
};
|
|
158
|
+
content: {
|
|
159
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
160
|
+
};
|
|
161
|
+
};
|
|
144
162
|
};
|
|
145
163
|
};
|
|
146
164
|
put?: never;
|
|
@@ -160,7 +178,7 @@ interface paths {
|
|
|
160
178
|
};
|
|
161
179
|
/**
|
|
162
180
|
* List public catalog coffees
|
|
163
|
-
* @description Public catalog listing. Excludes wholesale-restricted rows and returns only public fields. API-key callers are capped to their plan's per-call row limit.
|
|
181
|
+
* @description Public catalog listing. Excludes wholesale-restricted rows and returns only public fields. API-key callers are capped to their plan's per-call row limit. Requesting entitlement-gated params (price/score ranges, process facets, advanced sorts) you are not entitled to is handled per PADR-0013 §7: strict callers (API keys, bearer-session JWTs) receive a 401/403; lenient callers (anonymous, first-party web) get the params stripped with a `meta.notices` entry. Send `Prefer: handling=strict` to opt into strict enforcement; `Prefer: handling=lenient` is honored only for callers already lenient-eligible and cannot downgrade a strict caller's enforcement.
|
|
164
182
|
*/
|
|
165
183
|
get: {
|
|
166
184
|
parameters: {
|
|
@@ -170,8 +188,40 @@ interface paths {
|
|
|
170
188
|
stocked?: "true" | "false" | "all";
|
|
171
189
|
sort?: string;
|
|
172
190
|
order?: "asc" | "desc";
|
|
191
|
+
showWholesale?: "true" | "false";
|
|
192
|
+
wholesaleOnly?: "true" | "false";
|
|
193
|
+
origin?: string;
|
|
194
|
+
continent?: string;
|
|
195
|
+
country?: string | string[];
|
|
196
|
+
region?: string;
|
|
197
|
+
source?: string | string[];
|
|
198
|
+
name?: string;
|
|
199
|
+
processing?: string;
|
|
200
|
+
variety?: string;
|
|
201
|
+
type?: string;
|
|
202
|
+
grade?: string;
|
|
203
|
+
appearance?: string;
|
|
204
|
+
supplier?: string;
|
|
205
|
+
dryingMethod?: string;
|
|
206
|
+
flavorKeywords?: string | string[];
|
|
207
|
+
arrivalDate?: string;
|
|
208
|
+
stockedDate?: string;
|
|
209
|
+
stockedDays?: number;
|
|
210
|
+
coffeeIds?: string;
|
|
211
|
+
scoreValueMin?: number | null;
|
|
212
|
+
scoreValueMax?: number | null;
|
|
213
|
+
pricePerLbMin?: number | null;
|
|
214
|
+
pricePerLbMax?: number | null;
|
|
215
|
+
processing_base_method?: string;
|
|
216
|
+
fermentation_type?: string;
|
|
217
|
+
process_additive?: string;
|
|
218
|
+
has_additives?: "true" | "false";
|
|
219
|
+
processing_disclosure_level?: string;
|
|
220
|
+
processing_confidence_min?: number | null;
|
|
221
|
+
};
|
|
222
|
+
header?: {
|
|
223
|
+
Prefer?: string;
|
|
173
224
|
};
|
|
174
|
-
header?: never;
|
|
175
225
|
path?: never;
|
|
176
226
|
cookie?: never;
|
|
177
227
|
};
|
|
@@ -186,6 +236,175 @@ interface paths {
|
|
|
186
236
|
"application/json": components["schemas"]["CatalogListResponse"];
|
|
187
237
|
};
|
|
188
238
|
};
|
|
239
|
+
/** @description Authentication required */
|
|
240
|
+
401: {
|
|
241
|
+
headers: {
|
|
242
|
+
[name: string]: unknown;
|
|
243
|
+
};
|
|
244
|
+
content: {
|
|
245
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
/** @description Insufficient entitlement (plan or role) */
|
|
249
|
+
403: {
|
|
250
|
+
headers: {
|
|
251
|
+
[name: string]: unknown;
|
|
252
|
+
};
|
|
253
|
+
content: {
|
|
254
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
put?: never;
|
|
260
|
+
post?: never;
|
|
261
|
+
delete?: never;
|
|
262
|
+
options?: never;
|
|
263
|
+
head?: never;
|
|
264
|
+
patch?: never;
|
|
265
|
+
trace?: never;
|
|
266
|
+
};
|
|
267
|
+
"/v1/catalog/facets": {
|
|
268
|
+
parameters: {
|
|
269
|
+
query?: never;
|
|
270
|
+
header?: never;
|
|
271
|
+
path?: never;
|
|
272
|
+
cookie?: never;
|
|
273
|
+
};
|
|
274
|
+
/**
|
|
275
|
+
* Catalog filter metadata and counted facets
|
|
276
|
+
* @description Returns access-aware catalog filter metadata. Values are computed after visibility and entitled content filters are applied; premium process metadata is included only for member sessions and paid API tiers. Requesting entitlement-gated filters you are not entitled to is handled per PADR-0013 §7: strict callers (API keys, bearer-session JWTs) receive a 401/403; lenient callers (anonymous, first-party web) get the filters stripped with a `meta.notices` entry. Send `Prefer: handling=strict` to opt into strict enforcement; `Prefer: handling=lenient` is honored only for callers already lenient-eligible and cannot downgrade a strict caller's enforcement.
|
|
277
|
+
*/
|
|
278
|
+
get: {
|
|
279
|
+
parameters: {
|
|
280
|
+
query?: {
|
|
281
|
+
stocked?: "true" | "false" | "all";
|
|
282
|
+
showWholesale?: "true" | "false";
|
|
283
|
+
wholesaleOnly?: "true" | "false";
|
|
284
|
+
origin?: string;
|
|
285
|
+
continent?: string;
|
|
286
|
+
country?: string | string[];
|
|
287
|
+
region?: string;
|
|
288
|
+
source?: string | string[];
|
|
289
|
+
name?: string;
|
|
290
|
+
processing?: string;
|
|
291
|
+
variety?: string;
|
|
292
|
+
type?: string;
|
|
293
|
+
grade?: string;
|
|
294
|
+
appearance?: string;
|
|
295
|
+
supplier?: string;
|
|
296
|
+
dryingMethod?: string;
|
|
297
|
+
flavorKeywords?: string | string[];
|
|
298
|
+
arrivalDate?: string;
|
|
299
|
+
stockedDate?: string;
|
|
300
|
+
stockedDays?: number;
|
|
301
|
+
coffeeIds?: string | string[];
|
|
302
|
+
scoreValueMin?: number | null;
|
|
303
|
+
scoreValueMax?: number | null;
|
|
304
|
+
pricePerLbMin?: number | null;
|
|
305
|
+
pricePerLbMax?: number | null;
|
|
306
|
+
processing_base_method?: string;
|
|
307
|
+
fermentation_type?: string;
|
|
308
|
+
process_additive?: string;
|
|
309
|
+
has_additives?: "true" | "false";
|
|
310
|
+
processing_disclosure_level?: string;
|
|
311
|
+
processing_confidence_min?: number | null;
|
|
312
|
+
};
|
|
313
|
+
header?: {
|
|
314
|
+
Prefer?: string;
|
|
315
|
+
};
|
|
316
|
+
path?: never;
|
|
317
|
+
cookie?: never;
|
|
318
|
+
};
|
|
319
|
+
requestBody?: never;
|
|
320
|
+
responses: {
|
|
321
|
+
/** @description Access-aware catalog filter metadata */
|
|
322
|
+
200: {
|
|
323
|
+
headers: {
|
|
324
|
+
[name: string]: unknown;
|
|
325
|
+
};
|
|
326
|
+
content: {
|
|
327
|
+
"application/json": components["schemas"]["CatalogFacetsResponse"];
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
/** @description Authentication required */
|
|
331
|
+
401: {
|
|
332
|
+
headers: {
|
|
333
|
+
[name: string]: unknown;
|
|
334
|
+
};
|
|
335
|
+
content: {
|
|
336
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
337
|
+
};
|
|
338
|
+
};
|
|
339
|
+
/** @description Insufficient entitlement (plan or role) */
|
|
340
|
+
403: {
|
|
341
|
+
headers: {
|
|
342
|
+
[name: string]: unknown;
|
|
343
|
+
};
|
|
344
|
+
content: {
|
|
345
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
put?: never;
|
|
351
|
+
post?: never;
|
|
352
|
+
delete?: never;
|
|
353
|
+
options?: never;
|
|
354
|
+
head?: never;
|
|
355
|
+
patch?: never;
|
|
356
|
+
trace?: never;
|
|
357
|
+
};
|
|
358
|
+
"/v1/catalog/origin-price-stats": {
|
|
359
|
+
parameters: {
|
|
360
|
+
query?: never;
|
|
361
|
+
header?: never;
|
|
362
|
+
path?: never;
|
|
363
|
+
cookie?: never;
|
|
364
|
+
};
|
|
365
|
+
/**
|
|
366
|
+
* Live catalog price context by origin
|
|
367
|
+
* @description Returns per-origin live catalog price percentiles over the caller-visible stocked catalog. Used by first-party surfaces to compare a lot's visible display price against origin peers.
|
|
368
|
+
*/
|
|
369
|
+
get: {
|
|
370
|
+
parameters: {
|
|
371
|
+
query?: {
|
|
372
|
+
showWholesale?: "true" | "false";
|
|
373
|
+
wholesaleOnly?: "true" | "false";
|
|
374
|
+
};
|
|
375
|
+
header?: never;
|
|
376
|
+
path?: never;
|
|
377
|
+
cookie?: never;
|
|
378
|
+
};
|
|
379
|
+
requestBody?: never;
|
|
380
|
+
responses: {
|
|
381
|
+
/** @description Per-origin price context for caller-visible catalog rows */
|
|
382
|
+
200: {
|
|
383
|
+
headers: {
|
|
384
|
+
[name: string]: unknown;
|
|
385
|
+
};
|
|
386
|
+
content: {
|
|
387
|
+
"application/json": components["schemas"]["CatalogOriginPriceStatsResponse"];
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
/** @description Authentication required */
|
|
391
|
+
401: {
|
|
392
|
+
headers: {
|
|
393
|
+
[name: string]: unknown;
|
|
394
|
+
};
|
|
395
|
+
content: {
|
|
396
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
397
|
+
};
|
|
398
|
+
};
|
|
399
|
+
/** @description Insufficient entitlement (plan or role) */
|
|
400
|
+
403: {
|
|
401
|
+
headers: {
|
|
402
|
+
[name: string]: unknown;
|
|
403
|
+
};
|
|
404
|
+
content: {
|
|
405
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
406
|
+
};
|
|
407
|
+
};
|
|
189
408
|
};
|
|
190
409
|
};
|
|
191
410
|
put?: never;
|
|
@@ -225,6 +444,24 @@ interface paths {
|
|
|
225
444
|
"application/json": components["schemas"]["CatalogProofCoverageResponse"];
|
|
226
445
|
};
|
|
227
446
|
};
|
|
447
|
+
/** @description Authentication required */
|
|
448
|
+
401: {
|
|
449
|
+
headers: {
|
|
450
|
+
[name: string]: unknown;
|
|
451
|
+
};
|
|
452
|
+
content: {
|
|
453
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
454
|
+
};
|
|
455
|
+
};
|
|
456
|
+
/** @description Insufficient entitlement (plan or role) */
|
|
457
|
+
403: {
|
|
458
|
+
headers: {
|
|
459
|
+
[name: string]: unknown;
|
|
460
|
+
};
|
|
461
|
+
content: {
|
|
462
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
463
|
+
};
|
|
464
|
+
};
|
|
228
465
|
};
|
|
229
466
|
};
|
|
230
467
|
put?: never;
|
|
@@ -697,6 +934,12 @@ interface components {
|
|
|
697
934
|
canExport: boolean;
|
|
698
935
|
};
|
|
699
936
|
};
|
|
937
|
+
ErrorResponse: {
|
|
938
|
+
error: {
|
|
939
|
+
code: string;
|
|
940
|
+
message: string;
|
|
941
|
+
};
|
|
942
|
+
};
|
|
700
943
|
CatalogItem: {
|
|
701
944
|
id: number;
|
|
702
945
|
name?: string | null;
|
|
@@ -712,9 +955,41 @@ interface components {
|
|
|
712
955
|
score_value?: number | null;
|
|
713
956
|
cost_lb?: number | null;
|
|
714
957
|
price_per_lb?: number | null;
|
|
958
|
+
price_tiers?: unknown;
|
|
715
959
|
arrival_date?: string | null;
|
|
716
960
|
stocked_date?: string | null;
|
|
717
961
|
stocked?: boolean | null;
|
|
962
|
+
wholesale?: boolean | null;
|
|
963
|
+
public_coffee?: boolean | null;
|
|
964
|
+
purveyor_score?: number | null;
|
|
965
|
+
purveyor_score_confidence?: number | null;
|
|
966
|
+
purveyor_score_tier?: string | null;
|
|
967
|
+
purveyor_score_factors?: unknown;
|
|
968
|
+
purveyor_score_version?: string | null;
|
|
969
|
+
purveyor_score_updated_at?: string | null;
|
|
970
|
+
processing_base_method?: string | null;
|
|
971
|
+
fermentation_type?: string | null;
|
|
972
|
+
process_additives?: unknown;
|
|
973
|
+
process_additive_detail?: string | null;
|
|
974
|
+
fermentation_duration_hours?: number | null;
|
|
975
|
+
processing_notes?: string | null;
|
|
976
|
+
processing_disclosure_level?: string | null;
|
|
977
|
+
processing_confidence?: number | null;
|
|
978
|
+
processing_evidence_available?: boolean | null;
|
|
979
|
+
drying_method?: string | null;
|
|
980
|
+
farm_notes?: string | null;
|
|
981
|
+
description_short?: string | null;
|
|
982
|
+
description_long?: string | null;
|
|
983
|
+
cupping_notes?: string | null;
|
|
984
|
+
roast_recs?: string | null;
|
|
985
|
+
lot_size?: string | null;
|
|
986
|
+
bag_size?: string | null;
|
|
987
|
+
packaging?: string | null;
|
|
988
|
+
link?: string | null;
|
|
989
|
+
last_updated?: string | null;
|
|
990
|
+
unstocked_date?: string | null;
|
|
991
|
+
ai_description?: string | null;
|
|
992
|
+
ai_tasting_notes?: unknown;
|
|
718
993
|
};
|
|
719
994
|
CatalogListResponse: {
|
|
720
995
|
data: components["schemas"]["CatalogItem"][];
|
|
@@ -743,10 +1018,174 @@ interface components {
|
|
|
743
1018
|
};
|
|
744
1019
|
access: {
|
|
745
1020
|
publicOnly: boolean;
|
|
1021
|
+
showWholesale: boolean;
|
|
1022
|
+
wholesaleOnly: boolean;
|
|
746
1023
|
rowLimit: number | null;
|
|
747
1024
|
limited: boolean;
|
|
748
1025
|
totalAvailable: number;
|
|
749
1026
|
};
|
|
1027
|
+
/** @description Present only when requested filters/sorts were stripped because the caller lacked the capability. The request still returns 200 with the entitled subset applied. */
|
|
1028
|
+
notices?: {
|
|
1029
|
+
status: 401 | 403;
|
|
1030
|
+
/** @enum {string} */
|
|
1031
|
+
code: "auth_required" | "entitlement_required";
|
|
1032
|
+
message: string;
|
|
1033
|
+
deniedParams: string[];
|
|
1034
|
+
}[];
|
|
1035
|
+
};
|
|
1036
|
+
};
|
|
1037
|
+
CatalogFacetsResponse: {
|
|
1038
|
+
/** @description Compatibility-friendly unique values for dropdown filters. Keys with no values are omitted. */
|
|
1039
|
+
values: {
|
|
1040
|
+
sources?: string[];
|
|
1041
|
+
continents?: string[];
|
|
1042
|
+
countries?: string[];
|
|
1043
|
+
regions?: string[];
|
|
1044
|
+
processing?: string[];
|
|
1045
|
+
cultivar_detail?: string[];
|
|
1046
|
+
type?: string[];
|
|
1047
|
+
grade?: string[];
|
|
1048
|
+
appearance?: string[];
|
|
1049
|
+
arrivalDates?: string[];
|
|
1050
|
+
drying_method?: string[];
|
|
1051
|
+
wholesale?: string[];
|
|
1052
|
+
processing_base_method?: string[];
|
|
1053
|
+
fermentation_type?: string[];
|
|
1054
|
+
process_additives?: string[];
|
|
1055
|
+
processing_disclosure_level?: string[];
|
|
1056
|
+
};
|
|
1057
|
+
/** @description Counted facet values for CLI/agent use. Counts are computed after visibility and entitled query filters are applied. */
|
|
1058
|
+
facets: {
|
|
1059
|
+
sources?: {
|
|
1060
|
+
value: string;
|
|
1061
|
+
count: number;
|
|
1062
|
+
}[];
|
|
1063
|
+
continents?: {
|
|
1064
|
+
value: string;
|
|
1065
|
+
count: number;
|
|
1066
|
+
}[];
|
|
1067
|
+
countries?: {
|
|
1068
|
+
value: string;
|
|
1069
|
+
count: number;
|
|
1070
|
+
}[];
|
|
1071
|
+
regions?: {
|
|
1072
|
+
value: string;
|
|
1073
|
+
count: number;
|
|
1074
|
+
}[];
|
|
1075
|
+
processing?: {
|
|
1076
|
+
value: string;
|
|
1077
|
+
count: number;
|
|
1078
|
+
}[];
|
|
1079
|
+
cultivar_detail?: {
|
|
1080
|
+
value: string;
|
|
1081
|
+
count: number;
|
|
1082
|
+
}[];
|
|
1083
|
+
type?: {
|
|
1084
|
+
value: string;
|
|
1085
|
+
count: number;
|
|
1086
|
+
}[];
|
|
1087
|
+
grade?: {
|
|
1088
|
+
value: string;
|
|
1089
|
+
count: number;
|
|
1090
|
+
}[];
|
|
1091
|
+
appearance?: {
|
|
1092
|
+
value: string;
|
|
1093
|
+
count: number;
|
|
1094
|
+
}[];
|
|
1095
|
+
arrivalDates?: {
|
|
1096
|
+
value: string;
|
|
1097
|
+
count: number;
|
|
1098
|
+
}[];
|
|
1099
|
+
drying_method?: {
|
|
1100
|
+
value: string;
|
|
1101
|
+
count: number;
|
|
1102
|
+
}[];
|
|
1103
|
+
wholesale?: {
|
|
1104
|
+
value: string;
|
|
1105
|
+
count: number;
|
|
1106
|
+
}[];
|
|
1107
|
+
processing_base_method?: {
|
|
1108
|
+
value: string;
|
|
1109
|
+
count: number;
|
|
1110
|
+
}[];
|
|
1111
|
+
fermentation_type?: {
|
|
1112
|
+
value: string;
|
|
1113
|
+
count: number;
|
|
1114
|
+
}[];
|
|
1115
|
+
process_additives?: {
|
|
1116
|
+
value: string;
|
|
1117
|
+
count: number;
|
|
1118
|
+
}[];
|
|
1119
|
+
processing_disclosure_level?: {
|
|
1120
|
+
value: string;
|
|
1121
|
+
count: number;
|
|
1122
|
+
}[];
|
|
1123
|
+
};
|
|
1124
|
+
meta: {
|
|
1125
|
+
/** @enum {string} */
|
|
1126
|
+
resource: "catalog-facets";
|
|
1127
|
+
/** @enum {string} */
|
|
1128
|
+
namespace: "/v1/catalog/facets";
|
|
1129
|
+
/** @enum {string} */
|
|
1130
|
+
version: "v1";
|
|
1131
|
+
auth: {
|
|
1132
|
+
/** @enum {string} */
|
|
1133
|
+
kind: "session" | "api-key";
|
|
1134
|
+
/** @enum {string|null} */
|
|
1135
|
+
role: "viewer" | "member" | "admin" | null;
|
|
1136
|
+
/** @enum {string|null} */
|
|
1137
|
+
apiPlan: "viewer" | "member" | "enterprise" | null;
|
|
1138
|
+
};
|
|
1139
|
+
access: {
|
|
1140
|
+
publicOnly: boolean;
|
|
1141
|
+
showWholesale: boolean;
|
|
1142
|
+
wholesaleOnly: boolean;
|
|
1143
|
+
stocked: boolean | null;
|
|
1144
|
+
premiumMetadata: boolean;
|
|
1145
|
+
};
|
|
1146
|
+
notices?: {
|
|
1147
|
+
status: 401 | 403;
|
|
1148
|
+
/** @enum {string} */
|
|
1149
|
+
code: "auth_required" | "entitlement_required";
|
|
1150
|
+
message: string;
|
|
1151
|
+
deniedParams: string[];
|
|
1152
|
+
}[];
|
|
1153
|
+
};
|
|
1154
|
+
};
|
|
1155
|
+
CatalogOriginPriceStatsResponse: {
|
|
1156
|
+
originPriceStats: {
|
|
1157
|
+
origin: string;
|
|
1158
|
+
median: number;
|
|
1159
|
+
q1: number;
|
|
1160
|
+
q3: number;
|
|
1161
|
+
min: number;
|
|
1162
|
+
max: number;
|
|
1163
|
+
sample_size: number;
|
|
1164
|
+
supplier_count: number;
|
|
1165
|
+
}[];
|
|
1166
|
+
meta: {
|
|
1167
|
+
/** @enum {string} */
|
|
1168
|
+
resource: "catalog-origin-price-stats";
|
|
1169
|
+
/** @enum {string} */
|
|
1170
|
+
namespace: "/v1/catalog/origin-price-stats";
|
|
1171
|
+
/** @enum {string} */
|
|
1172
|
+
version: "v1";
|
|
1173
|
+
auth: {
|
|
1174
|
+
/** @enum {string} */
|
|
1175
|
+
kind: "anonymous" | "session" | "api-key";
|
|
1176
|
+
/** @enum {string|null} */
|
|
1177
|
+
role: "viewer" | "member" | "admin" | null;
|
|
1178
|
+
/** @enum {string|null} */
|
|
1179
|
+
apiPlan: "viewer" | "member" | "enterprise" | null;
|
|
1180
|
+
};
|
|
1181
|
+
access: {
|
|
1182
|
+
publicOnly: boolean;
|
|
1183
|
+
showWholesale: boolean;
|
|
1184
|
+
wholesaleOnly: boolean;
|
|
1185
|
+
/** @enum {string} */
|
|
1186
|
+
scope: "retail" | "wholesale" | "all";
|
|
1187
|
+
totalAvailable: number;
|
|
1188
|
+
};
|
|
750
1189
|
};
|
|
751
1190
|
};
|
|
752
1191
|
CatalogProofCoverageResponse: {
|
|
@@ -866,12 +1305,6 @@ interface components {
|
|
|
866
1305
|
};
|
|
867
1306
|
};
|
|
868
1307
|
};
|
|
869
|
-
ErrorResponse: {
|
|
870
|
-
error: {
|
|
871
|
-
code: string;
|
|
872
|
-
message: string;
|
|
873
|
-
};
|
|
874
|
-
};
|
|
875
1308
|
CatalogSimilarityTarget: {
|
|
876
1309
|
id: number;
|
|
877
1310
|
name: string;
|
|
@@ -1241,12 +1674,36 @@ interface ParchmentClientOptions {
|
|
|
1241
1674
|
/** Override the fetch implementation (useful for tests or custom runtimes). */
|
|
1242
1675
|
fetch?: ClientOptions["fetch"];
|
|
1243
1676
|
}
|
|
1677
|
+
/** Query parameters for {@link ParchmentClient.catalog.list}. */
|
|
1678
|
+
type CatalogListQuery = NonNullable<paths["/v1/catalog"]["get"]["parameters"]["query"]>;
|
|
1679
|
+
/** Query parameters for {@link ParchmentClient.catalog.facets}. */
|
|
1680
|
+
type CatalogFacetsQuery = NonNullable<paths["/v1/catalog/facets"]["get"]["parameters"]["query"]>;
|
|
1681
|
+
/**
|
|
1682
|
+
* Optional headers for {@link ParchmentClient.catalog.list}, notably the
|
|
1683
|
+
* RFC 7240 `Prefer: handling=lenient|strict` override (PADR-0013 §7). Sending
|
|
1684
|
+
* `handling=lenient` opts a strict caller (API key or bearer-session JWT) back
|
|
1685
|
+
* into strip-with-notice degradation instead of a 401/403 hard-deny.
|
|
1686
|
+
*/
|
|
1687
|
+
type CatalogListHeaders = NonNullable<paths["/v1/catalog"]["get"]["parameters"]["header"]>;
|
|
1688
|
+
/** Optional headers for {@link ParchmentClient.catalog.facets}; see {@link CatalogListHeaders}. */
|
|
1689
|
+
type CatalogFacetsHeaders = NonNullable<paths["/v1/catalog/facets"]["get"]["parameters"]["header"]>;
|
|
1690
|
+
/** Query parameters for {@link ParchmentClient.catalog.originPriceStats}. */
|
|
1691
|
+
type CatalogOriginPriceStatsQuery = NonNullable<paths["/v1/catalog/origin-price-stats"]["get"]["parameters"]["query"]>;
|
|
1692
|
+
/** Query parameters for {@link ParchmentClient.catalog.similar}. */
|
|
1693
|
+
type CatalogSimilarQuery = NonNullable<paths["/v1/catalog/{id}/similar"]["get"]["parameters"]["query"]>;
|
|
1694
|
+
/** Query parameters for {@link ParchmentClient.priceIndex.list}. */
|
|
1695
|
+
type PriceIndexQuery = NonNullable<paths["/v1/price-index"]["get"]["parameters"]["query"]>;
|
|
1696
|
+
/** Query parameters for {@link ParchmentClient.procurement.briefs.matches}. */
|
|
1697
|
+
type BriefMatchesQuery = NonNullable<paths["/v1/procurement/briefs/{id}/matches"]["get"]["parameters"]["query"]>;
|
|
1698
|
+
/** Request body for {@link ParchmentClient.procurement.briefs.create}. */
|
|
1699
|
+
type SourcingBriefCreateRequest = components["schemas"]["SourcingBriefCreateRequest"];
|
|
1244
1700
|
/**
|
|
1245
1701
|
* Create a typed Parchment API client.
|
|
1246
1702
|
*
|
|
1247
1703
|
* The generated core (openapi-fetch over the generated `paths` types) is the
|
|
1248
|
-
* contract truth; the
|
|
1249
|
-
*
|
|
1704
|
+
* contract truth; the named helpers below are the hand-maintained ergonomic
|
|
1705
|
+
* layer and grow as endpoints land. `raw` always exposes the underlying typed
|
|
1706
|
+
* client for direct path access to anything not yet wrapped.
|
|
1250
1707
|
*/
|
|
1251
1708
|
declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
1252
1709
|
/** The underlying typed openapi-fetch client for direct path access. */
|
|
@@ -1289,7 +1746,843 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
1289
1746
|
};
|
|
1290
1747
|
};
|
|
1291
1748
|
}> | undefined, `${string}/${string}`>>;
|
|
1749
|
+
/** Resolved principal and entitlements for the caller. */
|
|
1750
|
+
me: () => Promise<openapi_fetch.FetchResponse<{
|
|
1751
|
+
parameters: {
|
|
1752
|
+
query?: never;
|
|
1753
|
+
header?: never;
|
|
1754
|
+
path?: never;
|
|
1755
|
+
cookie?: never;
|
|
1756
|
+
};
|
|
1757
|
+
requestBody?: never;
|
|
1758
|
+
responses: {
|
|
1759
|
+
200: {
|
|
1760
|
+
headers: {
|
|
1761
|
+
[name: string]: unknown;
|
|
1762
|
+
};
|
|
1763
|
+
content: {
|
|
1764
|
+
"application/json": components["schemas"]["MeResponse"];
|
|
1765
|
+
};
|
|
1766
|
+
};
|
|
1767
|
+
};
|
|
1768
|
+
}, openapi_fetch.FetchOptions<{
|
|
1769
|
+
parameters: {
|
|
1770
|
+
query?: never;
|
|
1771
|
+
header?: never;
|
|
1772
|
+
path?: never;
|
|
1773
|
+
cookie?: never;
|
|
1774
|
+
};
|
|
1775
|
+
requestBody?: never;
|
|
1776
|
+
responses: {
|
|
1777
|
+
200: {
|
|
1778
|
+
headers: {
|
|
1779
|
+
[name: string]: unknown;
|
|
1780
|
+
};
|
|
1781
|
+
content: {
|
|
1782
|
+
"application/json": components["schemas"]["MeResponse"];
|
|
1783
|
+
};
|
|
1784
|
+
};
|
|
1785
|
+
};
|
|
1786
|
+
}> | undefined, `${string}/${string}`>>;
|
|
1787
|
+
catalog: {
|
|
1788
|
+
/** Catalog capabilities and visibility for the caller. */
|
|
1789
|
+
access: () => Promise<openapi_fetch.FetchResponse<{
|
|
1790
|
+
parameters: {
|
|
1791
|
+
query?: never;
|
|
1792
|
+
header? /** Catalog capabilities and visibility for the caller. */: never;
|
|
1793
|
+
path?: never;
|
|
1794
|
+
cookie?: never;
|
|
1795
|
+
};
|
|
1796
|
+
requestBody?: never;
|
|
1797
|
+
responses: {
|
|
1798
|
+
200: {
|
|
1799
|
+
headers: {
|
|
1800
|
+
[name: string]: unknown;
|
|
1801
|
+
};
|
|
1802
|
+
content: {
|
|
1803
|
+
"application/json": components["schemas"]["CatalogAccessResponse"];
|
|
1804
|
+
};
|
|
1805
|
+
};
|
|
1806
|
+
401: {
|
|
1807
|
+
headers: {
|
|
1808
|
+
[name: string]: unknown;
|
|
1809
|
+
};
|
|
1810
|
+
content: {
|
|
1811
|
+
"application/json": components["schemas"] /** Live catalog price context by origin. */["ErrorResponse"];
|
|
1812
|
+
};
|
|
1813
|
+
};
|
|
1814
|
+
403: {
|
|
1815
|
+
headers: {
|
|
1816
|
+
[name: string]: unknown;
|
|
1817
|
+
};
|
|
1818
|
+
content: {
|
|
1819
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1820
|
+
};
|
|
1821
|
+
};
|
|
1822
|
+
};
|
|
1823
|
+
}, openapi_fetch.FetchOptions<{
|
|
1824
|
+
parameters: {
|
|
1825
|
+
query?: never;
|
|
1826
|
+
header? /** Catalog capabilities and visibility for the caller. */: never;
|
|
1827
|
+
path?: never;
|
|
1828
|
+
cookie?: never;
|
|
1829
|
+
};
|
|
1830
|
+
requestBody?: never;
|
|
1831
|
+
responses: {
|
|
1832
|
+
200: {
|
|
1833
|
+
headers: {
|
|
1834
|
+
[name: string]: unknown;
|
|
1835
|
+
};
|
|
1836
|
+
content: {
|
|
1837
|
+
"application/json": components["schemas"]["CatalogAccessResponse"];
|
|
1838
|
+
};
|
|
1839
|
+
};
|
|
1840
|
+
401: {
|
|
1841
|
+
headers: {
|
|
1842
|
+
[name: string]: unknown;
|
|
1843
|
+
};
|
|
1844
|
+
content: {
|
|
1845
|
+
"application/json": components["schemas"] /** Live catalog price context by origin. */["ErrorResponse"];
|
|
1846
|
+
};
|
|
1847
|
+
};
|
|
1848
|
+
403: {
|
|
1849
|
+
headers: {
|
|
1850
|
+
[name: string]: unknown;
|
|
1851
|
+
};
|
|
1852
|
+
content: {
|
|
1853
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1854
|
+
};
|
|
1855
|
+
};
|
|
1856
|
+
};
|
|
1857
|
+
}> | undefined, `${string}/${string}`>>;
|
|
1858
|
+
/**
|
|
1859
|
+
* List public catalog coffees (paginated). Pass `headers` to send the
|
|
1860
|
+
* `Prefer: handling=lenient|strict` override (see {@link CatalogListHeaders}).
|
|
1861
|
+
*/
|
|
1862
|
+
list: (query?: CatalogListQuery, headers?: CatalogListHeaders) => Promise<openapi_fetch.FetchResponse<{
|
|
1863
|
+
parameters: {
|
|
1864
|
+
query?: {
|
|
1865
|
+
page?: number;
|
|
1866
|
+
limit?: number;
|
|
1867
|
+
stocked?: "true" | "false" | "all";
|
|
1868
|
+
sort?: string;
|
|
1869
|
+
order?: "asc" | "desc";
|
|
1870
|
+
showWholesale?: "true" | "false";
|
|
1871
|
+
wholesaleOnly?: "true" | "false";
|
|
1872
|
+
origin?: string;
|
|
1873
|
+
continent?: string;
|
|
1874
|
+
country?: string | string[];
|
|
1875
|
+
region?: string;
|
|
1876
|
+
source?: string | string[];
|
|
1877
|
+
name?: string;
|
|
1878
|
+
processing?: string;
|
|
1879
|
+
variety?: string;
|
|
1880
|
+
type?: string;
|
|
1881
|
+
grade?: string;
|
|
1882
|
+
appearance?: string;
|
|
1883
|
+
supplier?: string;
|
|
1884
|
+
dryingMethod?: string;
|
|
1885
|
+
flavorKeywords?: string | string[];
|
|
1886
|
+
arrivalDate?: string;
|
|
1887
|
+
stockedDate?: string;
|
|
1888
|
+
stockedDays?: number;
|
|
1889
|
+
coffeeIds?: string;
|
|
1890
|
+
scoreValueMin?: number | null;
|
|
1891
|
+
scoreValueMax?: number | null;
|
|
1892
|
+
pricePerLbMin?: number | null;
|
|
1893
|
+
pricePerLbMax?: number | null;
|
|
1894
|
+
processing_base_method?: string;
|
|
1895
|
+
fermentation_type?: string;
|
|
1896
|
+
process_additive?: string;
|
|
1897
|
+
has_additives?: "true" | "false";
|
|
1898
|
+
processing_disclosure_level?: string;
|
|
1899
|
+
processing_confidence_min?: number | null;
|
|
1900
|
+
};
|
|
1901
|
+
header?: {
|
|
1902
|
+
Prefer?: string;
|
|
1903
|
+
};
|
|
1904
|
+
path?: never;
|
|
1905
|
+
cookie?: never;
|
|
1906
|
+
};
|
|
1907
|
+
requestBody?: never;
|
|
1908
|
+
responses: {
|
|
1909
|
+
200: {
|
|
1910
|
+
headers: {
|
|
1911
|
+
[name: string]: unknown;
|
|
1912
|
+
};
|
|
1913
|
+
content: {
|
|
1914
|
+
"application/json": components["schemas"]["CatalogListResponse"];
|
|
1915
|
+
};
|
|
1916
|
+
};
|
|
1917
|
+
401: {
|
|
1918
|
+
headers: {
|
|
1919
|
+
[name: string]: unknown;
|
|
1920
|
+
};
|
|
1921
|
+
content: {
|
|
1922
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1923
|
+
};
|
|
1924
|
+
};
|
|
1925
|
+
403: {
|
|
1926
|
+
headers: {
|
|
1927
|
+
[name: string]: unknown;
|
|
1928
|
+
};
|
|
1929
|
+
content: {
|
|
1930
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
1931
|
+
};
|
|
1932
|
+
};
|
|
1933
|
+
};
|
|
1934
|
+
}, {
|
|
1935
|
+
params: {
|
|
1936
|
+
query: {
|
|
1937
|
+
page?: number;
|
|
1938
|
+
limit?: number;
|
|
1939
|
+
stocked?: "true" | "false" | "all";
|
|
1940
|
+
sort?: string;
|
|
1941
|
+
order?: "asc" | "desc";
|
|
1942
|
+
showWholesale?: "true" | "false";
|
|
1943
|
+
wholesaleOnly?: "true" | "false";
|
|
1944
|
+
origin?: string;
|
|
1945
|
+
continent?: string;
|
|
1946
|
+
country?: string | string[];
|
|
1947
|
+
region?: string;
|
|
1948
|
+
source?: string | string[];
|
|
1949
|
+
name?: string;
|
|
1950
|
+
processing?: string;
|
|
1951
|
+
variety?: string;
|
|
1952
|
+
type?: string;
|
|
1953
|
+
grade?: string;
|
|
1954
|
+
appearance?: string;
|
|
1955
|
+
supplier?: string;
|
|
1956
|
+
dryingMethod?: string;
|
|
1957
|
+
flavorKeywords?: string | string[];
|
|
1958
|
+
arrivalDate?: string;
|
|
1959
|
+
stockedDate?: string;
|
|
1960
|
+
stockedDays?: number;
|
|
1961
|
+
coffeeIds?: string;
|
|
1962
|
+
scoreValueMin?: number | null;
|
|
1963
|
+
scoreValueMax?: number | null;
|
|
1964
|
+
pricePerLbMin?: number | null;
|
|
1965
|
+
pricePerLbMax?: number | null;
|
|
1966
|
+
processing_base_method?: string;
|
|
1967
|
+
fermentation_type?: string;
|
|
1968
|
+
process_additive?: string;
|
|
1969
|
+
has_additives?: "true" | "false";
|
|
1970
|
+
processing_disclosure_level?: string;
|
|
1971
|
+
processing_confidence_min?: number | null;
|
|
1972
|
+
} | undefined;
|
|
1973
|
+
header: {
|
|
1974
|
+
Prefer?: string;
|
|
1975
|
+
} | undefined;
|
|
1976
|
+
};
|
|
1977
|
+
}, `${string}/${string}`>>;
|
|
1978
|
+
/**
|
|
1979
|
+
* Catalog filter metadata and counted facets. Pass `headers` to send the
|
|
1980
|
+
* `Prefer: handling=lenient|strict` override (see {@link CatalogFacetsHeaders}).
|
|
1981
|
+
*/
|
|
1982
|
+
facets: (query?: CatalogFacetsQuery, headers?: CatalogFacetsHeaders) => Promise<openapi_fetch.FetchResponse<{
|
|
1983
|
+
parameters: {
|
|
1984
|
+
query?: {
|
|
1985
|
+
stocked?: "true" | "false" | "all";
|
|
1986
|
+
showWholesale?: "true" | "false";
|
|
1987
|
+
wholesaleOnly?: "true" | "false";
|
|
1988
|
+
origin?: string;
|
|
1989
|
+
continent?: string;
|
|
1990
|
+
country?: string | string[];
|
|
1991
|
+
region?: string;
|
|
1992
|
+
source?: string | string[];
|
|
1993
|
+
name?: string;
|
|
1994
|
+
processing?: string;
|
|
1995
|
+
variety?: string;
|
|
1996
|
+
type?: string;
|
|
1997
|
+
grade?: string;
|
|
1998
|
+
appearance?: string;
|
|
1999
|
+
supplier?: string;
|
|
2000
|
+
dryingMethod?: string;
|
|
2001
|
+
flavorKeywords?: string | string[];
|
|
2002
|
+
arrivalDate?: string;
|
|
2003
|
+
stockedDate?: string;
|
|
2004
|
+
stockedDays?: number;
|
|
2005
|
+
coffeeIds?: string | string[];
|
|
2006
|
+
scoreValueMin?: number | null;
|
|
2007
|
+
scoreValueMax?: number | null;
|
|
2008
|
+
pricePerLbMin?: number | null;
|
|
2009
|
+
pricePerLbMax?: number | null;
|
|
2010
|
+
processing_base_method?: string;
|
|
2011
|
+
fermentation_type?: string;
|
|
2012
|
+
process_additive?: string;
|
|
2013
|
+
has_additives?: "true" | "false";
|
|
2014
|
+
processing_disclosure_level?: string;
|
|
2015
|
+
processing_confidence_min?: number | null;
|
|
2016
|
+
};
|
|
2017
|
+
header?: {
|
|
2018
|
+
Prefer?: string;
|
|
2019
|
+
};
|
|
2020
|
+
path?: never;
|
|
2021
|
+
cookie?: never;
|
|
2022
|
+
};
|
|
2023
|
+
requestBody?: never;
|
|
2024
|
+
responses: {
|
|
2025
|
+
200: {
|
|
2026
|
+
headers: {
|
|
2027
|
+
[name: string]: unknown;
|
|
2028
|
+
};
|
|
2029
|
+
content: {
|
|
2030
|
+
"application/json": components["schemas"]["CatalogFacetsResponse"];
|
|
2031
|
+
};
|
|
2032
|
+
};
|
|
2033
|
+
401: {
|
|
2034
|
+
headers: {
|
|
2035
|
+
[name: string]: unknown;
|
|
2036
|
+
};
|
|
2037
|
+
content: {
|
|
2038
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2039
|
+
};
|
|
2040
|
+
};
|
|
2041
|
+
403: {
|
|
2042
|
+
headers: {
|
|
2043
|
+
[name: string]: unknown;
|
|
2044
|
+
};
|
|
2045
|
+
content: {
|
|
2046
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2047
|
+
};
|
|
2048
|
+
};
|
|
2049
|
+
};
|
|
2050
|
+
}, {
|
|
2051
|
+
params: {
|
|
2052
|
+
query: {
|
|
2053
|
+
stocked?: "true" | "false" | "all";
|
|
2054
|
+
showWholesale?: "true" | "false";
|
|
2055
|
+
wholesaleOnly?: "true" | "false";
|
|
2056
|
+
origin?: string;
|
|
2057
|
+
continent?: string;
|
|
2058
|
+
country?: string | string[];
|
|
2059
|
+
region?: string;
|
|
2060
|
+
source?: string | string[];
|
|
2061
|
+
name?: string;
|
|
2062
|
+
processing?: string;
|
|
2063
|
+
variety?: string;
|
|
2064
|
+
type?: string;
|
|
2065
|
+
grade?: string;
|
|
2066
|
+
appearance?: string;
|
|
2067
|
+
supplier?: string;
|
|
2068
|
+
dryingMethod?: string;
|
|
2069
|
+
flavorKeywords?: string | string[];
|
|
2070
|
+
arrivalDate?: string;
|
|
2071
|
+
stockedDate?: string;
|
|
2072
|
+
stockedDays?: number;
|
|
2073
|
+
coffeeIds?: string | string[];
|
|
2074
|
+
scoreValueMin?: number | null;
|
|
2075
|
+
scoreValueMax?: number | null;
|
|
2076
|
+
pricePerLbMin?: number | null;
|
|
2077
|
+
pricePerLbMax?: number | null;
|
|
2078
|
+
processing_base_method?: string;
|
|
2079
|
+
fermentation_type?: string;
|
|
2080
|
+
process_additive?: string;
|
|
2081
|
+
has_additives?: "true" | "false";
|
|
2082
|
+
processing_disclosure_level?: string;
|
|
2083
|
+
processing_confidence_min?: number | null;
|
|
2084
|
+
} | undefined;
|
|
2085
|
+
header: {
|
|
2086
|
+
Prefer?: string;
|
|
2087
|
+
} | undefined;
|
|
2088
|
+
};
|
|
2089
|
+
}, `${string}/${string}`>>;
|
|
2090
|
+
/** Live catalog price context by origin. */
|
|
2091
|
+
originPriceStats: (query?: CatalogOriginPriceStatsQuery) => Promise<openapi_fetch.FetchResponse<{
|
|
2092
|
+
parameters: {
|
|
2093
|
+
query?: {
|
|
2094
|
+
showWholesale?: "true" | "false";
|
|
2095
|
+
wholesaleOnly?: "true" | "false";
|
|
2096
|
+
};
|
|
2097
|
+
header?: never;
|
|
2098
|
+
path?: never;
|
|
2099
|
+
cookie?: never;
|
|
2100
|
+
};
|
|
2101
|
+
requestBody?: never;
|
|
2102
|
+
responses: {
|
|
2103
|
+
200: {
|
|
2104
|
+
headers: {
|
|
2105
|
+
[name: string]: unknown;
|
|
2106
|
+
};
|
|
2107
|
+
content: {
|
|
2108
|
+
"application/json": components["schemas"]["CatalogOriginPriceStatsResponse"];
|
|
2109
|
+
};
|
|
2110
|
+
};
|
|
2111
|
+
401: {
|
|
2112
|
+
headers: {
|
|
2113
|
+
[name: string]: unknown;
|
|
2114
|
+
};
|
|
2115
|
+
content: {
|
|
2116
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2117
|
+
};
|
|
2118
|
+
};
|
|
2119
|
+
403: {
|
|
2120
|
+
headers: {
|
|
2121
|
+
[name: string]: unknown;
|
|
2122
|
+
};
|
|
2123
|
+
content: {
|
|
2124
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2125
|
+
};
|
|
2126
|
+
};
|
|
2127
|
+
};
|
|
2128
|
+
}, {
|
|
2129
|
+
params: {
|
|
2130
|
+
query: {
|
|
2131
|
+
showWholesale?: "true" | "false";
|
|
2132
|
+
wholesaleOnly?: "true" | "false";
|
|
2133
|
+
} | undefined;
|
|
2134
|
+
};
|
|
2135
|
+
}, `${string}/${string}`>>;
|
|
2136
|
+
/** Aggregate proof-coverage over the public catalog. */
|
|
2137
|
+
proofCoverage: () => Promise<openapi_fetch.FetchResponse<{
|
|
2138
|
+
parameters: {
|
|
2139
|
+
query?: never;
|
|
2140
|
+
header?: never;
|
|
2141
|
+
path?: never;
|
|
2142
|
+
cookie?: never;
|
|
2143
|
+
};
|
|
2144
|
+
requestBody?: never;
|
|
2145
|
+
responses: {
|
|
2146
|
+
200: {
|
|
2147
|
+
headers: {
|
|
2148
|
+
[name: string]: unknown;
|
|
2149
|
+
};
|
|
2150
|
+
content: {
|
|
2151
|
+
"application/json": components["schemas"]["CatalogProofCoverageResponse"];
|
|
2152
|
+
};
|
|
2153
|
+
};
|
|
2154
|
+
401: {
|
|
2155
|
+
headers: {
|
|
2156
|
+
[name: string]: unknown;
|
|
2157
|
+
};
|
|
2158
|
+
content: {
|
|
2159
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2160
|
+
};
|
|
2161
|
+
};
|
|
2162
|
+
403: {
|
|
2163
|
+
headers: {
|
|
2164
|
+
[name: string]: unknown;
|
|
2165
|
+
};
|
|
2166
|
+
content: {
|
|
2167
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2168
|
+
};
|
|
2169
|
+
};
|
|
2170
|
+
};
|
|
2171
|
+
}, openapi_fetch.FetchOptions<{
|
|
2172
|
+
parameters: {
|
|
2173
|
+
query?: never;
|
|
2174
|
+
header?: never;
|
|
2175
|
+
path?: never;
|
|
2176
|
+
cookie?: never;
|
|
2177
|
+
};
|
|
2178
|
+
requestBody?: never;
|
|
2179
|
+
responses: {
|
|
2180
|
+
200: {
|
|
2181
|
+
headers: {
|
|
2182
|
+
[name: string]: unknown;
|
|
2183
|
+
};
|
|
2184
|
+
content: {
|
|
2185
|
+
"application/json": components["schemas"]["CatalogProofCoverageResponse"];
|
|
2186
|
+
};
|
|
2187
|
+
};
|
|
2188
|
+
401: {
|
|
2189
|
+
headers: {
|
|
2190
|
+
[name: string]: unknown;
|
|
2191
|
+
};
|
|
2192
|
+
content: {
|
|
2193
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2194
|
+
};
|
|
2195
|
+
};
|
|
2196
|
+
403: {
|
|
2197
|
+
headers: {
|
|
2198
|
+
[name: string]: unknown;
|
|
2199
|
+
};
|
|
2200
|
+
content: {
|
|
2201
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2202
|
+
};
|
|
2203
|
+
};
|
|
2204
|
+
};
|
|
2205
|
+
}> | undefined, `${string}/${string}`>>;
|
|
2206
|
+
/** Find catalog coffees similar to a target coffee. */
|
|
2207
|
+
similar: (id: string, query?: CatalogSimilarQuery) => Promise<openapi_fetch.FetchResponse<{
|
|
2208
|
+
parameters: {
|
|
2209
|
+
query?: {
|
|
2210
|
+
threshold?: string;
|
|
2211
|
+
limit?: number;
|
|
2212
|
+
stocked_only?: "true" | "false";
|
|
2213
|
+
mode?: "all" | "likely_same" | "similar_profile";
|
|
2214
|
+
};
|
|
2215
|
+
header?: never;
|
|
2216
|
+
path: {
|
|
2217
|
+
id: string;
|
|
2218
|
+
};
|
|
2219
|
+
cookie?: never;
|
|
2220
|
+
};
|
|
2221
|
+
requestBody?: never;
|
|
2222
|
+
responses: {
|
|
2223
|
+
200: {
|
|
2224
|
+
headers: {
|
|
2225
|
+
[name: string]: unknown;
|
|
2226
|
+
};
|
|
2227
|
+
content: {
|
|
2228
|
+
"application/json": components["schemas"]["CatalogSimilarityResponse"];
|
|
2229
|
+
};
|
|
2230
|
+
};
|
|
2231
|
+
400: {
|
|
2232
|
+
headers: {
|
|
2233
|
+
[name: string]: unknown;
|
|
2234
|
+
};
|
|
2235
|
+
content: {
|
|
2236
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2237
|
+
};
|
|
2238
|
+
};
|
|
2239
|
+
401: {
|
|
2240
|
+
headers: {
|
|
2241
|
+
[name: string]: unknown;
|
|
2242
|
+
};
|
|
2243
|
+
content: {
|
|
2244
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2245
|
+
};
|
|
2246
|
+
};
|
|
2247
|
+
403: {
|
|
2248
|
+
headers: {
|
|
2249
|
+
[name: string]: unknown;
|
|
2250
|
+
};
|
|
2251
|
+
content: {
|
|
2252
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2253
|
+
};
|
|
2254
|
+
};
|
|
2255
|
+
404: {
|
|
2256
|
+
headers: {
|
|
2257
|
+
[name: string]: unknown;
|
|
2258
|
+
};
|
|
2259
|
+
content: {
|
|
2260
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2261
|
+
};
|
|
2262
|
+
};
|
|
2263
|
+
};
|
|
2264
|
+
}, {
|
|
2265
|
+
params: {
|
|
2266
|
+
path: {
|
|
2267
|
+
id: string;
|
|
2268
|
+
};
|
|
2269
|
+
query: {
|
|
2270
|
+
threshold?: string;
|
|
2271
|
+
limit?: number;
|
|
2272
|
+
stocked_only?: "true" | "false";
|
|
2273
|
+
mode?: "all" | "likely_same" | "similar_profile";
|
|
2274
|
+
} | undefined;
|
|
2275
|
+
};
|
|
2276
|
+
}, `${string}/${string}`>>;
|
|
2277
|
+
};
|
|
2278
|
+
priceIndex: {
|
|
2279
|
+
/** Parchment Price Index (aggregate snapshots). */
|
|
2280
|
+
list: (query?: PriceIndexQuery) => Promise<openapi_fetch.FetchResponse<{
|
|
2281
|
+
parameters: {
|
|
2282
|
+
query?: {
|
|
2283
|
+
page?: number;
|
|
2284
|
+
limit?: number;
|
|
2285
|
+
origin?: string;
|
|
2286
|
+
process?: string;
|
|
2287
|
+
grade?: string;
|
|
2288
|
+
from?: string;
|
|
2289
|
+
to?: string;
|
|
2290
|
+
wholesale?: "true" | "false";
|
|
2291
|
+
};
|
|
2292
|
+
header?: never;
|
|
2293
|
+
path?: never;
|
|
2294
|
+
cookie?: never;
|
|
2295
|
+
};
|
|
2296
|
+
requestBody?: never;
|
|
2297
|
+
responses: {
|
|
2298
|
+
200: {
|
|
2299
|
+
headers: {
|
|
2300
|
+
[name: string]: unknown;
|
|
2301
|
+
};
|
|
2302
|
+
content: {
|
|
2303
|
+
"application/json": components["schemas"]["PriceIndexResponse"];
|
|
2304
|
+
};
|
|
2305
|
+
};
|
|
2306
|
+
401: {
|
|
2307
|
+
headers: {
|
|
2308
|
+
[name: string]: unknown;
|
|
2309
|
+
};
|
|
2310
|
+
content: {
|
|
2311
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2312
|
+
};
|
|
2313
|
+
};
|
|
2314
|
+
403: {
|
|
2315
|
+
headers: {
|
|
2316
|
+
[name: string]: unknown;
|
|
2317
|
+
};
|
|
2318
|
+
content: {
|
|
2319
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2320
|
+
};
|
|
2321
|
+
};
|
|
2322
|
+
};
|
|
2323
|
+
}, {
|
|
2324
|
+
params: {
|
|
2325
|
+
query: {
|
|
2326
|
+
page?: number;
|
|
2327
|
+
limit?: number;
|
|
2328
|
+
origin?: string;
|
|
2329
|
+
process?: string;
|
|
2330
|
+
grade?: string;
|
|
2331
|
+
from?: string;
|
|
2332
|
+
to?: string;
|
|
2333
|
+
wholesale?: "true" | "false";
|
|
2334
|
+
} | undefined;
|
|
2335
|
+
};
|
|
2336
|
+
}, `${string}/${string}`>>;
|
|
2337
|
+
};
|
|
2338
|
+
procurement: {
|
|
2339
|
+
briefs: {
|
|
2340
|
+
/** List the caller's saved sourcing briefs. */
|
|
2341
|
+
list: () => Promise<openapi_fetch.FetchResponse<{
|
|
2342
|
+
parameters: {
|
|
2343
|
+
query?: never;
|
|
2344
|
+
header?: never;
|
|
2345
|
+
path?: never;
|
|
2346
|
+
cookie?: never;
|
|
2347
|
+
};
|
|
2348
|
+
requestBody?: never;
|
|
2349
|
+
responses: {
|
|
2350
|
+
200: {
|
|
2351
|
+
headers: {
|
|
2352
|
+
[name: string]: unknown;
|
|
2353
|
+
};
|
|
2354
|
+
content: {
|
|
2355
|
+
"application/json": components["schemas"]["SourcingBriefsListResponse"];
|
|
2356
|
+
};
|
|
2357
|
+
};
|
|
2358
|
+
401: {
|
|
2359
|
+
headers: {
|
|
2360
|
+
[name: string]: unknown;
|
|
2361
|
+
};
|
|
2362
|
+
content: {
|
|
2363
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2364
|
+
};
|
|
2365
|
+
};
|
|
2366
|
+
403: {
|
|
2367
|
+
headers: {
|
|
2368
|
+
[name: string]: unknown;
|
|
2369
|
+
};
|
|
2370
|
+
content: {
|
|
2371
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2372
|
+
};
|
|
2373
|
+
};
|
|
2374
|
+
};
|
|
2375
|
+
}, openapi_fetch.FetchOptions<{
|
|
2376
|
+
parameters: {
|
|
2377
|
+
query?: never;
|
|
2378
|
+
header?: never;
|
|
2379
|
+
path?: never;
|
|
2380
|
+
cookie?: never;
|
|
2381
|
+
};
|
|
2382
|
+
requestBody?: never;
|
|
2383
|
+
responses: {
|
|
2384
|
+
200: {
|
|
2385
|
+
headers: {
|
|
2386
|
+
[name: string]: unknown;
|
|
2387
|
+
};
|
|
2388
|
+
content: {
|
|
2389
|
+
"application/json": components["schemas"]["SourcingBriefsListResponse"];
|
|
2390
|
+
};
|
|
2391
|
+
};
|
|
2392
|
+
401: {
|
|
2393
|
+
headers: {
|
|
2394
|
+
[name: string]: unknown;
|
|
2395
|
+
};
|
|
2396
|
+
content: {
|
|
2397
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2398
|
+
};
|
|
2399
|
+
};
|
|
2400
|
+
403: {
|
|
2401
|
+
headers: {
|
|
2402
|
+
[name: string]: unknown;
|
|
2403
|
+
};
|
|
2404
|
+
content: {
|
|
2405
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2406
|
+
};
|
|
2407
|
+
};
|
|
2408
|
+
};
|
|
2409
|
+
}> | undefined, `${string}/${string}`>>;
|
|
2410
|
+
/** Create a saved sourcing brief. */
|
|
2411
|
+
create: (body: SourcingBriefCreateRequest) => Promise<openapi_fetch.FetchResponse<{
|
|
2412
|
+
parameters: {
|
|
2413
|
+
query?: never;
|
|
2414
|
+
header?: never;
|
|
2415
|
+
path?: never;
|
|
2416
|
+
cookie?: never;
|
|
2417
|
+
};
|
|
2418
|
+
requestBody?: {
|
|
2419
|
+
content: {
|
|
2420
|
+
"application/json": components["schemas"]["SourcingBriefCreateRequest"];
|
|
2421
|
+
};
|
|
2422
|
+
};
|
|
2423
|
+
responses: {
|
|
2424
|
+
201: {
|
|
2425
|
+
headers: {
|
|
2426
|
+
[name: string]: unknown;
|
|
2427
|
+
};
|
|
2428
|
+
content: {
|
|
2429
|
+
"application/json": components["schemas"]["SourcingBriefResponse"];
|
|
2430
|
+
};
|
|
2431
|
+
};
|
|
2432
|
+
400: {
|
|
2433
|
+
headers: {
|
|
2434
|
+
[name: string]: unknown;
|
|
2435
|
+
};
|
|
2436
|
+
content: {
|
|
2437
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2438
|
+
};
|
|
2439
|
+
};
|
|
2440
|
+
401: {
|
|
2441
|
+
headers: {
|
|
2442
|
+
[name: string]: unknown;
|
|
2443
|
+
};
|
|
2444
|
+
content: {
|
|
2445
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2446
|
+
};
|
|
2447
|
+
};
|
|
2448
|
+
403: {
|
|
2449
|
+
headers: {
|
|
2450
|
+
[name: string]: unknown;
|
|
2451
|
+
};
|
|
2452
|
+
content: {
|
|
2453
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2454
|
+
};
|
|
2455
|
+
};
|
|
2456
|
+
};
|
|
2457
|
+
}, {
|
|
2458
|
+
body: {
|
|
2459
|
+
name: string;
|
|
2460
|
+
criteria: components["schemas"]["SourcingBriefCriteria"] & unknown;
|
|
2461
|
+
cadence?: "manual";
|
|
2462
|
+
};
|
|
2463
|
+
}, `${string}/${string}`>>;
|
|
2464
|
+
/** Fetch one of the caller's sourcing briefs by id. */
|
|
2465
|
+
get: (id: string) => Promise<openapi_fetch.FetchResponse<{
|
|
2466
|
+
parameters: {
|
|
2467
|
+
query?: never;
|
|
2468
|
+
header?: never;
|
|
2469
|
+
path: {
|
|
2470
|
+
id: string;
|
|
2471
|
+
};
|
|
2472
|
+
cookie?: never;
|
|
2473
|
+
};
|
|
2474
|
+
requestBody?: never;
|
|
2475
|
+
responses: {
|
|
2476
|
+
200: {
|
|
2477
|
+
headers: {
|
|
2478
|
+
[name: string]: unknown;
|
|
2479
|
+
};
|
|
2480
|
+
content: {
|
|
2481
|
+
"application/json": components["schemas"]["SourcingBriefResponse"];
|
|
2482
|
+
};
|
|
2483
|
+
};
|
|
2484
|
+
401: {
|
|
2485
|
+
headers: {
|
|
2486
|
+
[name: string]: unknown;
|
|
2487
|
+
};
|
|
2488
|
+
content: {
|
|
2489
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2490
|
+
};
|
|
2491
|
+
};
|
|
2492
|
+
403: {
|
|
2493
|
+
headers: {
|
|
2494
|
+
[name: string]: unknown;
|
|
2495
|
+
};
|
|
2496
|
+
content: {
|
|
2497
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2498
|
+
};
|
|
2499
|
+
};
|
|
2500
|
+
404: {
|
|
2501
|
+
headers: {
|
|
2502
|
+
[name: string]: unknown;
|
|
2503
|
+
};
|
|
2504
|
+
content: {
|
|
2505
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2506
|
+
};
|
|
2507
|
+
};
|
|
2508
|
+
};
|
|
2509
|
+
}, {
|
|
2510
|
+
params: {
|
|
2511
|
+
path: {
|
|
2512
|
+
id: string;
|
|
2513
|
+
};
|
|
2514
|
+
};
|
|
2515
|
+
}, `${string}/${string}`>>;
|
|
2516
|
+
/** Run a saved brief against the catalog (paginated matches). */
|
|
2517
|
+
matches: (id: string, query?: BriefMatchesQuery) => Promise<openapi_fetch.FetchResponse<{
|
|
2518
|
+
parameters: {
|
|
2519
|
+
query?: {
|
|
2520
|
+
page?: number;
|
|
2521
|
+
limit?: number;
|
|
2522
|
+
};
|
|
2523
|
+
header?: never;
|
|
2524
|
+
path: {
|
|
2525
|
+
id: string;
|
|
2526
|
+
};
|
|
2527
|
+
cookie?: never;
|
|
2528
|
+
};
|
|
2529
|
+
requestBody?: never;
|
|
2530
|
+
responses: {
|
|
2531
|
+
200: {
|
|
2532
|
+
headers: {
|
|
2533
|
+
[name: string]: unknown;
|
|
2534
|
+
};
|
|
2535
|
+
content: {
|
|
2536
|
+
"application/json": components["schemas"]["SourcingBriefMatchesResponse"];
|
|
2537
|
+
};
|
|
2538
|
+
};
|
|
2539
|
+
400: {
|
|
2540
|
+
headers: {
|
|
2541
|
+
[name: string]: unknown;
|
|
2542
|
+
};
|
|
2543
|
+
content: {
|
|
2544
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2545
|
+
};
|
|
2546
|
+
};
|
|
2547
|
+
401: {
|
|
2548
|
+
headers: {
|
|
2549
|
+
[name: string]: unknown;
|
|
2550
|
+
};
|
|
2551
|
+
content: {
|
|
2552
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2553
|
+
};
|
|
2554
|
+
};
|
|
2555
|
+
403: {
|
|
2556
|
+
headers: {
|
|
2557
|
+
[name: string]: unknown;
|
|
2558
|
+
};
|
|
2559
|
+
content: {
|
|
2560
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2561
|
+
};
|
|
2562
|
+
};
|
|
2563
|
+
404: {
|
|
2564
|
+
headers: {
|
|
2565
|
+
[name: string]: unknown;
|
|
2566
|
+
};
|
|
2567
|
+
content: {
|
|
2568
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2569
|
+
};
|
|
2570
|
+
};
|
|
2571
|
+
};
|
|
2572
|
+
}, {
|
|
2573
|
+
params: {
|
|
2574
|
+
path: {
|
|
2575
|
+
id: string;
|
|
2576
|
+
};
|
|
2577
|
+
query: {
|
|
2578
|
+
page?: number;
|
|
2579
|
+
limit?: number;
|
|
2580
|
+
} | undefined;
|
|
2581
|
+
};
|
|
2582
|
+
}, `${string}/${string}`>>;
|
|
2583
|
+
};
|
|
2584
|
+
};
|
|
1292
2585
|
};
|
|
1293
2586
|
type ParchmentClient = ReturnType<typeof createParchmentClient>;
|
|
1294
2587
|
|
|
1295
|
-
export { type ParchmentClient, type ParchmentClientOptions, type components, createParchmentClient, type paths };
|
|
2588
|
+
export { type BriefMatchesQuery, type CatalogListQuery, type CatalogSimilarQuery, type ParchmentClient, type ParchmentClientOptions, type PriceIndexQuery, type SourcingBriefCreateRequest, type components, createParchmentClient, type paths };
|