@purveyors/sdk 0.38.0 → 0.39.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 +370 -27
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3642,6 +3642,99 @@ interface paths {
|
|
|
3642
3642
|
patch?: never;
|
|
3643
3643
|
trace?: never;
|
|
3644
3644
|
};
|
|
3645
|
+
"/v1/price-index/comparisons": {
|
|
3646
|
+
parameters: {
|
|
3647
|
+
query?: never;
|
|
3648
|
+
header?: never;
|
|
3649
|
+
path?: never;
|
|
3650
|
+
cookie?: never;
|
|
3651
|
+
};
|
|
3652
|
+
/**
|
|
3653
|
+
* Available 30-day price changes
|
|
3654
|
+
* @description Automatically discovers usable origins for an exact 30-day comparison ending on the latest completed observation day within the last seven UTC dates. Returns only available comparisons, or an empty list. Actual dates are explicit; no shortened window, freshness backfill, or historical continuity is implied. Requires Parchment Intelligence.
|
|
3655
|
+
*/
|
|
3656
|
+
get: {
|
|
3657
|
+
parameters: {
|
|
3658
|
+
query?: {
|
|
3659
|
+
wholesale?: "true" | "false" | "all";
|
|
3660
|
+
};
|
|
3661
|
+
header?: never;
|
|
3662
|
+
path?: never;
|
|
3663
|
+
cookie?: never;
|
|
3664
|
+
};
|
|
3665
|
+
requestBody?: never;
|
|
3666
|
+
responses: {
|
|
3667
|
+
/** @description Available comparisons and their exact dates */
|
|
3668
|
+
200: {
|
|
3669
|
+
headers: {
|
|
3670
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
3671
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
3672
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
3673
|
+
"X-RateLimit-Burst-Limit": components["headers"]["X-RateLimit-Burst-Limit"];
|
|
3674
|
+
"X-RateLimit-Burst-Remaining": components["headers"]["X-RateLimit-Burst-Remaining"];
|
|
3675
|
+
"X-RateLimit-Burst-Reset": components["headers"]["X-RateLimit-Burst-Reset"];
|
|
3676
|
+
[name: string]: unknown;
|
|
3677
|
+
};
|
|
3678
|
+
content: {
|
|
3679
|
+
"application/json": components["schemas"]["PriceComparisons"];
|
|
3680
|
+
};
|
|
3681
|
+
};
|
|
3682
|
+
/** @description Invalid market */
|
|
3683
|
+
400: {
|
|
3684
|
+
headers: {
|
|
3685
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
3686
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
3687
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
3688
|
+
"X-RateLimit-Burst-Limit": components["headers"]["X-RateLimit-Burst-Limit"];
|
|
3689
|
+
"X-RateLimit-Burst-Remaining": components["headers"]["X-RateLimit-Burst-Remaining"];
|
|
3690
|
+
"X-RateLimit-Burst-Reset": components["headers"]["X-RateLimit-Burst-Reset"];
|
|
3691
|
+
[name: string]: unknown;
|
|
3692
|
+
};
|
|
3693
|
+
content: {
|
|
3694
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3695
|
+
};
|
|
3696
|
+
};
|
|
3697
|
+
/** @description Authentication required */
|
|
3698
|
+
401: {
|
|
3699
|
+
headers: {
|
|
3700
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
3701
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
3702
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
3703
|
+
"X-RateLimit-Burst-Limit": components["headers"]["X-RateLimit-Burst-Limit"];
|
|
3704
|
+
"X-RateLimit-Burst-Remaining": components["headers"]["X-RateLimit-Burst-Remaining"];
|
|
3705
|
+
"X-RateLimit-Burst-Reset": components["headers"]["X-RateLimit-Burst-Reset"];
|
|
3706
|
+
[name: string]: unknown;
|
|
3707
|
+
};
|
|
3708
|
+
content: {
|
|
3709
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3710
|
+
};
|
|
3711
|
+
};
|
|
3712
|
+
/** @description Insufficient entitlement (plan or role) */
|
|
3713
|
+
403: {
|
|
3714
|
+
headers: {
|
|
3715
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
3716
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
3717
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
3718
|
+
"X-RateLimit-Burst-Limit": components["headers"]["X-RateLimit-Burst-Limit"];
|
|
3719
|
+
"X-RateLimit-Burst-Remaining": components["headers"]["X-RateLimit-Burst-Remaining"];
|
|
3720
|
+
"X-RateLimit-Burst-Reset": components["headers"]["X-RateLimit-Burst-Reset"];
|
|
3721
|
+
[name: string]: unknown;
|
|
3722
|
+
};
|
|
3723
|
+
content: {
|
|
3724
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3725
|
+
};
|
|
3726
|
+
};
|
|
3727
|
+
429: components["responses"]["ApiRateLimitExceeded"];
|
|
3728
|
+
};
|
|
3729
|
+
};
|
|
3730
|
+
put?: never;
|
|
3731
|
+
post?: never;
|
|
3732
|
+
delete?: never;
|
|
3733
|
+
options?: never;
|
|
3734
|
+
head?: never;
|
|
3735
|
+
patch?: never;
|
|
3736
|
+
trace?: never;
|
|
3737
|
+
};
|
|
3645
3738
|
"/v1/price-index/comparison": {
|
|
3646
3739
|
parameters: {
|
|
3647
3740
|
query?: never;
|
|
@@ -11043,6 +11136,131 @@ interface paths {
|
|
|
11043
11136
|
patch?: never;
|
|
11044
11137
|
trace?: never;
|
|
11045
11138
|
};
|
|
11139
|
+
"/v1/conversation/chat": {
|
|
11140
|
+
parameters: {
|
|
11141
|
+
query?: never;
|
|
11142
|
+
header?: never;
|
|
11143
|
+
path?: never;
|
|
11144
|
+
cookie?: never;
|
|
11145
|
+
};
|
|
11146
|
+
get?: never;
|
|
11147
|
+
put?: never;
|
|
11148
|
+
/**
|
|
11149
|
+
* Stream a Cherry Runtime response
|
|
11150
|
+
* @description Session-only AI SDK UI-message stream. Parchment owns model selection, provider credentials, prompts, tool execution, request bounds, and cancellation propagation.
|
|
11151
|
+
*/
|
|
11152
|
+
post: {
|
|
11153
|
+
parameters: {
|
|
11154
|
+
query?: never;
|
|
11155
|
+
header?: never;
|
|
11156
|
+
path?: never;
|
|
11157
|
+
cookie?: never;
|
|
11158
|
+
};
|
|
11159
|
+
requestBody: {
|
|
11160
|
+
content: {
|
|
11161
|
+
"application/json": components["schemas"]["ConversationChatStreamRequest"];
|
|
11162
|
+
};
|
|
11163
|
+
};
|
|
11164
|
+
responses: {
|
|
11165
|
+
/** @description AI SDK UI-message event stream */
|
|
11166
|
+
200: {
|
|
11167
|
+
headers: {
|
|
11168
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
11169
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
11170
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
11171
|
+
"X-RateLimit-Burst-Limit": components["headers"]["X-RateLimit-Burst-Limit"];
|
|
11172
|
+
"X-RateLimit-Burst-Remaining": components["headers"]["X-RateLimit-Burst-Remaining"];
|
|
11173
|
+
"X-RateLimit-Burst-Reset": components["headers"]["X-RateLimit-Burst-Reset"];
|
|
11174
|
+
[name: string]: unknown;
|
|
11175
|
+
};
|
|
11176
|
+
content: {
|
|
11177
|
+
"text/event-stream": string;
|
|
11178
|
+
};
|
|
11179
|
+
};
|
|
11180
|
+
/** @description Invalid chat request */
|
|
11181
|
+
400: {
|
|
11182
|
+
headers: {
|
|
11183
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
11184
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
11185
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
11186
|
+
"X-RateLimit-Burst-Limit": components["headers"]["X-RateLimit-Burst-Limit"];
|
|
11187
|
+
"X-RateLimit-Burst-Remaining": components["headers"]["X-RateLimit-Burst-Remaining"];
|
|
11188
|
+
"X-RateLimit-Burst-Reset": components["headers"]["X-RateLimit-Burst-Reset"];
|
|
11189
|
+
[name: string]: unknown;
|
|
11190
|
+
};
|
|
11191
|
+
content: {
|
|
11192
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
11193
|
+
};
|
|
11194
|
+
};
|
|
11195
|
+
/** @description Authentication required */
|
|
11196
|
+
401: {
|
|
11197
|
+
headers: {
|
|
11198
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
11199
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
11200
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
11201
|
+
"X-RateLimit-Burst-Limit": components["headers"]["X-RateLimit-Burst-Limit"];
|
|
11202
|
+
"X-RateLimit-Burst-Remaining": components["headers"]["X-RateLimit-Burst-Remaining"];
|
|
11203
|
+
"X-RateLimit-Burst-Reset": components["headers"]["X-RateLimit-Burst-Reset"];
|
|
11204
|
+
[name: string]: unknown;
|
|
11205
|
+
};
|
|
11206
|
+
content: {
|
|
11207
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
11208
|
+
};
|
|
11209
|
+
};
|
|
11210
|
+
/** @description Insufficient entitlement (plan or role) */
|
|
11211
|
+
403: {
|
|
11212
|
+
headers: {
|
|
11213
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
11214
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
11215
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
11216
|
+
"X-RateLimit-Burst-Limit": components["headers"]["X-RateLimit-Burst-Limit"];
|
|
11217
|
+
"X-RateLimit-Burst-Remaining": components["headers"]["X-RateLimit-Burst-Remaining"];
|
|
11218
|
+
"X-RateLimit-Burst-Reset": components["headers"]["X-RateLimit-Burst-Reset"];
|
|
11219
|
+
[name: string]: unknown;
|
|
11220
|
+
};
|
|
11221
|
+
content: {
|
|
11222
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
11223
|
+
};
|
|
11224
|
+
};
|
|
11225
|
+
/** @description Chat request or prompt exceeds a server-owned bound */
|
|
11226
|
+
413: {
|
|
11227
|
+
headers: {
|
|
11228
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
11229
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
11230
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
11231
|
+
"X-RateLimit-Burst-Limit": components["headers"]["X-RateLimit-Burst-Limit"];
|
|
11232
|
+
"X-RateLimit-Burst-Remaining": components["headers"]["X-RateLimit-Burst-Remaining"];
|
|
11233
|
+
"X-RateLimit-Burst-Reset": components["headers"]["X-RateLimit-Burst-Reset"];
|
|
11234
|
+
[name: string]: unknown;
|
|
11235
|
+
};
|
|
11236
|
+
content: {
|
|
11237
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
11238
|
+
};
|
|
11239
|
+
};
|
|
11240
|
+
429: components["responses"]["ApiRateLimitExceeded"];
|
|
11241
|
+
/** @description AI provider is temporarily unavailable */
|
|
11242
|
+
503: {
|
|
11243
|
+
headers: {
|
|
11244
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
11245
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
11246
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
11247
|
+
"X-RateLimit-Burst-Limit": components["headers"]["X-RateLimit-Burst-Limit"];
|
|
11248
|
+
"X-RateLimit-Burst-Remaining": components["headers"]["X-RateLimit-Burst-Remaining"];
|
|
11249
|
+
"X-RateLimit-Burst-Reset": components["headers"]["X-RateLimit-Burst-Reset"];
|
|
11250
|
+
[name: string]: unknown;
|
|
11251
|
+
};
|
|
11252
|
+
content: {
|
|
11253
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
11254
|
+
};
|
|
11255
|
+
};
|
|
11256
|
+
};
|
|
11257
|
+
};
|
|
11258
|
+
delete?: never;
|
|
11259
|
+
options?: never;
|
|
11260
|
+
head?: never;
|
|
11261
|
+
patch?: never;
|
|
11262
|
+
trace?: never;
|
|
11263
|
+
};
|
|
11046
11264
|
"/v1/conversation/memory": {
|
|
11047
11265
|
parameters: {
|
|
11048
11266
|
query?: never;
|
|
@@ -12423,6 +12641,7 @@ interface components {
|
|
|
12423
12641
|
toListings: number;
|
|
12424
12642
|
matchedListings: number;
|
|
12425
12643
|
matchedSuppliers: number;
|
|
12644
|
+
/** @description Matched listings divided by starting-date listings; requires at least 50% of the starting cohort, five matches and three suppliers. */
|
|
12426
12645
|
matchedCoverage: number;
|
|
12427
12646
|
};
|
|
12428
12647
|
/** @enum {string} */
|
|
@@ -12430,6 +12649,19 @@ interface components {
|
|
|
12430
12649
|
/** @enum {boolean} */
|
|
12431
12650
|
canonicalPublication: false;
|
|
12432
12651
|
};
|
|
12652
|
+
PriceComparisons: {
|
|
12653
|
+
/** @enum {number} */
|
|
12654
|
+
windowDays: 30;
|
|
12655
|
+
/** Format: date */
|
|
12656
|
+
from: string | null;
|
|
12657
|
+
/** Format: date */
|
|
12658
|
+
to: string | null;
|
|
12659
|
+
comparisons: (components["schemas"]["MatchedPriceComparison"] & {
|
|
12660
|
+
/** @enum {string} */
|
|
12661
|
+
status?: "available";
|
|
12662
|
+
changePercent?: number;
|
|
12663
|
+
})[];
|
|
12664
|
+
};
|
|
12433
12665
|
PriceIndexItem: {
|
|
12434
12666
|
date: string;
|
|
12435
12667
|
origin: string;
|
|
@@ -14934,6 +15166,28 @@ interface components {
|
|
|
14934
15166
|
};
|
|
14935
15167
|
meta: components["schemas"]["ConversationResponseMeta"];
|
|
14936
15168
|
};
|
|
15169
|
+
ConversationChatStreamRequest: {
|
|
15170
|
+
messages: unknown[];
|
|
15171
|
+
workspaceContext?: {
|
|
15172
|
+
/** Format: uuid */
|
|
15173
|
+
id?: string;
|
|
15174
|
+
type?: string;
|
|
15175
|
+
includeMemory?: boolean;
|
|
15176
|
+
canvasDescription?: string;
|
|
15177
|
+
};
|
|
15178
|
+
pageContext?: {
|
|
15179
|
+
/** @enum {string} */
|
|
15180
|
+
surface: "catalog" | "analytics" | "dashboard" | "beans" | "roast" | "profit";
|
|
15181
|
+
summary: string;
|
|
15182
|
+
entities?: {
|
|
15183
|
+
/** @enum {string} */
|
|
15184
|
+
type: "coffee" | "inventory_bean" | "roast" | "supplier";
|
|
15185
|
+
id: number | string;
|
|
15186
|
+
label: string;
|
|
15187
|
+
}[];
|
|
15188
|
+
};
|
|
15189
|
+
includeUserMemory?: boolean;
|
|
15190
|
+
};
|
|
14937
15191
|
ConversationMemory: {
|
|
14938
15192
|
content: string;
|
|
14939
15193
|
version: number;
|
|
@@ -15183,6 +15437,8 @@ type CliAuthRequestCreate = NonNullable<paths["/v1/cli-auth/requests"]["post"]["
|
|
|
15183
15437
|
type CliAuthInspectRequest = NonNullable<paths["/v1/cli-auth/inspect"]["post"]["requestBody"]>["content"]["application/json"];
|
|
15184
15438
|
type CliAuthApproveRequest = NonNullable<paths["/v1/cli-auth/approve"]["post"]["requestBody"]>["content"]["application/json"];
|
|
15185
15439
|
type CliAuthExchangeRequest = NonNullable<paths["/v1/cli-auth/token"]["post"]["requestBody"]>["content"]["application/json"];
|
|
15440
|
+
/** Browser-compatible AI SDK UI-message stream request. */
|
|
15441
|
+
type ConversationChatStreamRequest = components["schemas"]["ConversationChatStreamRequest"];
|
|
15186
15442
|
/**
|
|
15187
15443
|
* Create a typed Parchment API client.
|
|
15188
15444
|
*
|
|
@@ -16555,7 +16811,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
16555
16811
|
query?: never;
|
|
16556
16812
|
header?: never;
|
|
16557
16813
|
path?: never;
|
|
16558
|
-
cookie
|
|
16814
|
+
cookie? /** Live catalog price context by origin. */: never;
|
|
16559
16815
|
};
|
|
16560
16816
|
requestBody?: never;
|
|
16561
16817
|
responses: {
|
|
@@ -16602,7 +16858,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
16602
16858
|
[name: string]: unknown;
|
|
16603
16859
|
};
|
|
16604
16860
|
content: {
|
|
16605
|
-
"application/json": components["schemas"]
|
|
16861
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
16606
16862
|
};
|
|
16607
16863
|
};
|
|
16608
16864
|
};
|
|
@@ -16611,7 +16867,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
16611
16867
|
query?: never;
|
|
16612
16868
|
header?: never;
|
|
16613
16869
|
path?: never;
|
|
16614
|
-
cookie
|
|
16870
|
+
cookie? /** Live catalog price context by origin. */: never;
|
|
16615
16871
|
};
|
|
16616
16872
|
requestBody?: never;
|
|
16617
16873
|
responses: {
|
|
@@ -16658,7 +16914,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
16658
16914
|
[name: string]: unknown;
|
|
16659
16915
|
};
|
|
16660
16916
|
content: {
|
|
16661
|
-
"application/json": components["schemas"]
|
|
16917
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
16662
16918
|
};
|
|
16663
16919
|
};
|
|
16664
16920
|
};
|
|
@@ -16807,7 +17063,9 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
16807
17063
|
headers: {
|
|
16808
17064
|
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
16809
17065
|
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
16810
|
-
"X-RateLimit-Reset":
|
|
17066
|
+
"X-RateLimit-Reset":
|
|
17067
|
+
/** Read the session owner's versioned durable memory. */
|
|
17068
|
+
components["headers"]["X-RateLimit-Reset"];
|
|
16811
17069
|
"X-RateLimit-Burst-Limit": components["headers"]["X-RateLimit-Burst-Limit"];
|
|
16812
17070
|
"X-RateLimit-Burst-Remaining": components["headers"]["X-RateLimit-Burst-Remaining"];
|
|
16813
17071
|
"X-RateLimit-Burst-Reset": components["headers"]["X-RateLimit-Burst-Reset"];
|
|
@@ -16829,11 +17087,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
16829
17087
|
[name: string]: unknown;
|
|
16830
17088
|
};
|
|
16831
17089
|
content: {
|
|
16832
|
-
"application/json": components["schemas"]
|
|
16833
|
-
* Get unknown, accepted, in-progress, completed, or terminal-rejected
|
|
16834
|
-
* state. Unknown is explicitly nonterminal, including missing or
|
|
16835
|
-
* cross-tenant UUIDs, so clients retain the UUID and retry.
|
|
16836
|
-
*/["ErrorResponse"];
|
|
17090
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
16837
17091
|
};
|
|
16838
17092
|
};
|
|
16839
17093
|
};
|
|
@@ -16888,7 +17142,9 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
16888
17142
|
headers: {
|
|
16889
17143
|
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
16890
17144
|
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
16891
|
-
"X-RateLimit-Reset":
|
|
17145
|
+
"X-RateLimit-Reset":
|
|
17146
|
+
/** Read the session owner's versioned durable memory. */
|
|
17147
|
+
components["headers"]["X-RateLimit-Reset"];
|
|
16892
17148
|
"X-RateLimit-Burst-Limit": components["headers"]["X-RateLimit-Burst-Limit"];
|
|
16893
17149
|
"X-RateLimit-Burst-Remaining": components["headers"]["X-RateLimit-Burst-Remaining"];
|
|
16894
17150
|
"X-RateLimit-Burst-Reset": components["headers"]["X-RateLimit-Burst-Reset"];
|
|
@@ -16910,11 +17166,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
16910
17166
|
[name: string]: unknown;
|
|
16911
17167
|
};
|
|
16912
17168
|
content: {
|
|
16913
|
-
"application/json": components["schemas"]
|
|
16914
|
-
* Get unknown, accepted, in-progress, completed, or terminal-rejected
|
|
16915
|
-
* state. Unknown is explicitly nonterminal, including missing or
|
|
16916
|
-
* cross-tenant UUIDs, so clients retain the UUID and retry.
|
|
16917
|
-
*/["ErrorResponse"];
|
|
17169
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
16918
17170
|
};
|
|
16919
17171
|
};
|
|
16920
17172
|
};
|
|
@@ -16996,14 +17248,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
16996
17248
|
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
16997
17249
|
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
16998
17250
|
"X-RateLimit-Burst-Limit": components["headers"]["X-RateLimit-Burst-Limit"];
|
|
16999
|
-
"X-RateLimit-Burst-Remaining": components["headers"]
|
|
17000
|
-
* Create a roast profile from an Artisan `.alog` file against one of the
|
|
17001
|
-
* caller's green-coffee lots, persisting the imported curve, events, and
|
|
17002
|
-
* an artisan_import_log entry atomically. Requires a session or an
|
|
17003
|
-
* owner-bound API key carrying the exact `roast:write` scope. The
|
|
17004
|
-
* optional `idempotencyKey` is payload-bound: same-key, same-payload
|
|
17005
|
-
* retries replay, while changed payloads conflict.
|
|
17006
|
-
*/["X-RateLimit-Burst-Remaining"];
|
|
17251
|
+
"X-RateLimit-Burst-Remaining": components["headers"]["X-RateLimit-Burst-Remaining"];
|
|
17007
17252
|
"X-RateLimit-Burst-Reset": components["headers"]["X-RateLimit-Burst-Reset"];
|
|
17008
17253
|
[name: string]: unknown;
|
|
17009
17254
|
};
|
|
@@ -17023,7 +17268,16 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
17023
17268
|
[name: string]: unknown;
|
|
17024
17269
|
};
|
|
17025
17270
|
content: {
|
|
17026
|
-
"application/json":
|
|
17271
|
+
"application/json":
|
|
17272
|
+
/**
|
|
17273
|
+
* Create a roast profile from an Artisan `.alog` file against one of the
|
|
17274
|
+
* caller's green-coffee lots, persisting the imported curve, events, and
|
|
17275
|
+
* an artisan_import_log entry atomically. Requires a session or an
|
|
17276
|
+
* owner-bound API key carrying the exact `roast:write` scope. The
|
|
17277
|
+
* optional `idempotencyKey` is payload-bound: same-key, same-payload
|
|
17278
|
+
* retries replay, while changed payloads conflict.
|
|
17279
|
+
*/
|
|
17280
|
+
components["schemas"]["ErrorResponse"];
|
|
17027
17281
|
};
|
|
17028
17282
|
};
|
|
17029
17283
|
};
|
|
@@ -17077,7 +17331,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
17077
17331
|
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
17078
17332
|
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
17079
17333
|
"X-RateLimit-Burst-Limit": components["headers"]["X-RateLimit-Burst-Limit"];
|
|
17080
|
-
"X-RateLimit-Burst-Remaining": components["headers"]["X-RateLimit-Burst-Remaining"];
|
|
17334
|
+
"X-RateLimit-Burst-Remaining": components["headers"] /** Delete one of the caller's own sales. */["X-RateLimit-Burst-Remaining"];
|
|
17081
17335
|
"X-RateLimit-Burst-Reset": components["headers"]["X-RateLimit-Burst-Reset"];
|
|
17082
17336
|
[name: string]: unknown;
|
|
17083
17337
|
};
|
|
@@ -18857,6 +19111,85 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
18857
19111
|
}, `${string}/${string}`>>;
|
|
18858
19112
|
};
|
|
18859
19113
|
priceIndex: {
|
|
19114
|
+
/** Available exact 30-day comparisons, with no empty-origin search. */
|
|
19115
|
+
comparisons: (query?: {
|
|
19116
|
+
wholesale?: "true" | "false" | "all";
|
|
19117
|
+
}) => Promise<openapi_fetch.FetchResponse<{
|
|
19118
|
+
parameters: {
|
|
19119
|
+
query?: {
|
|
19120
|
+
wholesale?: "true" | "false" | "all";
|
|
19121
|
+
};
|
|
19122
|
+
header?: never;
|
|
19123
|
+
path?: never;
|
|
19124
|
+
cookie?: never;
|
|
19125
|
+
};
|
|
19126
|
+
requestBody?: never;
|
|
19127
|
+
responses: {
|
|
19128
|
+
200: {
|
|
19129
|
+
headers: {
|
|
19130
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
19131
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
19132
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
19133
|
+
"X-RateLimit-Burst-Limit": components["headers"]["X-RateLimit-Burst-Limit"];
|
|
19134
|
+
"X-RateLimit-Burst-Remaining": components["headers"]["X-RateLimit-Burst-Remaining"];
|
|
19135
|
+
"X-RateLimit-Burst-Reset": components["headers"]["X-RateLimit-Burst-Reset"];
|
|
19136
|
+
[name: string]: unknown;
|
|
19137
|
+
};
|
|
19138
|
+
content: {
|
|
19139
|
+
"application/json": components["schemas"]["PriceComparisons"];
|
|
19140
|
+
};
|
|
19141
|
+
};
|
|
19142
|
+
400: {
|
|
19143
|
+
headers: {
|
|
19144
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
19145
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
19146
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
19147
|
+
"X-RateLimit-Burst-Limit": components["headers"]["X-RateLimit-Burst-Limit"];
|
|
19148
|
+
"X-RateLimit-Burst-Remaining": components["headers"]["X-RateLimit-Burst-Remaining"];
|
|
19149
|
+
"X-RateLimit-Burst-Reset": components["headers"]["X-RateLimit-Burst-Reset"];
|
|
19150
|
+
[name: string]: unknown;
|
|
19151
|
+
};
|
|
19152
|
+
content: {
|
|
19153
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
19154
|
+
};
|
|
19155
|
+
};
|
|
19156
|
+
401: {
|
|
19157
|
+
headers: {
|
|
19158
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
19159
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
19160
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
19161
|
+
"X-RateLimit-Burst-Limit": components["headers"]["X-RateLimit-Burst-Limit"];
|
|
19162
|
+
"X-RateLimit-Burst-Remaining": components["headers"]["X-RateLimit-Burst-Remaining"];
|
|
19163
|
+
"X-RateLimit-Burst-Reset": components["headers"]["X-RateLimit-Burst-Reset"];
|
|
19164
|
+
[name: string]: unknown;
|
|
19165
|
+
};
|
|
19166
|
+
content: {
|
|
19167
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
19168
|
+
};
|
|
19169
|
+
};
|
|
19170
|
+
403: {
|
|
19171
|
+
headers: {
|
|
19172
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
19173
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
19174
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
19175
|
+
"X-RateLimit-Burst-Limit": components["headers"]["X-RateLimit-Burst-Limit"];
|
|
19176
|
+
"X-RateLimit-Burst-Remaining": components["headers"]["X-RateLimit-Burst-Remaining"];
|
|
19177
|
+
"X-RateLimit-Burst-Reset": components["headers"]["X-RateLimit-Burst-Reset"];
|
|
19178
|
+
[name: string]: unknown;
|
|
19179
|
+
};
|
|
19180
|
+
content: {
|
|
19181
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
19182
|
+
};
|
|
19183
|
+
};
|
|
19184
|
+
429: components["responses"]["ApiRateLimitExceeded"];
|
|
19185
|
+
};
|
|
19186
|
+
}, {
|
|
19187
|
+
params: {
|
|
19188
|
+
query: {
|
|
19189
|
+
wholesale?: "true" | "false" | "all";
|
|
19190
|
+
} | undefined;
|
|
19191
|
+
};
|
|
19192
|
+
}, `${string}/${string}`>>;
|
|
18860
19193
|
/** Fresh matched-listing movement, not catalog composition or a canonical publication. */
|
|
18861
19194
|
comparison: (query: {
|
|
18862
19195
|
from: string;
|
|
@@ -20509,6 +20842,16 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
20509
20842
|
}, `${string}/${string}`>>;
|
|
20510
20843
|
};
|
|
20511
20844
|
conversation: {
|
|
20845
|
+
chat: {
|
|
20846
|
+
/**
|
|
20847
|
+
* Open a raw AI SDK UI-message stream. The response body is deliberately
|
|
20848
|
+
* left unread so BFFs and browser transports can forward chunks without
|
|
20849
|
+
* buffering. Aborting the supplied signal cancels the upstream request.
|
|
20850
|
+
*/
|
|
20851
|
+
stream: (body: ConversationChatStreamRequest, init?: {
|
|
20852
|
+
signal?: AbortSignal;
|
|
20853
|
+
}) => Promise<Response>;
|
|
20854
|
+
};
|
|
20512
20855
|
workspaces: {
|
|
20513
20856
|
/** Get or create the session owner's singleton workspace. */
|
|
20514
20857
|
getOrCreate: (body: ConversationWorkspaceCreateRequest) => Promise<openapi_fetch.FetchResponse<{
|
|
@@ -26447,4 +26790,4 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
|
|
|
26447
26790
|
};
|
|
26448
26791
|
type ParchmentClient = ReturnType<typeof createParchmentClient>;
|
|
26449
26792
|
|
|
26450
|
-
export { type AccountDeletionOperation, type AccountDeletionRequest, type BillingCheckoutCreateRequest, type BillingCheckoutSession, type BillingManualEntitlementsRequest, type BillingSubscriptionMutationRequest, type BillingSubscriptionOperation, type BriefMatchesQuery, type CatalogInventoryBatchLifecycle, type CatalogInventoryBatchReserveRequest, type CatalogInventoryBatchResult, type CatalogItem, type CatalogListQuery, type CatalogMapHeaders, type CatalogMapQuery, type CatalogMapResponse, type CatalogProofSummary, type CatalogSimilarQuery, type ConfirmedActionExecuteRequest, type ConversationCanvasUpdateRequest, type ConversationMemoryUpdateRequest, type ConversationMessageAppendRequest, type ConversationSummaryUpdateRequest, type ConversationWorkspaceClearRequest, type ConversationWorkspaceCreateRequest, type ConversationWorkspaceMetadataRequest, type InventoryCreateRequest, type InventoryShareCatalog, type InventoryShareGrant, type InventoryShareGrantCreateRequest, type InventoryShareGrantRedeemRequest, type InventoryShareInventory, type InventoryShareRoastSummary, type InventoryUpdateRequest, type MarketOverview, type MarketSignalsQuery, type MetadataIndexQuery, type OwnerApiUsage, type OwnerApiUsageQuery, type ParchmentClient, type ParchmentClientOptions, type PriceIndexQuery, type PriceIndexStatsQuery, type ProfitItem, type ProfitListQuery, type RoastBatchCreateRequest, type RoastChartDataQuery, type RoastLiveCurveRequest, type SalesCreateRequest, type SalesListQuery, type SalesUpdateRequest, type SourcingBriefCreateRequest, type TrackedLotMutation, type TrackedLotSummary, type TrackedLotsListQuery, type components, createParchmentClient, type paths };
|
|
26793
|
+
export { type AccountDeletionOperation, type AccountDeletionRequest, type BillingCheckoutCreateRequest, type BillingCheckoutSession, type BillingManualEntitlementsRequest, type BillingSubscriptionMutationRequest, type BillingSubscriptionOperation, type BriefMatchesQuery, type CatalogInventoryBatchLifecycle, type CatalogInventoryBatchReserveRequest, type CatalogInventoryBatchResult, type CatalogItem, type CatalogListQuery, type CatalogMapHeaders, type CatalogMapQuery, type CatalogMapResponse, type CatalogProofSummary, type CatalogSimilarQuery, type ConfirmedActionExecuteRequest, type ConversationCanvasUpdateRequest, type ConversationChatStreamRequest, type ConversationMemoryUpdateRequest, type ConversationMessageAppendRequest, type ConversationSummaryUpdateRequest, type ConversationWorkspaceClearRequest, type ConversationWorkspaceCreateRequest, type ConversationWorkspaceMetadataRequest, type InventoryCreateRequest, type InventoryShareCatalog, type InventoryShareGrant, type InventoryShareGrantCreateRequest, type InventoryShareGrantRedeemRequest, type InventoryShareInventory, type InventoryShareRoastSummary, type InventoryUpdateRequest, type MarketOverview, type MarketSignalsQuery, type MetadataIndexQuery, type OwnerApiUsage, type OwnerApiUsageQuery, type ParchmentClient, type ParchmentClientOptions, type PriceIndexQuery, type PriceIndexStatsQuery, type ProfitItem, type ProfitListQuery, type RoastBatchCreateRequest, type RoastChartDataQuery, type RoastLiveCurveRequest, type SalesCreateRequest, type SalesListQuery, type SalesUpdateRequest, type SourcingBriefCreateRequest, type TrackedLotMutation, type TrackedLotSummary, type TrackedLotsListQuery, type components, createParchmentClient, type paths };
|
package/dist/index.js
CHANGED
|
@@ -161,6 +161,8 @@ function createParchmentClient(options) {
|
|
|
161
161
|
})
|
|
162
162
|
},
|
|
163
163
|
priceIndex: {
|
|
164
|
+
/** Available exact 30-day comparisons, with no empty-origin search. */
|
|
165
|
+
comparisons: (query) => client.GET("/v1/price-index/comparisons", { params: { query } }),
|
|
164
166
|
/** Fresh matched-listing movement, not catalog composition or a canonical publication. */
|
|
165
167
|
comparison: (query) => client.GET("/v1/price-index/comparison", { params: { query } }),
|
|
166
168
|
/** Parchment Price Index (aggregate snapshots). */
|
|
@@ -224,6 +226,27 @@ function createParchmentClient(options) {
|
|
|
224
226
|
execute: (body) => client.POST("/v1/confirmed-actions/execute", { body })
|
|
225
227
|
},
|
|
226
228
|
conversation: {
|
|
229
|
+
chat: {
|
|
230
|
+
/**
|
|
231
|
+
* Open a raw AI SDK UI-message stream. The response body is deliberately
|
|
232
|
+
* left unread so BFFs and browser transports can forward chunks without
|
|
233
|
+
* buffering. Aborting the supplied signal cancels the upstream request.
|
|
234
|
+
*/
|
|
235
|
+
stream: (body, init = {}) => {
|
|
236
|
+
const requestFetch = fetchImpl ?? globalThis.fetch;
|
|
237
|
+
return requestFetch(
|
|
238
|
+
new Request(`${baseUrl.replace(/\/$/, "")}/v1/conversation/chat`, {
|
|
239
|
+
method: "POST",
|
|
240
|
+
headers: {
|
|
241
|
+
"Content-Type": "application/json",
|
|
242
|
+
...token ? { Authorization: `Bearer ${token}` } : {}
|
|
243
|
+
},
|
|
244
|
+
body: JSON.stringify(body),
|
|
245
|
+
signal: init.signal
|
|
246
|
+
})
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
},
|
|
227
250
|
workspaces: {
|
|
228
251
|
/** Get or create the session owner's singleton workspace. */
|
|
229
252
|
getOrCreate: (body) => client.POST("/v1/conversation/workspaces", { body }),
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/client.ts"],"sourcesContent":["import createClient, { type ClientOptions } from \"openapi-fetch\";\nimport type { components, paths } from \"./schema\";\n\nexport interface ParchmentClientOptions {\n /** Base URL of the Parchment API, e.g. https://api.purveyors.io */\n baseUrl: string;\n /**\n * Optional bearer token (a Supabase JWT, API key, or dedicated machine\n * credential). Sent as\n * `Authorization: Bearer <token>`. Auth is resolved server-side at the route\n * boundary; the SDK only forwards the credential.\n */\n token?: string;\n /** Override the fetch implementation (useful for tests or custom runtimes). */\n fetch?: ClientOptions[\"fetch\"];\n}\n\n/** Query parameters for {@link ParchmentClient.catalog.list}. */\nexport type CatalogListQuery = NonNullable<\n paths[\"/v1/catalog\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** A catalog row returned by the canonical listing resource. */\nexport type CatalogItem = components[\"schemas\"][\"CatalogItem\"];\n/** API-owned row-level trust summary returned when `include=proof`. */\nexport type CatalogProofSummary = components[\"schemas\"][\"CatalogProofSummary\"];\n/** Query parameters for {@link ParchmentClient.catalog.facets}. */\nexport type CatalogFacetsQuery = NonNullable<\n paths[\"/v1/catalog/facets\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/**\n * Optional headers for {@link ParchmentClient.catalog.list}, notably the\n * RFC 7240 `Prefer: handling=lenient|strict` override (PADR-0013 §7). Sending\n * `handling=lenient` opts a strict caller (API key or bearer-session JWT) back\n * into strip-with-notice degradation instead of a 401/403 hard-deny.\n */\nexport type CatalogListHeaders = NonNullable<\n paths[\"/v1/catalog\"][\"get\"][\"parameters\"][\"header\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.map}. */\nexport type CatalogMapQuery = NonNullable<\n paths[\"/v1/catalog/map\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Optional handling headers for {@link ParchmentClient.catalog.map}. */\nexport type CatalogMapHeaders = NonNullable<\n paths[\"/v1/catalog/map\"][\"get\"][\"parameters\"][\"header\"]\n>;\n/** Lightweight map projection over the caller-visible catalog. */\nexport type CatalogMapResponse = components[\"schemas\"][\"CatalogMapResponse\"];\n/** Optional headers for {@link ParchmentClient.catalog.facets}; see {@link CatalogListHeaders}. */\nexport type CatalogFacetsHeaders = NonNullable<\n paths[\"/v1/catalog/facets\"][\"get\"][\"parameters\"][\"header\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.originPriceStats}. */\nexport type CatalogOriginPriceStatsQuery = NonNullable<\n paths[\"/v1/catalog/origin-price-stats\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.stats}. */\nexport type CatalogStatsQuery = NonNullable<\n paths[\"/v1/catalog/stats\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.rank}. */\nexport type CatalogRankQuery = NonNullable<\n paths[\"/v1/catalog/rank\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.rankPremium}. */\nexport type CatalogRankPremiumQuery = NonNullable<\n paths[\"/v1/catalog/rank-premium\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.suppliers}. */\nexport type CatalogSuppliersQuery = NonNullable<\n paths[\"/v1/catalog/suppliers\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.supplierDetail}. */\nexport type CatalogSupplierDetailQuery = NonNullable<\n paths[\"/v1/catalog/suppliers/detail\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.supplierRank}. */\nexport type CatalogSupplierRankQuery = NonNullable<\n paths[\"/v1/catalog/suppliers/rank\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Optional headers for ranking endpoints; see {@link CatalogListHeaders}. */\nexport type CatalogRankHeaders = NonNullable<\n paths[\"/v1/catalog/rank\"][\"get\"][\"parameters\"][\"header\"]\n>;\n/** Optional headers for premium ranking endpoints; see {@link CatalogListHeaders}. */\nexport type CatalogRankPremiumHeaders = NonNullable<\n paths[\"/v1/catalog/rank-premium\"][\"get\"][\"parameters\"][\"header\"]\n>;\n/** Optional headers for supplier aggregate endpoints; see {@link CatalogListHeaders}. */\nexport type CatalogSupplierHeaders = NonNullable<\n paths[\"/v1/catalog/suppliers\"][\"get\"][\"parameters\"][\"header\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.similar}. */\nexport type CatalogSimilarQuery = NonNullable<\n paths[\"/v1/catalog/{id}/similar\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.priceIndex.list}. */\nexport type PriceIndexQuery = NonNullable<\n paths[\"/v1/price-index\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.priceIndex.history}. */\nexport type PriceIndexHistoryQuery = NonNullable<\n paths[\"/v1/price-index/history\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.market.signals}. */\nexport type MarketSignalsQuery = NonNullable<\n paths[\"/v1/market/signals\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Aggregate-only public green-coffee market evidence. */\nexport type MarketOverview = components[\"schemas\"][\"MarketOverviewResponse\"];\n/** Named public-catalog and supplier evidence for Parchment Intelligence callers. */\nexport type MarketEvidence = components[\"schemas\"][\"MarketEvidenceResponse\"];\n/** Query parameters for {@link ParchmentClient.priceIndex.stats}. */\nexport type PriceIndexStatsQuery = NonNullable<\n paths[\"/v1/price-index/stats\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.market.metadataIndex}. */\nexport type MetadataIndexQuery = NonNullable<\n paths[\"/v1/market/metadata-index\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.procurement.briefs.matches}. */\nexport type BriefMatchesQuery = NonNullable<\n paths[\"/v1/procurement/briefs/{id}/matches\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Request body for {@link ParchmentClient.procurement.briefs.create}. */\nexport type SourcingBriefCreateRequest =\n components[\"schemas\"][\"SourcingBriefCreateRequest\"];\n/** Query parameters for {@link ParchmentClient.portfolio.trackedLots.list}. */\nexport type TrackedLotsListQuery = NonNullable<\n paths[\"/v1/portfolio/tracked-lots\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** A tracked catalog lot enriched with current catalog and price state. */\nexport type TrackedLotSummary = components[\"schemas\"][\"TrackedLotSummary\"];\n/** State returned by tracked-lot PUT and DELETE mutations. */\nexport type TrackedLotMutation =\n components[\"schemas\"][\"TrackedLotMutationResponse\"];\n/** Closed session-only command for {@link ParchmentClient.confirmedActions.execute}. */\nexport type ConfirmedActionExecuteRequest = NonNullable<\n paths[\"/v1/confirmed-actions/execute\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Create-or-get body for {@link ParchmentClient.conversation.workspaces.getOrCreate}. */\nexport type ConversationWorkspaceCreateRequest = NonNullable<\n paths[\"/v1/conversation/workspaces\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\nexport type ConversationWorkspaceMetadataRequest = NonNullable<\n paths[\"/v1/conversation/workspaces/{workspaceId}\"][\"patch\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\nexport type ConversationMessageAppendRequest = NonNullable<\n paths[\"/v1/conversation/workspaces/{workspaceId}/messages\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\nexport type ConversationWorkspaceClearRequest = NonNullable<\n paths[\"/v1/conversation/workspaces/{workspaceId}/messages/clear\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\nexport type ConversationCanvasUpdateRequest = NonNullable<\n paths[\"/v1/conversation/workspaces/{workspaceId}/canvas\"][\"put\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\nexport type ConversationSummaryUpdateRequest = NonNullable<\n paths[\"/v1/conversation/workspaces/{workspaceId}/summary\"][\"put\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\nexport type ConversationMemoryUpdateRequest = NonNullable<\n paths[\"/v1/conversation/memory\"][\"put\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Query parameters for {@link ParchmentClient.inventory.list}. */\nexport type InventoryListQuery = NonNullable<\n paths[\"/v1/inventory\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Request body for {@link ParchmentClient.inventory.create}. */\nexport type InventoryCreateRequest = NonNullable<\n paths[\"/v1/inventory\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Stable-operation request for {@link ParchmentClient.inventory.shareGrants.create}. */\nexport type InventoryShareGrantCreateRequest = NonNullable<\n paths[\"/v1/inventory/share-grants\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** The one-time raw-token grant returned by create or same-operation replay. */\nexport type InventoryShareGrant = components[\"schemas\"][\"InventoryShareGrant\"];\n/** Anonymous capability body for {@link ParchmentClient.inventory.shareGrants.redeem}. */\nexport type InventoryShareGrantRedeemRequest = NonNullable<\n paths[\"/v1/inventory/share-grants/redeem\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Safe legacy-oriented inventory row returned by capability redemption. */\nexport type InventoryShareInventory =\n components[\"schemas\"][\"InventoryShareInventory\"];\n/** Catalog allowlist nested in a shared inventory row. */\nexport type InventoryShareCatalog =\n components[\"schemas\"][\"InventoryShareCatalog\"];\n/** Six-field roast summary nested in member/admin shares. */\nexport type InventoryShareRoastSummary =\n components[\"schemas\"][\"InventoryShareRoastSummary\"];\ntype CatalogInventoryCreateRequest =\n components[\"schemas\"][\"CatalogInventoryCreateRequest\"];\ntype ManualInventoryCreateRequest =\n components[\"schemas\"][\"ManualInventoryCreateRequest\"];\n/** Request body for {@link ParchmentClient.inventory.createManualBatch}. */\nexport type ManualInventoryBatchCreateRequest = NonNullable<\n paths[\"/v1/inventory/manual-batches\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for reserving durable server-owned manual-batch intent. */\nexport type ManualInventoryBatchReserveRequest = NonNullable<\n paths[\"/v1/inventory/manual-batches/reservations\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Complete canonical intent accepted by the catalog-batch reservation lane. */\nexport type CatalogInventoryBatchReserveRequest = NonNullable<\n paths[\"/v1/inventory/catalog-batches/reservations\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Durable catalog-batch state returned by reserve, commit, and status. */\nexport type CatalogInventoryBatchLifecycle =\n components[\"schemas\"][\"CatalogInventoryBatchLifecycle\"];\n/** Identity-only terminal result; catalog resources remain a separate read. */\nexport type CatalogInventoryBatchResult =\n components[\"schemas\"][\"CatalogInventoryBatchResult\"];\n/** Request body for {@link ParchmentClient.inventory.update}. */\nexport type InventoryUpdateRequest = NonNullable<\n paths[\"/v1/inventory/{id}\"][\"patch\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Query parameters for {@link ParchmentClient.roasts.list}. */\nexport type RoastListQuery = NonNullable<\n paths[\"/v1/roasts\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.roasts.get}. */\nexport type RoastGetQuery = NonNullable<\n paths[\"/v1/roasts/{id}\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.roasts.chartData}. */\nexport type RoastChartDataQuery = NonNullable<\n paths[\"/v1/roasts/{id}/chart-data\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Request body for {@link ParchmentClient.roasts.classify}. */\nexport type RoastClassificationRequest = NonNullable<\n paths[\"/v1/roasts/classify\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.roasts.create}. */\nexport type RoastCreateRequest = NonNullable<\n paths[\"/v1/roasts\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Atomic named-batch body for {@link ParchmentClient.roasts.createBatch}. */\nexport type RoastBatchCreateRequest = NonNullable<\n paths[\"/v1/roasts/batches\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.roasts.update}. */\nexport type RoastUpdateRequest = NonNullable<\n paths[\"/v1/roasts/{id}\"][\"patch\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Source-aware live curve body for {@link ParchmentClient.roasts.replaceLiveCurve}. */\nexport type RoastLiveCurveRequest = NonNullable<\n paths[\"/v1/roasts/{id}/live-curve\"][\"put\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.roasts.import}. */\nexport type RoastImportRequest = NonNullable<\n paths[\"/v1/roasts/imports\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.roasts.replaceArtisanImport}. */\nexport type RoastArtisanImportReplaceRequest = NonNullable<\n paths[\"/v1/roasts/{id}/artisan-import\"][\"put\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Query parameters for {@link ParchmentClient.sales.list}. */\nexport type SalesListQuery = NonNullable<\n paths[\"/v1/sales\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.profit.list}. */\nexport type ProfitListQuery = NonNullable<\n paths[\"/v1/profit\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** One owner inventory lot's canonical cost, revenue, and roast summary. */\nexport type ProfitItem = components[\"schemas\"][\"ProfitItem\"];\n/** Request body for {@link ParchmentClient.sales.create}. */\nexport type SalesCreateRequest = NonNullable<\n paths[\"/v1/sales\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.sales.update}. */\nexport type SalesUpdateRequest = NonNullable<\n paths[\"/v1/sales/{id}\"][\"patch\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Query parameters for {@link ParchmentClient.tasting.get}. */\nexport type TastingGetQuery = NonNullable<\n paths[\"/v1/tasting/{catalogId}\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Request body for {@link ParchmentClient.tasting.rate}. */\nexport type TastingRateRequest = NonNullable<\n paths[\"/v1/tasting/inventory/{inventoryId}\"][\"put\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.apiKeys.create}. */\nexport type ApiKeyCreateRequest = NonNullable<\n paths[\"/v1/api-keys\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Query parameters for the session owner's API-key traffic analytics. */\nexport type OwnerApiUsageQuery = NonNullable<\n paths[\"/v1/api-usage\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Bounded owner API-key traffic analytics (not session or billing usage). */\nexport type OwnerApiUsage = components[\"schemas\"][\"OwnerApiUsageResponse\"];\n/** Request body for {@link ParchmentClient.emailSubscriptions.setMarketRead}. */\nexport type MarketReadPreferenceRequest = NonNullable<\n paths[\"/v1/email-subscriptions/market-read\"][\"put\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.emailSubscriptions.unsubscribeMarketRead}. */\nexport type MarketReadUnsubscribeRequest = NonNullable<\n paths[\"/v1/email-subscriptions/market-read/unsubscribe\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Immutable deployed projection accepted by {@link ParchmentClient.marketBrief.drafts.create}. */\nexport type MarketBriefDraftCreateRequest = NonNullable<\n paths[\"/v1/market-brief/drafts\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Durable Parchment-owned provider-draft state. */\nexport type MarketBriefDraftState =\n components[\"schemas\"][\"MarketBriefDraftState\"];\n/** Account-owned Market Read email preference. */\nexport type EmailSubscriptionPreference =\n components[\"schemas\"][\"EmailSubscriptionPreference\"];\n/** Durable state returned by an account-deletion request. */\nexport type AccountDeletionOperation =\n components[\"schemas\"][\"AccountDeletionOperation\"];\n/** Purpose-bound recent-reauthentication assertion for account deletion. */\nexport type AccountDeletionRequest = NonNullable<\n paths[\"/v1/account-deletion\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Purchase-key request for dormant direct Parchment Checkout creation/replay. */\nexport type BillingCheckoutCreateRequest = NonNullable<\n paths[\"/v1/billing/checkout-sessions\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Durable Checkout admission state; provider Session id stays server-side. */\nexport type BillingCheckoutSession =\n components[\"schemas\"][\"BillingCheckoutSession\"];\n/** Durable cancellation/resume request. */\nexport type BillingSubscriptionMutationRequest = NonNullable<\n paths[\"/v1/billing/subscriptions/{subscriptionId}\"][\"patch\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Durable provider subscription-operation state. */\nexport type BillingSubscriptionOperation =\n components[\"schemas\"][\"BillingSubscriptionOperation\"];\n/** Manual entitlement baseline update for administrators. */\nexport type BillingManualEntitlementsRequest = NonNullable<\n paths[\"/v1/admin/billing-entitlements/{ownerId}/manual\"][\"patch\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\nexport type CliAuthRequestCreate = NonNullable<\n paths[\"/v1/cli-auth/requests\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\nexport type CliAuthInspectRequest = NonNullable<\n paths[\"/v1/cli-auth/inspect\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\nexport type CliAuthApproveRequest = NonNullable<\n paths[\"/v1/cli-auth/approve\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\nexport type CliAuthExchangeRequest = NonNullable<\n paths[\"/v1/cli-auth/token\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n\n/**\n * Create a typed Parchment API client.\n *\n * The generated core (openapi-fetch over the generated `paths` types) is the\n * contract truth; the named helpers below are the hand-maintained ergonomic\n * layer and grow as endpoints land. `raw` always exposes the underlying typed\n * client for direct path access to anything not yet wrapped.\n */\nexport function createParchmentClient(options: ParchmentClientOptions) {\n const { baseUrl, token, fetch: fetchImpl } = options;\n\n const client = createClient<paths>({\n baseUrl,\n fetch: fetchImpl,\n headers: token ? { Authorization: `Bearer ${token}` } : undefined,\n });\n\n const postInventory = (\n body: InventoryCreateRequest,\n options?: { idempotencyKey?: string },\n ) =>\n client.POST(\"/v1/inventory\", {\n body,\n params: options?.idempotencyKey\n ? { header: { \"idempotency-key\": options.idempotencyKey } }\n : undefined,\n });\n\n function createInventory(\n body: ManualInventoryCreateRequest,\n options: { idempotencyKey: string },\n ): ReturnType<typeof postInventory>;\n function createInventory(\n body: CatalogInventoryCreateRequest,\n options?: { idempotencyKey?: string },\n ): ReturnType<typeof postInventory>;\n function createInventory(\n body: InventoryCreateRequest,\n options?: { idempotencyKey?: string },\n ): ReturnType<typeof postInventory> {\n return postInventory(body, options);\n }\n\n return {\n /** The underlying typed openapi-fetch client for direct path access. */\n raw: client,\n /** Liveness and service identity. */\n health: () => client.GET(\"/health\"),\n /** Resolved principal and entitlements for the caller. */\n me: () => client.GET(\"/v1/me\"),\n apiKeys: {\n /** List API keys owned by the authenticated session user. */\n list: () => client.GET(\"/v1/api-keys\"),\n /** Create an API key. The raw secret is returned only once. */\n create: (body: ApiKeyCreateRequest) =>\n client.POST(\"/v1/api-keys\", { body }),\n /** Revoke an API key owned by the authenticated session user. */\n revoke: (id: string) =>\n client.DELETE(\"/v1/api-keys/{id}\", {\n params: { path: { id } },\n }),\n /** Rotate an API key and return the replacement secret once. */\n rotate: (id: string) =>\n client.POST(\"/v1/api-keys/{id}/rotate\", {\n params: { path: { id } },\n }),\n },\n apiUsage: {\n /**\n * Read bounded API-key traffic analytics for the authenticated session\n * owner. Headline monthly/hourly counts are exact; daily/per-key series\n * carry explicit truncation metadata.\n */\n get: (query?: OwnerApiUsageQuery) =>\n client.GET(\"/v1/api-usage\", { params: { query } }),\n },\n emailSubscriptions: {\n /** Get the authenticated session user's Market Read preference. */\n get: () => client.GET(\"/v1/email-subscriptions\"),\n /** Idempotently set the authenticated session user's Market Read preference. */\n setMarketRead: (body: MarketReadPreferenceRequest) =>\n client.PUT(\"/v1/email-subscriptions/market-read\", { body }),\n /** Idempotently unsubscribe using an opaque capability without requiring a session. */\n unsubscribeMarketRead: (body: MarketReadUnsubscribeRequest) =>\n client.POST(\"/v1/email-subscriptions/market-read/unsubscribe\", {\n body,\n }),\n },\n marketBrief: {\n drafts: {\n /** Accept, create, or recover one immutable deployed edition version. */\n create: (body: MarketBriefDraftCreateRequest) =>\n client.POST(\"/v1/market-brief/drafts\", { body }),\n },\n },\n accountDeletion: {\n /** Accept or replay deletion using a purpose-bound reauthentication assertion. */\n request: (body: AccountDeletionRequest) =>\n client.POST(\"/v1/account-deletion\", { body }),\n },\n billing: {\n checkout: {\n /** Create or replay an embedded Checkout Session after activation. */\n create: (body: BillingCheckoutCreateRequest) =>\n client.POST(\"/v1/billing/checkout-sessions\", { body }),\n /** Read owner-bound durable admission state. */\n get: (admissionId: string) =>\n client.GET(\"/v1/billing/checkout-sessions/{admissionId}\", {\n params: { path: { admissionId } },\n }),\n /** Authoritatively reconcile an admission with Stripe. */\n reconcile: (admissionId: string) =>\n client.POST(\"/v1/billing/checkout-sessions/{admissionId}/reconcile\", {\n params: { path: { admissionId } },\n }),\n },\n subscriptions: {\n /** List canonical owner subscription snapshots. */\n list: () => client.GET(\"/v1/billing/subscriptions\"),\n /** Durably cancel or resume the complete provider subscription. */\n mutate: (\n subscriptionId: string,\n body: BillingSubscriptionMutationRequest,\n ) =>\n client.PATCH(\"/v1/billing/subscriptions/{subscriptionId}\", {\n params: { path: { subscriptionId } },\n body,\n }),\n },\n },\n billingAdministration: {\n /** Read bounded canonical-entitlement discrepancies. */\n discrepancies: () =>\n client.GET(\"/v1/admin/billing-entitlement-discrepancies\"),\n /** Recompute billing contribution without changing manual grants. */\n recompute: (ownerId: string) =>\n client.POST(\n \"/v1/admin/billing-entitlement-discrepancies/{ownerId}/recompute\",\n { params: { path: { ownerId } } },\n ),\n /** Update the preserved manual entitlement baseline. */\n setManual: (ownerId: string, body: BillingManualEntitlementsRequest) =>\n client.PATCH(\"/v1/admin/billing-entitlements/{ownerId}/manual\", {\n params: { path: { ownerId } },\n body,\n }),\n },\n cliAuth: {\n /** Create a signed, short-lived login request bound to a PKCE challenge. */\n create: (body: CliAuthRequestCreate) =>\n client.POST(\"/v1/cli-auth/requests\", { body }),\n /** Inspect a signed request before displaying the web consent screen. */\n inspect: (body: CliAuthInspectRequest) =>\n client.POST(\"/v1/cli-auth/inspect\", { body }),\n /** Approve a request using the client's authenticated user session. */\n approve: (body: CliAuthApproveRequest) =>\n client.POST(\"/v1/cli-auth/approve\", { body }),\n /** Exchange an approved request and verifier for the one-time raw key. */\n exchange: (body: CliAuthExchangeRequest) =>\n client.POST(\"/v1/cli-auth/token\", { body }),\n },\n catalog: {\n /** Catalog capabilities and visibility for the caller. */\n access: () => client.GET(\"/v1/catalog/access\"),\n /**\n * List public catalog coffees (paginated). Pass `headers` to send the\n * `Prefer: handling=lenient|strict` override (see {@link CatalogListHeaders}).\n */\n list: (query?: CatalogListQuery, headers?: CatalogListHeaders) =>\n client.GET(\"/v1/catalog\", { params: { query, header: headers } }),\n /** Deterministic clusters, canonical place features, and elevation profile. */\n map: (query?: CatalogMapQuery, headers?: CatalogMapHeaders) =>\n client.GET(\"/v1/catalog/map\", {\n params: { query, header: headers },\n }),\n /**\n * Catalog filter metadata and counted facets. Pass `headers` to send the\n * `Prefer: handling=lenient|strict` override (see {@link CatalogFacetsHeaders}).\n */\n facets: (query?: CatalogFacetsQuery, headers?: CatalogFacetsHeaders) =>\n client.GET(\"/v1/catalog/facets\", {\n params: { query, header: headers },\n }),\n /** Live catalog price context by origin. */\n originPriceStats: (query?: CatalogOriginPriceStatsQuery) =>\n client.GET(\"/v1/catalog/origin-price-stats\", { params: { query } }),\n /** Aggregate stats over the caller-visible catalog. */\n stats: (query?: CatalogStatsQuery) =>\n client.GET(\"/v1/catalog/stats\", { params: { query } }),\n /** Rank caller-visible catalog coffees by deterministic objectives. */\n rank: (query?: CatalogRankQuery, headers?: CatalogRankHeaders) =>\n client.GET(\"/v1/catalog/rank\", {\n params: { query, header: headers },\n }),\n /** Rank premium catalog candidates by Purveyor Score. */\n rankPremium: (\n query?: CatalogRankPremiumQuery,\n headers?: CatalogRankPremiumHeaders,\n ) =>\n client.GET(\"/v1/catalog/rank-premium\", {\n params: { query, header: headers },\n }),\n /** List supplier aggregates over caller-visible catalog coffees. */\n suppliers: (\n query?: CatalogSuppliersQuery,\n headers?: CatalogSupplierHeaders,\n ) =>\n client.GET(\"/v1/catalog/suppliers\", {\n params: { query, header: headers },\n }),\n /** Return aggregate detail for a supplier query. */\n supplierDetail: (\n query: CatalogSupplierDetailQuery,\n headers?: CatalogSupplierHeaders,\n ) =>\n client.GET(\"/v1/catalog/suppliers/detail\", {\n params: { query, header: headers },\n }),\n /** Rank suppliers by catalog score and availability. */\n supplierRank: (\n query?: CatalogSupplierRankQuery,\n headers?: CatalogSupplierHeaders,\n ) =>\n client.GET(\"/v1/catalog/suppliers/rank\", {\n params: { query, header: headers },\n }),\n /** Aggregate proof-coverage over the public catalog. */\n proofCoverage: () => client.GET(\"/v1/catalog/proof-coverage\"),\n /** Find catalog coffees similar to a target coffee. */\n similar: (id: string, query?: CatalogSimilarQuery) =>\n client.GET(\"/v1/catalog/{id}/similar\", {\n params: { path: { id }, query },\n }),\n },\n priceIndex: {\n /** Fresh matched-listing movement, not catalog composition or a canonical publication. */\n comparison: (query: {\n from: string;\n to: string;\n origin: string;\n wholesale?: \"true\" | \"false\";\n }) => client.GET(\"/v1/price-index/comparison\", { params: { query } }),\n /** Parchment Price Index (aggregate snapshots). */\n list: (query?: PriceIndexQuery) =>\n client.GET(\"/v1/price-index\", { params: { query } }),\n /** Tier-one price-index chart history. */\n history: (query?: PriceIndexHistoryQuery) =>\n client.GET(\"/v1/price-index/history\", { params: { query } }),\n /** Price movement significance stats (precomputed). */\n stats: (query?: PriceIndexStatsQuery) =>\n client.GET(\"/v1/price-index/stats\", { params: { query } }),\n },\n market: {\n /** Aggregate daily changes, catalog coverage, movement, processing, and origin prices. */\n overview: () => client.GET(\"/v1/market/overview\"),\n /** Entitled named-lot and supplier evidence over the public catalog. */\n evidence: () => client.GET(\"/v1/market/evidence\"),\n /** Actionable market value signals. */\n signals: (query?: MarketSignalsQuery) =>\n client.GET(\"/v1/market/signals\", { params: { query } }),\n /** Metadata-trend index (process/disclosure/Purveyor Score over time). */\n metadataIndex: (query?: MetadataIndexQuery) =>\n client.GET(\"/v1/market/metadata-index\", { params: { query } }),\n },\n procurement: {\n briefs: {\n /** List the caller's saved sourcing briefs. */\n list: () => client.GET(\"/v1/procurement/briefs\"),\n /** Create a saved sourcing brief. */\n create: (body: SourcingBriefCreateRequest) =>\n client.POST(\"/v1/procurement/briefs\", { body }),\n /** Fetch one of the caller's sourcing briefs by id. */\n get: (id: string) =>\n client.GET(\"/v1/procurement/briefs/{id}\", {\n params: { path: { id } },\n }),\n /** Run a saved brief against the catalog (paginated matches). */\n matches: (id: string, query?: BriefMatchesQuery) =>\n client.GET(\"/v1/procurement/briefs/{id}/matches\", {\n params: { path: { id }, query },\n }),\n },\n },\n portfolio: {\n trackedLots: {\n /**\n * List an owner-scoped tracked catalog-id page and bounded recent\n * summaries enriched with live catalog state. Follow nextCursor when\n * a capped response reports truncation.\n */\n list: (query?: TrackedLotsListQuery) =>\n client.GET(\"/v1/portfolio/tracked-lots\", {\n params: { query },\n }),\n /** Idempotently set a visible catalog lot to tracked. */\n track: (catalogId: number) =>\n client.PUT(\"/v1/portfolio/tracked-lots/{catalogId}\", {\n params: { path: { catalogId } },\n }),\n /** Idempotently set an owner catalog lot to untracked. */\n untrack: (catalogId: number) =>\n client.DELETE(\"/v1/portfolio/tracked-lots/{catalogId}\", {\n params: { path: { catalogId } },\n }),\n },\n },\n confirmedActions: {\n /**\n * Execute or replay one user-confirmed product action. Session-only;\n * executionId is the durable payload-bound replay key.\n */\n execute: (body: ConfirmedActionExecuteRequest) =>\n client.POST(\"/v1/confirmed-actions/execute\", { body }),\n },\n conversation: {\n workspaces: {\n /** Get or create the session owner's singleton workspace. */\n getOrCreate: (body: ConversationWorkspaceCreateRequest) =>\n client.POST(\"/v1/conversation/workspaces\", { body }),\n /** Read the bounded canonical workspace and message state. */\n get: (workspaceId: string, messageLimit = 50) =>\n client.GET(\"/v1/conversation/workspaces/{workspaceId}\", {\n params: { path: { workspaceId }, query: { messageLimit } },\n }),\n /** Update owner workspace title or type. */\n update: (\n workspaceId: string,\n body: ConversationWorkspaceMetadataRequest,\n ) =>\n client.PATCH(\"/v1/conversation/workspaces/{workspaceId}\", {\n params: { path: { workspaceId } },\n body,\n }),\n messages: {\n /** Append or replay payload-bound messages under a reset epoch. */\n append: (\n workspaceId: string,\n body: ConversationMessageAppendRequest,\n ) =>\n client.POST(\"/v1/conversation/workspaces/{workspaceId}/messages\", {\n params: { path: { workspaceId } },\n body,\n }),\n /** Clear messages and advance the workspace reset epoch. */\n clear: (\n workspaceId: string,\n body: ConversationWorkspaceClearRequest,\n ) =>\n client.POST(\n \"/v1/conversation/workspaces/{workspaceId}/messages/clear\",\n { params: { path: { workspaceId } }, body },\n ),\n },\n /** Optimistically replace canvas state. */\n updateCanvas: (\n workspaceId: string,\n body: ConversationCanvasUpdateRequest,\n ) =>\n client.PUT(\"/v1/conversation/workspaces/{workspaceId}/canvas\", {\n params: { path: { workspaceId } },\n body,\n }),\n /** Read bounded inputs for summary compaction. */\n getCompactionInputs: (workspaceId: string, messageLimit = 30) =>\n client.GET(\n \"/v1/conversation/workspaces/{workspaceId}/compaction-inputs\",\n {\n params: { path: { workspaceId }, query: { messageLimit } },\n },\n ),\n /** Commit a summary only if epoch, version, and high-water still match. */\n updateSummary: (\n workspaceId: string,\n body: ConversationSummaryUpdateRequest,\n ) =>\n client.PUT(\"/v1/conversation/workspaces/{workspaceId}/summary\", {\n params: { path: { workspaceId } },\n body,\n }),\n /** Generate and CAS-commit a Parchment-owned workspace summary. */\n compactSummary: (workspaceId: string) =>\n client.POST(\n \"/v1/conversation/workspaces/{workspaceId}/summary/compact\",\n { params: { path: { workspaceId } } },\n ),\n },\n memory: {\n /** Read the session owner's versioned durable memory. */\n get: () => client.GET(\"/v1/conversation/memory\"),\n /** Optimistically update session-owner memory. */\n update: (body: ConversationMemoryUpdateRequest) =>\n client.PUT(\"/v1/conversation/memory\", { body }),\n },\n },\n inventory: {\n /** List the caller's own green-coffee inventory (owner-scoped). */\n list: (query?: InventoryListQuery) =>\n client.GET(\"/v1/inventory\", { params: { query } }),\n shareGrants: {\n /**\n * Mint or replay a bounded cross-principal inventory capability. The\n * operation UUID is payload-bound and the raw token is returned only\n * by this response.\n */\n create: (body: InventoryShareGrantCreateRequest) =>\n client.POST(\"/v1/inventory/share-grants\", { body }),\n /**\n * Redeem a capability supplied in JSON (never in a URL). This helper\n * does not require the client to be configured with a bearer token.\n */\n redeem: (body: InventoryShareGrantRedeemRequest) =>\n client.POST(\"/v1/inventory/share-grants/redeem\", { body }),\n },\n /**\n * Create an owner inventory lot. Requires a session or an owner-bound API\n * key carrying the exact `inventory:write` scope. Manual coffee creates\n * require `idempotencyKey`; catalog-backed creates accept it optionally.\n * The same key and payload replay the original result.\n */\n create: createInventory,\n /**\n * Atomically create owner-private manual inventory lots. The required\n * idempotency UUID is the stable batch identity and can be reconciled\n * with `getManualBatch` after an uncertain response.\n */\n createManualBatch: (\n body: ManualInventoryBatchCreateRequest,\n options: { idempotencyKey: string },\n ) =>\n client.POST(\"/v1/inventory/manual-batches\", {\n params: {\n header: { \"idempotency-key\": options.idempotencyKey },\n },\n body,\n }),\n /** Return the durable terminal result for a manual inventory batch. */\n getManualBatch: (batchId: string) =>\n client.GET(\"/v1/inventory/manual-batches/{batchId}\", {\n params: { path: { batchId } },\n }),\n /**\n * Durably reserve a complete manual-batch request. Once accepted, clients\n * only need to persist the batch UUID.\n */\n reserveManualBatch: (body: ManualInventoryBatchReserveRequest) =>\n client.POST(\"/v1/inventory/manual-batches/reservations\", { body }),\n /** Commit a reserved batch by UUID with no request body. */\n commitManualBatch: (batchId: string) =>\n client.POST(\"/v1/inventory/manual-batches/{batchId}/commit\", {\n params: { path: { batchId } },\n }),\n /**\n * Get unknown, accepted, in-progress, completed, or terminal-rejected\n * state. Unknown is explicitly nonterminal, including missing or\n * cross-tenant UUIDs, so clients retain the UUID and retry.\n */\n getManualBatchStatus: (batchId: string) =>\n client.GET(\"/v1/inventory/manual-batches/{batchId}/status\", {\n params: { path: { batchId } },\n }),\n /** Durably reserve canonical catalog-backed inventory intent. */\n reserveCatalogBatch: (body: CatalogInventoryBatchReserveRequest) =>\n client.POST(\"/v1/inventory/catalog-batches/reservations\", { body }),\n /** Atomically commit a reserved catalog batch by UUID, with no body. */\n commitCatalogBatch: (batchId: string) =>\n client.POST(\"/v1/inventory/catalog-batches/{batchId}/commit\", {\n params: { path: { batchId } },\n }),\n /** Recover the owner-scoped lifecycle; missing batches remain unknown. */\n getCatalogBatchStatus: (batchId: string) =>\n client.GET(\"/v1/inventory/catalog-batches/{batchId}/status\", {\n params: { path: { batchId } },\n }),\n /**\n * Update one of the caller's own inventory rows. Pass `ifMatch` (the\n * row's `last_updated`) to enable optimistic concurrency (409 on mismatch).\n */\n update: (\n id: number,\n body: InventoryUpdateRequest,\n options?: { ifMatch?: string },\n ) =>\n client.PATCH(\"/v1/inventory/{id}\", {\n params: {\n path: { id },\n header: options?.ifMatch\n ? { \"if-match\": options.ifMatch }\n : undefined,\n },\n body,\n }),\n /**\n * Delete one of the caller's own inventory rows. Returns 409 if dependent\n * roast profiles or sales exist (no force-cascade).\n */\n delete: (id: number) =>\n client.DELETE(\"/v1/inventory/{id}\", { params: { path: { id } } }),\n },\n roasts: {\n /** Match Artisan roast metadata to one of the supplied inventory rows. */\n classify: (body: RoastClassificationRequest) =>\n client.POST(\"/v1/roasts/classify\", { body }),\n /** List the caller's own roast profiles (owner-scoped). */\n list: (query?: RoastListQuery) =>\n client.GET(\"/v1/roasts\", { params: { query } }),\n /**\n * Fetch one of the caller's roast profiles by id, optionally with its\n * temperature curve (`includeTemps`) and event markers (`includeEvents`).\n */\n get: (id: string, query?: RoastGetQuery) =>\n client.GET(\"/v1/roasts/{id}\", { params: { path: { id }, query } }),\n /** Fetch an owner roast's adaptively sampled chart curve and metadata. */\n chartData: (id: string, query?: RoastChartDataQuery) =>\n client.GET(\"/v1/roasts/{id}/chart-data\", {\n params: { path: { id }, query },\n }),\n /**\n * Create an owner roast profile, optionally with nested temperature/event\n * rows. Requires a session or an owner-bound API key carrying the exact\n * `roast:write` scope. The optional `idempotencyKey` is payload-bound:\n * same-key, same-payload retries replay, while changed payloads conflict.\n */\n create: (\n body: RoastCreateRequest,\n options?: { idempotencyKey?: string },\n ) =>\n client.POST(\"/v1/roasts\", {\n body,\n params: options?.idempotencyKey\n ? { header: { \"idempotency-key\": options.idempotencyKey } }\n : undefined,\n }),\n /**\n * Create every profile in one named batch atomically. The required\n * payload-bound idempotency key makes transport retries safe.\n */\n createBatch: (body: RoastBatchCreateRequest, idempotencyKey: string) =>\n client.POST(\"/v1/roasts/batches\", {\n body,\n params: { header: { \"idempotency-key\": idempotencyKey } },\n }),\n /**\n * Update one of the caller's own roast profiles. Pass `ifMatch` (the\n * row's `last_updated`) to enable optimistic concurrency (409 on mismatch).\n */\n update: (\n id: number,\n body: RoastUpdateRequest,\n options?: { ifMatch?: string },\n ) =>\n client.PATCH(\"/v1/roasts/{id}\", {\n params: {\n path: { id },\n header: options?.ifMatch\n ? { \"if-match\": options.ifMatch }\n : undefined,\n },\n body,\n }),\n /** Delete one of the caller's own roast profiles. */\n delete: (id: number) =>\n client.DELETE(\"/v1/roasts/{id}\", { params: { path: { id } } }),\n /** Delete every owner roast carrying one exact batch name. Session-only. */\n deleteBatch: (batchName: string) =>\n client.DELETE(\"/v1/roasts/batches/{batchName}\", {\n params: { path: { batchName } },\n }),\n /**\n * Replace live temperature samples and all event markers atomically,\n * while preserving non-live temperatures and deriving milestone fields.\n */\n replaceLiveCurve: (\n id: number,\n body: RoastLiveCurveRequest,\n options?: { ifMatch?: string },\n ) =>\n client.PUT(\"/v1/roasts/{id}/live-curve\", {\n params: {\n path: { id },\n header: options?.ifMatch\n ? { \"if-match\": options.ifMatch }\n : undefined,\n },\n body,\n }),\n /**\n * Create a roast profile from an Artisan `.alog` file against one of the\n * caller's green-coffee lots, persisting the imported curve, events, and\n * an artisan_import_log entry atomically. Requires a session or an\n * owner-bound API key carrying the exact `roast:write` scope. The\n * optional `idempotencyKey` is payload-bound: same-key, same-payload\n * retries replay, while changed payloads conflict.\n */\n import: (\n body: RoastImportRequest,\n options?: { idempotencyKey?: string },\n ) =>\n client.POST(\"/v1/roasts/imports\", {\n body,\n params: options?.idempotencyKey\n ? { header: { \"idempotency-key\": options.idempotencyKey } }\n : undefined,\n }),\n /**\n * Replace the Artisan import data on one of the caller's existing roasts,\n * re-deriving its curve, events, and computed metrics while preserving the\n * roast's identity. Pass `ifMatch` (the roast's `last_updated`) to enable\n * optimistic concurrency (409 on mismatch).\n */\n replaceArtisanImport: (\n id: number,\n body: RoastArtisanImportReplaceRequest,\n options?: { ifMatch?: string },\n ) =>\n client.PUT(\"/v1/roasts/{id}/artisan-import\", {\n params: {\n path: { id },\n header: options?.ifMatch\n ? { \"if-match\": options.ifMatch }\n : undefined,\n },\n body,\n }),\n /**\n * Clear import-derived curve, events, metrics, and provenance data from\n * one of the caller's existing roasts without deleting the roast profile.\n */\n clearArtisanImport: (id: number) =>\n client.DELETE(\"/v1/roasts/{id}/artisan-import\", {\n params: { path: { id } },\n }),\n },\n sales: {\n /** List the caller's own sales (owner-scoped). */\n list: (query?: SalesListQuery) =>\n client.GET(\"/v1/sales\", { params: { query } }),\n /**\n * Record a sale against one of the caller's own green-coffee inventory\n * lots. Requires a session or an owner-bound API key carrying the exact\n * `sales:write` scope. The optional `idempotencyKey` is payload-bound:\n * same-key, same-payload retries replay, while changed payloads or a\n * concurrent duplicate return 409.\n */\n create: (\n body: SalesCreateRequest,\n options?: { idempotencyKey?: string },\n ) =>\n client.POST(\"/v1/sales\", {\n body,\n params: options?.idempotencyKey\n ? { header: { \"idempotency-key\": options.idempotencyKey } }\n : undefined,\n }),\n /**\n * Update one of the caller's own sales. The sales table carries no\n * `last_updated` column, so no If-Match optimistic concurrency is\n * offered.\n */\n update: (id: number, body: SalesUpdateRequest) =>\n client.PATCH(\"/v1/sales/{id}\", {\n params: { path: { id } },\n body,\n }),\n /** Delete one of the caller's own sales. */\n delete: (id: number) =>\n client.DELETE(\"/v1/sales/{id}\", { params: { path: { id } } }),\n },\n profit: {\n /**\n * List the caller's owner-scoped profit summaries. API keys require\n * inventory:read, roast:read, and sales:read. Use pagination.total to\n * exhaust the complete owner result set.\n */\n list: (query?: ProfitListQuery) =>\n client.GET(\"/v1/profit\", { params: { query } }),\n },\n tasting: {\n /** Fetch supplier notes plus the caller's own latest tasting notes. */\n get: (catalogId: string, query?: TastingGetQuery) =>\n client.GET(\"/v1/tasting/{catalogId}\", {\n params: { path: { catalogId }, query },\n }),\n /** Replace the caller's rating for one owned inventory lot. */\n rate: (inventoryId: number, body: TastingRateRequest) =>\n client.PUT(\"/v1/tasting/inventory/{inventoryId}\", {\n params: { path: { inventoryId } },\n body,\n }),\n },\n };\n}\n\nexport type ParchmentClient = ReturnType<typeof createParchmentClient>;\n"],"mappings":";AAAA,OAAO,kBAA0C;AAmW1C,SAAS,sBAAsB,SAAiC;AACrE,QAAM,EAAE,SAAS,OAAO,OAAO,UAAU,IAAI;AAE7C,QAAM,SAAS,aAAoB;AAAA,IACjC;AAAA,IACA,OAAO;AAAA,IACP,SAAS,QAAQ,EAAE,eAAe,UAAU,KAAK,GAAG,IAAI;AAAA,EAC1D,CAAC;AAED,QAAM,gBAAgB,CACpB,MACAA,aAEA,OAAO,KAAK,iBAAiB;AAAA,IAC3B;AAAA,IACA,QAAQA,UAAS,iBACb,EAAE,QAAQ,EAAE,mBAAmBA,SAAQ,eAAe,EAAE,IACxD;AAAA,EACN,C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src/client.ts"],"sourcesContent":["import createClient, { type ClientOptions } from \"openapi-fetch\";\nimport type { components, paths } from \"./schema\";\n\nexport interface ParchmentClientOptions {\n /** Base URL of the Parchment API, e.g. https://api.purveyors.io */\n baseUrl: string;\n /**\n * Optional bearer token (a Supabase JWT, API key, or dedicated machine\n * credential). Sent as\n * `Authorization: Bearer <token>`. Auth is resolved server-side at the route\n * boundary; the SDK only forwards the credential.\n */\n token?: string;\n /** Override the fetch implementation (useful for tests or custom runtimes). */\n fetch?: ClientOptions[\"fetch\"];\n}\n\n/** Query parameters for {@link ParchmentClient.catalog.list}. */\nexport type CatalogListQuery = NonNullable<\n paths[\"/v1/catalog\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** A catalog row returned by the canonical listing resource. */\nexport type CatalogItem = components[\"schemas\"][\"CatalogItem\"];\n/** API-owned row-level trust summary returned when `include=proof`. */\nexport type CatalogProofSummary = components[\"schemas\"][\"CatalogProofSummary\"];\n/** Query parameters for {@link ParchmentClient.catalog.facets}. */\nexport type CatalogFacetsQuery = NonNullable<\n paths[\"/v1/catalog/facets\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/**\n * Optional headers for {@link ParchmentClient.catalog.list}, notably the\n * RFC 7240 `Prefer: handling=lenient|strict` override (PADR-0013 §7). Sending\n * `handling=lenient` opts a strict caller (API key or bearer-session JWT) back\n * into strip-with-notice degradation instead of a 401/403 hard-deny.\n */\nexport type CatalogListHeaders = NonNullable<\n paths[\"/v1/catalog\"][\"get\"][\"parameters\"][\"header\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.map}. */\nexport type CatalogMapQuery = NonNullable<\n paths[\"/v1/catalog/map\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Optional handling headers for {@link ParchmentClient.catalog.map}. */\nexport type CatalogMapHeaders = NonNullable<\n paths[\"/v1/catalog/map\"][\"get\"][\"parameters\"][\"header\"]\n>;\n/** Lightweight map projection over the caller-visible catalog. */\nexport type CatalogMapResponse = components[\"schemas\"][\"CatalogMapResponse\"];\n/** Optional headers for {@link ParchmentClient.catalog.facets}; see {@link CatalogListHeaders}. */\nexport type CatalogFacetsHeaders = NonNullable<\n paths[\"/v1/catalog/facets\"][\"get\"][\"parameters\"][\"header\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.originPriceStats}. */\nexport type CatalogOriginPriceStatsQuery = NonNullable<\n paths[\"/v1/catalog/origin-price-stats\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.stats}. */\nexport type CatalogStatsQuery = NonNullable<\n paths[\"/v1/catalog/stats\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.rank}. */\nexport type CatalogRankQuery = NonNullable<\n paths[\"/v1/catalog/rank\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.rankPremium}. */\nexport type CatalogRankPremiumQuery = NonNullable<\n paths[\"/v1/catalog/rank-premium\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.suppliers}. */\nexport type CatalogSuppliersQuery = NonNullable<\n paths[\"/v1/catalog/suppliers\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.supplierDetail}. */\nexport type CatalogSupplierDetailQuery = NonNullable<\n paths[\"/v1/catalog/suppliers/detail\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.supplierRank}. */\nexport type CatalogSupplierRankQuery = NonNullable<\n paths[\"/v1/catalog/suppliers/rank\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Optional headers for ranking endpoints; see {@link CatalogListHeaders}. */\nexport type CatalogRankHeaders = NonNullable<\n paths[\"/v1/catalog/rank\"][\"get\"][\"parameters\"][\"header\"]\n>;\n/** Optional headers for premium ranking endpoints; see {@link CatalogListHeaders}. */\nexport type CatalogRankPremiumHeaders = NonNullable<\n paths[\"/v1/catalog/rank-premium\"][\"get\"][\"parameters\"][\"header\"]\n>;\n/** Optional headers for supplier aggregate endpoints; see {@link CatalogListHeaders}. */\nexport type CatalogSupplierHeaders = NonNullable<\n paths[\"/v1/catalog/suppliers\"][\"get\"][\"parameters\"][\"header\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.similar}. */\nexport type CatalogSimilarQuery = NonNullable<\n paths[\"/v1/catalog/{id}/similar\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.priceIndex.list}. */\nexport type PriceIndexQuery = NonNullable<\n paths[\"/v1/price-index\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.priceIndex.history}. */\nexport type PriceIndexHistoryQuery = NonNullable<\n paths[\"/v1/price-index/history\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.market.signals}. */\nexport type MarketSignalsQuery = NonNullable<\n paths[\"/v1/market/signals\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Aggregate-only public green-coffee market evidence. */\nexport type MarketOverview = components[\"schemas\"][\"MarketOverviewResponse\"];\n/** Named public-catalog and supplier evidence for Parchment Intelligence callers. */\nexport type MarketEvidence = components[\"schemas\"][\"MarketEvidenceResponse\"];\n/** Query parameters for {@link ParchmentClient.priceIndex.stats}. */\nexport type PriceIndexStatsQuery = NonNullable<\n paths[\"/v1/price-index/stats\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.market.metadataIndex}. */\nexport type MetadataIndexQuery = NonNullable<\n paths[\"/v1/market/metadata-index\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.procurement.briefs.matches}. */\nexport type BriefMatchesQuery = NonNullable<\n paths[\"/v1/procurement/briefs/{id}/matches\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Request body for {@link ParchmentClient.procurement.briefs.create}. */\nexport type SourcingBriefCreateRequest =\n components[\"schemas\"][\"SourcingBriefCreateRequest\"];\n/** Query parameters for {@link ParchmentClient.portfolio.trackedLots.list}. */\nexport type TrackedLotsListQuery = NonNullable<\n paths[\"/v1/portfolio/tracked-lots\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** A tracked catalog lot enriched with current catalog and price state. */\nexport type TrackedLotSummary = components[\"schemas\"][\"TrackedLotSummary\"];\n/** State returned by tracked-lot PUT and DELETE mutations. */\nexport type TrackedLotMutation =\n components[\"schemas\"][\"TrackedLotMutationResponse\"];\n/** Closed session-only command for {@link ParchmentClient.confirmedActions.execute}. */\nexport type ConfirmedActionExecuteRequest = NonNullable<\n paths[\"/v1/confirmed-actions/execute\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Create-or-get body for {@link ParchmentClient.conversation.workspaces.getOrCreate}. */\nexport type ConversationWorkspaceCreateRequest = NonNullable<\n paths[\"/v1/conversation/workspaces\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\nexport type ConversationWorkspaceMetadataRequest = NonNullable<\n paths[\"/v1/conversation/workspaces/{workspaceId}\"][\"patch\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\nexport type ConversationMessageAppendRequest = NonNullable<\n paths[\"/v1/conversation/workspaces/{workspaceId}/messages\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\nexport type ConversationWorkspaceClearRequest = NonNullable<\n paths[\"/v1/conversation/workspaces/{workspaceId}/messages/clear\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\nexport type ConversationCanvasUpdateRequest = NonNullable<\n paths[\"/v1/conversation/workspaces/{workspaceId}/canvas\"][\"put\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\nexport type ConversationSummaryUpdateRequest = NonNullable<\n paths[\"/v1/conversation/workspaces/{workspaceId}/summary\"][\"put\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\nexport type ConversationMemoryUpdateRequest = NonNullable<\n paths[\"/v1/conversation/memory\"][\"put\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Query parameters for {@link ParchmentClient.inventory.list}. */\nexport type InventoryListQuery = NonNullable<\n paths[\"/v1/inventory\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Request body for {@link ParchmentClient.inventory.create}. */\nexport type InventoryCreateRequest = NonNullable<\n paths[\"/v1/inventory\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Stable-operation request for {@link ParchmentClient.inventory.shareGrants.create}. */\nexport type InventoryShareGrantCreateRequest = NonNullable<\n paths[\"/v1/inventory/share-grants\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** The one-time raw-token grant returned by create or same-operation replay. */\nexport type InventoryShareGrant = components[\"schemas\"][\"InventoryShareGrant\"];\n/** Anonymous capability body for {@link ParchmentClient.inventory.shareGrants.redeem}. */\nexport type InventoryShareGrantRedeemRequest = NonNullable<\n paths[\"/v1/inventory/share-grants/redeem\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Safe legacy-oriented inventory row returned by capability redemption. */\nexport type InventoryShareInventory =\n components[\"schemas\"][\"InventoryShareInventory\"];\n/** Catalog allowlist nested in a shared inventory row. */\nexport type InventoryShareCatalog =\n components[\"schemas\"][\"InventoryShareCatalog\"];\n/** Six-field roast summary nested in member/admin shares. */\nexport type InventoryShareRoastSummary =\n components[\"schemas\"][\"InventoryShareRoastSummary\"];\ntype CatalogInventoryCreateRequest =\n components[\"schemas\"][\"CatalogInventoryCreateRequest\"];\ntype ManualInventoryCreateRequest =\n components[\"schemas\"][\"ManualInventoryCreateRequest\"];\n/** Request body for {@link ParchmentClient.inventory.createManualBatch}. */\nexport type ManualInventoryBatchCreateRequest = NonNullable<\n paths[\"/v1/inventory/manual-batches\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for reserving durable server-owned manual-batch intent. */\nexport type ManualInventoryBatchReserveRequest = NonNullable<\n paths[\"/v1/inventory/manual-batches/reservations\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Complete canonical intent accepted by the catalog-batch reservation lane. */\nexport type CatalogInventoryBatchReserveRequest = NonNullable<\n paths[\"/v1/inventory/catalog-batches/reservations\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Durable catalog-batch state returned by reserve, commit, and status. */\nexport type CatalogInventoryBatchLifecycle =\n components[\"schemas\"][\"CatalogInventoryBatchLifecycle\"];\n/** Identity-only terminal result; catalog resources remain a separate read. */\nexport type CatalogInventoryBatchResult =\n components[\"schemas\"][\"CatalogInventoryBatchResult\"];\n/** Request body for {@link ParchmentClient.inventory.update}. */\nexport type InventoryUpdateRequest = NonNullable<\n paths[\"/v1/inventory/{id}\"][\"patch\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Query parameters for {@link ParchmentClient.roasts.list}. */\nexport type RoastListQuery = NonNullable<\n paths[\"/v1/roasts\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.roasts.get}. */\nexport type RoastGetQuery = NonNullable<\n paths[\"/v1/roasts/{id}\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.roasts.chartData}. */\nexport type RoastChartDataQuery = NonNullable<\n paths[\"/v1/roasts/{id}/chart-data\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Request body for {@link ParchmentClient.roasts.classify}. */\nexport type RoastClassificationRequest = NonNullable<\n paths[\"/v1/roasts/classify\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.roasts.create}. */\nexport type RoastCreateRequest = NonNullable<\n paths[\"/v1/roasts\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Atomic named-batch body for {@link ParchmentClient.roasts.createBatch}. */\nexport type RoastBatchCreateRequest = NonNullable<\n paths[\"/v1/roasts/batches\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.roasts.update}. */\nexport type RoastUpdateRequest = NonNullable<\n paths[\"/v1/roasts/{id}\"][\"patch\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Source-aware live curve body for {@link ParchmentClient.roasts.replaceLiveCurve}. */\nexport type RoastLiveCurveRequest = NonNullable<\n paths[\"/v1/roasts/{id}/live-curve\"][\"put\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.roasts.import}. */\nexport type RoastImportRequest = NonNullable<\n paths[\"/v1/roasts/imports\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.roasts.replaceArtisanImport}. */\nexport type RoastArtisanImportReplaceRequest = NonNullable<\n paths[\"/v1/roasts/{id}/artisan-import\"][\"put\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Query parameters for {@link ParchmentClient.sales.list}. */\nexport type SalesListQuery = NonNullable<\n paths[\"/v1/sales\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.profit.list}. */\nexport type ProfitListQuery = NonNullable<\n paths[\"/v1/profit\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** One owner inventory lot's canonical cost, revenue, and roast summary. */\nexport type ProfitItem = components[\"schemas\"][\"ProfitItem\"];\n/** Request body for {@link ParchmentClient.sales.create}. */\nexport type SalesCreateRequest = NonNullable<\n paths[\"/v1/sales\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.sales.update}. */\nexport type SalesUpdateRequest = NonNullable<\n paths[\"/v1/sales/{id}\"][\"patch\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Query parameters for {@link ParchmentClient.tasting.get}. */\nexport type TastingGetQuery = NonNullable<\n paths[\"/v1/tasting/{catalogId}\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Request body for {@link ParchmentClient.tasting.rate}. */\nexport type TastingRateRequest = NonNullable<\n paths[\"/v1/tasting/inventory/{inventoryId}\"][\"put\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.apiKeys.create}. */\nexport type ApiKeyCreateRequest = NonNullable<\n paths[\"/v1/api-keys\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Query parameters for the session owner's API-key traffic analytics. */\nexport type OwnerApiUsageQuery = NonNullable<\n paths[\"/v1/api-usage\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Bounded owner API-key traffic analytics (not session or billing usage). */\nexport type OwnerApiUsage = components[\"schemas\"][\"OwnerApiUsageResponse\"];\n/** Request body for {@link ParchmentClient.emailSubscriptions.setMarketRead}. */\nexport type MarketReadPreferenceRequest = NonNullable<\n paths[\"/v1/email-subscriptions/market-read\"][\"put\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.emailSubscriptions.unsubscribeMarketRead}. */\nexport type MarketReadUnsubscribeRequest = NonNullable<\n paths[\"/v1/email-subscriptions/market-read/unsubscribe\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Immutable deployed projection accepted by {@link ParchmentClient.marketBrief.drafts.create}. */\nexport type MarketBriefDraftCreateRequest = NonNullable<\n paths[\"/v1/market-brief/drafts\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Durable Parchment-owned provider-draft state. */\nexport type MarketBriefDraftState =\n components[\"schemas\"][\"MarketBriefDraftState\"];\n/** Account-owned Market Read email preference. */\nexport type EmailSubscriptionPreference =\n components[\"schemas\"][\"EmailSubscriptionPreference\"];\n/** Durable state returned by an account-deletion request. */\nexport type AccountDeletionOperation =\n components[\"schemas\"][\"AccountDeletionOperation\"];\n/** Purpose-bound recent-reauthentication assertion for account deletion. */\nexport type AccountDeletionRequest = NonNullable<\n paths[\"/v1/account-deletion\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Purchase-key request for dormant direct Parchment Checkout creation/replay. */\nexport type BillingCheckoutCreateRequest = NonNullable<\n paths[\"/v1/billing/checkout-sessions\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Durable Checkout admission state; provider Session id stays server-side. */\nexport type BillingCheckoutSession =\n components[\"schemas\"][\"BillingCheckoutSession\"];\n/** Durable cancellation/resume request. */\nexport type BillingSubscriptionMutationRequest = NonNullable<\n paths[\"/v1/billing/subscriptions/{subscriptionId}\"][\"patch\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Durable provider subscription-operation state. */\nexport type BillingSubscriptionOperation =\n components[\"schemas\"][\"BillingSubscriptionOperation\"];\n/** Manual entitlement baseline update for administrators. */\nexport type BillingManualEntitlementsRequest = NonNullable<\n paths[\"/v1/admin/billing-entitlements/{ownerId}/manual\"][\"patch\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\nexport type CliAuthRequestCreate = NonNullable<\n paths[\"/v1/cli-auth/requests\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\nexport type CliAuthInspectRequest = NonNullable<\n paths[\"/v1/cli-auth/inspect\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\nexport type CliAuthApproveRequest = NonNullable<\n paths[\"/v1/cli-auth/approve\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\nexport type CliAuthExchangeRequest = NonNullable<\n paths[\"/v1/cli-auth/token\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Browser-compatible AI SDK UI-message stream request. */\nexport type ConversationChatStreamRequest =\n components[\"schemas\"][\"ConversationChatStreamRequest\"];\n\n/**\n * Create a typed Parchment API client.\n *\n * The generated core (openapi-fetch over the generated `paths` types) is the\n * contract truth; the named helpers below are the hand-maintained ergonomic\n * layer and grow as endpoints land. `raw` always exposes the underlying typed\n * client for direct path access to anything not yet wrapped.\n */\nexport function createParchmentClient(options: ParchmentClientOptions) {\n const { baseUrl, token, fetch: fetchImpl } = options;\n\n const client = createClient<paths>({\n baseUrl,\n fetch: fetchImpl,\n headers: token ? { Authorization: `Bearer ${token}` } : undefined,\n });\n\n const postInventory = (\n body: InventoryCreateRequest,\n options?: { idempotencyKey?: string },\n ) =>\n client.POST(\"/v1/inventory\", {\n body,\n params: options?.idempotencyKey\n ? { header: { \"idempotency-key\": options.idempotencyKey } }\n : undefined,\n });\n\n function createInventory(\n body: ManualInventoryCreateRequest,\n options: { idempotencyKey: string },\n ): ReturnType<typeof postInventory>;\n function createInventory(\n body: CatalogInventoryCreateRequest,\n options?: { idempotencyKey?: string },\n ): ReturnType<typeof postInventory>;\n function createInventory(\n body: InventoryCreateRequest,\n options?: { idempotencyKey?: string },\n ): ReturnType<typeof postInventory> {\n return postInventory(body, options);\n }\n\n return {\n /** The underlying typed openapi-fetch client for direct path access. */\n raw: client,\n /** Liveness and service identity. */\n health: () => client.GET(\"/health\"),\n /** Resolved principal and entitlements for the caller. */\n me: () => client.GET(\"/v1/me\"),\n apiKeys: {\n /** List API keys owned by the authenticated session user. */\n list: () => client.GET(\"/v1/api-keys\"),\n /** Create an API key. The raw secret is returned only once. */\n create: (body: ApiKeyCreateRequest) =>\n client.POST(\"/v1/api-keys\", { body }),\n /** Revoke an API key owned by the authenticated session user. */\n revoke: (id: string) =>\n client.DELETE(\"/v1/api-keys/{id}\", {\n params: { path: { id } },\n }),\n /** Rotate an API key and return the replacement secret once. */\n rotate: (id: string) =>\n client.POST(\"/v1/api-keys/{id}/rotate\", {\n params: { path: { id } },\n }),\n },\n apiUsage: {\n /**\n * Read bounded API-key traffic analytics for the authenticated session\n * owner. Headline monthly/hourly counts are exact; daily/per-key series\n * carry explicit truncation metadata.\n */\n get: (query?: OwnerApiUsageQuery) =>\n client.GET(\"/v1/api-usage\", { params: { query } }),\n },\n emailSubscriptions: {\n /** Get the authenticated session user's Market Read preference. */\n get: () => client.GET(\"/v1/email-subscriptions\"),\n /** Idempotently set the authenticated session user's Market Read preference. */\n setMarketRead: (body: MarketReadPreferenceRequest) =>\n client.PUT(\"/v1/email-subscriptions/market-read\", { body }),\n /** Idempotently unsubscribe using an opaque capability without requiring a session. */\n unsubscribeMarketRead: (body: MarketReadUnsubscribeRequest) =>\n client.POST(\"/v1/email-subscriptions/market-read/unsubscribe\", {\n body,\n }),\n },\n marketBrief: {\n drafts: {\n /** Accept, create, or recover one immutable deployed edition version. */\n create: (body: MarketBriefDraftCreateRequest) =>\n client.POST(\"/v1/market-brief/drafts\", { body }),\n },\n },\n accountDeletion: {\n /** Accept or replay deletion using a purpose-bound reauthentication assertion. */\n request: (body: AccountDeletionRequest) =>\n client.POST(\"/v1/account-deletion\", { body }),\n },\n billing: {\n checkout: {\n /** Create or replay an embedded Checkout Session after activation. */\n create: (body: BillingCheckoutCreateRequest) =>\n client.POST(\"/v1/billing/checkout-sessions\", { body }),\n /** Read owner-bound durable admission state. */\n get: (admissionId: string) =>\n client.GET(\"/v1/billing/checkout-sessions/{admissionId}\", {\n params: { path: { admissionId } },\n }),\n /** Authoritatively reconcile an admission with Stripe. */\n reconcile: (admissionId: string) =>\n client.POST(\"/v1/billing/checkout-sessions/{admissionId}/reconcile\", {\n params: { path: { admissionId } },\n }),\n },\n subscriptions: {\n /** List canonical owner subscription snapshots. */\n list: () => client.GET(\"/v1/billing/subscriptions\"),\n /** Durably cancel or resume the complete provider subscription. */\n mutate: (\n subscriptionId: string,\n body: BillingSubscriptionMutationRequest,\n ) =>\n client.PATCH(\"/v1/billing/subscriptions/{subscriptionId}\", {\n params: { path: { subscriptionId } },\n body,\n }),\n },\n },\n billingAdministration: {\n /** Read bounded canonical-entitlement discrepancies. */\n discrepancies: () =>\n client.GET(\"/v1/admin/billing-entitlement-discrepancies\"),\n /** Recompute billing contribution without changing manual grants. */\n recompute: (ownerId: string) =>\n client.POST(\n \"/v1/admin/billing-entitlement-discrepancies/{ownerId}/recompute\",\n { params: { path: { ownerId } } },\n ),\n /** Update the preserved manual entitlement baseline. */\n setManual: (ownerId: string, body: BillingManualEntitlementsRequest) =>\n client.PATCH(\"/v1/admin/billing-entitlements/{ownerId}/manual\", {\n params: { path: { ownerId } },\n body,\n }),\n },\n cliAuth: {\n /** Create a signed, short-lived login request bound to a PKCE challenge. */\n create: (body: CliAuthRequestCreate) =>\n client.POST(\"/v1/cli-auth/requests\", { body }),\n /** Inspect a signed request before displaying the web consent screen. */\n inspect: (body: CliAuthInspectRequest) =>\n client.POST(\"/v1/cli-auth/inspect\", { body }),\n /** Approve a request using the client's authenticated user session. */\n approve: (body: CliAuthApproveRequest) =>\n client.POST(\"/v1/cli-auth/approve\", { body }),\n /** Exchange an approved request and verifier for the one-time raw key. */\n exchange: (body: CliAuthExchangeRequest) =>\n client.POST(\"/v1/cli-auth/token\", { body }),\n },\n catalog: {\n /** Catalog capabilities and visibility for the caller. */\n access: () => client.GET(\"/v1/catalog/access\"),\n /**\n * List public catalog coffees (paginated). Pass `headers` to send the\n * `Prefer: handling=lenient|strict` override (see {@link CatalogListHeaders}).\n */\n list: (query?: CatalogListQuery, headers?: CatalogListHeaders) =>\n client.GET(\"/v1/catalog\", { params: { query, header: headers } }),\n /** Deterministic clusters, canonical place features, and elevation profile. */\n map: (query?: CatalogMapQuery, headers?: CatalogMapHeaders) =>\n client.GET(\"/v1/catalog/map\", {\n params: { query, header: headers },\n }),\n /**\n * Catalog filter metadata and counted facets. Pass `headers` to send the\n * `Prefer: handling=lenient|strict` override (see {@link CatalogFacetsHeaders}).\n */\n facets: (query?: CatalogFacetsQuery, headers?: CatalogFacetsHeaders) =>\n client.GET(\"/v1/catalog/facets\", {\n params: { query, header: headers },\n }),\n /** Live catalog price context by origin. */\n originPriceStats: (query?: CatalogOriginPriceStatsQuery) =>\n client.GET(\"/v1/catalog/origin-price-stats\", { params: { query } }),\n /** Aggregate stats over the caller-visible catalog. */\n stats: (query?: CatalogStatsQuery) =>\n client.GET(\"/v1/catalog/stats\", { params: { query } }),\n /** Rank caller-visible catalog coffees by deterministic objectives. */\n rank: (query?: CatalogRankQuery, headers?: CatalogRankHeaders) =>\n client.GET(\"/v1/catalog/rank\", {\n params: { query, header: headers },\n }),\n /** Rank premium catalog candidates by Purveyor Score. */\n rankPremium: (\n query?: CatalogRankPremiumQuery,\n headers?: CatalogRankPremiumHeaders,\n ) =>\n client.GET(\"/v1/catalog/rank-premium\", {\n params: { query, header: headers },\n }),\n /** List supplier aggregates over caller-visible catalog coffees. */\n suppliers: (\n query?: CatalogSuppliersQuery,\n headers?: CatalogSupplierHeaders,\n ) =>\n client.GET(\"/v1/catalog/suppliers\", {\n params: { query, header: headers },\n }),\n /** Return aggregate detail for a supplier query. */\n supplierDetail: (\n query: CatalogSupplierDetailQuery,\n headers?: CatalogSupplierHeaders,\n ) =>\n client.GET(\"/v1/catalog/suppliers/detail\", {\n params: { query, header: headers },\n }),\n /** Rank suppliers by catalog score and availability. */\n supplierRank: (\n query?: CatalogSupplierRankQuery,\n headers?: CatalogSupplierHeaders,\n ) =>\n client.GET(\"/v1/catalog/suppliers/rank\", {\n params: { query, header: headers },\n }),\n /** Aggregate proof-coverage over the public catalog. */\n proofCoverage: () => client.GET(\"/v1/catalog/proof-coverage\"),\n /** Find catalog coffees similar to a target coffee. */\n similar: (id: string, query?: CatalogSimilarQuery) =>\n client.GET(\"/v1/catalog/{id}/similar\", {\n params: { path: { id }, query },\n }),\n },\n priceIndex: {\n /** Available exact 30-day comparisons, with no empty-origin search. */\n comparisons: (query?: { wholesale?: \"true\" | \"false\" | \"all\" }) =>\n client.GET(\"/v1/price-index/comparisons\", { params: { query } }),\n /** Fresh matched-listing movement, not catalog composition or a canonical publication. */\n comparison: (query: {\n from: string;\n to: string;\n origin: string;\n wholesale?: \"true\" | \"false\";\n }) => client.GET(\"/v1/price-index/comparison\", { params: { query } }),\n /** Parchment Price Index (aggregate snapshots). */\n list: (query?: PriceIndexQuery) =>\n client.GET(\"/v1/price-index\", { params: { query } }),\n /** Tier-one price-index chart history. */\n history: (query?: PriceIndexHistoryQuery) =>\n client.GET(\"/v1/price-index/history\", { params: { query } }),\n /** Price movement significance stats (precomputed). */\n stats: (query?: PriceIndexStatsQuery) =>\n client.GET(\"/v1/price-index/stats\", { params: { query } }),\n },\n market: {\n /** Aggregate daily changes, catalog coverage, movement, processing, and origin prices. */\n overview: () => client.GET(\"/v1/market/overview\"),\n /** Entitled named-lot and supplier evidence over the public catalog. */\n evidence: () => client.GET(\"/v1/market/evidence\"),\n /** Actionable market value signals. */\n signals: (query?: MarketSignalsQuery) =>\n client.GET(\"/v1/market/signals\", { params: { query } }),\n /** Metadata-trend index (process/disclosure/Purveyor Score over time). */\n metadataIndex: (query?: MetadataIndexQuery) =>\n client.GET(\"/v1/market/metadata-index\", { params: { query } }),\n },\n procurement: {\n briefs: {\n /** List the caller's saved sourcing briefs. */\n list: () => client.GET(\"/v1/procurement/briefs\"),\n /** Create a saved sourcing brief. */\n create: (body: SourcingBriefCreateRequest) =>\n client.POST(\"/v1/procurement/briefs\", { body }),\n /** Fetch one of the caller's sourcing briefs by id. */\n get: (id: string) =>\n client.GET(\"/v1/procurement/briefs/{id}\", {\n params: { path: { id } },\n }),\n /** Run a saved brief against the catalog (paginated matches). */\n matches: (id: string, query?: BriefMatchesQuery) =>\n client.GET(\"/v1/procurement/briefs/{id}/matches\", {\n params: { path: { id }, query },\n }),\n },\n },\n portfolio: {\n trackedLots: {\n /**\n * List an owner-scoped tracked catalog-id page and bounded recent\n * summaries enriched with live catalog state. Follow nextCursor when\n * a capped response reports truncation.\n */\n list: (query?: TrackedLotsListQuery) =>\n client.GET(\"/v1/portfolio/tracked-lots\", {\n params: { query },\n }),\n /** Idempotently set a visible catalog lot to tracked. */\n track: (catalogId: number) =>\n client.PUT(\"/v1/portfolio/tracked-lots/{catalogId}\", {\n params: { path: { catalogId } },\n }),\n /** Idempotently set an owner catalog lot to untracked. */\n untrack: (catalogId: number) =>\n client.DELETE(\"/v1/portfolio/tracked-lots/{catalogId}\", {\n params: { path: { catalogId } },\n }),\n },\n },\n confirmedActions: {\n /**\n * Execute or replay one user-confirmed product action. Session-only;\n * executionId is the durable payload-bound replay key.\n */\n execute: (body: ConfirmedActionExecuteRequest) =>\n client.POST(\"/v1/confirmed-actions/execute\", { body }),\n },\n conversation: {\n chat: {\n /**\n * Open a raw AI SDK UI-message stream. The response body is deliberately\n * left unread so BFFs and browser transports can forward chunks without\n * buffering. Aborting the supplied signal cancels the upstream request.\n */\n stream: (\n body: ConversationChatStreamRequest,\n init: { signal?: AbortSignal } = {},\n ): Promise<Response> => {\n const requestFetch = fetchImpl ?? globalThis.fetch;\n return requestFetch(\n new Request(`${baseUrl.replace(/\\/$/, \"\")}/v1/conversation/chat`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n ...(token ? { Authorization: `Bearer ${token}` } : {}),\n },\n body: JSON.stringify(body),\n signal: init.signal,\n }),\n );\n },\n },\n workspaces: {\n /** Get or create the session owner's singleton workspace. */\n getOrCreate: (body: ConversationWorkspaceCreateRequest) =>\n client.POST(\"/v1/conversation/workspaces\", { body }),\n /** Read the bounded canonical workspace and message state. */\n get: (workspaceId: string, messageLimit = 50) =>\n client.GET(\"/v1/conversation/workspaces/{workspaceId}\", {\n params: { path: { workspaceId }, query: { messageLimit } },\n }),\n /** Update owner workspace title or type. */\n update: (\n workspaceId: string,\n body: ConversationWorkspaceMetadataRequest,\n ) =>\n client.PATCH(\"/v1/conversation/workspaces/{workspaceId}\", {\n params: { path: { workspaceId } },\n body,\n }),\n messages: {\n /** Append or replay payload-bound messages under a reset epoch. */\n append: (\n workspaceId: string,\n body: ConversationMessageAppendRequest,\n ) =>\n client.POST(\"/v1/conversation/workspaces/{workspaceId}/messages\", {\n params: { path: { workspaceId } },\n body,\n }),\n /** Clear messages and advance the workspace reset epoch. */\n clear: (\n workspaceId: string,\n body: ConversationWorkspaceClearRequest,\n ) =>\n client.POST(\n \"/v1/conversation/workspaces/{workspaceId}/messages/clear\",\n { params: { path: { workspaceId } }, body },\n ),\n },\n /** Optimistically replace canvas state. */\n updateCanvas: (\n workspaceId: string,\n body: ConversationCanvasUpdateRequest,\n ) =>\n client.PUT(\"/v1/conversation/workspaces/{workspaceId}/canvas\", {\n params: { path: { workspaceId } },\n body,\n }),\n /** Read bounded inputs for summary compaction. */\n getCompactionInputs: (workspaceId: string, messageLimit = 30) =>\n client.GET(\n \"/v1/conversation/workspaces/{workspaceId}/compaction-inputs\",\n {\n params: { path: { workspaceId }, query: { messageLimit } },\n },\n ),\n /** Commit a summary only if epoch, version, and high-water still match. */\n updateSummary: (\n workspaceId: string,\n body: ConversationSummaryUpdateRequest,\n ) =>\n client.PUT(\"/v1/conversation/workspaces/{workspaceId}/summary\", {\n params: { path: { workspaceId } },\n body,\n }),\n /** Generate and CAS-commit a Parchment-owned workspace summary. */\n compactSummary: (workspaceId: string) =>\n client.POST(\n \"/v1/conversation/workspaces/{workspaceId}/summary/compact\",\n { params: { path: { workspaceId } } },\n ),\n },\n memory: {\n /** Read the session owner's versioned durable memory. */\n get: () => client.GET(\"/v1/conversation/memory\"),\n /** Optimistically update session-owner memory. */\n update: (body: ConversationMemoryUpdateRequest) =>\n client.PUT(\"/v1/conversation/memory\", { body }),\n },\n },\n inventory: {\n /** List the caller's own green-coffee inventory (owner-scoped). */\n list: (query?: InventoryListQuery) =>\n client.GET(\"/v1/inventory\", { params: { query } }),\n shareGrants: {\n /**\n * Mint or replay a bounded cross-principal inventory capability. The\n * operation UUID is payload-bound and the raw token is returned only\n * by this response.\n */\n create: (body: InventoryShareGrantCreateRequest) =>\n client.POST(\"/v1/inventory/share-grants\", { body }),\n /**\n * Redeem a capability supplied in JSON (never in a URL). This helper\n * does not require the client to be configured with a bearer token.\n */\n redeem: (body: InventoryShareGrantRedeemRequest) =>\n client.POST(\"/v1/inventory/share-grants/redeem\", { body }),\n },\n /**\n * Create an owner inventory lot. Requires a session or an owner-bound API\n * key carrying the exact `inventory:write` scope. Manual coffee creates\n * require `idempotencyKey`; catalog-backed creates accept it optionally.\n * The same key and payload replay the original result.\n */\n create: createInventory,\n /**\n * Atomically create owner-private manual inventory lots. The required\n * idempotency UUID is the stable batch identity and can be reconciled\n * with `getManualBatch` after an uncertain response.\n */\n createManualBatch: (\n body: ManualInventoryBatchCreateRequest,\n options: { idempotencyKey: string },\n ) =>\n client.POST(\"/v1/inventory/manual-batches\", {\n params: {\n header: { \"idempotency-key\": options.idempotencyKey },\n },\n body,\n }),\n /** Return the durable terminal result for a manual inventory batch. */\n getManualBatch: (batchId: string) =>\n client.GET(\"/v1/inventory/manual-batches/{batchId}\", {\n params: { path: { batchId } },\n }),\n /**\n * Durably reserve a complete manual-batch request. Once accepted, clients\n * only need to persist the batch UUID.\n */\n reserveManualBatch: (body: ManualInventoryBatchReserveRequest) =>\n client.POST(\"/v1/inventory/manual-batches/reservations\", { body }),\n /** Commit a reserved batch by UUID with no request body. */\n commitManualBatch: (batchId: string) =>\n client.POST(\"/v1/inventory/manual-batches/{batchId}/commit\", {\n params: { path: { batchId } },\n }),\n /**\n * Get unknown, accepted, in-progress, completed, or terminal-rejected\n * state. Unknown is explicitly nonterminal, including missing or\n * cross-tenant UUIDs, so clients retain the UUID and retry.\n */\n getManualBatchStatus: (batchId: string) =>\n client.GET(\"/v1/inventory/manual-batches/{batchId}/status\", {\n params: { path: { batchId } },\n }),\n /** Durably reserve canonical catalog-backed inventory intent. */\n reserveCatalogBatch: (body: CatalogInventoryBatchReserveRequest) =>\n client.POST(\"/v1/inventory/catalog-batches/reservations\", { body }),\n /** Atomically commit a reserved catalog batch by UUID, with no body. */\n commitCatalogBatch: (batchId: string) =>\n client.POST(\"/v1/inventory/catalog-batches/{batchId}/commit\", {\n params: { path: { batchId } },\n }),\n /** Recover the owner-scoped lifecycle; missing batches remain unknown. */\n getCatalogBatchStatus: (batchId: string) =>\n client.GET(\"/v1/inventory/catalog-batches/{batchId}/status\", {\n params: { path: { batchId } },\n }),\n /**\n * Update one of the caller's own inventory rows. Pass `ifMatch` (the\n * row's `last_updated`) to enable optimistic concurrency (409 on mismatch).\n */\n update: (\n id: number,\n body: InventoryUpdateRequest,\n options?: { ifMatch?: string },\n ) =>\n client.PATCH(\"/v1/inventory/{id}\", {\n params: {\n path: { id },\n header: options?.ifMatch\n ? { \"if-match\": options.ifMatch }\n : undefined,\n },\n body,\n }),\n /**\n * Delete one of the caller's own inventory rows. Returns 409 if dependent\n * roast profiles or sales exist (no force-cascade).\n */\n delete: (id: number) =>\n client.DELETE(\"/v1/inventory/{id}\", { params: { path: { id } } }),\n },\n roasts: {\n /** Match Artisan roast metadata to one of the supplied inventory rows. */\n classify: (body: RoastClassificationRequest) =>\n client.POST(\"/v1/roasts/classify\", { body }),\n /** List the caller's own roast profiles (owner-scoped). */\n list: (query?: RoastListQuery) =>\n client.GET(\"/v1/roasts\", { params: { query } }),\n /**\n * Fetch one of the caller's roast profiles by id, optionally with its\n * temperature curve (`includeTemps`) and event markers (`includeEvents`).\n */\n get: (id: string, query?: RoastGetQuery) =>\n client.GET(\"/v1/roasts/{id}\", { params: { path: { id }, query } }),\n /** Fetch an owner roast's adaptively sampled chart curve and metadata. */\n chartData: (id: string, query?: RoastChartDataQuery) =>\n client.GET(\"/v1/roasts/{id}/chart-data\", {\n params: { path: { id }, query },\n }),\n /**\n * Create an owner roast profile, optionally with nested temperature/event\n * rows. Requires a session or an owner-bound API key carrying the exact\n * `roast:write` scope. The optional `idempotencyKey` is payload-bound:\n * same-key, same-payload retries replay, while changed payloads conflict.\n */\n create: (\n body: RoastCreateRequest,\n options?: { idempotencyKey?: string },\n ) =>\n client.POST(\"/v1/roasts\", {\n body,\n params: options?.idempotencyKey\n ? { header: { \"idempotency-key\": options.idempotencyKey } }\n : undefined,\n }),\n /**\n * Create every profile in one named batch atomically. The required\n * payload-bound idempotency key makes transport retries safe.\n */\n createBatch: (body: RoastBatchCreateRequest, idempotencyKey: string) =>\n client.POST(\"/v1/roasts/batches\", {\n body,\n params: { header: { \"idempotency-key\": idempotencyKey } },\n }),\n /**\n * Update one of the caller's own roast profiles. Pass `ifMatch` (the\n * row's `last_updated`) to enable optimistic concurrency (409 on mismatch).\n */\n update: (\n id: number,\n body: RoastUpdateRequest,\n options?: { ifMatch?: string },\n ) =>\n client.PATCH(\"/v1/roasts/{id}\", {\n params: {\n path: { id },\n header: options?.ifMatch\n ? { \"if-match\": options.ifMatch }\n : undefined,\n },\n body,\n }),\n /** Delete one of the caller's own roast profiles. */\n delete: (id: number) =>\n client.DELETE(\"/v1/roasts/{id}\", { params: { path: { id } } }),\n /** Delete every owner roast carrying one exact batch name. Session-only. */\n deleteBatch: (batchName: string) =>\n client.DELETE(\"/v1/roasts/batches/{batchName}\", {\n params: { path: { batchName } },\n }),\n /**\n * Replace live temperature samples and all event markers atomically,\n * while preserving non-live temperatures and deriving milestone fields.\n */\n replaceLiveCurve: (\n id: number,\n body: RoastLiveCurveRequest,\n options?: { ifMatch?: string },\n ) =>\n client.PUT(\"/v1/roasts/{id}/live-curve\", {\n params: {\n path: { id },\n header: options?.ifMatch\n ? { \"if-match\": options.ifMatch }\n : undefined,\n },\n body,\n }),\n /**\n * Create a roast profile from an Artisan `.alog` file against one of the\n * caller's green-coffee lots, persisting the imported curve, events, and\n * an artisan_import_log entry atomically. Requires a session or an\n * owner-bound API key carrying the exact `roast:write` scope. The\n * optional `idempotencyKey` is payload-bound: same-key, same-payload\n * retries replay, while changed payloads conflict.\n */\n import: (\n body: RoastImportRequest,\n options?: { idempotencyKey?: string },\n ) =>\n client.POST(\"/v1/roasts/imports\", {\n body,\n params: options?.idempotencyKey\n ? { header: { \"idempotency-key\": options.idempotencyKey } }\n : undefined,\n }),\n /**\n * Replace the Artisan import data on one of the caller's existing roasts,\n * re-deriving its curve, events, and computed metrics while preserving the\n * roast's identity. Pass `ifMatch` (the roast's `last_updated`) to enable\n * optimistic concurrency (409 on mismatch).\n */\n replaceArtisanImport: (\n id: number,\n body: RoastArtisanImportReplaceRequest,\n options?: { ifMatch?: string },\n ) =>\n client.PUT(\"/v1/roasts/{id}/artisan-import\", {\n params: {\n path: { id },\n header: options?.ifMatch\n ? { \"if-match\": options.ifMatch }\n : undefined,\n },\n body,\n }),\n /**\n * Clear import-derived curve, events, metrics, and provenance data from\n * one of the caller's existing roasts without deleting the roast profile.\n */\n clearArtisanImport: (id: number) =>\n client.DELETE(\"/v1/roasts/{id}/artisan-import\", {\n params: { path: { id } },\n }),\n },\n sales: {\n /** List the caller's own sales (owner-scoped). */\n list: (query?: SalesListQuery) =>\n client.GET(\"/v1/sales\", { params: { query } }),\n /**\n * Record a sale against one of the caller's own green-coffee inventory\n * lots. Requires a session or an owner-bound API key carrying the exact\n * `sales:write` scope. The optional `idempotencyKey` is payload-bound:\n * same-key, same-payload retries replay, while changed payloads or a\n * concurrent duplicate return 409.\n */\n create: (\n body: SalesCreateRequest,\n options?: { idempotencyKey?: string },\n ) =>\n client.POST(\"/v1/sales\", {\n body,\n params: options?.idempotencyKey\n ? { header: { \"idempotency-key\": options.idempotencyKey } }\n : undefined,\n }),\n /**\n * Update one of the caller's own sales. The sales table carries no\n * `last_updated` column, so no If-Match optimistic concurrency is\n * offered.\n */\n update: (id: number, body: SalesUpdateRequest) =>\n client.PATCH(\"/v1/sales/{id}\", {\n params: { path: { id } },\n body,\n }),\n /** Delete one of the caller's own sales. */\n delete: (id: number) =>\n client.DELETE(\"/v1/sales/{id}\", { params: { path: { id } } }),\n },\n profit: {\n /**\n * List the caller's owner-scoped profit summaries. API keys require\n * inventory:read, roast:read, and sales:read. Use pagination.total to\n * exhaust the complete owner result set.\n */\n list: (query?: ProfitListQuery) =>\n client.GET(\"/v1/profit\", { params: { query } }),\n },\n tasting: {\n /** Fetch supplier notes plus the caller's own latest tasting notes. */\n get: (catalogId: string, query?: TastingGetQuery) =>\n client.GET(\"/v1/tasting/{catalogId}\", {\n params: { path: { catalogId }, query },\n }),\n /** Replace the caller's rating for one owned inventory lot. */\n rate: (inventoryId: number, body: TastingRateRequest) =>\n client.PUT(\"/v1/tasting/inventory/{inventoryId}\", {\n params: { path: { inventoryId }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